wrangler 0.0.0-e7ea6005c → 0.0.0-e7fce2523

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';
@@ -14,15 +13,14 @@ import type { MessagePort as MessagePort_2 } from 'worker_threads';
14
13
  import type { Metafile } from 'esbuild';
15
14
  import { Miniflare } from 'miniflare';
16
15
  import type { MiniflareOptions } from 'miniflare';
16
+ import type { MixedModeConnectionString } from 'miniflare';
17
17
  import type { ModuleRule } from 'miniflare';
18
18
  import { Mutex } from 'miniflare';
19
19
  import type { NodeJSCompatMode } from 'miniflare';
20
20
  import { Readable } from 'stream';
21
- import { ReadableStream } from 'stream/web';
22
- import type { Request as Request_2 } from 'miniflare';
23
- import { Response as Response_2 } from 'miniflare';
24
- import type { Server } from 'node:http';
25
- import { ServerResponse } from 'http';
21
+ import { ReadableStream as ReadableStream_2 } from 'stream/web';
22
+ import type { Request as Request_3 } from 'miniflare';
23
+ import { Response as Response_3 } from 'miniflare';
26
24
  import { Socket } from 'net';
27
25
  import { TcpNetConnectOpts } from 'net';
28
26
  import { TLSSocket } from 'tls';
@@ -77,27 +75,168 @@ declare type ApiCredentials = {
77
75
  declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
78
76
 
79
77
  declare const AssetConfigSchema: z.ZodObject<{
78
+ account_id: z.ZodOptional<z.ZodNumber>;
79
+ script_id: z.ZodOptional<z.ZodNumber>;
80
+ debug: z.ZodOptional<z.ZodBoolean>;
81
+ compatibility_date: z.ZodOptional<z.ZodString>;
82
+ compatibility_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
83
  html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
81
84
  not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
85
+ redirects: z.ZodOptional<z.ZodObject<{
86
+ version: z.ZodLiteral<1>;
87
+ staticRules: z.ZodRecord<z.ZodString, z.ZodObject<{
88
+ status: z.ZodNumber;
89
+ to: z.ZodString;
90
+ lineNumber: z.ZodNumber;
91
+ }, "strip", z.ZodTypeAny, {
92
+ status?: number;
93
+ to?: string;
94
+ lineNumber?: number;
95
+ }, {
96
+ status?: number;
97
+ to?: string;
98
+ lineNumber?: number;
99
+ }>>;
100
+ rules: z.ZodRecord<z.ZodString, z.ZodObject<{
101
+ status: z.ZodNumber;
102
+ to: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ status?: number;
105
+ to?: string;
106
+ }, {
107
+ status?: number;
108
+ to?: string;
109
+ }>>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ version?: 1;
112
+ staticRules?: Record<string, {
113
+ status?: number;
114
+ to?: string;
115
+ lineNumber?: number;
116
+ }>;
117
+ rules?: Record<string, {
118
+ status?: number;
119
+ to?: string;
120
+ }>;
121
+ }, {
122
+ version?: 1;
123
+ staticRules?: Record<string, {
124
+ status?: number;
125
+ to?: string;
126
+ lineNumber?: number;
127
+ }>;
128
+ rules?: Record<string, {
129
+ status?: number;
130
+ to?: string;
131
+ }>;
132
+ }>>;
133
+ headers: z.ZodOptional<z.ZodObject<{
134
+ version: z.ZodLiteral<2>;
135
+ rules: z.ZodRecord<z.ZodString, z.ZodObject<{
136
+ set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
137
+ unset: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ set?: Record<string, string>;
140
+ unset?: string[];
141
+ }, {
142
+ set?: Record<string, string>;
143
+ unset?: string[];
144
+ }>>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ version?: 2;
147
+ rules?: Record<string, {
148
+ set?: Record<string, string>;
149
+ unset?: string[];
150
+ }>;
151
+ }, {
152
+ version?: 2;
153
+ rules?: Record<string, {
154
+ set?: Record<string, string>;
155
+ unset?: string[];
156
+ }>;
157
+ }>>;
158
+ has_static_routing: z.ZodOptional<z.ZodBoolean>;
82
159
  }, "strip", z.ZodTypeAny, {
160
+ account_id?: number;
161
+ script_id?: number;
162
+ debug?: boolean;
163
+ compatibility_date?: string;
164
+ compatibility_flags?: string[];
83
165
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
84
166
  not_found_handling?: "none" | "single-page-application" | "404-page";
167
+ redirects?: {
168
+ version?: 1;
169
+ staticRules?: Record<string, {
170
+ status?: number;
171
+ to?: string;
172
+ lineNumber?: number;
173
+ }>;
174
+ rules?: Record<string, {
175
+ status?: number;
176
+ to?: string;
177
+ }>;
178
+ };
179
+ headers?: {
180
+ version?: 2;
181
+ rules?: Record<string, {
182
+ set?: Record<string, string>;
183
+ unset?: string[];
184
+ }>;
185
+ };
186
+ has_static_routing?: boolean;
85
187
  }, {
188
+ account_id?: number;
189
+ script_id?: number;
190
+ debug?: boolean;
191
+ compatibility_date?: string;
192
+ compatibility_flags?: string[];
86
193
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
87
194
  not_found_handling?: "none" | "single-page-application" | "404-page";
195
+ redirects?: {
196
+ version?: 1;
197
+ staticRules?: Record<string, {
198
+ status?: number;
199
+ to?: string;
200
+ lineNumber?: number;
201
+ }>;
202
+ rules?: Record<string, {
203
+ status?: number;
204
+ to?: string;
205
+ }>;
206
+ };
207
+ headers?: {
208
+ version?: 2;
209
+ rules?: Record<string, {
210
+ set?: Record<string, string>;
211
+ unset?: string[];
212
+ }>;
213
+ };
214
+ has_static_routing?: boolean;
88
215
  }>;
89
216
 
90
217
  declare type Assets = {
91
218
  /** Absolute path to assets directory */
92
- directory: string;
219
+ directory?: string;
220
+ /** Name of `env` binding property in the User Worker. */
93
221
  binding?: string;
222
+ /** How to handle HTML requests. */
94
223
  html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
224
+ /** How to handle requests that do not match an asset. */
95
225
  not_found_handling?: "single-page-application" | "404-page" | "none";
226
+ /**
227
+ * If true, route every request to the User Worker, whether or not it matches an asset.
228
+ * If false, then respond to requests that match an asset with that asset directly.
229
+ * */
230
+ run_worker_first?: boolean;
96
231
  };
97
232
 
98
- declare type AssetsOptions = Pick<Assets, "directory" | "binding"> & {
99
- routingConfig: RoutingConfig;
233
+ declare type AssetsOptions = {
234
+ directory: string;
235
+ binding?: string;
236
+ routerConfig: RouterConfig;
100
237
  assetConfig: AssetConfig;
238
+ _redirects?: string;
239
+ _headers?: string;
101
240
  };
102
241
 
103
242
  declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
@@ -123,7 +262,7 @@ declare type BaseErrorEvent<Source = string, Data = undefined> = {
123
262
  data: Data;
124
263
  };
125
264
 
126
- declare type BinaryFile = File_2<Uint8Array>;
265
+ declare type BinaryFile = File_3<Uint8Array>;
127
266
 
128
267
  declare type BinaryType = 'blob' | 'arraybuffer'
129
268
 
@@ -137,16 +276,18 @@ declare type Binding = {
137
276
  type: "kv_namespace";
138
277
  } & BindingOmit<CfKvNamespace>) | ({
139
278
  type: "send_email";
140
- } & BindingOmit<CfSendEmailBindings>) | {
279
+ } & NameOmit<CfSendEmailBindings>) | {
141
280
  type: "wasm_module";
142
281
  source: BinaryFile;
143
282
  } | {
144
283
  type: "text_blob";
145
- source: File_2;
284
+ source: File_3;
146
285
  } | {
147
286
  type: "browser";
148
287
  } | {
149
288
  type: "ai";
289
+ } | {
290
+ type: "images";
150
291
  } | {
151
292
  type: "version_metadata";
152
293
  } | {
@@ -154,7 +295,7 @@ declare type Binding = {
154
295
  source: BinaryFile;
155
296
  } | ({
156
297
  type: "durable_object_namespace";
157
- } & BindingOmit<CfDurableObject>) | ({
298
+ } & NameOmit<CfDurableObject>) | ({
158
299
  type: "workflow";
159
300
  } & BindingOmit<CfWorkflow>) | ({
160
301
  type: "queue";
@@ -162,42 +303,36 @@ declare type Binding = {
162
303
  type: "r2_bucket";
163
304
  } & BindingOmit<CfR2Bucket>) | ({
164
305
  type: "d1";
165
- } & Omit<CfD1Database, "binding">) | ({
306
+ } & BindingOmit<CfD1Database>) | ({
166
307
  type: "vectorize";
167
- } & Omit<CfVectorize, "binding">) | ({
308
+ } & BindingOmit<CfVectorize>) | ({
168
309
  type: "hyperdrive";
169
- } & Omit<CfHyperdrive, "binding">) | ({
310
+ } & BindingOmit<CfHyperdrive>) | ({
170
311
  type: "service";
171
- } & Omit<CfService, "binding">) | {
312
+ } & BindingOmit<CfService>) | {
172
313
  type: "fetcher";
173
314
  fetcher: ServiceFetch;
174
315
  } | ({
175
316
  type: "analytics_engine";
176
- } & Omit<CfAnalyticsEngineDataset, "binding">) | ({
317
+ } & BindingOmit<CfAnalyticsEngineDataset>) | ({
177
318
  type: "dispatch_namespace";
178
- } & Omit<CfDispatchNamespace, "binding">) | ({
319
+ } & BindingOmit<CfDispatchNamespace>) | ({
179
320
  type: "mtls_certificate";
180
- } & Omit<CfMTlsCertificate, "binding">) | ({
321
+ } & BindingOmit<CfMTlsCertificate>) | ({
181
322
  type: "pipeline";
182
- } & Omit<CfPipeline, "binding">) | ({
323
+ } & BindingOmit<CfPipeline>) | ({
324
+ type: "secrets_store_secret";
325
+ } & BindingOmit<CfSecretsStoreSecrets>) | ({
183
326
  type: "logfwdr";
184
- } & Omit<CfLogfwdrBinding, "name">) | {
327
+ } & NameOmit<CfLogfwdrBinding>) | {
185
328
  type: `unsafe_${string}`;
186
329
  } | {
187
330
  type: "assets";
188
331
  };
189
332
 
190
- declare type BindingOmit<T> = Omit<T, "binding" | "name">;
333
+ declare type BindingOmit<T> = Omit<T, "binding">;
191
334
 
192
- /**
193
- * Result of the `getBindingsProxy` utility
194
- */
195
- export declare type BindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties> = Omit<PlatformProxy<Bindings, CfProperties>, "env"> & {
196
- /**
197
- * Object containing the various proxies
198
- */
199
- bindings: Bindings;
200
- };
335
+ declare type BindingsOpt = NonNullable<StartDevWorkerInput["bindings"]>;
201
336
 
