@agile-team/robot-cli 2.2.0 → 3.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
@@ -5,7 +5,54 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
- ## [2.0.0] - 2026-03-28
8
+ ## [3.0.0] - 2026-03-28
9
+
10
+ ### ⚠️ BREAKING CHANGES
11
+
12
+ - 交互界面从 `inquirer` 全面迁移至 `@clack/prompts`,视觉体验完全不同
13
+ - 移除 `inquirer` 和 `@types/inquirer` 依赖
14
+
15
+ ### Added
16
+
17
+ - **@clack/prompts 现代化 UI**:使用 `p.select`、`p.text`、`p.confirm`、`p.note`、`p.intro`/`p.outro` 等,交互体验对齐 create-vue
18
+ - **Banner 框框展示**:双线框 `╔══╗` 样式包裹 ROBOT CLI 标题,信息分区更清晰
19
+ - **下载进度条**:基于 `content-length` 的流式进度条 `[████████░░░░] 40% 1.0MB/2.6MB`
20
+ - **Gitee 备用源**:模板配置新增 `giteeUrl` 字段,GitHub 不可达时自动切换 Gitee 下载
21
+ - robot-admin / monorepo / micro-app / module-federation → `gitee.com/ycyplus163/Robot_Admin`
22
+ - robot-uniapp → `gitee.com/ycyplus163/Robot_uniApp`
23
+ - **取消操作支持**:所有交互步骤支持 Ctrl+C 优雅退出 (`p.isCancel`)
24
+
25
+ ### Changed
26
+
27
+ - 主菜单、模板选择、项目配置、确认创建等全部替换为 @clack/prompts 组件
28
+ - 项目创建完成信息使用 `p.note` 卡片式展示
29
+ - 分类浏览流程简化:自动跳过只有单一选项的层级
30
+ - 项目配置不再需要最后的"确认配置"步骤(逐项确认更自然)
31
+ - 构建产物从 ~63KB 减小至 ~59KB
32
+
33
+ ### Removed
34
+
35
+ - `inquirer` 依赖及其 `@types/inquirer` 类型定义
36
+ - `getVersionLabel()` 辅助函数(改为内联 `VERSION_LABELS` 查找)
37
+
38
+ ## [2.3.0] - 2026-03-28
39
+
40
+ ### Fixed (Root-Cause)
41
+
42
+ - **下载超时**:超时时间从 15s → 120s(主站)/ 60s(镜像),适配中国网络环境
43
+ - **下载无重试**:新增 `fetchWithRetry()`,每个源最多重试 3 次,指数退避(2s→4s)
44
+ - **镜像失效**:从 1 个已失效的 `ghproxy.com` → 3 个源(`github.com` + `gitmirror` + `ghproxy.net`)
45
+ - **双重报错**:下载失败后内外两层 catch 都打印错误 → 内层 return 终止,只输出一次
46
+ - **Windows emoji 乱码**:全面移除所有源文件中的 emoji,分类名 / spinner.text / doctor 输出全部改为纯文本 + chalk 着色
47
+
48
+ ### Changed
49
+
50
+ - Banner 从 `gradient-string` 多行 Unicode 框线 → `chalk.bold.cyan` 极简纯文本(参考 create-vue)
51
+ - 移除 `gradient-string` 依赖(减小包体积)
52
+ - doctor 诊断图标从 emoji → ASCII `[OK]` / `[!!]` / `[NO]`
53
+ - package.json description 移除 emoji 前缀
54
+
55
+ ## [2.2.0] - 2026-03-28
9
56
 
10
57
  ### ⚠️ BREAKING CHANGES
11
58
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🤖 Robot CLI
1
+ # Robot CLI
2
2
 
3
3
  > **现代化工程脚手架** — 一条命令,60 秒搭建标准化项目
4
4
 
@@ -10,17 +10,17 @@
10
10
 
11
11
  ## 目录
12
12
 
