Skip to content

refactor: move CLI code and command modules to vite-plus-cli#241

Merged
branchseer merged 2 commits intomainfrom
10-22-refactor_task_move_cli_parsing_and_task_synthesizing_to_vite-plus-cli
Oct 22, 2025
Merged

refactor: move CLI code and command modules to vite-plus-cli#241
branchseer merged 2 commits intomainfrom
10-22-refactor_task_move_cli_parsing_and_task_synthesizing_to_vite-plus-cli

Conversation

@branchseer
Copy link
Copy Markdown
Member

  • Move all CLI-related code from vite_task to vite-plus-cli:

    • Args, Commands, CacheSubcommand structs
    • CliOptions and helper functions
    • main() entry point and init_tracing()
  • Move command modules as internal to vite-plus-cli:

    • doc, fmt, install, lib_cmd, lint, test, vite modules
    • Keep command-specific configs with their modules
    • Commands are internal (pub(crate)) since it's a NAPI module
  • Clean up vite_task to be a pure execution engine:

    • Export only core types: ResolvedTask, Workspace, ExecutionPlan, etc.
    • Remove all CLI and command-specific code
    • Make ResolvedTask methods public for CLI use

This creates a clean separation where vite_task is the task execution
library and vite-plus-cli handles all CLI concerns and command implementations.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Copy link
Copy Markdown
Member Author

branchseer commented Oct 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer force-pushed the 10-22-refactor_task_move_cli_parsing_and_task_synthesizing_to_vite-plus-cli branch from c30833a to b67a65e Compare October 22, 2025 08:48
- Move all CLI-related code from vite_task to vite-plus-cli:
  - Args, Commands, CacheSubcommand structs
  - CliOptions and helper functions
  - main() entry point and init_tracing()

- Move command modules as internal to vite-plus-cli:
  - doc, fmt, install, lib_cmd, lint, test, vite modules
  - Keep command-specific configs with their modules
  - Commands are internal (pub(crate)) since it's a NAPI module

- Clean up vite_task to be a pure execution engine:
  - Export only core types: ResolvedTask, Workspace, ExecutionPlan, etc.
  - Remove all CLI and command-specific code
  - Make ResolvedTask methods public for CLI use

This creates a clean separation where vite_task is the task execution
library and vite-plus-cli handles all CLI concerns and command implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@branchseer branchseer changed the base branch from 10-21-refactor_fspy_use_shared_memory_ipc_on_windows to graphite-base/241 October 22, 2025 08:53
@branchseer branchseer force-pushed the 10-22-refactor_task_move_cli_parsing_and_task_synthesizing_to_vite-plus-cli branch from b67a65e to d783b96 Compare October 22, 2025 08:53
@branchseer branchseer changed the base branch from graphite-base/241 to main October 22, 2025 08:53
@branchseer branchseer marked this pull request as ready for review October 22, 2025 09:36
Copilot AI review requested due to automatic review settings October 22, 2025 09:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This refactor moves all CLI-related code from vite_task to vite-plus-cli, creating a cleaner separation between the task execution engine and CLI interface. The vite_task crate is now a pure library focused on task execution, while vite-plus-cli handles all argument parsing, command implementations, and CLI concerns.

  • CLI types (Args, Commands, CliOptions) and entry point relocated to vite-plus-cli
  • All command implementations (doc, fmt, lint, test, lib, install, vite) moved to internal vite-plus-cli modules
  • vite_task simplified to export only core execution types

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/cli/binding/src/lib.rs Updates imports to use moved CLI types from local modules
packages/cli/binding/src/cli.rs New file containing all CLI logic moved from vite_task
packages/cli/binding/src/commands/*.rs Command modules moved from vite_task with updated imports
packages/cli/binding/src/commands/mod.rs Module declarations for command modules
packages/cli/binding/Cargo.toml Added dependencies previously in vite_task
crates/vite_task/src/lib.rs Simplified to export only core execution types
crates/vite_task/src/types.rs New file containing ResolveCommandResult type
crates/vite_task/src/main.rs Removed binary entry point
crates/vite_task/src/config/*.rs Made methods public for CLI usage
crates/vite_task/Cargo.toml Removed binary configuration
.github/workflows/ci.yml Updated to use new CLI bootstrap approach

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/cli/binding/src/cli.rs
Comment thread crates/vite_task/src/types.rs
Copy link
Copy Markdown
Member Author

branchseer commented Oct 22, 2025

Merge activity

  • Oct 22, 9:58 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 22, 9:58 AM UTC: @branchseer merged this pull request with Graphite.

@branchseer branchseer merged commit d0f2233 into main Oct 22, 2025
10 checks passed
@branchseer branchseer deleted the 10-22-refactor_task_move_cli_parsing_and_task_synthesizing_to_vite-plus-cli branch October 22, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants