fix(VEG-3633): Refactor the connector commands#319
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the zcli connectors CLI to streamline the bundle/create workflows and tighten validation behavior, aligning error output and improving diagnostics.
Changes:
- Simplifies
connectors:bundleby removing--input/--outputin favor of an optional positional connector-root path and defaulting output to<root>/dist. - Updates validation behavior so missing
dist/assetsis a hard error and adjusts the related unit test. - Removes
--authorfromconnectors:createand adjusts some error output coloring and messaging.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/zcli-connectors/src/lib/validations/manifestValidation.ts | Updates manifest validation error guidance to reference the connector source file and bundle invocation. |
| packages/zcli-connectors/src/lib/validations/assetsValidation.ts | Makes missing assets directory a validation failure instead of a no-op. |
| packages/zcli-connectors/src/lib/validations/assetsValidation.test.ts | Updates unit test to assert the new missing-assets error behavior. |
| packages/zcli-connectors/src/commands/connectors/create.ts | Removes --author flag usage and updates create-time replacements and error coloring. |
| packages/zcli-connectors/src/commands/connectors/bundle.ts | Refactors bundle command interface to accept connector-root path and sets output to <root>/dist, plus adjusts spinner timing and error color. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/zcli-connectors/src/lib/validations/manifestValidation.ts
Outdated
Show resolved
Hide resolved
f2c4925 to
a0bc82c
Compare
a0bc82c to
2ef4269
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/zcli-connectors/src/lib/validations/assetsValidation.test.ts
Outdated
Show resolved
Hide resolved
2ef4269 to
6c7baf9
Compare
6c7baf9 to
76221e3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/zcli-connectors/src/lib/validations/assetsValidation.ts
Outdated
Show resolved
Hide resolved
76221e3 to
c4c0157
Compare
Description
Summary
defaults to /dist. Also moved the TypeScript success spinner message to after the type check completes, and improved error output color (cyan → red).
c4c0157Refactor the connector commandsDetail
Ref: https://zendesk.atlassian.net/browse/VEG-3633
Checklist