@abtnode/core 1.16.24-beta-08e03567 → 1.16.24-beta-cd4548b9

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.
@@ -1482,27 +1482,28 @@ class DiskBlockletManager extends BaseBlockletManager {
1482
1482
 
1483
1483
  const shouldSendWalletNotification = observableConfigs.some((x) => newConfigs.some((y) => y.key === x));
1484
1484
  const receiverUsers = await this.teamManager.getOwnerAndAdminUsers(newState.appPid, 1);
1485
- const receiver = receiverUsers.map((x) => x.did);
1485
+ const receivers = receiverUsers.map((x) => x.did);
1486
1486
 
1487
- if (shouldSendWalletNotification && receiver) {
1487
+ if (shouldSendWalletNotification && receivers.length) {
1488
1488
  const nodeInfo = await states.node.read();
1489
1489
  const blockletInfo = getBlockletInfo(newState, nodeInfo.sk);
1490
- const walletExtra = await getWalletAppNotification(newState, blockletInfo);
1490
+ const { actions, attachments } = await getWalletAppNotification(newState, blockletInfo);
1491
1491
 
1492
- const notification = {
1493
- receiver,
1494
- teamDid: newState.appPid,
1495
- title: 'Blocklet Config Changed',
1496
- description: `Blocklet ${blockletInfo.name} config changed`,
1497
- action: `/blocklets/${did}/overview`,
1498
- entityType: 'blocklet',
1499
- entityId: newState.appPid,
1500
- severity: 'success',
1501
- blockletUrl: blockletInfo.appUrl,
1502
- extra: { wallet: walletExtra },
1492
+ const sender = {
1493
+ appDid: blockletInfo.wallet.address,
1494
+ appSk: blockletInfo.wallet.secretKey,
1503
1495
  };
1504
1496
 
1505
- await this.teamManager.createNotification(notification);
1497
+ await sendToUser(
1498
+ receivers,
1499
+ {
1500
+ title: 'Blocklet Config Changed',
1501
+ body: `Blocklet ${blockletInfo.name} config changed`,
1502
+ attachments,
1503
+ actions,
1504
+ },
1505
+ sender
1506
+ );
1506
1507
  }
1507
1508
  } catch (error) {
1508
1509
  logger.error('Failed to send wallet notification after updated config', { did, error });
@@ -3307,7 +3308,6 @@ class DiskBlockletManager extends BaseBlockletManager {
3307
3308
  entityType: 'blocklet',
3308
3309
  entityId: did,
3309
3310
  severity: 'success',
3310
- receiver: blocklet?.controller?.nftOwner,
3311
3311
  extra: { wallet: walletExtra },
3312
3312
  });
3313
3313
  } catch (error) {
@@ -3406,7 +3406,7 @@ class DiskBlockletManager extends BaseBlockletManager {
3406
3406
  throw error;
3407
3407
  }
3408
3408
  };
3409
- await forEachComponentV2(blocklet, runMigration, { parallel: true, concurrencyLimit: 2 });
3409
+ await forEachComponentV2(blocklet, runMigration, { parallel: true, concurrencyLimit: 4 });
3410
3410
  }
3411
3411
  logger.info('done migration on upgrading', { did, componentDids });
3412
3412
 
@@ -3792,7 +3792,7 @@ class DiskBlockletManager extends BaseBlockletManager {
3792
3792
  ...getHooksOutputFiles(b),
3793
3793
  });
3794
3794
 
3795
- await forEachBlocklet(blocklet, hookFn, { parallel: true, concurrencyLimit: 2 });
3795
+ await forEachBlocklet(blocklet, hookFn, { parallel: true, concurrencyLimit: 4 });
3796
3796
  }
3797
3797
 
