Skip to content

Commit 17d9414

Browse files
add experimental remoteBindings option to getPlatformProxy docs (#23136)
* add experimental `remoteBindings` option to `getPlatformProxy` docs * update and improve `maybeStartOrUpdateRemoteProxySession` docs
1 parent dafb6ad commit 17d9414

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/content/docs/workers/development-testing/index.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,9 @@ the bindings in an `Unstable_Config` object into a structure that can be passed
368368
This wrapper simplifies proxy session management. It takes:
369369

370370
- The path to your Wrangler config, or an object with remote bindings.
371-
- The current proxy session details (or `null` if none).
371+
- The current proxy session details (this parameter can be set to `null` or not being provided if none).
372372

373-
It returns:
374-
375-
- `null` if no proxy session is needed.
376-
- An object with the proxy session details if started or updated.
373+
It returns an object with the proxy session details if started or updated, or `null` if no proxy session is needed.
377374

378375
The function:
379376

src/content/docs/workers/wrangler/api.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ const platform = await getPlatformProxy(options);
300300

301301
**Note:** If you use `wrangler`'s `--persist-to` option, note that this option adds a subdirectory called `v3` under the hood while `getPlatformProxy`'s `persist` does not. For example, if you run `wrangler dev --persist-to ./my-directory`, to reuse the same location using `getPlatformProxy`, you will have to specify: `persist: { path: "./my-directory/v3" }`.
302302

303+
- `experimental` `{ remoteBindings: boolean }`
304+
305+
Object used to enable experimental features, no guarantees are made to the stability of this API, use at your own risk.
306+
307+
- `remoteBindings` Enables `getPlatformProxy` to connect to [remote bindings](/workers/development-testing/#remote-bindings).
308+
303309
### Return Type
304310

305311
`getPlatformProxy()` returns a `Promise` resolving to an object containing the following fields.

0 commit comments

Comments
 (0)