@abtnode/core 1.16.27-beta-f109b207 → 1.16.27-beta-74c4e335
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 +2 -1
- package/lib/blocklet/manager/helper/install-component-from-url.js +2 -1
- package/lib/blocklet/manager/helper/upgrade-components.js +1 -1
- package/lib/router/manager.js +5 -0
- package/lib/util/index.js +3 -1
- package/lib/util/queue.js +1 -0
- package/package.json +22 -22
|
@@ -664,10 +664,11 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
async start(
|
|
667
|
-
{ did, throwOnError, checkHealthImmediately = false, e2eMode = false, componentDids:
|
|
667
|
+
{ did, throwOnError, checkHealthImmediately = false, e2eMode = false, componentDids: _inputComponentDids, atomic },
|
|
668
668
|
context
|
|
669
669
|
) {
|
|
670
670
|
const blocklet = await this.ensureBlocklet(did, { e2eMode });
|
|
671
|
+
const inputComponentDids = Array.from(new Set(_inputComponentDids || []));
|
|
671
672
|
let componentDids = inputComponentDids?.length ? inputComponentDids : blocklet.children.map((x) => x.meta.did);
|
|
672
673
|
|
|
673
674
|
// sync component config before at first to ensure resource component config is ready
|
|
@@ -98,7 +98,8 @@ const installComponentFromUrl = async ({
|
|
|
98
98
|
if (index >= 0) {
|
|
99
99
|
// if upgrade, do not update mountPoint and title
|
|
100
100
|
newChild.mountPoint = blocklet.children[index].mountPoint;
|
|
101
|
-
|
|
101
|
+
// 更新版本时, title 应该更新
|
|
102
|
+
// newChild.meta.title = blocklet.children[index].meta.title;
|
|
102
103
|
newChild.installedAt = blocklet.children[index].installedAt;
|
|
103
104
|
blocklet.children.splice(index, 1, newChild);
|
|
104
105
|
} else {
|
|
@@ -36,7 +36,6 @@ const check = async ({ did, states }) => {
|
|
|
36
36
|
{
|
|
37
37
|
source: bundleSource,
|
|
38
38
|
name: child.meta.name,
|
|
39
|
-
title: child.meta.title,
|
|
40
39
|
mountPoint: child.mountPoint,
|
|
41
40
|
},
|
|
42
41
|
],
|
|
@@ -99,6 +98,7 @@ const upgrade = async ({ updateId, componentDids, context, states, manager }) =>
|
|
|
99
98
|
}
|
|
100
99
|
return oldComponent;
|
|
101
100
|
});
|
|
101
|
+
|
|
102
102
|
dynamicComponents = filterDuplicateComponents(dynamicComponents, children);
|
|
103
103
|
children.push(...dynamicComponents);
|
|
104
104
|
|
package/lib/router/manager.js
CHANGED
|
@@ -210,6 +210,11 @@ class RouterManager extends EventEmitter {
|
|
|
210
210
|
domainTld = tempArray.slice(tempArray.length - 2).join('.');
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
if (process.env.ABT_NODE_TEST_DNS_SERVER) {
|
|
214
|
+
dns.setServers([process.env.ABT_NODE_TEST_DNS_SERVER]);
|
|
215
|
+
logger.info('use test dns server', { server: process.env.ABT_NODE_TEST_DNS_SERVER });
|
|
216
|
+
}
|
|
217
|
+
|
|
213
218
|
const results = await dns.promises.resolveTxt(domainTld).catch(() => []);
|
|
214
219
|
|
|
215
220
|
return !!results.find(
|
package/lib/util/index.js
CHANGED
|
@@ -328,7 +328,9 @@ const getSafeEnv = (inputEnv, processEnv = process.env) => {
|
|
|
328
328
|
// For performance sake, we only support 1 param here, and the cache is flushed every minute
|
|
329
329
|
const memoizeAsync = (fn, flushInterval = 60000) => {
|
|
330
330
|
const cache = new Map();
|
|
331
|
-
|
|
331
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
332
|
+
setInterval(() => cache.clear(), flushInterval);
|
|
333
|
+
}
|
|
332
334
|
|
|
333
335
|
return (arg) => {
|
|
334
336
|
if (cache.has(arg)) {
|
package/lib/util/queue.js
CHANGED
|
@@ -13,6 +13,7 @@ const QueueStore = require('@abtnode/queue/lib/store/sequelize');
|
|
|
13
13
|
* @param {number} [params.options.maxRetries] [param=1] number of max retries, default 1
|
|
14
14
|
* @param {number} [params.options.maxTimeout] [param=86400000] max timeout, in ms, default 86400000ms(1d)
|
|
15
15
|
* @param {number} [params.options.retryDelay] [param=0] retry delay, in ms, default 0ms
|
|
16
|
+
* @param {boolean} [params.options.enableScheduledJob]
|
|
16
17
|
* @typedef {
|
|
17
18
|
* EventEmitter & {
|
|
18
19
|
* store: JobStore;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.27-beta-
|
|
6
|
+
"version": "1.16.27-beta-74c4e335",
|
|
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.27-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.27-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.27-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.27-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.27-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.27-beta-
|
|
28
|
-
"@abtnode/models": "1.16.27-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.27-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.27-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.27-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.27-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.27-beta-
|
|
34
|
-
"@abtnode/util": "1.16.27-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.27-beta-74c4e335",
|
|
23
|
+
"@abtnode/auth": "1.16.27-beta-74c4e335",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.27-beta-74c4e335",
|
|
25
|
+
"@abtnode/constant": "1.16.27-beta-74c4e335",
|
|
26
|
+
"@abtnode/cron": "1.16.27-beta-74c4e335",
|
|
27
|
+
"@abtnode/logger": "1.16.27-beta-74c4e335",
|
|
28
|
+
"@abtnode/models": "1.16.27-beta-74c4e335",
|
|
29
|
+
"@abtnode/queue": "1.16.27-beta-74c4e335",
|
|
30
|
+
"@abtnode/rbac": "1.16.27-beta-74c4e335",
|
|
31
|
+
"@abtnode/router-provider": "1.16.27-beta-74c4e335",
|
|
32
|
+
"@abtnode/static-server": "1.16.27-beta-74c4e335",
|
|
33
|
+
"@abtnode/timemachine": "1.16.27-beta-74c4e335",
|
|
34
|
+
"@abtnode/util": "1.16.27-beta-74c4e335",
|
|
35
35
|
"@arcblock/did": "1.18.121",
|
|
36
36
|
"@arcblock/did-auth": "1.18.121",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.121",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.121",
|
|
44
44
|
"@arcblock/vc": "1.18.121",
|
|
45
|
-
"@blocklet/constant": "1.16.27-beta-
|
|
46
|
-
"@blocklet/env": "1.16.27-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.27-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.27-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.27-beta-
|
|
50
|
-
"@blocklet/store": "1.16.27-beta-
|
|
51
|
-
"@did-space/client": "^0.4.
|
|
45
|
+
"@blocklet/constant": "1.16.27-beta-74c4e335",
|
|
46
|
+
"@blocklet/env": "1.16.27-beta-74c4e335",
|
|
47
|
+
"@blocklet/meta": "1.16.27-beta-74c4e335",
|
|
48
|
+
"@blocklet/resolver": "1.16.27-beta-74c4e335",
|
|
49
|
+
"@blocklet/sdk": "1.16.27-beta-74c4e335",
|
|
50
|
+
"@blocklet/store": "1.16.27-beta-74c4e335",
|
|
51
|
+
"@did-space/client": "^0.4.19",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
53
|
"@ocap/mcrypto": "1.18.121",
|
|
54
54
|
"@ocap/util": "1.18.121",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"unzipper": "^0.10.11"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "67ac72a88d7ae2d18f0db2b9b439d78e4112e082"
|
|
107
107
|
}
|