@@ -395,42 +395,37 @@ import { experimental_maybeStartOrUpdateRemoteProxySession } from "wrangler";
395395
396396let mf: Miniflare | null ;
397397
398- let remoteProxySessionDetails: Awaited <
399- ReturnType <typeof experimental_maybeStartOrUpdateRemoteProxySession >
400-
401- > | null = null ;
398+ let remoteProxySessionDetails: Awaited <ReturnType <typeof experimental_maybeStartOrUpdateRemoteProxySession >> | null = null ;
402399
403400async function startOrUpdateDevSession() {
404- remoteProxySessionDetails =
405- await experimental_maybeStartOrUpdateRemoteProxySession (
406- {
407- bindings: {
408- MY_KV: {
409- type: ' kv_namespace' ,
410- id: ' kv-id' ,
411- experimental_remote: true ,
412- }
413- }
414- },
415- remoteProxySessionDetails
416- );
417-
418- const miniflareOptions: MiniflareOptions = {
419- scriptPath: " ./worker.js" ,
420- kvNamespaces: {
421- MY_KV: {
422- id: " kv-id" ,
423- remoteProxyConnectionString:
424- remoteProxySessionDetails ?.session .remoteProxyConnectionString ,
425- },
426- },
427- };
428-
429- if (! mf ) {
430- mf = new Miniflare (miniflareOptions );
431- } else {
432- mf .setOptions (miniflareOptions );
433- }
401+ remoteProxySessionDetails = await experimental_maybeStartOrUpdateRemoteProxySession ({
402+ bindings: {
403+ MY_KV: {
404+ type: ' kv_namespace' ,
405+ id: ' kv-id' ,
406+ experimental_remote: true ,
407+ }
408+ }
409+ },
410+ remoteProxySessionDetails
411+ );
412+
413+ const miniflareOptions: MiniflareOptions = {
414+ scriptPath: " ./worker.js" ,
415+ kvNamespaces: {
416+ MY_KV: {
417+ id: " kv-id" ,
418+ remoteProxyConnectionString:
419+ remoteProxySessionDetails ?.session .remoteProxyConnectionString ,
420+ },
421+ },
422+ };
423+
424+ if (! mf ) {
425+ mf = new Miniflare (miniflareOptions );
426+ } else {
427+ mf .setOptions (miniflareOptions );
428+ }
434429}
435430
436431// ... tool logic that invokes `startOrUpdateDevSession()` ...
0 commit comments