ccman 3.0.8 → 3.0.10
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/index.js +24 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2050,7 +2050,7 @@ var import_inquirer2 = __toESM(require("inquirer"));
|
|
|
2050
2050
|
// ../core/package.json
|
|
2051
2051
|
var package_default = {
|
|
2052
2052
|
name: "@ccman/core",
|
|
2053
|
-
version: "3.0.
|
|
2053
|
+
version: "3.0.10",
|
|
2054
2054
|
type: "module",
|
|
2055
2055
|
description: "Core business logic for ccman",
|
|
2056
2056
|
main: "./dist/index.js",
|
|
@@ -2885,18 +2885,17 @@ async function handleAdd(tool) {
|
|
|
2885
2885
|
}
|
|
2886
2886
|
]);
|
|
2887
2887
|
const preset = presets.find((p) => p.name === presetName);
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
apiKey = inputApiKey;
|
|
2888
|
+
console.log(import_chalk2.default.blue(`
|
|
2889
|
+
\u4F7F\u7528\u9884\u8BBE: ${preset.name} - ${preset.description}
|
|
2890
|
+
`));
|
|
2891
|
+
const input = await promptProviderForm({
|
|
2892
|
+
name: preset.name,
|
|
2893
|
+
baseUrl: preset.baseUrl,
|
|
2894
|
+
apiKey: ""
|
|
2895
|
+
});
|
|
2896
|
+
name = input.name;
|
|
2897
|
+
baseUrl = input.baseUrl;
|
|
2898
|
+
apiKey = input.apiKey;
|
|
2900
2899
|
} else {
|
|
2901
2900
|
const answers = await import_inquirer.default.prompt([
|
|
2902
2901
|
{
|
|
@@ -2934,8 +2933,7 @@ async function handleAdd(tool) {
|
|
|
2934
2933
|
console.log(import_chalk2.default.green("\u2705 \u6DFB\u52A0\u6210\u529F"));
|
|
2935
2934
|
console.log();
|
|
2936
2935
|
console.log(` ${import_chalk2.default.bold(provider.name)} ${import_chalk2.default.blue(`[${toolName}]`)}`);
|
|
2937
|
-
console.log(` ${import_chalk2.default.gray(
|
|
2938
|
-
console.log(` ${import_chalk2.default.gray(`URL: ${provider.baseUrl}`)}`);
|
|
2936
|
+
console.log(` ${import_chalk2.default.gray(provider.baseUrl)}`);
|
|
2939
2937
|
console.log();
|
|
2940
2938
|
const { switchNow } = await import_inquirer.default.prompt([
|
|
2941
2939
|
{
|
|
@@ -2997,8 +2995,7 @@ async function handleList(tool) {
|
|
|
2997
2995
|
const marker = isCurrent ? import_chalk2.default.green("\u25CF") : import_chalk2.default.gray("\u25CB");
|
|
2998
2996
|
const nameStyle = isCurrent ? import_chalk2.default.green.bold : import_chalk2.default.white;
|
|
2999
2997
|
console.log(`${marker} ${nameStyle(p.name)}`);
|
|
3000
|
-
console.log(` ${import_chalk2.default.gray(
|
|
3001
|
-
console.log(` ${import_chalk2.default.gray(`URL: ${p.baseUrl}`)}`);
|
|
2998
|
+
console.log(` ${import_chalk2.default.gray(p.baseUrl)}`);
|
|
3002
2999
|
if (p.lastUsedAt) {
|
|
3003
3000
|
const date = new Date(p.lastUsedAt).toLocaleString("zh-CN");
|
|
3004
3001
|
console.log(` ${import_chalk2.default.gray(`\u6700\u540E\u4F7F\u7528: ${date}`)}`);
|
|
@@ -3026,8 +3023,7 @@ async function handleCurrent(tool) {
|
|
|
3026
3023
|
\u{1F441}\uFE0F \u5F53\u524D ${toolName} \u670D\u52A1\u5546
|
|
3027
3024
|
`));
|
|
3028
3025
|
console.log(` ${import_chalk2.default.green.bold(current.name)}`);
|
|
3029
|
-
console.log(` ${import_chalk2.default.gray(
|
|
3030
|
-
console.log(` ${import_chalk2.default.gray(`URL: ${current.baseUrl}`)}`);
|
|
3026
|
+
console.log(` ${import_chalk2.default.gray(current.baseUrl)}`);
|
|
3031
3027
|
if (current.lastUsedAt) {
|
|
3032
3028
|
const date = new Date(current.lastUsedAt).toLocaleString("zh-CN");
|
|
3033
3029
|
console.log(` ${import_chalk2.default.gray(`\u6700\u540E\u4F7F\u7528: ${date}`)}`);
|
|
@@ -3130,7 +3126,7 @@ async function handleClone(tool) {
|
|
|
3130
3126
|
});
|
|
3131
3127
|
console.log(import_chalk2.default.green("\n\u2705 \u514B\u9686\u6210\u529F\n"));
|
|
3132
3128
|
console.log(` ${import_chalk2.default.bold(newProvider.name)}`);
|
|
3133
|
-
console.log(` ${import_chalk2.default.gray(
|
|
3129
|
+
console.log(` ${import_chalk2.default.gray(newProvider.baseUrl)}`);
|
|
3134
3130
|
console.log();
|
|
3135
3131
|
}
|
|
3136
3132
|
async function handleRemove(tool) {
|
|
@@ -3257,8 +3253,7 @@ function addCommand(program2) {
|
|
|
3257
3253
|
console.log(import_chalk3.default.green("\u2705 \u6DFB\u52A0\u6210\u529F"));
|
|
3258
3254
|
console.log();
|
|
3259
3255
|
console.log(` ${import_chalk3.default.bold(provider.name)} ${import_chalk3.default.blue("[Codex]")}`);
|
|
3260
|
-
console.log(` ${import_chalk3.default.gray(
|
|
3261
|
-
console.log(` ${import_chalk3.default.gray(`URL: ${provider.baseUrl}`)}`);
|
|
3256
|
+
console.log(` ${import_chalk3.default.gray(provider.baseUrl)}`);
|
|
3262
3257
|
console.log();
|
|
3263
3258
|
const { switchNow } = await import_inquirer2.default.prompt([
|
|
3264
3259
|
{
|
|
@@ -3273,8 +3268,8 @@ function addCommand(program2) {
|
|
|
3273
3268
|
console.log(import_chalk3.default.green("\u2705 \u5DF2\u5207\u6362\u5230\u65B0\u670D\u52A1\u5546"));
|
|
3274
3269
|
console.log();
|
|
3275
3270
|
console.log(import_chalk3.default.gray("\u914D\u7F6E\u5DF2\u66F4\u65B0:"));
|
|
3276
|
-
console.log(import_chalk3.default.gray(
|
|
3277
|
-
console.log(import_chalk3.default.gray(
|
|
3271
|
+
console.log(import_chalk3.default.gray(` - ${getCodexConfigPath()}`));
|
|
3272
|
+
console.log(import_chalk3.default.gray(` - ${getCodexAuthPath()}`));
|
|
3278
3273
|
} else {
|
|
3279
3274
|
console.log(import_chalk3.default.blue("\u{1F4A1} \u7A0D\u540E\u5207\u6362:") + import_chalk3.default.white(` ccman cx use "${provider.name}"`));
|
|
3280
3275
|
}
|
|
@@ -3373,8 +3368,8 @@ function useCommand(program2) {
|
|
|
3373
3368
|
console.log(` ${import_chalk5.default.gray(`URL: ${provider.baseUrl}`)}`);
|
|
3374
3369
|
console.log();
|
|
3375
3370
|
console.log(import_chalk5.default.gray("\u914D\u7F6E\u5DF2\u66F4\u65B0:"));
|
|
3376
|
-
console.log(import_chalk5.default.gray(
|
|
3377
|
-
console.log(import_chalk5.default.gray(
|
|
3371
|
+
console.log(import_chalk5.default.gray(` - ${getCodexConfigPath()}`));
|
|
3372
|
+
console.log(import_chalk5.default.gray(` - ${getCodexAuthPath()}`));
|
|
3378
3373
|
console.log();
|
|
3379
3374
|
} catch (error) {
|
|
3380
3375
|
if (error instanceof ProviderNotFoundError) {
|
|
@@ -3742,8 +3737,7 @@ function addCommand2(program2) {
|
|
|
3742
3737
|
console.log(import_chalk10.default.green("\u2705 \u6DFB\u52A0\u6210\u529F"));
|
|
3743
3738
|
console.log();
|
|
3744
3739
|
console.log(` ${import_chalk10.default.bold(provider.name)} ${import_chalk10.default.blue("[Claude Code]")}`);
|
|
3745
|
-
console.log(` ${import_chalk10.default.gray(
|
|
3746
|
-
console.log(` ${import_chalk10.default.gray(`URL: ${provider.baseUrl}`)}`);
|
|
3740
|
+
console.log(` ${import_chalk10.default.gray(provider.baseUrl)}`);
|
|
3747
3741
|
console.log();
|
|
3748
3742
|
const { switchNow } = await import_inquirer7.default.prompt([
|
|
3749
3743
|
{
|
|
@@ -3758,7 +3752,7 @@ function addCommand2(program2) {
|
|
|
3758
3752
|
console.log(import_chalk10.default.green("\u2705 \u5DF2\u5207\u6362\u5230\u65B0\u670D\u52A1\u5546"));
|
|
3759
3753
|
console.log();
|
|
3760
3754
|
console.log(import_chalk10.default.gray("\u914D\u7F6E\u5DF2\u66F4\u65B0:"));
|
|
3761
|
-
console.log(import_chalk10.default.gray(
|
|
3755
|
+
console.log(import_chalk10.default.gray(` - ${getClaudeConfigPath()}`));
|
|
3762
3756
|
} else {
|
|
3763
3757
|
console.log(import_chalk10.default.blue("\u{1F4A1} \u7A0D\u540E\u5207\u6362:") + import_chalk10.default.white(` ccman cc use "${provider.name}"`));
|
|
3764
3758
|
}
|
|
@@ -3857,8 +3851,7 @@ function useCommand2(program2) {
|
|
|
3857
3851
|
console.log(` ${import_chalk12.default.gray(`URL: ${provider.baseUrl}`)}`);
|
|
3858
3852
|
console.log();
|
|
3859
3853
|
console.log(import_chalk12.default.gray("\u914D\u7F6E\u5DF2\u66F4\u65B0:"));
|
|
3860
|
-
console.log(import_chalk12.default.gray(
|
|
3861
|
-
console.log(import_chalk12.default.gray(" - ~/.claude/auth.json"));
|
|
3854
|
+
console.log(import_chalk12.default.gray(` - ${getClaudeConfigPath()}`));
|
|
3862
3855
|
console.log();
|
|
3863
3856
|
} catch (error) {
|
|
3864
3857
|
if (error instanceof ProviderNotFoundError) {
|