@abtnode/core 1.16.13 → 1.16.14-beta-a898bfcb
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 -0
- package/lib/blocklet/manager/helper/upgrade-components.js +7 -1
- package/lib/states/blocklet.js +1 -0
- package/lib/util/get-accessible-external-node-ip.js +2 -2
- package/package.json +20 -20
|
@@ -1804,6 +1804,7 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
1804
1804
|
componentDids,
|
|
1805
1805
|
skipCheckIntegrity,
|
|
1806
1806
|
} = params;
|
|
1807
|
+
logger.info('_downloadAndInstall', { did: blocklet?.meta?.did });
|
|
1807
1808
|
const { meta } = blocklet;
|
|
1808
1809
|
const { title, name, did, version } = meta;
|
|
1809
1810
|
|
|
@@ -2605,7 +2606,7 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
2605
2606
|
if (oldBlocklet.status === BlockletStatus.running) {
|
|
2606
2607
|
// start new process
|
|
2607
2608
|
await this.start({ did, componentDids }, context);
|
|
2608
|
-
logger.info('started blocklet for upgrading', { did, version });
|
|
2609
|
+
logger.info('started blocklet for upgrading', { did, version, componentDids });
|
|
2609
2610
|
} else {
|
|
2610
2611
|
const status =
|
|
2611
2612
|
oldBlocklet.status === BlockletStatus.installed ? BlockletStatus.installed : BlockletStatus.stopped;
|
|
@@ -148,6 +148,8 @@ const installComponentFromUrl = async ({
|
|
|
148
148
|
// backup rollback data
|
|
149
149
|
await manager._rollbackCache.backup({ did: rootDid, action, oldBlocklet });
|
|
150
150
|
|
|
151
|
+
logger.info('install component from url', { rootDid, url, mountPoint, sync, componentDids });
|
|
152
|
+
|
|
151
153
|
if (sync) {
|
|
152
154
|
await manager._downloadAndInstall({ ...downloadParams, throwOnError: true });
|
|
153
155
|
return states.blocklet.getBlocklet(rootDid);
|
|
@@ -83,6 +83,12 @@ const upgrade = async ({ updateId, componentDids, context, states, manager }) =>
|
|
|
83
83
|
const oldBlocklet = await manager._getBlockletForInstallation(did);
|
|
84
84
|
checkStructVersion(oldBlocklet);
|
|
85
85
|
|
|
86
|
+
logger.info('upgrade blocklet components', {
|
|
87
|
+
componentDids,
|
|
88
|
+
updateId,
|
|
89
|
+
did,
|
|
90
|
+
});
|
|
91
|
+
|
|
86
92
|
// parse children
|
|
87
93
|
let dynamicComponents = [];
|
|
88
94
|
const children = cloneDeep(oldBlocklet.children).map((oldComponent) => {
|
|
@@ -102,7 +108,7 @@ const upgrade = async ({ updateId, componentDids, context, states, manager }) =>
|
|
|
102
108
|
|
|
103
109
|
checkVersionCompatibility(children);
|
|
104
110
|
|
|
105
|
-
logger.info('
|
|
111
|
+
logger.info('blocklet components to upgrade', {
|
|
106
112
|
did,
|
|
107
113
|
children: children.map((x) => ({ name: x.meta.name, version: x.meta.version })),
|
|
108
114
|
});
|
package/lib/states/blocklet.js
CHANGED
|
@@ -508,6 +508,7 @@ class BlockletState extends BaseState {
|
|
|
508
508
|
* }}
|
|
509
509
|
*/
|
|
510
510
|
async setBlockletStatus(did, status, { componentDids } = {}) {
|
|
511
|
+
logger.info('setBlockletStatus', { did, status, componentDids });
|
|
511
512
|
if (typeof status === 'undefined') {
|
|
512
513
|
throw new Error('Unsupported blocklet status');
|
|
513
514
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const joinUrl = require('url-join');
|
|
2
2
|
const axios = require('@abtnode/util/lib/axios');
|
|
3
|
-
const { DEFAULT_IP_DOMAIN,
|
|
3
|
+
const { DEFAULT_IP_DOMAIN, WELLKNOWN_SERVER_ADMIN_PATH } = require('@abtnode/constant');
|
|
4
4
|
const logger = require('@abtnode/logger')('@abtnode/core:util:get-accessible-external-node-ip');
|
|
5
5
|
const { get: getIp } = require('./ip');
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ const timeout = process.env.NODE_ENV === 'test' ? 500 : 5000;
|
|
|
13
13
|
// check if node dashboard https endpoint return 2xx
|
|
14
14
|
// FIXME: check connected by wellknown endpoint
|
|
15
15
|
const checkConnected = async ({ ip, nodeInfo }) => {
|
|
16
|
-
const { adminPath =
|
|
16
|
+
const { adminPath = WELLKNOWN_SERVER_ADMIN_PATH } = nodeInfo.routing || {};
|
|
17
17
|
const origin = `https://${getNodeDomain(ip)}`;
|
|
18
18
|
const endpoint = joinUrl(origin, adminPath);
|
|
19
19
|
await axios.get(endpoint, { timeout });
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.14-beta-a898bfcb",
|
|
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.
|
|
23
|
-
"@abtnode/auth": "1.16.
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.
|
|
25
|
-
"@abtnode/constant": "1.16.
|
|
26
|
-
"@abtnode/cron": "1.16.
|
|
27
|
-
"@abtnode/logger": "1.16.
|
|
28
|
-
"@abtnode/models": "1.16.
|
|
29
|
-
"@abtnode/queue": "1.16.
|
|
30
|
-
"@abtnode/rbac": "1.16.
|
|
31
|
-
"@abtnode/router-provider": "1.16.
|
|
32
|
-
"@abtnode/static-server": "1.16.
|
|
33
|
-
"@abtnode/timemachine": "1.16.
|
|
34
|
-
"@abtnode/util": "1.16.
|
|
22
|
+
"@abtnode/analytics": "1.16.14-beta-a898bfcb",
|
|
23
|
+
"@abtnode/auth": "1.16.14-beta-a898bfcb",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.14-beta-a898bfcb",
|
|
25
|
+
"@abtnode/constant": "1.16.14-beta-a898bfcb",
|
|
26
|
+
"@abtnode/cron": "1.16.14-beta-a898bfcb",
|
|
27
|
+
"@abtnode/logger": "1.16.14-beta-a898bfcb",
|
|
28
|
+
"@abtnode/models": "1.16.14-beta-a898bfcb",
|
|
29
|
+
"@abtnode/queue": "1.16.14-beta-a898bfcb",
|
|
30
|
+
"@abtnode/rbac": "1.16.14-beta-a898bfcb",
|
|
31
|
+
"@abtnode/router-provider": "1.16.14-beta-a898bfcb",
|
|
32
|
+
"@abtnode/static-server": "1.16.14-beta-a898bfcb",
|
|
33
|
+
"@abtnode/timemachine": "1.16.14-beta-a898bfcb",
|
|
34
|
+
"@abtnode/util": "1.16.14-beta-a898bfcb",
|
|
35
35
|
"@arcblock/did": "1.18.84",
|
|
36
36
|
"@arcblock/did-auth": "1.18.84",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.84",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.84",
|
|
44
44
|
"@arcblock/vc": "1.18.84",
|
|
45
|
-
"@blocklet/constant": "1.16.
|
|
46
|
-
"@blocklet/meta": "1.16.
|
|
47
|
-
"@blocklet/resolver": "1.16.
|
|
48
|
-
"@blocklet/sdk": "1.16.
|
|
49
|
-
"@did-space/client": "^0.2.
|
|
45
|
+
"@blocklet/constant": "1.16.14-beta-a898bfcb",
|
|
46
|
+
"@blocklet/meta": "1.16.14-beta-a898bfcb",
|
|
47
|
+
"@blocklet/resolver": "1.16.14-beta-a898bfcb",
|
|
48
|
+
"@blocklet/sdk": "1.16.14-beta-a898bfcb",
|
|
49
|
+
"@did-space/client": "^0.2.129",
|
|
50
50
|
"@fidm/x509": "^1.2.1",
|
|
51
51
|
"@ocap/mcrypto": "1.18.84",
|
|
52
52
|
"@ocap/util": "1.18.84",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"express": "^4.18.2",
|
|
97
97
|
"jest": "^27.5.1"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "1e6f2ec5199ca28e106a6b02114f2a3f355b3ceb"
|
|
100
100
|
}
|