@blocklet/meta 1.8.63 → 1.8.64-beta-b3d407e0
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 +4 -4
- 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(`DApp ${meta.name} 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(`DApp ${meta.name} 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(`DApp
|
|
33
|
+
throw new Error(`DApp ${meta.name} 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(`DApp
|
|
39
|
+
throw new Error(`DApp ${meta.name} may be corrupted or not properly configured: no engine run on ${platform}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.
|
|
6
|
+
"version": "1.8.64-beta-b3d407e0",
|
|
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.
|
|
28
|
-
"@abtnode/constant": "1.8.
|
|
29
|
-
"@abtnode/util": "1.8.
|
|
27
|
+
"@abtnode/client": "1.8.64-beta-b3d407e0",
|
|
28
|
+
"@abtnode/constant": "1.8.64-beta-b3d407e0",
|
|
29
|
+
"@abtnode/util": "1.8.64-beta-b3d407e0",
|
|
30
30
|
"@arcblock/did": "1.18.36",
|
|
31
31
|
"@arcblock/did-ext": "1.18.36",
|
|
32
32
|
"@arcblock/did-util": "1.18.36",
|
|
33
33
|
"@arcblock/jwt": "1.18.36",
|
|
34
|
-
"@blocklet/constant": "1.8.
|
|
34
|
+
"@blocklet/constant": "1.8.64-beta-b3d407e0",
|
|
35
35
|
"@ocap/asset": "1.18.36",
|
|
36
36
|
"@ocap/mcrypto": "1.18.36",
|
|
37
37
|
"@ocap/types": "1.18.36",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"ts-node": "^10.9.1",
|
|
81
81
|
"typescript": "^4.8.4"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e076a9cab4c15cfafb82d0aef9a66dd1b825ec75"
|
|
84
84
|
}
|