fix: Map short options in generate command to prevent silent exit#183
Merged
d-gubert merged 5 commits intoMay 25, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes rc-apps generate -o <value> so that shorthand option values (a, b, c) are mapped to the command’s full category strings before the switch executes, preventing a no-op/silent completion when using valid shorthand flags.
Changes:
- Map
-o a|b|ctoApi Extension/Slash Command Extension/Settings Extensioningeneratecommand execution. - Add CLI tests intended to cover valid/invalid shorthand option values.
- Update
package-lock.jsonwith additional"peer": truemetadata for some packages.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/commands/generate.ts |
Adds shorthand-to-category mapping before the option switch. |
test/commands/generate.test.ts |
Adds regression tests for shorthand option values (currently not asserting the fix’s behavior). |
package-lock.json |
Adds "peer": true flags for several existing dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tests aren't running on new Node version, and this test flow didn't match the current execution as it misses some assumptions
d-gubert
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a bug in the rc-apps generate command where using the shorthand -o flags (a, b, or c) resulted in the CLI exiting silently without providing an error or generating the requested boilerplate files.
This has been resolved by mapping the valid single-character inputs from flags.options back to their full category equivalents before evaluating the switch block. This significantly improves the developer experience by ensuring boilerplate templates generate as expected when using the CLI arguments.
Changes Made