Skip to content

Commit 16de0d5

Browse files
authored
docs: include links to the docs in the wrangler config schema (#9265)
* docs: include links to the docs in the wrangler config schema * add changeset
1 parent 2fe6219 commit 16de0d5

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

.changeset/social-carpets-start.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
docs: add documentation links to individual config properties in the JSON schema of the Wrangler config file

packages/wrangler/src/config/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export interface ConfigFields<Dev extends RawDevConfig> {
6565

6666
/**
6767
* Options to configure the development server that your worker will use.
68+
*
69+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#local-development-settings
6870
*/
6971
dev: Dev;
7072

@@ -73,6 +75,8 @@ export interface ConfigFields<Dev extends RawDevConfig> {
7375
* static assets with your Worker.
7476
*
7577
* More details at https://developers.cloudflare.com/workers/platform/sites
78+
*
79+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-sites
7680
*/
7781
site:
7882
| {
@@ -152,6 +156,8 @@ export interface ConfigFields<Dev extends RawDevConfig> {
152156
/**
153157
* A map of module aliases. Lets you swap out a module for any others.
154158
* Corresponds with esbuild's `alias` config
159+
*
160+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing
155161
*/
156162
alias: { [key: string]: string } | undefined;
157163

packages/wrangler/src/config/environment.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ interface EnvironmentInheritable {
200200
* Whether we use <name>.<subdomain>.workers.dev to
201201
* test and deploy your Worker.
202202
*
203+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
203204
*
204205
* @default true
205206
* @breaking
@@ -223,6 +224,8 @@ interface EnvironmentInheritable {
223224
*
224225
* Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
225226
*
227+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
228+
*
226229
* @inheritable
227230
*/
228231
routes: Route[] | undefined;
@@ -280,6 +283,8 @@ interface EnvironmentInheritable {
280283
*
281284
* More details here https://developers.cloudflare.com/workers/platform/cron-triggers
282285
*
286+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
287+
*
283288
* @default {crons:[]}
284289
* @inheritable
285290
*/
@@ -289,6 +294,8 @@ interface EnvironmentInheritable {
289294
* Specify limits for runtime behavior.
290295
* Only supported for the "standard" Usage Model
291296
*
297+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
298+
*
292299
* @inheritable
293300
*/
294301
limits: UserLimits | undefined;
@@ -299,6 +306,8 @@ interface EnvironmentInheritable {
299306
* to use Text, Data, and CompiledWasm modules, or when you wish to
300307
* have a .js file be treated as an ESModule instead of CommonJS.
301308
*
309+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
310+
*
302311
* @inheritable
303312
*/
304313
rules: Rule[];
@@ -309,6 +318,8 @@ interface EnvironmentInheritable {
309318
* Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
310319
* for more details.
311320
*
321+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
322+
*
312323
* @default {watch_dir:"./src"}
313324
*/
314325
build: {
@@ -376,6 +387,9 @@ interface EnvironmentInheritable {
376387

377388
/**
378389
* Include source maps when uploading this worker.
390+
*
391+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
392+
*
379393
* @inheritable
380394
*/
381395
upload_source_maps: boolean | undefined;
@@ -394,13 +408,17 @@ interface EnvironmentInheritable {
394408
*
395409
* More details at https://developers.cloudflare.com/workers/frameworks/
396410
*
411+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
412+
*
397413
* @inheritable
398414
*/
399415
assets: Assets | undefined;
400416

401417
/**
402418
* Specify the observability behavior of the Worker.
403419
*
420+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
421+
*
404422
* @inheritable
405423
*/
406424
observability: Observability | undefined;
@@ -454,6 +472,8 @@ export interface EnvironmentNonInheritable {
454472
* NOTE: This field is not automatically inherited from the top level environment,
455473
* and so must be specified in every named environment.
456474
*
475+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
476+
*
457477
* @default {}
458478
* @nonInheritable
459479
*/
@@ -468,6 +488,8 @@ export interface EnvironmentNonInheritable {
468488
* NOTE: This field is not automatically inherited from the top level environment,
469489
* and so must be specified in every named environment.
470490
*
491+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
492+
*
471493
* @default {bindings:[]}
472494
* @nonInheritable
473495
*/
@@ -515,6 +537,8 @@ export interface EnvironmentNonInheritable {
515537
* NOTE: This field is not automatically inherited from the top level environment,
516538
* and so must be specified in every named environment.
517539
*
540+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
541+
*
518542
* @default []
519543
* @nonInheritable
520544
*/
@@ -535,6 +559,8 @@ export interface EnvironmentNonInheritable {
535559
* NOTE: This field is not automatically inherited from the top level environment,
536560
* and so must be specified in every named environment.
537561
*
562+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
563+
*
538564
* @default []
539565
* @nonInheritable
540566
*/
@@ -553,6 +579,8 @@ export interface EnvironmentNonInheritable {
553579
* NOTE: This field is not automatically inherited from the top level environment,
554580
* and so must be specified in every named environment.
555581
*
582+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
583+
*
556584
* @default {consumers:[],producers:[]}
557585
* @nonInheritable
558586
*/
@@ -609,6 +637,8 @@ export interface EnvironmentNonInheritable {
609637
* NOTE: This field is not automatically inherited from the top level environment,
610638
* and so must be specified in every named environment.
611639
*
640+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
641+
*
612642
* @default []
613643
* @nonInheritable
614644
*/
@@ -631,6 +661,8 @@ export interface EnvironmentNonInheritable {
631661
* NOTE: This field is not automatically inherited from the top level environment,
632662
* and so must be specified in every named environment.
633663
*
664+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
665+
*
634666
* @default []
635667
* @nonInheritable
636668
*/
@@ -659,6 +691,8 @@ export interface EnvironmentNonInheritable {
659691
* NOTE: This field is not automatically inherited from the top level environment,
660692
* and so must be specified in every named environment.
661693
*
694+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
695+
*
662696
* @default []
663697
* @nonInheritable
664698
*/
@@ -675,6 +709,8 @@ export interface EnvironmentNonInheritable {
675709
* NOTE: This field is not automatically inherited from the top level environment,
676710
* and so must be specified in every named environment.
677711
*
712+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
713+
*
678714
* @default []
679715
* @nonInheritable
680716
*/
@@ -693,6 +729,8 @@ export interface EnvironmentNonInheritable {
693729
* NOTE: This field is not automatically inherited from the top level environment,
694730
* and so must be specified in every named environment.
695731
*
732+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
733+
*
696734
* @default []
697735
* @nonInheritable
698736
*/
@@ -719,6 +757,8 @@ export interface EnvironmentNonInheritable {
719757
* NOTE: This field is not automatically inherited from the top level environment,
720758
* and so must be specified in every named environment.
721759
*
760+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
761+
*
722762
* @default []
723763
* @nonInheritable
724764
*/
@@ -735,6 +775,8 @@ export interface EnvironmentNonInheritable {
735775
* NOTE: This field is not automatically inherited from the top level environment,
736776
* and so must be specified in every named environment.
737777
*
778+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
779+
*
738780
* @default {}
739781
* @nonInheritable
740782
*/
@@ -750,6 +792,8 @@ export interface EnvironmentNonInheritable {
750792
* NOTE: This field is not automatically inherited from the top level environment,
751793
* and so must be specified in every named environment.
752794
*
795+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
796+
*
753797
* @default {}
754798
* @nonInheritable
755799
*/
@@ -766,6 +810,8 @@ export interface EnvironmentNonInheritable {
766810
* NOTE: This field is not automatically inherited from the top level environment,
767811
* and so must be specified in every named environment.
768812
*
813+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
814+
*
769815
* @default {}
770816
* @nonInheritable
771817
*/
@@ -835,6 +881,8 @@ export interface EnvironmentNonInheritable {
835881
* NOTE: This field is not automatically inherited from the top level environment,
836882
* and so must be specified in every named environment.
837883
*
884+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
885+
*
838886
* @default []
839887
* @nonInheritable
840888
*/
@@ -862,6 +910,8 @@ export interface EnvironmentNonInheritable {
862910
* NOTE: This field is not automatically inherited from the top level environment,
863911
* and so must be specified in every named environment.
864912
*
913+
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
914+
*
865915
* @default []
866916
* @nonInheritable
867917
*/

0 commit comments

Comments
 (0)