-
Notifications
You must be signed in to change notification settings - Fork 778
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
Refactor pipelines commands into separate files, rename some options #7769
Conversation
🦋 Changeset detectedLatest commit: 6adab89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
c9e676d
to
e7987d4
Compare
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-wrangler-7769 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7769/npm-package-wrangler-7769 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-wrangler-7769 dev path/to/script.js Additional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-workers-bindings-extension-7769 -O ./cloudflare-workers-bindings-extension.0.0.0-v9c83f4d50.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v9c83f4d50.vsix create-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-create-cloudflare-7769 --no-auto-update @cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-kv-asset-handler-7769 miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-miniflare-7769 @cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-pages-shared-7769 @cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-unenv-preset-7769 @cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-vite-plugin-7769 @cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-vitest-pool-workers-7769 @cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-workers-editor-shared-7769 @cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-workers-shared-7769 @cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13115864808/npm-package-cloudflare-workflows-shared-7769 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
8661d52
to
133c4d2
Compare
d10d5c9
to
33c4b28
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.
I have no comments on the code, as it looks like the functions have just been moved to separate files. The only thing it would be good to address here is the consistency in naming "Pipelines" vs "pipelines", "Workers" vs "workers". I believe we should always capitalise product names.
7703b5c
to
7669912
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.
Looks good to me overall! Just a few minor suggestions.
Also, we’re migrating existing commands to a new setup as documented here. This isn’t blocking for this change, but just an FYI. 👍🏼
**Pipelines is currently in closed beta, renaming these without providing aliases _should_ have no impact** Moving each of the subcommand handlers and options for each subcommand into its own file. This also renames many of the parameters to be more specific. The following parameters have been renamed: | Previous Name | New Name | | ---- | ---- | | access-key-id | r2-access-key-id | | secret-access-key | r2-secret-access-key | | transform | transform-worker | | r2 | r2-bucket | | prefix | r2-prefix | | binding | enable-worker-binding | | http | enable-http | | authentication | require-http-auth | | filename | file-template | | filepath | partition-template | Adds the following new option for `create` and `update` commands: ``` --cors-origins CORS origin allowlist for HTTP endpoint (use * for any origin) [array] ``` Closes https://jira.cfdata.org/browse/PIPE-160.
This also replaces the use of retryOnError with a for-loop as retryOnError wasn't working as expected.
Previously this was nested under the `enableHttp` block which doesn't make sense if HTTP is already enabled and the user just wants to update the authentication or CORS settings.
Also split the previous changeset into two.
Co-authored-by: Edmund Hung <[email protected]>
Based on PR feedback, drop the metrics calls and use chalk.bold for CLI flag groups. Snapshots were updated for tests.
68bb78a
to
3d3fad0
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.
Looks good to me.
Co-authored-by: Edmund Hung <[email protected]>
Pipelines is currently in closed beta, renaming these without providing aliases should have limited to zero impact
Moving each of the subcommand handlers and options for each subcommand into its own file. This also renames many of the parameters to be more specific.
The following parameters have been renamed:
Adds the following new option for
create
andupdate
commands:Closes https://jira.cfdata.org/browse/PIPE-160.