-
Notifications
You must be signed in to change notification settings - Fork 774
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
Support 'raw' bindings for bindings not directly supported by wrangler #358
Comments
This is important for "super secret" bindings that are either in development, or we have no intention of making public (for special internal features). We should do this. |
I can work on this provided we agree on a design. |
This looks great! We should do it with safeguards. Let's discuss on monday after I'm back? In particular, I'd like some warnings logged when someone uses these. I'd also like to understand what the behaviour is for some failure modes (for example, if service bindings were used in this manner but they don't work just yet in |
For posterity here's the design agreed on:
[[unsafe.bindings]]
name = "my_binding"
type = "unsafe_binding"
|
Fixed in #411, thank you very much @ObsidianMinor! |
Rather than support every possible binding type (of which there are many, some internal), as a stop-gap we should support specifying an advanced "raw" bindings type that directly converts TOML into JSON as part of the metadata upload for a Worker. This would allow internal developers to use wrangler with bindings that aren't publicly available or are in internal beta.
In the metadata.json, this would look like
It can be used to implement any existing binding as well, but note wrangler can't pick up on them and use them for instance in things like miniflare. As another example however, Service Bindings can be done as:
The text was updated successfully, but these errors were encountered: