@blocklet/meta 1.16.34-beta-20241212-152152-0b8d4bb3 → 1.16.34-beta-20241214-102147-410be539
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/info.js +2 -1
- package/lib/parse-navigation-from-blocklet.js +4 -0
- package/lib/schema.js +7 -0
- package/lib/types/schema.d.ts +1 -0
- package/lib/util.js +2 -0
- package/package.json +4 -4
package/lib/info.js
CHANGED
|
@@ -62,7 +62,8 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
|
|
|
62
62
|
wallet = (0, wallet_1.default)(state.meta.did, nodeSk);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const salt = state.settings?.session?.salt || '';
|
|
66
|
+
const secret = mcrypto_1.Hasher.SHA3.hash256(Buffer.concat([wallet.secretKey, wallet.address, salt].filter(Boolean).map((v) => Buffer.from(v))));
|
|
66
67
|
return {
|
|
67
68
|
did,
|
|
68
69
|
version,
|
|
@@ -330,6 +330,10 @@ function compactNavigation(navigation, depth = 2) {
|
|
|
330
330
|
}
|
|
331
331
|
item.section = item.section || parent.section || [DEFAULT_SECTION];
|
|
332
332
|
item.visible = item.visible ?? parent.visible;
|
|
333
|
+
if (parent.role) {
|
|
334
|
+
// 继承父级 role
|
|
335
|
+
item.role = item.role || parent.role;
|
|
336
|
+
}
|
|
333
337
|
}
|
|
334
338
|
item.component = [parent.component, item.component].filter(Boolean).join('.');
|
|
335
339
|
return item;
|
package/lib/schema.js
CHANGED
|
@@ -679,6 +679,13 @@ const blockletMetaProps = {
|
|
|
679
679
|
engine: Joi.alternatives().try(engineSchema, Joi.array().items(engineSchema)).optional(),
|
|
680
680
|
// NOTE: following fields are appended by registry or bundling process
|
|
681
681
|
screenshots: Joi.array().items(Joi.string().min(1)).optional().default([]),
|
|
682
|
+
videos: Joi.array()
|
|
683
|
+
.items(Joi.string()
|
|
684
|
+
// eslint-disable-next-line no-useless-escape
|
|
685
|
+
.pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/)
|
|
686
|
+
.message('Each video URL must be a valid YouTube or Vimeo link'))
|
|
687
|
+
.max(3)
|
|
688
|
+
.optional(),
|
|
682
689
|
logoUrl: Joi.string().optional().allow(''),
|
|
683
690
|
dist: distSchema.optional(),
|
|
684
691
|
stats: statsSchema.optional(),
|
package/lib/types/schema.d.ts
CHANGED
package/lib/util.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.34-beta-
|
|
6
|
+
"version": "1.16.34-beta-20241214-102147-410be539",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@abtnode/constant": "1.16.34-beta-
|
|
28
|
+
"@abtnode/constant": "1.16.34-beta-20241214-102147-410be539",
|
|
29
29
|
"@arcblock/did": "1.18.161",
|
|
30
30
|
"@arcblock/did-ext": "1.18.161",
|
|
31
31
|
"@arcblock/did-util": "1.18.161",
|
|
32
32
|
"@arcblock/jwt": "1.18.161",
|
|
33
|
-
"@blocklet/constant": "1.16.34-beta-
|
|
33
|
+
"@blocklet/constant": "1.16.34-beta-20241214-102147-410be539",
|
|
34
34
|
"@ocap/asset": "1.18.161",
|
|
35
35
|
"@ocap/mcrypto": "1.18.161",
|
|
36
36
|
"@ocap/types": "1.18.161",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.6.3"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "7f14bf890cebd9294f3953a7adc64608c078771b"
|
|
83
83
|
}
|