13
- - [快速开始](#-快速开始)
14
- - [模板一览](#-模板一览)
15
- - [命令详解](#-命令详解)
16
- - [进阶用法](#-进阶用法)
17
- - [项目结构](#-项目结构)
18
- - [二次开发指南](#-二次开发指南)
19
- - [常见问题](#-常见问题)
13
+ - [快速开始](#快速开始)
14
+ - [模板一览](#模板一览)
15
+ - [命令详解](#命令详解)
16
+ - [进阶用法](#进阶用法)
17
+ - [项目结构](#项目结构)
18
+ - [二次开发指南](#二次开发指南)
19
+ - [常见问题](#常见问题)
20
20
 
21
21
  ---
22
22
 
23
- ## 🚀 快速开始
23
+ ## 快速开始
24
24
 
25
25
  ### 安装
26
26
 
@@ -49,9 +49,9 @@ npx @agile-team/robot-cli create my-project
49
49
 
50
50
  ---
51
51
 
52
- ## 📋 模板一览
52
+ ## 模板一览
53
53
 
54
- ### 🎨 前端项目(Vue.js)
54
+ ### 前端项目(Vue.js)
55
55
 
56
56
  | 模板 Key | 名称 | 架构模式 | 说明 |
57
57
  |---------|------|---------|------|
@@ -64,21 +64,21 @@ npx @agile-team/robot-cli create my-project
64
64
  > **前端模板源码仓库**:[ChenyCHENYU/Robot_Admin](https://github.com/ChenyCHENYU/Robot_Admin)
65
65
  > 不同架构通过分支区分:`main`(全量)、`monorepo`、`micro-app`、`module-federation`
66
66
 
67
- ### 🎨 前端项目(React.js)
67
+ ### 前端项目(React.js)
68
68
 
69
69
  | 模板 Key | 名称 | 说明 |
70
70
  |---------|------|------|
71
71
  | `robot-react` | Robot React 完整版 | Ant Design + 完整功能演示 |
72
72
  | `robot-react-base` | Robot React 精简版 | 基础 React + 核心功能 |
73
73
 
74
- ### 📱 移动端项目
74
+ ### 移动端项目
75
75
 
76
76
  | 模板 Key | 名称 | 说明 |
77
77
  |---------|------|------|
78
78
  | `robot-uniapp` | Robot uni-app 完整版 | 多端适配(小程序/H5/App)+ 完整示例 |
79
79
  | `robot-uniapp-base` | Robot uni-app 精简版 | 基础框架 + 核心功能 |
80
80
 
81
- ### 🚀 后端项目
81
+ ### 后端项目
82
82
 
83
83
  | 模板 Key | 名称 | 说明 |
84
84
  |---------|------|------|
@@ -86,7 +86,7 @@ npx @agile-team/robot-cli create my-project
86
86
  | `robot-nest-base` | Robot NestJS 精简版 | 基础 NestJS + 核心模块 |
87
87
  | `robot-nest-micro` | Robot NestJS 微服务 | gRPC + 服务发现 |
88
88
 
89
- ### 💻 桌面端项目
89
+ ### 桌面端项目
90
90
 
91
91
  | 模板 Key | 名称 | 说明 |
92
92
  |---------|------|------|
@@ -95,7 +95,7 @@ npx @agile-team/robot-cli create my-project
95
95
 
96
96
  ---
97
97
 
98
- ## 📖 命令详解
98
+ ## 命令详解
99
99
 
100
100
  ### `robot create [project-name]` — 创建项目
101
101
 
@@ -151,7 +151,7 @@ robot doctor --clear-cache # 清理模板缓存
151
151
 
152
152
  ---
153
153
 
154
- ## 🔧 进阶用法
154
+ ## 进阶用法
155
155
 
156
156
  ### 包管理器优先级
157
157
 
@@ -159,10 +159,10 @@ robot doctor --clear-cache # 清理模板缓存
159
159
 
160
160
  | 优先级 | 包管理器 | 说明 |
161
161
  |--------|---------|------|
162
- | 🥇 | **bun** | 极速安装,现代化 |
163
- | 🥈 | **pnpm** | 快速安装,节省磁盘 |
164
- | 🥉 | **yarn** | 兼容性好 |
165
- | 4️⃣ | **npm** | Node.js 内置 |
162
+ | 1 | **bun** | 极速安装,现代化 |
163
+ | 2 | **pnpm** | 快速安装,节省磁盘 |
164
+ | 3 | **yarn** | 兼容性好 |
165
+ | 4 | **npm** | Node.js 内置 |
166
166
 
167
167
  ### 离线缓存
168
168
 
@@ -190,7 +190,7 @@ robot create my-app --from https://gitee.com/your-org/your-template
190
190
 
191
191
  ---
192
192
 
193
- ## 🗂 项目结构
193
+ ## 项目结构
194
194
 
195
195
  ```
196
196
  robot-cli/
@@ -225,7 +225,7 @@ robot-cli/
225
225
 
226
226
  ---
227
227
 
228
- ## 🛠 二次开发指南
228
+ ## 二次开发指南
229
229
 
230
230
  ### 1. 克隆 & 启动
231
231
 
@@ -305,7 +305,7 @@ npm publish --access public
305
305
 
306
306
  ---
307
307
 
308
- ## 常见问题
308
+ ## 常见问题
309
309
 
310
310
  **Q: 提示 `command not found: robot`**
311
311
  ```bash
@@ -333,15 +333,15 @@ robot create my-app --no-cache # 跳过缓存重试
333
333
 
334
334
  ---
335
335
 
336
- ## 🤝 贡献
336
+ ## 贡献
337
337
 
338
338
  欢迎提交 Issues 和 Pull Requests!
339
339
 
340
- ## 📜 许可证
340
+ ## 许可证
341
341
 
342
342
  MIT License
343
343
 
344
- ## 🔗 链接
344
+ ## 链接
345
345
 
346
346
  - [GitHub](https://github.com/ChenyCHENYU/robot-cli)
347
347
  - [npm](https://www.npmjs.com/package/@agile-team/robot-cli)