git.delta.rocks / unique-network / refs/commits / d47d7f05f33d

difftreelog

resolve paths

Max Andreev2023-06-09parent: #60e186a.patch.diff
in: master

2 files changed

deletedtests/src/migrations/942057-appPromotion/collect-data.shdiffbeforeafterboth
--- a/tests/src/migrations/942057-appPromotion/collect-data.sh
+++ /dev/null
@@ -1 +0,0 @@
-chainql --tla-str=chainUrl=ws://127.0.0.1:9944 stakersParser.jsonnet > output.json
\ No newline at end of file
modifiedtests/src/migrations/942057-appPromotion/collectData.tsdiffbeforeafterboth
before · tests/src/migrations/942057-appPromotion/collectData.ts
1import {spawnSync} from 'child_process';23export const collectData = () => spawnSync('sh', ['./collect-data.sh']);
after · tests/src/migrations/942057-appPromotion/collectData.ts
1import {execSync} from 'child_process';2import path from 'path';3import {dirname} from 'path';4import {fileURLToPath} from 'url';56export const collectData = () => {7  const dirName = dirname(fileURLToPath(import.meta.url));89  const pathToScript = path.resolve(dirName, './stakersParser.jsonnet');10  const outputPath = path.resolve(dirName, './output.json');11  // execSync(`chainql --tla-str=chainUrl=wss://ws-quartz.unique.network:443 ${pathToScript} > ${outputPath}`);12  execSync(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);13};1415collectData();