miniflare 0.0.0-e34d19867 → 0.0.0-e39a45ffa

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.
@@ -18,6 +18,7 @@ import { Headers as Headers_2 } from 'undici';
18
18
  import type { Headers as Headers_3 } from '@cloudflare/workers-types/experimental';
19
19
  import { HeadersInit } from 'undici';
20
20
  import http from 'http';
21
+ import { IncomingMessage } from 'http';
21
22
  import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
22
23
  import { Json as Json_2 } from '..';
23
24
  import { kCurrentWorker as kCurrentWorker_2 } from '..';
@@ -61,6 +62,7 @@ import { Response as Response_6 } from '..';
61
62
  import { ResponseInit as ResponseInit_3 } from 'undici';
62
63
  import { ResponseRedirectStatus } from 'undici';
63
64
  import { ResponseType } from 'undici';
65
+ import { ServerResponse } from 'http';
64
66
  import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental';
65
67
  import { compatibilityDate as supportedCompatibilityDate } from 'workerd';
66
68
  import { Transform } from 'stream';
@@ -611,7 +613,8 @@ export declare const CoreBindings: {
611
613
  };
612
614
 
613
615
  export declare const CoreHeaders: {
614
- readonly CUSTOM_SERVICE: "MF-Custom-Service";
616
+ readonly CUSTOM_FETCH_SERVICE: "MF-Custom-Fetch-Service";
617
+ readonly CUSTOM_NODE_SERVICE: "MF-Custom-Node-Service";
615
618
  readonly ORIGINAL_URL: "MF-Original-URL";
616
619
  readonly PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret";
617
620
  readonly DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error";
@@ -891,7 +894,13 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
891
894
  path: string;
892
895
  writable?: boolean | undefined;
893
896
  };
894
- }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>>]>>>;
897
+ }>, z.ZodObject<{
898
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>>;
899
+ }, "strip", z.ZodTypeAny, {
900
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
901
+ }, {
902
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
903
+ }>, z.ZodType<(request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>>]>>>;
895
904
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
896
905
  scriptName: z.ZodString;
897
906
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -1056,7 +1065,13 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1056
1065
  path: string;
1057
1066
  writable?: boolean | undefined;
1058
1067
  };
1059
- }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>>]>>;
1068
+ }>, z.ZodObject<{
1069
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>>;
1070
+ }, "strip", z.ZodTypeAny, {
1071
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1072
+ }, {
1073
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1074
+ }>, z.ZodType<(request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>>]>>;
1060
1075
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent.Options>, z.ZodTypeDef, MockAgent<MockAgent.Options>>>;
1061
1076
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
1062
1077
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1233,7 +1248,13 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1233
1248
  path: string;
1234
1249
  writable?: boolean | undefined;
1235
1250
  };
1236
- }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>>]>, "many">>;
1251
+ }>, z.ZodObject<{
1252
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>>;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1255
+ }, {
1256
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1257
+ }>, z.ZodType<(request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>>]>, "many">>;
1237
1258
  stripCfConnectingIp: z.ZodDefault<z.ZodBoolean>;
1238
1259
  }, "strip", z.ZodTypeAny, {
1239
1260
  stripCfConnectingIp: boolean;
@@ -1275,7 +1296,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1275
1296
  path: string;
1276
1297
  writable?: boolean | undefined;
1277
1298
  };
1278
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1299
+ } | {
1300
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1301
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1279
1302
  wrappedBindings?: Record<string, string | {
1280
1303
  scriptName: string;
1281
1304
  entrypoint?: string | undefined;
@@ -1309,7 +1332,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1309
1332
  path: string;
1310
1333
  writable?: boolean | undefined;
1311
1334
  };
1312
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1335
+ } | {
1336
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1337
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1313
1338
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1314
1339
  unsafeEphemeralDurableObjects?: boolean | undefined;
1315
1340
  unsafeDirectSockets?: {
@@ -1349,7 +1374,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1349
1374
  path: string;
1350
1375
  writable?: boolean | undefined;
1351
1376
  };
1352
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1377
+ } | {
1378
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1379
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1353
1380
  }, {
1354
1381
  name?: string | undefined;
1355
1382
  rootPath?: string | undefined;
@@ -1389,7 +1416,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1389
1416
  path: string;
1390
1417
  writable?: boolean | undefined;
1391
1418
  };
