@blocklet/meta 1.6.18 → 1.6.19
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/constants.js +1 -1
- package/lib/schema.js +8 -4
- package/lib/util.js +5 -0
- package/package.json +11 -11
package/lib/constants.js
CHANGED
|
@@ -173,7 +173,7 @@ module.exports = Object.freeze({
|
|
|
173
173
|
|
|
174
174
|
BLOCKLET_DEFAULT_VERSION: '1.0.0',
|
|
175
175
|
|
|
176
|
-
BLOCKLET_LATEST_SPEC_VERSION: '1.2.
|
|
176
|
+
BLOCKLET_LATEST_SPEC_VERSION: '1.2.2',
|
|
177
177
|
BLOCKLET_LATEST_REQUIREMENT_SERVER: '>=1.6.2',
|
|
178
178
|
BLOCKLET_LATEST_REQUIREMENT_ABTNODE: '>=1.5.15', // Deprecated
|
|
179
179
|
|
package/lib/schema.js
CHANGED
|
@@ -259,9 +259,7 @@ const createBlockletSchema = (
|
|
|
259
259
|
}
|
|
260
260
|
return value;
|
|
261
261
|
}, 'invalid blocklet share'),
|
|
262
|
-
})
|
|
263
|
-
.default({ price: [], share: [] })
|
|
264
|
-
.optional(),
|
|
262
|
+
}).default({ price: [], share: [] }),
|
|
265
263
|
|
|
266
264
|
keywords: Joi.alternatives()
|
|
267
265
|
.try(Joi.string().trim().min(1), Joi.array().items(Joi.string().min(1)))
|
|
@@ -334,7 +332,13 @@ const createBlockletSchema = (
|
|
|
334
332
|
// capabilities
|
|
335
333
|
capabilities: Joi.object({
|
|
336
334
|
clusterMode: Joi.boolean().default(false), // Can blocklet be started in cluster mode
|
|
337
|
-
|
|
335
|
+
|
|
336
|
+
// added in 1.2.2
|
|
337
|
+
component: Joi.boolean().default(true), // Can blocklet become a component and be composed by other blocklets
|
|
338
|
+
}).default({
|
|
339
|
+
clusterMode: false,
|
|
340
|
+
component: true,
|
|
341
|
+
}),
|
|
338
342
|
|
|
339
343
|
// Other contents to be included in the bundle
|
|
340
344
|
files: Joi.array()
|
package/lib/util.js
CHANGED
|
@@ -101,6 +101,10 @@ const isFreeBlocklet = (meta) => {
|
|
|
101
101
|
return priceList.every((x) => x === 0);
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
+
const isComponentBlocklet = (meta) => {
|
|
105
|
+
return get(meta, 'capabilities.component') !== false;
|
|
106
|
+
};
|
|
107
|
+
|
|
104
108
|
const wipeSensitiveData = (blocklet) => {
|
|
105
109
|
if (!blocklet) {
|
|
106
110
|
return blocklet;
|
|
@@ -174,6 +178,7 @@ const getDisplayName = (blocklet, onlyUseMeta = false) => {
|
|
|
174
178
|
|
|
175
179
|
module.exports = {
|
|
176
180
|
isFreeBlocklet,
|
|
181
|
+
isComponentBlocklet,
|
|
177
182
|
forEachBlockletSync,
|
|
178
183
|
isDeletableBlocklet,
|
|
179
184
|
forEachBlocklet,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.19",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did": "^1.14.
|
|
22
|
-
"@arcblock/did-ext": "^1.14.
|
|
23
|
-
"@arcblock/did-util": "^1.14.
|
|
24
|
-
"@arcblock/nft": "^1.14.
|
|
25
|
-
"@ocap/asset": "^1.14.
|
|
26
|
-
"@ocap/mcrypto": "^1.14.
|
|
27
|
-
"@ocap/util": "^1.14.
|
|
28
|
-
"@ocap/wallet": "^1.14.
|
|
21
|
+
"@arcblock/did": "^1.14.11",
|
|
22
|
+
"@arcblock/did-ext": "^1.14.11",
|
|
23
|
+
"@arcblock/did-util": "^1.14.11",
|
|
24
|
+
"@arcblock/nft": "^1.14.11",
|
|
25
|
+
"@ocap/asset": "^1.14.11",
|
|
26
|
+
"@ocap/mcrypto": "^1.14.11",
|
|
27
|
+
"@ocap/util": "^1.14.11",
|
|
28
|
+
"@ocap/wallet": "^1.14.11",
|
|
29
29
|
"ajv": "^7.0.3",
|
|
30
30
|
"cjk-length": "^1.0.0",
|
|
31
31
|
"debug": "^4.3.3",
|
|
32
32
|
"fs-extra": "^10.0.0",
|
|
33
33
|
"hosted-git-info": "3.0.8",
|
|
34
34
|
"is-glob": "^4.0.3",
|
|
35
|
-
"joi": "^17.
|
|
35
|
+
"joi": "^17.6.0",
|
|
36
36
|
"joi-extension-semver": "^5.0.0",
|
|
37
37
|
"js-yaml": "^3.14.0",
|
|
38
38
|
"json-stable-stringify": "^1.0.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"jest": "^27.4.5"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "42a1290f14fca261eccafb05561eecf8683ed66a"
|
|
47
47
|
}
|