miniflare 0.0.0-e4fe35cc5 → 0.0.0-e771fe990
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.
- package/README.md +34 -0
- package/dist/src/index.d.ts +425 -151
- package/dist/src/index.js +444 -222
- package/dist/src/index.js.map +3 -3
- package/dist/src/workers/assets/assets-kv.worker.js +5 -1
- package/dist/src/workers/assets/assets-kv.worker.js.map +1 -1
- package/dist/src/workers/assets/assets.worker.js +181 -29
- package/dist/src/workers/assets/assets.worker.js.map +2 -2
- package/dist/src/workers/assets/router.worker.js +82 -4
- package/dist/src/workers/assets/router.worker.js.map +2 -2
- package/dist/src/workers/cache/cache.worker.js +6 -5
- package/dist/src/workers/cache/cache.worker.js.map +2 -2
- package/dist/src/workers/core/entry.worker.js +5 -2
- package/dist/src/workers/core/entry.worker.js.map +1 -1
- package/dist/src/workers/queues/broker.worker.js +5 -3
- package/dist/src/workers/queues/broker.worker.js.map +1 -1
- package/dist/src/workers/workflows/binding.worker.js +1971 -0
- package/dist/src/workers/workflows/binding.worker.js.map +6 -0
- package/package.json +8 -6
package/dist/src/index.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimen
|
|
|
10
10
|
import type { Fetcher } from '@cloudflare/workers-types/experimental';
|
|
11
11
|
import { File } from 'undici';
|
|
12
12
|
import type { File as File_2 } from '@cloudflare/workers-types/experimental';
|
|
13
|
-
import { FormData } from 'undici';
|
|
14
|
-
import { Headers } from 'undici';
|
|
15
|
-
import type { Headers as
|
|
13
|
+
import { FormData as FormData_2 } from 'undici';
|
|
14
|
+
import { Headers as Headers_2 } from 'undici';
|
|
15
|
+
import type { Headers as Headers_3 } from '@cloudflare/workers-types/experimental';
|
|
16
16
|
import { HeadersInit } from 'undici';
|
|
17
17
|
import http from 'http';
|
|
18
18
|
import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
|
|
@@ -23,24 +23,24 @@ import { ParseParams } from 'zod';
|
|
|
23
23
|
import type { Queue } from '@cloudflare/workers-types/experimental';
|
|
24
24
|
import type { R2Bucket } from '@cloudflare/workers-types/experimental';
|
|
25
25
|
import { Readable } from 'stream';
|
|
26
|
-
import type { ReadableStream } from '@cloudflare/workers-types/experimental';
|
|
27
|
-
import { ReadableStream as
|
|
26
|
+
import type { ReadableStream as ReadableStream_2 } from '@cloudflare/workers-types/experimental';
|
|
27
|
+
import { ReadableStream as ReadableStream_3 } from 'stream/web';
|
|
28
28
|
import { ReferrerPolicy } from 'undici';
|
|
29
|
-
import { Request as
|
|
30
|
-
import type { Request as
|
|
29
|
+
import { Request as Request_3 } from 'undici';
|
|
30
|
+
import type { Request as Request_4 } from '@cloudflare/workers-types/experimental';
|
|
31
31
|
import { RequestCache } from 'undici';
|
|
32
32
|
import { RequestCredentials } from 'undici';
|
|
33
33
|
import { RequestDestination } from 'undici';
|
|
34
34
|
import { RequestDuplex } from 'undici';
|
|
35
35
|
import { RequestInfo as RequestInfo_2 } from 'undici';
|
|
36
|
-
import { RequestInit as
|
|
37
|
-
import type { RequestInit as
|
|
36
|
+
import { RequestInit as RequestInit_3 } from 'undici';
|
|
37
|
+
import type { RequestInit as RequestInit_4 } from '@cloudflare/workers-types/experimental';
|
|
38
38
|
import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental';
|
|
39
39
|
import { RequestMode } from 'undici';
|
|
40
40
|
import { RequestRedirect } from 'undici';
|
|
41
|
-
import { Response as
|
|
42
|
-
import type { Response as
|
|
43
|
-
import { ResponseInit as
|
|
41
|
+
import { Response as Response_3 } from 'undici';
|
|
42
|
+
import type { Response as Response_4 } from '@cloudflare/workers-types/experimental';
|
|
43
|
+
import { ResponseInit as ResponseInit_3 } from 'undici';
|
|
44
44
|
import { ResponseRedirectStatus } from 'undici';
|
|
45
45
|
import { ResponseType } from 'undici';
|
|
46
46
|
import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental';
|
|
@@ -58,78 +58,99 @@ export declare class __MiniflareFunctionWrapper {
|
|
|
58
58
|
|
|
59
59
|
export declare type AnyHeaders = http.IncomingHttpHeaders | string[];
|
|
60
60
|
|
|
61
|
+
export declare type AssetReverseMap = {
|
|
62
|
+
[pathHash: string]: {
|
|
63
|
+
filePath: string;
|
|
64
|
+
contentType: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
61
68
|
export declare const ASSETS_PLUGIN: Plugin<typeof AssetsOptionsSchema>;
|
|
62
69
|
|
|
63
70
|
export declare const AssetsOptionsSchema: z.ZodObject<{
|
|
64
71
|
assets: z.ZodOptional<z.ZodObject<{
|
|
65
72
|
workerName: z.ZodOptional<z.ZodString>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
routingConfig: z.ZodObject<{
|
|
73
|
+
directory: z.ZodEffects<z.ZodString, string, string>;
|
|
74
|
+
binding: z.ZodOptional<z.ZodString>;
|
|
75
|
+
routingConfig: z.ZodOptional<z.ZodObject<{
|
|
69
76
|
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
|
70
78
|
}, "strip", z.ZodTypeAny, {
|
|
71
79
|
has_user_worker?: boolean;
|
|
80
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
72
81
|
}, {
|
|
73
82
|
has_user_worker?: boolean;
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
84
|
+
}>>;
|
|
85
|
+
assetConfig: z.ZodOptional<z.ZodObject<{
|
|
76
86
|
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
|
77
87
|
not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
|
|
88
|
+
serve_directly: z.ZodOptional<z.ZodBoolean>;
|
|
78
89
|
}, "strip", z.ZodTypeAny, {
|
|
79
90
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
80
91
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
92
|
+
serve_directly?: boolean;
|
|
81
93
|
}, {
|
|
82
94
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
83
95
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
84
|
-
|
|
96
|
+
serve_directly?: boolean;
|
|
97
|
+
}>>;
|
|
85
98
|
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
directory: string;
|
|
100
|
+
workerName?: string | undefined;
|
|
101
|
+
binding?: string | undefined;
|
|
102
|
+
routingConfig?: {
|
|
88
103
|
has_user_worker?: boolean;
|
|
89
|
-
|
|
90
|
-
|
|
104
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
105
|
+
} | undefined;
|
|
106
|
+
assetConfig?: {
|
|
91
107
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
92
108
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
bindingName?: string | undefined;
|
|
109
|
+
serve_directly?: boolean;
|
|
110
|
+
} | undefined;
|
|
96
111
|
}, {
|
|
97
|
-
|
|
98
|
-
|
|
112
|
+
directory: string;
|
|
113
|
+
workerName?: string | undefined;
|
|
114
|
+
binding?: string | undefined;
|
|
115
|
+
routingConfig?: {
|
|
99
116
|
has_user_worker?: boolean;
|
|
100
|
-
|
|
101
|
-
|
|
117
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
118
|
+
} | undefined;
|
|
119
|
+
assetConfig?: {
|
|
102
120
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
103
121
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
bindingName?: string | undefined;
|
|
122
|
+
serve_directly?: boolean;
|
|
123
|
+
} | undefined;
|
|
107
124
|
}>>;
|
|
108
125
|
}, "strip", z.ZodTypeAny, {
|
|
109
126
|
assets?: {
|
|
110
|
-
|
|
111
|
-
|
|
127
|
+
directory: string;
|
|
128
|
+
workerName?: string | undefined;
|
|
129
|
+
binding?: string | undefined;
|
|
130
|
+
routingConfig?: {
|
|
112
131
|
has_user_worker?: boolean;
|
|
113
|
-
|
|
114
|
-
|
|
132
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
133
|
+
} | undefined;
|
|
134
|
+
assetConfig?: {
|
|
115
135
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
116
136
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
bindingName?: string | undefined;
|
|
137
|
+
serve_directly?: boolean;
|
|
138
|
+
} | undefined;
|
|
120
139
|
} | undefined;
|
|
121
140
|
}, {
|
|
122
141
|
assets?: {
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
directory: string;
|
|
143
|
+
workerName?: string | undefined;
|
|
144
|
+
binding?: string | undefined;
|
|
145
|
+
routingConfig?: {
|
|
125
146
|
has_user_worker?: boolean;
|
|
126
|
-
|
|
127
|
-
|
|
147
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
148
|
+
} | undefined;
|
|
149
|
+
assetConfig?: {
|
|
128
150
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
129
151
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
bindingName?: string | undefined;
|
|
152
|
+
serve_directly?: boolean;
|
|
153
|
+
} | undefined;
|
|
133
154
|
} | undefined;
|
|
134
155
|
}>;
|
|
135
156
|
|
|
@@ -141,7 +162,19 @@ export declare function base64Encode(value: string): string;
|
|
|
141
162
|
|
|
142
163
|
export { BodyInit }
|
|
143
164
|
|
|
144
|
-
|
|
165
|
+
/**
|
|
166
|
+
* The Asset Manifest and Asset Reverse Map are used to map a request path to an asset.
|
|
167
|
+
* 1. Hash path of request
|
|
168
|
+
* 2. Use this path hash to find the manifest entry
|
|
169
|
+
* 3. Get content hash from manifest entry
|
|
170
|
+
* 4a. In prod, use content hash to get asset from KV
|
|
171
|
+
* 4b. In dev, we fake out the KV store and use the file system instead.
|
|
172
|
+
* Use content hash to get file path from asset reverse map.
|
|
173
|
+
*/
|
|
174
|
+
export declare const buildAssetManifest: (dir: string) => Promise<{
|
|
175
|
+
encodedAssetManifest: Uint8Array;
|
|
176
|
+
assetsReverseMap: AssetReverseMap;
|
|
177
|
+
}>;
|
|
145
178
|
|
|
146
179
|
export declare const CACHE_PLUGIN: Plugin<typeof CacheOptionsSchema, typeof CacheSharedOptionsSchema>;
|
|
147
180
|
|
|
@@ -493,7 +526,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
493
526
|
path: string;
|
|
494
527
|
writable?: boolean | undefined;
|
|
495
528
|
};
|
|
496
|
-
}>, z.ZodType<(request:
|
|
529
|
+
}>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>>;
|
|
497
530
|
wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
498
531
|
scriptName: z.ZodString;
|
|
499
532
|
entrypoint: z.ZodOptional<z.ZodString>;
|
|
@@ -645,7 +678,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
645
678
|
path: string;
|
|
646
679
|
writable?: boolean | undefined;
|
|
647
680
|
};
|
|
648
|
-
}>, z.ZodType<(request:
|
|
681
|
+
}>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>;
|
|
649
682
|
fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent.Options>, z.ZodTypeDef, MockAgent<MockAgent.Options>>>;
|
|
650
683
|
unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
|
|
651
684
|
unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -666,6 +699,10 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
666
699
|
}>, "many">>;
|
|
667
700
|
unsafeEvalBinding: z.ZodOptional<z.ZodString>;
|
|
668
701
|
unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
|
|
702
|
+
/** Used to set the vitest pool worker SELF binding to point to the router worker if there are assets.
|
|
703
|
+
(If there are assets but we're not using vitest, the miniflare entry worker can point directly to RW.)
|
|
704
|
+
*/
|
|
705
|
+
hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
|
|
669
706
|
}, "strip", z.ZodTypeAny, {
|
|
670
707
|
name?: string | undefined;
|
|
671
708
|
rootPath?: undefined;
|
|
@@ -702,7 +739,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
702
739
|
path: string;
|
|
703
740
|
writable?: boolean | undefined;
|
|
704
741
|
};
|
|
705
|
-
} | ((request:
|
|
742
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
706
743
|
wrappedBindings?: Record<string, string | {
|
|
707
744
|
scriptName: string;
|
|
708
745
|
entrypoint?: string | undefined;
|
|
@@ -734,7 +771,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
734
771
|
path: string;
|
|
735
772
|
writable?: boolean | undefined;
|
|
736
773
|
};
|
|
737
|
-
} | ((request:
|
|
774
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
738
775
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
739
776
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
740
777
|
unsafeDirectSockets?: {
|
|
@@ -745,6 +782,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
745
782
|
}[] | undefined;
|
|
746
783
|
unsafeEvalBinding?: string | undefined;
|
|
747
784
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
785
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
748
786
|
}, {
|
|
749
787
|
name?: string | undefined;
|
|
750
788
|
rootPath?: string | undefined;
|
|
@@ -781,7 +819,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
781
819
|
path: string;
|
|
782
820
|
writable?: boolean | undefined;
|
|
783
821
|
};
|
|
784
|
-
} | ((request:
|
|
822
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
785
823
|
wrappedBindings?: Record<string, string | {
|
|
786
824
|
scriptName: string;
|
|
787
825
|
entrypoint?: string | undefined;
|
|
@@ -813,7 +851,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
813
851
|
path: string;
|
|
814
852
|
writable?: boolean | undefined;
|
|
815
853
|
};
|
|
816
|
-
} | ((request:
|
|
854
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
817
855
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
818
856
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
819
857
|
unsafeDirectSockets?: {
|
|
@@ -824,6 +862,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
824
862
|
}[] | undefined;
|
|
825
863
|
unsafeEvalBinding?: string | undefined;
|
|
826
864
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
865
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
827
866
|
}>>, ({
|
|
828
867
|
modules: {
|
|
829
868
|
type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
|
|
@@ -867,7 +906,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
867
906
|
path: string;
|
|
868
907
|
writable?: boolean | undefined;
|
|
869
908
|
};
|
|
870
|
-
} | ((request:
|
|
909
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
871
910
|
wrappedBindings?: Record<string, string | {
|
|
872
911
|
scriptName: string;
|
|
873
912
|
entrypoint?: string | undefined;
|
|
@@ -899,7 +938,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
899
938
|
path: string;
|
|
900
939
|
writable?: boolean | undefined;
|
|
901
940
|
};
|
|
902
|
-
} | ((request:
|
|
941
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
903
942
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
904
943
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
905
944
|
unsafeDirectSockets?: {
|
|
@@ -910,6 +949,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
910
949
|
}[] | undefined;
|
|
911
950
|
unsafeEvalBinding?: string | undefined;
|
|
912
951
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
952
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
913
953
|
}) | ({
|
|
914
954
|
script: string;
|
|
915
955
|
scriptPath?: string | undefined;
|
|
@@ -956,7 +996,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
956
996
|
path: string;
|
|
957
997
|
writable?: boolean | undefined;
|
|
958
998
|
};
|
|
959
|
-
} | ((request:
|
|
999
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
960
1000
|
wrappedBindings?: Record<string, string | {
|
|
961
1001
|
scriptName: string;
|
|
962
1002
|
entrypoint?: string | undefined;
|
|
@@ -988,7 +1028,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
988
1028
|
path: string;
|
|
989
1029
|
writable?: boolean | undefined;
|
|
990
1030
|
};
|
|
991
|
-
} | ((request:
|
|
1031
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
992
1032
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
993
1033
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
994
1034
|
unsafeDirectSockets?: {
|
|
@@ -999,6 +1039,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
999
1039
|
}[] | undefined;
|
|
1000
1040
|
unsafeEvalBinding?: string | undefined;
|
|
1001
1041
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
1042
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
1002
1043
|
}) | ({
|
|
1003
1044
|
scriptPath: string;
|
|
1004
1045
|
modules?: boolean | undefined;
|
|
@@ -1044,7 +1085,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1044
1085
|
path: string;
|
|
1045
1086
|
writable?: boolean | undefined;
|
|
1046
1087
|
};
|
|
1047
|
-
} | ((request:
|
|
1088
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
1048
1089
|
wrappedBindings?: Record<string, string | {
|
|
1049
1090
|
scriptName: string;
|
|
1050
1091
|
entrypoint?: string | undefined;
|
|
@@ -1076,7 +1117,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1076
1117
|
path: string;
|
|
1077
1118
|
writable?: boolean | undefined;
|
|
1078
1119
|
};
|
|
1079
|
-
} | ((request:
|
|
1120
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
1080
1121
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
1081
1122
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
1082
1123
|
unsafeDirectSockets?: {
|
|
@@ -1087,6 +1128,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1087
1128
|
}[] | undefined;
|
|
1088
1129
|
unsafeEvalBinding?: string | undefined;
|
|
1089
1130
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
1131
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
1090
1132
|
}), ({
|
|
1091
1133
|
modules: {
|
|
1092
1134
|
type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
|
|
@@ -1149,7 +1191,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1149
1191
|
path: string;
|
|
1150
1192
|
writable?: boolean | undefined;
|
|
1151
1193
|
};
|
|
1152
|
-
} | ((request:
|
|
1194
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
1153
1195
|
wrappedBindings?: Record<string, string | {
|
|
1154
1196
|
scriptName: string;
|
|
1155
1197
|
entrypoint?: string | undefined;
|
|
@@ -1181,7 +1223,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1181
1223
|
path: string;
|
|
1182
1224
|
writable?: boolean | undefined;
|
|
1183
1225
|
};
|
|
1184
|
-
} | ((request:
|
|
1226
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
1185
1227
|
fetchMock?: MockAgent<MockAgent.Options> | undefined;
|
|
1186
1228
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
1187
1229
|
unsafeDirectSockets?: {
|
|
@@ -1192,6 +1234,7 @@ export declare const CoreOptionsSchema: z.ZodEffects<z.ZodIntersection<z.ZodUnio
|
|
|
1192
1234
|
}[] | undefined;
|
|
1193
1235
|
unsafeEvalBinding?: string | undefined;
|
|
1194
1236
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
1237
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
1195
1238
|
}>;
|
|
1196
1239
|
|
|
1197
1240
|
export declare const CoreSharedOptionsSchema: z.ZodObject<{
|
|
@@ -1211,7 +1254,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
|
|
|
1211
1254
|
cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
1212
1255
|
liveReload: z.ZodOptional<z.ZodBoolean>;
|
|
1213
1256
|
unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
|
|
1214
|
-
unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request:
|
|
1257
|
+
unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>>;
|
|
1215
1258
|
unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
|
|
1216
1259
|
}, "strip", z.ZodTypeAny, {
|
|
1217
1260
|
rootPath?: undefined;
|
|
@@ -1230,7 +1273,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
|
|
|
1230
1273
|
cf?: string | boolean | Record<string, any> | undefined;
|
|
1231
1274
|
liveReload?: boolean | undefined;
|
|
1232
1275
|
unsafeProxySharedSecret?: string | undefined;
|
|
1233
|
-
unsafeModuleFallbackService?: ((request:
|
|
1276
|
+
unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
1234
1277
|
unsafeStickyBlobs?: boolean | undefined;
|
|
1235
1278
|
}, {
|
|
1236
1279
|
rootPath?: string | undefined;
|
|
@@ -1249,7 +1292,7 @@ export declare const CoreSharedOptionsSchema: z.ZodObject<{
|
|
|
1249
1292
|
cf?: string | boolean | Record<string, any> | undefined;
|
|
1250
1293
|
liveReload?: boolean | undefined;
|
|
1251
1294
|
unsafeProxySharedSecret?: string | undefined;
|
|
1252
|
-
unsafeModuleFallbackService?: ((request:
|
|
1295
|
+
unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
1253
1296
|
unsafeStickyBlobs?: boolean | undefined;
|
|
1254
1297
|
}>;
|
|
1255
1298
|
|
|
@@ -1304,7 +1347,7 @@ export declare interface DiskDirectory {
|
|
|
1304
1347
|
writable?: boolean;
|
|
1305
1348
|
}
|
|
1306
1349
|
|
|
1307
|
-
export declare type DispatchFetch = (input: RequestInfo, init?:
|
|
1350
|
+
export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit_2<Partial<IncomingRequestCfProperties>>) => Promise<Response_2>;
|
|
1308
1351
|
|
|
1309
1352
|
/**
|
|
1310
1353
|
* Dispatcher created for each `dispatchFetch()` call. Ensures request origin
|
|
@@ -1442,7 +1485,8 @@ export declare interface ExternalServer_Tcp {
|
|
|
1442
1485
|
certificateHost?: string;
|
|
1443
1486
|
}
|
|
1444
1487
|
|
|
1445
|
-
|
|
1488
|
+
declare function fetch_2(input: RequestInfo, init?: RequestInit_2 | Request_2): Promise<Response_2>;
|
|
1489
|
+
export { fetch_2 as fetch }
|
|
1446
1490
|
|
|
1447
1491
|
export { File }
|
|
1448
1492
|
|
|
@@ -1450,7 +1494,7 @@ export declare function _forceColour(enabled?: boolean): void;
|
|
|
1450
1494
|
|
|
1451
1495
|
export declare function formatZodError(error: z.ZodError, input: unknown): string;
|
|
1452
1496
|
|
|
1453
|
-
export { FormData }
|
|
1497
|
+
export { FormData_2 as FormData }
|
|
1454
1498
|
|
|
1455
1499
|
export declare function getAccessibleHosts(ipv4Only?: boolean): string[];
|
|
1456
1500
|
|
|
@@ -1475,6 +1519,30 @@ export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fall
|
|
|
1475
1519
|
|
|
1476
1520
|
export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[];
|
|
1477
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* Computes the Node.js compatibility mode we are running.
|
|
1524
|
+
*
|
|
1525
|
+
* NOTES:
|
|
1526
|
+
* - The v2 mode is configured via `nodejs_compat_v2` compat flag or via `nodejs_compat` plus a compatibility date of Sept 23rd. 2024 or later.
|
|
1527
|
+
* - See `EnvironmentInheritable` for `nodeCompat` and `noBundle`.
|
|
1528
|
+
*
|
|
1529
|
+
* @param compatibilityDateStr The compatibility date
|
|
1530
|
+
* @param compatibilityFlags The compatibility flags
|
|
1531
|
+
* @param opts.nodeCompat Whether the legacy node_compat arg is being used
|
|
1532
|
+
* @returns the mode and flags to indicate specific configuration for validating.
|
|
1533
|
+
*/
|
|
1534
|
+
export declare function getNodeCompat(compatibilityDate: string | undefined, // Default to some arbitrary old date
|
|
1535
|
+
compatibilityFlags: string[], opts?: {
|
|
1536
|
+
nodeCompat?: boolean;
|
|
1537
|
+
}): {
|
|
1538
|
+
mode: NodeJSCompatMode;
|
|
1539
|
+
hasNodejsAlsFlag: boolean;
|
|
1540
|
+
hasNodejsCompatFlag: boolean;
|
|
1541
|
+
hasNodejsCompatV2Flag: boolean;
|
|
1542
|
+
hasNoNodejsCompatV2Flag: boolean;
|
|
1543
|
+
hasExperimentalNodejsCompatV2Flag: boolean;
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1478
1546
|
export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string;
|
|
1479
1547
|
|
|
1480
1548
|
export declare function getRootPath(opts: unknown): string;
|
|
@@ -1490,7 +1558,7 @@ export declare interface GlobalServicesOptions {
|
|
|
1490
1558
|
|
|
1491
1559
|
export declare function globsToRegExps(globs?: string[]): MatcherRegExps;
|
|
1492
1560
|
|
|
1493
|
-
export { Headers }
|
|
1561
|
+
export { Headers_2 as Headers }
|
|
1494
1562
|
|
|
1495
1563
|
export { HeadersInit }
|
|
1496
1564
|
|
|
@@ -1673,6 +1741,11 @@ export declare interface LogOptions {
|
|
|
1673
1741
|
suffix?: string;
|
|
1674
1742
|
}
|
|
1675
1743
|
|
|
1744
|
+
export declare type ManifestEntry = {
|
|
1745
|
+
pathHash: Uint8Array;
|
|
1746
|
+
contentHash: Uint8Array;
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1676
1749
|
export declare interface MatcherRegExps {
|
|
1677
1750
|
include: RegExp[];
|
|
1678
1751
|
exclude: RegExp[];
|
|
@@ -1691,12 +1764,13 @@ export declare function maybeParseURL(url: Persistence): URL | undefined;
|
|
|
1691
1764
|
*/
|
|
1692
1765
|
export declare function mergeWorkerOptions(a: Partial<WorkerOptions>, b: Partial<WorkerOptions>): Partial<WorkerOptions>;
|
|
1693
1766
|
|
|
1694
|
-
|
|
1767
|
+
declare class MessageEvent_2 extends Event {
|
|
1695
1768
|
readonly data: ArrayBuffer | string;
|
|
1696
1769
|
constructor(type: "message", init: {
|
|
1697
1770
|
data: ArrayBuffer | string;
|
|
1698
1771
|
});
|
|
1699
1772
|
}
|
|
1773
|
+
export { MessageEvent_2 as MessageEvent }
|
|
1700
1774
|
|
|
1701
1775
|
export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise<void>;
|
|
1702
1776
|
|
|
@@ -1795,7 +1869,18 @@ export declare interface Network {
|
|
|
1795
1869
|
tlsOptions?: TlsOptions;
|
|
1796
1870
|
}
|
|
1797
1871
|
|
|
1798
|
-
export declare const NODE_PLATFORM_IMPL: PlatformImpl<
|
|
1872
|
+
export declare const NODE_PLATFORM_IMPL: PlatformImpl<ReadableStream_3>;
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* We can provide Node.js compatibility in a number of different modes:
|
|
1876
|
+
* - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
|
|
1877
|
+
* - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`).
|
|
1878
|
+
* - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
|
|
1879
|
+
* - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
|
|
1880
|
+
* and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime.
|
|
1881
|
+
* - null - no Node.js compatibility.
|
|
1882
|
+
*/
|
|
1883
|
+
export declare type NodeJSCompatMode = "legacy" | "als" | "v1" | "v2" | null;
|
|
1799
1884
|
|
|
1800
1885
|
export declare class NoOpLog extends Log {
|
|
1801
1886
|
constructor();
|
|
@@ -1916,9 +2001,9 @@ export declare const PersistenceSchema: z.ZodOptional<z.ZodUnion<[z.ZodBoolean,
|
|
|
1916
2001
|
export declare interface PlatformImpl<RS> {
|
|
1917
2002
|
Blob: typeof Blob_2;
|
|
1918
2003
|
File: typeof File_2;
|
|
1919
|
-
Headers: typeof
|
|
1920
|
-
Request: typeof
|
|
1921
|
-
Response: typeof
|
|
2004
|
+
Headers: typeof Headers_3;
|
|
2005
|
+
Request: typeof Request_4;
|
|
2006
|
+
Response: typeof Response_4;
|
|
1922
2007
|
isReadableStream(value: unknown): value is RS;
|
|
1923
2008
|
bufferReadableStream(stream: RS): Promise<ArrayBuffer>;
|
|
1924
2009
|
unbufferReadableStream(buffer: ArrayBuffer): RS;
|
|
@@ -2191,7 +2276,7 @@ export declare const PLUGINS: {
|
|
|
2191
2276
|
path: string;
|
|
2192
2277
|
writable?: boolean | undefined;
|
|
2193
2278
|
};
|
|
2194
|
-
}>, z.ZodType<(request:
|
|
2279
|
+
}>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>>;
|
|
2195
2280
|
wrappedBindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2196
2281
|
scriptName: z.ZodString;
|
|
2197
2282
|
entrypoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2343,7 +2428,7 @@ export declare const PLUGINS: {
|
|
|
2343
2428
|
path: string;
|
|
2344
2429
|
writable?: boolean | undefined;
|
|
2345
2430
|
};
|
|
2346
|
-
}>, z.ZodType<(request:
|
|
2431
|
+
}>, z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>]>>;
|
|
2347
2432
|
fetchMock: z.ZodOptional<z.ZodType<MockAgent<MockAgent>, z.ZodTypeDef, MockAgent<MockAgent>>>;
|
|
2348
2433
|
unsafeEphemeralDurableObjects: z.ZodOptional<z.ZodBoolean>;
|
|
2349
2434
|
unsafeDirectSockets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2364,6 +2449,7 @@ export declare const PLUGINS: {
|
|
|
2364
2449
|
}>, "many">>;
|
|
2365
2450
|
unsafeEvalBinding: z.ZodOptional<z.ZodString>;
|
|
2366
2451
|
unsafeUseModuleFallbackService: z.ZodOptional<z.ZodBoolean>;
|
|
2452
|
+
hasAssetsAndIsVitest: z.ZodOptional<z.ZodBoolean>;
|
|
2367
2453
|
}, "strip", z.ZodTypeAny, {
|
|
2368
2454
|
name?: string | undefined;
|
|
2369
2455
|
rootPath?: undefined;
|
|
@@ -2400,7 +2486,7 @@ export declare const PLUGINS: {
|
|
|
2400
2486
|
path: string;
|
|
2401
2487
|
writable?: boolean | undefined;
|
|
2402
2488
|
};
|
|
2403
|
-
} | ((request:
|
|
2489
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2404
2490
|
wrappedBindings?: Record<string, string | {
|
|
2405
2491
|
scriptName: string;
|
|
2406
2492
|
entrypoint?: string | undefined;
|
|
@@ -2432,7 +2518,7 @@ export declare const PLUGINS: {
|
|
|
2432
2518
|
path: string;
|
|
2433
2519
|
writable?: boolean | undefined;
|
|
2434
2520
|
};
|
|
2435
|
-
} | ((request:
|
|
2521
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2436
2522
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2437
2523
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2438
2524
|
unsafeDirectSockets?: {
|
|
@@ -2443,6 +2529,7 @@ export declare const PLUGINS: {
|
|
|
2443
2529
|
}[] | undefined;
|
|
2444
2530
|
unsafeEvalBinding?: string | undefined;
|
|
2445
2531
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2532
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2446
2533
|
}, {
|
|
2447
2534
|
name?: string | undefined;
|
|
2448
2535
|
rootPath?: string | undefined;
|
|
@@ -2479,7 +2566,7 @@ export declare const PLUGINS: {
|
|
|
2479
2566
|
path: string;
|
|
2480
2567
|
writable?: boolean | undefined;
|
|
2481
2568
|
};
|
|
2482
|
-
} | ((request:
|
|
2569
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2483
2570
|
wrappedBindings?: Record<string, string | {
|
|
2484
2571
|
scriptName: string;
|
|
2485
2572
|
entrypoint?: string | undefined;
|
|
@@ -2511,7 +2598,7 @@ export declare const PLUGINS: {
|
|
|
2511
2598
|
path: string;
|
|
2512
2599
|
writable?: boolean | undefined;
|
|
2513
2600
|
};
|
|
2514
|
-
} | ((request:
|
|
2601
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2515
2602
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2516
2603
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2517
2604
|
unsafeDirectSockets?: {
|
|
@@ -2522,6 +2609,7 @@ export declare const PLUGINS: {
|
|
|
2522
2609
|
}[] | undefined;
|
|
2523
2610
|
unsafeEvalBinding?: string | undefined;
|
|
2524
2611
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2612
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2525
2613
|
}>>, ({
|
|
2526
2614
|
modules: {
|
|
2527
2615
|
type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
|
|
@@ -2565,7 +2653,7 @@ export declare const PLUGINS: {
|
|
|
2565
2653
|
path: string;
|
|
2566
2654
|
writable?: boolean | undefined;
|
|
2567
2655
|
};
|
|
2568
|
-
} | ((request:
|
|
2656
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2569
2657
|
wrappedBindings?: Record<string, string | {
|
|
2570
2658
|
scriptName: string;
|
|
2571
2659
|
entrypoint?: string | undefined;
|
|
@@ -2597,7 +2685,7 @@ export declare const PLUGINS: {
|
|
|
2597
2685
|
path: string;
|
|
2598
2686
|
writable?: boolean | undefined;
|
|
2599
2687
|
};
|
|
2600
|
-
} | ((request:
|
|
2688
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2601
2689
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2602
2690
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2603
2691
|
unsafeDirectSockets?: {
|
|
@@ -2608,6 +2696,7 @@ export declare const PLUGINS: {
|
|
|
2608
2696
|
}[] | undefined;
|
|
2609
2697
|
unsafeEvalBinding?: string | undefined;
|
|
2610
2698
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2699
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2611
2700
|
}) | ({
|
|
2612
2701
|
script: string;
|
|
2613
2702
|
scriptPath?: string | undefined;
|
|
@@ -2654,7 +2743,7 @@ export declare const PLUGINS: {
|
|
|
2654
2743
|
path: string;
|
|
2655
2744
|
writable?: boolean | undefined;
|
|
2656
2745
|
};
|
|
2657
|
-
} | ((request:
|
|
2746
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2658
2747
|
wrappedBindings?: Record<string, string | {
|
|
2659
2748
|
scriptName: string;
|
|
2660
2749
|
entrypoint?: string | undefined;
|
|
@@ -2686,7 +2775,7 @@ export declare const PLUGINS: {
|
|
|
2686
2775
|
path: string;
|
|
2687
2776
|
writable?: boolean | undefined;
|
|
2688
2777
|
};
|
|
2689
|
-
} | ((request:
|
|
2778
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2690
2779
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2691
2780
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2692
2781
|
unsafeDirectSockets?: {
|
|
@@ -2697,6 +2786,7 @@ export declare const PLUGINS: {
|
|
|
2697
2786
|
}[] | undefined;
|
|
2698
2787
|
unsafeEvalBinding?: string | undefined;
|
|
2699
2788
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2789
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2700
2790
|
}) | ({
|
|
2701
2791
|
scriptPath: string;
|
|
2702
2792
|
modules?: boolean | undefined;
|
|
@@ -2742,7 +2832,7 @@ export declare const PLUGINS: {
|
|
|
2742
2832
|
path: string;
|
|
2743
2833
|
writable?: boolean | undefined;
|
|
2744
2834
|
};
|
|
2745
|
-
} | ((request:
|
|
2835
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2746
2836
|
wrappedBindings?: Record<string, string | {
|
|
2747
2837
|
scriptName: string;
|
|
2748
2838
|
entrypoint?: string | undefined;
|
|
@@ -2774,7 +2864,7 @@ export declare const PLUGINS: {
|
|
|
2774
2864
|
path: string;
|
|
2775
2865
|
writable?: boolean | undefined;
|
|
2776
2866
|
};
|
|
2777
|
-
} | ((request:
|
|
2867
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2778
2868
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2779
2869
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2780
2870
|
unsafeDirectSockets?: {
|
|
@@ -2785,6 +2875,7 @@ export declare const PLUGINS: {
|
|
|
2785
2875
|
}[] | undefined;
|
|
2786
2876
|
unsafeEvalBinding?: string | undefined;
|
|
2787
2877
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2878
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2788
2879
|
}), ({
|
|
2789
2880
|
modules: {
|
|
2790
2881
|
type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement";
|
|
@@ -2847,7 +2938,7 @@ export declare const PLUGINS: {
|
|
|
2847
2938
|
path: string;
|
|
2848
2939
|
writable?: boolean | undefined;
|
|
2849
2940
|
};
|
|
2850
|
-
} | ((request:
|
|
2941
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>)> | undefined;
|
|
2851
2942
|
wrappedBindings?: Record<string, string | {
|
|
2852
2943
|
scriptName: string;
|
|
2853
2944
|
entrypoint?: string | undefined;
|
|
@@ -2879,7 +2970,7 @@ export declare const PLUGINS: {
|
|
|
2879
2970
|
path: string;
|
|
2880
2971
|
writable?: boolean | undefined;
|
|
2881
2972
|
};
|
|
2882
|
-
} | ((request:
|
|
2973
|
+
} | ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2883
2974
|
fetchMock?: MockAgent<MockAgent> | undefined;
|
|
2884
2975
|
unsafeEphemeralDurableObjects?: boolean | undefined;
|
|
2885
2976
|
unsafeDirectSockets?: {
|
|
@@ -2890,6 +2981,7 @@ export declare const PLUGINS: {
|
|
|
2890
2981
|
}[] | undefined;
|
|
2891
2982
|
unsafeEvalBinding?: string | undefined;
|
|
2892
2983
|
unsafeUseModuleFallbackService?: boolean | undefined;
|
|
2984
|
+
hasAssetsAndIsVitest?: boolean | undefined;
|
|
2893
2985
|
}>, z.ZodObject<{
|
|
2894
2986
|
rootPath: z.ZodOptional<z.ZodEffects<z.ZodString, undefined, string>>;
|
|
2895
2987
|
host: z.ZodOptional<z.ZodString>;
|
|
@@ -2907,7 +2999,7 @@ export declare const PLUGINS: {
|
|
|
2907
2999
|
cf: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
2908
3000
|
liveReload: z.ZodOptional<z.ZodBoolean>;
|
|
2909
3001
|
unsafeProxySharedSecret: z.ZodOptional<z.ZodString>;
|
|
2910
|
-
unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request:
|
|
3002
|
+
unsafeModuleFallbackService: z.ZodOptional<z.ZodType<(request: Request_2, mf: Miniflare) => Awaitable<Response_2>, z.ZodTypeDef, (request: Request_2, mf: Miniflare) => Awaitable<Response_2>>>;
|
|
2911
3003
|
unsafeStickyBlobs: z.ZodOptional<z.ZodBoolean>;
|
|
2912
3004
|
}, "strip", z.ZodTypeAny, {
|
|
2913
3005
|
rootPath?: undefined;
|
|
@@ -2926,7 +3018,7 @@ export declare const PLUGINS: {
|
|
|
2926
3018
|
cf?: string | boolean | Record<string, any> | undefined;
|
|
2927
3019
|
liveReload?: boolean | undefined;
|
|
2928
3020
|
unsafeProxySharedSecret?: string | undefined;
|
|
2929
|
-
unsafeModuleFallbackService?: ((request:
|
|
3021
|
+
unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2930
3022
|
unsafeStickyBlobs?: boolean | undefined;
|
|
2931
3023
|
}, {
|
|
2932
3024
|
rootPath?: string | undefined;
|
|
@@ -2945,7 +3037,7 @@ export declare const PLUGINS: {
|
|
|
2945
3037
|
cf?: string | boolean | Record<string, any> | undefined;
|
|
2946
3038
|
liveReload?: boolean | undefined;
|
|
2947
3039
|
unsafeProxySharedSecret?: string | undefined;
|
|
2948
|
-
unsafeModuleFallbackService?: ((request:
|
|
3040
|
+
unsafeModuleFallbackService?: ((request: Request_2, mf: Miniflare) => Awaitable<Response_2>) | undefined;
|
|
2949
3041
|
unsafeStickyBlobs?: boolean | undefined;
|
|
2950
3042
|
}>>;
|
|
2951
3043
|
cache: Plugin<z.ZodObject<{
|
|
@@ -3053,22 +3145,39 @@ export declare const PLUGINS: {
|
|
|
3053
3145
|
queueName: string;
|
|
3054
3146
|
deliveryDelay?: number | undefined;
|
|
3055
3147
|
}>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
3056
|
-
queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3148
|
+
queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
3057
3149
|
maxBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
3058
3150
|
maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3059
3151
|
maxRetires: z.ZodOptional<z.ZodNumber>;
|
|
3152
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
3060
3153
|
deadLetterQueue: z.ZodOptional<z.ZodString>;
|
|
3061
3154
|
retryDelay: z.ZodOptional<z.ZodNumber>;
|
|
3062
3155
|
}, "strip", z.ZodTypeAny, {
|
|
3063
3156
|
maxBatchSize?: number | undefined;
|
|
3064
3157
|
maxBatchTimeout?: number | undefined;
|
|
3065
3158
|
maxRetires?: number | undefined;
|
|
3159
|
+
maxRetries?: number | undefined;
|
|
3066
3160
|
deadLetterQueue?: string | undefined;
|
|
3067
3161
|
retryDelay?: number | undefined;
|
|
3068
3162
|
}, {
|
|
3069
3163
|
maxBatchSize?: number | undefined;
|
|
3070
3164
|
maxBatchTimeout?: number | undefined;
|
|
3071
3165
|
maxRetires?: number | undefined;
|
|
3166
|
+
maxRetries?: number | undefined;
|
|
3167
|
+
deadLetterQueue?: string | undefined;
|
|
3168
|
+
retryDelay?: number | undefined;
|
|
3169
|
+
}>, Omit<{
|
|
3170
|
+
maxBatchSize?: number | undefined;
|
|
3171
|
+
maxBatchTimeout?: number | undefined;
|
|
3172
|
+
maxRetires?: number | undefined;
|
|
3173
|
+
maxRetries?: number | undefined;
|
|
3174
|
+
deadLetterQueue?: string | undefined;
|
|
3175
|
+
retryDelay?: number | undefined;
|
|
3176
|
+
}, "maxRetires">, {
|
|
3177
|
+
maxBatchSize?: number | undefined;
|
|
3178
|
+
maxBatchTimeout?: number | undefined;
|
|
3179
|
+
maxRetires?: number | undefined;
|
|
3180
|
+
maxRetries?: number | undefined;
|
|
3072
3181
|
deadLetterQueue?: string | undefined;
|
|
3073
3182
|
retryDelay?: number | undefined;
|
|
3074
3183
|
}>>, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -3077,13 +3186,14 @@ export declare const PLUGINS: {
|
|
|
3077
3186
|
queueName: string;
|
|
3078
3187
|
deliveryDelay?: number | undefined;
|
|
3079
3188
|
}> | undefined;
|
|
3080
|
-
queueConsumers?: string[] | Record<string, {
|
|
3189
|
+
queueConsumers?: string[] | Record<string, Omit<{
|
|
3081
3190
|
maxBatchSize?: number | undefined;
|
|
3082
3191
|
maxBatchTimeout?: number | undefined;
|
|
3083
3192
|
maxRetires?: number | undefined;
|
|
3193
|
+
maxRetries?: number | undefined;
|
|
3084
3194
|
deadLetterQueue?: string | undefined;
|
|
3085
3195
|
retryDelay?: number | undefined;
|
|
3086
|
-
}
|
|
3196
|
+
}, "maxRetires">> | undefined;
|
|
3087
3197
|
}, {
|
|
3088
3198
|
queueProducers?: string[] | Record<string, string> | Record<string, {
|
|
3089
3199
|
queueName: string;
|
|
@@ -3093,6 +3203,7 @@ export declare const PLUGINS: {
|
|
|
3093
3203
|
maxBatchSize?: number | undefined;
|
|
3094
3204
|
maxBatchTimeout?: number | undefined;
|
|
3095
3205
|
maxRetires?: number | undefined;
|
|
3206
|
+
maxRetries?: number | undefined;
|
|
3096
3207
|
deadLetterQueue?: string | undefined;
|
|
3097
3208
|
retryDelay?: number | undefined;
|
|
3098
3209
|
}> | undefined;
|
|
@@ -3158,75 +3269,122 @@ export declare const PLUGINS: {
|
|
|
3158
3269
|
assets: Plugin<z.ZodObject<{
|
|
3159
3270
|
assets: z.ZodOptional<z.ZodObject<{
|
|
3160
3271
|
workerName: z.ZodOptional<z.ZodString>;
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
routingConfig: z.ZodObject<{
|
|
3272
|
+
directory: z.ZodEffects<z.ZodString, string, string>;
|
|
3273
|
+
binding: z.ZodOptional<z.ZodString>;
|
|
3274
|
+
routingConfig: z.ZodOptional<z.ZodObject<{
|
|
3164
3275
|
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
|
3276
|
+
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
|
3165
3277
|
}, "strip", z.ZodTypeAny, {
|
|
3166
3278
|
has_user_worker?: boolean;
|
|
3279
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3167
3280
|
}, {
|
|
3168
3281
|
has_user_worker?: boolean;
|
|
3169
|
-
|
|
3170
|
-
|
|
3282
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3283
|
+
}>>;
|
|
3284
|
+
assetConfig: z.ZodOptional<z.ZodObject<{
|
|
3171
3285
|
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
|
3172
3286
|
not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
|
|
3287
|
+
serve_directly: z.ZodOptional<z.ZodBoolean>;
|
|
3173
3288
|
}, "strip", z.ZodTypeAny, {
|
|
3174
3289
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3175
3290
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3291
|
+
serve_directly?: boolean;
|
|
3176
3292
|
}, {
|
|
3177
3293
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3178
3294
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3179
|
-
|
|
3295
|
+
serve_directly?: boolean;
|
|
3296
|
+
}>>;
|
|
3180
3297
|
}, "strip", z.ZodTypeAny, {
|
|
3181
|
-
|
|
3182
|
-
|
|
3298
|
+
directory: string;
|
|
3299
|
+
workerName?: string | undefined;
|
|
3300
|
+
binding?: string | undefined;
|
|
3301
|
+
routingConfig?: {
|
|
3183
3302
|
has_user_worker?: boolean;
|
|
3184
|
-
|
|
3185
|
-
|
|
3303
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3304
|
+
} | undefined;
|
|
3305
|
+
assetConfig?: {
|
|
3186
3306
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3187
3307
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
bindingName?: string | undefined;
|
|
3308
|
+
serve_directly?: boolean;
|
|
3309
|
+
} | undefined;
|
|
3191
3310
|
}, {
|
|
3192
|
-
|
|
3193
|
-
|
|
3311
|
+
directory: string;
|
|
3312
|
+
workerName?: string | undefined;
|
|
3313
|
+
binding?: string | undefined;
|
|
3314
|
+
routingConfig?: {
|
|
3194
3315
|
has_user_worker?: boolean;
|
|
3195
|
-
|
|
3196
|
-
|
|
3316
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3317
|
+
} | undefined;
|
|
3318
|
+
assetConfig?: {
|
|
3197
3319
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3198
3320
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
bindingName?: string | undefined;
|
|
3321
|
+
serve_directly?: boolean;
|
|
3322
|
+
} | undefined;
|
|
3202
3323
|
}>>;
|
|
3203
3324
|
}, "strip", z.ZodTypeAny, {
|
|
3204
3325
|
assets?: {
|
|
3205
|
-
|
|
3206
|
-
|
|
3326
|
+
directory: string;
|
|
3327
|
+
workerName?: string | undefined;
|
|
3328
|
+
binding?: string | undefined;
|
|
3329
|
+
routingConfig?: {
|
|
3207
3330
|
has_user_worker?: boolean;
|
|
3208
|
-
|
|
3209
|
-
|
|
3331
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3332
|
+
} | undefined;
|
|
3333
|
+
assetConfig?: {
|
|
3210
3334
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3211
3335
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
bindingName?: string | undefined;
|
|
3336
|
+
serve_directly?: boolean;
|
|
3337
|
+
} | undefined;
|
|
3215
3338
|
} | undefined;
|
|
3216
3339
|
}, {
|
|
3217
3340
|
assets?: {
|
|
3218
|
-
|
|
3219
|
-
|
|
3341
|
+
directory: string;
|
|
3342
|
+
workerName?: string | undefined;
|
|
3343
|
+
binding?: string | undefined;
|
|
3344
|
+
routingConfig?: {
|
|
3220
3345
|
has_user_worker?: boolean;
|
|
3221
|
-
|
|
3222
|
-
|
|
3346
|
+
invoke_user_worker_ahead_of_assets?: boolean;
|
|
3347
|
+
} | undefined;
|
|
3348
|
+
assetConfig?: {
|
|
3223
3349
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3224
3350
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
bindingName?: string | undefined;
|
|
3351
|
+
serve_directly?: boolean;
|
|
3352
|
+
} | undefined;
|
|
3228
3353
|
} | undefined;
|
|
3229
3354
|
}>>;
|
|
3355
|
+
workflows: Plugin<z.ZodObject<{
|
|
3356
|
+
workflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3357
|
+
name: z.ZodString;
|
|
3358
|
+
className: z.ZodString;
|
|
3359
|
+
scriptName: z.ZodOptional<z.ZodString>;
|
|
3360
|
+
}, "strip", z.ZodTypeAny, {
|
|
3361
|
+
name: string;
|
|
3362
|
+
className: string;
|
|
3363
|
+
scriptName?: string | undefined;
|
|
3364
|
+
}, {
|
|
3365
|
+
name: string;
|
|
3366
|
+
className: string;
|
|
3367
|
+
scriptName?: string | undefined;
|
|
3368
|
+
}>>>;
|
|
3369
|
+
}, "strip", z.ZodTypeAny, {
|
|
3370
|
+
workflows?: Record<string, {
|
|
3371
|
+
name: string;
|
|
3372
|
+
className: string;
|
|
3373
|
+
scriptName?: string | undefined;
|
|
3374
|
+
}> | undefined;
|
|
3375
|
+
}, {
|
|
3376
|
+
workflows?: Record<string, {
|
|
3377
|
+
name: string;
|
|
3378
|
+
className: string;
|
|
3379
|
+
scriptName?: string | undefined;
|
|
3380
|
+
}> | undefined;
|
|
3381
|
+
}>, z.ZodObject<{
|
|
3382
|
+
workflowsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
3383
|
+
}, "strip", z.ZodTypeAny, {
|
|
3384
|
+
workflowsPersist?: string | boolean | undefined;
|
|
3385
|
+
}, {
|
|
3386
|
+
workflowsPersist?: string | boolean | undefined;
|
|
3387
|
+
}>>;
|
|
3230
3388
|
};
|
|
3231
3389
|
|
|
3232
3390
|
export declare type Plugins = typeof PLUGINS;
|
|
@@ -3251,7 +3409,7 @@ export declare interface PluginServicesOptions<Options extends z.ZodType, Shared
|
|
|
3251
3409
|
|
|
3252
3410
|
export declare function prefixError(prefix: string, e: any): Error;
|
|
3253
3411
|
|
|
3254
|
-
export declare function prefixStream(prefix: Uint8Array, stream:
|
|
3412
|
+
export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_3<Uint8Array>): ReadableStream_3<Uint8Array>;
|
|
3255
3413
|
|
|
3256
3414
|
export declare const ProxyAddresses: {
|
|
3257
3415
|
readonly GLOBAL: 0;
|
|
@@ -3290,44 +3448,78 @@ export declare const QueueBindings: {
|
|
|
3290
3448
|
|
|
3291
3449
|
export declare type QueueConsumer = z.infer<typeof QueueConsumerSchema>;
|
|
3292
3450
|
|
|
3293
|
-
export declare const QueueConsumerOptionsSchema: z.ZodObject<{
|
|
3451
|
+
export declare const QueueConsumerOptionsSchema: z.ZodEffects<z.ZodObject<{
|
|
3294
3452
|
maxBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
3295
3453
|
maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3296
3454
|
maxRetires: z.ZodOptional<z.ZodNumber>;
|
|
3455
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
3297
3456
|
deadLetterQueue: z.ZodOptional<z.ZodString>;
|
|
3298
3457
|
retryDelay: z.ZodOptional<z.ZodNumber>;
|
|
3299
3458
|
}, "strip", z.ZodTypeAny, {
|
|
3300
3459
|
maxBatchSize?: number | undefined;
|
|
3301
3460
|
maxBatchTimeout?: number | undefined;
|
|
3302
3461
|
maxRetires?: number | undefined;
|
|
3462
|
+
maxRetries?: number | undefined;
|
|
3303
3463
|
deadLetterQueue?: string | undefined;
|
|
3304
3464
|
retryDelay?: number | undefined;
|
|
3305
3465
|
}, {
|
|
3306
3466
|
maxBatchSize?: number | undefined;
|
|
3307
3467
|
maxBatchTimeout?: number | undefined;
|
|
3308
3468
|
maxRetires?: number | undefined;
|
|
3469
|
+
maxRetries?: number | undefined;
|
|
3470
|
+
deadLetterQueue?: string | undefined;
|
|
3471
|
+
retryDelay?: number | undefined;
|
|
3472
|
+
}>, Omit<{
|
|
3473
|
+
maxBatchSize?: number | undefined;
|
|
3474
|
+
maxBatchTimeout?: number | undefined;
|
|
3475
|
+
maxRetires?: number | undefined;
|
|
3476
|
+
maxRetries?: number | undefined;
|
|
3477
|
+
deadLetterQueue?: string | undefined;
|
|
3478
|
+
retryDelay?: number | undefined;
|
|
3479
|
+
}, "maxRetires">, {
|
|
3480
|
+
maxBatchSize?: number | undefined;
|
|
3481
|
+
maxBatchTimeout?: number | undefined;
|
|
3482
|
+
maxRetires?: number | undefined;
|
|
3483
|
+
maxRetries?: number | undefined;
|
|
3309
3484
|
deadLetterQueue?: string | undefined;
|
|
3310
3485
|
retryDelay?: number | undefined;
|
|
3311
3486
|
}>;
|
|
3312
3487
|
|
|
3313
3488
|
export declare type QueueConsumers = Map<string, z.infer<typeof QueueConsumerSchema>>;
|
|
3314
3489
|
|
|
3315
|
-
export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
|
|
3490
|
+
export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
3316
3491
|
maxBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
3317
3492
|
maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3318
3493
|
maxRetires: z.ZodOptional<z.ZodNumber>;
|
|
3494
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
3319
3495
|
deadLetterQueue: z.ZodOptional<z.ZodString>;
|
|
3320
3496
|
retryDelay: z.ZodOptional<z.ZodNumber>;
|
|
3321
3497
|
}, "strip", z.ZodTypeAny, {
|
|
3322
3498
|
maxBatchSize?: number | undefined;
|
|
3323
3499
|
maxBatchTimeout?: number | undefined;
|
|
3324
3500
|
maxRetires?: number | undefined;
|
|
3501
|
+
maxRetries?: number | undefined;
|
|
3325
3502
|
deadLetterQueue?: string | undefined;
|
|
3326
3503
|
retryDelay?: number | undefined;
|
|
3327
3504
|
}, {
|
|
3328
3505
|
maxBatchSize?: number | undefined;
|
|
3329
3506
|
maxBatchTimeout?: number | undefined;
|
|
3330
3507
|
maxRetires?: number | undefined;
|
|
3508
|
+
maxRetries?: number | undefined;
|
|
3509
|
+
deadLetterQueue?: string | undefined;
|
|
3510
|
+
retryDelay?: number | undefined;
|
|
3511
|
+
}>, Omit<{
|
|
3512
|
+
maxBatchSize?: number | undefined;
|
|
3513
|
+
maxBatchTimeout?: number | undefined;
|
|
3514
|
+
maxRetires?: number | undefined;
|
|
3515
|
+
maxRetries?: number | undefined;
|
|
3516
|
+
deadLetterQueue?: string | undefined;
|
|
3517
|
+
retryDelay?: number | undefined;
|
|
3518
|
+
}, "maxRetires">, {
|
|
3519
|
+
maxBatchSize?: number | undefined;
|
|
3520
|
+
maxBatchTimeout?: number | undefined;
|
|
3521
|
+
maxRetires?: number | undefined;
|
|
3522
|
+
maxRetries?: number | undefined;
|
|
3331
3523
|
deadLetterQueue?: string | undefined;
|
|
3332
3524
|
retryDelay?: number | undefined;
|
|
3333
3525
|
}>, z.ZodObject<{
|
|
@@ -3338,22 +3530,39 @@ export declare const QueueConsumerSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
3338
3530
|
workerName: string;
|
|
3339
3531
|
}>>;
|
|
3340
3532
|
|
|
3341
|
-
export declare const QueueConsumersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
3533
|
+
export declare const QueueConsumersSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
3342
3534
|
maxBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
3343
3535
|
maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3344
3536
|
maxRetires: z.ZodOptional<z.ZodNumber>;
|
|
3537
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
3345
3538
|
deadLetterQueue: z.ZodOptional<z.ZodString>;
|
|
3346
3539
|
retryDelay: z.ZodOptional<z.ZodNumber>;
|
|
3347
3540
|
}, "strip", z.ZodTypeAny, {
|
|
3348
3541
|
maxBatchSize?: number | undefined;
|
|
3349
3542
|
maxBatchTimeout?: number | undefined;
|
|
3350
3543
|
maxRetires?: number | undefined;
|
|
3544
|
+
maxRetries?: number | undefined;
|
|
3351
3545
|
deadLetterQueue?: string | undefined;
|
|
3352
3546
|
retryDelay?: number | undefined;
|
|
3353
3547
|
}, {
|
|
3354
3548
|
maxBatchSize?: number | undefined;
|
|
3355
3549
|
maxBatchTimeout?: number | undefined;
|
|
3356
3550
|
maxRetires?: number | undefined;
|
|
3551
|
+
maxRetries?: number | undefined;
|
|
3552
|
+
deadLetterQueue?: string | undefined;
|
|
3553
|
+
retryDelay?: number | undefined;
|
|
3554
|
+
}>, Omit<{
|
|
3555
|
+
maxBatchSize?: number | undefined;
|
|
3556
|
+
maxBatchTimeout?: number | undefined;
|
|
3557
|
+
maxRetires?: number | undefined;
|
|
3558
|
+
maxRetries?: number | undefined;
|
|
3559
|
+
deadLetterQueue?: string | undefined;
|
|
3560
|
+
retryDelay?: number | undefined;
|
|
3561
|
+
}, "maxRetires">, {
|
|
3562
|
+
maxBatchSize?: number | undefined;
|
|
3563
|
+
maxBatchTimeout?: number | undefined;
|
|
3564
|
+
maxRetires?: number | undefined;
|
|
3565
|
+
maxRetries?: number | undefined;
|
|
3357
3566
|
deadLetterQueue?: string | undefined;
|
|
3358
3567
|
retryDelay?: number | undefined;
|
|
3359
3568
|
}>, z.ZodObject<{
|
|
@@ -3503,22 +3712,39 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
|
|
|
3503
3712
|
queueName: string;
|
|
3504
3713
|
deliveryDelay?: number | undefined;
|
|
3505
3714
|
}>>, z.ZodArray<z.ZodString, "many">, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
3506
|
-
queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3715
|
+
queueConsumers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
3507
3716
|
maxBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
3508
3717
|
maxBatchTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3509
3718
|
maxRetires: z.ZodOptional<z.ZodNumber>;
|
|
3719
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
3510
3720
|
deadLetterQueue: z.ZodOptional<z.ZodString>;
|
|
3511
3721
|
retryDelay: z.ZodOptional<z.ZodNumber>;
|
|
3512
3722
|
}, "strip", z.ZodTypeAny, {
|
|
3513
3723
|
maxBatchSize?: number | undefined;
|
|
3514
3724
|
maxBatchTimeout?: number | undefined;
|
|
3515
3725
|
maxRetires?: number | undefined;
|
|
3726
|
+
maxRetries?: number | undefined;
|
|
3516
3727
|
deadLetterQueue?: string | undefined;
|
|
3517
3728
|
retryDelay?: number | undefined;
|
|
3518
3729
|
}, {
|
|
3519
3730
|
maxBatchSize?: number | undefined;
|
|
3520
3731
|
maxBatchTimeout?: number | undefined;
|
|
3521
3732
|
maxRetires?: number | undefined;
|
|
3733
|
+
maxRetries?: number | undefined;
|
|
3734
|
+
deadLetterQueue?: string | undefined;
|
|
3735
|
+
retryDelay?: number | undefined;
|
|
3736
|
+
}>, Omit<{
|
|
3737
|
+
maxBatchSize?: number | undefined;
|
|
3738
|
+
maxBatchTimeout?: number | undefined;
|
|
3739
|
+
maxRetires?: number | undefined;
|
|
3740
|
+
maxRetries?: number | undefined;
|
|
3741
|
+
deadLetterQueue?: string | undefined;
|
|
3742
|
+
retryDelay?: number | undefined;
|
|
3743
|
+
}, "maxRetires">, {
|
|
3744
|
+
maxBatchSize?: number | undefined;
|
|
3745
|
+
maxBatchTimeout?: number | undefined;
|
|
3746
|
+
maxRetires?: number | undefined;
|
|
3747
|
+
maxRetries?: number | undefined;
|
|
3522
3748
|
deadLetterQueue?: string | undefined;
|
|
3523
3749
|
retryDelay?: number | undefined;
|
|
3524
3750
|
}>>, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -3527,13 +3753,14 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
|
|
|
3527
3753
|
queueName: string;
|
|
3528
3754
|
deliveryDelay?: number | undefined;
|
|
3529
3755
|
}> | undefined;
|
|
3530
|
-
queueConsumers?: string[] | Record<string, {
|
|
3756
|
+
queueConsumers?: string[] | Record<string, Omit<{
|
|
3531
3757
|
maxBatchSize?: number | undefined;
|
|
3532
3758
|
maxBatchTimeout?: number | undefined;
|
|
3533
3759
|
maxRetires?: number | undefined;
|
|
3760
|
+
maxRetries?: number | undefined;
|
|
3534
3761
|
deadLetterQueue?: string | undefined;
|
|
3535
3762
|
retryDelay?: number | undefined;
|
|
3536
|
-
}
|
|
3763
|
+
}, "maxRetires">> | undefined;
|
|
3537
3764
|
}, {
|
|
3538
3765
|
queueProducers?: string[] | Record<string, string> | Record<string, {
|
|
3539
3766
|
queueName: string;
|
|
@@ -3543,6 +3770,7 @@ export declare const QueuesOptionsSchema: z.ZodObject<{
|
|
|
3543
3770
|
maxBatchSize?: number | undefined;
|
|
3544
3771
|
maxBatchTimeout?: number | undefined;
|
|
3545
3772
|
maxRetires?: number | undefined;
|
|
3773
|
+
maxRetries?: number | undefined;
|
|
3546
3774
|
deadLetterQueue?: string | undefined;
|
|
3547
3775
|
retryDelay?: number | undefined;
|
|
3548
3776
|
}> | undefined;
|
|
@@ -3636,7 +3864,7 @@ export declare const RatelimitOptionsSchema: z.ZodObject<{
|
|
|
3636
3864
|
}> | undefined;
|
|
3637
3865
|
}>;
|
|
3638
3866
|
|
|
3639
|
-
export declare function readPrefix(stream:
|
|
3867
|
+
export declare function readPrefix(stream: ReadableStream_3<Uint8Array>, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_3<Uint8Array>]>;
|
|
3640
3868
|
|
|
3641
3869
|
export declare function reduceError(e: any): JsonError;
|
|
3642
3870
|
|
|
@@ -3646,17 +3874,18 @@ export declare type ReducersRevivers = Record<string, ReducerReviver>;
|
|
|
3646
3874
|
|
|
3647
3875
|
export { ReferrerPolicy }
|
|
3648
3876
|
|
|
3649
|
-
export declare type ReplaceWorkersTypes<T> = T extends
|
|
3877
|
+
export declare type ReplaceWorkersTypes<T> = T extends Request_4 ? Request_2 : T extends Response_4 ? Response_2 : T extends ReadableStream_2 ? ReadableStream_3 : Required<T> extends Required<RequestInit_4> ? RequestInit_2 : T extends Headers_3 ? Headers_2 : T extends Blob_2 ? Blob_3 : T extends AbortSignal_2 ? AbortSignal : T extends Promise<infer P> ? Promise<ReplaceWorkersTypes<P>> : T extends (...args: infer P) => infer R ? (...args: ReplaceWorkersTypes<P>) => ReplaceWorkersTypes<R> : T extends object ? {
|
|
3650
3878
|
[K in keyof T]: OverloadReplaceWorkersTypes<T[K]>;
|
|
3651
3879
|
} : T;
|
|
3652
3880
|
|
|
3653
|
-
|
|
3881
|
+
declare class Request_2<CfType extends RequestInitCfType = RequestInitCfType> extends Request_3 {
|
|
3654
3882
|
[kCf]?: CfType;
|
|
3655
|
-
constructor(input: RequestInfo, init?:
|
|
3883
|
+
constructor(input: RequestInfo, init?: RequestInit_2<CfType>);
|
|
3656
3884
|
get cf(): CfType | undefined;
|
|
3657
3885
|
/** @ts-expect-error `clone` is actually defined as a method internally */
|
|
3658
|
-
clone():
|
|
3886
|
+
clone(): Request_2<CfType>;
|
|
3659
3887
|
}
|
|
3888
|
+
export { Request_2 as Request }
|
|
3660
3889
|
|
|
3661
3890
|
export { RequestCache }
|
|
3662
3891
|
|
|
@@ -3666,11 +3895,12 @@ export { RequestDestination }
|
|
|
3666
3895
|
|
|
3667
3896
|
export { RequestDuplex }
|
|
3668
3897
|
|
|
3669
|
-
export declare type RequestInfo = RequestInfo_2 |
|
|
3898
|
+
export declare type RequestInfo = RequestInfo_2 | Request_2;
|
|
3670
3899
|
|
|
3671
|
-
|
|
3900
|
+
declare interface RequestInit_2<CfType extends RequestInitCfType = RequestInitCfType> extends RequestInit_3 {
|
|
3672
3901
|
cf?: CfType;
|
|
3673
3902
|
}
|
|
3903
|
+
export { RequestInit_2 as RequestInit }
|
|
3674
3904
|
|
|
3675
3905
|
export declare type RequestInitCfType = Partial<IncomingRequestCfProperties> | RequestInitCfProperties;
|
|
3676
3906
|
|
|
@@ -3678,22 +3908,24 @@ export { RequestMode }
|
|
|
3678
3908
|
|
|
3679
3909
|
export { RequestRedirect }
|
|
3680
3910
|
|
|
3681
|
-
|
|
3911
|
+
declare class Response_2 extends Response_3 {
|
|
3682
3912
|
readonly [kWebSocket]: WebSocket | null;
|
|
3683
|
-
static error():
|
|
3684
|
-
static redirect(url: string | URL, status: ResponseRedirectStatus):
|
|
3685
|
-
static json(data: any, init?:
|
|
3686
|
-
constructor(body?: BodyInit, init?:
|
|
3913
|
+
static error(): Response_2;
|
|
3914
|
+
static redirect(url: string | URL, status: ResponseRedirectStatus): Response_2;
|
|
3915
|
+
static json(data: any, init?: ResponseInit_2): Response_2;
|
|
3916
|
+
constructor(body?: BodyInit, init?: ResponseInit_2);
|
|
3687
3917
|
/** @ts-expect-error `status` is actually defined as a getter internally */
|
|
3688
3918
|
get status(): number;
|
|
3689
3919
|
get webSocket(): WebSocket | null;
|
|
3690
3920
|
/** @ts-expect-error `clone` is actually defined as a method internally */
|
|
3691
|
-
clone():
|
|
3921
|
+
clone(): Response_2;
|
|
3692
3922
|
}
|
|
3923
|
+
export { Response_2 as Response }
|
|
3693
3924
|
|
|
3694
|
-
|
|
3925
|
+
declare interface ResponseInit_2 extends ResponseInit_3 {
|
|
3695
3926
|
webSocket?: WebSocket | null;
|
|
3696
3927
|
}
|
|
3928
|
+
export { ResponseInit_2 as ResponseInit }
|
|
3697
3929
|
|
|
3698
3930
|
export { ResponseRedirectStatus }
|
|
3699
3931
|
|
|
@@ -3776,7 +4008,7 @@ export declare const SharedHeaders: {
|
|
|
3776
4008
|
readonly LOG_LEVEL: "MF-Log-Level";
|
|
3777
4009
|
};
|
|
3778
4010
|
|
|
3779
|
-
export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions>;
|
|
4011
|
+
export declare type SharedOptions = z.input<typeof CORE_PLUGIN.sharedOptions> & z.input<typeof CACHE_PLUGIN.sharedOptions> & z.input<typeof D1_PLUGIN.sharedOptions> & z.input<typeof DURABLE_OBJECTS_PLUGIN.sharedOptions> & z.input<typeof KV_PLUGIN.sharedOptions> & z.input<typeof R2_PLUGIN.sharedOptions> & z.input<typeof WORKFLOWS_PLUGIN.sharedOptions>;
|
|
3780
4012
|
|
|
3781
4013
|
export declare const SiteBindings: {
|
|
3782
4014
|
readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT";
|
|
@@ -4013,7 +4245,7 @@ export declare class WebSocket extends TypedEventTarget<WebSocketEventMap> {
|
|
|
4013
4245
|
}
|
|
4014
4246
|
|
|
4015
4247
|
export declare type WebSocketEventMap = {
|
|
4016
|
-
message:
|
|
4248
|
+
message: MessageEvent_2;
|
|
4017
4249
|
close: CloseEvent;
|
|
4018
4250
|
error: ErrorEvent;
|
|
4019
4251
|
};
|
|
@@ -4223,7 +4455,7 @@ export declare type Worker_Module = {
|
|
|
4223
4455
|
pythonRequirement?: string;
|
|
4224
4456
|
});
|
|
4225
4457
|
|
|
4226
|
-
export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options>;
|
|
4458
|
+
export declare type WorkerOptions = z.input<typeof CORE_PLUGIN.options> & z.input<typeof CACHE_PLUGIN.options> & z.input<typeof D1_PLUGIN.options> & z.input<typeof DURABLE_OBJECTS_PLUGIN.options> & z.input<typeof KV_PLUGIN.options> & z.input<typeof QUEUES_PLUGIN.options> & z.input<typeof R2_PLUGIN.options> & z.input<typeof HYPERDRIVE_PLUGIN.options> & z.input<typeof RATELIMIT_PLUGIN.options> & z.input<typeof ASSETS_PLUGIN.options> & z.input<typeof WORKFLOWS_PLUGIN.options>;
|
|
4227
4459
|
|
|
4228
4460
|
export declare interface WorkerRoute {
|
|
4229
4461
|
target: string;
|
|
@@ -4236,6 +4468,48 @@ export declare interface WorkerRoute {
|
|
|
4236
4468
|
allowPathSuffix: boolean;
|
|
4237
4469
|
}
|
|
4238
4470
|
|
|
4471
|
+
export declare const WORKFLOWS_PLUGIN: Plugin<typeof WorkflowsOptionsSchema, typeof WorkflowsSharedOptionsSchema>;
|
|
4472
|
+
|
|
4473
|
+
export declare const WORKFLOWS_PLUGIN_NAME = "workflows";
|
|
4474
|
+
|
|
4475
|
+
export declare const WORKFLOWS_STORAGE_SERVICE_NAME = "workflows:storage";
|
|
4476
|
+
|
|
4477
|
+
export declare const WorkflowsOptionsSchema: z.ZodObject<{
|
|
4478
|
+
workflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4479
|
+
name: z.ZodString;
|
|
4480
|
+
className: z.ZodString;
|
|
4481
|
+
scriptName: z.ZodOptional<z.ZodString>;
|
|
4482
|
+
}, "strip", z.ZodTypeAny, {
|
|
4483
|
+
name: string;
|
|
4484
|
+
className: string;
|
|
4485
|
+
scriptName?: string | undefined;
|
|
4486
|
+
}, {
|
|
4487
|
+
name: string;
|
|
4488
|
+
className: string;
|
|
4489
|
+
scriptName?: string | undefined;
|
|
4490
|
+
}>>>;
|
|
4491
|
+
}, "strip", z.ZodTypeAny, {
|
|
4492
|
+
workflows?: Record<string, {
|
|
4493
|
+
name: string;
|
|
4494
|
+
className: string;
|
|
4495
|
+
scriptName?: string | undefined;
|
|
4496
|
+
}> | undefined;
|
|
4497
|
+
}, {
|
|
4498
|
+
workflows?: Record<string, {
|
|
4499
|
+
name: string;
|
|
4500
|
+
className: string;
|
|
4501
|
+
scriptName?: string | undefined;
|
|
4502
|
+
}> | undefined;
|
|
4503
|
+
}>;
|
|
4504
|
+
|
|
4505
|
+
export declare const WorkflowsSharedOptionsSchema: z.ZodObject<{
|
|
4506
|
+
workflowsPersist: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
4507
|
+
}, "strip", z.ZodTypeAny, {
|
|
4508
|
+
workflowsPersist?: string | boolean | undefined;
|
|
4509
|
+
}, {
|
|
4510
|
+
workflowsPersist?: string | boolean | undefined;
|
|
4511
|
+
}>;
|
|
4512
|
+
|
|
4239
4513
|
export declare type WrappedBindingNames = Set<string>;
|
|
4240
4514
|
|
|
4241
4515
|
export declare function zAwaitable<T extends z.ZodTypeAny>(type: T): z.ZodUnion<[T, z.ZodPromise<T>]>;
|