@pezkuwi/typegen 16.5.5 → 16.5.6
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/LICENSE +201 -0
- package/augment.js +2 -0
- package/bundle.js +2 -0
- package/cjs/augment.d.ts +2 -0
- package/cjs/augment.js +4 -0
- package/cjs/bundle.d.ts +2 -0
- package/cjs/bundle.js +7 -0
- package/cjs/extractChain.js +44 -0
- package/cjs/fromChain.js +95 -0
- package/cjs/fromDefs.js +82 -0
- package/cjs/generate/consts.js +91 -0
- package/cjs/generate/errors.js +59 -0
- package/cjs/generate/events.js +139 -0
- package/cjs/generate/index.js +23 -0
- package/cjs/generate/interfaceRegistry.js +64 -0
- package/cjs/generate/lookup.js +240 -0
- package/cjs/generate/query.js +140 -0
- package/cjs/generate/rpc.js +115 -0
- package/cjs/generate/runtime.js +233 -0
- package/{build → cjs}/generate/tsDef.d.ts +1 -1
- package/cjs/generate/tsDef.js +254 -0
- package/cjs/generate/tx.js +121 -0
- package/cjs/generate/types.js +16 -0
- package/cjs/index.js +5 -0
- package/cjs/interfacesTs.js +28 -0
- package/cjs/metadataMd.js +652 -0
- package/cjs/package.json +3 -0
- package/cjs/packageDetect.js +8 -0
- package/cjs/packageInfo.js +4 -0
- package/cjs/util/assert.js +15 -0
- package/cjs/util/derived.js +128 -0
- package/cjs/util/docs.js +10 -0
- package/cjs/util/file.js +33 -0
- package/{build → cjs}/util/formatting.d.ts +1 -1
- package/cjs/util/formatting.js +237 -0
- package/cjs/util/imports.js +126 -0
- package/{build → cjs}/util/index.d.ts +1 -0
- package/cjs/util/index.js +39 -0
- package/cjs/util/initMeta.js +22 -0
- package/cjs/util/register.js +10 -0
- package/cjs/util/wsMeta.js +60 -0
- package/extractChain.d.ts +1 -0
- package/extractChain.js +40 -0
- package/fromChain.d.ts +1 -0
- package/fromChain.js +91 -0
- package/fromDefs.d.ts +1 -0
- package/fromDefs.js +78 -0
- package/generate/consts.d.ts +5 -0
- package/generate/consts.js +87 -0
- package/generate/errors.d.ts +4 -0
- package/generate/errors.js +55 -0
- package/generate/events.d.ts +5 -0
- package/generate/events.js +135 -0
- package/{src/generate/index.ts → generate/index.d.ts} +0 -3
- package/generate/index.js +10 -0
- package/generate/interfaceRegistry.d.ts +4 -0
- package/generate/interfaceRegistry.js +59 -0
- package/generate/lookup.d.ts +4 -0
- package/generate/lookup.js +235 -0
- package/generate/query.d.ts +5 -0
- package/generate/query.js +136 -0
- package/generate/rpc.d.ts +6 -0
- package/generate/rpc.js +110 -0
- package/generate/runtime.d.ts +7 -0
- package/generate/runtime.js +228 -0
- package/generate/tsDef.d.ts +16 -0
- package/generate/tsDef.js +246 -0
- package/generate/tx.d.ts +5 -0
- package/generate/tx.js +117 -0
- package/generate/types.d.ts +12 -0
- package/generate/types.js +13 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/interfacesTs.d.ts +1 -0
- package/interfacesTs.js +24 -0
- package/metadataMd.d.ts +1 -0
- package/metadataMd.js +648 -0
- package/package.json +520 -24
- package/packageDetect.d.ts +1 -0
- package/{src/packageDetect.ts → packageDetect.js} +0 -8
- package/packageInfo.d.ts +6 -0
- package/packageInfo.js +1 -0
- package/scripts/{polkadot-types-chain-info.mjs → pezkuwi-types-chain-info.mjs} +1 -1
- package/scripts/{polkadot-types-from-chain.mjs → pezkuwi-types-from-chain.mjs} +1 -1
- package/scripts/{polkadot-types-from-defs.mjs → pezkuwi-types-from-defs.mjs} +1 -1
- package/{build/scripts/polkadot-types-internal-interfaces.mjs → scripts/pezkuwi-types-internal-interfaces.mjs} +1 -1
- package/{build/scripts/polkadot-types-internal-metadata.mjs → scripts/pezkuwi-types-internal-metadata.mjs} +1 -1
- package/{src/templates → templates}/calls.hbs +2 -2
- package/{src/templates → templates}/consts.hbs +2 -2
- package/{src/templates → templates}/errors.hbs +2 -2
- package/{src/templates → templates}/events.hbs +2 -2
- package/{src/templates → templates}/interfaceRegistry.hbs +2 -2
- package/{src/templates → templates}/lookup/types.hbs +2 -2
- package/{src/templates → templates}/query.hbs +2 -2
- package/{src/templates → templates}/rpc.hbs +2 -2
- package/{src/templates → templates}/tx.hbs +2 -2
- package/util/assert.d.ts +2 -0
- package/util/assert.js +10 -0
- package/util/derived.d.ts +4 -0
- package/util/derived.js +125 -0
- package/util/docs.d.ts +1 -0
- package/util/docs.js +6 -0
- package/util/file.d.ts +2 -0
- package/util/file.js +28 -0
- package/util/formatting.d.ts +11 -0
- package/util/formatting.js +230 -0
- package/util/imports.d.ts +23 -0
- package/util/imports.js +121 -0
- package/{src/util/index.ts → util/index.d.ts} +6 -8
- package/util/index.js +34 -0
- package/util/initMeta.d.ts +12 -0
- package/util/initMeta.js +19 -0
- package/util/register.d.ts +4 -0
- package/util/register.js +7 -0
- package/util/wsMeta.d.ts +4 -0
- package/util/wsMeta.js +55 -0
- package/build/scripts/polkadot-types-chain-info.mjs +0 -7
- package/build/scripts/polkadot-types-from-chain.mjs +0 -7
- package/build/scripts/polkadot-types-from-defs.mjs +0 -7
- package/scripts/polkadot-types-internal-interfaces.mjs +0 -7
- package/scripts/polkadot-types-internal-metadata.mjs +0 -7
- package/src/augment.ts +0 -5
- package/src/bundle.ts +0 -5
- package/src/extractChain.ts +0 -54
- package/src/fromChain.ts +0 -123
- package/src/fromDefs.ts +0 -106
- package/src/generate/consts.ts +0 -112
- package/src/generate/errors.ts +0 -75
- package/src/generate/events.ts +0 -165
- package/src/generate/interfaceRegistry.ts +0 -85
- package/src/generate/lookup.ts +0 -294
- package/src/generate/query.ts +0 -169
- package/src/generate/rpc.ts +0 -158
- package/src/generate/runtime.ts +0 -284
- package/src/generate/tsDef.ts +0 -321
- package/src/generate/tx.ts +0 -152
- package/src/generate/types.ts +0 -26
- package/src/index.ts +0 -6
- package/src/interfacesTs.ts +0 -35
- package/src/metadataMd.ts +0 -844
- package/src/packageInfo.ts +0 -6
- package/src/util/assert.ts +0 -18
- package/src/util/derived.spec.ts +0 -58
- package/src/util/derived.ts +0 -133
- package/src/util/docs.ts +0 -13
- package/src/util/file.ts +0 -42
- package/src/util/formatting.spec.ts +0 -30
- package/src/util/formatting.ts +0 -295
- package/src/util/imports.ts +0 -164
- package/src/util/initMeta.ts +0 -37
- package/src/util/register.ts +0 -12
- package/src/util/wsMeta.ts +0 -70
- package/tsconfig.build.json +0 -28
- package/tsconfig.build.tsbuildinfo +0 -1
- package/tsconfig.scripts.json +0 -19
- package/tsconfig.spec.json +0 -17
- /package/{build/augment.d.ts → augment.d.ts} +0 -0
- /package/{build/bundle.d.ts → bundle.d.ts} +0 -0
- /package/{build → cjs}/extractChain.d.ts +0 -0
- /package/{build → cjs}/fromChain.d.ts +0 -0
- /package/{build → cjs}/fromDefs.d.ts +0 -0
- /package/{build → cjs}/generate/consts.d.ts +0 -0
- /package/{build → cjs}/generate/errors.d.ts +0 -0
- /package/{build → cjs}/generate/events.d.ts +0 -0
- /package/{build → cjs}/generate/index.d.ts +0 -0
- /package/{build → cjs}/generate/interfaceRegistry.d.ts +0 -0
- /package/{build → cjs}/generate/lookup.d.ts +0 -0
- /package/{build → cjs}/generate/query.d.ts +0 -0
- /package/{build → cjs}/generate/rpc.d.ts +0 -0
- /package/{build → cjs}/generate/runtime.d.ts +0 -0
- /package/{build → cjs}/generate/tx.d.ts +0 -0
- /package/{build → cjs}/generate/types.d.ts +0 -0
- /package/{build → cjs}/index.d.ts +0 -0
- /package/{build → cjs}/interfacesTs.d.ts +0 -0
- /package/{build → cjs}/metadataMd.d.ts +0 -0
- /package/{build → cjs}/packageDetect.d.ts +0 -0
- /package/{build → cjs}/packageInfo.d.ts +0 -0
- /package/{build → cjs}/util/assert.d.ts +0 -0
- /package/{build → cjs}/util/derived.d.ts +0 -0
- /package/{build → cjs}/util/docs.d.ts +0 -0
- /package/{build → cjs}/util/file.d.ts +0 -0
- /package/{build → cjs}/util/imports.d.ts +0 -0
- /package/{build → cjs}/util/initMeta.d.ts +0 -0
- /package/{build → cjs}/util/register.d.ts +0 -0
- /package/{build → cjs}/util/wsMeta.d.ts +0 -0
- /package/{src/templates → templates}/docs.hbs +0 -0
- /package/{src/templates → templates}/header.hbs +0 -0
- /package/{src/templates → templates}/lookup/defs-named.hbs +0 -0
- /package/{src/templates → templates}/lookup/defs.hbs +0 -0
- /package/{src/templates → templates}/lookup/index.hbs +0 -0
- /package/{src/templates → templates}/tsDef/index.hbs +0 -0
- /package/{src/templates → templates}/tsDef/moduleTypes.hbs +0 -0
- /package/{src/templates → templates}/tsDef/types.hbs +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMetadataViaWs = getMetadataViaWs;
|
|
4
|
+
exports.getRpcMethodsViaWs = getRpcMethodsViaWs;
|
|
5
|
+
exports.getRuntimeVersionViaWs = getRuntimeVersionViaWs;
|
|
6
|
+
const decorateMethod_1 = require("@pezkuwi/api/promise/decorateMethod");
|
|
7
|
+
const types_1 = require("@pezkuwi/types");
|
|
8
|
+
const util_1 = require("@pezkuwi/util");
|
|
9
|
+
const x_ws_1 = require("@pezkuwi/x-ws");
|
|
10
|
+
async function getWsData(endpoint, method, params) {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
const tracker = (0, decorateMethod_1.promiseTracker)(resolve, reject);
|
|
13
|
+
try {
|
|
14
|
+
const websocket = new x_ws_1.WebSocket(endpoint);
|
|
15
|
+
websocket.onclose = (event) => {
|
|
16
|
+
if (event.code !== 1000) {
|
|
17
|
+
tracker.reject(new Error(`disconnected, code: '${event.code}' reason: '${event.reason}'`));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
websocket.onerror = (event) => {
|
|
21
|
+
tracker.reject(new Error(`WebSocket error:: ${(0, util_1.stringify)(event)}`));
|
|
22
|
+
};
|
|
23
|
+
websocket.onopen = () => {
|
|
24
|
+
console.log('connected');
|
|
25
|
+
params
|
|
26
|
+
? websocket.send(`{"id":"1","jsonrpc":"2.0","method":"${method}","params":[${params.map((param) => `"${param}"`).join(',')}]}`)
|
|
27
|
+
: websocket.send(`{"id":"1","jsonrpc":"2.0","method":"${method}","params":[]}`);
|
|
28
|
+
};
|
|
29
|
+
websocket.onmessage = (message) => {
|
|
30
|
+
try {
|
|
31
|
+
tracker.resolve(JSON.parse(message.data).result);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
tracker.reject(error);
|
|
35
|
+
}
|
|
36
|
+
websocket.close();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
tracker.reject(error);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async function getMetadataViaWs(endpoint, metadataVer) {
|
|
45
|
+
const registry = new types_1.TypeRegistry();
|
|
46
|
+
if (metadataVer) {
|
|
47
|
+
return await getWsData(endpoint, 'state_call', ['Metadata_metadata_at_version', (0, util_1.u8aToHex)(registry.createType('u32', metadataVer).toU8a())]);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return await getWsData(endpoint, 'state_getMetadata');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function getRpcMethodsViaWs(endpoint) {
|
|
54
|
+
const result = await getWsData(endpoint, 'rpc_methods');
|
|
55
|
+
return result.methods;
|
|
56
|
+
}
|
|
57
|
+
async function getRuntimeVersionViaWs(endpoint) {
|
|
58
|
+
const result = await getWsData(endpoint, 'state_getRuntimeVersion');
|
|
59
|
+
return result.apis;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): void;
|
package/extractChain.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import yargs from 'yargs';
|
|
3
|
+
import { hideBin } from 'yargs/helpers';
|
|
4
|
+
import { ApiPromise, WsProvider } from '@pezkuwi/api';
|
|
5
|
+
/** @internal */
|
|
6
|
+
async function run(ws) {
|
|
7
|
+
const provider = new WsProvider(ws);
|
|
8
|
+
const api = await ApiPromise.create({ provider, throwOnConnect: true });
|
|
9
|
+
const [chain, props] = await Promise.all([
|
|
10
|
+
api.rpc.system.chain(),
|
|
11
|
+
api.rpc.system.properties()
|
|
12
|
+
]);
|
|
13
|
+
// output the chain info, for easy re-use
|
|
14
|
+
console.error(`// Generated via 'yarn run chain:info ${ws}'\n\nexport default {\n chain: '${chain.toString()}',\n genesisHash: '${api.genesisHash.toHex()}',\n specVersion: ${api.runtimeVersion.specVersion.toNumber()},\n ss58Format: ${props.ss58Format.unwrapOr(42).toString()},\n tokenDecimals: ${props.tokenDecimals.unwrapOr(0).toString()},\n tokenSymbol: '${props.tokenSymbol.unwrapOr('UNIT').toString()}',\n metaCalls: '${Buffer.from(api.runtimeMetadata.asCallsOnly.toU8a()).toString('base64')}'\n};`);
|
|
15
|
+
// show any missing types
|
|
16
|
+
api.runtimeMetadata.getUniqTypes(false);
|
|
17
|
+
}
|
|
18
|
+
export function main() {
|
|
19
|
+
// retrieve and parse arguments - we do this globally, since this is a single command
|
|
20
|
+
const { ws } = yargs(hideBin(process.argv))
|
|
21
|
+
.usage('Usage: [options]')
|
|
22
|
+
.wrap(120)
|
|
23
|
+
.strict()
|
|
24
|
+
.options({
|
|
25
|
+
ws: {
|
|
26
|
+
default: 'ws://127.0.0.1:9944',
|
|
27
|
+
description: 'The API endpoint to connect to, e.g. wss://dicle-rpc.pezkuwi.io',
|
|
28
|
+
required: true,
|
|
29
|
+
type: 'string'
|
|
30
|
+
}
|
|
31
|
+
}).argv;
|
|
32
|
+
run(ws)
|
|
33
|
+
.then(() => {
|
|
34
|
+
process.exit(0);
|
|
35
|
+
})
|
|
36
|
+
.catch((error) => {
|
|
37
|
+
console.error('FATAL:', error.message);
|
|
38
|
+
process.exit(-1);
|
|
39
|
+
});
|
|
40
|
+
}
|
package/fromChain.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): void;
|
package/fromChain.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import yargs from 'yargs';
|
|
4
|
+
import { hideBin } from 'yargs/helpers';
|
|
5
|
+
import { formatNumber, isHex } from '@pezkuwi/util';
|
|
6
|
+
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultRuntime, generateDefaultTx } from './generate/index.js';
|
|
7
|
+
import { assertDir, assertFile, getMetadataViaWs, HEADER, writeFile } from './util/index.js';
|
|
8
|
+
async function generate(metaHex, pkg, output, isStrict) {
|
|
9
|
+
console.log(`Generating from metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
|
|
10
|
+
const outputPath = assertDir(path.join(process.cwd(), output));
|
|
11
|
+
let extraTypes = {};
|
|
12
|
+
let customLookupDefinitions = { rpc: {}, types: {} };
|
|
13
|
+
if (pkg) {
|
|
14
|
+
try {
|
|
15
|
+
const defCont = await import(assertFile(path.join(outputPath, 'definitions.ts')));
|
|
16
|
+
extraTypes = {
|
|
17
|
+
[pkg]: defCont
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error('ERROR: No custom definitions found:', error.message);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const lookCont = await import(assertFile(path.join(outputPath, 'lookup.ts')));
|
|
26
|
+
customLookupDefinitions = {
|
|
27
|
+
rpc: {},
|
|
28
|
+
types: lookCont.default
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error('ERROR: No lookup definitions found:', error.message);
|
|
33
|
+
}
|
|
34
|
+
generateDefaultConsts(path.join(outputPath, 'augment-api-consts.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
|
35
|
+
generateDefaultErrors(path.join(outputPath, 'augment-api-errors.ts'), metaHex, extraTypes, isStrict);
|
|
36
|
+
generateDefaultEvents(path.join(outputPath, 'augment-api-events.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
|
37
|
+
generateDefaultQuery(path.join(outputPath, 'augment-api-query.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
|
38
|
+
generateDefaultRpc(path.join(outputPath, 'augment-api-rpc.ts'), extraTypes);
|
|
39
|
+
generateDefaultRuntime(path.join(outputPath, 'augment-api-runtime.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
|
40
|
+
generateDefaultTx(path.join(outputPath, 'augment-api-tx.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
|
41
|
+
writeFile(path.join(outputPath, 'augment-api.ts'), () => [
|
|
42
|
+
HEADER('chain'),
|
|
43
|
+
...[
|
|
44
|
+
...['consts', 'errors', 'events', 'query', 'tx', 'rpc', 'runtime']
|
|
45
|
+
.filter((key) => !!key)
|
|
46
|
+
.map((key) => `./augment-api-${key}.js`)
|
|
47
|
+
].map((path) => `import '${path}';\n`)
|
|
48
|
+
].join(''));
|
|
49
|
+
process.exit(0);
|
|
50
|
+
}
|
|
51
|
+
async function mainPromise() {
|
|
52
|
+
const { endpoint, output, package: pkg, strict: isStrict } = yargs(hideBin(process.argv)).strict().options({
|
|
53
|
+
endpoint: {
|
|
54
|
+
description: 'The endpoint to connect to (e.g. wss://dicle-rpc.pezkuwi.io) or relative path to a file containing the JSON output of an RPC state_getMetadata call',
|
|
55
|
+
required: true,
|
|
56
|
+
type: 'string'
|
|
57
|
+
},
|
|
58
|
+
output: {
|
|
59
|
+
description: 'The target directory to write the data to',
|
|
60
|
+
required: true,
|
|
61
|
+
type: 'string'
|
|
62
|
+
},
|
|
63
|
+
package: {
|
|
64
|
+
description: 'Optional package in output location (for extra definitions)',
|
|
65
|
+
type: 'string'
|
|
66
|
+
},
|
|
67
|
+
strict: {
|
|
68
|
+
description: 'Turns on strict mode, no output of catch-all generic versions',
|
|
69
|
+
type: 'boolean'
|
|
70
|
+
}
|
|
71
|
+
}).argv;
|
|
72
|
+
let metaHex;
|
|
73
|
+
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
|
74
|
+
metaHex = await getMetadataViaWs(endpoint);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
metaHex = JSON.parse(fs.readFileSync(assertFile(path.join(process.cwd(), endpoint)), 'utf-8')).result;
|
|
78
|
+
if (!isHex(metaHex)) {
|
|
79
|
+
throw new Error('Invalid metadata file');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
await generate(metaHex, pkg, output, isStrict);
|
|
83
|
+
}
|
|
84
|
+
export function main() {
|
|
85
|
+
mainPromise().catch((error) => {
|
|
86
|
+
console.error();
|
|
87
|
+
console.error(error);
|
|
88
|
+
console.error();
|
|
89
|
+
process.exit(1);
|
|
90
|
+
});
|
|
91
|
+
}
|
package/fromDefs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): void;
|
package/fromDefs.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import yargs from 'yargs';
|
|
4
|
+
import { hideBin } from 'yargs/helpers';
|
|
5
|
+
import * as bizinikiwiDefs from '@pezkuwi/types/interfaces/definitions';
|
|
6
|
+
import { isHex } from '@pezkuwi/util';
|
|
7
|
+
import { generateDefaultLookup } from './generate/index.js';
|
|
8
|
+
import { generateInterfaceTypes } from './generate/interfaceRegistry.js';
|
|
9
|
+
import { generateTsDef } from './generate/tsDef.js';
|
|
10
|
+
import { assertDir, assertFile, getMetadataViaWs } from './util/index.js';
|
|
11
|
+
async function mainPromise() {
|
|
12
|
+
const { endpoint, input, package: pkg } = yargs(hideBin(process.argv)).strict().options({
|
|
13
|
+
endpoint: {
|
|
14
|
+
description: 'The endpoint to connect to (e.g. wss://dicle-rpc.pezkuwi.io) or relative path to a file containing the JSON output of an RPC state_getMetadata call',
|
|
15
|
+
type: 'string'
|
|
16
|
+
},
|
|
17
|
+
input: {
|
|
18
|
+
description: 'The directory to use for the user definitions',
|
|
19
|
+
required: true,
|
|
20
|
+
type: 'string'
|
|
21
|
+
},
|
|
22
|
+
package: {
|
|
23
|
+
description: 'The package name & path to use for the user types',
|
|
24
|
+
required: true,
|
|
25
|
+
type: 'string'
|
|
26
|
+
}
|
|
27
|
+
}).argv;
|
|
28
|
+
const inputPath = assertDir(path.join(process.cwd(), input));
|
|
29
|
+
let userDefs = {};
|
|
30
|
+
try {
|
|
31
|
+
const defCont = await import(assertFile(path.join(inputPath, 'definitions.ts')));
|
|
32
|
+
userDefs = defCont;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.error('ERROR: Unable to load user definitions:', error.message);
|
|
36
|
+
}
|
|
37
|
+
const userKeys = Object.keys(userDefs);
|
|
38
|
+
const filteredBase = Object
|
|
39
|
+
.entries(bizinikiwiDefs)
|
|
40
|
+
.filter(([key]) => {
|
|
41
|
+
if (userKeys.includes(key)) {
|
|
42
|
+
console.warn(`Override found for ${key} in user types, ignoring in @pezkuwi/types`);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
})
|
|
47
|
+
.reduce((defs, [key, value]) => {
|
|
48
|
+
defs[key] = value;
|
|
49
|
+
return defs;
|
|
50
|
+
}, {});
|
|
51
|
+
const allDefs = {
|
|
52
|
+
'@pezkuwi/types/interfaces': filteredBase,
|
|
53
|
+
[pkg]: userDefs
|
|
54
|
+
};
|
|
55
|
+
generateTsDef(allDefs, inputPath, pkg);
|
|
56
|
+
generateInterfaceTypes(allDefs, path.join(inputPath, 'augment-types.ts'));
|
|
57
|
+
if (endpoint) {
|
|
58
|
+
let metaHex;
|
|
59
|
+
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
|
60
|
+
metaHex = await getMetadataViaWs(endpoint);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
metaHex = JSON.parse(fs.readFileSync(assertFile(path.join(process.cwd(), endpoint)), 'utf-8')).result;
|
|
64
|
+
if (!isHex(metaHex)) {
|
|
65
|
+
throw new Error('Invalid metadata file');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
generateDefaultLookup(inputPath, metaHex);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export function main() {
|
|
72
|
+
mainPromise().catch((error) => {
|
|
73
|
+
console.error();
|
|
74
|
+
console.error(error);
|
|
75
|
+
console.error();
|
|
76
|
+
process.exit(1);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Definitions } from '@pezkuwi/types/types';
|
|
2
|
+
import type { HexString } from '@pezkuwi/util/types';
|
|
3
|
+
import { type ExtraTypes } from './types.js';
|
|
4
|
+
/** @internal */
|
|
5
|
+
export declare function generateDefaultConsts(dest: string, data: HexString, extraTypes?: ExtraTypes, isStrict?: boolean, customLookupDefinitions?: Definitions): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
2
|
+
import * as defaultDefs from '@pezkuwi/types/interfaces/definitions';
|
|
3
|
+
import lookupDefinitions from '@pezkuwi/types-augment/lookup/definitions';
|
|
4
|
+
import { stringCamelCase } from '@pezkuwi/util';
|
|
5
|
+
import { compareName, createImports, formatType, initMeta, readTemplate, rebrandTypeName, setImports, writeFile } from '../util/index.js';
|
|
6
|
+
import { ignoreUnusedLookups } from './lookup.js';
|
|
7
|
+
import { getDeprecationNotice } from './types.js';
|
|
8
|
+
const generateForMetaTemplate = Handlebars.compile(readTemplate('consts'));
|
|
9
|
+
/** @internal */
|
|
10
|
+
function generateForMeta(meta, dest, extraTypes, isStrict, customLookupDefinitions) {
|
|
11
|
+
writeFile(dest, () => {
|
|
12
|
+
const allTypes = {
|
|
13
|
+
'@pezkuwi/types-augment': {
|
|
14
|
+
lookup: {
|
|
15
|
+
...lookupDefinitions,
|
|
16
|
+
...customLookupDefinitions
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
'@pezkuwi/types/interfaces': defaultDefs,
|
|
20
|
+
...extraTypes
|
|
21
|
+
};
|
|
22
|
+
const imports = createImports(allTypes);
|
|
23
|
+
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
|
24
|
+
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
|
25
|
+
}, {});
|
|
26
|
+
const { lookup, pallets, registry } = meta.asLatest;
|
|
27
|
+
const usedTypes = new Set([]);
|
|
28
|
+
const modules = pallets
|
|
29
|
+
.filter(({ constants }) => constants.length > 0)
|
|
30
|
+
.map(({ constants, name }) => {
|
|
31
|
+
if (!isStrict) {
|
|
32
|
+
setImports(allDefs, imports, ['Codec']);
|
|
33
|
+
}
|
|
34
|
+
const items = constants
|
|
35
|
+
.map(({ deprecationInfo, docs, name, type }) => {
|
|
36
|
+
const typeDef = lookup.getTypeDef(type);
|
|
37
|
+
const returnType = rebrandTypeName(typeDef.lookupName || '') || formatType(registry, allDefs, typeDef, imports);
|
|
38
|
+
if (!deprecationInfo.isNotDeprecated) {
|
|
39
|
+
const deprecationNotice = getDeprecationNotice(deprecationInfo, stringCamelCase(name), 'Constant');
|
|
40
|
+
const items = docs.length
|
|
41
|
+
? ['', deprecationNotice]
|
|
42
|
+
: [deprecationNotice];
|
|
43
|
+
docs.push(...items.map((text) => registry.createType('Text', text)));
|
|
44
|
+
}
|
|
45
|
+
// Add the type to the list of used types
|
|
46
|
+
if (!(imports.primitiveTypes[returnType])) {
|
|
47
|
+
usedTypes.add(returnType);
|
|
48
|
+
}
|
|
49
|
+
setImports(allDefs, imports, [returnType]);
|
|
50
|
+
return {
|
|
51
|
+
docs,
|
|
52
|
+
name: stringCamelCase(name),
|
|
53
|
+
type: returnType
|
|
54
|
+
};
|
|
55
|
+
})
|
|
56
|
+
.sort(compareName);
|
|
57
|
+
return {
|
|
58
|
+
items,
|
|
59
|
+
name: stringCamelCase(name)
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
.sort(compareName);
|
|
63
|
+
// filter out the unused lookup types from imports
|
|
64
|
+
ignoreUnusedLookups([...usedTypes], imports);
|
|
65
|
+
return generateForMetaTemplate({
|
|
66
|
+
headerType: 'chain',
|
|
67
|
+
imports,
|
|
68
|
+
isStrict,
|
|
69
|
+
modules,
|
|
70
|
+
types: [
|
|
71
|
+
...Object.keys(imports.localTypes).sort().map((packagePath) => ({
|
|
72
|
+
file: packagePath.replace('@pezkuwi/types-augment', '@pezkuwi/types'),
|
|
73
|
+
types: Object.keys(imports.localTypes[packagePath])
|
|
74
|
+
})),
|
|
75
|
+
{
|
|
76
|
+
file: '@pezkuwi/api-base/types',
|
|
77
|
+
types: ['ApiTypes', 'AugmentedConst']
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** @internal */
|
|
84
|
+
export function generateDefaultConsts(dest, data, extraTypes = {}, isStrict = false, customLookupDefinitions) {
|
|
85
|
+
const { metadata } = initMeta(data, extraTypes);
|
|
86
|
+
return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
|
|
87
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
2
|
+
import { stringCamelCase } from '@pezkuwi/util';
|
|
3
|
+
import { compareName, createImports, initMeta, readTemplate, writeFile } from '../util/index.js';
|
|
4
|
+
import { getDeprecationNotice } from './types.js';
|
|
5
|
+
const generateForMetaTemplate = Handlebars.compile(readTemplate('errors'));
|
|
6
|
+
/** @internal */
|
|
7
|
+
function generateForMeta(meta, dest, isStrict) {
|
|
8
|
+
writeFile(dest, () => {
|
|
9
|
+
const imports = createImports({});
|
|
10
|
+
const { lookup, pallets } = meta.asLatest;
|
|
11
|
+
const modules = pallets
|
|
12
|
+
.filter(({ errors }) => errors.isSome)
|
|
13
|
+
.map((data) => {
|
|
14
|
+
const name = data.name;
|
|
15
|
+
const errors = data.errors.unwrap();
|
|
16
|
+
const deprecationInfo = errors.deprecationInfo.toJSON();
|
|
17
|
+
return {
|
|
18
|
+
items: lookup.getSiType(errors.type).def.asVariant.variants
|
|
19
|
+
.map(({ docs, index, name }) => {
|
|
20
|
+
const rawStatus = deprecationInfo?.[index.toNumber()];
|
|
21
|
+
if (rawStatus) {
|
|
22
|
+
const deprecationVariantInfo = meta.registry.createTypeUnsafe('VariantDeprecationInfoV16', [rawStatus]);
|
|
23
|
+
const deprecationNotice = getDeprecationNotice(deprecationVariantInfo, name.toString());
|
|
24
|
+
const notice = docs.length ? ['', deprecationNotice] : [deprecationNotice];
|
|
25
|
+
docs.push(...notice.map((text) => meta.registry.createType('Text', text)));
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
docs,
|
|
29
|
+
name: name.toString()
|
|
30
|
+
};
|
|
31
|
+
})
|
|
32
|
+
.sort(compareName),
|
|
33
|
+
name: stringCamelCase(name)
|
|
34
|
+
};
|
|
35
|
+
})
|
|
36
|
+
.sort(compareName);
|
|
37
|
+
return generateForMetaTemplate({
|
|
38
|
+
headerType: 'chain',
|
|
39
|
+
imports,
|
|
40
|
+
isStrict,
|
|
41
|
+
modules,
|
|
42
|
+
types: [
|
|
43
|
+
{
|
|
44
|
+
file: '@pezkuwi/api-base/types',
|
|
45
|
+
types: ['ApiTypes', 'AugmentedError']
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export function generateDefaultErrors(dest, data, extraTypes = {}, isStrict = false) {
|
|
53
|
+
const { metadata } = initMeta(data, extraTypes);
|
|
54
|
+
return generateForMeta(metadata, dest, isStrict);
|
|
55
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Definitions } from '@pezkuwi/types/types';
|
|
2
|
+
import type { HexString } from '@pezkuwi/util/types';
|
|
3
|
+
import { type ExtraTypes } from './types.js';
|
|
4
|
+
/** @internal */
|
|
5
|
+
export declare function generateDefaultEvents(dest: string, data: HexString, extraTypes?: ExtraTypes, isStrict?: boolean, customLookupDefinitions?: Definitions): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
2
|
+
import * as defaultDefs from '@pezkuwi/types/interfaces/definitions';
|
|
3
|
+
import lookupDefinitions from '@pezkuwi/types-augment/lookup/definitions';
|
|
4
|
+
import { stringCamelCase } from '@pezkuwi/util';
|
|
5
|
+
import { compareName, createImports, formatType, initMeta, readTemplate, rebrandTypeName, setImports, writeFile } from '../util/index.js';
|
|
6
|
+
import { ignoreUnusedLookups } from './lookup.js';
|
|
7
|
+
import { getDeprecationNotice } from './types.js';
|
|
8
|
+
const generateForMetaTemplate = Handlebars.compile(readTemplate('events'));
|
|
9
|
+
const ALIAS = [
|
|
10
|
+
'symbol',
|
|
11
|
+
'break',
|
|
12
|
+
'case',
|
|
13
|
+
'catch',
|
|
14
|
+
'class',
|
|
15
|
+
'const',
|
|
16
|
+
'continue',
|
|
17
|
+
'debugger',
|
|
18
|
+
'default',
|
|
19
|
+
'delete',
|
|
20
|
+
'do',
|
|
21
|
+
'else',
|
|
22
|
+
'export',
|
|
23
|
+
'extends',
|
|
24
|
+
'false',
|
|
25
|
+
'finally',
|
|
26
|
+
'for',
|
|
27
|
+
'function',
|
|
28
|
+
'if',
|
|
29
|
+
'import',
|
|
30
|
+
'in',
|
|
31
|
+
'instanceof',
|
|
32
|
+
'new',
|
|
33
|
+
'null',
|
|
34
|
+
'return',
|
|
35
|
+
'static',
|
|
36
|
+
'super',
|
|
37
|
+
'switch',
|
|
38
|
+
'this',
|
|
39
|
+
'throw',
|
|
40
|
+
'true',
|
|
41
|
+
'try',
|
|
42
|
+
'typeof',
|
|
43
|
+
'var',
|
|
44
|
+
'void',
|
|
45
|
+
'while',
|
|
46
|
+
'with',
|
|
47
|
+
'yield'
|
|
48
|
+
];
|
|
49
|
+
/** @internal */
|
|
50
|
+
function generateForMeta(meta, dest, extraTypes, isStrict, customLookupDefinitions) {
|
|
51
|
+
writeFile(dest, () => {
|
|
52
|
+
const allTypes = {
|
|
53
|
+
'@pezkuwi/types-augment': {
|
|
54
|
+
lookup: {
|
|
55
|
+
...lookupDefinitions,
|
|
56
|
+
...customLookupDefinitions
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
'@pezkuwi/types/interfaces': defaultDefs,
|
|
60
|
+
...extraTypes
|
|
61
|
+
};
|
|
62
|
+
const imports = createImports(allTypes);
|
|
63
|
+
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
|
64
|
+
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
|
65
|
+
}, {});
|
|
66
|
+
const { lookup, pallets, registry } = meta.asLatest;
|
|
67
|
+
const usedTypes = new Set([]);
|
|
68
|
+
const modules = pallets
|
|
69
|
+
.filter(({ events }) => events.isSome)
|
|
70
|
+
.map((data) => {
|
|
71
|
+
const name = data.name;
|
|
72
|
+
const events = data.events.unwrap();
|
|
73
|
+
const deprecationInfo = events.deprecationInfo.toJSON();
|
|
74
|
+
return {
|
|
75
|
+
items: lookup.getSiType(events.type).def.asVariant.variants
|
|
76
|
+
.map(({ docs, fields, index, name }) => {
|
|
77
|
+
const rawStatus = deprecationInfo?.[index.toNumber()];
|
|
78
|
+
if (rawStatus) {
|
|
79
|
+
const deprecationVariantInfo = meta.registry.createTypeUnsafe('VariantDeprecationInfoV16', [rawStatus]);
|
|
80
|
+
const deprecationNotice = getDeprecationNotice(deprecationVariantInfo, name.toString());
|
|
81
|
+
const notice = docs.length ? ['', deprecationNotice] : [deprecationNotice];
|
|
82
|
+
docs.push(...notice.map((text) => meta.registry.createType('Text', text)));
|
|
83
|
+
}
|
|
84
|
+
const args = fields
|
|
85
|
+
.map(({ type }) => lookup.getTypeDef(type))
|
|
86
|
+
.map((typeDef) => {
|
|
87
|
+
const arg = rebrandTypeName(typeDef.lookupName || '') || formatType(registry, allDefs, typeDef, imports);
|
|
88
|
+
// Add the type to the list of used types
|
|
89
|
+
if (!(imports.primitiveTypes[arg])) {
|
|
90
|
+
usedTypes.add(arg);
|
|
91
|
+
}
|
|
92
|
+
return arg;
|
|
93
|
+
});
|
|
94
|
+
const names = fields
|
|
95
|
+
.map(({ name }) => registry.lookup.sanitizeField(name)[0])
|
|
96
|
+
.filter((n) => !!n);
|
|
97
|
+
setImports(allDefs, imports, args);
|
|
98
|
+
return {
|
|
99
|
+
docs,
|
|
100
|
+
name: name.toString(),
|
|
101
|
+
type: names.length !== 0 && names.length === args.length
|
|
102
|
+
? `[${names.map((n, i) => `${ALIAS.includes(n) ? `${n}_` : n}: ${args[i]}`).join(', ')}], { ${names.map((n, i) => `${n}: ${args[i]}`).join(', ')} }`
|
|
103
|
+
: `[${args.join(', ')}]`
|
|
104
|
+
};
|
|
105
|
+
})
|
|
106
|
+
.sort(compareName),
|
|
107
|
+
name: stringCamelCase(name)
|
|
108
|
+
};
|
|
109
|
+
})
|
|
110
|
+
.sort(compareName);
|
|
111
|
+
// filter out the unused lookup types from imports
|
|
112
|
+
ignoreUnusedLookups([...usedTypes], imports);
|
|
113
|
+
return generateForMetaTemplate({
|
|
114
|
+
headerType: 'chain',
|
|
115
|
+
imports,
|
|
116
|
+
isStrict,
|
|
117
|
+
modules,
|
|
118
|
+
types: [
|
|
119
|
+
...Object.keys(imports.localTypes).sort().map((packagePath) => ({
|
|
120
|
+
file: packagePath.replace('@pezkuwi/types-augment', '@pezkuwi/types'),
|
|
121
|
+
types: Object.keys(imports.localTypes[packagePath])
|
|
122
|
+
})),
|
|
123
|
+
{
|
|
124
|
+
file: '@pezkuwi/api-base/types',
|
|
125
|
+
types: ['ApiTypes', 'AugmentedEvent']
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** @internal */
|
|
132
|
+
export function generateDefaultEvents(dest, data, extraTypes = {}, isStrict = false, customLookupDefinitions) {
|
|
133
|
+
const { metadata } = initMeta(data, extraTypes);
|
|
134
|
+
return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
|
|
135
|
+
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
1
|
export { generateDefaultConsts } from './consts.js';
|
|
5
2
|
export { generateDefaultErrors } from './errors.js';
|
|
6
3
|
export { generateDefaultEvents } from './events.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { generateDefaultConsts } from './consts.js';
|
|
2
|
+
export { generateDefaultErrors } from './errors.js';
|
|
3
|
+
export { generateDefaultEvents } from './events.js';
|
|
4
|
+
export { generateDefaultInterface } from './interfaceRegistry.js';
|
|
5
|
+
export { generateDefaultLookup } from './lookup.js';
|
|
6
|
+
export { generateDefaultQuery } from './query.js';
|
|
7
|
+
export { generateDefaultRpc } from './rpc.js';
|
|
8
|
+
export { generateDefaultRuntime } from './runtime.js';
|
|
9
|
+
export { generateDefaultTsDef } from './tsDef.js';
|
|
10
|
+
export { generateDefaultTx } from './tx.js';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
2
|
+
import { Json, Raw } from '@pezkuwi/types/codec';
|
|
3
|
+
import { TypeRegistry } from '@pezkuwi/types/create';
|
|
4
|
+
import * as defaultDefinitions from '@pezkuwi/types/interfaces/definitions';
|
|
5
|
+
import * as defaultPrimitives from '@pezkuwi/types/primitive';
|
|
6
|
+
import { createImports, readTemplate, setImports, writeFile } from '../util/index.js';
|
|
7
|
+
const primitiveClasses = {
|
|
8
|
+
...defaultPrimitives,
|
|
9
|
+
Json,
|
|
10
|
+
Raw
|
|
11
|
+
};
|
|
12
|
+
const generateInterfaceTypesTemplate = Handlebars.compile(readTemplate('interfaceRegistry'));
|
|
13
|
+
/** @internal */
|
|
14
|
+
export function generateInterfaceTypes(importDefinitions, dest) {
|
|
15
|
+
const registry = new TypeRegistry();
|
|
16
|
+
writeFile(dest, () => {
|
|
17
|
+
Object.entries(importDefinitions).reduce((acc, def) => Object.assign(acc, def), {});
|
|
18
|
+
const imports = createImports(importDefinitions);
|
|
19
|
+
const definitions = imports.definitions;
|
|
20
|
+
const items = [];
|
|
21
|
+
// first we create imports for our known classes from the API
|
|
22
|
+
Object
|
|
23
|
+
.keys(primitiveClasses)
|
|
24
|
+
.filter((name) => !name.includes('Generic'))
|
|
25
|
+
.forEach((primitiveName) => {
|
|
26
|
+
setImports(definitions, imports, [primitiveName]);
|
|
27
|
+
items.push(primitiveName);
|
|
28
|
+
});
|
|
29
|
+
const existingTypes = {};
|
|
30
|
+
// ensure we have everything registered since we will get the definition
|
|
31
|
+
// form the available types (so any unknown should show after this)
|
|
32
|
+
Object.values(definitions).forEach(({ types }) => {
|
|
33
|
+
registry.register(types);
|
|
34
|
+
});
|
|
35
|
+
// create imports for everything that we have available
|
|
36
|
+
Object.values(definitions).forEach(({ types }) => {
|
|
37
|
+
setImports(definitions, imports, Object.keys(types));
|
|
38
|
+
const uniqueTypes = Object.keys(types).filter((type) => !existingTypes[type]);
|
|
39
|
+
uniqueTypes.forEach((type) => {
|
|
40
|
+
existingTypes[type] = true;
|
|
41
|
+
items.push(type);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return generateInterfaceTypesTemplate({
|
|
45
|
+
headerType: 'defs',
|
|
46
|
+
imports,
|
|
47
|
+
items: items.sort((a, b) => a.localeCompare(b)),
|
|
48
|
+
types: [
|
|
49
|
+
...Object.keys(imports.localTypes).sort().map((packagePath) => ({
|
|
50
|
+
file: packagePath,
|
|
51
|
+
types: Object.keys(imports.localTypes[packagePath])
|
|
52
|
+
}))
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function generateDefaultInterface() {
|
|
58
|
+
generateInterfaceTypes({ '@pezkuwi/types/interfaces': defaultDefinitions }, 'packages/types-augment/src/registry/interfaces.ts');
|
|
59
|
+
}
|