wrangler 4.38.0 → 4.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -547,7 +547,7 @@ type WorkflowBinding = {
547
547
  class_name: string;
548
548
  /** The script where the Workflow is defined (if it's external to this Worker) */
549
549
  script_name?: string;
550
- /** Whether the Workflow should be remote or not */
550
+ /** Whether the Workflow should be remote or not in local development */
551
551
  remote?: boolean;
552
552
  };
553
553
  /**
@@ -649,7 +649,7 @@ interface EnvironmentNonInheritable {
649
649
  id?: string;
650
650
  /** The ID of the KV namespace used during `wrangler dev` */
651
651
  preview_id?: string;
652
- /** Whether the KV namespace should be remote or not */
652
+ /** Whether the KV namespace should be remote or not in local development */
653
653
  remote?: boolean;
654
654
  }[];
655
655
  /**
@@ -672,7 +672,7 @@ interface EnvironmentNonInheritable {
672
672
  allowed_destination_addresses?: string[];
673
673
  /** If this binding should be restricted to a set of sender addresses */
674
674
  allowed_sender_addresses?: string[];
675
- /** Whether the binding should be remote or not */
675
+ /** Whether the binding should be remote or not in local development */
676
676
  remote?: boolean;
677
677
  }[];
678
678
  /**
@@ -695,7 +695,7 @@ interface EnvironmentNonInheritable {
695
695
  queue: string;
696
696
  /** The number of seconds to wait before delivering a message */
697
697
  delivery_delay?: number;
698
- /** Whether the Queue producer should be remote or not */
698
+ /** Whether the Queue producer should be remote or not in local development */
699
699
  remote?: boolean;
700
700
  }[];
701
701
  /** Consumer configuration */
@@ -740,7 +740,7 @@ interface EnvironmentNonInheritable {
740
740
  preview_bucket_name?: string;
741
741
  /** The jurisdiction that the bucket exists in. Default if not present. */
742
742
  jurisdiction?: string;
743
- /** Whether the R2 bucket should be remote or not */
743
+ /** Whether the R2 bucket should be remote or not in local development */
744
744
  remote?: boolean;
745
745
  }[];
746
746
  /**
@@ -769,7 +769,7 @@ interface EnvironmentNonInheritable {
769
769
  migrations_dir?: string;
770
770
  /** Internal use only. */
771
771
  database_internal_env?: string;
772
- /** Whether the D1 database should be remote or not */
772
+ /** Whether the D1 database should be remote or not in local development */
773
773
  remote?: boolean;
774
774
  }[];
775
775
  /**
@@ -788,7 +788,7 @@ interface EnvironmentNonInheritable {
788
788
  binding: string;
789
789
  /** The name of the index. */
790
790
  index_name: string;
791
- /** Whether the Vectorize index should be remote or not */
791
+ /** Whether the Vectorize index should be remote or not in local development */
792
792
  remote?: boolean;
793
793
  }[];
794
794
  /**
@@ -841,7 +841,7 @@ interface EnvironmentNonInheritable {
841
841
  entrypoint?: string;
842
842
  /** Optional properties that will be made available to the service via ctx.props. */
843
843
  props?: Record<string, unknown>;
844
- /** Whether the service binding should be remote or not */
844
+ /** Whether the service binding should be remote or not in local development */
845
845
  remote?: boolean;
846
846
  }[] | undefined;
847
847
  /**
@@ -874,7 +874,7 @@ interface EnvironmentNonInheritable {
874
874
  */
875
875
  browser: {
876
876
  binding: string;
877
- /** Whether the Browser binding should be remote or not */
877
+ /** Whether the Browser binding should be remote or not in local development */
878
878
  remote?: boolean;
879
879
  } | undefined;
880
880
  /**
@@ -891,7 +891,7 @@ interface EnvironmentNonInheritable {
891
891
  ai: {
892
892
  binding: string;
893
893
  staging?: boolean;
894
- /** Whether the AI binding should be remote or not */
894
+ /** Whether the AI binding should be remote or not in local development */
895
895
  remote?: boolean;
896
896
  } | undefined;
897
897
  /**
@@ -907,7 +907,7 @@ interface EnvironmentNonInheritable {
907
907
  */
908
908
  images: {
909
909
  binding: string;
910
- /** Whether the Images binding should be remote or not */
910
+ /** Whether the Images binding should be remote or not in local development */
911
911
  remote?: boolean;
912
912
  } | undefined;
