Skip to content

Refactor CLI for improved structure and testability#1

Draft
google-labs-jules[bot] wants to merge 1 commit intomainfrom
refactor-cli-structure
Draft

Refactor CLI for improved structure and testability#1
google-labs-jules[bot] wants to merge 1 commit intomainfrom
refactor-cli-structure

Conversation

@google-labs-jules
Copy link
Copy Markdown

This commit performs a major refactoring of the CLI application to improve its structure, maintainability, and testability.

This commit performs a major refactoring of the CLI application to improve its structure, maintainability, and testability.

The monolithic `blackbox-cli.js` file has been broken down into smaller, single-responsibility modules:
- The `batch-call` command logic is now encapsulated in a new `BatchCaller` class (`lib/batch-caller.js`).
- The `watch` command logic has been moved into the `CampaignWatcher` class (`lib/campaign-watcher.js`).
- Common utility functions have been extracted to `lib/utils.js`.

This new structure makes the code more organized, easier to understand, and significantly more testable.

New unit tests have been added for the `BatchCaller` and `utils` modules, and all existing tests have been updated to pass with the new architecture.
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.

0 participants