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