@blocklet/meta 1.8.65-beta-5405baf2 → 1.8.65-beta-f7af64a4
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/lib/entry.js +6 -6
- package/package.json +6 -6
package/lib/entry.js
CHANGED
|
@@ -17,26 +17,26 @@ const validateBlockletEntry = (dir, meta) => {
|
|
|
17
17
|
!fs_1.default.existsSync(path_1.default.join(dir, BLOCKLET_BUNDLE_FOLDER, 'blocklet.js'))) {
|
|
18
18
|
// backward compatible
|
|
19
19
|
if ((0, isEmpty_1.default)(meta.engine)) {
|
|
20
|
-
throw new Error(
|
|
20
|
+
throw new Error(`${meta.bundleName} may be corrupted or not properly bundled: missing blocklet.js`);
|
|
21
21
|
}
|
|
22
22
|
const engine = (0, get_1.default)(meta, 'engine', null);
|
|
23
23
|
if (engine) {
|
|
24
24
|
if (!Array.isArray(engine)) {
|
|
25
25
|
if (!engine.interpreter) {
|
|
26
|
-
throw new Error(
|
|
26
|
+
throw new Error(`${meta.bundleName} may be corrupted or not properly configured: missing engine.interpreter`);
|
|
27
27
|
}
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
engine.forEach((r) => {
|
|
31
31
|
['interpreter', 'platform'].forEach((k) => {
|
|
32
32
|
if (!(0, get_1.default)(r, k, null)) {
|
|
33
|
-
throw new Error(
|
|
33
|
+
throw new Error(`${meta.bundleName} may be corrupted or not properly configured: missing engine.${k}`);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
const platform = os_1.default.platform();
|
|
38
38
|
if (!engine.find((r) => r.platform === platform)) {
|
|
39
|
-
throw new Error(
|
|
39
|
+
throw new Error(`${meta.bundleName} may be corrupted or not properly configured: no engine run on ${platform}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -44,13 +44,13 @@ const validateBlockletEntry = (dir, meta) => {
|
|
|
44
44
|
}
|
|
45
45
|
if (group === BlockletGroup.static) {
|
|
46
46
|
if (!fs_1.default.existsSync(path_1.default.join(dir, main))) {
|
|
47
|
-
throw new Error(
|
|
47
|
+
throw new Error(`${meta.bundleName} may be corrupted or not properly configured: missing main folder`);
|
|
48
48
|
}
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
if (group === BlockletGroup.gateway) {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
throw new Error(
|
|
54
|
+
throw new Error(`${meta.bundleName} Unsupported blocklet type ${group}`);
|
|
55
55
|
};
|
|
56
56
|
module.exports = validateBlockletEntry;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.65-beta-
|
|
6
|
+
"version": "1.8.65-beta-f7af64a4",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@abtnode/client": "1.8.65-beta-
|
|
28
|
-
"@abtnode/constant": "1.8.65-beta-
|
|
29
|
-
"@abtnode/util": "1.8.65-beta-
|
|
27
|
+
"@abtnode/client": "1.8.65-beta-f7af64a4",
|
|
28
|
+
"@abtnode/constant": "1.8.65-beta-f7af64a4",
|
|
29
|
+
"@abtnode/util": "1.8.65-beta-f7af64a4",
|
|
30
30
|
"@arcblock/did": "1.18.37",
|
|
31
31
|
"@arcblock/did-ext": "1.18.37",
|
|
32
32
|
"@arcblock/did-util": "1.18.37",
|
|
33
33
|
"@arcblock/jwt": "1.18.37",
|
|
34
|
-
"@blocklet/constant": "1.8.65-beta-
|
|
34
|
+
"@blocklet/constant": "1.8.65-beta-f7af64a4",
|
|
35
35
|
"@ocap/asset": "1.18.37",
|
|
36
36
|
"@ocap/mcrypto": "1.18.37",
|
|
37
37
|
"@ocap/types": "1.18.37",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"ts-node": "^10.9.1",
|
|
81
81
|
"typescript": "^4.8.4"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "97607d6e12bf8508ac29ab6546110c4ae3b31a82"
|
|
84
84
|
}
|