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..4d687a410f 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", @@ -16,13 +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", - "start": "tsc && 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/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.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 fd12d1332d..9f43d9c09e 100644 --- a/apps/entropy-tester/tsconfig.json +++ b/apps/entropy-tester/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@cprussin/tsconfig/nextjs.json", - "include": ["**/*.ts", "**/*.tsx"], + "include": ["**/*.ts"], "exclude": ["node_modules"] }