Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Oct 3, 2024
1 parent 1bc79d4 commit c6462ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/wrangler/src/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,15 @@ Update them to point to this script instead?`;
// - Prompt the user to create the binding and set the ID
// It currently only works with kv_namespaces
async function ensureBindingsExist(
accountId: string,
dryRun: boolean | undefined,
accountId: string | undefined,
name: string,
bindings: CfWorkerInit["bindings"]
): Promise<CfWorkerInit["bindings"]> {
if (dryRun) return bindings;

assert(accountId, "Missing accountId");

const settings = await fetchResult<{
bindings: { name: string }[];
}>(`/accounts/${accountId}/workers/scripts/${name}/settings`);
Expand Down Expand Up @@ -796,9 +801,9 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
props.dryRun,
props.oldAssetTtl
);
assert(accountId, "Missing accountId");

const bindings: CfWorkerInit["bindings"] = await ensureBindingsExist(
props.dryRun,
accountId,
scriptName,
{
Expand Down

0 comments on commit c6462ec

Please sign in to comment.