File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
packages/wrangler/src/api/startDevWorker Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ import { readFile } from "node:fs/promises";
33import { assertNever } from "../../utils/assert-never" ;
44import type { ConfigBindingOptions } from "../../config" ;
55import type { WorkerMetadataBinding } from "../../deployment-bundle/create-worker-upload-form" ;
6- import type { CfWorkerInit } from "../../deployment-bundle/worker" ;
6+ import type {
7+ CfDispatchNamespace ,
8+ CfWorkerInit ,
9+ } from "../../deployment-bundle/worker" ;
710import type {
811 Binding ,
912 File ,
@@ -458,13 +461,18 @@ export async function convertBindingsToCfWorkerInitBindings(
458461 } ) ;
459462 } else if ( binding . type === "dispatch_namespace" ) {
460463 bindings . dispatch_namespaces ??= [ ] ;
464+ const outbound : CfDispatchNamespace [ "outbound" ] =
465+ binding . outbound && "worker" in binding . outbound
466+ ? {
467+ service : binding . outbound . worker . service ,
468+ environment : binding . outbound . worker . environment ,
469+ parameters : binding . outbound . params ?. map ( ( p ) => p . name ) ,
470+ }
471+ : binding . outbound ;
461472 bindings . dispatch_namespaces . push ( {
462473 ...omitType ( binding ) ,
463474 binding : name ,
464- outbound :
465- binding . outbound && "worker" in binding . outbound
466- ? undefined
467- : binding . outbound ,
475+ outbound,
468476 } ) ;
469477 } else if ( binding . type === "mtls_certificate" ) {
470478 bindings . mtls_certificates ??= [ ] ;
You can’t perform that action at this time.
0 commit comments