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 astro assets image service #34

Merged

Conversation

alexanderniebuhr
Copy link
Member

@alexanderniebuhr alexanderniebuhr commented Oct 20, 2023

Changes

Testing

  • added a new test based on the astro:assets test, however I still wish to test just the output of updateConfig if that is somehow possible

Docs

  • changesets
  • readme

@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2023

🦋 Changeset detected

Latest commit: 4587fea

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

This PR includes changesets to release 14 packages
Name Type
@astrojs/cloudflare Minor
@test/astro-cloudflare-dev-runtime 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

@alexanderniebuhr
Copy link
Member Author

alexanderniebuhr commented Oct 20, 2023

@alexanderniebuhr alexanderniebuhr marked this pull request as ready for review October 21, 2023 05:14
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from f665ea0 to 8d15c14 Compare October 21, 2023 05:16
@alexanderniebuhr alexanderniebuhr marked this pull request as draft October 21, 2023 05:17
@withastro withastro deleted a comment from github-actions bot Oct 21, 2023
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

@alexanderniebuhr alexanderniebuhr marked this pull request as ready for review October 21, 2023 17:41
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

1 similar comment
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch 2 times, most recently from 77f890f to 3059602 Compare October 21, 2023 18:07
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

@alexanderniebuhr alexanderniebuhr marked this pull request as draft October 21, 2023 18:08
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

@github-actions
Copy link
Contributor

Snapshots have been released for the following packages:

  • @astrojs/cloudflare@experimental--cf-assets
Publish Log
🦋  warn ===============================IMPORTANT!===============================
🦋  warn Packages will be released under the experimental--cf-assets tag
🦋  warn ----------------------------------------------------------------------
🦋  info npm info @astrojs/cloudflare
🦋  info npm info @astrojs/netlify
🦋  info @astrojs/cloudflare is being published because our local version (0.0.0-cf-assets-20231021193132) has not been published on npm
🦋  warn @astrojs/netlify is not being published because version 3.0.3 is already published on npm
🦋  info Publishing "@astrojs/cloudflare" at "0.0.0-cf-assets-20231021193132"
🦋  success packages published successfully:
🦋  @astrojs/cloudflare@0.0.0-cf-assets-20231021193132
🦋  Creating git tag...
🦋  New tag:  @astrojs/cloudflare@0.0.0-cf-assets-20231021193132
Build Log

> root@0.0.0 build /home/runner/work/adapters/adapters
> turbo run build --filter="@astrojs/*"

• Packages in scope: @astrojs/cloudflare, @astrojs/netlify, @astrojs/test-utils
• Running build in 3 packages
• Remote caching disabled
::group::@astrojs/netlify:build
cache miss, executing 523429d520638068

> @astrojs/netlify@3.0.3 build /home/runner/work/adapters/adapters/packages/netlify
> tsc

::endgroup::
::group::@astrojs/cloudflare:build
cache miss, executing d5cfcf8e1352385c

> @astrojs/cloudflare@0.0.0-cf-assets-20231021193132 build /home/runner/work/adapters/adapters/packages/cloudflare
> tsc

::endgroup::

 Tasks:    2 successful, 2 total
Cached:    0 cached, 2 total
  Time:    5.222s 

@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch 3 times, most recently from a81f69c to 11d0a64 Compare November 2, 2023 18:08
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 11d0a64 to 56c68ac Compare November 5, 2023 21:04
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

Copy link
Contributor

github-actions bot commented Nov 5, 2023

Snapshots have been released for the following packages:

  • @astrojs/cloudflare@experimental--cf-assets
  • @astrojs/netlify@experimental--cf-assets
