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

Make the platform's context available #72

Closed
1 task done
dario-piotrowicz opened this issue Jan 28, 2023 · 4 comments
Closed
1 task done

Make the platform's context available #72

dario-piotrowicz opened this issue Jan 28, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@dario-piotrowicz
Copy link

dario-piotrowicz commented Jan 28, 2023

Describe the feature

Hi, I'm trying to create a Nuxt application and deploy it via Cloudflare Pages

When you deploy an application via Cloudflare Pages you can access other Cloudflare products via bindings (which basically allow you to store data, etc...)

The issue is that I believe that such bindings are not made accessible via H3 (I expected to maybe find them in the H3EventContext but no luck, as you can see here: my gh nuxt get context test (deployed here))

Edge Frameworks which I am used to all make such context available, like for example:

Would there be any chance for this context to also be provided by H3? 🙏
(Because otherwise this creates a non trivial limitation to the use of Nuxt with Cloudflare Pages)

(Naturally please let me know if the context is actually available somewhere and I just missed it 😅 )

Additional information

  • Would you be willing to help implement this feature?
@dario-piotrowicz dario-piotrowicz changed the title Make the platform context available Make the platform's context is available Jan 28, 2023
@dario-piotrowicz dario-piotrowicz changed the title Make the platform's context is available Make the platform's context available Jan 28, 2023
@dario-piotrowicz
Copy link
Author

Note, the context needs to be passed by nitro first which is currently not happening: nitrojs/nitro#773

@NozomuIkuta NozomuIkuta added the enhancement New feature or request label Feb 1, 2023
@pi0 pi0 transferred this issue from unjs/h3 Feb 6, 2023
@pi0
Copy link
Member

pi0 commented Feb 6, 2023

A main blocker was that we were not able to pass a context to direct calls. It is now supported by a9190c4 in latest version of unenv.

@pi0 pi0 closed this as completed Feb 6, 2023
@dario-piotrowicz

This comment was marked as outdated.

@dario-piotrowicz
Copy link
Author

@pi0 the context there was indeed relevant 😅 , with that seems like the fix to the problem is quite simple: nitrojs/nitro#997

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

No branches or pull requests

3 participants