miniflare 2.14.2 → 2.14.3

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