From 809d5281a2f69c652ad721013d91db557414774b Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Wed, 22 Feb 2023 14:29:38 +1300 Subject: [PATCH] fix script cwd (#201) --- e2e/scripts/sidecar-chopsticks.sh | 4 ++-- package.json | 8 ++------ packages/chopsticks/package.json | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/e2e/scripts/sidecar-chopsticks.sh b/e2e/scripts/sidecar-chopsticks.sh index 01fdff09..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 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 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 && \ 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",