feat(VEG-3468): Introduce the publish connector command#316
Conversation
7d9bea8 to
9980f8c
Compare
There was a problem hiding this comment.
Pull request overview
Adds an initial “publish connector” flow to the connectors CLI, including packaging built artifacts and uploading them via a presigned URL, plus a core helper for making non-authenticated/raw HTTP requests.
Changes:
- Added
requestRawtozcli-corefor making axios fetch-adapter requests without applying zcli auth configuration. - Introduced a new
connectors publishcommand plus publish library helpers to create an archive, create a connector via API, and upload the package. - Added unit + functional tests and a zip fixture for the publish flow.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/zcli-core/src/lib/request.ts | Adds requestRaw helper for raw axios requests |
| packages/zcli-core/src/lib/request.test.ts | Adds tests for requestRaw |
| packages/zcli-connectors/src/commands/connectors/publish.ts | New CLI command implementing publish + validation-only flows |
| packages/zcli-connectors/src/lib/publish/publish.ts | New publish helper functions (zip, create, upload) |
| packages/zcli-connectors/src/lib/publish/publish.test.ts | Unit tests for publish helpers |
| packages/zcli-connectors/tests/functional/publish.test.ts | Functional tests for the publish command |
| packages/zcli-connectors/fixtures/test-connector.zip | Adds a zip fixture for tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9980f8c to
6c9a0f1
Compare
6c9a0f1 to
e2af4fb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e2af4fb to
8081933
Compare
8081933 to
3f38207
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let packagePath: string | undefined | ||
|
|
||
| try { | ||
| packagePath = await createPackageArchive(path, connectorName) |
There was a problem hiding this comment.
If createPackageArchive fails after the file is created (line 14) but before the 'close' event fires (line 19-20), the promise will reject without returning the packagePath. This means the partial zip file will remain on disk and won't be cleaned up by the finally block at line 117-119, since packagePath will be undefined. Consider storing the packagePath in a way that allows cleanup even if archive creation fails, or handle errors in createPackageArchive to clean up partial files before rejecting.
mmassaki
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments. I just left a nit one.
3f38207 to
bdf3963
Compare
Description
Adds an initial “publish connector” flow to the connectors CLI, including packaging built artifacts and uploading them via a presigned URL, plus a core helper for making non-authenticated/raw HTTP requests.
bdf3963Add the publish connector command flowDetail
JIRA: https://zendesk.atlassian.net/browse/VEG-3468
Checklist