@abtnode/core 1.16.30-beta-5d9c2c41 → 1.16.30-beta-cd65989e
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/util/get-dynamic-components.js +2 -2
- package/lib/util/store.js +6 -9
- package/package.json +33 -33
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const request = require('./request');
|
|
2
2
|
const { filterDuplicateComponents, parseComponents } = require('./blocklet');
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -6,7 +6,7 @@ const { filterDuplicateComponents, parseComponents } = require('./blocklet');
|
|
|
6
6
|
* @returns {Promise<import('@abtnode/types').TComponentState[]>}
|
|
7
7
|
*/
|
|
8
8
|
async function getDynamicComponents({ url }) {
|
|
9
|
-
const rawMeta = await
|
|
9
|
+
const rawMeta = await request.get(url).then((res) => res.data);
|
|
10
10
|
const { dynamicComponents } = await parseComponents({ meta: rawMeta });
|
|
11
11
|
|
|
12
12
|
const components = filterDuplicateComponents(dynamicComponents);
|
package/lib/util/store.js
CHANGED
|
@@ -49,11 +49,8 @@ const fixAndVerifyMetaFromStore = (meta) => {
|
|
|
49
49
|
// Note: registry should contain the store endpoint
|
|
50
50
|
const getStoreMeta = async (registry) => {
|
|
51
51
|
try {
|
|
52
|
-
const url = withQuery(joinURL(registry, BLOCKLET_STORE_META_PATH), {
|
|
53
|
-
__t__: Date.now(),
|
|
54
|
-
});
|
|
52
|
+
const url = withQuery(joinURL(registry, BLOCKLET_STORE_META_PATH), { t: Date.now() });
|
|
55
53
|
const { data } = await request.get(url);
|
|
56
|
-
|
|
57
54
|
if (!data) {
|
|
58
55
|
return {};
|
|
59
56
|
}
|
|
@@ -78,6 +75,7 @@ const getStoreMeta = async (registry) => {
|
|
|
78
75
|
|
|
79
76
|
return result;
|
|
80
77
|
} catch (err) {
|
|
78
|
+
logger.error('Failed to getStoreMeta', err);
|
|
81
79
|
throw new Error(`Can not get meta info for store [${registry}]: ${err.message}`);
|
|
82
80
|
}
|
|
83
81
|
};
|
|
@@ -88,12 +86,11 @@ async function getStoreUrl(url) {
|
|
|
88
86
|
try {
|
|
89
87
|
const { data: meta } = await request.get(joinURL(origin, '__blocklet__.js?type=json&nocache=1'));
|
|
90
88
|
const component = meta.componentMountPoints?.find((item) => item.did === BLOCKLET_STORE_DID);
|
|
91
|
-
|
|
92
89
|
if (component) {
|
|
93
90
|
mountPoint = component.mountPoint;
|
|
94
91
|
}
|
|
95
|
-
} catch {
|
|
96
|
-
|
|
92
|
+
} catch (err) {
|
|
93
|
+
logger.error('Failed to getStoreUrl', err);
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
return joinURL(origin, mountPoint);
|
|
@@ -115,8 +112,8 @@ async function getStoreInfo(url) {
|
|
|
115
112
|
registryMeta: meta,
|
|
116
113
|
};
|
|
117
114
|
}
|
|
118
|
-
} catch {
|
|
119
|
-
|
|
115
|
+
} catch (err) {
|
|
116
|
+
logger.error('Failed to getStoreInfo', err);
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.30-beta-
|
|
6
|
+
"version": "1.16.30-beta-cd65989e",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,40 +19,40 @@
|
|
|
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.30-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.30-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.30-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.30-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.30-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.30-beta-
|
|
28
|
-
"@abtnode/models": "1.16.30-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.30-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.30-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.30-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.30-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.30-beta-
|
|
34
|
-
"@abtnode/util": "1.16.30-beta-
|
|
35
|
-
"@arcblock/did": "1.18.
|
|
36
|
-
"@arcblock/did-auth": "1.18.
|
|
37
|
-
"@arcblock/did-ext": "^1.18.
|
|
22
|
+
"@abtnode/analytics": "1.16.30-beta-cd65989e",
|
|
23
|
+
"@abtnode/auth": "1.16.30-beta-cd65989e",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.30-beta-cd65989e",
|
|
25
|
+
"@abtnode/constant": "1.16.30-beta-cd65989e",
|
|
26
|
+
"@abtnode/cron": "1.16.30-beta-cd65989e",
|
|
27
|
+
"@abtnode/logger": "1.16.30-beta-cd65989e",
|
|
28
|
+
"@abtnode/models": "1.16.30-beta-cd65989e",
|
|
29
|
+
"@abtnode/queue": "1.16.30-beta-cd65989e",
|
|
30
|
+
"@abtnode/rbac": "1.16.30-beta-cd65989e",
|
|
31
|
+
"@abtnode/router-provider": "1.16.30-beta-cd65989e",
|
|
32
|
+
"@abtnode/static-server": "1.16.30-beta-cd65989e",
|
|
33
|
+
"@abtnode/timemachine": "1.16.30-beta-cd65989e",
|
|
34
|
+
"@abtnode/util": "1.16.30-beta-cd65989e",
|
|
35
|
+
"@arcblock/did": "1.18.131",
|
|
36
|
+
"@arcblock/did-auth": "1.18.131",
|
|
37
|
+
"@arcblock/did-ext": "^1.18.131",
|
|
38
38
|
"@arcblock/did-motif": "^1.1.13",
|
|
39
|
-
"@arcblock/did-util": "1.18.
|
|
40
|
-
"@arcblock/event-hub": "1.18.
|
|
41
|
-
"@arcblock/jwt": "^1.18.
|
|
39
|
+
"@arcblock/did-util": "1.18.131",
|
|
40
|
+
"@arcblock/event-hub": "1.18.131",
|
|
41
|
+
"@arcblock/jwt": "^1.18.131",
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
|
-
"@arcblock/validator": "^1.18.
|
|
44
|
-
"@arcblock/vc": "1.18.
|
|
45
|
-
"@blocklet/constant": "1.16.30-beta-
|
|
46
|
-
"@blocklet/env": "1.16.30-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.30-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.30-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.30-beta-
|
|
50
|
-
"@blocklet/store": "1.16.30-beta-
|
|
51
|
-
"@did-space/client": "^0.5.
|
|
43
|
+
"@arcblock/validator": "^1.18.131",
|
|
44
|
+
"@arcblock/vc": "1.18.131",
|
|
45
|
+
"@blocklet/constant": "1.16.30-beta-cd65989e",
|
|
46
|
+
"@blocklet/env": "1.16.30-beta-cd65989e",
|
|
47
|
+
"@blocklet/meta": "1.16.30-beta-cd65989e",
|
|
48
|
+
"@blocklet/resolver": "1.16.30-beta-cd65989e",
|
|
49
|
+
"@blocklet/sdk": "1.16.30-beta-cd65989e",
|
|
50
|
+
"@blocklet/store": "1.16.30-beta-cd65989e",
|
|
51
|
+
"@did-space/client": "^0.5.27",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
|
-
"@ocap/mcrypto": "1.18.
|
|
54
|
-
"@ocap/util": "1.18.
|
|
55
|
-
"@ocap/wallet": "1.18.
|
|
53
|
+
"@ocap/mcrypto": "1.18.131",
|
|
54
|
+
"@ocap/util": "1.18.131",
|
|
55
|
+
"@ocap/wallet": "1.18.131",
|
|
56
56
|
"@slack/webhook": "^5.0.4",
|
|
57
57
|
"archiver": "^7.0.1",
|
|
58
58
|
"axios": "^1.7.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"unzipper": "^0.10.11"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "8646768b8ac83cdb8c213ab17fe8030f3d5dc6fc"
|
|
107
107
|
}
|