Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cmackenzie1
Copy link
Contributor

@cmackenzie1 cmackenzie1 commented Jan 14, 2025

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:

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.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: Unit tests cover the change
  • Public documentation

Copy link

changeset-bot bot commented Jan 14, 2025

🦋 Changeset detected

Latest commit: c70d322

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers Patch

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

**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.
@cmackenzie1 cmackenzie1 force-pushed the cole/pipe-160-pipelines-cors branch from c9e676d to e7987d4 Compare January 14, 2025 23:11
@cmackenzie1 cmackenzie1 self-assigned this Jan 14, 2025
Copy link
Contributor

github-actions bot commented Jan 14, 2025

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/12795361715/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 with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/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/12795361715/npm-package-cloudflare-workers-bindings-extension-7769 -O ./cloudflare-workers-bindings-extension.0.0.0-v3bc360f35.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v3bc360f35.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-create-cloudflare-7769 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-kv-asset-handler-7769

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-miniflare-7769

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-pages-shared-7769

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-unenv-preset-7769

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-vitest-pool-workers-7769

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-workers-editor-shared-7769

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-workers-shared-7769

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12795361715/npm-package-cloudflare-workflows-shared-7769

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.102.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.2
workerd 1.20241230.0 1.20241230.0
workerd --version 1.20241230.0 2024-12-30

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@cmackenzie1 cmackenzie1 marked this pull request as ready for review January 14, 2025 23:45
@cmackenzie1 cmackenzie1 requested a review from a team as a code owner January 14, 2025 23:45
import type { CommonYargsOptions } from "../../yargs-types";
import type { ArgumentsCamelCase } from "yargs";

export async function listPipelinesHandler(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this fn call await printWranglerBanner(); as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

2 participants