3798
3798
  async _createNotification(did, notification) {
@@ -3819,8 +3819,7 @@ class DiskBlockletManager extends BaseBlockletManager {
3819
3819
  const extra = await states.blockletExtras.getMeta(did);
3820
3820
  const isExternal = !!extra?.controller;
3821
3821
 
3822
- // 如果指定了 receiver, 或者是内部 blocklet, 则创建 notification
3823
- if (notification.receiver || !isExternal) {
3822
+ if (!isExternal) {
3824
3823
  await states.notification.create({ ...notification, blockletUrl });
3825
3824
  }
3826
3825
  await this.teamManager.createNotification({
@@ -656,7 +656,7 @@ const startBlockletProcess = async (
656
656
  logger.error('blocklet post start failed', { processId, error: err });
657
657
  });
658
658
  },
659
- { parallel: true, concurrencyLimit: 2 }
659
+ { parallel: true, concurrencyLimit: 4 }
660
660
  );
661
661
  };
662
662
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.24-beta-08e03567",
6
+ "version": "1.16.24-beta-cd4548b9",
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.24-beta-08e03567",
23
- "@abtnode/auth": "1.16.24-beta-08e03567",
24
- "@abtnode/certificate-manager": "1.16.24-beta-08e03567",
25
- "@abtnode/constant": "1.16.24-beta-08e03567",
26
- "@abtnode/cron": "1.16.24-beta-08e03567",
27
- "@abtnode/logger": "1.16.24-beta-08e03567",
28
- "@abtnode/models": "1.16.24-beta-08e03567",
29
- "@abtnode/queue": "1.16.24-beta-08e03567",
30
- "@abtnode/rbac": "1.16.24-beta-08e03567",
31
- "@abtnode/router-provider": "1.16.24-beta-08e03567",
32
- "@abtnode/static-server": "1.16.24-beta-08e03567",
33
- "@abtnode/timemachine": "1.16.24-beta-08e03567",
34
- "@abtnode/util": "1.16.24-beta-08e03567",
22
+ "@abtnode/analytics": "1.16.24-beta-cd4548b9",
23
+ "@abtnode/auth": "1.16.24-beta-cd4548b9",
24
+ "@abtnode/certificate-manager": "1.16.24-beta-cd4548b9",
25
+ "@abtnode/constant": "1.16.24-beta-cd4548b9",
26
+ "@abtnode/cron": "1.16.24-beta-cd4548b9",
27
+ "@abtnode/logger": "1.16.24-beta-cd4548b9",
28
+ "@abtnode/models": "1.16.24-beta-cd4548b9",
29
+ "@abtnode/queue": "1.16.24-beta-cd4548b9",
30
+ "@abtnode/rbac": "1.16.24-beta-cd4548b9",
31
+ "@abtnode/router-provider": "1.16.24-beta-cd4548b9",
32
+ "@abtnode/static-server": "1.16.24-beta-cd4548b9",
33
+ "@abtnode/timemachine": "1.16.24-beta-cd4548b9",
34
+ "@abtnode/util": "1.16.24-beta-cd4548b9",
35
35
  "@arcblock/did": "1.18.110",
36
36
  "@arcblock/did-auth": "1.18.110",
37
37
  "@arcblock/did-ext": "^1.18.110",
@@ -42,12 +42,12 @@
42
42
  "@arcblock/pm2-events": "^0.0.5",
43
43
  "@arcblock/validator": "^1.18.110",
44
44
  "@arcblock/vc": "1.18.110",
45
- "@blocklet/constant": "1.16.24-beta-08e03567",
46
- "@blocklet/env": "1.16.24-beta-08e03567",
47
- "@blocklet/meta": "1.16.24-beta-08e03567",
48
- "@blocklet/resolver": "1.16.24-beta-08e03567",
49
- "@blocklet/sdk": "1.16.24-beta-08e03567",
50
- "@did-space/client": "^0.3.66",
45
+ "@blocklet/constant": "1.16.24-beta-cd4548b9",
46
+ "@blocklet/env": "1.16.24-beta-cd4548b9",
47
+ "@blocklet/meta": "1.16.24-beta-cd4548b9",
48
+ "@blocklet/resolver": "1.16.24-beta-cd4548b9",
49
+ "@blocklet/sdk": "1.16.24-beta-cd4548b9",
50
+ "@did-space/client": "^0.3.67",
51
51
  "@fidm/x509": "^1.2.1",
52
52
  "@ocap/mcrypto": "1.18.110",
53
53
  "@ocap/util": "1.18.110",
@@ -102,5 +102,5 @@
102
102
  "jest": "^29.7.0",
103
103
  "unzipper": "^0.10.11"
104
104
  },
105
- "gitHead": "464a7b3b6dd7f205d828e6e4f48f37e80741f762"
105
+ "gitHead": "29acd021d33872b8bb58c47e5a873d03963be9df"
106
106
  }