@abtnode/core 1.8.48 → 1.8.49

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.
@@ -1000,9 +1000,12 @@ class BlockletManager extends BaseBlockletManager {
1000
1000
  }
1001
1001
 
1002
1002
  if (
1003
- [BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO, BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE].includes(
1004
- x.key
1005
- )
1003
+ [
1004
+ BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO,
1005
+ BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT,
1006
+ BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,
1007
+ BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON,
1008
+ ].includes(x.key)
1006
1009
  ) {
1007
1010
  x.value = await logoSchema.validateAsync(x.value);
1008
1011
  }
@@ -1395,7 +1398,16 @@ class BlockletManager extends BaseBlockletManager {
1395
1398
  };
1396
1399
  }
1397
1400
 
1398
- async updateChildren({ updateId, did: inputDid, children: inputChildren, oldBlocklet: inputOldBlocklet }, context) {
1401
+ async updateChildren(
1402
+ {
1403
+ updateId,
1404
+ did: inputDid,
1405
+ children: inputChildren,
1406
+ oldBlocklet: inputOldBlocklet,
1407
+ selectedComponents: selectedComponentDids,
1408
+ },
1409
+ context
1410
+ ) {
1399
1411
  let did;
1400
1412
  let children;
1401
1413
  let oldBlocklet;
@@ -1406,8 +1418,19 @@ class BlockletManager extends BaseBlockletManager {
1406
1418
  } else {
1407
1419
  const sessionData = await states.session.end(updateId);
1408
1420
  did = sessionData.did;
1409
- children = sessionData.children;
1410
1421
  oldBlocklet = await this._getBlockletForInstallation(did);
1422
+
1423
+ if (selectedComponentDids && selectedComponentDids.length) {
1424
+ children = cloneDeep(oldBlocklet.children).map((oldComponent) => {
1425
+ const newComponent = sessionData.children.find((x) => x.meta.did === oldComponent.meta.did);
1426
+ if (newComponent && selectedComponentDids.includes(newComponent.meta.did)) {
1427
+ return newComponent;
1428
+ }
1429
+ return oldComponent;
1430
+ });
1431
+ } else {
1432
+ children = sessionData.children;
1433
+ }
1411
1434
  }
1412
1435
 
1413
1436
  // get old blocklet
@@ -396,6 +396,7 @@ const getRuntimeEnvironments = (blocklet, nodeEnvironments, ancestors) => {
396
396
  BLOCKLET_MOUNT_POINTS: JSON.stringify(mountPoints),
397
397
  BLOCKLET_MODE: blocklet.mode || BLOCKLET_MODES.PRODUCTION,
398
398
  BLOCKLET_APP_EK: tmp?.secretKey,
399
+ BLOCKLET_APP_VERSION: root.meta.version,
399
400
  ...nodeEnvironments,
400
401
  ...safeNodeEnvironments,
401
402
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.48",
6
+ "version": "1.8.49",
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.48",
23
- "@abtnode/certificate-manager": "1.8.48",
24
- "@abtnode/constant": "1.8.48",
25
- "@abtnode/cron": "1.8.48",
26
- "@abtnode/db": "1.8.48",
27
- "@abtnode/logger": "1.8.48",
28
- "@abtnode/queue": "1.8.48",
29
- "@abtnode/rbac": "1.8.48",
30
- "@abtnode/router-provider": "1.8.48",
31
- "@abtnode/static-server": "1.8.48",
32
- "@abtnode/timemachine": "1.8.48",
33
- "@abtnode/util": "1.8.48",
34
- "@arcblock/did": "1.18.31",
22
+ "@abtnode/auth": "1.8.49",
23
+ "@abtnode/certificate-manager": "1.8.49",
24
+ "@abtnode/constant": "1.8.49",
25
+ "@abtnode/cron": "1.8.49",
26
+ "@abtnode/db": "1.8.49",
27
+ "@abtnode/logger": "1.8.49",
28
+ "@abtnode/queue": "1.8.49",
29
+ "@abtnode/rbac": "1.8.49",
30
+ "@abtnode/router-provider": "1.8.49",
31
+ "@abtnode/static-server": "1.8.49",
32
+ "@abtnode/timemachine": "1.8.49",
33
+ "@abtnode/util": "1.8.49",
34
+ "@arcblock/did": "1.18.32",
35
35
  "@arcblock/did-motif": "^1.1.10",
36
- "@arcblock/did-util": "1.18.31",
37
- "@arcblock/event-hub": "1.18.31",
38
- "@arcblock/jwt": "^1.18.31",
36
+ "@arcblock/did-util": "1.18.32",
37
+ "@arcblock/event-hub": "1.18.32",
38
+ "@arcblock/jwt": "^1.18.32",
39
39
  "@arcblock/pm2-events": "^0.0.5",
40
- "@arcblock/vc": "1.18.31",
41
- "@blocklet/constant": "1.8.48",
42
- "@blocklet/meta": "1.8.48",
43
- "@blocklet/sdk": "1.8.48",
40
+ "@arcblock/vc": "1.18.32",
41
+ "@blocklet/constant": "1.8.49",
42
+ "@blocklet/meta": "1.8.49",
43
+ "@blocklet/sdk": "1.8.49",
44
44
  "@fidm/x509": "^1.2.1",
45
- "@ocap/mcrypto": "1.18.31",
46
- "@ocap/util": "1.18.31",
47
- "@ocap/wallet": "1.18.31",
45
+ "@ocap/mcrypto": "1.18.32",
46
+ "@ocap/util": "1.18.32",
47
+ "@ocap/wallet": "1.18.32",
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": "39979d7a059d5f97442ac7d46604391e6656ac8d"
85
+ "gitHead": "627ac4fb21957fcbaf7c2c21e77de0f51ef9e30d"
86
86
  }