🚀 Feature Request [getBindingsProxy]: getBindingsProxy
should expose a cf
object
#4875
Labels
enhancement
New feature or request
In the
getBindingsProxy
return object we should include acf
object that developers can use to mock the real production thing.It should reuse the same functionality Miniflare already implements: https://github.com/cloudflare/workers-sdk/blob/6a4cb8c6456f1dba95cae2b8bbe658f7227349f8/packages/miniflare/src/cf.ts
For that we either:
setupCf
function:workers-sdk/packages/miniflare/src/cf.ts
Line 70 in 6a4cb8c
So that we can all it from wrangler/
getBindingsProxy
cf
orgetCf
to the Miniflare classI did think that the former could be better (since it doesn't force the caller to be tied to the Miniflare instance), but I changed my mind and actually think that the latter could be better (since we already do have a Miniflare instance and get the
cf
from it... also other Miniflare users could make use of such additional field/method)(In any case either should do)
The text was updated successfully, but these errors were encountered: