@blocklet/resolver 1.16.54-beta-20251017-133309-7d40faa6 → 1.16.54-beta-20251021-070951-25e3083c
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 +5 -5
- package/package.json +9 -9
package/index.js
CHANGED
|
@@ -14,15 +14,15 @@ const util_1 = require("@blocklet/meta/lib/util");
|
|
|
14
14
|
const schema_1 = require("@blocklet/meta/lib/schema");
|
|
15
15
|
const validate_1 = require("@blocklet/meta/lib/validate");
|
|
16
16
|
const util_meta_1 = require("@blocklet/meta/lib/util-meta");
|
|
17
|
-
const did_2 =
|
|
17
|
+
const did_2 = require("@blocklet/meta/lib/did");
|
|
18
18
|
const engine_1 = require("@blocklet/meta/lib/engine");
|
|
19
|
-
const url_path_friendly_1 =
|
|
19
|
+
const url_path_friendly_1 = require("@blocklet/meta/lib/url-path-friendly");
|
|
20
20
|
const ufo_1 = require("ufo");
|
|
21
21
|
const isDidMatchName = (did, name) => {
|
|
22
22
|
if ((0, did_1.isValid)(did) && name === did) {
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
|
-
return (0, did_2.
|
|
25
|
+
return (0, did_2.toBlockletDid)(name) === did;
|
|
26
26
|
};
|
|
27
27
|
exports.isDidMatchName = isDidMatchName;
|
|
28
28
|
const filterDuplicateComponents = (components = [], currents = []) => {
|
|
@@ -68,7 +68,7 @@ const ensureMeta = (meta, { name, did } = {}) => {
|
|
|
68
68
|
}
|
|
69
69
|
if (name) {
|
|
70
70
|
newMeta.name = name;
|
|
71
|
-
newMeta.did = did || (0, did_2.
|
|
71
|
+
newMeta.did = did || (0, did_2.toBlockletDid)(name);
|
|
72
72
|
}
|
|
73
73
|
return newMeta;
|
|
74
74
|
};
|
|
@@ -128,7 +128,7 @@ const parseComponents = async (component, context = {}, logger = console) => {
|
|
|
128
128
|
if (config.description) {
|
|
129
129
|
meta.description = await schema_1.descriptionSchema.validateAsync(config.description);
|
|
130
130
|
}
|
|
131
|
-
const mountPoint = config.mountPoint || `/${(0, url_path_friendly_1.
|
|
131
|
+
const mountPoint = config.mountPoint || `/${(0, url_path_friendly_1.urlPathFriendly)(meta.title || meta.name || meta.did)}`.toLowerCase();
|
|
132
132
|
const child = {
|
|
133
133
|
mountPoint,
|
|
134
134
|
meta,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.54-beta-
|
|
6
|
+
"version": "1.16.54-beta-20251021-070951-25e3083c",
|
|
7
7
|
"description": "Blocklet meta resolver",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"files": [
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"lint": "eslint tests index.ts",
|
|
14
14
|
"lint:fix": "npm run lint -- --fix",
|
|
15
|
-
"test": "
|
|
16
|
-
"coverage": "
|
|
15
|
+
"test": "bun test",
|
|
16
|
+
"coverage": "bun test --coverage",
|
|
17
17
|
"clean": "rm -f index.d.ts index.js",
|
|
18
18
|
"build:blocklet-resolver": "npm run build",
|
|
19
19
|
"build": "npm run clean && tsc"
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@arcblock/did": "1.
|
|
25
|
-
"@blocklet/constant": "1.16.54-beta-
|
|
26
|
-
"@blocklet/meta": "1.16.54-beta-
|
|
24
|
+
"@arcblock/did": "^1.26.2",
|
|
25
|
+
"@blocklet/constant": "1.16.54-beta-20251021-070951-25e3083c",
|
|
26
|
+
"@blocklet/meta": "1.16.54-beta-20251021-070951-25e3083c",
|
|
27
27
|
"lodash": "^4.17.21",
|
|
28
28
|
"lru-cache": "^11.0.2",
|
|
29
29
|
"semver": "^7.6.3",
|
|
30
30
|
"ufo": "^1.5.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@abtnode/db-cache": "1.16.54-beta-
|
|
34
|
-
"@abtnode/types": "1.16.54-beta-
|
|
33
|
+
"@abtnode/db-cache": "1.16.54-beta-20251021-070951-25e3083c",
|
|
34
|
+
"@abtnode/types": "1.16.54-beta-20251021-070951-25e3083c",
|
|
35
35
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
36
36
|
"@types/jest": "^29.5.13",
|
|
37
37
|
"@types/node": "^22.7.5",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"ts-jest": "^29.2.5",
|
|
44
44
|
"typescript": "^5.6.3"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "db517e9013dbad744e38883f56e4eba1fa1615c1"
|
|
47
47
|
}
|