miniflare 0.0.0-e4fe35cc5 → 0.0.0-e5ebdb143

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,78 +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<{
73
+ directory: z.ZodEffects<z.ZodString, string, string>;
74
+ binding: z.ZodOptional<z.ZodString>;
75
+ routingConfig: z.ZodOptional<z.ZodObject<{
69
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
79
  has_user_worker?: boolean;
80
+ invoke_user_worker_ahead_of_assets?: boolean;
72
81
  }, {
73
82
  has_user_worker?: boolean;
74
- }>;
75
- assetConfig: z.ZodObject<{
83
+ invoke_user_worker_ahead_of_assets?: boolean;
84
+ }>>;
85
+ assetConfig: z.ZodOptional<z.ZodObject<{
76
86
  html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
77
87
  not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
88
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
78
89
  }, "strip", z.ZodTypeAny, {
79
90
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
80
91
  not_found_handling?: "none" | "single-page-application" | "404-page";
92
+ serve_directly?: boolean;
81
93
  }, {
82
94
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
83
95
  not_found_handling?: "none" | "single-page-application" | "404-page";
84
- }>;
96
+ serve_directly?: boolean;
97
+ }>>;
85
98
  }, "strip", z.ZodTypeAny, {
86
- path: string;
87
- routingConfig: {
99
+ directory: string;
100
+ workerName?: string | undefined;
101
+ binding?: string | undefined;
102
+ routingConfig?: {
88
103
  has_user_worker?: boolean;
89
- };
90
- assetConfig: {
104
+ invoke_user_worker_ahead_of_assets?: boolean;
105
+ } | undefined;
106
+ assetConfig?: {
91
107
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
92
108
  not_found_handling?: "none" | "single-page-application" | "404-page";
93
- };
94
- workerName?: string | undefined;
95
- bindingName?: string | undefined;
109
+ serve_directly?: boolean;
110
+ } | undefined;
96
111
  }, {
97
- path: string;
98
- routingConfig: {
112
+ directory: string;
113
+ workerName?: string | undefined;
114
+ binding?: string | undefined;
115
+ routingConfig?: {
99
116
  has_user_worker?: boolean;
100
- };
101
- assetConfig: {
117
+ invoke_user_worker_ahead_of_assets?: boolean;
118
+ } | undefined;
119
+ assetConfig?: {
102
120
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
103
121
  not_found_handling?: "none" | "single-page-application" | "404-page";
104
- };
105
- workerName?: string | undefined;
106
- bindingName?: string | undefined;
122
+ serve_directly?: boolean;
123
+ } | undefined;
107
124
  }>>;
108
125
  }, "strip", z.ZodTypeAny, {
109
126
  assets?: {
110
- path: string;
111
- routingConfig: {
127
+ directory: string;
128
+ workerName?: string | undefined;
129
+ binding?: string | undefined;
130
+ routingConfig?: {
112
131
  has_user_worker?: boolean;
113
- };
114
- assetConfig: {
132
+ invoke_user_worker_ahead_of_assets?: boolean;
133
+ } | undefined;
134
+ assetConfig?: {
115
135
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
116
136
  not_found_handling?: "none" | "single-page-application" | "404-page";
117
- };
118
- workerName?: string | undefined;
119
- bindingName?: string | undefined;
137
+ serve_directly?: boolean;
138
+ } | undefined;
120
139
  } | undefined;
121
140
  }, {
122
141
  assets?: {
123
- path: string;
124
- routingConfig: {
142
+ directory: string;
143
+ workerName?: string | undefined;
144
+ binding?: string | undefined;
145
+ routingConfig?: {
125
146
  has_user_worker?: boolean;
126
- };
127
- assetConfig: {
147
+ invoke_user_worker_ahead_of_assets?: boolean;
148
+ } | undefined;
149
+ assetConfig?: {
128
150
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
129
151
  not_found_handling?: "none" | "single-page-application" | "404-page";
130
- };
131
- workerName?: string | undefined;
132
- bindingName?: string | undefined;
152
+ serve_directly?: boolean;
153
+ } | undefined;
133
154
  } | undefined;
134
155
  }>;
135
156
 
@@ -141,7 +162,19 @@ export declare function base64Encode(value: string): string;
141
162
 
142
163
  export { BodyInit }
143
164
 
144
- 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
+ }>;
145
178
 
146
179
  export declare const CACHE_PLUGIN: Plugin<typeof CacheOptionsSchema, typeof CacheSharedOptionsSchema>;
147
180
 
@@ -493,7 +526,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
493
526
  path: string;
494
527
  writable?: boolean | undefined;
495
528
  };
496
- }>, 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>>]>>>;
497
530
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
498
531
  scriptName: z.ZodString;
499
532
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -645,7 +678,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
645
678
  path: string;
646
679
  writable?: boolean | undefined;
647
680
  };
648
- }>, 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>>]>>;
649
682
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent.Options>, z.ZodTypeDef, MockAgent<MockAgent.Options>>>;
650
683
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
651
684
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -666,6 +699,10 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
666
699
  }>, "many">>;
667
700
  unsafeEvalBinding: z.ZodOptional<z.ZodString>;
668
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>;
669
706
  }, "strip", z.ZodTypeAny, {
670
707
  name?: string | undefined;
671
708
  rootPath?: undefined;
@@ -702,7 +739,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
702
739
  path: string;
703
740
  writable?: boolean | undefined;
704
741
  };
705
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
742
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
706
743
  wrappedBindings?: Record<string, string | {
707
744
  scriptName: string;
708
745
  entrypoint?: string | undefined;
@@ -734,7 +771,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
734
771
  path: string;
735
772
  writable?: boolean | undefined;
736
773
  };
