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(transport): Make SvelteKit adapter deployable on Netlify Edge Functions #2155

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blaine-arcjet
Copy link
Contributor

Netlify Edge Funcitons run on a super old version of Deno that fails on some node:* imports. This is a really nasty workaround that allows Arcjet-protected SvelteKit apps to be deployed there.

@blaine-arcjet blaine-arcjet requested a review from a team as a code owner November 5, 2024 20:49
Copy link

trunk-io bot commented Nov 5, 2024

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

transport/svelte.ts Outdated Show resolved Hide resolved
transport/svelte.ts Outdated Show resolved Hide resolved
transport/svelte.ts Outdated Show resolved Hide resolved
@blaine-arcjet blaine-arcjet marked this pull request as draft November 5, 2024 22:07

return {
async unary(
...args: [any, any, any, any, any, any, any]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get some concrete types for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe these types come from connectrpc directly and we don't want to add another dependency to get the types. There may be a way to use utility types to pull them out but I'm not sure.

return client.unary(...args);
},
async stream(
...args: [any, any, any, any, any, any, any]
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants