miniflare 0.0.0-e8975a93a → 0.0.0-ecded1af1
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/dist/src/index.d.ts +85 -25
- package/dist/src/index.js +351 -240
- package/dist/src/index.js.map +3 -3
- package/dist/src/workers/assets/assets-kv.worker.js.map +1 -1
- package/dist/src/workers/assets/assets.worker.js +9196 -92
- package/dist/src/workers/assets/assets.worker.js.map +3 -3
- package/dist/src/workers/assets/router.worker.js +8684 -6
- package/dist/src/workers/assets/router.worker.js.map +3 -3
- package/package.json +4 -4
package/dist/src/index.d.ts
CHANGED
|
@@ -66,23 +66,41 @@ export declare const AssetsOptionsSchema: z.ZodObject<{
|
|
|
66
66
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
67
67
|
bindingName: z.ZodOptional<z.ZodString>;
|
|
68
68
|
routingConfig: z.ZodObject<{
|
|
69
|
-
|
|
69
|
+
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
|
|
71
|
+
has_user_worker?: boolean;
|
|
72
72
|
}, {
|
|
73
|
-
|
|
73
|
+
has_user_worker?: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
assetConfig: z.ZodObject<{
|
|
76
|
+
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
|
77
|
+
not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
80
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
81
|
+
}, {
|
|
82
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
83
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
74
84
|
}>;
|
|
75
85
|
}, "strip", z.ZodTypeAny, {
|
|
76
86
|
path: string;
|
|
77
87
|
routingConfig: {
|
|
78
|
-
|
|
88
|
+
has_user_worker?: boolean;
|
|
89
|
+
};
|
|
90
|
+
assetConfig: {
|
|
91
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
92
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
79
93
|
};
|
|
80
94
|
workerName?: string | undefined;
|
|
81
95
|
bindingName?: string | undefined;
|
|
82
96
|
}, {
|
|
83
97
|
path: string;
|
|
84
98
|
routingConfig: {
|
|
85
|
-
|
|
99
|
+
has_user_worker?: boolean;
|
|
100
|
+
};
|
|
101
|
+
assetConfig: {
|
|
102
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
103
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
86
104
|
};
|
|
87
105
|
workerName?: string | undefined;
|
|
88
106
|
bindingName?: string | undefined;
|
|
@@ -91,7 +109,11 @@ export declare const AssetsOptionsSchema: z.ZodObject<{
|
|
|
91
109
|
assets?: {
|
|
92
110
|
path: string;
|
|
93
111
|
routingConfig: {
|
|
94
|
-
|
|
112
|
+
has_user_worker?: boolean;
|
|
113
|
+
};
|
|
114
|
+
assetConfig: {
|
|
115
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
116
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
95
117
|
};
|
|
96
118
|
workerName?: string | undefined;
|
|
97
119
|
bindingName?: string | undefined;
|
|
@@ -100,7 +122,11 @@ export declare const AssetsOptionsSchema: z.ZodObject<{
|
|
|
100
122
|
assets?: {
|
|
101
123
|
path: string;
|
|
102
124
|
routingConfig: {
|
|
103
|
-
|
|
125
|
+
has_user_worker?: boolean;
|
|
126
|
+
};
|
|
127
|
+
assetConfig: {
|
|
128
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
129
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
104
130
|
};
|
|
105
131
|
workerName?: string | undefined;
|
|
106
132
|
bindingName?: string | undefined;
|
|
@@ -1321,6 +1347,7 @@ export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do";
|
|
|
1321
1347
|
export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME = "do:storage";
|
|
1322
1348
|
|
|
1323
1349
|
export declare type DurableObjectClassNames = Map<string, Map<string, {
|
|
1350
|
+
enableSql?: boolean;
|
|
1324
1351
|
unsafeUniqueKey?: UnsafeUniqueKey;
|
|
1325
1352
|
unsafePreventEviction?: boolean;
|
|
1326
1353
|
}>>;
|
|
@@ -1329,16 +1356,19 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
|
|
|
1329
1356
|
durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1330
1357
|
className: z.ZodString;
|
|
1331
1358
|
scriptName: z.ZodOptional<z.ZodString>;
|
|
1359
|
+
useSQLite: z.ZodOptional<z.ZodBoolean>;
|
|
1332
1360
|
unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<typeof kUnsafeEphemeralUniqueKey>]>>;
|
|
1333
1361
|
unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
|
|
1334
1362
|
}, "strip", z.ZodTypeAny, {
|
|
1335
1363
|
className: string;
|
|
1336
1364
|
scriptName?: string | undefined;
|
|
1365
|
+
useSQLite?: boolean | undefined;
|
|
1337
1366
|
unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
|
|
1338
1367
|
unsafePreventEviction?: boolean | undefined;
|
|
1339
1368
|
}, {
|
|
1340
1369
|
className: string;
|
|
1341
1370
|
scriptName?: string | undefined;
|
|
1371
|
+
useSQLite?: boolean | undefined;
|
|
1342
1372
|
unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
|
|
1343
1373
|
unsafePreventEviction?: boolean | undefined;
|
|
1344
1374
|
}>]>>>;
|
|
@@ -1346,6 +1376,7 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
|
|
|
1346
1376
|
durableObjects?: Record<string, string | {
|
|
1347
1377
|
className: string;
|
|
1348
1378
|
scriptName?: string | undefined;
|
|
1379
|
+
useSQLite?: boolean | undefined;
|
|
1349
1380
|
unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
|
|
1350
1381
|
unsafePreventEviction?: boolean | undefined;
|
|
1351
1382
|
}> | undefined;
|
|
@@ -1353,6 +1384,7 @@ export declare const DurableObjectsOptionsSchema: z.ZodObject<{
|
|
|
1353
1384
|
durableObjects?: Record<string, string | {
|
|
1354
1385
|
className: string;
|
|
1355
1386
|
scriptName?: string | undefined;
|
|
1387
|
+
useSQLite?: boolean | undefined;
|
|
1356
1388
|
unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined;
|
|
1357
1389
|
unsafePreventEviction?: boolean | undefined;
|
|
1358
1390
|
}> | undefined;
|
|
@@ -1547,8 +1579,6 @@ export declare const kInspectorSocket: unique symbol;
|
|
|
1547
1579
|
|
|
1548
1580
|
declare const kPair: unique symbol;
|
|
1549
1581
|
|
|
1550
|
-
export declare const kProxyNodeBinding: unique symbol;
|
|
1551
|
-
|
|
1552
1582
|
declare const kSend: unique symbol;
|
|
1553
1583
|
|
|
1554
1584
|
export declare const kUnsafeEphemeralUniqueKey: unique symbol;
|
|
@@ -1696,7 +1726,7 @@ export declare class Miniflare {
|
|
|
1696
1726
|
export declare class MiniflareCoreError extends MiniflareError<MiniflareCoreErrorCode> {
|
|
1697
1727
|
}
|
|
1698
1728
|
|
|
1699
|
-
export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC";
|
|
1729
|
+
export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_STORAGE_BACKEND" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC";
|
|
1700
1730
|
|
|
1701
1731
|
export declare class MiniflareError<Code extends string | number = string | number> extends Error {
|
|
1702
1732
|
readonly code: Code;
|
|
@@ -1776,6 +1806,7 @@ export declare class NoOpLog extends Log {
|
|
|
1776
1806
|
export declare function normaliseDurableObject(designator: NonNullable<z.infer<typeof DurableObjectsOptionsSchema>["durableObjects"]>[string]): {
|
|
1777
1807
|
className: string;
|
|
1778
1808
|
serviceName?: string;
|
|
1809
|
+
enableSql?: boolean;
|
|
1779
1810
|
unsafeUniqueKey?: UnsafeUniqueKey;
|
|
1780
1811
|
unsafePreventEviction?: boolean;
|
|
1781
1812
|
};
|
|
@@ -2950,16 +2981,19 @@ export declare const PLUGINS: {
|
|
|
2950
2981
|
durableObjects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2951
2982
|
className: z.ZodString;
|
|
2952
2983
|
scriptName: z.ZodOptional<z.ZodString>;
|
|
2984
|
+
useSQLite: z.ZodOptional<z.ZodBoolean>;
|
|
2953
2985
|
unsafeUniqueKey: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<kUnsafeEphemeralUniqueKey>]>>;
|
|
2954
2986
|
unsafePreventEviction: z.ZodOptional<z.ZodBoolean>;
|
|
2955
2987
|
}, "strip", z.ZodTypeAny, {
|
|
2956
2988
|
className: string;
|
|
2957
2989
|
scriptName?: string | undefined;
|
|
2990
|
+
useSQLite?: boolean | undefined;
|
|
2958
2991
|
unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
|
|
2959
2992
|
unsafePreventEviction?: boolean | undefined;
|
|
2960
2993
|
}, {
|
|
2961
2994
|
className: string;
|
|
2962
2995
|
scriptName?: string | undefined;
|
|
2996
|
+
useSQLite?: boolean | undefined;
|
|
2963
2997
|
unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
|
|
2964
2998
|
unsafePreventEviction?: boolean | undefined;
|
|
2965
2999
|
}>]>>>;
|
|
@@ -2967,6 +3001,7 @@ export declare const PLUGINS: {
|
|
|
2967
3001
|
durableObjects?: Record<string, string | {
|
|
2968
3002
|
className: string;
|
|
2969
3003
|
scriptName?: string | undefined;
|
|
3004
|
+
useSQLite?: boolean | undefined;
|
|
2970
3005
|
unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
|
|
2971
3006
|
unsafePreventEviction?: boolean | undefined;
|
|
2972
3007
|
}> | undefined;
|
|
@@ -2974,6 +3009,7 @@ export declare const PLUGINS: {
|
|
|
2974
3009
|
durableObjects?: Record<string, string | {
|
|
2975
3010
|
className: string;
|
|
2976
3011
|
scriptName?: string | undefined;
|
|
3012
|
+
useSQLite?: boolean | undefined;
|
|
2977
3013
|
unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey | undefined;
|
|
2978
3014
|
unsafePreventEviction?: boolean | undefined;
|
|
2979
3015
|
}> | undefined;
|
|
@@ -3125,23 +3161,41 @@ export declare const PLUGINS: {
|
|
|
3125
3161
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
3126
3162
|
bindingName: z.ZodOptional<z.ZodString>;
|
|
3127
3163
|
routingConfig: z.ZodObject<{
|
|
3128
|
-
|
|
3164
|
+
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
|
3165
|
+
}, "strip", z.ZodTypeAny, {
|
|
3166
|
+
has_user_worker?: boolean;
|
|
3167
|
+
}, {
|
|
3168
|
+
has_user_worker?: boolean;
|
|
3169
|
+
}>;
|
|
3170
|
+
assetConfig: z.ZodObject<{
|
|
3171
|
+
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
|
3172
|
+
not_found_handling: z.ZodOptional<z.ZodEnum<["single-page-application", "404-page", "none"]>>;
|
|
3129
3173
|
}, "strip", z.ZodTypeAny, {
|
|
3130
|
-
|
|
3174
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3175
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3131
3176
|
}, {
|
|
3132
|
-
|
|
3177
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3178
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3133
3179
|
}>;
|
|
3134
3180
|
}, "strip", z.ZodTypeAny, {
|
|
3135
3181
|
path: string;
|
|
3136
3182
|
routingConfig: {
|
|
3137
|
-
|
|
3183
|
+
has_user_worker?: boolean;
|
|
3184
|
+
};
|
|
3185
|
+
assetConfig: {
|
|
3186
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3187
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3138
3188
|
};
|
|
3139
3189
|
workerName?: string | undefined;
|
|
3140
3190
|
bindingName?: string | undefined;
|
|
3141
3191
|
}, {
|
|
3142
3192
|
path: string;
|
|
3143
3193
|
routingConfig: {
|
|
3144
|
-
|
|
3194
|
+
has_user_worker?: boolean;
|
|
3195
|
+
};
|
|
3196
|
+
assetConfig: {
|
|
3197
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3198
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3145
3199
|
};
|
|
3146
3200
|
workerName?: string | undefined;
|
|
3147
3201
|
bindingName?: string | undefined;
|
|
@@ -3150,7 +3204,11 @@ export declare const PLUGINS: {
|
|
|
3150
3204
|
assets?: {
|
|
3151
3205
|
path: string;
|
|
3152
3206
|
routingConfig: {
|
|
3153
|
-
|
|
3207
|
+
has_user_worker?: boolean;
|
|
3208
|
+
};
|
|
3209
|
+
assetConfig: {
|
|
3210
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3211
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3154
3212
|
};
|
|
3155
3213
|
workerName?: string | undefined;
|
|
3156
3214
|
bindingName?: string | undefined;
|
|
@@ -3159,7 +3217,11 @@ export declare const PLUGINS: {
|
|
|
3159
3217
|
assets?: {
|
|
3160
3218
|
path: string;
|
|
3161
3219
|
routingConfig: {
|
|
3162
|
-
|
|
3220
|
+
has_user_worker?: boolean;
|
|
3221
|
+
};
|
|
3222
|
+
assetConfig: {
|
|
3223
|
+
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
|
3224
|
+
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
3163
3225
|
};
|
|
3164
3226
|
workerName?: string | undefined;
|
|
3165
3227
|
bindingName?: string | undefined;
|
|
@@ -3207,6 +3269,11 @@ export declare class ProxyClient {
|
|
|
3207
3269
|
dispose(): Promise<void>;
|
|
3208
3270
|
}
|
|
3209
3271
|
|
|
3272
|
+
export declare class ProxyNodeBinding {
|
|
3273
|
+
proxyOverrideHandler?: ProxyHandler<any> | undefined;
|
|
3274
|
+
constructor(proxyOverrideHandler?: ProxyHandler<any> | undefined);
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3210
3277
|
export declare const ProxyOps: {
|
|
3211
3278
|
readonly GET: "GET";
|
|
3212
3279
|
readonly GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR";
|
|
@@ -3637,14 +3704,6 @@ export declare class RouterError extends MiniflareError<RouterErrorCode> {
|
|
|
3637
3704
|
|
|
3638
3705
|
export declare type RouterErrorCode = "ERR_QUERY_STRING" | "ERR_INFIX_WILDCARD";
|
|
3639
3706
|
|
|
3640
|
-
export declare const RoutingConfigSchema: z.ZodObject<{
|
|
3641
|
-
hasUserWorker: z.ZodBoolean;
|
|
3642
|
-
}, "strip", z.ZodTypeAny, {
|
|
3643
|
-
hasUserWorker: boolean;
|
|
3644
|
-
}, {
|
|
3645
|
-
hasUserWorker: boolean;
|
|
3646
|
-
}>;
|
|
3647
|
-
|
|
3648
3707
|
export declare class Runtime {
|
|
3649
3708
|
#private;
|
|
3650
3709
|
updateConfig(configBuffer: Buffer, options: Abortable & RuntimeOptions): Promise<SocketPorts | undefined>;
|
|
@@ -4127,6 +4186,7 @@ export declare interface Worker_Binding_WrappedBinding {
|
|
|
4127
4186
|
export declare type Worker_DurableObjectNamespace = {
|
|
4128
4187
|
className?: string;
|
|
4129
4188
|
preventEviction?: boolean;
|
|
4189
|
+
enableSql?: boolean;
|
|
4130
4190
|
} & ({
|
|
4131
4191
|
uniqueKey?: string;
|
|
4132
4192
|
} | {
|