737
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
774
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
738
775
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
739
776
  unsafeEphemeralDurableObjects?: boolean | undefined;
740
777
  unsafeDirectSockets?: {
@@ -745,6 +782,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
745
782
  }[] | undefined;
746
783
  unsafeEvalBinding?: string | undefined;
747
784
  unsafeUseModuleFallbackService?: boolean | undefined;
785
+ hasAssetsAndIsVitest?: boolean | undefined;
748
786
  }, {
749
787
  name?: string | undefined;
750
788
  rootPath?: string | undefined;
@@ -781,7 +819,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
781
819
  path: string;
782
820
  writable?: boolean | undefined;
783
821
  };
784
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
822
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
785
823
  wrappedBindings?: Record<string, string | {
786
824
  scriptName: string;
787
825
  entrypoint?: string | undefined;
@@ -813,7 +851,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
813
851
  path: string;
814
852
  writable?: boolean | undefined;
815
853
  };
816
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
854
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
817
855
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
818
856
  unsafeEphemeralDurableObjects?: boolean | undefined;
819
857
  unsafeDirectSockets?: {
@@ -824,6 +862,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
824
862
  }[] | undefined;
825
863
  unsafeEvalBinding?: string | undefined;
826
864
  unsafeUseModuleFallbackService?: boolean | undefined;
