naracli 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/env-loader.cjs +3 -0
- package/bin/nara-cli.ts +5 -1
- package/dist/nara-cli.mjs +4 -5
- package/dist/naracli.cjs +4 -0
- package/package.json +4 -4
package/bin/nara-cli.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { registerCommands } from "../src/cli/index";
|
|
7
7
|
import { loadWallet } from "../src/cli/utils/wallet";
|
|
8
|
+
import { createRequire } from "node:module";
|
|
9
|
+
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
const { version } = require("../package.json");
|
|
8
12
|
|
|
9
13
|
// Create program
|
|
10
14
|
const program = new Command();
|
|
@@ -13,7 +17,7 @@ const program = new Command();
|
|
|
13
17
|
program
|
|
14
18
|
.name("naracli")
|
|
15
19
|
.description("CLI for the Nara chain (Solana-compatible)")
|
|
16
|
-
.version(
|
|
20
|
+
.version(version);
|
|
17
21
|
|
|
18
22
|
// Add global options
|
|
19
23
|
program
|
package/dist/nara-cli.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const _w=console.warn;console.warn=(...a)=>{if(String(a[0]).includes("bigint"))return;_w(...a)};
|
|
3
|
-
try{process.loadEnvFile()}catch{}
|
|
4
|
-
|
|
5
1
|
// bin/nara-cli.ts
|
|
6
2
|
import { Command as Command8 } from "commander";
|
|
7
3
|
|
|
@@ -2630,8 +2626,11 @@ function registerCommands(program2) {
|
|
|
2630
2626
|
}
|
|
2631
2627
|
|
|
2632
2628
|
// bin/nara-cli.ts
|
|
2629
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
2630
|
+
var require2 = createRequire2(import.meta.url);
|
|
2631
|
+
var { version } = require2("../package.json");
|
|
2633
2632
|
var program = new Command8();
|
|
2634
|
-
program.name("naracli").description("CLI for the Nara chain (Solana-compatible)").version(
|
|
2633
|
+
program.name("naracli").description("CLI for the Nara chain (Solana-compatible)").version(version);
|
|
2635
2634
|
program.option("-r, --rpc-url <url>", "RPC endpoint URL").option("-w, --wallet <path>", "Path to wallet keypair JSON file").option("-j, --json", "Output in JSON format");
|
|
2636
2635
|
program.command("address").description("Show wallet address").action(async () => {
|
|
2637
2636
|
const opts = program.opts();
|
package/dist/naracli.cjs
ADDED
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naracli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "CLI for the Nara chain (Solana-compatible)",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"main": "index.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"private": false,
|
|
9
9
|
"bin": {
|
|
10
|
-
"naracli": "./dist/
|
|
10
|
+
"naracli": "./dist/naracli.cjs"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"cli": "node --env-
|
|
14
|
-
"build": "npx esbuild bin/nara-cli.ts --bundle --platform=node --format=esm --outfile=dist/nara-cli.mjs --packages=external
|
|
13
|
+
"cli": "node --require ./bin/env-loader.cjs --import tsx bin/nara-cli.ts",
|
|
14
|
+
"build": "npx esbuild bin/nara-cli.ts --bundle --platform=node --format=esm --outfile=dist/nara-cli.mjs --packages=external && mkdir -p dist/zk dist/quest && cp src/cli/zk/answer_proof.wasm src/cli/zk/answer_proof_final.zkey dist/zk/ && cp src/cli/quest/nara_quest.json dist/quest/ && printf '#!/usr/bin/env node\\nconst _w=console.warn;console.warn=(...a)=>{if(String(a[0]).includes(\"bigint\"))return;_w(...a)};\\ntry{process.loadEnvFile()}catch{}\\nimport(\"./nara-cli.mjs\");\\n' > dist/naracli.cjs",
|
|
15
15
|
"prepublishOnly": "npm run build"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|