202
337
  declare interface BlobPropertyBag {
203
338
  type?: string
@@ -216,7 +351,7 @@ declare type BodyInit =
216
351
  | string
217
352
 
218
353
  declare interface BodyMixin {
219
- readonly body: ReadableStream | null
354
+ readonly body: ReadableStream_2 | null
220
355
  readonly bodyUsed: boolean
221
356
 
222
357
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -341,13 +476,13 @@ declare type BundleStartEvent = {
341
476
  };
342
477
 
343
478
  declare interface Cache {
344
- match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
345
- matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
479
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response_2 | undefined>,
480
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response_2[]>,
346
481
  add (request: RequestInfo): Promise<undefined>,
347
482
  addAll (requests: RequestInfo[]): Promise<undefined>,
348
- put (request: RequestInfo, response: Response): Promise<undefined>,
483
+ put (request: RequestInfo, response: Response_2): Promise<undefined>,
349
484
  delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
350
- keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
485
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request_2[]>
351
486
  }
352
487
 
353
488
  /**
@@ -376,7 +511,7 @@ declare type CacheResponse = any;
376
511
  declare const caches: CacheStorage;
377
512
 
378
513
  declare interface CacheStorage {
379
- match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
514
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response_2 | undefined>,
380
515
  has (cacheName: string): Promise<boolean>,
381
516
  open (cacheName: string): Promise<Cache>,
382
517
  delete (cacheName: string): Promise<boolean>,
@@ -449,12 +584,14 @@ declare type CfCapnp = {
449
584
 
450
585
  declare interface CfD1Database {
451
586
  binding: string;
452
- database_id: string;
453
- database_name: string;
587
+ database_id?: string | typeof INHERIT_SYMBOL;
588
+ database_name?: string;
454
589
  preview_database_id?: string;
455
590
  database_internal_env?: string;
456
591
  migrations_table?: string;
457
592
  migrations_dir?: string;
593
+ remote?: boolean;
594
+ raw?: boolean;
458
595
  }
459
596
 
460
597
  declare interface CfDispatchNamespace {
@@ -488,7 +625,9 @@ declare interface CfHyperdrive {
488
625
  */
489
626
  declare interface CfKvNamespace {
490
627
  binding: string;
491
- id: string;
628
+ id?: string | typeof INHERIT_SYMBOL;
629
+ remote?: boolean;
630
+ raw?: boolean;
492
631
  }
493
632
 
494
633
  declare interface CfLogfwdrBinding {
@@ -526,7 +665,7 @@ declare interface CfModule {
526
665
  * }
527
666
  * }
528
667
  */
529
- content: string | Buffer;
668
+ content: string | Buffer<ArrayBuffer>;
530
669
  /**
531
670
  * An optional sourcemap for this module if it's of a ESM or CJS type, this will only be present
532
671
  * if we're deploying with sourcemaps enabled. Since we copy extra modules that aren't bundled
@@ -544,7 +683,7 @@ declare interface CfModule {
544
683
  /**
545
684
  * A module type.
546
685
  */
547
- declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement" | "nodejs-compat-module";
686
+ declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement";
548
687
 
549
688
  declare interface CfMTlsCertificate {
550
689
  binding: string;
@@ -560,12 +699,16 @@ declare interface CfQueue {
560
699
  binding: string;
561
700
  queue_name: string;
562
701
  delivery_delay?: number;
702
+ remote?: boolean;
703
+ raw?: boolean;
563
704
  }
564
705
 
565
706
  declare interface CfR2Bucket {
566
707
  binding: string;
567
- bucket_name: string;
708
+ bucket_name?: string | typeof INHERIT_SYMBOL;
568
709
  jurisdiction?: string;
710
+ remote?: boolean;
711
+ raw?: boolean;
569
712
  }
570
713
 
571
714
  /**
@@ -573,20 +716,35 @@ declare interface CfR2Bucket {
573
716
  */
574
717
  declare type CfScriptFormat = "modules" | "service-worker";
575
718
 
719
+ declare interface CfSecretsStoreSecrets {
720
+ binding: string;
721
+ store_id: string;
722
+ secret_name: string;
723
+ }
724
+
576
725
  /**
577
726
  * A binding to send email.
578
727
  */
579
- declare interface CfSendEmailBindings {
728
+ declare type CfSendEmailBindings = {
580
729
  name: string;
730
+ } & ({
581
731
  destination_address?: string;
732
+ } | {
582
733
  allowed_destination_addresses?: string[];
583
- }
734
+ });
584
735
 
585
736
  declare interface CfService {
586
737
  binding: string;
587
738
  service: string;
588
739
  environment?: string;
589
740
  entrypoint?: string;
741
+ props?: Record<string, unknown>;
742
+ remote?: boolean;
743
+ }
744
+
745
+ declare interface CfTailConsumer {
746
+ service: string;
747
+ environment?: string;
590
748
  }
591
749
 
592
750
  declare interface CfUnsafe {
@@ -605,6 +763,7 @@ declare type CfUnsafeMetadata = Record<string, unknown>;
605
763
  declare interface CfVectorize {
606
764
  binding: string;
607
765
  index_name: string;
766
+ raw?: boolean;
608
767
  }
609
768
 
610
769
  declare interface CfWorkerSourceMap {
@@ -638,6 +797,8 @@ declare interface CfWorkflow {
638
797
  class_name: string;
639
798
  binding: string;
640
799
  script_name?: string;
800
+ remote?: boolean;
801
+ raw?: boolean;
641
802
  }
642
803
 
643
804
  /**
@@ -759,28 +920,19 @@ declare type CloudchamberConfig = {
759
920
  ipv4?: boolean;
760
921
  };
761
922
 
762
- /**
763
- * This is the static type definition for the configuration object.
764
- *
765
- * It reflects a normalized and validated version of the configuration that you can write in wrangler.toml,
766
- * and optionally augment with arguments passed directly to wrangler.
767
- *
768
- * For more information about the configuration object, see the
769
- * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
770
- *
771
- * Notes:
772
- *
773
- * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
774
- * in the top level config and should not appear in any environments.
775
- * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
776
- * - All top level fields in config and environments are optional in the wrangler.toml file.
777
- *
778
- * Legend for the annotations:
779
- *
780
- * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
781
- * - `@todo`: there's more work to be done (with details attached).
782
- */
783
- declare type Config = ConfigFields<DevConfig> & PagesConfigFields & Environment;
923
+ declare interface ComputedFields {
924
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
925
+ configPath: string | undefined;
926
+ /** 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. */
927
+ userConfigPath: string | undefined;
928
+ /**
929
+ * The original top level name for the Worker in the raw configuration.
930
+ *
931
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
932
+ * It can be useful to know what the top-level name was before the flattening.
933
+ */
934
+ topLevelName: string | undefined;
935
+ }
784
936
 
785
937
  declare class ConfigController extends Controller<ConfigControllerEventMap> {
786
938
  #private;
@@ -797,7 +949,6 @@ declare type ConfigControllerEventMap = ControllerEventMap & {
797
949
  };
798
950
 
799
951
  declare interface ConfigFields<Dev extends RawDevConfig> {
800
- configPath: string | undefined;
801
952
  /**
802
953
  * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
803
954
  * These have been superseded by Services, but there may be projects that won't
@@ -814,6 +965,8 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
814
965
  send_metrics: boolean | undefined;
815
966
  /**
816
967
  * Options to configure the development server that your worker will use.
968
+ *
969
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#local-development-settings
817
970
  */
818
971
  dev: Dev;
819
972
  /**
@@ -821,12 +974,14 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
821
974
  * static assets with your Worker.
822
975
  *
823
976
  * More details at https://developers.cloudflare.com/workers/platform/sites
977
+ *
978
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-sites
824
979
  */
825
980
  site: {
826
981
  /**
827
982
  * The directory containing your static assets.
828
983
  *
829
- * It must be a path relative to your wrangler.toml file.
984
+ * It must be a path relative to your Wrangler configuration file.
830
985
  * Example: bucket = "./public"
831
986
  *
832
987
  * If there is a `site` field then it must contain this `bucket` field.
@@ -858,20 +1013,6 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
858
1013
  */
859
1014
  exclude?: string[];
860
1015
  } | undefined;
861
- /**
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`.
867
- */
868
- legacy_assets: {
869
- bucket: string;
870
- include: string[];
871
- exclude: string[];
872
- browser_TTL: number | undefined;
873
- serve_single_page_app: boolean;
874
- } | string | undefined;
875
1016
  /**
876
1017
  * A list of wasm modules that your worker should be bound to. This is
877
1018
  * the "legacy" way of binding to a wasm module. ES module workers should
@@ -899,12 +1040,14 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
899
1040
  /**
900
1041
  * A map of module aliases. Lets you swap out a module for any others.
901
1042
  * Corresponds with esbuild's `alias` config
1043
+ *
1044
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing
902
1045
  */
903
1046
  alias: {
904
1047
  [key: string]: string;
905
1048
  } | undefined;
906
1049
  /**
907
- * By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
1050
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
908
1051
  *
909
1052
  * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
910
1053
  *
@@ -919,7 +1062,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
919
1062
  /**
920
1063
  * The possible types for a `Rule`.
921
1064
  */
922
- declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement" | "NodeJsCompatModule";
1065
+ declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
923
1066
 
924
1067
  declare type ConfigUpdateEvent = {
925
1068
  type: "configUpdate";
@@ -932,6 +1075,64 @@ url: string | URL_2 | UrlObject,
932
1075
  options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
933
1076
  ): Promise<Dispatcher.ConnectData>;
934
1077
 
1078
+ /**
1079
+ * Configuration for a container application
1080
+ */
1081
+ declare type ContainerApp = {
1082
+ /** Name of the application*/
1083
+ name: string;
1084
+ /** Number of application instances */
1085
+ instances?: number;
1086
+ /** Number of maximum application instances. Only applicable to Durable Object container applications */
1087
+ max_instances?: number;
1088
+ /**
1089
+ * The path to a Dockerfile, or an image URI.
1090
+ * Can be defined both here or by setting the `image` key in the `ContainerApp` configuration
1091
+ */
1092
+ image?: string;
1093
+ /**
1094
+ * Build context of the application. By default it is the directory of `image`.
1095
+ */
1096
+ image_build_context?: string;
1097
+ /**
1098
+ * Image variables to be passed along the image
1099
+ */
1100
+ image_vars?: Record<string, string>;
1101
+ class_name: string;
1102
+ /** The scheduling policy of the application, default is regional */
1103
+ scheduling_policy?: "regional" | "moon";
1104
+ configuration: {
1105
+ image: string;
1106
+ labels?: {
1107
+ name: string;
1108
+ value: string;
1109
+ }[];
1110
+ secrets?: {
1111
+ name: string;
1112
+ type: "env";
1113
+ secret: string;
1114
+ }[];
1115
+ };
1116
+ /** Scheduling constraints */
1117
+ constraints?: {
1118
+ regions?: string[];
1119
+ cities?: string[];
1120
+ tier?: number;
1121
+ };
1122
+ durable_objects?: {
1123
+ namespace_id: string;
1124
+ };
1125
+ /** How a rollout should be done, defining the size of it */
1126
+ rollout_step_percentage?: number;
1127
+ /**
1128
+ * How a rollout should be created. It supports the following modes:
1129
+ * - full_auto: The container application will be rolled out fully automatically.
1130
+ * - none: The container application won't have a roll out or update.
1131
+ * - manual: The container application will be rollout fully by manually actioning progress steps.
1132
+ */
1133
+ rollout_kind?: "full_auto" | "none" | "full_manual";
1134
+ };
1135
+
935
1136
  declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
936
1137
  emitErrorEvent(data: ErrorEvent): void;
937
1138
  }
@@ -971,7 +1172,7 @@ declare type DeferredPromise<T> = {
971
1172
  };
972
1173
 
973
1174
  declare function deleteCookie (
974
- headers: Headers,
1175
+ headers: Headers_2,
975
1176
  name: string,
976
1177
  attributes?: { name?: string, domain?: string }
977
1178
  ): void
@@ -982,99 +1183,71 @@ attributes?: { name?: string, domain?: string }
982
1183
  * variable set
983
1184
  */
984
1185
  declare function deploy({ directory, accountId, projectName, branch, skipCaching, commitMessage, commitHash, commitDirty, functionsDirectory: customFunctionsDirectory, bundle, sourceMaps, args, }: PagesDeployOptions): Promise<{
985
- url: string;
986
- id: string;
987
- environment: "production" | "preview";
988
- build_config: {
989
- build_command: string;
990
- destination_dir: string;
991
- root_dir: string;
992
- web_analytics_tag?: string | undefined;
993
- web_analytics_token?: string | undefined;
994
- fast_builds?: boolean | undefined;
995
- };
996
- created_on: string;
997
- production_branch: string;
998
- project_id: string;
999
- project_name: string;
1000
- deployment_trigger: {
1001
- metadata: {
1002
- branch: string;
1003
- commit_hash: string;
1004
- commit_message: string;
1005
- };
1006
- type: string;
1007
- };
1008
- latest_stage: {
1009
- name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1010
- status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1011
- started_on: string | null;
1012
- ended_on: string | null;
1013
- };
1014
- stages: {
1015
- name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1016
- status: "active" | "idle" | "success" | "canceled" | "failure" | "skipped";
1017
- started_on: string | null;
1018
- ended_on: string | null;
1019
- }[];
1020
- aliases: string[];
1021
- modified_on: string;
1022
- short_id: string;
1023
- build_image_major_version: number;
1024
- source?: {
1025
- type: "github" | "gitlab";
1026
- config: {
1027
- owner: string;
1028
- repo_name: string;
1029
- production_branch?: string | undefined;
1030
- pr_comments_enabled?: boolean | undefined;
1031
- deployments_enabled?: boolean | undefined;
1032
- production_deployments_enabled?: boolean | undefined;
1033
- preview_deployment_setting?: "none" | "all" | "custom" | undefined;
1034
- preview_branch_includes?: string[] | undefined;
1035
- preview_branch_excludes?: string[] | undefined;
1186
+ deploymentResponse: {
1187
+ url: string;
1188
+ id: string;
1189
+ environment: "production" | "preview";
1190
+ build_config: {
1191
+ build_command: string;
1192
+ destination_dir: string;
1193
+ root_dir: string;
1194
+ web_analytics_tag?: string | undefined;
1195
+ web_analytics_token?: string | undefined;
1196
+ fast_builds?: boolean | undefined;
1197
+ };
1198
+ created_on: string;
1199
+ production_branch: string;
1200
+ project_id: string;
1201
+ project_name: string;
1202
+ deployment_trigger: {
1203
+ metadata: {
1204
+ branch: string;
1205
+ commit_hash: string;
1206
+ commit_message: string;
1207
+ };
1208
+ type: string;
1036
1209
  };
1037
- } | undefined;
1038
- kv_namespaces?: any;
1039
- env_vars?: any;
1040
- durable_object_namespaces?: any;
1041
- is_skipped?: boolean | undefined;
1042
- files?: {
1043
- [x: string]: string | undefined;
1044
- } | undefined;
1210
+ latest_stage: {
1211
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1212
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1213
+ started_on: string | null;
1214
+ ended_on: string | null;
1215
+ };
1216
+ stages: {
1217
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1218
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1219
+ started_on: string | null;
1220
+ ended_on: string | null;
1221
+ }[];
1222
+ aliases: string[];
1223
+ modified_on: string;
1224
+ short_id: string;
1225
+ build_image_major_version: number;
1226
+ kv_namespaces?: any;
1227
+ source?: {
1228
+ type: "github" | "gitlab";
1229
+ config: {
1230
+ owner: string;
1231
+ repo_name: string;
1232
+ production_branch?: string | undefined;
1233
+ pr_comments_enabled?: boolean | undefined;
1234
+ deployments_enabled?: boolean | undefined;
1235
+ production_deployments_enabled?: boolean | undefined;
1236
+ preview_deployment_setting?: "none" | "custom" | "all" | undefined;
1237
+ preview_branch_includes?: string[] | undefined;
1238
+ preview_branch_excludes?: string[] | undefined;
1239
+ };
1240
+ } | undefined;
1241
+ env_vars?: any;
1242
+ durable_object_namespaces?: any;
1243
+ is_skipped?: boolean | undefined;
1244
+ files?: {
1245
+ [x: string]: string | undefined;
1246
+ } | undefined;
1247
+ };
1248
+ formData: FormData_2;
1045
1249
  }>;
1046
1250
 
1047
- /**
1048
- * Deprecated upload configuration.
1049
- */
1050
- declare interface DeprecatedUpload {
1051
- /**
1052
- * The format of the Worker script.
1053
- *
1054
- * @deprecated We infer the format automatically now.
1055
- */
1056
- format?: "modules" | "service-worker";
1057
- /**
1058
- * The directory you wish to upload your Worker from,
1059
- * relative to the wrangler.toml file.
1060
- *
1061
- * Defaults to the directory containing the wrangler.toml file.
1062
- *
1063
- * @deprecated
1064
- */
1065
- dir?: string;
1066
- /**
1067
- * The path to the Worker script, relative to `upload.dir`.
1068
- *
1069
- * @deprecated This will be replaced by a command line argument.
1070
- */
1071
- main?: string;
1072
- /**
1073
- * @deprecated This is now defined at the top level `rules` field.
1074
- */
1075
- rules?: Environment["rules"];
1076
- }
1077
-
1078
1251
  declare interface DevConfig {
1079
1252
  /**
1080
1253
  * IP address for the local dev server to listen on,
@@ -1421,7 +1594,7 @@ declare interface DispatchNamespaceOutbound {
1421
1594
  parameters?: string[];
1422
1595
  }
1423
1596
 
1424
- declare type DOMException = typeof globalThis extends { DOMException: infer T }
1597
+ declare type DOMException_2 = typeof globalThis extends { DOMException: infer T }
1425
1598
  ? T
1426
1599
  : any
1427
1600
 
@@ -1468,8 +1641,10 @@ declare interface EnablePagesAssetsServiceBindingOptions {
1468
1641
  declare type Entry = {
1469
1642
  /** A worker's entrypoint */
1470
1643
  file: string;
1471
- /** A worker's directory. Usually where the wrangler.toml file is located */
1472
- directory: string;
1644
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
1645
+ projectRoot: string;
1646
+ /** The path to the config file, if it exists. */
1647
+ configPath: string | undefined;
1473
1648
  /** Is this a module worker or a service worker? */
1474
1649
  format: CfScriptFormat;
1475
1650
  /** The directory that contains all of a `--no-bundle` worker's modules. Usually `${directory}/src`. Defaults to path.dirname(file) */
@@ -1478,6 +1653,8 @@ declare type Entry = {
1478
1653
  * A worker's name
1479
1654
  */
1480
1655
  name?: string | undefined;
1656
+ /** Export from a Worker's entrypoint */
1657
+ exports: string[];
1481
1658
  };
1482
1659
 
1483
1660
  /**
@@ -1514,18 +1691,18 @@ declare interface EnvironmentInheritable {
1514
1691
  * A date in the form yyyy-mm-dd, which will be used to determine
1515
1692
  * which version of the Workers runtime is used.
1516
1693
  *
1517
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1694
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
1518
1695
  *
1519
1696
  * @inheritable
1520
1697
  */
1521
1698
  compatibility_date: string | undefined;
1522
1699
  /**
1523
1700
  * A list of flags that enable features from upcoming features of
1524
- * the Workers runtime, usually used together with compatibility_flags.
1701
+ * the Workers runtime, usually used together with compatibility_date.
1525
1702
  *
1526
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1703
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
1527
1704
  *
1528
- * @default `[]`
1705
+ * @default []
1529
1706
  * @inheritable
1530
1707
  */
1531
1708
  compatibility_flags: string[];
@@ -1563,19 +1740,29 @@ declare interface EnvironmentInheritable {
1563
1740
  * Whether we use <name>.<subdomain>.workers.dev to
1564
1741
  * test and deploy your Worker.
1565
1742
  *
1566
- * // Carmen according to our tests the default is undefined
1567
- * // warning: you must force "workers_dev: true" in tests to match expected behavior
1568
- * @default `true` (This is a breaking change from Wrangler v1)
1743
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
1744
+ *
1745
+ * @default true
1569
1746
  * @breaking
1570
1747
  * @inheritable
1571
1748
  */
1572
1749
  workers_dev: boolean | undefined;
1750
+ /**
1751
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
1752
+ * serve Preview URLs for your Worker.
1753
+ *
1754
+ * @default true
1755
+ * @inheritable
1756
+ */
1757
+ preview_urls: boolean | undefined;
1573
1758
  /**
1574
1759
  * A list of routes that your Worker should be published to.
1575
1760
  * Only one of `routes` or `route` is required.
1576
1761
  *
1577
1762
  * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
1578
1763
  *
1764
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
1765
+ *
1579
1766
  * @inheritable
1580
1767
  */
1581
1768
  routes: Route[] | undefined;
@@ -1598,14 +1785,14 @@ declare interface EnvironmentInheritable {
1598
1785
  /**
1599
1786
  * The function to use to replace jsx syntax.
1600
1787
  *
1601
- * @default `"React.createElement"`
1788
+ * @default "React.createElement"
1602
1789
  * @inheritable
1603
1790
  */
1604
1791
  jsx_factory: string;
1605
1792
  /**
1606
1793
  * The function to use to replace jsx fragment syntax.
1607
1794
  *
1608
- * @default `"React.Fragment"`
1795
+ * @default "React.Fragment"
1609
1796
  * @inheritable
1610
1797
  */
1611
1798
  jsx_fragment: string;
@@ -1627,28 +1814,20 @@ declare interface EnvironmentInheritable {
1627
1814
  *
1628
1815
  * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1629
1816
  *
1630
- * @default `{crons:[]}`
1817
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
1818
+ *
1819
+ * @default {crons: undefined}
1631
1820
  * @inheritable
1632
1821
  */
1633
1822
  triggers: {
1634
- crons: string[];
1823
+ crons: string[] | undefined;
1635
1824
  };
1636
- /**
1637
- * Specifies the Usage Model for your Worker. There are two options -
1638
- * [bundled](https://developers.cloudflare.com/workers/platform/limits#bundled-usage-model) and
1639
- * [unbound](https://developers.cloudflare.com/workers/platform/limits#unbound-usage-model).
1640
- * For newly created Workers, if the Usage Model is omitted
1641
- * it will be set to the [default Usage Model set on the account](https://dash.cloudflare.com/?account=workers/default-usage-model).
1642
- * For existing Workers, if the Usage Model is omitted, it will be
1643
- * set to the Usage Model configured in the dashboard for that Worker.
1644
- *
1645
- * @inheritable
1646
- */
1647
- usage_model: "bundled" | "unbound" | undefined;
1648
1825
  /**
1649
1826
  * Specify limits for runtime behavior.
1650
1827
  * Only supported for the "standard" Usage Model
1651
1828
  *
1829
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
1830
+ *
1652
1831
  * @inheritable
1653
1832
  */
1654
1833
  limits: UserLimits | undefined;
@@ -1658,6 +1837,8 @@ declare interface EnvironmentInheritable {
1658
1837
  * to use Text, Data, and CompiledWasm modules, or when you wish to
1659
1838
  * have a .js file be treated as an ESModule instead of CommonJS.
1660
1839
  *
1840
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
1841
+ *
1661
1842
  * @inheritable
1662
1843
  */
1663
1844
  rules: Rule[];
@@ -1667,6 +1848,8 @@ declare interface EnvironmentInheritable {
1667
1848
  * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
1668
1849
  * for more details.
1669
1850
  *
1851
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
1852
+ *
1670
1853
  * @default {watch_dir:"./src"}
1671
1854
  */
1672
1855
  build: {
@@ -1676,11 +1859,6 @@ declare interface EnvironmentInheritable {
1676
1859
  cwd?: string;
1677
1860
  /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
1678
1861
  watch_dir?: string | string[];
1679
- /**
1680
- * Deprecated field previously used to configure the build and upload of the script.
1681
- * @deprecated
1682
- */
1683
- upload?: DeprecatedUpload;
1684
1862
  };
1685
1863
  /**
1686
1864
  * Skip internal build steps and directly deploy script
@@ -1693,27 +1871,22 @@ declare interface EnvironmentInheritable {
1693
1871
  */
1694
1872
  minify: boolean | undefined;
1695
1873
  /**
1696
- * Add polyfills for node builtin modules and globals
1874
+ * Keep function names after javascript transpilations.
1875
+ *
1876
+ * @default {true}
1697
1877
  * @inheritable
1698
1878
  */
1699
- node_compat: boolean | undefined;
1879
+ keep_names: boolean | undefined;
1700
1880
  /**
1701
1881
  * Designates this Worker as an internal-only "first-party" Worker.
1702
1882
  *
1703
1883
  * @inheritable
1704
1884
  */
1705
1885
  first_party_worker: boolean | undefined;
1706
- /**
1707
- * TODO: remove this as it has been deprecated.
1708
- *
1709
- * This is just here for now because the `route` commands use it.
1710
- * So we need to include it in this type so it is available.
1711
- */
1712
- zone_id?: string;
1713
1886
  /**
1714
1887
  * List of bindings that you will send to logfwdr
1715
1888
  *
1716
- * @default `{bindings:[]}`
1889
+ * @default {bindings:[]}
1717
1890
  * @inheritable
1718
1891
  */
1719
1892
  logfwdr: {
@@ -1737,6 +1910,9 @@ declare interface EnvironmentInheritable {
1737
1910
  logpush: boolean | undefined;
1738
1911
  /**
1739
1912
  * Include source maps when uploading this worker.
1913
+ *
1914
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
1915
+ *
1740
1916
  * @inheritable
1741
1917
  */
1742
1918
  upload_source_maps: boolean | undefined;
@@ -1756,17 +1932,39 @@ declare interface EnvironmentInheritable {
1756
1932
  *
1757
1933
  * More details at https://developers.cloudflare.com/workers/frameworks/
1758
1934
  *
1935
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
1936
+ *
1759
1937
  * @inheritable
1760
1938
  */
1761
1939
  assets: Assets | undefined;
1762
1940
  /**
1763
1941
  * Specify the observability behavior of the Worker.
1764
1942
  *
1943
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
1944
+ *
1765
1945
  * @inheritable
1766
1946
  */
1767
1947
  observability: Observability | undefined;
1768
1948
  }
1769
1949
 
1950
+ declare interface EnvironmentMap {
1951
+ /**
1952
+ * The `env` section defines overrides for the configuration for different environments.
1953
+ *
1954
+ * All environment fields can be specified at the top level of the config indicating the default environment settings.
1955
+ *
1956
+ * - Some fields are inherited and overridable in each environment.
1957
+ * - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
1958
+ *
1959
+ * For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
1960
+ *
1961
+ * @default {}
1962
+ */
1963
+ env?: {
1964
+ [envName: string]: Unstable_RawEnvironment;
1965
+ };
1966
+ }
1967
+
1770
1968
  /**
1771
1969
  * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
1772
1970
  * that cannot be inherited from the top-level environment, and must be defined specifically.
@@ -1781,7 +1979,7 @@ declare interface EnvironmentNonInheritable {
1781
1979
  * NOTE: This field is not automatically inherited from the top level environment,
1782
1980
  * and so must be specified in every named environment.
1783
1981
  *
1784
- * @default `{}`
1982
+ * @default {}
1785
1983
  * @nonInheritable
1786
1984
  */
1787
1985
  define: Record<string, string>;
@@ -1791,7 +1989,9 @@ declare interface EnvironmentNonInheritable {
1791
1989
  * NOTE: This field is not automatically inherited from the top level environment,
1792
1990
  * and so must be specified in every named environment.
1793
1991
  *
1794
- * @default `{}`
1992
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
1993
+ *
1994
+ * @default {}
1795
1995
  * @nonInheritable
1796
1996
  */
1797
1997
  vars: Record<string, string | Json>;
@@ -1804,7 +2004,9 @@ declare interface EnvironmentNonInheritable {
1804
2004
  * NOTE: This field is not automatically inherited from the top level environment,
1805
2005
  * and so must be specified in every named environment.
1806
2006
  *
1807
- * @default `{bindings:[]}`
2007
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
2008
+ *
2009
+ * @default {bindings:[]}
1808
2010
  * @nonInheritable
1809
2011
  */
1810
2012
  durable_objects: {
@@ -1816,7 +2018,7 @@ declare interface EnvironmentNonInheritable {
1816
2018
  * NOTE: This field is not automatically inherited from the top level environment,
1817
2019
  * and so must be specified in every named environment.
1818
2020
  *
1819
- * @default `[]`
2021
+ * @default []
1820
2022
  * @nonInheritable
1821
2023
  */
1822
2024
  workflows: WorkflowBinding[];
@@ -1826,10 +2028,17 @@ declare interface EnvironmentNonInheritable {
1826
2028
  * NOTE: This field is not automatically inherited from the top level environment,
1827
2029
  * and so must be specified in every named environment.
1828
2030
  *
1829
- * @default `{}`
2031
+ * @default {}
1830
2032
  * @nonInheritable
1831
2033
  */
1832
2034
  cloudchamber: CloudchamberConfig;
2035
+ /**
2036
+ * Container related configuration
2037
+ *
2038
+ * @default []
2039
+ * @nonInheritable
2040
+ */
2041
+ containers?: ContainerApp[];
1833
2042
  /**
1834
2043
  * These specify any Workers KV Namespaces you want to
1835
2044
  * access from inside your Worker.
@@ -1840,16 +2049,20 @@ declare interface EnvironmentNonInheritable {
1840
2049
  * NOTE: This field is not automatically inherited from the top level environment,
1841
2050
  * and so must be specified in every named environment.
1842
2051
  *
1843
- * @default `[]`
2052
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
2053
+ *
2054
+ * @default []
1844
2055
  * @nonInheritable
1845
2056
  */
1846
2057
  kv_namespaces: {
1847
2058
  /** The binding name used to refer to the KV Namespace */
1848
2059
  binding: string;
1849
2060
  /** The ID of the KV namespace */
1850
- id: string;
2061
+ id?: string;
1851
2062
  /** The ID of the KV namespace used during `wrangler dev` */
1852
2063
  preview_id?: string;
2064
+ /** Whether the KV namespace should be remote or not (only available under `--x-mixed-mode`) */
2065
+ remote?: boolean;
1853
2066
  }[];
1854
2067
  /**
1855
2068
  * These specify bindings to send email from inside your Worker.
@@ -1857,7 +2070,9 @@ declare interface EnvironmentNonInheritable {
1857
2070
  * NOTE: This field is not automatically inherited from the top level environment,
1858
2071
  * and so must be specified in every named environment.
1859
2072
  *
1860
- * @default `[]`
2073
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
2074
+ *
2075
+ * @default []
1861
2076
  * @nonInheritable
1862
2077
  */
1863
2078
  send_email: {
@@ -1874,7 +2089,9 @@ declare interface EnvironmentNonInheritable {
1874
2089
  * NOTE: This field is not automatically inherited from the top level environment,
1875
2090
  * and so must be specified in every named environment.
1876
2091
  *
1877
- * @default `{consumers:[],producers:[]}`
2092
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
2093
+ *
2094
+ * @default {consumers:[],producers:[]}
1878
2095
  * @nonInheritable
1879
2096
  */
1880
2097
  queues: {
@@ -1886,6 +2103,8 @@ declare interface EnvironmentNonInheritable {
1886
2103
  queue: string;
1887
2104
  /** The number of seconds to wait before delivering a message */
1888
2105
  delivery_delay?: number;
2106
+ /** Whether the Queue producer should be remote or not (only available under `--x-mixed-mode`) */
2107
+ remote?: boolean;
1889
2108
  }[];
1890
2109
  /** Consumer configuration */
1891
2110
  consumers?: {
@@ -1915,18 +2134,22 @@ declare interface EnvironmentNonInheritable {
1915
2134
  * NOTE: This field is not automatically inherited from the top level environment,
1916
2135
  * and so must be specified in every named environment.
1917
2136
  *
1918
- * @default `[]`
2137
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
2138
+ *
2139
+ * @default []
1919
2140
  * @nonInheritable
1920
2141
  */
1921
2142
  r2_buckets: {
1922
2143
  /** The binding name used to refer to the R2 bucket in the Worker. */
1923
2144
  binding: string;
1924
2145
  /** The name of this R2 bucket at the edge. */
1925
- bucket_name: string;
2146
+ bucket_name?: string;
1926
2147
  /** The preview name of this R2 bucket at the edge. */
1927
2148
  preview_bucket_name?: string;
1928
2149
  /** The jurisdiction that the bucket exists in. Default if not present. */
1929
2150
  jurisdiction?: string;
2151
+ /** Whether the R2 bucket should be remote or not (only available under `--x-mixed-mode`) */
2152
+ remote?: boolean;
1930
2153
  }[];
1931
2154
  /**
1932
2155
  * Specifies D1 databases that are bound to this Worker environment.
@@ -1934,16 +2157,18 @@ declare interface EnvironmentNonInheritable {
1934
2157
  * NOTE: This field is not automatically inherited from the top level environment,
1935
2158
  * and so must be specified in every named environment.
1936
2159
  *
1937
- * @default `[]`
2160
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
2161
+ *
2162
+ * @default []
1938
2163
  * @nonInheritable
1939
2164
  */
1940
2165
  d1_databases: {
1941
2166
  /** The binding name used to refer to the D1 database in the Worker. */
1942
2167
  binding: string;
1943
2168
  /** The name of this D1 database. */
1944
- database_name: string;
2169
+ database_name?: string;
1945
2170
  /** The UUID of this D1 database (not required). */
1946
- database_id: string;
2171
+ database_id?: string;
1947
2172
  /** The UUID of this D1 database for Wrangler Dev (if specified). */
1948
2173
  preview_database_id?: string;
1949
2174
  /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
@@ -1952,6 +2177,8 @@ declare interface EnvironmentNonInheritable {
1952
2177
  migrations_dir?: string;
1953
2178
  /** Internal use only. */
1954
2179
  database_internal_env?: string;
2180
+ /** Whether the D1 database should be remote or not (only available under `--x-mixed-mode`) */
2181
+ remote?: boolean;
1955
2182
  }[];
1956
2183
  /**
1957
2184
  * Specifies Vectorize indexes that are bound to this Worker environment.
@@ -1959,7 +2186,9 @@ declare interface EnvironmentNonInheritable {
1959
2186
  * NOTE: This field is not automatically inherited from the top level environment,
1960
2187
  * and so must be specified in every named environment.
1961
2188
  *
1962
- * @default `[]`
2189
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
2190
+ *
2191
+ * @default []
1963
2192
  * @nonInheritable
1964
2193
  */
1965
2194
  vectorize: {
@@ -1974,7 +2203,9 @@ declare interface EnvironmentNonInheritable {
1974
2203
  * NOTE: This field is not automatically inherited from the top level environment,
1975
2204
  * and so must be specified in every named environment.
1976
2205
  *
1977
- * @default `[]`
2206
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
2207
+ *
2208
+ * @default []
1978
2209
  * @nonInheritable
1979
2210
  */
1980
2211
  hyperdrive: {
@@ -1991,7 +2222,9 @@ declare interface EnvironmentNonInheritable {
1991
2222
  * NOTE: This field is not automatically inherited from the top level environment,
1992
2223
  * and so must be specified in every named environment.
1993
2224
  *
1994
- * @default `[]`
2225
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
2226
+ *
2227
+ * @default []
1995
2228
  * @nonInheritable
1996
2229
  */
1997
2230
  services: {
@@ -2003,6 +2236,10 @@ declare interface EnvironmentNonInheritable {
2003
2236
  environment?: string;
2004
2237
  /** Optionally, the entrypoint (named export) of the service to bind to. */
2005
2238
  entrypoint?: string;
2239
+ /** Optional properties that will be made available to the service via ctx.props. */
2240
+ props?: Record<string, unknown>;
2241
+ /** Whether the service binding should be remote or not (only available under `--x-mixed-mode`) */
2242
+ remote?: boolean;
2006
2243
  }[] | undefined;
2007
2244
  /**
2008
2245
  * Specifies analytics engine datasets that are bound to this Worker environment.
@@ -2010,7 +2247,9 @@ declare interface EnvironmentNonInheritable {
2010
2247
  * NOTE: This field is not automatically inherited from the top level environment,
2011
2248
  * and so must be specified in every named environment.
2012
2249
  *
2013
- * @default `[]`
2250
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
2251
+ *
2252
+ * @default []
2014
2253
  * @nonInheritable
2015
2254
  */
2016
2255
  analytics_engine_datasets: {
@@ -2025,7 +2264,9 @@ declare interface EnvironmentNonInheritable {
2025
2264
  * NOTE: This field is not automatically inherited from the top level environment,
2026
2265
  * and so must be specified in every named environment.
2027
2266
  *
2028
- * @default `{}`
2267
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
2268
+ *
2269
+ * @default {}
2029
2270
  * @nonInheritable
2030
2271
  */
2031
2272
  browser: {
@@ -2037,13 +2278,29 @@ declare interface EnvironmentNonInheritable {
2037
2278
  * NOTE: This field is not automatically inherited from the top level environment,
2038
2279
  * and so must be specified in every named environment.
2039
2280
  *
2040
- * @default `{}`
2281
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
2282
+ *
2283
+ * @default {}
2041
2284
  * @nonInheritable
2042
2285
  */
2043
2286
  ai: {
2044
2287
  binding: string;
2045
2288
  staging?: boolean;
2046
2289
  } | undefined;
2290
+ /**
2291
+ * Binding to Cloudflare Images
2292
+ *
2293
+ * NOTE: This field is not automatically inherited from the top level environment,
2294
+ * and so must be specified in every named environment.
2295
+ *
2296
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
2297
+ *
2298
+ * @default {}
2299
+ * @nonInheritable
2300
+ */
2301
+ images: {
2302
+ binding: string;
2303
+ } | undefined;
2047
2304
  /**
2048
2305
  * Binding to the Worker Version's metadata
2049
2306
  */
@@ -2056,7 +2313,7 @@ declare interface EnvironmentNonInheritable {
2056
2313
  * NOTE: This field is not automatically inherited from the top level environment,
2057
2314
  * and so must be specified in every named environment.
2058
2315
  *
2059
- * @default `{}`
2316
+ * @default {}
2060
2317
  * @nonInheritable
2061
2318
  */
2062
2319
  unsafe: {
@@ -2096,7 +2353,9 @@ declare interface EnvironmentNonInheritable {
2096
2353
  * NOTE: This field is not automatically inherited from the top level environment,
2097
2354
  * and so must be specified in every named environment.
2098
2355
  *
2099
- * @default `[]`
2356
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
2357
+ *
2358
+ * @default []
2100
2359
  * @nonInheritable
2101
2360
  */
2102
2361
  mtls_certificates: {
@@ -2111,7 +2370,7 @@ declare interface EnvironmentNonInheritable {
2111
2370
  * NOTE: This field is not automatically inherited from the top level environment,
2112
2371
  * and so must be specified in every named environment.
2113
2372
  *
2114
- * @default `[]`
2373
+ * @default []
2115
2374
  * @nonInheritable
2116
2375
  */
2117
2376
  tail_consumers?: TailConsumer[];
@@ -2121,7 +2380,9 @@ declare interface EnvironmentNonInheritable {
2121
2380
  * NOTE: This field is not automatically inherited from the top level environment,
2122
2381
  * and so must be specified in every named environment.
2123
2382
  *
2124
- * @default `[]`
2383
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
2384
+ *
2385
+ * @default []
2125
2386
  * @nonInheritable
2126
2387
  */
2127
2388
  dispatch_namespaces: {
@@ -2138,7 +2399,7 @@ declare interface EnvironmentNonInheritable {
2138
2399
  * NOTE: This field is not automatically inherited from the top level environment,
2139
2400
  * and so must be specified in every named environment.
2140
2401
  *
2141
- * @default `[]`
2402
+ * @default []
2142
2403
  * @nonInheritable
2143
2404
  */
2144
2405
  pipelines: {
@@ -2147,9 +2408,26 @@ declare interface EnvironmentNonInheritable {
2147
2408
  /** Name of the Pipeline to bind */
2148
2409
  pipeline: string;
2149
2410
  }[];
2411
+ /**
2412
+ * Specifies Secret Store bindings that are bound to this Worker environment.
2413
+ *
2414
+ * NOTE: This field is not automatically inherited from the top level environment,
2415
+ * and so must be specified in every named environment.
2416
+ *
2417
+ * @default []
2418
+ * @nonInheritable
2419
+ */
2420
+ secrets_store_secrets: {
2421
+ /** The binding name used to refer to the bound service. */
2422
+ binding: string;
2423
+ /** Id of the secret store */
2424
+ store_id: string;
2425
+ /** Name of the secret */
2426
+ secret_name: string;
2427
+ }[];
2150
2428
  }
2151
2429
 
2152
- declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
2430
+ declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker" | "MultiworkerRuntimeController"> | BaseErrorEvent<"ProxyController", {
2153
2431
  config?: StartDevWorkerOptions;
2154
2432
  bundle?: Bundle;
2155
2433
  }> | BaseErrorEvent<"BundlerController", {
@@ -2356,14 +2634,27 @@ declare type EventTarget_2 = typeof globalThis extends { EventTarget: infer T }
2356
2634
  declare class ExecutionContext {
2357
2635
  waitUntil(promise: Promise<any>): void;
2358
2636
  passThroughOnException(): void;
2637
+ props: any;
2359
2638
  }
2360
2639
 
2361
- declare function fetch (
2640
+ export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
2641
+
2642
+ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, options?: ReadConfigOptions) => {
2643
+ rawConfig: Unstable_RawConfig;
2644
+ configPath: string | undefined;
2645
+ userConfigPath: string | undefined;
2646
+ };
2647
+
2648
+ export declare function experimental_startMixedModeSession(bindings: BindingsOpt, options?: {
2649
+ auth: NonNullable<StartDevWorkerInput["dev"]>["auth"];
2650
+ }): Promise<MixedModeSession>;
2651
+
2652
+ declare function fetch_2 (
2362
2653
  input: RequestInfo,
2363
- init?: RequestInit
2364
- ): Promise<Response>
2654
+ init?: RequestInit_2
2655
+ ): Promise<Response_2>
2365
2656
 
2366
- declare class File extends Blob_2 {
2657
+ declare class File_2 extends Blob_2 {
2367
2658
  /**
2368
2659
  * Creates a new File instance.
2369
2660
  *
@@ -2386,7 +2677,7 @@ declare class File extends Blob_2 {
2386
2677
  readonly [Symbol.toStringTag]: string
2387
2678
  }
2388
2679
 
2389
- declare type File_2<Contents = string, Path = string> = {
2680
+ declare type File_3<Contents = string, Path = string> = {
2390
2681
  path: Path;
2391
2682
  } | {
2392
2683
  contents: Contents;
@@ -2424,7 +2715,7 @@ declare class FileReader {
2424
2715
 
2425
2716
  readonly result: string | ArrayBuffer | null
2426
2717
 
2427
- readonly error: DOMException | null
2718
+ readonly error: DOMException_2 | null
2428
2719
 
2429
2720
  onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
2430
2721
  onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
@@ -2535,30 +2826,16 @@ declare class FormData_2 {
2535
2826
  /**
2536
2827
  * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
2537
2828
  */
2538
- declare type FormDataEntryValue = string | File
2539
-
2540
- /**
2541
- * By reading from a `wrangler.toml` file this function generates proxy binding objects that can be
2542
- * used to simulate the interaction with bindings during local development in a Node.js environment
2543
- *
2544
- * @deprecated use `getPlatformProxy` instead
2545
- *
2546
- * @param options The various options that can tweak this function's behavior
2547
- * @returns An Object containing the generated proxies alongside other related utilities
2548
- */
2549
- export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties>(options?: GetBindingsProxyOptions): Promise<BindingsProxy<Bindings, CfProperties>>;
2550
-
2551
- /** Options for the `getBindingsProxy` utility */
2552
- export declare type GetBindingsProxyOptions = GetPlatformProxyOptions;
2829
+ declare type FormDataEntryValue = string | File_2
2553
2830
 
2554
- declare function getCookies (headers: Headers): Record<string, string>
2831
+ declare function getCookies (headers: Headers_2): Record<string, string>
2555
2832
 
2556
2833
  declare function getGlobalDispatcher(): Dispatcher;
2557
2834
 
2558
2835
  declare function getGlobalOrigin(): URL | undefined;
2559
2836
 
2560
2837
  /**
2561
- * By reading from a `wrangler.toml` file this function generates proxy objects that can be
2838
+ * By reading from a Wrangler configuration file this function generates proxy objects that can be
2562
2839
  * used to simulate the interaction with the Cloudflare platform during local development
2563
2840
  * in a Node.js environment
2564
2841
  *
@@ -2578,38 +2855,25 @@ export declare type GetPlatformProxyOptions = {
2578
2855
  /**
2579
2856
  * The path to the config file to use.
2580
2857
  * If no path is specified the default behavior is to search from the
2581
- * current directory up the filesystem for a `wrangler.toml` to use.
2858
+ * current directory up the filesystem for a Wrangler configuration file to use.
2582
2859
  *
2583
2860
  * Note: this field is optional but if a path is specified it must
2584
2861
  * point to a valid file on the filesystem
2585
2862
  */
2586
2863
  configPath?: string;
2587
- /**
2588
- * Flag to indicate the utility to read a json config file (`wrangler.json`/`wrangler.jsonc`)
2589
- * instead of the toml one (`wrangler.toml`)
2590
- *
2591
- * Note: this feature is experimental
2592
- */
2593
- experimentalJsonConfig?: boolean;
2594
2864
  /**
2595
2865
  * Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
2596
- * used by wrangler v3: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
2866
+ * used by wrangler: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
2597
2867
  * If `false` is specified no data is persisted on the filesystem.
2598
2868
  */
2599
2869
  persist?: boolean | {
2600
2870
  path: string;
2601
2871
  };
2602
- /**
2603
- * Use the experimental file-based dev registry for service discovery
2604
- *
2605
- * Note: this feature is experimental
2606
- */
2607
- experimentalRegistry?: boolean;
2608
2872
  };
2609
2873
 
2610
- declare function getSetCookies (headers: Headers): Cookie[]
2874
+ declare function getSetCookies (headers: Headers_2): Cookie[]
2611
2875
 
2612
- declare class Headers implements SpecIterable<[string, string]> {
2876
+ declare class Headers_2 implements SpecIterable<[string, string]> {
2613
2877
  constructor (init?: HeadersInit)
2614
2878
  readonly append: (name: string, value: string) => void
2615
2879
  readonly delete: (name: string) => void
@@ -2618,7 +2882,7 @@ declare class Headers implements SpecIterable<[string, string]> {
2618
2882
  readonly set: (name: string, value: string) => void
2619
2883
  readonly getSetCookie: () => string[]
2620
2884
  readonly forEach: (
2621
- callbackfn: (value: string, key: string, iterable: Headers) => void,
2885
+ callbackfn: (value: string, key: string, iterable: Headers_2) => void,
2622
2886
  thisArg?: unknown
2623
2887
  ) => void
2624
2888
 
@@ -2628,23 +2892,21 @@ declare class Headers implements SpecIterable<[string, string]> {
2628
2892
  readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
2629
2893
  }
2630
2894
 
2631
- declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
2895
+ declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers_2
2632
2896
 
2633
2897
  declare type Hook<T extends HookValues, Args extends unknown[] = []> = T | ((...args: Args) => T);
2634
2898
 
2635
2899
  declare type HookValues = string | number | boolean | object | undefined | null;
2636
2900
 
2637
2901
  /**
2638
- * @property terminate Terminates HTTP server.
2902
+ * The header type declaration of `undici`.
2639
2903
  */
2640
- declare type HttpTerminator = {
2641
- readonly terminate: () => Promise<void>;
2642
- };
2904
+ declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2643
2905
 
2644
2906
  /**
2645
- * The header type declaration of `undici`.
2907
+ * A symbol to inherit a binding from the deployed worker.
2646
2908
  */
2647
- declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2909
+ declare const INHERIT_SYMBOL: unique symbol;
2648
2910
 
2649
2911
  declare type InspectorProxyWorkerIncomingWebSocketMessage = {
2650
2912
  type: ReloadStartEvent["type"];
@@ -2678,8 +2940,10 @@ declare class Logger {
2678
2940
  #private;
2679
2941
  constructor();
2680
2942
  private overrideLoggerLevel?;
2681
- get loggerLevel(): "error" | "none" | "warn" | "info" | "log" | "debug";
2682
- set loggerLevel(val: "error" | "none" | "warn" | "info" | "log" | "debug");
2943
+ private onceHistory;
2944
+ get loggerLevel(): "log" | "error" | "none" | "debug" | "info" | "warn";
2945
+ set loggerLevel(val: "log" | "error" | "none" | "debug" | "info" | "warn");
2946
+ resetLoggerLevel(): void;
2683
2947
  columns: number;
2684
2948
  debug: (...args: unknown[]) => void;
2685
2949
  debugWithSanitization: (label: string, ...args: unknown[]) => void;
@@ -2689,17 +2953,36 @@ declare class Logger {
2689
2953
  error: (...args: unknown[]) => void;
2690
2954
  table<Keys extends string>(data: TableRow<Keys>[]): void;
2691
2955
  console<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
2956
+ get once(): {
2957
+ info: (...args: unknown[]) => void;
2958
+ log: (...args: unknown[]) => void;
2959
+ warn: (...args: unknown[]) => void;
2960
+ error: (...args: unknown[]) => void;
2961
+ };
2962
+ clearHistory(): void;
2963
+ doLogOnce(messageLevel: Exclude<LoggerLevel, "none">, args: unknown[]): void;
2692
2964
  private doLog;
2693
2965
  static registerBeforeLogHook(callback: (() => void) | undefined): void;
2694
2966
  static registerAfterLogHook(callback: (() => void) | undefined): void;
2695
2967
  private formatMessage;
2696
2968
  }
2697
2969
 
2970
+ declare const LOGGER_LEVELS: {
2971
+ readonly none: -1;
2972
+ readonly error: 0;
2973
+ readonly warn: 1;
2974
+ readonly info: 2;
2975
+ readonly log: 3;
2976
+ readonly debug: 4;
2977
+ };
2978
+
2979
+ declare type LoggerLevel = keyof typeof LOGGER_LEVELS;
2980
+
2698
2981
  declare type LogLevel = "debug" | "info" | "log" | "warn" | "error" | "none";
2699
2982
 
2700
2983
  declare type MaybePromise<T> = T | Promise<T>;
2701
2984
 
2702
- declare interface MessageEvent<T = any> extends Event_2 {
2985
+ declare interface MessageEvent_2<T = any> extends Event_2 {
2703
2986
  readonly data: T
2704
2987
  readonly lastEventId: string
2705
2988
  readonly origin: string
@@ -2717,9 +3000,9 @@ declare interface MessageEvent<T = any> extends Event_2 {
2717
3000
  ): void;
2718
3001
  }
2719
3002
 
2720
- declare const MessageEvent: {
2721
- prototype: MessageEvent
2722
- new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
3003
+ declare const MessageEvent_2: {
3004
+ prototype: MessageEvent_2
3005
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent_2<T>
2723
3006
  };
2724
3007
 
2725
3008
  declare interface MessageEventInit<T = any> extends EventInit {
@@ -2739,6 +3022,11 @@ declare interface MIMEType {
2739
3022
 
2740
3023
  declare type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
2741
3024
 
3025
+ declare type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
3026
+ updateBindings: (bindings: BindingsOpt) => Promise<void>;
3027
+ mixedModeConnectionString: MixedModeConnectionString;
3028
+ };
3029
+
2742
3030
  /** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
2743
3031
  declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
2744
3032
  constructor(options?: MockAgent.Options)
@@ -2858,7 +3146,7 @@ declare namespace MockInterceptor {
2858
3146
  origin: string;
2859
3147
  method: string;
2860
3148
  body?: BodyInit | Dispatcher.DispatchOptions['body'];
2861
- headers: Headers | Record<string, string>;
3149
+ headers: Headers_2 | Record<string, string>;
2862
3150
  maxRedirections: number;
2863
3151
  }
2864
3152
 
@@ -2905,29 +3193,38 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
2905
3193
  cacheName?: string
2906
3194
  }
2907
3195
 
3196
+ declare type NameOmit<T> = Omit<T, "name">;
3197
+
3198
+ declare type NormalizeAndValidateConfigArgs = {
3199
+ name?: string;
3200
+ env?: string;
3201
+ "legacy-env"?: boolean;
3202
+ "dispatch-namespace"?: string;
3203
+ remote?: boolean;
3204
+ localProtocol?: string;
3205
+ upstreamProtocol?: string;
3206
+ script?: string;
3207
+ };
3208
+
2908
3209
  declare interface Observability {
2909
3210
  /** If observability is enabled for this Worker */
2910
- enabled: boolean;
3211
+ enabled?: boolean;
2911
3212
  /** The sampling rate */
2912
3213
  head_sampling_rate?: number;
3214
+ logs?: {
3215
+ enabled?: boolean;
3216
+ /** The sampling rate */
3217
+ head_sampling_rate?: number;
3218
+ /** Set to false to disable invocation logs */
3219
+ invocation_logs?: boolean;
3220
+ };
2913
3221
  }
2914
3222
 
2915
3223
  declare interface PagesConfigFields {
2916
3224
  /**
2917
3225
  * The directory of static assets to serve.
2918
3226
  *
2919
- * The presence of this field in `wrangler.toml` indicates a Pages project,
2920
- * and will prompt the handling of the configuration file according to the
2921
- * Pages-specific validation rules.
2922
- */
2923
- pages_build_output_dir?: string;
2924
- }
2925
-
2926
- declare interface PagesConfigFields {
2927
- /**
2928
- * The directory of static assets to serve.
2929
- *
2930
- * The presence of this field in `wrangler.toml` indicates a Pages project,
3227
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
2931
3228
  * and will prompt the handling of the configuration file according to the
2932
3229
  * Pages-specific validation rules.
2933
3230
  */
@@ -25503,7 +25800,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
25503
25800
  onReloadComplete(data: ReloadCompleteEvent): void;
25504
25801
  onProxyWorkerMessage(message: ProxyWorkerOutgoingRequestBody): void;
25505
25802
  onInspectorProxyWorkerMessage(message: InspectorProxyWorkerOutgoingWebsocketMessage): void;
25506
- onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_2>;
25803
+ onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_3>;
25507
25804
  _torndown: boolean;
25508
25805
  teardown(): Promise<void>;
25509
25806
  emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL): void;
@@ -25546,10 +25843,19 @@ declare type ProxyWorkerOutgoingRequestBody = {
25546
25843
  args: Parameters<typeof console.debug>;
25547
25844
  };
25548
25845
 
25549
- declare type QueueConsumer = NonNullable<Config["queues"]["consumers"]>[number];
25846
+ declare type QueueConsumer = NonNullable<Unstable_Config["queues"]["consumers"]>[number];
25550
25847
 
25551
25848
  declare type RawDevConfig = Partial<DevConfig>;
25552
25849
 
25850
+ declare type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
25851
+ config?: string;
25852
+ script?: string;
25853
+ };
25854
+
25855
+ declare type ReadConfigOptions = ResolveConfigPathOptions & {
25856
+ hideWarnings?: boolean;
25857
+ };
25858
+
25553
25859
  declare type ReadyEvent = {
25554
25860
  type: "ready";
25555
25861
  proxyWorker: Miniflare;
@@ -25587,13 +25893,19 @@ declare type ReloadStartEvent = {
25587
25893
  bundle: Bundle;
25588
25894
  };
25589
25895
 
25590
- declare class Request implements BodyMixin {
25591
- constructor (input: RequestInfo, init?: RequestInit)
25896
+ /** Performs an HTTP request. */
25897
+ declare function request(
25898
+ url: string | URL_2 | UrlObject,
25899
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25900
+ ): Promise<Dispatcher.ResponseData>;
25901
+
25902
+ declare class Request_2 implements BodyMixin {
25903
+ constructor (input: RequestInfo, init?: RequestInit_2)
25592
25904
 
25593
25905
  readonly cache: RequestCache
25594
25906
  readonly credentials: RequestCredentials
25595
25907
  readonly destination: RequestDestination
25596
- readonly headers: Headers
25908
+ readonly headers: Headers_2
25597
25909
  readonly integrity: string
25598
25910
  readonly method: string
25599
25911
  readonly mode: RequestMode
@@ -25605,7 +25917,7 @@ declare class Request implements BodyMixin {
25605
25917
  readonly signal: AbortSignal
25606
25918
  readonly duplex: RequestDuplex
25607
25919
 
25608
- readonly body: ReadableStream | null
25920
+ readonly body: ReadableStream_2 | null
25609
25921
  readonly bodyUsed: boolean
25610
25922
 
25611
25923
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -25614,15 +25926,9 @@ declare class Request implements BodyMixin {
25614
25926
  readonly json: () => Promise<unknown>
25615
25927
  readonly text: () => Promise<string>
25616
25928
 
25617
- readonly clone: () => Request
25929
+ readonly clone: () => Request_2
25618
25930
  }
25619
25931
 
25620
- /** Performs an HTTP request. */
25621
- declare function request(
25622
- url: string | URL_2 | UrlObject,
25623
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25624
- ): Promise<Dispatcher.ResponseData>;
25625
-
25626
25932
  declare type RequestCache =
25627
25933
  | 'default'
25628
25934
  | 'force-cache'
@@ -25655,9 +25961,9 @@ declare type RequestDestination =
25655
25961
 
25656
25962
  declare type RequestDuplex = 'half'
25657
25963
 
25658
- declare type RequestInfo = string | URL_2 | Request
25964
+ declare type RequestInfo = string | URL_2 | Request_2
25659
25965
 
25660
- declare interface RequestInit {
25966
+ declare interface RequestInit_2 {
25661
25967
  method?: string
25662
25968
  keepalive?: boolean
25663
25969
  headers?: HeadersInit
@@ -25678,10 +25984,14 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25678
25984
 
25679
25985
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25680
25986
 
25681
- declare class Response implements BodyMixin {
25682
- constructor (body?: BodyInit, init?: ResponseInit)
25987
+ declare type ResolveConfigPathOptions = {
25988
+ useRedirectIfAvailable?: boolean;
25989
+ };
25990
+
25991
+ declare class Response_2 implements BodyMixin {
25992
+ constructor (body?: BodyInit, init?: ResponseInit_2)
25683
25993
 
25684
- readonly headers: Headers
25994
+ readonly headers: Headers_2
25685
25995
  readonly ok: boolean
25686
25996
  readonly status: number
25687
25997
  readonly statusText: string
@@ -25689,7 +25999,7 @@ declare class Response implements BodyMixin {
25689
25999
  readonly url: string
25690
26000
  readonly redirected: boolean
25691
26001
 
25692
- readonly body: ReadableStream | null
26002
+ readonly body: ReadableStream_2 | null
25693
26003
  readonly bodyUsed: boolean
25694
26004
 
25695
26005
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -25698,14 +26008,14 @@ declare class Response implements BodyMixin {
25698
26008
  readonly json: () => Promise<unknown>
25699
26009
  readonly text: () => Promise<string>
25700
26010
 
25701
- readonly clone: () => Response
26011
+ readonly clone: () => Response_2
25702
26012
 
25703
- static error (): Response
25704
- static json(data: any, init?: ResponseInit): Response
25705
- static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response
26013
+ static error (): Response_2
26014
+ static json(data: any, init?: ResponseInit_2): Response_2
26015
+ static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response_2
25706
26016
  }
25707
26017
 
25708
- declare interface ResponseInit {
26018
+ declare interface ResponseInit_2 {
25709
26019
  readonly status?: number
25710
26020
  readonly statusText?: string
25711
26021
  readonly headers?: HeadersInit
@@ -25836,13 +26146,48 @@ declare namespace RetryHandler {
25836
26146
 
25837
26147
  declare type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
25838
26148
 
25839
- declare type RoutingConfig = z.infer<typeof RoutingConfigSchema>;
25840
-
25841
- declare const RoutingConfigSchema: z.ZodObject<{
26149
+ declare type RouterConfig = z.infer<typeof RouterConfigSchema>;
26150
+
26151
+ declare const RouterConfigSchema: z.ZodObject<{
26152
+ account_id: z.ZodOptional<z.ZodNumber>;
26153
+ script_id: z.ZodOptional<z.ZodNumber>;
26154
+ debug: z.ZodOptional<z.ZodBoolean>;
26155
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
26156
+ static_routing: z.ZodOptional<z.ZodObject<{
26157
+ version: z.ZodLiteral<1>;
26158
+ include: z.ZodArray<z.ZodString, "many">;
26159
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26160
+ }, "strip", z.ZodTypeAny, {
26161
+ version?: 1;
26162
+ include?: string[];
26163
+ exclude?: string[];
26164
+ }, {
26165
+ version?: 1;
26166
+ include?: string[];
26167
+ exclude?: string[];
26168
+ }>>;
25842
26169
  has_user_worker: z.ZodOptional<z.ZodBoolean>;
25843
26170
  }, "strip", z.ZodTypeAny, {
26171
+ account_id?: number;
26172
+ script_id?: number;
26173
+ debug?: boolean;
26174
+ invoke_user_worker_ahead_of_assets?: boolean;
26175
+ static_routing?: {
26176
+ version?: 1;
26177
+ include?: string[];
26178
+ exclude?: string[];
26179
+ };
25844
26180
  has_user_worker?: boolean;
25845
26181
  }, {
26182
+ account_id?: number;
26183
+ script_id?: number;
26184
+ debug?: boolean;
26185
+ invoke_user_worker_ahead_of_assets?: boolean;
26186
+ static_routing?: {
26187
+ version?: 1;
26188
+ include?: string[];
26189
+ exclude?: string[];
26190
+ };
25846
26191
  has_user_worker?: boolean;
25847
26192
  }>;
25848
26193
 
@@ -25882,9 +26227,9 @@ declare type SerializedError = {
25882
26227
  cause?: unknown;
25883
26228
  };
25884
26229
 
25885
- declare type ServiceFetch = (request: Request_2) => Promise<Response_2> | Response_2;
26230
+ declare type ServiceFetch = (request: Request_3) => Promise<Response_3> | Response_3;
25886
26231
 
25887
- declare function setCookie (headers: Headers, cookie: Cookie): void
26232
+ declare function setCookie (headers: Headers_2, cookie: Cookie): void
25888
26233
 
25889
26234
  declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
25890
26235
 
@@ -25922,8 +26267,7 @@ declare interface StartDevWorkerInput {
25922
26267
  name?: string;
25923
26268
  /**
25924
26269
  * The javascript or typescript entry-point of the worker.
25925
- * This is the `main` property of a wrangler.toml.
25926
- * You can specify a file path or provide the contents directly.
26270
+ * This is the `main` property of a Wrangler configuration file.
25927
26271
  */
25928
26272
  entrypoint?: string;
25929
26273
  /** The configuration of the worker. */
@@ -25938,6 +26282,7 @@ declare interface StartDevWorkerInput {
25938
26282
  migrations?: DurableObjectMigration[];
25939
26283
  /** The triggers which will cause the worker's exported default handlers to be called. */
25940
26284
  triggers?: Trigger[];
26285
+ tailConsumers?: CfTailConsumer[];
25941
26286
  /**
25942
26287
  * Whether Wrangler should send usage metrics to Cloudflare for this project.
25943
26288
  *
@@ -25960,6 +26305,8 @@ declare interface StartDevWorkerInput {
25960
26305
  alias?: Record<string, string>;
25961
26306
  /** Whether the bundled worker is minified. Only takes effect if bundle: true. */
25962
26307
  minify?: boolean;
26308
+ /** Whether to keep function names after JavaScript transpilations. */
26309
+ keepNames?: boolean;
25963
26310
  /** Options controlling a custom build step. */
25964
26311
  custom?: {
25965
26312
  /** Custom shell command to run before bundling. Runs even if bundle. */
@@ -25972,7 +26319,7 @@ declare interface StartDevWorkerInput {
25972
26319
  jsxFactory?: string;
25973
26320
  jsxFragment?: string;
25974
26321
  tsconfig?: string;
25975
- nodejsCompatMode?: Hook<NodeJSCompatMode, [Config]>;
26322
+ nodejsCompatMode?: Hook<NodeJSCompatMode, [Unstable_Config]>;
25976
26323
  moduleRoot?: string;
25977
26324
  };
25978
26325
  /** Options applying to the worker's development preview environment. */
@@ -25983,10 +26330,10 @@ declare interface StartDevWorkerInput {
25983
26330
  port?: number;
25984
26331
  secure?: boolean;
25985
26332
  };
25986
- /** Whether the worker runs on the edge or locally. */
25987
- remote?: boolean;
26333
+ /** Whether the worker runs on the edge or locally. Can also be set to "minimal" for minimal mode. */
26334
+ remote?: boolean | "minimal";
25988
26335
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
25989
- auth?: AsyncHook<CfAccount, [Pick<Config, "account_id">]>;
26336
+ auth?: AsyncHook<CfAccount, [Pick<Unstable_Config, "account_id">]>;
25990
26337
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
25991
26338
  persist?: string;
25992
26339
  /** Controls which logs are logged 🤙. */
@@ -26013,12 +26360,17 @@ declare interface StartDevWorkerInput {
26013
26360
  /** An undici MockAgent to declaratively mock fetch calls to particular resources. */
26014
26361
  mockFetch?: undici.MockAgent;
26015
26362
  /** Describes the registry of other Workers running locally */
26016
- registry?: WorkerRegistry;
26363
+ registry?: WorkerRegistry | null;
26017
26364
  testScheduled?: boolean;
26365
+ /** Whether to use Vectorize mixed mode -- the worker is run locally but accesses to Vectorize are made remotely */
26366
+ bindVectorizeToProd?: boolean;
26367
+ /** Whether to use Images local mode -- this is lower fidelity, but doesn't require network access */
26368
+ imagesLocalMode?: boolean;
26369
+ /** Treat this as the primary worker in a multiworker setup (i.e. the first Worker in Miniflare's options) */
26370
+ multiworkerPrimary?: boolean;
26018
26371
  };
26019
26372
  legacy?: {
26020
- site?: Hook<Config["site"], [Config]>;
26021
- legacyAssets?: Hook<Config["legacy_assets"], [Config]>;
26373
+ site?: Hook<Unstable_Config["site"], [Unstable_Config]>;
26022
26374
  enableServiceEnvironments?: boolean;
26023
26375
  };
26024
26376
  unsafe?: Omit<CfUnsafe, "bindings">;
@@ -26026,8 +26378,8 @@ declare interface StartDevWorkerInput {
26026
26378
  }
26027
26379
 
26028
26380
  declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26029
- /** A worker's directory. Usually where the wrangler.toml file is located */
26030
- directory: string;
26381
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
26382
+ projectRoot: string;
26031
26383
  build: StartDevWorkerInput["build"] & {
26032
26384
  nodejsCompatMode: NodeJSCompatMode;
26033
26385
  format: CfScriptFormat;
@@ -26035,11 +26387,11 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26035
26387
  moduleRules: Rule[];
26036
26388
  define: Record<string, string>;
26037
26389
  additionalModules: CfModule[];
26390
+ exports: string[];
26038
26391
  processEntrypoint: boolean;
26039
26392
  };
26040
26393
  legacy: StartDevWorkerInput["legacy"] & {
26041
- legacyAssets?: Config["legacy_assets"];
26042
- site?: Config["site"];
26394
+ site?: Unstable_Config["site"];
26043
26395
  };
26044
26396
  dev: StartDevWorkerInput["dev"] & {
26045
26397
  persist: string;
@@ -26047,13 +26399,9 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26047
26399
  };
26048
26400
  entrypoint: string;
26049
26401
  assets?: AssetsOptions;
26402
+ name: string;
26050
26403
  };
26051
26404
 
26052
- declare function startWorkerRegistryServer(port: number): Promise<{
26053
- server: Server<IncomingMessage, ServerResponse>;
26054
- terminator: HttpTerminator;
26055
- }>;
26056
-
26057
26405
  /** A faster version of `request`. */
26058
26406
  declare function stream(
26059
26407
  url: string | URL_2 | UrlObject,
@@ -26130,12 +26478,12 @@ declare namespace Undici {
26130
26478
  var MockPool: MockPool;
26131
26479
  var MockAgent: MockAgent;
26132
26480
  var mockErrors: MockErrors;
26133
- var fetch: fetch;
26134
- var Headers: Headers;
26135
- var Response: Response;
26136
- var Request: Request;
26481
+ var fetch: fetch_2;
26482
+ var Headers: Headers_2;
26483
+ var Response: Response_2;
26484
+ var Request: Request_2;
26137
26485
  var FormData: FormData_2;
26138
- var File: File;
26486
+ var File: File_2;
26139
26487
  var FileReader: FileReader;
26140
26488
  var caches: caches;
26141
26489
  }
@@ -26173,7 +26521,7 @@ declare namespace undici {
26173
26521
  getSetCookies,
26174
26522
  setCookie,
26175
26523
  Cookie,
26176
- fetch,
26524
+ fetch_2 as fetch,
26177
26525
  RequestInfo,
26178
26526
  BodyInit,
26179
26527
  BodyMixin,
@@ -26181,23 +26529,23 @@ declare namespace undici {
26181
26529
  SpecIterableIterator,
26182
26530
  SpecIterable,
26183
26531
  HeadersInit,
26184
- Headers,
26532
+ Headers_2 as Headers,
26185
26533
  RequestCache,
26186
26534
  RequestCredentials,
26187
26535
  RequestDestination,
26188
- RequestInit,
26536
+ RequestInit_2 as RequestInit,
26189
26537
  ReferrerPolicy,
26190
26538
  RequestMode,
26191
26539
  RequestRedirect,
26192
26540
  RequestDuplex,
26193
- Request,
26194
- ResponseInit,
26541
+ Request_2 as Request,
26542
+ ResponseInit_2 as ResponseInit,
26195
26543
  ResponseType,
26196
26544
  ResponseRedirectStatus,
26197
- Response,
26545
+ Response_2 as Response,
26198
26546
  BlobPropertyBag,
26199
26547
  FilePropertyBag,
26200
- File,
26548
+ File_2 as File,
26201
26549
  FileReader,
26202
26550
  ProgressEventInit,
26203
26551
  ProgressEvent,
@@ -26210,7 +26558,7 @@ declare namespace undici {
26210
26558
  CloseEventInit,
26211
26559
  CloseEvent,
26212
26560
  MessageEventInit,
26213
- MessageEvent,
26561
+ MessageEvent_2 as MessageEvent,
26214
26562
  WebSocketInit,
26215
26563
  parseMIMEType,
26216
26564
  serializeAMimeType,
@@ -26223,10 +26571,39 @@ declare namespace undici {
26223
26571
  }
26224
26572
  }
26225
26573
 
26574
+ export declare interface Unstable_ASSETSBindingsOptions {
26575
+ log: Logger;
26576
+ proxyPort?: number;
26577
+ directory?: string;
26578
+ }
26579
+
26580
+ /**
26581
+ * This is the static type definition for the configuration object.
26582
+ *
26583
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
26584
+ * and optionally augment with arguments passed directly to wrangler.
26585
+ *
26586
+ * For more information about the configuration object, see the
26587
+ * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
26588
+ *
26589
+ * Notes:
26590
+ *
26591
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26592
+ * in the top level config and should not appear in any environments.
26593
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
26594
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
26595
+ *
26596
+ * Legend for the annotations:
26597
+ *
26598
+ * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
26599
+ * - `@todo`: there's more work to be done (with details attached).
26600
+ */
26601
+ export declare type Unstable_Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
26602
+
26226
26603
  /**
26227
26604
  * unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
26228
26605
  */
26229
- export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
26606
+ export declare function unstable_dev(script: string, options?: Unstable_DevOptions, apiOptions?: unknown): Promise<Unstable_DevWorker>;
26230
26607
 
26231
26608
  export declare class unstable_DevEnv extends EventEmitter_2 {
26232
26609
  config: ConfigController;
@@ -26244,34 +26621,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
26244
26621
  emitErrorEvent(ev: ErrorEvent): void;
26245
26622
  }
26246
26623
 
26247
- export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_2) => Promise<Response_2>;
26248
-
26249
- export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): {
26250
- workerOptions: SourcelessWorkerOptions;
26251
- define: Record<string, string>;
26252
- main?: string;
26253
- };
26254
-
26255
- export declare const unstable_pages: {
26256
- deploy: typeof deploy;
26257
- };
26258
-
26259
- /**
26260
- * Split an SQLQuery into an array of statements
26261
- */
26262
- export declare function unstable_splitSqlQuery(sql: string): string[];
26263
-
26264
- export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26265
-
26266
- export declare const unstable_startWorkerRegistryServer: startWorkerRegistryServer;
26267
-
26268
- export declare interface UnstableASSETSBindingsOptions {
26269
- log: Logger;
26270
- proxyPort?: number;
26271
- directory?: string;
26272
- }
26273
-
26274
- export declare interface UnstableDevOptions {
26624
+ export declare interface Unstable_DevOptions {
26275
26625
  config?: string;
26276
26626
  env?: string;
26277
26627
  ip?: string;
@@ -26282,11 +26632,9 @@ export declare interface UnstableDevOptions {
26282
26632
  httpsKeyPath?: string;
26283
26633
  httpsCertPath?: string;
26284
26634
  assets?: string;
26285
- legacyAssets?: string;
26286
26635
  site?: string;
26287
26636
  siteInclude?: string[];
26288
26637
  siteExclude?: string[];
26289
- nodeCompat?: boolean;
26290
26638
  compatibilityDate?: string;
26291
26639
  compatibilityFlags?: string[];
26292
26640
  persist?: boolean;
@@ -26294,8 +26642,9 @@ export declare interface UnstableDevOptions {
26294
26642
  vars?: Record<string, string | Json>;
26295
26643
  kv?: {
26296
26644
  binding: string;
26297
- id: string;
26645
+ id?: string;
26298
26646
  preview_id?: string;
26647
+ remote?: boolean;
26299
26648
  }[];
26300
26649
  durableObjects?: {
26301
26650
  name: string;
@@ -26308,11 +26657,13 @@ export declare interface UnstableDevOptions {
26308
26657
  service: string;
26309
26658
  environment?: string | undefined;
26310
26659
  entrypoint?: string | undefined;
26660
+ remote?: boolean;
26311
26661
  }[];
26312
26662
  r2?: {
26313
26663
  binding: string;
26314
- bucket_name: string;
26664
+ bucket_name?: string;
26315
26665
  preview_bucket_name?: string;
26666
+ remote?: boolean;
26316
26667
  }[];
26317
26668
  ai?: {
26318
26669
  binding: string;
@@ -26341,18 +26692,71 @@ export declare interface UnstableDevOptions {
26341
26692
  watch?: boolean;
26342
26693
  devEnv?: boolean;
26343
26694
  fileBasedRegistry?: boolean;
26695
+ vectorizeBindToProd?: boolean;
26696
+ imagesLocalMode?: boolean;
26697
+ enableIpc?: boolean;
26344
26698
  };
26345
26699
  }
26346
26700
 
26347
- export declare interface UnstableDevWorker {
26701
+ export declare interface Unstable_DevWorker {
26348
26702
  port: number;
26349
26703
  address: string;
26350
- proxyData: ProxyData;
26351
26704
  stop: () => Promise<void>;
26352
- fetch: (input?: RequestInfo, init?: RequestInit) => Promise<Response>;
26705
+ fetch: (input?: RequestInfo, init?: RequestInit_2) => Promise<Response_2>;
26353
26706
  waitUntilExit: () => Promise<void>;
26354
26707
  }
26355
26708
 
26709
+ export declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26710
+
26711
+ export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string, options?: {
26712
+ imagesLocalMode?: boolean;
26713
+ overrides?: {
26714
+ assets?: Partial<AssetsOptions>;
26715
+ };
26716
+ }): Unstable_MiniflareWorkerOptions;
26717
+
26718
+ export declare function unstable_getMiniflareWorkerOptions(config: Unstable_Config, env?: string, options?: {
26719
+ imagesLocalMode?: boolean;
26720
+ overrides?: {
26721
+ assets?: Partial<AssetsOptions>;
26722
+ };
26723
+ }): Unstable_MiniflareWorkerOptions;
26724
+
26725
+ export declare interface Unstable_MiniflareWorkerOptions {
26726
+ workerOptions: SourcelessWorkerOptions;
26727
+ define: Record<string, string>;
26728
+ main?: string;
26729
+ externalWorkers: WorkerOptions[];
26730
+ }
26731
+
26732
+ export declare const unstable_pages: {
26733
+ deploy: typeof deploy;
26734
+ };
26735
+
26736
+ export declare type Unstable_RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & Unstable_RawEnvironment & EnvironmentMap & {
26737
+ $schema?: string;
26738
+ };
26739
+
26740
+ /**
26741
+ * The raw environment configuration that we read from the config file.
26742
+ *
26743
+ * All the properties are optional, and will be replaced with defaults in the configuration that
26744
+ * is used in the rest of the codebase.
26745
+ */
26746
+ export declare type Unstable_RawEnvironment = Partial<Environment>;
26747
+
26748
+ /**
26749
+ * Get the Wrangler configuration; read it from the give `configPath` if available.
26750
+ */
26751
+ export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Unstable_Config;
26752
+
26753
+ /**
26754
+ * Split an SQLQuery into an array of statements
26755
+ */
26756
+ export declare function unstable_splitSqlQuery(sql: string): string[];
26757
+
26758
+ export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26759
+
26356
26760
  /** Upgrade to a different protocol. */
26357
26761
  declare function upgrade(
26358
26762
  url: string | URL_2 | UrlObject,
@@ -26425,7 +26829,7 @@ declare const WebSocket: {
26425
26829
  declare interface WebSocketEventMap {
26426
26830
  close: CloseEvent
26427
26831
  error: Event_2
26428
- message: MessageEvent
26832
+ message: MessageEvent_2
26429
26833
  open: Event_2
26430
26834
  }
26431
26835
 
@@ -26446,6 +26850,7 @@ declare interface Worker {
26446
26850
  scheduled: MiniflareWorker["scheduled"];
26447
26851
  queue: MiniflareWorker["queue"];
26448
26852
  dispose(): Promise<void>;
26853
+ raw: unstable_DevEnv;
26449
26854
  }
26450
26855
 
26451
26856
  declare type WorkerDefinition = {
@@ -26479,6 +26884,8 @@ declare type WorkflowBinding = {
26479
26884
  class_name: string;
26480
26885
  /** The script where the Workflow is defined (if it's external to this Worker) */
26481
26886
  script_name?: string;
26887
+ /** Whether the Workflow should be remote or not (only available under `--x-mixed-mode`) */
26888
+ remote?: boolean;
26482
26889
  };
26483
26890
 
26484
26891
  declare type ZoneIdRoute = {