865
+ hasAssetsAndIsVitest?: boolean | undefined;
827
866
  }>>, ({
828
867
  modules: {
829
868
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -867,7 +906,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
867
906
  path: string;
868
907
  writable?: boolean | undefined;
869
908
  };
870
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
909
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
871
910
  wrappedBindings?: Record<string, string | {
872
911
  scriptName: string;
873
912
  entrypoint?: string | undefined;
@@ -899,7 +938,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
899
938
  path: string;
900
939
  writable?: boolean | undefined;
901
940
  };
902
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
941
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
903
942
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
904
943
  unsafeEphemeralDurableObjects?: boolean | undefined;
905
944
  unsafeDirectSockets?: {
@@ -910,6 +949,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
910
949
  }[] | undefined;
911
950
  unsafeEvalBinding?: string | undefined;
912
951
  unsafeUseModuleFallbackService?: boolean | undefined;
952
+ hasAssetsAndIsVitest?: boolean | undefined;
913
953
  }) | ({
914
954
  script: string;
915
955
  scriptPath?: string | undefined;
@@ -956,7 +996,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
956
996
  path: string;
957
997
  writable?: boolean | undefined;
958
998
  };
959
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
999
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
960
1000
  wrappedBindings?: Record<string, string | {
961
1001
  scriptName: string;
962
1002
  entrypoint?: string | undefined;
@@ -988,7 +1028,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
988
1028
  path: string;
989
1029
  writable?: boolean | undefined;
990
1030
  };
991
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1031
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
992
1032
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
993
1033
  unsafeEphemeralDurableObjects?: boolean | undefined;
994
1034
  unsafeDirectSockets?: {
@@ -999,6 +1039,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
999
1039
  }[] | undefined;
1000
1040
  unsafeEvalBinding?: string | undefined;
1001
1041
  unsafeUseModuleFallbackService?: boolean | undefined;
1042
+ hasAssetsAndIsVitest?: boolean | undefined;
1002
1043
  }) | ({
1003
1044
  scriptPath: string;
1004
1045
  modules?: boolean | undefined;
@@ -1044,7 +1085,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1044
1085
  path: string;
1045
1086
  writable?: boolean | undefined;
1046
1087
  };
1047
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1088
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
1048
1089
  wrappedBindings?: Record<string, string | {
1049
1090
  scriptName: string;
1050
1091
  entrypoint?: string | undefined;
@@ -1076,7 +1117,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1076
1117
  path: string;
1077
1118
  writable?: boolean | undefined;
1078
1119
  };
1079
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1120
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1080
1121
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1081
1122
  unsafeEphemeralDurableObjects?: boolean | undefined;
1082
1123
  unsafeDirectSockets?: {
@@ -1087,6 +1128,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1087
1128
  }[] | undefined;
1088
1129
  unsafeEvalBinding?: string | undefined;
1089
1130
  unsafeUseModuleFallbackService?: boolean | undefined;
1131
+ hasAssetsAndIsVitest?: boolean | undefined;
1090
1132
  }), ({
1091
1133
  modules: {
1092
1134
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -1149,7 +1191,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1149
1191
  path: string;
1150
1192
  writable?: boolean | undefined;
1151
1193
  };
1152
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1194
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
1153
1195
  wrappedBindings?: Record<string, string | {
1154
1196
  scriptName: string;
1155
1197
  entrypoint?: string | undefined;
@@ -1181,7 +1223,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1181
1223
  path: string;
1182
1224
  writable?: boolean | undefined;
1183
1225
  };
1184
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1226
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1185
1227
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1186
1228
  unsafeEphemeralDurableObjects?: boolean | undefined;
1187
1229
  unsafeDirectSockets?: {
@@ -1192,6 +1234,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1192
1234
  }[] | undefined;
1193
1235
  unsafeEvalBinding?: string | undefined;
1194
1236
  unsafeUseModuleFallbackService?: boolean | undefined;
1237
+ hasAssetsAndIsVitest?: boolean | undefined;
1195
1238
  }>;
1196
1239
 
1197
1240
  export declare const CoreSharedOptionsSchema: z.ZodObject<{
@@ -1211,7 +1254,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1211
1254
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
1212
1255
  liveReload: z.ZodOptional<z.ZodBoolean>;
1213
1256
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
1214
- 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>>>;
1215
1258
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
1216
1259
  }, "strip", z.ZodTypeAny, {
1217
1260
  rootPath?: undefined;
@@ -1230,7 +1273,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1230
1273
  cf?: string | boolean | Record<string, any> | undefined;
1231
1274
  liveReload?: boolean | undefined;
1232
1275
  unsafeProxySharedSecret?: string | undefined;
1233
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1276
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1234
1277
  unsafeStickyBlobs?: boolean | undefined;
1235
1278
  }, {
1236
1279
  rootPath?: string | undefined;
@@ -1249,7 +1292,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1249
1292
  cf?: string | boolean | Record<string, any> | undefined;
1250
1293
  liveReload?: boolean | undefined;
1251
1294
  unsafeProxySharedSecret?: string | undefined;
1252
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1295
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
1253
1296
  unsafeStickyBlobs?: boolean | undefined;
1254
1297
  }>;
1255
1298
 
@@ -1304,7 +1347,7 @@ export declare interface DiskDirectory {
1304
1347
  writable?: boolean;
1305
1348
  }
1306
1349
 
1307
- 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>;
1308
1351
 
1309
1352
  /**
1310
1353
  * Dispatcher created for each `dispatchFetch()` call. Ensures request origin
@@ -1402,8 +1445,6 @@ export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{
1402
1445
 
1403
1446
  export declare function encodeSitesKey(key: string): string;
1404
1447
 
1405
- export declare const ENTRY_SOCKET_HTTP_OPTIONS: HttpOptions;
1406
-
1407
1448
  export declare class ErrorEvent extends Event {
1408
1449
  readonly error: Error | null;
1409
1450
  constructor(type: "error", init?: {
@@ -1442,7 +1483,8 @@ export declare interface ExternalServer_Tcp {
1442
1483
  certificateHost?: string;
1443
1484
  }
1444
1485
 
1445
- 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 }
1446
1488
 
1447
1489
  export { File }
1448
1490
 
@@ -1450,7 +1492,7 @@ export declare function _forceColour(enabled?: boolean): void;
1450
1492
 
1451
1493
  export declare function formatZodError(error: z.ZodError, input: unknown): string;
1452
1494
 
1453
- export { FormData }
1495
+ export { FormData_2 as FormData }
1454
1496
 
1455
1497
  export declare function getAccessibleHosts(ipv4Only?: boolean): string[];
1456
1498
 
@@ -1475,6 +1517,30 @@ export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fall
1475
1517
 
1476
1518
  export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[];
1477
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
+
1478
1544
  export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
1479
1545
 
1480
1546
  export declare function getRootPath(opts: unknown): string;
@@ -1490,7 +1556,7 @@ export declare interface GlobalServicesOptions {
1490
1556
 
1491
1557
  export declare function globsToRegExps(globs?: string[]): MatcherRegExps;
1492
1558
 
1493
- export { Headers }
1559
+ export { Headers_2 as Headers }
1494
1560
 
1495
1561
  export { HeadersInit }
1496
1562
 
@@ -1673,6 +1739,11 @@ export declare interface LogOptions {
1673
1739
  suffix?: string;
1674
1740
  }
1675
1741
 
1742
+ export declare type ManifestEntry = {
1743
+ pathHash: Uint8Array;
1744
+ contentHash: Uint8Array;
1745
+ };
1746
+
1676
1747
  export declare interface MatcherRegExps {
1677
1748
  include: RegExp[];
1678
1749
  exclude: RegExp[];
@@ -1691,12 +1762,13 @@ export declare function maybeParseURL(url: Persistence): URL | undefined;
1691
1762
  */
1692
1763
  export declare function mergeWorkerOptions(a: Partial<WorkerOptions>, b: Partial<WorkerOptions>): Partial<WorkerOptions>;
1693
1764
 
1694
- export declare class MessageEvent extends Event {
1765
+ declare class MessageEvent_2 extends Event {
1695
1766
  readonly data: ArrayBuffer | string;
1696
1767
  constructor(type: "message", init: {
1697
1768
  data: ArrayBuffer | string;
1698
1769
  });
1699
1770
  }
1771
+ export { MessageEvent_2 as MessageEvent }
1700
1772
 
1701
1773
  export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise<void>;
1702
1774
 
@@ -1795,7 +1867,18 @@ export declare interface Network {
1795
1867
  tlsOptions?: TlsOptions;
1796
1868
  }
1797
1869
 
1798
- 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;
1799
1882
 
1800
1883
  export declare class NoOpLog extends Log {
1801
1884
  constructor();
@@ -1916,9 +1999,9 @@ export declare const PersistenceSchema: z.ZodOptional<z.ZodUnion<[z.ZodBoolean,
1916
1999
  export declare interface PlatformImpl<RS> {
1917
2000
  Blob: typeof Blob_2;
1918
2001
  File: typeof File_2;
1919
- Headers: typeof Headers_2;
1920
- Request: typeof Request_3;
1921
- Response: typeof Response_3;
2002
+ Headers: typeof Headers_3;
2003
+ Request: typeof Request_4;
2004
+ Response: typeof Response_4;
1922
2005
  isReadableStream(value: unknown): value is RS;
1923
2006
  bufferReadableStream(stream: RS): Promise<ArrayBuffer>;
1924
2007
  unbufferReadableStream(buffer: ArrayBuffer): RS;
@@ -2191,7 +2274,7 @@ export declare const PLUGINS: {
2191
2274
  path: string;
2192
2275
  writable?: boolean | undefined;
2193
2276
  };
2194
- }>, 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>>]>>>;
2195
2278
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
2196
2279
  scriptName: z.ZodString;
2197
2280
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -2343,7 +2426,7 @@ export declare const PLUGINS: {
2343
2426
  path: string;
2344
2427
  writable?: boolean | undefined;
2345
2428
  };
2346
- }>, 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>>]>>;
2347
2430
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent>, z.ZodTypeDef, MockAgent<MockAgent>>>;
2348
2431
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
2349
2432
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2364,6 +2447,7 @@ export declare const PLUGINS: {
2364
2447
  }>, "many">>;
2365
2448
  unsafeEvalBinding: z.ZodOptional<z.ZodString>;
2366
2449
  unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
2450
+ hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
2367
2451
  }, "strip", z.ZodTypeAny, {
2368
2452
  name?: string | undefined;
2369
2453
  rootPath?: undefined;
@@ -2400,7 +2484,7 @@ export declare const PLUGINS: {
2400
2484
  path: string;
2401
2485
  writable?: boolean | undefined;
2402
2486
  };
2403
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2487
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2404
2488
  wrappedBindings?: Record<string, string | {
2405
2489
  scriptName: string;
2406
2490
  entrypoint?: string | undefined;
@@ -2432,7 +2516,7 @@ export declare const PLUGINS: {
2432
2516
  path: string;
2433
2517
  writable?: boolean | undefined;
2434
2518
  };
2435
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2519
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2436
2520
  fetchMock?: MockAgent<MockAgent> | undefined;
2437
2521
  unsafeEphemeralDurableObjects?: boolean | undefined;
2438
2522
  unsafeDirectSockets?: {
@@ -2443,6 +2527,7 @@ export declare const PLUGINS: {
2443
2527
  }[] | undefined;
2444
2528
  unsafeEvalBinding?: string | undefined;
2445
2529
  unsafeUseModuleFallbackService?: boolean | undefined;
2530
+ hasAssetsAndIsVitest?: boolean | undefined;
2446
2531
  }, {
2447
2532
  name?: string | undefined;
2448
2533
  rootPath?: string | undefined;
@@ -2479,7 +2564,7 @@ export declare const PLUGINS: {
2479
2564
  path: string;
2480
2565
  writable?: boolean | undefined;
2481
2566
  };
2482
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2567
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2483
2568
  wrappedBindings?: Record<string, string | {
2484
2569
  scriptName: string;
2485
2570
  entrypoint?: string | undefined;
@@ -2511,7 +2596,7 @@ export declare const PLUGINS: {
2511
2596
  path: string;
2512
2597
  writable?: boolean | undefined;
2513
2598
  };
2514
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2599
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2515
2600
  fetchMock?: MockAgent<MockAgent> | undefined;
2516
2601
  unsafeEphemeralDurableObjects?: boolean | undefined;
2517
2602
  unsafeDirectSockets?: {
@@ -2522,6 +2607,7 @@ export declare const PLUGINS: {
2522
2607
  }[] | undefined;
2523
2608
  unsafeEvalBinding?: string | undefined;
2524
2609
  unsafeUseModuleFallbackService?: boolean | undefined;
2610
+ hasAssetsAndIsVitest?: boolean | undefined;
2525
2611
  }>>, ({
2526
2612
  modules: {
2527
2613
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -2565,7 +2651,7 @@ export declare const PLUGINS: {
2565
2651
  path: string;
2566
2652
  writable?: boolean | undefined;
2567
2653
  };
2568
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2654
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2569
2655
  wrappedBindings?: Record<string, string | {
2570
2656
  scriptName: string;
2571
2657
  entrypoint?: string | undefined;
@@ -2597,7 +2683,7 @@ export declare const PLUGINS: {
2597
2683
  path: string;
2598
2684
  writable?: boolean | undefined;
2599
2685
  };
2600
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2686
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2601
2687
  fetchMock?: MockAgent<MockAgent> | undefined;
2602
2688
  unsafeEphemeralDurableObjects?: boolean | undefined;
2603
2689
  unsafeDirectSockets?: {
@@ -2608,6 +2694,7 @@ export declare const PLUGINS: {
2608
2694
  }[] | undefined;
2609
2695
  unsafeEvalBinding?: string | undefined;
2610
2696
  unsafeUseModuleFallbackService?: boolean | undefined;
2697
+ hasAssetsAndIsVitest?: boolean | undefined;
2611
2698
  }) | ({
2612
2699
  script: string;
2613
2700
  scriptPath?: string | undefined;
@@ -2654,7 +2741,7 @@ export declare const PLUGINS: {
2654
2741
  path: string;
2655
2742
  writable?: boolean | undefined;
2656
2743
  };
2657
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2744
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2658
2745
  wrappedBindings?: Record<string, string | {
2659
2746
  scriptName: string;
2660
2747
  entrypoint?: string | undefined;
@@ -2686,7 +2773,7 @@ export declare const PLUGINS: {
2686
2773
  path: string;
2687
2774
  writable?: boolean | undefined;
2688
2775
  };
2689
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2776
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2690
2777
  fetchMock?: MockAgent<MockAgent> | undefined;
2691
2778
  unsafeEphemeralDurableObjects?: boolean | undefined;
2692
2779
  unsafeDirectSockets?: {
@@ -2697,6 +2784,7 @@ export declare const PLUGINS: {
2697
2784
  }[] | undefined;
2698
2785
  unsafeEvalBinding?: string | undefined;
2699
2786
  unsafeUseModuleFallbackService?: boolean | undefined;
2787
+ hasAssetsAndIsVitest?: boolean | undefined;
2700
2788
  }) | ({
2701
2789
  scriptPath: string;
2702
2790
  modules?: boolean | undefined;
@@ -2742,7 +2830,7 @@ export declare const PLUGINS: {
2742
2830
  path: string;
2743
2831
  writable?: boolean | undefined;
2744
2832
  };
2745
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2833
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2746
2834
  wrappedBindings?: Record<string, string | {
2747
2835
  scriptName: string;
2748
2836
  entrypoint?: string | undefined;
@@ -2774,7 +2862,7 @@ export declare const PLUGINS: {
2774
2862
  path: string;
2775
2863
  writable?: boolean | undefined;
2776
2864
  };
2777
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2865
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2778
2866
  fetchMock?: MockAgent<MockAgent> | undefined;
2779
2867
  unsafeEphemeralDurableObjects?: boolean | undefined;
2780
2868
  unsafeDirectSockets?: {
@@ -2785,6 +2873,7 @@ export declare const PLUGINS: {
2785
2873
  }[] | undefined;
2786
2874
  unsafeEvalBinding?: string | undefined;
2787
2875
  unsafeUseModuleFallbackService?: boolean | undefined;
2876
+ hasAssetsAndIsVitest?: boolean | undefined;
2788
2877
  }), ({
2789
2878
  modules: {
2790
2879
  type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -2847,7 +2936,7 @@ export declare const PLUGINS: {
2847
2936
  path: string;
2848
2937
  writable?: boolean | undefined;
2849
2938
  };
2850
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2939
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
2851
2940
  wrappedBindings?: Record<string, string | {
2852
2941
  scriptName: string;
2853
2942
  entrypoint?: string | undefined;
@@ -2879,7 +2968,7 @@ export declare const PLUGINS: {
2879
2968
  path: string;
2880
2969
  writable?: boolean | undefined;
2881
2970
  };
2882
- } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2971
+ } | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2883
2972
  fetchMock?: MockAgent<MockAgent> | undefined;
2884
2973
  unsafeEphemeralDurableObjects?: boolean | undefined;
2885
2974
  unsafeDirectSockets?: {
@@ -2890,6 +2979,7 @@ export declare const PLUGINS: {
2890
2979
  }[] | undefined;
2891
2980
  unsafeEvalBinding?: string | undefined;
2892
2981
  unsafeUseModuleFallbackService?: boolean | undefined;
2982
+ hasAssetsAndIsVitest?: boolean | undefined;
2893
2983
  }>, z.ZodObject<{
2894
2984
  rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
2895
2985
  host: z.ZodOptional<z.ZodString>;
@@ -2907,7 +2997,7 @@ export declare const PLUGINS: {
2907
2997
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
2908
2998
  liveReload: z.ZodOptional<z.ZodBoolean>;
2909
2999
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
2910
- 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>>>;
2911
3001
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
2912
3002
  }, "strip", z.ZodTypeAny, {
2913
3003
  rootPath?: undefined;
@@ -2926,7 +3016,7 @@ export declare const PLUGINS: {
2926
3016
  cf?: string | boolean | Record<string, any> | undefined;
2927
3017
  liveReload?: boolean | undefined;
2928
3018
  unsafeProxySharedSecret?: string | undefined;
2929
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3019
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2930
3020
  unsafeStickyBlobs?: boolean | undefined;
2931
3021
  }, {
2932
3022
  rootPath?: string | undefined;
@@ -2945,7 +3035,7 @@ export declare const PLUGINS: {
2945
3035
  cf?: string | boolean | Record<string, any> | undefined;
2946
3036
  liveReload?: boolean | undefined;
2947
3037
  unsafeProxySharedSecret?: string | undefined;
2948
- unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3038
+ unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
2949
3039
  unsafeStickyBlobs?: boolean | undefined;
2950
3040
  }>>;
2951
3041
  cache: Plugin<z.ZodObject<{
@@ -3053,22 +3143,39 @@ export declare const PLUGINS: {
3053
3143
  queueName: string;
3054
3144
  deliveryDelay?: number | undefined;
3055
3145
  }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3056
- 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<{
3057
3147
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3058
3148
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3059
3149
  maxRetires: z.ZodOptional<z.ZodNumber>;
3150
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3060
3151
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3061
3152
  retryDelay: z.ZodOptional<z.ZodNumber>;
3062
3153
  }, "strip", z.ZodTypeAny, {
3063
3154
  maxBatchSize?: number | undefined;
3064
3155
  maxBatchTimeout?: number | undefined;
3065
3156
  maxRetires?: number | undefined;
3157
+ maxRetries?: number | undefined;
3066
3158
  deadLetterQueue?: string | undefined;
3067
3159
  retryDelay?: number | undefined;
3068
3160
  }, {
3069
3161
  maxBatchSize?: number | undefined;
3070
3162
  maxBatchTimeout?: number | undefined;
3071
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;
3072
3179
  deadLetterQueue?: string | undefined;
3073
3180
  retryDelay?: number | undefined;
3074
3181
  }>>, z.ZodArray<z.ZodString, "many">]>>;
@@ -3077,13 +3184,14 @@ export declare const PLUGINS: {
3077
3184
  queueName: string;
3078
3185
  deliveryDelay?: number | undefined;
3079
3186
  }> | undefined;
3080
- queueConsumers?: string[] | Record<string, {
3187
+ queueConsumers?: string[] | Record<string, Omit<{
3081
3188
  maxBatchSize?: number | undefined;
3082
3189
  maxBatchTimeout?: number | undefined;
3083
3190
  maxRetires?: number | undefined;
3191
+ maxRetries?: number | undefined;
3084
3192
  deadLetterQueue?: string | undefined;
3085
3193
  retryDelay?: number | undefined;
3086
- }> | undefined;
3194
+ }, "maxRetires">> | undefined;
3087
3195
  }, {
3088
3196
  queueProducers?: string[] | Record<string, string> | Record<string, {
3089
3197
  queueName: string;
@@ -3093,6 +3201,7 @@ export declare const PLUGINS: {
3093
3201
  maxBatchSize?: number | undefined;
3094
3202
  maxBatchTimeout?: number | undefined;
3095
3203
  maxRetires?: number | undefined;
3204
+ maxRetries?: number | undefined;
3096
3205
  deadLetterQueue?: string | undefined;
3097
3206
  retryDelay?: number | undefined;
3098
3207
  }> | undefined;
@@ -3158,74 +3267,121 @@ export declare const PLUGINS: {
3158
3267
  assets: Plugin<z.ZodObject<{
3159
3268
  assets: z.ZodOptional<z.ZodObject<{
3160
3269
  workerName: z.ZodOptional<z.ZodString>;
3161
- path: z.ZodEffects<z.ZodString, string, string>;
3162
- bindingName: z.ZodOptional<z.ZodString>;
3163
- routingConfig: z.ZodObject<{
3270
+ directory: z.ZodEffects<z.ZodString, string, string>;
3271
+ binding: z.ZodOptional<z.ZodString>;
3272
+ routingConfig: z.ZodOptional<z.ZodObject<{
3164
3273
  has_user_worker: z.ZodOptional<z.ZodBoolean>;
3274
+ invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
3165
3275
  }, "strip", z.ZodTypeAny, {
3166
3276
  has_user_worker?: boolean;
3277
+ invoke_user_worker_ahead_of_assets?: boolean;
3167
3278
  }, {
3168
3279
  has_user_worker?: boolean;
3169
- }>;
3170
- assetConfig: z.ZodObject<{
3280
+ invoke_user_worker_ahead_of_assets?: boolean;
3281
+ }>>;
3282
+ assetConfig: z.ZodOptional<z.ZodObject<{
3171
3283
  html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
3172
3284
  not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
3285
+ serve_directly: z.ZodOptional<z.ZodBoolean>;
3173
3286
  }, "strip", z.ZodTypeAny, {
3174
3287
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3175
3288
  not_found_handling?: "none" | "single-page-application" | "404-page";
3289
+ serve_directly?: boolean;
3176
3290
  }, {
3177
3291
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3178
3292
  not_found_handling?: "none" | "single-page-application" | "404-page";
3179
- }>;
3293
+ serve_directly?: boolean;
3294
+ }>>;
3180
3295
  }, "strip", z.ZodTypeAny, {
3181
- path: string;
3182
- routingConfig: {
3296
+ directory: string;
3297
+ workerName?: string | undefined;
3298
+ binding?: string | undefined;
3299
+ routingConfig?: {
3183
3300
  has_user_worker?: boolean;
3184
- };
3185
- assetConfig: {
3301
+ invoke_user_worker_ahead_of_assets?: boolean;
3302
+ } | undefined;
3303
+ assetConfig?: {
3186
3304
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3187
3305
  not_found_handling?: "none" | "single-page-application" | "404-page";
3188
- };
3189
- workerName?: string | undefined;
3190
- bindingName?: string | undefined;
3306
+ serve_directly?: boolean;
3307
+ } | undefined;
3191
3308
  }, {
3192
- path: string;
3193
- routingConfig: {
3309
+ directory: string;
3310
+ workerName?: string | undefined;
3311
+ binding?: string | undefined;
3312
+ routingConfig?: {
3194
3313
  has_user_worker?: boolean;
3195
- };
3196
- assetConfig: {
3314
+ invoke_user_worker_ahead_of_assets?: boolean;
3315
+ } | undefined;
3316
+ assetConfig?: {
3197
3317
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3198
3318
  not_found_handling?: "none" | "single-page-application" | "404-page";
3199
- };
3200
- workerName?: string | undefined;
3201
- bindingName?: string | undefined;
3319
+ serve_directly?: boolean;
3320
+ } | undefined;
3202
3321
  }>>;
3203
3322
  }, "strip", z.ZodTypeAny, {
3204
3323
  assets?: {
3205
- path: string;
3206
- routingConfig: {
3324
+ directory: string;
3325
+ workerName?: string | undefined;
3326
+ binding?: string | undefined;
3327
+ routingConfig?: {
3207
3328
  has_user_worker?: boolean;
3208
- };
3209
- assetConfig: {
3329
+ invoke_user_worker_ahead_of_assets?: boolean;
3330
+ } | undefined;
3331
+ assetConfig?: {
3210
3332
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3211
3333
  not_found_handling?: "none" | "single-page-application" | "404-page";
3212
- };
3213
- workerName?: string | undefined;
3214
- bindingName?: string | undefined;
3334
+ serve_directly?: boolean;
3335
+ } | undefined;
3215
3336
  } | undefined;
3216
3337
  }, {
3217
3338
  assets?: {
3218
- path: string;
3219
- routingConfig: {
3339
+ directory: string;
3340
+ workerName?: string | undefined;
3341
+ binding?: string | undefined;
3342
+ routingConfig?: {
3220
3343
  has_user_worker?: boolean;
3221
- };
3222
- assetConfig: {
3344
+ invoke_user_worker_ahead_of_assets?: boolean;
3345
+ } | undefined;
3346
+ assetConfig?: {
3223
3347
  html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3224
3348
  not_found_handling?: "none" | "single-page-application" | "404-page";
3225
- };
3226
- workerName?: string | undefined;
3227
- bindingName?: string | undefined;
3349
+ serve_directly?: boolean;
3228
3350
  } | undefined;
3351
+ } | undefined;
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;
3229
3385
  }>>;
3230
3386
  };
3231
3387
 
@@ -3251,7 +3407,7 @@ export declare interface PluginServicesOptions<Options extends z.ZodType, Shared
3251
3407
 
3252
3408
  export declare function prefixError(prefix: string, e: any): Error;
3253
3409
 
3254
- 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>;
3255
3411
 
3256
3412
  export declare const ProxyAddresses: {
3257
3413
  readonly GLOBAL: 0;
@@ -3290,44 +3446,78 @@ export declare const QueueBindings: {
3290
3446
 
3291
3447
  export declare type QueueConsumer = z.infer<typeof QueueConsumerSchema>;
3292
3448
 
3293
- export declare const QueueConsumerOptionsSchema: z.ZodObject<{
3449
+ export declare const QueueConsumerOptionsSchema: z.ZodEffects<z.ZodObject<{
3294
3450
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3295
3451
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3296
3452
  maxRetires: z.ZodOptional<z.ZodNumber>;
3453
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3297
3454
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3298
3455
  retryDelay: z.ZodOptional<z.ZodNumber>;
3299
3456
  }, "strip", z.ZodTypeAny, {
3300
3457
  maxBatchSize?: number | undefined;
3301
3458
  maxBatchTimeout?: number | undefined;
3302
3459
  maxRetires?: number | undefined;
3460
+ maxRetries?: number | undefined;
3303
3461
  deadLetterQueue?: string | undefined;
3304
3462
  retryDelay?: number | undefined;
3305
3463
  }, {
3306
3464
  maxBatchSize?: number | undefined;
3307
3465
  maxBatchTimeout?: number | undefined;
3308
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;
3309
3482
  deadLetterQueue?: string | undefined;
3310
3483
  retryDelay?: number | undefined;
3311
3484
  }>;
3312
3485
 
3313
3486
  export declare type QueueConsumers = Map<string, z.infer<typeof QueueConsumerSchema>>;
3314
3487
 
3315
- export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
3488
+ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodEffects<z.ZodObject<{
3316
3489
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3317
3490
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3318
3491
  maxRetires: z.ZodOptional<z.ZodNumber>;
3492
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3319
3493
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3320
3494
  retryDelay: z.ZodOptional<z.ZodNumber>;
3321
3495
  }, "strip", z.ZodTypeAny, {
3322
3496
  maxBatchSize?: number | undefined;
3323
3497
  maxBatchTimeout?: number | undefined;
3324
3498
  maxRetires?: number | undefined;
3499
+ maxRetries?: number | undefined;
3325
3500
  deadLetterQueue?: string | undefined;
3326
3501
  retryDelay?: number | undefined;
3327
3502
  }, {
3328
3503
  maxBatchSize?: number | undefined;
3329
3504
  maxBatchTimeout?: number | undefined;
3330
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;
3331
3521
  deadLetterQueue?: string | undefined;
3332
3522
  retryDelay?: number | undefined;
3333
3523
  }>, z.ZodObject<{
@@ -3338,22 +3528,39 @@ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
3338
3528
  workerName: string;
3339
3529
  }>>;
3340
3530
 
3341
- 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<{
3342
3532
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3343
3533
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3344
3534
  maxRetires: z.ZodOptional<z.ZodNumber>;
3535
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3345
3536
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3346
3537
  retryDelay: z.ZodOptional<z.ZodNumber>;
3347
3538
  }, "strip", z.ZodTypeAny, {
3348
3539
  maxBatchSize?: number | undefined;
3349
3540
  maxBatchTimeout?: number | undefined;
3350
3541
  maxRetires?: number | undefined;
3542
+ maxRetries?: number | undefined;
3351
3543
  deadLetterQueue?: string | undefined;
3352
3544
  retryDelay?: number | undefined;
3353
3545
  }, {
3354
3546
  maxBatchSize?: number | undefined;
3355
3547
  maxBatchTimeout?: number | undefined;
3356
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;
3357
3564
  deadLetterQueue?: string | undefined;
3358
3565
  retryDelay?: number | undefined;
3359
3566
  }>, z.ZodObject<{
@@ -3503,22 +3710,39 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3503
3710
  queueName: string;
3504
3711
  deliveryDelay?: number | undefined;
3505
3712
  }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3506
- 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<{
3507
3714
  maxBatchSize: z.ZodOptional<z.ZodNumber>;
3508
3715
  maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3509
3716
  maxRetires: z.ZodOptional<z.ZodNumber>;
3717
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3510
3718
  deadLetterQueue: z.ZodOptional<z.ZodString>;
3511
3719
  retryDelay: z.ZodOptional<z.ZodNumber>;
3512
3720
  }, "strip", z.ZodTypeAny, {
3513
3721
  maxBatchSize?: number | undefined;
3514
3722
  maxBatchTimeout?: number | undefined;
3515
3723
  maxRetires?: number | undefined;
3724
+ maxRetries?: number | undefined;
3516
3725
  deadLetterQueue?: string | undefined;
3517
3726
  retryDelay?: number | undefined;
3518
3727
  }, {
3519
3728
  maxBatchSize?: number | undefined;
3520
3729
  maxBatchTimeout?: number | undefined;
3521
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;
3522
3746
  deadLetterQueue?: string | undefined;
3523
3747
  retryDelay?: number | undefined;
3524
3748
  }>>, z.ZodArray<z.ZodString, "many">]>>;
@@ -3527,13 +3751,14 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3527
3751
  queueName: string;
3528
3752
  deliveryDelay?: number | undefined;
3529
3753
  }> | undefined;
3530
- queueConsumers?: string[] | Record<string, {
3754
+ queueConsumers?: string[] | Record<string, Omit<{
3531
3755
  maxBatchSize?: number | undefined;
3532
3756
  maxBatchTimeout?: number | undefined;
3533
3757
  maxRetires?: number | undefined;
3758
+ maxRetries?: number | undefined;
3534
3759
  deadLetterQueue?: string | undefined;
3535
3760
  retryDelay?: number | undefined;
3536
- }> | undefined;
3761
+ }, "maxRetires">> | undefined;
3537
3762
  }, {
3538
3763
  queueProducers?: string[] | Record<string, string> | Record<string, {
3539
3764
  queueName: string;
@@ -3543,6 +3768,7 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
3543
3768
  maxBatchSize?: number | undefined;
3544
3769
  maxBatchTimeout?: number | undefined;
3545
3770
  maxRetires?: number | undefined;
3771
+ maxRetries?: number | undefined;
3546
3772
  deadLetterQueue?: string | undefined;
3547
3773
  retryDelay?: number | undefined;
3548
3774
  }> | undefined;
@@ -3636,7 +3862,7 @@ export declare const RatelimitOptionsSchema: z.ZodObject<{
3636
3862
  }> | undefined;
3637
3863
  }>;
3638
3864
 
3639
- 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>]>;
3640
3866
 
3641
3867
  export declare function reduceError(e: any): JsonError;
3642
3868
 
@@ -3646,17 +3872,18 @@ export declare type ReducersRevivers = Record<string, ReducerReviver>;
3646
3872
 
3647
3873
  export { ReferrerPolicy }
3648
3874
 
3649
- 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 ? {
3650
3876
  [K in keyof T]: OverloadReplaceWorkersTypes<T[K]>;
3651
3877
  } : T;
3652
3878
 
3653
- export declare class Request<CfType extends RequestInitCfType = RequestInitCfType> extends Request_2 {
3879
+ declare class Request_2<CfType extends RequestInitCfType = RequestInitCfType> extends Request_3 {
3654
3880
  [kCf]?: CfType;
3655
- constructor(input: RequestInfo, init?: RequestInit<CfType>);
3881
+ constructor(input: RequestInfo, init?: RequestInit_2<CfType>);
3656
3882
  get cf(): CfType | undefined;
3657
3883
  /** @ts-expect-error `clone` is actually defined as a method internally */
3658
- clone(): Request<CfType>;
3884
+ clone(): Request_2<CfType>;
3659
3885
  }
3886
+ export { Request_2 as Request }
3660
3887
 
3661
3888
  export { RequestCache }
3662
3889
 
@@ -3666,11 +3893,12 @@ export { RequestDestination }
3666
3893
 
3667
3894
  export { RequestDuplex }
3668
3895
 
3669
- export declare type RequestInfo = RequestInfo_2 | Request;
3896
+ export declare type RequestInfo = RequestInfo_2 | Request_2;
3670
3897
 
3671
- export declare interface RequestInit<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_2 {
3898
+ declare interface RequestInit_2<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_3 {
3672
3899
  cf?: CfType;
3673
3900
  }
3901
+ export { RequestInit_2 as RequestInit }
3674
3902
 
3675
3903
  export declare type RequestInitCfType = Partial<IncomingRequestCfProperties> | RequestInitCfProperties;
3676
3904
 
@@ -3678,22 +3906,24 @@ export { RequestMode }
3678
3906
 
3679
3907
  export { RequestRedirect }
3680
3908
 
3681
- export declare class Response extends Response_2 {
3909
+ declare class Response_2 extends Response_3 {
3682
3910
  readonly [kWebSocket]: WebSocket | null;
3683
- static error(): Response;
3684
- static redirect(url: string | URL, status: ResponseRedirectStatus): Response;
3685
- static json(data: any, init?: ResponseInit): Response;
3686
- 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);
3687
3915
  /** @ts-expect-error `status` is actually defined as a getter internally */
3688
3916
  get status(): number;
3689
3917
  get webSocket(): WebSocket | null;
3690
3918
  /** @ts-expect-error `clone` is actually defined as a method internally */
3691
- clone(): Response;
3919
+ clone(): Response_2;
3692
3920
  }
3921
+ export { Response_2 as Response }
3693
3922
 
3694
- export declare interface ResponseInit extends ResponseInit_2 {
3923
+ declare interface ResponseInit_2 extends ResponseInit_3 {
3695
3924
  webSocket?: WebSocket | null;
3696
3925
  }
3926
+ export { ResponseInit_2 as ResponseInit }
3697
3927
 
3698
3928
  export { ResponseRedirectStatus }
3699
3929
 
@@ -3776,7 +4006,7 @@ export declare const SharedHeaders: {
3776
4006
  readonly LOG_LEVEL: "MF-Log-Level";
3777
4007
  };
3778
4008
 
3779
- 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>;
3780
4010
 
3781
4011
  export declare const SiteBindings: {
3782
4012
  readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT";
@@ -4013,7 +4243,7 @@ export declare class WebSocket extends TypedEventTarget<WebSocketEventMap> {
4013
4243
  }
4014
4244
 
4015
4245
  export declare type WebSocketEventMap = {
4016
- message: MessageEvent;
4246
+ message: MessageEvent_2;
4017
4247
  close: CloseEvent;
4018
4248
  error: ErrorEvent;
4019
4249
  };
@@ -4223,7 +4453,7 @@ export declare type Worker_Module = {
4223
4453
  pythonRequirement?: string;
4224
4454
  });
4225
4455
 
4226
- 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>;
4227
4457
 
4228
4458
  export declare interface WorkerRoute {
4229
4459
  target: string;
@@ -4236,6 +4466,48 @@ export declare interface WorkerRoute {
4236
4466
  allowPathSuffix: boolean;
4237
4467
  }
4238
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
+
4239
4511
  export declare type WrappedBindingNames = Set<string>;
4240
4512
 
4241
4513
  export declare function zAwaitable<T extends z.ZodTypeAny>(type: T): z.ZodUnion<[T, z.ZodPromise<T>]>;