add create, redeploy, images to output of sf nodes -h#216
Merged
joshi4 merged 1 commit intoOct 22, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
Reordered subcommand registration to ensure create, redeploy, and images commands appear in the sf nodes -h help output. The subcommands are now added before capturing baseHelpText instead of after, allowing Commander.js's helpInformation() to include them.
Key changes:
- Moved
addImage(),addCreate(), andaddRedeploy()calls from lines 106-108 to lines 31-33 (beforebaseHelpTextcapture on line 35) - Fixed trailing whitespace on lines 42 and 92
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The change is a simple reordering of function calls to fix help text generation, with no logical or behavioral changes beyond the intended fix. The trailing whitespace cleanup is also a minor formatting improvement.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/lib/nodes/index.ts | 5/5 | Moved subcommand registration before help text capture to include create, redeploy, and images in help output, also fixed trailing whitespace |
Sequence Diagram
sequenceDiagram
participant User
participant CLI as sf nodes -h
participant registerNodes
participant Commander
participant addImage
participant addCreate
participant addRedeploy
User->>CLI: Run sf nodes -h
CLI->>registerNodes: registerNodes(program)
registerNodes->>Commander: Create nodes command
registerNodes->>Commander: Add subcommands (list, get, extend, etc.)
Note over registerNodes,addRedeploy: BEFORE: Subcommands added here
registerNodes->>addImage: addImage(nodes)
addImage-->>registerNodes: Register images subcommand
registerNodes->>addCreate: addCreate(nodes)
addCreate-->>registerNodes: Register create subcommand
registerNodes->>addRedeploy: addRedeploy(nodes)
addRedeploy-->>registerNodes: Register redeploy subcommand
Note over registerNodes,Commander: AFTER: baseHelpText now includes all subcommands
registerNodes->>Commander: baseHelpText = nodes.helpInformation()
registerNodes->>Commander: Add custom help text
registerNodes->>Commander: Set action for help display
Commander-->>User: Display complete help with all subcommands
1 file reviewed, no comments
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.

No description provided.