mine-auto-cli 2.7.4 → 2.8.0

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 CHANGED
@@ -1,261 +1,261 @@
1
- import { program as g } from "commander";
2
- import l from "chalk";
3
- import { readFileSync as h, writeFileSync as v, existsSync as $, readdirSync as je, cpSync as _, rmSync as Ce } from "fs";
4
- import { join as y, resolve as f } from "path";
1
+ import { program as u } from "commander";
2
+ import p from "chalk";
3
+ import { readFileSync as y, writeFileSync as v, existsSync as $, readdirSync as Se, cpSync as O, rmSync as we } from "fs";
4
+ import { join as j, resolve as f } from "path";
5
5
  import oe from "log-symbols";
6
- import we from "ora";
6
+ import Ce from "ora";
7
7
  import { execSync as k } from "child_process";
8
8
  import be from "js-yaml";
9
- import ke from "strip-json-comments";
10
- import Oe from "pacote";
11
- import { parseRange as D } from "semver-utils";
12
- import xe from "download-git-repo";
13
- import q from "inquirer";
9
+ import xe from "strip-json-comments";
10
+ import ke from "pacote";
11
+ import { parseRange as V } from "semver-utils";
12
+ import Oe from "download-git-repo";
13
+ import H from "inquirer";
14
14
  import se from "os";
15
- import Ae from "update-notifier";
16
- const re = "mine-auto-cli", ce = "2.7.4", Ne = "./dist/index.js", Pe = "./dist/index.js", Ie = "module", Ee = { auto: "bin/mine-auto-cli.js" }, Je = { name: "biaov", email: "biaov@qq.com", url: "https://biaov.cn" }, Me = "一个将多个命令简化成一个命令的工具 😆", Le = { start: "npm run dev", dev: "npm run build -- --watch", build: "vite build", prettier: "prettier --write '**/*.{js,ts,md,json}'", tag: "node scripts/tag" }, Re = { registry: "https://registry.npmjs.org/", "engine-strict": !0, provenance: !0 }, De = { node: ">=24.x" }, Ve = ["auto", "cli", "vite", "typescript"], Te = { type: "git", url: "git+https://github.com/biaov/mine-auto-cli.git" }, _e = "https://github.com/biaov/mine-auto-cli.git", Fe = { url: "https://github.com/biaov/mine-auto-cli/issues" }, Ue = "ISC", He = [{ name: "biaov", email: "biaov@qq.com" }], qe = { chalk: "^5.6.2", commander: "^14.0.3", "download-git-repo": "^3.0.2", inquirer: "^13.3.0", "js-yaml": "^4.1.1", "log-symbols": "^7.0.1", ora: "^9.3.0", pacote: "^21.4.0", "semver-utils": "^1.1.4", "strip-json-comments": "^5.0.3", "update-notifier": "^7.3.1" }, Be = { "@types/js-yaml": "^4.0.9", "@types/node": "^25.3.3", "@types/pacote": "^11.1.8", "@types/semver-utils": "^1.1.3", "@types/update-notifier": "^6.0.8", prettier: "^3.8.1", typescript: "^5.9.3", vite: "^7.3.1" }, I = {
15
+ import Pe from "update-notifier";
16
+ const re = "mine-auto-cli", ce = "2.8.0", Ee = "./dist/index.js", Ae = "./dist/index.js", Ne = "module", Ie = { auto: "bin/mine-auto-cli.js" }, Me = { name: "biaov", email: "biaov@qq.com", url: "https://biaov.cn" }, Je = "一个将多个命令简化成一个命令的工具 😆", Le = { start: "npm run dev", dev: "npm run build -- --watch", build: "vite build", prettier: "prettier --write '**/*.{js,ts,md,json}'", tag: "node scripts/tag" }, Re = { registry: "https://registry.npmjs.org/", "engine-strict": !0, provenance: !0 }, De = { node: ">=24.x" }, Ve = ["auto", "cli", "vite", "typescript"], Te = { type: "git", url: "git+https://github.com/biaov/mine-auto-cli.git" }, Be = "https://github.com/biaov/mine-auto-cli.git", _e = { url: "https://github.com/biaov/mine-auto-cli/issues" }, Fe = "ISC", Ue = [{ name: "biaov", email: "biaov@qq.com" }], He = { chalk: "^5.6.2", commander: "^14.0.3", "download-git-repo": "^3.0.2", inquirer: "^13.3.0", "js-yaml": "^4.1.1", "log-symbols": "^7.0.1", ora: "^9.3.0", pacote: "^21.4.0", "semver-utils": "^1.1.4", "strip-json-comments": "^5.0.3", "update-notifier": "^7.3.1" }, qe = { "@types/js-yaml": "^4.0.9", "@types/node": "^25.3.3", "@types/pacote": "^11.1.8", "@types/semver-utils": "^1.1.3", "@types/update-notifier": "^6.0.8", prettier: "^3.8.1", typescript: "^5.9.3", vite: "^7.3.1" }, I = {
17
17
  name: re,
18
18
  private: !1,
19
19
  version: ce,
20
- exports: Ne,
21
- main: Pe,
22
- type: Ie,
23
- bin: Ee,
24
- author: Je,
25
- description: Me,
20
+ exports: Ee,
21
+ main: Ae,
22
+ type: Ne,
23
+ bin: Ie,
24
+ author: Me,
25
+ description: Je,
26
26
  scripts: Le,
27
27
  publishConfig: Re,
28
28
  engines: De,
29
29
  keywords: Ve,
30
30
  repository: Te,
31
- homepage: _e,
32
- bugs: Fe,
33
- license: Ue,
34
- contributors: He,
35
- dependencies: qe,
36
- devDependencies: Be
37
- }, u = (e) => {
38
- console.log(`${oe.success} ${l.green("SUCCESS")} ${e}`);
31
+ homepage: Be,
32
+ bugs: _e,
33
+ license: Fe,
34
+ contributors: Ue,
35
+ dependencies: He,
36
+ devDependencies: qe
37
+ }, h = (e) => {
38
+ console.log(`${oe.success} ${p.green("SUCCESS")} ${e}`);
39
39
  }, S = (e) => {
40
- console.log(`${re} ${oe.error} ${l.red("ERROR")} ${e}`);
40
+ console.log(`${re} ${oe.error} ${p.red("ERROR")} ${e}`);
41
41
  }, a = (e) => {
42
42
  console.log(e ?? "");
43
43
  }, ie = (e) => {
44
- a(`开始执行 ${l.cyanBright(e)} 命令`);
45
- const t = we({ text: "正在执行命令中...", color: "yellow" });
44
+ a(`开始执行 ${p.cyanBright(e)} 命令`);
45
+ const t = Ce({ text: "正在执行命令中...", color: "yellow" });
46
46
  t.start();
47
47
  const s = k(e, { cwd: process.cwd() });
48
- a(s.toString()), t.succeed(`${l.green(e)} 命令执行成功`), a();
48
+ a(s.toString()), t.succeed(`${p.green(e)} 命令执行成功`), a();
49
49
  }, Ge = (e) => ["git add -A", `git commit -m ${e}`, "git push"], ze = (e, t) => [`npm run ${e}`, "git add -A", `git commit -m ${t}`, "git push"], Ke = async (e, t = "打包") => {
50
- a(), a(`${l.yellow(">>")} 开始依次执行命令...`), a(), ze(e, t).map(ie), u("全部命令执行完成"), a();
51
- }, B = (e) => {
52
- a(), S(`\`${e}\` 命令错误,请检查你的命令`), a(), g.help();
50
+ a(), a(`${p.yellow(">>")} 开始依次执行命令...`), a(), ze(e, t).map(ie), h("全部命令执行完成"), a();
51
+ }, q = (e) => {
52
+ a(), S(`\`${e}\` 命令错误,请检查你的命令`), a(), u.help();
53
53
  }, G = (e) => {
54
54
  const t = ["package.json", "README.md"].map((r) => {
55
- const c = y(process.cwd(), r), i = h(c).toString();
55
+ const c = j(process.cwd(), r), i = y(c).toString();
56
56
  return { path: c, content: i };
57
- }), [s, n] = t, o = JSON.parse(s.content);
57
+ }), [s, o] = t, n = JSON.parse(s.content);
58
58
  if (e)
