@dedot/codegen 0.0.1-alpha.22 → 0.0.1-alpha.23
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/cjs/genSupportedChainTypes.js +4 -1
- package/cjs/generator/utils.js +31 -5
- package/cjs/index.js +26 -3
- package/cjs/packageInfo.js +1 -1
- package/package.json +7 -7
- package/packageInfo.js +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const index_1 = require("./index");
|
|
4
7
|
const static_substrate_1 = require("@polkadot/types-support/metadata/static-substrate");
|
|
5
|
-
const substrate_hex_1 = require("@polkadot/types-support/metadata/v15/substrate-hex");
|
|
8
|
+
const substrate_hex_1 = __importDefault(require("@polkadot/types-support/metadata/v15/substrate-hex"));
|
|
6
9
|
const codecs_1 = require("@dedot/codecs");
|
|
7
10
|
const dedot_1 = require("dedot");
|
|
8
11
|
const NETWORKS = [
|
package/cjs/generator/utils.js
CHANGED
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.isReservedWord = exports.compileTemplate = exports.beautifySourceCode = exports.resolveFilePath = exports.commentBlock = exports.TUPLE_TYPE_REGEX = exports.WRAPPER_TYPE_REGEX = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const handlebars_1 = require("handlebars");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const process = require("process");
|
|
8
|
-
const prettier = require("prettier");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
31
|
+
const handlebars_1 = __importDefault(require("handlebars"));
|
|
32
|
+
const path = __importStar(require("path"));
|
|
33
|
+
const process = __importStar(require("process"));
|
|
34
|
+
const prettier = __importStar(require("prettier"));
|
|
9
35
|
exports.WRAPPER_TYPE_REGEX = /^(\w+)<(.*)>$/;
|
|
10
36
|
exports.TUPLE_TYPE_REGEX = /^\[(.*)]$/;
|
|
11
37
|
const commentBlock = (...docs) => {
|
package/cjs/index.js
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.generateTypes = exports.generateTypesFromChain = void 0;
|
|
4
27
|
const dedot_1 = require("dedot");
|
|
5
|
-
const fs = require("fs");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const process = require("process");
|
|
28
|
+
const fs = __importStar(require("fs"));
|
|
29
|
+
const path = __importStar(require("path"));
|
|
30
|
+
const process = __importStar(require("process"));
|
|
8
31
|
const generator_1 = require("./generator");
|
|
9
32
|
async function generateTypesFromChain(network, endpoint, outDir) {
|
|
10
33
|
const api = await dedot_1.Dedot.create(endpoint);
|
package/cjs/packageInfo.js
CHANGED
|
@@ -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/codegen', version: '0.0.1-alpha.
|
|
5
|
+
exports.packageInfo = { name: '@dedot/codegen', version: '0.0.1-alpha.22' };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/codegen",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.23",
|
|
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",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"clean": "rm -rf ./dist && rm -rf ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@dedot/codecs": "0.0.1-alpha.
|
|
20
|
-
"@dedot/shape": "0.0.1-alpha.
|
|
21
|
-
"@dedot/specs": "0.0.1-alpha.
|
|
22
|
-
"@dedot/utils": "0.0.1-alpha.
|
|
19
|
+
"@dedot/codecs": "0.0.1-alpha.23",
|
|
20
|
+
"@dedot/shape": "0.0.1-alpha.23",
|
|
21
|
+
"@dedot/specs": "0.0.1-alpha.23",
|
|
22
|
+
"@dedot/utils": "0.0.1-alpha.23",
|
|
23
23
|
"@polkadot/util": "^12.6.2",
|
|
24
|
-
"dedot": "0.0.1-alpha.
|
|
24
|
+
"dedot": "0.0.1-alpha.23",
|
|
25
25
|
"handlebars": "^4.7.8",
|
|
26
26
|
"prettier": "^3.0.3"
|
|
27
27
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"directory": "dist"
|
|
31
31
|
},
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "d0aaaf353a6596d5dcd9277b241799bd544a2bd2",
|
|
34
34
|
"module": "./index.js",
|
|
35
35
|
"types": "./index.d.ts",
|
|
36
36
|
"exports": {
|
package/packageInfo.js
CHANGED