zcf 2.9.0 → 2.9.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/chunks/simple-config.mjs +4 -11
- package/dist/cli.mjs +13 -4
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import { promisify as promisify$1 } from 'node:util';
|
|
|
18
18
|
import { homedir, platform } from 'node:os';
|
|
19
19
|
import { join as join$2 } from 'node:path';
|
|
20
20
|
|
|
21
|
-
const version = "2.9.
|
|
21
|
+
const version = "2.9.2";
|
|
22
22
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
23
23
|
|
|
24
24
|
const common$1 = {
|
|
@@ -2111,10 +2111,7 @@ function shouldUpdate(current, latest) {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
async function checkCcrVersion() {
|
|
2113
2113
|
const currentVersion = await getInstalledVersion("ccr");
|
|
2114
|
-
|
|
2115
|
-
if (!latestVersion) {
|
|
2116
|
-
latestVersion = await getLatestVersion("claude-code-router");
|
|
2117
|
-
}
|
|
2114
|
+
const latestVersion = await getLatestVersion("@musistudio/claude-code-router");
|
|
2118
2115
|
return {
|
|
2119
2116
|
installed: currentVersion !== null,
|
|
2120
2117
|
currentVersion,
|
|
@@ -2166,11 +2163,7 @@ async function updateCcr(scriptLang, force = false) {
|
|
|
2166
2163
|
}
|
|
2167
2164
|
const updateSpinner = ora(format(i18n.updater.updating, { tool: "CCR" })).start();
|
|
2168
2165
|
try {
|
|
2169
|
-
|
|
2170
|
-
await execAsync$2("npm update -g @musistudio/claude-code-router");
|
|
2171
|
-
} catch {
|
|
2172
|
-
await execAsync$2("npm update -g claude-code-router");
|
|
2173
|
-
}
|
|
2166
|
+
await execAsync$2("npm update -g @musistudio/claude-code-router");
|
|
2174
2167
|
updateSpinner.succeed(format(i18n.updater.updateSuccess, { tool: "CCR" }));
|
|
2175
2168
|
return true;
|
|
2176
2169
|
} catch (error) {
|
|
@@ -2606,7 +2599,7 @@ async function installCcr(scriptLang) {
|
|
|
2606
2599
|
}
|
|
2607
2600
|
console.log(ansis.cyan(`\u{1F4E6} ${i18n.ccr.installingCcr}`));
|
|
2608
2601
|
try {
|
|
2609
|
-
await execAsync$1("npm install -g claude-code-router --force");
|
|
2602
|
+
await execAsync$1("npm install -g @musistudio/claude-code-router --force");
|
|
2610
2603
|
console.log(ansis.green(`\u2714 ${i18n.ccr.ccrInstallSuccess}`));
|
|
2611
2604
|
} catch (error) {
|
|
2612
2605
|
if (error.message?.includes("EEXIST")) {
|
package/dist/cli.mjs
CHANGED
|
@@ -656,7 +656,7 @@ async function runCcusageFeature(scriptLang) {
|
|
|
656
656
|
const i18n = getTranslation(validLang);
|
|
657
657
|
console.log("");
|
|
658
658
|
console.log(ansis.cyan(i18n.menu.menuOptions.ccusage));
|
|
659
|
-
console.log(ansis.gray(`${i18n.tools.ccusageDescription}
|
|
659
|
+
console.log(ansis.gray(`${i18n.tools.ccusageDescription}`));
|
|
660
660
|
console.log("");
|
|
661
661
|
const choices = [
|
|
662
662
|
{ name: i18n.tools.ccusageModes.daily, value: "daily" },
|
|
@@ -993,12 +993,14 @@ function customizeHelp(sections) {
|
|
|
993
993
|
"i"
|
|
994
994
|
)} Initialize Claude Code configuration / \u521D\u59CB\u5316 Claude Code \u914D\u7F6E`,
|
|
995
995
|
` ${ansis.cyan("zcf update")} | ${ansis.cyan("u")} Update workflow-related md files / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md`,
|
|
996
|
-
` ${ansis.cyan("zcf ccr")} Configure Claude Code Router / \u914D\u7F6E\u6A21\u578B\u4EE3\u7406`,
|
|
997
|
-
` ${ansis.cyan("zcf ccu")} [args]
|
|
996
|
+
` ${ansis.cyan("zcf ccr")} Configure Claude Code Router for model proxy / \u914D\u7F6E\u6A21\u578B\u8DEF\u7531\u4EE3\u7406`,
|
|
997
|
+
` ${ansis.cyan("zcf ccu")} [args] Claude Code usage statistics analysis / Claude Code \u7528\u91CF\u7EDF\u8BA1\u5206\u6790`,
|
|
998
|
+
` ${ansis.cyan("zcf check-updates")} Check and update to latest versions / \u68C0\u67E5\u5E76\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C`,
|
|
998
999
|
"",
|
|
999
1000
|
ansis.gray(" Shortcuts / \u5FEB\u6377\u65B9\u5F0F:"),
|
|
1000
1001
|
` ${ansis.cyan("zcf i")} Quick init / \u5FEB\u901F\u521D\u59CB\u5316`,
|
|
1001
|
-
` ${ansis.cyan("zcf u")} Quick update / \u5FEB\u901F\u66F4\u65B0
|
|
1002
|
+
` ${ansis.cyan("zcf u")} Quick update / \u5FEB\u901F\u66F4\u65B0`,
|
|
1003
|
+
` ${ansis.cyan("zcf check")} Quick check updates / \u5FEB\u901F\u68C0\u67E5\u66F4\u65B0`
|
|
1002
1004
|
].join("\n")
|
|
1003
1005
|
});
|
|
1004
1006
|
sections.push({
|
|
@@ -1025,10 +1027,17 @@ function customizeHelp(sections) {
|
|
|
1025
1027
|
ansis.gray(" # Update workflow-related md files only / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u6587\u4EF6"),
|
|
1026
1028
|
` ${ansis.cyan("npx zcf u")}`,
|
|
1027
1029
|
"",
|
|
1030
|
+
ansis.gray(" # Configure Claude Code Router / \u914D\u7F6E Claude Code Router"),
|
|
1031
|
+
` ${ansis.cyan("npx zcf ccr")}`,
|
|
1032
|
+
"",
|
|
1028
1033
|
ansis.gray(" # Run Claude Code usage analysis / \u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790"),
|
|
1029
1034
|
` ${ansis.cyan("npx zcf ccu")} ${ansis.gray("# Daily usage (default)")}`,
|
|
1030
1035
|
` ${ansis.cyan("npx zcf ccu monthly --json")}`,
|
|
1031
1036
|
"",
|
|
1037
|
+
ansis.gray(" # Check and update tools / \u68C0\u67E5\u5E76\u66F4\u65B0\u5DE5\u5177"),
|
|
1038
|
+
` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code and CCR")}`,
|
|
1039
|
+
` ${ansis.cyan("npx zcf check")} ${ansis.gray("# Short alias")}`,
|
|
1040
|
+
"",
|
|
1032
1041
|
ansis.gray(" # Force overwrite with Chinese config / \u5F3A\u5236\u4F7F\u7528\u4E2D\u6587\u914D\u7F6E\u8986\u76D6"),
|
|
1033
1042
|
` ${ansis.cyan("npx zcf --init -c zh-CN -f")}`,
|
|
1034
1043
|
` ${ansis.cyan("npx zcf --init --config-lang zh-CN --force")}`
|
package/package.json
CHANGED