1392
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1419
+ } | {
1420
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1421
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1393
1422
  wrappedBindings?: Record<string, string | {
1394
1423
  scriptName: string;
1395
1424
  entrypoint?: string | undefined;
@@ -1423,7 +1452,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1423
1452
  path: string;
1424
1453
  writable?: boolean | undefined;
1425
1454
  };
1426
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1455
+ } | {
1456
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1457
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1427
1458
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1428
1459
  unsafeEphemeralDurableObjects?: boolean | undefined;
1429
1460
  unsafeDirectSockets?: {
@@ -1463,7 +1494,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1463
1494
  path: string;
1464
1495
  writable?: boolean | undefined;
1465
1496
  };
1466
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1497
+ } | {
1498
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1499
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1467
1500
  stripCfConnectingIp?: boolean | undefined;
1468
1501
  }>>, ({
1469
1502
  modules: {
@@ -1512,7 +1545,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1512
1545
  path: string;
1513
1546
  writable?: boolean | undefined;
1514
1547
  };
1515
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1548
+ } | {
1549
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1550
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1516
1551
  wrappedBindings?: Record<string, string | {
1517
1552
  scriptName: string;
1518
1553
  entrypoint?: string | undefined;
@@ -1546,7 +1581,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1546
1581
  path: string;
1547
1582
  writable?: boolean | undefined;
1548
1583
  };
1549
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1584
+ } | {
1585
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1586
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1550
1587
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1551
1588
  unsafeEphemeralDurableObjects?: boolean | undefined;
1552
1589
  unsafeDirectSockets?: {
@@ -1586,7 +1623,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1586
1623
  path: string;
1587
1624
  writable?: boolean | undefined;
1588
1625
  };
1589
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1626
+ } | {
1627
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1628
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1590
1629
  }) | ({
1591
1630
  script: string;
1592
1631
  scriptPath?: string | undefined;
@@ -1637,7 +1676,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1637
1676
  path: string;
1638
1677
  writable?: boolean | undefined;
1639
1678
  };
1640
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1679
+ } | {
1680
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1681
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1641
1682
  wrappedBindings?: Record<string, string | {
1642
1683
  scriptName: string;
1643
1684
  entrypoint?: string | undefined;
@@ -1671,7 +1712,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1671
1712
  path: string;
1672
1713
  writable?: boolean | undefined;
1673
1714
  };
1674
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1715
+ } | {
1716
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1717
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1675
1718
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1676
1719
  unsafeEphemeralDurableObjects?: boolean | undefined;
1677
1720
  unsafeDirectSockets?: {
@@ -1711,7 +1754,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1711
1754
  path: string;
1712
1755
  writable?: boolean | undefined;
1713
1756
  };
1714
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1757
+ } | {
1758
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1759
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1715
1760
  }) | ({
1716
1761
  scriptPath: string;
1717
1762
  modules?: boolean | undefined;
@@ -1761,7 +1806,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1761
1806
  path: string;
1762
1807
  writable?: boolean | undefined;
1763
1808
  };
1764
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1809
+ } | {
1810
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1811
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1765
1812
  wrappedBindings?: Record<string, string | {
1766
1813
  scriptName: string;
1767
1814
  entrypoint?: string | undefined;
@@ -1795,7 +1842,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1795
1842
  path: string;
1796
1843
  writable?: boolean | undefined;
1797
1844
  };
1798
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1845
+ } | {
1846
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1847
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1799
1848
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1800
1849
  unsafeEphemeralDurableObjects?: boolean | undefined;
1801
1850
  unsafeDirectSockets?: {
@@ -1835,7 +1884,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1835
1884
  path: string;
1836
1885
  writable?: boolean | undefined;
1837
1886
  };
1838
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1887
+ } | {
1888
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1889
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1839
1890
  }), ({
1840
1891
  modules: {
1841
1892
  type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -1901,7 +1952,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1901
1952
  path: string;
1902
1953
  writable?: boolean | undefined;
1903
1954
  };
1904
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1955
+ } | {
1956
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1957
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>)> | undefined;
1905
1958
  wrappedBindings?: Record<string, string | {
1906
1959
  scriptName: string;
1907
1960
  entrypoint?: string | undefined;
@@ -1935,7 +1988,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1935
1988
  path: string;
1936
1989
  writable?: boolean | undefined;
1937
1990
  };
1938
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
1991
+ } | {
1992
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
1993
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
1939
1994
  fetchMock?: MockAgent<MockAgent.Options> | undefined;
1940
1995
  unsafeEphemeralDurableObjects?: boolean | undefined;
1941
1996
  unsafeDirectSockets?: {
@@ -1975,7 +2030,9 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
1975
2030
  path: string;
1976
2031
  writable?: boolean | undefined;
1977
2032
  };
1978
- } | ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
2033
+ } | {
2034
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_2) => Awaitable<void>;
2035
+ } | ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>))[] | undefined;
1979
2036
  stripCfConnectingIp?: boolean | undefined;
