yg-team-cli 2.4.2 → 2.4.4
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/dist/cli.js +7 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2602,20 +2602,20 @@ var init_breakdown = __esm({
|
|
|
2602
2602
|
const tasks = new Listr2([
|
|
2603
2603
|
{
|
|
2604
2604
|
title: "\u626B\u63CF spec \u6587\u4EF6",
|
|
2605
|
-
task: async () => {
|
|
2605
|
+
task: async (ctx) => {
|
|
2606
2606
|
const specDir = "docs/specs";
|
|
2607
2607
|
const exists = await FileUtils.exists(specDir);
|
|
2608
2608
|
if (!exists) {
|
|
2609
2609
|
throw new Error(`specs \u76EE\u5F55\u4E0D\u5B58\u5728: ${specDir}`);
|
|
2610
2610
|
}
|
|
2611
2611
|
const files = await FileUtils.findFiles("*.md", specDir);
|
|
2612
|
-
|
|
2612
|
+
ctx.specs = files.filter((f) => !f.includes("template"));
|
|
2613
2613
|
}
|
|
2614
2614
|
},
|
|
2615
2615
|
{
|
|
2616
2616
|
title: "\u9009\u62E9 spec \u6587\u4EF6",
|
|
2617
2617
|
task: async (ctx) => {
|
|
2618
|
-
if (ctx.specs.length === 0) {
|
|
2618
|
+
if (!ctx.specs || ctx.specs.length === 0) {
|
|
2619
2619
|
throw new Error("\u672A\u627E\u5230 spec \u6587\u4EF6");
|
|
2620
2620
|
}
|
|
2621
2621
|
if (!specFile) {
|
|
@@ -2627,14 +2627,15 @@ var init_breakdown = __esm({
|
|
|
2627
2627
|
choices: ctx.specs
|
|
2628
2628
|
}
|
|
2629
2629
|
]);
|
|
2630
|
-
|
|
2630
|
+
ctx.selectedFile = path8.join("docs/specs", selectedFile);
|
|
2631
|
+
return;
|
|
2631
2632
|
}
|
|
2632
2633
|
const fullPath = specFile.startsWith("docs/specs/") ? specFile : path8.join("docs/specs", specFile);
|
|
2633
2634
|
const exists = await FileUtils.exists(fullPath);
|
|
2634
2635
|
if (!exists) {
|
|
2635
2636
|
throw new Error(`Spec \u6587\u4EF6\u4E0D\u5B58\u5728: ${specFile}`);
|
|
2636
2637
|
}
|
|
2637
|
-
|
|
2638
|
+
ctx.selectedFile = fullPath;
|
|
2638
2639
|
}
|
|
2639
2640
|
},
|
|
2640
2641
|
{
|
|
@@ -2673,7 +2674,7 @@ var init_breakdown = __esm({
|
|
|
2673
2674
|
const ctx = await tasks.run();
|
|
2674
2675
|
logger.newLine();
|
|
2675
2676
|
logger.header("Spec \u62C6\u5206\u5B8C\u6210!");
|
|
2676
|
-
logger.success(`Milestones \u5DF2\u6DFB\u52A0\u5230: ctx.selectedFile}`);
|
|
2677
|
+
logger.success(`Milestones \u5DF2\u6DFB\u52A0\u5230: ${ctx.selectedFile}`);
|
|
2677
2678
|
logger.newLine();
|
|
2678
2679
|
logger.info("\u4E0B\u4E00\u6B65:");
|
|
2679
2680
|
logger.step("1. \u68C0\u67E5\u62C6\u5206\u7ED3\u679C\uFF0C\u6839\u636E\u9700\u8981\u8C03\u6574");
|