yg-team-cli 2.4.1 → 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 +8 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.js +8 -7
- 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
|
{
|
|
@@ -3239,7 +3240,7 @@ async function addFeatureFromPrd(featureName, featureSlug, specFile) {
|
|
|
3239
3240
|
logger.newLine();
|
|
3240
3241
|
logger.separator("\u2500", 60);
|
|
3241
3242
|
logger.newLine();
|
|
3242
|
-
|
|
3243
|
+
ctx2.generatedSpec = result;
|
|
3243
3244
|
}
|
|
3244
3245
|
},
|
|
3245
3246
|
{
|
|
@@ -3329,7 +3330,7 @@ async function addFeatureSimple(featureName, featureSlug, specFile) {
|
|
|
3329
3330
|
logger.newLine();
|
|
3330
3331
|
logger.separator("\u2500", 60);
|
|
3331
3332
|
logger.newLine();
|
|
3332
|
-
|
|
3333
|
+
ctx2.generatedSpec = result;
|
|
3333
3334
|
}
|
|
3334
3335
|
},
|
|
3335
3336
|
{
|