miniflare 0.0.0-e8975a93a → 0.0.0-e8aaa3930

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.
@@ -10,9 +10,9 @@ import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimen
10
10
  import type { Fetcher } from '@cloudflare/workers-types/experimental';
11
11
  import { File } from 'undici';
12
12
  import type { File as File_2 } from '@cloudflare/workers-types/experimental';
13
- import { FormData } from 'undici';
14
- import { Headers } from 'undici';
15
- import type { Headers as Headers_2 } from '@cloudflare/workers-types/experimental';
13
+ import { FormData as FormData_2 } from 'undici';
14
+ import { Headers as Headers_2 } from 'undici';
15
+ import type { Headers as Headers_3 } from '@cloudflare/workers-types/experimental';
16
16
  import { HeadersInit } from 'undici';
17
17
  import http from 'http';
18
18
  import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
@@ -23,24 +23,24 @@ import { ParseParams } from 'zod';
23
23
  import type { Queue } from '@cloudflare/workers-types/experimental';
24
24
  import type { R2Bucket } from '@cloudflare/workers-types/experimental';
25
25
  import { Readable } from 'stream';
26
- import type { ReadableStream } from '@cloudflare/workers-types/experimental';
27
- import { ReadableStream as ReadableStream_2 } from 'stream/web';
26
+ import type { ReadableStream as ReadableStream_2 } from '@cloudflare/workers-types/experimental';
27
+ import { ReadableStream as ReadableStream_3 } from 'stream/web';
28
28
  import { ReferrerPolicy } from 'undici';
29
- import { Request as Request_2 } from 'undici';
30
- import type { Request as Request_3 } from '@cloudflare/workers-types/experimental';
29
+ import { Request as Request_3 } from 'undici';
30
+ import type { Request as Request_4 } from '@cloudflare/workers-types/experimental';
31
31
  import { RequestCache } from 'undici';
32
32
  import { RequestCredentials } from 'undici';
33
33
  import { RequestDestination } from 'undici';
34
34
  import { RequestDuplex } from 'undici';
35
35
  import { RequestInfo as RequestInfo_2 } from 'undici';
36
- import { RequestInit as RequestInit_2 } from 'undici';
37
- import type { RequestInit as RequestInit_3 } from '@cloudflare/workers-types/experimental';
36
+ import { RequestInit as RequestInit_3 } from 'undici';
37
+ import type { RequestInit as RequestInit_4 } from '@cloudflare/workers-types/experimental';
38
38
  import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental';
39
39
  import { RequestMode } from 'undici';
40
40
  import { RequestRedirect } from 'undici';
41
- import { Response as Response_2 } from 'undici';
42
- import type { Response as Response_3 } from '@cloudflare/workers-types/experimental';
43
- import { ResponseInit as ResponseInit_2 } from 'undici';
41
+ import { Response as Response_3 } from 'undici';
42
+ import type { Response as Response_4 } from '@cloudflare/workers-types/experimental';
43
+ import { ResponseInit as ResponseInit_3 } from 'undici';
44
44
  import { ResponseRedirectStatus } from 'undici';
45
45
  import { ResponseType } from 'undici';
46
46
  import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental';
@@ -58,52 +58,99 @@ export declare class __MiniflareFunctionWrapper {
58
58
 
59
59
  export declare type AnyHeaders = http.IncomingHttpHeaders | string[];
60
60
 
61
+ export declare type AssetReverseMap = {
62
+ [pathHash: string]: {
63
+ filePath: string;
64
+ contentType: string;
65
+ };
66
+ };
67
+
61
68
  export declare const ASSETS_PLUGIN: Plugin<typeof AssetsOptionsSchema>;
62
69
 
63
70
  export declare const AssetsOptionsSchema: z.ZodObject<{
64
71
  assets: z.ZodOptional<z.ZodObject<{
65
72
  workerName: z.ZodOptional<z.ZodString>;
66
- path: z.ZodEffects<z.ZodString, string, string>;
67
- bindingName: z.ZodOptional<z.ZodString>;
68
- routingConfig: z.ZodObject<{
69
- hasUserWorker: z.ZodBoolean;
73
+ directory: z.ZodEffects<z.ZodString, string, string>;
74
+ binding: z.ZodOptional<z.ZodString>;
75
+ routingConfig: z.ZodOptional<z.ZodObject<{
76
+ has_user_worker: z.ZodOptional<z.ZodBoolean>;
77
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
70
78
  }, "strip", z.ZodTypeAny, {
71
- hasUserWorker: boolean;
79
+ has_user_worker?: boolean;
80
+ invoke_user_worker_ahead_of_assets?: boolean;
72
81
  }, {
73
- hasUserWorker: boolean;
74
- }>;
82
+ has_user_worker?: boolean;
83
+ invoke_user_worker_ahead_of_assets?: boolean;
84
+ }>>;
85
+ assetConfig: z.ZodOptional<z.ZodObject<{
86
+ html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
87
+ not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
88
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
91
+ not_found_handling?: "none" | "single-page-application" | "404-page";
92
+ serve_directly?: boolean;
93
+ }, {
94
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
95
+ not_found_handling?: "none" | "single-page-application" | "404-page";
96
+ serve_directly?: boolean;
97
+ }>>;
75
98
  }, "strip", z.ZodTypeAny, {
76
- path: string;
77
- routingConfig: {
78
- hasUserWorker: boolean;
79
- };
99
+ directory: string;
80
100
  workerName?: string | undefined;
81
- bindingName?: string | undefined;
101
+ binding?: string | undefined;
102
+ routingConfig?: {
103
+ has_user_worker?: boolean;
104
+ invoke_user_worker_ahead_of_assets?: boolean;
105
+ } | undefined;
106
+ assetConfig?: {
107
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
108
+ not_found_handling?: "none" | "single-page-application" | "404-page";
109
+ serve_directly?: boolean;
110
+ } | undefined;
82
111
  }, {
83
- path: string;
84
- routingConfig: {
85
- hasUserWorker: boolean;
86
- };
112
+ directory: string;
87
113
  workerName?: string | undefined;
88
- bindingName?: string | undefined;
114
+ binding?: string | undefined;
115
+ routingConfig?: {
116
+ has_user_worker?: boolean;
117
+ invoke_user_worker_ahead_of_assets?: boolean;
118
+ } | undefined;
119
+ assetConfig?: {
120
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
121
+ not_found_handling?: "none" | "single-page-application" | "404-page";
122
+ serve_directly?: boolean;
123
+ } | undefined;
89
124
  }>>;
90
125
  }, "strip", z.ZodTypeAny, {
91
126
  assets?: {
92
- path: string;
93
- routingConfig: {
94
- hasUserWorker: boolean;
95
- };
127
+ directory: string;
96
128
  workerName?: string | undefined;
97
- bindingName?: string | undefined;
129
+ binding?: string | undefined;
130
+ routingConfig?: {
131
+ has_user_worker?: boolean;
132
+ invoke_user_worker_ahead_of_assets?: boolean;
133
+ } | undefined;
134
+ assetConfig?: {
135
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
136
+ not_found_handling?: "none" | "single-page-application" | "404-page";
137
+ serve_directly?: boolean;
138
+ } | undefined;
98
139
  } | undefined;
99
140
  }, {
100
141
  assets?: {
101
- path: string;
102
- routingConfig: {
103
- hasUserWorker: boolean;
104
- };
142
+ directory: string;
105
143
  workerName?: string | undefined;
106
- bindingName?: string | undefined;
144
+ binding?: string | undefined;
145
+ routingConfig?: {
146
+ has_user_worker?: boolean;
147
+ invoke_user_worker_ahead_of_assets?: boolean;
148
+ } | undefined;
149
+ assetConfig?: {
150
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
151
+ not_found_handling?: "none" | "single-page-application" | "404-page";
152
+ serve_directly?: boolean;
153
+ } | undefined;
107
154
  } | undefined;
108
155
  }>;
109
156
 
@@ -115,7 +162,19 @@ export declare function base64Encode(value: string): string;
115
162
 
116
163
  export { BodyInit }
117
164
 
118
- export declare const buildAssetsManifest: (dir: string) => Promise<Uint8Array>;
165
+ /**
166
+ * The Asset Manifest and Asset Reverse Map are used to map a request path to an asset.
167
+ * 1. Hash path of request
168
+ * 2. Use this path hash to find the manifest entry
169
+ * 3. Get content hash from manifest entry
170
+ * 4a. In prod, use content hash to get asset from KV
171
+ * 4b. In dev, we fake out the KV store and use the file system instead.
172
+ * Use content hash to get file path from asset reverse map.
173
+ */
174
+ export declare const buildAssetManifest: (dir: string) => Promise<{
175
+ encodedAssetManifest: Uint8Array;
176
+ assetsReverseMap: AssetReverseMap;
177
+ }>;
119
178
 
120
179
  export declare const CACHE_PLUGIN: Plugin<typeof CacheOptionsSchema, typeof CacheSharedOptionsSchema>;
121
180
 
@@ -467,7 +526,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
467
526
  path: string;
468
527
  writable?: boolean | undefined;
469
528
  };
