wrangler 4.37.1 → 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
  /**
@@ -670,7 +670,9 @@ interface EnvironmentNonInheritable {
670
670
  destination_address?: string;
671
671
  /** If this binding should be restricted to a set of verified addresses */
672
672
  allowed_destination_addresses?: string[];
673
- /** Whether the binding should be remote or not */
673
+ /** If this binding should be restricted to a set of sender addresses */
674
+ allowed_sender_addresses?: string[];
675
+ /** Whether the binding should be remote or not in local development */
674
676
  remote?: boolean;
675
677
  }[];
676
678
  /**
@@ -693,7 +695,7 @@ interface EnvironmentNonInheritable {
693
695
  queue: string;
694
696
  /** The number of seconds to wait before delivering a message */
695
697
  delivery_delay?: number;
696
- /** Whether the Queue producer should be remote or not */
698
+ /** Whether the Queue producer should be remote or not in local development */
697
699
  remote?: boolean;
698
700
  }[];
699
701
  /** Consumer configuration */
@@ -738,7 +740,7 @@ interface EnvironmentNonInheritable {
738
740
  preview_bucket_name?: string;
739
741
  /** The jurisdiction that the bucket exists in. Default if not present. */
740
742
  jurisdiction?: string;
741
- /** Whether the R2 bucket should be remote or not */
743
+ /** Whether the R2 bucket should be remote or not in local development */
742
744
  remote?: boolean;
743
745
  }[];
744
746
  /**
@@ -767,7 +769,7 @@ interface EnvironmentNonInheritable {
767
769
  migrations_dir?: string;
768
770
  /** Internal use only. */
769
771
  database_internal_env?: string;
770
- /** Whether the D1 database should be remote or not */
772
+ /** Whether the D1 database should be remote or not in local development */
771
773
  remote?: boolean;
772
774
  }[];
773
775
  /**
@@ -786,7 +788,7 @@ interface EnvironmentNonInheritable {
786
788
  binding: string;
787
789
  /** The name of the index. */
788
790
  index_name: string;
789
- /** Whether the Vectorize index should be remote or not */
791
+ /** Whether the Vectorize index should be remote or not in local development */
790
792
  remote?: boolean;
791
793
  }[];
792
794
  /**
@@ -839,7 +841,7 @@ interface EnvironmentNonInheritable {
839
841
  entrypoint?: string;
840
842
  /** Optional properties that will be made available to the service via ctx.props. */
841
843
  props?: Record<string, unknown>;
842
- /** Whether the service binding should be remote or not */
844
+ /** Whether the service binding should be remote or not in local development */
843
845
  remote?: boolean;
844
846
  }[] | undefined;
845
847
  /**
@@ -872,7 +874,7 @@ interface EnvironmentNonInheritable {
872
874
  */
873
875
  browser: {
874
876
  binding: string;
875
- /** Whether the Browser binding should be remote or not */
877
+ /** Whether the Browser binding should be remote or not in local development */
876
878
  remote?: boolean;
877
879
  } | undefined;
878
880
  /**
@@ -889,7 +891,7 @@ interface EnvironmentNonInheritable {
889
891
  ai: {
890
892
  binding: string;
891
893
  staging?: boolean;
892
- /** Whether the AI binding should be remote or not */
894
+ /** Whether the AI binding should be remote or not in local development */
893
895
  remote?: boolean;
894
896
  } | undefined;
895
897
  /**
@@ -905,7 +907,7 @@ interface EnvironmentNonInheritable {
905
907
  */
906
908
  images: {
907
909
  binding: string;
908
- /** Whether the Images binding should be remote or not */
910
+ /** Whether the Images binding should be remote or not in local development */
909
911
  remote?: boolean;
910
912
  } | undefined;
911
913
  /**
@@ -966,7 +968,7 @@ interface EnvironmentNonInheritable {
966
968
  binding: string;
967
969
  /** The uuid of the uploaded mTLS certificate */
968
970
  certificate_id: string;
969
- /** Whether the mtls fetcher should be remote or not */
971
+ /** Whether the mtls fetcher should be remote or not in local development */
970
972
  remote?: boolean;
971
973
  }[];
972
974
  /**
@@ -997,7 +999,7 @@ interface EnvironmentNonInheritable {
997
999
  namespace: string;
998
1000
  /** Details about the outbound Worker which will handle outbound requests from your namespace */
999
1001
  outbound?: DispatchNamespaceOutbound;
1000
- /** Whether the Dispatch Namespace should be remote or not */
1002
+ /** Whether the Dispatch Namespace should be remote or not in local development */
1001
1003
  remote?: boolean;
1002
1004
  }[];
1003
1005
  /**
@@ -1014,6 +1016,8 @@ interface EnvironmentNonInheritable {
1014
1016
  binding: string;
1015
1017
  /** Name of the Pipeline to bind */
1016
1018
  pipeline: string;
1019
+ /** Whether the pipeline should be remote or not in local development */
1020
+ remote?: boolean;
1017
1021
  }[];
