@agile-team/robot-cli 1.0.7 → 1.0.9
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/lib/create.js +1 -1
- package/lib/download.js +147 -87
- package/lib/templates.js +22 -22
- package/package.json +1 -1
package/lib/create.js
CHANGED
|
@@ -652,7 +652,7 @@ async function confirmCreation(projectName, template, projectConfig) {
|
|
|
652
652
|
: chalk.dim("否")
|
|
653
653
|
}`
|
|
654
654
|
);
|
|
655
|
-
console.log(` 源码仓库: ${chalk.dim(template.
|
|
655
|
+
console.log(` 源码仓库: ${chalk.dim(template.repoUrl)}`);
|
|
656
656
|
console.log();
|
|
657
657
|
|
|
658
658
|
const { confirmed } = await inquirer.prompt([
|
package/lib/download.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// lib/download.js -
|
|
1
|
+
// lib/download.js - 真正简化版,解决实际问题
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import os from 'os';
|
|
@@ -14,10 +14,115 @@ const __dirname = path.dirname(__filename);
|
|
|
14
14
|
const CACHE_DIR = path.join(os.homedir(), '.robot-cli', 'cache');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
* 解析仓库URL,构建下载链接
|
|
18
|
+
*/
|
|
19
|
+
function buildDownloadUrl(repoUrl) {
|
|
20
|
+
try {
|
|
21
|
+
const url = new URL(repoUrl);
|
|
22
|
+
const hostname = url.hostname;
|
|
23
|
+
const pathname = url.pathname;
|
|
24
|
+
|
|
25
|
+
if (hostname === 'github.com') {
|
|
26
|
+
// GitHub: https://github.com/user/repo -> /user/repo/archive/refs/heads/main.zip
|
|
27
|
+
return `${repoUrl}/archive/refs/heads/main.zip`;
|
|
28
|
+
} else if (hostname === 'gitee.com') {
|
|
29
|
+
// Gitee: https://gitee.com/user/repo -> /user/repo/repository/archive/master.zip
|
|
30
|
+
return `${repoUrl}/repository/archive/master.zip`;
|
|
31
|
+
} else if (hostname === 'gitlab.com') {
|
|
32
|
+
// GitLab: https://gitlab.com/user/repo -> /user/repo/-/archive/main/repo-main.zip
|
|
33
|
+
const repoName = pathname.split('/').pop();
|
|
34
|
+
return `${repoUrl}/-/archive/main/${repoName}-main.zip`;
|
|
35
|
+
} else {
|
|
36
|
+
// 其他平台,默认使用 GitHub 格式
|
|
37
|
+
return `${repoUrl}/archive/refs/heads/main.zip`;
|
|
38
|
+
}
|
|
39
|
+
} catch (error) {
|
|
40
|
+
// URL 解析失败,返回原始URL + 默认后缀
|
|
41
|
+
return `${repoUrl}/archive/refs/heads/main.zip`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 尝试下载 - 支持多平台
|
|
47
|
+
*/
|
|
48
|
+
async function tryDownload(repoUrl, spinner) {
|
|
49
|
+
const url = new URL(repoUrl);
|
|
50
|
+
const hostname = url.hostname;
|
|
51
|
+
|
|
52
|
+
// 根据平台选择镜像源
|
|
53
|
+
let mirrors = [];
|
|
54
|
+
|
|
55
|
+
if (hostname === 'github.com') {
|
|
56
|
+
mirrors = [
|
|
57
|
+
repoUrl, // 官方源
|
|
58
|
+
`https://ghproxy.com/${repoUrl}` // GitHub 代理
|
|
59
|
+
];
|
|
60
|
+
} else {
|
|
61
|
+
// 其他平台直接使用原始URL
|
|
62
|
+
mirrors = [repoUrl];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (let i = 0; i < mirrors.length; i++) {
|
|
66
|
+
const currentUrl = mirrors[i];
|
|
67
|
+
const isOriginal = currentUrl === repoUrl;
|
|
68
|
+
const sourceName = isOriginal ? `${hostname} 官方` : `${hostname} 镜像`;
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
if (spinner) {
|
|
72
|
+
spinner.text = `🔍 连接到 ${sourceName}...`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const downloadUrl = buildDownloadUrl(currentUrl);
|
|
76
|
+
|
|
77
|
+
if (spinner) {
|
|
78
|
+
spinner.text = `📦 从 ${sourceName} 下载模板...`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const response = await fetch(downloadUrl, {
|
|
82
|
+
timeout: isOriginal ? 15000 : 10000, // 官方源给更多时间
|
|
83
|
+
headers: {
|
|
84
|
+
'User-Agent': 'Robot-CLI/1.0.0'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (!response.ok) {
|
|
89
|
+
if (response.status === 404) {
|
|
90
|
+
throw new Error(`仓库不存在: ${repoUrl}`);
|
|
91
|
+
}
|
|
92
|
+
throw new Error(`HTTP ${response.status}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (spinner) {
|
|
96
|
+
const contentLength = response.headers.get('content-length');
|
|
97
|
+
if (contentLength) {
|
|
98
|
+
const sizeInMB = (parseInt(contentLength) / 1024 / 1024).toFixed(1);
|
|
99
|
+
spinner.text = `📦 下载中... (${sizeInMB}MB from ${sourceName})`;
|
|
100
|
+
} else {
|
|
101
|
+
spinner.text = `📦 下载中... (from ${sourceName})`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return { response, sourceName };
|
|
106
|
+
|
|
107
|
+
} catch (error) {
|
|
108
|
+
// 如果是最后一个源,抛出错误
|
|
109
|
+
if (i === mirrors.length - 1) {
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 否则继续尝试下一个源
|
|
114
|
+
if (spinner) {
|
|
115
|
+
spinner.text = `⚠️ ${sourceName} 访问失败,尝试其他源...`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 等待1秒再试下一个
|
|
119
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 下载模板 - 简化版
|
|
21
126
|
*/
|
|
22
127
|
export async function downloadTemplate(template, options = {}) {
|
|
23
128
|
const { useCache = true, spinner } = options;
|
|
@@ -27,12 +132,12 @@ export async function downloadTemplate(template, options = {}) {
|
|
|
27
132
|
throw new Error('模板参数不能为空');
|
|
28
133
|
}
|
|
29
134
|
|
|
30
|
-
if (!template.key && !template.
|
|
135
|
+
if (!template.key && !template.repoUrl) {
|
|
31
136
|
throw new Error(`模板配置无效: ${JSON.stringify(template)}`);
|
|
32
137
|
}
|
|
33
138
|
|
|
34
|
-
//
|
|
35
|
-
const cacheKey = template.key || template.
|
|
139
|
+
// 获取缓存键值
|
|
140
|
+
const cacheKey = template.key || template.repoUrl?.split('/').pop() || 'unknown-template';
|
|
36
141
|
const cachePath = path.join(CACHE_DIR, cacheKey);
|
|
37
142
|
|
|
38
143
|
// 检查缓存
|
|
@@ -57,69 +162,33 @@ export async function downloadTemplate(template, options = {}) {
|
|
|
57
162
|
}
|
|
58
163
|
}
|
|
59
164
|
|
|
60
|
-
//
|
|
61
|
-
if (template.localTest || !template.
|
|
165
|
+
// 如果是本地测试模板
|
|
166
|
+
if (template.localTest || !template.repoUrl) {
|
|
62
167
|
if (fs.existsSync(cachePath)) {
|
|
63
168
|
return cachePath;
|
|
64
169
|
} else {
|
|
65
|
-
throw new Error(
|
|
66
|
-
'本地测试模板不存在',
|
|
67
|
-
'',
|
|
68
|
-
chalk.red.bold('问题描述:'),
|
|
69
|
-
` 测试模板路径不存在: ${cachePath}`,
|
|
70
|
-
'',
|
|
71
|
-
chalk.green.bold('解决方案:'),
|
|
72
|
-
' 1. 运行测试环境设置: npm run test:setup',
|
|
73
|
-
' 2. 或创建测试缓存: npm run test',
|
|
74
|
-
' 3. 检查模板是否正确创建',
|
|
75
|
-
'',
|
|
76
|
-
chalk.blue.bold('可用命令:'),
|
|
77
|
-
' npm run test:setup --setup # 创建完整测试环境',
|
|
78
|
-
' npm run test:clean # 清理测试环境'
|
|
79
|
-
].join('\n'));
|
|
170
|
+
throw new Error(`本地测试模板不存在: ${cachePath}`);
|
|
80
171
|
}
|
|
81
172
|
}
|
|
82
173
|
|
|
83
174
|
// 下载远程模板
|
|
84
|
-
if (spinner) {
|
|
85
|
-
spinner.text = `🌐 连接到 GitHub (${template.repo})...`;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
175
|
try {
|
|
89
|
-
const downloadUrl = 'https://github.com/' + template.repo + '/archive/refs/heads/main.zip';
|
|
90
|
-
const tempZipPath = path.join(os.tmpdir(), cacheKey + '-' + Date.now() + '.zip');
|
|
91
|
-
const tempExtractPath = path.join(os.tmpdir(), cacheKey + '-extract-' + Date.now());
|
|
92
|
-
|
|
93
|
-
// 检查网络连接和获取文件信息
|
|
94
176
|
if (spinner) {
|
|
95
|
-
spinner.text =
|
|
177
|
+
spinner.text = '🌐 开始下载模板...';
|
|
96
178
|
}
|
|
97
|
-
|
|
98
|
-
// 下载zip文件
|
|
99
|
-
const response = await fetch(downloadUrl, {
|
|
100
|
-
timeout: 60000, // 60秒超时,给大文件更多时间
|
|
101
|
-
headers: {
|
|
102
|
-
'User-Agent': 'Robot-CLI/1.0.4'
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
179
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
throw new Error(`仓库不存在或私有: ${template.repo}\n请检查仓库地址是否正确且为公开仓库`);
|
|
109
|
-
}
|
|
110
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
111
|
-
}
|
|
180
|
+
// 尝试从不同源下载
|
|
181
|
+
const { response, sourceName } = await tryDownload(template.repoUrl, spinner);
|
|
112
182
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const totalSize = parseInt(contentLength);
|
|
117
|
-
const sizeInMB = (totalSize / 1024 / 1024).toFixed(1);
|
|
118
|
-
spinner.text = `📦 下载模板中... (${sizeInMB}MB)`;
|
|
119
|
-
} else if (spinner) {
|
|
120
|
-
spinner.text = '📦 下载模板中...';
|
|
183
|
+
// 显示下载完成,开始保存
|
|
184
|
+
if (spinner) {
|
|
185
|
+
spinner.text = '💾 保存下载文件...';
|
|
121
186
|
}
|
|
122
187
|
|
|
188
|
+
// 保存到临时文件
|
|
189
|
+
const tempZipPath = path.join(os.tmpdir(), cacheKey + '-' + Date.now() + '.zip');
|
|
190
|
+
const tempExtractPath = path.join(os.tmpdir(), cacheKey + '-extract-' + Date.now());
|
|
191
|
+
|
|
123
192
|
const buffer = await response.buffer();
|
|
124
193
|
await fs.writeFile(tempZipPath, buffer);
|
|
125
194
|
|
|
@@ -134,10 +203,12 @@ export async function downloadTemplate(template, options = {}) {
|
|
|
134
203
|
spinner.text = '🔍 查找项目结构...';
|
|
135
204
|
}
|
|
136
205
|
|
|
137
|
-
//
|
|
206
|
+
// 查找项目目录
|
|
138
207
|
const extractedItems = await fs.readdir(tempExtractPath);
|
|
139
208
|
const projectDir = extractedItems.find(item =>
|
|
140
|
-
item.endsWith('-main') ||
|
|
209
|
+
item.endsWith('-main') ||
|
|
210
|
+
item.endsWith('-master') ||
|
|
211
|
+
item === template.repoUrl.split('/').pop()
|
|
141
212
|
);
|
|
142
213
|
|
|
143
214
|
if (!projectDir) {
|
|
@@ -146,51 +217,43 @@ export async function downloadTemplate(template, options = {}) {
|
|
|
146
217
|
|
|
147
218
|
const sourcePath = path.join(tempExtractPath, projectDir);
|
|
148
219
|
|
|
220
|
+
// 验证模板完整性
|
|
149
221
|
if (spinner) {
|
|
150
222
|
spinner.text = '✅ 验证模板完整性...';
|
|
151
223
|
}
|
|
152
224
|
|
|
153
|
-
// 验证模板完整性
|
|
154
225
|
const packageJsonPath = path.join(sourcePath, 'package.json');
|
|
155
226
|
if (!fs.existsSync(packageJsonPath)) {
|
|
156
|
-
throw new Error(`模板缺少 package.json
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// 读取并验证 package.json
|
|
160
|
-
try {
|
|
161
|
-
const packageJson = await fs.readJson(packageJsonPath);
|
|
162
|
-
if (!packageJson.name) {
|
|
163
|
-
console.log(chalk.yellow('⚠️ 模板 package.json 缺少 name 字段'));
|
|
164
|
-
}
|
|
165
|
-
} catch (error) {
|
|
166
|
-
throw new Error(`package.json 格式错误: ${error.message}`);
|
|
227
|
+
throw new Error(`模板缺少 package.json 文件`);
|
|
167
228
|
}
|
|
168
229
|
|
|
230
|
+
// 保存到缓存
|
|
169
231
|
if (spinner) {
|
|
170
|
-
spinner.text = '💾
|
|
232
|
+
spinner.text = '💾 保存到缓存目录...';
|
|
171
233
|
}
|
|
172
234
|
|
|
173
|
-
// 确保缓存目录存在
|
|
174
235
|
await fs.ensureDir(CACHE_DIR);
|
|
175
|
-
|
|
176
|
-
// 移动到缓存目录
|
|
177
236
|
if (fs.existsSync(cachePath)) {
|
|
178
237
|
await fs.remove(cachePath);
|
|
179
238
|
}
|
|
180
239
|
await fs.move(sourcePath, cachePath);
|
|
181
240
|
|
|
182
241
|
// 清理临时文件
|
|
242
|
+
if (spinner) {
|
|
243
|
+
spinner.text = '🧹 清理临时文件...';
|
|
244
|
+
}
|
|
245
|
+
|
|
183
246
|
await fs.remove(tempZipPath).catch(() => {});
|
|
184
247
|
await fs.remove(tempExtractPath).catch(() => {});
|
|
185
248
|
|
|
186
249
|
if (spinner) {
|
|
187
|
-
spinner.text =
|
|
250
|
+
spinner.text = `🎉 模板下载完成 (via ${sourceName})`;
|
|
188
251
|
}
|
|
189
252
|
|
|
190
253
|
return cachePath;
|
|
191
254
|
|
|
192
255
|
} catch (error) {
|
|
193
|
-
//
|
|
256
|
+
// 清理临时文件
|
|
194
257
|
try {
|
|
195
258
|
const tempFiles = await fs.readdir(os.tmpdir());
|
|
196
259
|
const robotTempFiles = tempFiles.filter(file =>
|
|
@@ -204,17 +267,14 @@ export async function downloadTemplate(template, options = {}) {
|
|
|
204
267
|
// 忽略清理错误
|
|
205
268
|
}
|
|
206
269
|
|
|
207
|
-
//
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (error.code === 'ETIMEDOUT' || error.type === 'request-timeout') {
|
|
213
|
-
throw new Error(`下载超时: 模板文件较大或网络较慢\n请稍后重试或使用 --no-cache 选项`);
|
|
270
|
+
// 简单的错误处理
|
|
271
|
+
let errorMessage = `模板下载失败: ${error.message}`;
|
|
272
|
+
|
|
273
|
+
if (error.code === 'ENOTFOUND' || error.message.includes('网络')) {
|
|
274
|
+
errorMessage += '\n\n💡 建议:\n1. 检查网络连接\n2. 如果在国内,尝试使用科学上网\n3. 稍后重试';
|
|
214
275
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
throw new Error(`模板下载失败: ${error.message}`);
|
|
276
|
+
|
|
277
|
+
throw new Error(errorMessage);
|
|
218
278
|
}
|
|
219
279
|
}
|
|
220
280
|
|
package/lib/templates.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// lib/templates.js -
|
|
1
|
+
// lib/templates.js - 使用 repoUrl 配置
|
|
2
2
|
export const TEMPLATE_CATEGORIES = {
|
|
3
3
|
frontend: {
|
|
4
4
|
name: '🎨 前端项目',
|
|
@@ -12,14 +12,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
12
12
|
'robot-admin': {
|
|
13
13
|
name: 'Robot Admin 完整版',
|
|
14
14
|
description: '包含30+完整示例、权限管理、图表组件、最佳实践等等',
|
|
15
|
-
|
|
15
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Admin',
|
|
16
16
|
features: ['Naive UI', 'Vue Router', 'Pinia', '权限管理', '动态路由', '图表组件', '性能优化等等'],
|
|
17
17
|
version: 'full'
|
|
18
18
|
},
|
|
19
19
|
'robot-admin-base': {
|
|
20
20
|
name: 'Robot Admin 精简版',
|
|
21
21
|
description: '基础架构、核心功能、快速启动',
|
|
22
|
-
|
|
22
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Admin_Base',
|
|
23
23
|
features: ['Naive UI', 'Vue Router', 'Pinia', '基础布局'],
|
|
24
24
|
version: 'base'
|
|
25
25
|
}
|
|
@@ -31,14 +31,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
31
31
|
'robot-monorepo': {
|
|
32
32
|
name: 'Robot Monorepo 完整版',
|
|
33
33
|
description: 'bun workspace + 多包管理 + 共享组件库',
|
|
34
|
-
|
|
34
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Monorepo',
|
|
35
35
|
features: ['bun workspace', 'shared components', 'build tools', 'CI/CD'],
|
|
36
36
|
version: 'full'
|
|
37
37
|
},
|
|
38
38
|
'robot-monorepo-base': {
|
|
39
39
|
name: 'Robot Monorepo 精简版',
|
|
40
40
|
description: '基础 monorepo 结构 + 核心配置',
|
|
41
|
-
|
|
41
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Monorepo_Base',
|
|
42
42
|
features: ['bun workspace', 'basic structure'],
|
|
43
43
|
version: 'base'
|
|
44
44
|
}
|
|
@@ -50,14 +50,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
50
50
|
'robot-micro': {
|
|
51
51
|
name: 'Robot微前端 完整版',
|
|
52
52
|
description: 'MicroApp + Vite插件模块联邦 + 多应用示例',
|
|
53
|
-
|
|
53
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Micro',
|
|
54
54
|
features: ['MicroApp', 'Vite模块联邦', '多应用', '路由共享'],
|
|
55
55
|
version: 'full'
|
|
56
56
|
},
|
|
57
57
|
'robot-micro-base': {
|
|
58
58
|
name: 'Robot微前端 精简版',
|
|
59
59
|
description: '基础 MicroApp 架构 + 主子应用',
|
|
60
|
-
|
|
60
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Micro_Base',
|
|
61
61
|
features: ['MicroApp', '基础配置'],
|
|
62
62
|
version: 'base'
|
|
63
63
|
}
|
|
@@ -74,14 +74,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
74
74
|
'robot-react': {
|
|
75
75
|
name: 'Robot React 完整版',
|
|
76
76
|
description: 'Ant Design + 完整功能演示',
|
|
77
|
-
|
|
77
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_React',
|
|
78
78
|
features: ['Ant Design', 'React Router', 'Redux Toolkit'],
|
|
79
79
|
version: 'full'
|
|
80
80
|
},
|
|
81
81
|
'robot-react-base': {
|
|
82
82
|
name: 'Robot React 精简版',
|
|
83
83
|
description: '基础React + 核心功能',
|
|
84
|
-
|
|
84
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_React_Base',
|
|
85
85
|
features: ['React', 'React Router', '基础组件'],
|
|
86
86
|
version: 'base'
|
|
87
87
|
}
|
|
@@ -103,14 +103,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
103
103
|
'robot-uniapp': {
|
|
104
104
|
name: 'Robot uni-app 完整版',
|
|
105
105
|
description: '多端适配 + 插件市场 + 完整示例',
|
|
106
|
-
|
|
106
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Uniapp',
|
|
107
107
|
features: ['多端发布', 'uView UI', '插件集成'],
|
|
108
108
|
version: 'full'
|
|
109
109
|
},
|
|
110
110
|
'robot-uniapp-base': {
|
|
111
111
|
name: 'Robot uni-app 精简版',
|
|
112
112
|
description: '基础框架 + 核心功能',
|
|
113
|
-
|
|
113
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Uniapp_Base',
|
|
114
114
|
features: ['基础框架', '路由配置'],
|
|
115
115
|
version: 'base'
|
|
116
116
|
}
|
|
@@ -127,7 +127,7 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
127
127
|
'robot-tarao': {
|
|
128
128
|
name: 'Robot Tarao 完整版',
|
|
129
129
|
description: '原生性能 + 跨平台 + 完整功能(暂无,后续完善)',
|
|
130
|
-
|
|
130
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Tarao',
|
|
131
131
|
features: ['原生性能', '跨平台', '完整功能'],
|
|
132
132
|
version: 'full',
|
|
133
133
|
status: 'coming-soon'
|
|
@@ -135,7 +135,7 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
135
135
|
'robot-tarao-base': {
|
|
136
136
|
name: 'Robot Tarao 精简版',
|
|
137
137
|
description: '基础 Tarao 框架(暂无,后续完善)',
|
|
138
|
-
|
|
138
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Tarao_Base',
|
|
139
139
|
features: ['基础框架', '核心功能'],
|
|
140
140
|
version: 'base',
|
|
141
141
|
status: 'coming-soon'
|
|
@@ -158,14 +158,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
158
158
|
'robot-nest': {
|
|
159
159
|
name: 'Robot NestJS 完整版',
|
|
160
160
|
description: 'NestJS + TypeORM + JWT + Swagger + Redis + 完整生态',
|
|
161
|
-
|
|
161
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Nest',
|
|
162
162
|
features: ['NestJS', 'TypeORM', 'JWT认证', 'ApiFox文档', 'Redis', '微服务'],
|
|
163
163
|
version: 'full'
|
|
164
164
|
},
|
|
165
165
|
'robot-nest-base': {
|
|
166
166
|
name: 'Robot NestJS 精简版',
|
|
167
167
|
description: '基础 NestJS + 核心模块',
|
|
168
|
-
|
|
168
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Nest_Base',
|
|
169
169
|
features: ['NestJS', '基础路由', '错误处理'],
|
|
170
170
|
version: 'base'
|
|
171
171
|
}
|
|
@@ -177,7 +177,7 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
177
177
|
'robot-nest-micro': {
|
|
178
178
|
name: 'Robot NestJS微服务版',
|
|
179
179
|
description: 'NestJS + 微服务架构 + gRPC + 服务发现',
|
|
180
|
-
|
|
180
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Nest_Micro',
|
|
181
181
|
features: ['NestJS', '微服务', 'gRPC', 'Redis', '服务发现'],
|
|
182
182
|
version: 'micro'
|
|
183
183
|
}
|
|
@@ -194,14 +194,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
194
194
|
'robot-koa': {
|
|
195
195
|
name: 'Robot Koa3 完整版',
|
|
196
196
|
description: 'Koa3 + TypeScript + JWT + 数据库 + 中间件',
|
|
197
|
-
|
|
197
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Koa',
|
|
198
198
|
features: ['Koa3', 'TypeScript', 'JWT认证', 'MySQL', '中间件'],
|
|
199
199
|
version: 'full'
|
|
200
200
|
},
|
|
201
201
|
'robot-koa-base': {
|
|
202
202
|
name: 'Robot Koa3 精简版',
|
|
203
203
|
description: '基础Koa3 + 核心中间件',
|
|
204
|
-
|
|
204
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Koa_Base',
|
|
205
205
|
features: ['Koa3', '基础路由', '错误处理'],
|
|
206
206
|
version: 'base'
|
|
207
207
|
}
|
|
@@ -223,14 +223,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
223
223
|
'robot-electron': {
|
|
224
224
|
name: 'Robot Electron 完整版',
|
|
225
225
|
description: 'Vue3 + Electron + 自动更新 + 原生能力',
|
|
226
|
-
|
|
226
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Electron',
|
|
227
227
|
features: ['Vue3', 'Electron', '自动更新', '原生API'],
|
|
228
228
|
version: 'full'
|
|
229
229
|
},
|
|
230
230
|
'robot-electron-base': {
|
|
231
231
|
name: 'Robot Electron 精简版',
|
|
232
232
|
description: '基础Electron + Vue框架',
|
|
233
|
-
|
|
233
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Electron_Base',
|
|
234
234
|
features: ['Vue3', 'Electron', '基础功能'],
|
|
235
235
|
version: 'base'
|
|
236
236
|
}
|
|
@@ -247,14 +247,14 @@ export const TEMPLATE_CATEGORIES = {
|
|
|
247
247
|
'robot-tauri': {
|
|
248
248
|
name: 'Robot Tauri 完整版',
|
|
249
249
|
description: 'Rust后端 + Vue前端 + 原生性能',
|
|
250
|
-
|
|
250
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Tauri',
|
|
251
251
|
features: ['Tauri', 'Vue3', 'Rust backend', '原生性能'],
|
|
252
252
|
version: 'full'
|
|
253
253
|
},
|
|
254
254
|
'robot-tauri-base': {
|
|
255
255
|
name: 'Robot Tauri 精简版',
|
|
256
256
|
description: '基础Tauri + Vue框架',
|
|
257
|
-
|
|
257
|
+
repoUrl: 'https://github.com/ChenyCHENYU/Robot_Tauri_Base',
|
|
258
258
|
features: ['Tauri', 'Vue3', '基础功能'],
|
|
259
259
|
version: 'base'
|
|
260
260
|
}
|