59
- o.version = e;
59
+ n.version = e;
60
60
  else {
61
- const r = o.version.split(".").reduce((c, i, p, m) => c + (p === m.length - 1 ? +i + 1 : `${i}.`), "");
62
- o.version = r;
61
+ const r = n.version.split(".").reduce((c, i, l, m) => c + (l === m.length - 1 ? +i + 1 : `${i}.`), "");
62
+ n.version = r;
63
63
  }
64
- v(s.path, JSON.stringify(o, null, 2)), n.content = n.content.replace(/version\-v.+\-blue/, () => `version-v${o.version}-blue`), v(n.path, n.content);
64
+ v(s.path, JSON.stringify(n, null, 2)), o.content = o.content.replace(/version\-v.+\-blue/, () => `version-v${n.version}-blue`), v(o.path, o.content);
65
65
  }, Ye = async (e) => {
66
66
  const t = e.split("version")[1];
67
- if (!t) return B(e);
68
- const s = JSON.parse(h(y(process.cwd(), "package.json")).toString());
67
+ if (!t) return q(e);
68
+ const s = JSON.parse(y(j(process.cwd(), "package.json")).toString());
69
69
  if (t === "++") {
70
- const o = s.version.split(".").reduce((r, c, i, p) => r + (i === p.length - 1 ? +c + 1 : `${c}.`), "");
71
- G(o), a(), u("命令执行完成");
70
+ const n = s.version.split(".").reduce((r, c, i, l) => r + (i === l.length - 1 ? +c + 1 : `${c}.`), "");
71
+ G(n), a(), h("命令执行完成");
72
72
  return;
73
73
  }
74
- const n = t.split("@")[1];
75
- n ? (G(n), a(), u("命令执行完成")) : B(e);
74
+ const o = t.split("@")[1];
75
+ o ? (G(o), a(), h("命令执行完成")) : q(e);
76
76
  }, Ze = (e, t) => {
77
77
  if (e.includes("build")) return Ke(e, t);
78
78
  if (e.includes("version")) return Ye(e);
79
- S(l.hex("#f56c6c")(`\`auto ${e}${t ? ` ${t}` : ""}\` 命令不存在`)), g.help();
80
- }, b = "https://gitee.com/biaovorg/project-template.git", Qe = {
81
- vue: b,
82
- react: b,
83
- "uni-app": b,
84
- electron: b,
85
- node: b,
86
- "node-simple": b
79
+ S(p.hex("#f56c6c")(`\`auto ${e}${t ? ` ${t}` : ""}\` 命令不存在`)), u.help();
80
+ }, x = "https://gitee.com/biaovorg/project-template.git", Qe = {
81
+ vue: x,
82
+ react: x,
83
+ "uni-app": x,
84
+ electron: x,
85
+ node: x,
86
+ "node-simple": x
87
87
  }, We = Object.keys(Qe);
88
88
  We.reduce((e, t, s) => e + (s ? ", " : "") + t, "");
89
89
  const C = (e = "jsonc") => `auto-cli.${e}`;
90
90
  f(import.meta.dirname, "./presetData.json");