470
- }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>>;
529
+ }>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>>;
471
530
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
472
531
  scriptName: z.ZodString;
473
532
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -619,7 +678,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
619
678
  path: string;
620
679
  writable?: boolean | undefined;
621
680
  };
622
- }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>;
681
+ }>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>;
623
682
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent.Options>, z.ZodTypeDef, MockAgent<MockAgent.Options>>>;
624
683
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
625
684
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -640,6 +699,10 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
640
699
  }>, "many">>;
641
700
  unsafeEvalBinding: z.ZodOptional<z.ZodString>;
642
701
  unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
702
+ /** Used to set the vitest pool worker SELF binding to point to the router worker if there are assets.
703
+ (If there are assets but we're not using vitest, the miniflare entry worker can point directly to RW.)
704
+ */
705
+ hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
643
706
  }, "strip", z.ZodTypeAny, {
644
707
  name?: string | undefined;
645
708
  rootPath?: undefined;
@@ -676,7 +739,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
676
739
  path: string;
677
740
  writable?: boolean | undefined;
678
741
  };
679
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
742
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
680
743
  wrappedBindings?: Record<string, string | {
681
744
  scriptName: string;
682
745
  entrypoint?: string | undefined;
@@ -708,7 +771,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
708
771
  path: string;
709
772
  writable?: boolean | undefined;
710
773
  };
711
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
774
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
712
775
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
713
776
  unsafeEphemeralDurableObjects?: boolean | undefined;
714
777
  unsafeDirectSockets?: {
@@ -719,6 +782,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
719
782
  }[] | undefined;
720
783
  unsafeEvalBinding?: string | undefined;
721
784
  unsafeUseModuleFallbackService?: boolean | undefined;
785
+ hasAssetsAndIsVitest?: boolean | undefined;
722
786
  }, {
723
787
  name?: string | undefined;
724
788
  rootPath?: string | undefined;
@@ -755,7 +819,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
755
819
  path: string;
756
820
  writable?: boolean | undefined;
757
821
  };
758
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
822
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
759
823
  wrappedBindings?: Record<string, string | {
760
824
  scriptName: string;
761
825
  entrypoint?: string | undefined;
@@ -787,7 +851,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
787
851
  path: string;
788
852
  writable?: boolean | undefined;
789
853
  };
790
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
854
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
791
855
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
792
856
  unsafeEphemeralDurableObjects?: boolean | undefined;
793
857
  unsafeDirectSockets?: {
@@ -798,6 +862,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
798
862
  }[] | undefined;
799
863
  unsafeEvalBinding?: string | undefined;
800
864
  unsafeUseModuleFallbackService?: boolean | undefined;
865
+ hasAssetsAndIsVitest?: boolean | undefined;
801
866
  }>>, ({
802
867
  modules: {
803
868
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -841,7 +906,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
841
906
  path: string;
842
907
  writable?: boolean | undefined;
843
908
  };
844
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
909
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
845
910
  wrappedBindings?: Record<string, string | {
846
911
  scriptName: string;
847
912
  entrypoint?: string | undefined;
@@ -873,7 +938,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
873
938
  path: string;
874
939
  writable?: boolean | undefined;
875
940
  };
876
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
941
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
877
942
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
878
943
  unsafeEphemeralDurableObjects?: boolean | undefined;
879
944
  unsafeDirectSockets?: {
@@ -884,6 +949,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
884
949
  }[] | undefined;
885
950
  unsafeEvalBinding?: string | undefined;
886
951
  unsafeUseModuleFallbackService?: boolean | undefined;
952
+ hasAssetsAndIsVitest?: boolean | undefined;
887
953
  }) | ({
888
954
  script: string;
889
955
  scriptPath?: string | undefined;
@@ -930,7 +996,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
930
996
  path: string;
931
997
  writable?: boolean | undefined;
932
998
  };
933
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
999
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
934
1000
  wrappedBindings?: Record<string, string | {
935
1001
  scriptName: string;
936
1002
  entrypoint?: string | undefined;
@@ -962,7 +1028,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
962
1028
  path: string;
963
1029
  writable?: boolean | undefined;
964
1030
  };
965
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1031
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
966
1032
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
967
1033
  unsafeEphemeralDurableObjects?: boolean | undefined;
968
1034
  unsafeDirectSockets?: {
@@ -973,6 +1039,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
973
1039
  }[] | undefined;
974
1040
  unsafeEvalBinding?: string | undefined;
975
1041
  unsafeUseModuleFallbackService?: boolean | undefined;
1042
+ hasAssetsAndIsVitest?: boolean | undefined;
976
1043
  }) | ({
977
1044
  scriptPath: string;
978
1045
  modules?: boolean | undefined;
@@ -1018,7 +1085,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1018
1085
  path: string;
1019
1086
  writable?: boolean | undefined;
1020
1087
  };
1021
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1088
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
1022
1089
  wrappedBindings?: Record<string, string | {
1023
1090
  scriptName: string;
1024
1091
  entrypoint?: string | undefined;
@@ -1050,7 +1117,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1050
1117
  path: string;
1051
1118
  writable?: boolean | undefined;
1052
1119
  };
1053
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1120
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1054
1121
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1055
1122
  unsafeEphemeralDurableObjects?: boolean | undefined;
1056
1123
  unsafeDirectSockets?: {
@@ -1061,6 +1128,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1061
1128
  }[] | undefined;
1062
1129
  unsafeEvalBinding?: string | undefined;
1063
1130
  unsafeUseModuleFallbackService?: boolean | undefined;
1131
+ hasAssetsAndIsVitest?: boolean | undefined;
1064
1132
  }), ({
1065
1133
  modules: {
1066
1134
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -1123,7 +1191,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1123
1191
  path: string;
1124
1192
  writable?: boolean | undefined;
1125
1193
  };
1126
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1194
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
1127
1195
  wrappedBindings?: Record<string, string | {
1128
1196
  scriptName: string;
1129
1197
  entrypoint?: string | undefined;
@@ -1155,7 +1223,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1155
1223
  path: string;
1156
1224
  writable?: boolean | undefined;
1157
1225
  };
1158
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1226
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1159
1227
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1160
1228
  unsafeEphemeralDurableObjects?: boolean | undefined;
1161
1229
  unsafeDirectSockets?: {
@@ -1166,6 +1234,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1166
1234
  }[] | undefined;
1167
1235
  unsafeEvalBinding?: string | undefined;
1168
1236
  unsafeUseModuleFallbackService?: boolean | undefined;
1237
+ hasAssetsAndIsVitest?: boolean | undefined;
1169
1238
  }>;
1170
1239
 
1171
1240
  export declare const CoreSharedOptionsSchema: z.ZodObject<{
@@ -1185,7 +1254,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1185
1254
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
1186
1255
  liveReload: z.ZodOptional<z.ZodBoolean>;
1187
1256
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
1188
- unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>>;
1257
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>>;
1189
1258
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
1190
1259
  }, "strip", z.ZodTypeAny, {
1191
1260
  rootPath?: undefined;
@@ -1204,7 +1273,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1204
1273
  cf?: string | boolean | Record<string, any> | undefined;
1205
1274
  liveReload?: boolean | undefined;
1206
1275
  unsafeProxySharedSecret?: string | undefined;
1207
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1276
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1208
1277
  unsafeStickyBlobs?: boolean | undefined;
1209
1278
  }, {
1210
1279
  rootPath?: string | undefined;
@@ -1223,7 +1292,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1223
1292
  cf?: string | boolean | Record<string, any> | undefined;
1224
1293
  liveReload?: boolean | undefined;
1225
1294
  unsafeProxySharedSecret?: string | undefined;
1226
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1295
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1227
1296
  unsafeStickyBlobs?: boolean | undefined;
1228
1297
  }>;
1229
1298
 
@@ -1278,7 +1347,7 @@ export declare interface DiskDirectory {
1278
1347
  writable?: boolean;
1279
1348
  }
1280
1349
 
1281
- export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit<Partial<IncomingRequestCfProperties>>) => Promise<Response>;
1350
+ export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit_2<Partial<IncomingRequestCfProperties>>) => Promise<Response_2>;
1282
1351
 