1980
2037
  }>;
1981
2038
 
@@ -1996,10 +2053,11 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
1996
2053
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
1997
2054
  liveReload: z.ZodOptional<z.ZodBoolean>;
1998
2055
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
1999
- unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>>>;
2056
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>, z.ZodTypeDef, (request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>>>;
2000
2057
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
2001
2058
  unsafeTriggerHandlers: z.ZodOptional<z.ZodBoolean>;
2002
2059
  logRequests: z.ZodDefault<z.ZodBoolean>;
2060
+ defaultPersistRoot: z.ZodOptional<z.ZodString>;
2003
2061
  }, "strip", z.ZodTypeAny, {
2004
2062
  logRequests: boolean;
2005
2063
  rootPath?: undefined;
@@ -2018,9 +2076,10 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
2018
2076
  cf?: string | boolean | Record<string, any> | undefined;
2019
2077
  liveReload?: boolean | undefined;
2020
2078
  unsafeProxySharedSecret?: string | undefined;
2021
- unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
2079
+ unsafeModuleFallbackService?: ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
2022
2080
  unsafeStickyBlobs?: boolean | undefined;
2023
2081
  unsafeTriggerHandlers?: boolean | undefined;
2082
+ defaultPersistRoot?: string | undefined;
2024
2083
  }, {
2025
2084
  rootPath?: string | undefined;
2026
2085
  host?: string | undefined;
@@ -2038,10 +2097,11 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
2038
2097
  cf?: string | boolean | Record<string, any> | undefined;
2039
2098
  liveReload?: boolean | undefined;
2040
2099
  unsafeProxySharedSecret?: string | undefined;
2041
- unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable<Response_3>) | undefined;
2100
+ unsafeModuleFallbackService?: ((request: Request_3, miniflare: Miniflare_2) => Awaitable<Response_3>) | undefined;
2042
2101
  unsafeStickyBlobs?: boolean | undefined;
2043
2102
  unsafeTriggerHandlers?: boolean | undefined;
2044
2103
  logRequests?: boolean | undefined;
2104
+ defaultPersistRoot?: string | undefined;
2045
2105
  }>;
2046
2106
 
2047
2107
  export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise<void>;
@@ -2412,7 +2472,7 @@ compatibilityFlags: string[]): {
2412
2472
  hasExperimentalNodejsCompatV2Flag: boolean;
2413
2473
  };
2414
2474
 
2415
- export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
2475
+ export declare function getPersistPath(pluginName: string, tmpPath: string, defaultPersistRoot: string | undefined, persist: Persistence): string;
2416
2476
 
2417
2477
  export declare function getRootPath(opts: unknown): string;
2418
2478
 
@@ -2549,6 +2609,8 @@ declare const kSend: unique symbol;
2549
2609
 
2550
2610
  export declare const kUnsafeEphemeralUniqueKey: unique symbol;
2551
2611
 
2612
+ export declare const KV_NAMESPACE_OBJECT_CLASS_NAME = "KVNamespaceObject";
2613
+
2552
2614
  export declare const KV_PLUGIN: Plugin<typeof KVOptionsSchema, typeof KVSharedOptionsSchema>;
2553
2615
 
2554
2616
  export declare const KV_PLUGIN_NAME = "kv";
