@abtnode/core 1.16.29-beta-cbfd116d → 1.16.29-beta-8671c2cf

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.
@@ -898,11 +898,6 @@ class DiskBlockletManager extends BaseBlockletManager {
898
898
  ? componentDids.map((x) => ({ did: x }))
899
899
  : blocklet.children.map((x) => ({ did: x.meta.did })),
900
900
  });
901
- // for backward compatibility
902
- this.emit(BlockletInternalEvents.componentsUpdated, {
903
- appDid: blocklet.appDid,
904
- components: getComponentsInternalInfo(res),
905
- });
906
901
  this.configSynchronizer.throttledSyncAppConfig(blocklet.meta.did);
907
902
 
908
903
  let description = `${
@@ -1265,11 +1260,6 @@ class DiskBlockletManager extends BaseBlockletManager {
1265
1260
  appDid: app.appDid,
1266
1261
  components: [{ did: child.meta.did }],
1267
1262
  });
1268
- // for backward compatibility
1269
- this.emit(BlockletInternalEvents.componentsUpdated, {
1270
- appDid: app.appDid,
1271
- components: getComponentsInternalInfo(newBlocklet),
1272
- });
1273
1263
  this.configSynchronizer.throttledSyncAppConfig(app.meta.did);
1274
1264
 
1275
1265
  return { ...newBlocklet, deletedComponent: child };
@@ -1580,7 +1570,6 @@ class DiskBlockletManager extends BaseBlockletManager {
1580
1570
  this.configSynchronizer.throttledSyncAppConfig(blocklet.meta.did);
1581
1571
  }
1582
1572
 
1583
- this.emit(BlockletEvents.updated, { ...newState, context });
1584
1573
  const serverSk = (await states.node.read()).sk;
1585
1574
  if (childDid) {
1586
1575
  const configs = JSON.stringify(finalConfigs.map((x) => ({ key: x.key, value: x.value })));
@@ -1593,6 +1582,8 @@ class DiskBlockletManager extends BaseBlockletManager {
1593
1582
  this.configSynchronizer.syncComponentConfig(childDid, rootDid, { serverSk });
1594
1583
  }
1595
1584
 
1585
+ this.emit(BlockletEvents.updated, { ...newState, context });
1586
+
1596
1587
  try {
1597
1588
  const observableConfigs = [
1598
1589
  BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,
@@ -1867,11 +1858,6 @@ class DiskBlockletManager extends BaseBlockletManager {
1867
1858
  appDid: blocklet.appDid,
1868
1859
  components: getComponentsInternalInfo(blocklet).filter((x) => x.did === component.meta.did),
1869
1860
  });
1870
- // for backward compatibility
1871
- this.emit(BlockletInternalEvents.componentsUpdated, {
1872
- appDid: blocklet.appDid,
1873
- components: getComponentsInternalInfo(blocklet),
1874
- });
1875
1861
  this.configSynchronizer.throttledSyncAppConfig(blocklet.meta.did);
1876
1862
 
1877
1863
  return this.getBlocklet(rootDid);
@@ -2723,11 +2709,6 @@ class DiskBlockletManager extends BaseBlockletManager {
2723
2709
  appDid: blocklet.appDid,
2724
2710
  components: (componentDids || []).map((x) => ({ did: x })),
2725
2711
  });
2726
- // for backward compatibility
2727
- this.emit(BlockletInternalEvents.componentsUpdated, {
2728
- appDid: blocklet.appDid,
2729
- components: getComponentsInternalInfo(res),
2730
- });
2731
2712
  this.configSynchronizer.throttledSyncAppConfig(res);
2732
2713
 
2733
2714
  this.emit(BlockletEvents.statusChange, res);
@@ -3709,7 +3690,8 @@ class DiskBlockletManager extends BaseBlockletManager {
3709
3690
  }
3710
3691
  }
3711
3692
  if (stoppedDids.length) {
3712
- await states.blocklet.setBlockletStatus(did, BlockletStatus.stopped, { componentDids: stoppedDids });
3693
+ const status = action === INSTALL_ACTIONS.INSTALL_COMPONENT ? BlockletStatus.installed : BlockletStatus.stopped;
3694
+ await states.blocklet.setBlockletStatus(did, status, { componentDids: stoppedDids });
3713
3695
  }
3714
3696
 
3715
3697
  blocklet = await this.getBlocklet(did, context);
@@ -3763,11 +3745,6 @@ class DiskBlockletManager extends BaseBlockletManager {
3763
3745
  }
3764
3746
  );
3765
3747
  }
3766
- // for backward compatibility
3767
- this.emit(BlockletInternalEvents.componentsUpdated, {
3768
- appDid: blocklet.appDid,
3769
- components: getComponentsInternalInfo(blocklet),
3770
- });
3771
3748
  this.configSynchronizer.throttledSyncAppConfig(blocklet);
3772
3749
 
3773
3750
  return blocklet;
@@ -357,11 +357,7 @@ module.exports = ({
357
357
  }
358
358
  }
359
359
 
360
- if (
361
- [BlockletEvents.started, BlockletEvents.startFailed, BlockletEvents.stopped, BlockletEvents.reloaded].includes(
362
- eventName
363
- )
364
- ) {
360
+ if ([BlockletEvents.started, BlockletEvents.startFailed, BlockletEvents.stopped].includes(eventName)) {
365
361
  try {
366
362
  await blockletManager.runtimeMonitor.monit(blocklet.meta.did);
367
363
  } catch (error) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.29-beta-cbfd116d",
6
+ "version": "1.16.29-beta-8671c2cf",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,19 +19,19 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@abtnode/analytics": "1.16.29-beta-cbfd116d",
23
- "@abtnode/auth": "1.16.29-beta-cbfd116d",
24
- "@abtnode/certificate-manager": "1.16.29-beta-cbfd116d",
25
- "@abtnode/constant": "1.16.29-beta-cbfd116d",
26
- "@abtnode/cron": "1.16.29-beta-cbfd116d",
27
- "@abtnode/logger": "1.16.29-beta-cbfd116d",
28
- "@abtnode/models": "1.16.29-beta-cbfd116d",
29
- "@abtnode/queue": "1.16.29-beta-cbfd116d",
30
- "@abtnode/rbac": "1.16.29-beta-cbfd116d",
31
- "@abtnode/router-provider": "1.16.29-beta-cbfd116d",
32
- "@abtnode/static-server": "1.16.29-beta-cbfd116d",
33
- "@abtnode/timemachine": "1.16.29-beta-cbfd116d",
34
- "@abtnode/util": "1.16.29-beta-cbfd116d",
22
+ "@abtnode/analytics": "1.16.29-beta-8671c2cf",
23
+ "@abtnode/auth": "1.16.29-beta-8671c2cf",
24
+ "@abtnode/certificate-manager": "1.16.29-beta-8671c2cf",
25
+ "@abtnode/constant": "1.16.29-beta-8671c2cf",
26
+ "@abtnode/cron": "1.16.29-beta-8671c2cf",
27
+ "@abtnode/logger": "1.16.29-beta-8671c2cf",
28
+ "@abtnode/models": "1.16.29-beta-8671c2cf",
29
+ "@abtnode/queue": "1.16.29-beta-8671c2cf",
30
+ "@abtnode/rbac": "1.16.29-beta-8671c2cf",
31
+ "@abtnode/router-provider": "1.16.29-beta-8671c2cf",
32
+ "@abtnode/static-server": "1.16.29-beta-8671c2cf",
33
+ "@abtnode/timemachine": "1.16.29-beta-8671c2cf",
34
+ "@abtnode/util": "1.16.29-beta-8671c2cf",
35
35
  "@arcblock/did": "1.18.126",
36
36
  "@arcblock/did-auth": "1.18.126",
37
37
  "@arcblock/did-ext": "^1.18.126",
@@ -42,13 +42,13 @@
42
42
  "@arcblock/pm2-events": "^0.0.5",
43
43
  "@arcblock/validator": "^1.18.126",
44
44
  "@arcblock/vc": "1.18.126",
45
- "@blocklet/constant": "1.16.29-beta-cbfd116d",
46
- "@blocklet/env": "1.16.29-beta-cbfd116d",
47
- "@blocklet/meta": "1.16.29-beta-cbfd116d",
48
- "@blocklet/resolver": "1.16.29-beta-cbfd116d",
49
- "@blocklet/sdk": "1.16.29-beta-cbfd116d",
50
- "@blocklet/store": "1.16.29-beta-cbfd116d",
51
- "@did-space/client": "^0.5.7",
45
+ "@blocklet/constant": "1.16.29-beta-8671c2cf",
46
+ "@blocklet/env": "1.16.29-beta-8671c2cf",
47
+ "@blocklet/meta": "1.16.29-beta-8671c2cf",
48
+ "@blocklet/resolver": "1.16.29-beta-8671c2cf",
49
+ "@blocklet/sdk": "1.16.29-beta-8671c2cf",
50
+ "@blocklet/store": "1.16.29-beta-8671c2cf",
51
+ "@did-space/client": "^0.5.8",
52
52
  "@fidm/x509": "^1.2.1",
53
53
  "@ocap/mcrypto": "1.18.126",
54
54
  "@ocap/util": "1.18.126",
@@ -103,5 +103,5 @@
103
103
  "jest": "^29.7.0",
104
104
  "unzipper": "^0.10.11"
105
105
  },
106
- "gitHead": "e9bdb7af77f2d126e40195c67972b07fe683adf9"
106
+ "gitHead": "67207cc32f2cdf4ab8af39d4083ad61fba9711e2"
107
107
  }