wrangler 3.51.2 → 3.52.0
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 +1 -1
- package/config-schema.json +117 -87
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +93 -50
- package/wrangler-dist/cli.js +33 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.52.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -89,16 +89,15 @@
|
|
|
89
89
|
"resolve.exports": "^2.0.2",
|
|
90
90
|
"selfsigned": "^2.0.1",
|
|
91
91
|
"source-map": "0.6.1",
|
|
92
|
-
"ts-json-schema-generator": "^1.5.0",
|
|
93
92
|
"xxhash-wasm": "^1.0.1",
|
|
94
|
-
"@cloudflare/kv-asset-handler": "0.3.
|
|
95
|
-
"miniflare": "3.
|
|
93
|
+
"@cloudflare/kv-asset-handler": "0.3.2",
|
|
94
|
+
"miniflare": "3.20240419.0"
|
|
96
95
|
},
|
|
97
96
|
"devDependencies": {
|
|
98
97
|
"@cloudflare/ai": "^1.0.35",
|
|
99
98
|
"@cloudflare/eslint-config-worker": "*",
|
|
100
99
|
"@cloudflare/types": "^6.18.4",
|
|
101
|
-
"@cloudflare/workers-types": "^4.
|
|
100
|
+
"@cloudflare/workers-types": "^4.20240419.0",
|
|
102
101
|
"@cspotcode/source-map-support": "0.8.1",
|
|
103
102
|
"@iarna/toml": "^3.0.0",
|
|
104
103
|
"@microsoft/api-extractor": "^7.28.3",
|
|
@@ -177,6 +176,7 @@
|
|
|
177
176
|
"supports-color": "^9.2.2",
|
|
178
177
|
"timeago.js": "^4.0.2",
|
|
179
178
|
"ts-dedent": "^2.2.0",
|
|
179
|
+
"ts-json-schema-generator": "^1.5.0",
|
|
180
180
|
"undici": "5.28.3",
|
|
181
181
|
"update-check": "^1.5.4",
|
|
182
182
|
"ws": "^8.5.0",
|
|
@@ -184,14 +184,14 @@
|
|
|
184
184
|
"yargs": "^17.7.2",
|
|
185
185
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
186
186
|
"@cloudflare/cli": "1.1.1",
|
|
187
|
-
"@cloudflare/pages-shared": "^0.11.
|
|
187
|
+
"@cloudflare/pages-shared": "^0.11.30",
|
|
188
188
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
189
189
|
},
|
|
190
190
|
"optionalDependencies": {
|
|
191
191
|
"fsevents": "~2.3.2"
|
|
192
192
|
},
|
|
193
193
|
"peerDependencies": {
|
|
194
|
-
"@cloudflare/workers-types": "^4.
|
|
194
|
+
"@cloudflare/workers-types": "^4.20240419.0"
|
|
195
195
|
},
|
|
196
196
|
"peerDependenciesMeta": {
|
|
197
197
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -854,7 +854,7 @@ declare interface DeprecatedUpload {
|
|
|
854
854
|
*/
|
|
855
855
|
format?: "modules" | "service-worker";
|
|
856
856
|
/**
|
|
857
|
-
* The directory you wish to upload your
|
|
857
|
+
* The directory you wish to upload your Worker from,
|
|
858
858
|
* relative to the wrangler.toml file.
|
|
859
859
|
*
|
|
860
860
|
* Defaults to the directory containing the wrangler.toml file.
|
|
@@ -1227,7 +1227,7 @@ declare interface DispatchNamespaceOutbound {
|
|
|
1227
1227
|
service: string;
|
|
1228
1228
|
/** (Optional) Name of the environment handling the outbound requests. */
|
|
1229
1229
|
environment?: string;
|
|
1230
|
-
/** (Optional) List of parameter names, for sending context from your dispatch
|
|
1230
|
+
/** (Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler */
|
|
1231
1231
|
parameters?: string[];
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
@@ -1240,7 +1240,7 @@ declare type DurableObjectBindings = {
|
|
|
1240
1240
|
name: string;
|
|
1241
1241
|
/** The exported class name of the Durable Object */
|
|
1242
1242
|
class_name: string;
|
|
1243
|
-
/** The script where the Durable Object is defined (if it's external to this
|
|
1243
|
+
/** The script where the Durable Object is defined (if it's external to this Worker) */
|
|
1244
1244
|
script_name?: string;
|
|
1245
1245
|
/** The service environment of the script_name to bind to */
|
|
1246
1246
|
environment?: string;
|
|
@@ -1298,7 +1298,7 @@ declare interface EnvironmentDeprecated {
|
|
|
1298
1298
|
*/
|
|
1299
1299
|
"kv-namespaces"?: string;
|
|
1300
1300
|
/**
|
|
1301
|
-
* A list of services that your
|
|
1301
|
+
* A list of services that your Worker should be bound to.
|
|
1302
1302
|
*
|
|
1303
1303
|
* @default `[]`
|
|
1304
1304
|
* @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.
|
|
@@ -1319,7 +1319,7 @@ declare interface EnvironmentDeprecated {
|
|
|
1319
1319
|
*/
|
|
1320
1320
|
declare interface EnvironmentInheritable {
|
|
1321
1321
|
/**
|
|
1322
|
-
* The name of your
|
|
1322
|
+
* The name of your Worker. Alphanumeric + dashes only.
|
|
1323
1323
|
*
|
|
1324
1324
|
* @inheritable
|
|
1325
1325
|
*/
|
|
@@ -1349,16 +1349,19 @@ declare interface EnvironmentInheritable {
|
|
|
1349
1349
|
*
|
|
1350
1350
|
* More details at https://developers.cloudflare.com/workers/platform/compatibility-dates
|
|
1351
1351
|
*
|
|
1352
|
+
* @default `[]`
|
|
1352
1353
|
* @inheritable
|
|
1353
1354
|
*/
|
|
1354
1355
|
compatibility_flags: string[];
|
|
1355
1356
|
/**
|
|
1356
1357
|
* The entrypoint/path to the JavaScript file that will be executed.
|
|
1358
|
+
*
|
|
1359
|
+
* @inheritable
|
|
1357
1360
|
*/
|
|
1358
1361
|
main: string | undefined;
|
|
1359
1362
|
/**
|
|
1360
1363
|
* If true then Wrangler will traverse the file tree below `base_dir`;
|
|
1361
|
-
* Any files that match `rules` will be included in the deployed
|
|
1364
|
+
* Any files that match `rules` will be included in the deployed Worker.
|
|
1362
1365
|
* Defaults to true if `no_bundle` is true, otherwise false.
|
|
1363
1366
|
*
|
|
1364
1367
|
* @inheritable
|
|
@@ -1369,45 +1372,50 @@ declare interface EnvironmentInheritable {
|
|
|
1369
1372
|
* Defaults to false.
|
|
1370
1373
|
* If left unset, files will be named using the pattern ${fileHash}-${basename},
|
|
1371
1374
|
* for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
|
|
1375
|
+
*
|
|
1376
|
+
* @inheritable
|
|
1372
1377
|
*/
|
|
1373
1378
|
preserve_file_names: boolean | undefined;
|
|
1374
1379
|
/**
|
|
1375
|
-
* The directory in which module rules should be evaluated when including additional files into a
|
|
1376
|
-
* This defaults to the directory containing the `main` entry point of the
|
|
1380
|
+
* The directory in which module rules should be evaluated when including additional files into a Worker deployment.
|
|
1381
|
+
* This defaults to the directory containing the `main` entry point of the Worker if not specified.
|
|
1377
1382
|
*
|
|
1378
1383
|
* @inheritable
|
|
1379
1384
|
*/
|
|
1380
1385
|
base_dir: string | undefined;
|
|
1381
1386
|
/**
|
|
1382
1387
|
* Whether we use <name>.<subdomain>.workers.dev to
|
|
1383
|
-
* test and deploy your
|
|
1388
|
+
* test and deploy your Worker.
|
|
1384
1389
|
*
|
|
1390
|
+
* // Carmen according to our tests the default is undefined
|
|
1385
1391
|
* @default `true` (This is a breaking change from Wrangler v1)
|
|
1386
1392
|
* @breaking
|
|
1387
1393
|
* @inheritable
|
|
1388
1394
|
*/
|
|
1389
1395
|
workers_dev: boolean | undefined;
|
|
1390
1396
|
/**
|
|
1391
|
-
* A list of routes that your
|
|
1397
|
+
* A list of routes that your Worker should be published to.
|
|
1392
1398
|
* Only one of `routes` or `route` is required.
|
|
1393
1399
|
*
|
|
1394
|
-
* Only required when workers_dev is false, and there's no scheduled
|
|
1400
|
+
* Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
|
|
1395
1401
|
*
|
|
1396
1402
|
* @inheritable
|
|
1397
1403
|
*/
|
|
1398
1404
|
routes: Route[] | undefined;
|
|
1399
1405
|
/**
|
|
1400
|
-
* A route that your
|
|
1406
|
+
* A route that your Worker should be published to. Literally
|
|
1401
1407
|
* the same as routes, but only one.
|
|
1402
1408
|
* Only one of `routes` or `route` is required.
|
|
1403
1409
|
*
|
|
1404
|
-
* Only required when workers_dev is false, and there's no scheduled
|
|
1410
|
+
* Only required when workers_dev is false, and there's no scheduled Worker
|
|
1405
1411
|
*
|
|
1406
1412
|
* @inheritable
|
|
1407
1413
|
*/
|
|
1408
1414
|
route: Route | undefined;
|
|
1409
1415
|
/**
|
|
1410
1416
|
* Path to a custom tsconfig
|
|
1417
|
+
*
|
|
1418
|
+
* @inheritable
|
|
1411
1419
|
*/
|
|
1412
1420
|
tsconfig: string | undefined;
|
|
1413
1421
|
/**
|
|
@@ -1425,9 +1433,9 @@ declare interface EnvironmentInheritable {
|
|
|
1425
1433
|
*/
|
|
1426
1434
|
jsx_fragment: string;
|
|
1427
1435
|
/**
|
|
1428
|
-
* "Cron" definitions to trigger a
|
|
1436
|
+
* "Cron" definitions to trigger a Worker's "scheduled" function.
|
|
1429
1437
|
*
|
|
1430
|
-
* Lets you call
|
|
1438
|
+
* Lets you call Workers periodically, much like a cron job.
|
|
1431
1439
|
*
|
|
1432
1440
|
* More details here https://developers.cloudflare.com/workers/platform/cron-triggers
|
|
1433
1441
|
*
|
|
@@ -1471,7 +1479,7 @@ declare interface EnvironmentInheritable {
|
|
|
1471
1479
|
* Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
|
|
1472
1480
|
* for more details.
|
|
1473
1481
|
*
|
|
1474
|
-
* @default {}
|
|
1482
|
+
* @default {watch_dir:"./src"}
|
|
1475
1483
|
*/
|
|
1476
1484
|
build: {
|
|
1477
1485
|
/** The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used. */
|
|
@@ -1502,24 +1510,9 @@ declare interface EnvironmentInheritable {
|
|
|
1502
1510
|
*/
|
|
1503
1511
|
node_compat: boolean | undefined;
|
|
1504
1512
|
/**
|
|
1505
|
-
*
|
|
1513
|
+
* Designates this Worker as an internal-only "first-party" Worker.
|
|
1506
1514
|
*
|
|
1507
|
-
*
|
|
1508
|
-
* and so must be specified in every named environment.
|
|
1509
|
-
*
|
|
1510
|
-
* @default `[]`
|
|
1511
|
-
* @nonInheritable
|
|
1512
|
-
*/
|
|
1513
|
-
dispatch_namespaces: {
|
|
1514
|
-
/** The binding name used to refer to the bound service. */
|
|
1515
|
-
binding: string;
|
|
1516
|
-
/** The namespace to bind to. */
|
|
1517
|
-
namespace: string;
|
|
1518
|
-
/** Details about the outbound worker which will handle outbound requests from your namespace */
|
|
1519
|
-
outbound?: DispatchNamespaceOutbound;
|
|
1520
|
-
}[];
|
|
1521
|
-
/**
|
|
1522
|
-
* Designates this worker as an internal-only "first-party" worker.
|
|
1515
|
+
* @inheritable
|
|
1523
1516
|
*/
|
|
1524
1517
|
first_party_worker: boolean | undefined;
|
|
1525
1518
|
/**
|
|
@@ -1544,7 +1537,7 @@ declare interface EnvironmentInheritable {
|
|
|
1544
1537
|
}[];
|
|
1545
1538
|
};
|
|
1546
1539
|
/**
|
|
1547
|
-
* Send Trace Events from this
|
|
1540
|
+
* Send Trace Events from this Worker to Workers Logpush.
|
|
1548
1541
|
*
|
|
1549
1542
|
* This will not configure a corresponding Logpush job automatically.
|
|
1550
1543
|
*
|
|
@@ -1560,9 +1553,11 @@ declare interface EnvironmentInheritable {
|
|
|
1560
1553
|
*/
|
|
1561
1554
|
upload_source_maps: boolean | undefined;
|
|
1562
1555
|
/**
|
|
1563
|
-
* Specify how the
|
|
1556
|
+
* Specify how the Worker should be located to minimize round-trip time.
|
|
1564
1557
|
*
|
|
1565
1558
|
* More details: https://developers.cloudflare.com/workers/platform/smart-placement/
|
|
1559
|
+
*
|
|
1560
|
+
* @inheritable
|
|
1566
1561
|
*/
|
|
1567
1562
|
placement: {
|
|
1568
1563
|
mode: "off" | "smart";
|
|
@@ -1596,7 +1591,7 @@ declare interface EnvironmentMap {
|
|
|
1596
1591
|
*/
|
|
1597
1592
|
declare interface EnvironmentNonInheritable {
|
|
1598
1593
|
/**
|
|
1599
|
-
* A map of values to substitute when deploying your
|
|
1594
|
+
* A map of values to substitute when deploying your Worker.
|
|
1600
1595
|
*
|
|
1601
1596
|
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1602
1597
|
* and so must be specified in every named environment.
|
|
@@ -1606,7 +1601,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1606
1601
|
*/
|
|
1607
1602
|
define: Record<string, string>;
|
|
1608
1603
|
/**
|
|
1609
|
-
* A map of environment variables to set when deploying your
|
|
1604
|
+
* A map of environment variables to set when deploying your Worker.
|
|
1610
1605
|
*
|
|
1611
1606
|
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1612
1607
|
* and so must be specified in every named environment.
|
|
@@ -1616,7 +1611,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1616
1611
|
*/
|
|
1617
1612
|
vars: Record<string, string | Json>;
|
|
1618
1613
|
/**
|
|
1619
|
-
* A list of durable objects that your
|
|
1614
|
+
* A list of durable objects that your Worker should be bound to.
|
|
1620
1615
|
*
|
|
1621
1616
|
* For more information about Durable Objects, see the documentation at
|
|
1622
1617
|
* https://developers.cloudflare.com/workers/learning/using-durable-objects
|
|
@@ -1684,13 +1679,13 @@ declare interface EnvironmentNonInheritable {
|
|
|
1684
1679
|
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1685
1680
|
* and so must be specified in every named environment.
|
|
1686
1681
|
*
|
|
1687
|
-
* @default `{}`
|
|
1682
|
+
* @default `{consumers:[],producers:[]}`
|
|
1688
1683
|
* @nonInheritable
|
|
1689
1684
|
*/
|
|
1690
1685
|
queues: {
|
|
1691
1686
|
/** Producer bindings */
|
|
1692
1687
|
producers?: {
|
|
1693
|
-
/** The binding name used to refer to the Queue in the
|
|
1688
|
+
/** The binding name used to refer to the Queue in the Worker. */
|
|
1694
1689
|
binding: string;
|
|
1695
1690
|
/** The name of this Queue. */
|
|
1696
1691
|
queue: string;
|
|
@@ -1729,7 +1724,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1729
1724
|
* @nonInheritable
|
|
1730
1725
|
*/
|
|
1731
1726
|
r2_buckets: {
|
|
1732
|
-
/** The binding name used to refer to the R2 bucket in the
|
|
1727
|
+
/** The binding name used to refer to the R2 bucket in the Worker. */
|
|
1733
1728
|
binding: string;
|
|
1734
1729
|
/** The name of this R2 bucket at the edge. */
|
|
1735
1730
|
bucket_name: string;
|
|
@@ -1748,7 +1743,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1748
1743
|
* @nonInheritable
|
|
1749
1744
|
*/
|
|
1750
1745
|
d1_databases: {
|
|
1751
|
-
/** The binding name used to refer to the D1 database in the
|
|
1746
|
+
/** The binding name used to refer to the D1 database in the Worker. */
|
|
1752
1747
|
binding: string;
|
|
1753
1748
|
/** The name of this D1 database. */
|
|
1754
1749
|
database_name: string;
|
|
@@ -1773,7 +1768,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1773
1768
|
* @nonInheritable
|
|
1774
1769
|
*/
|
|
1775
1770
|
vectorize: {
|
|
1776
|
-
/** The binding name used to refer to the Vectorize index in the
|
|
1771
|
+
/** The binding name used to refer to the Vectorize index in the Worker. */
|
|
1777
1772
|
binding: string;
|
|
1778
1773
|
/** The name of the index. */
|
|
1779
1774
|
index_name: string;
|
|
@@ -1788,7 +1783,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1788
1783
|
* @nonInheritable
|
|
1789
1784
|
*/
|
|
1790
1785
|
constellation: {
|
|
1791
|
-
/** The binding name used to refer to the project in the
|
|
1786
|
+
/** The binding name used to refer to the project in the Worker. */
|
|
1792
1787
|
binding: string;
|
|
1793
1788
|
/** The id of the project. */
|
|
1794
1789
|
project_id: string;
|
|
@@ -1803,7 +1798,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1803
1798
|
* @nonInheritable
|
|
1804
1799
|
*/
|
|
1805
1800
|
hyperdrive: {
|
|
1806
|
-
/** The binding name used to refer to the project in the
|
|
1801
|
+
/** The binding name used to refer to the project in the Worker. */
|
|
1807
1802
|
binding: string;
|
|
1808
1803
|
/** The id of the database. */
|
|
1809
1804
|
id: string;
|
|
@@ -1811,7 +1806,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1811
1806
|
localConnectionString?: string;
|
|
1812
1807
|
}[];
|
|
1813
1808
|
/**
|
|
1814
|
-
* Specifies service bindings (
|
|
1809
|
+
* Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
|
|
1815
1810
|
*
|
|
1816
1811
|
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1817
1812
|
* and so must be specified in every named environment.
|
|
@@ -1839,19 +1834,31 @@ declare interface EnvironmentNonInheritable {
|
|
|
1839
1834
|
* @nonInheritable
|
|
1840
1835
|
*/
|
|
1841
1836
|
analytics_engine_datasets: {
|
|
1842
|
-
/** The binding name used to refer to the dataset in the
|
|
1837
|
+
/** The binding name used to refer to the dataset in the Worker. */
|
|
1843
1838
|
binding: string;
|
|
1844
1839
|
/** The name of this dataset to write to. */
|
|
1845
1840
|
dataset?: string;
|
|
1846
1841
|
}[];
|
|
1847
1842
|
/**
|
|
1848
|
-
* A browser that will be usable from the
|
|
1843
|
+
* A browser that will be usable from the Worker.
|
|
1844
|
+
*
|
|
1845
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1846
|
+
* and so must be specified in every named environment.
|
|
1847
|
+
*
|
|
1848
|
+
* @default `{}`
|
|
1849
|
+
* @nonInheritable
|
|
1849
1850
|
*/
|
|
1850
1851
|
browser: {
|
|
1851
1852
|
binding: string;
|
|
1852
1853
|
} | undefined;
|
|
1853
1854
|
/**
|
|
1854
1855
|
* Binding to the AI project.
|
|
1856
|
+
*
|
|
1857
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1858
|
+
* and so must be specified in every named environment.
|
|
1859
|
+
*
|
|
1860
|
+
* @default `{}`
|
|
1861
|
+
* @nonInheritable
|
|
1855
1862
|
*/
|
|
1856
1863
|
ai: {
|
|
1857
1864
|
binding: string;
|
|
@@ -1868,6 +1875,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1868
1875
|
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1869
1876
|
* and so must be specified in every named environment.
|
|
1870
1877
|
*
|
|
1878
|
+
* @default `{}`
|
|
1871
1879
|
* @nonInheritable
|
|
1872
1880
|
*/
|
|
1873
1881
|
unsafe: {
|
|
@@ -1901,13 +1909,48 @@ declare interface EnvironmentNonInheritable {
|
|
|
1901
1909
|
compiled_schema: string;
|
|
1902
1910
|
};
|
|
1903
1911
|
};
|
|
1912
|
+
/**
|
|
1913
|
+
* Specifies a list of mTLS certificates that are bound to this Worker environment.
|
|
1914
|
+
*
|
|
1915
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1916
|
+
* and so must be specified in every named environment.
|
|
1917
|
+
*
|
|
1918
|
+
* @default `[]`
|
|
1919
|
+
* @nonInheritable
|
|
1920
|
+
*/
|
|
1904
1921
|
mtls_certificates: {
|
|
1905
|
-
/** The binding name used to refer to the certificate in the
|
|
1922
|
+
/** The binding name used to refer to the certificate in the Worker */
|
|
1906
1923
|
binding: string;
|
|
1907
1924
|
/** The uuid of the uploaded mTLS certificate */
|
|
1908
1925
|
certificate_id: string;
|
|
1909
1926
|
}[];
|
|
1927
|
+
/**
|
|
1928
|
+
* Specifies a list of Tail Workers that are bound to this Worker environment
|
|
1929
|
+
*
|
|
1930
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1931
|
+
* and so must be specified in every named environment.
|
|
1932
|
+
*
|
|
1933
|
+
* @default `[]`
|
|
1934
|
+
* @nonInheritable
|
|
1935
|
+
*/
|
|
1910
1936
|
tail_consumers?: TailConsumer[];
|
|
1937
|
+
/**
|
|
1938
|
+
* Specifies namespace bindings that are bound to this Worker environment.
|
|
1939
|
+
*
|
|
1940
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1941
|
+
* and so must be specified in every named environment.
|
|
1942
|
+
*
|
|
1943
|
+
* @default `[]`
|
|
1944
|
+
* @nonInheritable
|
|
1945
|
+
*/
|
|
1946
|
+
dispatch_namespaces: {
|
|
1947
|
+
/** The binding name used to refer to the bound service. */
|
|
1948
|
+
binding: string;
|
|
1949
|
+
/** The namespace to bind to. */
|
|
1950
|
+
namespace: string;
|
|
1951
|
+
/** Details about the outbound Worker which will handle outbound requests from your namespace */
|
|
1952
|
+
outbound?: DispatchNamespaceOutbound;
|
|
1953
|
+
}[];
|
|
1911
1954
|
}
|
|
1912
1955
|
|
|
1913
1956
|
declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
|
|
@@ -23892,7 +23935,7 @@ declare type UrlOriginAndPathnameParts = Pick<URL, "protocol" | "hostname" | "po
|
|
|
23892
23935
|
declare type UrlOriginParts = Pick<URL, "protocol" | "hostname" | "port">;
|
|
23893
23936
|
|
|
23894
23937
|
declare interface UserLimits {
|
|
23895
|
-
/** Maximum allowed CPU time for a
|
|
23938
|
+
/** Maximum allowed CPU time for a Worker's invocation in milliseconds */
|
|
23896
23939
|
cpu_ms: number;
|
|
23897
23940
|
}
|
|
23898
23941
|
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -118533,7 +118533,7 @@ init_import_meta_url();
|
|
|
118533
118533
|
init_import_meta_url();
|
|
118534
118534
|
|
|
118535
118535
|
// package.json
|
|
118536
|
-
var version = "3.
|
|
118536
|
+
var version = "3.52.0";
|
|
118537
118537
|
var package_default = {
|
|
118538
118538
|
name: "wrangler",
|
|
118539
118539
|
version,
|
|
@@ -118646,7 +118646,6 @@ var package_default = {
|
|
|
118646
118646
|
"resolve.exports": "^2.0.2",
|
|
118647
118647
|
selfsigned: "^2.0.1",
|
|
118648
118648
|
"source-map": "0.6.1",
|
|
118649
|
-
"ts-json-schema-generator": "^1.5.0",
|
|
118650
118649
|
"xxhash-wasm": "^1.0.1"
|
|
118651
118650
|
},
|
|
118652
118651
|
devDependencies: {
|
|
@@ -118656,7 +118655,7 @@ var package_default = {
|
|
|
118656
118655
|
"@cloudflare/pages-shared": "workspace:^",
|
|
118657
118656
|
"@cloudflare/types": "^6.18.4",
|
|
118658
118657
|
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
118659
|
-
"@cloudflare/workers-types": "^4.
|
|
118658
|
+
"@cloudflare/workers-types": "^4.20240419.0",
|
|
118660
118659
|
"@cspotcode/source-map-support": "0.8.1",
|
|
118661
118660
|
"@iarna/toml": "^3.0.0",
|
|
118662
118661
|
"@microsoft/api-extractor": "^7.28.3",
|
|
@@ -118735,6 +118734,7 @@ var package_default = {
|
|
|
118735
118734
|
"supports-color": "^9.2.2",
|
|
118736
118735
|
"timeago.js": "^4.0.2",
|
|
118737
118736
|
"ts-dedent": "^2.2.0",
|
|
118737
|
+
"ts-json-schema-generator": "^1.5.0",
|
|
118738
118738
|
undici: "5.28.3",
|
|
118739
118739
|
"update-check": "^1.5.4",
|
|
118740
118740
|
ws: "^8.5.0",
|
|
@@ -118746,7 +118746,7 @@ var package_default = {
|
|
|
118746
118746
|
fsevents: "~2.3.2"
|
|
118747
118747
|
},
|
|
118748
118748
|
peerDependencies: {
|
|
118749
|
-
"@cloudflare/workers-types": "^4.
|
|
118749
|
+
"@cloudflare/workers-types": "^4.20240419.0"
|
|
118750
118750
|
},
|
|
118751
118751
|
peerDependenciesMeta: {
|
|
118752
118752
|
"@cloudflare/workers-types": {
|
|
@@ -120143,7 +120143,7 @@ function getCacheFolder() {
|
|
|
120143
120143
|
return __cacheFolder;
|
|
120144
120144
|
}
|
|
120145
120145
|
__name(getCacheFolder, "getCacheFolder");
|
|
120146
|
-
var arrayFormatter = new Intl.ListFormat("en", {
|
|
120146
|
+
var arrayFormatter = new Intl.ListFormat("en-US", {
|
|
120147
120147
|
style: "long",
|
|
120148
120148
|
type: "conjunction"
|
|
120149
120149
|
});
|
|
@@ -121509,7 +121509,7 @@ __name(fetchScriptContent, "fetchScriptContent");
|
|
|
121509
121509
|
var getConstellationWarningFromEnv = getEnvironmentVariableFactory({
|
|
121510
121510
|
variableName: "NO_CONSTELLATION_WARNING"
|
|
121511
121511
|
});
|
|
121512
|
-
var constellationBetaWarning = getConstellationWarningFromEnv() !== void 0 ? "" : "--------------------\n\u{1F6A7} Constellation is currently in open alpha and is not recommended for production data and traffic\n\u{1F6A7} Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose\n\u{1F6A7} To give feedback, visit https://discord.
|
|
121512
|
+
var constellationBetaWarning = getConstellationWarningFromEnv() !== void 0 ? "" : "--------------------\n\u{1F6A7} Constellation is currently in open alpha and is not recommended for production data and traffic\n\u{1F6A7} Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose\n\u{1F6A7} To give feedback, visit https://discord.cloudflare.com\n--------------------\n";
|
|
121513
121513
|
var getProjectByName = /* @__PURE__ */ __name(async (config, accountId, name) => {
|
|
121514
121514
|
const allProjects = await listProjects(accountId);
|
|
121515
121515
|
const matchingProj = allProjects.find((proj) => proj.name === name);
|
|
@@ -121919,7 +121919,7 @@ var isNamespaceList = /* @__PURE__ */ __name((value) => Array.isArray(value) &&
|
|
|
121919
121919
|
var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isRecord");
|
|
121920
121920
|
|
|
121921
121921
|
// src/config/validation.ts
|
|
121922
|
-
var ENGLISH = new Intl.ListFormat("en");
|
|
121922
|
+
var ENGLISH = new Intl.ListFormat("en-US");
|
|
121923
121923
|
function isPagesConfig(rawConfig) {
|
|
121924
121924
|
return rawConfig.pages_build_output_dir !== void 0;
|
|
121925
121925
|
}
|
|
@@ -122362,7 +122362,7 @@ function normalizeAndValidateMigrations(diagnostics, rawMigrations, durableObjec
|
|
|
122362
122362
|
new_classes = [${durableObjectClassnames.map((name) => `"${name}"`).join(", ")}]
|
|
122363
122363
|
\`\`\`
|
|
122364
122364
|
|
|
122365
|
-
Refer to https://developers.cloudflare.com/
|
|
122365
|
+
Refer to https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/ for more details.`
|
|
122366
122366
|
);
|
|
122367
122367
|
}
|
|
122368
122368
|
}
|
|
@@ -124434,6 +124434,7 @@ function validatePagesConfig(config, envNames, projectName) {
|
|
|
124434
124434
|
validateProjectName(projectName, diagnostics);
|
|
124435
124435
|
validatePagesEnvironmentNames(envNames, diagnostics);
|
|
124436
124436
|
validateUnsupportedFields(config, diagnostics);
|
|
124437
|
+
validateDurableObjectBinding2(config, diagnostics);
|
|
124437
124438
|
return diagnostics;
|
|
124438
124439
|
}
|
|
124439
124440
|
__name(validatePagesConfig, "validatePagesConfig");
|
|
@@ -124499,6 +124500,20 @@ function validateUnsupportedFields(config, diagnostics) {
|
|
|
124499
124500
|
}
|
|
124500
124501
|
}
|
|
124501
124502
|
__name(validateUnsupportedFields, "validateUnsupportedFields");
|
|
124503
|
+
function validateDurableObjectBinding2(config, diagnostics) {
|
|
124504
|
+
if (config.durable_objects.bindings.length > 0) {
|
|
124505
|
+
const invalidBindings = config.durable_objects.bindings.filter(
|
|
124506
|
+
(binding) => !isRequiredProperty(binding, "script_name", "string")
|
|
124507
|
+
);
|
|
124508
|
+
if (invalidBindings.length > 0) {
|
|
124509
|
+
diagnostics.errors.push(
|
|
124510
|
+
`Durable Objects bindings should specify a "script_name".
|
|
124511
|
+
Pages requires Durable Object bindings to specify the name of the Worker where the Durable Object is defined.`
|
|
124512
|
+
);
|
|
124513
|
+
}
|
|
124514
|
+
}
|
|
124515
|
+
}
|
|
124516
|
+
__name(validateDurableObjectBinding2, "validateDurableObjectBinding");
|
|
124502
124517
|
|
|
124503
124518
|
// src/config/index.ts
|
|
124504
124519
|
function readConfig(configPath, args, requirePagesConfig) {
|
|
@@ -128648,10 +128663,10 @@ function createProxyPrototypeClass(handlerSuperKlass, getUnknownPrototypeKey) {
|
|
|
128648
128663
|
return getUnknownPrototypeKey(key);
|
|
128649
128664
|
}
|
|
128650
128665
|
});
|
|
128651
|
-
|
|
128666
|
+
|
|
128652
128667
|
return Reflect.construct(handlerSuperKlass, [ctx, env], klass);
|
|
128653
128668
|
}
|
|
128654
|
-
|
|
128669
|
+
|
|
128655
128670
|
Reflect.setPrototypeOf(klass.prototype, handlerSuperKlass.prototype);
|
|
128656
128671
|
Reflect.setPrototypeOf(klass, handlerSuperKlass);
|
|
128657
128672
|
|
|
@@ -128662,7 +128677,7 @@ function createDurableObjectClass({ className, proxyUrl }) {
|
|
|
128662
128677
|
const klass = createProxyPrototypeClass(DurableObject, (key) => {
|
|
128663
128678
|
throw new Error(\`Cannot access \\\`\${className}#\${key}\\\` as Durable Object RPC is not yet supported between multiple \\\`wrangler dev\\\` sessions.\`);
|
|
128664
128679
|
});
|
|
128665
|
-
|
|
128680
|
+
|
|
128666
128681
|
// Forward regular HTTP requests to the other "wrangler dev" session
|
|
128667
128682
|
klass.prototype.fetch = function(request) {
|
|
128668
128683
|
if (proxyUrl === undefined) {
|
|
@@ -128672,7 +128687,7 @@ function createDurableObjectClass({ className, proxyUrl }) {
|
|
|
128672
128687
|
proxyRequest.headers.set(HEADER_URL, request.url);
|
|
128673
128688
|
proxyRequest.headers.set(HEADER_NAME, className);
|
|
128674
128689
|
proxyRequest.headers.set(HEADER_ID, this.ctx.id.toString());
|
|
128675
|
-
proxyRequest.headers.set(HEADER_CF_BLOB, JSON.stringify(request.cf));
|
|
128690
|
+
proxyRequest.headers.set(HEADER_CF_BLOB, JSON.stringify(request.cf ?? {}));
|
|
128676
128691
|
return fetch(proxyRequest);
|
|
128677
128692
|
};
|
|
128678
128693
|
|
|
@@ -128698,7 +128713,7 @@ export default {
|
|
|
128698
128713
|
const originalUrl = request.headers.get(HEADER_URL);
|
|
128699
128714
|
const className = request.headers.get(HEADER_NAME);
|
|
128700
128715
|
const idString = request.headers.get(HEADER_ID);
|
|
128701
|
-
const
|
|
128716
|
+
const cf = JSON.parse(request.headers.get(HEADER_CF_BLOB));
|
|
128702
128717
|
if (originalUrl === null || className === null || idString === null) {
|
|
128703
128718
|
return new Response("[wrangler] Received Durable Object proxy request with missing headers", { status: 400 });
|
|
128704
128719
|
}
|
|
@@ -128710,7 +128725,7 @@ export default {
|
|
|
128710
128725
|
const ns = env[className];
|
|
128711
128726
|
const id = ns.idFromString(idString);
|
|
128712
128727
|
const stub = ns.get(id);
|
|
128713
|
-
return stub.fetch(request, { cf
|
|
128728
|
+
return stub.fetch(request, { cf });
|
|
128714
128729
|
}
|
|
128715
128730
|
}
|
|
128716
128731
|
`;
|
|
@@ -165719,7 +165734,9 @@ async function versionsDeployHandler(args) {
|
|
|
165719
165734
|
const trafficSummaryList = Array.from(confirmedVersionTraffic).map(
|
|
165720
165735
|
([versionId, percentage]) => `version ${versionId} at ${percentage}%`
|
|
165721
165736
|
);
|
|
165722
|
-
const trafficSummaryString = new Intl.ListFormat().format(
|
|
165737
|
+
const trafficSummaryString = new Intl.ListFormat("en-US").format(
|
|
165738
|
+
trafficSummaryList
|
|
165739
|
+
);
|
|
165723
165740
|
success(
|
|
165724
165741
|
`Deployed ${workerName} ${trafficSummaryString} (${elapsedString})`
|
|
165725
165742
|
);
|
|
@@ -168353,7 +168370,7 @@ To start developing your Worker, run \`npx wrangler dev\`${isCreatingWranglerTom
|
|
|
168353
168370
|
__name(initHandler, "initHandler");
|
|
168354
168371
|
async function installPackages(shouldRunInstall, depsToInstall, packageManager) {
|
|
168355
168372
|
if (depsToInstall.length > 0) {
|
|
168356
|
-
const formatter = new Intl.ListFormat("en", {
|
|
168373
|
+
const formatter = new Intl.ListFormat("en-US", {
|
|
168357
168374
|
style: "long",
|
|
168358
168375
|
type: "conjunction"
|
|
168359
168376
|
});
|