-
Notifications
You must be signed in to change notification settings - Fork 71
implement getCloudflareContext
for production
#31
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
Conversation
07da3c3
to
6463f2d
Compare
6463f2d
to
b753375
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.
Added a few comments.
packages/cloudflare/src/cli/build/patches/investigated/patch-cache.ts
Outdated
Show resolved
Hide resolved
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.
👏
Co-authored-by: Victor Berchet <[email protected]>
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.
Added a couple comments but looks good, thanks!
This PR adds a
getCloudflareContext
utility to the@opennextjs/cloudflare
package so that developers can use it to get the Cloudflare bindings etc...Warning
The current implementation is only for production/preview, it does not work with
next dev
As part of this change I split the code in the cloudflare package into 2 sub directories,
cli
andapi
, the former contains the code that goes into the binary that gets run to build the worker while the latter exposes the programmatic APIs that the package offers (which is onlygetCloudflareContext
right now)