@polkadot-api/cli 0.13.1 → 0.13.3

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.
@@ -1,13 +1,13 @@
1
1
  // src/metadata.ts
2
2
  import { createClient } from "@polkadot-api/substrate-client";
3
- import * as fs from "node:fs/promises";
3
+ import * as fs from "fs/promises";
4
4
  import {
5
5
  metadata,
6
6
  unifyMetadata,
7
7
  v15
8
8
  } from "@polkadot-api/substrate-bindings";
9
9
  import { getWsProvider } from "@polkadot-api/ws-provider/node";
10
- import { Worker } from "node:worker_threads";
10
+ import { Worker } from "worker_threads";
11
11
  import { getObservableClient } from "@polkadot-api/observable-client";
12
12
  import { combineLatest, filter, firstValueFrom } from "rxjs";
13
13
  import { dirname } from "path";
@@ -145,9 +145,9 @@ async function writeMetadataToDisk(metadataRaw, outFile) {
145
145
  // src/papiConfig.ts
146
146
  import fsExists from "fs.promises.exists";
147
147
  import { readPackage } from "read-pkg";
148
- import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
149
- import { join } from "node:path";
150
- import { existsSync } from "node:fs";
148
+ import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
149
+ import { join } from "path";
150
+ import { existsSync } from "fs";
151
151
  var papiFolder = ".papi";
152
152
  var papiCfgDefaultFile = "polkadot-api.json";
153
153
  var packageJsonKey = "polkadot-api";
@@ -229,8 +229,8 @@ import tsup from "tsup";
229
229
  import { updatePackage } from "write-package";
230
230
 
231
231
  // src/packageManager.ts
232
- import { readdir } from "node:fs/promises";
233
- import { join as join2 } from "node:path";
232
+ import { readdir } from "fs/promises";
233
+ import { join as join2 } from "path";
234
234
  import { execa } from "execa";
235
235
  var detected = null;
236
236
  async function detectPackageManager() {
@@ -632,10 +632,10 @@ async function flushBundlerCache() {
632
632
  import { compactNumber } from "@polkadot-api/substrate-bindings";
633
633
  import { fromHex } from "@polkadot-api/utils";
634
634
  import { getMetadataFromRuntime } from "@polkadot-api/wasm-executor";
635
- import * as fs3 from "node:fs/promises";
635
+ import * as fs3 from "fs/promises";
636
636
  import ora from "ora";
637
- import { join as join4 } from "node:path";
638
- import { existsSync as existsSync3 } from "node:fs";
637
+ import { join as join4 } from "path";
638
+ import { existsSync as existsSync3 } from "fs";
639
639
  async function add(key, options) {
640
640
  const config = await readPapiConfig(options.config) ?? defaultConfig;
641
641
  const entries = config.entries;
@@ -714,9 +714,9 @@ var entryFromOptions = (options) => {
714
714
  };
715
715
 
716
716
  // src/commands/ink.ts
717
- import { existsSync as existsSync4 } from "node:fs";
718
- import * as fs4 from "node:fs/promises";
719
- import { join as join5 } from "node:path";
717
+ import { existsSync as existsSync4 } from "fs";
718
+ import * as fs4 from "fs/promises";
719
+ import { join as join5 } from "path";
720
720
  var ink = {
721
721
  async add(file, options) {
722
722
  const metadata2 = JSON.parse(await fs4.readFile(file, "utf-8"));
@@ -874,4 +874,4 @@ export {
874
874
  update,
875
875
  getCli
876
876
  };
877
- //# sourceMappingURL=chunk-3PQ23XYT.js.map
877
+ //# sourceMappingURL=chunk-42G7OGZ3.js.map
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  readPapiConfig,
8
8
  remove,
9
9
  update
10
- } from "./chunk-3PQ23XYT.js";
10
+ } from "./chunk-42G7OGZ3.js";
11
11
  export {
12
12
  add,
13
13
  generate,
package/dist/main.js CHANGED
@@ -6,10 +6,10 @@ import {
6
6
  ink,
7
7
  remove,
8
8
  update
9
- } from "./chunk-3PQ23XYT.js";
9
+ } from "./chunk-42G7OGZ3.js";
10
10
 
11
11
  // package.json
12
- var version = "0.13.1";
12
+ var version = "0.13.3";
13
13
 
14
14
  // src/main.ts
15
15
  var program = getCli({ add, generate, remove, update, ink, version });
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@polkadot-api/cli\",\n \"version\": \"0.13.1\",\n \"author\": \"Victor Oliva (https://github.com/voliva)\",\n \"license\": \"MIT\",\n \"sideEffects\": true,\n \"type\": \"module\",\n \"bin\": {\n \"papi\": \"./dist/main.js\",\n \"polkadot-api\": \"./dist/main.js\"\n },\n \"files\": [\n \"/dist\"\n ],\n \"exports\": {\n \".\": {\n \"node\": {\n \"import\": \"./dist/index.js\"\n },\n \"types\": \"./dist/index.d.ts\",\n \"module\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"scripts\": {\n \"build-core\": \"tsc --noEmit && tsup-node src/main.ts src/index.ts src/metadataWorker.ts --clean --out-dir dist --dts --sourcemap --platform node --format esm\",\n \"build\": \"pnpm build-core\",\n \"start\": \"pnpm build && node --enable-source-maps dist/main.js\",\n \"test\": \"echo 'no tests'\",\n \"lint\": \"prettier --check README.md \\\"src/**/*.{js,jsx,ts,tsx,json,md}\\\"\",\n \"format\": \"prettier --write README.md \\\"src/**/*.{js,jsx,ts,tsx,json,md}\\\"\",\n \"prepack\": \"pnpm run build\"\n },\n \"dependencies\": {\n \"@commander-js/extra-typings\": \"^13.1.0\",\n \"@polkadot-api/codegen\": \"workspace:*\",\n \"@polkadot-api/ink-contracts\": \"workspace:*\",\n \"@polkadot-api/json-rpc-provider\": \"workspace:*\",\n \"@polkadot-api/known-chains\": \"workspace:*\",\n \"@polkadot-api/metadata-compatibility\": \"workspace:*\",\n \"@polkadot-api/observable-client\": \"workspace:*\",\n \"@polkadot-api/polkadot-sdk-compat\": \"workspace:*\",\n \"@polkadot-api/sm-provider\": \"workspace:*\",\n \"@polkadot-api/smoldot\": \"workspace:*\",\n \"@polkadot-api/substrate-bindings\": \"workspace:*\",\n \"@polkadot-api/substrate-client\": \"workspace:*\",\n \"@polkadot-api/utils\": \"workspace:*\",\n \"@polkadot-api/wasm-executor\": \"^0.1.2\",\n \"@polkadot-api/ws-provider\": \"workspace:*\",\n \"@types/node\": \"^22.15.18\",\n \"commander\": \"^13.1.0\",\n \"execa\": \"^9.5.3\",\n \"fs.promises.exists\": \"^1.1.4\",\n \"ora\": \"^8.2.0\",\n \"read-pkg\": \"^9.0.1\",\n \"rxjs\": \"^7.8.2\",\n \"tsc-prog\": \"^2.3.0\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.8.3\",\n \"write-package\": \"^7.1.0\"\n },\n \"devDependencies\": {\n \"@polkadot-api/json-rpc-provider\": \"workspace:*\"\n }\n}\n","#!/usr/bin/env node\n\nimport { getCli } from \"./cli\"\nimport { add, generate, ink, remove, update } from \"./commands\"\nimport { version } from \"../package.json\"\n\nconst program = getCli({ add, generate, remove, update, ink, version })\nprogram.parse()\n"],"mappings":";;;;;;;;;;;AAEE,cAAW;;;ACIb,IAAM,UAAU,OAAO,EAAE,KAAK,UAAU,QAAQ,QAAQ,KAAK,QAAQ,CAAC;AACtE,QAAQ,MAAM;","names":[]}
1
+ {"version":3,"sources":["../package.json","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@polkadot-api/cli\",\n \"version\": \"0.13.3\",\n \"author\": \"Victor Oliva (https://github.com/voliva)\",\n \"license\": \"MIT\",\n \"sideEffects\": true,\n \"type\": \"module\",\n \"bin\": {\n \"papi\": \"./dist/main.js\",\n \"polkadot-api\": \"./dist/main.js\"\n },\n \"files\": [\n \"/dist\"\n ],\n \"exports\": {\n \".\": {\n \"node\": {\n \"import\": \"./dist/index.js\"\n },\n \"types\": \"./dist/index.d.ts\",\n \"module\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"scripts\": {\n \"build-core\": \"tsc --noEmit && tsup-node src/main.ts src/index.ts src/metadataWorker.ts --clean --out-dir dist --dts --sourcemap --platform node --format esm\",\n \"build\": \"pnpm build-core\",\n \"start\": \"pnpm build && node --enable-source-maps dist/main.js\",\n \"test\": \"echo 'no tests'\",\n \"lint\": \"prettier --check README.md \\\"src/**/*.{js,jsx,ts,tsx,json,md}\\\"\",\n \"format\": \"prettier --write README.md \\\"src/**/*.{js,jsx,ts,tsx,json,md}\\\"\",\n \"prepack\": \"pnpm run build\"\n },\n \"dependencies\": {\n \"@commander-js/extra-typings\": \"^14.0.0\",\n \"@polkadot-api/codegen\": \"workspace:*\",\n \"@polkadot-api/ink-contracts\": \"workspace:*\",\n \"@polkadot-api/json-rpc-provider\": \"workspace:*\",\n \"@polkadot-api/known-chains\": \"workspace:*\",\n \"@polkadot-api/metadata-compatibility\": \"workspace:*\",\n \"@polkadot-api/observable-client\": \"workspace:*\",\n \"@polkadot-api/polkadot-sdk-compat\": \"workspace:*\",\n \"@polkadot-api/sm-provider\": \"workspace:*\",\n \"@polkadot-api/smoldot\": \"workspace:*\",\n \"@polkadot-api/substrate-bindings\": \"workspace:*\",\n \"@polkadot-api/substrate-client\": \"workspace:*\",\n \"@polkadot-api/utils\": \"workspace:*\",\n \"@polkadot-api/wasm-executor\": \"^0.1.2\",\n \"@polkadot-api/ws-provider\": \"workspace:*\",\n \"@types/node\": \"^22.15.27\",\n \"commander\": \"^14.0.0\",\n \"execa\": \"^9.6.0\",\n \"fs.promises.exists\": \"^1.1.4\",\n \"ora\": \"^8.2.0\",\n \"read-pkg\": \"^9.0.1\",\n \"rxjs\": \"^7.8.2\",\n \"tsc-prog\": \"^2.3.0\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^5.8.3\",\n \"write-package\": \"^7.1.0\"\n },\n \"devDependencies\": {\n \"@polkadot-api/json-rpc-provider\": \"workspace:*\",\n \"@swc/core\": \"^1.11.29\"\n }\n}\n","#!/usr/bin/env node\n\nimport { getCli } from \"./cli\"\nimport { add, generate, ink, remove, update } from \"./commands\"\nimport { version } from \"../package.json\"\n\nconst program = getCli({ add, generate, remove, update, ink, version })\nprogram.parse()\n"],"mappings":";;;;;;;;;;;AAEE,cAAW;;;ACIb,IAAM,UAAU,OAAO,EAAE,KAAK,UAAU,QAAQ,QAAQ,KAAK,QAAQ,CAAC;AACtE,QAAQ,MAAM;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polkadot-api/cli",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "author": "Victor Oliva (https://github.com/voliva)",
5
5
  "license": "MIT",
6
6
  "sideEffects": true,
@@ -23,34 +23,35 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@commander-js/extra-typings": "^13.1.0",
26
+ "@commander-js/extra-typings": "^14.0.0",
27
27
  "@polkadot-api/wasm-executor": "^0.1.2",
28
- "@types/node": "^22.15.18",
29
- "commander": "^13.1.0",
30
- "execa": "^9.5.3",
28
+ "@types/node": "^22.15.27",
29
+ "commander": "^14.0.0",
30
+ "execa": "^9.6.0",
31
31
  "fs.promises.exists": "^1.1.4",
32
32
  "ora": "^8.2.0",
33
33
  "read-pkg": "^9.0.1",
34
34
  "rxjs": "^7.8.2",
35
35
  "tsc-prog": "^2.3.0",
36
- "tsup": "^8.4.0",
36
+ "tsup": "^8.5.0",
37
37
  "typescript": "^5.8.3",
38
38
  "write-package": "^7.1.0",
39
- "@polkadot-api/ink-contracts": "0.3.3",
39
+ "@polkadot-api/codegen": "0.16.2",
40
40
  "@polkadot-api/json-rpc-provider": "0.0.4",
41
- "@polkadot-api/codegen": "0.16.1",
42
- "@polkadot-api/metadata-compatibility": "0.2.3",
43
- "@polkadot-api/known-chains": "0.7.6",
44
- "@polkadot-api/observable-client": "0.11.0",
45
- "@polkadot-api/polkadot-sdk-compat": "2.3.2",
41
+ "@polkadot-api/known-chains": "0.8.0",
42
+ "@polkadot-api/ink-contracts": "0.3.4",
43
+ "@polkadot-api/observable-client": "0.11.1",
44
+ "@polkadot-api/metadata-compatibility": "0.2.4",
46
45
  "@polkadot-api/sm-provider": "0.1.7",
47
- "@polkadot-api/smoldot": "0.3.8",
48
- "@polkadot-api/substrate-client": "0.3.0",
49
- "@polkadot-api/ws-provider": "0.4.0",
50
- "@polkadot-api/utils": "0.1.2",
51
- "@polkadot-api/substrate-bindings": "0.13.0"
46
+ "@polkadot-api/smoldot": "0.3.9",
47
+ "@polkadot-api/polkadot-sdk-compat": "2.3.2",
48
+ "@polkadot-api/substrate-client": "0.4.0",
49
+ "@polkadot-api/substrate-bindings": "0.14.0",
50
+ "@polkadot-api/utils": "0.2.0",
51
+ "@polkadot-api/ws-provider": "0.4.0"
52
52
  },
53
53
  "devDependencies": {
54
+ "@swc/core": "^1.11.29",
54
55
  "@polkadot-api/json-rpc-provider": "0.0.4"
55
56
  },
56
57
  "scripts": {