mihomo-cli 1.5.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0] - 2026-04-11
4
+
5
+ ### 架构重写
6
+
7
+ 完整重写为 TypeScript,保持所有功能不变。
8
+
9
+ - **语言**:JavaScript (CJS) → TypeScript (ESM)
10
+ - **构建**:tsup 单文件打包 (esbuild),产物 ~170KB
11
+ - **运行时**:Node.js >= 22
12
+ - **工具链**:eslint + prettier → Biome;axios → 原生 fetch
13
+ - **类型系统**:`src/types.ts` 集中管理所有类型定义
14
+ - **模块拆分**:`config.js` (517 行) → `paths.ts` + `settings.ts` + `config.ts`
15
+ - **命令处理器**:从 `index.js` (1177 行) 拆分为 `src/commands/` 下 12 个独立文件
16
+
17
+ ### 变更
18
+
19
+ - **命令别名**:`mmc` → `mhm`(避免误解)
20
+ - **依赖精简**:移除 axios,运行时仅依赖 js-yaml + compare-versions(已打包进单文件)
21
+ - **开发依赖**:TypeScript 6、tsup 8.5、tsx 4.21、Biome 2.4
22
+
23
+ ## [1.5.1] - 2026-04-11
24
+
25
+ ### 修复
26
+
27
+ - 修复内核下载时引用不存在的目录键 `DIRS.core`,导致下载失败 (`kernel`)
28
+ - 修复订阅页面打开时调用不存在的函数 `readSubscriptionsCache`,导致报错 (`sub web`)
29
+
3
30
  ## [1.5.0] - 2026-04-10
4
31
 
5
32
  ### 新增功能
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  - 📝 **日志管理** - 实时日志 + 历史日志归档(自动轮转,保留7天)
16
16
  - 🎨 **Web UI** - 一键打开 Web 控制面板 (zash/metacubexd/yacd)
17
17
  - 🔄 **内核更新** - 自动检查更新,支持 GitHub 镜像加速
18
- - ⌨️ **命令别名** - `mihomo` / `mmc` / `mh` 均可调用
18
+ - ⌨️ **命令别名** - `mihomo` / `mhm` / `mh` 均可调用
19
19
 
20
20
  ## 安装
21
21
 
@@ -31,6 +31,7 @@ npm install -g mihomo-cli
31
31
  git clone https://github.com/adaex/mihomo-cli.git
32
32
  cd mihomo-cli
33
33
  npm install
34
+ npm run build
34
35
  npm link
35
36
  ```
36
37
 
@@ -126,7 +127,7 @@ mihomo ui yacd # YACD
126
127
 
127
128
  - `mihomo-cli` (原名)
128
129
  - `mihomo`
129
- - `mmc`
130
+ - `mhm`
130
131
  - `mh`
131
132
 
132
133
  ### 快捷命令