@dedot/cli 0.0.1-alpha.26 → 0.0.1-alpha.396

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.
@@ -31,20 +31,21 @@ exports.chaintypes = {
31
31
  describe: 'Generate chain types & APIs for a Substrate-based blockchain',
32
32
  handler: async (yargs) => {
33
33
  const { wsUrl, output = '', chain = '' } = yargs;
34
- console.log(`- Generating chaintypes via endpoint ${wsUrl}`);
35
- const outDir = path.resolve(output, './codegen');
36
- await (0, codegen_1.generateTypesFromChain)({ chain }, wsUrl, outDir);
37
- console.log(`- DONE! Output: ${outDir}`);
34
+ const outputDir = path.resolve(output, './codegen');
35
+ await (0, codegen_1.generateTypesFromChain)({ chain }, wsUrl, outputDir);
38
36
  },
39
37
  builder: (yargs) => {
40
- return (yargs
38
+ return yargs
41
39
  .option('wsUrl', {
42
40
  type: 'string',
43
41
  describe: 'Websocket Url to fetch metadata',
44
42
  alias: 'w',
45
- default: 'ws://127.0.0.1:9944',
46
43
  })
47
- // TODO add file input
44
+ .option('file', {
45
+ type: 'string',
46
+ describe: 'Path to metadata file',
47
+ alias: 'f',
48
+ })
48
49
  .option('output', {
49
50
  type: 'string',
50
51
  describe: 'Output folder to put generated files',
@@ -54,6 +55,6 @@ exports.chaintypes = {
54
55
  type: 'string',
55
56
  describe: 'Chain name',
56
57
  alias: 'c',
57
- })); // TODO check to verify inputs
58
+ }); // TODO check to verify inputs
58
59
  },
59
60
  };
package/cjs/index.js CHANGED
@@ -3,8 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dedot = void 0;
4
4
  const dedot_1 = require("./dedot");
5
5
  Object.defineProperty(exports, "dedot", { enumerable: true, get: function () { return dedot_1.dedot; } });
6
- // We run this directly for development purpose via ts-node
7
- // @ts-ignore
8
- if (process[Symbol.for('ts-node.register.instance')]) {
9
- (0, dedot_1.dedot)();
10
- }
@@ -2,4 +2,4 @@
2
2
  // THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.packageInfo = void 0;
5
- exports.packageInfo = { name: '@dedot/cli', version: '0.0.1-alpha.25' };
5
+ exports.packageInfo = { name: '@dedot/cli', version: '0.0.1-alpha.0' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/cli",
3
- "version": "0.0.1-alpha.26",
3
+ "version": "0.0.1-alpha.396+cef1b29",
4
4
  "author": "Thang X. Vu <thang@coongcrafts.io>",
5
5
  "bin": {
6
6
  "dedot": "./bin/dedot",
@@ -10,10 +10,10 @@
10
10
  "scripts": {
11
11
  "build": "tsc --project tsconfig.build.cjs.json && cp -R ./bin ./dist",
12
12
  "clean": "rm -rf ./dist && rm -rf ./tsconfig.tsbuildinfo ./tsconfig.build.cjs.tsbuildinfo && rm -rf ./src/codegen",
13
- "start": "ts-node src/index.ts"
13
+ "test": "vitest --watch=false"
14
14
  },
15
15
  "dependencies": {
16
- "@dedot/codegen": "0.0.1-alpha.26",
16
+ "@dedot/codegen": "0.0.1-alpha.4+cef1b29",
17
17
  "yargs": "^17.7.2"
18
18
  },
19
19
  "devDependencies": {
@@ -24,5 +24,5 @@
24
24
  "directory": "dist"
25
25
  },
26
26
  "license": "Apache-2.0",
27
- "gitHead": "5b114a0d2359316f07654915f3c03b44761cac73"
27
+ "gitHead": "cef1b29a1f5b0d92fb8c9893dfabff20b658fa5f"
28
28
  }
package/packageInfo.js DELETED
@@ -1,3 +0,0 @@
1
- // THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
2
-
3
- export const packageInfo = { name: '@dedot/cli', version: '0.0.1-alpha.26' };