astro/.changeset/fuzzy-jobs-explain.md
Alexander Niebuhr ffcfcddb75
feat(@astrojs/cloudfalre): add cloudflare envs to Astro.locals (#7541)
* add support for advanced mode

* add support for directory mode

* use asset fallback as in cloudflare's docs

* update locals

* come up with new runtime in `Astro.locals`

* add overwrite protection

* minor cleanup

* changeset

* address review comments

* move overwrite protection to adapter

* fix types

* fix comment

* resolve review comments

* update changeset

* add test

* redo ts

* fix integration test port

* updated tests, add new port

* add TODO comment

* update changeset

* add JSDoc

* Update packages/integrations/cloudflare/src/runtime.ts

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-10 10:19:00 -05:00

12 lines
338 B
Markdown

---
'@astrojs/cloudflare': minor
---
The `getRuntime` utility has been deprecated and should be updated to the new [`Astro.locals`](https://docs.astro.build/en/guides/middleware/#locals) API.
```diff
- import { getRuntime } from '@astrojs/cloudflare/runtime';
- getRuntime(Astro.request);
+ const runtime = Astro.locals.runtime;
```