@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 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 secret = mcrypto_1.Hasher.SHA3.hash256(Buffer.concat([wallet.secretKey, wallet.address].map((v) => Buffer.from(v))));
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(),
@@ -119,6 +119,7 @@ export interface TBlockletMeta {
119
119
  };
120
120
  title?: TTitle | '';
121
121
  version: string;
122
+ videos?: string[];
122
123
  }
123
124
  export type TBlockletName = string;
124
125
  export interface TComponent {
package/lib/util.js CHANGED
@@ -424,6 +424,8 @@ const wipeSensitiveData = (blocklet) => {
424
424
  delete blocklet.configObj;
425
425
  // @ts-ignore
426
426
  delete blocklet.environmentObj;
427
+ // @ts-ignore
428
+ delete blocklet.settings?.session?.salt;
427
429
  }, { sync: true });
428
430
  return blocklet;
429
431
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.34-beta-20241212-152152-0b8d4bb3",
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-20241212-152152-0b8d4bb3",
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-20241212-152152-0b8d4bb3",
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": "999b6d7c9e4458844d001671bb9d538255307fc5"
82
+ "gitHead": "7f14bf890cebd9294f3953a7adc64608c078771b"
83
83
  }