wrangler 0.0.0-e4fe35cc5 → 0.0.0-e5037b92a
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/config-schema.json +44 -85
- package/package.json +9 -10
- package/wrangler-dist/cli.d.ts +47 -49
- package/wrangler-dist/cli.js +18518 -18406
package/config-schema.json
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
"$ref": "#/definitions/RawConfig",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"definitions": {
|
|
5
|
+
"Assets": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"binding": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"directory": {
|
|
12
|
+
"description": "Absolute path to assets directory",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"html_handling": {
|
|
16
|
+
"enum": [
|
|
17
|
+
"auto-trailing-slash",
|
|
18
|
+
"force-trailing-slash",
|
|
19
|
+
"drop-trailing-slash",
|
|
20
|
+
"none"
|
|
21
|
+
],
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"not_found_handling": {
|
|
25
|
+
"enum": [
|
|
26
|
+
"single-page-application",
|
|
27
|
+
"404-page",
|
|
28
|
+
"none"
|
|
29
|
+
],
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": [
|
|
34
|
+
"directory"
|
|
35
|
+
],
|
|
36
|
+
"type": "object"
|
|
37
|
+
},
|
|
5
38
|
"CloudchamberConfig": {
|
|
6
39
|
"additionalProperties": false,
|
|
7
40
|
"description": "Configuration in wrangler for Cloudchamber",
|
|
@@ -239,6 +272,10 @@
|
|
|
239
272
|
},
|
|
240
273
|
"type": "array"
|
|
241
274
|
},
|
|
275
|
+
"assets": {
|
|
276
|
+
"$ref": "#/definitions/Assets",
|
|
277
|
+
"description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
|
|
278
|
+
},
|
|
242
279
|
"base_dir": {
|
|
243
280
|
"description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
|
|
244
281
|
"type": "string"
|
|
@@ -404,10 +441,6 @@
|
|
|
404
441
|
],
|
|
405
442
|
"type": "object"
|
|
406
443
|
},
|
|
407
|
-
"experimental_assets": {
|
|
408
|
-
"$ref": "#/definitions/ExperimentalAssets",
|
|
409
|
-
"description": "Specify the directory of static assets to deploy/serve"
|
|
410
|
-
},
|
|
411
444
|
"find_additional_modules": {
|
|
412
445
|
"description": "If true then Wrangler will traverse the file tree below `base_dir`; Any files that match `rules` will be included in the deployed Worker. Defaults to true if `no_bundle` is true, otherwise false.",
|
|
413
446
|
"type": "boolean"
|
|
@@ -1016,39 +1049,6 @@
|
|
|
1016
1049
|
],
|
|
1017
1050
|
"type": "object"
|
|
1018
1051
|
},
|
|
1019
|
-
"ExperimentalAssets": {
|
|
1020
|
-
"additionalProperties": false,
|
|
1021
|
-
"properties": {
|
|
1022
|
-
"binding": {
|
|
1023
|
-
"type": "string"
|
|
1024
|
-
},
|
|
1025
|
-
"directory": {
|
|
1026
|
-
"description": "Absolute path to assets directory",
|
|
1027
|
-
"type": "string"
|
|
1028
|
-
},
|
|
1029
|
-
"html_handling": {
|
|
1030
|
-
"enum": [
|
|
1031
|
-
"auto-trailing-slash",
|
|
1032
|
-
"force-trailing-slash",
|
|
1033
|
-
"drop-trailing-slash",
|
|
1034
|
-
"none"
|
|
1035
|
-
],
|
|
1036
|
-
"type": "string"
|
|
1037
|
-
},
|
|
1038
|
-
"not_found_handling": {
|
|
1039
|
-
"enum": [
|
|
1040
|
-
"single-page-application",
|
|
1041
|
-
"404-page",
|
|
1042
|
-
"none"
|
|
1043
|
-
],
|
|
1044
|
-
"type": "string"
|
|
1045
|
-
}
|
|
1046
|
-
},
|
|
1047
|
-
"required": [
|
|
1048
|
-
"directory"
|
|
1049
|
-
],
|
|
1050
|
-
"type": "object"
|
|
1051
|
-
},
|
|
1052
1052
|
"Json": {
|
|
1053
1053
|
"anyOf": [
|
|
1054
1054
|
{
|
|
@@ -1145,45 +1145,8 @@
|
|
|
1145
1145
|
"type": "array"
|
|
1146
1146
|
},
|
|
1147
1147
|
"assets": {
|
|
1148
|
-
"
|
|
1149
|
-
|
|
1150
|
-
"additionalProperties": false,
|
|
1151
|
-
"properties": {
|
|
1152
|
-
"browser_TTL": {
|
|
1153
|
-
"type": "number"
|
|
1154
|
-
},
|
|
1155
|
-
"bucket": {
|
|
1156
|
-
"type": "string"
|
|
1157
|
-
},
|
|
1158
|
-
"exclude": {
|
|
1159
|
-
"items": {
|
|
1160
|
-
"type": "string"
|
|
1161
|
-
},
|
|
1162
|
-
"type": "array"
|
|
1163
|
-
},
|
|
1164
|
-
"include": {
|
|
1165
|
-
"items": {
|
|
1166
|
-
"type": "string"
|
|
1167
|
-
},
|
|
1168
|
-
"type": "array"
|
|
1169
|
-
},
|
|
1170
|
-
"serve_single_page_app": {
|
|
1171
|
-
"type": "boolean"
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
"required": [
|
|
1175
|
-
"bucket",
|
|
1176
|
-
"include",
|
|
1177
|
-
"exclude",
|
|
1178
|
-
"serve_single_page_app"
|
|
1179
|
-
],
|
|
1180
|
-
"type": "object"
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
"type": "string"
|
|
1184
|
-
}
|
|
1185
|
-
],
|
|
1186
|
-
"description": "Serve a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields. Only one of assets and legacy_assets can be used."
|
|
1148
|
+
"$ref": "#/definitions/Assets",
|
|
1149
|
+
"description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
|
|
1187
1150
|
},
|
|
1188
1151
|
"base_dir": {
|
|
1189
1152
|
"description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
|
|
@@ -1372,10 +1335,6 @@
|
|
|
1372
1335
|
"description": "The `env` section defines overrides for the configuration for different environments.\n\nAll environment fields can be specified at the top level of the config indicating the default environment settings.\n\n- Some fields are inherited and overridable in each environment.\n- But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.\n\nFor more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments",
|
|
1373
1336
|
"type": "object"
|
|
1374
1337
|
},
|
|
1375
|
-
"experimental_assets": {
|
|
1376
|
-
"$ref": "#/definitions/ExperimentalAssets",
|
|
1377
|
-
"description": "Specify the directory of static assets to deploy/serve"
|
|
1378
|
-
},
|
|
1379
1338
|
"experimental_services": {
|
|
1380
1339
|
"default": "`[]`",
|
|
1381
1340
|
"deprecated": "DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.",
|
|
@@ -1526,7 +1485,7 @@
|
|
|
1526
1485
|
"type": "string"
|
|
1527
1486
|
}
|
|
1528
1487
|
],
|
|
1529
|
-
"description": "
|
|
1488
|
+
"description": "Old behaviour of serving a folder of static assets with your Worker, without any additional code. This can either be a string, or an object with additional config fields. Will be deprecated in the near future in favor of `assets`."
|
|
1530
1489
|
},
|
|
1531
1490
|
"legacy_env": {
|
|
1532
1491
|
"description": "A boolean to enable \"legacy\" style wrangler environments (from Wrangler v1). These have been superseded by Services, but there may be projects that won't (or can't) use them. If you're using a legacy environment, you can set this to `true` to enable it.",
|
|
@@ -2208,6 +2167,10 @@
|
|
|
2208
2167
|
},
|
|
2209
2168
|
"type": "array"
|
|
2210
2169
|
},
|
|
2170
|
+
"assets": {
|
|
2171
|
+
"$ref": "#/definitions/Assets",
|
|
2172
|
+
"description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
|
|
2173
|
+
},
|
|
2211
2174
|
"base_dir": {
|
|
2212
2175
|
"description": "The directory in which module rules should be evaluated when including additional files into a Worker deployment. This defaults to the directory containing the `main` entry point of the Worker if not specified.",
|
|
2213
2176
|
"type": "string"
|
|
@@ -2373,10 +2336,6 @@
|
|
|
2373
2336
|
],
|
|
2374
2337
|
"type": "object"
|
|
2375
2338
|
},
|
|
2376
|
-
"experimental_assets": {
|
|
2377
|
-
"$ref": "#/definitions/ExperimentalAssets",
|
|
2378
|
-
"description": "Specify the directory of static assets to deploy/serve"
|
|
2379
|
-
},
|
|
2380
2339
|
"experimental_services": {
|
|
2381
2340
|
"default": "`[]`",
|
|
2382
2341
|
"deprecated": "DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-e5037b92a",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
55
55
|
"blake3-wasm": "^2.1.5",
|
|
56
56
|
"chokidar": "^3.5.3",
|
|
57
|
-
"date-fns": "^3.6.0",
|
|
58
57
|
"esbuild": "0.17.19",
|
|
59
58
|
"nanoid": "^3.3.3",
|
|
60
59
|
"path-to-regexp": "^6.3.0",
|
|
@@ -62,16 +61,16 @@
|
|
|
62
61
|
"resolve.exports": "^2.0.2",
|
|
63
62
|
"selfsigned": "^2.0.1",
|
|
64
63
|
"source-map": "^0.6.1",
|
|
65
|
-
"unenv": "npm:unenv-nightly@2.0.0-
|
|
66
|
-
"workerd": "1.
|
|
64
|
+
"unenv": "npm:unenv-nightly@2.0.0-20241009-125958-e8ea22f",
|
|
65
|
+
"workerd": "1.20241004.0",
|
|
67
66
|
"xxhash-wasm": "^1.0.1",
|
|
68
67
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
68
|
+
"@cloudflare/workers-shared": "0.0.0-e5037b92a",
|
|
69
|
+
"miniflare": "0.0.0-e5037b92a"
|
|
71
70
|
},
|
|
72
71
|
"devDependencies": {
|
|
73
72
|
"@cloudflare/types": "^6.18.4",
|
|
74
|
-
"@cloudflare/workers-types": "^4.
|
|
73
|
+
"@cloudflare/workers-types": "^4.20241004.0",
|
|
75
74
|
"@cspotcode/source-map-support": "0.8.1",
|
|
76
75
|
"@iarna/toml": "^3.0.0",
|
|
77
76
|
"@microsoft/api-extractor": "^7.47.0",
|
|
@@ -153,12 +152,12 @@
|
|
|
153
152
|
"yargs": "^17.7.2",
|
|
154
153
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
155
154
|
"@cloudflare/cli": "1.1.1",
|
|
156
|
-
"@cloudflare/pages-shared": "^0.11.58",
|
|
157
155
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
158
|
-
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
156
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
157
|
+
"@cloudflare/pages-shared": "^0.11.64"
|
|
159
158
|
},
|
|
160
159
|
"peerDependencies": {
|
|
161
|
-
"@cloudflare/workers-types": "^4.
|
|
160
|
+
"@cloudflare/workers-types": "^4.20241004.0"
|
|
162
161
|
},
|
|
163
162
|
"peerDependenciesMeta": {
|
|
164
163
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { Miniflare } from 'miniflare';
|
|
|
16
16
|
import type { MiniflareOptions } from 'miniflare';
|
|
17
17
|
import type { ModuleRule } from 'miniflare';
|
|
18
18
|
import { Mutex } from 'miniflare';
|
|
19
|
+
import type { NodeJSCompatMode } from 'miniflare';
|
|
19
20
|
import { Readable } from 'stream';
|
|
20
21
|
import { ReadableStream } from 'stream/web';
|
|
21
22
|
import type { Request as Request_2 } from 'miniflare';
|
|
@@ -86,6 +87,19 @@ declare const AssetConfigSchema: z.ZodObject<{
|
|
|
86
87
|
not_found_handling?: "none" | "single-page-application" | "404-page";
|
|
87
88
|
}>;
|
|
88
89
|
|
|
90
|
+
declare type Assets = {
|
|
91
|
+
/** Absolute path to assets directory */
|
|
92
|
+
directory: string;
|
|
93
|
+
binding?: string;
|
|
94
|
+
html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
|
|
95
|
+
not_found_handling?: "single-page-application" | "404-page" | "none";
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare type AssetsOptions = Pick<Assets, "directory" | "binding"> & {
|
|
99
|
+
routingConfig: RoutingConfig;
|
|
100
|
+
assetConfig: AssetConfig;
|
|
101
|
+
};
|
|
102
|
+
|
|
89
103
|
declare type AsyncHook<T extends HookValues, Args extends unknown[] = []> = Hook<T, Args> | Hook<Promise<T>, Args>;
|
|
90
104
|
|
|
91
105
|
declare class BalancedPool extends Dispatcher {
|
|
@@ -192,7 +206,7 @@ declare type BodyInit =
|
|
|
192
206
|
| ArrayBuffer
|
|
193
207
|
| AsyncIterable<Uint8Array>
|
|
194
208
|
| Blob_2
|
|
195
|
-
|
|
|
209
|
+
| FormData_2
|
|
196
210
|
| Iterable<Uint8Array>
|
|
197
211
|
| NodeJS.ArrayBufferView
|
|
198
212
|
| URLSearchParams_2
|
|
@@ -205,7 +219,7 @@ declare interface BodyMixin {
|
|
|
205
219
|
|
|
206
220
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
207
221
|
readonly blob: () => Promise<Blob_2>
|
|
208
|
-
readonly formData: () => Promise<
|
|
222
|
+
readonly formData: () => Promise<FormData_2>
|
|
209
223
|
readonly json: () => Promise<unknown>
|
|
210
224
|
readonly text: () => Promise<string>
|
|
211
225
|
}
|
|
@@ -763,7 +777,7 @@ declare class ConfigController extends Controller<ConfigControllerEventMap> {
|
|
|
763
777
|
#private;
|
|
764
778
|
latestInput?: StartDevWorkerInput;
|
|
765
779
|
latestConfig?: StartDevWorkerOptions;
|
|
766
|
-
set(input: StartDevWorkerInput): Promise<StartDevWorkerOptions | undefined>;
|
|
780
|
+
set(input: StartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
|
|
767
781
|
patch(input: Partial<StartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
|
|
768
782
|
teardown(): Promise<void>;
|
|
769
783
|
emitConfigUpdateEvent(config: StartDevWorkerOptions): void;
|
|
@@ -836,9 +850,11 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
|
|
|
836
850
|
exclude?: string[];
|
|
837
851
|
} | undefined;
|
|
838
852
|
/**
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
853
|
+
* Old behaviour of serving a folder of static assets with your Worker,
|
|
854
|
+
* without any additional code.
|
|
855
|
+
* This can either be a string, or an object with additional config
|
|
856
|
+
* fields.
|
|
857
|
+
* Will be deprecated in the near future in favor of `assets`.
|
|
842
858
|
*/
|
|
843
859
|
legacy_assets: {
|
|
844
860
|
bucket: string;
|
|
@@ -981,13 +997,13 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
|
981
997
|
type: string;
|
|
982
998
|
};
|
|
983
999
|
latest_stage: {
|
|
984
|
-
name: "
|
|
1000
|
+
name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
|
|
985
1001
|
status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
|
|
986
1002
|
started_on: string | null;
|
|
987
1003
|
ended_on: string | null;
|
|
988
1004
|
};
|
|
989
1005
|
stages: {
|
|
990
|
-
name: "
|
|
1006
|
+
name: "queued" | "build" | "deploy" | "initialize" | "clone_repo";
|
|
991
1007
|
status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
|
|
992
1008
|
started_on: string | null;
|
|
993
1009
|
ended_on: string | null;
|
|
@@ -1245,7 +1261,7 @@ declare namespace Dispatcher {
|
|
|
1245
1261
|
path: string;
|
|
1246
1262
|
method: HttpMethod;
|
|
1247
1263
|
/** Default: `null` */
|
|
1248
|
-
body?: string | Buffer | Uint8Array | Readable | null |
|
|
1264
|
+
body?: string | Buffer | Uint8Array | Readable | null | FormData_2;
|
|
1249
1265
|
/** Default: `null` */
|
|
1250
1266
|
headers?: IncomingHttpHeaders | string[] | null;
|
|
1251
1267
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
@@ -1729,9 +1745,11 @@ declare interface EnvironmentInheritable {
|
|
|
1729
1745
|
/**
|
|
1730
1746
|
* Specify the directory of static assets to deploy/serve
|
|
1731
1747
|
*
|
|
1748
|
+
* More details at https://developers.cloudflare.com/workers/frameworks/
|
|
1749
|
+
*
|
|
1732
1750
|
* @inheritable
|
|
1733
1751
|
*/
|
|
1734
|
-
|
|
1752
|
+
assets: Assets | undefined;
|
|
1735
1753
|
/**
|
|
1736
1754
|
* Specify the observability behavior of the Worker.
|
|
1737
1755
|
*
|
|
@@ -2321,19 +2339,6 @@ declare class ExecutionContext {
|
|
|
2321
2339
|
passThroughOnException(): void;
|
|
2322
2340
|
}
|
|
2323
2341
|
|
|
2324
|
-
declare type ExperimentalAssets = {
|
|
2325
|
-
/** Absolute path to assets directory */
|
|
2326
|
-
directory: string;
|
|
2327
|
-
binding?: string;
|
|
2328
|
-
html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
|
|
2329
|
-
not_found_handling?: "single-page-application" | "404-page" | "none";
|
|
2330
|
-
};
|
|
2331
|
-
|
|
2332
|
-
declare type ExperimentalAssetsOptions = Pick<ExperimentalAssets, "directory" | "binding"> & {
|
|
2333
|
-
routingConfig: RoutingConfig;
|
|
2334
|
-
assetConfig: AssetConfig;
|
|
2335
|
-
};
|
|
2336
|
-
|
|
2337
2342
|
declare function fetch (
|
|
2338
2343
|
input: RequestInfo,
|
|
2339
2344
|
init?: RequestInit
|
|
@@ -2413,7 +2418,7 @@ declare class FileReader {
|
|
|
2413
2418
|
/**
|
|
2414
2419
|
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
|
|
2415
2420
|
*/
|
|
2416
|
-
declare class
|
|
2421
|
+
declare class FormData_2 {
|
|
2417
2422
|
/**
|
|
2418
2423
|
* Appends a new value onto an existing key inside a FormData object,
|
|
2419
2424
|
* or adds the key if it does not already exist.
|
|
@@ -2478,7 +2483,7 @@ declare class FormData {
|
|
|
2478
2483
|
* Executes given callback function for each field of the FormData instance
|
|
2479
2484
|
*/
|
|
2480
2485
|
forEach: (
|
|
2481
|
-
callbackfn: (value: FormDataEntryValue, key: string, iterable:
|
|
2486
|
+
callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData_2) => void,
|
|
2482
2487
|
thisArg?: unknown
|
|
2483
2488
|
) => void
|
|
2484
2489
|
|
|
@@ -2653,7 +2658,9 @@ declare interface Interceptable extends Dispatcher {
|
|
|
2653
2658
|
declare class Logger {
|
|
2654
2659
|
#private;
|
|
2655
2660
|
constructor();
|
|
2656
|
-
|
|
2661
|
+
private overrideLoggerLevel?;
|
|
2662
|
+
get loggerLevel(): "error" | "none" | "warn" | "info" | "log" | "debug";
|
|
2663
|
+
set loggerLevel(val: "error" | "none" | "warn" | "info" | "log" | "debug");
|
|
2657
2664
|
columns: number;
|
|
2658
2665
|
debug: (...args: unknown[]) => void;
|
|
2659
2666
|
debugWithSanitization: (label: string, ...args: unknown[]) => void;
|
|
@@ -2879,16 +2886,6 @@ declare interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
|
2879
2886
|
cacheName?: string
|
|
2880
2887
|
}
|
|
2881
2888
|
|
|
2882
|
-
/**
|
|
2883
|
-
* Wrangler can provide Node.js compatibility in a number of different modes:
|
|
2884
|
-
* - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
|
|
2885
|
-
* - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`).
|
|
2886
|
-
* - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
|
|
2887
|
-
* - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
|
|
2888
|
-
* 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.
|
|
2889
|
-
*/
|
|
2890
|
-
declare type NodeJSCompatMode = "legacy" | "als" | "v1" | "v2" | null;
|
|
2891
|
-
|
|
2892
2889
|
declare interface Observability {
|
|
2893
2890
|
/** If observability is enabled for this Worker */
|
|
2894
2891
|
enabled: boolean;
|
|
@@ -25594,7 +25591,7 @@ declare class Request implements BodyMixin {
|
|
|
25594
25591
|
|
|
25595
25592
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
25596
25593
|
readonly blob: () => Promise<Blob_2>
|
|
25597
|
-
readonly formData: () => Promise<
|
|
25594
|
+
readonly formData: () => Promise<FormData_2>
|
|
25598
25595
|
readonly json: () => Promise<unknown>
|
|
25599
25596
|
readonly text: () => Promise<string>
|
|
25600
25597
|
|
|
@@ -25678,7 +25675,7 @@ declare class Response implements BodyMixin {
|
|
|
25678
25675
|
|
|
25679
25676
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
25680
25677
|
readonly blob: () => Promise<Blob_2>
|
|
25681
|
-
readonly formData: () => Promise<
|
|
25678
|
+
readonly formData: () => Promise<FormData_2>
|
|
25682
25679
|
readonly json: () => Promise<unknown>
|
|
25683
25680
|
readonly text: () => Promise<string>
|
|
25684
25681
|
|
|
@@ -26006,12 +26003,10 @@ declare interface StartDevWorkerInput {
|
|
|
26006
26003
|
enableServiceEnvironments?: boolean;
|
|
26007
26004
|
};
|
|
26008
26005
|
unsafe?: Omit<CfUnsafe, "bindings">;
|
|
26009
|
-
|
|
26010
|
-
assets?: Omit<ExperimentalAssetsOptions, "bindings">;
|
|
26011
|
-
};
|
|
26006
|
+
assets?: string;
|
|
26012
26007
|
}
|
|
26013
26008
|
|
|
26014
|
-
declare type StartDevWorkerOptions = StartDevWorkerInput & {
|
|
26009
|
+
declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
|
|
26015
26010
|
/** A worker's directory. Usually where the wrangler.toml file is located */
|
|
26016
26011
|
directory: string;
|
|
26017
26012
|
build: StartDevWorkerInput["build"] & {
|
|
@@ -26031,8 +26026,14 @@ declare type StartDevWorkerOptions = StartDevWorkerInput & {
|
|
|
26031
26026
|
persist: string;
|
|
26032
26027
|
};
|
|
26033
26028
|
entrypoint: string;
|
|
26029
|
+
assets?: AssetsOptions;
|
|
26034
26030
|
};
|
|
26035
26031
|
|
|
26032
|
+
declare function startWorkerRegistryServer(port: number): Promise<{
|
|
26033
|
+
server: Server<IncomingMessage, ServerResponse>;
|
|
26034
|
+
terminator: HttpTerminator;
|
|
26035
|
+
}>;
|
|
26036
|
+
|
|
26036
26037
|
/** A faster version of `request`. */
|
|
26037
26038
|
declare function stream(
|
|
26038
26039
|
url: string | URL_2 | UrlObject,
|
|
@@ -26113,7 +26114,7 @@ declare namespace Undici {
|
|
|
26113
26114
|
var Headers: Headers;
|
|
26114
26115
|
var Response: Response;
|
|
26115
26116
|
var Request: Request;
|
|
26116
|
-
var FormData:
|
|
26117
|
+
var FormData: FormData_2;
|
|
26117
26118
|
var File: File;
|
|
26118
26119
|
var FileReader: FileReader;
|
|
26119
26120
|
var caches: caches;
|
|
@@ -26181,7 +26182,7 @@ declare namespace undici {
|
|
|
26181
26182
|
ProgressEventInit,
|
|
26182
26183
|
ProgressEvent,
|
|
26183
26184
|
FormDataEntryValue,
|
|
26184
|
-
FormData,
|
|
26185
|
+
FormData_2 as FormData,
|
|
26185
26186
|
DiagnosticsChannel,
|
|
26186
26187
|
BinaryType,
|
|
26187
26188
|
WebSocketEventMap,
|
|
@@ -26242,10 +26243,7 @@ export declare function unstable_splitSqlQuery(sql: string): string[];
|
|
|
26242
26243
|
|
|
26243
26244
|
export declare function unstable_startWorker(options: StartDevWorkerInput): Promise<Worker>;
|
|
26244
26245
|
|
|
26245
|
-
export declare
|
|
26246
|
-
server: Server<IncomingMessage, ServerResponse>;
|
|
26247
|
-
terminator: HttpTerminator;
|
|
26248
|
-
}>;
|
|
26246
|
+
export declare const unstable_startWorkerRegistryServer: startWorkerRegistryServer;
|
|
26249
26247
|
|
|
26250
26248
|
export declare interface UnstableASSETSBindingsOptions {
|
|
26251
26249
|
log: Logger;
|
|
@@ -26263,7 +26261,7 @@ export declare interface UnstableDevOptions {
|
|
|
26263
26261
|
localProtocol?: "http" | "https";
|
|
26264
26262
|
httpsKeyPath?: string;
|
|
26265
26263
|
httpsCertPath?: string;
|
|
26266
|
-
|
|
26264
|
+
assets?: string;
|
|
26267
26265
|
legacyAssets?: string;
|
|
26268
26266
|
site?: string;
|
|
26269
26267
|
siteInclude?: string[];
|