1283
1352
  /**
1284
1353
  * Dispatcher created for each `dispatchFetch()` call. Ensures request origin
@@ -1321,6 +1390,7 @@ export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do";
1321
1390
  export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME = "do:storage";
1322
1391
 
1323
1392
  export declare type DurableObjectClassNames = Map<string, Map<string, {
1393
+ enableSql?: boolean;
1324
1394
  unsafeUniqueKey?: UnsafeUniqueKey;
1325
1395
  unsafePreventEviction?: boolean;
1326
1396
  }>>;
@@ -1329,16 +1399,19 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
1329
1399
  durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
1330
1400
  className: z.ZodString;
1331
1401
  scriptName: z.ZodOptional<z.ZodString>;
1402
+ useSQLite: z.ZodOptional<z.ZodBoolean>;
1332
1403
  unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kUnsafeEphemeralUniqueKey>]>>;
1333
1404
  unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
1334
1405
  }, "strip", z.ZodTypeAny, {
1335
1406
  className: string;
1336
1407
  scriptName?: string | undefined;
1408
+ useSQLite?: boolean | undefined;
1337
1409
  unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1338
1410
  unsafePreventEviction?: boolean | undefined;
1339
1411
  }, {
1340
1412
  className: string;
1341
1413
  scriptName?: string | undefined;
1414
+ useSQLite?: boolean | undefined;
1342
1415
  unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1343
1416
  unsafePreventEviction?: boolean | undefined;
1344
1417
  }>]>>>;
@@ -1346,6 +1419,7 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
1346
1419
  durableObjects?: Record<string, string | {
1347
1420
  className: string;
1348
1421
  scriptName?: string | undefined;
1422
+ useSQLite?: boolean | undefined;
1349
1423
  unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1350
1424
  unsafePreventEviction?: boolean | undefined;
1351
1425
  }> | undefined;
@@ -1353,6 +1427,7 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
1353
1427
  durableObjects?: Record<string, string | {
1354
1428
  className: string;
1355
1429
  scriptName?: string | undefined;
1430
+ useSQLite?: boolean | undefined;
1356
1431
  unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1357
1432
  unsafePreventEviction?: boolean | undefined;
1358
1433
  }> | undefined;
@@ -1370,8 +1445,6 @@ export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{
1370
1445
 
1371
1446
  export declare function encodeSitesKey(key: string): string;
1372
1447
 
1373
- export declare const ENTRY_SOCKET_HTTP_OPTIONS: HttpOptions;
1374
-
1375
1448
  export declare class ErrorEvent extends Event {
1376
1449
  readonly error: Error | null;
1377
1450
  constructor(type: "error", init?: {
@@ -1410,7 +1483,8 @@ export declare interface ExternalServer_Tcp {
1410
1483
  certificateHost?: string;
1411
1484
  }
1412
1485
 
1413
- export declare function fetch(input: RequestInfo, init?: RequestInit | Request): Promise<Response>;
1486
+ declare function fetch_2(input: RequestInfo, init?: RequestInit_2 | Request_2): Promise<Response_2>;
1487
+ export { fetch_2 as fetch }
1414
1488
 
1415
1489
  export { File }
1416
1490
 
@@ -1418,7 +1492,7 @@ export declare function _forceColour(enabled?: boolean): void;
1418
1492
 
1419
1493
  export declare function formatZodError(error: z.ZodError, input: unknown): string;
1420
1494
 
1421
- export { FormData }
1495
+ export { FormData_2 as FormData }
1422
1496
 
1423
1497
  export declare function getAccessibleHosts(ipv4Only?: boolean): string[];
1424
1498
 
@@ -1443,6 +1517,30 @@ export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fall
1443
1517
 
1444
1518
  export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[];
1445
1519
 
1520
+ /**
1521
+ * Computes the Node.js compatibility mode we are running.
1522
+ *
1523
+ * NOTES:
1524
+ * - The v2 mode is configured via `nodejs_compat_v2` compat flag or via `nodejs_compat` plus a compatibility date of Sept 23rd. 2024 or later.
1525
+ * - See `EnvironmentInheritable` for `nodeCompat` and `noBundle`.
1526
+ *
1527
+ * @param compatibilityDateStr The compatibility date
1528
+ * @param compatibilityFlags The compatibility flags
1529
+ * @param opts.nodeCompat Whether the legacy node_compat arg is being used
1530
+ * @returns the mode and flags to indicate specific configuration for validating.
1531
+ */
1532
+ export declare function getNodeCompat(compatibilityDate: string | undefined, // Default to some arbitrary old date
1533
+ compatibilityFlags: string[], opts?: {
1534
+ nodeCompat?: boolean;
1535
+ }): {
1536
+ mode: NodeJSCompatMode;
1537
+ hasNodejsAlsFlag: boolean;
1538
+ hasNodejsCompatFlag: boolean;
1539
+ hasNodejsCompatV2Flag: boolean;
1540
+ hasNoNodejsCompatV2Flag: boolean;
1541
+ hasExperimentalNodejsCompatV2Flag: boolean;
1542
+ };
1543
+
1446
1544
  export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
1447
1545
 
1448
1546
  export declare function getRootPath(opts: unknown): string;
