@dedot/cli 0.0.1-next.59796573.28 → 0.0.1-next.5d366dea.50

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.
@@ -4,6 +4,7 @@ type Args = {
4
4
  output?: string;
5
5
  chain?: string;
6
6
  dts?: boolean;
7
+ subpath?: boolean;
7
8
  };
8
9
  export declare const chaintypes: CommandModule<Args, Args>;
9
10
  export {};
@@ -37,7 +37,7 @@ exports.chaintypes = {
37
37
  command: 'chaintypes',
38
38
  describe: 'Generate chain types & APIs for a Substrate-based blockchain',
39
39
  handler: async (yargs) => {
40
- const { wsUrl, output = '', chain = '', dts = true } = yargs;
40
+ const { wsUrl, output = '', chain = '', dts = true, subpath = true } = yargs;
41
41
  const outDir = path.resolve(output);
42
42
  const extension = dts ? 'd.ts' : 'ts';
43
43
  if (wsUrl === 'substrate') {
@@ -50,11 +50,11 @@ exports.chaintypes = {
50
50
  acc[name] = version;
51
51
  return acc;
52
52
  }, {});
53
- await (0, codegen_1.generateTypes)('substrate', metadata.latest, rpcMethods, runtimeApis, outDir, extension);
53
+ await (0, codegen_1.generateTypes)('substrate', metadata.latest, rpcMethods, runtimeApis, outDir, extension, subpath);
54
54
  }
55
55
  else {
56
56
  console.log(`- Generating chaintypes via endpoint ${wsUrl}`);
57
- await (0, codegen_1.generateTypesFromEndpoint)(chain, wsUrl, outDir, extension);
57
+ await (0, codegen_1.generateTypesFromEndpoint)(chain, wsUrl, outDir, extension, subpath);
58
58
  }
59
59
  console.log(`- DONE! Output: ${outDir}`);
60
60
  },
@@ -82,6 +82,12 @@ exports.chaintypes = {
82
82
  describe: 'Generate d.ts files',
83
83
  alias: 'd',
84
84
  default: true,
85
+ })
86
+ .option('subpath', {
87
+ type: 'boolean',
88
+ describe: 'Using subpath for shared packages',
89
+ alias: 's',
90
+ default: true,
85
91
  })); // TODO check to verify inputs
86
92
  },
87
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/cli",
3
- "version": "0.0.1-next.59796573.28+5979657",
3
+ "version": "0.0.1-next.5d366dea.50+5d366de",
4
4
  "author": "Thang X. Vu <thang@coongcrafts.io>",
5
5
  "bin": {
6
6
  "dedot": "./bin/dedot",
@@ -14,8 +14,8 @@
14
14
  "start": "ts-node src/index.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@dedot/codegen": "0.0.1-next.59796573.28+5979657",
18
- "@polkadot/types-support": "^10.12.4",
17
+ "@dedot/codegen": "0.0.1-next.5d366dea.50+5d366de",
18
+ "@polkadot/types-support": "^11.0.2",
19
19
  "yargs": "^17.7.2"
20
20
  },
21
21
  "devDependencies": {
@@ -26,5 +26,5 @@
26
26
  "directory": "dist"
27
27
  },
28
28
  "license": "Apache-2.0",
29
- "gitHead": "59796573a5449c47e2f6c06a913275660a0441e1"
29
+ "gitHead": "5d366dea6b6c3d076a616746d80b80ef37434ff7"
30
30
  }