zcf 2.5.1 → 2.5.2
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/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { h as SUPPORTED_LANGS, I as I18N, L as LANG_LABELS, G as updateZcfConfig, Z as ZCF_CONFIG_FILE, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, H as readZcfConfig, J as resolveAiOutputLanguage, v as applyAiLanguageDirective, K as configureAiPersonality, u as updateDefaultModel, N as isWindows, x as readMcpConfig, E as fixWindowsMcpConfig, y as writeMcpConfig, O as selectMcpServices, z as backupMcpConfig, M as MCP_SERVICES, D as buildMcpServerConfig, B as mergeMcpServers, t as getExistingApiConfig, P as formatApiKeyDisplay, Q as modifyApiConfigPartially, R as validateApiKey, q as configureApi, T as displayBanner, U as selectScriptLanguage,
|
|
4
|
+
import { h as SUPPORTED_LANGS, I as I18N, L as LANG_LABELS, G as updateZcfConfig, Z as ZCF_CONFIG_FILE, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, H as readZcfConfig, J as resolveAiOutputLanguage, v as applyAiLanguageDirective, K as configureAiPersonality, u as updateDefaultModel, N as isWindows, x as readMcpConfig, E as fixWindowsMcpConfig, y as writeMcpConfig, O as selectMcpServices, z as backupMcpConfig, M as MCP_SERVICES, D as buildMcpServerConfig, B as mergeMcpServers, t as getExistingApiConfig, P as formatApiKeyDisplay, Q as modifyApiConfigPartially, R as validateApiKey, q as configureApi, T as displayBanner, U as selectScriptLanguage, V as updatePromptOnly, W as version, X as handleExitPromptError, Y as handleGeneralError, _ as displayBannerWithInfo, i as init } from './shared/zcf.CEsHvLRM.mjs';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
6
|
import { existsSync, unlinkSync } from 'node:fs';
|
|
7
7
|
import 'pathe';
|
|
@@ -302,10 +302,6 @@ async function update(options = {}) {
|
|
|
302
302
|
const scriptLang = await selectScriptLanguage();
|
|
303
303
|
const zcfConfig = readZcfConfig();
|
|
304
304
|
const i18n = I18N[scriptLang];
|
|
305
|
-
if (!existsSync(SETTINGS_FILE)) {
|
|
306
|
-
console.log(ansis.yellow(i18n.noExistingConfig));
|
|
307
|
-
process.exit(1);
|
|
308
|
-
}
|
|
309
305
|
let configLang = options.configLang;
|
|
310
306
|
if (!configLang) {
|
|
311
307
|
const { lang } = await inquirer.prompt({
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, L as LANG_LABELS, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, F as addCompletedOnboarding, v as applyAiLanguageDirective, n as backupExistingConfig, z as backupMcpConfig, D as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, q as configureApi, p as copyConfigFiles, l as ensureClaudeDir, E as fixWindowsMcpConfig, t as getExistingApiConfig, w as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, k as installClaudeCode, j as isClaudeCodeInstalled, m as mergeAndCleanPermissions, r as mergeConfigs, B as mergeMcpServers, s as mergeSettingsFile, o as openSettingsJson, x as readMcpConfig, u as updateDefaultModel, y as writeMcpConfig } from './shared/zcf.
|
|
1
|
+
export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, L as LANG_LABELS, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, F as addCompletedOnboarding, v as applyAiLanguageDirective, n as backupExistingConfig, z as backupMcpConfig, D as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, q as configureApi, p as copyConfigFiles, l as ensureClaudeDir, E as fixWindowsMcpConfig, t as getExistingApiConfig, w as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, k as installClaudeCode, j as isClaudeCodeInstalled, m as mergeAndCleanPermissions, r as mergeConfigs, B as mergeMcpServers, s as mergeSettingsFile, o as openSettingsJson, x as readMcpConfig, u as updateDefaultModel, y as writeMcpConfig } from './shared/zcf.CEsHvLRM.mjs';
|
|
2
2
|
import 'inquirer';
|
|
3
3
|
import 'ansis';
|
|
4
4
|
import 'node:fs';
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
import { exec } from 'tinyexec';
|
|
8
8
|
import { homedir, platform } from 'node:os';
|
|
9
9
|
|
|
10
|
-
const version = "2.5.
|
|
10
|
+
const version = "2.5.2";
|
|
11
11
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
12
12
|
|
|
13
13
|
const CLAUDE_DIR = join(homedir(), ".claude");
|
|
@@ -633,7 +633,10 @@ function readZcfConfig() {
|
|
|
633
633
|
return readJsonConfig(ZCF_CONFIG_FILE);
|
|
634
634
|
}
|
|
635
635
|
function writeZcfConfig(config) {
|
|
636
|
-
|
|
636
|
+
try {
|
|
637
|
+
writeJsonConfig(ZCF_CONFIG_FILE, config);
|
|
638
|
+
} catch (error) {
|
|
639
|
+
}
|
|
637
640
|
}
|
|
638
641
|
function updateZcfConfig(updates) {
|
|
639
642
|
const existingConfig = readZcfConfig();
|
package/package.json
CHANGED