ai-hero-cli 0.3.0 → 0.3.1

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/bin.cjs +6 -3
  2. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -84759,14 +84759,17 @@ var PromptService = class extends Effect_exports.Service()(
84759
84759
  type: "autocomplete",
84760
84760
  name: "subfolderIndex",
84761
84761
  message: "Select a subfolder",
84762
- choices: subfolders.map((subfolder, index) => ({
84762
+ choices: subfolders.map((subfolder) => ({
84763
84763
  title: subfolder,
84764
- value: index
84764
+ // Use subfolder name as value instead of numeric index
84765
+ // to avoid prompts library treating 0 as falsy and
84766
+ // returning the title string instead (GitHub issue #42)
84767
+ value: subfolder
84765
84768
  }))
84766
84769
  }
84767
84770
  ])
84768
84771
  );
84769
- return subfolderIndex;
84772
+ return subfolders.indexOf(subfolderIndex);
84770
84773
  }
84771
84774
  );
84772
84775
  const selectExerciseAction = Effect_exports.fn(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hero-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "The CLI used to run exercises for the AI Hero course",
6
6
  "bin": "bin.cjs",