@@ -2634,6 +2696,7 @@ export declare class Log {
2634
2696
  static unstable_registerBeforeLogHook(callback: (() => void) | undefined): void;
2635
2697
  static unstable_registerAfterLogHook(callback: (() => void) | undefined): void;
2636
2698
  logWithLevel(level: LogLevel, message: string): void;
2699
+ logReady(message: string): void;
2637
2700
  error(message: Error): void;
2638
2701
  warn(message: string): void;
2639
2702
  info(message: string): void;
@@ -3330,7 +3393,13 @@ export declare const PLUGINS: {
3330
3393
  path: string;
3331
3394
  writable?: boolean | undefined;
3332
3395
  };
3333
- }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>>]>>>;
3396
+ }>, z.ZodObject<{
3397
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>>;
3398
+ }, "strip", z.ZodTypeAny, {
3399
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3400
+ }, {
3401
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3402
+ }>, z.ZodType<(request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>>]>>>;
3334
3403
  wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
3335
3404
  scriptName: z.ZodString;
3336
3405
  entrypoint: z.ZodOptional<z.ZodString>;
@@ -3495,7 +3564,13 @@ export declare const PLUGINS: {
3495
3564
  path: string;
3496
3565
  writable?: boolean | undefined;
3497
3566
  };
3498
- }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>>]>>;
3567
+ }>, z.ZodObject<{
3568
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>>;
3569
+ }, "strip", z.ZodTypeAny, {
3570
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3571
+ }, {
3572
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3573
+ }>, z.ZodType<(request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>>]>>;
3499
3574
  fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent>, z.ZodTypeDef, MockAgent<MockAgent>>>;
3500
3575
  unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
3501
3576
  unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3668,7 +3743,13 @@ export declare const PLUGINS: {
3668
3743
  path: string;
3669
3744
  writable?: boolean | undefined;
3670
3745
  };