@@ -1458,7 +1556,7 @@ export declare interface GlobalServicesOptions {
1458
1556
 
1459
1557
  export declare function globsToRegExps(globs?: string[]): MatcherRegExps;
1460
1558
 
1461
- export { Headers }
1559
+ export { Headers_2 as Headers }
1462
1560
 
1463
1561
  export { HeadersInit }
1464
1562
 
@@ -1547,8 +1645,6 @@ export declare const kInspectorSocket: unique symbol;
1547
1645
 
1548
1646
  declare const kPair: unique symbol;
1549
1647
 
1550
- export declare const kProxyNodeBinding: unique symbol;
1551
-
1552
1648
  declare const kSend: unique symbol;
1553
1649
 
1554
1650
  export declare const kUnsafeEphemeralUniqueKey: unique symbol;
@@ -1643,6 +1739,11 @@ export declare interface LogOptions {
1643
1739
  suffix?: string;
1644
1740
  }
1645
1741
 
1742
+ export declare type ManifestEntry = {
1743
+ pathHash: Uint8Array;
1744
+ contentHash: Uint8Array;
1745
+ };
1746
+
1646
1747
  export declare interface MatcherRegExps {
1647
1748
  include: RegExp[];
1648
1749
  exclude: RegExp[];
@@ -1661,12 +1762,13 @@ export declare function maybeParseURL(url: Persistence): URL | undefined;
1661
1762
  */
1662
1763
  export declare function mergeWorkerOptions(a: Partial<WorkerOptions>, b: Partial<WorkerOptions>): Partial<WorkerOptions>;
1663
1764
 
1664
- export declare class MessageEvent extends Event {
1765
+ declare class MessageEvent_2 extends Event {
1665
1766
  readonly data: ArrayBuffer | string;
1666
1767
  constructor(type: "message", init: {
1667
1768
  data: ArrayBuffer | string;
1668
1769
  });
1669
1770
  }
1771
+ export { MessageEvent_2 as MessageEvent }
1670
1772
 
1671
1773
  export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise<void>;
1672
1774
 
@@ -1696,7 +1798,7 @@ export declare class Miniflare {
1696
1798
  export declare class MiniflareCoreError extends MiniflareError<MiniflareCoreErrorCode> {
1697
1799
  }
1698
1800
 
1699
- export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC";
1801
+ export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_STORAGE_BACKEND" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC";
1700
1802
 
1701
1803
  export declare class MiniflareError<Code extends string | number = string | number> extends Error {
1702
1804
  readonly code: Code;
@@ -1765,7 +1867,18 @@ export declare interface Network {
1765
1867
  tlsOptions?: TlsOptions;
1766
1868
  }
1767
1869
 
1768
- export declare const NODE_PLATFORM_IMPL: PlatformImpl<ReadableStream_2>;
1870
+ export declare const NODE_PLATFORM_IMPL: PlatformImpl<ReadableStream_3>;
1871
+
1872
+ /**
1873
+ * We can provide Node.js compatibility in a number of different modes:
1874
+ * - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
1875
+ * - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`).
1876
+ * - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
1877
+ * - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
1878
+ * and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime.
1879
+ * - null - no Node.js compatibility.
1880
+ */
1881
+ export declare type NodeJSCompatMode = "legacy" | "als" | "v1" | "v2" | null;
1769
1882
 
1770
1883
  export declare class NoOpLog extends Log {
1771
1884
  constructor();
@@ -1776,6 +1889,7 @@ export declare class NoOpLog extends Log {
1776
1889
  export declare function normaliseDurableObject(designator: NonNullable<z.infer<typeof DurableObjectsOptionsSchema>["durableObjects"]>[string]): {
1777
1890
  className: string;
1778
1891
  serviceName?: string;
1892
+ enableSql?: boolean;
1779
1893
  unsafeUniqueKey?: UnsafeUniqueKey;
1780
1894
  unsafePreventEviction?: boolean;
1781
1895
  };
@@ -1885,9 +1999,9 @@ export declare const PersistenceSchema: z.ZodOptional<z.ZodUnion<[z.ZodBoolean,
1885
1999
  export declare interface PlatformImpl<RS> {
1886
2000
  Blob: typeof Blob_2;
1887
2001
  File: typeof File_2;
1888
- Headers: typeof Headers_2;
1889
- Request: typeof Request_3;
1890
- Response: typeof Response_3;
2002
+ Headers: typeof Headers_3;
2003
+ Request: typeof Request_4;
2004
+ Response: typeof Response_4;
1891
2005
  isReadableStream(value: unknown): value is RS;
1892
2006
  bufferReadableStream(stream: RS): Promise<ArrayBuffer>;
1893
2007
  unbufferReadableStream(buffer: ArrayBuffer): RS;
@@ -2160,7 +2274,7 @@ export declare const PLUGINS: {
2160
2274
  path: string;
2161
2275
  writable?: boolean | undefined;
2162
2276
  };
2163
- }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>>;
2277
+ }>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>>;
2164
2278
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
2165
2279
  scriptName: z.ZodString;
2166
2280
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -2312,7 +2426,7 @@ export declare const PLUGINS: {
2312
2426
  path: string;
2313
2427
  writable?: boolean | undefined;
2314
2428
  };
2315
- }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>;
2429
+ }>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>;
2316
2430
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent>, z.ZodTypeDef, MockAgent<MockAgent>>>;
2317
2431
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
2318
2432
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2333,6 +2447,7 @@ export declare const PLUGINS: {
2333
2447
  }>, "many">>;
2334
2448
  unsafeEvalBinding: z.ZodOptional<z.ZodString>;
2335
2449
  unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
2450
+ hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
2336
2451
  }, "strip", z.ZodTypeAny, {
2337
2452
  name?: string | undefined;
2338
2453
  rootPath?: undefined;
@@ -2369,7 +2484,7 @@ export declare const PLUGINS: {
2369
2484
  path: string;
2370
2485
  writable?: boolean | undefined;
2371
2486
  };
2372
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2487
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2373
2488
  wrappedBindings?: Record<string, string | {
2374
2489
  scriptName: string;
2375
2490
  entrypoint?: string | undefined;
@@ -2401,7 +2516,7 @@ export declare const PLUGINS: {
2401
2516
  path: string;
2402
2517
  writable?: boolean | undefined;
2403
2518
  };
2404
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2519
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2405
2520
  fetchMock?: MockAgent<MockAgent> | undefined;
2406
2521
  unsafeEphemeralDurableObjects?: boolean | undefined;
2407
2522
  unsafeDirectSockets?: {
@@ -2412,6 +2527,7 @@ export declare const PLUGINS: {
2412
2527
  }[] | undefined;
2413
2528
  unsafeEvalBinding?: string | undefined;
2414
2529
  unsafeUseModuleFallbackService?: boolean | undefined;
2530
+ hasAssetsAndIsVitest?: boolean | undefined;
2415
2531
  }, {
2416
2532
  name?: string | undefined;
2417
2533
  rootPath?: string | undefined;
@@ -2448,7 +2564,7 @@ export declare const PLUGINS: {
2448
2564
  path: string;
2449
2565
  writable?: boolean | undefined;
2450
2566
  };
2451
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2567
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2452
2568
  wrappedBindings?: Record<string, string | {
2453
2569
  scriptName: string;
2454
2570
  entrypoint?: string | undefined;
@@ -2480,7 +2596,7 @@ export declare const PLUGINS: {
2480
2596
  path: string;
2481
2597
  writable?: boolean | undefined;
2482
2598
  };
2483
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2599
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2484
2600
  fetchMock?: MockAgent<MockAgent> | undefined;
2485
2601
  unsafeEphemeralDurableObjects?: boolean | undefined;
2486
2602
  unsafeDirectSockets?: {
@@ -2491,6 +2607,7 @@ export declare const PLUGINS: {
2491
2607
  }[] | undefined;
2492
2608
  unsafeEvalBinding?: string | undefined;
2493
2609
  unsafeUseModuleFallbackService?: boolean | undefined;
2610
+ hasAssetsAndIsVitest?: boolean | undefined;
2494
2611
  }>>, ({
2495
2612
  modules: {
2496
2613
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -2534,7 +2651,7 @@ export declare const PLUGINS: {
2534
2651
  path: string;
2535
2652
  writable?: boolean | undefined;
2536
2653
  };
2537
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2654
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2538
2655
  wrappedBindings?: Record<string, string | {
2539
2656
  scriptName: string;
2540
2657
  entrypoint?: string | undefined;
@@ -2566,7 +2683,7 @@ export declare const PLUGINS: {
2566
2683
  path: string;
2567
2684
  writable?: boolean | undefined;
2568
2685
  };
2569
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2686
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2570
2687
  fetchMock?: MockAgent<MockAgent> | undefined;
2571
2688
  unsafeEphemeralDurableObjects?: boolean | undefined;
2572
2689
  unsafeDirectSockets?: {
@@ -2577,6 +2694,7 @@ export declare const PLUGINS: {
2577
2694
  }[] | undefined;
2578
2695
  unsafeEvalBinding?: string | undefined;
2579
2696
  unsafeUseModuleFallbackService?: boolean | undefined;
2697
+ hasAssetsAndIsVitest?: boolean | undefined;
2580
2698
  }) | ({
2581
2699
  script: string;
2582
2700
  scriptPath?: string | undefined;
@@ -2623,7 +2741,7 @@ export declare const PLUGINS: {
2623
2741
  path: string;
2624
2742
  writable?: boolean | undefined;
2625
2743
  };
2626
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2744
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2627
2745
  wrappedBindings?: Record<string, string | {
2628
2746
  scriptName: string;
2629
2747
  entrypoint?: string | undefined;
@@ -2655,7 +2773,7 @@ export declare const PLUGINS: {
2655
2773
  path: string;
2656
2774
  writable?: boolean | undefined;
2657
2775
  };
2658
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2776
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2659
2777
  fetchMock?: MockAgent<MockAgent> | undefined;
2660
2778
  unsafeEphemeralDurableObjects?: boolean | undefined;
2661
2779
  unsafeDirectSockets?: {
@@ -2666,6 +2784,7 @@ export declare const PLUGINS: {
2666
2784
  }[] | undefined;
2667
2785
  unsafeEvalBinding?: string | undefined;
2668
2786
  unsafeUseModuleFallbackService?: boolean | undefined;
2787
+ hasAssetsAndIsVitest?: boolean | undefined;
2669
2788
  }) | ({
2670
2789
  scriptPath: string;
2671
2790
  modules?: boolean | undefined;
@@ -2711,7 +2830,7 @@ export declare const PLUGINS: {
2711
2830
  path: string;
2712
2831
  writable?: boolean | undefined;
2713
2832
  };
2714
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2833
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2715
2834
  wrappedBindings?: Record<string, string | {
2716
2835
  scriptName: string;
2717
2836
  entrypoint?: string | undefined;
@@ -2743,7 +2862,7 @@ export declare const PLUGINS: {
2743
2862
  path: string;
2744
2863
  writable?: boolean | undefined;
2745
2864
  };
2746
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2865
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2747
2866
  fetchMock?: MockAgent<MockAgent> | undefined;
2748
2867
  unsafeEphemeralDurableObjects?: boolean | undefined;
2749
2868
  unsafeDirectSockets?: {
@@ -2754,6 +2873,7 @@ export declare const PLUGINS: {
2754
2873
  }[] | undefined;
2755
2874
  unsafeEvalBinding?: string | undefined;
2756
2875
  unsafeUseModuleFallbackService?: boolean | undefined;
2876
+ hasAssetsAndIsVitest?: boolean | undefined;
2757
2877
  }), ({
2758
2878
  modules: {
2759
2879
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -2816,7 +2936,7 @@ export declare const PLUGINS: {
2816
2936
  path: string;
2817
2937
  writable?: boolean | undefined;
2818
2938
  };
2819
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2939
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2820
2940
  wrappedBindings?: Record<string, string | {
2821
2941
  scriptName: string;
2822
2942
  entrypoint?: string | undefined;
@@ -2848,7 +2968,7 @@ export declare const PLUGINS: {
2848
2968
  path: string;
2849
2969
  writable?: boolean | undefined;
2850
2970
  };
2851
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2971
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2852
2972
  fetchMock?: MockAgent<MockAgent> | undefined;
2853
2973
  unsafeEphemeralDurableObjects?: boolean | undefined;
2854
2974
  unsafeDirectSockets?: {
@@ -2859,6 +2979,7 @@ export declare const PLUGINS: {
2859
2979
  }[] | undefined;
2860
2980
  unsafeEvalBinding?: string | undefined;
2861
2981
  unsafeUseModuleFallbackService?: boolean | undefined;
2982
+ hasAssetsAndIsVitest?: boolean | undefined;
2862
2983
  }>, z.ZodObject<{
2863
2984
  rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
2864
2985
  host: z.ZodOptional<z.ZodString>;
@@ -2876,7 +2997,7 @@ export declare const PLUGINS: {
2876
2997
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
2877
2998
  liveReload: z.ZodOptional<z.ZodBoolean>;
2878
2999
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
2879
- unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>>;
3000
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>>;
2880
3001
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
2881
3002
  }, "strip", z.ZodTypeAny, {
2882
3003
  rootPath?: undefined;
@@ -2895,7 +3016,7 @@ export declare const PLUGINS: {
2895
3016
  cf?: string | boolean | Record<string, any> | undefined;
2896
3017
  liveReload?: boolean | undefined;
2897
3018
  unsafeProxySharedSecret?: string | undefined;
2898
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3019
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2899
3020
  unsafeStickyBlobs?: boolean | undefined;
2900
3021
  }, {
2901
3022
  rootPath?: string | undefined;
@@ -2914,7 +3035,7 @@ export declare const PLUGINS: {
2914
3035
  cf?: string | boolean | Record<string, any> | undefined;
2915
3036
  liveReload?: boolean | undefined;
2916
3037
  unsafeProxySharedSecret?: string | undefined;
2917
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3038
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2918
3039
  unsafeStickyBlobs?: boolean | undefined;
2919
3040
  }>>;
2920
3041
  cache: Plugin<z.ZodObject<{
@@ -2950,16 +3071,19 @@ export declare const PLUGINS: {
2950
3071
  durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
2951
3072
  className: z.ZodString;
2952
3073
  scriptName: z.ZodOptional<z.ZodString>;
3074
+ useSQLite: z.ZodOptional<z.ZodBoolean>;
2953
3075
  unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<kUnsafeEphemeralUniqueKey>]>>;
2954
3076
  unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
2955
3077
  }, "strip", z.ZodTypeAny, {
2956
3078
  className: string;
2957
3079
  scriptName?: string | undefined;
3080
+ useSQLite?: boolean | undefined;
2958
3081
  unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
2959
3082
  unsafePreventEviction?: boolean | undefined;
2960
3083
  }, {
2961
3084
  className: string;
2962
3085
  scriptName?: string | undefined;
3086
+ useSQLite?: boolean | undefined;
2963
3087
  unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
2964
3088
  unsafePreventEviction?: boolean | undefined;
2965
3089
  }>]>>>;
@@ -2967,6 +3091,7 @@ export declare const PLUGINS: {
2967
3091
  durableObjects?: Record<string, string | {
2968
3092
  className: string;
2969
3093
  scriptName?: string | undefined;
3094
+ useSQLite?: boolean | undefined;
2970
3095
  unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
2971
3096
  unsafePreventEviction?: boolean | undefined;
2972
3097
  }> | undefined;
@@ -2974,6 +3099,7 @@ export declare const PLUGINS: {
2974
3099
  durableObjects?: Record<string, string | {
2975
3100
  className: string;
2976
3101
  scriptName?: string | undefined;
3102
+ useSQLite?: boolean | undefined;
2977
3103
  unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
2978
3104
  unsafePreventEviction?: boolean | undefined;
2979
3105
  }> | undefined;
@@ -3017,22 +3143,39 @@ export declare const PLUGINS: {
3017
3143
  queueName: string;
3018
3144
  deliveryDelay?: number | undefined;
3019
3145
  }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3020
- queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
3146
+ queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3021
3147
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3022
3148
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3023
3149
  maxRetires: z.ZodOptional<z.ZodNumber>;
3150
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3024
3151
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3025
3152
  retryDelay: z.ZodOptional<z.ZodNumber>;
3026
3153
  }, "strip", z.ZodTypeAny, {
3027
3154
  maxBatchSize?: number | undefined;
3028
3155
  maxBatchTimeout?: number | undefined;
3029
3156
  maxRetires?: number | undefined;
3157
+ maxRetries?: number | undefined;
3030
3158
  deadLetterQueue?: string | undefined;
3031
3159
  retryDelay?: number | undefined;
3032
3160
  }, {
3033
3161
  maxBatchSize?: number | undefined;
3034
3162
  maxBatchTimeout?: number | undefined;
3035
3163
  maxRetires?: number | undefined;
3164
+ maxRetries?: number | undefined;
3165
+ deadLetterQueue?: string | undefined;
3166
+ retryDelay?: number | undefined;
3167
+ }>, Omit<{
3168
+ maxBatchSize?: number | undefined;
3169
+ maxBatchTimeout?: number | undefined;
3170
+ maxRetires?: number | undefined;
3171
+ maxRetries?: number | undefined;
3172
+ deadLetterQueue?: string | undefined;
3173
+ retryDelay?: number | undefined;
3174
+ }, "maxRetires">, {
3175
+ maxBatchSize?: number | undefined;
3176
+ maxBatchTimeout?: number | undefined;
3177
+ maxRetires?: number | undefined;
3178
+ maxRetries?: number | undefined;
3036
3179
  deadLetterQueue?: string | undefined;
3037
3180
  retryDelay?: number | undefined;
3038
3181
  }>>, z.ZodArray<z.ZodString, "many">]>>;
@@ -3041,13 +3184,14 @@ export declare const PLUGINS: {
3041
3184
  queueName: string;
3042
3185
  deliveryDelay?: number | undefined;
3043
3186
  }> | undefined;
3044
- queueConsumers?: string[] | Record<string, {
3187
+ queueConsumers?: string[] | Record<string, Omit<{
3045
3188
  maxBatchSize?: number | undefined;
3046
3189
  maxBatchTimeout?: number | undefined;
3047
3190
  maxRetires?: number | undefined;
3191
+ maxRetries?: number | undefined;
3048
3192
  deadLetterQueue?: string | undefined;
3049
3193
  retryDelay?: number | undefined;
3050
- }> | undefined;
3194
+ }, "maxRetires">> | undefined;
3051
3195
  }, {
3052
3196
  queueProducers?: string[] | Record<string, string> | Record<string, {
3053
3197
  queueName: string;
@@ -3057,6 +3201,7 @@ export declare const PLUGINS: {
3057
3201
  maxBatchSize?: number | undefined;
3058
3202
  maxBatchTimeout?: number | undefined;
3059
3203
  maxRetires?: number | undefined;
3204
+ maxRetries?: number | undefined;
3060
3205
  deadLetterQueue?: string | undefined;
3061
3206
  retryDelay?: number | undefined;
3062
3207
  }> | undefined;
@@ -3122,49 +3267,122 @@ export declare const PLUGINS: {
3122
3267
  assets: Plugin<z.ZodObject<{
3123
3268
  assets: z.ZodOptional<z.ZodObject<{
3124
3269
  workerName: z.ZodOptional<z.ZodString>;
3125
- path: z.ZodEffects<z.ZodString, string, string>;
3126
- bindingName: z.ZodOptional<z.ZodString>;
3127
- routingConfig: z.ZodObject<{
3128
- hasUserWorker: z.ZodBoolean;
3270
+ directory: z.ZodEffects<z.ZodString, string, string>;
3271
+ binding: z.ZodOptional<z.ZodString>;
3272
+ routingConfig: z.ZodOptional<z.ZodObject<{
3273
+ has_user_worker: z.ZodOptional<z.ZodBoolean>;
3274
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
3129
3275
  }, "strip", z.ZodTypeAny, {
3130
- hasUserWorker: boolean;
3276
+ has_user_worker?: boolean;
3277
+ invoke_user_worker_ahead_of_assets?: boolean;
3131
3278
  }, {
3132
- hasUserWorker: boolean;
3133
- }>;
3279
+ has_user_worker?: boolean;
3280
+ invoke_user_worker_ahead_of_assets?: boolean;
3281
+ }>>;
3282
+ assetConfig: z.ZodOptional<z.ZodObject<{
3283
+ html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
3284
+ not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
3285
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
3134
3286
  }, "strip", z.ZodTypeAny, {
3135
- path: string;
3136
- routingConfig: {
3137
- hasUserWorker: boolean;
3138
- };
3287
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3288
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3289
+ serve_directly?: boolean;
3290
+ }, {
3291
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3292
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3293
+ serve_directly?: boolean;
3294
+ }>>;
3295
+ }, "strip", z.ZodTypeAny, {
3296
+ directory: string;
3139
3297
  workerName?: string | undefined;
3140
- bindingName?: string | undefined;
3298
+ binding?: string | undefined;
3299
+ routingConfig?: {
3300
+ has_user_worker?: boolean;
3301
+ invoke_user_worker_ahead_of_assets?: boolean;
3302
+ } | undefined;
3303
+ assetConfig?: {
3304
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3305
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3306
+ serve_directly?: boolean;
3307
+ } | undefined;
3141
3308
  }, {
3142
- path: string;
3143
- routingConfig: {
3144
- hasUserWorker: boolean;
3145
- };
3309
+ directory: string;
3146
3310
  workerName?: string | undefined;
3147
- bindingName?: string | undefined;
3311
+ binding?: string | undefined;
3312
+ routingConfig?: {
3313
+ has_user_worker?: boolean;
3314
+ invoke_user_worker_ahead_of_assets?: boolean;
3315
+ } | undefined;
3316
+ assetConfig?: {
3317
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3318
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3319
+ serve_directly?: boolean;
3320
+ } | undefined;
3148
3321
  }>>;
3149
3322
  }, "strip", z.ZodTypeAny, {
3150
3323
  assets?: {
3151
- path: string;
3152
- routingConfig: {
3153
- hasUserWorker: boolean;
3154
- };
3324
+ directory: string;
3155
3325
  workerName?: string | undefined;
3156
- bindingName?: string | undefined;
3326
+ binding?: string | undefined;
3327
+ routingConfig?: {
3328
+ has_user_worker?: boolean;
3329
+ invoke_user_worker_ahead_of_assets?: boolean;
3330
+ } | undefined;
3331
+ assetConfig?: {
3332
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3333
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3334
+ serve_directly?: boolean;
3335
+ } | undefined;
3157
3336
  } | undefined;
3158
3337
  }, {
3159
3338
  assets?: {
3160
- path: string;
3161
- routingConfig: {
3162
- hasUserWorker: boolean;
3163
- };
3339
+ directory: string;
3164
3340
  workerName?: string | undefined;
3165
- bindingName?: string | undefined;
3341
+ binding?: string | undefined;
3342
+ routingConfig?: {
3343
+ has_user_worker?: boolean;
3344
+ invoke_user_worker_ahead_of_assets?: boolean;
3345
+ } | undefined;
3346
+ assetConfig?: {
3347
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3348
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3349
+ serve_directly?: boolean;
3350
+ } | undefined;
3166
3351
  } | undefined;
3167
3352
  }>>;
3353
+ workflows: Plugin<z.ZodObject<{
3354
+ workflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3355
+ name: z.ZodString;
3356
+ className: z.ZodString;
3357
+ scriptName: z.ZodOptional<z.ZodString>;
3358
+ }, "strip", z.ZodTypeAny, {
3359
+ name: string;
3360
+ className: string;
3361
+ scriptName?: string | undefined;
3362
+ }, {
3363
+ name: string;
3364
+ className: string;
3365
+ scriptName?: string | undefined;
3366
+ }>>>;
3367
+ }, "strip", z.ZodTypeAny, {
3368
+ workflows?: Record<string, {
3369
+ name: string;
3370
+ className: string;
3371
+ scriptName?: string | undefined;
3372
+ }> | undefined;
3373
+ }, {
3374
+ workflows?: Record<string, {
3375
+ name: string;
3376
+ className: string;
3377
+ scriptName?: string | undefined;
3378
+ }> | undefined;
3379
+ }>, z.ZodObject<{
3380
+ workflowsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3381
+ }, "strip", z.ZodTypeAny, {
3382
+ workflowsPersist?: string | boolean | undefined;
3383
+ }, {
3384
+ workflowsPersist?: string | boolean | undefined;
3385
+ }>>;
3168
3386
  };
3169
3387
 
3170
3388
  export declare type Plugins = typeof PLUGINS;
@@ -3189,7 +3407,7 @@ export declare interface PluginServicesOptions<Options extends z.ZodType, Shared
3189
3407
 
3190
3408
  export declare function prefixError(prefix: string, e: any): Error;
3191
3409
 
3192
- export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_2<Uint8Array>): ReadableStream_2<Uint8Array>;
3410
+ export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_3<Uint8Array>): ReadableStream_3<Uint8Array>;
3193
3411
 
3194
3412
  export declare const ProxyAddresses: {
3195
3413
  readonly GLOBAL: 0;
@@ -3207,6 +3425,11 @@ export declare class ProxyClient {
3207
3425
  dispose(): Promise<void>;
3208
3426
  }
3209
3427
 
3428
+ export declare class ProxyNodeBinding {
3429
+ proxyOverrideHandler?: ProxyHandler<any> | undefined;
3430
+ constructor(proxyOverrideHandler?: ProxyHandler<any> | undefined);
3431
+ }
3432
+
3210
3433
  export declare const ProxyOps: {
3211
3434
  readonly GET: "GET";
3212
3435
  readonly GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR";
@@ -3223,44 +3446,78 @@ export declare const QueueBindings: {
3223
3446
 
3224
3447
  export declare type QueueConsumer = z.infer<typeof QueueConsumerSchema>;
3225
3448
 
3226
- export declare const QueueConsumerOptionsSchema: z.ZodObject<{
3449
+ export declare const QueueConsumerOptionsSchema: z.ZodEffects<z.ZodObject<{
3227
3450
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3228
3451
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3229
3452
  maxRetires: z.ZodOptional<z.ZodNumber>;
3453
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3230
3454
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3231
3455
  retryDelay: z.ZodOptional<z.ZodNumber>;
3232
3456
  }, "strip", z.ZodTypeAny, {
3233
3457
  maxBatchSize?: number | undefined;
3234
3458
  maxBatchTimeout?: number | undefined;
3235
3459
  maxRetires?: number | undefined;
3460
+ maxRetries?: number | undefined;
3236
3461
  deadLetterQueue?: string | undefined;
3237
3462
  retryDelay?: number | undefined;
3238
3463
  }, {
3239
3464
  maxBatchSize?: number | undefined;
3240
3465
  maxBatchTimeout?: number | undefined;
3241
3466
  maxRetires?: number | undefined;
3467
+ maxRetries?: number | undefined;
3468
+ deadLetterQueue?: string | undefined;
3469
+ retryDelay?: number | undefined;
3470
+ }>, Omit<{
3471
+ maxBatchSize?: number | undefined;
3472
+ maxBatchTimeout?: number | undefined;
3473
+ maxRetires?: number | undefined;
3474
+ maxRetries?: number | undefined;
3475
+ deadLetterQueue?: string | undefined;
3476
+ retryDelay?: number | undefined;
3477
+ }, "maxRetires">, {
3478
+ maxBatchSize?: number | undefined;
3479
+ maxBatchTimeout?: number | undefined;
3480
+ maxRetires?: number | undefined;
3481
+ maxRetries?: number | undefined;
3242
3482
  deadLetterQueue?: string | undefined;
3243
3483
  retryDelay?: number | undefined;
3244
3484
  }>;
3245
3485
 
3246
3486
  export declare type QueueConsumers = Map<string, z.infer<typeof QueueConsumerSchema>>;
3247
3487
 
3248
- export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
3488
+ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodEffects<z.ZodObject<{
3249
3489
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3250
3490
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3251
3491
  maxRetires: z.ZodOptional<z.ZodNumber>;
3492
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3252
3493
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3253
3494
  retryDelay: z.ZodOptional<z.ZodNumber>;
3254
3495
  }, "strip", z.ZodTypeAny, {
3255
3496
  maxBatchSize?: number | undefined;
3256
3497
  maxBatchTimeout?: number | undefined;
3257
3498
  maxRetires?: number | undefined;
3499
+ maxRetries?: number | undefined;
3258
3500
  deadLetterQueue?: string | undefined;
3259
3501
  retryDelay?: number | undefined;
3260
3502
  }, {
3261
3503
  maxBatchSize?: number | undefined;
3262
3504
  maxBatchTimeout?: number | undefined;
3263
3505
  maxRetires?: number | undefined;
3506
+ maxRetries?: number | undefined;
3507
+ deadLetterQueue?: string | undefined;
3508
+ retryDelay?: number | undefined;
3509
+ }>, Omit<{
3510
+ maxBatchSize?: number | undefined;
3511
+ maxBatchTimeout?: number | undefined;
3512
+ maxRetires?: number | undefined;
3513
+ maxRetries?: number | undefined;
3514
+ deadLetterQueue?: string | undefined;
3515
+ retryDelay?: number | undefined;
3516
+ }, "maxRetires">, {
3517
+ maxBatchSize?: number | undefined;
3518
+ maxBatchTimeout?: number | undefined;
3519
+ maxRetires?: number | undefined;
3520
+ maxRetries?: number | undefined;
3264
3521
  deadLetterQueue?: string | undefined;
3265
3522
  retryDelay?: number | undefined;
3266
3523
  }>, z.ZodObject<{
@@ -3271,22 +3528,39 @@ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
3271
3528
  workerName: string;
3272
3529
  }>>;
3273
3530
 
3274
- export declare const QueueConsumersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodObject<{
3531
+ export declare const QueueConsumersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
3275
3532
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3276
3533
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3277
3534
  maxRetires: z.ZodOptional<z.ZodNumber>;
3535
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3278
3536
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3279
3537
  retryDelay: z.ZodOptional<z.ZodNumber>;
3280
3538
  }, "strip", z.ZodTypeAny, {
3281
3539
  maxBatchSize?: number | undefined;
3282
3540
  maxBatchTimeout?: number | undefined;
3283
3541
  maxRetires?: number | undefined;
3542
+ maxRetries?: number | undefined;
3284
3543
  deadLetterQueue?: string | undefined;
3285
3544
  retryDelay?: number | undefined;
3286
3545
  }, {
3287
3546
  maxBatchSize?: number | undefined;
3288
3547
  maxBatchTimeout?: number | undefined;
3289
3548
  maxRetires?: number | undefined;
3549
+ maxRetries?: number | undefined;
3550
+ deadLetterQueue?: string | undefined;
3551
+ retryDelay?: number | undefined;
3552
+ }>, Omit<{
3553
+ maxBatchSize?: number | undefined;
3554
+ maxBatchTimeout?: number | undefined;
3555
+ maxRetires?: number | undefined;
3556
+ maxRetries?: number | undefined;
3557
+ deadLetterQueue?: string | undefined;
3558
+ retryDelay?: number | undefined;
3559
+ }, "maxRetires">, {
3560
+ maxBatchSize?: number | undefined;
3561
+ maxBatchTimeout?: number | undefined;
3562
+ maxRetires?: number | undefined;
3563
+ maxRetries?: number | undefined;
3290
3564
  deadLetterQueue?: string | undefined;
3291
3565
  retryDelay?: number | undefined;
3292
3566
  }>, z.ZodObject<{
@@ -3436,22 +3710,39 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3436
3710
  queueName: string;
3437
3711
  deliveryDelay?: number | undefined;
3438
3712
  }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3439
- queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
3713
+ queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3440
3714
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3441
3715
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3442
3716
  maxRetires: z.ZodOptional<z.ZodNumber>;
3717
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3443
3718
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3444
3719
  retryDelay: z.ZodOptional<z.ZodNumber>;
3445
3720
  }, "strip", z.ZodTypeAny, {
3446
3721
  maxBatchSize?: number | undefined;
3447
3722
  maxBatchTimeout?: number | undefined;
3448
3723
  maxRetires?: number | undefined;
3724
+ maxRetries?: number | undefined;
3449
3725
  deadLetterQueue?: string | undefined;
3450
3726
  retryDelay?: number | undefined;
3451
3727
  }, {
3452
3728
  maxBatchSize?: number | undefined;
3453
3729
  maxBatchTimeout?: number | undefined;
3454
3730
  maxRetires?: number | undefined;
3731
+ maxRetries?: number | undefined;
3732
+ deadLetterQueue?: string | undefined;
3733
+ retryDelay?: number | undefined;
3734
+ }>, Omit<{
3735
+ maxBatchSize?: number | undefined;
3736
+ maxBatchTimeout?: number | undefined;
3737
+ maxRetires?: number | undefined;
3738
+ maxRetries?: number | undefined;
3739
+ deadLetterQueue?: string | undefined;
3740
+ retryDelay?: number | undefined;
3741
+ }, "maxRetires">, {
3742
+ maxBatchSize?: number | undefined;
3743
+ maxBatchTimeout?: number | undefined;
3744
+ maxRetires?: number | undefined;
3745
+ maxRetries?: number | undefined;
3455
3746
  deadLetterQueue?: string | undefined;
3456
3747
  retryDelay?: number | undefined;
3457
3748
  }>>, z.ZodArray<z.ZodString, "many">]>>;
@@ -3460,13 +3751,14 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3460
3751
  queueName: string;
3461
3752
  deliveryDelay?: number | undefined;
3462
3753
  }> | undefined;
3463
- queueConsumers?: string[] | Record<string, {
3754
+ queueConsumers?: string[] | Record<string, Omit<{
3464
3755
  maxBatchSize?: number | undefined;
3465
3756
  maxBatchTimeout?: number | undefined;
3466
3757
  maxRetires?: number | undefined;
3758
+ maxRetries?: number | undefined;
3467
3759
  deadLetterQueue?: string | undefined;
3468
3760
  retryDelay?: number | undefined;
3469
- }> | undefined;
3761
+ }, "maxRetires">> | undefined;
3470
3762
  }, {
3471
3763
  queueProducers?: string[] | Record<string, string> | Record<string, {
3472
3764
  queueName: string;
@@ -3476,6 +3768,7 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3476
3768
  maxBatchSize?: number | undefined;
3477
3769
  maxBatchTimeout?: number | undefined;
3478
3770
  maxRetires?: number | undefined;
3771
+ maxRetries?: number | undefined;
3479
3772
  deadLetterQueue?: string | undefined;
3480
3773
  retryDelay?: number | undefined;
3481
3774
  }> | undefined;
@@ -3569,7 +3862,7 @@ export declare const RatelimitOptionsSchema: z.ZodObject<{
3569
3862
  }> | undefined;
3570
3863
  }>;
3571
3864
 
3572
- export declare function readPrefix(stream: ReadableStream_2<Uint8Array>, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_2<Uint8Array>]>;
3865
+ export declare function readPrefix(stream: ReadableStream_3<Uint8Array>, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_3<Uint8Array>]>;
3573
3866
 
3574
3867
  export declare function reduceError(e: any): JsonError;
3575
3868
 
@@ -3579,17 +3872,18 @@ export declare type ReducersRevivers = Record<string, ReducerReviver>;
3579
3872
 
3580
3873
  export { ReferrerPolicy }
3581
3874
 
3582
- export declare type ReplaceWorkersTypes<T> = T extends Request_3 ? Request : T extends Response_3 ? Response : T extends ReadableStream ? ReadableStream_2 : Required<T> extends Required<RequestInit_3> ? RequestInit : T extends Headers_2 ? Headers : T extends Blob_2 ? Blob_3 : T extends AbortSignal_2 ? AbortSignal : T extends Promise<infer P> ? Promise<ReplaceWorkersTypes<P>> : T extends (...args: infer P) => infer R ? (...args: ReplaceWorkersTypes<P>) => ReplaceWorkersTypes<R> : T extends object ? {
3875
+ export declare type ReplaceWorkersTypes<T> = T extends Request_4 ? Request_2 : T extends Response_4 ? Response_2 : T extends ReadableStream_2 ? ReadableStream_3 : Required<T> extends Required<RequestInit_4> ? RequestInit_2 : T extends Headers_3 ? Headers_2 : T extends Blob_2 ? Blob_3 : T extends AbortSignal_2 ? AbortSignal : T extends Promise<infer P> ? Promise<ReplaceWorkersTypes<P>> : T extends (...args: infer P) => infer R ? (...args: ReplaceWorkersTypes<P>) => ReplaceWorkersTypes<R> : T extends object ? {
3583
3876
  [K in keyof T]: OverloadReplaceWorkersTypes<T[K]>;
3584
3877
  } : T;
3585
3878
 
3586
- export declare class Request<CfType extends RequestInitCfType = RequestInitCfType> extends Request_2 {
3879
+ declare class Request_2<CfType extends RequestInitCfType = RequestInitCfType> extends Request_3 {
3587
3880
  [kCf]?: CfType;
3588
- constructor(input: RequestInfo, init?: RequestInit<CfType>);
3881
+ constructor(input: RequestInfo, init?: RequestInit_2<CfType>);
3589
3882
  get cf(): CfType | undefined;
3590
3883
  /** @ts-expect-error `clone` is actually defined as a method internally */
3591
- clone(): Request<CfType>;
3884
+ clone(): Request_2<CfType>;
3592
3885
  }
3886
+ export { Request_2 as Request }
3593
3887
 
3594
3888
  export { RequestCache }
3595
3889
 
@@ -3599,11 +3893,12 @@ export { RequestDestination }
3599
3893
 
3600
3894
  export { RequestDuplex }
3601
3895
 
3602
- export declare type RequestInfo = RequestInfo_2 | Request;
3896
+ export declare type RequestInfo = RequestInfo_2 | Request_2;
3603
3897
 
3604
- export declare interface RequestInit<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_2 {
3898
+ declare interface RequestInit_2<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_3 {
3605
3899
  cf?: CfType;
3606
3900
  }
3901
+ export { RequestInit_2 as RequestInit }
3607
3902
 
3608
3903
  export declare type RequestInitCfType = Partial<IncomingRequestCfProperties> | RequestInitCfProperties;
3609
3904
 
@@ -3611,22 +3906,24 @@ export { RequestMode }
3611
3906
 
3612
3907
  export { RequestRedirect }
3613
3908
 
3614
- export declare class Response extends Response_2 {
3909
+ declare class Response_2 extends Response_3 {
3615
3910
  readonly [kWebSocket]: WebSocket | null;
3616
- static error(): Response;
3617
- static redirect(url: string | URL, status: ResponseRedirectStatus): Response;
3618
- static json(data: any, init?: ResponseInit): Response;
3619
- constructor(body?: BodyInit, init?: ResponseInit);
3911
+ static error(): Response_2;
3912
+ static redirect(url: string | URL, status: ResponseRedirectStatus): Response_2;
3913
+ static json(data: any, init?: ResponseInit_2): Response_2;
3914
+ constructor(body?: BodyInit, init?: ResponseInit_2);
3620
3915
  /** @ts-expect-error `status` is actually defined as a getter internally */
3621
3916
  get status(): number;
3622
3917
  get webSocket(): WebSocket | null;
3623
3918
  /** @ts-expect-error `clone` is actually defined as a method internally */
3624
- clone(): Response;
3919
+ clone(): Response_2;
3625
3920
  }
3921
+ export { Response_2 as Response }
3626
3922
 
3627
- export declare interface ResponseInit extends ResponseInit_2 {
3923
+ declare interface ResponseInit_2 extends ResponseInit_3 {
3628
3924
  webSocket?: WebSocket | null;
3629
3925
  }
3926
+ export { ResponseInit_2 as ResponseInit }
3630
3927
 
3631
3928
  export { ResponseRedirectStatus }
3632
3929
 
@@ -3637,14 +3934,6 @@ export declare class RouterError extends MiniflareError<RouterErrorCode> {
3637
3934
 
3638
3935
  export declare type RouterErrorCode = "ERR_QUERY_STRING" | "ERR_INFIX_WILDCARD";
3639
3936
 
3640
- export declare const RoutingConfigSchema: z.ZodObject<{
3641
- hasUserWorker: z.ZodBoolean;
3642
- }, "strip", z.ZodTypeAny, {
3643
- hasUserWorker: boolean;
3644
- }, {
3645
- hasUserWorker: boolean;
3646
- }>;
3647
-
3648
3937
  export declare class Runtime {
3649
3938
  #private;
3650
3939
  updateConfig(configBuffer: Buffer, options: Abortable & RuntimeOptions): Promise<SocketPorts | undefined>;
@@ -3717,7 +4006,7 @@ export declare const SharedHeaders: {
3717
4006
  readonly LOG_LEVEL: "MF-Log-Level";
3718
4007
  };
3719
4008
 
3720
- export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions>;
4009
+ export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions> & z.input<typeof WORKFLOWS_PLUGIN.sharedOptions>;
3721
4010
 
3722
4011
  export declare const SiteBindings: {
3723
4012
  readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT";
@@ -3954,7 +4243,7 @@ export declare class WebSocket extends TypedEventTarget<WebSocketEventMap> {
3954
4243
  }
3955
4244
 
3956
4245
  export declare type WebSocketEventMap = {
3957
- message: MessageEvent;
4246
+ message: MessageEvent_2;
3958
4247
  close: CloseEvent;
3959
4248
  error: ErrorEvent;
3960
4249
  };
@@ -4127,6 +4416,7 @@ export declare interface Worker_Binding_WrappedBinding {
4127
4416
  export declare type Worker_DurableObjectNamespace = {
4128
4417
  className?: string;
4129
4418
  preventEviction?: boolean;
4419
+ enableSql?: boolean;
4130
4420
  } & ({
4131
4421
  uniqueKey?: string;
4132
4422
  } | {
@@ -4163,7 +4453,7 @@ export declare type Worker_Module = {
4163
4453
  pythonRequirement?: string;
4164
4454
  });
4165
4455
 
4166
- export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options>;
4456
+ export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options> & z.input<typeof WORKFLOWS_PLUGIN.options>;
4167
4457
 
4168
4458
  export declare interface WorkerRoute {
4169
4459
  target: string;
@@ -4176,6 +4466,48 @@ export declare interface WorkerRoute {
4176
4466
  allowPathSuffix: boolean;
4177
4467
  }
4178
4468
 
4469
+ export declare const WORKFLOWS_PLUGIN: Plugin<typeof WorkflowsOptionsSchema, typeof WorkflowsSharedOptionsSchema>;
4470
+
4471
+ export declare const WORKFLOWS_PLUGIN_NAME = "workflows";
4472
+
4473
+ export declare const WORKFLOWS_STORAGE_SERVICE_NAME = "workflows:storage";
4474
+
4475
+ export declare const WorkflowsOptionsSchema: z.ZodObject<{
4476
+ workflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4477
+ name: z.ZodString;
4478
+ className: z.ZodString;
4479
+ scriptName: z.ZodOptional<z.ZodString>;
4480
+ }, "strip", z.ZodTypeAny, {
4481
+ name: string;
4482
+ className: string;
4483
+ scriptName?: string | undefined;
4484
+ }, {
4485
+ name: string;
4486
+ className: string;
4487
+ scriptName?: string | undefined;
4488
+ }>>>;
4489
+ }, "strip", z.ZodTypeAny, {
4490
+ workflows?: Record<string, {
4491
+ name: string;
4492
+ className: string;
4493
+ scriptName?: string | undefined;
4494
+ }> | undefined;
4495
+ }, {
4496
+ workflows?: Record<string, {
4497
+ name: string;
4498
+ className: string;
4499
+ scriptName?: string | undefined;
4500
+ }> | undefined;
4501
+ }>;
4502
+
4503
+ export declare const WorkflowsSharedOptionsSchema: z.ZodObject<{
4504
+ workflowsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
4505
+ }, "strip", z.ZodTypeAny, {
4506
+ workflowsPersist?: string | boolean | undefined;
4507
+ }, {
4508
+ workflowsPersist?: string | boolean | undefined;
4509
+ }>;
4510
+
4179
4511
  export declare type WrappedBindingNames = Set<string>;
4180
4512
 
4181
4513
  export declare function zAwaitable<T extends z.ZodTypeAny>(type: T): z.ZodUnion<[T, z.ZodPromise<T>]>;