docs(rfcs): align command routing with the current global CLI - #2528
Conversation
Rewrite the Command Routing section of merge-global-and-local-cli.md to mirror crates/vp_global_cli/src/cli.rs: Categories A, B, and C as the code labels them, plus the Rust-native global commands (toolchain, env, upgrade, implode) that sit outside those blocks. Replace the two-path ASCII diagram with a mermaid flowchart and point the --global interception at commands::global instead of the removed commands::env::global_install.
✅ Deploy Preview for viteplus-preview canceled.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44a34daea0
ℹ️ 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".
run_command_with_options handles args.version in commands::version before any JS resolution, so it does not belong in Category B.
commands::toolchain only delegates when a local vite-plus resolves; with --global or no local install it renders the global manifest in Rust.
… CLI JsExecutor::delegate_migrate bypasses an older local vite-plus, so migrate does not follow the plain local-first path of the other Category B commands.
packages/cli builds its CLI entries with tsdown via buildWithTsdown(); the CLI package has no rolldown config.
…g diagram Package-manager commands entering through the global vp binary are handled by run_package_manager_command and never reach bin.ts; the NAPI route only exists for direct local invocations, which the prose now states.
0e40a9d to
61b8c5f
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61b8c5fb03
ℹ️ 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".
… implode --version and toolchain are also implemented in the local CLI and are reached there on direct invocation of the JavaScript entry point.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
The Command Routing section of
rfcs/merge-global-and-local-cli.mdstill described the two-path model from the original merge: Category A for package-manager commands and Category B for "everything else".crates/vp_global_cli/src/cli.rshas since grown into three labelled blocks plus a handful of Rust-native commands, so the RFC no longer matched the code it documents.This rewrites the section to mirror
cli.rsas it is today:create,migrate,config,hooks,staged,--version), and C (local CLI delegation:devthroughcache), matching the comment blocks in theCommandsenum.toolchainas a hybrid that delegates locally or renders the globaltoolchain.jsondepending on--global,env, and the self-management pairupgradeandimplode.--globalinterception for package-manager commands now points atPackageManagerCommand::managed_global_commandandcommands::global; the RFC still referenced the removedcommands::env::global_install.docs/andrfcs/core-binding-resolution.md, so the B and C convergence onoxc_resolverand the--globalbranches are visible.Docs only, no code changes. Follows up on the routing gaps surfaced while reviewing #2525.