ccg-workflow 1.7.93 → 1.7.95
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 { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.
|
|
4
|
+
import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.BBGfqJul.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, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.
|
|
1
|
+
export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.BBGfqJul.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -10,7 +10,7 @@ import { parse, stringify } from 'smol-toml';
|
|
|
10
10
|
import i18next from 'i18next';
|
|
11
11
|
import ora from 'ora';
|
|
12
12
|
|
|
13
|
-
const version = "1.7.
|
|
13
|
+
const version = "1.7.95";
|
|
14
14
|
|
|
15
15
|
function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
|
|
16
16
|
return {
|
|
@@ -625,11 +625,12 @@ async function removeFastContextPrompt() {
|
|
|
625
625
|
await removeFromFile(join(homedir(), ".gemini", "GEMINI.md"));
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
+
const EXPECTED_BINARY_VERSION = "5.8.0";
|
|
628
629
|
const GITHUB_REPO = "fengshao1227/ccg-workflow";
|
|
629
630
|
const RELEASE_TAG = "preset";
|
|
630
631
|
const BINARY_SOURCES = [
|
|
631
|
-
{ name: "
|
|
632
|
-
{ name: "
|
|
632
|
+
{ name: "Cloudflare R2", url: "https://pub-29270440a0854a49bf1589cd3662c067.r2.dev/preset", timeoutMs: 15e3 },
|
|
633
|
+
{ name: "GitHub Release", url: `https://github.com/${GITHUB_REPO}/releases/download/${RELEASE_TAG}`, timeoutMs: 6e4 }
|
|
633
634
|
];
|
|
634
635
|
async function downloadFromUrl(url, destPath, timeoutMs, maxAttempts = 2) {
|
|
635
636
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
@@ -884,6 +885,19 @@ async function verifyBinary(installDir) {
|
|
|
884
885
|
return false;
|
|
885
886
|
}
|
|
886
887
|
}
|
|
888
|
+
async function verifyBinaryVersion(installDir) {
|
|
889
|
+
const binDir = join(installDir, "bin");
|
|
890
|
+
const wrapperName = process.platform === "win32" ? "codeagent-wrapper.exe" : "codeagent-wrapper";
|
|
891
|
+
const wrapperPath = join(binDir, wrapperName);
|
|
892
|
+
try {
|
|
893
|
+
const { execSync } = await import('node:child_process');
|
|
894
|
+
const output = execSync(`"${wrapperPath}" --version`, { stdio: "pipe" }).toString().trim();
|
|
895
|
+
const version = output.replace(/^.*version\s*/, "");
|
|
896
|
+
return version === EXPECTED_BINARY_VERSION;
|
|
897
|
+
} catch {
|
|
898
|
+
return false;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
887
901
|
function showBinaryDownloadWarning(binDir) {
|
|
888
902
|
const binaryExt = process.platform === "win32" ? ".exe" : "";
|
|
889
903
|
const platformLabel = process.platform === "darwin" ? process.arch === "arm64" ? "darwin-arm64" : "darwin-amd64" : process.platform === "linux" ? process.arch === "arm64" ? "linux-arm64" : "linux-amd64" : process.arch === "arm64" ? "windows-arm64" : "windows-amd64";
|
|
@@ -932,10 +946,14 @@ async function installBinaryFile(ctx) {
|
|
|
932
946
|
if (await fs.pathExists(destBinary)) {
|
|
933
947
|
try {
|
|
934
948
|
const { execSync } = await import('node:child_process');
|
|
935
|
-
execSync(`"${destBinary}" --version`, { stdio: "pipe" });
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
949
|
+
const versionOutput = execSync(`"${destBinary}" --version`, { stdio: "pipe" }).toString().trim();
|
|
950
|
+
const installedVersion = versionOutput.replace(/^.*version\s*/, "");
|
|
951
|
+
const expectedVersion = EXPECTED_BINARY_VERSION;
|
|
952
|
+
if (installedVersion === expectedVersion) {
|
|
953
|
+
ctx.result.binPath = binDir;
|
|
954
|
+
ctx.result.binInstalled = true;
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
939
957
|
} catch {
|
|
940
958
|
}
|
|
941
959
|
}
|
|
@@ -1078,6 +1096,32 @@ async function uninstallWorkflows(installDir, options) {
|
|
|
1078
1096
|
return result;
|
|
1079
1097
|
}
|
|
1080
1098
|
|
|
1099
|
+
const installer = {
|
|
1100
|
+
__proto__: null,
|
|
1101
|
+
getAllCommandIds: getAllCommandIds,
|
|
1102
|
+
getWorkflowById: getWorkflowById,
|
|
1103
|
+
getWorkflowConfigs: getWorkflowConfigs,
|
|
1104
|
+
injectConfigVariables: injectConfigVariables,
|
|
1105
|
+
installAceTool: installAceTool,
|
|
1106
|
+
installAceToolRs: installAceToolRs,
|
|
1107
|
+
installContextWeaver: installContextWeaver,
|
|
1108
|
+
installFastContext: installFastContext,
|
|
1109
|
+
installMcpServer: installMcpServer,
|
|
1110
|
+
installWorkflows: installWorkflows,
|
|
1111
|
+
removeFastContextPrompt: removeFastContextPrompt,
|
|
1112
|
+
showBinaryDownloadWarning: showBinaryDownloadWarning,
|
|
1113
|
+
syncMcpToCodex: syncMcpToCodex,
|
|
1114
|
+
syncMcpToGemini: syncMcpToGemini,
|
|
1115
|
+
uninstallAceTool: uninstallAceTool,
|
|
1116
|
+
uninstallContextWeaver: uninstallContextWeaver,
|
|
1117
|
+
uninstallFastContext: uninstallFastContext,
|
|
1118
|
+
uninstallMcpServer: uninstallMcpServer,
|
|
1119
|
+
uninstallWorkflows: uninstallWorkflows,
|
|
1120
|
+
verifyBinary: verifyBinary,
|
|
1121
|
+
verifyBinaryVersion: verifyBinaryVersion,
|
|
1122
|
+
writeFastContextPrompt: writeFastContextPrompt
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1081
1125
|
async function syncMcpMirrors() {
|
|
1082
1126
|
const [codex, gemini] = await Promise.all([syncMcpToCodex(), syncMcpToGemini()]);
|
|
1083
1127
|
const synced = [];
|
|
@@ -3489,6 +3533,12 @@ async function performUpdate(fromVersion, toVersion, isNewVersion) {
|
|
|
3489
3533
|
}
|
|
3490
3534
|
if (!await verifyBinary(installDir)) {
|
|
3491
3535
|
showBinaryDownloadWarning(join(installDir, "bin"));
|
|
3536
|
+
} else {
|
|
3537
|
+
const { verifyBinaryVersion } = await Promise.resolve().then(function () { return installer; });
|
|
3538
|
+
const versionOk = await verifyBinaryVersion(installDir);
|
|
3539
|
+
if (!versionOk) {
|
|
3540
|
+
showBinaryDownloadWarning(join(installDir, "bin"));
|
|
3541
|
+
}
|
|
3492
3542
|
}
|
|
3493
3543
|
} else {
|
|
3494
3544
|
console.log();
|
package/package.json
CHANGED