-
Notifications
You must be signed in to change notification settings - Fork 1k
Unflag remote bindings #10604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unflag remote bindings #10604
Changes from 6 commits
c563ab4
f0ea3d6
a672efb
aa34ec6
b81646d
55f404b
b1cb8c0
ef2338b
ce44afc
06681ca
f13e774
6da52ff
271199e
1015705
b2ff620
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@cloudflare/vite-plugin": minor | ||
| "@cloudflare/vitest-pool-workers": minor | ||
| "wrangler": minor | ||
| --- | ||
|
|
||
| Enable Remote Bindings without the need for the `--x-remote-bindings` flag | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ import type { | |
| import type { MiniflareOptions, WorkerOptions } from "miniflare"; | ||
| import type { FetchFunctionOptions } from "vite/module-runner"; | ||
| import type { | ||
| Experimental_RemoteProxySession, | ||
| remoteProxySession, | ||
| SourcelessWorkerOptions, | ||
| Unstable_Binding, | ||
| } from "wrangler"; | ||
|
|
@@ -230,7 +230,7 @@ function logUnknownTails( | |
| const remoteProxySessionsDataMap = new Map< | ||
| string, | ||
| { | ||
| session: Experimental_RemoteProxySession; | ||
| session: remoteProxySession; | ||
| remoteBindings: Record<string, Unstable_Binding>; | ||
| } | null | ||
| >(); | ||
|
|
@@ -396,16 +396,16 @@ export async function getDevMiniflareOptions(config: { | |
| ? remoteProxySessionsDataMap.get(workerConfig.configPath) | ||
| : undefined; | ||
|
|
||
| const remoteProxySessionData = resolvedPluginConfig.experimental | ||
| .remoteBindings | ||
| ? await experimental_maybeStartOrUpdateRemoteProxySession( | ||
| { | ||
| name: workerConfig.name, | ||
| bindings: bindings ?? {}, | ||
| }, | ||
| preExistingRemoteProxySession ?? null | ||
| ) | ||
| : undefined; | ||
| const remoteProxySessionData = | ||
| resolvedPluginConfig.experimental.remoteBindings ?? true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, see #10604 (comment) |
||
| ? await experimental_maybeStartOrUpdateRemoteProxySession( | ||
| { | ||
| name: workerConfig.name, | ||
| bindings: bindings ?? {}, | ||
| }, | ||
| preExistingRemoteProxySession ?? null | ||
| ) | ||
| : undefined; | ||
|
|
||
| if (workerConfig.configPath && remoteProxySessionData) { | ||
| remoteProxySessionsDataMap.set( | ||
|
|
@@ -425,7 +425,7 @@ export async function getDevMiniflareOptions(config: { | |
| remoteProxySessionData?.session | ||
| ?.remoteProxyConnectionString, | ||
| remoteBindingsEnabled: | ||
| resolvedPluginConfig.experimental.remoteBindings, | ||
| resolvedPluginConfig.experimental.remoteBindings ?? true, | ||
| containerBuildId, | ||
| } | ||
| ); | ||
|
|
@@ -726,16 +726,16 @@ export async function getPreviewMiniflareOptions(config: { | |
| ? remoteProxySessionsDataMap.get(workerConfig.configPath) | ||
| : undefined; | ||
|
|
||
| const remoteProxySessionData = resolvedPluginConfig.experimental | ||
| .remoteBindings | ||
| ? await experimental_maybeStartOrUpdateRemoteProxySession( | ||
| { | ||
| name: workerConfig.name, | ||
| bindings: bindings ?? {}, | ||
| }, | ||
| preExistingRemoteProxySessionData ?? null | ||
| ) | ||
| : undefined; | ||
| const remoteProxySessionData = | ||
| resolvedPluginConfig.experimental.remoteBindings ?? true | ||
| ? await experimental_maybeStartOrUpdateRemoteProxySession( | ||
| { | ||
| name: workerConfig.name, | ||
| bindings: bindings ?? {}, | ||
| }, | ||
| preExistingRemoteProxySessionData ?? null | ||
| ) | ||
| : undefined; | ||
|
|
||
| if (workerConfig.configPath && remoteProxySessionData) { | ||
| remoteProxySessionsDataMap.set( | ||
|
|
@@ -751,7 +751,7 @@ export async function getPreviewMiniflareOptions(config: { | |
| remoteProxyConnectionString: | ||
| remoteProxySessionData?.session?.remoteProxyConnectionString, | ||
| remoteBindingsEnabled: | ||
| resolvedPluginConfig.experimental.remoteBindings, | ||
| resolvedPluginConfig.experimental.remoteBindings ?? true, | ||
| containerBuildId, | ||
| } | ||
| ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.