1018
1022
  /**
1019
1023
  * Specifies Secret Store bindings that are bound to this Worker environment.
@@ -1069,6 +1073,36 @@ interface EnvironmentNonInheritable {
1069
1073
  period: 10 | 60;
1070
1074
  };
1071
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
+ }[];
1072
1106
  }
1073
1107
  /**
1074
1108
  * The raw environment configuration that we read from the config file.
@@ -1249,7 +1283,17 @@ type CfSendEmailBindings = {
1249
1283
  destination_address?: string;
1250
1284
  } | {
1251
1285
  allowed_destination_addresses?: string[];
1286
+ } | {
1287
+ allowed_sender_addresses?: string[];
1252
1288
  });
1289
+ /**
1290
+ * A binding to a browser
1291
+ */
1292
+ interface CfBrowserBinding {
1293
+ binding: string;
1294
+ raw?: boolean;
1295
+ remote?: boolean;
1296
+ }
1253
1297
  /**
1254
1298
  * A binding to the AI project
1255
1299
  */
@@ -1259,6 +1303,14 @@ interface CfAIBinding {
1259
1303
  remote?: boolean;
1260
1304
  raw?: boolean;
1261
1305
  }
1306
+ /**
1307
+ * A binding to Cloudflare Images
1308
+ */
1309
+ interface CfImagesBinding {
1310
+ binding: string;
1311
+ raw?: boolean;
1312
+ remote?: boolean;
1313
+ }
1262
1314
  /**
1263
1315
  * A Durable Object.
1264
1316
  */
@@ -1316,6 +1368,9 @@ interface CfHelloWorld {
1316
1368
  binding: string;
1317
1369
  enable_timer?: boolean;
1318
1370
  }
1371
+ interface CfWorkerLoader {
1372
+ binding: string;
1373
+ }
1319
1374
  interface CfRateLimit {
1320
1375
  name: string;
1321
1376
  namespace_id: string;
@@ -1337,6 +1392,11 @@ interface CfService {
1337
1392
  props?: Record<string, unknown>;
1338
1393
  remote?: boolean;
1339
1394
  }
1395
+ interface CfVpcService {
1396
+ binding: string;
1397
+ service_id: string;
1398
+ remote?: boolean;
1399
+ }
1340
1400
  interface CfAnalyticsEngineDataset {
1341
1401
  binding: string;
1342
1402
  dataset?: string;
@@ -1708,7 +1768,7 @@ type ReadConfigOptions = ResolveConfigPathOptions & {
1708
1768
  hideWarnings?: boolean;
1709
1769
  preserveOriginalMain?: boolean;
1710
1770
  };
1711
- 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">;
1712
1772
  /**
1713
1773
  * Get the Wrangler configuration; read it from the give `configPath` if available.
1714
1774
  */
@@ -2294,13 +2354,13 @@ type Binding = {
2294
2354
  } | {
2295
2355
  type: "text_blob";
2296
2356
  source: File;
2297
- } | {
2298
- type: "browser";
2299
2357
  } | ({
2358
+ type: "browser";
2359
+ } & BindingOmit<CfBrowserBinding>) | ({
2300
2360
  type: "ai";
2301
- } & BindingOmit<CfAIBinding>) | {
2361
+ } & BindingOmit<CfAIBinding>) | ({
2302
2362
  type: "images";
2303
- } | {
2363
+ } & BindingOmit<CfImagesBinding>) | {
2304
2364
  type: "version_metadata";
2305
2365
  } | {
2306
2366
  type: "data_blob";
@@ -2340,7 +2400,11 @@ type Binding = {
2340
2400
  type: "unsafe_hello_world";
2341
2401
  } & BindingOmit<CfHelloWorld>) | ({
2342
2402
  type: "ratelimit";
2343
- } & NameOmit<CfRateLimit>) | {
2403
+ } & NameOmit<CfRateLimit>) | ({
2404
+ type: "worker_loader";
2405
+ } & BindingOmit<CfWorkerLoader>) | ({
2406
+ type: "vpc_service";
2407
+ } & BindingOmit<CfVpcService>) | {
2344
2408
  type: `unsafe_${string}`;
2345
2409
  } | {
2346
2410
  type: "assets";
@@ -2752,10 +2816,6 @@ declare function unstable_getMiniflareWorkerOptions(config: Config, env?: string
2752
2816
  containerBuildId?: string;
2753
2817
  }): Unstable_MiniflareWorkerOptions;
2754
2818
 
2755
- type RemoteProxySession = Pick<Worker, "ready" | "dispose"> & {
2756
- updateBindings: (bindings: StartDevWorkerInput["bindings"]) => Promise<void>;
2757
- remoteProxyConnectionString: RemoteProxyConnectionString;
2758
- };
2759
2819
  type StartRemoteProxySessionOptions = {
2760
2820
  workerName?: string;
2761
2821
  auth?: NonNullable<StartDevWorkerInput["dev"]>["auth"];
@@ -2763,6 +2823,11 @@ type StartRemoteProxySessionOptions = {
2763
2823
  complianceRegion?: Config["compliance_region"];
2764
2824
  };
2765
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
+
2766
2831
  type WranglerConfigObject = {
2767
2832
  /** The path to the wrangler config file */
2768
2833
  path: string;