@dragonmastery/tamer 0.1.0 → 0.1.2

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