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

🚀 Feature Request: add ASSETS binding to getPlatformProxy #7812

Open
dario-piotrowicz opened this issue Jan 17, 2025 · 3 comments · Fixed by #7816 · May be fixed by #7871
Open

🚀 Feature Request: add ASSETS binding to getPlatformProxy #7812

dario-piotrowicz opened this issue Jan 17, 2025 · 3 comments · Fixed by #7816 · May be fixed by #7871
Labels
enhancement New feature or request quick win Potentially easy/straightforward issue to tackle

Comments

@dario-piotrowicz
Copy link
Member

Describe the solution

getPlatformProxy used with a worker with static assets (or generally, with a toml with static assets configured) doesn't give access to an assets binding, ideally it should

@dario-piotrowicz dario-piotrowicz added the enhancement New feature or request label Jan 17, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jan 17, 2025
@irvinebroque
Copy link
Contributor

Curious why when we added a new binding to the runtime/miniflare, it has to be then added specifically to getPlatformProxy?

@dario-piotrowicz
Copy link
Member Author

dario-piotrowicz commented Jan 19, 2025

Curious why when we added a new binding to the runtime/miniflare, it has to be then added specifically to getPlatformProxy?

if a binding is baked into the runtime it shouldn't require much changes, at most some wiring up I think

In the case of assets, the problem is simply that the binding is not part of the bindingOptions that
buildMiniflareBindingOptions generates (and that's used by getPlatformProxy)

So all we need to do is, inside getPlatformProxy generate the appropriate asset options and pass them to miniflare: #7816 👍

@penalosa penalosa added the quick win Potentially easy/straightforward issue to tackle label Jan 20, 2025
@penalosa penalosa moved this from Untriaged to Backlog in workers-sdk Jan 20, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in workers-sdk Jan 20, 2025
@dario-piotrowicz
Copy link
Member Author

Reopening the issue since the changes in #7816 have been reverted in #7866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request quick win Potentially easy/straightforward issue to tackle
Projects
None yet
3 participants