From 4e87195739f2a5d9a05451b48773c8afdc680765 Mon Sep 17 00:00:00 2001
From: akiyamn
Date: Sun, 24 Sep 2023 23:22:21 +1000
Subject: Initial commit (by create-cloudflare CLI)
---
node_modules/miniflare/dist/src/index.d.ts | 4239 ++++++++++++++++++++++++++++
1 file changed, 4239 insertions(+)
create mode 100644 node_modules/miniflare/dist/src/index.d.ts
(limited to 'node_modules/miniflare/dist/src/index.d.ts')
diff --git a/node_modules/miniflare/dist/src/index.d.ts b/node_modules/miniflare/dist/src/index.d.ts
new file mode 100644
index 0000000..bfba0f5
--- /dev/null
+++ b/node_modules/miniflare/dist/src/index.d.ts
@@ -0,0 +1,4239 @@
+///
+
+import type { Abortable } from 'events';
+import type { AbortSignal as AbortSignal_2 } from '@cloudflare/workers-types/experimental';
+import type { Blob as Blob_2 } from '@cloudflare/workers-types/experimental';
+import { Blob as Blob_3 } from 'buffer';
+import { BodyInit } from 'undici';
+import type { CacheStorage } from '@cloudflare/workers-types/experimental';
+import type { D1Database } from '@cloudflare/workers-types/experimental';
+import { default as default_2 } from 'undici/types/mock-agent';
+import { Dispatcher } from 'undici';
+import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimental';
+import { File } from 'undici';
+import type { File as File_2 } from '@cloudflare/workers-types/experimental';
+import { FormData } from 'undici';
+import { Headers } from 'undici';
+import type { Headers as Headers_2 } from '@cloudflare/workers-types/experimental';
+import { HeadersInit } from 'undici';
+import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
+import type { KVNamespace } from '@cloudflare/workers-types/experimental';
+import { MockAgent } from 'undici';
+import NodeWebSocket from 'ws';
+import type { Queue } from '@cloudflare/workers-types/experimental';
+import type { R2Bucket } from '@cloudflare/workers-types/experimental';
+import type { ReadableStream } from '@cloudflare/workers-types/experimental';
+import { ReadableStream as ReadableStream_2 } from 'stream/web';
+import { ReferrerPolicy } from 'undici';
+import { Request as Request_2 } from 'undici';
+import type { Request as Request_3 } from '@cloudflare/workers-types/experimental';
+import { RequestCache } from 'undici';
+import { RequestCredentials } from 'undici';
+import { RequestDestination } from 'undici';
+import { RequestDuplex } from 'undici';
+import { RequestInfo as RequestInfo_2 } from 'undici';
+import { RequestInit as RequestInit_2 } from 'undici';
+import type { RequestInit as RequestInit_3 } from '@cloudflare/workers-types/experimental';
+import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental';
+import { RequestMode } from 'undici';
+import { RequestRedirect } from 'undici';
+import { Response as Response_2 } from 'undici';
+import type { Response as Response_3 } from '@cloudflare/workers-types/experimental';
+import { ResponseInit as ResponseInit_2 } from 'undici';
+import { ResponseRedirectStatus } from 'undici';
+import { ResponseType } from 'undici';
+import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental';
+import { compatibilityDate as supportedCompatibilityDate } from 'workerd';
+import { Transform } from 'stream';
+import { z } from 'zod';
+
+export declare type Awaitable = T | Promise;
+
+export declare function base64Decode(encoded: string): string;
+
+export declare function base64Encode(value: string): string;
+
+export { BodyInit }
+
+export declare const CACHE_PLUGIN: Plugin;
+
+export declare const CACHE_PLUGIN_NAME = "cache";
+
+export declare const CacheBindings: {
+ readonly MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE";
+};
+
+export declare const CacheHeaders: {
+ readonly NAMESPACE: "cf-cache-namespace";
+ readonly STATUS: "cf-cache-status";
+};
+
+export declare interface CacheObjectCf {
+ miniflare?: {
+ cacheWarnUsage?: boolean;
+ };
+}
+
+export declare const CacheOptionsSchema: z.ZodObject<{
+ cache: z.ZodOptional;
+ cacheWarnUsage: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ cache?: boolean | undefined;
+ cacheWarnUsage?: boolean | undefined;
+}, {
+ cache?: boolean | undefined;
+ cacheWarnUsage?: boolean | undefined;
+}>;
+
+export declare const CacheSharedOptionsSchema: z.ZodObject<{
+ cachePersist: z.ZodOptional>;
+}, "strip", z.ZodTypeAny, {
+ cachePersist?: string | boolean | undefined;
+}, {
+ cachePersist?: string | boolean | undefined;
+}>;
+
+export declare class CloseEvent extends Event {
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
+ constructor(type: "close", init?: {
+ code?: number;
+ reason?: string;
+ wasClean?: boolean;
+ });
+}
+
+export declare interface Config {
+ services?: Service[];
+ sockets?: Socket[];
+ v8Flags?: string[];
+ extensions?: Extension[];
+}
+
+export declare function configureEntrySocket(coreOpts: z.infer): Promise;
+
+export declare const CORE_PLUGIN: Plugin;
+
+export declare const CORE_PLUGIN_NAME = "core";
+
+export declare const CoreBindings: {
+ readonly SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK";
+ readonly SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_";
+ readonly SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK";
+ readonly TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE";
+ readonly TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL";
+ readonly JSON_CF_BLOB: "CF_BLOB";
+ readonly JSON_ROUTES: "MINIFLARE_ROUTES";
+ readonly JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL";
+ readonly DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT";
+ readonly DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY";
+};
+
+export declare const CoreHeaders: {
+ readonly CUSTOM_SERVICE: "MF-Custom-Service";
+ readonly ORIGINAL_URL: "MF-Original-URL";
+ readonly ERROR_STACK: "MF-Experimental-Error-Stack";
+ readonly ROUTE_OVERRIDE: "MF-Route-Override";
+ readonly OP: "MF-Op";
+ readonly OP_TARGET: "MF-Op-Target";
+ readonly OP_KEY: "MF-Op-Key";
+ readonly OP_SYNC: "MF-Op-Sync";
+ readonly OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size";
+ readonly OP_RESULT_TYPE: "MF-Op-Result-Type";
+};
+
+export declare const CoreOptionsSchema: z.ZodEffects;
+ path: z.ZodString;
+ contents: z.ZodOptional]>>;
+ }, "strip", z.ZodTypeAny, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }>, "many">;
+ modulesRoot: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+}, {
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+}>, z.ZodObject<{
+ script: z.ZodString;
+ scriptPath: z.ZodOptional;
+ modules: z.ZodOptional;
+ modulesRules: z.ZodOptional;
+ include: z.ZodArray;
+ fallthrough: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }>, "many">>;
+ modulesRoot: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+}, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+}>, z.ZodObject<{
+ scriptPath: z.ZodString;
+ modules: z.ZodOptional;
+ modulesRules: z.ZodOptional;
+ include: z.ZodArray;
+ fallthrough: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }>, "many">>;
+ modulesRoot: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+}, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+}>]>, z.ZodObject<{
+ name: z.ZodOptional;
+ compatibilityDate: z.ZodOptional;
+ compatibilityFlags: z.ZodOptional>;
+ routes: z.ZodOptional>;
+ bindings: z.ZodOptional>>;
+ wasmBindings: z.ZodOptional>;
+ textBlobBindings: z.ZodOptional>;
+ dataBlobBindings: z.ZodOptional>;
+ serviceBindings: z.ZodOptional>;
+ deny: z.ZodOptional>;
+ tlsOptions: z.ZodOptional;
+ certificateChain: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ }, {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ }>>;
+ requireClientCerts: z.ZodOptional;
+ trustBrowserCas: z.ZodOptional;
+ trustedCertificates: z.ZodOptional>;
+ minVersion: z.ZodOptional>;
+ cipherList: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ }, {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ }>>;
+ }, "strip", z.ZodTypeAny, {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ }, {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ }, {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ }>, z.ZodObject<{
+ external: z.ZodType;
+ }, "strip", z.ZodTypeAny, {
+ external: ExternalServer;
+ }, {
+ external: ExternalServer;
+ }>, z.ZodObject<{
+ disk: z.ZodObject<{
+ path: z.ZodString;
+ writable: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ writable?: boolean | undefined;
+ path: string;
+ }, {
+ writable?: boolean | undefined;
+ path: string;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ }, {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ }>, z.ZodFunction, z.ZodTypeDef, Request>], z.ZodUnknown>, z.ZodUnion<[z.ZodType, z.ZodPromise>]>>]>>>;
+ outboundService: z.ZodOptional>;
+ deny: z.ZodOptional>;
+ tlsOptions: z.ZodOptional;
+ certificateChain: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ }, {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ }>>;
+ requireClientCerts: z.ZodOptional;
+ trustBrowserCas: z.ZodOptional;
+ trustedCertificates: z.ZodOptional>;
+ minVersion: z.ZodOptional>;
+ cipherList: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ }, {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ }>>;
+ }, "strip", z.ZodTypeAny, {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ }, {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ }, {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ }>, z.ZodObject<{
+ external: z.ZodType;
+ }, "strip", z.ZodTypeAny, {
+ external: ExternalServer;
+ }, {
+ external: ExternalServer;
+ }>, z.ZodObject<{
+ disk: z.ZodObject<{
+ path: z.ZodString;
+ writable: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ writable?: boolean | undefined;
+ path: string;
+ }, {
+ writable?: boolean | undefined;
+ path: string;
+ }>;
+ }, "strip", z.ZodTypeAny, {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ }, {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ }>, z.ZodFunction, z.ZodTypeDef, Request>], z.ZodUnknown>, z.ZodUnion<[z.ZodType, z.ZodPromise>]>>]>>;
+ fetchMock: z.ZodOptional, z.ZodTypeDef, MockAgent>>;
+ unsafeEphemeralDurableObjects: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}, {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}>>, ({
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+} & {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}) | ({
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+} & {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}) | ({
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+} & {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}), ({
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+} | {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+} | {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+}) & {
+ name?: string | undefined;
+ compatibilityDate?: string | undefined;
+ bindings?: Record | undefined;
+ compatibilityFlags?: string[] | undefined;
+ routes?: string[] | undefined;
+ wasmBindings?: Record | undefined;
+ textBlobBindings?: Record | undefined;
+ dataBlobBindings?: Record | undefined;
+ serviceBindings?: Record, ...args_1: unknown[]) => Response | Promise)> | undefined;
+ outboundService?: string | {
+ network: {
+ allow?: string[] | undefined;
+ deny?: string[] | undefined;
+ tlsOptions?: {
+ minVersion?: TlsOptions_Version | undefined;
+ keypair?: {
+ privateKey?: string | undefined;
+ certificateChain?: string | undefined;
+ } | undefined;
+ requireClientCerts?: boolean | undefined;
+ trustBrowserCas?: boolean | undefined;
+ trustedCertificates?: string[] | undefined;
+ cipherList?: string | undefined;
+ } | undefined;
+ };
+ } | {
+ external: ExternalServer;
+ } | {
+ disk: {
+ writable?: boolean | undefined;
+ path: string;
+ };
+ } | ((args_0: Request, ...args_1: unknown[]) => Response | Promise) | undefined;
+ fetchMock?: MockAgent | undefined;
+ unsafeEphemeralDurableObjects?: boolean | undefined;
+}>;
+
+export declare const CoreSharedOptionsSchema: z.ZodObject<{
+ host: z.ZodOptional;
+ port: z.ZodOptional;
+ https: z.ZodOptional;
+ httpsKey: z.ZodOptional;
+ httpsKeyPath: z.ZodOptional;
+ httpsCert: z.ZodOptional;
+ httpsCertPath: z.ZodOptional;
+ inspectorPort: z.ZodOptional;
+ verbose: z.ZodOptional;
+ log: z.ZodOptional>;
+ upstream: z.ZodOptional;
+ cf: z.ZodOptional]>>;
+ liveReload: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ host?: string | undefined;
+ port?: number | undefined;
+ cf?: string | boolean | Record | undefined;
+ inspectorPort?: number | undefined;
+ verbose?: boolean | undefined;
+ https?: boolean | undefined;
+ httpsKey?: string | undefined;
+ httpsKeyPath?: string | undefined;
+ httpsCert?: string | undefined;
+ httpsCertPath?: string | undefined;
+ log?: Log | undefined;
+ upstream?: string | undefined;
+ liveReload?: boolean | undefined;
+}, {
+ host?: string | undefined;
+ port?: number | undefined;
+ cf?: string | boolean | Record | undefined;
+ inspectorPort?: number | undefined;
+ verbose?: boolean | undefined;
+ https?: boolean | undefined;
+ httpsKey?: string | undefined;
+ httpsKeyPath?: string | undefined;
+ httpsCert?: string | undefined;
+ httpsCertPath?: string | undefined;
+ log?: Log | undefined;
+ upstream?: string | undefined;
+ liveReload?: boolean | undefined;
+}>;
+
+export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise;
+
+export declare function createFetchMock(): MockAgent;
+
+export declare function createHTTPReducers(impl: PlatformImpl): ReducersRevivers;
+
+export declare function createHTTPRevivers(impl: PlatformImpl): ReducersRevivers;
+
+export declare const D1_PLUGIN: Plugin;
+
+export declare const D1_PLUGIN_NAME = "d1";
+
+export declare const D1OptionsSchema: z.ZodObject<{
+ d1Databases: z.ZodOptional, z.ZodArray]>>;
+}, "strip", z.ZodTypeAny, {
+ d1Databases?: string[] | Record | undefined;
+}, {
+ d1Databases?: string[] | Record | undefined;
+}>;
+
+export declare const D1SharedOptionsSchema: z.ZodObject<{
+ d1Persist: z.ZodOptional>;
+}, "strip", z.ZodTypeAny, {
+ d1Persist?: string | boolean | undefined;
+}, {
+ d1Persist?: string | boolean | undefined;
+}>;
+
+export declare function decodeSitesKey(key: string): string;
+
+export declare const DEFAULT_PERSIST_ROOT = ".mf";
+
+export declare class DeferredPromise extends Promise {
+ readonly resolve: DeferredPromiseResolve;
+ readonly reject: DeferredPromiseReject;
+ constructor(executor?: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void);
+}
+
+export declare type DeferredPromiseReject = (reason?: any) => void;
+
+export declare type DeferredPromiseResolve = (value: T | PromiseLike) => void;
+
+export declare function deserialiseRegExps(matcher: SerialisableMatcherRegExps): MatcherRegExps;
+
+export declare function deserialiseSiteRegExps(siteRegExps: SerialisableSiteMatcherRegExps): SiteMatcherRegExps;
+
+export declare interface DiskDirectory {
+ path?: string;
+ writable?: boolean;
+}
+
+export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit>) => Promise;
+
+export declare const DURABLE_OBJECTS_PLUGIN: Plugin;
+
+export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do";
+
+export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME: string;
+
+export declare type DurableObjectClassNames = Map>;
+
+export declare const DurableObjectsOptionsSchema: z.ZodObject<{
+ durableObjects: z.ZodOptional;
+ unsafeUniqueKey: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ scriptName?: string | undefined;
+ unsafeUniqueKey?: string | undefined;
+ className: string;
+ }, {
+ scriptName?: string | undefined;
+ unsafeUniqueKey?: string | undefined;
+ className: string;
+ }>]>>>;
+}, "strip", z.ZodTypeAny, {
+ durableObjects?: Record | undefined;
+}, {
+ durableObjects?: Record | undefined;
+}>;
+
+export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{
+ durableObjectsPersist: z.ZodOptional>;
+}, "strip", z.ZodTypeAny, {
+ durableObjectsPersist?: string | boolean | undefined;
+}, {
+ durableObjectsPersist?: string | boolean | undefined;
+}>;
+
+export declare function encodeSitesKey(key: string): string;
+
+export declare class ErrorEvent extends Event {
+ readonly error: Error | null;
+ constructor(type: "error", init?: {
+ error?: Error;
+ });
+}
+
+export declare interface Extension {
+ modules?: Extension_Module[];
+}
+
+export declare interface Extension_Module {
+ name?: string;
+ internal?: boolean;
+ esModule?: string;
+}
+
+export declare type ExternalServer = {
+ address?: string;
+} & ({
+ http: HttpOptions;
+} | {
+ https: ExternalServer_Https;
+});
+
+export declare interface ExternalServer_Https {
+ options?: HttpOptions;
+ tlsOptions?: TlsOptions;
+ certificateHost?: string;
+}
+
+export declare function fetch(input: RequestInfo, init?: RequestInit | Request): Promise;
+
+export { File }
+
+export declare function _forceColour(enabled?: boolean): void;
+
+/* Excluded from this release type: _formatZodError */
+export { FormData }
+
+export declare function getAccessibleHosts(ipv4Only?: boolean): string[];
+
+export declare function getCacheServiceName(workerIndex: number): string;
+
+export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fallbackWorkerName, loopbackPort, log, proxyBindings, }: GlobalServicesOptions): Service[];
+
+export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
+
+export declare interface GlobalServicesOptions {
+ sharedOptions: z.infer;
+ allWorkerRoutes: Map;
+ fallbackWorkerName: string | undefined;
+ loopbackPort: number;
+ log: Log;
+ proxyBindings: Worker_Binding[];
+}
+
+export declare function globsToRegExps(globs?: string[]): MatcherRegExps;
+
+export declare const HEADER_CF_BLOB = "MF-CF-Blob";
+
+export { Headers }
+
+export { HeadersInit }
+
+export declare interface HttpOptions {
+ style?: HttpOptions_Style;
+ forwardedProtoHeader?: string;
+ cfBlobHeader?: string;
+ injectRequestHeaders?: HttpOptions_Header[];
+ injectResponseHeaders?: HttpOptions_Header[];
+}
+
+export declare interface HttpOptions_Header {
+ name?: string;
+ value?: string;
+}
+
+export declare enum HttpOptions_Style {
+ HOST = 0,
+ PROXY = 1
+}
+
+export declare interface InclusiveRange {
+ start: number;
+ end: number;
+}
+
+/* Excluded from this release type: _initialiseInstanceRegistry */
+
+export declare function isFetcherFetch(targetName: string, key: string): boolean;
+
+export declare function isR2ObjectWriteHttpMetadata(targetName: string, key: string): boolean;
+
+export declare function isSitesRequest(request: {
+ url: string;
+}): boolean;
+
+export declare type Json = Literal | {
+ [key: string]: Json;
+} | Json[];
+
+export declare interface JsonError {
+ message?: string;
+ name?: string;
+ stack?: string;
+ cause?: JsonError;
+}
+
+export declare const JsonSchema: z.ZodType;
+
+declare const kAccepted: unique symbol;
+
+declare const kCf: unique symbol;
+
+declare const kClose: unique symbol;
+
+declare const kClosedIncoming: unique symbol;
+
+declare const kClosedOutgoing: unique symbol;
+
+declare const kCoupled: unique symbol;
+
+declare const kError: unique symbol;
+
+declare const kPair: unique symbol;
+
+export declare const kProxyNodeBinding: unique symbol;
+
+declare const kSend: unique symbol;
+
+export declare const KV_PLUGIN: Plugin;
+
+export declare const KV_PLUGIN_NAME = "kv";
+
+export declare const KVHeaders: {
+ readonly EXPIRATION: "CF-Expiration";
+ readonly METADATA: "CF-KV-Metadata";
+};
+
+export declare const KVLimits: {
+ readonly MIN_CACHE_TTL: 60;
+ readonly MAX_LIST_KEYS: 1000;
+ readonly MAX_KEY_SIZE: 512;
+ readonly MAX_VALUE_SIZE: number;
+ readonly MAX_VALUE_SIZE_TEST: 1024;
+ readonly MAX_METADATA_SIZE: 1024;
+};
+
+export declare const kVoid: unique symbol;
+
+export declare const KVOptionsSchema: z.ZodObject<{
+ kvNamespaces: z.ZodOptional, z.ZodArray]>>;
+ sitePath: z.ZodOptional;
+ siteInclude: z.ZodOptional>;
+ siteExclude: z.ZodOptional>;
+}, "strip", z.ZodTypeAny, {
+ kvNamespaces?: string[] | Record | undefined;
+ sitePath?: string | undefined;
+ siteInclude?: string[] | undefined;
+ siteExclude?: string[] | undefined;
+}, {
+ kvNamespaces?: string[] | Record | undefined;
+ sitePath?: string | undefined;
+ siteInclude?: string[] | undefined;
+ siteExclude?: string[] | undefined;
+}>;
+
+export declare const KVParams: {
+ readonly URL_ENCODED: "urlencoded";
+ readonly CACHE_TTL: "cache_ttl";
+ readonly EXPIRATION: "expiration";
+ readonly EXPIRATION_TTL: "expiration_ttl";
+ readonly LIST_LIMIT: "key_count_limit";
+ readonly LIST_PREFIX: "prefix";
+ readonly LIST_CURSOR: "cursor";
+};
+
+export declare const KVSharedOptionsSchema: z.ZodObject<{
+ kvPersist: z.ZodOptional>;
+}, "strip", z.ZodTypeAny, {
+ kvPersist?: string | boolean | undefined;
+}, {
+ kvPersist?: string | boolean | undefined;
+}>;
+
+declare const kWebSocket: unique symbol;
+
+export declare type Literal = z.infer;
+
+export declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
+
+export declare class Log {
+ #private;
+ readonly level: LogLevel;
+ constructor(level?: LogLevel, opts?: LogOptions);
+ protected log(message: string): void;
+ logWithLevel(level: LogLevel, message: string): void;
+ error(message: Error): void;
+ warn(message: string): void;
+ info(message: string): void;
+ debug(message: string): void;
+ verbose(message: string): void;
+}
+
+export declare enum LogLevel {
+ NONE = 0,
+ ERROR = 1,
+ WARN = 2,
+ INFO = 3,
+ DEBUG = 4,
+ VERBOSE = 5
+}
+
+export declare interface LogOptions {
+ prefix?: string;
+ suffix?: string;
+}
+
+export declare interface MatcherRegExps {
+ include: RegExp[];
+ exclude: RegExp[];
+}
+
+export declare function matchRoutes(routes: WorkerRoute[], url: URL): string | null;
+
+export declare function maybeApply(f: (value: From) => To, maybeValue: From | undefined): To | undefined;
+
+export declare function maybeGetSitesManifestModule(bindings: Worker_Binding[]): Worker_Module | undefined;
+
+export declare function maybeParseURL(url: Persistence): URL | undefined;
+
+export declare class MessageEvent extends Event {
+ readonly data: ArrayBuffer | string;
+ constructor(type: "message", init: {
+ data: ArrayBuffer | string;
+ });
+}
+
+export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise;
+
+export declare class Miniflare {
+ #private;
+ constructor(opts: MiniflareOptions);
+ get ready(): Promise;
+ setOptions(opts: MiniflareOptions): Promise;
+ dispatchFetch: DispatchFetch;
+ /* Excluded from this release type: _getProxyClient */
+ getBindings>(workerName?: string): Promise;
+ getCaches(): Promise>;
+ getD1Database(bindingName: string, workerName?: string): Promise;
+ getDurableObjectNamespace(bindingName: string, workerName?: string): Promise>;
+ getKVNamespace(bindingName: string, workerName?: string): Promise>;
+ getQueueProducer(bindingName: string, workerName?: string): Promise>;
+ getR2Bucket(bindingName: string, workerName?: string): Promise>;
+ /* Excluded from this release type: _getInternalDurableObjectNamespace */
+ dispose(): Promise;
+}
+
+export declare class MiniflareCoreError extends MiniflareError {
+}
+
+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_MULTIPLE_OUTBOUNDS";
+
+export declare class MiniflareError extends Error {
+ readonly code: Code;
+ readonly cause?: Error | undefined;
+ constructor(code: Code, message?: string, cause?: Error | undefined);
+}
+
+export declare type MiniflareOptions = SharedOptions & (WorkerOptions | {
+ workers: WorkerOptions[];
+});
+
+export declare type ModuleDefinition = z.infer;
+
+export declare const ModuleDefinitionSchema: z.ZodObject<{
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm"]>;
+ path: z.ZodString;
+ contents: z.ZodOptional]>>;
+}, "strip", z.ZodTypeAny, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+}, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+}>;
+
+export declare type ModuleRule = z.infer;
+
+export declare const ModuleRuleSchema: z.ZodObject<{
+ type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm"]>;
+ include: z.ZodArray;
+ fallthrough: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+}, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+}>;
+
+export declare type ModuleRuleType = z.infer;
+
+export declare const ModuleRuleTypeSchema: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm"]>;
+
+export declare class Mutex {
+ private locked;
+ private resolveQueue;
+ private drainQueue;
+ private lock;
+ private unlock;
+ get hasWaiting(): boolean;
+ runWith(closure: () => Awaitable): Promise;
+ drained(): Promise;
+}
+
+export declare function namespaceEntries(namespaces?: Record | string[]): [bindingName: string, id: string][];
+
+export declare function namespaceKeys(namespaces?: Record | string[]): string[];
+
+export declare interface Network {
+ allow?: string[];
+ deny?: string[];
+ tlsOptions?: TlsOptions;
+}
+
+export declare const NODE_PLATFORM_IMPL: PlatformImpl;
+
+export declare class NoOpLog extends Log {
+ constructor();
+ protected log(): void;
+ error(message: Error): void;
+}
+
+export declare function normaliseDurableObject(designator: NonNullable["durableObjects"]>[string]): {
+ className: string;
+ serviceName?: string;
+ unsafeUniqueKey?: string;
+};
+
+export declare function objectEntryWorker(durableObjectNamespace: Worker_Binding_DurableObjectNamespaceDesignator, namespace: string): Worker;
+
+export declare type OptionalZodTypeOf = T extends z.ZodTypeAny ? z.TypeOf : undefined;
+
+export declare type OverloadReplaceWorkersTypes = T extends (...args: any[]) => any ? UnionToIntersection>> : ReplaceWorkersTypes;
+
+export declare type OverloadUnion any> = Parameters extends [] ? T : OverloadUnion9;
+
+export declare type OverloadUnion2 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) : T;
+
+export declare type OverloadUnion3 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) : OverloadUnion2;
+
+export declare type OverloadUnion4 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) : OverloadUnion3;
+
+export declare type OverloadUnion5 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+ (...args: infer P5): infer R5;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) : OverloadUnion4;
+
+export declare type OverloadUnion6 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+ (...args: infer P5): infer R5;
+ (...args: infer P6): infer R6;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) : OverloadUnion5;
+
+export declare type OverloadUnion7 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+ (...args: infer P5): infer R5;
+ (...args: infer P6): infer R6;
+ (...args: infer P7): infer R7;
+} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) : OverloadUnion6;
+
+export declare type OverloadUnion8 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+ (...args: infer P5): infer R5;
+ (...args: infer P6): infer R6;
+ (...args: infer P7): infer R7;
+ (...args: infer P8): infer R8;
+} ? ((...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;
+
+export declare type OverloadUnion9 = T extends {
+ (...args: infer P1): infer R1;
+ (...args: infer P2): infer R2;
+ (...args: infer P3): infer R3;
+ (...args: infer P4): infer R4;
+ (...args: infer P5): infer R5;
+ (...args: infer P6): infer R6;
+ (...args: infer P7): infer R7;
+ (...args: infer P8): infer R8;
+ (...args: infer P9): infer R9;
+} ? ((...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;
+
+/**
+ * Parses an HTTP `Range` header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range),
+ * returning either:
+ * - `undefined` indicating the range is unsatisfiable
+ * - An empty array indicating the entire response should be returned
+ * - A non-empty array of inclusive ranges of the response to return
+ */
+export declare function parseRanges(rangeHeader: string, length: number): InclusiveRange[] | undefined;
+
+export declare function parseRoutes(allRoutes: Map): WorkerRoute[];
+
+export declare function parseWithReadableStreams(impl: PlatformImpl, stringified: StringifiedWithStream, revivers: ReducersRevivers): unknown;
+
+export declare type Persistence = z.infer;
+
+export declare const PersistenceSchema: z.ZodOptional>;
+
+export declare interface PlatformImpl {
+ Blob: typeof Blob_2;
+ File: typeof File_2;
+ Headers: typeof Headers_2;
+ Request: typeof Request_3;
+ Response: typeof Response_3;
+ isReadableStream(value: unknown): value is RS;
+ bufferReadableStream(stream: RS): Promise;
+ unbufferReadableStream(buffer: ArrayBuffer): RS;
+}
+
+export declare type Plugin = PluginBase & (SharedOptions extends undefined ? {
+ sharedOptions?: undefined;
+} : {
+ sharedOptions: SharedOptions;
+});
+
+export declare const PLUGIN_ENTRIES: ["cache" | "core" | "do" | "d1" | "kv" | "queues" | "r2", ValueOf<{
+ core: Plugin;
+ path: z.ZodString;
+ contents: z.ZodOptional]>>;
+ }, "strip", z.ZodTypeAny, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }, {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }>, "many">;
+ modulesRoot: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+ }, {
+ modulesRoot?: string | undefined;
+ modules: {
+ contents?: string | Uint8Array | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ path: string;
+ }[];
+ }>, z.ZodObject<{
+ script: z.ZodString;
+ scriptPath: z.ZodOptional;
+ modules: z.ZodOptional;
+ modulesRules: z.ZodOptional;
+ include: z.ZodArray;
+ fallthrough: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }>, "many">>;
+ modulesRoot: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+ }, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ scriptPath?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ script: string;
+ }>, z.ZodObject<{
+ scriptPath: z.ZodString;
+ modules: z.ZodOptional;
+ modulesRules: z.ZodOptional;
+ include: z.ZodArray;
+ fallthrough: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }, {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }>, "many">>;
+ modulesRoot: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+ }, {
+ modules?: boolean | undefined;
+ modulesRoot?: string | undefined;
+ modulesRules?: {
+ fallthrough?: boolean | undefined;
+ type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm";
+ include: string[];
+ }[] | undefined;
+ scriptPath: string;
+ }>]>, z.ZodObject<{
+ name: z.ZodOptional;
+ compatibilityDate: z.ZodOptional;
+ compatibilityFlags: z.ZodOptional>;
+ routes: z.ZodOptional>;
+ bindings: z.ZodOptional>>;
+ wasmBindings: z.ZodOptional