miniflare 0.0.0-020b04921

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.
Files changed (38) hide show
  1. package/README.md +858 -0
  2. package/bootstrap.js +11 -0
  3. package/dist/src/index.d.ts +4408 -0
  4. package/dist/src/index.js +10391 -0
  5. package/dist/src/index.js.map +6 -0
  6. package/dist/src/workers/assets/assets-kv.worker.js +28 -0
  7. package/dist/src/workers/assets/assets-kv.worker.js.map +6 -0
  8. package/dist/src/workers/assets/assets.worker.js +9275 -0
  9. package/dist/src/workers/assets/assets.worker.js.map +6 -0
  10. package/dist/src/workers/assets/router.worker.js +8755 -0
  11. package/dist/src/workers/assets/router.worker.js.map +6 -0
  12. package/dist/src/workers/cache/cache-entry-noop.worker.js +19 -0
  13. package/dist/src/workers/cache/cache-entry-noop.worker.js.map +6 -0
  14. package/dist/src/workers/cache/cache-entry.worker.js +28 -0
  15. package/dist/src/workers/cache/cache-entry.worker.js.map +6 -0
  16. package/dist/src/workers/cache/cache.worker.js +656 -0
  17. package/dist/src/workers/cache/cache.worker.js.map +6 -0
  18. package/dist/src/workers/core/entry.worker.js +1040 -0
  19. package/dist/src/workers/core/entry.worker.js.map +6 -0
  20. package/dist/src/workers/d1/database.worker.js +350 -0
  21. package/dist/src/workers/d1/database.worker.js.map +6 -0
  22. package/dist/src/workers/kv/namespace.worker.js +258 -0
  23. package/dist/src/workers/kv/namespace.worker.js.map +6 -0
  24. package/dist/src/workers/kv/sites.worker.js +147 -0
  25. package/dist/src/workers/kv/sites.worker.js.map +6 -0
  26. package/dist/src/workers/queues/broker.worker.js +294 -0
  27. package/dist/src/workers/queues/broker.worker.js.map +6 -0
  28. package/dist/src/workers/r2/bucket.worker.js +1157 -0
  29. package/dist/src/workers/r2/bucket.worker.js.map +6 -0
  30. package/dist/src/workers/ratelimit/ratelimit.worker.js +54 -0
  31. package/dist/src/workers/ratelimit/ratelimit.worker.js.map +6 -0
  32. package/dist/src/workers/shared/index.worker.js +706 -0
  33. package/dist/src/workers/shared/index.worker.js.map +6 -0
  34. package/dist/src/workers/shared/object-entry.worker.js +21 -0
  35. package/dist/src/workers/shared/object-entry.worker.js.map +6 -0
  36. package/dist/src/workers/shared/zod.worker.js +2719 -0
  37. package/dist/src/workers/shared/zod.worker.js.map +6 -0
  38. package/package.json +108 -0
