-
Notifications
You must be signed in to change notification settings - Fork 140
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(cloudflare): rename the "cloudflare" wrapper to "cloudflare-edge" #645
Conversation
🦋 Changeset detectedLatest commit: da97b15 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
commit: |
Coverage Report
File Coverage
|
ed945b5
to
da97b15
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.
I think we should change the Wrapper
type so that it is clearer (and would allow for better validation). It could become
export type Wrapper<
E extends BaseEventOrResult = InternalEvent,
R extends BaseEventOrResult = InternalResult,
> = BaseOverride & {
wrapper: WrapperHandler<E, R>;
supportStreaming: boolean;
supportExternalMiddleware?: boolean
edgeLikeRuntime?: boolean;
};
edgeLikeRuntime
would be used at build time to apply the necessary fix for cloudflare. It would also help distinguish this from Next edge
runtime. This would be set for both cloudflare wrappers.
I don't like this name a lot, maybe you can find something better. Maybe something with Worker or WinterCG
supportExternalMiddleware
would only be used for validation because external middleware need to be able to handle both InternalResult
and MiddlewareOutputEvent
. This one would be set to true for the aws-cloudfront
wrapper as well.
All of this could be done in a different PR if you prefer.
Yes, I would prefer a different PR as I think we probably need to refactor the code. |
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.
LGTM Thanks
Thanks for the review! |
The commit message do not mention "cloudflare-streaming" -> "cloudflare-node" as this was never released officially.