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

feat(cloudflare): add service bindings #179

Merged
merged 4 commits into from
Mar 5, 2024
Merged

feat(cloudflare): add service bindings #179

merged 4 commits into from
Mar 5, 2024

Conversation

F0rce
Copy link
Contributor

@F0rce F0rce commented Mar 1, 2024

Changes

  • This change introduces Service bindings to the @astrojs/cloudflare adapter.
  • Both setting the service bindings via astro.config.ts (pages type) and reading them from wrangler.toml (workers type) have been implemented.

Testing

Changes have been tested by updating the dev-runtime-pages and dev-runtime-workers fixtures and adding an integration test to z-dev-runtime-pages.test.js and dev-runtime-workers.test.js respectively.

Docs

Since this is a feature, it does not affect current users, but the documentation will need to be updated.

closes #175

Copy link

changeset-bot bot commented Mar 1, 2024

🦋 Changeset detected

Latest commit: 8ea9c8d

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

This PR includes changesets to release 15 packages
Name Type
@astrojs/cloudflare Minor
@test/astro-cloudflare-dev-runtime-pages Patch
@test/astro-cloudflare-dev-runtime-workers Patch
@test/astro-cloudflare-directory-mode Patch
@test/astro-cloudflare-external-image-service Patch
@test/astro-cloudflare-function-per-route Patch
@test/astro-cloudflare-hybrid Patch
@test/astro-cloudflare-no-output Patch
@test/astro-cloudflare-prerender Patch
@test/astro-cloudflare-routes-json Patch
@test/astro-cloudflare-wasm-function-per-route Patch
@test/astro-cloudflare-wasm-directory Patch
@test/astro-cloudflare-wasm Patch
@test/astro-cloudflare-with-solid-js Patch
@test/astro-cloudflare-wrangler-runtime 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

the adapter already has an option called `bindings`, so using "binding" in the type name seemed obsolete
Copy link
Member

@alexanderniebuhr alexanderniebuhr left a comment

Choose a reason for hiding this comment

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

Block merge, because it needs docs pr

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs! 🙌

@alexanderniebuhr alexanderniebuhr merged commit 6ad2592 into withastro:main Mar 5, 2024
8 checks passed
@github-actions github-actions bot mentioned this pull request Mar 5, 2024
@F0rce F0rce deleted the feat_cloudflare_add_service_bindings branch March 5, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service bindings in the Cloudflare adapter
3 participants