@abtnode/core 1.8.39 → 1.8.40

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.
@@ -1080,6 +1080,17 @@ class BlockletManager extends BaseBlockletManager {
1080
1080
  return newState;
1081
1081
  }
1082
1082
 
1083
+ async configNavigations({ did, navigations = [] }) {
1084
+ if (!Array.isArray(navigations)) {
1085
+ throw new Error('navigations is not an array');
1086
+ }
1087
+ await states.blockletExtras.setSettings(did, { navigations });
1088
+
1089
+ const newState = await this.ensureBlocklet(did);
1090
+ this.emit(BlockletEvents.updated, newState);
1091
+ return newState;
1092
+ }
1093
+
1083
1094
  async updateWhoCanAccess({ did, whoCanAccess }) {
1084
1095
  const dids = Array.isArray(did) ? did : [did];
1085
1096
 
package/lib/index.js CHANGED
@@ -211,6 +211,7 @@ function ABTNode(options) {
211
211
  resetBlocklet: blockletManager.reset.bind(blockletManager),
212
212
  deleteBlockletProcess: blockletManager.deleteProcess.bind(blockletManager),
213
213
  configPublicToStore: blockletManager.configPublicToStore.bind(blockletManager),
214
+ configNavigations: blockletManager.configNavigations.bind(blockletManager),
214
215
  updateWhoCanAccess: blockletManager.updateWhoCanAccess.bind(blockletManager),
215
216
  updateComponentTitle: blockletManager.updateComponentTitle.bind(blockletManager),
216
217
  updateComponentMountPoint: blockletManager.updateComponentMountPoint.bind(blockletManager),
@@ -122,6 +122,11 @@ const getLogContent = async (action, args, context, result, info, node) => {
122
122
  return `set publicToStore to true for blocklet ${getBlockletInfo(result, info)}`;
123
123
  }
124
124
  return `set publicToStore to false for blocklet ${getBlockletInfo(result, info)}`;
125
+ case 'configNavigations':
126
+ // eslint-disable-next-line prettier/prettier
127
+ return `updated following navigations for blocklet ${getBlockletInfo(result, info)}:\n${args.navigations.map(
128
+ (x) => `- ${x.title}: ${x.link}\n`
129
+ )}`;
125
130
  case 'updateComponentTitle':
126
131
  return `update component title to **${args.title}** for blocklet ${getBlockletInfo(result, info)}`;
127
132
  case 'updateComponentMountPoint':
@@ -261,6 +266,7 @@ const getLogCategory = (action) => {
261
266
  case 'upgradeBlocklet':
262
267
  case 'upgradeComponents':
263
268
  case 'configPublicToStore':
269
+ case 'configNavigations':
264
270
  case 'updateComponentTitle':
265
271
  case 'updateComponentMountPoint':
266
272
  return 'blocklet';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.39",
6
+ "version": "1.8.40",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,32 +19,32 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@abtnode/auth": "1.8.39",
23
- "@abtnode/certificate-manager": "1.8.39",
24
- "@abtnode/constant": "1.8.39",
25
- "@abtnode/cron": "1.8.39",
26
- "@abtnode/db": "1.8.39",
27
- "@abtnode/logger": "1.8.39",
28
- "@abtnode/queue": "1.8.39",
29
- "@abtnode/rbac": "1.8.39",
30
- "@abtnode/router-provider": "1.8.39",
31
- "@abtnode/static-server": "1.8.39",
32
- "@abtnode/timemachine": "1.8.39",
33
- "@abtnode/util": "1.8.39",
34
- "@arcblock/did": "1.18.18",
22
+ "@abtnode/auth": "1.8.40",
23
+ "@abtnode/certificate-manager": "1.8.40",
24
+ "@abtnode/constant": "1.8.40",
25
+ "@abtnode/cron": "1.8.40",
26
+ "@abtnode/db": "1.8.40",
27
+ "@abtnode/logger": "1.8.40",
28
+ "@abtnode/queue": "1.8.40",
29
+ "@abtnode/rbac": "1.8.40",
30
+ "@abtnode/router-provider": "1.8.40",
31
+ "@abtnode/static-server": "1.8.40",
32
+ "@abtnode/timemachine": "1.8.40",
33
+ "@abtnode/util": "1.8.40",
34
+ "@arcblock/did": "1.18.26",
35
35
  "@arcblock/did-motif": "^1.1.10",
36
- "@arcblock/did-util": "1.18.18",
37
- "@arcblock/event-hub": "1.18.18",
38
- "@arcblock/jwt": "^1.18.18",
36
+ "@arcblock/did-util": "1.18.26",
37
+ "@arcblock/event-hub": "1.18.26",
38
+ "@arcblock/jwt": "^1.18.26",
39
39
  "@arcblock/pm2-events": "^0.0.5",
40
- "@arcblock/vc": "1.18.18",
41
- "@blocklet/constant": "1.8.39",
42
- "@blocklet/meta": "1.8.39",
43
- "@blocklet/sdk": "1.8.39",
40
+ "@arcblock/vc": "1.18.26",
41
+ "@blocklet/constant": "1.8.40",
42
+ "@blocklet/meta": "1.8.40",
43
+ "@blocklet/sdk": "1.8.40",
44
44
  "@fidm/x509": "^1.2.1",
45
- "@ocap/mcrypto": "1.18.18",
46
- "@ocap/util": "1.18.18",
47
- "@ocap/wallet": "1.18.18",
45
+ "@ocap/mcrypto": "1.18.26",
46
+ "@ocap/util": "1.18.26",
47
+ "@ocap/wallet": "1.18.26",
48
48
  "@slack/webhook": "^5.0.4",
49
49
  "axios": "^0.27.2",
50
50
  "axon": "^2.0.3",
@@ -82,5 +82,5 @@
82
82
  "express": "^4.18.2",
83
83
  "jest": "^27.5.1"
84
84
  },
85
- "gitHead": "cf2223c4d9a999993b2be1c943dd75b4221593c3"
85
+ "gitHead": "336dbe0ad2cf512a322358899e56aab3668b1715"
86
86
  }