yg-team-cli 2.4.2 → 2.4.3

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 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
- return files.filter((f) => !f.includes("template"));
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
- return path8.join("docs/specs", selectedFile);
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
- return fullPath;
2638
+ ctx.selectedFile = fullPath;
2638
2639
  }
2639
2640
  },
2640
2641
  {