913
913
  /**
@@ -968,7 +968,7 @@ interface EnvironmentNonInheritable {
968
968
  binding: string;
969
969
  /** The uuid of the uploaded mTLS certificate */
970
970
  certificate_id: string;
971
- /** Whether the mtls fetcher should be remote or not */
971
+ /** Whether the mtls fetcher should be remote or not in local development */
972
972
  remote?: boolean;
973
973
  }[];
974
974
  /**
@@ -999,7 +999,7 @@ interface EnvironmentNonInheritable {
999
999
  namespace: string;
1000
1000
  /** Details about the outbound Worker which will handle outbound requests from your namespace */
1001
1001
  outbound?: DispatchNamespaceOutbound;
1002
- /** Whether the Dispatch Namespace should be remote or not */
1002
+ /** Whether the Dispatch Namespace should be remote or not in local development */
1003
1003
  remote?: boolean;
1004
1004
  }[];
1005
1005
  /**
@@ -1016,6 +1016,8 @@ interface EnvironmentNonInheritable {
1016
1016
  binding: string;
1017
1017
  /** Name of the Pipeline to bind */
1018
1018
  pipeline: string;
1019
+ /** Whether the pipeline should be remote or not in local development */
1020
+ remote?: boolean;
1019
1021
  }[];
1020
1022
  /**
1021
1023
  * Specifies Secret Store bindings that are bound to this Worker environment.
@@ -1071,6 +1073,36 @@ interface EnvironmentNonInheritable {
1071
1073
  period: 10 | 60;
1072
1074
  };
1073
1075
  }[];
1076
+ /**
1077
+ * Specifies Worker Loader bindings that are bound to this Worker environment.
1078
+ *
1079
+ * NOTE: This field is not automatically inherited from the top level environment,
1080
+ * and so must be specified in every named environment.
1081
+ *
1082
+ * @default []
1083
+ * @nonInheritable
1084
+ */
1085
+ worker_loaders: {
1086
+ /** The binding name used to refer to the Worker Loader in the Worker. */
1087
+ binding: string;
1088
+ }[];
1089
+ /**
1090
+ * Specifies VPC services that are bound to this Worker environment.
1091
+ *
1092
+ * NOTE: This field is not automatically inherited from the top level environment,
1093
+ * and so must be specified in every named environment.
1094
+ *
1095
+ * @default []
1096
+ * @nonInheritable
1097
+ */
1098
+ vpc_services: {
1099
+ /** The binding name used to refer to the VPC service in the Worker. */
1100
+ binding: string;
1101
+ /** The service ID of the VPC connectivity service. */
1102
+ service_id: string;
1103
+ /** Whether the VPC service is remote or not */
1104
+ remote?: boolean;
1105
+ }[];
1074
1106
  }
1075
1107
  /**
1076
1108
  * The raw environment configuration that we read from the config file.
@@ -1254,6 +1286,14 @@ type CfSendEmailBindings = {
1254
1286
  } | {
1255
1287
  allowed_sender_addresses?: string[];
1256
1288
  });
1289
+ /**
1290
+ * A binding to a browser
1291
+ */
1292
+ interface CfBrowserBinding {
1293
+ binding: string;
1294
+ raw?: boolean;
1295
+ remote?: boolean;
1296
+ }
1257
1297
  /**
1258
1298
  * A binding to the AI project
1259
1299
  */
@@ -1263,6 +1303,14 @@ interface CfAIBinding {
1263
1303
  remote?: boolean;
1264
1304
  raw?: boolean;
1265
1305
  }
1306
+ /**
1307
+ * A binding to Cloudflare Images
1308
+ */
1309
+ interface CfImagesBinding {
1310
+ binding: string;
1311
+ raw?: boolean;
1312
+ remote?: boolean;
1313
+ }
1266
1314
  /**
1267
1315
  * A Durable Object.
1268
1316
  */
@@ -1320,6 +1368,9 @@ interface CfHelloWorld {
1320
1368
  binding: string;
1321
1369
  enable_timer?: boolean;
1322
1370
  }
