ccjk 5.2.1 → 5.2.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/api.mjs +6 -6
- package/dist/chunks/auto-updater.mjs +57 -57
- package/dist/chunks/ccm.mjs +7 -7
- package/dist/chunks/ccr.mjs +7 -4
- package/dist/chunks/ccu.mjs +6 -6
- package/dist/chunks/check-updates.mjs +3 -3
- package/dist/chunks/claude-code-incremental-manager.mjs +38 -38
- package/dist/chunks/cloud-v5.mjs +1651 -0
- package/dist/chunks/codex.mjs +70 -70
- package/dist/chunks/commands.mjs +25 -25
- package/dist/chunks/commit.mjs +16 -16
- package/dist/chunks/config-consolidator.mjs +9 -9
- package/dist/chunks/config-switch.mjs +39 -39
- package/dist/chunks/config.mjs +5 -5
- package/dist/chunks/config2.mjs +85 -85
- package/dist/chunks/context.mjs +2 -2
- package/dist/chunks/doctor.mjs +31 -31
- package/dist/chunks/features.mjs +84 -83
- package/dist/chunks/help.mjs +116 -116
- package/dist/chunks/index4.mjs +46 -46
- package/dist/chunks/init.mjs +214 -191
- package/dist/chunks/interview.mjs +102 -102
- package/dist/chunks/manager.mjs +238 -0
- package/dist/chunks/marketplace.mjs +59 -59
- package/dist/chunks/mcp.mjs +82 -82
- package/dist/chunks/menu.mjs +441 -379
- package/dist/chunks/notification.mjs +112 -112
- package/dist/chunks/onboarding.mjs +7 -7
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/permission-manager.mjs +8 -8
- package/dist/chunks/plugin.mjs +100 -100
- package/dist/chunks/prompts.mjs +15 -15
- package/dist/chunks/providers.mjs +65 -65
- package/dist/chunks/session.mjs +83 -83
- package/dist/chunks/skills-sync.mjs +72 -72
- package/dist/chunks/skills.mjs +88 -88
- package/dist/chunks/team.mjs +6 -6
- package/dist/chunks/uninstall.mjs +35 -35
- package/dist/chunks/update.mjs +6 -6
- package/dist/chunks/upgrade-manager.mjs +4 -4
- package/dist/chunks/workflows2.mjs +13 -13
- package/dist/cli.mjs +21 -0
- package/dist/i18n/locales/en/menu.json +16 -1
- package/dist/i18n/locales/en/skills.json +29 -0
- package/dist/i18n/locales/zh-CN/menu.json +16 -1
- package/dist/i18n/locales/zh-CN/skills.json +29 -0
- package/dist/index.mjs +4 -4
- package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.BiJujy5w.mjs} +4 -4
- package/dist/shared/{ccjk.CQzwtnZ1.mjs → ccjk.C_3BYaWc.mjs} +50 -50
- package/dist/shared/{ccjk.Zwx-YR_P.mjs → ccjk.DjD9Rzxq.mjs} +32 -32
- package/dist/shared/{ccjk.DtWIPt8E.mjs → ccjk.XgW1H2t3.mjs} +68 -68
- package/dist/shared/{ccjk.BlPCiSHj.mjs → ccjk.tI4PJA0c.mjs} +30 -30
- package/package.json +3 -3
package/dist/chunks/api.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import { i18n, format } from './index2.mjs';
|
|
3
|
-
import { S as STATUS, t as theme } from '../shared/ccjk.
|
|
4
|
-
import { r as runConfigWizard, t as testApiConnection, d as displayCurrentStatus, q as quickSetup, g as getAllPresets } from '../shared/ccjk.
|
|
3
|
+
import { S as STATUS, t as theme } from '../shared/ccjk.DjD9Rzxq.mjs';
|
|
4
|
+
import { r as runConfigWizard, t as testApiConnection, d as displayCurrentStatus, q as quickSetup, g as getAllPresets } from '../shared/ccjk.tI4PJA0c.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
7
7
|
import 'node:url';
|
|
@@ -38,8 +38,8 @@ function listProviders(lang = "en") {
|
|
|
38
38
|
const name = lang === "zh-CN" ? preset.nameZh : preset.name;
|
|
39
39
|
const desc = lang === "zh-CN" ? preset.descriptionZh : preset.description;
|
|
40
40
|
const keyIcon = preset.requiresApiKey ? "\u{1F511}" : "\u{1F193}";
|
|
41
|
-
console.log(` ${keyIcon} ${
|
|
42
|
-
console.log(
|
|
41
|
+
console.log(` ${keyIcon} ${ansis__default.green(preset.id.padEnd(15))} ${name}`);
|
|
42
|
+
console.log(ansis__default.gray(` ${desc}`));
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
|
45
45
|
}
|
|
@@ -77,7 +77,7 @@ async function apiCommand(action = "wizard", args = [], options = {}) {
|
|
|
77
77
|
setupApi(args[0], args[1], lang);
|
|
78
78
|
} else {
|
|
79
79
|
console.log(STATUS.error(i18n.t("api:setupUsage")));
|
|
80
|
-
console.log(
|
|
80
|
+
console.log(ansis__default.gray(` ${i18n.t("api:setupExample")}`));
|
|
81
81
|
}
|
|
82
82
|
break;
|
|
83
83
|
case "status":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import ora from 'ora';
|
|
3
3
|
import { exec } from 'tinyexec';
|
|
4
4
|
import { ensureI18nInitialized, i18n, format } from './index2.mjs';
|
|
@@ -91,7 +91,7 @@ function findResidualNpmTempDirs(packageName) {
|
|
|
91
91
|
async function execWithSudoIfNeeded(command, args) {
|
|
92
92
|
const needsSudo = shouldUseSudoForGlobalInstall();
|
|
93
93
|
if (needsSudo) {
|
|
94
|
-
console.log(
|
|
94
|
+
console.log(ansis__default.yellow(`
|
|
95
95
|
${i18n.t("updater:usingSudo")}`));
|
|
96
96
|
const result = await exec("sudo", [command, ...args]);
|
|
97
97
|
if (result.exitCode !== 0) {
|
|
@@ -113,30 +113,30 @@ async function updateCcr(force = false, skipPrompt = false) {
|
|
|
113
113
|
const { installed, currentVersion, latestVersion, needsUpdate } = await checkCcrVersion();
|
|
114
114
|
spinner.stop();
|
|
115
115
|
if (!installed) {
|
|
116
|
-
console.log(
|
|
116
|
+
console.log(ansis__default.yellow(i18n.t("updater:ccrNotInstalled")));
|
|
117
117
|
return false;
|
|
118
118
|
}
|
|
119
119
|
if (!needsUpdate && !force) {
|
|
120
|
-
console.log(
|
|
120
|
+
console.log(ansis__default.green(format(i18n.t("updater:ccrUpToDate"), { version: currentVersion || "" })));
|
|
121
121
|
return true;
|
|
122
122
|
}
|
|
123
123
|
if (!latestVersion) {
|
|
124
|
-
console.log(
|
|
124
|
+
console.log(ansis__default.yellow(i18n.t("updater:cannotCheckVersion")));
|
|
125
125
|
return false;
|
|
126
126
|
}
|
|
127
|
-
console.log(
|
|
128
|
-
console.log(
|
|
127
|
+
console.log(ansis__default.green(format(i18n.t("updater:currentVersion"), { version: currentVersion || "" })));
|
|
128
|
+
console.log(ansis__default.green(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
|
|
129
129
|
if (!skipPrompt) {
|
|
130
130
|
const confirm = await promptBoolean({
|
|
131
131
|
message: format(i18n.t("updater:confirmUpdate"), { tool: "CCR" }),
|
|
132
132
|
defaultValue: true
|
|
133
133
|
});
|
|
134
134
|
if (!confirm) {
|
|
135
|
-
console.log(
|
|
135
|
+
console.log(ansis__default.gray(i18n.t("updater:updateSkipped")));
|
|
136
136
|
return true;
|
|
137
137
|
}
|
|
138
138
|
} else {
|
|
139
|
-
console.log(
|
|
139
|
+
console.log(ansis__default.green(format(i18n.t("updater:autoUpdating"), { tool: "CCR" })));
|
|
140
140
|
}
|
|
141
141
|
const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "CCR" })).start();
|
|
142
142
|
try {
|
|
@@ -145,12 +145,12 @@ async function updateCcr(force = false, skipPrompt = false) {
|
|
|
145
145
|
return true;
|
|
146
146
|
} catch (error) {
|
|
147
147
|
updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "CCR" }));
|
|
148
|
-
console.error(
|
|
148
|
+
console.error(ansis__default.red(error instanceof Error ? error.message : String(error)));
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
151
|
} catch (error) {
|
|
152
152
|
spinner.fail(i18n.t("updater:checkFailed"));
|
|
153
|
-
console.error(
|
|
153
|
+
console.error(ansis__default.red(error instanceof Error ? error.message : String(error)));
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -161,26 +161,26 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
161
161
|
const { installed, currentVersion, latestVersion, needsUpdate, isHomebrew, installationSource, isBroken } = await checkClaudeCodeVersion();
|
|
162
162
|
spinner.stop();
|
|
163
163
|
if (!installed) {
|
|
164
|
-
console.log(
|
|
164
|
+
console.log(ansis__default.yellow(i18n.t("updater:claudeCodeNotInstalled")));
|
|
165
165
|
return false;
|
|
166
166
|
}
|
|
167
167
|
if (!needsUpdate && !force) {
|
|
168
|
-
console.log(
|
|
168
|
+
console.log(ansis__default.green(format(i18n.t("updater:claudeCodeUpToDate"), { version: currentVersion || "" })));
|
|
169
169
|
return true;
|
|
170
170
|
}
|
|
171
171
|
if (!latestVersion) {
|
|
172
|
-
console.log(
|
|
172
|
+
console.log(ansis__default.yellow(i18n.t("updater:cannotCheckVersion")));
|
|
173
173
|
return false;
|
|
174
174
|
}
|
|
175
|
-
console.log(
|
|
176
|
-
console.log(
|
|
175
|
+
console.log(ansis__default.green(format(i18n.t("updater:currentVersion"), { version: currentVersion || "" })));
|
|
176
|
+
console.log(ansis__default.green(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
|
|
177
177
|
if (!isHomebrew) {
|
|
178
178
|
const residuals = findResidualNpmTempDirs("@anthropic-ai/claude-code");
|
|
179
179
|
if (residuals.length > 0) {
|
|
180
180
|
const plural = residuals.length > 1 ? "ies" : "y";
|
|
181
|
-
console.log(
|
|
181
|
+
console.log(ansis__default.yellow(`
|
|
182
182
|
\u26A0 ${format(i18n.t("updater:residualDirsFound"), { count: String(residuals.length), plural })}`));
|
|
183
|
-
console.log(
|
|
183
|
+
console.log(ansis__default.gray(` ${i18n.t("updater:cleaningWithSudo")}`));
|
|
184
184
|
try {
|
|
185
185
|
const { wrapCommandWithSudo } = await import('./platform.mjs');
|
|
186
186
|
let cleanedCount = 0;
|
|
@@ -194,28 +194,28 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
194
194
|
}
|
|
195
195
|
if (cleanedCount > 0) {
|
|
196
196
|
const cleanedPlural = cleanedCount > 1 ? "ies" : "y";
|
|
197
|
-
console.log(
|
|
197
|
+
console.log(ansis__default.green(` \u2714 ${format(i18n.t("updater:cleanedDirs"), { count: String(cleanedCount), plural: cleanedPlural })}`));
|
|
198
198
|
}
|
|
199
199
|
} catch {
|
|
200
|
-
console.log(
|
|
200
|
+
console.log(ansis__default.yellow(` \u2139 ${i18n.t("updater:cleanupFailed")}`));
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
if (isBroken) {
|
|
205
|
-
console.log(
|
|
205
|
+
console.log(ansis__default.yellow(i18n.t("updater:installationBroken")));
|
|
206
206
|
const fixResult = await fixBrokenNpmSymlink();
|
|
207
207
|
if (fixResult.fixed) {
|
|
208
|
-
console.log(
|
|
208
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("updater:symlinkFixed")}: ${fixResult.message}`));
|
|
209
209
|
const recheckResult = await checkClaudeCodeVersion();
|
|
210
210
|
if (!recheckResult.isBroken) {
|
|
211
|
-
console.log(
|
|
211
|
+
console.log(ansis__default.green(i18n.t("updater:installationRepaired")));
|
|
212
212
|
if (!recheckResult.needsUpdate && !force) {
|
|
213
|
-
console.log(
|
|
213
|
+
console.log(ansis__default.green(format(i18n.t("updater:claudeCodeUpToDate"), { version: recheckResult.currentVersion || "" })));
|
|
214
214
|
return true;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
} else {
|
|
218
|
-
console.log(
|
|
218
|
+
console.log(ansis__default.gray(`\u2139 ${fixResult.message}`));
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
if (!skipPrompt) {
|
|
@@ -224,11 +224,11 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
224
224
|
defaultValue: true
|
|
225
225
|
});
|
|
226
226
|
if (!confirm) {
|
|
227
|
-
console.log(
|
|
227
|
+
console.log(ansis__default.gray(i18n.t("updater:updateSkipped")));
|
|
228
228
|
return true;
|
|
229
229
|
}
|
|
230
230
|
} else {
|
|
231
|
-
console.log(
|
|
231
|
+
console.log(ansis__default.green(format(i18n.t("updater:autoUpdating"), { tool: "Claude Code" })));
|
|
232
232
|
}
|
|
233
233
|
const toolName = isHomebrew ? "Claude Code (Homebrew)" : "Claude Code";
|
|
234
234
|
const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: toolName })).start();
|
|
@@ -271,9 +271,9 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
271
271
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
272
272
|
if (errorMessage.includes("ENOTEMPTY") || errorMessage.includes("directory not empty")) {
|
|
273
273
|
updateSpinner.warn(format(i18n.t("updater:updateFailed"), { tool: "Claude Code" }));
|
|
274
|
-
console.log(
|
|
274
|
+
console.log(ansis__default.yellow(`
|
|
275
275
|
\u26A0 ${i18n.t("updater:updateFailedWithResiduals")}`));
|
|
276
|
-
console.log(
|
|
276
|
+
console.log(ansis__default.gray(` ${i18n.t("updater:attemptingCleanupRetry")}`));
|
|
277
277
|
try {
|
|
278
278
|
const { wrapCommandWithSudo } = await import('./platform.mjs');
|
|
279
279
|
const residuals = findResidualNpmTempDirs("@anthropic-ai/claude-code");
|
|
@@ -284,7 +284,7 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
console.log(
|
|
287
|
+
console.log(ansis__default.gray(` ${i18n.t("updater:retryingUpdate")}`));
|
|
288
288
|
const retrySpinner = ora(format(i18n.t("updater:updating"), { tool: "Claude Code" })).start();
|
|
289
289
|
try {
|
|
290
290
|
if (isHomebrew) {
|
|
@@ -302,33 +302,33 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
302
302
|
await execWithSudoIfNeeded("claude", ["update"]);
|
|
303
303
|
}
|
|
304
304
|
retrySpinner.succeed(format(i18n.t("updater:updateSuccess"), { tool: "Claude Code" }));
|
|
305
|
-
console.log(
|
|
305
|
+
console.log(ansis__default.green(`
|
|
306
306
|
\u2714 ${i18n.t("updater:updateSucceededAfterCleanup")}`));
|
|
307
307
|
return true;
|
|
308
308
|
} catch (retryError) {
|
|
309
309
|
retrySpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "Claude Code" }));
|
|
310
310
|
const retryErrorMessage = retryError instanceof Error ? retryError.message : String(retryError);
|
|
311
|
-
console.error(
|
|
312
|
-
console.log(
|
|
311
|
+
console.error(ansis__default.red(retryErrorMessage));
|
|
312
|
+
console.log(ansis__default.yellow(`
|
|
313
313
|
\u26A0 ${i18n.t("updater:autoRecoveryFailed")}`));
|
|
314
|
-
console.log(
|
|
315
|
-
console.log(
|
|
316
|
-
console.log(
|
|
317
|
-
console.log(
|
|
314
|
+
console.log(ansis__default.gray(` ${i18n.t("updater:manualCleanupHint")}`));
|
|
315
|
+
console.log(ansis__default.white(` ${i18n.t("updater:manualCleanupCommand")}`));
|
|
316
|
+
console.log(ansis__default.white(` ${i18n.t("updater:manualCleanupCommand2")}`));
|
|
317
|
+
console.log(ansis__default.gray(`
|
|
318
318
|
${i18n.t("updater:thenTryAgain")}`));
|
|
319
319
|
return false;
|
|
320
320
|
}
|
|
321
321
|
} catch {
|
|
322
|
-
console.log(
|
|
322
|
+
console.log(ansis__default.yellow("\n\u26A0 Automatic cleanup failed"));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "Claude Code" }));
|
|
326
|
-
console.error(
|
|
326
|
+
console.error(ansis__default.red(errorMessage));
|
|
327
327
|
return false;
|
|
328
328
|
}
|
|
329
329
|
} catch (error) {
|
|
330
330
|
spinner.fail(i18n.t("updater:checkFailed"));
|
|
331
|
-
console.error(
|
|
331
|
+
console.error(ansis__default.red(error instanceof Error ? error.message : String(error)));
|
|
332
332
|
return false;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
@@ -339,30 +339,30 @@ async function updateCometixLine(force = false, skipPrompt = false) {
|
|
|
339
339
|
const { installed, currentVersion, latestVersion, needsUpdate } = await checkCometixLineVersion();
|
|
340
340
|
spinner.stop();
|
|
341
341
|
if (!installed) {
|
|
342
|
-
console.log(
|
|
342
|
+
console.log(ansis__default.yellow(i18n.t("updater:cometixLineNotInstalled")));
|
|
343
343
|
return false;
|
|
344
344
|
}
|
|
345
345
|
if (!needsUpdate && !force) {
|
|
346
|
-
console.log(
|
|
346
|
+
console.log(ansis__default.green(format(i18n.t("updater:cometixLineUpToDate"), { version: currentVersion || "" })));
|
|
347
347
|
return true;
|
|
348
348
|
}
|
|
349
349
|
if (!latestVersion) {
|
|
350
|
-
console.log(
|
|
350
|
+
console.log(ansis__default.yellow(i18n.t("updater:cannotCheckVersion")));
|
|
351
351
|
return false;
|
|
352
352
|
}
|
|
353
|
-
console.log(
|
|
354
|
-
console.log(
|
|
353
|
+
console.log(ansis__default.green(format(i18n.t("updater:currentVersion"), { version: currentVersion || "" })));
|
|
354
|
+
console.log(ansis__default.green(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
|
|
355
355
|
if (!skipPrompt) {
|
|
356
356
|
const confirm = await promptBoolean({
|
|
357
357
|
message: format(i18n.t("updater:confirmUpdate"), { tool: "CCometixLine" }),
|
|
358
358
|
defaultValue: true
|
|
359
359
|
});
|
|
360
360
|
if (!confirm) {
|
|
361
|
-
console.log(
|
|
361
|
+
console.log(ansis__default.gray(i18n.t("updater:updateSkipped")));
|
|
362
362
|
return true;
|
|
363
363
|
}
|
|
364
364
|
} else {
|
|
365
|
-
console.log(
|
|
365
|
+
console.log(ansis__default.green(format(i18n.t("updater:autoUpdating"), { tool: "CCometixLine" })));
|
|
366
366
|
}
|
|
367
367
|
const updateSpinner = ora(format(i18n.t("updater:updating"), { tool: "CCometixLine" })).start();
|
|
368
368
|
try {
|
|
@@ -371,18 +371,18 @@ async function updateCometixLine(force = false, skipPrompt = false) {
|
|
|
371
371
|
return true;
|
|
372
372
|
} catch (error) {
|
|
373
373
|
updateSpinner.fail(format(i18n.t("updater:updateFailed"), { tool: "CCometixLine" }));
|
|
374
|
-
console.error(
|
|
374
|
+
console.error(ansis__default.red(error instanceof Error ? error.message : String(error)));
|
|
375
375
|
return false;
|
|
376
376
|
}
|
|
377
377
|
} catch (error) {
|
|
378
378
|
spinner.fail(i18n.t("updater:checkFailed"));
|
|
379
|
-
console.error(
|
|
379
|
+
console.error(ansis__default.red(error instanceof Error ? error.message : String(error)));
|
|
380
380
|
return false;
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
async function checkAndUpdateTools(skipPrompt = false) {
|
|
384
384
|
ensureI18nInitialized();
|
|
385
|
-
console.log(
|
|
385
|
+
console.log(ansis__default.bold.cyan(`
|
|
386
386
|
\u{1F50D} ${i18n.t("updater:checkingTools")}
|
|
387
387
|
`));
|
|
388
388
|
try {
|
|
@@ -392,7 +392,7 @@ async function checkAndUpdateTools(skipPrompt = false) {
|
|
|
392
392
|
}
|
|
393
393
|
} catch (error) {
|
|
394
394
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
395
|
-
console.warn(
|
|
395
|
+
console.warn(ansis__default.yellow(`\u26A0 Duplicate installation check failed: ${errorMessage}`));
|
|
396
396
|
}
|
|
397
397
|
const results = [];
|
|
398
398
|
try {
|
|
@@ -400,7 +400,7 @@ async function checkAndUpdateTools(skipPrompt = false) {
|
|
|
400
400
|
results.push({ tool: "CCR", success });
|
|
401
401
|
} catch (error) {
|
|
402
402
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
403
|
-
console.error(
|
|
403
|
+
console.error(ansis__default.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "CCR" })}: ${errorMessage}`));
|
|
404
404
|
results.push({ tool: "CCR", success: false, error: errorMessage });
|
|
405
405
|
}
|
|
406
406
|
console.log();
|
|
@@ -409,7 +409,7 @@ async function checkAndUpdateTools(skipPrompt = false) {
|
|
|
409
409
|
results.push({ tool: "Claude Code", success });
|
|
410
410
|
} catch (error) {
|
|
411
411
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
412
|
-
console.error(
|
|
412
|
+
console.error(ansis__default.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "Claude Code" })}: ${errorMessage}`));
|
|
413
413
|
results.push({ tool: "Claude Code", success: false, error: errorMessage });
|
|
414
414
|
}
|
|
415
415
|
console.log();
|
|
@@ -418,17 +418,17 @@ async function checkAndUpdateTools(skipPrompt = false) {
|
|
|
418
418
|
results.push({ tool: "CCometixLine", success });
|
|
419
419
|
} catch (error) {
|
|
420
420
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
421
|
-
console.error(
|
|
421
|
+
console.error(ansis__default.red(`\u274C ${format(i18n.t("updater:updateFailed"), { tool: "CCometixLine" })}: ${errorMessage}`));
|
|
422
422
|
results.push({ tool: "CCometixLine", success: false, error: errorMessage });
|
|
423
423
|
}
|
|
424
424
|
if (skipPrompt) {
|
|
425
|
-
console.log(
|
|
425
|
+
console.log(ansis__default.bold.cyan(`
|
|
426
426
|
\u{1F4CB} ${i18n.t("updater:updateSummary")}`));
|
|
427
427
|
for (const result of results) {
|
|
428
428
|
if (result.success) {
|
|
429
|
-
console.log(
|
|
429
|
+
console.log(ansis__default.green(`\u2714 ${result.tool}: ${i18n.t("updater:success")}`));
|
|
430
430
|
} else {
|
|
431
|
-
console.log(
|
|
431
|
+
console.log(ansis__default.red(`\u274C ${result.tool}: ${i18n.t("updater:failed")} ${result.error ? `(${result.error})` : ""}`));
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
}
|
package/dist/chunks/ccm.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process__default from 'node:process';
|
|
2
|
-
import
|
|
2
|
+
import ansis__default from 'ansis';
|
|
3
3
|
import { i18n } from './index2.mjs';
|
|
4
|
-
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.
|
|
4
|
+
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.BiJujy5w.mjs';
|
|
5
5
|
import { k as isCCMSupported, m as getCCMSupportMessage, f as isCCMInstalled, e as executeCCMCommand, l as launchCCM, j as setupCCMHooks } from '../shared/ccjk.CnZNdDGU.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
@@ -18,14 +18,14 @@ async function ccm(options = {}) {
|
|
|
18
18
|
await i18n.changeLanguage(options.lang);
|
|
19
19
|
}
|
|
20
20
|
if (!isCCMSupported()) {
|
|
21
|
-
console.log(
|
|
21
|
+
console.log(ansis__default.yellow(getCCMSupportMessage()));
|
|
22
22
|
process__default.exit(1);
|
|
23
23
|
}
|
|
24
24
|
const isInstalled = await isCCMInstalled();
|
|
25
25
|
if (options.action) {
|
|
26
26
|
if (!isInstalled && options.action !== "setup") {
|
|
27
|
-
console.error(
|
|
28
|
-
console.log(
|
|
27
|
+
console.error(ansis__default.red(i18n.t("ccm.macOSOnly")));
|
|
28
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
29
29
|
process__default.exit(1);
|
|
30
30
|
}
|
|
31
31
|
await executeCCMCommand(options.action);
|
|
@@ -34,8 +34,8 @@ async function ccm(options = {}) {
|
|
|
34
34
|
if (isInstalled) {
|
|
35
35
|
await launchCCM();
|
|
36
36
|
} else {
|
|
37
|
-
console.log(
|
|
38
|
-
console.log(
|
|
37
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
38
|
+
console.log(ansis__default.gray(i18n.t("ccm.settingUpHooks")));
|
|
39
39
|
await setupCCMHooks();
|
|
40
40
|
await launchCCM();
|
|
41
41
|
}
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as displayBannerWithInfo } from '../shared/ccjk.
|
|
2
|
-
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.
|
|
1
|
+
import { a as displayBannerWithInfo } from '../shared/ccjk.DjD9Rzxq.mjs';
|
|
2
|
+
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.BiJujy5w.mjs';
|
|
3
3
|
import { s as showCcrMenu, a as showMainMenu } from './menu.mjs';
|
|
4
4
|
import 'ansis';
|
|
5
5
|
import './package.mjs';
|
|
@@ -34,11 +34,12 @@ import '../shared/ccjk.CUdzQluX.mjs';
|
|
|
34
34
|
import './features.mjs';
|
|
35
35
|
import './init.mjs';
|
|
36
36
|
import './workflows.mjs';
|
|
37
|
+
import './manager.mjs';
|
|
37
38
|
import 'node:util';
|
|
38
39
|
import './auto-updater.mjs';
|
|
39
40
|
import './version-checker.mjs';
|
|
40
41
|
import 'node:path';
|
|
41
|
-
import '../shared/ccjk.
|
|
42
|
+
import '../shared/ccjk.XgW1H2t3.mjs';
|
|
42
43
|
import '../shared/ccjk.BjUZt6kx.mjs';
|
|
43
44
|
import '../shared/ccjk.CGMs4Om4.mjs';
|
|
44
45
|
import 'node:stream';
|
|
@@ -48,12 +49,14 @@ import './smart-guide.mjs';
|
|
|
48
49
|
import './ccu.mjs';
|
|
49
50
|
import './commands.mjs';
|
|
50
51
|
import './check-updates.mjs';
|
|
52
|
+
import './cloud-v5.mjs';
|
|
53
|
+
import '@clack/prompts';
|
|
51
54
|
import './config-switch.mjs';
|
|
52
55
|
import './claude-code-config-manager.mjs';
|
|
53
56
|
import './doctor.mjs';
|
|
54
57
|
import './api-providers.mjs';
|
|
55
58
|
import '../shared/ccjk.J8YiPsOw.mjs';
|
|
56
|
-
import '../shared/ccjk.
|
|
59
|
+
import '../shared/ccjk.C_3BYaWc.mjs';
|
|
57
60
|
import './notification.mjs';
|
|
58
61
|
import 'node:buffer';
|
|
59
62
|
import '@iarna/toml';
|
package/dist/chunks/ccu.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process__default from 'node:process';
|
|
2
|
-
import
|
|
2
|
+
import ansis__default from 'ansis';
|
|
3
3
|
import { x } from 'tinyexec';
|
|
4
4
|
import { i18n } from './index2.mjs';
|
|
5
5
|
import 'node:fs';
|
|
@@ -12,8 +12,8 @@ async function executeCcusage(args = []) {
|
|
|
12
12
|
try {
|
|
13
13
|
const command = "npx";
|
|
14
14
|
const commandArgs = ["ccusage@latest", ...args || []];
|
|
15
|
-
console.log(
|
|
16
|
-
console.log(
|
|
15
|
+
console.log(ansis__default.green(i18n.t("tools:runningCcusage")));
|
|
16
|
+
console.log(ansis__default.gray(`$ npx ccusage@latest ${(args || []).join(" ")}`));
|
|
17
17
|
console.log("");
|
|
18
18
|
await x(command, commandArgs, {
|
|
19
19
|
nodeOptions: {
|
|
@@ -21,10 +21,10 @@ async function executeCcusage(args = []) {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
} catch (error) {
|
|
24
|
-
console.error(
|
|
25
|
-
console.error(
|
|
24
|
+
console.error(ansis__default.red(i18n.t("tools:ccusageFailed")));
|
|
25
|
+
console.error(ansis__default.yellow(i18n.t("tools:checkNetworkConnection")));
|
|
26
26
|
if (process__default.env.DEBUG) {
|
|
27
|
-
console.error(
|
|
27
|
+
console.error(ansis__default.gray(i18n.t("tools:errorDetails")), error);
|
|
28
28
|
}
|
|
29
29
|
if (process__default.env.NODE_ENV !== "test") {
|
|
30
30
|
process__default.exit(1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process__default from 'node:process';
|
|
2
|
-
import
|
|
2
|
+
import ansis__default from 'ansis';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
4
4
|
import { r as resolveCodeType } from '../shared/ccjk.CUdzQluX.mjs';
|
|
5
5
|
import { checkAndUpdateTools } from './auto-updater.mjs';
|
|
@@ -76,7 +76,7 @@ async function checkUpdates(options = {}) {
|
|
|
76
76
|
codeType = await resolveCodeType(options.codeType);
|
|
77
77
|
} catch (err) {
|
|
78
78
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
79
|
-
console.error(
|
|
79
|
+
console.error(ansis__default.red(`${errorMessage}
|
|
80
80
|
Defaulting to "claude-code".`));
|
|
81
81
|
codeType = "claude-code";
|
|
82
82
|
}
|
|
@@ -84,7 +84,7 @@ Defaulting to "claude-code".`));
|
|
|
84
84
|
await scheduler.updateByCodeType(codeType, skipPrompt);
|
|
85
85
|
} catch (error) {
|
|
86
86
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
87
|
-
console.error(
|
|
87
|
+
console.error(ansis__default.red(`${i18n.t("updater:errorCheckingUpdates")} ${errorMessage}`));
|
|
88
88
|
process__default.exit(1);
|
|
89
89
|
}
|
|
90
90
|
}
|