wrangler 0.0.0-e7c06d78 → 0.0.0-e7c7235fd

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.
@@ -6,7 +6,6 @@ import type { DispatchFetch } from 'miniflare';
6
6
  import { Duplex } from 'stream';
7
7
  import { EventEmitter } from 'events';
8
8
  import { EventEmitter as EventEmitter_2 } from 'node:events';
9
- import { IncomingMessage } from 'http';
10
9
  import type { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
11
10
  import { IpcNetConnectOpts } from 'net';
12
11
  import type { Json } from 'miniflare';
@@ -16,12 +15,11 @@ import { Miniflare } from 'miniflare';
16
15
  import type { MiniflareOptions } from 'miniflare';
17
16
  import type { ModuleRule } from 'miniflare';
18
17
  import { Mutex } from 'miniflare';
18
+ import type { NodeJSCompatMode } from 'miniflare';
19
19
  import { Readable } from 'stream';
20
- import { ReadableStream } from 'stream/web';
21
- import type { Request as Request_2 } from 'miniflare';
22
- import { Response as Response_2 } from 'miniflare';
23
- import type { Server } from 'node:http';
24
- import { ServerResponse } from 'http';
20
+ import { ReadableStream as ReadableStream_2 } from 'stream/web';
21
+ import type { Request as Request_3 } from 'miniflare';
22
+ import { Response as Response_3 } from 'miniflare';
25
23
  import { Socket } from 'net';
26
24
  import { TcpNetConnectOpts } from 'net';
27
25
  import { TLSSocket } from 'tls';
@@ -30,6 +28,7 @@ import { UrlObject } from 'url';
30
28
  import { URLSearchParams as URLSearchParams_2 } from 'url';
31
29
  import type { WorkerOptions } from 'miniflare';
32
30
  import { Writable } from 'stream';
31
+ import { z } from 'zod';
33
32
 
34
33
  declare type AbortSignal_2 = unknown;
35
34
 
@@ -72,6 +71,45 @@ declare type ApiCredentials = {
72
71
  authEmail: string;
73
72
  };
74
73
 
74
+ declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
75
+
76
+ declare const AssetConfigSchema: z.ZodObject<{
77
+ html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
78
+ not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
79
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
82
+ not_found_handling?: "none" | "single-page-application" | "404-page";
83
+ serve_directly?: boolean;
84
+ }, {
85
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
86
+ not_found_handling?: "none" | "single-page-application" | "404-page";
87
+ serve_directly?: boolean;
88
+ }>;
89
+
90
+ declare type Assets = {
91
+ /** Absolute path to assets directory */
92
+ directory?: string;
93
+ /** Name of `env` binding property in the User Worker. */
94
+ binding?: string;
95
+ /** How to handle HTML requests. */
96
+ html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
97
+ /** How to handle requests that do not match an asset. */
98
+ not_found_handling?: "single-page-application" | "404-page" | "none";
99
+ /**
100
+ * If true, then respond to requests that match an asset with that asset directly.
101
+ * If false, route every request to the User Worker, whether or not it matches an asset.
102
+ * */
103
+ experimental_serve_directly?: boolean;
104
+ };
105
+
106
+ declare type AssetsOptions = {
107
+ directory: string;
108
+ binding?: string;
109
+ routingConfig: RoutingConfig;
110
+ assetConfig: AssetConfig;
111
+ };
112
+
75
113
  declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
76
114
 
77
115
  declare class BalancedPool extends Dispatcher {
@@ -109,7 +147,7 @@ declare type Binding = {
109
147
  type: "kv_namespace";
110
148
  } & BindingOmit<CfKvNamespace>) | ({
111
149
  type: "send_email";
112
- } & BindingOmit<CfSendEmailBindings>) | {
150
+ } & NameOmit<CfSendEmailBindings>) | {
113
151
  type: "wasm_module";
114
152
  source: BinaryFile;
115
153
  } | {
@@ -126,7 +164,9 @@ declare type Binding = {
126
164
  source: BinaryFile;
127
165
  } | ({
128
166
  type: "durable_object_namespace";
129
- } & BindingOmit<CfDurableObject>) | ({
167
+ } & NameOmit<CfDurableObject>) | ({
168
+ type: "workflow";
169
+ } & BindingOmit<CfWorkflow>) | ({
130
170
  type: "queue";
131
171
  } & BindingOmit<CfQueue>) | ({
132
172
  type: "r2_bucket";
@@ -135,8 +175,6 @@ declare type Binding = {
135
175
  } & Omit<CfD1Database, "binding">) | ({
136
176
  type: "vectorize";
137
177
  } & Omit<CfVectorize, "binding">) | ({
138
- type: "constellation";
139
- } & Omit<CfConstellation, "binding">) | ({
140
178
  type: "hyperdrive";
141
179
  } & Omit<CfHyperdrive, "binding">) | ({
142
180
  type: "service";
@@ -150,12 +188,16 @@ declare type Binding = {
150
188
  } & Omit<CfDispatchNamespace, "binding">) | ({
151
189
  type: "mtls_certificate";
152
190
  } & Omit<CfMTlsCertificate, "binding">) | ({
191
+ type: "pipeline";
192
+ } & Omit<CfPipeline, "binding">) | ({
153
193
  type: "logfwdr";
154
- } & Omit<CfLogfwdrBinding, "name">) | {
194
+ } & NameOmit<CfLogfwdrBinding>) | {
155
195
  type: `unsafe_${string}`;
196
+ } | {
197
+ type: "assets";
156
198
  };
157
199
 
158
- declare type BindingOmit<T> = Omit<T, "binding" | "name">;
200
+ declare type BindingOmit<T> = Omit<T, "binding">;
159
201
 
160
202
  /**
161
203
  * Result of the `getBindingsProxy` utility
@@ -176,7 +218,7 @@ declare type BodyInit =
176
218
  | ArrayBuffer
177
219
  | AsyncIterable<Uint8Array>
178
220
  | Blob_2
179
- | FormData
221
+ | FormData_2
180
222
  | Iterable<Uint8Array>
181
223
  | NodeJS.ArrayBufferView
182
224
  | URLSearchParams_2
@@ -184,12 +226,12 @@ declare type BodyInit =
184
226
  | string
185
227
 
186
228
  declare interface BodyMixin {
187
- readonly body: ReadableStream | null
229
+ readonly body: ReadableStream_2 | null
188
230
  readonly bodyUsed: boolean
189
231
 
190
232
  readonly arrayBuffer: () => Promise<ArrayBuffer>
191
233
  readonly blob: () => Promise<Blob_2>
192
- readonly formData: () => Promise<FormData>
234
+ readonly formData: () => Promise<FormData_2>
193
235
  readonly json: () => Promise<unknown>
194
236
  readonly text: () => Promise<string>
195
237
  }
@@ -309,13 +351,13 @@ declare type BundleStartEvent = {
309
351
  };
310
352
 
311
353
  declare interface Cache {
312
- match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
313
- matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
354
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response_2 | undefined>,
355
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response_2[]>,
314
356
  add (request: RequestInfo): Promise<undefined>,
315
357
  addAll (requests: RequestInfo[]): Promise<undefined>,
316
- put (request: RequestInfo, response: Response): Promise<undefined>,
358
+ put (request: RequestInfo, response: Response_2): Promise<undefined>,
317
359
  delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
318
- keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
360
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request_2[]>
319
361
  }
320
362
 
321
363
  /**
@@ -344,7 +386,7 @@ declare type CacheResponse = any;
344
386
  declare const caches: CacheStorage;
345
387
 
346
388
  declare interface CacheStorage {
347
- match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
389
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response_2 | undefined>,
348
390
  has (cacheName: string): Promise<boolean>,
349
391
  open (cacheName: string): Promise<Cache>,
350
392
  delete (cacheName: string): Promise<boolean>,
@@ -415,15 +457,10 @@ declare type CfCapnp = {
415
457
  compiled_schema?: never;
416
458
  };
417
459
 
418
- declare interface CfConstellation {
419
- binding: string;
420
- project_id: string;
421
- }
422
-
423
460
  declare interface CfD1Database {
424
461
  binding: string;
425
- database_id: string;
426
- database_name: string;
462
+ database_id?: string | typeof INHERIT_SYMBOL;
463
+ database_name?: string;
427
464
  preview_database_id?: string;
428
465
  database_internal_env?: string;
429
466
  migrations_table?: string;
@@ -461,7 +498,7 @@ declare interface CfHyperdrive {
461
498
  */
462
499
  declare interface CfKvNamespace {
463
500
  binding: string;
464
- id: string;
501
+ id?: string | typeof INHERIT_SYMBOL;
465
502
  }
466
503
 
467
504
  declare interface CfLogfwdrBinding {
@@ -524,6 +561,11 @@ declare interface CfMTlsCertificate {
524
561
  certificate_id: string;
525
562
  }
526
563
 
564
+ declare interface CfPipeline {
565
+ binding: string;
566
+ pipeline: string;
567
+ }
568
+
527
569
  declare interface CfQueue {
528
570
  binding: string;
529
571
  queue_name: string;
@@ -532,7 +574,7 @@ declare interface CfQueue {
532
574
 
533
575
  declare interface CfR2Bucket {
534
576
  binding: string;
535
- bucket_name: string;
577
+ bucket_name?: string | typeof INHERIT_SYMBOL;
536
578
  jurisdiction?: string;
537
579
  }
538
580
 
@@ -601,6 +643,13 @@ declare interface CfWorkerSourceMap {
601
643
  content: string | Buffer;
602
644
  }
603
645
 
646
+ declare interface CfWorkflow {
647
+ name: string;
648
+ class_name: string;
649
+ binding: string;
650
+ script_name?: string;
651
+ }
652
+
604
653
  /**
605
654
  * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
606
655
  */
@@ -713,38 +762,32 @@ declare interface CloseEventInit extends EventInit {
713
762
  * Configuration in wrangler for Cloudchamber
714
763
  */
715
764
  declare type CloudchamberConfig = {
765
+ image?: string;
766
+ location?: string;
716
767
  vcpu?: number;
717
768
  memory?: string;
769
+ ipv4?: boolean;
718
770
  };
719
771
 
720
- /**
721
- * This is the static type definition for the configuration object.
722
- *
723
- * It reflects a normalized and validated version of the configuration that you can write in wrangler.toml,
724
- * and optionally augment with arguments passed directly to wrangler.
725
- *
726
- * For more information about the configuration object, see the
727
- * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
728
- *
729
- * Notes:
730
- *
731
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
732
- * in the top level config and should not appear in any environments.
733
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
734
- * - All top level fields in config and environments are optional in the wrangler.toml file.
735
- *
736
- * Legend for the annotations:
737
- *
738
- * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
739
- * - `@todo`: there's more work to be done (with details attached).
740
- */
741
- declare type Config = ConfigFields<DevConfig> & PagesConfigFields & Environment;
772
+ declare interface ComputedFields {
773
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
774
+ configPath: string | undefined;
775
+ /** The path to the user's Wrangler configuration file (if any), which may have been redirected to another file that used to create this configuration. */
776
+ userConfigPath: string | undefined;
777
+ /**
778
+ * The original top level name for the Worker in the raw configuration.
779
+ *
780
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
781
+ * It can be useful to know what the top-level name was before the flattening.
782
+ */
783
+ topLevelName: string | undefined;
784
+ }
742
785
 
743
786
  declare class ConfigController extends Controller<ConfigControllerEventMap> {
744
787
  #private;
745
788
  latestInput?: StartDevWorkerInput;
746
789
  latestConfig?: StartDevWorkerOptions;
747
- set(input: StartDevWorkerInput): Promise<StartDevWorkerOptions | undefined>;
790
+ set(input: StartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
748
791
  patch(input: Partial<StartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
749
792
  teardown(): Promise<void>;
750
793
  emitConfigUpdateEvent(config: StartDevWorkerOptions): void;
@@ -755,7 +798,6 @@ declare type ConfigControllerEventMap = ControllerEventMap & {
755
798
  };
756
799
 
757
800
  declare interface ConfigFields<Dev extends RawDevConfig> {
758
- configPath: string | undefined;
759
801
  /**
760
802
  * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
761
803
  * These have been superseded by Services, but there may be projects that won't
@@ -784,7 +826,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
784
826
  /**
785
827
  * The directory containing your static assets.
786
828
  *
787
- * It must be a path relative to your wrangler.toml file.
829
+ * It must be a path relative to your Wrangler configuration file.
788
830
  * Example: bucket = "./public"
789
831
  *
790
832
  * If there is a `site` field then it must contain this `bucket` field.
@@ -817,10 +859,13 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
817
859
  exclude?: string[];
818
860
  } | undefined;
819
861
  /**
820
- * Serve a folder of static assets with your Worker, without any additional code.
821
- * This can either be a string, or an object with additional config fields.
862
+ * Old behaviour of serving a folder of static assets with your Worker,
863
+ * without any additional code.
864
+ * This can either be a string, or an object with additional config
865
+ * fields.
866
+ * Will be deprecated in the near future in favor of `assets`.
822
867
  */
823
- assets: {
868
+ legacy_assets: {
824
869
  bucket: string;
825
870
  include: string[];
826
871
  exclude: string[];
@@ -859,7 +904,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
859
904
  [key: string]: string;
860
905
  } | undefined;
861
906
  /**
862
- * By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
907
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
863
908
  *
864
909
  * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
865
910
  *
@@ -887,6 +932,32 @@ url: string | URL_2 | UrlObject,
887
932
  options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
888
933
  ): Promise<Dispatcher.ConnectData>;
889
934
 
935
+ /**
936
+ * Configuration for a container application
937
+ */
938
+ declare type ContainerApp = {
939
+ name: string;
940
+ instances: number;
941
+ scheduling_policy?: "regional" | "moon";
942
+ configuration: {
943
+ image: string;
944
+ labels?: {
945
+ name: string;
946
+ value: string;
947
+ }[];
948
+ secrets?: {
949
+ name: string;
950
+ type: "env";
951
+ secret: string;
952
+ }[];
953
+ };
954
+ constraints?: {
955
+ regions?: string[];
956
+ cities?: string[];
957
+ tier?: number;
958
+ };
959
+ };
960
+
890
961
  declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
891
962
  emitErrorEvent(data: ErrorEvent): void;
892
963
  }
@@ -926,7 +997,7 @@ declare type DeferredPromise<T> = {
926
997
  };
927
998
 
928
999
  declare function deleteCookie (
929
- headers: Headers,
1000
+ headers: Headers_2,
930
1001
  name: string,
931
1002
  attributes?: { name?: string, domain?: string }
932
1003
  ): void
@@ -940,8 +1011,6 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
940
1011
  url: string;
941
1012
  id: string;
942
1013
  environment: "production" | "preview";
943
- project_id: string;
944
- project_name: string;
945
1014
  build_config: {
946
1015
  build_command: string;
947
1016
  destination_dir: string;
@@ -952,6 +1021,8 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
952
1021
  };
953
1022
  created_on: string;
954
1023
  production_branch: string;
1024
+ project_id: string;
1025
+ project_name: string;
955
1026
  deployment_trigger: {
956
1027
  metadata: {
957
1028
  branch: string;
@@ -961,14 +1032,14 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
961
1032
  type: string;
962
1033
  };
963
1034
  latest_stage: {
964
- name: "build" | "deploy" | "queued" | "initialize" | "clone_repo";
965
- status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
1035
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1036
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
966
1037
  started_on: string | null;
967
1038
  ended_on: string | null;
968
1039
  };
969
1040
  stages: {
970
- name: "build" | "deploy" | "queued" | "initialize" | "clone_repo";
971
- status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
1041
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1042
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
972
1043
  started_on: string | null;
973
1044
  ended_on: string | null;
974
1045
  }[];
@@ -976,8 +1047,8 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
976
1047
  modified_on: string;
977
1048
  short_id: string;
978
1049
  build_image_major_version: number;
1050
+ kv_namespaces?: any;
979
1051
  source?: {
980
- type: "github" | "gitlab";
981
1052
  config: {
982
1053
  owner: string;
983
1054
  repo_name: string;
@@ -985,12 +1056,12 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
985
1056
  pr_comments_enabled?: boolean | undefined;
986
1057
  deployments_enabled?: boolean | undefined;
987
1058
  production_deployments_enabled?: boolean | undefined;
988
- preview_deployment_setting?: "none" | "all" | "custom" | undefined;
1059
+ preview_deployment_setting?: "none" | "custom" | "all" | undefined;
989
1060
  preview_branch_includes?: string[] | undefined;
990
1061
  preview_branch_excludes?: string[] | undefined;
991
1062
  };
1063
+ type: "github" | "gitlab";
992
1064
  } | undefined;
993
- kv_namespaces?: any;
994
1065
  env_vars?: any;
995
1066
  durable_object_namespaces?: any;
996
1067
  is_skipped?: boolean | undefined;
@@ -999,6 +1070,30 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
999
1070
  } | undefined;
1000
1071
  }>;
1001
1072
 
1073
+ declare interface DeprecatedConfigFields {
1074
+ /**
1075
+ * The project "type". A holdover from Wrangler v1.x.
1076
+ * Valid values were "webpack", "javascript", and "rust".
1077
+ *
1078
+ * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
1079
+ * @breaking
1080
+ */
1081
+ type?: "webpack" | "javascript" | "rust";
1082
+ /**
1083
+ * Path to the webpack config to use when building your worker.
1084
+ * A holdover from Wrangler v1.x, used with `type: "webpack"`.
1085
+ *
1086
+ * @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
1087
+ * @breaking
1088
+ */
1089
+ webpack_config?: string;
1090
+ /**
1091
+ * Configuration only used by a standalone use of the miniflare binary.
1092
+ * @deprecated
1093
+ */
1094
+ miniflare?: unknown;
1095
+ }
1096
+
1002
1097
  /**
1003
1098
  * Deprecated upload configuration.
1004
1099
  */
@@ -1011,9 +1106,9 @@ declare interface DeprecatedUpload {
1011
1106
  format?: "modules" | "service-worker";
1012
1107
  /**
1013
1108
  * The directory you wish to upload your Worker from,
1014
- * relative to the wrangler.toml file.
1109
+ * relative to the Wrangler configuration file.
1015
1110
  *
1016
- * Defaults to the directory containing the wrangler.toml file.
1111
+ * Defaults to the directory containing the Wrangler configuration file.
1017
1112
  *
1018
1113
  * @deprecated
1019
1114
  */
@@ -1225,7 +1320,7 @@ declare namespace Dispatcher {
1225
1320
  path: string;
1226
1321
  method: HttpMethod;
1227
1322
  /** Default: `null` */
1228
- body?: string | Buffer | Uint8Array | Readable | null | FormData;
1323
+ body?: string | Buffer | Uint8Array | Readable | null | FormData_2;
1229
1324
  /** Default: `null` */
1230
1325
  headers?: IncomingHttpHeaders | string[] | null;
1231
1326
  /** Query string params to be embedded in the request URL. Default: `null` */
@@ -1376,7 +1471,7 @@ declare interface DispatchNamespaceOutbound {
1376
1471
  parameters?: string[];
1377
1472
  }
1378
1473
 
1379
- declare type DOMException = typeof globalThis extends { DOMException: infer T }
1474
+ declare type DOMException_2 = typeof globalThis extends { DOMException: infer T }
1380
1475
  ? T
1381
1476
  : any
1382
1477
 
@@ -1391,6 +1486,25 @@ declare type DurableObjectBindings = {
1391
1486
  environment?: string;
1392
1487
  }[];
1393
1488
 
1489
+ /**
1490
+ * Configuration in wrangler for Durable Object Migrations
1491
+ */
1492
+ declare type DurableObjectMigration = {
1493
+ /** A unique identifier for this migration. */
1494
+ tag: string;
1495
+ /** The new Durable Objects being defined. */
1496
+ new_classes?: string[];
1497
+ /** The new SQLite Durable Objects being defined. */
1498
+ new_sqlite_classes?: string[];
1499
+ /** The Durable Objects being renamed. */
1500
+ renamed_classes?: {
1501
+ from: string;
1502
+ to: string;
1503
+ }[];
1504
+ /** The Durable Objects being removed. */
1505
+ deleted_classes?: string[];
1506
+ };
1507
+
1394
1508
  declare interface EnablePagesAssetsServiceBindingOptions {
1395
1509
  proxyPort?: number;
1396
1510
  directory?: string;
@@ -1404,8 +1518,8 @@ declare interface EnablePagesAssetsServiceBindingOptions {
1404
1518
  declare type Entry = {
1405
1519
  /** A worker's entrypoint */
1406
1520
  file: string;
1407
- /** A worker's directory. Usually where the wrangler.toml file is located */
1408
- directory: string;
1521
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
1522
+ projectRoot: string;
1409
1523
  /** Is this a module worker or a service worker? */
1410
1524
  format: CfScriptFormat;
1411
1525
  /** The directory that contains all of a `--no-bundle` worker's modules. Usually `${directory}/src`. Defaults to path.dirname(file) */
@@ -1414,6 +1528,8 @@ declare type Entry = {
1414
1528
  * A worker's name
1415
1529
  */
1416
1530
  name?: string | undefined;
1531
+ /** Export from a Worker's entrypoint */
1532
+ exports: string[];
1417
1533
  };
1418
1534
 
1419
1535
  /**
@@ -1425,6 +1541,39 @@ declare type Entry = {
1425
1541
  declare interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {
1426
1542
  }
1427
1543
 
1544
+ /**
1545
+ * The environment configuration properties that have been deprecated.
1546
+ */
1547
+ declare interface EnvironmentDeprecated {
1548
+ /**
1549
+ * The zone ID of the zone you want to deploy to. You can find this
1550
+ * in your domain page on the dashboard.
1551
+ *
1552
+ * @deprecated This is unnecessary since we can deduce this from routes directly.
1553
+ */
1554
+ zone_id?: string;
1555
+ /**
1556
+ * Legacy way of defining KVNamespaces that is no longer supported.
1557
+ *
1558
+ * @deprecated DO NOT USE. This was a legacy bug from Wrangler v1, that we do not want to support.
1559
+ */
1560
+ "kv-namespaces"?: string;
1561
+ /**
1562
+ * A list of services that your Worker should be bound to.
1563
+ *
1564
+ * @default []
1565
+ * @deprecated DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.
1566
+ */
1567
+ experimental_services?: {
1568
+ /** The binding name used to refer to the Service */
1569
+ name: string;
1570
+ /** The name of the Service being bound */
1571
+ service: string;
1572
+ /** The Service's environment */
1573
+ environment: string;
1574
+ }[];
1575
+ }
1576
+
1428
1577
  /**
1429
1578
  * The `EnvironmentInheritable` interface declares all the configuration fields for an environment
1430
1579
  * that can be inherited (and overridden) from the top-level environment.
@@ -1457,11 +1606,11 @@ declare interface EnvironmentInheritable {
1457
1606
  compatibility_date: string | undefined;
1458
1607
  /**
1459
1608
  * A list of flags that enable features from upcoming features of
1460
- * the Workers runtime, usually used together with compatibility_flags.
1609
+ * the Workers runtime, usually used together with compatibility_date.
1461
1610
  *
1462
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1611
+ * More details at https://developers.cloudflare.com/workers/platform/compatibility-flags
1463
1612
  *
1464
- * @default `[]`
1613
+ * @default []
1465
1614
  * @inheritable
1466
1615
  */
1467
1616
  compatibility_flags: string[];
@@ -1499,12 +1648,20 @@ declare interface EnvironmentInheritable {
1499
1648
  * Whether we use <name>.<subdomain>.workers.dev to
1500
1649
  * test and deploy your Worker.
1501
1650
  *
1502
- * // Carmen according to our tests the default is undefined
1503
- * @default `true` (This is a breaking change from Wrangler v1)
1651
+ *
1652
+ * @default true
1504
1653
  * @breaking
1505
1654
  * @inheritable
1506
1655
  */
1507
1656
  workers_dev: boolean | undefined;
1657
+ /**
1658
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
1659
+ * serve Preview URLs for your Worker.
1660
+ *
1661
+ * @default true
1662
+ * @inheritable
1663
+ */
1664
+ preview_urls: boolean | undefined;
1508
1665
  /**
1509
1666
  * A list of routes that your Worker should be published to.
1510
1667
  * Only one of `routes` or `route` is required.
@@ -1533,14 +1690,14 @@ declare interface EnvironmentInheritable {
1533
1690
  /**
1534
1691
  * The function to use to replace jsx syntax.
1535
1692
  *
1536
- * @default `"React.createElement"`
1693
+ * @default "React.createElement"
1537
1694
  * @inheritable
1538
1695
  */
1539
1696
  jsx_factory: string;
1540
1697
  /**
1541
1698
  * The function to use to replace jsx fragment syntax.
1542
1699
  *
1543
- * @default `"React.Fragment"`
1700
+ * @default "React.Fragment"
1544
1701
  * @inheritable
1545
1702
  */
1546
1703
  jsx_fragment: string;
@@ -1554,19 +1711,7 @@ declare interface EnvironmentInheritable {
1554
1711
  * @default []
1555
1712
  * @inheritable
1556
1713
  */
1557
- migrations: {
1558
- /** A unique identifier for this migration. */
1559
- tag: string;
1560
- /** The new Durable Objects being defined. */
1561
- new_classes?: string[];
1562
- /** The Durable Objects being renamed. */
1563
- renamed_classes?: {
1564
- from: string;
1565
- to: string;
1566
- }[];
1567
- /** The Durable Objects being removed. */
1568
- deleted_classes?: string[];
1569
- }[];
1714
+ migrations: DurableObjectMigration[];
1570
1715
  /**
1571
1716
  * "Cron" definitions to trigger a Worker's "scheduled" function.
1572
1717
  *
@@ -1574,7 +1719,7 @@ declare interface EnvironmentInheritable {
1574
1719
  *
1575
1720
  * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1576
1721
  *
1577
- * @default `{crons:[]}`
1722
+ * @default {crons:[]}
1578
1723
  * @inheritable
1579
1724
  */
1580
1725
  triggers: {
@@ -1660,7 +1805,7 @@ declare interface EnvironmentInheritable {
1660
1805
  /**
1661
1806
  * List of bindings that you will send to logfwdr
1662
1807
  *
1663
- * @default `{bindings:[]}`
1808
+ * @default {bindings:[]}
1664
1809
  * @inheritable
1665
1810
  */
1666
1811
  logfwdr: {
@@ -1696,7 +1841,40 @@ declare interface EnvironmentInheritable {
1696
1841
  */
1697
1842
  placement: {
1698
1843
  mode: "off" | "smart";
1844
+ hint?: string;
1699
1845
  } | undefined;
1846
+ /**
1847
+ * Specify the directory of static assets to deploy/serve
1848
+ *
1849
+ * More details at https://developers.cloudflare.com/workers/frameworks/
1850
+ *
1851
+ * @inheritable
1852
+ */
1853
+ assets: Assets | undefined;
1854
+ /**
1855
+ * Specify the observability behavior of the Worker.
1856
+ *
1857
+ * @inheritable
1858
+ */
1859
+ observability: Observability | undefined;
1860
+ }
1861
+
1862
+ declare interface EnvironmentMap {
1863
+ /**
1864
+ * The `env` section defines overrides for the configuration for different environments.
1865
+ *
1866
+ * All environment fields can be specified at the top level of the config indicating the default environment settings.
1867
+ *
1868
+ * - Some fields are inherited and overridable in each environment.
1869
+ * - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
1870
+ *
1871
+ * For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
1872
+ *
1873
+ * @default {}
1874
+ */
1875
+ env?: {
1876
+ [envName: string]: Unstable_RawEnvironment;
1877
+ };
1700
1878
  }
1701
1879
 
1702
1880
  /**
@@ -1713,7 +1891,7 @@ declare interface EnvironmentNonInheritable {
1713
1891
  * NOTE: This field is not automatically inherited from the top level environment,
1714
1892
  * and so must be specified in every named environment.
1715
1893
  *
1716
- * @default `{}`
1894
+ * @default {}
1717
1895
  * @nonInheritable
1718
1896
  */
1719
1897
  define: Record<string, string>;
@@ -1723,7 +1901,7 @@ declare interface EnvironmentNonInheritable {
1723
1901
  * NOTE: This field is not automatically inherited from the top level environment,
1724
1902
  * and so must be specified in every named environment.
1725
1903
  *
1726
- * @default `{}`
1904
+ * @default {}
1727
1905
  * @nonInheritable
1728
1906
  */
1729
1907
  vars: Record<string, string | Json>;
@@ -1736,22 +1914,47 @@ declare interface EnvironmentNonInheritable {
1736
1914
  * NOTE: This field is not automatically inherited from the top level environment,
1737
1915
  * and so must be specified in every named environment.
1738
1916
  *
1739
- * @default `{bindings:[]}`
1917
+ * @default {bindings:[]}
1740
1918
  * @nonInheritable
1741
1919
  */
1742
1920
  durable_objects: {
1743
1921
  bindings: DurableObjectBindings;
1744
1922
  };
1923
+ /**
1924
+ * A list of workflows that your Worker should be bound to.
1925
+ *
1926
+ * NOTE: This field is not automatically inherited from the top level environment,
1927
+ * and so must be specified in every named environment.
1928
+ *
1929
+ * @default []
1930
+ * @nonInheritable
1931
+ */
1932
+ workflows: WorkflowBinding[];
1745
1933
  /**
1746
1934
  * Cloudchamber configuration
1747
1935
  *
1748
1936
  * NOTE: This field is not automatically inherited from the top level environment,
1749
1937
  * and so must be specified in every named environment.
1750
1938
  *
1751
- * @default `{}`
1939
+ * @default {}
1752
1940
  * @nonInheritable
1753
1941
  */
1754
1942
  cloudchamber: CloudchamberConfig;
1943
+ /**
1944
+ * Container related configuration
1945
+ */
1946
+ containers: {
1947
+ /**
1948
+ * Container app configuration
1949
+ *
1950
+ * NOTE: This field is not automatically inherited from the top level environment,
1951
+ * and so must be specified in every named environment.
1952
+ *
1953
+ * @default {}
1954
+ * @nonInheritable
1955
+ */
1956
+ app: ContainerApp[];
1957
+ };
1755
1958
  /**
1756
1959
  * These specify any Workers KV Namespaces you want to
1757
1960
  * access from inside your Worker.
@@ -1762,14 +1965,14 @@ declare interface EnvironmentNonInheritable {
1762
1965
  * NOTE: This field is not automatically inherited from the top level environment,
1763
1966
  * and so must be specified in every named environment.
1764
1967
  *
1765
- * @default `[]`
1968
+ * @default []
1766
1969
  * @nonInheritable
1767
1970
  */
1768
1971
  kv_namespaces: {
1769
1972
  /** The binding name used to refer to the KV Namespace */
1770
1973
  binding: string;
1771
1974
  /** The ID of the KV namespace */
1772
- id: string;
1975
+ id?: string;
1773
1976
  /** The ID of the KV namespace used during `wrangler dev` */
1774
1977
  preview_id?: string;
1775
1978
  }[];
@@ -1779,7 +1982,7 @@ declare interface EnvironmentNonInheritable {
1779
1982
  * NOTE: This field is not automatically inherited from the top level environment,
1780
1983
  * and so must be specified in every named environment.
1781
1984
  *
1782
- * @default `[]`
1985
+ * @default []
1783
1986
  * @nonInheritable
1784
1987
  */
1785
1988
  send_email: {
@@ -1796,7 +1999,7 @@ declare interface EnvironmentNonInheritable {
1796
1999
  * NOTE: This field is not automatically inherited from the top level environment,
1797
2000
  * and so must be specified in every named environment.
1798
2001
  *
1799
- * @default `{consumers:[],producers:[]}`
2002
+ * @default {consumers:[],producers:[]}
1800
2003
  * @nonInheritable
1801
2004
  */
1802
2005
  queues: {
@@ -1837,14 +2040,14 @@ declare interface EnvironmentNonInheritable {
1837
2040
  * NOTE: This field is not automatically inherited from the top level environment,
1838
2041
  * and so must be specified in every named environment.
1839
2042
  *
1840
- * @default `[]`
2043
+ * @default []
1841
2044
  * @nonInheritable
1842
2045
  */
1843
2046
  r2_buckets: {
1844
2047
  /** The binding name used to refer to the R2 bucket in the Worker. */
1845
2048
  binding: string;
1846
2049
  /** The name of this R2 bucket at the edge. */
1847
- bucket_name: string;
2050
+ bucket_name?: string;
1848
2051
  /** The preview name of this R2 bucket at the edge. */
1849
2052
  preview_bucket_name?: string;
1850
2053
  /** The jurisdiction that the bucket exists in. Default if not present. */
@@ -1856,16 +2059,16 @@ declare interface EnvironmentNonInheritable {
1856
2059
  * NOTE: This field is not automatically inherited from the top level environment,
1857
2060
  * and so must be specified in every named environment.
1858
2061
  *
1859
- * @default `[]`
2062
+ * @default []
1860
2063
  * @nonInheritable
1861
2064
  */
1862
2065
  d1_databases: {
1863
2066
  /** The binding name used to refer to the D1 database in the Worker. */
1864
2067
  binding: string;
1865
2068
  /** The name of this D1 database. */
1866
- database_name: string;
2069
+ database_name?: string;
1867
2070
  /** The UUID of this D1 database (not required). */
1868
- database_id: string;
2071
+ database_id?: string;
1869
2072
  /** The UUID of this D1 database for Wrangler Dev (if specified). */
1870
2073
  preview_database_id?: string;
1871
2074
  /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
@@ -1881,7 +2084,7 @@ declare interface EnvironmentNonInheritable {
1881
2084
  * NOTE: This field is not automatically inherited from the top level environment,
1882
2085
  * and so must be specified in every named environment.
1883
2086
  *
1884
- * @default `[]`
2087
+ * @default []
1885
2088
  * @nonInheritable
1886
2089
  */
1887
2090
  vectorize: {
@@ -1890,28 +2093,13 @@ declare interface EnvironmentNonInheritable {
1890
2093
  /** The name of the index. */
1891
2094
  index_name: string;
1892
2095
  }[];
1893
- /**
1894
- * Specifies Constellation projects that are bound to this Worker environment.
1895
- *
1896
- * NOTE: This field is not automatically inherited from the top level environment,
1897
- * and so must be specified in every named environment.
1898
- *
1899
- * @default `[]`
1900
- * @nonInheritable
1901
- */
1902
- constellation: {
1903
- /** The binding name used to refer to the project in the Worker. */
1904
- binding: string;
1905
- /** The id of the project. */
1906
- project_id: string;
1907
- }[];
1908
2096
  /**
1909
2097
  * Specifies Hyperdrive configs that are bound to this Worker environment.
1910
2098
  *
1911
2099
  * NOTE: This field is not automatically inherited from the top level environment,
1912
2100
  * and so must be specified in every named environment.
1913
2101
  *
1914
- * @default `[]`
2102
+ * @default []
1915
2103
  * @nonInheritable
1916
2104
  */
1917
2105
  hyperdrive: {
@@ -1928,7 +2116,7 @@ declare interface EnvironmentNonInheritable {
1928
2116
  * NOTE: This field is not automatically inherited from the top level environment,
1929
2117
  * and so must be specified in every named environment.
1930
2118
  *
1931
- * @default `[]`
2119
+ * @default []
1932
2120
  * @nonInheritable
1933
2121
  */
1934
2122
  services: {
@@ -1947,7 +2135,7 @@ declare interface EnvironmentNonInheritable {
1947
2135
  * NOTE: This field is not automatically inherited from the top level environment,
1948
2136
  * and so must be specified in every named environment.
1949
2137
  *
1950
- * @default `[]`
2138
+ * @default []
1951
2139
  * @nonInheritable
1952
2140
  */
1953
2141
  analytics_engine_datasets: {
@@ -1962,7 +2150,7 @@ declare interface EnvironmentNonInheritable {
1962
2150
  * NOTE: This field is not automatically inherited from the top level environment,
1963
2151
  * and so must be specified in every named environment.
1964
2152
  *
1965
- * @default `{}`
2153
+ * @default {}
1966
2154
  * @nonInheritable
1967
2155
  */
1968
2156
  browser: {
@@ -1974,7 +2162,7 @@ declare interface EnvironmentNonInheritable {
1974
2162
  * NOTE: This field is not automatically inherited from the top level environment,
1975
2163
  * and so must be specified in every named environment.
1976
2164
  *
1977
- * @default `{}`
2165
+ * @default {}
1978
2166
  * @nonInheritable
1979
2167
  */
1980
2168
  ai: {
@@ -1993,7 +2181,7 @@ declare interface EnvironmentNonInheritable {
1993
2181
  * NOTE: This field is not automatically inherited from the top level environment,
1994
2182
  * and so must be specified in every named environment.
1995
2183
  *
1996
- * @default `{}`
2184
+ * @default {}
1997
2185
  * @nonInheritable
1998
2186
  */
1999
2187
  unsafe: {
@@ -2033,7 +2221,7 @@ declare interface EnvironmentNonInheritable {
2033
2221
  * NOTE: This field is not automatically inherited from the top level environment,
2034
2222
  * and so must be specified in every named environment.
2035
2223
  *
2036
- * @default `[]`
2224
+ * @default []
2037
2225
  * @nonInheritable
2038
2226
  */
2039
2227
  mtls_certificates: {
@@ -2048,7 +2236,7 @@ declare interface EnvironmentNonInheritable {
2048
2236
  * NOTE: This field is not automatically inherited from the top level environment,
2049
2237
  * and so must be specified in every named environment.
2050
2238
  *
2051
- * @default `[]`
2239
+ * @default []
2052
2240
  * @nonInheritable
2053
2241
  */
2054
2242
  tail_consumers?: TailConsumer[];
@@ -2058,7 +2246,7 @@ declare interface EnvironmentNonInheritable {
2058
2246
  * NOTE: This field is not automatically inherited from the top level environment,
2059
2247
  * and so must be specified in every named environment.
2060
2248
  *
2061
- * @default `[]`
2249
+ * @default []
2062
2250
  * @nonInheritable
2063
2251
  */
2064
2252
  dispatch_namespaces: {
@@ -2069,9 +2257,24 @@ declare interface EnvironmentNonInheritable {
2069
2257
  /** Details about the outbound Worker which will handle outbound requests from your namespace */
2070
2258
  outbound?: DispatchNamespaceOutbound;
2071
2259
  }[];
2260
+ /**
2261
+ * Specifies list of Pipelines bound to this Worker environment
2262
+ *
2263
+ * NOTE: This field is not automatically inherited from the top level environment,
2264
+ * and so must be specified in every named environment.
2265
+ *
2266
+ * @default []
2267
+ * @nonInheritable
2268
+ */
2269
+ pipelines: {
2270
+ /** The binding name used to refer to the bound service. */
2271
+ binding: string;
2272
+ /** Name of the Pipeline to bind */
2273
+ pipeline: string;
2274
+ }[];
2072
2275
  }
2073
2276
 
2074
- declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
2277
+ declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker" | "MultiworkerRuntimeController"> | BaseErrorEvent<"ProxyController", {
2075
2278
  config?: StartDevWorkerOptions;
2076
2279
  bundle?: Bundle;
2077
2280
  }> | BaseErrorEvent<"BundlerController", {
@@ -2280,10 +2483,18 @@ declare class ExecutionContext {
2280
2483
  passThroughOnException(): void;
2281
2484
  }
2282
2485
 
2283
- declare function fetch (
2486
+ export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
2487
+
2488
+ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, options?: ReadConfigOptions) => {
2489
+ rawConfig: Unstable_RawConfig;
2490
+ configPath: string | undefined;
2491
+ userConfigPath: string | undefined;
2492
+ };
2493
+
2494
+ declare function fetch_2 (
2284
2495
  input: RequestInfo,
2285
- init?: RequestInit
2286
- ): Promise<Response>
2496
+ init?: RequestInit_2
2497
+ ): Promise<Response_2>
2287
2498
 
2288
2499
  declare class File extends Blob_2 {
2289
2500
  /**
@@ -2346,7 +2557,7 @@ declare class FileReader {
2346
2557
 
2347
2558
  readonly result: string | ArrayBuffer | null
2348
2559
 
2349
- readonly error: DOMException | null
2560
+ readonly error: DOMException_2 | null
2350
2561
 
2351
2562
  onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
2352
2563
  onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
@@ -2359,7 +2570,7 @@ declare class FileReader {
2359
2570
  /**
2360
2571
  * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
2361
2572
  */
2362
- declare class FormData {
2573
+ declare class FormData_2 {
2363
2574
  /**
2364
2575
  * Appends a new value onto an existing key inside a FormData object,
2365
2576
  * or adds the key if it does not already exist.
@@ -2424,7 +2635,7 @@ declare class FormData {
2424
2635
  * Executes given callback function for each field of the FormData instance
2425
2636
  */
2426
2637
  forEach: (
2427
- callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void,
2638
+ callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData_2) => void,
2428
2639
  thisArg?: unknown
2429
2640
  ) => void
2430
2641
 
@@ -2460,7 +2671,7 @@ declare class FormData {
2460
2671
  declare type FormDataEntryValue = string | File
2461
2672
 
2462
2673
  /**
2463
- * By reading from a `wrangler.toml` file this function generates proxy binding objects that can be
2674
+ * By reading from a Wrangler configuration file this function generates proxy binding objects that can be
2464
2675
  * used to simulate the interaction with bindings during local development in a Node.js environment
2465
2676
  *
2466
2677
  * @deprecated use `getPlatformProxy` instead
@@ -2473,14 +2684,14 @@ export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfP
2473
2684
  /** Options for the `getBindingsProxy` utility */
2474
2685
  export declare type GetBindingsProxyOptions = GetPlatformProxyOptions;
2475
2686
 
2476
- declare function getCookies (headers: Headers): Record<string, string>
2687
+ declare function getCookies (headers: Headers_2): Record<string, string>
2477
2688
 
2478
2689
  declare function getGlobalDispatcher(): Dispatcher;
2479
2690
 
2480
2691
  declare function getGlobalOrigin(): URL | undefined;
2481
2692
 
2482
2693
  /**
2483
- * By reading from a `wrangler.toml` file this function generates proxy objects that can be
2694
+ * By reading from a Wrangler configuration file this function generates proxy objects that can be
2484
2695
  * used to simulate the interaction with the Cloudflare platform during local development
2485
2696
  * in a Node.js environment
2486
2697
  *
@@ -2500,19 +2711,12 @@ export declare type GetPlatformProxyOptions = {
2500
2711
  /**
2501
2712
  * The path to the config file to use.
2502
2713
  * If no path is specified the default behavior is to search from the
2503
- * current directory up the filesystem for a `wrangler.toml` to use.
2714
+ * current directory up the filesystem for a Wrangler configuration file to use.
2504
2715
  *
2505
2716
  * Note: this field is optional but if a path is specified it must
2506
2717
  * point to a valid file on the filesystem
2507
2718
  */
2508
2719
  configPath?: string;
2509
- /**
2510
- * Flag to indicate the utility to read a json config file (`wrangler.json`)
2511
- * instead of the toml one (`wrangler.toml`)
2512
- *
2513
- * Note: this feature is experimental
2514
- */
2515
- experimentalJsonConfig?: boolean;
2516
2720
  /**
2517
2721
  * Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
2518
2722
  * used by wrangler v3: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
@@ -2521,17 +2725,11 @@ export declare type GetPlatformProxyOptions = {
2521
2725
  persist?: boolean | {
2522
2726
  path: string;
2523
2727
  };
2524
- /**
2525
- * Use the experimental file-based dev registry for service discovery
2526
- *
2527
- * Note: this feature is experimental
2528
- */
2529
- experimentalRegistry?: boolean;
2530
2728
  };
2531
2729
 
2532
- declare function getSetCookies (headers: Headers): Cookie[]
2730
+ declare function getSetCookies (headers: Headers_2): Cookie[]
2533
2731
 
2534
- declare class Headers implements SpecIterable<[string, string]> {
2732
+ declare class Headers_2 implements SpecIterable<[string, string]> {
2535
2733
  constructor (init?: HeadersInit)
2536
2734
  readonly append: (name: string, value: string) => void
2537
2735
  readonly delete: (name: string) => void
@@ -2540,7 +2738,7 @@ declare class Headers implements SpecIterable<[string, string]> {
2540
2738
  readonly set: (name: string, value: string) => void
2541
2739
  readonly getSetCookie: () => string[]
2542
2740
  readonly forEach: (
2543
- callbackfn: (value: string, key: string, iterable: Headers) => void,
2741
+ callbackfn: (value: string, key: string, iterable: Headers_2) => void,
2544
2742
  thisArg?: unknown
2545
2743
  ) => void
2546
2744
 
@@ -2550,23 +2748,21 @@ declare class Headers implements SpecIterable<[string, string]> {
2550
2748
  readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
2551
2749
  }
2552
2750
 
2553
- declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
2751
+ declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers_2
2554
2752
 
2555
2753
  declare type Hook<T extends HookValues, Args extends unknown[] = []> = T | ((...args: Args) => T);
2556
2754
 
2557
2755
  declare type HookValues = string | number | boolean | object | undefined | null;
2558
2756
 
2559
2757
  /**
2560
- * @property terminate Terminates HTTP server.
2758
+ * The header type declaration of `undici`.
2561
2759
  */
2562
- declare type HttpTerminator = {
2563
- readonly terminate: () => Promise<void>;
2564
- };
2760
+ declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2565
2761
 
2566
2762
  /**
2567
- * The header type declaration of `undici`.
2763
+ * A symbol to inherit a binding from the deployed worker.
2568
2764
  */
2569
- declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2765
+ declare const INHERIT_SYMBOL: unique symbol;
2570
2766
 
2571
2767
  declare type InspectorProxyWorkerIncomingWebSocketMessage = {
2572
2768
  type: ReloadStartEvent["type"];
@@ -2599,7 +2795,9 @@ declare interface Interceptable extends Dispatcher {
2599
2795
  declare class Logger {
2600
2796
  #private;
2601
2797
  constructor();
2602
- loggerLevel: "error" | "none" | "warn" | "info" | "log" | "debug";
2798
+ private overrideLoggerLevel?;
2799
+ get loggerLevel(): "log" | "error" | "none" | "debug" | "info" | "warn";
2800
+ set loggerLevel(val: "log" | "error" | "none" | "debug" | "info" | "warn");
2603
2801
  columns: number;
2604
2802
  debug: (...args: unknown[]) => void;
2605
2803
  debugWithSanitization: (label: string, ...args: unknown[]) => void;
@@ -2609,17 +2807,36 @@ declare class Logger {
2609
2807
  error: (...args: unknown[]) => void;
2610
2808
  table<Keys extends string>(data: TableRow<Keys>[]): void;
2611
2809
  console<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
2810
+ static onceHistory: Set<unknown>;
2811
+ get once(): {
2812
+ info: (...args: unknown[]) => void;
2813
+ log: (...args: unknown[]) => void;
2814
+ warn: (...args: unknown[]) => void;
2815
+ error: (...args: unknown[]) => void;
2816
+ };
2817
+ doLogOnce(messageLevel: Exclude<LoggerLevel, "none">, args: unknown[]): void;
2612
2818
  private doLog;
2613
2819
  static registerBeforeLogHook(callback: (() => void) | undefined): void;
2614
2820
  static registerAfterLogHook(callback: (() => void) | undefined): void;
2615
2821
  private formatMessage;
2616
2822
  }
2617
2823
 
2824
+ declare const LOGGER_LEVELS: {
2825
+ readonly none: -1;
2826
+ readonly error: 0;
2827
+ readonly warn: 1;
2828
+ readonly info: 2;
2829
+ readonly log: 3;
2830
+ readonly debug: 4;
2831
+ };
2832
+
2833
+ declare type LoggerLevel = keyof typeof LOGGER_LEVELS;
2834
+
2618
2835
  declare type LogLevel = "debug" | "info" | "log" | "warn" | "error" | "none";
2619
2836
 
2620
2837
  declare type MaybePromise<T> = T | Promise<T>;
2621
2838
 
2622
- declare interface MessageEvent<T = any> extends Event_2 {
2839
+ declare interface MessageEvent_2<T = any> extends Event_2 {
2623
2840
  readonly data: T
2624
2841
  readonly lastEventId: string
2625
2842
  readonly origin: string
@@ -2637,9 +2854,9 @@ declare interface MessageEvent<T = any> extends Event_2 {
2637
2854
  ): void;
2638
2855
  }
2639
2856
 
2640
- declare const MessageEvent: {
2641
- prototype: MessageEvent
2642
- new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
2857
+ declare const MessageEvent_2: {
2858
+ prototype: MessageEvent_2
2859
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent_2<T>
2643
2860
  };
2644
2861
 
2645
2862
  declare interface MessageEventInit<T = any> extends EventInit {
@@ -2778,7 +2995,7 @@ declare namespace MockInterceptor {
2778
2995
  origin: string;
2779
2996
  method: string;
2780
2997
  body?: BodyInit | Dispatcher.DispatchOptions['body'];
2781
- headers: Headers | Record<string, string>;
2998
+ headers: Headers_2 | Record<string, string>;
2782
2999
  maxRedirections: number;
2783
3000
  }
2784
3001
 
@@ -2825,31 +3042,38 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
2825
3042
  cacheName?: string
2826
3043
  }
2827
3044
 
2828
- /**
2829
- * Wrangler can provide Node.js compatibility in a number of different modes:
2830
- * - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
2831
- * - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
2832
- * - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
2833
- * and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime.
2834
- */
2835
- declare type NodeJSCompatMode = "legacy" | "v1" | "v2" | null;
3045
+ declare type NameOmit<T> = Omit<T, "name">;
2836
3046
 
2837
- declare interface PagesConfigFields {
2838
- /**
2839
- * The directory of static assets to serve.
2840
- *
2841
- * The presence of this field in `wrangler.toml` indicates a Pages project,
2842
- * and will prompt the handling of the configuration file according to the
2843
- * Pages-specific validation rules.
2844
- */
2845
- pages_build_output_dir?: string;
3047
+ declare type NormalizeAndValidateConfigArgs = {
3048
+ name?: string;
3049
+ env?: string;
3050
+ "legacy-env"?: boolean;
3051
+ "dispatch-namespace"?: string;
3052
+ remote?: boolean;
3053
+ localProtocol?: string;
3054
+ upstreamProtocol?: string;
3055
+ script?: string;
3056
+ };
3057
+
3058
+ declare interface Observability {
3059
+ /** If observability is enabled for this Worker */
3060
+ enabled?: boolean;
3061
+ /** The sampling rate */
3062
+ head_sampling_rate?: number;
3063
+ logs?: {
3064
+ enabled?: boolean;
3065
+ /** The sampling rate */
3066
+ head_sampling_rate?: number;
3067
+ /** Set to false to disable invocation logs */
3068
+ invocation_logs?: boolean;
3069
+ };
2846
3070
  }
2847
3071
 
2848
3072
  declare interface PagesConfigFields {
2849
3073
  /**
2850
3074
  * The directory of static assets to serve.
2851
3075
  *
2852
- * The presence of this field in `wrangler.toml` indicates a Pages project,
3076
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
2853
3077
  * and will prompt the handling of the configuration file according to the
2854
3078
  * Pages-specific validation rules.
2855
3079
  */
@@ -25425,7 +25649,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
25425
25649
  onReloadComplete(data: ReloadCompleteEvent): void;
25426
25650
  onProxyWorkerMessage(message: ProxyWorkerOutgoingRequestBody): void;
25427
25651
  onInspectorProxyWorkerMessage(message: InspectorProxyWorkerOutgoingWebsocketMessage): void;
25428
- onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_2>;
25652
+ onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_3>;
25429
25653
  _torndown: boolean;
25430
25654
  teardown(): Promise<void>;
25431
25655
  emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL): void;
@@ -25468,10 +25692,19 @@ declare type ProxyWorkerOutgoingRequestBody = {
25468
25692
  args: Parameters<typeof console.debug>;
25469
25693
  };
25470
25694
 
25471
- declare type QueueConsumer = NonNullable<Config["queues"]["consumers"]>[number];
25695
+ declare type QueueConsumer = NonNullable<Unstable_Config["queues"]["consumers"]>[number];
25472
25696
 
25473
25697
  declare type RawDevConfig = Partial<DevConfig>;
25474
25698
 
25699
+ declare type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
25700
+ config?: string;
25701
+ script?: string;
25702
+ };
25703
+
25704
+ declare type ReadConfigOptions = ResolveConfigPathOptions & {
25705
+ hideWarnings?: boolean;
25706
+ };
25707
+
25475
25708
  declare type ReadyEvent = {
25476
25709
  type: "ready";
25477
25710
  proxyWorker: Miniflare;
@@ -25509,13 +25742,19 @@ declare type ReloadStartEvent = {
25509
25742
  bundle: Bundle;
25510
25743
  };
25511
25744
 
25512
- declare class Request implements BodyMixin {
25513
- constructor (input: RequestInfo, init?: RequestInit)
25745
+ /** Performs an HTTP request. */
25746
+ declare function request(
25747
+ url: string | URL_2 | UrlObject,
25748
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25749
+ ): Promise<Dispatcher.ResponseData>;
25750
+
25751
+ declare class Request_2 implements BodyMixin {
25752
+ constructor (input: RequestInfo, init?: RequestInit_2)
25514
25753
 
25515
25754
  readonly cache: RequestCache
25516
25755
  readonly credentials: RequestCredentials
25517
25756
  readonly destination: RequestDestination
25518
- readonly headers: Headers
25757
+ readonly headers: Headers_2
25519
25758
  readonly integrity: string
25520
25759
  readonly method: string
25521
25760
  readonly mode: RequestMode
@@ -25527,24 +25766,18 @@ declare class Request implements BodyMixin {
25527
25766
  readonly signal: AbortSignal
25528
25767
  readonly duplex: RequestDuplex
25529
25768
 
25530
- readonly body: ReadableStream | null
25769
+ readonly body: ReadableStream_2 | null
25531
25770
  readonly bodyUsed: boolean
25532
25771
 
25533
25772
  readonly arrayBuffer: () => Promise<ArrayBuffer>
25534
25773
  readonly blob: () => Promise<Blob_2>
25535
- readonly formData: () => Promise<FormData>
25774
+ readonly formData: () => Promise<FormData_2>
25536
25775
  readonly json: () => Promise<unknown>
25537
25776
  readonly text: () => Promise<string>
25538
25777
 
25539
- readonly clone: () => Request
25778
+ readonly clone: () => Request_2
25540
25779
  }
25541
25780
 
25542
- /** Performs an HTTP request. */
25543
- declare function request(
25544
- url: string | URL_2 | UrlObject,
25545
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25546
- ): Promise<Dispatcher.ResponseData>;
25547
-
25548
25781
  declare type RequestCache =
25549
25782
  | 'default'
25550
25783
  | 'force-cache'
@@ -25577,9 +25810,9 @@ declare type RequestDestination =
25577
25810
 
25578
25811
  declare type RequestDuplex = 'half'
25579
25812
 
25580
- declare type RequestInfo = string | URL_2 | Request
25813
+ declare type RequestInfo = string | URL_2 | Request_2
25581
25814
 
25582
- declare interface RequestInit {
25815
+ declare interface RequestInit_2 {
25583
25816
  method?: string
25584
25817
  keepalive?: boolean
25585
25818
  headers?: HeadersInit
@@ -25600,10 +25833,14 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25600
25833
 
25601
25834
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25602
25835
 
25603
- declare class Response implements BodyMixin {
25604
- constructor (body?: BodyInit, init?: ResponseInit)
25836
+ declare type ResolveConfigPathOptions = {
25837
+ useRedirectIfAvailable?: boolean;
25838
+ };
25605
25839
 
25606
- readonly headers: Headers
25840
+ declare class Response_2 implements BodyMixin {
25841
+ constructor (body?: BodyInit, init?: ResponseInit_2)
25842
+
25843
+ readonly headers: Headers_2
25607
25844
  readonly ok: boolean
25608
25845
  readonly status: number
25609
25846
  readonly statusText: string
@@ -25611,23 +25848,23 @@ declare class Response implements BodyMixin {
25611
25848
  readonly url: string
25612
25849
  readonly redirected: boolean
25613
25850
 
25614
- readonly body: ReadableStream | null
25851
+ readonly body: ReadableStream_2 | null
25615
25852
  readonly bodyUsed: boolean
25616
25853
 
25617
25854
  readonly arrayBuffer: () => Promise<ArrayBuffer>
25618
25855
  readonly blob: () => Promise<Blob_2>
25619
- readonly formData: () => Promise<FormData>
25856
+ readonly formData: () => Promise<FormData_2>
25620
25857
  readonly json: () => Promise<unknown>
25621
25858
  readonly text: () => Promise<string>
25622
25859
 
25623
- readonly clone: () => Response
25860
+ readonly clone: () => Response_2
25624
25861
 
25625
- static error (): Response
25626
- static json(data: any, init?: ResponseInit): Response
25627
- static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response
25862
+ static error (): Response_2
25863
+ static json(data: any, init?: ResponseInit_2): Response_2
25864
+ static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response_2
25628
25865
  }
25629
25866
 
25630
- declare interface ResponseInit {
25867
+ declare interface ResponseInit_2 {
25631
25868
  readonly status?: number
25632
25869
  readonly statusText?: string
25633
25870
  readonly headers?: HeadersInit
@@ -25758,6 +25995,25 @@ declare namespace RetryHandler {
25758
25995
 
25759
25996
  declare type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
25760
25997
 
25998
+ declare type RoutingConfig = z.infer<typeof RoutingConfigSchema>;
25999
+
26000
+ declare const RoutingConfigSchema: z.ZodObject<{
26001
+ has_user_worker: z.ZodOptional<z.ZodBoolean>;
26002
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
26003
+ account_id: z.ZodOptional<z.ZodNumber>;
26004
+ script_id: z.ZodOptional<z.ZodNumber>;
26005
+ }, "strip", z.ZodTypeAny, {
26006
+ has_user_worker?: boolean;
26007
+ invoke_user_worker_ahead_of_assets?: boolean;
26008
+ account_id?: number;
26009
+ script_id?: number;
26010
+ }, {
26011
+ has_user_worker?: boolean;
26012
+ invoke_user_worker_ahead_of_assets?: boolean;
26013
+ account_id?: number;
26014
+ script_id?: number;
26015
+ }>;
26016
+
25761
26017
  /**
25762
26018
  * A bundling resolver rule, defining the modules type for paths that match the specified globs.
25763
26019
  */
@@ -25794,9 +26050,9 @@ declare type SerializedError = {
25794
26050
  cause?: unknown;
25795
26051
  };
25796
26052
 
25797
- declare type ServiceFetch = (request: Request_2) => Promise<Response_2> | Response_2;
26053
+ declare type ServiceFetch = (request: Request_3) => Promise<Response_3> | Response_3;
25798
26054
 
25799
- declare function setCookie (headers: Headers, cookie: Cookie): void
26055
+ declare function setCookie (headers: Headers_2, cookie: Cookie): void
25800
26056
 
25801
26057
  declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
25802
26058
 
@@ -25834,7 +26090,7 @@ declare interface StartDevWorkerInput {
25834
26090
  name?: string;
25835
26091
  /**
25836
26092
  * The javascript or typescript entry-point of the worker.
25837
- * This is the `main` property of a wrangler.toml.
26093
+ * This is the `main` property of a Wrangler configuration file.
25838
26094
  * You can specify a file path or provide the contents directly.
25839
26095
  */
25840
26096
  entrypoint?: string;
@@ -25847,6 +26103,7 @@ declare interface StartDevWorkerInput {
25847
26103
  env?: string;
25848
26104
  /** The bindings available to the worker. The specified bindind type will be exposed to the worker on the `env` object under the same key. */
25849
26105
  bindings?: Record<string, Binding>;
26106
+ migrations?: DurableObjectMigration[];
25850
26107
  /** The triggers which will cause the worker's exported default handlers to be called. */
25851
26108
  triggers?: Trigger[];
25852
26109
  /**
@@ -25883,7 +26140,7 @@ declare interface StartDevWorkerInput {
25883
26140
  jsxFactory?: string;
25884
26141
  jsxFragment?: string;
25885
26142
  tsconfig?: string;
25886
- nodejsCompatMode?: Hook<NodeJSCompatMode, [Config]>;
26143
+ nodejsCompatMode?: Hook<NodeJSCompatMode, [Unstable_Config]>;
25887
26144
  moduleRoot?: string;
25888
26145
  };
25889
26146
  /** Options applying to the worker's development preview environment. */
@@ -25897,7 +26154,7 @@ declare interface StartDevWorkerInput {
25897
26154
  /** Whether the worker runs on the edge or locally. */
25898
26155
  remote?: boolean;
25899
26156
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
25900
- auth?: AsyncHook<CfAccount>;
26157
+ auth?: AsyncHook<CfAccount, [Pick<Unstable_Config, "account_id">]>;
25901
26158
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
25902
26159
  persist?: string;
25903
26160
  /** Controls which logs are logged 🤙. */
@@ -25924,20 +26181,25 @@ declare interface StartDevWorkerInput {
25924
26181
  /** An undici MockAgent to declaratively mock fetch calls to particular resources. */
25925
26182
  mockFetch?: undici.MockAgent;
25926
26183
  /** Describes the registry of other Workers running locally */
25927
- registry?: WorkerRegistry;
26184
+ registry?: WorkerRegistry | null;
25928
26185
  testScheduled?: boolean;
26186
+ /** Whether to use Vectorize mixed mode -- the worker is run locally but accesses to Vectorize are made remotely */
26187
+ bindVectorizeToProd?: boolean;
26188
+ /** Treat this as the primary worker in a multiworker setup (i.e. the first Worker in Miniflare's options) */
26189
+ multiworkerPrimary?: boolean;
25929
26190
  };
25930
26191
  legacy?: {
25931
- site?: Hook<Config["site"], [Config]>;
25932
- assets?: Hook<Config["assets"], [Config]>;
26192
+ site?: Hook<Unstable_Config["site"], [Unstable_Config]>;
26193
+ legacyAssets?: Hook<Unstable_Config["legacy_assets"], [Unstable_Config]>;
25933
26194
  enableServiceEnvironments?: boolean;
25934
26195
  };
25935
26196
  unsafe?: Omit<CfUnsafe, "bindings">;
26197
+ assets?: string;
25936
26198
  }
25937
26199
 
25938
- declare type StartDevWorkerOptions = StartDevWorkerInput & {
25939
- /** A worker's directory. Usually where the wrangler.toml file is located */
25940
- directory: string;
26200
+ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26201
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
26202
+ projectRoot: string;
25941
26203
  build: StartDevWorkerInput["build"] & {
25942
26204
  nodejsCompatMode: NodeJSCompatMode;
25943
26205
  format: CfScriptFormat;
@@ -25945,16 +26207,20 @@ declare type StartDevWorkerOptions = StartDevWorkerInput & {
25945
26207
  moduleRules: Rule[];
25946
26208
  define: Record<string, string>;
25947
26209
  additionalModules: CfModule[];
26210
+ exports: string[];
25948
26211
  processEntrypoint: boolean;
25949
26212
  };
25950
26213
  legacy: StartDevWorkerInput["legacy"] & {
25951
- assets?: Config["assets"];
25952
- site?: Config["site"];
26214
+ legacyAssets?: Unstable_Config["legacy_assets"];
26215
+ site?: Unstable_Config["site"];
25953
26216
  };
25954
26217
  dev: StartDevWorkerInput["dev"] & {
25955
26218
  persist: string;
26219
+ auth?: AsyncHook<CfAccount>;
25956
26220
  };
25957
26221
  entrypoint: string;
26222
+ assets?: AssetsOptions;
26223
+ name: string;
25958
26224
  };
25959
26225
 
25960
26226
  /** A faster version of `request`. */
@@ -26033,11 +26299,11 @@ declare namespace Undici {
26033
26299
  var MockPool: MockPool;
26034
26300
  var MockAgent: MockAgent;
26035
26301
  var mockErrors: MockErrors;
26036
- var fetch: fetch;
26037
- var Headers: Headers;
26038
- var Response: Response;
26039
- var Request: Request;
26040
- var FormData: FormData;
26302
+ var fetch: fetch_2;
26303
+ var Headers: Headers_2;
26304
+ var Response: Response_2;
26305
+ var Request: Request_2;
26306
+ var FormData: FormData_2;
26041
26307
  var File: File;
26042
26308
  var FileReader: FileReader;
26043
26309
  var caches: caches;
@@ -26076,7 +26342,7 @@ declare namespace undici {
26076
26342
  getSetCookies,
26077
26343
  setCookie,
26078
26344
  Cookie,
26079
- fetch,
26345
+ fetch_2 as fetch,
26080
26346
  RequestInfo,
26081
26347
  BodyInit,
26082
26348
  BodyMixin,
@@ -26084,20 +26350,20 @@ declare namespace undici {
26084
26350
  SpecIterableIterator,
26085
26351
  SpecIterable,
26086
26352
  HeadersInit,
26087
- Headers,
26353
+ Headers_2 as Headers,
26088
26354
  RequestCache,
26089
26355
  RequestCredentials,
26090
26356
  RequestDestination,
26091
- RequestInit,
26357
+ RequestInit_2 as RequestInit,
26092
26358
  ReferrerPolicy,
26093
26359
  RequestMode,
26094
26360
  RequestRedirect,
26095
26361
  RequestDuplex,
26096
- Request,
26097
- ResponseInit,
26362
+ Request_2 as Request,
26363
+ ResponseInit_2 as ResponseInit,
26098
26364
  ResponseType,
26099
26365
  ResponseRedirectStatus,
26100
- Response,
26366
+ Response_2 as Response,
26101
26367
  BlobPropertyBag,
26102
26368
  FilePropertyBag,
26103
26369
  File,
@@ -26105,7 +26371,7 @@ declare namespace undici {
26105
26371
  ProgressEventInit,
26106
26372
  ProgressEvent,
26107
26373
  FormDataEntryValue,
26108
- FormData,
26374
+ FormData_2 as FormData,
26109
26375
  DiagnosticsChannel,
26110
26376
  BinaryType,
26111
26377
  WebSocketEventMap,
@@ -26113,7 +26379,7 @@ declare namespace undici {
26113
26379
  CloseEventInit,
26114
26380
  CloseEvent,
26115
26381
  MessageEventInit,
26116
- MessageEvent,
26382
+ MessageEvent_2 as MessageEvent,
26117
26383
  WebSocketInit,
26118
26384
  parseMIMEType,
26119
26385
  serializeAMimeType,
@@ -26126,10 +26392,39 @@ declare namespace undici {
26126
26392
  }
26127
26393
  }
26128
26394
 
26395
+ export declare interface Unstable_ASSETSBindingsOptions {
26396
+ log: Logger;
26397
+ proxyPort?: number;
26398
+ directory?: string;
26399
+ }
26400
+
26401
+ /**
26402
+ * This is the static type definition for the configuration object.
26403
+ *
26404
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
26405
+ * and optionally augment with arguments passed directly to wrangler.
26406
+ *
26407
+ * For more information about the configuration object, see the
26408
+ * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
26409
+ *
26410
+ * Notes:
26411
+ *
26412
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26413
+ * in the top level config and should not appear in any environments.
26414
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
26415
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
26416
+ *
26417
+ * Legend for the annotations:
26418
+ *
26419
+ * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
26420
+ * - `@todo`: there's more work to be done (with details attached).
26421
+ */
26422
+ export declare type Unstable_Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
26423
+
26129
26424
  /**
26130
26425
  * unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
26131
26426
  */
26132
- export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
26427
+ export declare function unstable_dev(script: string, options?: Unstable_DevOptions, apiOptions?: unknown): Promise<Unstable_DevWorker>;
26133
26428
 
26134
26429
  export declare class unstable_DevEnv extends EventEmitter_2 {
26135
26430
  config: ConfigController;
@@ -26147,37 +26442,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
26147
26442
  emitErrorEvent(ev: ErrorEvent): void;
26148
26443
  }
26149
26444
 
26150
- export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_2) => Promise<Response_2>;
26151
-
26152
- export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): {
26153
- workerOptions: SourcelessWorkerOptions;
26154
- define: Record<string, string>;
26155
- main?: string;
26156
- };
26157
-
26158
- export declare const unstable_pages: {
26159
- deploy: typeof deploy;
26160
- };
26161
-
26162
- /**
26163
- * Split an SQLQuery into an array of statements
26164
- */
26165
- export declare function unstable_splitSqlQuery(sql: string): string[];
26166
-
26167
- export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26168
-
26169
- export declare function unstable_startWorkerRegistryServer(port: number): Promise<{
26170
- server: Server<IncomingMessage, ServerResponse>;
26171
- terminator: HttpTerminator;
26172
- }>;
26173
-
26174
- export declare interface UnstableASSETSBindingsOptions {
26175
- log: Logger;
26176
- proxyPort?: number;
26177
- directory?: string;
26178
- }
26179
-
26180
- export declare interface UnstableDevOptions {
26445
+ export declare interface Unstable_DevOptions {
26181
26446
  config?: string;
26182
26447
  env?: string;
26183
26448
  ip?: string;
@@ -26188,6 +26453,7 @@ export declare interface UnstableDevOptions {
26188
26453
  httpsKeyPath?: string;
26189
26454
  httpsCertPath?: string;
26190
26455
  assets?: string;
26456
+ legacyAssets?: string;
26191
26457
  site?: string;
26192
26458
  siteInclude?: string[];
26193
26459
  siteExclude?: string[];
@@ -26199,7 +26465,7 @@ export declare interface UnstableDevOptions {
26199
26465
  vars?: Record<string, string | Json>;
26200
26466
  kv?: {
26201
26467
  binding: string;
26202
- id: string;
26468
+ id?: string;
26203
26469
  preview_id?: string;
26204
26470
  }[];
26205
26471
  durableObjects?: {
@@ -26216,7 +26482,7 @@ export declare interface UnstableDevOptions {
26216
26482
  }[];
26217
26483
  r2?: {
26218
26484
  binding: string;
26219
- bucket_name: string;
26485
+ bucket_name?: string;
26220
26486
  preview_bucket_name?: string;
26221
26487
  }[];
26222
26488
  ai?: {
@@ -26246,18 +26512,59 @@ export declare interface UnstableDevOptions {
26246
26512
  watch?: boolean;
26247
26513
  devEnv?: boolean;
26248
26514
  fileBasedRegistry?: boolean;
26515
+ vectorizeBindToProd?: boolean;
26516
+ enableIpc?: boolean;
26249
26517
  };
26250
26518
  }
26251
26519
 
26252
- export declare interface UnstableDevWorker {
26520
+ export declare interface Unstable_DevWorker {
26253
26521
  port: number;
26254
26522
  address: string;
26255
- proxyData: ProxyData;
26256
26523
  stop: () => Promise<void>;
26257
- fetch: (input?: RequestInfo, init?: RequestInit) => Promise<Response>;
26524
+ fetch: (input?: RequestInfo, init?: RequestInit_2) => Promise<Response_2>;
26258
26525
  waitUntilExit: () => Promise<void>;
26259
26526
  }
26260
26527
 
26528
+ export declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26529
+
26530
+ export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): Unstable_MiniflareWorkerOptions;
26531
+
26532
+ export declare function unstable_getMiniflareWorkerOptions(config: Unstable_Config): Unstable_MiniflareWorkerOptions;
26533
+
26534
+ export declare interface Unstable_MiniflareWorkerOptions {
26535
+ workerOptions: SourcelessWorkerOptions;
26536
+ define: Record<string, string>;
26537
+ main?: string;
26538
+ }
26539
+
26540
+ export declare const unstable_pages: {
26541
+ deploy: typeof deploy;
26542
+ };
26543
+
26544
+ export declare type Unstable_RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & Unstable_RawEnvironment & DeprecatedConfigFields & EnvironmentMap & {
26545
+ $schema?: string;
26546
+ };
26547
+
26548
+ /**
26549
+ * The raw environment configuration that we read from the config file.
26550
+ *
26551
+ * All the properties are optional, and will be replaced with defaults in the configuration that
26552
+ * is used in the rest of the codebase.
26553
+ */
26554
+ export declare type Unstable_RawEnvironment = Partial<Environment> & EnvironmentDeprecated;
26555
+
26556
+ /**
26557
+ * Get the Wrangler configuration; read it from the give `configPath` if available.
26558
+ */
26559
+ export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Unstable_Config;
26560
+
26561
+ /**
26562
+ * Split an SQLQuery into an array of statements
26563
+ */
26564
+ export declare function unstable_splitSqlQuery(sql: string): string[];
26565
+
26566
+ export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26567
+
26261
26568
  /** Upgrade to a different protocol. */
26262
26569
  declare function upgrade(
26263
26570
  url: string | URL_2 | UrlObject,
@@ -26330,7 +26637,7 @@ declare const WebSocket: {
26330
26637
  declare interface WebSocketEventMap {
26331
26638
  close: CloseEvent
26332
26639
  error: Event_2
26333
- message: MessageEvent
26640
+ message: MessageEvent_2
26334
26641
  open: Event_2
26335
26642
  }
26336
26643
 
@@ -26375,6 +26682,17 @@ declare type WorkerEntrypointsDefinition = Record<"default" | string, {
26375
26682
 
26376
26683
  declare type WorkerRegistry = Record<string, WorkerDefinition>;
26377
26684
 
26685
+ declare type WorkflowBinding = {
26686
+ /** The name of the binding used to refer to the Workflow */
26687
+ binding: string;
26688
+ /** The name of the Workflow */
26689
+ name: string;
26690
+ /** The exported class name of the Workflow */
26691
+ class_name: string;
26692
+ /** The script where the Workflow is defined (if it's external to this Worker) */
26693
+ script_name?: string;
26694
+ };
26695
+
26378
26696
  declare type ZoneIdRoute = {
26379
26697
  pattern: string;
26380
26698
  zone_id: string;