@polkadot/types-create 10.3.4 → 10.5.1
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/create/class.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/util/encodeTypes.js +1 -1
- package/cjs/util/typeSplit.js +1 -1
- package/create/class.js +1 -1
- package/package.json +4 -4
- package/packageInfo.js +1 -1
- package/util/encodeTypes.js +1 -1
- package/util/typeSplit.js +1 -1
package/cjs/create/class.js
CHANGED
|
@@ -26,7 +26,7 @@ function getSubType(value) {
|
|
|
26
26
|
function getTypeClassMap(value) {
|
|
27
27
|
const subs = getSubDefArray(value);
|
|
28
28
|
const map = {};
|
|
29
|
-
for (let i = 0
|
|
29
|
+
for (let i = 0, count = subs.length; i < count; i++) {
|
|
30
30
|
map[subs[i].name] = getTypeDefType(subs[i]);
|
|
31
31
|
}
|
|
32
32
|
return map;
|
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@polkadot/types-create', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/types-create', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.5.1' };
|
package/cjs/util/encodeTypes.js
CHANGED
|
@@ -36,7 +36,7 @@ function encodeSubTypes(registry, sub, asEnum, extra) {
|
|
|
36
36
|
throw new Error(`Subtypes does not have consistent names, ${names.join(', ')}`);
|
|
37
37
|
}
|
|
38
38
|
const inner = (0, util_1.objectSpread)({}, extra);
|
|
39
|
-
for (let i = 0
|
|
39
|
+
for (let i = 0, count = sub.length; i < count; i++) {
|
|
40
40
|
const def = sub[i];
|
|
41
41
|
inner[def.name] = encodeTypeDef(registry, def);
|
|
42
42
|
}
|
package/cjs/util/typeSplit.js
CHANGED
|
@@ -10,7 +10,7 @@ function typeSplit(type) {
|
|
|
10
10
|
let t = 0;
|
|
11
11
|
// current start position
|
|
12
12
|
let start = 0;
|
|
13
|
-
for (let i = 0
|
|
13
|
+
for (let i = 0, count = type.length; i < count; i++) {
|
|
14
14
|
switch (type[i]) {
|
|
15
15
|
// if we are not nested, add the type
|
|
16
16
|
case ',': {
|
package/create/class.js
CHANGED
|
@@ -23,7 +23,7 @@ function getSubType(value) {
|
|
|
23
23
|
function getTypeClassMap(value) {
|
|
24
24
|
const subs = getSubDefArray(value);
|
|
25
25
|
const map = {};
|
|
26
|
-
for (let i = 0
|
|
26
|
+
for (let i = 0, count = subs.length; i < count; i++) {
|
|
27
27
|
map[subs[i].name] = getTypeDefType(subs[i]);
|
|
28
28
|
}
|
|
29
29
|
return map;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"bugs": "https://github.com/polkadot-js/api/issues",
|
|
4
4
|
"description": "Type creator helpers",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=16"
|
|
7
7
|
},
|
|
8
8
|
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-create#readme",
|
|
9
9
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/detectPackage.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "10.
|
|
21
|
+
"version": "10.5.1",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"dependencies": {
|
|
124
|
-
"@polkadot/types-codec": "10.
|
|
125
|
-
"@polkadot/util": "^
|
|
124
|
+
"@polkadot/types-codec": "10.5.1",
|
|
125
|
+
"@polkadot/util": "^12.1.1",
|
|
126
126
|
"tslib": "^2.5.0"
|
|
127
127
|
}
|
|
128
128
|
}
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/types-create', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.
|
|
1
|
+
export const packageInfo = { name: '@polkadot/types-create', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.5.1' };
|
package/util/encodeTypes.js
CHANGED
|
@@ -32,7 +32,7 @@ function encodeSubTypes(registry, sub, asEnum, extra) {
|
|
|
32
32
|
throw new Error(`Subtypes does not have consistent names, ${names.join(', ')}`);
|
|
33
33
|
}
|
|
34
34
|
const inner = objectSpread({}, extra);
|
|
35
|
-
for (let i = 0
|
|
35
|
+
for (let i = 0, count = sub.length; i < count; i++) {
|
|
36
36
|
const def = sub[i];
|
|
37
37
|
inner[def.name] = encodeTypeDef(registry, def);
|
|
38
38
|
}
|
package/util/typeSplit.js
CHANGED
|
@@ -7,7 +7,7 @@ export function typeSplit(type) {
|
|
|
7
7
|
let t = 0;
|
|
8
8
|
// current start position
|
|
9
9
|
let start = 0;
|
|
10
|
-
for (let i = 0
|
|
10
|
+
for (let i = 0, count = type.length; i < count; i++) {
|
|
11
11
|
switch (type[i]) {
|
|
12
12
|
// if we are not nested, add the type
|
|
13
13
|
case ',': {
|