wrangler 4.2.0 → 4.4.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.
@@ -1,1508 +1,794 @@
1
1
  {
2
- "$ref": "#/definitions/RawConfig",
3
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/RawConfig",
4
4
  "definitions": {
5
- "Assets": {
5
+ "RawConfig": {
6
+ "type": "object",
6
7
  "additionalProperties": false,
7
8
  "properties": {
8
- "binding": {
9
- "description": "Name of `env` binding property in the User Worker.",
9
+ "$schema": {
10
10
  "type": "string"
11
11
  },
12
- "directory": {
13
- "description": "Absolute path to assets directory",
14
- "type": "string"
12
+ "env": {
13
+ "type": "object",
14
+ "additionalProperties": {
15
+ "$ref": "#/definitions/RawEnvironment"
16
+ },
17
+ "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",
18
+ "default": {}
15
19
  },
16
- "html_handling": {
17
- "description": "How to handle HTML requests.",
18
- "enum": [
19
- "auto-trailing-slash",
20
- "force-trailing-slash",
21
- "drop-trailing-slash",
22
- "none"
23
- ],
24
- "type": "string"
20
+ "name": {
21
+ "type": "string",
22
+ "description": "The name of your Worker. Alphanumeric + dashes only."
25
23
  },
26
- "not_found_handling": {
27
- "description": "How to handle requests that do not match an asset.",
28
- "enum": [
29
- "single-page-application",
30
- "404-page",
31
- "none"
32
- ],
33
- "type": "string"
24
+ "account_id": {
25
+ "type": "string",
26
+ "description": "This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable."
34
27
  },
35
- "run_worker_first": {
36
- "description": "If true, route every request to the User Worker, whether or not it matches an asset. If false, then respond to requests that match an asset with that asset directly.",
37
- "type": "boolean"
38
- }
39
- },
40
- "type": "object"
41
- },
42
- "CloudchamberConfig": {
43
- "additionalProperties": false,
44
- "description": "Configuration in wrangler for Cloudchamber",
45
- "properties": {
46
- "image": {
47
- "type": "string"
28
+ "compatibility_date": {
29
+ "type": "string",
30
+ "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-dates"
48
31
  },
49
- "ipv4": {
50
- "type": "boolean"
32
+ "compatibility_flags": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "description": "A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-flags",
38
+ "default": []
51
39
  },
52
- "location": {
53
- "type": "string"
40
+ "main": {
41
+ "type": "string",
42
+ "description": "The entrypoint/path to the JavaScript file that will be executed."
54
43
  },
55
- "memory": {
56
- "type": "string"
44
+ "find_additional_modules": {
45
+ "type": "boolean",
46
+ "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."
57
47
  },
58
- "vcpu": {
59
- "type": "number"
60
- }
61
- },
62
- "type": "object"
63
- },
64
- "ConfigModuleRuleType": {
65
- "description": "The possible types for a `Rule`.",
66
- "enum": [
67
- "ESModule",
68
- "CommonJS",
69
- "CompiledWasm",
70
- "Text",
71
- "Data",
72
- "PythonModule",
73
- "PythonRequirement",
74
- "NodeJsCompatModule"
75
- ],
76
- "type": "string"
77
- },
78
- "ContainerApp": {
79
- "additionalProperties": false,
80
- "description": "Configuration for a container application",
81
- "properties": {
82
- "class_name": {
83
- "type": "string"
48
+ "preserve_file_names": {
49
+ "type": "boolean",
50
+ "description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`."
84
51
  },
85
- "configuration": {
52
+ "base_dir": {
53
+ "type": "string",
54
+ "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."
55
+ },
56
+ "workers_dev": {
57
+ "type": "boolean",
58
+ "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.",
59
+ "default": true
60
+ },
61
+ "preview_urls": {
62
+ "type": "boolean",
63
+ "description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
64
+ "default": true
65
+ },
66
+ "routes": {
67
+ "type": "array",
68
+ "items": {
69
+ "$ref": "#/definitions/Route"
70
+ },
71
+ "description": "A list of routes that your Worker should be published to. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)"
72
+ },
73
+ "route": {
74
+ "$ref": "#/definitions/Route",
75
+ "description": "A route that your Worker should be published to. Literally the same as routes, but only one. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker"
76
+ },
77
+ "tsconfig": {
78
+ "type": "string",
79
+ "description": "Path to a custom tsconfig"
80
+ },
81
+ "jsx_factory": {
82
+ "type": "string",
83
+ "description": "The function to use to replace jsx syntax.",
84
+ "default": "React.createElement"
85
+ },
86
+ "jsx_fragment": {
87
+ "type": "string",
88
+ "description": "The function to use to replace jsx fragment syntax.",
89
+ "default": "React.Fragment"
90
+ },
91
+ "migrations": {
92
+ "type": "array",
93
+ "items": {
94
+ "$ref": "#/definitions/DurableObjectMigration"
95
+ },
96
+ "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
97
+ "default": []
98
+ },
99
+ "triggers": {
100
+ "type": "object",
101
+ "properties": {
102
+ "crons": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ },
109
+ "required": [
110
+ "crons"
111
+ ],
86
112
  "additionalProperties": false,
113
+ "description": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers",
114
+ "default": {
115
+ "crons": []
116
+ }
117
+ },
118
+ "limits": {
119
+ "$ref": "#/definitions/UserLimits",
120
+ "description": "Specify limits for runtime behavior. Only supported for the \"standard\" Usage Model"
121
+ },
122
+ "rules": {
123
+ "type": "array",
124
+ "items": {
125
+ "$ref": "#/definitions/Rule"
126
+ },
127
+ "description": "An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS."
128
+ },
129
+ "build": {
130
+ "type": "object",
87
131
  "properties": {
88
- "image": {
89
- "type": "string"
132
+ "command": {
133
+ "type": "string",
134
+ "description": "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."
90
135
  },
91
- "labels": {
92
- "items": {
93
- "additionalProperties": false,
94
- "properties": {
95
- "name": {
96
- "type": "string"
97
- },
98
- "value": {
136
+ "cwd": {
137
+ "type": "string",
138
+ "description": "The directory in which the command is executed."
139
+ },
140
+ "watch_dir": {
141
+ "anyOf": [
142
+ {
143
+ "type": "string"
144
+ },
145
+ {
146
+ "type": "array",
147
+ "items": {
99
148
  "type": "string"
100
149
  }
101
- },
102
- "required": [
103
- "name",
104
- "value"
105
- ],
106
- "type": "object"
107
- },
108
- "type": "array"
109
- },
110
- "secrets": {
150
+ }
151
+ ],
152
+ "description": "The directory to watch for changes while using wrangler dev, defaults to the current working directory"
153
+ }
154
+ },
155
+ "additionalProperties": false,
156
+ "description": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build) for more details.",
157
+ "default": {
158
+ "watch_dir": "./src"
159
+ }
160
+ },
161
+ "no_bundle": {
162
+ "type": "boolean",
163
+ "description": "Skip internal build steps and directly deploy script"
164
+ },
165
+ "minify": {
166
+ "type": "boolean",
167
+ "description": "Minify the script before uploading."
168
+ },
169
+ "first_party_worker": {
170
+ "type": "boolean",
171
+ "description": "Designates this Worker as an internal-only \"first-party\" Worker."
172
+ },
173
+ "logfwdr": {
174
+ "type": "object",
175
+ "properties": {
176
+ "bindings": {
177
+ "type": "array",
111
178
  "items": {
112
- "additionalProperties": false,
179
+ "type": "object",
113
180
  "properties": {
114
181
  "name": {
115
- "type": "string"
116
- },
117
- "secret": {
118
- "type": "string"
182
+ "type": "string",
183
+ "description": "The binding name used to refer to logfwdr"
119
184
  },
120
- "type": {
121
- "const": "env",
122
- "type": "string"
185
+ "destination": {
186
+ "type": "string",
187
+ "description": "The destination for this logged message"
123
188
  }
124
189
  },
125
190
  "required": [
126
191
  "name",
127
- "type",
128
- "secret"
192
+ "destination"
129
193
  ],
130
- "type": "object"
131
- },
132
- "type": "array"
194
+ "additionalProperties": false
195
+ }
133
196
  }
134
197
  },
135
198
  "required": [
136
- "image"
199
+ "bindings"
137
200
  ],
138
- "type": "object"
139
- },
140
- "constraints": {
141
201
  "additionalProperties": false,
202
+ "description": "List of bindings that you will send to logfwdr",
203
+ "default": {
204
+ "bindings": []
205
+ }
206
+ },
207
+ "logpush": {
208
+ "type": "boolean",
209
+ "description": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/"
210
+ },
211
+ "upload_source_maps": {
212
+ "type": "boolean",
213
+ "description": "Include source maps when uploading this worker."
214
+ },
215
+ "placement": {
216
+ "type": "object",
142
217
  "properties": {
143
- "cities": {
144
- "items": {
145
- "type": "string"
146
- },
147
- "type": "array"
148
- },
149
- "regions": {
150
- "items": {
151
- "type": "string"
152
- },
153
- "type": "array"
218
+ "mode": {
219
+ "type": "string",
220
+ "enum": [
221
+ "off",
222
+ "smart"
223
+ ]
154
224
  },
155
- "tier": {
156
- "type": "number"
225
+ "hint": {
226
+ "type": "string"
157
227
  }
158
228
  },
159
- "type": "object"
229
+ "required": [
230
+ "mode"
231
+ ],
232
+ "additionalProperties": false,
233
+ "description": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/"
160
234
  },
161
- "image": {
162
- "type": "string"
235
+ "assets": {
236
+ "$ref": "#/definitions/Assets",
237
+ "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
163
238
  },
164
- "instances": {
165
- "type": "number"
239
+ "observability": {
240
+ "$ref": "#/definitions/Observability",
241
+ "description": "Specify the observability behavior of the Worker."
166
242
  },
167
- "name": {
168
- "type": "string"
243
+ "define": {
244
+ "type": "object",
245
+ "additionalProperties": {
246
+ "type": "string"
247
+ },
248
+ "description": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
249
+ "default": {}
169
250
  },
170
- "scheduling_policy": {
171
- "enum": [
172
- "regional",
173
- "moon"
174
- ],
175
- "type": "string"
176
- }
177
- },
178
- "required": [
179
- "name",
180
- "instances",
181
- "class_name",
182
- "configuration"
183
- ],
184
- "type": "object"
185
- },
186
- "CustomDomainRoute": {
187
- "additionalProperties": false,
188
- "properties": {
189
- "custom_domain": {
190
- "type": "boolean"
191
- },
192
- "pattern": {
193
- "type": "string"
194
- }
195
- },
196
- "required": [
197
- "pattern",
198
- "custom_domain"
199
- ],
200
- "type": "object"
201
- },
202
- "DispatchNamespaceOutbound": {
203
- "additionalProperties": false,
204
- "properties": {
205
- "environment": {
206
- "description": "(Optional) Name of the environment handling the outbound requests.",
207
- "type": "string"
208
- },
209
- "parameters": {
210
- "description": "(Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler",
211
- "items": {
212
- "type": "string"
213
- },
214
- "type": "array"
215
- },
216
- "service": {
217
- "description": "Name of the service handling the outbound requests",
218
- "type": "string"
219
- }
220
- },
221
- "required": [
222
- "service"
223
- ],
224
- "type": "object"
225
- },
226
- "DurableObjectBindings": {
227
- "items": {
228
- "additionalProperties": false,
229
- "properties": {
230
- "class_name": {
231
- "description": "The exported class name of the Durable Object",
232
- "type": "string"
233
- },
234
- "environment": {
235
- "description": "The service environment of the script_name to bind to",
236
- "type": "string"
237
- },
238
- "name": {
239
- "description": "The name of the binding used to refer to the Durable Object",
240
- "type": "string"
241
- },
242
- "script_name": {
243
- "description": "The script where the Durable Object is defined (if it's external to this Worker)",
244
- "type": "string"
245
- }
246
- },
247
- "required": [
248
- "name",
249
- "class_name"
250
- ],
251
- "type": "object"
252
- },
253
- "type": "array"
254
- },
255
- "DurableObjectMigration": {
256
- "additionalProperties": false,
257
- "description": "Configuration in wrangler for Durable Object Migrations",
258
- "properties": {
259
- "deleted_classes": {
260
- "description": "The Durable Objects being removed.",
261
- "items": {
262
- "type": "string"
263
- },
264
- "type": "array"
265
- },
266
- "new_classes": {
267
- "description": "The new Durable Objects being defined.",
268
- "items": {
269
- "type": "string"
270
- },
271
- "type": "array"
272
- },
273
- "new_sqlite_classes": {
274
- "description": "The new SQLite Durable Objects being defined.",
275
- "items": {
276
- "type": "string"
277
- },
278
- "type": "array"
279
- },
280
- "renamed_classes": {
281
- "description": "The Durable Objects being renamed.",
282
- "items": {
283
- "additionalProperties": false,
284
- "properties": {
285
- "from": {
286
- "type": "string"
287
- },
288
- "to": {
289
- "type": "string"
290
- }
291
- },
292
- "required": [
293
- "from",
294
- "to"
295
- ],
296
- "type": "object"
297
- },
298
- "type": "array"
299
- },
300
- "tag": {
301
- "description": "A unique identifier for this migration.",
302
- "type": "string"
303
- }
304
- },
305
- "required": [
306
- "tag"
307
- ],
308
- "type": "object"
309
- },
310
- "Json": {
311
- "anyOf": [
312
- {
313
- "$ref": "#/definitions/Literal"
314
- },
315
- {
316
- "additionalProperties": {
317
- "$ref": "#/definitions/Json"
318
- },
319
- "type": "object"
320
- },
321
- {
322
- "items": {
323
- "$ref": "#/definitions/Json"
324
- },
325
- "type": "array"
326
- }
327
- ]
328
- },
329
- "Literal": {
330
- "$ref": "#/definitions/TypeOf%3CZodUnion%3C%5Bdef-class-1315922706-6501-8772-1315922706-0-54395%2Cdef-class-1315922706-9299-10989-1315922706-0-54395%2Cdef-class-1315922706-12937-13365-1315922706-0-54395%2Cdef-class-1315922706-15083-15273-1315922706-0-54395%5D%3E%3E"
331
- },
332
- "Observability": {
333
- "additionalProperties": false,
334
- "properties": {
335
- "enabled": {
336
- "description": "If observability is enabled for this Worker",
337
- "type": "boolean"
338
- },
339
- "head_sampling_rate": {
340
- "description": "The sampling rate",
341
- "type": "number"
342
- },
343
- "logs": {
344
- "additionalProperties": false,
345
- "properties": {
346
- "enabled": {
347
- "type": "boolean"
348
- },
349
- "head_sampling_rate": {
350
- "description": "The sampling rate",
351
- "type": "number"
352
- },
353
- "invocation_logs": {
354
- "description": "Set to false to disable invocation logs",
355
- "type": "boolean"
356
- }
357
- },
358
- "type": "object"
359
- }
360
- },
361
- "type": "object"
362
- },
363
- "RawConfig": {
364
- "additionalProperties": false,
365
- "properties": {
366
- "$schema": {
367
- "type": "string"
368
- },
369
- "account_id": {
370
- "description": "This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable.",
371
- "type": "string"
372
- },
373
- "ai": {
374
- "additionalProperties": false,
375
- "default": {},
376
- "description": "Binding to the AI project.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
377
- "properties": {
378
- "binding": {
379
- "type": "string"
380
- },
381
- "staging": {
382
- "type": "boolean"
383
- }
384
- },
385
- "required": [
386
- "binding"
387
- ],
388
- "type": "object"
389
- },
390
- "alias": {
391
- "additionalProperties": {
392
- "type": "string"
393
- },
394
- "description": "A map of module aliases. Lets you swap out a module for any others. Corresponds with esbuild's `alias` config",
395
- "type": "object"
396
- },
397
- "analytics_engine_datasets": {
398
- "default": [],
399
- "description": "Specifies analytics engine datasets 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.",
400
- "items": {
401
- "additionalProperties": false,
402
- "properties": {
403
- "binding": {
404
- "description": "The binding name used to refer to the dataset in the Worker.",
405
- "type": "string"
406
- },
407
- "dataset": {
408
- "description": "The name of this dataset to write to.",
409
- "type": "string"
410
- }
411
- },
412
- "required": [
413
- "binding"
414
- ],
415
- "type": "object"
416
- },
417
- "type": "array"
418
- },
419
- "assets": {
420
- "$ref": "#/definitions/Assets",
421
- "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
422
- },
423
- "base_dir": {
424
- "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.",
425
- "type": "string"
426
- },
427
- "browser": {
428
- "additionalProperties": false,
429
- "default": {},
430
- "description": "A browser that will be usable from the Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
431
- "properties": {
432
- "binding": {
433
- "type": "string"
434
- }
435
- },
436
- "required": [
437
- "binding"
438
- ],
439
- "type": "object"
440
- },
441
- "build": {
442
- "additionalProperties": false,
443
- "default": {
444
- "watch_dir": "./src"
445
- },
446
- "description": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build) for more details.",
447
- "properties": {
448
- "command": {
449
- "description": "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.",
450
- "type": "string"
451
- },
452
- "cwd": {
453
- "description": "The directory in which the command is executed.",
454
- "type": "string"
455
- },
456
- "watch_dir": {
457
- "anyOf": [
458
- {
459
- "type": "string"
460
- },
461
- {
462
- "items": {
463
- "type": "string"
464
- },
465
- "type": "array"
466
- }
467
- ],
468
- "description": "The directory to watch for changes while using wrangler dev, defaults to the current working directory"
469
- }
470
- },
471
- "type": "object"
472
- },
473
- "cloudchamber": {
474
- "$ref": "#/definitions/CloudchamberConfig",
475
- "default": {},
476
- "description": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment."
477
- },
478
- "compatibility_date": {
479
- "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-dates",
480
- "type": "string"
481
- },
482
- "compatibility_flags": {
483
- "default": [],
484
- "description": "A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-flags",
485
- "items": {
486
- "type": "string"
487
- },
488
- "type": "array"
489
- },
490
- "containers": {
491
- "default": [],
492
- "description": "Container related configuration",
493
- "items": {
494
- "$ref": "#/definitions/ContainerApp"
495
- },
496
- "type": "array"
497
- },
498
- "d1_databases": {
499
- "default": [],
500
- "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.",
501
- "items": {
502
- "additionalProperties": false,
503
- "properties": {
504
- "binding": {
505
- "description": "The binding name used to refer to the D1 database in the Worker.",
506
- "type": "string"
507
- },
508
- "database_id": {
509
- "description": "The UUID of this D1 database (not required).",
510
- "type": "string"
511
- },
512
- "database_internal_env": {
513
- "description": "Internal use only.",
514
- "type": "string"
515
- },
516
- "database_name": {
517
- "description": "The name of this D1 database.",
518
- "type": "string"
519
- },
520
- "migrations_dir": {
521
- "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').",
522
- "type": "string"
523
- },
524
- "migrations_table": {
525
- "description": "The name of the migrations table for this D1 database (defaults to 'd1_migrations').",
526
- "type": "string"
527
- },
528
- "preview_database_id": {
529
- "description": "The UUID of this D1 database for Wrangler Dev (if specified).",
530
- "type": "string"
531
- }
532
- },
533
- "required": [
534
- "binding"
535
- ],
536
- "type": "object"
537
- },
538
- "type": "array"
539
- },
540
- "data_blobs": {
541
- "additionalProperties": {
542
- "type": "string"
543
- },
544
- "description": "A list of data files that your worker should be bound to. This is the \"legacy\" way of binding to a data file. ES module workers should do proper module imports.",
545
- "type": "object"
546
- },
547
- "define": {
548
- "additionalProperties": {
549
- "type": "string"
550
- },
551
- "default": {},
552
- "description": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
553
- "type": "object"
554
- },
555
- "dev": {
556
- "$ref": "#/definitions/RawDevConfig",
557
- "description": "Options to configure the development server that your worker will use."
558
- },
559
- "dispatch_namespaces": {
560
- "default": [],
561
- "description": "Specifies namespace bindings 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.",
562
- "items": {
563
- "additionalProperties": false,
564
- "properties": {
565
- "binding": {
566
- "description": "The binding name used to refer to the bound service.",
567
- "type": "string"
568
- },
569
- "namespace": {
570
- "description": "The namespace to bind to.",
571
- "type": "string"
572
- },
573
- "outbound": {
574
- "$ref": "#/definitions/DispatchNamespaceOutbound",
575
- "description": "Details about the outbound Worker which will handle outbound requests from your namespace"
576
- }
577
- },
578
- "required": [
579
- "binding",
580
- "namespace"
581
- ],
582
- "type": "object"
583
- },
584
- "type": "array"
585
- },
586
- "durable_objects": {
587
- "additionalProperties": false,
588
- "default": {
589
- "bindings": []
590
- },
591
- "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
592
- "properties": {
593
- "bindings": {
594
- "$ref": "#/definitions/DurableObjectBindings"
595
- }
596
- },
597
- "required": [
598
- "bindings"
599
- ],
600
- "type": "object"
601
- },
602
- "env": {
603
- "additionalProperties": {
604
- "$ref": "#/definitions/RawEnvironment"
605
- },
606
- "default": {},
607
- "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",
608
- "type": "object"
609
- },
610
- "find_additional_modules": {
611
- "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.",
612
- "type": "boolean"
613
- },
614
- "first_party_worker": {
615
- "description": "Designates this Worker as an internal-only \"first-party\" Worker.",
616
- "type": "boolean"
617
- },
618
- "hyperdrive": {
619
- "default": [],
620
- "description": "Specifies Hyperdrive configs 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.",
621
- "items": {
622
- "additionalProperties": false,
623
- "properties": {
624
- "binding": {
625
- "description": "The binding name used to refer to the project in the Worker.",
626
- "type": "string"
627
- },
628
- "id": {
629
- "description": "The id of the database.",
630
- "type": "string"
631
- },
632
- "localConnectionString": {
633
- "description": "The local database connection string for `wrangler dev`",
634
- "type": "string"
635
- }
636
- },
637
- "required": [
638
- "binding",
639
- "id"
640
- ],
641
- "type": "object"
642
- },
643
- "type": "array"
644
- },
645
- "images": {
646
- "additionalProperties": false,
647
- "default": {},
648
- "description": "Binding to Cloudflare Images\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
649
- "properties": {
650
- "binding": {
651
- "type": "string"
652
- }
653
- },
654
- "required": [
655
- "binding"
656
- ],
657
- "type": "object"
658
- },
659
- "jsx_factory": {
660
- "default": "React.createElement",
661
- "description": "The function to use to replace jsx syntax.",
662
- "type": "string"
663
- },
664
- "jsx_fragment": {
665
- "default": "React.Fragment",
666
- "description": "The function to use to replace jsx fragment syntax.",
667
- "type": "string"
668
- },
669
- "keep_vars": {
670
- "default": false,
671
- "description": "By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.\n\nIf you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.\n\nIf you want to keep your dashboard vars when wrangler deploys, set this field to true.",
672
- "type": "boolean"
673
- },
674
- "kv_namespaces": {
675
- "default": [],
676
- "description": "These specify any Workers KV Namespaces you want to access from inside your Worker.\n\nTo learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
677
- "items": {
678
- "additionalProperties": false,
679
- "properties": {
680
- "binding": {
681
- "description": "The binding name used to refer to the KV Namespace",
682
- "type": "string"
683
- },
684
- "id": {
685
- "description": "The ID of the KV namespace",
686
- "type": "string"
687
- },
688
- "preview_id": {
689
- "description": "The ID of the KV namespace used during `wrangler dev`",
690
- "type": "string"
691
- }
692
- },
693
- "required": [
694
- "binding"
695
- ],
696
- "type": "object"
697
- },
698
- "type": "array"
699
- },
700
- "legacy_env": {
701
- "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.",
702
- "type": "boolean"
703
- },
704
- "limits": {
705
- "$ref": "#/definitions/UserLimits",
706
- "description": "Specify limits for runtime behavior. Only supported for the \"standard\" Usage Model"
707
- },
708
- "logfwdr": {
709
- "additionalProperties": false,
710
- "default": {
711
- "bindings": []
712
- },
713
- "description": "List of bindings that you will send to logfwdr",
714
- "properties": {
715
- "bindings": {
716
- "items": {
717
- "additionalProperties": false,
718
- "properties": {
719
- "destination": {
720
- "description": "The destination for this logged message",
721
- "type": "string"
722
- },
723
- "name": {
724
- "description": "The binding name used to refer to logfwdr",
725
- "type": "string"
726
- }
727
- },
728
- "required": [
729
- "name",
730
- "destination"
731
- ],
732
- "type": "object"
733
- },
734
- "type": "array"
735
- }
736
- },
737
- "required": [
738
- "bindings"
739
- ],
740
- "type": "object"
741
- },
742
- "logpush": {
743
- "description": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/",
744
- "type": "boolean"
745
- },
746
- "main": {
747
- "description": "The entrypoint/path to the JavaScript file that will be executed.",
748
- "type": "string"
749
- },
750
- "migrations": {
751
- "default": [],
752
- "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
753
- "items": {
754
- "$ref": "#/definitions/DurableObjectMigration"
755
- },
756
- "type": "array"
757
- },
758
- "minify": {
759
- "description": "Minify the script before uploading.",
760
- "type": "boolean"
761
- },
762
- "mtls_certificates": {
763
- "default": [],
764
- "description": "Specifies a list of mTLS certificates 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.",
765
- "items": {
766
- "additionalProperties": false,
767
- "properties": {
768
- "binding": {
769
- "description": "The binding name used to refer to the certificate in the Worker",
770
- "type": "string"
771
- },
772
- "certificate_id": {
773
- "description": "The uuid of the uploaded mTLS certificate",
774
- "type": "string"
775
- }
776
- },
777
- "required": [
778
- "binding",
779
- "certificate_id"
780
- ],
781
- "type": "object"
782
- },
783
- "type": "array"
784
- },
785
- "name": {
786
- "description": "The name of your Worker. Alphanumeric + dashes only.",
787
- "type": "string"
788
- },
789
- "no_bundle": {
790
- "description": "Skip internal build steps and directly deploy script",
791
- "type": "boolean"
792
- },
793
- "observability": {
794
- "$ref": "#/definitions/Observability",
795
- "description": "Specify the observability behavior of the Worker."
796
- },
797
- "pages_build_output_dir": {
798
- "description": "The directory of static assets to serve.\n\nThe presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules.",
799
- "type": "string"
800
- },
801
- "pipelines": {
802
- "default": [],
803
- "description": "Specifies list of Pipelines 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.",
804
- "items": {
805
- "additionalProperties": false,
806
- "properties": {
807
- "binding": {
808
- "description": "The binding name used to refer to the bound service.",
251
+ "vars": {
252
+ "type": "object",
253
+ "additionalProperties": {
254
+ "anyOf": [
255
+ {
809
256
  "type": "string"
810
257
  },
811
- "pipeline": {
812
- "description": "Name of the Pipeline to bind",
813
- "type": "string"
258
+ {
259
+ "$ref": "#/definitions/Json"
814
260
  }
815
- },
816
- "required": [
817
- "binding",
818
- "pipeline"
819
- ],
820
- "type": "object"
261
+ ]
821
262
  },
822
- "type": "array"
263
+ "description": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
264
+ "default": {}
823
265
  },
824
- "placement": {
825
- "additionalProperties": false,
826
- "description": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/",
266
+ "durable_objects": {
267
+ "type": "object",
827
268
  "properties": {
828
- "hint": {
829
- "type": "string"
830
- },
831
- "mode": {
832
- "enum": [
833
- "off",
834
- "smart"
835
- ],
836
- "type": "string"
269
+ "bindings": {
270
+ "$ref": "#/definitions/DurableObjectBindings"
837
271
  }
838
272
  },
839
273
  "required": [
840
- "mode"
274
+ "bindings"
841
275
  ],
842
- "type": "object"
843
- },
844
- "preserve_file_names": {
845
- "description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.",
846
- "type": "boolean"
847
- },
848
- "preview_urls": {
849
- "default": true,
850
- "description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
851
- "type": "boolean"
852
- },
853
- "queues": {
854
276
  "additionalProperties": false,
277
+ "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
855
278
  "default": {
856
- "consumers": [],
857
- "producers": []
858
- },
859
- "description": "Specifies Queues 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.",
860
- "properties": {
861
- "consumers": {
862
- "description": "Consumer configuration",
863
- "items": {
864
- "additionalProperties": false,
865
- "properties": {
866
- "dead_letter_queue": {
867
- "description": "The queue to send messages that failed to be consumed.",
868
- "type": "string"
869
- },
870
- "max_batch_size": {
871
- "description": "The maximum number of messages per batch",
872
- "type": "number"
873
- },
874
- "max_batch_timeout": {
875
- "description": "The maximum number of seconds to wait to fill a batch with messages.",
876
- "type": "number"
877
- },
878
- "max_concurrency": {
879
- "description": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog.",
880
- "type": [
881
- "number",
882
- "null"
883
- ]
884
- },
885
- "max_retries": {
886
- "description": "The maximum number of retries for each message.",
887
- "type": "number"
888
- },
889
- "queue": {
890
- "description": "The name of the queue from which this consumer should consume.",
891
- "type": "string"
892
- },
893
- "retry_delay": {
894
- "description": "The number of seconds to wait before retrying a message",
895
- "type": "number"
896
- },
897
- "type": {
898
- "description": "The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker.",
899
- "type": "string"
900
- },
901
- "visibility_timeout_ms": {
902
- "description": "The number of milliseconds to wait for pulled messages to become visible again",
903
- "type": "number"
904
- }
905
- },
906
- "required": [
907
- "queue"
908
- ],
909
- "type": "object"
910
- },
911
- "type": "array"
912
- },
913
- "producers": {
914
- "description": "Producer bindings",
915
- "items": {
916
- "additionalProperties": false,
917
- "properties": {
918
- "binding": {
919
- "description": "The binding name used to refer to the Queue in the Worker.",
920
- "type": "string"
921
- },
922
- "delivery_delay": {
923
- "description": "The number of seconds to wait before delivering a message",
924
- "type": "number"
925
- },
926
- "queue": {
927
- "description": "The name of this Queue.",
928
- "type": "string"
929
- }
930
- },
931
- "required": [
932
- "binding",
933
- "queue"
934
- ],
935
- "type": "object"
936
- },
937
- "type": "array"
938
- }
939
- },
940
- "type": "object"
941
- },
942
- "r2_buckets": {
943
- "default": [],
944
- "description": "Specifies R2 buckets 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.",
945
- "items": {
946
- "additionalProperties": false,
947
- "properties": {
948
- "binding": {
949
- "description": "The binding name used to refer to the R2 bucket in the Worker.",
950
- "type": "string"
951
- },
952
- "bucket_name": {
953
- "description": "The name of this R2 bucket at the edge.",
954
- "type": "string"
955
- },
956
- "jurisdiction": {
957
- "description": "The jurisdiction that the bucket exists in. Default if not present.",
958
- "type": "string"
959
- },
960
- "preview_bucket_name": {
961
- "description": "The preview name of this R2 bucket at the edge.",
962
- "type": "string"
963
- }
964
- },
965
- "required": [
966
- "binding"
967
- ],
968
- "type": "object"
969
- },
970
- "type": "array"
971
- },
972
- "route": {
973
- "$ref": "#/definitions/Route",
974
- "description": "A route that your Worker should be published to. Literally the same as routes, but only one. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker"
279
+ "bindings": []
280
+ }
975
281
  },
976
- "routes": {
977
- "description": "A list of routes that your Worker should be published to. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)",
282
+ "workflows": {
283
+ "type": "array",
978
284
  "items": {
979
- "$ref": "#/definitions/Route"
285
+ "$ref": "#/definitions/WorkflowBinding"
980
286
  },
981
- "type": "array"
287
+ "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
288
+ "default": []
982
289
  },
983
- "rules": {
984
- "description": "An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS.",
985
- "items": {
986
- "$ref": "#/definitions/Rule"
987
- },
988
- "type": "array"
290
+ "cloudchamber": {
291
+ "$ref": "#/definitions/CloudchamberConfig",
292
+ "description": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
293
+ "default": {}
989
294
  },
990
- "send_email": {
991
- "default": [],
992
- "description": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
295
+ "containers": {
296
+ "type": "array",
993
297
  "items": {
994
- "additionalProperties": false,
995
- "properties": {
996
- "allowed_destination_addresses": {
997
- "description": "If this binding should be restricted to a set of verified addresses",
998
- "items": {
999
- "type": "string"
1000
- },
1001
- "type": "array"
1002
- },
1003
- "destination_address": {
1004
- "description": "If this binding should be restricted to a specific verified address",
1005
- "type": "string"
1006
- },
1007
- "name": {
1008
- "description": "The binding name used to refer to the this binding",
1009
- "type": "string"
1010
- }
1011
- },
1012
- "required": [
1013
- "name"
1014
- ],
1015
- "type": "object"
298
+ "$ref": "#/definitions/ContainerApp"
1016
299
  },
1017
- "type": "array"
1018
- },
1019
- "send_metrics": {
1020
- "description": "Whether Wrangler should send usage metrics to Cloudflare for this project.\n\nWhen defined this will override any user settings. Otherwise, Wrangler will use the user's preference.",
1021
- "type": "boolean"
300
+ "description": "Container related configuration",
301
+ "default": []
1022
302
  },
1023
- "services": {
1024
- "default": [],
1025
- "description": "Specifies service bindings (Worker-to-Worker) 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.",
303
+ "kv_namespaces": {
304
+ "type": "array",
1026
305
  "items": {
1027
- "additionalProperties": false,
306
+ "type": "object",
1028
307
  "properties": {
1029
308
  "binding": {
1030
- "description": "The binding name used to refer to the bound service.",
1031
- "type": "string"
1032
- },
1033
- "entrypoint": {
1034
- "description": "Optionally, the entrypoint (named export) of the service to bind to.",
1035
- "type": "string"
1036
- },
1037
- "environment": {
1038
- "description": "The environment of the service (e.g. production, staging, etc).",
1039
- "type": "string"
1040
- },
1041
- "service": {
1042
- "description": "The name of the service.",
1043
- "type": "string"
1044
- }
1045
- },
1046
- "required": [
1047
- "binding",
1048
- "service"
1049
- ],
1050
- "type": "object"
1051
- },
1052
- "type": "array"
1053
- },
1054
- "site": {
1055
- "additionalProperties": false,
1056
- "description": "The definition of a Worker Site, a feature that lets you upload static assets with your Worker.\n\nMore details at https://developers.cloudflare.com/workers/platform/sites",
1057
- "properties": {
1058
- "bucket": {
1059
- "description": "The directory containing your static assets.\n\nIt must be a path relative to your Wrangler configuration file. Example: bucket = \"./public\"\n\nIf there is a `site` field then it must contain this `bucket` field.",
1060
- "type": "string"
1061
- },
1062
- "entry-point": {
1063
- "deprecated": "DO NOT use this (it's a holdover from Wrangler v1.x). Either use the top level `main` field, or pass the path to your entry file as a command line argument.",
1064
- "description": "The location of your Worker script.",
1065
- "type": "string"
1066
- },
1067
- "exclude": {
1068
- "default": [],
1069
- "description": "A list of .gitignore-style patterns that match files or directories in your bucket that should be excluded from uploads. Example: exclude = [\"ignore_dir\"]",
1070
- "items": {
1071
- "type": "string"
1072
- },
1073
- "type": "array"
1074
- },
1075
- "include": {
1076
- "default": [],
1077
- "description": "An exclusive list of .gitignore-style patterns that match file or directory names from your bucket location. Only matched items will be uploaded. Example: include = [\"upload_dir\"]",
1078
- "items": {
1079
- "type": "string"
309
+ "type": "string",
310
+ "description": "The binding name used to refer to the KV Namespace"
1080
311
  },
1081
- "type": "array"
1082
- }
1083
- },
1084
- "required": [
1085
- "bucket"
1086
- ],
1087
- "type": "object"
1088
- },
1089
- "tail_consumers": {
1090
- "default": [],
1091
- "description": "Specifies a list of Tail Workers 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.",
1092
- "items": {
1093
- "$ref": "#/definitions/TailConsumer"
1094
- },
1095
- "type": "array"
1096
- },
1097
- "text_blobs": {
1098
- "additionalProperties": {
1099
- "type": "string"
312
+ "id": {
313
+ "type": "string",
314
+ "description": "The ID of the KV namespace"
315
+ },
316
+ "preview_id": {
317
+ "type": "string",
318
+ "description": "The ID of the KV namespace used during `wrangler dev`"
319
+ }
320
+ },
321
+ "required": [
322
+ "binding"
323
+ ],
324
+ "additionalProperties": false
1100
325
  },
1101
- "description": "A list of text files that your worker should be bound to. This is the \"legacy\" way of binding to a text file. ES module workers should do proper module imports.",
1102
- "type": "object"
326
+ "description": "These specify any Workers KV Namespaces you want to access from inside your Worker.\n\nTo learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
327
+ "default": []
1103
328
  },
1104
- "triggers": {
1105
- "additionalProperties": false,
1106
- "default": {
1107
- "crons": []
1108
- },
1109
- "description": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers",
1110
- "properties": {
1111
- "crons": {
1112
- "items": {
1113
- "type": "string"
329
+ "send_email": {
330
+ "type": "array",
331
+ "items": {
332
+ "type": "object",
333
+ "properties": {
334
+ "name": {
335
+ "type": "string",
336
+ "description": "The binding name used to refer to the this binding"
1114
337
  },
1115
- "type": "array"
1116
- }
338
+ "destination_address": {
339
+ "type": "string",
340
+ "description": "If this binding should be restricted to a specific verified address"
341
+ },
342
+ "allowed_destination_addresses": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "string"
346
+ },
347
+ "description": "If this binding should be restricted to a set of verified addresses"
348
+ }
349
+ },
350
+ "required": [
351
+ "name"
352
+ ],
353
+ "additionalProperties": false
1117
354
  },
1118
- "required": [
1119
- "crons"
1120
- ],
1121
- "type": "object"
1122
- },
1123
- "tsconfig": {
1124
- "description": "Path to a custom tsconfig",
1125
- "type": "string"
355
+ "description": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
356
+ "default": []
1126
357
  },
1127
- "unsafe": {
1128
- "additionalProperties": false,
1129
- "default": {},
1130
- "description": "\"Unsafe\" tables for features that aren't directly supported by wrangler.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
358
+ "queues": {
359
+ "type": "object",
1131
360
  "properties": {
1132
- "bindings": {
1133
- "description": "A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare.",
361
+ "producers": {
362
+ "type": "array",
1134
363
  "items": {
1135
- "additionalProperties": {},
364
+ "type": "object",
1136
365
  "properties": {
1137
- "name": {
1138
- "type": "string"
366
+ "binding": {
367
+ "type": "string",
368
+ "description": "The binding name used to refer to the Queue in the Worker."
1139
369
  },
1140
- "type": {
1141
- "type": "string"
370
+ "queue": {
371
+ "type": "string",
372
+ "description": "The name of this Queue."
373
+ },
374
+ "delivery_delay": {
375
+ "type": "number",
376
+ "description": "The number of seconds to wait before delivering a message"
1142
377
  }
1143
378
  },
1144
379
  "required": [
1145
- "name",
1146
- "type"
380
+ "binding",
381
+ "queue"
1147
382
  ],
1148
- "type": "object"
383
+ "additionalProperties": false
1149
384
  },
1150
- "type": "array"
385
+ "description": "Producer bindings"
1151
386
  },
1152
- "capnp": {
1153
- "anyOf": [
1154
- {
1155
- "additionalProperties": false,
1156
- "properties": {
1157
- "base_path": {
1158
- "type": "string"
1159
- },
1160
- "source_schemas": {
1161
- "items": {
1162
- "type": "string"
1163
- },
1164
- "type": "array"
1165
- }
387
+ "consumers": {
388
+ "type": "array",
389
+ "items": {
390
+ "type": "object",
391
+ "properties": {
392
+ "queue": {
393
+ "type": "string",
394
+ "description": "The name of the queue from which this consumer should consume."
1166
395
  },
1167
- "required": [
1168
- "base_path",
1169
- "source_schemas"
1170
- ],
1171
- "type": "object"
1172
- },
1173
- {
1174
- "additionalProperties": false,
1175
- "properties": {
1176
- "compiled_schema": {
1177
- "type": "string"
1178
- }
396
+ "type": {
397
+ "type": "string",
398
+ "description": "The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker."
1179
399
  },
1180
- "required": [
1181
- "compiled_schema"
1182
- ],
1183
- "type": "object"
1184
- }
1185
- ],
1186
- "description": "Used for internal capnp uploads for the Workers runtime"
1187
- },
1188
- "metadata": {
1189
- "additionalProperties": {},
1190
- "description": "Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields.",
1191
- "type": "object"
400
+ "max_batch_size": {
401
+ "type": "number",
402
+ "description": "The maximum number of messages per batch"
403
+ },
404
+ "max_batch_timeout": {
405
+ "type": "number",
406
+ "description": "The maximum number of seconds to wait to fill a batch with messages."
407
+ },
408
+ "max_retries": {
409
+ "type": "number",
410
+ "description": "The maximum number of retries for each message."
411
+ },
412
+ "dead_letter_queue": {
413
+ "type": "string",
414
+ "description": "The queue to send messages that failed to be consumed."
415
+ },
416
+ "max_concurrency": {
417
+ "type": [
418
+ "number",
419
+ "null"
420
+ ],
421
+ "description": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog."
422
+ },
423
+ "visibility_timeout_ms": {
424
+ "type": "number",
425
+ "description": "The number of milliseconds to wait for pulled messages to become visible again"
426
+ },
427
+ "retry_delay": {
428
+ "type": "number",
429
+ "description": "The number of seconds to wait before retrying a message"
430
+ }
431
+ },
432
+ "required": [
433
+ "queue"
434
+ ],
435
+ "additionalProperties": false
436
+ },
437
+ "description": "Consumer configuration"
1192
438
  }
1193
439
  },
1194
- "type": "object"
440
+ "additionalProperties": false,
441
+ "description": "Specifies Queues 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.",
442
+ "default": {
443
+ "consumers": [],
444
+ "producers": []
445
+ }
1195
446
  },
1196
- "upload_source_maps": {
1197
- "description": "Include source maps when uploading this worker.",
1198
- "type": "boolean"
447
+ "r2_buckets": {
448
+ "type": "array",
449
+ "items": {
450
+ "type": "object",
451
+ "properties": {
452
+ "binding": {
453
+ "type": "string",
454
+ "description": "The binding name used to refer to the R2 bucket in the Worker."
455
+ },
456
+ "bucket_name": {
457
+ "type": "string",
458
+ "description": "The name of this R2 bucket at the edge."
459
+ },
460
+ "preview_bucket_name": {
461
+ "type": "string",
462
+ "description": "The preview name of this R2 bucket at the edge."
463
+ },
464
+ "jurisdiction": {
465
+ "type": "string",
466
+ "description": "The jurisdiction that the bucket exists in. Default if not present."
467
+ }
468
+ },
469
+ "required": [
470
+ "binding"
471
+ ],
472
+ "additionalProperties": false
473
+ },
474
+ "description": "Specifies R2 buckets 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.",
475
+ "default": []
1199
476
  },
1200
- "vars": {
1201
- "additionalProperties": {
1202
- "anyOf": [
1203
- {
1204
- "type": "string"
477
+ "d1_databases": {
478
+ "type": "array",
479
+ "items": {
480
+ "type": "object",
481
+ "properties": {
482
+ "binding": {
483
+ "type": "string",
484
+ "description": "The binding name used to refer to the D1 database in the Worker."
1205
485
  },
1206
- {
1207
- "$ref": "#/definitions/Json"
486
+ "database_name": {
487
+ "type": "string",
488
+ "description": "The name of this D1 database."
489
+ },
490
+ "database_id": {
491
+ "type": "string",
492
+ "description": "The UUID of this D1 database (not required)."
493
+ },
494
+ "preview_database_id": {
495
+ "type": "string",
496
+ "description": "The UUID of this D1 database for Wrangler Dev (if specified)."
497
+ },
498
+ "migrations_table": {
499
+ "type": "string",
500
+ "description": "The name of the migrations table for this D1 database (defaults to 'd1_migrations')."
501
+ },
502
+ "migrations_dir": {
503
+ "type": "string",
504
+ "description": "The path to the directory of migrations for this D1 database (defaults to './migrations')."
505
+ },
506
+ "database_internal_env": {
507
+ "type": "string",
508
+ "description": "Internal use only."
1208
509
  }
1209
- ]
510
+ },
511
+ "required": [
512
+ "binding"
513
+ ],
514
+ "additionalProperties": false
1210
515
  },
1211
- "default": {},
1212
- "description": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1213
- "type": "object"
516
+ "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.",
517
+ "default": []
1214
518
  },
1215
519
  "vectorize": {
1216
- "default": [],
1217
- "description": "Specifies Vectorize indexes 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.",
520
+ "type": "array",
1218
521
  "items": {
1219
- "additionalProperties": false,
522
+ "type": "object",
1220
523
  "properties": {
1221
524
  "binding": {
1222
- "description": "The binding name used to refer to the Vectorize index in the Worker.",
1223
- "type": "string"
525
+ "type": "string",
526
+ "description": "The binding name used to refer to the Vectorize index in the Worker."
1224
527
  },
1225
528
  "index_name": {
1226
- "description": "The name of the index.",
1227
- "type": "string"
529
+ "type": "string",
530
+ "description": "The name of the index."
1228
531
  }
1229
532
  },
1230
533
  "required": [
1231
534
  "binding",
1232
535
  "index_name"
1233
536
  ],
1234
- "type": "object"
1235
- },
1236
- "type": "array"
1237
- },
1238
- "version_metadata": {
1239
- "additionalProperties": false,
1240
- "description": "Binding to the Worker Version's metadata",
1241
- "properties": {
1242
- "binding": {
1243
- "type": "string"
1244
- }
1245
- },
1246
- "required": [
1247
- "binding"
1248
- ],
1249
- "type": "object"
1250
- },
1251
- "wasm_modules": {
1252
- "additionalProperties": {
1253
- "type": "string"
537
+ "additionalProperties": false
1254
538
  },
1255
- "description": "A list of wasm modules that your worker should be bound to. This is the \"legacy\" way of binding to a wasm module. ES module workers should do proper module imports.",
1256
- "type": "object"
1257
- },
1258
- "workers_dev": {
1259
- "default": true,
1260
- "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.",
1261
- "type": "boolean"
539
+ "description": "Specifies Vectorize indexes 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.",
540
+ "default": []
1262
541
  },
1263
- "workflows": {
1264
- "default": [],
1265
- "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
542
+ "hyperdrive": {
543
+ "type": "array",
1266
544
  "items": {
1267
- "$ref": "#/definitions/WorkflowBinding"
1268
- },
1269
- "type": "array"
1270
- }
1271
- },
1272
- "type": "object"
1273
- },
1274
- "RawDevConfig": {
1275
- "additionalProperties": false,
1276
- "properties": {
1277
- "host": {
1278
- "description": "Host to forward requests to, defaults to the host of the first route of project",
1279
- "type": "string"
1280
- },
1281
- "inspector_port": {
1282
- "default": 9229,
1283
- "description": "Port for the local dev server's inspector to listen on",
1284
- "type": "number"
1285
- },
1286
- "ip": {
1287
- "default": "localhost",
1288
- "description": "IP address for the local dev server to listen on,",
1289
- "type": "string"
1290
- },
1291
- "local_protocol": {
1292
- "default": "http",
1293
- "description": "Protocol that local wrangler dev server listens to requests on.",
1294
- "enum": [
1295
- "http",
1296
- "https"
1297
- ],
1298
- "type": "string"
1299
- },
1300
- "port": {
1301
- "default": 8787,
1302
- "description": "Port for the local dev server to listen on",
1303
- "type": "number"
1304
- },
1305
- "upstream_protocol": {
1306
- "default": "https",
1307
- "description": "Protocol that wrangler dev forwards requests on\n\nSetting this to `http` is not currently implemented for remote mode. See https://github.com/cloudflare/workers-sdk/issues/583",
1308
- "enum": [
1309
- "https",
1310
- "http"
1311
- ],
1312
- "type": "string"
1313
- }
1314
- },
1315
- "type": "object"
1316
- },
1317
- "RawEnvironment": {
1318
- "additionalProperties": false,
1319
- "description": "The raw environment configuration that we read from the config file.\n\nAll the properties are optional, and will be replaced with defaults in the configuration that is used in the rest of the codebase.",
1320
- "properties": {
1321
- "account_id": {
1322
- "description": "This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable.",
1323
- "type": "string"
545
+ "type": "object",
546
+ "properties": {
547
+ "binding": {
548
+ "type": "string",
549
+ "description": "The binding name used to refer to the project in the Worker."
550
+ },
551
+ "id": {
552
+ "type": "string",
553
+ "description": "The id of the database."
554
+ },
555
+ "localConnectionString": {
556
+ "type": "string",
557
+ "description": "The local database connection string for `wrangler dev`"
558
+ }
559
+ },
560
+ "required": [
561
+ "binding",
562
+ "id"
563
+ ],
564
+ "additionalProperties": false
565
+ },
566
+ "description": "Specifies Hyperdrive configs 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.",
567
+ "default": []
1324
568
  },
1325
- "ai": {
1326
- "additionalProperties": false,
1327
- "default": {},
1328
- "description": "Binding to the AI project.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1329
- "properties": {
1330
- "binding": {
1331
- "type": "string"
569
+ "services": {
570
+ "type": "array",
571
+ "items": {
572
+ "type": "object",
573
+ "properties": {
574
+ "binding": {
575
+ "type": "string",
576
+ "description": "The binding name used to refer to the bound service."
577
+ },
578
+ "service": {
579
+ "type": "string",
580
+ "description": "The name of the service."
581
+ },
582
+ "environment": {
583
+ "type": "string",
584
+ "description": "The environment of the service (e.g. production, staging, etc)."
585
+ },
586
+ "entrypoint": {
587
+ "type": "string",
588
+ "description": "Optionally, the entrypoint (named export) of the service to bind to."
589
+ }
1332
590
  },
1333
- "staging": {
1334
- "type": "boolean"
1335
- }
591
+ "required": [
592
+ "binding",
593
+ "service"
594
+ ],
595
+ "additionalProperties": false
1336
596
  },
1337
- "required": [
1338
- "binding"
1339
- ],
1340
- "type": "object"
597
+ "description": "Specifies service bindings (Worker-to-Worker) 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.",
598
+ "default": []
1341
599
  },
1342
600
  "analytics_engine_datasets": {
1343
- "default": [],
1344
- "description": "Specifies analytics engine datasets 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.",
601
+ "type": "array",
1345
602
  "items": {
1346
- "additionalProperties": false,
603
+ "type": "object",
1347
604
  "properties": {
1348
605
  "binding": {
1349
- "description": "The binding name used to refer to the dataset in the Worker.",
1350
- "type": "string"
606
+ "type": "string",
607
+ "description": "The binding name used to refer to the dataset in the Worker."
1351
608
  },
1352
609
  "dataset": {
1353
- "description": "The name of this dataset to write to.",
1354
- "type": "string"
610
+ "type": "string",
611
+ "description": "The name of this dataset to write to."
1355
612
  }
1356
613
  },
1357
614
  "required": [
1358
615
  "binding"
1359
616
  ],
1360
- "type": "object"
617
+ "additionalProperties": false
1361
618
  },
1362
- "type": "array"
1363
- },
1364
- "assets": {
1365
- "$ref": "#/definitions/Assets",
1366
- "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
1367
- },
1368
- "base_dir": {
1369
- "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.",
1370
- "type": "string"
619
+ "description": "Specifies analytics engine datasets 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.",
620
+ "default": []
1371
621
  },
1372
622
  "browser": {
623
+ "type": "object",
624
+ "properties": {
625
+ "binding": {
626
+ "type": "string"
627
+ }
628
+ },
629
+ "required": [
630
+ "binding"
631
+ ],
1373
632
  "additionalProperties": false,
1374
- "default": {},
1375
633
  "description": "A browser that will be usable from the Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
634
+ "default": {}
635
+ },
636
+ "ai": {
637
+ "type": "object",
1376
638
  "properties": {
1377
639
  "binding": {
1378
640
  "type": "string"
641
+ },
642
+ "staging": {
643
+ "type": "boolean"
1379
644
  }
1380
645
  },
1381
646
  "required": [
1382
647
  "binding"
1383
648
  ],
1384
- "type": "object"
1385
- },
1386
- "build": {
1387
649
  "additionalProperties": false,
1388
- "default": {
1389
- "watch_dir": "./src"
650
+ "description": "Binding to the AI project.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
651
+ "default": {}
652
+ },
653
+ "images": {
654
+ "type": "object",
655
+ "properties": {
656
+ "binding": {
657
+ "type": "string"
658
+ }
1390
659
  },
1391
- "description": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build) for more details.",
660
+ "required": [
661
+ "binding"
662
+ ],
663
+ "additionalProperties": false,
664
+ "description": "Binding to Cloudflare Images\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
665
+ "default": {}
666
+ },
667
+ "version_metadata": {
668
+ "type": "object",
1392
669
  "properties": {
1393
- "command": {
1394
- "description": "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.",
670
+ "binding": {
1395
671
  "type": "string"
672
+ }
673
+ },
674
+ "required": [
675
+ "binding"
676
+ ],
677
+ "additionalProperties": false,
678
+ "description": "Binding to the Worker Version's metadata"
679
+ },
680
+ "unsafe": {
681
+ "type": "object",
682
+ "properties": {
683
+ "bindings": {
684
+ "type": "array",
685
+ "items": {
686
+ "type": "object",
687
+ "properties": {
688
+ "name": {
689
+ "type": "string"
690
+ },
691
+ "type": {
692
+ "type": "string"
693
+ }
694
+ },
695
+ "required": [
696
+ "name",
697
+ "type"
698
+ ],
699
+ "additionalProperties": {}
700
+ },
701
+ "description": "A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare."
1396
702
  },
1397
- "cwd": {
1398
- "description": "The directory in which the command is executed.",
1399
- "type": "string"
703
+ "metadata": {
704
+ "type": "object",
705
+ "additionalProperties": {},
706
+ "description": "Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields."
1400
707
  },
1401
- "watch_dir": {
708
+ "capnp": {
1402
709
  "anyOf": [
1403
710
  {
1404
- "type": "string"
711
+ "type": "object",
712
+ "properties": {
713
+ "base_path": {
714
+ "type": "string"
715
+ },
716
+ "source_schemas": {
717
+ "type": "array",
718
+ "items": {
719
+ "type": "string"
720
+ }
721
+ }
722
+ },
723
+ "required": [
724
+ "base_path",
725
+ "source_schemas"
726
+ ],
727
+ "additionalProperties": false
1405
728
  },
1406
729
  {
1407
- "items": {
1408
- "type": "string"
730
+ "type": "object",
731
+ "properties": {
732
+ "compiled_schema": {
733
+ "type": "string"
734
+ }
1409
735
  },
1410
- "type": "array"
736
+ "required": [
737
+ "compiled_schema"
738
+ ],
739
+ "additionalProperties": false
1411
740
  }
1412
741
  ],
1413
- "description": "The directory to watch for changes while using wrangler dev, defaults to the current working directory"
742
+ "description": "Used for internal capnp uploads for the Workers runtime"
1414
743
  }
1415
744
  },
1416
- "type": "object"
1417
- },
1418
- "cloudchamber": {
1419
- "$ref": "#/definitions/CloudchamberConfig",
1420
- "default": {},
1421
- "description": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment."
1422
- },
1423
- "compatibility_date": {
1424
- "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-dates",
1425
- "type": "string"
1426
- },
1427
- "compatibility_flags": {
1428
- "default": [],
1429
- "description": "A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-flags",
1430
- "items": {
1431
- "type": "string"
1432
- },
1433
- "type": "array"
1434
- },
1435
- "containers": {
1436
- "default": [],
1437
- "description": "Container related configuration",
1438
- "items": {
1439
- "$ref": "#/definitions/ContainerApp"
1440
- },
1441
- "type": "array"
745
+ "additionalProperties": false,
746
+ "description": "\"Unsafe\" tables for features that aren't directly supported by wrangler.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
747
+ "default": {}
1442
748
  },
1443
- "d1_databases": {
1444
- "default": [],
1445
- "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.",
749
+ "mtls_certificates": {
750
+ "type": "array",
1446
751
  "items": {
1447
- "additionalProperties": false,
752
+ "type": "object",
1448
753
  "properties": {
1449
754
  "binding": {
1450
- "description": "The binding name used to refer to the D1 database in the Worker.",
1451
- "type": "string"
1452
- },
1453
- "database_id": {
1454
- "description": "The UUID of this D1 database (not required).",
1455
- "type": "string"
1456
- },
1457
- "database_internal_env": {
1458
- "description": "Internal use only.",
1459
- "type": "string"
755
+ "type": "string",
756
+ "description": "The binding name used to refer to the certificate in the Worker"
1460
757
  },
1461
- "database_name": {
1462
- "description": "The name of this D1 database.",
1463
- "type": "string"
1464
- },
1465
- "migrations_dir": {
1466
- "description": "The path to the directory of migrations for this D1 database (defaults to './migrations').",
1467
- "type": "string"
1468
- },
1469
- "migrations_table": {
1470
- "description": "The name of the migrations table for this D1 database (defaults to 'd1_migrations').",
1471
- "type": "string"
1472
- },
1473
- "preview_database_id": {
1474
- "description": "The UUID of this D1 database for Wrangler Dev (if specified).",
1475
- "type": "string"
758
+ "certificate_id": {
759
+ "type": "string",
760
+ "description": "The uuid of the uploaded mTLS certificate"
1476
761
  }
1477
762
  },
1478
763
  "required": [
1479
- "binding"
764
+ "binding",
765
+ "certificate_id"
1480
766
  ],
1481
- "type": "object"
767
+ "additionalProperties": false
1482
768
  },
1483
- "type": "array"
769
+ "description": "Specifies a list of mTLS certificates 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.",
770
+ "default": []
1484
771
  },
1485
- "define": {
1486
- "additionalProperties": {
1487
- "type": "string"
772
+ "tail_consumers": {
773
+ "type": "array",
774
+ "items": {
775
+ "$ref": "#/definitions/TailConsumer"
1488
776
  },
1489
- "default": {},
1490
- "description": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1491
- "type": "object"
777
+ "description": "Specifies a list of Tail Workers 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.",
778
+ "default": []
1492
779
  },
1493
780
  "dispatch_namespaces": {
1494
- "default": [],
1495
- "description": "Specifies namespace bindings 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.",
781
+ "type": "array",
1496
782
  "items": {
1497
- "additionalProperties": false,
783
+ "type": "object",
1498
784
  "properties": {
1499
785
  "binding": {
1500
- "description": "The binding name used to refer to the bound service.",
1501
- "type": "string"
786
+ "type": "string",
787
+ "description": "The binding name used to refer to the bound service."
1502
788
  },
1503
789
  "namespace": {
1504
- "description": "The namespace to bind to.",
1505
- "type": "string"
790
+ "type": "string",
791
+ "description": "The namespace to bind to."
1506
792
  },
1507
793
  "outbound": {
1508
794
  "$ref": "#/definitions/DispatchNamespaceOutbound",
@@ -1513,493 +799,790 @@
1513
799
  "binding",
1514
800
  "namespace"
1515
801
  ],
1516
- "type": "object"
802
+ "additionalProperties": false
1517
803
  },
1518
- "type": "array"
804
+ "description": "Specifies namespace bindings 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.",
805
+ "default": []
1519
806
  },
1520
- "durable_objects": {
807
+ "pipelines": {
808
+ "type": "array",
809
+ "items": {
810
+ "type": "object",
811
+ "properties": {
812
+ "binding": {
813
+ "type": "string",
814
+ "description": "The binding name used to refer to the bound service."
815
+ },
816
+ "pipeline": {
817
+ "type": "string",
818
+ "description": "Name of the Pipeline to bind"
819
+ }
820
+ },
821
+ "required": [
822
+ "binding",
823
+ "pipeline"
824
+ ],
825
+ "additionalProperties": false
826
+ },
827
+ "description": "Specifies list of Pipelines 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.",
828
+ "default": []
829
+ },
830
+ "pages_build_output_dir": {
831
+ "type": "string",
832
+ "description": "The directory of static assets to serve.\n\nThe presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules."
833
+ },
834
+ "legacy_env": {
835
+ "type": "boolean",
836
+ "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."
837
+ },
838
+ "send_metrics": {
839
+ "type": "boolean",
840
+ "description": "Whether Wrangler should send usage metrics to Cloudflare for this project.\n\nWhen defined this will override any user settings. Otherwise, Wrangler will use the user's preference."
841
+ },
842
+ "dev": {
843
+ "$ref": "#/definitions/RawDevConfig",
844
+ "description": "Options to configure the development server that your worker will use."
845
+ },
846
+ "site": {
847
+ "type": "object",
848
+ "properties": {
849
+ "bucket": {
850
+ "type": "string",
851
+ "description": "The directory containing your static assets.\n\nIt must be a path relative to your Wrangler configuration file. Example: bucket = \"./public\"\n\nIf there is a `site` field then it must contain this `bucket` field."
852
+ },
853
+ "entry-point": {
854
+ "type": "string",
855
+ "description": "The location of your Worker script.",
856
+ "deprecated": "DO NOT use this (it's a holdover from Wrangler v1.x). Either use the top level `main` field, or pass the path to your entry file as a command line argument."
857
+ },
858
+ "include": {
859
+ "type": "array",
860
+ "items": {
861
+ "type": "string"
862
+ },
863
+ "description": "An exclusive list of .gitignore-style patterns that match file or directory names from your bucket location. Only matched items will be uploaded. Example: include = [\"upload_dir\"]",
864
+ "default": []
865
+ },
866
+ "exclude": {
867
+ "type": "array",
868
+ "items": {
869
+ "type": "string"
870
+ },
871
+ "description": "A list of .gitignore-style patterns that match files or directories in your bucket that should be excluded from uploads. Example: exclude = [\"ignore_dir\"]",
872
+ "default": []
873
+ }
874
+ },
875
+ "required": [
876
+ "bucket"
877
+ ],
1521
878
  "additionalProperties": false,
1522
- "default": {
1523
- "bindings": []
879
+ "description": "The definition of a Worker Site, a feature that lets you upload static assets with your Worker.\n\nMore details at https://developers.cloudflare.com/workers/platform/sites"
880
+ },
881
+ "wasm_modules": {
882
+ "type": "object",
883
+ "additionalProperties": {
884
+ "type": "string"
885
+ },
886
+ "description": "A list of wasm modules that your worker should be bound to. This is the \"legacy\" way of binding to a wasm module. ES module workers should do proper module imports."
887
+ },
888
+ "text_blobs": {
889
+ "type": "object",
890
+ "additionalProperties": {
891
+ "type": "string"
892
+ },
893
+ "description": "A list of text files that your worker should be bound to. This is the \"legacy\" way of binding to a text file. ES module workers should do proper module imports."
894
+ },
895
+ "data_blobs": {
896
+ "type": "object",
897
+ "additionalProperties": {
898
+ "type": "string"
899
+ },
900
+ "description": "A list of data files that your worker should be bound to. This is the \"legacy\" way of binding to a data file. ES module workers should do proper module imports."
901
+ },
902
+ "alias": {
903
+ "type": "object",
904
+ "additionalProperties": {
905
+ "type": "string"
1524
906
  },
1525
- "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1526
- "properties": {
1527
- "bindings": {
1528
- "$ref": "#/definitions/DurableObjectBindings"
1529
- }
907
+ "description": "A map of module aliases. Lets you swap out a module for any others. Corresponds with esbuild's `alias` config"
908
+ },
909
+ "keep_vars": {
910
+ "type": "boolean",
911
+ "description": "By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.\n\nIf you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.\n\nIf you want to keep your dashboard vars when wrangler deploys, set this field to true.",
912
+ "default": false
913
+ }
914
+ }
915
+ },
916
+ "RawEnvironment": {
917
+ "type": "object",
918
+ "properties": {
919
+ "name": {
920
+ "type": "string",
921
+ "description": "The name of your Worker. Alphanumeric + dashes only."
922
+ },
923
+ "account_id": {
924
+ "type": "string",
925
+ "description": "This is the ID of the account associated with your zone. You might have more than one account, so make sure to use the ID of the account associated with the zone/route you provide, if you provide one. It can also be specified through the CLOUDFLARE_ACCOUNT_ID environment variable."
926
+ },
927
+ "compatibility_date": {
928
+ "type": "string",
929
+ "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-dates"
930
+ },
931
+ "compatibility_flags": {
932
+ "type": "array",
933
+ "items": {
934
+ "type": "string"
1530
935
  },
1531
- "required": [
1532
- "bindings"
1533
- ],
1534
- "type": "object"
936
+ "description": "A list of flags that enable features from upcoming features of the Workers runtime, usually used together with compatibility_date.\n\nMore details at https://developers.cloudflare.com/workers/platform/compatibility-flags",
937
+ "default": []
938
+ },
939
+ "main": {
940
+ "type": "string",
941
+ "description": "The entrypoint/path to the JavaScript file that will be executed."
1535
942
  },
1536
943
  "find_additional_modules": {
1537
- "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.",
1538
- "type": "boolean"
944
+ "type": "boolean",
945
+ "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."
1539
946
  },
1540
- "first_party_worker": {
1541
- "description": "Designates this Worker as an internal-only \"first-party\" Worker.",
1542
- "type": "boolean"
947
+ "preserve_file_names": {
948
+ "type": "boolean",
949
+ "description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`."
1543
950
  },
1544
- "hyperdrive": {
1545
- "default": [],
1546
- "description": "Specifies Hyperdrive configs 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.",
951
+ "base_dir": {
952
+ "type": "string",
953
+ "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."
954
+ },
955
+ "workers_dev": {
956
+ "type": "boolean",
957
+ "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.",
958
+ "default": true
959
+ },
960
+ "preview_urls": {
961
+ "type": "boolean",
962
+ "description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
963
+ "default": true
964
+ },
965
+ "routes": {
966
+ "type": "array",
1547
967
  "items": {
1548
- "additionalProperties": false,
1549
- "properties": {
1550
- "binding": {
1551
- "description": "The binding name used to refer to the project in the Worker.",
1552
- "type": "string"
1553
- },
1554
- "id": {
1555
- "description": "The id of the database.",
1556
- "type": "string"
1557
- },
1558
- "localConnectionString": {
1559
- "description": "The local database connection string for `wrangler dev`",
1560
- "type": "string"
1561
- }
1562
- },
1563
- "required": [
1564
- "binding",
1565
- "id"
1566
- ],
1567
- "type": "object"
968
+ "$ref": "#/definitions/Route"
1568
969
  },
1569
- "type": "array"
970
+ "description": "A list of routes that your Worker should be published to. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)"
1570
971
  },
1571
- "images": {
1572
- "additionalProperties": false,
1573
- "default": {},
1574
- "description": "Binding to Cloudflare Images\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1575
- "properties": {
1576
- "binding": {
1577
- "type": "string"
1578
- }
1579
- },
1580
- "required": [
1581
- "binding"
1582
- ],
1583
- "type": "object"
972
+ "route": {
973
+ "$ref": "#/definitions/Route",
974
+ "description": "A route that your Worker should be published to. Literally the same as routes, but only one. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker"
975
+ },
976
+ "tsconfig": {
977
+ "type": "string",
978
+ "description": "Path to a custom tsconfig"
1584
979
  },
1585
980
  "jsx_factory": {
1586
- "default": "React.createElement",
981
+ "type": "string",
1587
982
  "description": "The function to use to replace jsx syntax.",
1588
- "type": "string"
983
+ "default": "React.createElement"
1589
984
  },
1590
985
  "jsx_fragment": {
1591
- "default": "React.Fragment",
986
+ "type": "string",
1592
987
  "description": "The function to use to replace jsx fragment syntax.",
1593
- "type": "string"
988
+ "default": "React.Fragment"
1594
989
  },
1595
- "kv_namespaces": {
1596
- "default": [],
1597
- "description": "These specify any Workers KV Namespaces you want to access from inside your Worker.\n\nTo learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
990
+ "migrations": {
991
+ "type": "array",
1598
992
  "items": {
1599
- "additionalProperties": false,
1600
- "properties": {
1601
- "binding": {
1602
- "description": "The binding name used to refer to the KV Namespace",
1603
- "type": "string"
1604
- },
1605
- "id": {
1606
- "description": "The ID of the KV namespace",
1607
- "type": "string"
1608
- },
1609
- "preview_id": {
1610
- "description": "The ID of the KV namespace used during `wrangler dev`",
993
+ "$ref": "#/definitions/DurableObjectMigration"
994
+ },
995
+ "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
996
+ "default": []
997
+ },
998
+ "triggers": {
999
+ "type": "object",
1000
+ "properties": {
1001
+ "crons": {
1002
+ "type": "array",
1003
+ "items": {
1611
1004
  "type": "string"
1612
1005
  }
1613
- },
1614
- "required": [
1615
- "binding"
1616
- ],
1617
- "type": "object"
1006
+ }
1618
1007
  },
1619
- "type": "array"
1008
+ "required": [
1009
+ "crons"
1010
+ ],
1011
+ "additionalProperties": false,
1012
+ "description": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers",
1013
+ "default": {
1014
+ "crons": []
1015
+ }
1620
1016
  },
1621
1017
  "limits": {
1622
1018
  "$ref": "#/definitions/UserLimits",
1623
1019
  "description": "Specify limits for runtime behavior. Only supported for the \"standard\" Usage Model"
1624
1020
  },
1625
- "logfwdr": {
1021
+ "rules": {
1022
+ "type": "array",
1023
+ "items": {
1024
+ "$ref": "#/definitions/Rule"
1025
+ },
1026
+ "description": "An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS."
1027
+ },
1028
+ "build": {
1029
+ "type": "object",
1030
+ "properties": {
1031
+ "command": {
1032
+ "type": "string",
1033
+ "description": "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."
1034
+ },
1035
+ "cwd": {
1036
+ "type": "string",
1037
+ "description": "The directory in which the command is executed."
1038
+ },
1039
+ "watch_dir": {
1040
+ "anyOf": [
1041
+ {
1042
+ "type": "string"
1043
+ },
1044
+ {
1045
+ "type": "array",
1046
+ "items": {
1047
+ "type": "string"
1048
+ }
1049
+ }
1050
+ ],
1051
+ "description": "The directory to watch for changes while using wrangler dev, defaults to the current working directory"
1052
+ }
1053
+ },
1626
1054
  "additionalProperties": false,
1055
+ "description": "Configures a custom build step to be run by Wrangler when building your Worker.\n\nRefer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build) for more details.",
1627
1056
  "default": {
1628
- "bindings": []
1629
- },
1630
- "description": "List of bindings that you will send to logfwdr",
1057
+ "watch_dir": "./src"
1058
+ }
1059
+ },
1060
+ "no_bundle": {
1061
+ "type": "boolean",
1062
+ "description": "Skip internal build steps and directly deploy script"
1063
+ },
1064
+ "minify": {
1065
+ "type": "boolean",
1066
+ "description": "Minify the script before uploading."
1067
+ },
1068
+ "first_party_worker": {
1069
+ "type": "boolean",
1070
+ "description": "Designates this Worker as an internal-only \"first-party\" Worker."
1071
+ },
1072
+ "logfwdr": {
1073
+ "type": "object",
1631
1074
  "properties": {
1632
1075
  "bindings": {
1076
+ "type": "array",
1633
1077
  "items": {
1634
- "additionalProperties": false,
1078
+ "type": "object",
1635
1079
  "properties": {
1636
- "destination": {
1637
- "description": "The destination for this logged message",
1638
- "type": "string"
1639
- },
1640
1080
  "name": {
1641
- "description": "The binding name used to refer to logfwdr",
1642
- "type": "string"
1081
+ "type": "string",
1082
+ "description": "The binding name used to refer to logfwdr"
1083
+ },
1084
+ "destination": {
1085
+ "type": "string",
1086
+ "description": "The destination for this logged message"
1643
1087
  }
1644
1088
  },
1645
1089
  "required": [
1646
1090
  "name",
1647
1091
  "destination"
1648
1092
  ],
1649
- "type": "object"
1650
- },
1651
- "type": "array"
1093
+ "additionalProperties": false
1094
+ }
1652
1095
  }
1653
1096
  },
1654
1097
  "required": [
1655
1098
  "bindings"
1656
1099
  ],
1657
- "type": "object"
1100
+ "additionalProperties": false,
1101
+ "description": "List of bindings that you will send to logfwdr",
1102
+ "default": {
1103
+ "bindings": []
1104
+ }
1658
1105
  },
1659
1106
  "logpush": {
1660
- "description": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/",
1661
- "type": "boolean"
1107
+ "type": "boolean",
1108
+ "description": "Send Trace Events from this Worker to Workers Logpush.\n\nThis will not configure a corresponding Logpush job automatically.\n\nFor more information about Workers Logpush, see: https://blog.cloudflare.com/logpush-for-workers/"
1662
1109
  },
1663
- "main": {
1664
- "description": "The entrypoint/path to the JavaScript file that will be executed.",
1665
- "type": "string"
1110
+ "upload_source_maps": {
1111
+ "type": "boolean",
1112
+ "description": "Include source maps when uploading this worker."
1666
1113
  },
1667
- "migrations": {
1668
- "default": [],
1669
- "description": "A list of migrations that should be uploaded with your Worker.\n\nThese define changes in your Durable Object declarations.\n\nMore details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations",
1670
- "items": {
1671
- "$ref": "#/definitions/DurableObjectMigration"
1114
+ "placement": {
1115
+ "type": "object",
1116
+ "properties": {
1117
+ "mode": {
1118
+ "type": "string",
1119
+ "enum": [
1120
+ "off",
1121
+ "smart"
1122
+ ]
1123
+ },
1124
+ "hint": {
1125
+ "type": "string"
1126
+ }
1672
1127
  },
1673
- "type": "array"
1128
+ "required": [
1129
+ "mode"
1130
+ ],
1131
+ "additionalProperties": false,
1132
+ "description": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/"
1674
1133
  },
1675
- "minify": {
1676
- "description": "Minify the script before uploading.",
1677
- "type": "boolean"
1134
+ "assets": {
1135
+ "$ref": "#/definitions/Assets",
1136
+ "description": "Specify the directory of static assets to deploy/serve\n\nMore details at https://developers.cloudflare.com/workers/frameworks/"
1678
1137
  },
1679
- "mtls_certificates": {
1680
- "default": [],
1681
- "description": "Specifies a list of mTLS certificates 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.",
1682
- "items": {
1683
- "additionalProperties": false,
1684
- "properties": {
1685
- "binding": {
1686
- "description": "The binding name used to refer to the certificate in the Worker",
1138
+ "observability": {
1139
+ "$ref": "#/definitions/Observability",
1140
+ "description": "Specify the observability behavior of the Worker."
1141
+ },
1142
+ "define": {
1143
+ "type": "object",
1144
+ "additionalProperties": {
1145
+ "type": "string"
1146
+ },
1147
+ "description": "A map of values to substitute when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1148
+ "default": {}
1149
+ },
1150
+ "vars": {
1151
+ "type": "object",
1152
+ "additionalProperties": {
1153
+ "anyOf": [
1154
+ {
1687
1155
  "type": "string"
1688
1156
  },
1689
- "certificate_id": {
1690
- "description": "The uuid of the uploaded mTLS certificate",
1691
- "type": "string"
1157
+ {
1158
+ "$ref": "#/definitions/Json"
1692
1159
  }
1693
- },
1694
- "required": [
1695
- "binding",
1696
- "certificate_id"
1697
- ],
1698
- "type": "object"
1160
+ ]
1699
1161
  },
1700
- "type": "array"
1162
+ "description": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1163
+ "default": {}
1701
1164
  },
1702
- "name": {
1703
- "description": "The name of your Worker. Alphanumeric + dashes only.",
1704
- "type": "string"
1165
+ "durable_objects": {
1166
+ "type": "object",
1167
+ "properties": {
1168
+ "bindings": {
1169
+ "$ref": "#/definitions/DurableObjectBindings"
1170
+ }
1171
+ },
1172
+ "required": [
1173
+ "bindings"
1174
+ ],
1175
+ "additionalProperties": false,
1176
+ "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1177
+ "default": {
1178
+ "bindings": []
1179
+ }
1705
1180
  },
1706
- "no_bundle": {
1707
- "description": "Skip internal build steps and directly deploy script",
1708
- "type": "boolean"
1181
+ "workflows": {
1182
+ "type": "array",
1183
+ "items": {
1184
+ "$ref": "#/definitions/WorkflowBinding"
1185
+ },
1186
+ "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1187
+ "default": []
1709
1188
  },
1710
- "observability": {
1711
- "$ref": "#/definitions/Observability",
1712
- "description": "Specify the observability behavior of the Worker."
1189
+ "cloudchamber": {
1190
+ "$ref": "#/definitions/CloudchamberConfig",
1191
+ "description": "Cloudchamber configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1192
+ "default": {}
1713
1193
  },
1714
- "pipelines": {
1715
- "default": [],
1716
- "description": "Specifies list of Pipelines 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.",
1194
+ "containers": {
1195
+ "type": "array",
1196
+ "items": {
1197
+ "$ref": "#/definitions/ContainerApp"
1198
+ },
1199
+ "description": "Container related configuration",
1200
+ "default": []
1201
+ },
1202
+ "kv_namespaces": {
1203
+ "type": "array",
1717
1204
  "items": {
1718
- "additionalProperties": false,
1205
+ "type": "object",
1719
1206
  "properties": {
1720
1207
  "binding": {
1721
- "description": "The binding name used to refer to the bound service.",
1722
- "type": "string"
1208
+ "type": "string",
1209
+ "description": "The binding name used to refer to the KV Namespace"
1723
1210
  },
1724
- "pipeline": {
1725
- "description": "Name of the Pipeline to bind",
1726
- "type": "string"
1211
+ "id": {
1212
+ "type": "string",
1213
+ "description": "The ID of the KV namespace"
1214
+ },
1215
+ "preview_id": {
1216
+ "type": "string",
1217
+ "description": "The ID of the KV namespace used during `wrangler dev`"
1727
1218
  }
1728
1219
  },
1729
1220
  "required": [
1730
- "binding",
1731
- "pipeline"
1221
+ "binding"
1732
1222
  ],
1733
- "type": "object"
1223
+ "additionalProperties": false
1734
1224
  },
1735
- "type": "array"
1225
+ "description": "These specify any Workers KV Namespaces you want to access from inside your Worker.\n\nTo learn more about KV Namespaces, see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1226
+ "default": []
1736
1227
  },
1737
- "placement": {
1738
- "additionalProperties": false,
1739
- "description": "Specify how the Worker should be located to minimize round-trip time.\n\nMore details: https://developers.cloudflare.com/workers/platform/smart-placement/",
1740
- "properties": {
1741
- "hint": {
1742
- "type": "string"
1228
+ "send_email": {
1229
+ "type": "array",
1230
+ "items": {
1231
+ "type": "object",
1232
+ "properties": {
1233
+ "name": {
1234
+ "type": "string",
1235
+ "description": "The binding name used to refer to the this binding"
1236
+ },
1237
+ "destination_address": {
1238
+ "type": "string",
1239
+ "description": "If this binding should be restricted to a specific verified address"
1240
+ },
1241
+ "allowed_destination_addresses": {
1242
+ "type": "array",
1243
+ "items": {
1244
+ "type": "string"
1245
+ },
1246
+ "description": "If this binding should be restricted to a set of verified addresses"
1247
+ }
1743
1248
  },
1744
- "mode": {
1745
- "enum": [
1746
- "off",
1747
- "smart"
1748
- ],
1749
- "type": "string"
1750
- }
1249
+ "required": [
1250
+ "name"
1251
+ ],
1252
+ "additionalProperties": false
1751
1253
  },
1752
- "required": [
1753
- "mode"
1754
- ],
1755
- "type": "object"
1756
- },
1757
- "preserve_file_names": {
1758
- "description": "Determines whether Wrangler will preserve bundled file names. Defaults to false. If left unset, files will be named using the pattern ${fileHash}-${basename}, for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.",
1759
- "type": "boolean"
1760
- },
1761
- "preview_urls": {
1762
- "default": true,
1763
- "description": "Whether we use <version>-<name>.<subdomain>.workers.dev to serve Preview URLs for your Worker.",
1764
- "type": "boolean"
1254
+ "description": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1255
+ "default": []
1765
1256
  },
1766
1257
  "queues": {
1767
- "additionalProperties": false,
1768
- "default": {
1769
- "consumers": [],
1770
- "producers": []
1771
- },
1772
- "description": "Specifies Queues 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.",
1258
+ "type": "object",
1773
1259
  "properties": {
1774
- "consumers": {
1775
- "description": "Consumer configuration",
1260
+ "producers": {
1261
+ "type": "array",
1776
1262
  "items": {
1777
- "additionalProperties": false,
1263
+ "type": "object",
1778
1264
  "properties": {
1779
- "dead_letter_queue": {
1780
- "description": "The queue to send messages that failed to be consumed.",
1781
- "type": "string"
1782
- },
1783
- "max_batch_size": {
1784
- "description": "The maximum number of messages per batch",
1785
- "type": "number"
1786
- },
1787
- "max_batch_timeout": {
1788
- "description": "The maximum number of seconds to wait to fill a batch with messages.",
1789
- "type": "number"
1790
- },
1791
- "max_concurrency": {
1792
- "description": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog.",
1793
- "type": [
1794
- "number",
1795
- "null"
1796
- ]
1797
- },
1798
- "max_retries": {
1799
- "description": "The maximum number of retries for each message.",
1800
- "type": "number"
1265
+ "binding": {
1266
+ "type": "string",
1267
+ "description": "The binding name used to refer to the Queue in the Worker."
1801
1268
  },
1802
1269
  "queue": {
1803
- "description": "The name of the queue from which this consumer should consume.",
1804
- "type": "string"
1270
+ "type": "string",
1271
+ "description": "The name of this Queue."
1805
1272
  },
1806
- "retry_delay": {
1807
- "description": "The number of seconds to wait before retrying a message",
1808
- "type": "number"
1809
- },
1810
- "type": {
1811
- "description": "The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker.",
1812
- "type": "string"
1813
- },
1814
- "visibility_timeout_ms": {
1815
- "description": "The number of milliseconds to wait for pulled messages to become visible again",
1816
- "type": "number"
1273
+ "delivery_delay": {
1274
+ "type": "number",
1275
+ "description": "The number of seconds to wait before delivering a message"
1817
1276
  }
1818
1277
  },
1819
1278
  "required": [
1279
+ "binding",
1820
1280
  "queue"
1821
1281
  ],
1822
- "type": "object"
1282
+ "additionalProperties": false
1823
1283
  },
1824
- "type": "array"
1284
+ "description": "Producer bindings"
1825
1285
  },
1826
- "producers": {
1827
- "description": "Producer bindings",
1286
+ "consumers": {
1287
+ "type": "array",
1828
1288
  "items": {
1829
- "additionalProperties": false,
1289
+ "type": "object",
1830
1290
  "properties": {
1831
- "binding": {
1832
- "description": "The binding name used to refer to the Queue in the Worker.",
1833
- "type": "string"
1291
+ "queue": {
1292
+ "type": "string",
1293
+ "description": "The name of the queue from which this consumer should consume."
1834
1294
  },
1835
- "delivery_delay": {
1836
- "description": "The number of seconds to wait before delivering a message",
1837
- "type": "number"
1295
+ "type": {
1296
+ "type": "string",
1297
+ "description": "The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker."
1838
1298
  },
1839
- "queue": {
1840
- "description": "The name of this Queue.",
1841
- "type": "string"
1299
+ "max_batch_size": {
1300
+ "type": "number",
1301
+ "description": "The maximum number of messages per batch"
1302
+ },
1303
+ "max_batch_timeout": {
1304
+ "type": "number",
1305
+ "description": "The maximum number of seconds to wait to fill a batch with messages."
1306
+ },
1307
+ "max_retries": {
1308
+ "type": "number",
1309
+ "description": "The maximum number of retries for each message."
1310
+ },
1311
+ "dead_letter_queue": {
1312
+ "type": "string",
1313
+ "description": "The queue to send messages that failed to be consumed."
1314
+ },
1315
+ "max_concurrency": {
1316
+ "type": [
1317
+ "number",
1318
+ "null"
1319
+ ],
1320
+ "description": "The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog."
1321
+ },
1322
+ "visibility_timeout_ms": {
1323
+ "type": "number",
1324
+ "description": "The number of milliseconds to wait for pulled messages to become visible again"
1325
+ },
1326
+ "retry_delay": {
1327
+ "type": "number",
1328
+ "description": "The number of seconds to wait before retrying a message"
1842
1329
  }
1843
1330
  },
1844
1331
  "required": [
1845
- "binding",
1846
1332
  "queue"
1847
1333
  ],
1848
- "type": "object"
1334
+ "additionalProperties": false
1849
1335
  },
1850
- "type": "array"
1336
+ "description": "Consumer configuration"
1851
1337
  }
1852
1338
  },
1853
- "type": "object"
1339
+ "additionalProperties": false,
1340
+ "description": "Specifies Queues 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.",
1341
+ "default": {
1342
+ "consumers": [],
1343
+ "producers": []
1344
+ }
1854
1345
  },
1855
1346
  "r2_buckets": {
1856
- "default": [],
1857
- "description": "Specifies R2 buckets 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.",
1347
+ "type": "array",
1858
1348
  "items": {
1859
- "additionalProperties": false,
1349
+ "type": "object",
1860
1350
  "properties": {
1861
1351
  "binding": {
1862
- "description": "The binding name used to refer to the R2 bucket in the Worker.",
1863
- "type": "string"
1352
+ "type": "string",
1353
+ "description": "The binding name used to refer to the R2 bucket in the Worker."
1864
1354
  },
1865
1355
  "bucket_name": {
1866
- "description": "The name of this R2 bucket at the edge.",
1867
- "type": "string"
1868
- },
1869
- "jurisdiction": {
1870
- "description": "The jurisdiction that the bucket exists in. Default if not present.",
1871
- "type": "string"
1356
+ "type": "string",
1357
+ "description": "The name of this R2 bucket at the edge."
1872
1358
  },
1873
1359
  "preview_bucket_name": {
1874
- "description": "The preview name of this R2 bucket at the edge.",
1875
- "type": "string"
1360
+ "type": "string",
1361
+ "description": "The preview name of this R2 bucket at the edge."
1362
+ },
1363
+ "jurisdiction": {
1364
+ "type": "string",
1365
+ "description": "The jurisdiction that the bucket exists in. Default if not present."
1876
1366
  }
1877
1367
  },
1878
1368
  "required": [
1879
1369
  "binding"
1880
1370
  ],
1881
- "type": "object"
1371
+ "additionalProperties": false
1882
1372
  },
1883
- "type": "array"
1884
- },
1885
- "route": {
1886
- "$ref": "#/definitions/Route",
1887
- "description": "A route that your Worker should be published to. Literally the same as routes, but only one. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker"
1373
+ "description": "Specifies R2 buckets 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.",
1374
+ "default": []
1888
1375
  },
1889
- "routes": {
1890
- "description": "A list of routes that your Worker should be published to. Only one of `routes` or `route` is required.\n\nOnly required when workers_dev is false, and there's no scheduled Worker (see `triggers`)",
1376
+ "d1_databases": {
1377
+ "type": "array",
1891
1378
  "items": {
1892
- "$ref": "#/definitions/Route"
1379
+ "type": "object",
1380
+ "properties": {
1381
+ "binding": {
1382
+ "type": "string",
1383
+ "description": "The binding name used to refer to the D1 database in the Worker."
1384
+ },
1385
+ "database_name": {
1386
+ "type": "string",
1387
+ "description": "The name of this D1 database."
1388
+ },
1389
+ "database_id": {
1390
+ "type": "string",
1391
+ "description": "The UUID of this D1 database (not required)."
1392
+ },
1393
+ "preview_database_id": {
1394
+ "type": "string",
1395
+ "description": "The UUID of this D1 database for Wrangler Dev (if specified)."
1396
+ },
1397
+ "migrations_table": {
1398
+ "type": "string",
1399
+ "description": "The name of the migrations table for this D1 database (defaults to 'd1_migrations')."
1400
+ },
1401
+ "migrations_dir": {
1402
+ "type": "string",
1403
+ "description": "The path to the directory of migrations for this D1 database (defaults to './migrations')."
1404
+ },
1405
+ "database_internal_env": {
1406
+ "type": "string",
1407
+ "description": "Internal use only."
1408
+ }
1409
+ },
1410
+ "required": [
1411
+ "binding"
1412
+ ],
1413
+ "additionalProperties": false
1893
1414
  },
1894
- "type": "array"
1415
+ "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.",
1416
+ "default": []
1895
1417
  },
1896
- "rules": {
1897
- "description": "An ordered list of rules that define which modules to import, and what type to import them as. You will need to specify rules to use Text, Data, and CompiledWasm modules, or when you wish to have a .js file be treated as an ESModule instead of CommonJS.",
1418
+ "vectorize": {
1419
+ "type": "array",
1898
1420
  "items": {
1899
- "$ref": "#/definitions/Rule"
1421
+ "type": "object",
1422
+ "properties": {
1423
+ "binding": {
1424
+ "type": "string",
1425
+ "description": "The binding name used to refer to the Vectorize index in the Worker."
1426
+ },
1427
+ "index_name": {
1428
+ "type": "string",
1429
+ "description": "The name of the index."
1430
+ }
1431
+ },
1432
+ "required": [
1433
+ "binding",
1434
+ "index_name"
1435
+ ],
1436
+ "additionalProperties": false
1900
1437
  },
1901
- "type": "array"
1438
+ "description": "Specifies Vectorize indexes 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.",
1439
+ "default": []
1902
1440
  },
1903
- "send_email": {
1904
- "default": [],
1905
- "description": "These specify bindings to send email from inside your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1441
+ "hyperdrive": {
1442
+ "type": "array",
1906
1443
  "items": {
1907
- "additionalProperties": false,
1444
+ "type": "object",
1908
1445
  "properties": {
1909
- "allowed_destination_addresses": {
1910
- "description": "If this binding should be restricted to a set of verified addresses",
1911
- "items": {
1912
- "type": "string"
1913
- },
1914
- "type": "array"
1446
+ "binding": {
1447
+ "type": "string",
1448
+ "description": "The binding name used to refer to the project in the Worker."
1915
1449
  },
1916
- "destination_address": {
1917
- "description": "If this binding should be restricted to a specific verified address",
1918
- "type": "string"
1450
+ "id": {
1451
+ "type": "string",
1452
+ "description": "The id of the database."
1919
1453
  },
1920
- "name": {
1921
- "description": "The binding name used to refer to the this binding",
1922
- "type": "string"
1454
+ "localConnectionString": {
1455
+ "type": "string",
1456
+ "description": "The local database connection string for `wrangler dev`"
1923
1457
  }
1924
1458
  },
1925
1459
  "required": [
1926
- "name"
1460
+ "binding",
1461
+ "id"
1927
1462
  ],
1928
- "type": "object"
1463
+ "additionalProperties": false
1929
1464
  },
1930
- "type": "array"
1465
+ "description": "Specifies Hyperdrive configs 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.",
1466
+ "default": []
1931
1467
  },
1932
1468
  "services": {
1933
- "default": [],
1934
- "description": "Specifies service bindings (Worker-to-Worker) 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.",
1469
+ "type": "array",
1935
1470
  "items": {
1936
- "additionalProperties": false,
1471
+ "type": "object",
1937
1472
  "properties": {
1938
1473
  "binding": {
1939
- "description": "The binding name used to refer to the bound service.",
1940
- "type": "string"
1474
+ "type": "string",
1475
+ "description": "The binding name used to refer to the bound service."
1941
1476
  },
1942
- "entrypoint": {
1943
- "description": "Optionally, the entrypoint (named export) of the service to bind to.",
1944
- "type": "string"
1477
+ "service": {
1478
+ "type": "string",
1479
+ "description": "The name of the service."
1945
1480
  },
1946
1481
  "environment": {
1947
- "description": "The environment of the service (e.g. production, staging, etc).",
1948
- "type": "string"
1482
+ "type": "string",
1483
+ "description": "The environment of the service (e.g. production, staging, etc)."
1949
1484
  },
1950
- "service": {
1951
- "description": "The name of the service.",
1952
- "type": "string"
1485
+ "entrypoint": {
1486
+ "type": "string",
1487
+ "description": "Optionally, the entrypoint (named export) of the service to bind to."
1953
1488
  }
1954
1489
  },
1955
1490
  "required": [
1956
1491
  "binding",
1957
1492
  "service"
1958
1493
  ],
1959
- "type": "object"
1494
+ "additionalProperties": false
1960
1495
  },
1961
- "type": "array"
1496
+ "description": "Specifies service bindings (Worker-to-Worker) 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.",
1497
+ "default": []
1962
1498
  },
1963
- "tail_consumers": {
1964
- "default": [],
1965
- "description": "Specifies a list of Tail Workers 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.",
1499
+ "analytics_engine_datasets": {
1500
+ "type": "array",
1966
1501
  "items": {
1967
- "$ref": "#/definitions/TailConsumer"
1502
+ "type": "object",
1503
+ "properties": {
1504
+ "binding": {
1505
+ "type": "string",
1506
+ "description": "The binding name used to refer to the dataset in the Worker."
1507
+ },
1508
+ "dataset": {
1509
+ "type": "string",
1510
+ "description": "The name of this dataset to write to."
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "binding"
1515
+ ],
1516
+ "additionalProperties": false
1968
1517
  },
1969
- "type": "array"
1518
+ "description": "Specifies analytics engine datasets 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.",
1519
+ "default": []
1970
1520
  },
1971
- "triggers": {
1521
+ "browser": {
1522
+ "type": "object",
1523
+ "properties": {
1524
+ "binding": {
1525
+ "type": "string"
1526
+ }
1527
+ },
1528
+ "required": [
1529
+ "binding"
1530
+ ],
1972
1531
  "additionalProperties": false,
1973
- "default": {
1974
- "crons": []
1532
+ "description": "A browser that will be usable from the Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1533
+ "default": {}
1534
+ },
1535
+ "ai": {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "binding": {
1539
+ "type": "string"
1540
+ },
1541
+ "staging": {
1542
+ "type": "boolean"
1543
+ }
1975
1544
  },
1976
- "description": "\"Cron\" definitions to trigger a Worker's \"scheduled\" function.\n\nLets you call Workers periodically, much like a cron job.\n\nMore details here https://developers.cloudflare.com/workers/platform/cron-triggers",
1545
+ "required": [
1546
+ "binding"
1547
+ ],
1548
+ "additionalProperties": false,
1549
+ "description": "Binding to the AI project.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1550
+ "default": {}
1551
+ },
1552
+ "images": {
1553
+ "type": "object",
1977
1554
  "properties": {
1978
- "crons": {
1979
- "items": {
1980
- "type": "string"
1981
- },
1982
- "type": "array"
1555
+ "binding": {
1556
+ "type": "string"
1983
1557
  }
1984
1558
  },
1985
1559
  "required": [
1986
- "crons"
1560
+ "binding"
1987
1561
  ],
1988
- "type": "object"
1562
+ "additionalProperties": false,
1563
+ "description": "Binding to Cloudflare Images\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1564
+ "default": {}
1989
1565
  },
1990
- "tsconfig": {
1991
- "description": "Path to a custom tsconfig",
1992
- "type": "string"
1566
+ "version_metadata": {
1567
+ "type": "object",
1568
+ "properties": {
1569
+ "binding": {
1570
+ "type": "string"
1571
+ }
1572
+ },
1573
+ "required": [
1574
+ "binding"
1575
+ ],
1576
+ "additionalProperties": false,
1577
+ "description": "Binding to the Worker Version's metadata"
1993
1578
  },
1994
1579
  "unsafe": {
1995
- "additionalProperties": false,
1996
- "default": {},
1997
- "description": "\"Unsafe\" tables for features that aren't directly supported by wrangler.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1580
+ "type": "object",
1998
1581
  "properties": {
1999
1582
  "bindings": {
2000
- "description": "A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare.",
1583
+ "type": "array",
2001
1584
  "items": {
2002
- "additionalProperties": {},
1585
+ "type": "object",
2003
1586
  "properties": {
2004
1587
  "name": {
2005
1588
  "type": "string"
@@ -2012,33 +1595,38 @@
2012
1595
  "name",
2013
1596
  "type"
2014
1597
  ],
2015
- "type": "object"
1598
+ "additionalProperties": {}
2016
1599
  },
2017
- "type": "array"
1600
+ "description": "A set of bindings that should be put into a Worker's upload metadata without changes. These can be used to implement bindings for features that haven't released and aren't supported directly by wrangler or miniflare."
1601
+ },
1602
+ "metadata": {
1603
+ "type": "object",
1604
+ "additionalProperties": {},
1605
+ "description": "Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields."
2018
1606
  },
2019
1607
  "capnp": {
2020
1608
  "anyOf": [
2021
1609
  {
2022
- "additionalProperties": false,
1610
+ "type": "object",
2023
1611
  "properties": {
2024
1612
  "base_path": {
2025
1613
  "type": "string"
2026
1614
  },
2027
1615
  "source_schemas": {
1616
+ "type": "array",
2028
1617
  "items": {
2029
1618
  "type": "string"
2030
- },
2031
- "type": "array"
1619
+ }
2032
1620
  }
2033
1621
  },
2034
1622
  "required": [
2035
1623
  "base_path",
2036
1624
  "source_schemas"
2037
1625
  ],
2038
- "type": "object"
1626
+ "additionalProperties": false
2039
1627
  },
2040
1628
  {
2041
- "additionalProperties": false,
1629
+ "type": "object",
2042
1630
  "properties": {
2043
1631
  "compiled_schema": {
2044
1632
  "type": "string"
@@ -2047,145 +1635,365 @@
2047
1635
  "required": [
2048
1636
  "compiled_schema"
2049
1637
  ],
2050
- "type": "object"
1638
+ "additionalProperties": false
2051
1639
  }
2052
1640
  ],
2053
1641
  "description": "Used for internal capnp uploads for the Workers runtime"
2054
- },
2055
- "metadata": {
2056
- "additionalProperties": {},
2057
- "description": "Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified here will always be applied to metadata last, so can add new or override existing fields.",
2058
- "type": "object"
2059
1642
  }
2060
1643
  },
2061
- "type": "object"
1644
+ "additionalProperties": false,
1645
+ "description": "\"Unsafe\" tables for features that aren't directly supported by wrangler.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
1646
+ "default": {}
2062
1647
  },
2063
- "upload_source_maps": {
2064
- "description": "Include source maps when uploading this worker.",
2065
- "type": "boolean"
1648
+ "mtls_certificates": {
1649
+ "type": "array",
1650
+ "items": {
1651
+ "type": "object",
1652
+ "properties": {
1653
+ "binding": {
1654
+ "type": "string",
1655
+ "description": "The binding name used to refer to the certificate in the Worker"
1656
+ },
1657
+ "certificate_id": {
1658
+ "type": "string",
1659
+ "description": "The uuid of the uploaded mTLS certificate"
1660
+ }
1661
+ },
1662
+ "required": [
1663
+ "binding",
1664
+ "certificate_id"
1665
+ ],
1666
+ "additionalProperties": false
1667
+ },
1668
+ "description": "Specifies a list of mTLS certificates 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.",
1669
+ "default": []
2066
1670
  },
2067
- "vars": {
2068
- "additionalProperties": {
2069
- "anyOf": [
2070
- {
2071
- "type": "string"
1671
+ "tail_consumers": {
1672
+ "type": "array",
1673
+ "items": {
1674
+ "$ref": "#/definitions/TailConsumer"
1675
+ },
1676
+ "description": "Specifies a list of Tail Workers 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.",
1677
+ "default": []
1678
+ },
1679
+ "dispatch_namespaces": {
1680
+ "type": "array",
1681
+ "items": {
1682
+ "type": "object",
1683
+ "properties": {
1684
+ "binding": {
1685
+ "type": "string",
1686
+ "description": "The binding name used to refer to the bound service."
2072
1687
  },
2073
- {
2074
- "$ref": "#/definitions/Json"
1688
+ "namespace": {
1689
+ "type": "string",
1690
+ "description": "The namespace to bind to."
1691
+ },
1692
+ "outbound": {
1693
+ "$ref": "#/definitions/DispatchNamespaceOutbound",
1694
+ "description": "Details about the outbound Worker which will handle outbound requests from your namespace"
2075
1695
  }
2076
- ]
1696
+ },
1697
+ "required": [
1698
+ "binding",
1699
+ "namespace"
1700
+ ],
1701
+ "additionalProperties": false
2077
1702
  },
2078
- "default": {},
2079
- "description": "A map of environment variables to set when deploying your Worker.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
2080
- "type": "object"
1703
+ "description": "Specifies namespace bindings 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.",
1704
+ "default": []
2081
1705
  },
2082
- "vectorize": {
2083
- "default": [],
2084
- "description": "Specifies Vectorize indexes 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.",
1706
+ "pipelines": {
1707
+ "type": "array",
2085
1708
  "items": {
2086
- "additionalProperties": false,
1709
+ "type": "object",
2087
1710
  "properties": {
2088
1711
  "binding": {
2089
- "description": "The binding name used to refer to the Vectorize index in the Worker.",
1712
+ "type": "string",
1713
+ "description": "The binding name used to refer to the bound service."
1714
+ },
1715
+ "pipeline": {
1716
+ "type": "string",
1717
+ "description": "Name of the Pipeline to bind"
1718
+ }
1719
+ },
1720
+ "required": [
1721
+ "binding",
1722
+ "pipeline"
1723
+ ],
1724
+ "additionalProperties": false
1725
+ },
1726
+ "description": "Specifies list of Pipelines 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.",
1727
+ "default": []
1728
+ }
1729
+ },
1730
+ "additionalProperties": false,
1731
+ "description": "The raw environment configuration that we read from the config file.\n\nAll the properties are optional, and will be replaced with defaults in the configuration that is used in the rest of the codebase."
1732
+ },
1733
+ "Route": {
1734
+ "anyOf": [
1735
+ {
1736
+ "type": "string"
1737
+ },
1738
+ {
1739
+ "$ref": "#/definitions/ZoneIdRoute"
1740
+ },
1741
+ {
1742
+ "$ref": "#/definitions/ZoneNameRoute"
1743
+ },
1744
+ {
1745
+ "$ref": "#/definitions/CustomDomainRoute"
1746
+ }
1747
+ ]
1748
+ },
1749
+ "ZoneIdRoute": {
1750
+ "type": "object",
1751
+ "properties": {
1752
+ "pattern": {
1753
+ "type": "string"
1754
+ },
1755
+ "zone_id": {
1756
+ "type": "string"
1757
+ },
1758
+ "custom_domain": {
1759
+ "type": "boolean"
1760
+ }
1761
+ },
1762
+ "required": [
1763
+ "pattern",
1764
+ "zone_id"
1765
+ ],
1766
+ "additionalProperties": false
1767
+ },
1768
+ "ZoneNameRoute": {
1769
+ "type": "object",
1770
+ "properties": {
1771
+ "pattern": {
1772
+ "type": "string"
1773
+ },
1774
+ "zone_name": {
1775
+ "type": "string"
1776
+ },
1777
+ "custom_domain": {
1778
+ "type": "boolean"
1779
+ }
1780
+ },
1781
+ "required": [
1782
+ "pattern",
1783
+ "zone_name"
1784
+ ],
1785
+ "additionalProperties": false
1786
+ },
1787
+ "CustomDomainRoute": {
1788
+ "type": "object",
1789
+ "properties": {
1790
+ "pattern": {
1791
+ "type": "string"
1792
+ },
1793
+ "custom_domain": {
1794
+ "type": "boolean"
1795
+ }
1796
+ },
1797
+ "required": [
1798
+ "pattern",
1799
+ "custom_domain"
1800
+ ],
1801
+ "additionalProperties": false
1802
+ },
1803
+ "DurableObjectMigration": {
1804
+ "type": "object",
1805
+ "properties": {
1806
+ "tag": {
1807
+ "type": "string",
1808
+ "description": "A unique identifier for this migration."
1809
+ },
1810
+ "new_classes": {
1811
+ "type": "array",
1812
+ "items": {
1813
+ "type": "string"
1814
+ },
1815
+ "description": "The new Durable Objects being defined."
1816
+ },
1817
+ "new_sqlite_classes": {
1818
+ "type": "array",
1819
+ "items": {
1820
+ "type": "string"
1821
+ },
1822
+ "description": "The new SQLite Durable Objects being defined."
1823
+ },
1824
+ "renamed_classes": {
1825
+ "type": "array",
1826
+ "items": {
1827
+ "type": "object",
1828
+ "properties": {
1829
+ "from": {
2090
1830
  "type": "string"
2091
1831
  },
2092
- "index_name": {
2093
- "description": "The name of the index.",
1832
+ "to": {
2094
1833
  "type": "string"
2095
1834
  }
2096
1835
  },
2097
1836
  "required": [
2098
- "binding",
2099
- "index_name"
1837
+ "from",
1838
+ "to"
2100
1839
  ],
2101
- "type": "object"
1840
+ "additionalProperties": false
2102
1841
  },
2103
- "type": "array"
1842
+ "description": "The Durable Objects being renamed."
2104
1843
  },
2105
- "version_metadata": {
2106
- "additionalProperties": false,
2107
- "description": "Binding to the Worker Version's metadata",
2108
- "properties": {
2109
- "binding": {
2110
- "type": "string"
2111
- }
1844
+ "deleted_classes": {
1845
+ "type": "array",
1846
+ "items": {
1847
+ "type": "string"
2112
1848
  },
2113
- "required": [
2114
- "binding"
2115
- ],
2116
- "type": "object"
1849
+ "description": "The Durable Objects being removed."
1850
+ }
1851
+ },
1852
+ "required": [
1853
+ "tag"
1854
+ ],
1855
+ "additionalProperties": false,
1856
+ "description": "Configuration in wrangler for Durable Object Migrations"
1857
+ },
1858
+ "UserLimits": {
1859
+ "type": "object",
1860
+ "properties": {
1861
+ "cpu_ms": {
1862
+ "type": "number",
1863
+ "description": "Maximum allowed CPU time for a Worker's invocation in milliseconds"
1864
+ }
1865
+ },
1866
+ "required": [
1867
+ "cpu_ms"
1868
+ ],
1869
+ "additionalProperties": false
1870
+ },
1871
+ "Rule": {
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "type": {
1875
+ "$ref": "#/definitions/ConfigModuleRuleType"
2117
1876
  },
2118
- "workers_dev": {
2119
- "default": true,
2120
- "description": "Whether we use <name>.<subdomain>.workers.dev to test and deploy your Worker.",
1877
+ "globs": {
1878
+ "type": "array",
1879
+ "items": {
1880
+ "type": "string"
1881
+ }
1882
+ },
1883
+ "fallthrough": {
2121
1884
  "type": "boolean"
1885
+ }
1886
+ },
1887
+ "required": [
1888
+ "type",
1889
+ "globs"
1890
+ ],
1891
+ "additionalProperties": false,
1892
+ "description": "A bundling resolver rule, defining the modules type for paths that match the specified globs."
1893
+ },
1894
+ "ConfigModuleRuleType": {
1895
+ "type": "string",
1896
+ "enum": [
1897
+ "ESModule",
1898
+ "CommonJS",
1899
+ "CompiledWasm",
1900
+ "Text",
1901
+ "Data",
1902
+ "PythonModule",
1903
+ "PythonRequirement",
1904
+ "NodeJsCompatModule"
1905
+ ],
1906
+ "description": "The possible types for a `Rule`."
1907
+ },
1908
+ "Assets": {
1909
+ "type": "object",
1910
+ "properties": {
1911
+ "directory": {
1912
+ "type": "string",
1913
+ "description": "Absolute path to assets directory"
2122
1914
  },
2123
- "workflows": {
2124
- "default": [],
2125
- "description": "A list of workflows that your Worker should be bound to.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
2126
- "items": {
2127
- "$ref": "#/definitions/WorkflowBinding"
1915
+ "binding": {
1916
+ "type": "string",
1917
+ "description": "Name of `env` binding property in the User Worker."
1918
+ },
1919
+ "html_handling": {
1920
+ "type": "string",
1921
+ "enum": [
1922
+ "auto-trailing-slash",
1923
+ "force-trailing-slash",
1924
+ "drop-trailing-slash",
1925
+ "none"
1926
+ ],
1927
+ "description": "How to handle HTML requests."
1928
+ },
1929
+ "not_found_handling": {
1930
+ "type": "string",
1931
+ "enum": [
1932
+ "single-page-application",
1933
+ "404-page",
1934
+ "none"
1935
+ ],
1936
+ "description": "How to handle requests that do not match an asset."
1937
+ },
1938
+ "run_worker_first": {
1939
+ "type": "boolean",
1940
+ "description": "If true, route every request to the User Worker, whether or not it matches an asset. If false, then respond to requests that match an asset with that asset directly."
1941
+ }
1942
+ },
1943
+ "additionalProperties": false
1944
+ },
1945
+ "Observability": {
1946
+ "type": "object",
1947
+ "properties": {
1948
+ "enabled": {
1949
+ "type": "boolean",
1950
+ "description": "If observability is enabled for this Worker"
1951
+ },
1952
+ "head_sampling_rate": {
1953
+ "type": "number",
1954
+ "description": "The sampling rate"
1955
+ },
1956
+ "logs": {
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "enabled": {
1960
+ "type": "boolean"
1961
+ },
1962
+ "head_sampling_rate": {
1963
+ "type": "number",
1964
+ "description": "The sampling rate"
1965
+ },
1966
+ "invocation_logs": {
1967
+ "type": "boolean",
1968
+ "description": "Set to false to disable invocation logs"
1969
+ }
2128
1970
  },
2129
- "type": "array"
1971
+ "additionalProperties": false
2130
1972
  }
2131
1973
  },
2132
- "type": "object"
1974
+ "additionalProperties": false
2133
1975
  },
2134
- "Route": {
1976
+ "Json": {
2135
1977
  "anyOf": [
2136
1978
  {
2137
- "type": "string"
2138
- },
2139
- {
2140
- "$ref": "#/definitions/ZoneIdRoute"
1979
+ "$ref": "#/definitions/Literal"
2141
1980
  },
2142
1981
  {
2143
- "$ref": "#/definitions/ZoneNameRoute"
1982
+ "type": "object",
1983
+ "additionalProperties": {
1984
+ "$ref": "#/definitions/Json"
1985
+ }
2144
1986
  },
2145
1987
  {
2146
- "$ref": "#/definitions/CustomDomainRoute"
2147
- }
2148
- ]
2149
- },
2150
- "Rule": {
2151
- "additionalProperties": false,
2152
- "description": "A bundling resolver rule, defining the modules type for paths that match the specified globs.",
2153
- "properties": {
2154
- "fallthrough": {
2155
- "type": "boolean"
2156
- },
2157
- "globs": {
1988
+ "type": "array",
2158
1989
  "items": {
2159
- "type": "string"
2160
- },
2161
- "type": "array"
2162
- },
2163
- "type": {
2164
- "$ref": "#/definitions/ConfigModuleRuleType"
1990
+ "$ref": "#/definitions/Json"
1991
+ }
2165
1992
  }
2166
- },
2167
- "required": [
2168
- "type",
2169
- "globs"
2170
- ],
2171
- "type": "object"
1993
+ ]
2172
1994
  },
2173
- "TailConsumer": {
2174
- "additionalProperties": false,
2175
- "properties": {
2176
- "environment": {
2177
- "description": "(Optional) The environment of the service.",
2178
- "type": "string"
2179
- },
2180
- "service": {
2181
- "description": "The name of the service tail events will be forwarded to.",
2182
- "type": "string"
2183
- }
2184
- },
2185
- "required": [
2186
- "service"
2187
- ],
2188
- "type": "object"
1995
+ "Literal": {
1996
+ "$ref": "#/definitions/TypeOf%3CZodUnion%3C%5Bdef-class-1315922706-6501-8772-1315922706-0-54395%2Cdef-class-1315922706-9299-10989-1315922706-0-54395%2Cdef-class-1315922706-12937-13365-1315922706-0-54395%2Cdef-class-1315922706-15083-15273-1315922706-0-54395%5D%3E%3E"
2189
1997
  },
2190
1998
  "TypeOf<ZodUnion<[def-class-1315922706-6501-8772-1315922706-0-54395,def-class-1315922706-9299-10989-1315922706-0-54395,def-class-1315922706-12937-13365-1315922706-0-54395,def-class-1315922706-15083-15273-1315922706-0-54395]>>": {
2191
1999
  "type": [
@@ -2195,83 +2003,276 @@
2195
2003
  "null"
2196
2004
  ]
2197
2005
  },
2198
- "UserLimits": {
2199
- "additionalProperties": false,
2006
+ "DurableObjectBindings": {
2007
+ "type": "array",
2008
+ "items": {
2009
+ "type": "object",
2010
+ "properties": {
2011
+ "name": {
2012
+ "type": "string",
2013
+ "description": "The name of the binding used to refer to the Durable Object"
2014
+ },
2015
+ "class_name": {
2016
+ "type": "string",
2017
+ "description": "The exported class name of the Durable Object"
2018
+ },
2019
+ "script_name": {
2020
+ "type": "string",
2021
+ "description": "The script where the Durable Object is defined (if it's external to this Worker)"
2022
+ },
2023
+ "environment": {
2024
+ "type": "string",
2025
+ "description": "The service environment of the script_name to bind to"
2026
+ }
2027
+ },
2028
+ "required": [
2029
+ "name",
2030
+ "class_name"
2031
+ ],
2032
+ "additionalProperties": false
2033
+ }
2034
+ },
2035
+ "WorkflowBinding": {
2036
+ "type": "object",
2200
2037
  "properties": {
2201
- "cpu_ms": {
2202
- "description": "Maximum allowed CPU time for a Worker's invocation in milliseconds",
2203
- "type": "number"
2038
+ "binding": {
2039
+ "type": "string",
2040
+ "description": "The name of the binding used to refer to the Workflow"
2041
+ },
2042
+ "name": {
2043
+ "type": "string",
2044
+ "description": "The name of the Workflow"
2045
+ },
2046
+ "class_name": {
2047
+ "type": "string",
2048
+ "description": "The exported class name of the Workflow"
2049
+ },
2050
+ "script_name": {
2051
+ "type": "string",
2052
+ "description": "The script where the Workflow is defined (if it's external to this Worker)"
2204
2053
  }
2205
2054
  },
2206
2055
  "required": [
2207
- "cpu_ms"
2056
+ "binding",
2057
+ "name",
2058
+ "class_name"
2208
2059
  ],
2209
- "type": "object"
2060
+ "additionalProperties": false
2210
2061
  },
2211
- "WorkflowBinding": {
2212
- "additionalProperties": false,
2062
+ "CloudchamberConfig": {
2063
+ "type": "object",
2213
2064
  "properties": {
2214
- "binding": {
2215
- "description": "The name of the binding used to refer to the Workflow",
2065
+ "image": {
2216
2066
  "type": "string"
2217
2067
  },
2218
- "class_name": {
2219
- "description": "The exported class name of the Workflow",
2068
+ "location": {
2069
+ "type": "string"
2070
+ },
2071
+ "vcpu": {
2072
+ "type": "number"
2073
+ },
2074
+ "memory": {
2220
2075
  "type": "string"
2221
2076
  },
2077
+ "ipv4": {
2078
+ "type": "boolean"
2079
+ }
2080
+ },
2081
+ "additionalProperties": false,
2082
+ "description": "Configuration in wrangler for Cloudchamber"
2083
+ },
2084
+ "ContainerApp": {
2085
+ "type": "object",
2086
+ "properties": {
2222
2087
  "name": {
2223
- "description": "The name of the Workflow",
2224
2088
  "type": "string"
2225
2089
  },
2226
- "script_name": {
2227
- "description": "The script where the Workflow is defined (if it's external to this Worker)",
2090
+ "instances": {
2091
+ "type": "number"
2092
+ },
2093
+ "image": {
2094
+ "type": "string"
2095
+ },
2096
+ "class_name": {
2228
2097
  "type": "string"
2098
+ },
2099
+ "scheduling_policy": {
2100
+ "type": "string",
2101
+ "enum": [
2102
+ "regional",
2103
+ "moon"
2104
+ ]
2105
+ },
2106
+ "configuration": {
2107
+ "type": "object",
2108
+ "properties": {
2109
+ "image": {
2110
+ "type": "string"
2111
+ },
2112
+ "labels": {
2113
+ "type": "array",
2114
+ "items": {
2115
+ "type": "object",
2116
+ "properties": {
2117
+ "name": {
2118
+ "type": "string"
2119
+ },
2120
+ "value": {
2121
+ "type": "string"
2122
+ }
2123
+ },
2124
+ "required": [
2125
+ "name",
2126
+ "value"
2127
+ ],
2128
+ "additionalProperties": false
2129
+ }
2130
+ },
2131
+ "secrets": {
2132
+ "type": "array",
2133
+ "items": {
2134
+ "type": "object",
2135
+ "properties": {
2136
+ "name": {
2137
+ "type": "string"
2138
+ },
2139
+ "type": {
2140
+ "type": "string",
2141
+ "const": "env"
2142
+ },
2143
+ "secret": {
2144
+ "type": "string"
2145
+ }
2146
+ },
2147
+ "required": [
2148
+ "name",
2149
+ "type",
2150
+ "secret"
2151
+ ],
2152
+ "additionalProperties": false
2153
+ }
2154
+ }
2155
+ },
2156
+ "required": [
2157
+ "image"
2158
+ ],
2159
+ "additionalProperties": false
2160
+ },
2161
+ "constraints": {
2162
+ "type": "object",
2163
+ "properties": {
2164
+ "regions": {
2165
+ "type": "array",
2166
+ "items": {
2167
+ "type": "string"
2168
+ }
2169
+ },
2170
+ "cities": {
2171
+ "type": "array",
2172
+ "items": {
2173
+ "type": "string"
2174
+ }
2175
+ },
2176
+ "tier": {
2177
+ "type": "number"
2178
+ }
2179
+ },
2180
+ "additionalProperties": false
2229
2181
  }
2230
2182
  },
2231
2183
  "required": [
2232
- "binding",
2233
2184
  "name",
2234
- "class_name"
2185
+ "instances",
2186
+ "class_name",
2187
+ "configuration"
2235
2188
  ],
2236
- "type": "object"
2237
- },
2238
- "ZoneIdRoute": {
2239
2189
  "additionalProperties": false,
2190
+ "description": "Configuration for a container application"
2191
+ },
2192
+ "TailConsumer": {
2193
+ "type": "object",
2240
2194
  "properties": {
2241
- "custom_domain": {
2242
- "type": "boolean"
2243
- },
2244
- "pattern": {
2245
- "type": "string"
2195
+ "service": {
2196
+ "type": "string",
2197
+ "description": "The name of the service tail events will be forwarded to."
2246
2198
  },
2247
- "zone_id": {
2248
- "type": "string"
2199
+ "environment": {
2200
+ "type": "string",
2201
+ "description": "(Optional) The environment of the service."
2249
2202
  }
2250
2203
  },
2251
2204
  "required": [
2252
- "pattern",
2253
- "zone_id"
2205
+ "service"
2254
2206
  ],
2255
- "type": "object"
2207
+ "additionalProperties": false
2256
2208
  },
2257
- "ZoneNameRoute": {
2258
- "additionalProperties": false,
2209
+ "DispatchNamespaceOutbound": {
2210
+ "type": "object",
2259
2211
  "properties": {
2260
- "custom_domain": {
2261
- "type": "boolean"
2212
+ "service": {
2213
+ "type": "string",
2214
+ "description": "Name of the service handling the outbound requests"
2262
2215
  },
2263
- "pattern": {
2264
- "type": "string"
2216
+ "environment": {
2217
+ "type": "string",
2218
+ "description": "(Optional) Name of the environment handling the outbound requests."
2265
2219
  },
2266
- "zone_name": {
2267
- "type": "string"
2220
+ "parameters": {
2221
+ "type": "array",
2222
+ "items": {
2223
+ "type": "string"
2224
+ },
2225
+ "description": "(Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler"
2268
2226
  }
2269
2227
  },
2270
2228
  "required": [
2271
- "pattern",
2272
- "zone_name"
2229
+ "service"
2273
2230
  ],
2274
- "type": "object"
2231
+ "additionalProperties": false
2232
+ },
2233
+ "RawDevConfig": {
2234
+ "type": "object",
2235
+ "properties": {
2236
+ "ip": {
2237
+ "type": "string",
2238
+ "description": "IP address for the local dev server to listen on,",
2239
+ "default": "localhost"
2240
+ },
2241
+ "port": {
2242
+ "type": "number",
2243
+ "description": "Port for the local dev server to listen on",
2244
+ "default": 8787
2245
+ },
2246
+ "inspector_port": {
2247
+ "type": "number",
2248
+ "description": "Port for the local dev server's inspector to listen on",
2249
+ "default": 9229
2250
+ },
2251
+ "local_protocol": {
2252
+ "type": "string",
2253
+ "enum": [
2254
+ "http",
2255
+ "https"
2256
+ ],
2257
+ "description": "Protocol that local wrangler dev server listens to requests on.",
2258
+ "default": "http"
2259
+ },
2260
+ "upstream_protocol": {
2261
+ "type": "string",
2262
+ "enum": [
2263
+ "https",
2264
+ "http"
2265
+ ],
2266
+ "description": "Protocol that wrangler dev forwards requests on\n\nSetting this to `http` is not currently implemented for remote mode. See https://github.com/cloudflare/workers-sdk/issues/583",
2267
+ "default": "https"
2268
+ },
2269
+ "host": {
2270
+ "type": "string",
2271
+ "description": "Host to forward requests to, defaults to the host of the first route of project"
2272
+ }
2273
+ },
2274
+ "additionalProperties": false
2275
2275
  }
2276
- }
2276
+ },
2277
+ "allowTrailingCommas": true
2277
2278
  }