@blocklet/resolver 1.16.24 → 1.16.25-beta-fe54d1bc
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/index.js +3 -2
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -172,7 +172,8 @@ const filterRequiredComponents = (component, children) => {
|
|
|
172
172
|
};
|
|
173
173
|
exports.filterRequiredComponents = filterRequiredComponents;
|
|
174
174
|
const dynamicComponentsCache = new lru_cache_1.default({ max: 300, maxAge: 60 * 60 * 1000 * 3 }); // 3 hours
|
|
175
|
-
const parseOptionalComponents = async (
|
|
175
|
+
const parseOptionalComponents = async (blocklet, logger = console) => {
|
|
176
|
+
const { children } = blocklet || {};
|
|
176
177
|
if (!children || !children.length) {
|
|
177
178
|
return [];
|
|
178
179
|
}
|
|
@@ -211,7 +212,7 @@ const parseOptionalComponents = async (children, logger = console) => {
|
|
|
211
212
|
continue;
|
|
212
213
|
}
|
|
213
214
|
try {
|
|
214
|
-
let dynamicComponents = dynamicComponentsCache.get(child.meta.did);
|
|
215
|
+
let dynamicComponents = blocklet.meta?.did === child.meta.did ? blocklet : dynamicComponentsCache.get(child.meta.did);
|
|
215
216
|
if (!dynamicComponents) {
|
|
216
217
|
const components = await (0, exports.parseComponents)(child);
|
|
217
218
|
dynamicComponents = components.dynamicComponents;
|
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.25-beta-fe54d1bc",
|
|
7
7
|
"description": "Blocklet meta resolver",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"files": [
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@arcblock/did": "^1.18.
|
|
25
|
-
"@blocklet/constant": "1.16.
|
|
26
|
-
"@blocklet/meta": "1.16.
|
|
24
|
+
"@arcblock/did": "^1.18.113",
|
|
25
|
+
"@blocklet/constant": "1.16.25-beta-fe54d1bc",
|
|
26
|
+
"@blocklet/meta": "1.16.25-beta-fe54d1bc",
|
|
27
27
|
"lru-cache": "^6.0.0",
|
|
28
28
|
"semver": "^7.3.8"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@abtnode/types": "1.16.
|
|
31
|
+
"@abtnode/types": "1.16.25-beta-fe54d1bc",
|
|
32
32
|
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
33
33
|
"@types/jest": "^29.5.11",
|
|
34
34
|
"@types/node": "^18.11.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"ts-jest": "^29.1.1",
|
|
41
41
|
"typescript": "^5.0.4"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e9411b6ee3c482554c76fe91796560abeb0e56ad"
|
|
44
44
|
}
|