3671
- }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>>]>, "many">>;
3746
+ }>, z.ZodObject<{
3747
+ node: z.ZodType<(req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>, z.ZodTypeDef, (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>>;
3748
+ }, "strip", z.ZodTypeAny, {
3749
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3750
+ }, {
3751
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3752
+ }>, z.ZodType<(request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>>]>, "many">>;
3672
3753
  stripCfConnectingIp: z.ZodDefault<z.ZodBoolean>;
3673
3754
  }, "strip", z.ZodTypeAny, {
3674
3755
  stripCfConnectingIp: boolean;
@@ -3710,7 +3791,9 @@ export declare const PLUGINS: {
3710
3791
  path: string;
3711
3792
  writable?: boolean | undefined;
3712
3793
  };
3713
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
3794
+ } | {
3795
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3796
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
3714
3797
  wrappedBindings?: Record<string, string | {
3715
3798
  scriptName: string;
3716
3799
  entrypoint?: string | undefined;
@@ -3744,7 +3827,9 @@ export declare const PLUGINS: {
3744
3827
  path: string;
3745
3828
  writable?: boolean | undefined;
3746
3829
  };
3747
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3830
+ } | {
3831
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3832
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3748
3833
  fetchMock?: MockAgent<MockAgent> | undefined;
3749
3834
  unsafeEphemeralDurableObjects?: boolean | undefined;
3750
3835
  unsafeDirectSockets?: {
@@ -3784,7 +3869,9 @@ export declare const PLUGINS: {
3784
3869
  path: string;
3785
3870
  writable?: boolean | undefined;
3786
3871
  };
3787
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
3872
+ } | {
3873
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3874
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
3788
3875
  }, {
3789
3876
  name?: string | undefined;
3790
3877
  rootPath?: string | undefined;
@@ -3824,7 +3911,9 @@ export declare const PLUGINS: {
3824
3911
  path: string;
3825
3912
  writable?: boolean | undefined;
3826
3913
  };
3827
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
3914
+ } | {
3915
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3916
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
3828
3917
  wrappedBindings?: Record<string, string | {
3829
3918
  scriptName: string;
3830
3919
  entrypoint?: string | undefined;
@@ -3858,7 +3947,9 @@ export declare const PLUGINS: {
3858
3947
  path: string;
3859
3948
  writable?: boolean | undefined;
3860
3949
  };
3861
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3950
+ } | {
3951
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3952
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3862
3953
  fetchMock?: MockAgent<MockAgent> | undefined;
3863
3954
  unsafeEphemeralDurableObjects?: boolean | undefined;
3864
3955
  unsafeDirectSockets?: {
@@ -3898,7 +3989,9 @@ export declare const PLUGINS: {
3898
3989
  path: string;
3899
3990
  writable?: boolean | undefined;
3900
3991
  };
3901
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
3992
+ } | {
3993
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
3994
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
3902
3995
  stripCfConnectingIp?: boolean | undefined;
3903
3996
  }>>, ({
3904
3997
  modules: {
@@ -3947,7 +4040,9 @@ export declare const PLUGINS: {
3947
4040
  path: string;
3948
4041
  writable?: boolean | undefined;
3949
4042
  };
3950
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4043
+ } | {
4044
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4045
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
3951
4046
  wrappedBindings?: Record<string, string | {
3952
4047
  scriptName: string;
3953
4048
  entrypoint?: string | undefined;
@@ -3981,7 +4076,9 @@ export declare const PLUGINS: {
3981
4076
  path: string;
3982
4077
  writable?: boolean | undefined;
3983
4078
  };
3984
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4079
+ } | {
4080
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4081
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
3985
4082
  fetchMock?: MockAgent<MockAgent> | undefined;
3986
4083
  unsafeEphemeralDurableObjects?: boolean | undefined;
3987
4084
  unsafeDirectSockets?: {
@@ -4021,7 +4118,9 @@ export declare const PLUGINS: {
4021
4118
  path: string;
4022
4119
  writable?: boolean | undefined;
4023
4120
  };
4024
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4121
+ } | {
4122
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4123
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4025
4124
  }) | ({
4026
4125
  script: string;
4027
4126
  scriptPath?: string | undefined;
@@ -4072,7 +4171,9 @@ export declare const PLUGINS: {
4072
4171
  path: string;
4073
4172
  writable?: boolean | undefined;
4074
4173
  };
4075
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4174
+ } | {
4175
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4176
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4076
4177
  wrappedBindings?: Record<string, string | {
4077
4178
  scriptName: string;
4078
4179
  entrypoint?: string | undefined;
@@ -4106,7 +4207,9 @@ export declare const PLUGINS: {
4106
4207
  path: string;
4107
4208
  writable?: boolean | undefined;
4108
4209
  };
4109
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4210
+ } | {
4211
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4212
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4110
4213
  fetchMock?: MockAgent<MockAgent> | undefined;
4111
4214
  unsafeEphemeralDurableObjects?: boolean | undefined;
4112
4215
  unsafeDirectSockets?: {
@@ -4146,7 +4249,9 @@ export declare const PLUGINS: {
4146
4249
  path: string;
4147
4250
  writable?: boolean | undefined;
4148
4251
  };
4149
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4252
+ } | {
4253
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4254
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4150
4255
  }) | ({
4151
4256
  scriptPath: string;
4152
4257
  modules?: boolean | undefined;
@@ -4196,7 +4301,9 @@ export declare const PLUGINS: {
4196
4301
  path: string;
4197
4302
  writable?: boolean | undefined;
4198
4303
  };
4199
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4304
+ } | {
4305
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4306
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4200
4307
  wrappedBindings?: Record<string, string | {
4201
4308
  scriptName: string;
4202
4309
  entrypoint?: string | undefined;
@@ -4230,7 +4337,9 @@ export declare const PLUGINS: {
4230
4337
  path: string;
4231
4338
  writable?: boolean | undefined;
4232
4339
  };
4233
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4340
+ } | {
4341
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4342
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4234
4343
  fetchMock?: MockAgent<MockAgent> | undefined;
4235
4344
  unsafeEphemeralDurableObjects?: boolean | undefined;
4236
4345
  unsafeDirectSockets?: {
@@ -4270,7 +4379,9 @@ export declare const PLUGINS: {
4270
4379
  path: string;
4271
4380
  writable?: boolean | undefined;
4272
4381
  };
4273
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4382
+ } | {
4383
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4384
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4274
4385
  }), ({
4275
4386
  modules: {
4276
4387
  type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
@@ -4336,7 +4447,9 @@ export declare const PLUGINS: {
4336
4447
  path: string;
4337
4448
  writable?: boolean | undefined;
4338
4449
  };
4339
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4450
+ } | {
4451
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4452
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>)> | undefined;
4340
4453
  wrappedBindings?: Record<string, string | {
4341
4454
  scriptName: string;
4342
4455
  entrypoint?: string | undefined;
@@ -4370,7 +4483,9 @@ export declare const PLUGINS: {
4370
4483
  path: string;
4371
4484
  writable?: boolean | undefined;
4372
4485
  };
4373
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4486
+ } | {
4487
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4488
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4374
4489
  fetchMock?: MockAgent<MockAgent> | undefined;
4375
4490
  unsafeEphemeralDurableObjects?: boolean | undefined;
4376
4491
  unsafeDirectSockets?: {
@@ -4410,7 +4525,9 @@ export declare const PLUGINS: {
4410
4525
  path: string;
4411
4526
  writable?: boolean | undefined;
4412
4527
  };
4413
- } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4528
+ } | {
4529
+ node: (req: IncomingMessage, res: ServerResponse, miniflare: Miniflare_3) => Awaitable_2<void>;
4530
+ } | ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>))[] | undefined;
4414
4531
  stripCfConnectingIp?: boolean | undefined;
4415
4532
  }>, z.ZodObject<{
4416
4533
  rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
@@ -4429,10 +4546,11 @@ export declare const PLUGINS: {
4429
4546
  cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
4430
4547
  liveReload: z.ZodOptional<z.ZodBoolean>;
4431
4548
  unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
4432
- unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>>>;
4549
+ unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>, z.ZodTypeDef, (request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>>>;
4433
4550
  unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
4434
4551
  unsafeTriggerHandlers: z.ZodOptional<z.ZodBoolean>;
4435
4552
  logRequests: z.ZodDefault<z.ZodBoolean>;
4553
+ defaultPersistRoot: z.ZodOptional<z.ZodString>;
4436
4554
  }, "strip", z.ZodTypeAny, {
4437
4555
  logRequests: boolean;
4438
4556
  rootPath?: undefined;
@@ -4451,9 +4569,10 @@ export declare const PLUGINS: {
4451
4569
  cf?: string | boolean | Record<string, any> | undefined;
4452
4570
  liveReload?: boolean | undefined;
4453
4571
  unsafeProxySharedSecret?: string | undefined;
4454
- unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4572
+ unsafeModuleFallbackService?: ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4455
4573
  unsafeStickyBlobs?: boolean | undefined;
4456
4574
  unsafeTriggerHandlers?: boolean | undefined;
4575
+ defaultPersistRoot?: string | undefined;
4457
4576
  }, {
4458
4577
  rootPath?: string | undefined;
4459
4578
  host?: string | undefined;
@@ -4471,10 +4590,11 @@ export declare const PLUGINS: {
4471
4590
  cf?: string | boolean | Record<string, any> | undefined;
4472
4591
  liveReload?: boolean | undefined;
4473
4592
  unsafeProxySharedSecret?: string | undefined;
4474
- unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4593
+ unsafeModuleFallbackService?: ((request: Request_6, miniflare: Miniflare_3) => Awaitable_2<Response_6>) | undefined;
4475
4594
  unsafeStickyBlobs?: boolean | undefined;
4476
4595
  unsafeTriggerHandlers?: boolean | undefined;
4477
4596
  logRequests?: boolean | undefined;
4597
+ defaultPersistRoot?: string | undefined;
4478
4598
  }>>;
4479
4599
  cache: Plugin_2<z.ZodObject<{
4480
4600
  cache: z.ZodOptional<z.ZodBoolean>;
@@ -5388,6 +5508,7 @@ export declare interface PluginServicesOptions<Options extends z.ZodType, Shared
5388
5508
  workerIndex: number;
5389
5509
  additionalModules: Worker_Module[];
5390
5510
  tmpPath: string;
5511
+ defaultPersistRoot: string | undefined;
5391
5512
  workerNames: string[];
5392
5513
  loopbackPort: number;
5393
5514
  unsafeStickyBlobs: boolean;