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