91
- const F = (e, t = !1) => {
91
+ const _ = (e, t = !1) => {
92
92
  if (!$(e)) return t ? {} : "";
93
- const s = h(e).toString();
94
- return t ? JSON.parse(ke(s)) : s;
93
+ const s = y(e).toString();
94
+ return t ? JSON.parse(xe(s)) : s;
95
95
  }, Xe = (e) => {
96
96
  if (!$(e)) return {};
97
- const t = h(e).toString();
97
+ const t = y(e).toString();
98
98
  try {
99
99
  return be.load(t);
100
100
  } catch {
101
101
  return {};
102
102
  }
103
- }, ae = (e = !1) => F(f(import.meta.dirname, C()), e), le = () => {
104
- const [e, t] = [C(), C("yml")].map((n) => f(process.cwd(), n)), s = ae(!0);
103
+ }, ae = (e = !1) => _(f(import.meta.dirname, C()), e), le = () => {
104
+ const [e, t] = [C(), C("yml")].map((o) => f(process.cwd(), o)), s = ae(!0);
105
105
  try {
106
- Object.assign(s, Xe(t), F(e, !0));
106
+ Object.assign(s, Xe(t), _(e, !0));
107
107
  } catch {
108
108
  }
109
109
  return s;
110
110
  }, et = (e, t = !1) => {
111
111
  let s = ae(t);
112
112
  return t && (s = JSON.stringify(s, null, 2)), e.includes(".yml") ? s.trim().split(`
113
- `).slice(1, -1).reduce((n, o) => n + o.trim().replace(/[",]/g, "").replace("// ", "# ") + `
113
+ `).slice(1, -1).reduce((o, n) => o + n.trim().replace(/[",]/g, "").replace("// ", "# ") + `
114
114
  `, "") : s;
115
115
  }, pe = (e, t, s = " ") => Array.from({ length: t - e }, () => s).join(""), tt = ({ yml: e, uncomment: t, force: s }) => {
116
116
  a();
117
- const n = C(e ? "yml" : "jsonc"), o = f(process.cwd(), n);
118
- if ($(o) && !s) {
119
- a(l.yellow(`${n} 文件已存在`)), a(), a(l.yellow(`文件目录 ${o}`));
117
+ const o = C(e ? "yml" : "jsonc"), n = f(process.cwd(), o);
118
+ if ($(n) && !s) {
119
+ a(p.yellow(`${o} 文件已存在`)), a(), a(p.yellow(`文件目录 ${n}`));
120
120
  return;
121
121
  }
122
- v(o, et(n, t)), u(`${n} 文件创建成功`), a(), a(l.green(`文件目录 ${o}`));
122
+ v(n, et(o, t)), h(`${o} 文件创建成功`), a(), a(p.green(`文件目录 ${n}`));
123
123
  };
124
- g.command("init").option("-f, --force", `强制替换 ${C()} 文件内容`, !1).option("--unc, --uncomment", `取消生成 ${C()} 带注释`, !1).option("-y, --yml", `生成 ${C("yml")} 文件`, !1).description("初始化配置文件").action(tt);
124
+ u.command("init").option("-f, --force", `强制替换 ${C()} 文件内容`, !1).option("--unc, --uncomment", `取消生成 ${C()} 带注释`, !1).option("-y, --yml", `生成 ${C("yml")} 文件`, !1).description("初始化配置文件").action(tt);
125
125
  const nt = async (e = "更新代码") => {
126
- a(), a(`${l.yellow(">>")} 开始依次执行命令...`), a(), Ge(e).forEach(ie), u("全部命令执行完成"), a();
126
+ a(), a(`${p.yellow(">>")} 开始依次执行命令...`), a(), Ge(e).forEach(ie), h("全部命令执行完成"), a();
127
127
  };
128
- g.command("git [描述]").description("简化 Git 提交命令").action(nt);
128
+ u.command("git [描述]").description("简化 Git 提交命令").action(nt);
129
129
  const z = ["dist", "node_modules", ".git", "miniprogram_npm"];
130
- let J = 0, me = !1, V = !1, de = 20;
131
- const K = ({ prev: e, i: t, index: s, arr: n, curText: o }) => {
132
- const r = Array.from({ length: t }).reduce((m) => m + `${t === 1 && s === n.length - 1 ? "└ " : "│ "} `, ""), c = e + r, i = (r + o).length, p = Array.from({ length: de + J - i }).reduce((m) => `${m}-`, " ");
133
- return !me && (J = Math.max(J, i)), `${c}${o}${V ? p : ""}
130
+ let J = 0, me = !1, T = !1, de = 20;
131
+ const K = ({ prev: e, i: t, index: s, arr: o, curText: n }) => {
132
+ const r = Array.from({ length: t }).reduce((m) => m + `${t === 1 && s === o.length - 1 ? "└ " : "│ "} `, ""), c = e + r, i = (r + n).length, l = Array.from({ length: de + J - i }).reduce((m) => `${m}-`, " ");
133
+ return !me && (J = Math.max(J, i)), `${c}${n}${T ? l : ""}
134
134
  `;
135
- }, T = (e, t = 0) => e.reduce((s, n, o, r) => {
135
+ }, B = (e, t = 0) => e.reduce((s, o, n, r) => {
136
136
  let c;
137
- return n.children ? (c = `├── ${n.name}`, K({ prev: s, i: t, index: o, arr: r, curText: c }) + T(n.children, t + 1)) : (c = `${o === r.length - 1 ? "└── " : "├── "}${n.name}`, K({ prev: s, i: t, index: o, arr: r, curText: c }));
138
- }, ""), Y = (e) => je(e, { withFileTypes: !0 }).sort((t, s) => +s.isDirectory() - +t.isDirectory()), ot = ({ line: e, name: t }) => {
139
- V = !!e, typeof e == "string" && (de = +e);
140
- const s = process.cwd(), n = y(s, ".gitignore");
141
- if ($(n)) {
142
- const p = h(n).toString().split(`\r
137
+ return o.children ? (c = `├── ${o.name}`, K({ prev: s, i: t, index: n, arr: r, curText: c }) + B(o.children, t + 1)) : (c = `${n === r.length - 1 ? "└── " : "├── "}${o.name}`, K({ prev: s, i: t, index: n, arr: r, curText: c }));
138
+ }, ""), Y = (e) => Se(e, { withFileTypes: !0 }).sort((t, s) => +s.isDirectory() - +t.isDirectory()), ot = ({ line: e, name: t }) => {
139
+ T = !!e, typeof e == "string" && (de = +e);
140
+ const s = process.cwd(), o = j(s, ".gitignore");
141
+ if ($(o)) {
142
+ const l = y(o).toString().split(`\r
143
143
  `);
144
- z.push(...p);
144
+ z.push(...l);
145
145
  }
146
- const o = s.split("\\").at(-1), c = Y(s).map((p) => {
147
- const { name: m } = p, d = { name: m };
148
- return !z.includes(m) && p.isDirectory() && (d.children = Y(y(p.path, m)).map(({ name: O }) => ({ name: O }))), d;
149
- }), i = [{ name: o, children: c }];
150
- V && (T(i), me = !0), v(y(s, `${typeof t == "string" && t || "directory"}.md`), T(i));
146
+ const n = s.split("\\").at(-1), c = Y(s).map((l) => {
147
+ const { name: m } = l, d = { name: m };
148
+ return !z.includes(m) && l.isDirectory() && (d.children = Y(j(l.path, m)).map(({ name: g }) => ({ name: g }))), d;
149
+ }), i = [{ name: n, children: c }];
150
+ T && (B(i), me = !0), v(j(s, `${typeof t == "string" && t || "directory"}.md`), B(i));
151
151
  };
152
- g.command("mkdir").option("-l, --line [数量]", "数量", !1).option("-n, --name [文件名称]", "文件名称", !1).option("-d, --depth [深度值]", "深度值", "3").description("生成目录结构文件").action(ot);
153
- const x = le(), [M] = ["package.json"].map((e) => f(process.cwd(), e)), st = (e, t) => {
154
- const s = Array.from({ length: t }, (c, i) => i < e ? "=" : " ").join(""), n = ~~(e / t * 100), o = `\r查找进度:[${s}] ${e}/${t} ${n}%\r`, r = e === t ? l.green(o) : l.yellow(o);
152
+ u.command("mkdir").option("-l, --line [数量]", "数量", !1).option("-n, --name [文件名称]", "文件名称", !1).option("-d, --depth [深度值]", "深度值", "3").description("生成目录结构文件").action(ot);
153
+ const P = le(), [L] = ["package.json"].map((e) => f(process.cwd(), e)), st = (e, t) => {
154
+ const s = Array.from({ length: t }, (c, i) => i < e ? "=" : " ").join(""), o = ~~(e / t * 100), n = `\r查找进度:[${s}] ${e}/${t} ${o}%\r`, r = e === t ? p.green(n) : p.yellow(n);
155
155
  process.stdout.write(r);
156
156
  }, rt = (e, t, s) => {
157
- let n = "latest";
158
- x.resolve.some((r) => {
157
+ let o = "latest";
158
+ P.resolve.some((r) => {
159
159
  const c = r.lastIndexOf("@");
160
160
  if (c <= 0) return !0;
161
- const i = r.slice(0, c), p = r.slice(c + 1);
161
+ const i = r.slice(0, c), l = r.slice(c + 1);
162
162
  if (e === i)
163
- return n = p, !0;
163
+ return o = l, !0;
164
164
  });
165
- const o = x.prefix + s[n];
166
- return { name: e, value: t, newVersion: o, tag: n };
165
+ const n = P.prefix + s[o];
166
+ return { name: e, value: t, newVersion: n, tag: o };
167
167
  }, ct = (e, t) => (+!t + 1) * e.length, Z = (e) => {
168
- const [{ major: t = 0, minor: s = 0, patch: n = 0, release: o = "" }] = D(e);
169
- return [+t, +s, +n, o];
170
- }, L = (e, t) => e ? "-" + l[t](e) : "", it = (e, t) => {
171
- const [s, n, o, r] = Z(e), [c, i, p, m] = Z(t);
172
- return c > s ? l.red(t) : c < s ? !1 : i > n ? `${c}.${l.yellow(i)}.${l.yellow(p)}${L(m, "yellow")}` : i < n ? !1 : p > o ? `${c}.${i}.${l.green(p)}${L(m, "green")}` : p === o && m && m !== r ? `${c}.${i}.${p}${L(m, "green")}` : !1;
168
+ const [{ major: t = 0, minor: s = 0, patch: o = 0, release: n = "" }] = V(e);
169
+ return [+t, +s, +o, n];
170
+ }, R = (e, t) => e ? "-" + p[t](e) : "", it = (e, t) => {
171
+ const [s, o, n, r] = Z(e), [c, i, l, m] = Z(t);
172
+ return c > s ? p.red(t) : c < s ? !1 : i > o ? `${c}.${p.yellow(i)}.${p.yellow(l)}${R(m, "yellow")}` : i < o ? !1 : l > n ? `${c}.${i}.${p.green(l)}${R(m, "green")}` : l === n && m && m !== r ? `${c}.${i}.${l}${R(m, "green")}` : !1;
173
173
  }, at = (e) => {
174
174
  const t = {};
175
- e.forEach((n) => {
176
- Object.entries(n).forEach(([o, r]) => {
177
- t[o] = Math.max(r.length, t[o] ?? 0);
175
+ e.forEach((o) => {
176
+ Object.entries(o).forEach(([n, r]) => {
177
+ t[n] = Math.max(r.length, t[n] ?? 0);
178
178
  });
179
179
  }), e.unshift({ name: "包名", value: "版本", newVersion: "新版本", tag: "标签" });
180
180
  const s = [];
181
- e.forEach(({ name: n, value: o, newVersion: r, tag: c }, i) => {
182
- const [p, m, d, O] = Object.entries({ name: n, value: o, newVersion: r, tag: c }).map(([N, Se]) => pe(ct(Se, i), t[N]));
183
- let w = l.yellow("→"), H = !0;
181
+ e.forEach(({ name: o, value: n, newVersion: r, tag: c }, i) => {
182
+ const [l, m, d, g] = Object.entries({ name: o, value: n, newVersion: r, tag: c }).map(([A, je]) => pe(ct(je, i), t[A]));
183
+ let b = p.yellow("→"), U = !0;
184
184
  if (i) {
185
- const N = it(o, r);
186
- N ? r = N : H = !1;
185
+ const A = it(n, r);
186
+ A ? r = A : U = !1;
187
187
  } else
188
- n = l.green(n), o = l.green(o), r = l.green(r), c = l.green(c), w = " ";
189
- const ve = `${n + p} ${m + o} ${w} ${d + r} ${O + c}`;
190
- H && s.push(ve);
191
- }), s.length > 1 ? s.forEach(a) : u("所有版本已是最新");
188
+ o = p.green(o), n = p.green(n), r = p.green(r), c = p.green(c), b = " ";
189
+ const ve = `${o + l} ${m + n} ${b} ${d + r} ${g + c}`;
190
+ U && s.push(ve);
191
+ }), s.length > 1 ? s.forEach(a) : h("所有版本已是最新");
192
192
  }, lt = async (e, t, s) => {
193
193
  a();
194
- let n = 0;
195
- const o = [], r = Object.entries(e), c = r.map(async ([i, p]) => {
196
- const m = await Oe.packument(i, { registry: x.registry }), d = rt(i, p, m["dist-tags"]);
197
- o.push(d), t.forEach((O) => {
198
- const w = s[O];
199
- w && w[i] && (w[i] = d.newVersion);
200
- }), n++, await st(n, r.length);
194
+ let o = 0;
195
+ const n = [], r = Object.entries(e), c = r.map(async ([i, l]) => {
196
+ const m = await ke.packument(i, { registry: P.registry }), d = rt(i, l, m["dist-tags"]);
197
+ n.push(d), t.forEach((g) => {
198
+ const b = s[g];
199
+ b && b[i] && (b[i] = d.newVersion);
200
+ }), o++, await st(o, r.length);
201
201
  });
202
- return await Promise.all(c), a(), a(), o;
202
+ return await Promise.all(c), a(), a(), n;
203
203
  }, pt = async ({ update: e }) => {
204
- if (!$(M)) return S("package.json 文件不存在");
205
- const t = e || x.check, s = h(M).toString(), n = JSON.parse(s), o = ["dependencies", "devDependencies", "optionalDependencies"], r = {}, c = JSON.parse(s);
206
- o.forEach((p) => {
207
- n[p] && Object.entries(n[p]).forEach(([m, d]) => {
208
- !x.reject.includes(m) && (r[m] = d);
204
+ if (!$(L)) return S("package.json 文件不存在");
205
+ const t = e || P.check, s = y(L).toString(), o = JSON.parse(s), n = ["dependencies", "devDependencies", "optionalDependencies"], r = {}, c = JSON.parse(s);
206
+ n.forEach((l) => {
207
+ o[l] && Object.entries(o[l]).forEach(([m, d]) => {
208
+ !P.reject.includes(m) && (r[m] = d);
209
209
  });
210
210
  });
211
- const i = await lt(r, o, c);
212
- t ? (v(M, JSON.stringify(c, null, 2)), u("文件 package.json 已更新"), a()) : at(i);
211
+ const i = await lt(r, n, c);
212
+ t ? (v(L, JSON.stringify(c, null, 2)), h("文件 package.json 已更新"), a()) : at(i);
213
213
  };
214
- g.command("check").option("-u, --update", "更新 package.json 依赖内容", !1).description("升级 package.json 依赖版本").action(pt);
215
- const mt = le(), ge = "comment.md", dt = ["package.json", ge], [Q, W] = dt.map((e) => f(process.cwd(), e)), gt = () => {
214
+ u.command("check").option("-u, --update", "更新 package.json 依赖内容", !1).description("升级 package.json 依赖版本").action(pt);
215
+ const mt = le(), ue = "comment.md", dt = ["package.json", ue], [Q, W] = dt.map((e) => f(process.cwd(), e)), ut = () => {
216
216
  if (!$(Q)) return S("package.json 文件不存在");
217
- const e = h(Q).toString(), t = JSON.parse(e), s = ["dependencies", "devDependencies", "optionalDependencies"];
218
- let n = `### 依赖解析
217
+ const e = y(Q).toString(), t = JSON.parse(e), s = ["dependencies", "devDependencies", "optionalDependencies"];
218
+ let o = `### 依赖解析
219
219
 
220
220
  `;
221
- s.forEach((o) => {
222
- t[o] && (n += `#### ${o}
221
+ s.forEach((n) => {
222
+ t[n] && (o += `#### ${n}
223
223
 
224
- `, Object.keys(t[o]).forEach((r) => {
225
- n += `- \`${r}\`: ${mt.comment[r] || ""}
224
+ `, Object.keys(t[n]).forEach((r) => {
225
+ o += `- \`${r}\`: ${mt.comment[r] || ""}
226
226
  `;
227
- }), n += `
227
+ }), o += `
228
228
  `);
229
- }), n = n.slice(0, -1), v(W, n), a(), u(`${ge} 文件创建成功`), a(), a(l.green(`文件目录 ${W}`));
229
+ }), o = o.slice(0, -1), v(W, o), a(), h(`${ue} 文件创建成功`), a(), a(p.green(`文件目录 ${W}`));
230
230
  };
231
- g.command("comment").description("生成依赖注释文件").action(gt);
232
- const X = { recursive: !0, force: !0 }, ut = () => {
233
- const e = `${+/* @__PURE__ */ new Date()}`, t = y(process.cwd()), s = y(t, e);
234
- xe("direct:https://gitee.com/biaovorg/vscode-config.git#master", s, { clone: !0 }, async (n) => {
235
- !n && _(y(s, ".vscode"), y(t, ".vscode"), X), Ce(s, X);
231
+ u.command("comment").description("生成依赖注释文件").action(ut);
232
+ const X = { recursive: !0, force: !0 }, gt = () => {
233
+ const e = `${+/* @__PURE__ */ new Date()}`, t = j(process.cwd()), s = j(t, e);
234
+ Oe("direct:https://gitee.com/biaovorg/vscode-config.git#master", s, { clone: !0 }, async (o) => {
235
+ !o && O(j(s, ".vscode"), j(t, ".vscode"), X), we(s, X);
236
236
  });
237
237
  };
238
- g.command("vscode-config").description("更新 .vscode 配置文件").action(ut);
239
- const ue = (e, t, s) => {
240
- const n = Object.entries(t), o = n.findIndex(([i]) => e === i), [r, c] = n[o];
238
+ u.command("vscode-config").description("更新 .vscode 配置文件").action(gt);
239
+ const ge = (e, t, s) => {
240
+ const o = Object.entries(t), n = o.findIndex(([i]) => e === i), [r, c] = o[n];
241
241
  if (c) {
242
- if (s[r] === c) return o === n.length - 1 ? !0 : ue(n[o + 1][0], t, s);
242
+ if (s[r] === c) return n === o.length - 1 ? !0 : ge(o[n + 1][0], t, s);
243
243
  } else
244
244
  return !0;
245
245
  }, ee = (e) => {
246
- e && (k(`nvm use ${e}`), a(), u(`切换成功 当前版本:${e}`), a());
247
- }, R = (e) => {
246
+ e && (k(`nvm use ${e}`), a(), h(`切换成功 当前版本:${e}`), a());
247
+ }, D = (e) => {
248
248
  e && k(`nvm install ${e}`);
249
249
  }, ft = (e, t) => {
250
- const s = k("nvm ls").toString(), n = D(s), [{ major: o, minor: r, patch: c }] = D(e), i = [], p = n.find((m) => {
251
- if (m.major === o)
252
- return i.push(m), ue("minor", { minor: r, patch: c }, m);
250
+ const s = k("nvm ls").toString(), o = V(s), [{ major: n, minor: r, patch: c }] = V(e), i = [], l = o.find((m) => {
251
+ if (m.major === n)
252
+ return i.push(m), ge("minor", { minor: r, patch: c }, m);
253
253
  });
254
- if (p)
255
- ee(p.semver);
256
- else if (a(), a(l.red(`输入的版本 ${e} 不存在`)), a(), i.length) {
254
+ if (l)
255
+ ee(l.semver);
256
+ else if (a(), a(p.red(`输入的版本 ${e} 不存在`)), a(), i.length) {
257
257
  const m = i.map((d) => d.semver);
258
- q.prompt({
258
+ H.prompt({
259
259
  type: "list",
260
260
  name: "preset",
261
261
  message: "请选择相似版本或输入版本进行安装:",
@@ -264,110 +264,125 @@ const ue = (e, t, s) => {
264
264
  if (d !== "取消")
265
265
  if (d === e) {
266
266
  if (!c) return;
267
- R(d);
267
+ D(d);
268
268
  } else
269
269
  ee(d);
270
270
  });
271
271
  } else {
272
272
  if (!c) return;
273
273
  if (t.install) {
274
- R(e);
274
+ D(e);
275
275
  return;
276
276
  }
277
- q.prompt({
277
+ H.prompt({
278
278
  type: "confirm",
279
279
  name: "isInstall",
280
280
  message: `是否安装 ${e}?`
281
281
  }).then(({ isInstall: m }) => {
282
- m && R(e);
282
+ m && D(e);
283
283
  });
284
284
  }
285
285
  };
286
- g.command("node [版本号]").option("-i, --install", "是否安装此版本", !1).description("切换 node 版本,默认选择第一个版本").action(ft);
287
- const U = ["ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL", "ANTHROPIC_MODEL", "ANTHROPIC_SMALL_FAST_MODEL"], fe = F(f(import.meta.dirname, "ai.jsonc"), !0), te = Object.entries(fe)[0], E = f(se.homedir(), ".claude/settings.json"), j = f(se.homedir(), ".ai-model.json"), he = () => {
288
- $(E) || (S(`${E} 文件不存在,请先检查或者去安装 Claude Code`), process.exit(1));
289
- const e = JSON.parse(h(E).toString());
286
+ u.command("node [版本号]").option("-i, --install", "是否安装此版本", !1).description("切换 node 版本,默认选择第一个版本").action(ft);
287
+ const F = ["ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL", "ANTHROPIC_MODEL", "ANTHROPIC_SMALL_FAST_MODEL"], fe = _(f(import.meta.dirname, "ai.jsonc"), !0), te = Object.entries(fe)[0], M = f(se.homedir(), ".claude/settings.json"), w = f(se.homedir(), ".ai-model.json"), he = () => {
288
+ $(M) || (S(`${M} 文件不存在,请先检查或者去安装 Claude Code`), process.exit(1));
289
+ const e = JSON.parse(y(M).toString());
290
290
  return !e.env && (e.env = {}), e;
291
291
  }, $e = () => {
292
- a(), $(j) || (S("配置不存在,请先使用 `ai init` 初始化 AI 模型配置"), process.exit(1));
293
- const e = JSON.parse(h(j).toString()), t = Object.entries(e).filter(([s, n]) => {
292
+ a(), $(w) || (S("配置不存在,请先使用 `ai init` 初始化 AI 模型配置"), process.exit(1));
293
+ const e = JSON.parse(y(w).toString()), t = Object.entries(e).filter(([s, o]) => {
294
294
  if (s === te[0]) return !1;
295
- const o = n.env, r = te[1].env;
296
- return !(!o || U.some((i) => !o[i] || o[i] === r[i]));
295
+ const n = o.env, r = te[1].env;
296
+ return !(!n || F.some((i) => !n[i] || n[i] === r[i]));
297
297
  });
298
- return t.length || (a(`暂无已配置的 AI 模型,请先配置,路径 ${l.green(j)}`), process.exit(1)), [t, e];
298
+ return t.length || (a(`暂无已配置的 AI 模型,请先配置,路径 ${p.green(w)}`), process.exit(1)), [t, e];
299
299
  }, ht = () => {
300
- if (a(), $(j)) {
301
- a(`配置已存在,路径 ${l.green(j)}`);
300
+ if (a(), $(w)) {
301
+ a(`配置已存在,路径 ${p.green(w)}`);
302
302
  return;
303
303
  }
304
- v(j, JSON.stringify(fe, null, 2)), u(`配置已初始化,路径 ${l.green(j)}`);
304
+ v(w, JSON.stringify(fe, null, 2)), h(`配置已初始化,路径 ${p.green(w)}`);
305
305
  }, ne = (e) => e.replace(/[\u4e00-\u9fa5]/g, "aa").length, $t = () => {
306
306
  const [e] = $e();
307
307
  let t = 0, s = -1;
308
- const n = he();
309
- e.forEach(([o, r], c) => {
310
- t = Math.max(t, ne(o)), s < 0 && !U.some((i) => n.env[i] !== r.env[i]) && (s = c);
311
- }), e.forEach(([o, r], c) => {
312
- const { ANTHROPIC_BASE_URL: i } = r.env, p = c === s ? l.green("*") : " ", m = pe(ne(o), t + 4, "-"), d = `${p} ${o} ${m} ${i}`;
308
+ const o = he();
309
+ e.forEach(([n, r], c) => {
310
+ t = Math.max(t, ne(n)), s < 0 && !F.some((i) => o.env[i] !== r.env[i]) && (s = c);
311
+ }), e.forEach(([n, r], c) => {
312
+ const { ANTHROPIC_BASE_URL: i } = r.env, l = c === s ? p.green("*") : " ", m = pe(ne(n), t + 4, "-"), d = `${l} ${n} ${m} ${i}`;
313
313
  a(d);
314
314
  });
315
315
  }, yt = async (e) => {
316
- const t = he(), [s, n] = $e();
317
- s.some(([o]) => o === e) || (a(`模型 ${l.red(e)} 不存在`), process.exit(1)), U.some((o) => t.env[o] !== n[e].env[o]) ? (t.env = n[e].env, v(E, JSON.stringify(t, null, 2)), u(`模型 ${l.green(e)} 已切换`)) : a(`当前正处于 ${l.green(e)} 模型,无需切换`);
316
+ const t = he(), [s, o] = $e();
317
+ s.some(([n]) => n === e) || (a(`模型 ${p.red(e)} 不存在`), process.exit(1)), F.some((n) => t.env[n] !== o[e].env[n]) ? (t.env = o[e].env, v(M, JSON.stringify(t, null, 2)), h(`模型 ${p.green(e)} 已切换`)) : a(`当前正处于 ${p.green(e)} 模型,无需切换`);
318
318
  }, ye = () => {
319
319
  const e = "@anthropic-ai/claude-code";
320
320
  try {
321
- k(`npm list -g ${e} --depth=0`).toString().trim().includes(e) || (S(l.red(`请使用 nodejs 安装 ${e}`)), process.exit(1));
322
- const n = k("npm root -g").toString().trim(), o = f(n, e, "cli.js"), r = f(n, e, "cli.bak.js");
323
- return !$(r) && _(o, r), { cliPath: o, cliPathBak: r };
321
+ k(`npm list -g ${e} --depth=0`).toString().trim().includes(e) || (S(p.red(`请使用 nodejs 安装 ${e}`)), process.exit(1));
322
+ const o = k("npm root -g").toString().trim(), n = f(o, e, "cli.js"), r = f(o, e, "cli.bak.js"), c = f(o, e, "bin/claude.exe"), i = f(o, e, "bin/claude.bak.exe");
323
+ let l = !1;
324
+ return $(c) ? (!$(i) && O(c, i), l = !0) : !$(r) && O(n, r), { cliPath: n, cliPathBak: r, exePath: c, exePathBak: i, isExistExe: l };
324
325
  } catch {
325
- S(l.red(`请使用 nodejs 安装 ${e}`)), process.exit(1);
326
+ S(p.red(`请使用 nodejs 安装 ${e}`)), process.exit(1);
326
327
  }
327
328
  }, vt = async () => {
328
329
  a(), a("开始汉化 Claude Code");
329
- const { cliPath: e } = ye(), t = h(e).toString(), s = (await import("./keyword-BOSF0nfJ.js")).default, n = Object.entries(s).reduce((o, [r, c]) => {
330
- const i = r.replace(/\n/g, "\\\\n").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), p = c.replace(/\n/g, "\\n");
331
- return ["`", "\\"].includes(i[0]) ? o.replace(new RegExp(i, "g"), c) : o.replace(new RegExp(`"${i}"`, "g"), `"${p}"`).replace(new RegExp(`('${i}')`, "g"), `'${p}'`);
332
- }, t);
333
- v(e, n), u("Claude Code 已汉化");
334
- }, St = () => {
330
+ const { cliPath: e, exePath: t, exePathBak: s, isExistExe: o } = ye();
331
+ if (o) {
332
+ const n = y(s), r = (await import("./keyword-latest-0uZaQMuX.js")).default;
333
+ Object.entries(r).forEach(([c, i]) => {
334
+ const l = Buffer.from(c, "utf8"), m = Buffer.from(i, "utf8");
335
+ if (!n.includes(l) || m.length > l.length)
336
+ return;
337
+ let g = 0;
338
+ for (; (g = n.indexOf(l, g)) !== -1; )
339
+ m.copy(n, g), n.fill(32, g + m.length, g + l.length), g += l.length;
340
+ }), v(t, n);
341
+ } else {
342
+ const n = y(e).toString(), r = (await import("./keyword-CJ3Dr1_B.js")).default, c = Object.entries(r).reduce((i, [l, m]) => {
343
+ const d = l.replace(/\n/g, "\\\\n").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), g = m.replace(/\n/g, "\\n");
344
+ return ["`", "\\"].includes(d[0]) ? i.replace(new RegExp(d, "g"), m) : i.replace(new RegExp(`"${d}"`, "g"), `"${g}"`).replace(new RegExp(`('${d}')`, "g"), `'${g}'`);
345
+ }, n);
346
+ v(e, c);
347
+ }
348
+ h("Claude Code 已汉化");
349
+ }, jt = () => {
335
350
  a(), a("开始恢复 Claude Code");
336
- const { cliPath: e, cliPathBak: t } = ye();
337
- _(t, e), u("Claude Code 已恢复成英文");
338
- }, A = g.command("ai").description("AI 命令,详细操作请查看 ai -h").helpOption("-h, --help", "输出所有命令").helpCommand(!1);
339
- A.command("init").description("初始化 AI 模型配置").action(ht);
340
- A.command("ls").description("查看当前已配置的 AI 模型").action($t);
341
- A.command("use <模型>").description("切换 AI 模型").action(yt);
342
- A.command("zh").description("汉化 Claude Code").action(vt);
343
- A.command("zh-restore").description("恢复汉化 Claude Code").action(St);
344
- g.usage("[commands] [options]").version(ce, "-v, --version", "输出版本号").helpOption("-h, --help", "输出所有命令");
345
- g.command("build[:环境] [描述]").description("简化打包提交命令");
346
- g.command("version<[++]|[@<版本号>]>").description("例如:version++ 或者 version@1.0.0;自动更新 package.json 版本号,自动更新 `README.md` 中的 `version-v<version>-blue` 图标版本");
347
- g.arguments("<cmd> [env]").action((e, t) => {
351
+ const { cliPath: e, cliPathBak: t, exePath: s, exePathBak: o, isExistExe: n } = ye();
352
+ n ? O(o, s) : O(t, e), h("Claude Code 已恢复成英文");
353
+ }, E = u.command("ai").description("AI 命令,详细操作请查看 ai -h").helpOption("-h, --help", "输出所有命令").helpCommand(!1);
354
+ E.command("init").description("初始化 AI 模型配置").action(ht);
355
+ E.command("ls").description("查看当前已配置的 AI 模型").action($t);
356
+ E.command("use <模型>").description("切换 AI 模型").action(yt);
357
+ E.command("zh").description("汉化 Claude Code").action(vt);
358
+ E.command("zh-restore").description("恢复汉化 Claude Code").action(jt);
359
+ u.usage("[commands] [options]").version(ce, "-v, --version", "输出版本号").helpOption("-h, --help", "输出所有命令");
360
+ u.command("build[:环境] [描述]").description("简化打包提交命令");
361
+ u.command("version<[++]|[@<版本号>]>").description("例如:version++ 或者 version@1.0.0;自动更新 package.json 版本号,自动更新 `README.md` 中的 `version-v<version>-blue` 图标版本");
362
+ u.arguments("<cmd> [env]").action((e, t) => {
348
363
  Ze(e, t);
349
364
  });
350
- process.argv.length < 3 ? g.help() : g.parse(process.argv);
351
- const P = Ae({ pkg: I, updateCheckInterval: 1e3 * 1 });
352
- if (P.update && P.update.latest !== I.version) {
365
+ process.argv.length < 3 ? u.help() : u.parse(process.argv);
366
+ const N = Pe({ pkg: I, updateCheckInterval: 1e3 * 1 });
367
+ if (N.update && N.update.latest !== I.version) {
353
368
  let e = "";
354
- switch (P.update.type) {
369
+ switch (N.update.type) {
355
370
  case "major":
356
- e = l.red("{latestVersion}");
371
+ e = p.red("{latestVersion}");
357
372
  break;
358
373
  case "minor":
359
- e = l.yellow("{latestVersion}");
374
+ e = p.yellow("{latestVersion}");
360
375
  break;
361
376
  default:
362
- e = l.green("{latestVersion}");
377
+ e = p.green("{latestVersion}");
363
378
  break;
364
379
  }
365
380
  const t = `https://github.com/biaov/${I.name}/compare/v${I.version}...v{latestVersion}`;
366
- P.notify({
381
+ N.notify({
367
382
  defer: !1,
368
383
  isGlobal: !0,
369
- message: `有更新 ${l.dim("{currentVersion}")}${l.reset(" → ")}${e}
370
- 运行 ${l.cyan("{updateCommand}@latest")} 命令更新
371
- ${l.dim.underline(t)}`
384
+ message: `有更新 ${p.dim("{currentVersion}")}${p.reset(" → ")}${e}
385
+ 运行 ${p.cyan("{updateCommand}@latest")} 命令更新
386
+ ${p.dim.underline(t)}`
372
387
  });
373
388
  }
@@ -25,6 +25,7 @@ const e = {
25
25
  Usage: "使用量",
26
26
  Status: "状态",
27
27
  Config: "配置",
28
+ '{key:"stats",title:"Stats"}': '{key:"stats",title:"统计"}',
28
29
  "Search settings...": "搜索设置",
29
30
  " more above": " 条在上方",
30
31
  " more below": " 条在下方",
@@ -39,6 +40,9 @@ const e = {
39
40
  "· Esc to cancel": "· Esc 取消",
40
41
  "Enter to confirm · Esc to cancel": "Enter 确认 · Esc 取消",
41
42
  "/usage is only available for subscription plans.": "/usage 仅适用于订阅计划",
43
+ "Show PR status footer": "显示 PR 状态底部",
44
+ "Claude in Chrome enabled by default": "默认启用 Chrome 中的 Claude",
45
+ "`Fast mode (${Lu} only)`": "`快速模式(仅限 ${Lu})`",
42
46
  // 主要
43
47
  "Welcome back!": "欢迎回来!",
44
48
  "API Usage Billing": "API 使用计费",
@@ -123,7 +127,10 @@ const e = {
123
127
  '{action:"settings:close",context:"Settings",fallback:"Enter",description:"save"}': '{action:"settings:close",context:"Settings",fallback:"Enter",description:"保存"}',
124
128
  '{action:"settings:search",context:"Settings",fallback:"/",description:"search"}': '{action:"settings:search",context:"Settings",fallback:"/",description:"搜索"}',
125
129
  '{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"}': '{action:"confirm:no",context:"Settings",fallback:"Esc",description:"取消"}',
126
- '{shortcut:"Esc",action:"cancel"}': '{shortcut:"Esc",action:"取消"}'
130
+ '{shortcut:"Esc",action:"cancel"}': '{shortcut:"Esc",action:"取消"}',
131
+ "accept edits on": "接受编辑",
132
+ "accept edits": "接受编辑",
133
+ "Search settings…": "搜索设置…"
127
134
  };
128
135
  export {
129
136
  e as default
@@ -0,0 +1,98 @@
1
+ const e = {
2
+ // /config
3
+ "Search settings": "搜索",
4
+ "Auto-compact": "自动压缩",
5
+ "Show tips": "提示",
6
+ "Reduce motion": "减少动画",
7
+ "Thinking mode": "深度思考",
8
+ "Session recap": "会议",
9
+ "Rewind code (checkpoints)": "代码回退",
10
+ "Dynamic workflows": "动态工作流",
11
+ "Ultracode keyword trigger": "关键词触发",
12
+ "Verbose output": "详细输出",
13
+ "Terminal progress bar": "进度条",
14
+ "Show turn duration": "耗时条",
15
+ "Default permission mode": "默认权限",
16
+ "Worktree base ref": "工作树引用",
17
+ "Use auto mode during plan": "计划时自动模式",
18
+ "Respect .gitignore in file picker": "选择文件遵守.gitignore",
19
+ "Skip the /copy picker": "跳过/copy选择",
20
+ "Open agents view by default": "默认打开代理视图",
21
+ "opens agents": "代理",
22
+ "Auto-update channel": "自动更新",
23
+ "Local notifications": "本地通知",
24
+ "Output style": "输出风格",
25
+ '"Language"': '"语言"',
26
+ "Editor mode": "编辑",
27
+ "Show last response in external editor": "显示最新回复",
28
+ "Show PR status footer": "显示PR状态",
29
+ "Auto-connect to IDE (external terminal)": "自动连接到IDE",
30
+ "Auto-install IDE extension": "自动安装IDE扩展",
31
+ "Diff tool": "对比",
32
+ "Claude in Chrome enabled by default": "Claude在Chrome启用",
33
+ // 主要
34
+ "Welcome back!": "欢迎回来!",
35
+ "Tips for getting started": "入门技巧",
36
+ "What's new": "最新",
37
+ "API Usage Billing": "API使用计费",
38
+ "Run /init to create a CLAUDE.md file with instructions for Claude": "/init创建CLAUDE.md文件,包含 Claude 的说明",
39
+ "Recent activity": "最近活动记录",
40
+ "No recent activity": "暂无最近活动记录",
41
+ "create a util logging.py that...": "创建logging.py,用于...",
42
+ "Initialize a new CLAUDE.md file with codebase documentation": "初始化新的 CLAUDE.md 文件,写入相关文档说明",
43
+ "Review changed code for reuse, quality, and efficiency, then fix any issues found.": "检查修改过的代码,评估其可复用性、代码质量和执行效率,然后修复发现的所有问题。",
44
+ "Add a new working directory": "添加新的目录",
45
+ "Clear conversation history and free up context": "清除对话历史记录,释放上下文空间",
46
+ "Set the prompt bar color for this session": "设置本次会话的提示栏颜色",
47
+ "Clear conversation history but keep a summary in context. Optional: /compact [instructions for summarization]": "清除对话历史记录,但在上下文中保留一份摘要。可选:/compact [摘要的自定义指令]",
48
+ "Open config panel": "设置",
49
+ "Copy Claude's last response to clipboard (or /copy N for the Nth-latest)": "复制 Claude 最新回复到剪贴板(/copy N复制第N条)",
50
+ "Show the total cost and duration of the current session": "显示当前会话的总费用和持续时间",
51
+ "Continue the current session in Claude Desktop": "在 Claude Desktop 中继续当前会话",
52
+ "View uncommitted changes and per-turn diffs": "查看未提交的差异",
53
+ "Diagnose and verify your Claude Code installation and settings": "诊断并验证 Claude Code 的安装和设置",
54
+ "Set effort level for model usage": "设置模型使用等级",
55
+ "Exit the REPL": "退出 REPL",
56
+ "Export the current conversation to a file or clipboard": "将当前对话导出到文件或剪贴板",
57
+ "Show help and available commands": "显示帮助和命令",
58
+ "View hook configurations for tool events": "查看工具事件的钩子配置",
59
+ "Manage IDE integrations and show status": "管理 IDE 集成并显示状态",
60
+ "Set up Claude GitHub Actions for a repository": "为仓库配置 Claude GitHub Actions",
61
+ "Install the Claude Slack app": "安装 Claude Slack 应用",
62
+ "Sign in with your Anthropic account": "使用 Anthropic 账号登录",
63
+ "Sign out from your Anthropic account": "退出 Anthropic 账号",
64
+ "Manage MCP servers": "管理 MCP",
65
+ "Edit Claude memory files": "编辑 Claude 记忆",
66
+ "Show QR code to download the Claude mobile app": "显示二维码下载 Claude App",
67
+ "Manage allow & deny tool permission rules": "管理工具的权限规则",
68
+ "Enable plan mode or view the current session plan": "启用计划模式或查看当前会话计划",
69
+ "Manage Claude Code plugins": "管理 Claude Code 插件",
70
+ "View release notes": "查看发布说明",
71
+ "Activate pending plugin changes in the current session": "在当前会话中激活待生效的插件更改",
72
+ "Rename the current conversation": "重命名当前对话",
73
+ "Resume a previous conversation": "恢复之前的对话",
74
+ "Restore the code and/or conversation to a previous point": "将代码和/或对话恢复到之前的某个节点",
75
+ "List available skills": "列出可用的技能",
76
+ "Show your Claude Code usage statistics and activity": "显示 Claude Code 的使用统计和活动记录",
77
+ "Show Claude Code status including version, model, account, API connectivity, and tool statuses": "显示 Claude Code 状态,包括版本、模型、账号、API 连接和工具状态",
78
+ "Order Claude Code stickers": "订购 Claude Code 贴纸",
79
+ "List and manage background tasks": "列出并管理后台任务",
80
+ "Install Shift+Enter key binding for newlines": "安装 Shift+Enter 换行快捷键绑定",
81
+ "Change the theme": "更改主题",
82
+ "Upgrade to Max for higher rate limits and more Opus": "升级 Max 获得高速率和更多 Opus",
83
+ "Show plan usage limits": "显示计划用量限制",
84
+ "Toggle between Vim and Normal editing modes": "在 Vim 和普通编辑模式之间切换",
85
+ "Generate a report analyzing your Claude Code sessions": "生成分析 Claude Code 会话的报告",
86
+ "Get comments from a GitHub pull request": "获取 GitHub Pull Request 的评论",
87
+ "Review a pull request": "审查 Pull Request",
88
+ "Complete a security review of the pending changes on the current branch": "对当前分支的待提交更改进行安全审查",
89
+ "Set up Claude Code's status line UI": "配置 Claude Code 的状态栏 UI",
90
+ // 其他
91
+ "Type to filter": "过滤",
92
+ "Ask a quick side question without interrupting the main conversation": "提问一个临时问题,不打断主对话",
93
+ "Config dialog dismissed": "对话框已关闭",
94
+ "Manage agent configurations": "管理 Agent 配置"
95
+ };
96
+ export {
97
+ e as default
98
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mine-auto-cli",
3
3
  "private": false,
4
- "version": "2.7.4",
4
+ "version": "2.8.0",
5
5
  "exports": "./dist/index.js",
6
6
  "main": "./dist/index.js",
7
7
  "type": "module",