ccg-workflow 1.7.12 → 1.7.14

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 { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.eccEe_a4.mjs';
4
+ import { y as diagnoseMcpConfig, z as isWindows, A as readClaudeCodeConfig, B as fixWindowsMcpConfig, C as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, s as showMainMenu, i as init, D as configMcp, E as version, a as i18n } from './shared/ccg-workflow.DAfyeiEc.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:child_process';
7
7
  import 'node:util';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.eccEe_a4.mjs';
1
+ export { c as changeLanguage, v as checkForUpdates, x as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, q as getCurrentVersion, t as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, k as installWorkflows, o as migrateToV1_4_0, p as needsMigration, r as readCcgConfig, s as showMainMenu, n as uninstallAceTool, m as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.DAfyeiEc.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:child_process';
@@ -10,7 +10,7 @@ import i18next from 'i18next';
10
10
  import ora from 'ora';
11
11
  import { parse, stringify } from 'smol-toml';
12
12
 
13
- const version = "1.7.12";
13
+ const version = "1.7.14";
14
14
 
15
15
  function isWindows() {
16
16
  return process.platform === "win32";
@@ -1681,6 +1681,9 @@ async function update() {
1681
1681
  const spinner = ora("\u6B63\u5728\u68C0\u67E5\u6700\u65B0\u7248\u672C...").start();
1682
1682
  try {
1683
1683
  const { hasUpdate, currentVersion, latestVersion } = await checkForUpdates();
1684
+ const config = await readCcgConfig();
1685
+ const localVersion = config?.general?.version || "0.0.0";
1686
+ const needsWorkflowUpdate = compareVersions(currentVersion, localVersion) > 0;
1684
1687
  spinner.stop();
1685
1688
  if (!latestVersion) {
1686
1689
  console.log(ansis.red("\u274C \u65E0\u6CD5\u8FDE\u63A5\u5230 npm registry\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5"));
@@ -1688,19 +1691,32 @@ async function update() {
1688
1691
  }
1689
1692
  console.log(`\u5F53\u524D\u7248\u672C: ${ansis.yellow(`v${currentVersion}`)}`);
1690
1693
  console.log(`\u6700\u65B0\u7248\u672C: ${ansis.green(`v${latestVersion}`)}`);
1694
+ if (localVersion !== "0.0.0") {
1695
+ console.log(`\u672C\u5730\u5DE5\u4F5C\u6D41: ${ansis.gray(`v${localVersion}`)}`);
1696
+ }
1691
1697
  console.log();
1692
- const message = hasUpdate ? `\u786E\u8BA4\u8981\u66F4\u65B0\u5230 v${latestVersion} \u5417\uFF1F\uFF08\u5148\u4E0B\u8F7D\u6700\u65B0\u5305 \u2192 \u5220\u9664\u65E7\u5DE5\u4F5C\u6D41 \u2192 \u5B89\u88C5\u65B0\u5DE5\u4F5C\u6D41\uFF09` : "\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002\u8981\u91CD\u65B0\u5B89\u88C5\u5417\uFF1F\uFF08\u5148\u4E0B\u8F7D\u6700\u65B0\u5305 \u2192 \u5220\u9664\u65E7\u5DE5\u4F5C\u6D41 \u2192 \u5B89\u88C5\u65B0\u5DE5\u4F5C\u6D41\uFF09";
1698
+ const effectiveNeedsUpdate = hasUpdate || needsWorkflowUpdate;
1699
+ let message;
1700
+ if (hasUpdate) {
1701
+ message = `\u786E\u8BA4\u8981\u66F4\u65B0\u5230 v${latestVersion} \u5417\uFF1F\uFF08\u5148\u4E0B\u8F7D\u6700\u65B0\u5305 \u2192 \u5220\u9664\u65E7\u5DE5\u4F5C\u6D41 \u2192 \u5B89\u88C5\u65B0\u5DE5\u4F5C\u6D41\uFF09`;
1702
+ } else if (needsWorkflowUpdate) {
1703
+ message = `\u68C0\u6D4B\u5230\u672C\u5730\u5DE5\u4F5C\u6D41\u7248\u672C (v${localVersion}) \u4F4E\u4E8E\u5F53\u524D\u7248\u672C (v${currentVersion})\uFF0C\u662F\u5426\u66F4\u65B0\uFF1F`;
1704
+ } else {
1705
+ message = "\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002\u8981\u91CD\u65B0\u5B89\u88C5\u5417\uFF1F\uFF08\u5148\u4E0B\u8F7D\u6700\u65B0\u5305 \u2192 \u5220\u9664\u65E7\u5DE5\u4F5C\u6D41 \u2192 \u5B89\u88C5\u65B0\u5DE5\u4F5C\u6D41\uFF09";
1706
+ }
1693
1707
  const { confirmUpdate } = await inquirer.prompt([{
1694
1708
  type: "confirm",
1695
1709
  name: "confirmUpdate",
1696
1710
  message,
1697
- default: hasUpdate
1711
+ default: effectiveNeedsUpdate
1712
+ // Default to true if needs update
1698
1713
  }]);
1699
1714
  if (!confirmUpdate) {
1700
1715
  console.log(ansis.gray("\u5DF2\u53D6\u6D88\u66F4\u65B0"));
1701
1716
  return;
1702
1717
  }
1703
- await performUpdate(currentVersion, latestVersion || currentVersion, hasUpdate);
1718
+ const fromVersion = needsWorkflowUpdate ? localVersion : currentVersion;
1719
+ await performUpdate(fromVersion, latestVersion || currentVersion, hasUpdate || needsWorkflowUpdate);
1704
1720
  } catch (error) {
1705
1721
  spinner.stop();
1706
1722
  console.log(ansis.red(`\u274C \u66F4\u65B0\u5931\u8D25: ${error}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.12",
3
+ "version": "1.7.14",
4
4
  "description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",