10.1.3: Remove wrong .module specifier in typegen (#5541)
* Remove wrong .module specifier in typegen * 10.1.3 * Reset * Revert "10.1.3" This reverts commit 1c6d8ff0720a8c221fe30e4cca17c5211262ef09. * Rebump 10.1.3
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-base": "10.1.3-3-x",
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/api-base": "10.1.3",
|
||||
"@polkadot/rpc-augment": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-augment": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/rpc-core": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-create": "10.1.3-3-x",
|
||||
"@polkadot/api": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/types-create": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/keyring": "^11.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.1.3-3-x",
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/api-base": "10.1.3-3-x",
|
||||
"@polkadot/rpc-core": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/api": "10.1.3",
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/api-base": "10.1.3",
|
||||
"@polkadot/rpc-core": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "10.1.3-3-x",
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-provider": "10.1.3-3-x",
|
||||
"@polkadot/types-support": "10.1.3-3-x"
|
||||
"@polkadot/api": "10.1.3",
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/rpc-augment": "10.1.3",
|
||||
"@polkadot/rpc-provider": "10.1.3",
|
||||
"@polkadot/types-support": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -20,21 +20,21 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/api-base": "10.1.3-3-x",
|
||||
"@polkadot/api-derive": "10.1.3-3-x",
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/api-base": "10.1.3",
|
||||
"@polkadot/api-derive": "10.1.3",
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-core": "10.1.3-3-x",
|
||||
"@polkadot/rpc-provider": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-create": "10.1.3-3-x",
|
||||
"@polkadot/types-known": "10.1.3-3-x",
|
||||
"@polkadot/rpc-augment": "10.1.3",
|
||||
"@polkadot/rpc-core": "10.1.3",
|
||||
"@polkadot/rpc-provider": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-augment": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/types-create": "10.1.3",
|
||||
"@polkadot/types-known": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"eventemitter3": "^5.0.0",
|
||||
@@ -42,7 +42,7 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-support": "10.1.3-3-x"
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/types-support": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/rpc-core": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-provider": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/rpc-augment": "10.1.3",
|
||||
"@polkadot/rpc-provider": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x"
|
||||
"@polkadot/rpc-augment": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-support": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-support": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"@polkadot/x-fetch": "^11.0.2",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
|
||||
@@ -30,15 +30,15 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.1.3-3-x",
|
||||
"@polkadot/api-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-augment": "10.1.3-3-x",
|
||||
"@polkadot/rpc-provider": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-create": "10.1.3-3-x",
|
||||
"@polkadot/types-support": "10.1.3-3-x",
|
||||
"@polkadot/api": "10.1.3",
|
||||
"@polkadot/api-augment": "10.1.3",
|
||||
"@polkadot/rpc-augment": "10.1.3",
|
||||
"@polkadot/rpc-provider": "10.1.3",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-augment": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/types-create": "10.1.3",
|
||||
"@polkadot/types-support": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"@polkadot/x-ws": "^11.0.2",
|
||||
|
||||
@@ -23,12 +23,12 @@ async function generate (metaHex: HexString, pkg: string | undefined, output: st
|
||||
|
||||
if (pkg) {
|
||||
try {
|
||||
const defPath = assertFile(path.join(outputPath, 'definitions.ts'));
|
||||
const defCont = await import(defPath) as { module: any };
|
||||
const defCont = await import(
|
||||
assertFile(path.join(outputPath, 'definitions.ts'))
|
||||
) as Record<string, any>;
|
||||
|
||||
extraTypes = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
[pkg]: defCont.module
|
||||
[pkg]: defCont
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('ERROR: No custom definitions found:', (error as Error).message);
|
||||
@@ -36,12 +36,13 @@ async function generate (metaHex: HexString, pkg: string | undefined, output: st
|
||||
}
|
||||
|
||||
try {
|
||||
const lookPath = assertFile(path.join(outputPath, 'lookup.ts'));
|
||||
const lookCont = await import(lookPath) as { module: { default: DefinitionsTypes } };
|
||||
const lookCont = await import(
|
||||
assertFile(path.join(outputPath, 'lookup.ts'))
|
||||
) as { default: DefinitionsTypes };
|
||||
|
||||
customLookupDefinitions = {
|
||||
rpc: {},
|
||||
types: lookCont.module.default
|
||||
types: lookCont.default
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('ERROR: No lookup definitions found:', (error as Error).message);
|
||||
@@ -113,5 +114,10 @@ async function mainPromise (): Promise<void> {
|
||||
}
|
||||
|
||||
export function main (): void {
|
||||
mainPromise().catch(() => process.exit(1));
|
||||
mainPromise().catch((error) => {
|
||||
console.error();
|
||||
console.error(error);
|
||||
console.error();
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,9 +40,11 @@ async function mainPromise (): Promise<void> {
|
||||
let userDefs: Record<string, any> = {};
|
||||
|
||||
try {
|
||||
userDefs = await import(
|
||||
const defCont = await import(
|
||||
assertFile(path.join(inputPath, 'definitions.ts'))
|
||||
) as Record<string, any>;
|
||||
|
||||
userDefs = defCont;
|
||||
} catch (error) {
|
||||
console.error('ERROR: Unable to load user definitions:', (error as Error).message);
|
||||
}
|
||||
@@ -95,5 +97,10 @@ async function mainPromise (): Promise<void> {
|
||||
}
|
||||
|
||||
export function main (): void {
|
||||
mainPromise().catch(() => process.exit(1));
|
||||
mainPromise().catch((error) => {
|
||||
console.error();
|
||||
console.error(error);
|
||||
console.error();
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^11.0.2",
|
||||
@@ -28,9 +28,9 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-support": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-augment": "10.1.3",
|
||||
"@polkadot/types-support": "10.1.3",
|
||||
"@polkadot/util-crypto": "^11.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "10.1.3-3-x"
|
||||
"@polkadot/types": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/networks": "^11.0.2",
|
||||
"@polkadot/types": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-create": "10.1.3-3-x",
|
||||
"@polkadot/types": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/types-create": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "10.1.3-3-x"
|
||||
"@polkadot/api": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^11.0.2",
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.1.3-3-x",
|
||||
"version": "10.1.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/types-augment": "10.1.3-3-x",
|
||||
"@polkadot/types-codec": "10.1.3-3-x",
|
||||
"@polkadot/types-create": "10.1.3-3-x",
|
||||
"@polkadot/types-augment": "10.1.3",
|
||||
"@polkadot/types-codec": "10.1.3",
|
||||
"@polkadot/types-create": "10.1.3",
|
||||
"@polkadot/util": "^11.0.2",
|
||||
"@polkadot/util-crypto": "^11.0.2",
|
||||
"rxjs": "^7.8.0",
|
||||
@@ -34,6 +34,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^11.0.2",
|
||||
"@polkadot/types-support": "10.1.3-3-x"
|
||||
"@polkadot/types-support": "10.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user