Publish Log
🦋  warn ===============================IMPORTANT!===============================
🦋  warn Packages will be released under the experimental--cf-assets tag
🦋  warn ----------------------------------------------------------------------
🦋  info npm info @astrojs/cloudflare
🦋  info npm info @astrojs/netlify
🦋  info @astrojs/cloudflare is being published because our local version (0.0.0-cf-assets-20231105210708) has not been published on npm
🦋  info @astrojs/netlify is being published because our local version (0.0.0-cf-assets-20231105210708) has not been published on npm
🦋  info Publishing "@astrojs/cloudflare" at "0.0.0-cf-assets-20231105210708"
🦋  info Publishing "@astrojs/netlify" at "0.0.0-cf-assets-20231105210708"
🦋  success packages published successfully:
🦋  @astrojs/cloudflare@0.0.0-cf-assets-20231105210708
🦋  @astrojs/netlify@0.0.0-cf-assets-20231105210708
🦋  Creating git tags...
🦋  New tag:  @astrojs/cloudflare@0.0.0-cf-assets-20231105210708
🦋  New tag:  @astrojs/netlify@0.0.0-cf-assets-20231105210708
Build Log

> root@0.0.0 build /home/runner/work/adapters/adapters
> turbo run build --filter="@astrojs/*"

• Packages in scope: @astrojs/cloudflare, @astrojs/netlify, @astrojs/test-utils
• Running build in 3 packages
• Remote caching disabled
::group::@astrojs/netlify:build
cache miss, executing c8857cd3314ec362

> @astrojs/netlify@0.0.0-cf-assets-20231105210708 build /home/runner/work/adapters/adapters/packages/netlify
> tsc

::endgroup::
::group::@astrojs/cloudflare:build
cache miss, executing bb9edaf37626e064

> @astrojs/cloudflare@0.0.0-cf-assets-20231105210708 build /home/runner/work/adapters/adapters/packages/cloudflare
> tsc

::endgroup::

 Tasks:    2 successful, 2 total
Cached:    0 cached, 2 total
  Time:    5.143s 

@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch 3 times, most recently from 0b3b034 to 80693ff Compare November 6, 2023 12:35
@alexanderniebuhr
Copy link
Member Author

!preview cf-assets

@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from a191609 to 5e720c4 Compare November 8, 2023 06:56
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch 3 times, most recently from f9ffebc to 6d1fd90 Compare November 8, 2023 07:29
@alexanderniebuhr alexanderniebuhr marked this pull request as ready for review November 8, 2023 07:29
'@astrojs/cloudflare': minor
---

Adds support for external Cloudflare Image Resizing Service. See Cloudflare docs for more information about Pricing and Features: https://developers.cloudflare.com/images/image-resizing/
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we also link to the announcement post, that their pricing will change starting Nov 15?

https://blog.cloudflare.com/merging-images-and-image-resizing/

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @withastro/maintainers-docs

@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 6d1fd90 to 749bb92 Compare November 8, 2023 07:55
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 749bb92 to 9ec6728 Compare November 8, 2023 08:02
@alexanderniebuhr alexanderniebuhr self-assigned this Nov 9, 2023
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 9ec6728 to 76d8b16 Compare November 9, 2023 08:06
Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Hey @alexanderniebuhr, awesome job 🚀. I left you a couple of minor suggestions. Let me know what are your thoughts.

.changeset/dull-candles-perform.md Outdated Show resolved Hide resolved
.changeset/shaggy-wasps-care.md Outdated Show resolved Hide resolved
packages/cloudflare/README.md Outdated Show resolved Hide resolved
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 58cc3f3 to 99cf387 Compare November 10, 2023 18:18
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.

Just made a few tiny suggestions for you to consider, @alexanderniebuhr !

packages/cloudflare/README.md Outdated Show resolved Hide resolved
.changeset/dull-candles-perform.md Outdated Show resolved Hide resolved
.changeset/shaggy-wasps-care.md Outdated Show resolved Hide resolved
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
@alexanderniebuhr alexanderniebuhr force-pushed the nbhr/add_external_image_service_for_cloudflare branch from 99cf387 to 4587fea Compare November 13, 2023 16:31
@alexanderniebuhr alexanderniebuhr merged commit 4e1060b into main Nov 13, 2023
8 checks passed
@github-actions github-actions bot mentioned this pull request Nov 13, 2023
@alexanderniebuhr alexanderniebuhr deleted the nbhr/add_external_image_service_for_cloudflare branch November 13, 2023 18:07
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.

6 participants