From 24e34faef0d489ece9ec9b6aebee7a914c5e8b1f Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Wed, 22 Feb 2023 10:44:18 +1300 Subject: [PATCH 1/3] fix script cwd --- package.json | 8 ++------ packages/chopsticks/package.json | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index fe3e3ae6..e9e1c6f4 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,8 @@ "check": "cd executor && cargo check --locked", "test": "vitest run", "test:watch": "vitest", - "start": "yarn workspace @acala-network/chopsticks run start", - "dev": "yarn workspace @acala-network/chopsticks run dev", - "dev:karura": "yarn workspace @acala-network/chopsticks run dev:karura", - "dev:acala": "yarn workspace @acala-network/chopsticks run dev:acala", - "dev:moonriver": "yarn workspace @acala-network/chopsticks run dev:moonriver", - "dev:moonbeam": "yarn workspace @acala-network/chopsticks run dev:moonbeam" + "start": "yarn script:start", + "dev": "yarn script:run" }, "engines": { "node": ">=v14" diff --git a/packages/chopsticks/package.json b/packages/chopsticks/package.json index 3130673f..04724f24 100644 --- a/packages/chopsticks/package.json +++ b/packages/chopsticks/package.json @@ -12,8 +12,8 @@ "build": "rm -rf lib && tsc -p ./tsconfig.json", "test": "vitest run", "test:watch": "vitest", - "start": "ts-node --transpile-only src/cli.ts", - "dev": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/dev.yml", + "script:start": "cd ../..; ts-node packages/chopsticks/src/cli.ts", + "script:run": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/dev.yml", "dev:karura": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/karura.yml", "dev:acala": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/acala.yml", "dev:moonriver": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/moonriver.yml", From 34edbf91cef4bb54565c69500d442d2ac1384766 Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Wed, 22 Feb 2023 13:41:21 +1300 Subject: [PATCH 2/3] fix --- e2e/scripts/sidecar-chopsticks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/scripts/sidecar-chopsticks.sh b/e2e/scripts/sidecar-chopsticks.sh index 01fdff09..affb257d 100644 --- a/e2e/scripts/sidecar-chopsticks.sh +++ b/e2e/scripts/sidecar-chopsticks.sh @@ -8,8 +8,8 @@ rm -rf substrate-api-sidecar git clone https://github.com/paritytech/substrate-api-sidecar.git # run chopsticks node -yarn workspace @acala-network/chopsticks run start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! -yarn workspace @acala-network/chopsticks run start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! +yarn start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! +yarn start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! # run tests (cd substrate-api-sidecar && \ From 34683c7b8b68340383104ea5fbb500d5b732570f Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Wed, 22 Feb 2023 14:09:22 +1300 Subject: [PATCH 3/3] fix --- e2e/scripts/sidecar-chopsticks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/scripts/sidecar-chopsticks.sh b/e2e/scripts/sidecar-chopsticks.sh index affb257d..310abdac 100644 --- a/e2e/scripts/sidecar-chopsticks.sh +++ b/e2e/scripts/sidecar-chopsticks.sh @@ -8,8 +8,8 @@ rm -rf substrate-api-sidecar git clone https://github.com/paritytech/substrate-api-sidecar.git # run chopsticks node -yarn start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! -yarn start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! +yarn script:start dev --endpoint wss://rpc.polkadot.io --port 8011 & POLKADOT_PID=$! +yarn script:start dev --endpoint wss://statemint-rpc.polkadot.io --port 8012 & STATEMINT_PID=$! # run tests (cd substrate-api-sidecar && \