Skip to content

Commit 1cc258e

Browse files
authored
Fix remote/local display (#10674)
* Fix remote/local display * Create giant-cherries-shake.md
1 parent f76da43 commit 1cc258e

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.changeset/giant-cherries-shake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Fix remote/local display for KV/D1/R2 & Browser bindings

packages/wrangler/src/dev/miniflare/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,6 @@ export function buildMiniflareBindingOptions(
533533
warnOrError("ai", bindings.ai.remote, "always-remote");
534534
}
535535

536-
if (bindings.browser && remoteBindingsEnabled) {
537-
warnOrError("browser", bindings.browser.remote, "remote");
538-
}
539-
540536
if (bindings.mtls_certificates && remoteBindingsEnabled) {
541537
for (const mtls of bindings.mtls_certificates) {
542538
warnOrError("mtls_certificates", mtls.remote, "always-remote");

packages/wrangler/src/utils/print-bindings.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export function printBindings(
188188
type: friendlyBindingNames.kv_namespaces,
189189
value: id,
190190
mode: getMode({
191-
isSimulatedLocally: !remote,
191+
isSimulatedLocally: getFlag("REMOTE_BINDINGS") ? !remote : true,
192192
}),
193193
};
194194
})
@@ -240,7 +240,7 @@ export function printBindings(
240240
type: friendlyBindingNames.queues,
241241
value: queue_name,
242242
mode: getMode({
243-
isSimulatedLocally: !remote,
243+
isSimulatedLocally: getFlag("REMOTE_BINDINGS") ? !remote : true,
244244
}),
245245
};
246246
})
@@ -266,7 +266,7 @@ export function printBindings(
266266
name: binding,
267267
type: friendlyBindingNames.d1_databases,
268268
mode: getMode({
269-
isSimulatedLocally: !remote,
269+
isSimulatedLocally: getFlag("REMOTE_BINDINGS") ? !remote : true,
270270
}),
271271
value,
272272
};
@@ -324,7 +324,7 @@ export function printBindings(
324324
type: friendlyBindingNames.r2_buckets,
325325
value: value,
326326
mode: getMode({
327-
isSimulatedLocally: !remote,
327+
isSimulatedLocally: getFlag("REMOTE_BINDINGS") ? !remote : true,
328328
}),
329329
};
330330
})
@@ -380,7 +380,7 @@ export function printBindings(
380380
value += `#${entrypoint}`;
381381
}
382382

383-
if (remote) {
383+
if (remote && getFlag("REMOTE_BINDINGS")) {
384384
mode = getMode({ isSimulatedLocally: false });
385385
} else if (context.local && context.registry !== null) {
386386
const registryDefinition = context.registry?.[service];

0 commit comments

Comments
 (0)