wrangler 0.0.0-eb201a32 → 0.0.0-eb6f2495
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 +69 -71
- package/package.json +7 -6
- package/templates/no-op-assets-worker.ts +33 -0
- package/templates/startDevWorker/ProxyWorker.ts +4 -2
- package/wrangler-dist/ProxyWorker.js +4 -2
- package/wrangler-dist/ProxyWorker.js.map +1 -1
- package/wrangler-dist/cli.d.ts +25 -29
- package/wrangler-dist/cli.js +33527 -33385
package/config-schema.json
CHANGED
|
@@ -247,29 +247,6 @@
|
|
|
247
247
|
},
|
|
248
248
|
"type": "array"
|
|
249
249
|
},
|
|
250
|
-
"constellation": {
|
|
251
|
-
"default": "`[]`",
|
|
252
|
-
"description": "Specifies Constellation projects that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
253
|
-
"items": {
|
|
254
|
-
"additionalProperties": false,
|
|
255
|
-
"properties": {
|
|
256
|
-
"binding": {
|
|
257
|
-
"description": "The binding name used to refer to the project in the Worker.",
|
|
258
|
-
"type": "string"
|
|
259
|
-
},
|
|
260
|
-
"project_id": {
|
|
261
|
-
"description": "The id of the project.",
|
|
262
|
-
"type": "string"
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
"required": [
|
|
266
|
-
"binding",
|
|
267
|
-
"project_id"
|
|
268
|
-
],
|
|
269
|
-
"type": "object"
|
|
270
|
-
},
|
|
271
|
-
"type": "array"
|
|
272
|
-
},
|
|
273
250
|
"d1_databases": {
|
|
274
251
|
"default": "`[]`",
|
|
275
252
|
"description": "Specifies D1 databases that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
@@ -363,6 +340,10 @@
|
|
|
363
340
|
],
|
|
364
341
|
"type": "object"
|
|
365
342
|
},
|
|
343
|
+
"experimental_assets": {
|
|
344
|
+
"$ref": "#/definitions/ExperimentalAssets",
|
|
345
|
+
"description": "Specify the directory of static assets to deploy/serve"
|
|
346
|
+
},
|
|
366
347
|
"find_additional_modules": {
|
|
367
348
|
"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.",
|
|
368
349
|
"type": "boolean"
|
|
@@ -962,7 +943,6 @@
|
|
|
962
943
|
"build",
|
|
963
944
|
"cloudchamber",
|
|
964
945
|
"compatibility_flags",
|
|
965
|
-
"constellation",
|
|
966
946
|
"d1_databases",
|
|
967
947
|
"define",
|
|
968
948
|
"dispatch_namespaces",
|
|
@@ -985,6 +965,21 @@
|
|
|
985
965
|
],
|
|
986
966
|
"type": "object"
|
|
987
967
|
},
|
|
968
|
+
"ExperimentalAssets": {
|
|
969
|
+
"additionalProperties": false,
|
|
970
|
+
"properties": {
|
|
971
|
+
"binding": {
|
|
972
|
+
"type": "string"
|
|
973
|
+
},
|
|
974
|
+
"directory": {
|
|
975
|
+
"type": "string"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"required": [
|
|
979
|
+
"directory"
|
|
980
|
+
],
|
|
981
|
+
"type": "object"
|
|
982
|
+
},
|
|
988
983
|
"Json": {
|
|
989
984
|
"anyOf": [
|
|
990
985
|
{
|
|
@@ -1102,7 +1097,7 @@
|
|
|
1102
1097
|
"type": "string"
|
|
1103
1098
|
}
|
|
1104
1099
|
],
|
|
1105
|
-
"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."
|
|
1100
|
+
"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."
|
|
1106
1101
|
},
|
|
1107
1102
|
"base_dir": {
|
|
1108
1103
|
"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.",
|
|
@@ -1179,29 +1174,6 @@
|
|
|
1179
1174
|
"configPath": {
|
|
1180
1175
|
"type": "string"
|
|
1181
1176
|
},
|
|
1182
|
-
"constellation": {
|
|
1183
|
-
"default": "`[]`",
|
|
1184
|
-
"description": "Specifies Constellation projects that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
1185
|
-
"items": {
|
|
1186
|
-
"additionalProperties": false,
|
|
1187
|
-
"properties": {
|
|
1188
|
-
"binding": {
|
|
1189
|
-
"description": "The binding name used to refer to the project in the Worker.",
|
|
1190
|
-
"type": "string"
|
|
1191
|
-
},
|
|
1192
|
-
"project_id": {
|
|
1193
|
-
"description": "The id of the project.",
|
|
1194
|
-
"type": "string"
|
|
1195
|
-
}
|
|
1196
|
-
},
|
|
1197
|
-
"required": [
|
|
1198
|
-
"binding",
|
|
1199
|
-
"project_id"
|
|
1200
|
-
],
|
|
1201
|
-
"type": "object"
|
|
1202
|
-
},
|
|
1203
|
-
"type": "array"
|
|
1204
|
-
},
|
|
1205
1177
|
"d1_databases": {
|
|
1206
1178
|
"default": "`[]`",
|
|
1207
1179
|
"description": "Specifies D1 databases that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
@@ -1314,6 +1286,10 @@
|
|
|
1314
1286
|
"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",
|
|
1315
1287
|
"type": "object"
|
|
1316
1288
|
},
|
|
1289
|
+
"experimental_assets": {
|
|
1290
|
+
"$ref": "#/definitions/ExperimentalAssets",
|
|
1291
|
+
"description": "Specify the directory of static assets to deploy/serve"
|
|
1292
|
+
},
|
|
1317
1293
|
"experimental_services": {
|
|
1318
1294
|
"default": "`[]`",
|
|
1319
1295
|
"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.",
|
|
@@ -1425,6 +1401,47 @@
|
|
|
1425
1401
|
},
|
|
1426
1402
|
"type": "array"
|
|
1427
1403
|
},
|
|
1404
|
+
"legacy_assets": {
|
|
1405
|
+
"anyOf": [
|
|
1406
|
+
{
|
|
1407
|
+
"additionalProperties": false,
|
|
1408
|
+
"properties": {
|
|
1409
|
+
"browser_TTL": {
|
|
1410
|
+
"type": "number"
|
|
1411
|
+
},
|
|
1412
|
+
"bucket": {
|
|
1413
|
+
"type": "string"
|
|
1414
|
+
},
|
|
1415
|
+
"exclude": {
|
|
1416
|
+
"items": {
|
|
1417
|
+
"type": "string"
|
|
1418
|
+
},
|
|
1419
|
+
"type": "array"
|
|
1420
|
+
},
|
|
1421
|
+
"include": {
|
|
1422
|
+
"items": {
|
|
1423
|
+
"type": "string"
|
|
1424
|
+
},
|
|
1425
|
+
"type": "array"
|
|
1426
|
+
},
|
|
1427
|
+
"serve_single_page_app": {
|
|
1428
|
+
"type": "boolean"
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
"required": [
|
|
1432
|
+
"bucket",
|
|
1433
|
+
"include",
|
|
1434
|
+
"exclude",
|
|
1435
|
+
"serve_single_page_app"
|
|
1436
|
+
],
|
|
1437
|
+
"type": "object"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
"type": "string"
|
|
1441
|
+
}
|
|
1442
|
+
],
|
|
1443
|
+
"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."
|
|
1444
|
+
},
|
|
1428
1445
|
"legacy_env": {
|
|
1429
1446
|
"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.",
|
|
1430
1447
|
"type": "boolean"
|
|
@@ -2191,29 +2208,6 @@
|
|
|
2191
2208
|
},
|
|
2192
2209
|
"type": "array"
|
|
2193
2210
|
},
|
|
2194
|
-
"constellation": {
|
|
2195
|
-
"default": "`[]`",
|
|
2196
|
-
"description": "Specifies Constellation projects that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
2197
|
-
"items": {
|
|
2198
|
-
"additionalProperties": false,
|
|
2199
|
-
"properties": {
|
|
2200
|
-
"binding": {
|
|
2201
|
-
"description": "The binding name used to refer to the project in the Worker.",
|
|
2202
|
-
"type": "string"
|
|
2203
|
-
},
|
|
2204
|
-
"project_id": {
|
|
2205
|
-
"description": "The id of the project.",
|
|
2206
|
-
"type": "string"
|
|
2207
|
-
}
|
|
2208
|
-
},
|
|
2209
|
-
"required": [
|
|
2210
|
-
"binding",
|
|
2211
|
-
"project_id"
|
|
2212
|
-
],
|
|
2213
|
-
"type": "object"
|
|
2214
|
-
},
|
|
2215
|
-
"type": "array"
|
|
2216
|
-
},
|
|
2217
2211
|
"d1_databases": {
|
|
2218
2212
|
"default": "`[]`",
|
|
2219
2213
|
"description": "Specifies D1 databases that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
|
@@ -2307,6 +2301,10 @@
|
|
|
2307
2301
|
],
|
|
2308
2302
|
"type": "object"
|
|
2309
2303
|
},
|
|
2304
|
+
"experimental_assets": {
|
|
2305
|
+
"$ref": "#/definitions/ExperimentalAssets",
|
|
2306
|
+
"description": "Specify the directory of static assets to deploy/serve"
|
|
2307
|
+
},
|
|
2310
2308
|
"experimental_services": {
|
|
2311
2309
|
"default": "`[]`",
|
|
2312
2310
|
"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-eb6f2495",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -63,13 +63,14 @@
|
|
|
63
63
|
"selfsigned": "^2.0.1",
|
|
64
64
|
"source-map": "^0.6.1",
|
|
65
65
|
"unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952",
|
|
66
|
+
"workerd": "1.20240725.0",
|
|
66
67
|
"xxhash-wasm": "^1.0.1",
|
|
67
68
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
|
68
|
-
"miniflare": "3.
|
|
69
|
+
"miniflare": "3.20240725.0"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@cloudflare/types": "^6.18.4",
|
|
72
|
-
"@cloudflare/workers-types": "^4.
|
|
73
|
+
"@cloudflare/workers-types": "^4.20240725.0",
|
|
73
74
|
"@cspotcode/source-map-support": "0.8.1",
|
|
74
75
|
"@iarna/toml": "^3.0.0",
|
|
75
76
|
"@microsoft/api-extractor": "^7.47.0",
|
|
@@ -140,7 +141,6 @@
|
|
|
140
141
|
"strip-ansi": "^7.1.0",
|
|
141
142
|
"supports-color": "^9.2.2",
|
|
142
143
|
"timeago.js": "^4.0.2",
|
|
143
|
-
"tree-kill": "^1.2.2",
|
|
144
144
|
"ts-dedent": "^2.2.0",
|
|
145
145
|
"ts-json-schema-generator": "^1.5.0",
|
|
146
146
|
"undici": "^5.28.4",
|
|
@@ -151,13 +151,14 @@
|
|
|
151
151
|
"xdg-app-paths": "^8.3.0",
|
|
152
152
|
"yargs": "^17.7.2",
|
|
153
153
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
154
|
+
"@cloudflare/pages-shared": "^0.11.50",
|
|
155
|
+
"@cloudflare/workers-shared": "0.0.1",
|
|
154
156
|
"@cloudflare/cli": "1.1.1",
|
|
155
157
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
156
|
-
"@cloudflare/pages-shared": "^0.11.46",
|
|
157
158
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
158
159
|
},
|
|
159
160
|
"peerDependencies": {
|
|
160
|
-
"@cloudflare/workers-types": "^4.
|
|
161
|
+
"@cloudflare/workers-types": "^4.20240725.0"
|
|
161
162
|
},
|
|
162
163
|
"peerDependenciesMeta": {
|
|
163
164
|
"@cloudflare/workers-types": {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Worker is used as a default entry-point for Assets-only
|
|
3
|
+
* Workers. It proxies the request directly on to the Asset Sever
|
|
4
|
+
* Worker service binding.
|
|
5
|
+
*
|
|
6
|
+
* In an Assets-only Workers world, we want to enable users
|
|
7
|
+
* to deploy a Worker with Assets without ever having to provide
|
|
8
|
+
* a User Worker.
|
|
9
|
+
*
|
|
10
|
+
* ```bash
|
|
11
|
+
* wrangler dev --experimental-assets dist
|
|
12
|
+
* wrangler deploy --experimental-assets dist
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ```toml
|
|
16
|
+
* name = "assets-only-worker"
|
|
17
|
+
* compatibility_date = "2024-01-01"
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Without a user-defined Worker, which usually serves as the entry
|
|
21
|
+
* point in the bundling process, wrangler needs to default to some
|
|
22
|
+
* other entry-point Worker for all intents and purposes. This is what
|
|
23
|
+
* this Worker is.
|
|
24
|
+
*/
|
|
25
|
+
type Env = {
|
|
26
|
+
ASSET_SERVER: Fetcher;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
async fetch(request: Request, env: Env) {
|
|
31
|
+
return env.ASSET_SERVER.fetch(request);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -124,8 +124,10 @@ export class ProxyWorker implements DurableObject {
|
|
|
124
124
|
Object.assign(userWorkerUrl, proxyData.userWorkerUrl);
|
|
125
125
|
|
|
126
126
|
// set request.url in the UserWorker
|
|
127
|
-
const innerUrl =
|
|
128
|
-
|
|
127
|
+
const innerUrl = urlFromParts(
|
|
128
|
+
proxyData.userWorkerInnerUrlOverrides ?? {},
|
|
129
|
+
request.url
|
|
130
|
+
);
|
|
129
131
|
headers.set("MF-Original-URL", innerUrl.href);
|
|
130
132
|
headers.set("MF-Disable-Pretty-Error", "true"); // disables the UserWorker miniflare instance from rendering the pretty error -- instead the ProxyWorker miniflare instance will intercept the json error response and render the pretty error page
|
|
131
133
|
|
|
@@ -94,8 +94,10 @@ var ProxyWorker = class {
|
|
|
94
94
|
const headers = new Headers(request.headers);
|
|
95
95
|
const userWorkerUrl = new URL(request.url);
|
|
96
96
|
Object.assign(userWorkerUrl, proxyData.userWorkerUrl);
|
|
97
|
-
const innerUrl =
|
|
98
|
-
|
|
97
|
+
const innerUrl = urlFromParts(
|
|
98
|
+
proxyData.userWorkerInnerUrlOverrides ?? {},
|
|
99
|
+
request.url
|
|
100
|
+
);
|
|
99
101
|
headers.set("MF-Original-URL", innerUrl.href);
|
|
100
102
|
headers.set("MF-Disable-Pretty-Error", "true");
|
|
101
103
|
const encoding = request.cf?.clientAcceptEncoding;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/api/startDevWorker/utils.ts", "../templates/startDevWorker/ProxyWorker.ts"],
|
|
4
|
-
"mappings": ";AAAA,OAAO,YAAY;AAqBZ,SAAS,eACf,kBACqB;AACrB,MAAI,SAAS;AACb,QAAM,aAAa,IAAI,QAAW,CAAC,UAAU,YAAY;AACxD,cAAU;AACV,aAAS;AAAA,EACV,CAAC;AACD,SAAO,OAAO;AACd,SAAO,MAAM;AAIb,oBAAkB,QAAQ,UAAU;AAEpC,SAAO;AAAA,IACN,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACD;AACD;AAIO,SAAS,aACf,OACA,OAAO,oBACD;AACN,QAAM,MAAM,IAAI,IAAI,IAAI;AAExB,SAAO,OAAO,KAAK,KAAK;AAExB,SAAO;AACR;;;AC9BA,IAAM,uBAAuB;AAC7B,IAAO,sBAAQ;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ler-dist/cli.d.ts
CHANGED
|
@@ -135,8 +135,6 @@ declare type Binding = {
|
|
|
135
135
|
} & Omit<CfD1Database, "binding">) | ({
|
|
136
136
|
type: "vectorize";
|
|
137
137
|
} & Omit<CfVectorize, "binding">) | ({
|
|
138
|
-
type: "constellation";
|
|
139
|
-
} & Omit<CfConstellation, "binding">) | ({
|
|
140
138
|
type: "hyperdrive";
|
|
141
139
|
} & Omit<CfHyperdrive, "binding">) | ({
|
|
142
140
|
type: "service";
|
|
@@ -153,6 +151,8 @@ declare type Binding = {
|
|
|
153
151
|
type: "logfwdr";
|
|
154
152
|
} & Omit<CfLogfwdrBinding, "name">) | {
|
|
155
153
|
type: `unsafe_${string}`;
|
|
154
|
+
} | {
|
|
155
|
+
type: "assets";
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
declare type BindingOmit<T> = Omit<T, "binding" | "name">;
|
|
@@ -415,11 +415,6 @@ declare type CfCapnp = {
|
|
|
415
415
|
compiled_schema?: never;
|
|
416
416
|
};
|
|
417
417
|
|
|
418
|
-
declare interface CfConstellation {
|
|
419
|
-
binding: string;
|
|
420
|
-
project_id: string;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
418
|
declare interface CfD1Database {
|
|
424
419
|
binding: string;
|
|
425
420
|
database_id: string;
|
|
@@ -819,8 +814,9 @@ declare interface ConfigFields<Dev extends RawDevConfig> {
|
|
|
819
814
|
/**
|
|
820
815
|
* Serve a folder of static assets with your Worker, without any additional code.
|
|
821
816
|
* This can either be a string, or an object with additional config fields.
|
|
817
|
+
* Only one of assets and legacy_assets can be used.
|
|
822
818
|
*/
|
|
823
|
-
|
|
819
|
+
legacy_assets: {
|
|
824
820
|
bucket: string;
|
|
825
821
|
include: string[];
|
|
826
822
|
exclude: string[];
|
|
@@ -940,8 +936,6 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
|
940
936
|
url: string;
|
|
941
937
|
id: string;
|
|
942
938
|
environment: "production" | "preview";
|
|
943
|
-
project_id: string;
|
|
944
|
-
project_name: string;
|
|
945
939
|
build_config: {
|
|
946
940
|
build_command: string;
|
|
947
941
|
destination_dir: string;
|
|
@@ -952,6 +946,8 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
|
952
946
|
};
|
|
953
947
|
created_on: string;
|
|
954
948
|
production_branch: string;
|
|
949
|
+
project_id: string;
|
|
950
|
+
project_name: string;
|
|
955
951
|
deployment_trigger: {
|
|
956
952
|
metadata: {
|
|
957
953
|
branch: string;
|
|
@@ -1697,6 +1693,12 @@ declare interface EnvironmentInheritable {
|
|
|
1697
1693
|
placement: {
|
|
1698
1694
|
mode: "off" | "smart";
|
|
1699
1695
|
} | undefined;
|
|
1696
|
+
/**
|
|
1697
|
+
* Specify the directory of static assets to deploy/serve
|
|
1698
|
+
*
|
|
1699
|
+
* @inheritable
|
|
1700
|
+
*/
|
|
1701
|
+
experimental_assets: ExperimentalAssets | undefined;
|
|
1700
1702
|
}
|
|
1701
1703
|
|
|
1702
1704
|
/**
|
|
@@ -1890,21 +1892,6 @@ declare interface EnvironmentNonInheritable {
|
|
|
1890
1892
|
/** The name of the index. */
|
|
1891
1893
|
index_name: string;
|
|
1892
1894
|
}[];
|
|
1893
|
-
/**
|
|
1894
|
-
* Specifies Constellation projects that are bound to this Worker environment.
|
|
1895
|
-
*
|
|
1896
|
-
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1897
|
-
* and so must be specified in every named environment.
|
|
1898
|
-
*
|
|
1899
|
-
* @default `[]`
|
|
1900
|
-
* @nonInheritable
|
|
1901
|
-
*/
|
|
1902
|
-
constellation: {
|
|
1903
|
-
/** The binding name used to refer to the project in the Worker. */
|
|
1904
|
-
binding: string;
|
|
1905
|
-
/** The id of the project. */
|
|
1906
|
-
project_id: string;
|
|
1907
|
-
}[];
|
|
1908
1895
|
/**
|
|
1909
1896
|
* Specifies Hyperdrive configs that are bound to this Worker environment.
|
|
1910
1897
|
*
|
|
@@ -2280,6 +2267,11 @@ declare class ExecutionContext {
|
|
|
2280
2267
|
passThroughOnException(): void;
|
|
2281
2268
|
}
|
|
2282
2269
|
|
|
2270
|
+
declare type ExperimentalAssets = {
|
|
2271
|
+
directory: string;
|
|
2272
|
+
binding?: string;
|
|
2273
|
+
};
|
|
2274
|
+
|
|
2283
2275
|
declare function fetch (
|
|
2284
2276
|
input: RequestInfo,
|
|
2285
2277
|
init?: RequestInit
|
|
@@ -2507,7 +2499,7 @@ export declare type GetPlatformProxyOptions = {
|
|
|
2507
2499
|
*/
|
|
2508
2500
|
configPath?: string;
|
|
2509
2501
|
/**
|
|
2510
|
-
* Flag to indicate the utility to read a json config file (`wrangler.json`)
|
|
2502
|
+
* Flag to indicate the utility to read a json config file (`wrangler.json`/`wrangler.jsonc`)
|
|
2511
2503
|
* instead of the toml one (`wrangler.toml`)
|
|
2512
2504
|
*
|
|
2513
2505
|
* Note: this feature is experimental
|
|
@@ -25929,10 +25921,13 @@ declare interface StartDevWorkerInput {
|
|
|
25929
25921
|
};
|
|
25930
25922
|
legacy?: {
|
|
25931
25923
|
site?: Hook<Config["site"], [Config]>;
|
|
25932
|
-
|
|
25924
|
+
legacyAssets?: Hook<Config["legacy_assets"], [Config]>;
|
|
25933
25925
|
enableServiceEnvironments?: boolean;
|
|
25934
25926
|
};
|
|
25935
25927
|
unsafe?: Omit<CfUnsafe, "bindings">;
|
|
25928
|
+
experimental?: {
|
|
25929
|
+
assets?: Omit<ExperimentalAssets, "bindings">;
|
|
25930
|
+
};
|
|
25936
25931
|
}
|
|
25937
25932
|
|
|
25938
25933
|
declare type StartDevWorkerOptions = StartDevWorkerInput & {
|
|
@@ -25948,7 +25943,7 @@ declare type StartDevWorkerOptions = StartDevWorkerInput & {
|
|
|
25948
25943
|
processEntrypoint: boolean;
|
|
25949
25944
|
};
|
|
25950
25945
|
legacy: StartDevWorkerInput["legacy"] & {
|
|
25951
|
-
|
|
25946
|
+
legacyAssets?: Config["legacy_assets"];
|
|
25952
25947
|
site?: Config["site"];
|
|
25953
25948
|
};
|
|
25954
25949
|
dev: StartDevWorkerInput["dev"] & {
|
|
@@ -26187,7 +26182,8 @@ export declare interface UnstableDevOptions {
|
|
|
26187
26182
|
localProtocol?: "http" | "https";
|
|
26188
26183
|
httpsKeyPath?: string;
|
|
26189
26184
|
httpsCertPath?: string;
|
|
26190
|
-
|
|
26185
|
+
experimentalAssets?: string;
|
|
26186
|
+
legacyAssets?: string;
|
|
26191
26187
|
site?: string;
|
|
26192
26188
|
siteInclude?: string[];
|
|
26193
26189
|
siteExclude?: string[];
|