@workclaw/cli 1.0.327 → 1.0.329
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/box/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/box/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,UAAU,CAAA;AA+EhE,qBAAa,YAAY;IAIX,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEX,MAAM,EAAE,kBAAkB;IAI9C,cAAc,IAAI,IAAI;IAyBtB,OAAO,CAAC,QAAQ;IAoChB,OAAO,CAAC,aAAa;IAMrB,aAAa,IAAI,MAAM;IAIvB,OAAO,CAAC,cAAc;IAOhB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YA0BhB,eAAe;YA0Bf,iBAAiB;YAoHjB,cAAc;CAoR7B"}
|
|
@@ -205,6 +205,9 @@ function execAsync$1(command, options) {
|
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
+
function getObjectHash$1(obj) {
|
|
209
|
+
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
210
|
+
}
|
|
208
211
|
function deepMerge$1(target, source) {
|
|
209
212
|
const result = { ...target };
|
|
210
213
|
for (const key in source) {
|
|
@@ -212,9 +215,9 @@ function deepMerge$1(target, source) {
|
|
|
212
215
|
const sourceValue = source[key];
|
|
213
216
|
const targetValue = target[key];
|
|
214
217
|
if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
|
|
215
|
-
if (
|
|
216
|
-
const
|
|
217
|
-
const newItems = sourceValue.filter((item) => !
|
|
218
|
+
if (targetValue.length > 0 && typeof targetValue[0] === "object" && targetValue[0] !== null) {
|
|
219
|
+
const existingHashes = new Set(targetValue.map((item) => getObjectHash$1(item)));
|
|
220
|
+
const newItems = sourceValue.filter((item) => !existingHashes.has(getObjectHash$1(item)));
|
|
218
221
|
result[key] = [...targetValue, ...newItems];
|
|
219
222
|
} else {
|
|
220
223
|
const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
|
|
@@ -4917,6 +4920,9 @@ function execAsync(command, options) {
|
|
|
4917
4920
|
});
|
|
4918
4921
|
});
|
|
4919
4922
|
}
|
|
4923
|
+
function getObjectHash(obj) {
|
|
4924
|
+
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
4925
|
+
}
|
|
4920
4926
|
function deepMerge(target, source) {
|
|
4921
4927
|
const result = { ...target };
|
|
4922
4928
|
for (const key in source) {
|
|
@@ -4924,9 +4930,9 @@ function deepMerge(target, source) {
|
|
|
4924
4930
|
const sourceValue = source[key];
|
|
4925
4931
|
const targetValue = target[key];
|
|
4926
4932
|
if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
|
|
4927
|
-
if (
|
|
4928
|
-
const
|
|
4929
|
-
const newItems = sourceValue.filter((item) => !
|
|
4933
|
+
if (targetValue.length > 0 && typeof targetValue[0] === "object" && targetValue[0] !== null) {
|
|
4934
|
+
const existingHashes = new Set(targetValue.map((item) => getObjectHash(item)));
|
|
4935
|
+
const newItems = sourceValue.filter((item) => !existingHashes.has(getObjectHash(item)));
|
|
4930
4936
|
result[key] = [...targetValue, ...newItems];
|
|
4931
4937
|
} else {
|
|
4932
4938
|
const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/local/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,oBAAoB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/local/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,oBAAoB,EAAE,MAAM,UAAU,CAAA;AA6F/E;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,KAAK,CAAa;IAE1B;;OAEG;gBACS,MAAM,EAAE,oBAAoB;IAOxC;;OAEG;IACH,cAAc,IAAI,IAAI;IAUtB;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE9B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;YACW,OAAO;IAoBrB;;OAEG;YACW,kBAAkB;IAchC;;OAEG;YACW,eAAe;IAmB7B;;OAEG;YACW,iBAAiB;IAoH/B;;OAEG;YACW,cAAc;CAmN7B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workclaw/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.329",
|
|
5
5
|
"description": "WorkClaw CLI 工具 - 用于初始化和配置 WorkClaw 插件",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
"tar": "^6.2.1",
|
|
41
41
|
"zod": "^4.3.6"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|