Open dario-piotrowicz opened 8 months ago
The getBindingsProxy utility (introduced in https://github.com/cloudflare/workers-sdk/pull/4523) should include as part of its return object some utility methods that allow users to get hold of specific type of binding proxies
getBindingsProxy
Something along the line of
import { getBindingsProxy } from "wrangler"; const { getBindingsOfType } = await getBindingsProxy(); const kvs = getBindingsOfType('kv'); const d1s = getBindingsOfType('d1'); // ...
Or maybe the bindings could be already organized per-type as in:
import { getBindingsProxy } from "wrangler"; const { groupedBindings } = await getBindingsProxy(); const kvs = groupedBindings.kv; const d1s = groupedBindings.d1; // ...
cc. @alexanderniebuhr
The
getBindingsProxy
utility (introduced in https://github.com/cloudflare/workers-sdk/pull/4523) should include as part of its return object some utility methods that allow users to get hold of specific type of binding proxiesSomething along the line of
Or maybe the bindings could be already organized per-type as in: