@dedot/codegen 0.8.0 → 0.8.1-next.4880b708.2
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/chaintypes/generator/TypesGen.js +1 -1
- package/chaintypes/templates/index.hbs +8 -8
- package/cjs/chaintypes/generator/TypesGen.js +1 -1
- package/cjs/chaintypes/templates/index.hbs +8 -8
- package/cjs/shared/TypeImports.js +1 -1
- package/cjs/typink/generator/TypesGen.js +1 -1
- package/cjs/typink/templates/index.hbs +6 -6
- package/package.json +10 -10
- package/shared/TypeImports.js +1 -1
- package/typink/generator/TypesGen.js +1 -1
- package/typink/templates/index.hbs +6 -6
|
@@ -39,7 +39,7 @@ export class TypesGen extends BaseTypesGen {
|
|
|
39
39
|
defTypeOut += `export type ${name} = ${this.generateType(id)};\n\n`;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
const importTypes = this.typeImports.toImports({ excludeModules: ['./types'], useSubPaths });
|
|
42
|
+
const importTypes = this.typeImports.toImports({ excludeModules: ['./types.js'], useSubPaths });
|
|
43
43
|
const template = compileTemplate('chaintypes/templates/types.hbs');
|
|
44
44
|
return beautifySourceCode(template({ importTypes, defTypeOut }));
|
|
45
45
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Generated by dedot cli
|
|
2
2
|
|
|
3
3
|
{{{importTypes}}}
|
|
4
|
-
import { ChainConsts } from './consts';
|
|
5
|
-
import { ChainStorage } from './query';
|
|
6
|
-
import { ChainJsonRpcApis } from './json-rpc';
|
|
7
|
-
import { ChainErrors } from './errors';
|
|
8
|
-
import { ChainEvents } from './events';
|
|
9
|
-
import { RuntimeApis } from './runtime';
|
|
10
|
-
import { ChainTx } from './tx';
|
|
4
|
+
import { ChainConsts } from './consts.js';
|
|
5
|
+
import { ChainStorage } from './query.js';
|
|
6
|
+
import { ChainJsonRpcApis } from './json-rpc.js';
|
|
7
|
+
import { ChainErrors } from './errors.js';
|
|
8
|
+
import { ChainEvents } from './events.js';
|
|
9
|
+
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainTx } from './tx.js';
|
|
11
11
|
|
|
12
|
-
export * from './types';
|
|
12
|
+
export * from './types.js';
|
|
13
13
|
|
|
14
14
|
export interface Versioned{{{interfaceName}}}<Rv extends RpcVersion> extends GenericSubstrateApi<Rv> {
|
|
15
15
|
rpc: ChainJsonRpcApis<Rv>;
|
|
@@ -42,7 +42,7 @@ class TypesGen extends index_js_1.BaseTypesGen {
|
|
|
42
42
|
defTypeOut += `export type ${name} = ${this.generateType(id)};\n\n`;
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
const importTypes = this.typeImports.toImports({ excludeModules: ['./types'], useSubPaths });
|
|
45
|
+
const importTypes = this.typeImports.toImports({ excludeModules: ['./types.js'], useSubPaths });
|
|
46
46
|
const template = (0, utils_js_1.compileTemplate)('chaintypes/templates/types.hbs');
|
|
47
47
|
return (0, utils_js_1.beautifySourceCode)(template({ importTypes, defTypeOut }));
|
|
48
48
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Generated by dedot cli
|
|
2
2
|
|
|
3
3
|
{{{importTypes}}}
|
|
4
|
-
import { ChainConsts } from './consts';
|
|
5
|
-
import { ChainStorage } from './query';
|
|
6
|
-
import { ChainJsonRpcApis } from './json-rpc';
|
|
7
|
-
import { ChainErrors } from './errors';
|
|
8
|
-
import { ChainEvents } from './events';
|
|
9
|
-
import { RuntimeApis } from './runtime';
|
|
10
|
-
import { ChainTx } from './tx';
|
|
4
|
+
import { ChainConsts } from './consts.js';
|
|
5
|
+
import { ChainStorage } from './query.js';
|
|
6
|
+
import { ChainJsonRpcApis } from './json-rpc.js';
|
|
7
|
+
import { ChainErrors } from './errors.js';
|
|
8
|
+
import { ChainEvents } from './events.js';
|
|
9
|
+
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainTx } from './tx.js';
|
|
11
11
|
|
|
12
|
-
export * from './types';
|
|
12
|
+
export * from './types.js';
|
|
13
13
|
|
|
14
14
|
export interface Versioned{{{interfaceName}}}<Rv extends RpcVersion> extends GenericSubstrateApi<Rv> {
|
|
15
15
|
rpc: ChainJsonRpcApis<Rv>;
|
|
@@ -43,7 +43,7 @@ class TypeImports {
|
|
|
43
43
|
[this.codecTypes, `${prefix}dedot/codecs`],
|
|
44
44
|
[this.contractTypes, `${prefix}dedot/contracts`],
|
|
45
45
|
[this.chainTypes, prefix ? '@dedot/api/chaintypes' : 'dedot/chaintypes'],
|
|
46
|
-
[this.portableTypes, './types'],
|
|
46
|
+
[this.portableTypes, './types.js'],
|
|
47
47
|
];
|
|
48
48
|
return toImports
|
|
49
49
|
.filter(([_, module]) => !excludeModules.includes(module))
|
|
@@ -22,7 +22,7 @@ class TypesGen extends index_js_1.BaseTypesGen {
|
|
|
22
22
|
defTypeOut += `export type ${name} = ${this.generateType(id, 0)};\n\n`;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
const importTypes = this.typeImports.toImports({ excludeModules: ['./types'], useSubPaths });
|
|
25
|
+
const importTypes = this.typeImports.toImports({ excludeModules: ['./types.js'], useSubPaths });
|
|
26
26
|
const template = (0, utils_js_1.compileTemplate)('typink/templates/types.hbs');
|
|
27
27
|
return (0, utils_js_1.beautifySourceCode)(template({ importTypes, defTypeOut }));
|
|
28
28
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Generated by dedot cli
|
|
2
2
|
|
|
3
3
|
{{{importTypes}}}
|
|
4
|
-
import { ContractQuery } from './query';
|
|
5
|
-
import { ContractTx } from './tx';
|
|
6
|
-
import { ConstructorQuery } from './constructor-query';
|
|
7
|
-
import { ConstructorTx } from './constructor-tx';
|
|
8
|
-
import { ContractEvents } from './events';
|
|
4
|
+
import { ContractQuery } from './query.js';
|
|
5
|
+
import { ContractTx } from './tx.js';
|
|
6
|
+
import { ConstructorQuery } from './constructor-query.js';
|
|
7
|
+
import { ConstructorTx } from './constructor-tx.js';
|
|
8
|
+
import { ContractEvents } from './events.js';
|
|
9
9
|
|
|
10
|
-
export * from './types';
|
|
10
|
+
export * from './types.js';
|
|
11
11
|
|
|
12
12
|
{{{interfaceDocs}}}export interface {{{interfaceName}}}<Rv extends RpcVersion = RpcVersion, ChainApi extends VersionedGenericSubstrateApi = SubstrateApi> extends GenericContractApi<Rv, ChainApi> {
|
|
13
13
|
query: ContractQuery<ChainApi[Rv]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/codegen",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-next.4880b708.2+4880b70",
|
|
4
4
|
"description": "Generate types",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"homepage": "https://github.com/dedotdev/dedot/tree/main/packages/codegen",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"copy": "cp -R ./src/chaintypes/templates ./dist/chaintypes && cp -R ./src/chaintypes/templates ./dist/cjs/chaintypes && cp -R ./src/typink/templates ./dist/typink && cp -R ./src/typink/templates ./dist/cjs/typink"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dedot/api": "0.8.
|
|
22
|
-
"@dedot/codecs": "0.8.
|
|
23
|
-
"@dedot/contracts": "0.8.
|
|
24
|
-
"@dedot/providers": "0.8.
|
|
25
|
-
"@dedot/runtime-specs": "0.8.
|
|
26
|
-
"@dedot/shape": "0.8.
|
|
27
|
-
"@dedot/types": "0.8.
|
|
28
|
-
"@dedot/utils": "0.8.
|
|
21
|
+
"@dedot/api": "0.8.1-next.4880b708.2+4880b70",
|
|
22
|
+
"@dedot/codecs": "0.8.1-next.4880b708.2+4880b70",
|
|
23
|
+
"@dedot/contracts": "0.8.1-next.4880b708.2+4880b70",
|
|
24
|
+
"@dedot/providers": "0.8.1-next.4880b708.2+4880b70",
|
|
25
|
+
"@dedot/runtime-specs": "0.8.1-next.4880b708.2+4880b70",
|
|
26
|
+
"@dedot/shape": "0.8.1-next.4880b708.2+4880b70",
|
|
27
|
+
"@dedot/types": "0.8.1-next.4880b708.2+4880b70",
|
|
28
|
+
"@dedot/utils": "0.8.1-next.4880b708.2+4880b70",
|
|
29
29
|
"handlebars": "^4.7.8",
|
|
30
30
|
"prettier": "^3.4.2"
|
|
31
31
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"node": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "4880b708ff98e75c257bf82ec80b3d63b0fb1458",
|
|
41
41
|
"module": "./index.js",
|
|
42
42
|
"types": "./index.d.ts",
|
|
43
43
|
"exports": {
|
package/shared/TypeImports.js
CHANGED
|
@@ -40,7 +40,7 @@ export class TypeImports {
|
|
|
40
40
|
[this.codecTypes, `${prefix}dedot/codecs`],
|
|
41
41
|
[this.contractTypes, `${prefix}dedot/contracts`],
|
|
42
42
|
[this.chainTypes, prefix ? '@dedot/api/chaintypes' : 'dedot/chaintypes'],
|
|
43
|
-
[this.portableTypes, './types'],
|
|
43
|
+
[this.portableTypes, './types.js'],
|
|
44
44
|
];
|
|
45
45
|
return toImports
|
|
46
46
|
.filter(([_, module]) => !excludeModules.includes(module))
|
|
@@ -19,7 +19,7 @@ export class TypesGen extends BaseTypesGen {
|
|
|
19
19
|
defTypeOut += `export type ${name} = ${this.generateType(id, 0)};\n\n`;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const importTypes = this.typeImports.toImports({ excludeModules: ['./types'], useSubPaths });
|
|
22
|
+
const importTypes = this.typeImports.toImports({ excludeModules: ['./types.js'], useSubPaths });
|
|
23
23
|
const template = compileTemplate('typink/templates/types.hbs');
|
|
24
24
|
return beautifySourceCode(template({ importTypes, defTypeOut }));
|
|
25
25
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Generated by dedot cli
|
|
2
2
|
|
|
3
3
|
{{{importTypes}}}
|
|
4
|
-
import { ContractQuery } from './query';
|
|
5
|
-
import { ContractTx } from './tx';
|
|
6
|
-
import { ConstructorQuery } from './constructor-query';
|
|
7
|
-
import { ConstructorTx } from './constructor-tx';
|
|
8
|
-
import { ContractEvents } from './events';
|
|
4
|
+
import { ContractQuery } from './query.js';
|
|
5
|
+
import { ContractTx } from './tx.js';
|
|
6
|
+
import { ConstructorQuery } from './constructor-query.js';
|
|
7
|
+
import { ConstructorTx } from './constructor-tx.js';
|
|
8
|
+
import { ContractEvents } from './events.js';
|
|
9
9
|
|
|
10
|
-
export * from './types';
|
|
10
|
+
export * from './types.js';
|
|
11
11
|
|
|
12
12
|
{{{interfaceDocs}}}export interface {{{interfaceName}}}<Rv extends RpcVersion = RpcVersion, ChainApi extends VersionedGenericSubstrateApi = SubstrateApi> extends GenericContractApi<Rv, ChainApi> {
|
|
13
13
|
query: ContractQuery<ChainApi[Rv]>;
|