@@ -0,0 +1,4408 @@
1
+ import { Abortable } from 'events';
2
+ import type { AbortSignal as AbortSignal_2 } from '@cloudflare/workers-types/experimental';
3
+ import type { Blob as Blob_2 } from '@cloudflare/workers-types/experimental';
4
+ import { Blob as Blob_3 } from 'buffer';
5
+ import { BodyInit } from 'undici';
6
+ import type { CacheStorage } from '@cloudflare/workers-types/experimental';
7
+ import { cspotcodeSourceMapSupport } from '@cspotcode/source-map-support';
8
+ import type { D1Database } from '@cloudflare/workers-types/experimental';
9
+ import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimental';
10
+ import type { Fetcher } from '@cloudflare/workers-types/experimental';
11
+ import { File } from 'undici';
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';
16
+ import { HeadersInit } from 'undici';
17
+ import http from 'http';
18
+ import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
19
+ import type { KVNamespace } from '@cloudflare/workers-types/experimental';
20
+ import { MockAgent } from 'undici';
21
+ import NodeWebSocket from 'ws';
22
+ import { ParseParams } from 'zod';
23
+ import type { Queue } from '@cloudflare/workers-types/experimental';
24
+ import type { R2Bucket } from '@cloudflare/workers-types/experimental';
25
+ import { Readable } from 'stream';
26
+ import type { ReadableStream } from '@cloudflare/workers-types/experimental';
27
+ import { ReadableStream as ReadableStream_2 } from 'stream/web';
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';
31
+ import { RequestCache } from 'undici';
32
+ import { RequestCredentials } from 'undici';
33
+ import { RequestDestination } from 'undici';
34
+ import { RequestDuplex } from 'undici';
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';
38
+ import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental';
39
+ import { RequestMode } from 'undici';
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';
44
+ import { ResponseRedirectStatus } from 'undici';
45
+ import { ResponseType } from 'undici';
46
+ import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental';
47
+ import { compatibilityDate as supportedCompatibilityDate } from 'workerd';
48
+ import { Transform } from 'stream';
49
+ import * as undici from 'undici';
50
+ import { URL as URL_2 } from 'url';
51
+ import { z } from 'zod';
52
+
53
+ export declare class __MiniflareFunctionWrapper {
54
+ constructor(fnWithProps: ((...args: unknown[]) => unknown) & {
55
+ [key: string | symbol]: unknown;
56
+ });
57
+ }
58
+
59
+ export declare type AnyHeaders = http.IncomingHttpHeaders | string[];
60
+
61
+ export declare type AssetReverseMap = {
62
+ [pathHash: string]: {
63
+ filePath: string;
64
+ contentType: string;
65
+ };
66
+ };
67
+
68
+ export declare const ASSETS_PLUGIN: Plugin<typeof AssetsOptionsSchema>;
69
+
70
+ export declare const AssetsOptionsSchema: z.ZodObject<{
71
+ assets: z.ZodOptional<z.ZodObject<{
72
+ workerName: z.ZodOptional<z.ZodString>;
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
+ }, "strip", z.ZodTypeAny, {
78
+ has_user_worker?: boolean;
79
+ }, {
80
+ has_user_worker?: boolean;
81
+ }>>;
82
+ assetConfig: z.ZodOptional<z.ZodObject<{
83
+ html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
84
+ not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
87
+ not_found_handling?: "none" | "single-page-application" | "404-page";
88
+ }, {
89
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
90
+ not_found_handling?: "none" | "single-page-application" | "404-page";
91
+ }>>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ directory: string;
94
+ workerName?: string | undefined;
95
+ binding?: string | undefined;
96
+ routingConfig?: {
97
+ has_user_worker?: boolean;
98
+ } | undefined;
99
+ assetConfig?: {
100
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
101
+ not_found_handling?: "none" | "single-page-application" | "404-page";
102
+ } | undefined;
103
+ }, {
104
+ directory: string;
105
+ workerName?: string | undefined;
106
+ binding?: string | undefined;
107
+ routingConfig?: {
108
+ has_user_worker?: boolean;
109
+ } | undefined;
110
+ assetConfig?: {
111
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
112
+ not_found_handling?: "none" | "single-page-application" | "404-page";
113
+ } | undefined;
114
+ }>>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ assets?: {
117
+ directory: string;
118
+ workerName?: string | undefined;
119
+ binding?: string | undefined;
120
+ routingConfig?: {
121
+ has_user_worker?: boolean;
122
+ } | undefined;
123
+ assetConfig?: {
124
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
125
+ not_found_handling?: "none" | "single-page-application" | "404-page";
126
+ } | undefined;
127
+ } | undefined;
128
+ }, {
129
+ assets?: {
130
+ directory: string;
131
+ workerName?: string | undefined;
132
+ binding?: string | undefined;
133
+ routingConfig?: {
134
+ has_user_worker?: boolean;
135
+ } | undefined;
136
+ assetConfig?: {
137
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
138
+ not_found_handling?: "none" | "single-page-application" | "404-page";
139
+ } | undefined;
140
+ } | undefined;
141
+ }>;
142
+
143
+ export declare type Awaitable<T> = T | Promise<T>;
144
+
145
+ export declare function base64Decode(encoded: string): string;
146
+
147
+ export declare function base64Encode(value: string): string;
148
+
149
+ export { BodyInit }
150
+
151
+ /**
152
+ * The Asset Manifest and Asset Reverse Map are used to map a request path to an asset.
153
+ * 1. Hash path of request
154
+ * 2. Use this path hash to find the manifest entry
155
+ * 3. Get content hash from manifest entry
156
+ * 4a. In prod, use content hash to get asset from KV
157
+ * 4b. In dev, we fake out the KV store and use the file system instead.
158
+ * Use content hash to get file path from asset reverse map.
159
+ */
160
+ export declare const buildAssetManifest: (dir: string) => Promise<{
161
+ encodedAssetManifest: Uint8Array;
162
+ assetsReverseMap: AssetReverseMap;
163
+ }>;
164
+
165
+ export declare const CACHE_PLUGIN: Plugin<typeof CacheOptionsSchema, typeof CacheSharedOptionsSchema>;
166
+
167
+ export declare const CACHE_PLUGIN_NAME = "cache";
168
+
169
+ export declare const CacheBindings: {
170
+ readonly MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE";
171
+ };
172
+
173
+ export declare const CacheHeaders: {
174
+ readonly NAMESPACE: "cf-cache-namespace";
175
+ readonly STATUS: "cf-cache-status";
176
+ };
177
+
178
+ export declare interface CacheObjectCf {
179
+ miniflare?: {
180
+ cacheWarnUsage?: boolean;
181
+ };
182
+ }
183
+
184
+ export declare const CacheOptionsSchema: z.ZodObject<{
185
+ cache: z.ZodOptional<z.ZodBoolean>;
186
+ cacheWarnUsage: z.ZodOptional<z.ZodBoolean>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ cache?: boolean | undefined;
189
+ cacheWarnUsage?: boolean | undefined;
190
+ }, {
191
+ cache?: boolean | undefined;
192
+ cacheWarnUsage?: boolean | undefined;
193
+ }>;
194
+
195
+ export declare const CacheSharedOptionsSchema: z.ZodObject<{
196
+ cachePersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ cachePersist?: string | boolean | undefined;
199
+ }, {
200
+ cachePersist?: string | boolean | undefined;
201
+ }>;
202
+
203
+ export declare class CloseEvent extends Event {
204
+ readonly code: number;
205
+ readonly reason: string;
206
+ readonly wasClean: boolean;
207
+ constructor(type: "close", init?: {
208
+ code?: number;
209
+ reason?: string;
210
+ wasClean?: boolean;
211
+ });
212
+ }
213
+
214
+ export declare interface CompiledModuleRule {
215
+ type: ModuleRuleType;
216
+ include: MatcherRegExps;
217
+ }
218
+
219
+ export declare function compileModuleRules(rules: ModuleRule[]): CompiledModuleRule[];
220
+
221
+ export declare interface Config {
222
+ services?: Service[];
223
+ sockets?: Socket[];
224
+ v8Flags?: string[];
225
+ extensions?: Extension[];
226
+ autogates?: string[];
227
+ }
228
+
229
+ export declare const CORE_PLUGIN: Plugin<typeof CoreOptionsSchema, typeof CoreSharedOptionsSchema>;
230
+
231
+ export declare const CORE_PLUGIN_NAME = "core";
232
+
233
+ export declare const CoreBindings: {
234
+ readonly SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK";
235
+ readonly SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_";
236
+ readonly SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK";
237
+ readonly TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE";
238
+ readonly TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL";
239
+ readonly JSON_CF_BLOB: "CF_BLOB";
240
+ readonly JSON_ROUTES: "MINIFLARE_ROUTES";
241
+ readonly JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL";
242
+ readonly DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT";
243
+ readonly DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY";
244
+ readonly DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET";
245
+ readonly DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET";
246
+ };
247
+
248
+ export declare const CoreHeaders: {
249
+ readonly CUSTOM_SERVICE: "MF-Custom-Service";
250
+ readonly ORIGINAL_URL: "MF-Original-URL";
251
+ readonly PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret";
252
+ readonly DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error";
253
+ readonly ERROR_STACK: "MF-Experimental-Error-Stack";
254
+ readonly ROUTE_OVERRIDE: "MF-Route-Override";
255
+ readonly CF_BLOB: "MF-CF-Blob";
256
+ readonly OP_SECRET: "MF-Op-Secret";
257
+ readonly OP: "MF-Op";
258
+ readonly OP_TARGET: "MF-Op-Target";
259
+ readonly OP_KEY: "MF-Op-Key";
260
+ readonly OP_SYNC: "MF-Op-Sync";
261
+ readonly OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size";
262
+ readonly OP_RESULT_TYPE: "MF-Op-Result-Type";
263
+ };
264
+
265
+ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
266
+ modules: z.ZodArray<z.ZodObject<{
267
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
268
+ path: z.ZodEffects<z.ZodString, string, string>;
269
+ contents: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
272
+ path: string;
273
+ contents?: string | Uint8Array | undefined;
274
+ }, {
275
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
276
+ path: string;
277
+ contents?: string | Uint8Array | undefined;
278
+ }>, "many">;
279
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ modules: {
282
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
283
+ path: string;
284
+ contents?: string | Uint8Array | undefined;
285
+ }[];
286
+ modulesRoot?: string | undefined;
287
+ }, {
288
+ modules: {
289
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
290
+ path: string;
291
+ contents?: string | Uint8Array | undefined;
292
+ }[];
293
+ modulesRoot?: string | undefined;
294
+ }>, z.ZodObject<{
295
+ script: z.ZodString;
296
+ scriptPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
297
+ modules: z.ZodOptional<z.ZodBoolean>;
298
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
299
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
300
+ include: z.ZodArray<z.ZodString, "many">;
301
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
304
+ include: string[];
305
+ fallthrough?: boolean | undefined;
306
+ }, {
307
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
308
+ include: string[];
309
+ fallthrough?: boolean | undefined;
310
+ }>, "many">>;
311
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ script: string;
314
+ scriptPath?: string | undefined;
315
+ modules?: boolean | undefined;
316
+ modulesRules?: {
317
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
318
+ include: string[];
319
+ fallthrough?: boolean | undefined;
320
+ }[] | undefined;
321
+ modulesRoot?: string | undefined;
322
+ }, {
323
+ script: string;
324
+ scriptPath?: string | undefined;
325
+ modules?: boolean | undefined;
326
+ modulesRules?: {
327
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
328
+ include: string[];
329
+ fallthrough?: boolean | undefined;
330
+ }[] | undefined;
331
+ modulesRoot?: string | undefined;
332
+ }>, z.ZodObject<{
333
+ scriptPath: z.ZodEffects<z.ZodString, string, string>;
334
+ modules: z.ZodOptional<z.ZodBoolean>;
335
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
337
+ include: z.ZodArray<z.ZodString, "many">;
338
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
341
+ include: string[];
342
+ fallthrough?: boolean | undefined;
343
+ }, {
344
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
345
+ include: string[];
346
+ fallthrough?: boolean | undefined;
347
+ }>, "many">>;
348
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ scriptPath: string;
351
+ modules?: boolean | undefined;
352
+ modulesRules?: {
353
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
354
+ include: string[];
355
+ fallthrough?: boolean | undefined;
356
+ }[] | undefined;
357
+ modulesRoot?: string | undefined;
358
+ }, {
359
+ scriptPath: string;
360
+ modules?: boolean | undefined;
361
+ modulesRules?: {
362
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
363
+ include: string[];
364
+ fallthrough?: boolean | undefined;
365
+ }[] | undefined;
366
+ modulesRoot?: string | undefined;
367
+ }>]>, z.ZodObject<{
368
+ name: z.ZodOptional<z.ZodString>;
369
+ rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
370
+ compatibilityDate: z.ZodOptional<z.ZodString>;
371
+ compatibilityFlags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
372
+ routes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
373
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
374
+ wasmBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>>;
375
+ textBlobBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
376
+ dataBlobBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>>;
377
+ serviceBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kCurrentWorker>, z.ZodObject<{
378
+ name: z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kCurrentWorker>]>;
379
+ entrypoint: z.ZodOptional<z.ZodString>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ name: string | typeof kCurrentWorker;
382
+ entrypoint?: string | undefined;
383
+ }, {
384
+ name: string | typeof kCurrentWorker;
385
+ entrypoint?: string | undefined;
386
+ }>, z.ZodObject<{
387
+ network: z.ZodObject<{
388
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
389
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
390
+ tlsOptions: z.ZodOptional<z.ZodObject<{
391
+ keypair: z.ZodOptional<z.ZodObject<{
392
+ privateKey: z.ZodOptional<z.ZodString>;
393
+ certificateChain: z.ZodOptional<z.ZodString>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ privateKey?: string | undefined;
396
+ certificateChain?: string | undefined;
397
+ }, {
398
+ privateKey?: string | undefined;
399
+ certificateChain?: string | undefined;
400
+ }>>;
401
+ requireClientCerts: z.ZodOptional<z.ZodBoolean>;
402
+ trustBrowserCas: z.ZodOptional<z.ZodBoolean>;
403
+ trustedCertificates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
404
+ minVersion: z.ZodOptional<z.ZodNativeEnum<TlsOptions_Version>>;
405
+ cipherList: z.ZodOptional<z.ZodString>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ keypair?: {
408
+ privateKey?: string | undefined;
409
+ certificateChain?: string | undefined;
410
+ } | undefined;
411
+ requireClientCerts?: boolean | undefined;
412
+ trustBrowserCas?: boolean | undefined;
413
+ trustedCertificates?: string[] | undefined;
414
+ minVersion?: TlsOptions_Version | undefined;
415
+ cipherList?: string | undefined;
416
+ }, {
417
+ keypair?: {
418
+ privateKey?: string | undefined;
419
+ certificateChain?: string | undefined;
420
+ } | undefined;
421
+ requireClientCerts?: boolean | undefined;
422
+ trustBrowserCas?: boolean | undefined;
423
+ trustedCertificates?: string[] | undefined;
424
+ minVersion?: TlsOptions_Version | undefined;
425
+ cipherList?: string | undefined;
426
+ }>>;
427
+ }, "strip", z.ZodTypeAny, {
428
+ allow?: string[] | undefined;
429
+ deny?: string[] | undefined;
430
+ tlsOptions?: {
431
+ keypair?: {
432
+ privateKey?: string | undefined;
433
+ certificateChain?: string | undefined;
434
+ } | undefined;
435
+ requireClientCerts?: boolean | undefined;
436
+ trustBrowserCas?: boolean | undefined;
437
+ trustedCertificates?: string[] | undefined;
438
+ minVersion?: TlsOptions_Version | undefined;
439
+ cipherList?: string | undefined;
440
+ } | undefined;
441
+ }, {
442
+ allow?: string[] | undefined;
443
+ deny?: string[] | undefined;
444
+ tlsOptions?: {
445
+ keypair?: {
446
+ privateKey?: string | undefined;
447
+ certificateChain?: string | undefined;
448
+ } | undefined;
449
+ requireClientCerts?: boolean | undefined;
450
+ trustBrowserCas?: boolean | undefined;
451
+ trustedCertificates?: string[] | undefined;
452
+ minVersion?: TlsOptions_Version | undefined;
453
+ cipherList?: string | undefined;
454
+ } | undefined;
455
+ }>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ network: {
458
+ allow?: string[] | undefined;
459
+ deny?: string[] | undefined;
460
+ tlsOptions?: {
461
+ keypair?: {
462
+ privateKey?: string | undefined;
463
+ certificateChain?: string | undefined;
464
+ } | undefined;
465
+ requireClientCerts?: boolean | undefined;
466
+ trustBrowserCas?: boolean | undefined;
467
+ trustedCertificates?: string[] | undefined;
468
+ minVersion?: TlsOptions_Version | undefined;
469
+ cipherList?: string | undefined;
470
+ } | undefined;
471
+ };
472
+ }, {
473
+ network: {
474
+ allow?: string[] | undefined;
475
+ deny?: string[] | undefined;
476
+ tlsOptions?: {
477
+ keypair?: {
478
+ privateKey?: string | undefined;
479
+ certificateChain?: string | undefined;
480
+ } | undefined;
481
+ requireClientCerts?: boolean | undefined;
482
+ trustBrowserCas?: boolean | undefined;
483
+ trustedCertificates?: string[] | undefined;
484
+ minVersion?: TlsOptions_Version | undefined;
485
+ cipherList?: string | undefined;
486
+ } | undefined;
487
+ };
488
+ }>, z.ZodObject<{
489
+ external: z.ZodType<ExternalServer, z.ZodTypeDef, ExternalServer>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ external: ExternalServer & (ExternalServer | undefined);
492
+ }, {
493
+ external: ExternalServer & (ExternalServer | undefined);
494
+ }>, z.ZodObject<{
495
+ disk: z.ZodObject<{
496
+ path: z.ZodString;
497
+ writable: z.ZodOptional<z.ZodBoolean>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ path: string;
500
+ writable?: boolean | undefined;
501
+ }, {
502
+ path: string;
503
+ writable?: boolean | undefined;
504
+ }>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ disk: {
507
+ path: string;
508
+ writable?: boolean | undefined;
509
+ };
510
+ }, {
511
+ disk: {
512
+ path: string;
513
+ writable?: boolean | undefined;
514
+ };
515
+ }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>>;
516
+ wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
517
+ scriptName: z.ZodString;
518
+ entrypoint: z.ZodOptional<z.ZodString>;
519
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ scriptName: string;
522
+ entrypoint?: string | undefined;
523
+ bindings?: Record<string, Json> | undefined;
524
+ }, {
525
+ scriptName: string;
526
+ entrypoint?: string | undefined;
527
+ bindings?: Record<string, Json> | undefined;
528
+ }>]>>>;
529
+ outboundService: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kCurrentWorker>, z.ZodObject<{
530
+ name: z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kCurrentWorker>]>;
531
+ entrypoint: z.ZodOptional<z.ZodString>;
532
+ }, "strip", z.ZodTypeAny, {
533
+ name: string | typeof kCurrentWorker;
534
+ entrypoint?: string | undefined;
535
+ }, {
536
+ name: string | typeof kCurrentWorker;
537
+ entrypoint?: string | undefined;
538
+ }>, z.ZodObject<{
539
+ network: z.ZodObject<{
540
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
541
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
542
+ tlsOptions: z.ZodOptional<z.ZodObject<{
543
+ keypair: z.ZodOptional<z.ZodObject<{
544
+ privateKey: z.ZodOptional<z.ZodString>;
545
+ certificateChain: z.ZodOptional<z.ZodString>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ privateKey?: string | undefined;
548
+ certificateChain?: string | undefined;
549
+ }, {
550
+ privateKey?: string | undefined;
551
+ certificateChain?: string | undefined;
552
+ }>>;
553
+ requireClientCerts: z.ZodOptional<z.ZodBoolean>;
554
+ trustBrowserCas: z.ZodOptional<z.ZodBoolean>;
555
+ trustedCertificates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
556
+ minVersion: z.ZodOptional<z.ZodNativeEnum<TlsOptions_Version>>;
557
+ cipherList: z.ZodOptional<z.ZodString>;
558
+ }, "strip", z.ZodTypeAny, {
559
+ keypair?: {
560
+ privateKey?: string | undefined;
561
+ certificateChain?: string | undefined;
562
+ } | undefined;
563
+ requireClientCerts?: boolean | undefined;
564
+ trustBrowserCas?: boolean | undefined;
565
+ trustedCertificates?: string[] | undefined;
566
+ minVersion?: TlsOptions_Version | undefined;
567
+ cipherList?: string | undefined;
568
+ }, {
569
+ keypair?: {
570
+ privateKey?: string | undefined;
571
+ certificateChain?: string | undefined;
572
+ } | undefined;
573
+ requireClientCerts?: boolean | undefined;
574
+ trustBrowserCas?: boolean | undefined;
575
+ trustedCertificates?: string[] | undefined;
576
+ minVersion?: TlsOptions_Version | undefined;
577
+ cipherList?: string | undefined;
578
+ }>>;
579
+ }, "strip", z.ZodTypeAny, {
580
+ allow?: string[] | undefined;
581
+ deny?: string[] | undefined;
582
+ tlsOptions?: {
583
+ keypair?: {
584
+ privateKey?: string | undefined;
585
+ certificateChain?: string | undefined;
586
+ } | undefined;
587
+ requireClientCerts?: boolean | undefined;
588
+ trustBrowserCas?: boolean | undefined;
589
+ trustedCertificates?: string[] | undefined;
590
+ minVersion?: TlsOptions_Version | undefined;
591
+ cipherList?: string | undefined;
592
+ } | undefined;
593
+ }, {
594
+ allow?: string[] | undefined;
595
+ deny?: string[] | undefined;
596
+ tlsOptions?: {
597
+ keypair?: {
598
+ privateKey?: string | undefined;
599
+ certificateChain?: string | undefined;
600
+ } | undefined;
601
+ requireClientCerts?: boolean | undefined;
602
+ trustBrowserCas?: boolean | undefined;
603
+ trustedCertificates?: string[] | undefined;
604
+ minVersion?: TlsOptions_Version | undefined;
605
+ cipherList?: string | undefined;
606
+ } | undefined;
607
+ }>;
608
+ }, "strip", z.ZodTypeAny, {
609
+ network: {
610
+ allow?: string[] | undefined;
611
+ deny?: string[] | undefined;
612
+ tlsOptions?: {
613
+ keypair?: {
614
+ privateKey?: string | undefined;
615
+ certificateChain?: string | undefined;
616
+ } | undefined;
617
+ requireClientCerts?: boolean | undefined;
618
+ trustBrowserCas?: boolean | undefined;
619
+ trustedCertificates?: string[] | undefined;
620
+ minVersion?: TlsOptions_Version | undefined;
621
+ cipherList?: string | undefined;
622
+ } | undefined;
623
+ };
624
+ }, {
625
+ network: {
626
+ allow?: string[] | undefined;
627
+ deny?: string[] | undefined;
628
+ tlsOptions?: {
629
+ keypair?: {
630
+ privateKey?: string | undefined;
631
+ certificateChain?: string | undefined;
632
+ } | undefined;
633
+ requireClientCerts?: boolean | undefined;
634
+ trustBrowserCas?: boolean | undefined;
635
+ trustedCertificates?: string[] | undefined;
636
+ minVersion?: TlsOptions_Version | undefined;
637
+ cipherList?: string | undefined;
638
+ } | undefined;
639
+ };
640
+ }>, z.ZodObject<{
641
+ external: z.ZodType<ExternalServer, z.ZodTypeDef, ExternalServer>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ external: ExternalServer & (ExternalServer | undefined);
644
+ }, {
645
+ external: ExternalServer & (ExternalServer | undefined);
646
+ }>, z.ZodObject<{
647
+ disk: z.ZodObject<{
648
+ path: z.ZodString;
649
+ writable: z.ZodOptional<z.ZodBoolean>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ path: string;
652
+ writable?: boolean | undefined;
653
+ }, {
654
+ path: string;
655
+ writable?: boolean | undefined;
656
+ }>;
657
+ }, "strip", z.ZodTypeAny, {
658
+ disk: {
659
+ path: string;
660
+ writable?: boolean | undefined;
661
+ };
662
+ }, {
663
+ disk: {
664
+ path: string;
665
+ writable?: boolean | undefined;
666
+ };
667
+ }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>;
668
+ fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent.Options>, z.ZodTypeDef, MockAgent<MockAgent.Options>>>;
669
+ unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
670
+ unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
671
+ host: z.ZodOptional<z.ZodString>;
672
+ port: z.ZodOptional<z.ZodNumber>;
673
+ entrypoint: z.ZodOptional<z.ZodString>;
674
+ proxy: z.ZodOptional<z.ZodBoolean>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ host?: string | undefined;
677
+ port?: number | undefined;
678
+ entrypoint?: string | undefined;
679
+ proxy?: boolean | undefined;
680
+ }, {
681
+ host?: string | undefined;
682
+ port?: number | undefined;
683
+ entrypoint?: string | undefined;
684
+ proxy?: boolean | undefined;
685
+ }>, "many">>;
686
+ unsafeEvalBinding: z.ZodOptional<z.ZodString>;
687
+ unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
688
+ /** Used to set the vitest pool worker SELF binding to point to the router worker if there are assets.
689
+ (If there are assets but we're not using vitest, the miniflare entry worker can point directly to RW.)
690
+ */
691
+ hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ name?: string | undefined;
694
+ rootPath?: undefined;
695
+ compatibilityDate?: string | undefined;
696
+ compatibilityFlags?: string[] | undefined;
697
+ routes?: string[] | undefined;
698
+ bindings?: Record<string, Json> | undefined;
699
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
700
+ textBlobBindings?: Record<string, string> | undefined;
701
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
702
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
703
+ name: string | typeof kCurrentWorker;
704
+ entrypoint?: string | undefined;
705
+ } | {
706
+ network: {
707
+ allow?: string[] | undefined;
708
+ deny?: string[] | undefined;
709
+ tlsOptions?: {
710
+ keypair?: {
711
+ privateKey?: string | undefined;
712
+ certificateChain?: string | undefined;
713
+ } | undefined;
714
+ requireClientCerts?: boolean | undefined;
715
+ trustBrowserCas?: boolean | undefined;
716
+ trustedCertificates?: string[] | undefined;
717
+ minVersion?: TlsOptions_Version | undefined;
718
+ cipherList?: string | undefined;
719
+ } | undefined;
720
+ };
721
+ } | {
722
+ external: ExternalServer & (ExternalServer | undefined);
723
+ } | {
724
+ disk: {
725
+ path: string;
726
+ writable?: boolean | undefined;
727
+ };
728
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
729
+ wrappedBindings?: Record<string, string | {
730
+ scriptName: string;
731
+ entrypoint?: string | undefined;
732
+ bindings?: Record<string, Json> | undefined;
733
+ }> | undefined;
734
+ outboundService?: string | typeof kCurrentWorker | {
735
+ name: string | typeof kCurrentWorker;
736
+ entrypoint?: string | undefined;
737
+ } | {
738
+ network: {
739
+ allow?: string[] | undefined;
740
+ deny?: string[] | undefined;
741
+ tlsOptions?: {
742
+ keypair?: {
743
+ privateKey?: string | undefined;
744
+ certificateChain?: string | undefined;
745
+ } | undefined;
746
+ requireClientCerts?: boolean | undefined;
747
+ trustBrowserCas?: boolean | undefined;
748
+ trustedCertificates?: string[] | undefined;
749
+ minVersion?: TlsOptions_Version | undefined;
750
+ cipherList?: string | undefined;
751
+ } | undefined;
752
+ };
753
+ } | {
754
+ external: ExternalServer & (ExternalServer | undefined);
755
+ } | {
756
+ disk: {
757
+ path: string;
758
+ writable?: boolean | undefined;
759
+ };
760
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
761
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
762
+ unsafeEphemeralDurableObjects?: boolean | undefined;
763
+ unsafeDirectSockets?: {
764
+ host?: string | undefined;
765
+ port?: number | undefined;
766
+ entrypoint?: string | undefined;
767
+ proxy?: boolean | undefined;
768
+ }[] | undefined;
769
+ unsafeEvalBinding?: string | undefined;
770
+ unsafeUseModuleFallbackService?: boolean | undefined;
771
+ hasAssetsAndIsVitest?: boolean | undefined;
772
+ }, {
773
+ name?: string | undefined;
774
+ rootPath?: string | undefined;
775
+ compatibilityDate?: string | undefined;
776
+ compatibilityFlags?: string[] | undefined;
777
+ routes?: string[] | undefined;
778
+ bindings?: Record<string, Json> | undefined;
779
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
780
+ textBlobBindings?: Record<string, string> | undefined;
781
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
782
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
783
+ name: string | typeof kCurrentWorker;
784
+ entrypoint?: string | undefined;
785
+ } | {
786
+ network: {
787
+ allow?: string[] | undefined;
788
+ deny?: string[] | undefined;
789
+ tlsOptions?: {
790
+ keypair?: {
791
+ privateKey?: string | undefined;
792
+ certificateChain?: string | undefined;
793
+ } | undefined;
794
+ requireClientCerts?: boolean | undefined;
795
+ trustBrowserCas?: boolean | undefined;
796
+ trustedCertificates?: string[] | undefined;
797
+ minVersion?: TlsOptions_Version | undefined;
798
+ cipherList?: string | undefined;
799
+ } | undefined;
800
+ };
801
+ } | {
802
+ external: ExternalServer & (ExternalServer | undefined);
803
+ } | {
804
+ disk: {
805
+ path: string;
806
+ writable?: boolean | undefined;
807
+ };
808
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
809
+ wrappedBindings?: Record<string, string | {
810
+ scriptName: string;
811
+ entrypoint?: string | undefined;
812
+ bindings?: Record<string, Json> | undefined;
813
+ }> | undefined;
814
+ outboundService?: string | typeof kCurrentWorker | {
815
+ name: string | typeof kCurrentWorker;
816
+ entrypoint?: string | undefined;
817
+ } | {
818
+ network: {
819
+ allow?: string[] | undefined;
820
+ deny?: string[] | undefined;
821
+ tlsOptions?: {
822
+ keypair?: {
823
+ privateKey?: string | undefined;
824
+ certificateChain?: string | undefined;
825
+ } | undefined;
826
+ requireClientCerts?: boolean | undefined;
827
+ trustBrowserCas?: boolean | undefined;
828
+ trustedCertificates?: string[] | undefined;
829
+ minVersion?: TlsOptions_Version | undefined;
830
+ cipherList?: string | undefined;
831
+ } | undefined;
832
+ };
833
+ } | {
834
+ external: ExternalServer & (ExternalServer | undefined);
835
+ } | {
836
+ disk: {
837
+ path: string;
838
+ writable?: boolean | undefined;
839
+ };
840
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
841
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
842
+ unsafeEphemeralDurableObjects?: boolean | undefined;
843
+ unsafeDirectSockets?: {
844
+ host?: string | undefined;
845
+ port?: number | undefined;
846
+ entrypoint?: string | undefined;
847
+ proxy?: boolean | undefined;
848
+ }[] | undefined;
849
+ unsafeEvalBinding?: string | undefined;
850
+ unsafeUseModuleFallbackService?: boolean | undefined;
851
+ hasAssetsAndIsVitest?: boolean | undefined;
852
+ }>>, ({
853
+ modules: {
854
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
855
+ path: string;
856
+ contents?: string | Uint8Array | undefined;
857
+ }[];
858
+ modulesRoot?: string | undefined;
859
+ } & {
860
+ name?: string | undefined;
861
+ rootPath?: undefined;
862
+ compatibilityDate?: string | undefined;
863
+ compatibilityFlags?: string[] | undefined;
864
+ routes?: string[] | undefined;
865
+ bindings?: Record<string, Json> | undefined;
866
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
867
+ textBlobBindings?: Record<string, string> | undefined;
868
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
869
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
870
+ name: string | typeof kCurrentWorker;
871
+ entrypoint?: string | undefined;
872
+ } | {
873
+ network: {
874
+ allow?: string[] | undefined;
875
+ deny?: string[] | undefined;
876
+ tlsOptions?: {
877
+ keypair?: {
878
+ privateKey?: string | undefined;
879
+ certificateChain?: string | undefined;
880
+ } | undefined;
881
+ requireClientCerts?: boolean | undefined;
882
+ trustBrowserCas?: boolean | undefined;
883
+ trustedCertificates?: string[] | undefined;
884
+ minVersion?: TlsOptions_Version | undefined;
885
+ cipherList?: string | undefined;
886
+ } | undefined;
887
+ };
888
+ } | {
889
+ external: ExternalServer & (ExternalServer | undefined);
890
+ } | {
891
+ disk: {
892
+ path: string;
893
+ writable?: boolean | undefined;
894
+ };
895
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
896
+ wrappedBindings?: Record<string, string | {
897
+ scriptName: string;
898
+ entrypoint?: string | undefined;
899
+ bindings?: Record<string, Json> | undefined;
900
+ }> | undefined;
901
+ outboundService?: string | typeof kCurrentWorker | {
902
+ name: string | typeof kCurrentWorker;
903
+ entrypoint?: string | undefined;
904
+ } | {
905
+ network: {
906
+ allow?: string[] | undefined;
907
+ deny?: string[] | undefined;
908
+ tlsOptions?: {
909
+ keypair?: {
910
+ privateKey?: string | undefined;
911
+ certificateChain?: string | undefined;
912
+ } | undefined;
913
+ requireClientCerts?: boolean | undefined;
914
+ trustBrowserCas?: boolean | undefined;
915
+ trustedCertificates?: string[] | undefined;
916
+ minVersion?: TlsOptions_Version | undefined;
917
+ cipherList?: string | undefined;
918
+ } | undefined;
919
+ };
920
+ } | {
921
+ external: ExternalServer & (ExternalServer | undefined);
922
+ } | {
923
+ disk: {
924
+ path: string;
925
+ writable?: boolean | undefined;
926
+ };
927
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
928
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
929
+ unsafeEphemeralDurableObjects?: boolean | undefined;
930
+ unsafeDirectSockets?: {
931
+ host?: string | undefined;
932
+ port?: number | undefined;
933
+ entrypoint?: string | undefined;
934
+ proxy?: boolean | undefined;
935
+ }[] | undefined;
936
+ unsafeEvalBinding?: string | undefined;
937
+ unsafeUseModuleFallbackService?: boolean | undefined;
938
+ hasAssetsAndIsVitest?: boolean | undefined;
939
+ }) | ({
940
+ script: string;
941
+ scriptPath?: string | undefined;
942
+ modules?: boolean | undefined;
943
+ modulesRules?: {
944
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
945
+ include: string[];
946
+ fallthrough?: boolean | undefined;
947
+ }[] | undefined;
948
+ modulesRoot?: string | undefined;
949
+ } & {
950
+ name?: string | undefined;
951
+ rootPath?: undefined;
952
+ compatibilityDate?: string | undefined;
953
+ compatibilityFlags?: string[] | undefined;
954
+ routes?: string[] | undefined;
955
+ bindings?: Record<string, Json> | undefined;
956
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
957
+ textBlobBindings?: Record<string, string> | undefined;
958
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
959
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
960
+ name: string | typeof kCurrentWorker;
961
+ entrypoint?: string | undefined;
962
+ } | {
963
+ network: {
964
+ allow?: string[] | undefined;
965
+ deny?: string[] | undefined;
966
+ tlsOptions?: {
967
+ keypair?: {
968
+ privateKey?: string | undefined;
969
+ certificateChain?: string | undefined;
970
+ } | undefined;
971
+ requireClientCerts?: boolean | undefined;
972
+ trustBrowserCas?: boolean | undefined;
973
+ trustedCertificates?: string[] | undefined;
974
+ minVersion?: TlsOptions_Version | undefined;
975
+ cipherList?: string | undefined;
976
+ } | undefined;
977
+ };
978
+ } | {
979
+ external: ExternalServer & (ExternalServer | undefined);
980
+ } | {
981
+ disk: {
982
+ path: string;
983
+ writable?: boolean | undefined;
984
+ };
985
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
986
+ wrappedBindings?: Record<string, string | {
987
+ scriptName: string;
988
+ entrypoint?: string | undefined;
989
+ bindings?: Record<string, Json> | undefined;
990
+ }> | undefined;
991
+ outboundService?: string | typeof kCurrentWorker | {
992
+ name: string | typeof kCurrentWorker;
993
+ entrypoint?: string | undefined;
994
+ } | {
995
+ network: {
996
+ allow?: string[] | undefined;
997
+ deny?: string[] | undefined;
998
+ tlsOptions?: {
999
+ keypair?: {
1000
+ privateKey?: string | undefined;
1001
+ certificateChain?: string | undefined;
1002
+ } | undefined;
1003
+ requireClientCerts?: boolean | undefined;
1004
+ trustBrowserCas?: boolean | undefined;
1005
+ trustedCertificates?: string[] | undefined;
1006
+ minVersion?: TlsOptions_Version | undefined;
1007
+ cipherList?: string | undefined;
1008
+ } | undefined;
1009
+ };
1010
+ } | {
1011
+ external: ExternalServer & (ExternalServer | undefined);
1012
+ } | {
1013
+ disk: {
1014
+ path: string;
1015
+ writable?: boolean | undefined;
1016
+ };
1017
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1018
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
1019
+ unsafeEphemeralDurableObjects?: boolean | undefined;
1020
+ unsafeDirectSockets?: {
1021
+ host?: string | undefined;
1022
+ port?: number | undefined;
1023
+ entrypoint?: string | undefined;
1024
+ proxy?: boolean | undefined;
1025
+ }[] | undefined;
1026
+ unsafeEvalBinding?: string | undefined;
1027
+ unsafeUseModuleFallbackService?: boolean | undefined;
1028
+ hasAssetsAndIsVitest?: boolean | undefined;
1029
+ }) | ({
1030
+ scriptPath: string;
1031
+ modules?: boolean | undefined;
1032
+ modulesRules?: {
1033
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1034
+ include: string[];
1035
+ fallthrough?: boolean | undefined;
1036
+ }[] | undefined;
1037
+ modulesRoot?: string | undefined;
1038
+ } & {
1039
+ name?: string | undefined;
1040
+ rootPath?: undefined;
1041
+ compatibilityDate?: string | undefined;
1042
+ compatibilityFlags?: string[] | undefined;
1043
+ routes?: string[] | undefined;
1044
+ bindings?: Record<string, Json> | undefined;
1045
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
1046
+ textBlobBindings?: Record<string, string> | undefined;
1047
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
1048
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
1049
+ name: string | typeof kCurrentWorker;
1050
+ entrypoint?: string | undefined;
1051
+ } | {
1052
+ network: {
1053
+ allow?: string[] | undefined;
1054
+ deny?: string[] | undefined;
1055
+ tlsOptions?: {
1056
+ keypair?: {
1057
+ privateKey?: string | undefined;
1058
+ certificateChain?: string | undefined;
1059
+ } | undefined;
1060
+ requireClientCerts?: boolean | undefined;
1061
+ trustBrowserCas?: boolean | undefined;
1062
+ trustedCertificates?: string[] | undefined;
1063
+ minVersion?: TlsOptions_Version | undefined;
1064
+ cipherList?: string | undefined;
1065
+ } | undefined;
1066
+ };
1067
+ } | {
1068
+ external: ExternalServer & (ExternalServer | undefined);
1069
+ } | {
1070
+ disk: {
1071
+ path: string;
1072
+ writable?: boolean | undefined;
1073
+ };
1074
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1075
+ wrappedBindings?: Record<string, string | {
1076
+ scriptName: string;
1077
+ entrypoint?: string | undefined;
1078
+ bindings?: Record<string, Json> | undefined;
1079
+ }> | undefined;
1080
+ outboundService?: string | typeof kCurrentWorker | {
1081
+ name: string | typeof kCurrentWorker;
1082
+ entrypoint?: string | undefined;
1083
+ } | {
1084
+ network: {
1085
+ allow?: string[] | undefined;
1086
+ deny?: string[] | undefined;
1087
+ tlsOptions?: {
1088
+ keypair?: {
1089
+ privateKey?: string | undefined;
1090
+ certificateChain?: string | undefined;
1091
+ } | undefined;
1092
+ requireClientCerts?: boolean | undefined;
1093
+ trustBrowserCas?: boolean | undefined;
1094
+ trustedCertificates?: string[] | undefined;
1095
+ minVersion?: TlsOptions_Version | undefined;
1096
+ cipherList?: string | undefined;
1097
+ } | undefined;
1098
+ };
1099
+ } | {
1100
+ external: ExternalServer & (ExternalServer | undefined);
1101
+ } | {
1102
+ disk: {
1103
+ path: string;
1104
+ writable?: boolean | undefined;
1105
+ };
1106
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1107
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
1108
+ unsafeEphemeralDurableObjects?: boolean | undefined;
1109
+ unsafeDirectSockets?: {
1110
+ host?: string | undefined;
1111
+ port?: number | undefined;
1112
+ entrypoint?: string | undefined;
1113
+ proxy?: boolean | undefined;
1114
+ }[] | undefined;
1115
+ unsafeEvalBinding?: string | undefined;
1116
+ unsafeUseModuleFallbackService?: boolean | undefined;
1117
+ hasAssetsAndIsVitest?: boolean | undefined;
1118
+ }), ({
1119
+ modules: {
1120
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1121
+ path: string;
1122
+ contents?: string | Uint8Array | undefined;
1123
+ }[];
1124
+ modulesRoot?: string | undefined;
1125
+ } | {
1126
+ script: string;
1127
+ scriptPath?: string | undefined;
1128
+ modules?: boolean | undefined;
1129
+ modulesRules?: {
1130
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1131
+ include: string[];
1132
+ fallthrough?: boolean | undefined;
1133
+ }[] | undefined;
1134
+ modulesRoot?: string | undefined;
1135
+ } | {
1136
+ scriptPath: string;
1137
+ modules?: boolean | undefined;
1138
+ modulesRules?: {
1139
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1140
+ include: string[];
1141
+ fallthrough?: boolean | undefined;
1142
+ }[] | undefined;
1143
+ modulesRoot?: string | undefined;
1144
+ }) & {
1145
+ name?: string | undefined;
1146
+ rootPath?: string | undefined;
1147
+ compatibilityDate?: string | undefined;
1148
+ compatibilityFlags?: string[] | undefined;
1149
+ routes?: string[] | undefined;
1150
+ bindings?: Record<string, Json> | undefined;
1151
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
1152
+ textBlobBindings?: Record<string, string> | undefined;
1153
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
1154
+ serviceBindings?: Record<string, string | typeof kCurrentWorker | {
1155
+ name: string | typeof kCurrentWorker;
1156
+ entrypoint?: string | undefined;
1157
+ } | {
1158
+ network: {
1159
+ allow?: string[] | undefined;
1160
+ deny?: string[] | undefined;
1161
+ tlsOptions?: {
1162
+ keypair?: {
1163
+ privateKey?: string | undefined;
1164
+ certificateChain?: string | undefined;
1165
+ } | undefined;
1166
+ requireClientCerts?: boolean | undefined;
1167
+ trustBrowserCas?: boolean | undefined;
1168
+ trustedCertificates?: string[] | undefined;
1169
+ minVersion?: TlsOptions_Version | undefined;
1170
+ cipherList?: string | undefined;
1171
+ } | undefined;
1172
+ };
1173
+ } | {
1174
+ external: ExternalServer & (ExternalServer | undefined);
1175
+ } | {
1176
+ disk: {
1177
+ path: string;
1178
+ writable?: boolean | undefined;
1179
+ };
1180
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
1181
+ wrappedBindings?: Record<string, string | {
1182
+ scriptName: string;
1183
+ entrypoint?: string | undefined;
1184
+ bindings?: Record<string, Json> | undefined;
1185
+ }> | undefined;
1186
+ outboundService?: string | typeof kCurrentWorker | {
1187
+ name: string | typeof kCurrentWorker;
1188
+ entrypoint?: string | undefined;
1189
+ } | {
1190
+ network: {
1191
+ allow?: string[] | undefined;
1192
+ deny?: string[] | undefined;
1193
+ tlsOptions?: {
1194
+ keypair?: {
1195
+ privateKey?: string | undefined;
1196
+ certificateChain?: string | undefined;
1197
+ } | undefined;
1198
+ requireClientCerts?: boolean | undefined;
1199
+ trustBrowserCas?: boolean | undefined;
1200
+ trustedCertificates?: string[] | undefined;
1201
+ minVersion?: TlsOptions_Version | undefined;
1202
+ cipherList?: string | undefined;
1203
+ } | undefined;
1204
+ };
1205
+ } | {
1206
+ external: ExternalServer & (ExternalServer | undefined);
1207
+ } | {
1208
+ disk: {
1209
+ path: string;
1210
+ writable?: boolean | undefined;
1211
+ };
1212
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1213
+ fetchMock?: MockAgent<MockAgent.Options> | undefined;
1214
+ unsafeEphemeralDurableObjects?: boolean | undefined;
1215
+ unsafeDirectSockets?: {
1216
+ host?: string | undefined;
1217
+ port?: number | undefined;
1218
+ entrypoint?: string | undefined;
1219
+ proxy?: boolean | undefined;
1220
+ }[] | undefined;
1221
+ unsafeEvalBinding?: string | undefined;
1222
+ unsafeUseModuleFallbackService?: boolean | undefined;
1223
+ hasAssetsAndIsVitest?: boolean | undefined;
1224
+ }>;
1225
+
1226
+ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1227
+ rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
1228
+ host: z.ZodOptional<z.ZodString>;
1229
+ port: z.ZodOptional<z.ZodNumber>;
1230
+ https: z.ZodOptional<z.ZodBoolean>;
1231
+ httpsKey: z.ZodOptional<z.ZodString>;
1232
+ httpsKeyPath: z.ZodOptional<z.ZodString>;
1233
+ httpsCert: z.ZodOptional<z.ZodString>;
1234
+ httpsCertPath: z.ZodOptional<z.ZodString>;
1235
+ inspectorPort: z.ZodOptional<z.ZodNumber>;
1236
+ verbose: z.ZodOptional<z.ZodBoolean>;
1237
+ log: z.ZodOptional<z.ZodType<Log, z.ZodTypeDef, Log>>;
1238
+ handleRuntimeStdio: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodType<Readable, z.ZodTypeDef, Readable>], null>, z.ZodUnknown>>;
1239
+ upstream: z.ZodOptional<z.ZodString>;
1240
+ cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
1241
+ liveReload: z.ZodOptional<z.ZodBoolean>;
1242
+ unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
1243
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>>;
1244
+ unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
1245
+ }, "strip", z.ZodTypeAny, {
1246
+ rootPath?: undefined;
1247
+ host?: string | undefined;
1248
+ port?: number | undefined;
1249
+ https?: boolean | undefined;
1250
+ httpsKey?: string | undefined;
1251
+ httpsKeyPath?: string | undefined;
1252
+ httpsCert?: string | undefined;
1253
+ httpsCertPath?: string | undefined;
1254
+ inspectorPort?: number | undefined;
1255
+ verbose?: boolean | undefined;
1256
+ log?: Log | undefined;
1257
+ handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined;
1258
+ upstream?: string | undefined;
1259
+ cf?: string | boolean | Record<string, any> | undefined;
1260
+ liveReload?: boolean | undefined;
1261
+ unsafeProxySharedSecret?: string | undefined;
1262
+ unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1263
+ unsafeStickyBlobs?: boolean | undefined;
1264
+ }, {
1265
+ rootPath?: string | undefined;
1266
+ host?: string | undefined;
1267
+ port?: number | undefined;
1268
+ https?: boolean | undefined;
1269
+ httpsKey?: string | undefined;
1270
+ httpsKeyPath?: string | undefined;
1271
+ httpsCert?: string | undefined;
1272
+ httpsCertPath?: string | undefined;
1273
+ inspectorPort?: number | undefined;
1274
+ verbose?: boolean | undefined;
1275
+ log?: Log | undefined;
1276
+ handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined;
1277
+ upstream?: string | undefined;
1278
+ cf?: string | boolean | Record<string, any> | undefined;
1279
+ liveReload?: boolean | undefined;
1280
+ unsafeProxySharedSecret?: string | undefined;
1281
+ unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
1282
+ unsafeStickyBlobs?: boolean | undefined;
1283
+ }>;
1284
+
1285
+ export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise<void>;
1286
+
1287
+ export declare function createFetchMock(): MockAgent<MockAgent.Options>;
1288
+
1289
+ export declare function createHTTPReducers(impl: PlatformImpl<unknown>): ReducersRevivers;
1290
+
1291
+ export declare function createHTTPRevivers<RS>(impl: PlatformImpl<RS>): ReducersRevivers;
1292
+
1293
+ export declare const D1_PLUGIN: Plugin<typeof D1OptionsSchema, typeof D1SharedOptionsSchema>;
1294
+
1295
+ export declare const D1_PLUGIN_NAME = "d1";
1296
+
1297
+ export declare const D1OptionsSchema: z.ZodObject<{
1298
+ d1Databases: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ d1Databases?: string[] | Record<string, string> | undefined;
1301
+ }, {
1302
+ d1Databases?: string[] | Record<string, string> | undefined;
1303
+ }>;
1304
+
1305
+ export declare const D1SharedOptionsSchema: z.ZodObject<{
1306
+ d1Persist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ d1Persist?: string | boolean | undefined;
1309
+ }, {
1310
+ d1Persist?: string | boolean | undefined;
1311
+ }>;
1312
+
1313
+ export declare function decodeSitesKey(key: string): string;
1314
+
1315
+ export declare const DEFAULT_PERSIST_ROOT = ".mf";
1316
+
1317
+ export declare class DeferredPromise<T> extends Promise<T> {
1318
+ readonly resolve: DeferredPromiseResolve<T>;
1319
+ readonly reject: DeferredPromiseReject;
1320
+ constructor(executor?: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
1321
+ }
1322
+
1323
+ export declare type DeferredPromiseReject = (reason?: any) => void;
1324
+
1325
+ export declare type DeferredPromiseResolve<T> = (value: T | PromiseLike<T>) => void;
1326
+
1327
+ export declare function deserialiseRegExps(matcher: SerialisableMatcherRegExps): MatcherRegExps;
1328
+
1329
+ export declare function deserialiseSiteRegExps(siteRegExps: SerialisableSiteMatcherRegExps): SiteMatcherRegExps;
1330
+
1331
+ export declare interface DiskDirectory {
1332
+ path?: string;
1333
+ writable?: boolean;
1334
+ }
1335
+
1336
+ export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit<Partial<IncomingRequestCfProperties>>) => Promise<Response>;
1337
+
1338
+ /**
1339
+ * Dispatcher created for each `dispatchFetch()` call. Ensures request origin
1340
+ * in Worker matches that passed to `dispatchFetch()`, not the address the
1341
+ * `workerd` server is listening on. Handles cases where `fetch()` redirects to
1342
+ * same origin and different external origins.
1343
+ */
1344
+ export declare class DispatchFetchDispatcher extends undici.Dispatcher {
1345
+ private readonly globalDispatcher;
1346
+ private readonly runtimeDispatcher;
1347
+ private readonly actualRuntimeOrigin;
1348
+ private readonly userRuntimeOrigin;
1349
+ private readonly cfBlobJson?;
1350
+ /**
1351
+ * @param globalDispatcher Dispatcher to use for all non-runtime requests
1352
+ * (rejects unauthorised certificates)
1353
+ * @param runtimeDispatcher Dispatcher to use for runtime requests
1354
+ * (permits unauthorised certificates)
1355
+ * @param actualRuntimeOrigin Origin to send all runtime requests to
1356
+ * @param userRuntimeOrigin Origin to treat as runtime request
1357
+ * (initial URL passed by user to `dispatchFetch()`)
1358
+ * @param cfBlob `request.cf` blob override for runtime requests
1359
+ */
1360
+ constructor(globalDispatcher: undici.Dispatcher, runtimeDispatcher: undici.Dispatcher, actualRuntimeOrigin: string, userRuntimeOrigin: string, cfBlob?: IncomingRequestCfProperties);
1361
+ addHeaders(headers: AnyHeaders, path: string): void;
1362
+ dispatch(options: undici.Dispatcher.DispatchOptions, handler: undici.Dispatcher.DispatchHandlers): boolean;
1363
+ close(): Promise<void>;
1364
+ close(callback: () => void): void;
1365
+ destroy(): Promise<void>;
1366
+ destroy(err: Error | null): Promise<void>;
1367
+ destroy(callback: () => void): void;
1368
+ destroy(err: Error | null, callback: () => void): void;
1369
+ get isMockActive(): boolean;
1370
+ }
1371
+
1372
+ export declare const DURABLE_OBJECTS_PLUGIN: Plugin<typeof DurableObjectsOptionsSchema, typeof DurableObjectsSharedOptionsSchema>;
1373
+
1374
+ export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do";
1375
+
1376
+ export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME = "do:storage";
1377
+
1378
+ export declare type DurableObjectClassNames = Map<string, Map<string, {
1379
+ enableSql?: boolean;
1380
+ unsafeUniqueKey?: UnsafeUniqueKey;
1381
+ unsafePreventEviction?: boolean;
1382
+ }>>;
1383
+
1384
+ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
1385
+ durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
1386
+ className: z.ZodString;
1387
+ scriptName: z.ZodOptional<z.ZodString>;
1388
+ useSQLite: z.ZodOptional<z.ZodBoolean>;
1389
+ unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kUnsafeEphemeralUniqueKey>]>>;
1390
+ unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
1391
+ }, "strip", z.ZodTypeAny, {
1392
+ className: string;
1393
+ scriptName?: string | undefined;
1394
+ useSQLite?: boolean | undefined;
1395
+ unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1396
+ unsafePreventEviction?: boolean | undefined;
1397
+ }, {
1398
+ className: string;
1399
+ scriptName?: string | undefined;
1400
+ useSQLite?: boolean | undefined;
1401
+ unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1402
+ unsafePreventEviction?: boolean | undefined;
1403
+ }>]>>>;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ durableObjects?: Record<string, string | {
1406
+ className: string;
1407
+ scriptName?: string | undefined;
1408
+ useSQLite?: boolean | undefined;
1409
+ unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1410
+ unsafePreventEviction?: boolean | undefined;
1411
+ }> | undefined;
1412
+ }, {
1413
+ durableObjects?: Record<string, string | {
1414
+ className: string;
1415
+ scriptName?: string | undefined;
1416
+ useSQLite?: boolean | undefined;
1417
+ unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
1418
+ unsafePreventEviction?: boolean | undefined;
1419
+ }> | undefined;
1420
+ }>;
1421
+
1422
+ export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{
1423
+ durableObjectsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
1424
+ }, "strip", z.ZodTypeAny, {
1425
+ durableObjectsPersist?: string | boolean | undefined;
1426
+ }, {
1427
+ durableObjectsPersist?: string | boolean | undefined;
1428
+ }>;
1429
+
1430
+ /* Excluded from this release type: _enableControlEndpoints */
1431
+
1432
+ export declare function encodeSitesKey(key: string): string;
1433
+
1434
+ export declare const ENTRY_SOCKET_HTTP_OPTIONS: HttpOptions;
1435
+
1436
+ export declare class ErrorEvent extends Event {
1437
+ readonly error: Error | null;
1438
+ constructor(type: "error", init?: {
1439
+ error?: Error;
1440
+ });
1441
+ }
1442
+
1443
+ export declare interface Extension {
1444
+ modules?: Extension_Module[];
1445
+ }
1446
+
1447
+ export declare interface Extension_Module {
1448
+ name?: string;
1449
+ internal?: boolean;
1450
+ esModule?: string;
1451
+ }
1452
+
1453
+ export declare type ExternalServer = {
1454
+ address?: string;
1455
+ } & ({
1456
+ http: HttpOptions;
1457
+ } | {
1458
+ https: ExternalServer_Https;
1459
+ } | {
1460
+ tcp: ExternalServer_Tcp;
1461
+ });
1462
+
1463
+ export declare interface ExternalServer_Https {
1464
+ options?: HttpOptions;
1465
+ tlsOptions?: TlsOptions;
1466
+ certificateHost?: string;
1467
+ }
1468
+
1469
+ export declare interface ExternalServer_Tcp {
1470
+ tlsOptions?: TlsOptions;
1471
+ certificateHost?: string;
1472
+ }
1473
+
1474
+ export declare function fetch(input: RequestInfo, init?: RequestInit | Request): Promise<Response>;
1475
+
1476
+ export { File }
1477
+
1478
+ export declare function _forceColour(enabled?: boolean): void;
1479
+
1480
+ export declare function formatZodError(error: z.ZodError, input: unknown): string;
1481
+
1482
+ export { FormData }
1483
+
1484
+ export declare function getAccessibleHosts(ipv4Only?: boolean): string[];
1485
+
1486
+ export declare function getAssetsBindingsNames(assetsKVBindingName?: string, assetsManifestBindingName?: string): {
1487
+ readonly ASSETS_KV_NAMESPACE: string;
1488
+ readonly ASSETS_MANIFEST: string;
1489
+ };
1490
+
1491
+ export declare function getCacheServiceName(workerIndex: number): string;
1492
+
1493
+ export declare function getDirectSocketName(workerIndex: number, entrypoint: string): string;
1494
+
1495
+ export declare function getEntrySocketHttpOptions(coreOpts: z.infer<typeof CORE_PLUGIN.sharedOptions>): Promise<{
1496
+ http: HttpOptions;
1497
+ } | {
1498
+ https: Socket_Https;
1499
+ }>;
1500
+
1501
+ export declare function getFreshSourceMapSupport(): cspotcodeSourceMapSupport;
1502
+
1503
+ export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fallbackWorkerName, loopbackPort, log, proxyBindings, }: GlobalServicesOptions): Service[];
1504
+
1505
+ export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[];
1506
+
1507
+ /**
1508
+ * Computes the Node.js compatibility mode we are running.
1509
+ *
1510
+ * NOTES:
1511
+ * - 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.
1512
+ * - See `EnvironmentInheritable` for `nodeCompat` and `noBundle`.
1513
+ *
1514
+ * @param compatibilityDateStr The compatibility date
1515
+ * @param compatibilityFlags The compatibility flags
1516
+ * @param opts.nodeCompat Whether the legacy node_compat arg is being used
1517
+ * @returns the mode and flags to indicate specific configuration for validating.
1518
+ */
1519
+ export declare function getNodeCompat(compatibilityDate: string | undefined, // Default to some arbitrary old date
1520
+ compatibilityFlags: string[], opts?: {
1521
+ nodeCompat?: boolean;
1522
+ }): {
1523
+ mode: NodeJSCompatMode;
1524
+ hasNodejsAlsFlag: boolean;
1525
+ hasNodejsCompatFlag: boolean;
1526
+ hasNodejsCompatV2Flag: boolean;
1527
+ hasNoNodejsCompatV2Flag: boolean;
1528
+ hasExperimentalNodejsCompatV2Flag: boolean;
1529
+ };
1530
+
1531
+ export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
1532
+
1533
+ export declare function getRootPath(opts: unknown): string;
1534
+
1535
+ export declare interface GlobalServicesOptions {
1536
+ sharedOptions: z.infer<typeof CoreSharedOptionsSchema>;
1537
+ allWorkerRoutes: Map<string, string[]>;
1538
+ fallbackWorkerName: string | undefined;
1539
+ loopbackPort: number;
1540
+ log: Log;
1541
+ proxyBindings: Worker_Binding[];
1542
+ }
1543
+
1544
+ export declare function globsToRegExps(globs?: string[]): MatcherRegExps;
1545
+
1546
+ export { Headers }
1547
+
1548
+ export { HeadersInit }
1549
+
1550
+ export declare const HOST_CAPNP_CONNECT = "miniflare-unsafe-internal-capnp-connect";
1551
+
1552
+ export declare interface HttpOptions {
1553
+ style?: HttpOptions_Style;
1554
+ forwardedProtoHeader?: string;
1555
+ cfBlobHeader?: string;
1556
+ injectRequestHeaders?: HttpOptions_Header[];
1557
+ injectResponseHeaders?: HttpOptions_Header[];
1558
+ capnpConnectHost?: string;
1559
+ }
1560
+
1561
+ export declare interface HttpOptions_Header {
1562
+ name?: string;
1563
+ value?: string;
1564
+ }
1565
+
1566
+ export declare enum HttpOptions_Style {
1567
+ HOST = 0,
1568
+ PROXY = 1
1569
+ }
1570
+
1571
+ export declare const HYPERDRIVE_PLUGIN: Plugin<typeof HyperdriveInputOptionsSchema>;
1572
+
1573
+ export declare const HYPERDRIVE_PLUGIN_NAME = "hyperdrive";
1574
+
1575
+ export declare const HyperdriveInputOptionsSchema: z.ZodObject<{
1576
+ hyperdrives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<URL_2, z.ZodTypeDef, URL_2>]>, URL_2, string | URL_2>>>;
1577
+ }, "strip", z.ZodTypeAny, {
1578
+ hyperdrives?: Record<string, URL_2> | undefined;
1579
+ }, {
1580
+ hyperdrives?: Record<string, string | URL_2> | undefined;
1581
+ }>;
1582
+
1583
+ export declare const HyperdriveSchema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<URL_2, z.ZodTypeDef, URL_2>]>, URL_2, string | URL_2>;
1584
+
1585
+ export declare interface InclusiveRange {
1586
+ start: number;
1587
+ end: number;
1588
+ }
1589
+
1590
+ /* Excluded from this release type: _initialiseInstanceRegistry */
1591
+
1592
+ /* Excluded from this release type: _isCyclic */
1593
+
1594
+ export declare function isFetcherFetch(targetName: string, key: string): boolean;
1595
+
1596
+ export declare function isR2ObjectWriteHttpMetadata(targetName: string, key: string): boolean;
1597
+
1598
+ export declare function isSitesRequest(request: {
1599
+ url: string;
1600
+ }): boolean;
1601
+
1602
+ export declare type Json = Literal | {
1603
+ [key: string]: Json;
1604
+ } | Json[];
1605
+
1606
+ export declare interface JsonError {
1607
+ message?: string;
1608
+ name?: string;
1609
+ stack?: string;
1610
+ cause?: JsonError;
1611
+ }
1612
+
1613
+ export declare const JsonSchema: z.ZodType<Json>;
1614
+
1615
+ declare const kAccepted: unique symbol;
1616
+
1617
+ declare const kCf: unique symbol;
1618
+
1619
+ declare const kClose: unique symbol;
1620
+
1621
+ declare const kClosedIncoming: unique symbol;
1622
+
1623
+ declare const kClosedOutgoing: unique symbol;
1624
+
1625
+ declare const kCoupled: unique symbol;
1626
+
1627
+ export declare const kCurrentWorker: unique symbol;
1628
+
1629
+ declare const kError: unique symbol;
1630
+
1631
+ export declare const kInspectorSocket: unique symbol;
1632
+
1633
+ declare const kPair: unique symbol;
1634
+
1635
+ declare const kSend: unique symbol;
1636
+
1637
+ export declare const kUnsafeEphemeralUniqueKey: unique symbol;
1638
+
1639
+ export declare const KV_PLUGIN: Plugin<typeof KVOptionsSchema, typeof KVSharedOptionsSchema>;
1640
+
1641
+ export declare const KV_PLUGIN_NAME = "kv";
1642
+
1643
+ export declare const KVHeaders: {
1644
+ readonly EXPIRATION: "CF-Expiration";
1645
+ readonly METADATA: "CF-KV-Metadata";
1646
+ };
1647
+
1648
+ export declare const KVLimits: {
1649
+ readonly MIN_CACHE_TTL: 60;
1650
+ readonly MAX_LIST_KEYS: 1000;
1651
+ readonly MAX_KEY_SIZE: 512;
1652
+ readonly MAX_VALUE_SIZE: number;
1653
+ readonly MAX_VALUE_SIZE_TEST: 1024;
1654
+ readonly MAX_METADATA_SIZE: 1024;
1655
+ };
1656
+
1657
+ export declare const kVoid: unique symbol;
1658
+
1659
+ export declare const KVOptionsSchema: z.ZodObject<{
1660
+ kvNamespaces: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
1661
+ sitePath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1662
+ siteInclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1663
+ siteExclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1664
+ }, "strip", z.ZodTypeAny, {
1665
+ kvNamespaces?: string[] | Record<string, string> | undefined;
1666
+ sitePath?: string | undefined;
1667
+ siteInclude?: string[] | undefined;
1668
+ siteExclude?: string[] | undefined;
1669
+ }, {
1670
+ kvNamespaces?: string[] | Record<string, string> | undefined;
1671
+ sitePath?: string | undefined;
1672
+ siteInclude?: string[] | undefined;
1673
+ siteExclude?: string[] | undefined;
1674
+ }>;
1675
+
1676
+ export declare const KVParams: {
1677
+ readonly URL_ENCODED: "urlencoded";
1678
+ readonly CACHE_TTL: "cache_ttl";
1679
+ readonly EXPIRATION: "expiration";
1680
+ readonly EXPIRATION_TTL: "expiration_ttl";
1681
+ readonly LIST_LIMIT: "key_count_limit";
1682
+ readonly LIST_PREFIX: "prefix";
1683
+ readonly LIST_CURSOR: "cursor";
1684
+ };
1685
+
1686
+ export declare const KVSharedOptionsSchema: z.ZodObject<{
1687
+ kvPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
1688
+ }, "strip", z.ZodTypeAny, {
1689
+ kvPersist?: string | boolean | undefined;
1690
+ }, {
1691
+ kvPersist?: string | boolean | undefined;
1692
+ }>;
1693
+
1694
+ declare const kWebSocket: unique symbol;
1695
+
1696
+ export declare type Literal = z.infer<typeof LiteralSchema>;
1697
+
1698
+ export declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
1699
+
1700
+ export declare class Log {
1701
+ #private;
1702
+ readonly level: LogLevel;
1703
+ constructor(level?: LogLevel, opts?: LogOptions);
1704
+ protected log(message: string): void;
1705
+ static unstable_registerBeforeLogHook(callback: (() => void) | undefined): void;
1706
+ static unstable_registerAfterLogHook(callback: (() => void) | undefined): void;
1707
+ logWithLevel(level: LogLevel, message: string): void;
1708
+ error(message: Error): void;
1709
+ warn(message: string): void;
1710
+ info(message: string): void;
1711
+ debug(message: string): void;
1712
+ verbose(message: string): void;
1713
+ }
1714
+
1715
+ export declare enum LogLevel {
1716
+ NONE = 0,
1717
+ ERROR = 1,
1718
+ WARN = 2,
1719
+ INFO = 3,
1720
+ DEBUG = 4,
1721
+ VERBOSE = 5
1722
+ }
1723
+
1724
+ export declare interface LogOptions {
1725
+ prefix?: string;
1726
+ suffix?: string;
1727
+ }
1728
+
1729
+ export declare type ManifestEntry = {
1730
+ pathHash: Uint8Array;
1731
+ contentHash: Uint8Array;
1732
+ };
1733
+
1734
+ export declare interface MatcherRegExps {
1735
+ include: RegExp[];
1736
+ exclude: RegExp[];
1737
+ }
1738
+
1739
+ export declare function matchRoutes(routes: WorkerRoute[], url: URL): string | null;
1740
+
1741
+ export declare function maybeApply<From, To>(f: (value: From) => To, maybeValue: From | undefined): To | undefined;
1742
+
1743
+ export declare function maybeParseURL(url: Persistence): URL | undefined;
1744
+
1745
+ /**
1746
+ * Merges all of `b`'s properties into `a`. Only merges 1 level deep, i.e.
1747
+ * `kvNamespaces` will be fully-merged, but `durableObject` object-designators
1748
+ * will be overwritten.
1749
+ */
1750
+ export declare function mergeWorkerOptions(a: Partial<WorkerOptions>, b: Partial<WorkerOptions>): Partial<WorkerOptions>;
1751
+
1752
+ export declare class MessageEvent extends Event {
1753
+ readonly data: ArrayBuffer | string;
1754
+ constructor(type: "message", init: {
1755
+ data: ArrayBuffer | string;
1756
+ });
1757
+ }
1758
+
1759
+ export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise<void>;
1760
+
1761
+ export declare class Miniflare {
1762
+ #private;
1763
+ constructor(opts: MiniflareOptions);
1764
+ get ready(): Promise<URL>;
1765
+ getCf(): Promise<Record<string, any>>;
1766
+ getInspectorURL(): Promise<URL>;
1767
+ unsafeGetDirectURL(workerName?: string, entrypoint?: string): Promise<URL>;
1768
+ setOptions(opts: MiniflareOptions): Promise<void>;
1769
+ dispatchFetch: DispatchFetch;
1770
+ /* Excluded from this release type: _getProxyClient */
1771
+ getBindings<Env = Record<string, unknown>>(workerName?: string): Promise<Env>;
1772
+ getWorker(workerName?: string): Promise<ReplaceWorkersTypes<Fetcher>>;
1773
+ getCaches(): Promise<ReplaceWorkersTypes<CacheStorage>>;
1774
+ getD1Database(bindingName: string, workerName?: string): Promise<D1Database>;
1775
+ getDurableObjectNamespace(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<DurableObjectNamespace>>;
1776
+ getKVNamespace(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<KVNamespace>>;
1777
+ getQueueProducer<Body = unknown>(bindingName: string, workerName?: string): Promise<Queue<Body>>;
1778
+ getR2Bucket(bindingName: string, workerName?: string): Promise<ReplaceWorkersTypes<R2Bucket>>;
1779
+ /* Excluded from this release type: _getInternalDurableObjectNamespace */
1780
+ unsafeGetPersistPaths(): Map<keyof Plugins, string>;
1781
+ dispose(): Promise<void>;
1782
+ }
1783
+
1784
+ export declare class MiniflareCoreError extends MiniflareError<MiniflareCoreErrorCode> {
1785
+ }
1786
+
1787
+ 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";
1788
+
1789
+ export declare class MiniflareError<Code extends string | number = string | number> extends Error {
1790
+ readonly code: Code;
1791
+ readonly cause?: Error | undefined;
1792
+ constructor(code: Code, message?: string, cause?: Error | undefined);
1793
+ }
1794
+
1795
+ export declare type MiniflareOptions = SharedOptions & (WorkerOptions | {
1796
+ workers: WorkerOptions[];
1797
+ });
1798
+
1799
+ export declare type ModuleDefinition = z.infer<typeof ModuleDefinitionSchema>;
1800
+
1801
+ export declare const ModuleDefinitionSchema: z.ZodObject<{
1802
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
1803
+ path: z.ZodEffects<z.ZodString, string, string>;
1804
+ contents: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>;
1805
+ }, "strip", z.ZodTypeAny, {
1806
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1807
+ path: string;
1808
+ contents?: string | Uint8Array | undefined;
1809
+ }, {
1810
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1811
+ path: string;
1812
+ contents?: string | Uint8Array | undefined;
1813
+ }>;
1814
+
1815
+ export declare type ModuleRule = z.infer<typeof ModuleRuleSchema>;
1816
+
1817
+ export declare const ModuleRuleSchema: z.ZodObject<{
1818
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
1819
+ include: z.ZodArray<z.ZodString, "many">;
1820
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
1821
+ }, "strip", z.ZodTypeAny, {
1822
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1823
+ include: string[];
1824
+ fallthrough?: boolean | undefined;
1825
+ }, {
1826
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
1827
+ include: string[];
1828
+ fallthrough?: boolean | undefined;
1829
+ }>;
1830
+
1831
+ export declare type ModuleRuleType = z.infer<typeof ModuleRuleTypeSchema>;
1832
+
1833
+ export declare const ModuleRuleTypeSchema: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
1834
+
1835
+ export declare class Mutex {
1836
+ private locked;
1837
+ private resolveQueue;
1838
+ private drainQueue;
1839
+ private lock;
1840
+ private unlock;
1841
+ get hasWaiting(): boolean;
1842
+ runWith<T>(closure: () => Awaitable<T>): Promise<T>;
1843
+ drained(): Promise<void>;
1844
+ }
1845
+
1846
+ export declare function namespaceEntries(namespaces?: Record<string, string> | string[]): [bindingName: string, id: string][];
1847
+
1848
+ export declare function namespaceKeys(namespaces?: Record<string, string> | string[]): string[];
1849
+
1850
+ export declare interface Network {
1851
+ allow?: string[];
1852
+ deny?: string[];
1853
+ tlsOptions?: TlsOptions;
1854
+ }
1855
+
1856
+ export declare const NODE_PLATFORM_IMPL: PlatformImpl<ReadableStream_2>;
1857
+
1858
+ /**
1859
+ * We can provide Node.js compatibility in a number of different modes:
1860
+ * - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
1861
+ * - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`).
1862
+ * - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
1863
+ * - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
1864
+ * 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.
1865
+ * - null - no Node.js compatibility.
1866
+ */
1867
+ export declare type NodeJSCompatMode = "legacy" | "als" | "v1" | "v2" | null;
1868
+
1869
+ export declare class NoOpLog extends Log {
1870
+ constructor();
1871
+ protected log(): void;
1872
+ error(_message: Error): void;
1873
+ }
1874
+
1875
+ export declare function normaliseDurableObject(designator: NonNullable<z.infer<typeof DurableObjectsOptionsSchema>["durableObjects"]>[string]): {
1876
+ className: string;
1877
+ serviceName?: string;
1878
+ enableSql?: boolean;
1879
+ unsafeUniqueKey?: UnsafeUniqueKey;
1880
+ unsafePreventEviction?: boolean;
1881
+ };
1882
+
1883
+ export declare function objectEntryWorker(durableObjectNamespace: Worker_Binding_DurableObjectNamespaceDesignator, namespace: string): Worker;
1884
+
1885
+ export declare type OptionalZodTypeOf<T extends z.ZodTypeAny | undefined> = T extends z.ZodTypeAny ? z.TypeOf<T> : undefined;
1886
+
1887
+ export declare type OverloadReplaceWorkersTypes<T> = T extends (...args: any[]) => any ? UnionToIntersection<ReplaceWorkersTypes<OverloadUnion<T>>> : ReplaceWorkersTypes<T>;
1888
+
1889
+ export declare type OverloadUnion<T extends (...args: any[]) => any> = Parameters<T> extends [] ? T : OverloadUnion9<T>;
1890
+
1891
+ export declare type OverloadUnion2<T> = T extends {
1892
+ (...args: infer P1): infer R1;
1893
+ (...args: infer P2): infer R2;
1894
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) : T;
1895
+
1896
+ export declare type OverloadUnion3<T> = T extends {
1897
+ (...args: infer P1): infer R1;
1898
+ (...args: infer P2): infer R2;
1899
+ (...args: infer P3): infer R3;
1900
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) : OverloadUnion2<T>;
1901
+
1902
+ export declare type OverloadUnion4<T> = T extends {
1903
+ (...args: infer P1): infer R1;
1904
+ (...args: infer P2): infer R2;
1905
+ (...args: infer P3): infer R3;
1906
+ (...args: infer P4): infer R4;
1907
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) : OverloadUnion3<T>;
1908
+
1909
+ export declare type OverloadUnion5<T> = T extends {
1910
+ (...args: infer P1): infer R1;
1911
+ (...args: infer P2): infer R2;
1912
+ (...args: infer P3): infer R3;
1913
+ (...args: infer P4): infer R4;
1914
+ (...args: infer P5): infer R5;
1915
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) : OverloadUnion4<T>;
1916
+
1917
+ export declare type OverloadUnion6<T> = T extends {
1918
+ (...args: infer P1): infer R1;
1919
+ (...args: infer P2): infer R2;
1920
+ (...args: infer P3): infer R3;
1921
+ (...args: infer P4): infer R4;
1922
+ (...args: infer P5): infer R5;
1923
+ (...args: infer P6): infer R6;
1924
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) : OverloadUnion5<T>;
1925
+
1926
+ export declare type OverloadUnion7<T> = T extends {
1927
+ (...args: infer P1): infer R1;
1928
+ (...args: infer P2): infer R2;
1929
+ (...args: infer P3): infer R3;
1930
+ (...args: infer P4): infer R4;
1931
+ (...args: infer P5): infer R5;
1932
+ (...args: infer P6): infer R6;
1933
+ (...args: infer P7): infer R7;
1934
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) : OverloadUnion6<T>;
1935
+
1936
+ export declare type OverloadUnion8<T> = T extends {
1937
+ (...args: infer P1): infer R1;
1938
+ (...args: infer P2): infer R2;
1939
+ (...args: infer P3): infer R3;
1940
+ (...args: infer P4): infer R4;
1941
+ (...args: infer P5): infer R5;
1942
+ (...args: infer P6): infer R6;
1943
+ (...args: infer P7): infer R7;
1944
+ (...args: infer P8): infer R8;
1945
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) : OverloadUnion7<T>;
1946
+
1947
+ export declare type OverloadUnion9<T> = T extends {
1948
+ (...args: infer P1): infer R1;
1949
+ (...args: infer P2): infer R2;
1950
+ (...args: infer P3): infer R3;
1951
+ (...args: infer P4): infer R4;
1952
+ (...args: infer P5): infer R5;
1953
+ (...args: infer P6): infer R6;
1954
+ (...args: infer P7): infer R7;
1955
+ (...args: infer P8): infer R8;
1956
+ (...args: infer P9): infer R9;
1957
+ } ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) : OverloadUnion8<T>;
1958
+
1959
+ /**
1960
+ * Parses an HTTP `Range` header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range),
1961
+ * returning either:
1962
+ * - `undefined` indicating the range is unsatisfiable
1963
+ * - An empty array indicating the entire response should be returned
1964
+ * - A non-empty array of inclusive ranges of the response to return
1965
+ */
1966
+ export declare function parseRanges(rangeHeader: string, length: number): InclusiveRange[] | undefined;
1967
+
1968
+ export declare function parseRoutes(allRoutes: Map<string, string[]>): WorkerRoute[];
1969
+
1970
+ export declare function parseWithReadableStreams<RS>(impl: PlatformImpl<RS>, stringified: StringifiedWithStream<RS>, revivers: ReducersRevivers): unknown;
1971
+
1972
+ export declare function parseWithRootPath<Z extends z.ZodTypeAny>(newRootPath: string, schema: Z, data: unknown, params?: Partial<ParseParams>): z.infer<Z>;
1973
+
1974
+ export declare const PathSchema: z.ZodEffects<z.ZodString, string, string>;
1975
+
1976
+ export declare enum PeriodType {
1977
+ TENSECONDS = 10,
1978
+ MINUTE = 60
1979
+ }
1980
+
1981
+ export declare type Persistence = z.infer<typeof PersistenceSchema>;
1982
+
1983
+ export declare const PersistenceSchema: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
1984
+
1985
+ export declare interface PlatformImpl<RS> {
1986
+ Blob: typeof Blob_2;
1987
+ File: typeof File_2;
1988
+ Headers: typeof Headers_2;
1989
+ Request: typeof Request_3;
1990
+ Response: typeof Response_3;
1991
+ isReadableStream(value: unknown): value is RS;
1992
+ bufferReadableStream(stream: RS): Promise<ArrayBuffer>;
1993
+ unbufferReadableStream(buffer: ArrayBuffer): RS;
1994
+ }
1995
+
1996
+ export declare type Plugin<Options extends z.ZodType, SharedOptions extends z.ZodType | undefined = undefined> = PluginBase<Options, SharedOptions> & (SharedOptions extends undefined ? {
1997
+ sharedOptions?: undefined;
1998
+ } : {
1999
+ sharedOptions: SharedOptions;
2000
+ });
2001
+
2002
+ export declare const PLUGIN_ENTRIES: [keyof Plugins, ValueOf<Plugins>][];
2003
+
2004
+ export declare interface PluginBase<Options extends z.ZodType, SharedOptions extends z.ZodType | undefined> {
2005
+ options: Options;
2006
+ getBindings(options: z.infer<Options>, workerIndex: number): Awaitable<Worker_Binding[] | void>;
2007
+ getNodeBindings(options: z.infer<Options>): Awaitable<Record<string, unknown>>;
2008
+ getServices(options: PluginServicesOptions<Options, SharedOptions>): Awaitable<Service[] | ServicesExtensions | void>;
2009
+ getPersistPath?(sharedOptions: OptionalZodTypeOf<SharedOptions>, tmpPath: string): string;
2010
+ }
2011
+
2012
+ export declare const PLUGINS: {
2013
+ core: Plugin<z.ZodEffects<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
2014
+ modules: z.ZodArray<z.ZodObject<{
2015
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
2016
+ path: z.ZodEffects<z.ZodString, string, string>;
2017
+ contents: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>;
2018
+ }, "strip", z.ZodTypeAny, {
2019
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2020
+ path: string;
2021
+ contents?: string | Uint8Array | undefined;
2022
+ }, {
2023
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2024
+ path: string;
2025
+ contents?: string | Uint8Array | undefined;
2026
+ }>, "many">;
2027
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2028
+ }, "strip", z.ZodTypeAny, {
2029
+ modules: {
2030
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2031
+ path: string;
2032
+ contents?: string | Uint8Array | undefined;
2033
+ }[];
2034
+ modulesRoot?: string | undefined;
2035
+ }, {
2036
+ modules: {
2037
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2038
+ path: string;
2039
+ contents?: string | Uint8Array | undefined;
2040
+ }[];
2041
+ modulesRoot?: string | undefined;
2042
+ }>, z.ZodObject<{
2043
+ script: z.ZodString;
2044
+ scriptPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2045
+ modules: z.ZodOptional<z.ZodBoolean>;
2046
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2047
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
2048
+ include: z.ZodArray<z.ZodString, "many">;
2049
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2052
+ include: string[];
2053
+ fallthrough?: boolean | undefined;
2054
+ }, {
2055
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2056
+ include: string[];
2057
+ fallthrough?: boolean | undefined;
2058
+ }>, "many">>;
2059
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2060
+ }, "strip", z.ZodTypeAny, {
2061
+ script: string;
2062
+ scriptPath?: string | undefined;
2063
+ modules?: boolean | undefined;
2064
+ modulesRules?: {
2065
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2066
+ include: string[];
2067
+ fallthrough?: boolean | undefined;
2068
+ }[] | undefined;
2069
+ modulesRoot?: string | undefined;
2070
+ }, {
2071
+ script: string;
2072
+ scriptPath?: string | undefined;
2073
+ modules?: boolean | undefined;
2074
+ modulesRules?: {
2075
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2076
+ include: string[];
2077
+ fallthrough?: boolean | undefined;
2078
+ }[] | undefined;
2079
+ modulesRoot?: string | undefined;
2080
+ }>, z.ZodObject<{
2081
+ scriptPath: z.ZodEffects<z.ZodString, string, string>;
2082
+ modules: z.ZodOptional<z.ZodBoolean>;
2083
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2084
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
2085
+ include: z.ZodArray<z.ZodString, "many">;
2086
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
2087
+ }, "strip", z.ZodTypeAny, {
2088
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2089
+ include: string[];
2090
+ fallthrough?: boolean | undefined;
2091
+ }, {
2092
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2093
+ include: string[];
2094
+ fallthrough?: boolean | undefined;
2095
+ }>, "many">>;
2096
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2097
+ }, "strip", z.ZodTypeAny, {
2098
+ scriptPath: string;
2099
+ modules?: boolean | undefined;
2100
+ modulesRules?: {
2101
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2102
+ include: string[];
2103
+ fallthrough?: boolean | undefined;
2104
+ }[] | undefined;
2105
+ modulesRoot?: string | undefined;
2106
+ }, {
2107
+ scriptPath: string;
2108
+ modules?: boolean | undefined;
2109
+ modulesRules?: {
2110
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2111
+ include: string[];
2112
+ fallthrough?: boolean | undefined;
2113
+ }[] | undefined;
2114
+ modulesRoot?: string | undefined;
2115
+ }>]>, z.ZodObject<{
2116
+ name: z.ZodOptional<z.ZodString>;
2117
+ rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
2118
+ compatibilityDate: z.ZodOptional<z.ZodString>;
2119
+ compatibilityFlags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2120
+ routes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2121
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
2122
+ wasmBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>>;
2123
+ textBlobBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
2124
+ dataBlobBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>>;
2125
+ serviceBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLiteral<kCurrentWorker>, z.ZodObject<{
2126
+ name: z.ZodUnion<[z.ZodString, z.ZodLiteral<kCurrentWorker>]>;
2127
+ entrypoint: z.ZodOptional<z.ZodString>;
2128
+ }, "strip", z.ZodTypeAny, {
2129
+ name: string | kCurrentWorker;
2130
+ entrypoint?: string | undefined;
2131
+ }, {
2132
+ name: string | kCurrentWorker;
2133
+ entrypoint?: string | undefined;
2134
+ }>, z.ZodObject<{
2135
+ network: z.ZodObject<{
2136
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2137
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2138
+ tlsOptions: z.ZodOptional<z.ZodObject<{
2139
+ keypair: z.ZodOptional<z.ZodObject<{
2140
+ privateKey: z.ZodOptional<z.ZodString>;
2141
+ certificateChain: z.ZodOptional<z.ZodString>;
2142
+ }, "strip", z.ZodTypeAny, {
2143
+ privateKey?: string | undefined;
2144
+ certificateChain?: string | undefined;
2145
+ }, {
2146
+ privateKey?: string | undefined;
2147
+ certificateChain?: string | undefined;
2148
+ }>>;
2149
+ requireClientCerts: z.ZodOptional<z.ZodBoolean>;
2150
+ trustBrowserCas: z.ZodOptional<z.ZodBoolean>;
2151
+ trustedCertificates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2152
+ minVersion: z.ZodOptional<z.ZodNativeEnum<TlsOptions_Version>>;
2153
+ cipherList: z.ZodOptional<z.ZodString>;
2154
+ }, "strip", z.ZodTypeAny, {
2155
+ keypair?: {
2156
+ privateKey?: string | undefined;
2157
+ certificateChain?: string | undefined;
2158
+ } | undefined;
2159
+ requireClientCerts?: boolean | undefined;
2160
+ trustBrowserCas?: boolean | undefined;
2161
+ trustedCertificates?: string[] | undefined;
2162
+ minVersion?: TlsOptions_Version | undefined;
2163
+ cipherList?: string | undefined;
2164
+ }, {
2165
+ keypair?: {
2166
+ privateKey?: string | undefined;
2167
+ certificateChain?: string | undefined;
2168
+ } | undefined;
2169
+ requireClientCerts?: boolean | undefined;
2170
+ trustBrowserCas?: boolean | undefined;
2171
+ trustedCertificates?: string[] | undefined;
2172
+ minVersion?: TlsOptions_Version | undefined;
2173
+ cipherList?: string | undefined;
2174
+ }>>;
2175
+ }, "strip", z.ZodTypeAny, {
2176
+ allow?: string[] | undefined;
2177
+ deny?: string[] | undefined;
2178
+ tlsOptions?: {
2179
+ keypair?: {
2180
+ privateKey?: string | undefined;
2181
+ certificateChain?: string | undefined;
2182
+ } | undefined;
2183
+ requireClientCerts?: boolean | undefined;
2184
+ trustBrowserCas?: boolean | undefined;
2185
+ trustedCertificates?: string[] | undefined;
2186
+ minVersion?: TlsOptions_Version | undefined;
2187
+ cipherList?: string | undefined;
2188
+ } | undefined;
2189
+ }, {
2190
+ allow?: string[] | undefined;
2191
+ deny?: string[] | undefined;
2192
+ tlsOptions?: {
2193
+ keypair?: {
2194
+ privateKey?: string | undefined;
2195
+ certificateChain?: string | undefined;
2196
+ } | undefined;
2197
+ requireClientCerts?: boolean | undefined;
2198
+ trustBrowserCas?: boolean | undefined;
2199
+ trustedCertificates?: string[] | undefined;
2200
+ minVersion?: TlsOptions_Version | undefined;
2201
+ cipherList?: string | undefined;
2202
+ } | undefined;
2203
+ }>;
2204
+ }, "strip", z.ZodTypeAny, {
2205
+ network: {
2206
+ allow?: string[] | undefined;
2207
+ deny?: string[] | undefined;
2208
+ tlsOptions?: {
2209
+ keypair?: {
2210
+ privateKey?: string | undefined;
2211
+ certificateChain?: string | undefined;
2212
+ } | undefined;
2213
+ requireClientCerts?: boolean | undefined;
2214
+ trustBrowserCas?: boolean | undefined;
2215
+ trustedCertificates?: string[] | undefined;
2216
+ minVersion?: TlsOptions_Version | undefined;
2217
+ cipherList?: string | undefined;
2218
+ } | undefined;
2219
+ };
2220
+ }, {
2221
+ network: {
2222
+ allow?: string[] | undefined;
2223
+ deny?: string[] | undefined;
2224
+ tlsOptions?: {
2225
+ keypair?: {
2226
+ privateKey?: string | undefined;
2227
+ certificateChain?: string | undefined;
2228
+ } | undefined;
2229
+ requireClientCerts?: boolean | undefined;
2230
+ trustBrowserCas?: boolean | undefined;
2231
+ trustedCertificates?: string[] | undefined;
2232
+ minVersion?: TlsOptions_Version | undefined;
2233
+ cipherList?: string | undefined;
2234
+ } | undefined;
2235
+ };
2236
+ }>, z.ZodObject<{
2237
+ external: z.ZodType<ExternalServer, z.ZodTypeDef, ExternalServer>;
2238
+ }, "strip", z.ZodTypeAny, {
2239
+ external: ExternalServer & (ExternalServer | undefined);
2240
+ }, {
2241
+ external: ExternalServer & (ExternalServer | undefined);
2242
+ }>, z.ZodObject<{
2243
+ disk: z.ZodObject<{
2244
+ path: z.ZodString;
2245
+ writable: z.ZodOptional<z.ZodBoolean>;
2246
+ }, "strip", z.ZodTypeAny, {
2247
+ path: string;
2248
+ writable?: boolean | undefined;
2249
+ }, {
2250
+ path: string;
2251
+ writable?: boolean | undefined;
2252
+ }>;
2253
+ }, "strip", z.ZodTypeAny, {
2254
+ disk: {
2255
+ path: string;
2256
+ writable?: boolean | undefined;
2257
+ };
2258
+ }, {
2259
+ disk: {
2260
+ path: string;
2261
+ writable?: boolean | undefined;
2262
+ };
2263
+ }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>>;
2264
+ wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
2265
+ scriptName: z.ZodString;
2266
+ entrypoint: z.ZodOptional<z.ZodString>;
2267
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Json, z.ZodTypeDef, Json>>>;
2268
+ }, "strip", z.ZodTypeAny, {
2269
+ scriptName: string;
2270
+ entrypoint?: string | undefined;
2271
+ bindings?: Record<string, Json> | undefined;
2272
+ }, {
2273
+ scriptName: string;
2274
+ entrypoint?: string | undefined;
2275
+ bindings?: Record<string, Json> | undefined;
2276
+ }>]>>>;
2277
+ outboundService: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<kCurrentWorker>, z.ZodObject<{
2278
+ name: z.ZodUnion<[z.ZodString, z.ZodLiteral<kCurrentWorker>]>;
2279
+ entrypoint: z.ZodOptional<z.ZodString>;
2280
+ }, "strip", z.ZodTypeAny, {
2281
+ name: string | kCurrentWorker;
2282
+ entrypoint?: string | undefined;
2283
+ }, {
2284
+ name: string | kCurrentWorker;
2285
+ entrypoint?: string | undefined;
2286
+ }>, z.ZodObject<{
2287
+ network: z.ZodObject<{
2288
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2289
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2290
+ tlsOptions: z.ZodOptional<z.ZodObject<{
2291
+ keypair: z.ZodOptional<z.ZodObject<{
2292
+ privateKey: z.ZodOptional<z.ZodString>;
2293
+ certificateChain: z.ZodOptional<z.ZodString>;
2294
+ }, "strip", z.ZodTypeAny, {
2295
+ privateKey?: string | undefined;
2296
+ certificateChain?: string | undefined;
2297
+ }, {
2298
+ privateKey?: string | undefined;
2299
+ certificateChain?: string | undefined;
2300
+ }>>;
2301
+ requireClientCerts: z.ZodOptional<z.ZodBoolean>;
2302
+ trustBrowserCas: z.ZodOptional<z.ZodBoolean>;
2303
+ trustedCertificates: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2304
+ minVersion: z.ZodOptional<z.ZodNativeEnum<TlsOptions_Version>>;
2305
+ cipherList: z.ZodOptional<z.ZodString>;
2306
+ }, "strip", z.ZodTypeAny, {
2307
+ keypair?: {
2308
+ privateKey?: string | undefined;
2309
+ certificateChain?: string | undefined;
2310
+ } | undefined;
2311
+ requireClientCerts?: boolean | undefined;
2312
+ trustBrowserCas?: boolean | undefined;
2313
+ trustedCertificates?: string[] | undefined;
2314
+ minVersion?: TlsOptions_Version | undefined;
2315
+ cipherList?: string | undefined;
2316
+ }, {
2317
+ keypair?: {
2318
+ privateKey?: string | undefined;
2319
+ certificateChain?: string | undefined;
2320
+ } | undefined;
2321
+ requireClientCerts?: boolean | undefined;
2322
+ trustBrowserCas?: boolean | undefined;
2323
+ trustedCertificates?: string[] | undefined;
2324
+ minVersion?: TlsOptions_Version | undefined;
2325
+ cipherList?: string | undefined;
2326
+ }>>;
2327
+ }, "strip", z.ZodTypeAny, {
2328
+ allow?: string[] | undefined;
2329
+ deny?: string[] | undefined;
2330
+ tlsOptions?: {
2331
+ keypair?: {
2332
+ privateKey?: string | undefined;
2333
+ certificateChain?: string | undefined;
2334
+ } | undefined;
2335
+ requireClientCerts?: boolean | undefined;
2336
+ trustBrowserCas?: boolean | undefined;
2337
+ trustedCertificates?: string[] | undefined;
2338
+ minVersion?: TlsOptions_Version | undefined;
2339
+ cipherList?: string | undefined;
2340
+ } | undefined;
2341
+ }, {
2342
+ allow?: string[] | undefined;
2343
+ deny?: string[] | undefined;
2344
+ tlsOptions?: {
2345
+ keypair?: {
2346
+ privateKey?: string | undefined;
2347
+ certificateChain?: string | undefined;
2348
+ } | undefined;
2349
+ requireClientCerts?: boolean | undefined;
2350
+ trustBrowserCas?: boolean | undefined;
2351
+ trustedCertificates?: string[] | undefined;
2352
+ minVersion?: TlsOptions_Version | undefined;
2353
+ cipherList?: string | undefined;
2354
+ } | undefined;
2355
+ }>;
2356
+ }, "strip", z.ZodTypeAny, {
2357
+ network: {
2358
+ allow?: string[] | undefined;
2359
+ deny?: string[] | undefined;
2360
+ tlsOptions?: {
2361
+ keypair?: {
2362
+ privateKey?: string | undefined;
2363
+ certificateChain?: string | undefined;
2364
+ } | undefined;
2365
+ requireClientCerts?: boolean | undefined;
2366
+ trustBrowserCas?: boolean | undefined;
2367
+ trustedCertificates?: string[] | undefined;
2368
+ minVersion?: TlsOptions_Version | undefined;
2369
+ cipherList?: string | undefined;
2370
+ } | undefined;
2371
+ };
2372
+ }, {
2373
+ network: {
2374
+ allow?: string[] | undefined;
2375
+ deny?: string[] | undefined;
2376
+ tlsOptions?: {
2377
+ keypair?: {
2378
+ privateKey?: string | undefined;
2379
+ certificateChain?: string | undefined;
2380
+ } | undefined;
2381
+ requireClientCerts?: boolean | undefined;
2382
+ trustBrowserCas?: boolean | undefined;
2383
+ trustedCertificates?: string[] | undefined;
2384
+ minVersion?: TlsOptions_Version | undefined;
2385
+ cipherList?: string | undefined;
2386
+ } | undefined;
2387
+ };
2388
+ }>, z.ZodObject<{
2389
+ external: z.ZodType<ExternalServer, z.ZodTypeDef, ExternalServer>;
2390
+ }, "strip", z.ZodTypeAny, {
2391
+ external: ExternalServer & (ExternalServer | undefined);
2392
+ }, {
2393
+ external: ExternalServer & (ExternalServer | undefined);
2394
+ }>, z.ZodObject<{
2395
+ disk: z.ZodObject<{
2396
+ path: z.ZodString;
2397
+ writable: z.ZodOptional<z.ZodBoolean>;
2398
+ }, "strip", z.ZodTypeAny, {
2399
+ path: string;
2400
+ writable?: boolean | undefined;
2401
+ }, {
2402
+ path: string;
2403
+ writable?: boolean | undefined;
2404
+ }>;
2405
+ }, "strip", z.ZodTypeAny, {
2406
+ disk: {
2407
+ path: string;
2408
+ writable?: boolean | undefined;
2409
+ };
2410
+ }, {
2411
+ disk: {
2412
+ path: string;
2413
+ writable?: boolean | undefined;
2414
+ };
2415
+ }>, z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>]>>;
2416
+ fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent>, z.ZodTypeDef, MockAgent<MockAgent>>>;
2417
+ unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
2418
+ unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2419
+ host: z.ZodOptional<z.ZodString>;
2420
+ port: z.ZodOptional<z.ZodNumber>;
2421
+ entrypoint: z.ZodOptional<z.ZodString>;
2422
+ proxy: z.ZodOptional<z.ZodBoolean>;
2423
+ }, "strip", z.ZodTypeAny, {
2424
+ host?: string | undefined;
2425
+ port?: number | undefined;
2426
+ entrypoint?: string | undefined;
2427
+ proxy?: boolean | undefined;
2428
+ }, {
2429
+ host?: string | undefined;
2430
+ port?: number | undefined;
2431
+ entrypoint?: string | undefined;
2432
+ proxy?: boolean | undefined;
2433
+ }>, "many">>;
2434
+ unsafeEvalBinding: z.ZodOptional<z.ZodString>;
2435
+ unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
2436
+ hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
2437
+ }, "strip", z.ZodTypeAny, {
2438
+ name?: string | undefined;
2439
+ rootPath?: undefined;
2440
+ compatibilityDate?: string | undefined;
2441
+ compatibilityFlags?: string[] | undefined;
2442
+ routes?: string[] | undefined;
2443
+ bindings?: Record<string, Json> | undefined;
2444
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2445
+ textBlobBindings?: Record<string, string> | undefined;
2446
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2447
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2448
+ name: string | kCurrentWorker;
2449
+ entrypoint?: string | undefined;
2450
+ } | {
2451
+ network: {
2452
+ allow?: string[] | undefined;
2453
+ deny?: string[] | undefined;
2454
+ tlsOptions?: {
2455
+ keypair?: {
2456
+ privateKey?: string | undefined;
2457
+ certificateChain?: string | undefined;
2458
+ } | undefined;
2459
+ requireClientCerts?: boolean | undefined;
2460
+ trustBrowserCas?: boolean | undefined;
2461
+ trustedCertificates?: string[] | undefined;
2462
+ minVersion?: TlsOptions_Version | undefined;
2463
+ cipherList?: string | undefined;
2464
+ } | undefined;
2465
+ };
2466
+ } | {
2467
+ external: ExternalServer & (ExternalServer | undefined);
2468
+ } | {
2469
+ disk: {
2470
+ path: string;
2471
+ writable?: boolean | undefined;
2472
+ };
2473
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2474
+ wrappedBindings?: Record<string, string | {
2475
+ scriptName: string;
2476
+ entrypoint?: string | undefined;
2477
+ bindings?: Record<string, Json> | undefined;
2478
+ }> | undefined;
2479
+ outboundService?: string | kCurrentWorker | {
2480
+ name: string | kCurrentWorker;
2481
+ entrypoint?: string | undefined;
2482
+ } | {
2483
+ network: {
2484
+ allow?: string[] | undefined;
2485
+ deny?: string[] | undefined;
2486
+ tlsOptions?: {
2487
+ keypair?: {
2488
+ privateKey?: string | undefined;
2489
+ certificateChain?: string | undefined;
2490
+ } | undefined;
2491
+ requireClientCerts?: boolean | undefined;
2492
+ trustBrowserCas?: boolean | undefined;
2493
+ trustedCertificates?: string[] | undefined;
2494
+ minVersion?: TlsOptions_Version | undefined;
2495
+ cipherList?: string | undefined;
2496
+ } | undefined;
2497
+ };
2498
+ } | {
2499
+ external: ExternalServer & (ExternalServer | undefined);
2500
+ } | {
2501
+ disk: {
2502
+ path: string;
2503
+ writable?: boolean | undefined;
2504
+ };
2505
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2506
+ fetchMock?: MockAgent<MockAgent> | undefined;
2507
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2508
+ unsafeDirectSockets?: {
2509
+ host?: string | undefined;
2510
+ port?: number | undefined;
2511
+ entrypoint?: string | undefined;
2512
+ proxy?: boolean | undefined;
2513
+ }[] | undefined;
2514
+ unsafeEvalBinding?: string | undefined;
2515
+ unsafeUseModuleFallbackService?: boolean | undefined;
2516
+ hasAssetsAndIsVitest?: boolean | undefined;
2517
+ }, {
2518
+ name?: string | undefined;
2519
+ rootPath?: string | undefined;
2520
+ compatibilityDate?: string | undefined;
2521
+ compatibilityFlags?: string[] | undefined;
2522
+ routes?: string[] | undefined;
2523
+ bindings?: Record<string, Json> | undefined;
2524
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2525
+ textBlobBindings?: Record<string, string> | undefined;
2526
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2527
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2528
+ name: string | kCurrentWorker;
2529
+ entrypoint?: string | undefined;
2530
+ } | {
2531
+ network: {
2532
+ allow?: string[] | undefined;
2533
+ deny?: string[] | undefined;
2534
+ tlsOptions?: {
2535
+ keypair?: {
2536
+ privateKey?: string | undefined;
2537
+ certificateChain?: string | undefined;
2538
+ } | undefined;
2539
+ requireClientCerts?: boolean | undefined;
2540
+ trustBrowserCas?: boolean | undefined;
2541
+ trustedCertificates?: string[] | undefined;
2542
+ minVersion?: TlsOptions_Version | undefined;
2543
+ cipherList?: string | undefined;
2544
+ } | undefined;
2545
+ };
2546
+ } | {
2547
+ external: ExternalServer & (ExternalServer | undefined);
2548
+ } | {
2549
+ disk: {
2550
+ path: string;
2551
+ writable?: boolean | undefined;
2552
+ };
2553
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2554
+ wrappedBindings?: Record<string, string | {
2555
+ scriptName: string;
2556
+ entrypoint?: string | undefined;
2557
+ bindings?: Record<string, Json> | undefined;
2558
+ }> | undefined;
2559
+ outboundService?: string | kCurrentWorker | {
2560
+ name: string | kCurrentWorker;
2561
+ entrypoint?: string | undefined;
2562
+ } | {
2563
+ network: {
2564
+ allow?: string[] | undefined;
2565
+ deny?: string[] | undefined;
2566
+ tlsOptions?: {
2567
+ keypair?: {
2568
+ privateKey?: string | undefined;
2569
+ certificateChain?: string | undefined;
2570
+ } | undefined;
2571
+ requireClientCerts?: boolean | undefined;
2572
+ trustBrowserCas?: boolean | undefined;
2573
+ trustedCertificates?: string[] | undefined;
2574
+ minVersion?: TlsOptions_Version | undefined;
2575
+ cipherList?: string | undefined;
2576
+ } | undefined;
2577
+ };
2578
+ } | {
2579
+ external: ExternalServer & (ExternalServer | undefined);
2580
+ } | {
2581
+ disk: {
2582
+ path: string;
2583
+ writable?: boolean | undefined;
2584
+ };
2585
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2586
+ fetchMock?: MockAgent<MockAgent> | undefined;
2587
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2588
+ unsafeDirectSockets?: {
2589
+ host?: string | undefined;
2590
+ port?: number | undefined;
2591
+ entrypoint?: string | undefined;
2592
+ proxy?: boolean | undefined;
2593
+ }[] | undefined;
2594
+ unsafeEvalBinding?: string | undefined;
2595
+ unsafeUseModuleFallbackService?: boolean | undefined;
2596
+ hasAssetsAndIsVitest?: boolean | undefined;
2597
+ }>>, ({
2598
+ modules: {
2599
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2600
+ path: string;
2601
+ contents?: string | Uint8Array | undefined;
2602
+ }[];
2603
+ modulesRoot?: string | undefined;
2604
+ } & {
2605
+ name?: string | undefined;
2606
+ rootPath?: undefined;
2607
+ compatibilityDate?: string | undefined;
2608
+ compatibilityFlags?: string[] | undefined;
2609
+ routes?: string[] | undefined;
2610
+ bindings?: Record<string, Json> | undefined;
2611
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2612
+ textBlobBindings?: Record<string, string> | undefined;
2613
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2614
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2615
+ name: string | kCurrentWorker;
2616
+ entrypoint?: string | undefined;
2617
+ } | {
2618
+ network: {
2619
+ allow?: string[] | undefined;
2620
+ deny?: string[] | undefined;
2621
+ tlsOptions?: {
2622
+ keypair?: {
2623
+ privateKey?: string | undefined;
2624
+ certificateChain?: string | undefined;
2625
+ } | undefined;
2626
+ requireClientCerts?: boolean | undefined;
2627
+ trustBrowserCas?: boolean | undefined;
2628
+ trustedCertificates?: string[] | undefined;
2629
+ minVersion?: TlsOptions_Version | undefined;
2630
+ cipherList?: string | undefined;
2631
+ } | undefined;
2632
+ };
2633
+ } | {
2634
+ external: ExternalServer & (ExternalServer | undefined);
2635
+ } | {
2636
+ disk: {
2637
+ path: string;
2638
+ writable?: boolean | undefined;
2639
+ };
2640
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2641
+ wrappedBindings?: Record<string, string | {
2642
+ scriptName: string;
2643
+ entrypoint?: string | undefined;
2644
+ bindings?: Record<string, Json> | undefined;
2645
+ }> | undefined;
2646
+ outboundService?: string | kCurrentWorker | {
2647
+ name: string | kCurrentWorker;
2648
+ entrypoint?: string | undefined;
2649
+ } | {
2650
+ network: {
2651
+ allow?: string[] | undefined;
2652
+ deny?: string[] | undefined;
2653
+ tlsOptions?: {
2654
+ keypair?: {
2655
+ privateKey?: string | undefined;
2656
+ certificateChain?: string | undefined;
2657
+ } | undefined;
2658
+ requireClientCerts?: boolean | undefined;
2659
+ trustBrowserCas?: boolean | undefined;
2660
+ trustedCertificates?: string[] | undefined;
2661
+ minVersion?: TlsOptions_Version | undefined;
2662
+ cipherList?: string | undefined;
2663
+ } | undefined;
2664
+ };
2665
+ } | {
2666
+ external: ExternalServer & (ExternalServer | undefined);
2667
+ } | {
2668
+ disk: {
2669
+ path: string;
2670
+ writable?: boolean | undefined;
2671
+ };
2672
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2673
+ fetchMock?: MockAgent<MockAgent> | undefined;
2674
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2675
+ unsafeDirectSockets?: {
2676
+ host?: string | undefined;
2677
+ port?: number | undefined;
2678
+ entrypoint?: string | undefined;
2679
+ proxy?: boolean | undefined;
2680
+ }[] | undefined;
2681
+ unsafeEvalBinding?: string | undefined;
2682
+ unsafeUseModuleFallbackService?: boolean | undefined;
2683
+ hasAssetsAndIsVitest?: boolean | undefined;
2684
+ }) | ({
2685
+ script: string;
2686
+ scriptPath?: string | undefined;
2687
+ modules?: boolean | undefined;
2688
+ modulesRules?: {
2689
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2690
+ include: string[];
2691
+ fallthrough?: boolean | undefined;
2692
+ }[] | undefined;
2693
+ modulesRoot?: string | undefined;
2694
+ } & {
2695
+ name?: string | undefined;
2696
+ rootPath?: undefined;
2697
+ compatibilityDate?: string | undefined;
2698
+ compatibilityFlags?: string[] | undefined;
2699
+ routes?: string[] | undefined;
2700
+ bindings?: Record<string, Json> | undefined;
2701
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2702
+ textBlobBindings?: Record<string, string> | undefined;
2703
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2704
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2705
+ name: string | kCurrentWorker;
2706
+ entrypoint?: string | undefined;
2707
+ } | {
2708
+ network: {
2709
+ allow?: string[] | undefined;
2710
+ deny?: string[] | undefined;
2711
+ tlsOptions?: {
2712
+ keypair?: {
2713
+ privateKey?: string | undefined;
2714
+ certificateChain?: string | undefined;
2715
+ } | undefined;
2716
+ requireClientCerts?: boolean | undefined;
2717
+ trustBrowserCas?: boolean | undefined;
2718
+ trustedCertificates?: string[] | undefined;
2719
+ minVersion?: TlsOptions_Version | undefined;
2720
+ cipherList?: string | undefined;
2721
+ } | undefined;
2722
+ };
2723
+ } | {
2724
+ external: ExternalServer & (ExternalServer | undefined);
2725
+ } | {
2726
+ disk: {
2727
+ path: string;
2728
+ writable?: boolean | undefined;
2729
+ };
2730
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2731
+ wrappedBindings?: Record<string, string | {
2732
+ scriptName: string;
2733
+ entrypoint?: string | undefined;
2734
+ bindings?: Record<string, Json> | undefined;
2735
+ }> | undefined;
2736
+ outboundService?: string | kCurrentWorker | {
2737
+ name: string | kCurrentWorker;
2738
+ entrypoint?: string | undefined;
2739
+ } | {
2740
+ network: {
2741
+ allow?: string[] | undefined;
2742
+ deny?: string[] | undefined;
2743
+ tlsOptions?: {
2744
+ keypair?: {
2745
+ privateKey?: string | undefined;
2746
+ certificateChain?: string | undefined;
2747
+ } | undefined;
2748
+ requireClientCerts?: boolean | undefined;
2749
+ trustBrowserCas?: boolean | undefined;
2750
+ trustedCertificates?: string[] | undefined;
2751
+ minVersion?: TlsOptions_Version | undefined;
2752
+ cipherList?: string | undefined;
2753
+ } | undefined;
2754
+ };
2755
+ } | {
2756
+ external: ExternalServer & (ExternalServer | undefined);
2757
+ } | {
2758
+ disk: {
2759
+ path: string;
2760
+ writable?: boolean | undefined;
2761
+ };
2762
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2763
+ fetchMock?: MockAgent<MockAgent> | undefined;
2764
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2765
+ unsafeDirectSockets?: {
2766
+ host?: string | undefined;
2767
+ port?: number | undefined;
2768
+ entrypoint?: string | undefined;
2769
+ proxy?: boolean | undefined;
2770
+ }[] | undefined;
2771
+ unsafeEvalBinding?: string | undefined;
2772
+ unsafeUseModuleFallbackService?: boolean | undefined;
2773
+ hasAssetsAndIsVitest?: boolean | undefined;
2774
+ }) | ({
2775
+ scriptPath: string;
2776
+ modules?: boolean | undefined;
2777
+ modulesRules?: {
2778
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2779
+ include: string[];
2780
+ fallthrough?: boolean | undefined;
2781
+ }[] | undefined;
2782
+ modulesRoot?: string | undefined;
2783
+ } & {
2784
+ name?: string | undefined;
2785
+ rootPath?: undefined;
2786
+ compatibilityDate?: string | undefined;
2787
+ compatibilityFlags?: string[] | undefined;
2788
+ routes?: string[] | undefined;
2789
+ bindings?: Record<string, Json> | undefined;
2790
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2791
+ textBlobBindings?: Record<string, string> | undefined;
2792
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2793
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2794
+ name: string | kCurrentWorker;
2795
+ entrypoint?: string | undefined;
2796
+ } | {
2797
+ network: {
2798
+ allow?: string[] | undefined;
2799
+ deny?: string[] | undefined;
2800
+ tlsOptions?: {
2801
+ keypair?: {
2802
+ privateKey?: string | undefined;
2803
+ certificateChain?: string | undefined;
2804
+ } | undefined;
2805
+ requireClientCerts?: boolean | undefined;
2806
+ trustBrowserCas?: boolean | undefined;
2807
+ trustedCertificates?: string[] | undefined;
2808
+ minVersion?: TlsOptions_Version | undefined;
2809
+ cipherList?: string | undefined;
2810
+ } | undefined;
2811
+ };
2812
+ } | {
2813
+ external: ExternalServer & (ExternalServer | undefined);
2814
+ } | {
2815
+ disk: {
2816
+ path: string;
2817
+ writable?: boolean | undefined;
2818
+ };
2819
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2820
+ wrappedBindings?: Record<string, string | {
2821
+ scriptName: string;
2822
+ entrypoint?: string | undefined;
2823
+ bindings?: Record<string, Json> | undefined;
2824
+ }> | undefined;
2825
+ outboundService?: string | kCurrentWorker | {
2826
+ name: string | kCurrentWorker;
2827
+ entrypoint?: string | undefined;
2828
+ } | {
2829
+ network: {
2830
+ allow?: string[] | undefined;
2831
+ deny?: string[] | undefined;
2832
+ tlsOptions?: {
2833
+ keypair?: {
2834
+ privateKey?: string | undefined;
2835
+ certificateChain?: string | undefined;
2836
+ } | undefined;
2837
+ requireClientCerts?: boolean | undefined;
2838
+ trustBrowserCas?: boolean | undefined;
2839
+ trustedCertificates?: string[] | undefined;
2840
+ minVersion?: TlsOptions_Version | undefined;
2841
+ cipherList?: string | undefined;
2842
+ } | undefined;
2843
+ };
2844
+ } | {
2845
+ external: ExternalServer & (ExternalServer | undefined);
2846
+ } | {
2847
+ disk: {
2848
+ path: string;
2849
+ writable?: boolean | undefined;
2850
+ };
2851
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2852
+ fetchMock?: MockAgent<MockAgent> | undefined;
2853
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2854
+ unsafeDirectSockets?: {
2855
+ host?: string | undefined;
2856
+ port?: number | undefined;
2857
+ entrypoint?: string | undefined;
2858
+ proxy?: boolean | undefined;
2859
+ }[] | undefined;
2860
+ unsafeEvalBinding?: string | undefined;
2861
+ unsafeUseModuleFallbackService?: boolean | undefined;
2862
+ hasAssetsAndIsVitest?: boolean | undefined;
2863
+ }), ({
2864
+ modules: {
2865
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2866
+ path: string;
2867
+ contents?: string | Uint8Array | undefined;
2868
+ }[];
2869
+ modulesRoot?: string | undefined;
2870
+ } | {
2871
+ script: string;
2872
+ scriptPath?: string | undefined;
2873
+ modules?: boolean | undefined;
2874
+ modulesRules?: {
2875
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2876
+ include: string[];
2877
+ fallthrough?: boolean | undefined;
2878
+ }[] | undefined;
2879
+ modulesRoot?: string | undefined;
2880
+ } | {
2881
+ scriptPath: string;
2882
+ modules?: boolean | undefined;
2883
+ modulesRules?: {
2884
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
2885
+ include: string[];
2886
+ fallthrough?: boolean | undefined;
2887
+ }[] | undefined;
2888
+ modulesRoot?: string | undefined;
2889
+ }) & {
2890
+ name?: string | undefined;
2891
+ rootPath?: string | undefined;
2892
+ compatibilityDate?: string | undefined;
2893
+ compatibilityFlags?: string[] | undefined;
2894
+ routes?: string[] | undefined;
2895
+ bindings?: Record<string, Json> | undefined;
2896
+ wasmBindings?: Record<string, string | Uint8Array> | undefined;
2897
+ textBlobBindings?: Record<string, string> | undefined;
2898
+ dataBlobBindings?: Record<string, string | Uint8Array> | undefined;
2899
+ serviceBindings?: Record<string, string | kCurrentWorker | {
2900
+ name: string | kCurrentWorker;
2901
+ entrypoint?: string | undefined;
2902
+ } | {
2903
+ network: {
2904
+ allow?: string[] | undefined;
2905
+ deny?: string[] | undefined;
2906
+ tlsOptions?: {
2907
+ keypair?: {
2908
+ privateKey?: string | undefined;
2909
+ certificateChain?: string | undefined;
2910
+ } | undefined;
2911
+ requireClientCerts?: boolean | undefined;
2912
+ trustBrowserCas?: boolean | undefined;
2913
+ trustedCertificates?: string[] | undefined;
2914
+ minVersion?: TlsOptions_Version | undefined;
2915
+ cipherList?: string | undefined;
2916
+ } | undefined;
2917
+ };
2918
+ } | {
2919
+ external: ExternalServer & (ExternalServer | undefined);
2920
+ } | {
2921
+ disk: {
2922
+ path: string;
2923
+ writable?: boolean | undefined;
2924
+ };
2925
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>)> | undefined;
2926
+ wrappedBindings?: Record<string, string | {
2927
+ scriptName: string;
2928
+ entrypoint?: string | undefined;
2929
+ bindings?: Record<string, Json> | undefined;
2930
+ }> | undefined;
2931
+ outboundService?: string | kCurrentWorker | {
2932
+ name: string | kCurrentWorker;
2933
+ entrypoint?: string | undefined;
2934
+ } | {
2935
+ network: {
2936
+ allow?: string[] | undefined;
2937
+ deny?: string[] | undefined;
2938
+ tlsOptions?: {
2939
+ keypair?: {
2940
+ privateKey?: string | undefined;
2941
+ certificateChain?: string | undefined;
2942
+ } | undefined;
2943
+ requireClientCerts?: boolean | undefined;
2944
+ trustBrowserCas?: boolean | undefined;
2945
+ trustedCertificates?: string[] | undefined;
2946
+ minVersion?: TlsOptions_Version | undefined;
2947
+ cipherList?: string | undefined;
2948
+ } | undefined;
2949
+ };
2950
+ } | {
2951
+ external: ExternalServer & (ExternalServer | undefined);
2952
+ } | {
2953
+ disk: {
2954
+ path: string;
2955
+ writable?: boolean | undefined;
2956
+ };
2957
+ } | ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
2958
+ fetchMock?: MockAgent<MockAgent> | undefined;
2959
+ unsafeEphemeralDurableObjects?: boolean | undefined;
2960
+ unsafeDirectSockets?: {
2961
+ host?: string | undefined;
2962
+ port?: number | undefined;
2963
+ entrypoint?: string | undefined;
2964
+ proxy?: boolean | undefined;
2965
+ }[] | undefined;
2966
+ unsafeEvalBinding?: string | undefined;
2967
+ unsafeUseModuleFallbackService?: boolean | undefined;
2968
+ hasAssetsAndIsVitest?: boolean | undefined;
2969
+ }>, z.ZodObject<{
2970
+ rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
2971
+ host: z.ZodOptional<z.ZodString>;
2972
+ port: z.ZodOptional<z.ZodNumber>;
2973
+ https: z.ZodOptional<z.ZodBoolean>;
2974
+ httpsKey: z.ZodOptional<z.ZodString>;
2975
+ httpsKeyPath: z.ZodOptional<z.ZodString>;
2976
+ httpsCert: z.ZodOptional<z.ZodString>;
2977
+ httpsCertPath: z.ZodOptional<z.ZodString>;
2978
+ inspectorPort: z.ZodOptional<z.ZodNumber>;
2979
+ verbose: z.ZodOptional<z.ZodBoolean>;
2980
+ log: z.ZodOptional<z.ZodType<Log, z.ZodTypeDef, Log>>;
2981
+ handleRuntimeStdio: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodType<Readable, z.ZodTypeDef, Readable>], null>, z.ZodUnknown>>;
2982
+ upstream: z.ZodOptional<z.ZodString>;
2983
+ cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
2984
+ liveReload: z.ZodOptional<z.ZodBoolean>;
2985
+ unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
2986
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request, mf: Miniflare) => Awaitable<Response>, z.ZodTypeDef, (request: Request, mf: Miniflare) => Awaitable<Response>>>;
2987
+ unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
2988
+ }, "strip", z.ZodTypeAny, {
2989
+ rootPath?: undefined;
2990
+ host?: string | undefined;
2991
+ port?: number | undefined;
2992
+ https?: boolean | undefined;
2993
+ httpsKey?: string | undefined;
2994
+ httpsKeyPath?: string | undefined;
2995
+ httpsCert?: string | undefined;
2996
+ httpsCertPath?: string | undefined;
2997
+ inspectorPort?: number | undefined;
2998
+ verbose?: boolean | undefined;
2999
+ log?: Log | undefined;
3000
+ handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined;
3001
+ upstream?: string | undefined;
3002
+ cf?: string | boolean | Record<string, any> | undefined;
3003
+ liveReload?: boolean | undefined;
3004
+ unsafeProxySharedSecret?: string | undefined;
3005
+ unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3006
+ unsafeStickyBlobs?: boolean | undefined;
3007
+ }, {
3008
+ rootPath?: string | undefined;
3009
+ host?: string | undefined;
3010
+ port?: number | undefined;
3011
+ https?: boolean | undefined;
3012
+ httpsKey?: string | undefined;
3013
+ httpsKeyPath?: string | undefined;
3014
+ httpsCert?: string | undefined;
3015
+ httpsCertPath?: string | undefined;
3016
+ inspectorPort?: number | undefined;
3017
+ verbose?: boolean | undefined;
3018
+ log?: Log | undefined;
3019
+ handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined;
3020
+ upstream?: string | undefined;
3021
+ cf?: string | boolean | Record<string, any> | undefined;
3022
+ liveReload?: boolean | undefined;
3023
+ unsafeProxySharedSecret?: string | undefined;
3024
+ unsafeModuleFallbackService?: ((request: Request, mf: Miniflare) => Awaitable<Response>) | undefined;
3025
+ unsafeStickyBlobs?: boolean | undefined;
3026
+ }>>;
3027
+ cache: Plugin<z.ZodObject<{
3028
+ cache: z.ZodOptional<z.ZodBoolean>;
3029
+ cacheWarnUsage: z.ZodOptional<z.ZodBoolean>;
3030
+ }, "strip", z.ZodTypeAny, {
3031
+ cache?: boolean | undefined;
3032
+ cacheWarnUsage?: boolean | undefined;
3033
+ }, {
3034
+ cache?: boolean | undefined;
3035
+ cacheWarnUsage?: boolean | undefined;
3036
+ }>, z.ZodObject<{
3037
+ cachePersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3038
+ }, "strip", z.ZodTypeAny, {
3039
+ cachePersist?: string | boolean | undefined;
3040
+ }, {
3041
+ cachePersist?: string | boolean | undefined;
3042
+ }>>;
3043
+ d1: Plugin<z.ZodObject<{
3044
+ d1Databases: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
3045
+ }, "strip", z.ZodTypeAny, {
3046
+ d1Databases?: string[] | Record<string, string> | undefined;
3047
+ }, {
3048
+ d1Databases?: string[] | Record<string, string> | undefined;
3049
+ }>, z.ZodObject<{
3050
+ d1Persist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3051
+ }, "strip", z.ZodTypeAny, {
3052
+ d1Persist?: string | boolean | undefined;
3053
+ }, {
3054
+ d1Persist?: string | boolean | undefined;
3055
+ }>>;
3056
+ do: Plugin<z.ZodObject<{
3057
+ durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
3058
+ className: z.ZodString;
3059
+ scriptName: z.ZodOptional<z.ZodString>;
3060
+ useSQLite: z.ZodOptional<z.ZodBoolean>;
3061
+ unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<kUnsafeEphemeralUniqueKey>]>>;
3062
+ unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
3063
+ }, "strip", z.ZodTypeAny, {
3064
+ className: string;
3065
+ scriptName?: string | undefined;
3066
+ useSQLite?: boolean | undefined;
3067
+ unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
3068
+ unsafePreventEviction?: boolean | undefined;
3069
+ }, {
3070
+ className: string;
3071
+ scriptName?: string | undefined;
3072
+ useSQLite?: boolean | undefined;
3073
+ unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
3074
+ unsafePreventEviction?: boolean | undefined;
3075
+ }>]>>>;
3076
+ }, "strip", z.ZodTypeAny, {
3077
+ durableObjects?: Record<string, string | {
3078
+ className: string;
3079
+ scriptName?: string | undefined;
3080
+ useSQLite?: boolean | undefined;
3081
+ unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
3082
+ unsafePreventEviction?: boolean | undefined;
3083
+ }> | undefined;
3084
+ }, {
3085
+ durableObjects?: Record<string, string | {
3086
+ className: string;
3087
+ scriptName?: string | undefined;
3088
+ useSQLite?: boolean | undefined;
3089
+ unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
3090
+ unsafePreventEviction?: boolean | undefined;
3091
+ }> | undefined;
3092
+ }>, z.ZodObject<{
3093
+ durableObjectsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3094
+ }, "strip", z.ZodTypeAny, {
3095
+ durableObjectsPersist?: string | boolean | undefined;
3096
+ }, {
3097
+ durableObjectsPersist?: string | boolean | undefined;
3098
+ }>>;
3099
+ kv: Plugin<z.ZodObject<{
3100
+ kvNamespaces: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
3101
+ sitePath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3102
+ siteInclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3103
+ siteExclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3104
+ }, "strip", z.ZodTypeAny, {
3105
+ kvNamespaces?: string[] | Record<string, string> | undefined;
3106
+ sitePath?: string | undefined;
3107
+ siteInclude?: string[] | undefined;
3108
+ siteExclude?: string[] | undefined;
3109
+ }, {
3110
+ kvNamespaces?: string[] | Record<string, string> | undefined;
3111
+ sitePath?: string | undefined;
3112
+ siteInclude?: string[] | undefined;
3113
+ siteExclude?: string[] | undefined;
3114
+ }>, z.ZodObject<{
3115
+ kvPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3116
+ }, "strip", z.ZodTypeAny, {
3117
+ kvPersist?: string | boolean | undefined;
3118
+ }, {
3119
+ kvPersist?: string | boolean | undefined;
3120
+ }>>;
3121
+ queues: Plugin<z.ZodObject<{
3122
+ queueProducers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
3123
+ queueName: z.ZodString;
3124
+ deliveryDelay: z.ZodOptional<z.ZodNumber>;
3125
+ }, "strip", z.ZodTypeAny, {
3126
+ queueName: string;
3127
+ deliveryDelay?: number | undefined;
3128
+ }, {
3129
+ queueName: string;
3130
+ deliveryDelay?: number | undefined;
3131
+ }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3132
+ queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3133
+ maxBatchSize: z.ZodOptional<z.ZodNumber>;
3134
+ maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3135
+ maxRetires: z.ZodOptional<z.ZodNumber>;
3136
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3137
+ deadLetterQueue: z.ZodOptional<z.ZodString>;
3138
+ retryDelay: z.ZodOptional<z.ZodNumber>;
3139
+ }, "strip", z.ZodTypeAny, {
3140
+ maxBatchSize?: number | undefined;
3141
+ maxBatchTimeout?: number | undefined;
3142
+ maxRetires?: number | undefined;
3143
+ maxRetries?: number | undefined;
3144
+ deadLetterQueue?: string | undefined;
3145
+ retryDelay?: number | undefined;
3146
+ }, {
3147
+ maxBatchSize?: number | undefined;
3148
+ maxBatchTimeout?: number | undefined;
3149
+ maxRetires?: number | undefined;
3150
+ maxRetries?: number | undefined;
3151
+ deadLetterQueue?: string | undefined;
3152
+ retryDelay?: number | undefined;
3153
+ }>, Omit<{
3154
+ maxBatchSize?: number | undefined;
3155
+ maxBatchTimeout?: number | undefined;
3156
+ maxRetires?: number | undefined;
3157
+ maxRetries?: number | undefined;
3158
+ deadLetterQueue?: string | undefined;
3159
+ retryDelay?: number | undefined;
3160
+ }, "maxRetires">, {
3161
+ maxBatchSize?: number | undefined;
3162
+ maxBatchTimeout?: number | undefined;
3163
+ maxRetires?: number | undefined;
3164
+ maxRetries?: number | undefined;
3165
+ deadLetterQueue?: string | undefined;
3166
+ retryDelay?: number | undefined;
3167
+ }>>, z.ZodArray<z.ZodString, "many">]>>;
3168
+ }, "strip", z.ZodTypeAny, {
3169
+ queueProducers?: string[] | Record<string, string> | Record<string, {
3170
+ queueName: string;
3171
+ deliveryDelay?: number | undefined;
3172
+ }> | undefined;
3173
+ queueConsumers?: string[] | Record<string, Omit<{
3174
+ maxBatchSize?: number | undefined;
3175
+ maxBatchTimeout?: number | undefined;
3176
+ maxRetires?: number | undefined;
3177
+ maxRetries?: number | undefined;
3178
+ deadLetterQueue?: string | undefined;
3179
+ retryDelay?: number | undefined;
3180
+ }, "maxRetires">> | undefined;
3181
+ }, {
3182
+ queueProducers?: string[] | Record<string, string> | Record<string, {
3183
+ queueName: string;
3184
+ deliveryDelay?: number | undefined;
3185
+ }> | undefined;
3186
+ queueConsumers?: string[] | Record<string, {
3187
+ maxBatchSize?: number | undefined;
3188
+ maxBatchTimeout?: number | undefined;
3189
+ maxRetires?: number | undefined;
3190
+ maxRetries?: number | undefined;
3191
+ deadLetterQueue?: string | undefined;
3192
+ retryDelay?: number | undefined;
3193
+ }> | undefined;
3194
+ }>>;
3195
+ r2: Plugin<z.ZodObject<{
3196
+ r2Buckets: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
3197
+ }, "strip", z.ZodTypeAny, {
3198
+ r2Buckets?: string[] | Record<string, string> | undefined;
3199
+ }, {
3200
+ r2Buckets?: string[] | Record<string, string> | undefined;
3201
+ }>, z.ZodObject<{
3202
+ r2Persist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3203
+ }, "strip", z.ZodTypeAny, {
3204
+ r2Persist?: string | boolean | undefined;
3205
+ }, {
3206
+ r2Persist?: string | boolean | undefined;
3207
+ }>>;
3208
+ hyperdrive: Plugin<z.ZodObject<{
3209
+ hyperdrives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<URL_2, z.ZodTypeDef, URL_2>]>, URL_2, string | URL_2>>>;
3210
+ }, "strip", z.ZodTypeAny, {
3211
+ hyperdrives?: Record<string, URL_2> | undefined;
3212
+ }, {
3213
+ hyperdrives?: Record<string, string | URL_2> | undefined;
3214
+ }>>;
3215
+ ratelimit: Plugin<z.ZodObject<{
3216
+ ratelimits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3217
+ simple: z.ZodObject<{
3218
+ limit: z.ZodNumber;
3219
+ period: z.ZodOptional<z.ZodNativeEnum<PeriodType>>;
3220
+ }, "strip", z.ZodTypeAny, {
3221
+ limit: number;
3222
+ period?: PeriodType | undefined;
3223
+ }, {
3224
+ limit: number;
3225
+ period?: PeriodType | undefined;
3226
+ }>;
3227
+ }, "strip", z.ZodTypeAny, {
3228
+ simple: {
3229
+ limit: number;
3230
+ period?: PeriodType | undefined;
3231
+ };
3232
+ }, {
3233
+ simple: {
3234
+ limit: number;
3235
+ period?: PeriodType | undefined;
3236
+ };
3237
+ }>>>;
3238
+ }, "strip", z.ZodTypeAny, {
3239
+ ratelimits?: Record<string, {
3240
+ simple: {
3241
+ limit: number;
3242
+ period?: PeriodType | undefined;
3243
+ };
3244
+ }> | undefined;
3245
+ }, {
3246
+ ratelimits?: Record<string, {
3247
+ simple: {
3248
+ limit: number;
3249
+ period?: PeriodType | undefined;
3250
+ };
3251
+ }> | undefined;
3252
+ }>>;
3253
+ assets: Plugin<z.ZodObject<{
3254
+ assets: z.ZodOptional<z.ZodObject<{
3255
+ workerName: z.ZodOptional<z.ZodString>;
3256
+ directory: z.ZodEffects<z.ZodString, string, string>;
3257
+ binding: z.ZodOptional<z.ZodString>;
3258
+ routingConfig: z.ZodOptional<z.ZodObject<{
3259
+ has_user_worker: z.ZodOptional<z.ZodBoolean>;
3260
+ }, "strip", z.ZodTypeAny, {
3261
+ has_user_worker?: boolean;
3262
+ }, {
3263
+ has_user_worker?: boolean;
3264
+ }>>;
3265
+ assetConfig: z.ZodOptional<z.ZodObject<{
3266
+ html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
3267
+ not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
3268
+ }, "strip", z.ZodTypeAny, {
3269
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3270
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3271
+ }, {
3272
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3273
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3274
+ }>>;
3275
+ }, "strip", z.ZodTypeAny, {
3276
+ directory: string;
3277
+ workerName?: string | undefined;
3278
+ binding?: string | undefined;
3279
+ routingConfig?: {
3280
+ has_user_worker?: boolean;
3281
+ } | undefined;
3282
+ assetConfig?: {
3283
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3284
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3285
+ } | undefined;
3286
+ }, {
3287
+ directory: string;
3288
+ workerName?: string | undefined;
3289
+ binding?: string | undefined;
3290
+ routingConfig?: {
3291
+ has_user_worker?: boolean;
3292
+ } | undefined;
3293
+ assetConfig?: {
3294
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3295
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3296
+ } | undefined;
3297
+ }>>;
3298
+ }, "strip", z.ZodTypeAny, {
3299
+ assets?: {
3300
+ directory: string;
3301
+ workerName?: string | undefined;
3302
+ binding?: string | undefined;
3303
+ routingConfig?: {
3304
+ has_user_worker?: boolean;
3305
+ } | undefined;
3306
+ assetConfig?: {
3307
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3308
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3309
+ } | undefined;
3310
+ } | undefined;
3311
+ }, {
3312
+ assets?: {
3313
+ directory: string;
3314
+ workerName?: string | undefined;
3315
+ binding?: string | undefined;
3316
+ routingConfig?: {
3317
+ has_user_worker?: boolean;
3318
+ } | undefined;
3319
+ assetConfig?: {
3320
+ html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
3321
+ not_found_handling?: "none" | "single-page-application" | "404-page";
3322
+ } | undefined;
3323
+ } | undefined;
3324
+ }>>;
3325
+ };
3326
+
3327
+ export declare type Plugins = typeof PLUGINS;
3328
+
3329
+ export declare interface PluginServicesOptions<Options extends z.ZodType, SharedOptions extends z.ZodType | undefined> {
3330
+ log: Log;
3331
+ options: z.infer<Options>;
3332
+ sharedOptions: OptionalZodTypeOf<SharedOptions>;
3333
+ workerBindings: Worker_Binding[];
3334
+ workerIndex: number;
3335
+ additionalModules: Worker_Module[];
3336
+ tmpPath: string;
3337
+ workerNames: string[];
3338
+ loopbackPort: number;
3339
+ unsafeStickyBlobs: boolean;
3340
+ wrappedBindingNames: WrappedBindingNames;
3341
+ durableObjectClassNames: DurableObjectClassNames;
3342
+ unsafeEphemeralDurableObjects: boolean;
3343
+ queueProducers: QueueProducers;
3344
+ queueConsumers: QueueConsumers;
3345
+ }
3346
+
3347
+ export declare function prefixError(prefix: string, e: any): Error;
3348
+
3349
+ export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_2<Uint8Array>): ReadableStream_2<Uint8Array>;
3350
+
3351
+ export declare const ProxyAddresses: {
3352
+ readonly GLOBAL: 0;
3353
+ readonly ENV: 1;
3354
+ readonly USER_START: 2;
3355
+ };
3356
+
3357
+ export declare class ProxyClient {
3358
+ #private;
3359
+ constructor(runtimeEntryURL: URL, dispatchFetch: DispatchFetch);
3360
+ get global(): ServiceWorkerGlobalScope;
3361
+ get env(): Record<string, unknown>;
3362
+ poisonProxies(): void;
3363
+ setRuntimeEntryURL(runtimeEntryURL: URL): void;
3364
+ dispose(): Promise<void>;
3365
+ }
3366
+
3367
+ export declare class ProxyNodeBinding {
3368
+ proxyOverrideHandler?: ProxyHandler<any> | undefined;
3369
+ constructor(proxyOverrideHandler?: ProxyHandler<any> | undefined);
3370
+ }
3371
+
3372
+ export declare const ProxyOps: {
3373
+ readonly GET: "GET";
3374
+ readonly GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR";
3375
+ readonly GET_OWN_KEYS: "GET_OWN_KEYS";
3376
+ readonly CALL: "CALL";
3377
+ readonly FREE: "FREE";
3378
+ };
3379
+
3380
+ export declare const QueueBindings: {
3381
+ readonly SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_";
3382
+ readonly MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS";
3383
+ readonly MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS";
3384
+ };
3385
+
3386
+ export declare type QueueConsumer = z.infer<typeof QueueConsumerSchema>;
3387
+
3388
+ export declare const QueueConsumerOptionsSchema: z.ZodEffects<z.ZodObject<{
3389
+ maxBatchSize: z.ZodOptional<z.ZodNumber>;
3390
+ maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3391
+ maxRetires: z.ZodOptional<z.ZodNumber>;
3392
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3393
+ deadLetterQueue: z.ZodOptional<z.ZodString>;
3394
+ retryDelay: z.ZodOptional<z.ZodNumber>;
3395
+ }, "strip", z.ZodTypeAny, {
3396
+ maxBatchSize?: number | undefined;
3397
+ maxBatchTimeout?: number | undefined;
3398
+ maxRetires?: number | undefined;
3399
+ maxRetries?: number | undefined;
3400
+ deadLetterQueue?: string | undefined;
3401
+ retryDelay?: number | undefined;
3402
+ }, {
3403
+ maxBatchSize?: number | undefined;
3404
+ maxBatchTimeout?: number | undefined;
3405
+ maxRetires?: number | undefined;
3406
+ maxRetries?: number | undefined;
3407
+ deadLetterQueue?: string | undefined;
3408
+ retryDelay?: number | undefined;
3409
+ }>, Omit<{
3410
+ maxBatchSize?: number | undefined;
3411
+ maxBatchTimeout?: number | undefined;
3412
+ maxRetires?: number | undefined;
3413
+ maxRetries?: number | undefined;
3414
+ deadLetterQueue?: string | undefined;
3415
+ retryDelay?: number | undefined;
3416
+ }, "maxRetires">, {
3417
+ maxBatchSize?: number | undefined;
3418
+ maxBatchTimeout?: number | undefined;
3419
+ maxRetires?: number | undefined;
3420
+ maxRetries?: number | undefined;
3421
+ deadLetterQueue?: string | undefined;
3422
+ retryDelay?: number | undefined;
3423
+ }>;
3424
+
3425
+ export declare type QueueConsumers = Map<string, z.infer<typeof QueueConsumerSchema>>;
3426
+
3427
+ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodEffects<z.ZodObject<{
3428
+ maxBatchSize: z.ZodOptional<z.ZodNumber>;
3429
+ maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3430
+ maxRetires: z.ZodOptional<z.ZodNumber>;
3431
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3432
+ deadLetterQueue: z.ZodOptional<z.ZodString>;
3433
+ retryDelay: z.ZodOptional<z.ZodNumber>;
3434
+ }, "strip", z.ZodTypeAny, {
3435
+ maxBatchSize?: number | undefined;
3436
+ maxBatchTimeout?: number | undefined;
3437
+ maxRetires?: number | undefined;
3438
+ maxRetries?: number | undefined;
3439
+ deadLetterQueue?: string | undefined;
3440
+ retryDelay?: number | undefined;
3441
+ }, {
3442
+ maxBatchSize?: number | undefined;
3443
+ maxBatchTimeout?: number | undefined;
3444
+ maxRetires?: number | undefined;
3445
+ maxRetries?: number | undefined;
3446
+ deadLetterQueue?: string | undefined;
3447
+ retryDelay?: number | undefined;
3448
+ }>, Omit<{
3449
+ maxBatchSize?: number | undefined;
3450
+ maxBatchTimeout?: number | undefined;
3451
+ maxRetires?: number | undefined;
3452
+ maxRetries?: number | undefined;
3453
+ deadLetterQueue?: string | undefined;
3454
+ retryDelay?: number | undefined;
3455
+ }, "maxRetires">, {
3456
+ maxBatchSize?: number | undefined;
3457
+ maxBatchTimeout?: number | undefined;
3458
+ maxRetires?: number | undefined;
3459
+ maxRetries?: number | undefined;
3460
+ deadLetterQueue?: string | undefined;
3461
+ retryDelay?: number | undefined;
3462
+ }>, z.ZodObject<{
3463
+ workerName: z.ZodString;
3464
+ }, "strip", z.ZodTypeAny, {
3465
+ workerName: string;
3466
+ }, {
3467
+ workerName: string;
3468
+ }>>;
3469
+
3470
+ export declare const QueueConsumersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
3471
+ maxBatchSize: z.ZodOptional<z.ZodNumber>;
3472
+ maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3473
+ maxRetires: z.ZodOptional<z.ZodNumber>;
3474
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3475
+ deadLetterQueue: z.ZodOptional<z.ZodString>;
3476
+ retryDelay: z.ZodOptional<z.ZodNumber>;
3477
+ }, "strip", z.ZodTypeAny, {
3478
+ maxBatchSize?: number | undefined;
3479
+ maxBatchTimeout?: number | undefined;
3480
+ maxRetires?: number | undefined;
3481
+ maxRetries?: number | undefined;
3482
+ deadLetterQueue?: string | undefined;
3483
+ retryDelay?: number | undefined;
3484
+ }, {
3485
+ maxBatchSize?: number | undefined;
3486
+ maxBatchTimeout?: number | undefined;
3487
+ maxRetires?: number | undefined;
3488
+ maxRetries?: number | undefined;
3489
+ deadLetterQueue?: string | undefined;
3490
+ retryDelay?: number | undefined;
3491
+ }>, Omit<{
3492
+ maxBatchSize?: number | undefined;
3493
+ maxBatchTimeout?: number | undefined;
3494
+ maxRetires?: number | undefined;
3495
+ maxRetries?: number | undefined;
3496
+ deadLetterQueue?: string | undefined;
3497
+ retryDelay?: number | undefined;
3498
+ }, "maxRetires">, {
3499
+ maxBatchSize?: number | undefined;
3500
+ maxBatchTimeout?: number | undefined;
3501
+ maxRetires?: number | undefined;
3502
+ maxRetries?: number | undefined;
3503
+ deadLetterQueue?: string | undefined;
3504
+ retryDelay?: number | undefined;
3505
+ }>, z.ZodObject<{
3506
+ workerName: z.ZodString;
3507
+ }, "strip", z.ZodTypeAny, {
3508
+ workerName: string;
3509
+ }, {
3510
+ workerName: string;
3511
+ }>>>;
3512
+
3513
+ export declare type QueueContentType = z.infer<typeof QueueContentTypeSchema>;
3514
+
3515
+ export declare const QueueContentTypeSchema: z.ZodDefault<z.ZodEnum<["text", "json", "bytes", "v8"]>>;
3516
+
3517
+ export declare type QueueIncomingMessage = z.infer<typeof QueueIncomingMessageSchema>;
3518
+
3519
+ export declare const QueueIncomingMessageSchema: z.ZodObject<{
3520
+ contentType: z.ZodDefault<z.ZodEnum<["text", "json", "bytes", "v8"]>>;
3521
+ delaySecs: z.ZodOptional<z.ZodNumber>;
3522
+ body: z.ZodEffects<z.ZodString, Buffer, string>;
3523
+ id: z.ZodOptional<z.ZodString>;
3524
+ timestamp: z.ZodOptional<z.ZodNumber>;
3525
+ }, "strip", z.ZodTypeAny, {
3526
+ body: Buffer;
3527
+ contentType: "json" | "bytes" | "v8" | "text";
3528
+ delaySecs?: number | undefined;
3529
+ id?: string | undefined;
3530
+ timestamp?: number | undefined;
3531
+ }, {
3532
+ body: string;
3533
+ contentType?: "json" | "bytes" | "v8" | "text" | undefined;
3534
+ delaySecs?: number | undefined;
3535
+ id?: string | undefined;
3536
+ timestamp?: number | undefined;
3537
+ }>;
3538
+
3539
+ export declare type QueueMessageDelay = z.infer<typeof QueueMessageDelaySchema>;
3540
+
3541
+ export declare const QueueMessageDelaySchema: z.ZodOptional<z.ZodNumber>;
3542
+
3543
+ export declare type QueueOutgoingMessage = z.input<typeof QueueIncomingMessageSchema>;
3544
+
3545
+ export declare type QueueProducer = z.infer<typeof QueueProducerSchema>;
3546
+
3547
+ export declare const QueueProducerOptionsSchema: z.ZodObject<{
3548
+ queueName: z.ZodString;
3549
+ deliveryDelay: z.ZodOptional<z.ZodNumber>;
3550
+ }, "strip", z.ZodTypeAny, {
3551
+ queueName: string;
3552
+ deliveryDelay?: number | undefined;
3553
+ }, {
3554
+ queueName: string;
3555
+ deliveryDelay?: number | undefined;
3556
+ }>;
3557
+
3558
+ export declare type QueueProducers = Map<string, z.infer<typeof QueueProducerSchema>>;
3559
+
3560
+ export declare const QueueProducerSchema: z.ZodIntersection<z.ZodObject<{
3561
+ queueName: z.ZodString;
3562
+ deliveryDelay: z.ZodOptional<z.ZodNumber>;
3563
+ }, "strip", z.ZodTypeAny, {
3564
+ queueName: string;
3565
+ deliveryDelay?: number | undefined;
3566
+ }, {
3567
+ queueName: string;
3568
+ deliveryDelay?: number | undefined;
3569
+ }>, z.ZodObject<{
3570
+ workerName: z.ZodString;
3571
+ }, "strip", z.ZodTypeAny, {
3572
+ workerName: string;
3573
+ }, {
3574
+ workerName: string;
3575
+ }>>;
3576
+
3577
+ export declare const QueueProducersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodObject<{
3578
+ queueName: z.ZodString;
3579
+ deliveryDelay: z.ZodOptional<z.ZodNumber>;
3580
+ }, "strip", z.ZodTypeAny, {
3581
+ queueName: string;
3582
+ deliveryDelay?: number | undefined;
3583
+ }, {
3584
+ queueName: string;
3585
+ deliveryDelay?: number | undefined;
3586
+ }>, z.ZodObject<{
3587
+ workerName: z.ZodString;
3588
+ }, "strip", z.ZodTypeAny, {
3589
+ workerName: string;
3590
+ }, {
3591
+ workerName: string;
3592
+ }>>>;
3593
+
3594
+ export declare const QUEUES_PLUGIN: Plugin<typeof QueuesOptionsSchema>;
3595
+
3596
+ export declare const QUEUES_PLUGIN_NAME = "queues";
3597
+
3598
+ export declare const QueuesBatchRequestSchema: z.ZodObject<{
3599
+ messages: z.ZodArray<z.ZodObject<{
3600
+ contentType: z.ZodDefault<z.ZodEnum<["text", "json", "bytes", "v8"]>>;
3601
+ delaySecs: z.ZodOptional<z.ZodNumber>;
3602
+ body: z.ZodEffects<z.ZodString, Buffer, string>;
3603
+ id: z.ZodOptional<z.ZodString>;
3604
+ timestamp: z.ZodOptional<z.ZodNumber>;
3605
+ }, "strip", z.ZodTypeAny, {
3606
+ body: Buffer;
3607
+ contentType: "json" | "bytes" | "v8" | "text";
3608
+ delaySecs?: number | undefined;
3609
+ id?: string | undefined;
3610
+ timestamp?: number | undefined;
3611
+ }, {
3612
+ body: string;
3613
+ contentType?: "json" | "bytes" | "v8" | "text" | undefined;
3614
+ delaySecs?: number | undefined;
3615
+ id?: string | undefined;
3616
+ timestamp?: number | undefined;
3617
+ }>, "many">;
3618
+ }, "strip", z.ZodTypeAny, {
3619
+ messages: {
3620
+ body: Buffer;
3621
+ contentType: "json" | "bytes" | "v8" | "text";
3622
+ delaySecs?: number | undefined;
3623
+ id?: string | undefined;
3624
+ timestamp?: number | undefined;
3625
+ }[];
3626
+ }, {
3627
+ messages: {
3628
+ body: string;
3629
+ contentType?: "json" | "bytes" | "v8" | "text" | undefined;
3630
+ delaySecs?: number | undefined;
3631
+ id?: string | undefined;
3632
+ timestamp?: number | undefined;
3633
+ }[];
3634
+ }>;
3635
+
3636
+ export declare class QueuesError extends MiniflareError<QueuesErrorCode> {
3637
+ }
3638
+
3639
+ export declare type QueuesErrorCode = "ERR_MULTIPLE_CONSUMERS" | "ERR_DEAD_LETTER_QUEUE_CYCLE";
3640
+
3641
+ export declare const QueuesOptionsSchema: z.ZodObject<{
3642
+ queueProducers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
3643
+ queueName: z.ZodString;
3644
+ deliveryDelay: z.ZodOptional<z.ZodNumber>;
3645
+ }, "strip", z.ZodTypeAny, {
3646
+ queueName: string;
3647
+ deliveryDelay?: number | undefined;
3648
+ }, {
3649
+ queueName: string;
3650
+ deliveryDelay?: number | undefined;
3651
+ }>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3652
+ queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3653
+ maxBatchSize: z.ZodOptional<z.ZodNumber>;
3654
+ maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
3655
+ maxRetires: z.ZodOptional<z.ZodNumber>;
3656
+ maxRetries: z.ZodOptional<z.ZodNumber>;
3657
+ deadLetterQueue: z.ZodOptional<z.ZodString>;
3658
+ retryDelay: z.ZodOptional<z.ZodNumber>;
3659
+ }, "strip", z.ZodTypeAny, {
3660
+ maxBatchSize?: number | undefined;
3661
+ maxBatchTimeout?: number | undefined;
3662
+ maxRetires?: number | undefined;
3663
+ maxRetries?: number | undefined;
3664
+ deadLetterQueue?: string | undefined;
3665
+ retryDelay?: number | undefined;
3666
+ }, {
3667
+ maxBatchSize?: number | undefined;
3668
+ maxBatchTimeout?: number | undefined;
3669
+ maxRetires?: number | undefined;
3670
+ maxRetries?: number | undefined;
3671
+ deadLetterQueue?: string | undefined;
3672
+ retryDelay?: number | undefined;
3673
+ }>, Omit<{
3674
+ maxBatchSize?: number | undefined;
3675
+ maxBatchTimeout?: number | undefined;
3676
+ maxRetires?: number | undefined;
3677
+ maxRetries?: number | undefined;
3678
+ deadLetterQueue?: string | undefined;
3679
+ retryDelay?: number | undefined;
3680
+ }, "maxRetires">, {
3681
+ maxBatchSize?: number | undefined;
3682
+ maxBatchTimeout?: number | undefined;
3683
+ maxRetires?: number | undefined;
3684
+ maxRetries?: number | undefined;
3685
+ deadLetterQueue?: string | undefined;
3686
+ retryDelay?: number | undefined;
3687
+ }>>, z.ZodArray<z.ZodString, "many">]>>;
3688
+ }, "strip", z.ZodTypeAny, {
3689
+ queueProducers?: string[] | Record<string, string> | Record<string, {
3690
+ queueName: string;
3691
+ deliveryDelay?: number | undefined;
3692
+ }> | undefined;
3693
+ queueConsumers?: string[] | Record<string, Omit<{
3694
+ maxBatchSize?: number | undefined;
3695
+ maxBatchTimeout?: number | undefined;
3696
+ maxRetires?: number | undefined;
3697
+ maxRetries?: number | undefined;
3698
+ deadLetterQueue?: string | undefined;
3699
+ retryDelay?: number | undefined;
3700
+ }, "maxRetires">> | undefined;
3701
+ }, {
3702
+ queueProducers?: string[] | Record<string, string> | Record<string, {
3703
+ queueName: string;
3704
+ deliveryDelay?: number | undefined;
3705
+ }> | undefined;
3706
+ queueConsumers?: string[] | Record<string, {
3707
+ maxBatchSize?: number | undefined;
3708
+ maxBatchTimeout?: number | undefined;
3709
+ maxRetires?: number | undefined;
3710
+ maxRetries?: number | undefined;
3711
+ deadLetterQueue?: string | undefined;
3712
+ retryDelay?: number | undefined;
3713
+ }> | undefined;
3714
+ }>;
3715
+
3716
+ export declare type QueuesOutgoingBatchRequest = z.input<typeof QueuesBatchRequestSchema>;
3717
+
3718
+ export declare const R2_PLUGIN: Plugin<typeof R2OptionsSchema, typeof R2SharedOptionsSchema>;
3719
+
3720
+ export declare const R2_PLUGIN_NAME = "r2";
3721
+
3722
+ export declare const R2OptionsSchema: z.ZodObject<{
3723
+ r2Buckets: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>;
3724
+ }, "strip", z.ZodTypeAny, {
3725
+ r2Buckets?: string[] | Record<string, string> | undefined;
3726
+ }, {
3727
+ r2Buckets?: string[] | Record<string, string> | undefined;
3728
+ }>;
3729
+
3730
+ export declare const R2SharedOptionsSchema: z.ZodObject<{
3731
+ r2Persist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
3732
+ }, "strip", z.ZodTypeAny, {
3733
+ r2Persist?: string | boolean | undefined;
3734
+ }, {
3735
+ r2Persist?: string | boolean | undefined;
3736
+ }>;
3737
+
3738
+ export declare const RATELIMIT_PLUGIN: Plugin<typeof RatelimitOptionsSchema>;
3739
+
3740
+ export declare const RATELIMIT_PLUGIN_NAME = "ratelimit";
3741
+
3742
+ export declare const RatelimitConfigSchema: z.ZodObject<{
3743
+ simple: z.ZodObject<{
3744
+ limit: z.ZodNumber;
3745
+ period: z.ZodOptional<z.ZodNativeEnum<typeof PeriodType>>;
3746
+ }, "strip", z.ZodTypeAny, {
3747
+ limit: number;
3748
+ period?: PeriodType | undefined;
3749
+ }, {
3750
+ limit: number;
3751
+ period?: PeriodType | undefined;
3752
+ }>;
3753
+ }, "strip", z.ZodTypeAny, {
3754
+ simple: {
3755
+ limit: number;
3756
+ period?: PeriodType | undefined;
3757
+ };
3758
+ }, {
3759
+ simple: {
3760
+ limit: number;
3761
+ period?: PeriodType | undefined;
3762
+ };
3763
+ }>;
3764
+
3765
+ export declare const RatelimitOptionsSchema: z.ZodObject<{
3766
+ ratelimits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3767
+ simple: z.ZodObject<{
3768
+ limit: z.ZodNumber;
3769
+ period: z.ZodOptional<z.ZodNativeEnum<typeof PeriodType>>;
3770
+ }, "strip", z.ZodTypeAny, {
3771
+ limit: number;
3772
+ period?: PeriodType | undefined;
3773
+ }, {
3774
+ limit: number;
3775
+ period?: PeriodType | undefined;
3776
+ }>;
3777
+ }, "strip", z.ZodTypeAny, {
3778
+ simple: {
3779
+ limit: number;
3780
+ period?: PeriodType | undefined;
3781
+ };
3782
+ }, {
3783
+ simple: {
3784
+ limit: number;
3785
+ period?: PeriodType | undefined;
3786
+ };
3787
+ }>>>;
3788
+ }, "strip", z.ZodTypeAny, {
3789
+ ratelimits?: Record<string, {
3790
+ simple: {
3791
+ limit: number;
3792
+ period?: PeriodType | undefined;
3793
+ };
3794
+ }> | undefined;
3795
+ }, {
3796
+ ratelimits?: Record<string, {
3797
+ simple: {
3798
+ limit: number;
3799
+ period?: PeriodType | undefined;
3800
+ };
3801
+ }> | undefined;
3802
+ }>;
3803
+
3804
+ export declare function readPrefix(stream: ReadableStream_2<Uint8Array>, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_2<Uint8Array>]>;
3805
+
3806
+ export declare function reduceError(e: any): JsonError;
3807
+
3808
+ export declare type ReducerReviver = (value: unknown) => unknown;
3809
+
3810
+ export declare type ReducersRevivers = Record<string, ReducerReviver>;
3811
+
3812
+ export { ReferrerPolicy }
3813
+
3814
+ 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 ? {
3815
+ [K in keyof T]: OverloadReplaceWorkersTypes<T[K]>;
3816
+ } : T;
3817
+
3818
+ export declare class Request<CfType extends RequestInitCfType = RequestInitCfType> extends Request_2 {
3819
+ [kCf]?: CfType;
3820
+ constructor(input: RequestInfo, init?: RequestInit<CfType>);
3821
+ get cf(): CfType | undefined;
3822
+ /** @ts-expect-error `clone` is actually defined as a method internally */
3823
+ clone(): Request<CfType>;
3824
+ }
3825
+
3826
+ export { RequestCache }
3827
+
3828
+ export { RequestCredentials }
3829
+
3830
+ export { RequestDestination }
3831
+
3832
+ export { RequestDuplex }
3833
+
3834
+ export declare type RequestInfo = RequestInfo_2 | Request;
3835
+
3836
+ export declare interface RequestInit<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_2 {
3837
+ cf?: CfType;
3838
+ }
3839
+
3840
+ export declare type RequestInitCfType = Partial<IncomingRequestCfProperties> | RequestInitCfProperties;
3841
+
3842
+ export { RequestMode }
3843
+
3844
+ export { RequestRedirect }
3845
+
3846
+ export declare class Response extends Response_2 {
3847
+ readonly [kWebSocket]: WebSocket | null;
3848
+ static error(): Response;
3849
+ static redirect(url: string | URL, status: ResponseRedirectStatus): Response;
3850
+ static json(data: any, init?: ResponseInit): Response;
3851
+ constructor(body?: BodyInit, init?: ResponseInit);
3852
+ /** @ts-expect-error `status` is actually defined as a getter internally */
3853
+ get status(): number;
3854
+ get webSocket(): WebSocket | null;
3855
+ /** @ts-expect-error `clone` is actually defined as a method internally */
3856
+ clone(): Response;
3857
+ }
3858
+
3859
+ export declare interface ResponseInit extends ResponseInit_2 {
3860
+ webSocket?: WebSocket | null;
3861
+ }
3862
+
3863
+ export { ResponseRedirectStatus }
3864
+
3865
+ export { ResponseType }
3866
+
3867
+ export declare class RouterError extends MiniflareError<RouterErrorCode> {
3868
+ }
3869
+
3870
+ export declare type RouterErrorCode = "ERR_QUERY_STRING" | "ERR_INFIX_WILDCARD";
3871
+
3872
+ export declare class Runtime {
3873
+ #private;
3874
+ updateConfig(configBuffer: Buffer, options: Abortable & RuntimeOptions): Promise<SocketPorts | undefined>;
3875
+ dispose(): Awaitable<void>;
3876
+ }
3877
+
3878
+ export declare interface RuntimeOptions {
3879
+ entryAddress: string;
3880
+ loopbackAddress: string;
3881
+ requiredSockets: SocketIdentifier[];
3882
+ inspectorAddress?: string;
3883
+ verbose?: boolean;
3884
+ handleRuntimeStdio?: (stdout: Readable, stderr: Readable) => void;
3885
+ }
3886
+
3887
+ export declare function sanitisePath(unsafe: string): string;
3888
+
3889
+ export declare interface SerialisableMatcherRegExps {
3890
+ include: string[];
3891
+ exclude: string[];
3892
+ }
3893
+
3894
+ export declare interface SerialisableSiteMatcherRegExps {
3895
+ include?: SerialisableMatcherRegExps;
3896
+ exclude?: SerialisableMatcherRegExps;
3897
+ }
3898
+
3899
+ export declare function serialiseRegExps(matcher: MatcherRegExps): SerialisableMatcherRegExps;
3900
+
3901
+ export declare function serialiseSiteRegExps(siteRegExps: SiteMatcherRegExps): SerialisableSiteMatcherRegExps;
3902
+
3903
+ export declare function serializeConfig(config: Config): Buffer;
3904
+
3905
+ export declare type Service = {
3906
+ name?: string;
3907
+ } & ({
3908
+ worker?: Worker;
3909
+ } | {
3910
+ network?: Network;
3911
+ } | {
3912
+ external?: ExternalServer;
3913
+ } | {
3914
+ disk?: DiskDirectory;
3915
+ });
3916
+
3917
+ export declare const SERVICE_ENTRY = "core:entry";
3918
+
3919
+ export declare const SERVICE_LOOPBACK = "loopback";
3920
+
3921
+ export declare interface ServiceDesignator {
3922
+ name?: string;
3923
+ entrypoint?: string;
3924
+ }
3925
+
3926
+ export declare interface ServicesExtensions {
3927
+ services: Service[];
3928
+ extensions: Extension[];
3929
+ }
3930
+
3931
+ export declare const SharedBindings: {
3932
+ readonly TEXT_NAMESPACE: "MINIFLARE_NAMESPACE";
3933
+ readonly DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT";
3934
+ readonly MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS";
3935
+ readonly MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK";
3936
+ readonly MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS";
3937
+ readonly MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS";
3938
+ };
3939
+
3940
+ export declare const SharedHeaders: {
3941
+ readonly LOG_LEVEL: "MF-Log-Level";
3942
+ };
3943
+
3944
+ 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>;
3945
+
3946
+ export declare const SiteBindings: {
3947
+ readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT";
3948
+ readonly JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST";
3949
+ readonly JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER";
3950
+ };
3951
+
3952
+ export declare interface SiteMatcherRegExps {
3953
+ include?: MatcherRegExps;
3954
+ exclude?: MatcherRegExps;
3955
+ }
3956
+
3957
+ export declare const SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/";
3958
+
3959
+ export declare type Socket = {
3960
+ name?: string;
3961
+ address?: string;
3962
+ service?: ServiceDesignator;
3963
+ } & ({
3964
+ http?: HttpOptions;
3965
+ } | {
3966
+ https?: Socket_Https;
3967
+ });
3968
+
3969
+ export declare const SOCKET_ENTRY = "entry";
3970
+
3971
+ export declare const SOCKET_ENTRY_LOCAL = "entry:local";
3972
+
3973
+ export declare interface Socket_Https {
3974
+ options?: HttpOptions;
3975
+ tlsOptions?: TlsOptions;
3976
+ }
3977
+
3978
+ export declare type SocketIdentifier = string | typeof kInspectorSocket;
3979
+
3980
+ export declare type SocketPorts = Map<SocketIdentifier, number>;
3981
+
3982
+ export declare type SourceOptions = z.infer<typeof SourceOptionsSchema>;
3983
+
3984
+ export declare const SourceOptionsSchema: z.ZodUnion<[z.ZodObject<{
3985
+ modules: z.ZodArray<z.ZodObject<{
3986
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
3987
+ path: z.ZodEffects<z.ZodString, string, string>;
3988
+ contents: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>]>>;
3989
+ }, "strip", z.ZodTypeAny, {
3990
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
3991
+ path: string;
3992
+ contents?: string | Uint8Array | undefined;
3993
+ }, {
3994
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
3995
+ path: string;
3996
+ contents?: string | Uint8Array | undefined;
3997
+ }>, "many">;
3998
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3999
+ }, "strip", z.ZodTypeAny, {
4000
+ modules: {
4001
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4002
+ path: string;
4003
+ contents?: string | Uint8Array | undefined;
4004
+ }[];
4005
+ modulesRoot?: string | undefined;
4006
+ }, {
4007
+ modules: {
4008
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4009
+ path: string;
4010
+ contents?: string | Uint8Array | undefined;
4011
+ }[];
4012
+ modulesRoot?: string | undefined;
4013
+ }>, z.ZodObject<{
4014
+ script: z.ZodString;
4015
+ scriptPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4016
+ modules: z.ZodOptional<z.ZodBoolean>;
4017
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
4018
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
4019
+ include: z.ZodArray<z.ZodString, "many">;
4020
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
4021
+ }, "strip", z.ZodTypeAny, {
4022
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4023
+ include: string[];
4024
+ fallthrough?: boolean | undefined;
4025
+ }, {
4026
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4027
+ include: string[];
4028
+ fallthrough?: boolean | undefined;
4029
+ }>, "many">>;
4030
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4031
+ }, "strip", z.ZodTypeAny, {
4032
+ script: string;
4033
+ scriptPath?: string | undefined;
4034
+ modules?: boolean | undefined;
4035
+ modulesRules?: {
4036
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4037
+ include: string[];
4038
+ fallthrough?: boolean | undefined;
4039
+ }[] | undefined;
4040
+ modulesRoot?: string | undefined;
4041
+ }, {
4042
+ script: string;
4043
+ scriptPath?: string | undefined;
4044
+ modules?: boolean | undefined;
4045
+ modulesRules?: {
4046
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4047
+ include: string[];
4048
+ fallthrough?: boolean | undefined;
4049
+ }[] | undefined;
4050
+ modulesRoot?: string | undefined;
4051
+ }>, z.ZodObject<{
4052
+ scriptPath: z.ZodEffects<z.ZodString, string, string>;
4053
+ modules: z.ZodOptional<z.ZodBoolean>;
4054
+ modulesRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
4055
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>;
4056
+ include: z.ZodArray<z.ZodString, "many">;
4057
+ fallthrough: z.ZodOptional<z.ZodBoolean>;
4058
+ }, "strip", z.ZodTypeAny, {
4059
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4060
+ include: string[];
4061
+ fallthrough?: boolean | undefined;
4062
+ }, {
4063
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4064
+ include: string[];
4065
+ fallthrough?: boolean | undefined;
4066
+ }>, "many">>;
4067
+ modulesRoot: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4068
+ }, "strip", z.ZodTypeAny, {
4069
+ scriptPath: string;
4070
+ modules?: boolean | undefined;
4071
+ modulesRules?: {
4072
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4073
+ include: string[];
4074
+ fallthrough?: boolean | undefined;
4075
+ }[] | undefined;
4076
+ modulesRoot?: string | undefined;
4077
+ }, {
4078
+ scriptPath: string;
4079
+ modules?: boolean | undefined;
4080
+ modulesRules?: {
4081
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
4082
+ include: string[];
4083
+ fallthrough?: boolean | undefined;
4084
+ }[] | undefined;
4085
+ modulesRoot?: string | undefined;
4086
+ }>]>;
4087
+
4088
+ export declare interface StringifiedWithStream<RS> {
4089
+ value: string;
4090
+ unbufferedStream?: RS;
4091
+ }
4092
+
4093
+ export declare function stringifyWithStreams<RS>(impl: PlatformImpl<RS>, value: unknown, reducers: ReducersRevivers, allowUnbufferedStream: boolean): StringifiedWithStream<RS> | Promise<StringifiedWithStream<RS>>;
4094
+
4095
+ export declare function stripAnsi(value: string): string;
4096
+
4097
+ export declare const structuredSerializableReducers: ReducersRevivers;
4098
+
4099
+ export declare const structuredSerializableRevivers: ReducersRevivers;
4100
+
4101
+ export { supportedCompatibilityDate }
4102
+
4103
+ export declare function testRegExps(matcher: MatcherRegExps, value: string): boolean;
4104
+
4105
+ export declare function testSiteRegExps(regExps: SiteMatcherRegExps, key: string): boolean;
4106
+
4107
+ export declare interface TlsOptions {
4108
+ keypair?: TlsOptions_Keypair;
4109
+ requireClientCerts?: boolean;
4110
+ trustBrowserCas?: boolean;
4111
+ trustedCertificates?: string[];
4112
+ minVersion?: TlsOptions_Version;
4113
+ cipherList?: string;
4114
+ }
4115
+
4116
+ export declare interface TlsOptions_Keypair {
4117
+ privateKey?: string;
4118
+ certificateChain?: string;
4119
+ }
4120
+
4121
+ export declare enum TlsOptions_Version {
4122
+ GOOD_DEFAULT = 0,
4123
+ SSL3 = 1,
4124
+ TLS1DOT0 = 2,
4125
+ TLS1DOT1 = 3,
4126
+ TLS1DOT2 = 4,
4127
+ TLS1DOT3 = 5
4128
+ }
4129
+
4130
+ export declare function _transformsForContentEncodingAndContentType(encoding: string | undefined, type: string | undefined | null): Transform[];
4131
+
4132
+ export declare type TypedEventListener<E extends Event> = ((e: E) => void) | {
4133
+ handleEvent(e: E): void;
4134
+ };
4135
+
4136
+ export declare class TypedEventTarget<EventMap extends Record<string, Event>> extends EventTarget {
4137
+ addEventListener<Type extends keyof EventMap>(type: Type, listener: TypedEventListener<EventMap[Type]> | null, options?: AddEventListenerOptions | boolean): void;
4138
+ removeEventListener<Type extends keyof EventMap>(type: Type, listener: TypedEventListener<EventMap[Type]> | null, options?: EventListenerOptions | boolean): void;
4139
+ dispatchEvent(event: ValueOf<EventMap>): boolean;
4140
+ }
4141
+
4142
+ export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
4143
+
4144
+ export declare type UnsafeUniqueKey = string | typeof kUnsafeEphemeralUniqueKey;
4145
+
4146
+ export declare type ValueOf<T> = T[keyof T];
4147
+
4148
+ export declare function viewToBuffer(view: ArrayBufferView): ArrayBuffer;
4149
+
4150
+ export declare type Void = typeof kVoid;
4151
+
4152
+ export declare class WaitGroup {
4153
+ private counter;
4154
+ private resolveQueue;
4155
+ add(): void;
4156
+ done(): void;
4157
+ wait(): Promise<void>;
4158
+ }
4159
+
4160
+ export declare class WebSocket extends TypedEventTarget<WebSocketEventMap> {
4161
+ #private;
4162
+ static readonly READY_STATE_CONNECTING = 0;
4163
+ static readonly READY_STATE_OPEN = 1;
4164
+ static readonly READY_STATE_CLOSING = 2;
4165
+ static readonly READY_STATE_CLOSED = 3;
4166
+ [kPair]?: WebSocket;
4167
+ [kAccepted]: boolean;
4168
+ [kCoupled]: boolean;
4169
+ [kClosedOutgoing]: boolean;
4170
+ [kClosedIncoming]: boolean;
4171
+ get readyState(): number;
4172
+ accept(): void;
4173
+ send(message: ArrayBuffer | string): void;
4174
+ [kSend](message: ArrayBuffer | string): void;
4175
+ close(code?: number, reason?: string): void;
4176
+ [kClose](code?: number, reason?: string): void;
4177
+ [kError](error?: Error): void;
4178
+ }
4179
+
4180
+ export declare type WebSocketEventMap = {
4181
+ message: MessageEvent;
4182
+ close: CloseEvent;
4183
+ error: ErrorEvent;
4184
+ };
4185
+
4186
+ export declare type WebSocketPair = {
4187
+ 0: WebSocket;
4188
+ 1: WebSocket;
4189
+ };
4190
+
4191
+ export declare const WebSocketPair: {
4192
+ new (): WebSocketPair;
4193
+ };
4194
+
4195
+ export declare type Worker = ({
4196
+ modules?: Worker_Module[];
4197
+ } | {
4198
+ serviceWorkerScript?: string;
4199
+ } | {
4200
+ inherit?: string;
4201
+ }) & {
4202
+ compatibilityDate?: string;
4203
+ compatibilityFlags?: string[];
4204
+ bindings?: Worker_Binding[];
4205
+ globalOutbound?: ServiceDesignator;
4206
+ cacheApiOutbound?: ServiceDesignator;
4207
+ durableObjectNamespaces?: Worker_DurableObjectNamespace[];
4208
+ durableObjectUniqueKeyModifier?: string;
4209
+ durableObjectStorage?: Worker_DurableObjectStorage;
4210
+ moduleFallback?: string;
4211
+ };
4212
+
4213
+ export declare type Worker_Binding = {
4214
+ name?: string;
4215
+ } & ({
4216
+ parameter?: Worker_Binding_Parameter;
4217
+ } | {
4218
+ text?: string;
4219
+ } | {
4220
+ data?: Uint8Array;
4221
+ } | {
4222
+ json?: string;
4223
+ } | {
4224
+ wasmModule?: Uint8Array;
4225
+ } | {
4226
+ cryptoKey?: Worker_Binding_CryptoKey;
4227
+ } | {
4228
+ service?: ServiceDesignator;
4229
+ } | {
4230
+ durableObjectNamespace?: Worker_Binding_DurableObjectNamespaceDesignator;
4231
+ } | {
4232
+ kvNamespace?: ServiceDesignator;
4233
+ } | {
4234
+ r2Bucket?: ServiceDesignator;
4235
+ } | {
4236
+ r2Admin?: ServiceDesignator;
4237
+ } | {
4238
+ wrapped?: Worker_Binding_WrappedBinding;
4239
+ } | {
4240
+ queue?: ServiceDesignator;
4241
+ } | {
4242
+ fromEnvironment?: string;
4243
+ } | {
4244
+ analyticsEngine?: ServiceDesignator;
4245
+ } | {
4246
+ hyperdrive?: Worker_Binding_Hyperdrive;
4247
+ } | {
4248
+ unsafeEval?: Void;
4249
+ });
4250
+
4251
+ export declare type Worker_Binding_CryptoKey = ({
4252
+ raw?: Uint8Array;
4253
+ } | {
4254
+ hex?: string;
4255
+ } | {
4256
+ base64?: string;
4257
+ } | {
4258
+ pkcs8?: string;
4259
+ } | {
4260
+ spki?: string;
4261
+ } | {
4262
+ jwk?: string;
4263
+ }) & {
4264
+ algorithm?: Worker_Binding_CryptoKey_Algorithm;
4265
+ extractable?: boolean;
4266
+ usages?: Worker_Binding_CryptoKey_Usage[];
4267
+ };
4268
+
4269
+ export declare type Worker_Binding_CryptoKey_Algorithm = {
4270
+ name?: string;
4271
+ } | {
4272
+ json?: string;
4273
+ };
4274
+
4275
+ export declare enum Worker_Binding_CryptoKey_Usage {
4276
+ ENCRYPT = 0,
4277
+ DECRYPT = 1,
4278
+ SIGN = 2,
4279
+ VERIFY = 3,
4280
+ DERIVE_KEY = 4,
4281
+ DERIVE_BITS = 5,
4282
+ WRAP_KEY = 6,
4283
+ UNWRAP_KEY = 7
4284
+ }
4285
+
4286
+ export declare type Worker_Binding_DurableObjectNamespaceDesignator = {
4287
+ className?: string;
4288
+ serviceName?: string;
4289
+ };
4290
+
4291
+ export declare interface Worker_Binding_Hyperdrive {
4292
+ designator?: ServiceDesignator;
4293
+ database?: string;
4294
+ user?: string;
4295
+ password?: string;
4296
+ scheme?: string;
4297
+ }
4298
+
4299
+ export declare interface Worker_Binding_MemoryCache {
4300
+ id?: string;
4301
+ limits?: Worker_Binding_MemoryCacheLimits;
4302
+ }
4303
+
4304
+ export declare interface Worker_Binding_MemoryCacheLimits {
4305
+ maxKeys?: number;
4306
+ maxValueSize?: number;
4307
+ maxTotalValueSize?: number;
4308
+ }
4309
+
4310
+ export declare interface Worker_Binding_Parameter {
4311
+ type?: Worker_Binding_Type;
4312
+ optional?: boolean;
4313
+ }
4314
+
4315
+ export declare const WORKER_BINDING_SERVICE_LOOPBACK: Worker_Binding;
4316
+
4317
+ export declare type Worker_Binding_Type = {
4318
+ text?: Void;
4319
+ } | {
4320
+ data?: Void;
4321
+ } | {
4322
+ json?: Void;
4323
+ } | {
4324
+ wasm?: Void;
4325
+ } | {
4326
+ cryptoKey?: Worker_Binding_CryptoKey_Usage[];
4327
+ } | {
4328
+ service?: Void;
4329
+ } | {
4330
+ durableObjectNamespace: Void;
4331
+ } | {
4332
+ kvNamespace?: Void;
4333
+ } | {
4334
+ r2Bucket?: Void;
4335
+ } | {
4336
+ r2Admin?: Void;
4337
+ } | {
4338
+ queue?: Void;
4339
+ } | {
4340
+ analyticsEngine?: Void;
4341
+ } | {
4342
+ hyperdrive?: Void;
4343
+ };
4344
+
4345
+ export declare interface Worker_Binding_WrappedBinding {
4346
+ moduleName?: string;
4347
+ entrypoint?: string;
4348
+ innerBindings?: Worker_Binding[];
4349
+ }
4350
+
4351
+ export declare type Worker_DurableObjectNamespace = {
4352
+ className?: string;
4353
+ preventEviction?: boolean;
4354
+ enableSql?: boolean;
4355
+ } & ({
4356
+ uniqueKey?: string;
4357
+ } | {
4358
+ ephemeralLocal?: Void;
4359
+ });
4360
+
4361
+ export declare type Worker_DurableObjectStorage = {
4362
+ none?: Void;
4363
+ } | {
4364
+ inMemory?: Void;
4365
+ } | {
4366
+ localDisk?: string;
4367
+ };
4368
+
4369
+ export declare type Worker_Module = {
4370
+ name: string;
4371
+ } & ({
4372
+ esModule?: string;
4373
+ } | {
4374
+ commonJsModule?: string;
4375
+ } | {
4376
+ text?: string;
4377
+ } | {
4378
+ data?: Uint8Array;
4379
+ } | {
4380
+ wasm?: Uint8Array;
4381
+ } | {
4382
+ json?: string;
4383
+ } | {
4384
+ nodeJsCompatModule?: string;
4385
+ } | {
4386
+ pythonModule?: string;
4387
+ } | {
4388
+ pythonRequirement?: string;
4389
+ });
4390
+
4391
+ 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>;
4392
+
4393
+ export declare interface WorkerRoute {
4394
+ target: string;
4395
+ route: string;
4396
+ specificity: number;
4397
+ protocol?: string;
4398
+ allowHostnamePrefix: boolean;
4399
+ hostname: string;
4400
+ path: string;
4401
+ allowPathSuffix: boolean;
4402
+ }
4403
+
4404
+ export declare type WrappedBindingNames = Set<string>;
4405
+
4406
+ export declare function zAwaitable<T extends z.ZodTypeAny>(type: T): z.ZodUnion<[T, z.ZodPromise<T>]>;
4407
+
4408
+ export { }