@workclaw/cli 1.0.326 → 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,8 +215,14 @@ 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
|
-
|
|
216
|
-
|
|
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)));
|
|
221
|
+
result[key] = [...targetValue, ...newItems];
|
|
222
|
+
} else {
|
|
223
|
+
const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
|
|
224
|
+
result[key] = mergedArray;
|
|
225
|
+
}
|
|
217
226
|
} else if (sourceValue !== void 0 && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && typeof targetValue === "object" && targetValue !== null && !Array.isArray(targetValue)) {
|
|
218
227
|
result[key] = deepMerge$1(
|
|
219
228
|
targetValue,
|
|
@@ -4911,6 +4920,9 @@ function execAsync(command, options) {
|
|
|
4911
4920
|
});
|
|
4912
4921
|
});
|
|
4913
4922
|
}
|
|
4923
|
+
function getObjectHash(obj) {
|
|
4924
|
+
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
4925
|
+
}
|
|
4914
4926
|
function deepMerge(target, source) {
|
|
4915
4927
|
const result = { ...target };
|
|
4916
4928
|
for (const key in source) {
|
|
@@ -4918,8 +4930,14 @@ function deepMerge(target, source) {
|
|
|
4918
4930
|
const sourceValue = source[key];
|
|
4919
4931
|
const targetValue = target[key];
|
|
4920
4932
|
if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
|
|
4921
|
-
|
|
4922
|
-
|
|
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)));
|
|
4936
|
+
result[key] = [...targetValue, ...newItems];
|
|
4937
|
+
} else {
|
|
4938
|
+
const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
|
|
4939
|
+
result[key] = mergedArray;
|
|
4940
|
+
}
|
|
4923
4941
|
} else if (sourceValue !== void 0 && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && typeof targetValue === "object" && targetValue !== null && !Array.isArray(targetValue)) {
|
|
4924
4942
|
result[key] = deepMerge(
|
|
4925
4943
|
targetValue,
|
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
|
+
}
|