Refactor CLI command handlers#383
Merged
Merged
Conversation
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.
Summary
packages/cli/src/index.tsinto focusedpackages/cli/src/commands/*modules.index.tswhile preserving existing command names, option parsing, JSON output, and help behavior for the extracted slice.index.tsfor a separate follow-up slice to keep this PR focused.Tests
npm run buildnode packages/cli/dist/index.js helpnode packages/cli/dist/index.js commands --jsonnode packages/cli/dist/index.js schema recipe --jsonnode packages/cli/dist/index.js recipe validate --recipe examples/recipes/simple-plugin.json --jsonnode packages/cli/dist/index.js recipe-run --recipe examples/recipes/simple-plugin.json --dry-run --jsonnode packages/cli/dist/index.js validate-blueprint --blueprint '{"steps":[]}' --jsonnode packages/cli/dist/index.js run --mount ./examples/simple-plugin:/wordpress/wp-content/plugins/simple-plugin --command wordpress.run-php --arg code-file=./examples/simple-plugin/probe.php --artifacts ./artifacts --jsonnpm run workspace-policy-smokenpm run discovery-command-smokenpm run recipe-dry-run-smokeCaveats
npm installwas required because the fresh worktree did not havenode_modules; incidentalpackage-lock.jsonversion churn was reverted.recipe-runandrecipe validateinternals remain inindex.ts; this PR intentionally extracts only a coherent non-recipe command slice.AI assistance