@agile-team/robot-cli 1.1.5 → 1.1.6

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 (2) hide show
  1. package/lib/create.js +19 -8
  2. package/package.json +1 -1
package/lib/create.js CHANGED
@@ -213,7 +213,7 @@ async function selectFromRecommended() {
213
213
  const choices = Object.entries(recommended).map(([key, template]) => {
214
214
  // 构建特性标签
215
215
  const featureTags = template.features.slice(0, 3).map(f =>
216
- chalk.cyan(`[${f}]`)
216
+ chalk.dim(`[${f}]`)
217
217
  ).join(' ');
218
218
 
219
219
  // 版本标签 - 只保留方括号内的版本
@@ -222,16 +222,27 @@ async function selectFromRecommended() {
222
222
  chalk.yellow('[精简版]');
223
223
 
224
224
  return {
225
- name: `${chalk.bold.white(template.name.replace(/\s*(完整版|精简版)\s*$/, ''))} ${versionTag}
226
- ${chalk.dim(template.description)}
227
- ${featureTags}${template.features.length > 3 ? chalk.dim(` +${template.features.length - 3}more`) : ''}
228
- ${chalk.dim('━'.repeat(60))}`,
225
+ name: `${chalk.bold.white(template.name.replace(/\s*(完整版|精简版)\s*$/, ''))} ${versionTag} - ${chalk.dim(template.description)}
226
+ ${chalk.dim(featureTags)}${template.features.length > 3 ? chalk.dim(` +${template.features.length - 3}more`) : ''}`,
229
227
  value: { key, ...template },
230
228
  short: template.name,
231
229
  };
232
230
  });
233
231
 
234
- choices.push({
232
+ // 为每个推荐模板添加分隔符
233
+ const choicesWithSeparators = [];
234
+ choices.forEach((choice, index) => {
235
+ choicesWithSeparators.push(choice);
236
+ if (index < choices.length - 1) {
237
+ choicesWithSeparators.push({
238
+ name: chalk.dim("━".repeat(60)),
239
+ value: `sep_${index}`,
240
+ disabled: true
241
+ });
242
+ }
243
+ });
244
+
245
+ choicesWithSeparators.push({
235
246
  name: chalk.dim("⬅️ 返回选择其他方式"),
236
247
  value: "back",
237
248
  });
@@ -241,8 +252,8 @@ async function selectFromRecommended() {
241
252
  type: "list",
242
253
  name: "selectedTemplate",
243
254
  message: "选择推荐模板:",
244
- choices,
245
- pageSize: 8,
255
+ choices: choicesWithSeparators,
256
+ pageSize: 15,
246
257
  loop: false
247
258
  },
248
259
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/robot-cli",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "🤖 现代化项目脚手架工具,支持多技术栈快速创建项目 - 总是下载最新版本",
5
5
  "type": "module",
6
6
  "bin": {