wrangler 0.0.0-e1d2fd668 → 0.0.0-e1df3d831

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';
@@ -21,8 +20,6 @@ import { Readable } from 'stream';
21
20
  import { ReadableStream as ReadableStream_2 } from 'stream/web';
22
21
  import type { Request as Request_3 } from 'miniflare';
23
22
  import { Response as Response_3 } from 'miniflare';
24
- import type { Server } from 'node:http';
25
- import { ServerResponse } from 'http';
26
23
  import { Socket } from 'net';
27
24
  import { TcpNetConnectOpts } from 'net';
28
25
  import { TLSSocket } from 'tls';
@@ -33,6 +30,8 @@ import type { WorkerOptions } from 'miniflare';
33
30
  import { Writable } from 'stream';
34
31
  import { z } from 'zod';
35
32
 
33
+ declare const __brand: unique symbol;
34
+
36
35
  declare type AbortSignal_2 = unknown;
37
36
 
38
37
  declare interface AddEventListenerOptions extends EventListenerOptions {
@@ -77,27 +76,165 @@ declare type ApiCredentials = {
77
76
  declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
78
77
 
79
78
  declare const AssetConfigSchema: z.ZodObject<{
79
+ account_id: z.ZodOptional<z.ZodNumber>;
80
+ script_id: z.ZodOptional<z.ZodNumber>;
81
+ debug: z.ZodOptional<z.ZodBoolean>;
82
+ compatibility_date: z.ZodOptional<z.ZodString>;
83
+ compatibility_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
84
  html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
81
85
  not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
86
+ redirects: z.ZodOptional<z.ZodObject<{
87
+ version: z.ZodLiteral<1>;
88
+ staticRules: z.ZodRecord<z.ZodString, z.ZodObject<{
89
+ status: z.ZodNumber;
90
+ to: z.ZodString;
91
+ lineNumber: z.ZodNumber;
92
+ }, "strip", z.ZodTypeAny, {
93
+ status?: number;
94
+ to?: string;
95
+ lineNumber?: number;
96
+ }, {
97
+ status?: number;
98
+ to?: string;
99
+ lineNumber?: number;
100
+ }>>;
101
+ rules: z.ZodRecord<z.ZodString, z.ZodObject<{
102
+ status: z.ZodNumber;
103
+ to: z.ZodString;
104
+ }, "strip", z.ZodTypeAny, {
105
+ status?: number;
106
+ to?: string;
107
+ }, {
108
+ status?: number;
109
+ to?: string;
110
+ }>>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ version?: 1;
113
+ staticRules?: Record<string, {
114
+ status?: number;
115
+ to?: string;
116
+ lineNumber?: number;
117
+ }>;
118
+ rules?: Record<string, {
119
+ status?: number;
120
+ to?: string;
121
+ }>;
122
+ }, {
123
+ version?: 1;
124
+ staticRules?: Record<string, {
125
+ status?: number;
126
+ to?: string;
127
+ lineNumber?: number;
128
+ }>;
129
+ rules?: Record<string, {
130
+ status?: number;
131
+ to?: string;
132
+ }>;
133
+ }>>;
134
+ headers: z.ZodOptional<z.ZodObject<{
135
+ version: z.ZodLiteral<2>;
136
+ rules: z.ZodRecord<z.ZodString, z.ZodObject<{
137
+ set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
138
+ unset: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ set?: Record<string, string>;
141
+ unset?: string[];
142
+ }, {
143
+ set?: Record<string, string>;
144
+ unset?: string[];
145
+ }>>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ version?: 2;
148
+ rules?: Record<string, {
149
+ set?: Record<string, string>;
150
+ unset?: string[];
151
+ }>;
152
+ }, {
153
+ version?: 2;
154
+ rules?: Record<string, {
155
+ set?: Record<string, string>;
156
+ unset?: string[];
157
+ }>;
158
+ }>>;
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
+ };
85
186
  }, {
187
+ account_id?: number;
188
+ script_id?: number;
189
+ debug?: boolean;
190
+ compatibility_date?: string;
191
+ compatibility_flags?: string[];
86
192
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
87
193
  not_found_handling?: "none" | "single-page-application" | "404-page";
194
+ redirects?: {
195
+ version?: 1;
196
+ staticRules?: Record<string, {
197
+ status?: number;
198
+ to?: string;
199
+ lineNumber?: number;
200
+ }>;
201
+ rules?: Record<string, {
202
+ status?: number;
203
+ to?: string;
204
+ }>;
205
+ };
206
+ headers?: {
207
+ version?: 2;
208
+ rules?: Record<string, {
209
+ set?: Record<string, string>;
210
+ unset?: string[];
211
+ }>;
212
+ };
88
213
  }>;
89
214
 
90
215
  declare type Assets = {
91
216
  /** Absolute path to assets directory */
92
- directory: string;
217
+ directory?: string;
218
+ /** Name of `env` binding property in the User Worker. */
93
219
  binding?: string;
220
+ /** How to handle HTML requests. */
94
221
  html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
222
+ /** How to handle requests that do not match an asset. */
95
223
  not_found_handling?: "single-page-application" | "404-page" | "none";
224
+ /**
225
+ * If true, route every request to the User Worker, whether or not it matches an asset.
226
+ * If false, then respond to requests that match an asset with that asset directly.
227
+ * */
228
+ run_worker_first?: boolean;
96
229
  };
97
230
 
98
- declare type AssetsOptions = Pick<Assets, "directory" | "binding"> & {
99
- routingConfig: RoutingConfig;
231
+ declare type AssetsOptions = {
232
+ directory: string;
233
+ binding?: string;
234
+ routerConfig: RouterConfig;
100
235
  assetConfig: AssetConfig;
236
+ _redirects?: string;
237
+ _headers?: string;
101
238
  };
102
239
 
103
240
  declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
@@ -123,7 +260,7 @@ declare type BaseErrorEvent<Source = string, Data = undefined> = {
123
260
  data: Data;
124
261
  };
125
262
 
126
- declare type BinaryFile = File_2<Uint8Array>;
263
+ declare type BinaryFile = File_3<Uint8Array>;
127
264
 
128
265
  declare type BinaryType = 'blob' | 'arraybuffer'
129
266
 
@@ -142,11 +279,13 @@ declare type Binding = {
142
279
  source: BinaryFile;
143
280
  } | {
144
281
  type: "text_blob";
145
- source: File_2;
282
+ source: File_3;
146
283
  } | {
147
284
  type: "browser";
148
285
  } | {
149
286
  type: "ai";
287
+ } | {
288
+ type: "images";
150
289
  } | {
151
290
  type: "version_metadata";
152
291
  } | {
@@ -162,24 +301,26 @@ declare type Binding = {
162
301
  type: "r2_bucket";
163
302
  } & BindingOmit<CfR2Bucket>) | ({
164
303
  type: "d1";
165
- } & Omit<CfD1Database, "binding">) | ({
304
+ } & BindingOmit<CfD1Database>) | ({
166
305
  type: "vectorize";
167
- } & Omit<CfVectorize, "binding">) | ({
306
+ } & BindingOmit<CfVectorize>) | ({
168
307
  type: "hyperdrive";
169
- } & Omit<CfHyperdrive, "binding">) | ({
308
+ } & BindingOmit<CfHyperdrive>) | ({
170
309
  type: "service";
171
- } & Omit<CfService, "binding">) | {
310
+ } & BindingOmit<CfService>) | {
172
311
  type: "fetcher";
173
312
  fetcher: ServiceFetch;
174
313
  } | ({
175
314
  type: "analytics_engine";
176
- } & Omit<CfAnalyticsEngineDataset, "binding">) | ({
315
+ } & BindingOmit<CfAnalyticsEngineDataset>) | ({
177
316
  type: "dispatch_namespace";
178
- } & Omit<CfDispatchNamespace, "binding">) | ({
317
+ } & BindingOmit<CfDispatchNamespace>) | ({
179
318
  type: "mtls_certificate";
180
- } & Omit<CfMTlsCertificate, "binding">) | ({
319
+ } & BindingOmit<CfMTlsCertificate>) | ({
181
320
  type: "pipeline";
182
- } & Omit<CfPipeline, "binding">) | ({
321
+ } & BindingOmit<CfPipeline>) | ({
322
+ type: "secrets_store_secret";
323
+ } & BindingOmit<CfSecretsStoreSecrets>) | ({
183
324
  type: "logfwdr";
184
325
  } & NameOmit<CfLogfwdrBinding>) | {
185
326
  type: `unsafe_${string}`;
@@ -189,15 +330,7 @@ declare type Binding = {
189
330
 
190
331
  declare type BindingOmit<T> = Omit<T, "binding">;
191
332
 
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
- };
333
+ declare type BindingsOpt = StartDevWorkerInput["bindings"];
201
334
 
202
335
  declare interface BlobPropertyBag {
203
336
  type?: string
@@ -449,8 +582,8 @@ declare type CfCapnp = {
449
582
 
450
583
  declare interface CfD1Database {
451
584
  binding: string;
452
- database_id: string;
453
- database_name: string;
585
+ database_id?: string | typeof INHERIT_SYMBOL;
586
+ database_name?: string;
454
587
  preview_database_id?: string;
455
588
  database_internal_env?: string;
456
589
  migrations_table?: string;
@@ -488,7 +621,7 @@ declare interface CfHyperdrive {
488
621
  */
489
622
  declare interface CfKvNamespace {
490
623
  binding: string;
491
- id: string;
624
+ id?: string | typeof INHERIT_SYMBOL;
492
625
  }
493
626
 
494
627
  declare interface CfLogfwdrBinding {
@@ -526,7 +659,7 @@ declare interface CfModule {
526
659
  * }
527
660
  * }
528
661
  */
529
- content: string | Buffer;
662
+ content: string | Buffer<ArrayBuffer>;
530
663
  /**
531
664
  * An optional sourcemap for this module if it's of a ESM or CJS type, this will only be present
532
665
  * if we're deploying with sourcemaps enabled. Since we copy extra modules that aren't bundled
@@ -544,7 +677,7 @@ declare interface CfModule {
544
677
  /**
545
678
  * A module type.
546
679
  */
547
- declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement" | "nodejs-compat-module";
680
+ declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer" | "python" | "python-requirement";
548
681
 
549
682
  declare interface CfMTlsCertificate {
550
683
  binding: string;
@@ -564,7 +697,7 @@ declare interface CfQueue {
564
697
 
565
698
  declare interface CfR2Bucket {
566
699
  binding: string;
567
- bucket_name: string;
700
+ bucket_name?: string | typeof INHERIT_SYMBOL;
568
701
  jurisdiction?: string;
569
702
  }
570
703
 
@@ -573,20 +706,34 @@ declare interface CfR2Bucket {
573
706
  */
574
707
  declare type CfScriptFormat = "modules" | "service-worker";
575
708
 
709
+ declare interface CfSecretsStoreSecrets {
710
+ binding: string;
711
+ store_id: string;
712
+ secret_name: string;
713
+ }
714
+
576
715
  /**
577
716
  * A binding to send email.
578
717
  */
579
- declare interface CfSendEmailBindings {
718
+ declare type CfSendEmailBindings = {
580
719
  name: string;
720
+ } & ({
581
721
  destination_address?: string;
722
+ } | {
582
723
  allowed_destination_addresses?: string[];
583
- }
724
+ });
584
725
 
585
726
  declare interface CfService {
586
727
  binding: string;
587
728
  service: string;
588
729
  environment?: string;
589
730
  entrypoint?: string;
731
+ props?: Record<string, unknown>;
732
+ }
733
+
734
+ declare interface CfTailConsumer {
735
+ service: string;
736
+ environment?: string;
590
737
  }
591
738
 
592
739
  declare interface CfUnsafe {
@@ -759,28 +906,19 @@ declare type CloudchamberConfig = {
759
906
  ipv4?: boolean;
760
907
  };
761
908
 
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;
909
+ declare interface ComputedFields {
910
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
911
+ configPath: string | undefined;
912
+ /** 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. */
913
+ userConfigPath: string | undefined;
914
+ /**
915
+ * The original top level name for the Worker in the raw configuration.
916
+ *
917
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
918
+ * It can be useful to know what the top-level name was before the flattening.
919
+ */
920
+ topLevelName: string | undefined;
921
+ }
784
922
 
785
923
  declare class ConfigController extends Controller<ConfigControllerEventMap> {
786
924
  #private;
@@ -797,7 +935,6 @@ declare type ConfigControllerEventMap = ControllerEventMap & {
797
935
  };
798
936
 
799
937
  declare interface ConfigFields<Dev extends RawDevConfig> {
800
- configPath: string | undefined;
801
938
  /**
802
939
  * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
803
940
  * These have been superseded by Services, but there may be projects that won't
@@ -826,7 +963,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
826
963
  /**
827
964
  * The directory containing your static assets.
828
965
  *
829
- * It must be a path relative to your wrangler.toml file.
966
+ * It must be a path relative to your Wrangler configuration file.
830
967
  * Example: bucket = "./public"
831
968
  *
832
969
  * If there is a `site` field then it must contain this `bucket` field.
@@ -858,20 +995,6 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
858
995
  */
859
996
  exclude?: string[];
860
997
  } | 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
998
  /**
876
999
  * A list of wasm modules that your worker should be bound to. This is
877
1000
  * the "legacy" way of binding to a wasm module. ES module workers should
@@ -904,7 +1027,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
904
1027
  [key: string]: string;
905
1028
  } | undefined;
906
1029
  /**
907
- * By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file.
1030
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
908
1031
  *
909
1032
  * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
910
1033
  *
@@ -919,7 +1042,7 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
919
1042
  /**
920
1043
  * The possible types for a `Rule`.
921
1044
  */
922
- declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement" | "NodeJsCompatModule";
1045
+ declare type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
923
1046
 
924
1047
  declare type ConfigUpdateEvent = {
925
1048
  type: "configUpdate";
@@ -932,6 +1055,57 @@ url: string | URL_2 | UrlObject,
932
1055
  options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
933
1056
  ): Promise<Dispatcher.ConnectData>;
934
1057
 
1058
+ /**
1059
+ * Configuration for a container application
1060
+ */
1061
+ declare type ContainerApp = {
1062
+ /** Name of the application*/
1063
+ name: string;
1064
+ /** Number of application instances */
1065
+ instances?: number;
1066
+ /** Number of maximum application instances. Only applicable to Durable Object container applications */
1067
+ max_instances?: number;
1068
+ /**
1069
+ * The path to a Dockerfile, or an image URI.
1070
+ * Can be defined both here or by setting the `image` key in the `ContainerApp` configuration
1071
+ */
1072
+ image?: string;
1073
+ /**
1074
+ * Build context of the application. By default it is the directory of `image`.
1075
+ */
1076
+ image_build_context?: string;
1077
+ /**
1078
+ * Image variables to be passed along the image
1079
+ */
1080
+ image_vars?: Record<string, string>;
1081
+ class_name: string;
1082
+ /** The scheduling policy of the application, default is regional */
1083
+ scheduling_policy?: "regional" | "moon";
1084
+ configuration: {
1085
+ image: string;
1086
+ labels?: {
1087
+ name: string;
1088
+ value: string;
1089
+ }[];
1090
+ secrets?: {
1091
+ name: string;
1092
+ type: "env";
1093
+ secret: string;
1094
+ }[];
1095
+ };
1096
+ /** Scheduling constraints */
1097
+ constraints?: {
1098
+ regions?: string[];
1099
+ cities?: string[];
1100
+ tier?: number;
1101
+ };
1102
+ durable_objects?: {
1103
+ namespace_id: string;
1104
+ };
1105
+ /** How a rollout should be done, defining the size of it */
1106
+ rollout_step_percentage?: number;
1107
+ };
1108
+
935
1109
  declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
936
1110
  emitErrorEvent(data: ErrorEvent): void;
937
1111
  }
@@ -982,99 +1156,71 @@ attributes?: { name?: string, domain?: string }
982
1156
  * variable set
983
1157
  */
984
1158
  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;
1159
+ deploymentResponse: {
1160
+ url: string;
1161
+ id: string;
1162
+ environment: "production" | "preview";
1163
+ build_config: {
1164
+ build_command: string;
1165
+ destination_dir: string;
1166
+ root_dir: string;
1167
+ web_analytics_tag?: string | undefined;
1168
+ web_analytics_token?: string | undefined;
1169
+ fast_builds?: boolean | undefined;
1170
+ };
1171
+ created_on: string;
1172
+ production_branch: string;
1173
+ project_id: string;
1174
+ project_name: string;
1175
+ deployment_trigger: {
1176
+ metadata: {
1177
+ branch: string;
1178
+ commit_hash: string;
1179
+ commit_message: string;
1180
+ };
1181
+ type: string;
1036
1182
  };
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;
1183
+ latest_stage: {
1184
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1185
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1186
+ started_on: string | null;
1187
+ ended_on: string | null;
1188
+ };
1189
+ stages: {
1190
+ status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
1191
+ name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
1192
+ started_on: string | null;
1193
+ ended_on: string | null;
1194
+ }[];
1195
+ aliases: string[];
1196
+ modified_on: string;
1197
+ short_id: string;
1198
+ build_image_major_version: number;
1199
+ kv_namespaces?: any;
1200
+ source?: {
1201
+ type: "github" | "gitlab";
1202
+ config: {
1203
+ owner: string;
1204
+ repo_name: string;
1205
+ production_branch?: string | undefined;
1206
+ pr_comments_enabled?: boolean | undefined;
1207
+ deployments_enabled?: boolean | undefined;
1208
+ production_deployments_enabled?: boolean | undefined;
1209
+ preview_deployment_setting?: "none" | "custom" | "all" | undefined;
1210
+ preview_branch_includes?: string[] | undefined;
1211
+ preview_branch_excludes?: string[] | undefined;
1212
+ };
1213
+ } | undefined;
1214
+ env_vars?: any;
1215
+ durable_object_namespaces?: any;
1216
+ is_skipped?: boolean | undefined;
1217
+ files?: {
1218
+ [x: string]: string | undefined;
1219
+ } | undefined;
1220
+ };
1221
+ formData: FormData_2;
1045
1222
  }>;
1046
1223
 
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
1224
  declare interface DevConfig {
1079
1225
  /**
1080
1226
  * IP address for the local dev server to listen on,
@@ -1468,8 +1614,10 @@ declare interface EnablePagesAssetsServiceBindingOptions {
1468
1614
  declare type Entry = {
1469
1615
  /** A worker's entrypoint */
1470
1616
  file: string;
1471
- /** A worker's directory. Usually where the wrangler.toml file is located */
1472
- directory: string;
1617
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
1618
+ projectRoot: string;
1619
+ /** The path to the config file, if it exists. */
1620
+ configPath: string | undefined;
1473
1621
  /** Is this a module worker or a service worker? */
1474
1622
  format: CfScriptFormat;
1475
1623
  /** The directory that contains all of a `--no-bundle` worker's modules. Usually `${directory}/src`. Defaults to path.dirname(file) */
@@ -1516,18 +1664,18 @@ declare interface EnvironmentInheritable {
1516
1664
  * A date in the form yyyy-mm-dd, which will be used to determine
1517
1665
  * which version of the Workers runtime is used.
1518
1666
  *
1519
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1667
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
1520
1668
  *
1521
1669
  * @inheritable
1522
1670
  */
1523
1671
  compatibility_date: string | undefined;
1524
1672
  /**
1525
1673
  * A list of flags that enable features from upcoming features of
1526
- * the Workers runtime, usually used together with compatibility_flags.
1674
+ * the Workers runtime, usually used together with compatibility_date.
1527
1675
  *
1528
- * More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
1676
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
1529
1677
  *
1530
- * @default `[]`
1678
+ * @default []
1531
1679
  * @inheritable
1532
1680
  */
1533
1681
  compatibility_flags: string[];
@@ -1565,13 +1713,20 @@ declare interface EnvironmentInheritable {
1565
1713
  * Whether we use <name>.<subdomain>.workers.dev to
1566
1714
  * test and deploy your Worker.
1567
1715
  *
1568
- * // Carmen according to our tests the default is undefined
1569
- * // warning: you must force "workers_dev: true" in tests to match expected behavior
1570
- * @default `true` (This is a breaking change from Wrangler v1)
1716
+ *
1717
+ * @default true
1571
1718
  * @breaking
1572
1719
  * @inheritable
1573
1720
  */
1574
1721
  workers_dev: boolean | undefined;
1722
+ /**
1723
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
1724
+ * serve Preview URLs for your Worker.
1725
+ *
1726
+ * @default true
1727
+ * @inheritable
1728
+ */
1729
+ preview_urls: boolean | undefined;
1575
1730
  /**
1576
1731
  * A list of routes that your Worker should be published to.
1577
1732
  * Only one of `routes` or `route` is required.
@@ -1600,14 +1755,14 @@ declare interface EnvironmentInheritable {
1600
1755
  /**
1601
1756
  * The function to use to replace jsx syntax.
1602
1757
  *
1603
- * @default `"React.createElement"`
1758
+ * @default "React.createElement"
1604
1759
  * @inheritable
1605
1760
  */
1606
1761
  jsx_factory: string;
1607
1762
  /**
1608
1763
  * The function to use to replace jsx fragment syntax.
1609
1764
  *
1610
- * @default `"React.Fragment"`
1765
+ * @default "React.Fragment"
1611
1766
  * @inheritable
1612
1767
  */
1613
1768
  jsx_fragment: string;
@@ -1629,24 +1784,12 @@ declare interface EnvironmentInheritable {
1629
1784
  *
1630
1785
  * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1631
1786
  *
1632
- * @default `{crons:[]}`
1787
+ * @default {crons:[]}
1633
1788
  * @inheritable
1634
1789
  */
1635
1790
  triggers: {
1636
1791
  crons: string[];
1637
1792
  };
1638
- /**
1639
- * Specifies the Usage Model for your Worker. There are two options -
1640
- * [bundled](https://developers.cloudflare.com/workers/platform/limits#bundled-usage-model) and
1641
- * [unbound](https://developers.cloudflare.com/workers/platform/limits#unbound-usage-model).
1642
- * For newly created Workers, if the Usage Model is omitted
1643
- * it will be set to the [default Usage Model set on the account](https://dash.cloudflare.com/?account=workers/default-usage-model).
1644
- * For existing Workers, if the Usage Model is omitted, it will be
1645
- * set to the Usage Model configured in the dashboard for that Worker.
1646
- *
1647
- * @inheritable
1648
- */
1649
- usage_model: "bundled" | "unbound" | undefined;
1650
1793
  /**
1651
1794
  * Specify limits for runtime behavior.
1652
1795
  * Only supported for the "standard" Usage Model
@@ -1678,11 +1821,6 @@ declare interface EnvironmentInheritable {
1678
1821
  cwd?: string;
1679
1822
  /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
1680
1823
  watch_dir?: string | string[];
1681
- /**
1682
- * Deprecated field previously used to configure the build and upload of the script.
1683
- * @deprecated
1684
- */
1685
- upload?: DeprecatedUpload;
1686
1824
  };
1687
1825
  /**
1688
1826
  * Skip internal build steps and directly deploy script
@@ -1695,27 +1833,22 @@ declare interface EnvironmentInheritable {
1695
1833
  */
1696
1834
  minify: boolean | undefined;
1697
1835
  /**
1698
- * Add polyfills for node builtin modules and globals
1836
+ * Keep function names after javascript transpilations.
1837
+ *
1838
+ * @default {true}
1699
1839
  * @inheritable
1700
1840
  */
1701
- node_compat: boolean | undefined;
1841
+ keep_names: boolean | undefined;
1702
1842
  /**
1703
1843
  * Designates this Worker as an internal-only "first-party" Worker.
1704
1844
  *
1705
1845
  * @inheritable
1706
1846
  */
1707
1847
  first_party_worker: boolean | undefined;
1708
- /**
1709
- * TODO: remove this as it has been deprecated.
1710
- *
1711
- * This is just here for now because the `route` commands use it.
1712
- * So we need to include it in this type so it is available.
1713
- */
1714
- zone_id?: string;
1715
1848
  /**
1716
1849
  * List of bindings that you will send to logfwdr
1717
1850
  *
1718
- * @default `{bindings:[]}`
1851
+ * @default {bindings:[]}
1719
1852
  * @inheritable
1720
1853
  */
1721
1854
  logfwdr: {
@@ -1769,6 +1902,24 @@ declare interface EnvironmentInheritable {
1769
1902
  observability: Observability | undefined;
1770
1903
  }
1771
1904
 
1905
+ declare interface EnvironmentMap {
1906
+ /**
1907
+ * The `env` section defines overrides for the configuration for different environments.
1908
+ *
1909
+ * All environment fields can be specified at the top level of the config indicating the default environment settings.
1910
+ *
1911
+ * - Some fields are inherited and overridable in each environment.
1912
+ * - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
1913
+ *
1914
+ * For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
1915
+ *
1916
+ * @default {}
1917
+ */
1918
+ env?: {
1919
+ [envName: string]: Unstable_RawEnvironment;
1920
+ };
1921
+ }
1922
+
1772
1923
  /**
1773
1924
  * The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
1774
1925
  * that cannot be inherited from the top-level environment, and must be defined specifically.
@@ -1783,7 +1934,7 @@ declare interface EnvironmentNonInheritable {
1783
1934
  * NOTE: This field is not automatically inherited from the top level environment,
1784
1935
  * and so must be specified in every named environment.
1785
1936
  *
1786
- * @default `{}`
1937
+ * @default {}
1787
1938
  * @nonInheritable
1788
1939
  */
1789
1940
  define: Record<string, string>;
@@ -1793,7 +1944,7 @@ declare interface EnvironmentNonInheritable {
1793
1944
  * NOTE: This field is not automatically inherited from the top level environment,
1794
1945
  * and so must be specified in every named environment.
1795
1946
  *
1796
- * @default `{}`
1947
+ * @default {}
1797
1948
  * @nonInheritable
1798
1949
  */
1799
1950
  vars: Record<string, string | Json>;
@@ -1806,7 +1957,7 @@ declare interface EnvironmentNonInheritable {
1806
1957
  * NOTE: This field is not automatically inherited from the top level environment,
1807
1958
  * and so must be specified in every named environment.
1808
1959
  *
1809
- * @default `{bindings:[]}`
1960
+ * @default {bindings:[]}
1810
1961
  * @nonInheritable
1811
1962
  */
1812
1963
  durable_objects: {
@@ -1818,7 +1969,7 @@ declare interface EnvironmentNonInheritable {
1818
1969
  * NOTE: This field is not automatically inherited from the top level environment,
1819
1970
  * and so must be specified in every named environment.
1820
1971
  *
1821
- * @default `[]`
1972
+ * @default []
1822
1973
  * @nonInheritable
1823
1974
  */
1824
1975
  workflows: WorkflowBinding[];
@@ -1828,10 +1979,17 @@ declare interface EnvironmentNonInheritable {
1828
1979
  * NOTE: This field is not automatically inherited from the top level environment,
1829
1980
  * and so must be specified in every named environment.
1830
1981
  *
1831
- * @default `{}`
1982
+ * @default {}
1832
1983
  * @nonInheritable
1833
1984
  */
1834
1985
  cloudchamber: CloudchamberConfig;
1986
+ /**
1987
+ * Container related configuration
1988
+ *
1989
+ * @default []
1990
+ * @nonInheritable
1991
+ */
1992
+ containers?: ContainerApp[];
1835
1993
  /**
1836
1994
  * These specify any Workers KV Namespaces you want to
1837
1995
  * access from inside your Worker.
@@ -1842,14 +2000,14 @@ declare interface EnvironmentNonInheritable {
1842
2000
  * NOTE: This field is not automatically inherited from the top level environment,
1843
2001
  * and so must be specified in every named environment.
1844
2002
  *
1845
- * @default `[]`
2003
+ * @default []
1846
2004
  * @nonInheritable
1847
2005
  */
1848
2006
  kv_namespaces: {
1849
2007
  /** The binding name used to refer to the KV Namespace */
1850
2008
  binding: string;
1851
2009
  /** The ID of the KV namespace */
1852
- id: string;
2010
+ id?: string;
1853
2011
  /** The ID of the KV namespace used during `wrangler dev` */
1854
2012
  preview_id?: string;
1855
2013
  }[];
@@ -1859,7 +2017,7 @@ declare interface EnvironmentNonInheritable {
1859
2017
  * NOTE: This field is not automatically inherited from the top level environment,
1860
2018
  * and so must be specified in every named environment.
1861
2019
  *
1862
- * @default `[]`
2020
+ * @default []
1863
2021
  * @nonInheritable
1864
2022
  */
1865
2023
  send_email: {
@@ -1876,7 +2034,7 @@ declare interface EnvironmentNonInheritable {
1876
2034
  * NOTE: This field is not automatically inherited from the top level environment,
1877
2035
  * and so must be specified in every named environment.
1878
2036
  *
1879
- * @default `{consumers:[],producers:[]}`
2037
+ * @default {consumers:[],producers:[]}
1880
2038
  * @nonInheritable
1881
2039
  */
1882
2040
  queues: {
@@ -1917,14 +2075,14 @@ declare interface EnvironmentNonInheritable {
1917
2075
  * NOTE: This field is not automatically inherited from the top level environment,
1918
2076
  * and so must be specified in every named environment.
1919
2077
  *
1920
- * @default `[]`
2078
+ * @default []
1921
2079
  * @nonInheritable
1922
2080
  */
1923
2081
  r2_buckets: {
1924
2082
  /** The binding name used to refer to the R2 bucket in the Worker. */
1925
2083
  binding: string;
1926
2084
  /** The name of this R2 bucket at the edge. */
1927
- bucket_name: string;
2085
+ bucket_name?: string;
1928
2086
  /** The preview name of this R2 bucket at the edge. */
1929
2087
  preview_bucket_name?: string;
1930
2088
  /** The jurisdiction that the bucket exists in. Default if not present. */
@@ -1936,16 +2094,16 @@ declare interface EnvironmentNonInheritable {
1936
2094
  * NOTE: This field is not automatically inherited from the top level environment,
1937
2095
  * and so must be specified in every named environment.
1938
2096
  *
1939
- * @default `[]`
2097
+ * @default []
1940
2098
  * @nonInheritable
1941
2099
  */
1942
2100
  d1_databases: {
1943
2101
  /** The binding name used to refer to the D1 database in the Worker. */
1944
2102
  binding: string;
1945
2103
  /** The name of this D1 database. */
1946
- database_name: string;
2104
+ database_name?: string;
1947
2105
  /** The UUID of this D1 database (not required). */
1948
- database_id: string;
2106
+ database_id?: string;
1949
2107
  /** The UUID of this D1 database for Wrangler Dev (if specified). */
1950
2108
  preview_database_id?: string;
1951
2109
  /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
@@ -1961,7 +2119,7 @@ declare interface EnvironmentNonInheritable {
1961
2119
  * NOTE: This field is not automatically inherited from the top level environment,
1962
2120
  * and so must be specified in every named environment.
1963
2121
  *
1964
- * @default `[]`
2122
+ * @default []
1965
2123
  * @nonInheritable
1966
2124
  */
1967
2125
  vectorize: {
@@ -1976,7 +2134,7 @@ declare interface EnvironmentNonInheritable {
1976
2134
  * NOTE: This field is not automatically inherited from the top level environment,
1977
2135
  * and so must be specified in every named environment.
1978
2136
  *
1979
- * @default `[]`
2137
+ * @default []
1980
2138
  * @nonInheritable
1981
2139
  */
1982
2140
  hyperdrive: {
@@ -1993,7 +2151,7 @@ declare interface EnvironmentNonInheritable {
1993
2151
  * NOTE: This field is not automatically inherited from the top level environment,
1994
2152
  * and so must be specified in every named environment.
1995
2153
  *
1996
- * @default `[]`
2154
+ * @default []
1997
2155
  * @nonInheritable
1998
2156
  */
1999
2157
  services: {
@@ -2005,6 +2163,8 @@ declare interface EnvironmentNonInheritable {
2005
2163
  environment?: string;
2006
2164
  /** Optionally, the entrypoint (named export) of the service to bind to. */
2007
2165
  entrypoint?: string;
2166
+ /** Optional properties that will be made available to the service via ctx.props. */
2167
+ props?: Record<string, unknown>;
2008
2168
  }[] | undefined;
2009
2169
  /**
2010
2170
  * Specifies analytics engine datasets that are bound to this Worker environment.
@@ -2012,7 +2172,7 @@ declare interface EnvironmentNonInheritable {
2012
2172
  * NOTE: This field is not automatically inherited from the top level environment,
2013
2173
  * and so must be specified in every named environment.
2014
2174
  *
2015
- * @default `[]`
2175
+ * @default []
2016
2176
  * @nonInheritable
2017
2177
  */
2018
2178
  analytics_engine_datasets: {
@@ -2027,7 +2187,7 @@ declare interface EnvironmentNonInheritable {
2027
2187
  * NOTE: This field is not automatically inherited from the top level environment,
2028
2188
  * and so must be specified in every named environment.
2029
2189
  *
2030
- * @default `{}`
2190
+ * @default {}
2031
2191
  * @nonInheritable
2032
2192
  */
2033
2193
  browser: {
@@ -2039,13 +2199,25 @@ declare interface EnvironmentNonInheritable {
2039
2199
  * NOTE: This field is not automatically inherited from the top level environment,
2040
2200
  * and so must be specified in every named environment.
2041
2201
  *
2042
- * @default `{}`
2202
+ * @default {}
2043
2203
  * @nonInheritable
2044
2204
  */
2045
2205
  ai: {
2046
2206
  binding: string;
2047
2207
  staging?: boolean;
2048
2208
  } | undefined;
2209
+ /**
2210
+ * Binding to Cloudflare Images
2211
+ *
2212
+ * NOTE: This field is not automatically inherited from the top level environment,
2213
+ * and so must be specified in every named environment.
2214
+ *
2215
+ * @default {}
2216
+ * @nonInheritable
2217
+ */
2218
+ images: {
2219
+ binding: string;
2220
+ } | undefined;
2049
2221
  /**
2050
2222
  * Binding to the Worker Version's metadata
2051
2223
  */
@@ -2058,7 +2230,7 @@ declare interface EnvironmentNonInheritable {
2058
2230
  * NOTE: This field is not automatically inherited from the top level environment,
2059
2231
  * and so must be specified in every named environment.
2060
2232
  *
2061
- * @default `{}`
2233
+ * @default {}
2062
2234
  * @nonInheritable
2063
2235
  */
2064
2236
  unsafe: {
@@ -2098,7 +2270,7 @@ declare interface EnvironmentNonInheritable {
2098
2270
  * NOTE: This field is not automatically inherited from the top level environment,
2099
2271
  * and so must be specified in every named environment.
2100
2272
  *
2101
- * @default `[]`
2273
+ * @default []
2102
2274
  * @nonInheritable
2103
2275
  */
2104
2276
  mtls_certificates: {
@@ -2113,7 +2285,7 @@ declare interface EnvironmentNonInheritable {
2113
2285
  * NOTE: This field is not automatically inherited from the top level environment,
2114
2286
  * and so must be specified in every named environment.
2115
2287
  *
2116
- * @default `[]`
2288
+ * @default []
2117
2289
  * @nonInheritable
2118
2290
  */
2119
2291
  tail_consumers?: TailConsumer[];
@@ -2123,7 +2295,7 @@ declare interface EnvironmentNonInheritable {
2123
2295
  * NOTE: This field is not automatically inherited from the top level environment,
2124
2296
  * and so must be specified in every named environment.
2125
2297
  *
2126
- * @default `[]`
2298
+ * @default []
2127
2299
  * @nonInheritable
2128
2300
  */
2129
2301
  dispatch_namespaces: {
@@ -2140,7 +2312,7 @@ declare interface EnvironmentNonInheritable {
2140
2312
  * NOTE: This field is not automatically inherited from the top level environment,
2141
2313
  * and so must be specified in every named environment.
2142
2314
  *
2143
- * @default `[]`
2315
+ * @default []
2144
2316
  * @nonInheritable
2145
2317
  */
2146
2318
  pipelines: {
@@ -2149,9 +2321,26 @@ declare interface EnvironmentNonInheritable {
2149
2321
  /** Name of the Pipeline to bind */
2150
2322
  pipeline: string;
2151
2323
  }[];
2324
+ /**
2325
+ * Specifies Secret Store bindings that are bound to this Worker environment.
2326
+ *
2327
+ * NOTE: This field is not automatically inherited from the top level environment,
2328
+ * and so must be specified in every named environment.
2329
+ *
2330
+ * @default []
2331
+ * @nonInheritable
2332
+ */
2333
+ secrets_store_secrets: {
2334
+ /** The binding name used to refer to the bound service. */
2335
+ binding: string;
2336
+ /** Id of the secret store */
2337
+ store_id: string;
2338
+ /** Name of the secret */
2339
+ secret_name: string;
2340
+ }[];
2152
2341
  }
2153
2342
 
2154
- declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
2343
+ declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker" | "MultiworkerRuntimeController"> | BaseErrorEvent<"ProxyController", {
2155
2344
  config?: StartDevWorkerOptions;
2156
2345
  bundle?: Bundle;
2157
2346
  }> | BaseErrorEvent<"BundlerController", {
@@ -2360,12 +2549,22 @@ declare class ExecutionContext {
2360
2549
  passThroughOnException(): void;
2361
2550
  }
2362
2551
 
2552
+ export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
2553
+
2554
+ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, options?: ReadConfigOptions) => {
2555
+ rawConfig: Unstable_RawConfig;
2556
+ configPath: string | undefined;
2557
+ userConfigPath: string | undefined;
2558
+ };
2559
+
2560
+ export declare function experimental_startMixedModeSession(bindings: BindingsOpt): Promise<MixedModeSession>;
2561
+
2363
2562
  declare function fetch_2 (
2364
2563
  input: RequestInfo,
2365
2564
  init?: RequestInit_2
2366
2565
  ): Promise<Response_2>
2367
2566
 
2368
- declare class File extends Blob_2 {
2567
+ declare class File_2 extends Blob_2 {
2369
2568
  /**
2370
2569
  * Creates a new File instance.
2371
2570
  *
@@ -2388,7 +2587,7 @@ declare class File extends Blob_2 {
2388
2587
  readonly [Symbol.toStringTag]: string
2389
2588
  }
2390
2589
 
2391
- declare type File_2<Contents = string, Path = string> = {
2590
+ declare type File_3<Contents = string, Path = string> = {
2392
2591
  path: Path;
2393
2592
  } | {
2394
2593
  contents: Contents;
@@ -2537,21 +2736,7 @@ declare class FormData_2 {
2537
2736
  /**
2538
2737
  * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
2539
2738
  */
2540
- declare type FormDataEntryValue = string | File
2541
-
2542
- /**
2543
- * By reading from a `wrangler.toml` file this function generates proxy binding objects that can be
2544
- * used to simulate the interaction with bindings during local development in a Node.js environment
2545
- *
2546
- * @deprecated use `getPlatformProxy` instead
2547
- *
2548
- * @param options The various options that can tweak this function's behavior
2549
- * @returns An Object containing the generated proxies alongside other related utilities
2550
- */
2551
- export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties>(options?: GetBindingsProxyOptions): Promise<BindingsProxy<Bindings, CfProperties>>;
2552
-
2553
- /** Options for the `getBindingsProxy` utility */
2554
- export declare type GetBindingsProxyOptions = GetPlatformProxyOptions;
2739
+ declare type FormDataEntryValue = string | File_2
2555
2740
 
2556
2741
  declare function getCookies (headers: Headers_2): Record<string, string>
2557
2742
 
@@ -2560,7 +2745,7 @@ declare function getGlobalDispatcher(): Dispatcher;
2560
2745
  declare function getGlobalOrigin(): URL | undefined;
2561
2746
 
2562
2747
  /**
2563
- * By reading from a `wrangler.toml` file this function generates proxy objects that can be
2748
+ * By reading from a Wrangler configuration file this function generates proxy objects that can be
2564
2749
  * used to simulate the interaction with the Cloudflare platform during local development
2565
2750
  * in a Node.js environment
2566
2751
  *
@@ -2580,33 +2765,20 @@ export declare type GetPlatformProxyOptions = {
2580
2765
  /**
2581
2766
  * The path to the config file to use.
2582
2767
  * If no path is specified the default behavior is to search from the
2583
- * current directory up the filesystem for a `wrangler.toml` to use.
2768
+ * current directory up the filesystem for a Wrangler configuration file to use.
2584
2769
  *
2585
2770
  * Note: this field is optional but if a path is specified it must
2586
2771
  * point to a valid file on the filesystem
2587
2772
  */
2588
2773
  configPath?: string;
2589
- /**
2590
- * Flag to indicate the utility to read a json config file (`wrangler.json`/`wrangler.jsonc`)
2591
- * instead of the toml one (`wrangler.toml`)
2592
- *
2593
- * Note: this feature is experimental
2594
- */
2595
- experimentalJsonConfig?: boolean;
2596
2774
  /**
2597
2775
  * Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
2598
- * used by wrangler v3: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
2776
+ * used by wrangler: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
2599
2777
  * If `false` is specified no data is persisted on the filesystem.
2600
2778
  */
2601
2779
  persist?: boolean | {
2602
2780
  path: string;
2603
2781
  };
2604
- /**
2605
- * Use the experimental file-based dev registry for service discovery
2606
- *
2607
- * Note: this feature is experimental
2608
- */
2609
- experimentalRegistry?: boolean;
2610
2782
  };
2611
2783
 
2612
2784
  declare function getSetCookies (headers: Headers_2): Cookie[]
@@ -2637,16 +2809,14 @@ declare type Hook<T extends HookValues, Args extends unknown[] = []> = T | ((...
2637
2809
  declare type HookValues = string | number | boolean | object | undefined | null;
2638
2810
 
2639
2811
  /**
2640
- * @property terminate Terminates HTTP server.
2812
+ * The header type declaration of `undici`.
2641
2813
  */
2642
- declare type HttpTerminator = {
2643
- readonly terminate: () => Promise<void>;
2644
- };
2814
+ declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2645
2815
 
2646
2816
  /**
2647
- * The header type declaration of `undici`.
2817
+ * A symbol to inherit a binding from the deployed worker.
2648
2818
  */
2649
- declare type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
2819
+ declare const INHERIT_SYMBOL: unique symbol;
2650
2820
 
2651
2821
  declare type InspectorProxyWorkerIncomingWebSocketMessage = {
2652
2822
  type: ReloadStartEvent["type"];
@@ -2680,8 +2850,10 @@ declare class Logger {
2680
2850
  #private;
2681
2851
  constructor();
2682
2852
  private overrideLoggerLevel?;
2683
- get loggerLevel(): "error" | "none" | "warn" | "info" | "log" | "debug";
2684
- set loggerLevel(val: "error" | "none" | "warn" | "info" | "log" | "debug");
2853
+ private onceHistory;
2854
+ get loggerLevel(): "log" | "error" | "none" | "debug" | "info" | "warn";
2855
+ set loggerLevel(val: "log" | "error" | "none" | "debug" | "info" | "warn");
2856
+ resetLoggerLevel(): void;
2685
2857
  columns: number;
2686
2858
  debug: (...args: unknown[]) => void;
2687
2859
  debugWithSanitization: (label: string, ...args: unknown[]) => void;
@@ -2691,14 +2863,31 @@ declare class Logger {
2691
2863
  error: (...args: unknown[]) => void;
2692
2864
  table<Keys extends string>(data: TableRow<Keys>[]): void;
2693
2865
  console<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
2694
- static warnOnceHistory: Set<unknown>;
2695
- warnOnce(message: string): void;
2866
+ get once(): {
2867
+ info: (...args: unknown[]) => void;
2868
+ log: (...args: unknown[]) => void;
2869
+ warn: (...args: unknown[]) => void;
2870
+ error: (...args: unknown[]) => void;
2871
+ };
2872
+ clearHistory(): void;
2873
+ doLogOnce(messageLevel: Exclude<LoggerLevel, "none">, args: unknown[]): void;
2696
2874
  private doLog;
2697
2875
  static registerBeforeLogHook(callback: (() => void) | undefined): void;
2698
2876
  static registerAfterLogHook(callback: (() => void) | undefined): void;
2699
2877
  private formatMessage;
2700
2878
  }
2701
2879
 
2880
+ declare const LOGGER_LEVELS: {
2881
+ readonly none: -1;
2882
+ readonly error: 0;
2883
+ readonly warn: 1;
2884
+ readonly info: 2;
2885
+ readonly log: 3;
2886
+ readonly debug: 4;
2887
+ };
2888
+
2889
+ declare type LoggerLevel = keyof typeof LOGGER_LEVELS;
2890
+
2702
2891
  declare type LogLevel = "debug" | "info" | "log" | "warn" | "error" | "none";
2703
2892
 
2704
2893
  declare type MaybePromise<T> = T | Promise<T>;
@@ -2743,6 +2932,15 @@ declare interface MIMEType {
2743
2932
 
2744
2933
  declare type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
2745
2934
 
2935
+ declare type MixedModeConnectionString = Awaited<Worker["url"]> & {
2936
+ [__brand]: "MixedModeConnectionString";
2937
+ };
2938
+
2939
+ declare type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
2940
+ ["setConfig"]: (bindings: BindingsOpt) => Promise<void>;
2941
+ ["mixedModeConnectionString"]: MixedModeConnectionString;
2942
+ };
2943
+
2746
2944
  /** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
2747
2945
  declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
2748
2946
  constructor(options?: MockAgent.Options)
@@ -2911,29 +3109,36 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
2911
3109
 
2912
3110
  declare type NameOmit<T> = Omit<T, "name">;
2913
3111
 
3112
+ declare type NormalizeAndValidateConfigArgs = {
3113
+ name?: string;
3114
+ env?: string;
3115
+ "legacy-env"?: boolean;
3116
+ "dispatch-namespace"?: string;
3117
+ remote?: boolean;
3118
+ localProtocol?: string;
3119
+ upstreamProtocol?: string;
3120
+ script?: string;
3121
+ };
3122
+
2914
3123
  declare interface Observability {
2915
3124
  /** If observability is enabled for this Worker */
2916
- enabled: boolean;
3125
+ enabled?: boolean;
2917
3126
  /** The sampling rate */
2918
3127
  head_sampling_rate?: number;
3128
+ logs?: {
3129
+ enabled?: boolean;
3130
+ /** The sampling rate */
3131
+ head_sampling_rate?: number;
3132
+ /** Set to false to disable invocation logs */
3133
+ invocation_logs?: boolean;
3134
+ };
2919
3135
  }
2920
3136
 
2921
3137
  declare interface PagesConfigFields {
2922
3138
  /**
2923
3139
  * The directory of static assets to serve.
2924
3140
  *
2925
- * The presence of this field in `wrangler.toml` indicates a Pages project,
2926
- * and will prompt the handling of the configuration file according to the
2927
- * Pages-specific validation rules.
2928
- */
2929
- pages_build_output_dir?: string;
2930
- }
2931
-
2932
- declare interface PagesConfigFields {
2933
- /**
2934
- * The directory of static assets to serve.
2935
- *
2936
- * The presence of this field in `wrangler.toml` indicates a Pages project,
3141
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
2937
3142
  * and will prompt the handling of the configuration file according to the
2938
3143
  * Pages-specific validation rules.
2939
3144
  */
@@ -25552,10 +25757,19 @@ declare type ProxyWorkerOutgoingRequestBody = {
25552
25757
  args: Parameters<typeof console.debug>;
25553
25758
  };
25554
25759
 
25555
- declare type QueueConsumer = NonNullable<Config["queues"]["consumers"]>[number];
25760
+ declare type QueueConsumer = NonNullable<Unstable_Config["queues"]["consumers"]>[number];
25556
25761
 
25557
25762
  declare type RawDevConfig = Partial<DevConfig>;
25558
25763
 
25764
+ declare type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
25765
+ config?: string;
25766
+ script?: string;
25767
+ };
25768
+
25769
+ declare type ReadConfigOptions = ResolveConfigPathOptions & {
25770
+ hideWarnings?: boolean;
25771
+ };
25772
+
25559
25773
  declare type ReadyEvent = {
25560
25774
  type: "ready";
25561
25775
  proxyWorker: Miniflare;
@@ -25684,6 +25898,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25684
25898
 
25685
25899
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25686
25900
 
25901
+ declare type ResolveConfigPathOptions = {
25902
+ useRedirectIfAvailable?: boolean;
25903
+ };
25904
+
25687
25905
  declare class Response_2 implements BodyMixin {
25688
25906
  constructor (body?: BodyInit, init?: ResponseInit_2)
25689
25907
 
@@ -25842,13 +26060,25 @@ declare namespace RetryHandler {
25842
26060
 
25843
26061
  declare type Route = SimpleRoute | ZoneIdRoute | ZoneNameRoute | CustomDomainRoute;
25844
26062
 
25845
- declare type RoutingConfig = z.infer<typeof RoutingConfigSchema>;
26063
+ declare type RouterConfig = z.infer<typeof RouterConfigSchema>;
25846
26064
 
25847
- declare const RoutingConfigSchema: z.ZodObject<{
26065
+ declare const RouterConfigSchema: z.ZodObject<{
26066
+ account_id: z.ZodOptional<z.ZodNumber>;
26067
+ script_id: z.ZodOptional<z.ZodNumber>;
26068
+ debug: z.ZodOptional<z.ZodBoolean>;
26069
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
25848
26070
  has_user_worker: z.ZodOptional<z.ZodBoolean>;
25849
26071
  }, "strip", z.ZodTypeAny, {
26072
+ account_id?: number;
26073
+ script_id?: number;
26074
+ debug?: boolean;
26075
+ invoke_user_worker_ahead_of_assets?: boolean;
25850
26076
  has_user_worker?: boolean;
25851
26077
  }, {
26078
+ account_id?: number;
26079
+ script_id?: number;
26080
+ debug?: boolean;
26081
+ invoke_user_worker_ahead_of_assets?: boolean;
25852
26082
  has_user_worker?: boolean;
25853
26083
  }>;
25854
26084
 
@@ -25928,8 +26158,7 @@ declare interface StartDevWorkerInput {
25928
26158
  name?: string;
25929
26159
  /**
25930
26160
  * The javascript or typescript entry-point of the worker.
25931
- * This is the `main` property of a wrangler.toml.
25932
- * You can specify a file path or provide the contents directly.
26161
+ * This is the `main` property of a Wrangler configuration file.
25933
26162
  */
25934
26163
  entrypoint?: string;
25935
26164
  /** The configuration of the worker. */
@@ -25944,6 +26173,7 @@ declare interface StartDevWorkerInput {
25944
26173
  migrations?: DurableObjectMigration[];
25945
26174
  /** The triggers which will cause the worker's exported default handlers to be called. */
25946
26175
  triggers?: Trigger[];
26176
+ tailConsumers?: CfTailConsumer[];
25947
26177
  /**
25948
26178
  * Whether Wrangler should send usage metrics to Cloudflare for this project.
25949
26179
  *
@@ -25966,6 +26196,8 @@ declare interface StartDevWorkerInput {
25966
26196
  alias?: Record<string, string>;
25967
26197
  /** Whether the bundled worker is minified. Only takes effect if bundle: true. */
25968
26198
  minify?: boolean;
26199
+ /** Whether to keep function names after JavaScript transpilations. */
26200
+ keepNames?: boolean;
25969
26201
  /** Options controlling a custom build step. */
25970
26202
  custom?: {
25971
26203
  /** Custom shell command to run before bundling. Runs even if bundle. */
@@ -25978,7 +26210,7 @@ declare interface StartDevWorkerInput {
25978
26210
  jsxFactory?: string;
25979
26211
  jsxFragment?: string;
25980
26212
  tsconfig?: string;
25981
- nodejsCompatMode?: Hook<NodeJSCompatMode, [Config]>;
26213
+ nodejsCompatMode?: Hook<NodeJSCompatMode, [Unstable_Config]>;
25982
26214
  moduleRoot?: string;
25983
26215
  };
25984
26216
  /** Options applying to the worker's development preview environment. */
@@ -25992,7 +26224,7 @@ declare interface StartDevWorkerInput {
25992
26224
  /** Whether the worker runs on the edge or locally. */
25993
26225
  remote?: boolean;
25994
26226
  /** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
25995
- auth?: AsyncHook<CfAccount, [Pick<Config, "account_id">]>;
26227
+ auth?: AsyncHook<CfAccount, [Pick<Unstable_Config, "account_id">]>;
25996
26228
  /** Whether local storage (KV, Durable Objects, R2, D1, etc) is persisted. You can also specify the directory to persist data to. */
25997
26229
  persist?: string;
25998
26230
  /** Controls which logs are logged 🤙. */
@@ -26019,14 +26251,17 @@ declare interface StartDevWorkerInput {
26019
26251
  /** An undici MockAgent to declaratively mock fetch calls to particular resources. */
26020
26252
  mockFetch?: undici.MockAgent;
26021
26253
  /** Describes the registry of other Workers running locally */
26022
- registry?: WorkerRegistry;
26254
+ registry?: WorkerRegistry | null;
26023
26255
  testScheduled?: boolean;
26024
26256
  /** Whether to use Vectorize mixed mode -- the worker is run locally but accesses to Vectorize are made remotely */
26025
26257
  bindVectorizeToProd?: boolean;
26258
+ /** Whether to use Images local mode -- this is lower fidelity, but doesn't require network access */
26259
+ imagesLocalMode?: boolean;
26260
+ /** Treat this as the primary worker in a multiworker setup (i.e. the first Worker in Miniflare's options) */
26261
+ multiworkerPrimary?: boolean;
26026
26262
  };
26027
26263
  legacy?: {
26028
- site?: Hook<Config["site"], [Config]>;
26029
- legacyAssets?: Hook<Config["legacy_assets"], [Config]>;
26264
+ site?: Hook<Unstable_Config["site"], [Unstable_Config]>;
26030
26265
  enableServiceEnvironments?: boolean;
26031
26266
  };
26032
26267
  unsafe?: Omit<CfUnsafe, "bindings">;
@@ -26034,8 +26269,8 @@ declare interface StartDevWorkerInput {
26034
26269
  }
26035
26270
 
26036
26271
  declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26037
- /** A worker's directory. Usually where the wrangler.toml file is located */
26038
- directory: string;
26272
+ /** A worker's directory. Usually where the Wrangler configuration file is located */
26273
+ projectRoot: string;
26039
26274
  build: StartDevWorkerInput["build"] & {
26040
26275
  nodejsCompatMode: NodeJSCompatMode;
26041
26276
  format: CfScriptFormat;
@@ -26047,8 +26282,7 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26047
26282
  processEntrypoint: boolean;
26048
26283
  };
26049
26284
  legacy: StartDevWorkerInput["legacy"] & {
26050
- legacyAssets?: Config["legacy_assets"];
26051
- site?: Config["site"];
26285
+ site?: Unstable_Config["site"];
26052
26286
  };
26053
26287
  dev: StartDevWorkerInput["dev"] & {
26054
26288
  persist: string;
@@ -26056,13 +26290,9 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26056
26290
  };
26057
26291
  entrypoint: string;
26058
26292
  assets?: AssetsOptions;
26293
+ name: string;
26059
26294
  };
26060
26295
 
26061
- declare function startWorkerRegistryServer(port: number): Promise<{
26062
- server: Server<IncomingMessage, ServerResponse>;
26063
- terminator: HttpTerminator;
26064
- }>;
26065
-
26066
26296
  /** A faster version of `request`. */
26067
26297
  declare function stream(
26068
26298
  url: string | URL_2 | UrlObject,
@@ -26144,7 +26374,7 @@ declare namespace Undici {
26144
26374
  var Response: Response_2;
26145
26375
  var Request: Request_2;
26146
26376
  var FormData: FormData_2;
26147
- var File: File;
26377
+ var File: File_2;
26148
26378
  var FileReader: FileReader;
26149
26379
  var caches: caches;
26150
26380
  }
@@ -26206,7 +26436,7 @@ declare namespace undici {
26206
26436
  Response_2 as Response,
26207
26437
  BlobPropertyBag,
26208
26438
  FilePropertyBag,
26209
- File,
26439
+ File_2 as File,
26210
26440
  FileReader,
26211
26441
  ProgressEventInit,
26212
26442
  ProgressEvent,
@@ -26232,10 +26462,39 @@ declare namespace undici {
26232
26462
  }
26233
26463
  }
26234
26464
 
26465
+ export declare interface Unstable_ASSETSBindingsOptions {
26466
+ log: Logger;
26467
+ proxyPort?: number;
26468
+ directory?: string;
26469
+ }
26470
+
26471
+ /**
26472
+ * This is the static type definition for the configuration object.
26473
+ *
26474
+ * It reflects a normalized and validated version of the configuration that you can write in a Wrangler configuration file,
26475
+ * and optionally augment with arguments passed directly to wrangler.
26476
+ *
26477
+ * For more information about the configuration object, see the
26478
+ * documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration
26479
+ *
26480
+ * Notes:
26481
+ *
26482
+ * - Fields that are only specified in `ConfigFields` and not `Environment` can only appear
26483
+ * in the top level config and should not appear in any environments.
26484
+ * - Fields that are specified in `PagesConfigFields` are only relevant for Pages projects
26485
+ * - All top level fields in config and environments are optional in the Wrangler configuration file.
26486
+ *
26487
+ * Legend for the annotations:
26488
+ *
26489
+ * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
26490
+ * - `@todo`: there's more work to be done (with details attached).
26491
+ */
26492
+ export declare type Unstable_Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
26493
+
26235
26494
  /**
26236
26495
  * unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
26237
26496
  */
26238
- export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
26497
+ export declare function unstable_dev(script: string, options?: Unstable_DevOptions, apiOptions?: unknown): Promise<Unstable_DevWorker>;
26239
26498
 
26240
26499
  export declare class unstable_DevEnv extends EventEmitter_2 {
26241
26500
  config: ConfigController;
@@ -26253,34 +26512,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
26253
26512
  emitErrorEvent(ev: ErrorEvent): void;
26254
26513
  }
26255
26514
 
26256
- export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26257
-
26258
- export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): {
26259
- workerOptions: SourcelessWorkerOptions;
26260
- define: Record<string, string>;
26261
- main?: string;
26262
- };
26263
-
26264
- export declare const unstable_pages: {
26265
- deploy: typeof deploy;
26266
- };
26267
-
26268
- /**
26269
- * Split an SQLQuery into an array of statements
26270
- */
26271
- export declare function unstable_splitSqlQuery(sql: string): string[];
26272
-
26273
- export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26274
-
26275
- export declare const unstable_startWorkerRegistryServer: startWorkerRegistryServer;
26276
-
26277
- export declare interface UnstableASSETSBindingsOptions {
26278
- log: Logger;
26279
- proxyPort?: number;
26280
- directory?: string;
26281
- }
26282
-
26283
- export declare interface UnstableDevOptions {
26515
+ export declare interface Unstable_DevOptions {
26284
26516
  config?: string;
26285
26517
  env?: string;
26286
26518
  ip?: string;
@@ -26291,11 +26523,9 @@ export declare interface UnstableDevOptions {
26291
26523
  httpsKeyPath?: string;
26292
26524
  httpsCertPath?: string;
26293
26525
  assets?: string;
26294
- legacyAssets?: string;
26295
26526
  site?: string;
26296
26527
  siteInclude?: string[];
26297
26528
  siteExclude?: string[];
26298
- nodeCompat?: boolean;
26299
26529
  compatibilityDate?: string;
26300
26530
  compatibilityFlags?: string[];
26301
26531
  persist?: boolean;
@@ -26303,7 +26533,7 @@ export declare interface UnstableDevOptions {
26303
26533
  vars?: Record<string, string | Json>;
26304
26534
  kv?: {
26305
26535
  binding: string;
26306
- id: string;
26536
+ id?: string;
26307
26537
  preview_id?: string;
26308
26538
  }[];
26309
26539
  durableObjects?: {
@@ -26320,7 +26550,7 @@ export declare interface UnstableDevOptions {
26320
26550
  }[];
26321
26551
  r2?: {
26322
26552
  binding: string;
26323
- bucket_name: string;
26553
+ bucket_name?: string;
26324
26554
  preview_bucket_name?: string;
26325
26555
  }[];
26326
26556
  ai?: {
@@ -26351,18 +26581,64 @@ export declare interface UnstableDevOptions {
26351
26581
  devEnv?: boolean;
26352
26582
  fileBasedRegistry?: boolean;
26353
26583
  vectorizeBindToProd?: boolean;
26584
+ imagesLocalMode?: boolean;
26585
+ enableIpc?: boolean;
26354
26586
  };
26355
26587
  }
26356
26588
 
26357
- export declare interface UnstableDevWorker {
26589
+ export declare interface Unstable_DevWorker {
26358
26590
  port: number;
26359
26591
  address: string;
26360
- proxyData: ProxyData;
26361
26592
  stop: () => Promise<void>;
26362
26593
  fetch: (input?: RequestInfo, init?: RequestInit_2) => Promise<Response_2>;
26363
26594
  waitUntilExit: () => Promise<void>;
26364
26595
  }
26365
26596
 
26597
+ export declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26598
+
26599
+ export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string, options?: {
26600
+ imagesLocalMode: boolean;
26601
+ }): Unstable_MiniflareWorkerOptions;
26602
+
26603
+ export declare function unstable_getMiniflareWorkerOptions(config: Unstable_Config, env?: string, options?: {
26604
+ imagesLocalMode: boolean;
26605
+ }): Unstable_MiniflareWorkerOptions;
26606
+
26607
+ export declare interface Unstable_MiniflareWorkerOptions {
26608
+ workerOptions: SourcelessWorkerOptions;
26609
+ define: Record<string, string>;
26610
+ main?: string;
26611
+ externalWorkers: WorkerOptions[];
26612
+ }
26613
+
26614
+ export declare const unstable_pages: {
26615
+ deploy: typeof deploy;
26616
+ };
26617
+
26618
+ export declare type Unstable_RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & Unstable_RawEnvironment & EnvironmentMap & {
26619
+ $schema?: string;
26620
+ };
26621
+
26622
+ /**
26623
+ * The raw environment configuration that we read from the config file.
26624
+ *
26625
+ * All the properties are optional, and will be replaced with defaults in the configuration that
26626
+ * is used in the rest of the codebase.
26627
+ */
26628
+ export declare type Unstable_RawEnvironment = Partial<Environment>;
26629
+
26630
+ /**
26631
+ * Get the Wrangler configuration; read it from the give `configPath` if available.
26632
+ */
26633
+ export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Unstable_Config;
26634
+
26635
+ /**
26636
+ * Split an SQLQuery into an array of statements
26637
+ */
26638
+ export declare function unstable_splitSqlQuery(sql: string): string[];
26639
+
26640
+ export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
26641
+
26366
26642
  /** Upgrade to a different protocol. */
26367
26643
  declare function upgrade(
26368
26644
  url: string | URL_2 | UrlObject,
@@ -26456,6 +26732,7 @@ declare interface Worker {
26456
26732
  scheduled: MiniflareWorker["scheduled"];
26457
26733
  queue: MiniflareWorker["queue"];
26458
26734
  dispose(): Promise<void>;
26735
+ raw: unstable_DevEnv;
26459
26736
  }
26460
26737
 
26461
26738
  declare type WorkerDefinition = {