@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.
- package/lib/blocklet/manager/disk.js +19 -20
- package/lib/util/blocklet.js +1 -1
- package/package.json +21 -21
|
@@ -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
|
|
1485
|
+
const receivers = receiverUsers.map((x) => x.did);
|
|
1486
1486
|
|
|
1487
|
-
if (shouldSendWalletNotification &&
|
|
1487
|
+
if (shouldSendWalletNotification && receivers.length) {
|
|
1488
1488
|
const nodeInfo = await states.node.read();
|
|
1489
1489
|
const blockletInfo = getBlockletInfo(newState, nodeInfo.sk);
|
|
1490
|
-
const
|
|
1490
|
+
const { actions, attachments } = await getWalletAppNotification(newState, blockletInfo);
|
|
1491
1491
|
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
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
|
|
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:
|
|
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:
|
|
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
|
-
|
|
3823
|
-
if (notification.receiver || !isExternal) {
|
|
3822
|
+
if (!isExternal) {
|
|
3824
3823
|
await states.notification.create({ ...notification, blockletUrl });
|
|
3825
3824
|
}
|
|
3826
3825
|
await this.teamManager.createNotification({
|
package/lib/util/blocklet.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.24-beta-
|
|
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-
|
|
23
|
-
"@abtnode/auth": "1.16.24-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.24-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.24-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.24-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.24-beta-
|
|
28
|
-
"@abtnode/models": "1.16.24-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.24-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.24-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.24-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.24-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.24-beta-
|
|
34
|
-
"@abtnode/util": "1.16.24-beta-
|
|
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-
|
|
46
|
-
"@blocklet/env": "1.16.24-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.24-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.24-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.24-beta-
|
|
50
|
-
"@did-space/client": "^0.3.
|
|
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": "
|
|
105
|
+
"gitHead": "29acd021d33872b8bb58c47e5a873d03963be9df"
|
|
106
106
|
}
|