wrangler 3.92.0 → 3.94.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/config-schema.json +163 -9
- package/package.json +10 -10
- package/templates/init-tests/test-vitest-new-worker.ts +2 -2
- package/wrangler-dist/cli.d.ts +241 -77
- package/wrangler-dist/cli.js +43516 -42174
- package/wrangler-dist/cli.js.map +4 -4
package/config-schema.json
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
"additionalProperties": false,
|
7
7
|
"properties": {
|
8
8
|
"binding": {
|
9
|
+
"description": "Name of `env` binding property in the User Worker.",
|
9
10
|
"type": "string"
|
10
11
|
},
|
11
12
|
"directory": {
|
@@ -13,9 +14,11 @@
|
|
13
14
|
"type": "string"
|
14
15
|
},
|
15
16
|
"experimental_serve_directly": {
|
17
|
+
"description": "If true, then respond to requests that match an asset with that asset directly. If false, route every request to the User Worker, whether or not it matches an asset.",
|
16
18
|
"type": "boolean"
|
17
19
|
},
|
18
20
|
"html_handling": {
|
21
|
+
"description": "How to handle HTML requests.",
|
19
22
|
"enum": [
|
20
23
|
"auto-trailing-slash",
|
21
24
|
"force-trailing-slash",
|
@@ -25,6 +28,7 @@
|
|
25
28
|
"type": "string"
|
26
29
|
},
|
27
30
|
"not_found_handling": {
|
31
|
+
"description": "How to handle requests that do not match an asset.",
|
28
32
|
"enum": [
|
29
33
|
"single-page-application",
|
30
34
|
"404-page",
|
@@ -33,9 +37,6 @@
|
|
33
37
|
"type": "string"
|
34
38
|
}
|
35
39
|
},
|
36
|
-
"required": [
|
37
|
-
"directory"
|
38
|
-
],
|
39
40
|
"type": "object"
|
40
41
|
},
|
41
42
|
"CloudchamberConfig": {
|
@@ -74,6 +75,107 @@
|
|
74
75
|
],
|
75
76
|
"type": "string"
|
76
77
|
},
|
78
|
+
"ContainerApp": {
|
79
|
+
"additionalProperties": false,
|
80
|
+
"description": "Configuration for a container application",
|
81
|
+
"properties": {
|
82
|
+
"configuration": {
|
83
|
+
"additionalProperties": false,
|
84
|
+
"properties": {
|
85
|
+
"image": {
|
86
|
+
"type": "string"
|
87
|
+
},
|
88
|
+
"labels": {
|
89
|
+
"items": {
|
90
|
+
"additionalProperties": false,
|
91
|
+
"properties": {
|
92
|
+
"name": {
|
93
|
+
"type": "string"
|
94
|
+
},
|
95
|
+
"value": {
|
96
|
+
"type": "string"
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"required": [
|
100
|
+
"name",
|
101
|
+
"value"
|
102
|
+
],
|
103
|
+
"type": "object"
|
104
|
+
},
|
105
|
+
"type": "array"
|
106
|
+
},
|
107
|
+
"secrets": {
|
108
|
+
"items": {
|
109
|
+
"additionalProperties": false,
|
110
|
+
"properties": {
|
111
|
+
"name": {
|
112
|
+
"type": "string"
|
113
|
+
},
|
114
|
+
"secret": {
|
115
|
+
"type": "string"
|
116
|
+
},
|
117
|
+
"type": {
|
118
|
+
"const": "env",
|
119
|
+
"type": "string"
|
120
|
+
}
|
121
|
+
},
|
122
|
+
"required": [
|
123
|
+
"name",
|
124
|
+
"type",
|
125
|
+
"secret"
|
126
|
+
],
|
127
|
+
"type": "object"
|
128
|
+
},
|
129
|
+
"type": "array"
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"required": [
|
133
|
+
"image"
|
134
|
+
],
|
135
|
+
"type": "object"
|
136
|
+
},
|
137
|
+
"constraints": {
|
138
|
+
"additionalProperties": false,
|
139
|
+
"properties": {
|
140
|
+
"cities": {
|
141
|
+
"items": {
|
142
|
+
"type": "string"
|
143
|
+
},
|
144
|
+
"type": "array"
|
145
|
+
},
|
146
|
+
"regions": {
|
147
|
+
"items": {
|
148
|
+
"type": "string"
|
149
|
+
},
|
150
|
+
"type": "array"
|
151
|
+
},
|
152
|
+
"tier": {
|
153
|
+
"type": "number"
|
154
|
+
}
|
155
|
+
},
|
156
|
+
"type": "object"
|
157
|
+
},
|
158
|
+
"instances": {
|
159
|
+
"type": "number"
|
160
|
+
},
|
161
|
+
"name": {
|
162
|
+
"type": "string"
|
163
|
+
},
|
164
|
+
"scheduling_policy": {
|
165
|
+
"enum": [
|
166
|
+
"regional",
|
167
|
+
"moon"
|
168
|
+
],
|
169
|
+
"type": "string"
|
170
|
+
}
|
171
|
+
},
|
172
|
+
"required": [
|
173
|
+
"name",
|
174
|
+
"instances",
|
175
|
+
"configuration"
|
176
|
+
],
|
177
|
+
"type": "object"
|
178
|
+
},
|
77
179
|
"CustomDomainRoute": {
|
78
180
|
"additionalProperties": false,
|
79
181
|
"properties": {
|
@@ -351,6 +453,24 @@
|
|
351
453
|
},
|
352
454
|
"type": "array"
|
353
455
|
},
|
456
|
+
"containers": {
|
457
|
+
"additionalProperties": false,
|
458
|
+
"description": "Container related configuration",
|
459
|
+
"properties": {
|
460
|
+
"app": {
|
461
|
+
"default": "`{}`",
|
462
|
+
"description": "Container app configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
463
|
+
"items": {
|
464
|
+
"$ref": "#/definitions/ContainerApp"
|
465
|
+
},
|
466
|
+
"type": "array"
|
467
|
+
}
|
468
|
+
},
|
469
|
+
"required": [
|
470
|
+
"app"
|
471
|
+
],
|
472
|
+
"type": "object"
|
473
|
+
},
|
354
474
|
"d1_databases": {
|
355
475
|
"default": "`[]`",
|
356
476
|
"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.",
|
@@ -1038,6 +1158,7 @@
|
|
1038
1158
|
"build",
|
1039
1159
|
"cloudchamber",
|
1040
1160
|
"compatibility_flags",
|
1161
|
+
"containers",
|
1041
1162
|
"d1_databases",
|
1042
1163
|
"define",
|
1043
1164
|
"dispatch_namespaces",
|
@@ -1110,15 +1231,9 @@
|
|
1110
1231
|
"type": "boolean"
|
1111
1232
|
}
|
1112
1233
|
},
|
1113
|
-
"required": [
|
1114
|
-
"enabled"
|
1115
|
-
],
|
1116
1234
|
"type": "object"
|
1117
1235
|
}
|
1118
1236
|
},
|
1119
|
-
"required": [
|
1120
|
-
"enabled"
|
1121
|
-
],
|
1122
1237
|
"type": "object"
|
1123
1238
|
},
|
1124
1239
|
"RawConfig": {
|
@@ -1253,6 +1368,27 @@
|
|
1253
1368
|
},
|
1254
1369
|
"type": "array"
|
1255
1370
|
},
|
1371
|
+
"configPath": {
|
1372
|
+
"type": "string"
|
1373
|
+
},
|
1374
|
+
"containers": {
|
1375
|
+
"additionalProperties": false,
|
1376
|
+
"description": "Container related configuration",
|
1377
|
+
"properties": {
|
1378
|
+
"app": {
|
1379
|
+
"default": "`{}`",
|
1380
|
+
"description": "Container app configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
1381
|
+
"items": {
|
1382
|
+
"$ref": "#/definitions/ContainerApp"
|
1383
|
+
},
|
1384
|
+
"type": "array"
|
1385
|
+
}
|
1386
|
+
},
|
1387
|
+
"required": [
|
1388
|
+
"app"
|
1389
|
+
],
|
1390
|
+
"type": "object"
|
1391
|
+
},
|
1256
1392
|
"d1_databases": {
|
1257
1393
|
"default": "`[]`",
|
1258
1394
|
"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.",
|
@@ -2282,6 +2418,24 @@
|
|
2282
2418
|
},
|
2283
2419
|
"type": "array"
|
2284
2420
|
},
|
2421
|
+
"containers": {
|
2422
|
+
"additionalProperties": false,
|
2423
|
+
"description": "Container related configuration",
|
2424
|
+
"properties": {
|
2425
|
+
"app": {
|
2426
|
+
"default": "`{}`",
|
2427
|
+
"description": "Container app configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
2428
|
+
"items": {
|
2429
|
+
"$ref": "#/definitions/ContainerApp"
|
2430
|
+
},
|
2431
|
+
"type": "array"
|
2432
|
+
}
|
2433
|
+
},
|
2434
|
+
"required": [
|
2435
|
+
"app"
|
2436
|
+
],
|
2437
|
+
"type": "object"
|
2438
|
+
},
|
2285
2439
|
"d1_databases": {
|
2286
2440
|
"default": "`[]`",
|
2287
2441
|
"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.",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.94.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -62,16 +62,16 @@
|
|
62
62
|
"resolve": "^1.22.8",
|
63
63
|
"selfsigned": "^2.0.1",
|
64
64
|
"source-map": "^0.6.1",
|
65
|
-
"unenv": "npm:unenv-nightly@2.0.0-
|
66
|
-
"workerd": "1.
|
65
|
+
"unenv": "npm:unenv-nightly@2.0.0-20241204-140205-a5d5190",
|
66
|
+
"workerd": "1.20241205.0",
|
67
67
|
"xxhash-wasm": "^1.0.1",
|
68
68
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
69
|
-
"@cloudflare/workers-shared": "0.
|
70
|
-
"miniflare": "3.
|
69
|
+
"@cloudflare/workers-shared": "0.11.0",
|
70
|
+
"miniflare": "3.20241205.0"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@cloudflare/types": "6.18.4",
|
74
|
-
"@cloudflare/workers-types": "^4.
|
74
|
+
"@cloudflare/workers-types": "^4.20241205.0",
|
75
75
|
"@cspotcode/source-map-support": "0.8.1",
|
76
76
|
"@iarna/toml": "^3.0.0",
|
77
77
|
"@microsoft/api-extractor": "^7.47.0",
|
@@ -93,7 +93,7 @@
|
|
93
93
|
"@types/supports-color": "^8.1.1",
|
94
94
|
"@types/ws": "^8.5.7",
|
95
95
|
"@types/yargs": "^17.0.22",
|
96
|
-
"@vitest/ui": "~2.1.
|
96
|
+
"@vitest/ui": "~2.1.8",
|
97
97
|
"@webcontainer/env": "^1.1.0",
|
98
98
|
"body-parser": "^1.20.0",
|
99
99
|
"chalk": "^5.2.0",
|
@@ -133,18 +133,18 @@
|
|
133
133
|
"ts-json-schema-generator": "^1.5.0",
|
134
134
|
"undici": "^5.28.4",
|
135
135
|
"update-check": "^1.5.4",
|
136
|
-
"vitest": "~2.1.
|
136
|
+
"vitest": "~2.1.8",
|
137
137
|
"vitest-websocket-mock": "^0.4.0",
|
138
138
|
"ws": "^8.18.0",
|
139
139
|
"xdg-app-paths": "^8.3.0",
|
140
140
|
"yargs": "^17.7.2",
|
141
141
|
"@cloudflare/cli": "1.1.1",
|
142
|
+
"@cloudflare/pages-shared": "^0.11.71",
|
142
143
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
143
|
-
"@cloudflare/pages-shared": "^0.11.70",
|
144
144
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
145
145
|
},
|
146
146
|
"peerDependencies": {
|
147
|
-
"@cloudflare/workers-types": "^4.
|
147
|
+
"@cloudflare/workers-types": "^4.20241205.0"
|
148
148
|
},
|
149
149
|
"peerDependenciesMeta": {
|
150
150
|
"@cloudflare/workers-types": {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
2
2
|
import { unstable_dev } from "wrangler";
|
3
|
-
import type {
|
3
|
+
import type { Unstable_DevWorker } from "wrangler";
|
4
4
|
|
5
5
|
describe("Worker", () => {
|
6
|
-
let worker:
|
6
|
+
let worker: Unstable_DevWorker;
|
7
7
|
|
8
8
|
beforeAll(async () => {
|
9
9
|
worker = await unstable_dev("src/index.ts", {
|