mihomo-cli 1.4.0 → 1.4.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/index.js +10 -10
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.1] - 2026-04-08
4
+
5
+ ### 优化
6
+
7
+ - **状态显示文案**:
8
+ - `○ 已停止` → `不在运行`(移除符号,更简洁明确)
9
+ - `未在运行` → `不在运行`(统一措辞)
10
+ - **代码风格统一**:标签输出格式统一为 `colors.gray('标签: ')`
11
+
12
+ ---
13
+
3
14
  ## [1.4.0] - 2026-04-07
4
15
 
5
16
  ### 新增功能
package/index.js CHANGED
@@ -202,7 +202,7 @@ function printStatus() {
202
202
  if (info && status.running) {
203
203
  modeLabel = colors.cyan(info.tun ? ' (TUN)' : ' (Mixed)');
204
204
  }
205
- const statusText = status.running ? colors.green('● 运行中') : colors.yellow('○ 已停止');
205
+ const statusText = status.running ? colors.green('● 运行中') : colors.yellow('不在运行');
206
206
  console.log(colors.gray('状态: ') + statusText + modeLabel);
207
207
  console.log(colors.gray('内核: ') + (status.kernelVersion || '未安装'));
208
208
 
@@ -307,7 +307,7 @@ async function cmdStart(args) {
307
307
  async function cmdStop() {
308
308
  const pids = processManager.getAllMihomoPids();
309
309
  if (pids.length === 0) {
310
- console.log(colors.yellow('未在运行'));
310
+ console.log(colors.yellow('不在运行'));
311
311
  return;
312
312
  }
313
313
 
@@ -513,10 +513,10 @@ async function printSubscriptionList() {
513
513
  const defaultMark = i === 0 ? colors.green(' [默认]') : '';
514
514
  const interval = s.update_interval || subscription.DEFAULT_UPDATE_INTERVAL_HOURS;
515
515
  console.log(' ' + (i + 1) + '. ' + s.name + defaultMark);
516
- console.log(' ' + colors.gray('更新:') + ' ' + time + ' (间隔: ' + interval + 'h)');
516
+ console.log(' ' + colors.gray('更新: ') + time + ' (间隔: ' + interval + 'h)');
517
517
 
518
518
  if (s.username) {
519
- console.log(' ' + colors.gray('用户:') + ' ' + s.username);
519
+ console.log(' ' + colors.gray('用户: ') + s.username);
520
520
  }
521
521
  if (s.download !== undefined || s.total !== undefined) {
522
522
  const used = (s.upload || 0) + (s.download || 0);
@@ -527,13 +527,13 @@ async function printSubscriptionList() {
527
527
  const percent = Math.min((used / s.total) * 100, 100);
528
528
  percentStr = ' (' + percent.toFixed(1) + '%)';
529
529
  }
530
- console.log(' ' + colors.gray('流量:') + ' ' + usedStr + ' / ' + totalStr + percentStr);
530
+ console.log(' ' + colors.gray('流量: ') + usedStr + ' / ' + totalStr + percentStr);
531
531
  }
532
532
  if (s.expire !== undefined) {
533
- console.log(' ' + colors.gray('到期:') + ' ' + utils.formatTimestamp(s.expire));
533
+ console.log(' ' + colors.gray('到期: ') + utils.formatTimestamp(s.expire));
534
534
  }
535
535
  if (s.web_page_url) {
536
- console.log(' ' + colors.gray('页面:') + ' ' + s.web_page_url);
536
+ console.log(' ' + colors.gray('页面: ') + s.web_page_url);
537
537
  }
538
538
  });
539
539
  console.log('');
@@ -921,8 +921,8 @@ async function cmdReset(args) {
921
921
  function printOverwriteList() {
922
922
  const info = overwrite.listOverwriteFile();
923
923
  const statusText = info.enabled ? colors.green('已启用') : colors.yellow('已禁用');
924
- console.log(colors.gray('状态:') + ' ' + statusText);
925
- console.log(colors.gray('目录:') + ' ' + info.dir);
924
+ console.log(colors.gray('状态: ') + statusText);
925
+ console.log(colors.gray('目录: ') + info.dir);
926
926
  console.log('');
927
927
  if (info.files.length === 0) {
928
928
  console.log('暂无覆写文件');
@@ -936,7 +936,7 @@ function printOverwriteList() {
936
936
  const num = i < 10 ? ' ' + i : '' + i;
937
937
  console.log(' ' + num + '. ' + f.name);
938
938
  if (f.keys.length > 0) {
939
- console.log(' ' + colors.gray('字段:') + ' ' + f.keys.join(', '));
939
+ console.log(' ' + colors.gray('字段: ') + f.keys.join(', '));
940
940
  }
941
941
  });
942
942
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mihomo-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A terminal-based mihomo (Clash.Meta) client for macOS",
5
5
  "bin": {
6
6
  "mihomo-cli": "index.js",