1371
+ interface CfWorkerLoader {
1372
+ binding: string;
1373
+ }
1323
1374
  interface CfRateLimit {
1324
1375
  name: string;
1325
1376
  namespace_id: string;
@@ -1341,6 +1392,11 @@ interface CfService {
1341
1392
  props?: Record<string, unknown>;
1342
1393
  remote?: boolean;
1343
1394
  }
1395
+ interface CfVpcService {
1396
+ binding: string;
1397
+ service_id: string;
1398
+ remote?: boolean;
1399
+ }
1344
1400
  interface CfAnalyticsEngineDataset {
1345
1401
  binding: string;
1346
1402
  dataset?: string;
@@ -1712,7 +1768,7 @@ type ReadConfigOptions = ResolveConfigPathOptions & {
1712
1768
  hideWarnings?: boolean;
1713
1769
  preserveOriginalMain?: boolean;
1714
1770
  };
1715
- type ConfigBindingOptions = Pick<Config, "ai" | "browser" | "d1_databases" | "dispatch_namespaces" | "durable_objects" | "queues" | "r2_buckets" | "services" | "kv_namespaces" | "mtls_certificates" | "vectorize" | "workflows">;
1771
+ type ConfigBindingOptions = Pick<Config, "ai" | "browser" | "d1_databases" | "dispatch_namespaces" | "durable_objects" | "queues" | "r2_buckets" | "services" | "kv_namespaces" | "mtls_certificates" | "vectorize" | "workflows" | "vpc_services">;
1716
1772
  /**
1717
1773
  * Get the Wrangler configuration; read it from the give `configPath` if available.
1718
1774
  */
@@ -2298,13 +2354,13 @@ type Binding = {
2298
2354
  } | {
2299
2355
  type: "text_blob";
2300
2356
  source: File;
2301
- } | {
2302
- type: "browser";
2303
2357
  } | ({
2358
+ type: "browser";
2359
+ } & BindingOmit<CfBrowserBinding>) | ({
2304
2360
  type: "ai";
2305
- } & BindingOmit<CfAIBinding>) | {
2361
+ } & BindingOmit<CfAIBinding>) | ({
2306
2362
  type: "images";
2307
- } | {
2363
+ } & BindingOmit<CfImagesBinding>) | {
2308
2364
  type: "version_metadata";
2309
2365
  } | {
2310
2366
  type: "data_blob";
@@ -2344,7 +2400,11 @@ type Binding = {
2344
2400
  type: "unsafe_hello_world";
2345
2401
  } & BindingOmit<CfHelloWorld>) | ({
2346
2402
  type: "ratelimit";
2347
- } & NameOmit<CfRateLimit>) | {
2403
+ } & NameOmit<CfRateLimit>) | ({
2404
+ type: "worker_loader";
2405
+ } & BindingOmit<CfWorkerLoader>) | ({
2406
+ type: "vpc_service";
2407
+ } & BindingOmit<CfVpcService>) | {
2348
2408
  type: `unsafe_${string}`;
2349
2409
  } | {
2350
2410
  type: "assets";
@@ -2756,10 +2816,6 @@ declare function unstable_getMiniflareWorkerOptions(config: Config, env?: string
2756
2816
  containerBuildId?: string;
2757
2817
  }): Unstable_MiniflareWorkerOptions;
2758
2818
 
2759
- type RemoteProxySession = Pick<Worker, "ready" | "dispose"> & {
2760
- updateBindings: (bindings: StartDevWorkerInput["bindings"]) => Promise<void>;
2761
- remoteProxyConnectionString: RemoteProxyConnectionString;
2762
- };
2763
2819
  type StartRemoteProxySessionOptions = {
2764
2820
  workerName?: string;
2765
2821
  auth?: NonNullable<StartDevWorkerInput["dev"]>["auth"];
@@ -2767,6 +2823,11 @@ type StartRemoteProxySessionOptions = {
2767
2823
  complianceRegion?: Config["compliance_region"];
2768
2824
  };
2769
2825
  declare function startRemoteProxySession(bindings: StartDevWorkerInput["bindings"], options?: StartRemoteProxySessionOptions): Promise<RemoteProxySession>;
2826
+ type RemoteProxySession = Pick<Worker, "ready" | "dispose"> & {
2827
+ updateBindings: (bindings: StartDevWorkerInput["bindings"]) => Promise<void>;
2828
+ remoteProxyConnectionString: RemoteProxyConnectionString;
2829
+ };
2830
+
2770
2831
  type WranglerConfigObject = {
2771
2832
  /** The path to the wrangler config file */
2772
2833
  path: string;