zcf 1.0.1 → 1.0.3

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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
- import { i as init } from './shared/zcf.DMG6psxU.mjs';
3
+ import { i as init } from './shared/zcf.BuHXwv0P.mjs';
4
4
  import '@posva/prompts';
5
5
  import 'ansis';
6
6
  import 'node:fs';
@@ -9,7 +9,7 @@ import 'pathe';
9
9
  import 'dayjs';
10
10
  import 'tinyexec';
11
11
 
12
- const version = "1.0.1";
12
+ const version = "1.0.3";
13
13
 
14
14
  const cli = cac("zcf");
15
15
  cli.command("[lang]", "Initialize Claude Code configuration").option("--config-lang <lang>", "Configuration language (zh-CN, en)").option("--force", "Force overwrite existing configuration").option("--skip-install", "Skip Claude Code installation check").action(async (lang, options) => {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CLAUDE_DIR, a as CLAUDE_MD_FILE, I as I18N, L as LANG_LABELS, M as MCP_CONFIG_FILE, d as MCP_SERVICES, S as SETTINGS_FILE, b as SUPPORTED_LANGS, j as backupExistingConfig, o as backupMcpConfig, q as buildMcpServerConfig, c as commandExists, l as configureApi, k as copyConfigFiles, h as ensureClaudeDir, n as getMcpConfigPath, g as getPlatform, i as init, f as installClaudeCode, e as isClaudeCodeInstalled, m as mergeConfigs, p as mergeMcpServers, r as readMcpConfig, w as writeMcpConfig } from './shared/zcf.DMG6psxU.mjs';
1
+ export { C as CLAUDE_DIR, a as CLAUDE_MD_FILE, I as I18N, L as LANG_LABELS, M as MCP_CONFIG_FILE, d as MCP_SERVICES, S as SETTINGS_FILE, b as SUPPORTED_LANGS, j as backupExistingConfig, o as backupMcpConfig, q as buildMcpServerConfig, c as commandExists, l as configureApi, k as copyConfigFiles, h as ensureClaudeDir, n as getMcpConfigPath, g as getPlatform, i as init, f as installClaudeCode, e as isClaudeCodeInstalled, m as mergeConfigs, p as mergeMcpServers, r as readMcpConfig, w as writeMcpConfig } from './shared/zcf.BuHXwv0P.mjs';
2
2
  import '@posva/prompts';
3
3
  import 'ansis';
4
4
  import 'node:fs';
@@ -316,8 +316,8 @@ function getPlatform() {
316
316
  async function commandExists(command) {
317
317
  try {
318
318
  const cmd = getPlatform() === "windows" ? "where" : "which";
319
- await exec(cmd, [command]);
320
- return true;
319
+ const res = await exec(cmd, [command]);
320
+ return res.exitCode === 0;
321
321
  } catch {
322
322
  return false;
323
323
  }
@@ -452,7 +452,7 @@ async function init(options = {}) {
452
452
  console.log(ansis.yellow(i18n.skip));
453
453
  }
454
454
  } else {
455
- console.log(ansis.green(`\u2714 Claude Code ${i18n.installSuccess}`));
455
+ console.log(ansis.green(`\u2714 ${i18n.installSuccess}`));
456
456
  }
457
457
  }
458
458
  ensureClaudeDir();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "description": "Zero-Config Claude-Code Flow - One-click configuration tool for Claude Code",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/UfoMiao/zcf#readme",