@abtnode/core 1.16.14-beta-d802cd3c → 1.16.14-beta-dc99d0a2
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 +30 -5
- package/package.json +19 -19
|
@@ -77,7 +77,7 @@ const {
|
|
|
77
77
|
SUSPENDED_REASON,
|
|
78
78
|
} = require('@blocklet/constant');
|
|
79
79
|
const isUndefined = require('lodash/isUndefined');
|
|
80
|
-
const { WELLKNOWN_SERVICE_PATH_PREFIX } = require('@abtnode/constant');
|
|
80
|
+
const { WELLKNOWN_SERVICE_PATH_PREFIX, WELLKNOWN_BLOCKLET_ADMIN_PATH } = require('@abtnode/constant');
|
|
81
81
|
const { signV2 } = require('@arcblock/jwt');
|
|
82
82
|
const normalizePathPrefix = require('@abtnode/util/lib/normalize-path-prefix');
|
|
83
83
|
const pLimit = require('p-limit');
|
|
@@ -610,6 +610,16 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
610
610
|
components: getComponentsInternalInfo(res),
|
|
611
611
|
});
|
|
612
612
|
|
|
613
|
+
this._createNotification(did, {
|
|
614
|
+
title: '',
|
|
615
|
+
description: `${
|
|
616
|
+
componentDids?.length ? getComponentNamesWithVersion(blocklet, componentDids) : 'All components'
|
|
617
|
+
} is successfully stopped for ${blocklet.meta.title}.`,
|
|
618
|
+
entityType: 'blocklet',
|
|
619
|
+
entityId: did,
|
|
620
|
+
severity: 'success',
|
|
621
|
+
});
|
|
622
|
+
|
|
613
623
|
return res;
|
|
614
624
|
}
|
|
615
625
|
|
|
@@ -1299,7 +1309,7 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
1299
1309
|
const enabled = newConfig?.email?.enabled;
|
|
1300
1310
|
if (enabled) {
|
|
1301
1311
|
const { error } = emailConfigSchema.validate(
|
|
1302
|
-
pick(newConfig?.email || {}, ['from', 'host', 'port', 'user', 'password'])
|
|
1312
|
+
pick(newConfig?.email || {}, ['from', 'host', 'port', 'user', 'password', 'secure'])
|
|
1303
1313
|
);
|
|
1304
1314
|
if (error) {
|
|
1305
1315
|
logger.error('configNotification validate error', { error });
|
|
@@ -1395,6 +1405,9 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
1395
1405
|
|
|
1396
1406
|
if (validateConfig.cacheTtl) {
|
|
1397
1407
|
sessionConfig.cacheTtl = validateConfig.cacheTtl;
|
|
1408
|
+
} else {
|
|
1409
|
+
// NOTE: 将 cacheTtl 默认值设置为 3600s
|
|
1410
|
+
sessionConfig.cacheTtl = 60 * 60; // seconds
|
|
1398
1411
|
}
|
|
1399
1412
|
if (validateConfig.ttl) {
|
|
1400
1413
|
sessionConfig.ttl = validateConfig.ttl;
|
|
@@ -2011,6 +2024,16 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
2011
2024
|
|
|
2012
2025
|
this.emit(BlockletEvents.statusChange, res);
|
|
2013
2026
|
this.emit(BlockletEvents.started, { ...res, componentDids });
|
|
2027
|
+
this._createNotification(did, {
|
|
2028
|
+
title: '',
|
|
2029
|
+
description: `${getComponentNamesWithVersion(blocklet, componentDids)} is successfully started for ${
|
|
2030
|
+
blocklet.meta.title
|
|
2031
|
+
}.`,
|
|
2032
|
+
entityType: 'blocklet',
|
|
2033
|
+
entityId: did,
|
|
2034
|
+
severity: 'success',
|
|
2035
|
+
});
|
|
2036
|
+
|
|
2014
2037
|
logger.info('blocklet healthy', { did, name, time: Date.now() - startedAt });
|
|
2015
2038
|
} catch (error) {
|
|
2016
2039
|
const status = await states.blocklet.getBlockletStatus(did);
|
|
@@ -2963,7 +2986,9 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
2963
2986
|
if (blocklet) {
|
|
2964
2987
|
const urls = blocklet.site?.domainAliases || [];
|
|
2965
2988
|
const customUrl = urls.find((x) => !x.isProtected)?.value;
|
|
2966
|
-
blockletUrl = `http://${
|
|
2989
|
+
blockletUrl = `http://${
|
|
2990
|
+
customUrl || getDidDomainForBlocklet({ appPid: blocklet.appPid })
|
|
2991
|
+
}${WELLKNOWN_BLOCKLET_ADMIN_PATH}`;
|
|
2967
2992
|
}
|
|
2968
2993
|
} catch (error) {
|
|
2969
2994
|
logger.error('[_createNotification] get blocklet url failed', { error });
|
|
@@ -3498,8 +3523,8 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3498
3523
|
'agreement',
|
|
3499
3524
|
'verifiableCredential',
|
|
3500
3525
|
'asset',
|
|
3501
|
-
|
|
3502
|
-
// 'encryptionKey',
|
|
3526
|
+
'keyPair',
|
|
3527
|
+
// 'encryptionKey', // 备份还原应用时使用
|
|
3503
3528
|
],
|
|
3504
3529
|
},
|
|
3505
3530
|
],
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.14-beta-
|
|
6
|
+
"version": "1.16.14-beta-dc99d0a2",
|
|
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.14-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.14-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.14-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.14-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.14-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.14-beta-
|
|
28
|
-
"@abtnode/models": "1.16.14-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.14-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.14-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.14-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.14-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.14-beta-
|
|
34
|
-
"@abtnode/util": "1.16.14-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.14-beta-dc99d0a2",
|
|
23
|
+
"@abtnode/auth": "1.16.14-beta-dc99d0a2",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.14-beta-dc99d0a2",
|
|
25
|
+
"@abtnode/constant": "1.16.14-beta-dc99d0a2",
|
|
26
|
+
"@abtnode/cron": "1.16.14-beta-dc99d0a2",
|
|
27
|
+
"@abtnode/logger": "1.16.14-beta-dc99d0a2",
|
|
28
|
+
"@abtnode/models": "1.16.14-beta-dc99d0a2",
|
|
29
|
+
"@abtnode/queue": "1.16.14-beta-dc99d0a2",
|
|
30
|
+
"@abtnode/rbac": "1.16.14-beta-dc99d0a2",
|
|
31
|
+
"@abtnode/router-provider": "1.16.14-beta-dc99d0a2",
|
|
32
|
+
"@abtnode/static-server": "1.16.14-beta-dc99d0a2",
|
|
33
|
+
"@abtnode/timemachine": "1.16.14-beta-dc99d0a2",
|
|
34
|
+
"@abtnode/util": "1.16.14-beta-dc99d0a2",
|
|
35
35
|
"@arcblock/did": "1.18.87",
|
|
36
36
|
"@arcblock/did-auth": "1.18.87",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.87",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.87",
|
|
44
44
|
"@arcblock/vc": "1.18.87",
|
|
45
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
46
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
47
|
-
"@blocklet/resolver": "1.16.14-beta-
|
|
48
|
-
"@blocklet/sdk": "1.16.14-beta-
|
|
45
|
+
"@blocklet/constant": "1.16.14-beta-dc99d0a2",
|
|
46
|
+
"@blocklet/meta": "1.16.14-beta-dc99d0a2",
|
|
47
|
+
"@blocklet/resolver": "1.16.14-beta-dc99d0a2",
|
|
48
|
+
"@blocklet/sdk": "1.16.14-beta-dc99d0a2",
|
|
49
49
|
"@did-space/client": "^0.2.129",
|
|
50
50
|
"@fidm/x509": "^1.2.1",
|
|
51
51
|
"@ocap/mcrypto": "1.18.87",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"jest": "^27.5.1",
|
|
100
100
|
"unzipper": "^0.10.11"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "a00766d660ede97e2036f3a785f4f5cfb2e6d870"
|
|
103
103
|
}
|