From bc6d39b94f20c1bba0ee6099dde7e36e553f91b9 Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Tue, 10 Jun 2025 17:22:34 -0700 Subject: [PATCH 1/3] fix(entropy-tester): adjust cli execution and tsconfigs --- apps/entropy-tester/.gitignore | 2 +- apps/entropy-tester/cli/run.js | 2 +- apps/entropy-tester/package.json | 5 +++-- apps/entropy-tester/src/index.ts | 2 +- apps/entropy-tester/tsconfig.json | 8 ++++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apps/entropy-tester/.gitignore b/apps/entropy-tester/.gitignore index a65b41774a..1521c8b765 100644 --- a/apps/entropy-tester/.gitignore +++ b/apps/entropy-tester/.gitignore @@ -1 +1 @@ -lib +dist diff --git a/apps/entropy-tester/cli/run.js b/apps/entropy-tester/cli/run.js index 88949bac02..200e98ef20 100644 --- a/apps/entropy-tester/cli/run.js +++ b/apps/entropy-tester/cli/run.js @@ -1,3 +1,3 @@ #!/usr/bin/env node import { main } from "../dist/index.js"; -main(); +main().argv; diff --git a/apps/entropy-tester/package.json b/apps/entropy-tester/package.json index ec4f9b4d25..29ba87bbae 100644 --- a/apps/entropy-tester/package.json +++ b/apps/entropy-tester/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/entropy-tester", - "version": "1.0.0", + "version": "1.0.1", "description": "Utility to test entropy provider callbacks", "type": "module", "main": "dist/index.js", @@ -22,7 +22,8 @@ "test:format": "prettier --check .", "test:lint": "eslint . --max-warnings 0", "test:types": "tsc", - "start": "tsc && node cli/run.js" + "dev:start": "tsc && node cli/run.js", + "start": "node cli/run.js" }, "repository": { "type": "git", diff --git a/apps/entropy-tester/src/index.ts b/apps/entropy-tester/src/index.ts index 9269ee62e3..a08972095f 100644 --- a/apps/entropy-tester/src/index.ts +++ b/apps/entropy-tester/src/index.ts @@ -153,7 +153,7 @@ const RUN_OPTIONS = { } as const; export const main = function () { - yargs(hideBin(process.argv)) + return yargs(hideBin(process.argv)) .parserConfiguration({ "parse-numbers": false, }) diff --git a/apps/entropy-tester/tsconfig.json b/apps/entropy-tester/tsconfig.json index fd12d1332d..30cfceb1d2 100644 --- a/apps/entropy-tester/tsconfig.json +++ b/apps/entropy-tester/tsconfig.json @@ -1,5 +1,9 @@ { - "extends": "@cprussin/tsconfig/nextjs.json", - "include": ["**/*.ts", "**/*.tsx"], + "extends": "@cprussin/tsconfig/base.json", + "compilerOptions": { + "outDir": "./dist", + "noEmit": false + }, + "include": ["**/*.ts"], "exclude": ["node_modules"] } From 2b8b84943deb81e26cda6b8ff8960260fd75d18f Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Tue, 10 Jun 2025 17:32:04 -0700 Subject: [PATCH 2/3] fix --- apps/entropy-tester/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/entropy-tester/tsconfig.json b/apps/entropy-tester/tsconfig.json index 30cfceb1d2..aa05ea522f 100644 --- a/apps/entropy-tester/tsconfig.json +++ b/apps/entropy-tester/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@cprussin/tsconfig/base.json", + "extends": "@cprussin/tsconfig/nextjs.json", "compilerOptions": { "outDir": "./dist", "noEmit": false From 94fe31105f50e31476b91417750b188e7ac17a22 Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Tue, 10 Jun 2025 17:37:27 -0700 Subject: [PATCH 3/3] fix --- apps/entropy-tester/package.json | 6 +++--- apps/entropy-tester/tsconfig.build.json | 7 +++++++ apps/entropy-tester/tsconfig.json | 4 ---- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 apps/entropy-tester/tsconfig.build.json diff --git a/apps/entropy-tester/package.json b/apps/entropy-tester/package.json index 29ba87bbae..4d687a410f 100644 --- a/apps/entropy-tester/package.json +++ b/apps/entropy-tester/package.json @@ -16,14 +16,14 @@ "cli/**/*" ], "scripts": { - "build": "tsc", + "build": "tsc --project tsconfig.build.json", "fix:format": "prettier --write .", "fix:lint": "eslint --fix .", "test:format": "prettier --check .", "test:lint": "eslint . --max-warnings 0", "test:types": "tsc", - "dev:start": "tsc && node cli/run.js", - "start": "node cli/run.js" + "start:dev": "tsc --project tsconfig.build.json && node cli/run.js", + "start:prod": "node cli/run.js" }, "repository": { "type": "git", diff --git a/apps/entropy-tester/tsconfig.build.json b/apps/entropy-tester/tsconfig.build.json new file mode 100644 index 0000000000..c3e1b1a3b8 --- /dev/null +++ b/apps/entropy-tester/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "noEmit": false + } +} diff --git a/apps/entropy-tester/tsconfig.json b/apps/entropy-tester/tsconfig.json index aa05ea522f..9f43d9c09e 100644 --- a/apps/entropy-tester/tsconfig.json +++ b/apps/entropy-tester/tsconfig.json @@ -1,9 +1,5 @@ { "extends": "@cprussin/tsconfig/nextjs.json", - "compilerOptions": { - "outDir": "./dist", - "noEmit": false - }, "include": ["**/*.ts"], "exclude": ["node_modules"] }