-
Notifications
You must be signed in to change notification settings - Fork 2
refactor(introduce-modular-cmds): state #689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
27212fb to
08ec92d
Compare
There was a problem hiding this 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 PR refactors the state command implementation into a modular, testable package structure. The refactoring moves state command logic from the legacy CLI commands to a new pkg/commands/state package with improved dependency injection and test coverage.
Changes:
- Introduces a new modular state command package with dependency injection support
- Adds comprehensive test coverage for the state generation functionality
- Provides a factory pattern for creating commands with shared configuration
- Updates legacy CLI to delegate to the new modular implementation for backward compatibility
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/commands/state/generate.go | New file implementing the state generation command with injectable dependencies |
| pkg/commands/state/deps.go | New file defining dependency injection types and configuration for state commands |
| pkg/commands/state/command_test.go | New comprehensive test suite covering state command functionality |
| pkg/commands/state/command.go | New file providing the main command constructor with subcommand registration |
| pkg/commands/commands_test.go | New tests for the Commands factory pattern |
| pkg/commands/commands.go | New factory for creating CLI commands with shared configuration |
| engine/cld/legacy/cli/commands/state_test.go | Updated legacy tests to use the new Commands constructor |
| engine/cld/legacy/cli/commands/state.go | Refactored to delegate to the new modular state package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
08ec92d to
0e44940
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b893610 to
89a2f52
Compare
|
|
Thank you for all the comments @graham-chainlink, updated accordingly, answered. |
graham-chainlink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, looks good to me!




https://smartcontract-it.atlassian.net/browse/CLD-596