feat(cli): add top-level rebuild alias#1383
feat(cli): add top-level rebuild alias#1383Han5991 wants to merge 4 commits intovoidzero-dev:mainfrom
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
@Han5991 Thank you very much for your contribution. Could you please add the corresponding user documentation? |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Thank you for leaving a comment! Could you please review it again? |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8a102930b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Some("rebuild") => { | ||
| let mut normalized = Vec::with_capacity(args.len() + 1); | ||
| normalized.push(args[0].clone()); | ||
| normalized.push("pm".to_string()); | ||
| normalized.push("rebuild".to_string()); |
There was a problem hiding this comment.
Normalize
help rebuild through pm alias
Adding a direct rebuild rewrite here makes vp rebuild --help work, but vp help rebuild still fails because help normalization (vp [command] --help) happens in a separate branch and normalization is only applied once. In that flow, the args become vp rebuild --help and then go straight to clap parsing, where rebuild is not a real top-level subcommand, so users get an unknown-command error instead of help for the newly added alias.
Useful? React with 👍 / 👎.
Summary
vp rebuildalias that normalizes tovp pm rebuildWhy
rebuildcommand #1057 asks for a top-level rebuild commandvp pm rebuild, so this change exposes it without duplicating logicCloses #1057
Validation
cargo test -p vite_global_cli