Skip to content

Commit

Permalink
add text bindings support
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz committed Oct 23, 2023
1 parent 63d7d6c commit 1768e9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal-packages/next-dev/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export async function setupDevBindings(
}

export type DevBindingsOptions = {
/**
* Record mapping binding names to text bindings.
*/
textBindings?: Record<string, string>;
/**
* Record mapping binding names to Worker/Service names.
*
Expand Down Expand Up @@ -80,8 +84,10 @@ async function instantiateMiniflare(
const { workerOptions, durableObjects } =
(await getDOBindingInfo(options.durableObjects)) ?? {};

const { kvNamespaces, r2Buckets, d1Databases, services } = options;
const { kvNamespaces, r2Buckets, d1Databases, services, textBindings } =
options;
const bindings = {
bindings: textBindings,
kvNamespaces,
durableObjects,
r2Buckets,
Expand Down

0 comments on commit 1768e9c

Please sign in to comment.