@blocklet/meta 1.16.33-beta-20241101-112845-28d6ce4b → 1.16.33-beta-20241105-141729-e4608175
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.
|
@@ -22,7 +22,9 @@ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
|
22
22
|
const ufo_1 = require("ufo");
|
|
23
23
|
const path_1 = __importDefault(require("path"));
|
|
24
24
|
const is_absolute_url_1 = __importDefault(require("is-absolute-url"));
|
|
25
|
-
const
|
|
25
|
+
const isObject_1 = __importDefault(require("lodash/isObject"));
|
|
26
|
+
const isString_1 = __importDefault(require("lodash/isString"));
|
|
27
|
+
const partition_1 = __importDefault(require("lodash/partition"));
|
|
26
28
|
const engine_1 = require("./engine");
|
|
27
29
|
const url_path_friendly_1 = require("./url-path-friendly");
|
|
28
30
|
Object.defineProperty(exports, "checkLink", { enumerable: true, get: function () { return url_path_friendly_1.checkLink; } });
|
|
@@ -107,25 +109,25 @@ function smartJoinLink(_parentLink, _childLink, { strict = true, } = {}) {
|
|
|
107
109
|
parentLink = parentLink || '/';
|
|
108
110
|
childLink = childLink || '/';
|
|
109
111
|
}
|
|
110
|
-
if ((0,
|
|
112
|
+
if ((0, isObject_1.default)(parentLink) && (0, isString_1.default)(childLink) && (0, url_path_friendly_1.checkLink)(childLink)) {
|
|
111
113
|
return Object.keys(parentLink).reduce((res, key) => {
|
|
112
114
|
res[key] = optionalJoin(parentLink[key], childLink);
|
|
113
115
|
return res;
|
|
114
116
|
}, {});
|
|
115
117
|
}
|
|
116
|
-
if ((0,
|
|
118
|
+
if ((0, isString_1.default)(parentLink) && (0, url_path_friendly_1.checkLink)(parentLink) && (0, isObject_1.default)(childLink)) {
|
|
117
119
|
return Object.keys(childLink).reduce((res, key) => {
|
|
118
120
|
res[key] = optionalJoin(parentLink, childLink[key]);
|
|
119
121
|
return res;
|
|
120
122
|
}, {});
|
|
121
123
|
}
|
|
122
|
-
if ((0,
|
|
124
|
+
if ((0, isString_1.default)(parentLink) && (0, isString_1.default)(childLink)) {
|
|
123
125
|
if ((0, url_path_friendly_1.checkLink)(parentLink) || (0, url_path_friendly_1.checkLink)(childLink)) {
|
|
124
126
|
return optionalJoin(parentLink, childLink);
|
|
125
127
|
}
|
|
126
128
|
return childLink;
|
|
127
129
|
}
|
|
128
|
-
if ((0,
|
|
130
|
+
if ((0, isObject_1.default)(parentLink) && (0, isObject_1.default)(childLink)) {
|
|
129
131
|
const keys = [...new Set([...Object.keys(parentLink), ...Object.keys(childLink)])];
|
|
130
132
|
return keys.reduce((res, key) => {
|
|
131
133
|
res[key] = optionalJoin(parentLink[key], childLink[key]);
|
|
@@ -490,13 +492,13 @@ function cleanOrphanNavigation(list) {
|
|
|
490
492
|
});
|
|
491
493
|
}
|
|
492
494
|
const sortRootNavigation = (navigation) => {
|
|
493
|
-
const [root, other] = (0,
|
|
495
|
+
const [root, other] = (0, partition_1.default)(navigation, (x) => x.id === '/team');
|
|
494
496
|
return [...root, ...other];
|
|
495
497
|
};
|
|
496
498
|
exports.sortRootNavigation = sortRootNavigation;
|
|
497
499
|
// FIXME: Pillar, 这个函数是一个过渡方案, 用来清理 navigation 中的历史数据, 之后可以删除
|
|
498
500
|
const cleanOldNavigationHistory = (navigation) => {
|
|
499
|
-
const [, other] = (0,
|
|
501
|
+
const [, other] = (0, partition_1.default)(navigation, (x) => {
|
|
500
502
|
const title = typeof x.title === 'string' ? x.title : x.title?.en;
|
|
501
503
|
// 这里找不到多余的可以用来判断的数据, 只好用 title 来判断
|
|
502
504
|
return (x.id === '/team' && title === 'Access') || (x.id === '/dashboard' && title === 'Blocklet');
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.33-beta-
|
|
6
|
+
"version": "1.16.33-beta-20241105-141729-e4608175",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@abtnode/constant": "1.16.33-beta-
|
|
29
|
-
"@arcblock/did": "1.18.
|
|
30
|
-
"@arcblock/did-ext": "1.18.
|
|
31
|
-
"@arcblock/did-util": "1.18.
|
|
32
|
-
"@arcblock/jwt": "1.18.
|
|
33
|
-
"@blocklet/constant": "1.16.33-beta-
|
|
34
|
-
"@ocap/asset": "1.18.
|
|
35
|
-
"@ocap/mcrypto": "1.18.
|
|
36
|
-
"@ocap/types": "1.18.
|
|
37
|
-
"@ocap/util": "1.18.
|
|
38
|
-
"@ocap/wallet": "1.18.
|
|
28
|
+
"@abtnode/constant": "1.16.33-beta-20241105-141729-e4608175",
|
|
29
|
+
"@arcblock/did": "1.18.138",
|
|
30
|
+
"@arcblock/did-ext": "1.18.138",
|
|
31
|
+
"@arcblock/did-util": "1.18.138",
|
|
32
|
+
"@arcblock/jwt": "1.18.138",
|
|
33
|
+
"@blocklet/constant": "1.16.33-beta-20241105-141729-e4608175",
|
|
34
|
+
"@ocap/asset": "1.18.138",
|
|
35
|
+
"@ocap/mcrypto": "1.18.138",
|
|
36
|
+
"@ocap/types": "1.18.138",
|
|
37
|
+
"@ocap/util": "1.18.138",
|
|
38
|
+
"@ocap/wallet": "1.18.138",
|
|
39
39
|
"ajv": "^8.11.0",
|
|
40
40
|
"axios": "^1.7.5",
|
|
41
41
|
"cjk-length": "^1.0.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.6.3"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "1adf7b559a8725c2a33536da6936244b53d4cbff"
|
|
83
83
|
}
|