@workclaw/cli 1.0.330 → 1.0.331
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/dist/box/index.d.ts.map +1 -1
- package/dist/box/installer/installer.d.ts.map +1 -1
- package/dist/box/src/box.d.ts.map +1 -1
- package/dist/box/types/index.d.ts +6 -0
- package/dist/box/types/index.d.ts.map +1 -1
- package/dist/{index-DV-DJElg.js → index-b2rw2uLv.js} +46 -9
- package/dist/index.js +1 -1
- package/dist/local/index.d.ts.map +1 -1
- package/dist/local/installer/installer.d.ts.map +1 -1
- package/dist/local/src/local.d.ts.map +1 -1
- package/dist/local/types/index.d.ts +6 -0
- package/dist/local/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/box/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAcvD"}
|
|
@@ -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;AAiFhE,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;
|
|
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;AAiFhE,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;CA6R7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/box/src/box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAU1C;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/box/src/box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAU1C;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+KzE"}
|
|
@@ -10,6 +10,7 @@ export interface BoxOptions {
|
|
|
10
10
|
openclawPath?: string;
|
|
11
11
|
debug?: boolean;
|
|
12
12
|
model?: ModelType;
|
|
13
|
+
mergeMode?: 'merge' | 'replace' | 'reset-keys';
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* BoxInstaller 配置验证 schema
|
|
@@ -33,6 +34,11 @@ export declare const BoxInstallerConfigSchema: z.ZodObject<{
|
|
|
33
34
|
"gpt-5-chat": "gpt-5-chat";
|
|
34
35
|
"gpt-5-mini": "gpt-5-mini";
|
|
35
36
|
}>>>;
|
|
37
|
+
mergeMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
merge: "merge";
|
|
39
|
+
replace: "replace";
|
|
40
|
+
"reset-keys": "reset-keys";
|
|
41
|
+
}>>>;
|
|
36
42
|
}, z.core.$strip>;
|
|
37
43
|
export type BoxInstallerConfig = z.infer<typeof BoxInstallerConfigSchema>;
|
|
38
44
|
export interface InstallResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -480,6 +480,22 @@ class BoxInstaller {
|
|
|
480
480
|
} catch {
|
|
481
481
|
debug.log("[更新配置] 无原有配置");
|
|
482
482
|
}
|
|
483
|
+
const mergeMode = this.config.mergeMode || "merge";
|
|
484
|
+
const resetKeys = ["models", "agents", "bindings", "channels", "plugins"];
|
|
485
|
+
if (mergeMode === "replace") {
|
|
486
|
+
debug.log("[更新配置] 合并模式: replace(完全重置,忽略原有配置)");
|
|
487
|
+
originalConfig = {};
|
|
488
|
+
} else if (mergeMode === "reset-keys") {
|
|
489
|
+
debug.log("[更新配置] 合并模式: reset-keys(清除关键字段后合并)");
|
|
490
|
+
for (const key of resetKeys) {
|
|
491
|
+
if (originalConfig[key]) {
|
|
492
|
+
delete originalConfig[key];
|
|
493
|
+
debug.log(`[更新配置] 清除原有 ${key} 配置`);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
} else {
|
|
497
|
+
debug.log("[更新配置] 合并模式: merge(完整保留原有配置后合并)");
|
|
498
|
+
}
|
|
483
499
|
const config = getConfig(this.config.env || "test", this.config.customIp);
|
|
484
500
|
const modelInfo = MODEL_ID_MAP[this.config.model];
|
|
485
501
|
const newConfig = {
|
|
@@ -704,7 +720,7 @@ class BoxInstaller {
|
|
|
704
720
|
};
|
|
705
721
|
const finalConfig = deepMerge$1(originalConfig, newConfig);
|
|
706
722
|
this.updateSpinner("正在写入配置...");
|
|
707
|
-
debug.log("[更新配置]
|
|
723
|
+
debug.log("[更新配置] 合并配置并写入文件(保留其他初始化数据)...");
|
|
708
724
|
await fs.writeFile(paths.config, JSON.stringify(finalConfig, null, 2), "utf-8");
|
|
709
725
|
this.prefixText += chalk.green(` ✓ 配置文件更新成功
|
|
710
726
|
`);
|
|
@@ -822,7 +838,8 @@ async function createBoxCommand(options) {
|
|
|
822
838
|
} else if (env === "custom" && customIp) {
|
|
823
839
|
debug.log(`[盒子安装] 使用命令行参数: customIp=${customIp}`);
|
|
824
840
|
}
|
|
825
|
-
|
|
841
|
+
const mergeMode = options.mergeMode || "merge";
|
|
842
|
+
debug.log(`[盒子安装] 最终参数: env=${env}, customIp=${customIp}, openclawPath=${options.openclawPath}, model=${model}, mergeMode=${mergeMode}`);
|
|
826
843
|
debug.log("[盒子安装] 创建 BoxInstaller 实例...");
|
|
827
844
|
const installer = new BoxInstaller({
|
|
828
845
|
appKey,
|
|
@@ -832,7 +849,8 @@ async function createBoxCommand(options) {
|
|
|
832
849
|
wsUrl: options.wsUrl,
|
|
833
850
|
pluginVersion: options.pluginVersion,
|
|
834
851
|
openclawPath: options.openclawPath,
|
|
835
|
-
model
|
|
852
|
+
model,
|
|
853
|
+
mergeMode
|
|
836
854
|
});
|
|
837
855
|
debug.log("[盒子安装] 开始安装...");
|
|
838
856
|
await installer.install();
|
|
@@ -867,7 +885,7 @@ async function createBoxCommand(options) {
|
|
|
867
885
|
}
|
|
868
886
|
}
|
|
869
887
|
function registerCommands$1(program2) {
|
|
870
|
-
program2.command("box").description("盒子设备安装(无需登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--app-key <appKey>", "App Key").option("--app-secret <appSecret>", "App Secret").option("--customIp <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--model <model>", `选择模型 (${SUPPORTED_MODELS.join("/")}),默认 ${DEFAULT_MODEL}`).option("--debug", "开启调试日志").action(createBoxCommand);
|
|
888
|
+
program2.command("box").description("盒子设备安装(无需登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--app-key <appKey>", "App Key").option("--app-secret <appSecret>", "App Secret").option("--customIp <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--model <model>", `选择模型 (${SUPPORTED_MODELS.join("/")}),默认 ${DEFAULT_MODEL}`).option("--merge-mode <mode>", "配置合并模式 (merge: 保留旧配置合并 / replace: 完全重置 / reset-keys: 清除关键字段后合并),默认 reset-keys").option("--debug", "开启调试日志").action(createBoxCommand);
|
|
871
889
|
}
|
|
872
890
|
function createHttpClient(baseURL) {
|
|
873
891
|
return axios.create({
|
|
@@ -998,7 +1016,8 @@ const LocalInstallerConfigSchema = z$1.object({
|
|
|
998
1016
|
phone: phoneSchema,
|
|
999
1017
|
userPass: userPassSchema,
|
|
1000
1018
|
pluginVersion: pluginVersionSchema,
|
|
1001
|
-
openclawPath: openclawPathSchema.optional()
|
|
1019
|
+
openclawPath: openclawPathSchema.optional(),
|
|
1020
|
+
mergeMode: z$1.enum(["merge", "replace", "reset-keys"]).optional().default("merge")
|
|
1002
1021
|
}).refine(
|
|
1003
1022
|
(data) => {
|
|
1004
1023
|
if (data.env === "custom") {
|
|
@@ -5263,6 +5282,22 @@ class LocalInstaller {
|
|
|
5263
5282
|
} catch {
|
|
5264
5283
|
debug.log("[更新配置] 无原有配置");
|
|
5265
5284
|
}
|
|
5285
|
+
const mergeMode = this.config.mergeMode || "merge";
|
|
5286
|
+
const resetKeys = ["models", "agents", "bindings", "channels", "plugins"];
|
|
5287
|
+
if (mergeMode === "replace") {
|
|
5288
|
+
debug.log("[更新配置] 合并模式: replace(完全重置,忽略原有配置)");
|
|
5289
|
+
originalConfig = {};
|
|
5290
|
+
} else if (mergeMode === "reset-keys") {
|
|
5291
|
+
debug.log("[更新配置] 合并模式: reset-keys(清除关键字段后合并)");
|
|
5292
|
+
for (const key of resetKeys) {
|
|
5293
|
+
if (originalConfig[key]) {
|
|
5294
|
+
delete originalConfig[key];
|
|
5295
|
+
debug.log(`[更新配置] 清除原有 ${key} 配置`);
|
|
5296
|
+
}
|
|
5297
|
+
}
|
|
5298
|
+
} else {
|
|
5299
|
+
debug.log("[更新配置] 合并模式: merge(完整保留原有配置后合并)");
|
|
5300
|
+
}
|
|
5266
5301
|
const config = this.envConfig;
|
|
5267
5302
|
const newConfig = {
|
|
5268
5303
|
// diagnostics: 诊断配置
|
|
@@ -5421,7 +5456,7 @@ class LocalInstaller {
|
|
|
5421
5456
|
const finalConfig = deepMerge(originalConfig, newConfig);
|
|
5422
5457
|
this.spinner.prefixText = this.prefixText;
|
|
5423
5458
|
this.spinner.text = chalk.cyan("正在写入配置...");
|
|
5424
|
-
debug.log("[更新配置]
|
|
5459
|
+
debug.log("[更新配置] 合并配置并写入文件(保留其他初始化数据)...");
|
|
5425
5460
|
await fs.writeFile(paths.config, JSON.stringify(finalConfig, null, 2), "utf-8");
|
|
5426
5461
|
this.prefixText += chalk.green(` ✓ 配置更新完成
|
|
5427
5462
|
`);
|
|
@@ -5524,7 +5559,8 @@ async function createLocalCommand(options) {
|
|
|
5524
5559
|
} else if (env === "custom" && customIp) {
|
|
5525
5560
|
debug.log(`[初始化] 使用命令行参数: customIp=${customIp}`);
|
|
5526
5561
|
}
|
|
5527
|
-
|
|
5562
|
+
const mergeMode = options.mergeMode || "merge";
|
|
5563
|
+
debug.log(`[初始化] 最终参数: env=${env}, phone=${phone}, customIp=${customIp}, pluginVersion=${options.pluginVersion}, openclawPath=${options.openclawPath}, mergeMode=${mergeMode}`);
|
|
5528
5564
|
debug.log("[初始化] 创建 LocalInstaller 实例...");
|
|
5529
5565
|
const installer = new LocalInstaller({
|
|
5530
5566
|
phone,
|
|
@@ -5533,7 +5569,8 @@ async function createLocalCommand(options) {
|
|
|
5533
5569
|
customIp,
|
|
5534
5570
|
wsUrl: options.wsUrl,
|
|
5535
5571
|
pluginVersion: options.pluginVersion,
|
|
5536
|
-
openclawPath: options.openclawPath
|
|
5572
|
+
openclawPath: options.openclawPath,
|
|
5573
|
+
mergeMode
|
|
5537
5574
|
});
|
|
5538
5575
|
debug.log("[初始化] 开始安装...");
|
|
5539
5576
|
await installer.install();
|
|
@@ -5573,7 +5610,7 @@ ${chalk.cyan("Token: ")}${token}`);
|
|
|
5573
5610
|
}
|
|
5574
5611
|
}
|
|
5575
5612
|
function registerCommands(program2) {
|
|
5576
|
-
program2.command("local").description("本地账户安装(需要登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--phone <phone>", "手机号码").option("--user-pass <userPass>", "用户密码").option("--custom-ip <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--debug", "开启调试日志").action(createLocalCommand);
|
|
5613
|
+
program2.command("local").description("本地账户安装(需要登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--phone <phone>", "手机号码").option("--user-pass <userPass>", "用户密码").option("--custom-ip <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--merge-mode <mode>", "配置合并模式 (merge: 保留旧配置合并 / replace: 完全重置 / reset-keys: 清除关键字段后合并),默认 reset-keys").option("--debug", "开启调试日志").action(createLocalCommand);
|
|
5577
5614
|
}
|
|
5578
5615
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
5579
5616
|
const __dirname$1 = dirname(__filename$1);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAavD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/local/installer/installer.ts"],"names":[],"mappings":"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;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;CA+N7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/local/src/local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAQ5C;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/local/src/local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAQ5C;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiK7E"}
|
|
@@ -9,6 +9,7 @@ export interface LocalOptions {
|
|
|
9
9
|
openclawPath?: string;
|
|
10
10
|
debug?: boolean;
|
|
11
11
|
printToken?: boolean;
|
|
12
|
+
mergeMode?: 'merge' | 'replace' | 'reset-keys';
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* LocalInstaller 配置验证 schema
|
|
@@ -26,6 +27,11 @@ export declare const LocalInstallerConfigSchema: z.ZodObject<{
|
|
|
26
27
|
userPass: z.ZodString;
|
|
27
28
|
pluginVersion: z.ZodOptional<z.ZodString>;
|
|
28
29
|
openclawPath: z.ZodOptional<z.ZodIntersection<z.ZodString, z.ZodString>>;
|
|
30
|
+
mergeMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
merge: "merge";
|
|
32
|
+
replace: "replace";
|
|
33
|
+
"reset-keys": "reset-keys";
|
|
34
|
+
}>>>;
|
|
29
35
|
}, z.core.$strip>;
|
|
30
36
|
export type LocalInstallerConfig = z.infer<typeof LocalInstallerConfigSchema>;
|
|
31
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/local/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/local/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAoBtC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAA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