@dedot/codegen
Advanced tools
@@ -99,3 +99,3 @@ "use strict"; | ||
| const specs = this.runtimeApis.map(([runtimeApiHash, version]) => { | ||
| const runtimeApiSpec = (0, specs_1.findRuntimeApiSpec)(runtimeApiHash, version); | ||
| const runtimeApiSpec = this.#findRuntimeApiSpec(runtimeApiHash, version); | ||
| if (!runtimeApiSpec) | ||
@@ -115,3 +115,7 @@ return; | ||
| } | ||
| #findRuntimeApiSpec = (runtimeApiHash, version) => { | ||
| const runtimeApiName = (0, specs_1.getRuntimeApiNames)().find((one) => (0, utils_2.calculateRuntimeApiHash)(one) === runtimeApiHash); | ||
| return (0, specs_1.getRuntimeApiSpecs)().find((one) => one.runtimeApiName === runtimeApiName && one.version === version); | ||
| }; | ||
| } | ||
| exports.RuntimeApisGen = RuntimeApisGen; |
@@ -1,2 +0,2 @@ | ||
| import { findRuntimeApiSpec } from '@dedot/specs'; | ||
| import { getRuntimeApiNames, getRuntimeApiSpecs } from '@dedot/specs'; | ||
| import { beautifySourceCode, commentBlock, compileTemplate } from './utils'; | ||
@@ -96,3 +96,3 @@ import { calculateRuntimeApiHash, stringSnakeCase } from '@dedot/utils'; | ||
| const specs = this.runtimeApis.map(([runtimeApiHash, version]) => { | ||
| const runtimeApiSpec = findRuntimeApiSpec(runtimeApiHash, version); | ||
| const runtimeApiSpec = this.#findRuntimeApiSpec(runtimeApiHash, version); | ||
| if (!runtimeApiSpec) | ||
@@ -112,2 +112,6 @@ return; | ||
| } | ||
| #findRuntimeApiSpec = (runtimeApiHash, version) => { | ||
| const runtimeApiName = getRuntimeApiNames().find((one) => calculateRuntimeApiHash(one) === runtimeApiHash); | ||
| return getRuntimeApiSpecs().find((one) => one.runtimeApiName === runtimeApiName && one.version === version); | ||
| }; | ||
| } |
+7
-7
| { | ||
| "name": "@dedot/codegen", | ||
| "version": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "version": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "description": "Generate types", | ||
@@ -21,8 +21,8 @@ "author": "Thang X. Vu <thang@coongcrafts.io>", | ||
| "dependencies": { | ||
| "@dedot/codecs": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "@dedot/shape": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "@dedot/specs": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "@dedot/utils": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "@dedot/codecs": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "@dedot/shape": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "@dedot/specs": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "@dedot/utils": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "@polkadot/util": "^12.6.2", | ||
| "dedot": "0.0.1-next.8beb88c3.11+8beb88c", | ||
| "dedot": "0.0.1-next.91b52b9f.16+91b52b9", | ||
| "handlebars": "^4.7.8", | ||
@@ -36,3 +36,3 @@ "prettier": "^3.0.3" | ||
| "license": "Apache-2.0", | ||
| "gitHead": "8beb88c3acd860edb8d37524b4997245e119dad6", | ||
| "gitHead": "91b52b9fd16fe468b34a958e6367fd2a7891268f", | ||
| "module": "./index.js", | ||
@@ -39,0 +39,0 @@ "types": "./index.d.ts", |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
135770
0.48%2864
0.28%