-
Notifications
You must be signed in to change notification settings - Fork 256
Expand file tree
/
Copy pathmelos.yaml.schema.json
More file actions
523 lines (523 loc) 路 20.2 KB
/
Copy pathmelos.yaml.schema.json
File metadata and controls
523 lines (523 loc) 路 20.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "melos.yaml",
"description": "The workspace configuration file for Melos",
"type": "object",
"required": ["name", "packages"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the Melos workspace - used by IDE documentation."
},
"repository": {
"anyOf": [
{
"type": "string",
"description": "The hosted git repository which contains the workspace."
},
{
"type": "object",
"description": "The self-hosted git repository which contains the workspace.",
"additionalProperties": false,
"required": ["type", "origin", "owner", "name"],
"properties": {
"type": {
"type": "string",
"description": "The type of repository",
"enum": ["github", "gitlab"]
},
"origin": {
"type": "string",
"description": "The origin of the repository, e.g. https://git.example.dev/gitlab"
},
"owner": {
"type": "string",
"description": "The owner of the repository"
},
"name": {
"type": "string",
"description": "The name of the repository"
}
}
}
]
},
"packages": {
"type": "array",
"description": "Patterns for packages that are included in the melos workspace.",
"items": { "type": "string" }
},
"ignore": {
"type": "array",
"description": "Patterns for packages to exclude from the melos workspace.",
"items": { "type": "string" }
},
"sdkPath": {
"type": "string",
"description": "Path to the Dart/Flutter SDK that should be used."
},
"useRootAsPackage": {
"type": "boolean",
"description": "Whether to include the repository root as a package in the workspace. Defaults to false.",
"default": false
},
"discoverNestedWorkspaces": {
"type": "boolean",
"description": "Whether to recursively discover packages in nested workspaces. Defaults to false.",
"default": false
},
"pub": {
"type": "object",
"description": "Configuration for HTTP requests to pub or alternate registries.",
"additionalProperties": false,
"properties": {
"timeoutSeconds": {
"type": "number",
"description": "Optional timeout in seconds applied to registry HTTP requests. Use 0 or omit to disable timeouts (default)."
},
"retry": {
"type": "object",
"description": "Retry/backoff settings applied to registry HTTP requests.",
"additionalProperties": false,
"properties": {
"delayFactorMillis": {
"type": "number",
"description": "Base delay in milliseconds before exponential backoff is applied. Defaults to 200ms."
},
"randomizationFactor": {
"type": "number",
"description": "Jitter factor between 0 and 1 applied to each retry delay. Defaults to 0.25 (25%)."
},
"maxDelaySeconds": {
"type": "number",
"description": "Maximum delay in seconds between retry attempts. Defaults to 30 seconds."
},
"maxAttempts": {
"type": "integer",
"description": "Maximum number of attempts (including the first request) before giving up. Defaults to 8."
}
}
}
}
},
"categories": {
"type": "object",
"description": "Categorize packages in the workspace.",
"additionalProperties": {
"type": "array",
"items": { "type": "string" }
}
},
"ide": {
"type": "object",
"description": "IDE-specific configurations.\n\nThis allows connecting the different scripts to the IDE or tells melos to generate the necessary files for mono-repositories to work in the IDE.",
"additionalProperties": false,
"properties": {
"intellij": {
"description": "IntelliJ-specific configurations.",
"anyOf": [
{
"type": "boolean",
"description": "Whether IntelliJ support is enabled."
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether IntelliJ support is enabled."
},
"moduleNamePrefix": {
"type": "string",
"description": "Used when generating IntelliJ project modules files, this value specifies a string to prepend to a package's IntelliJ module name.\n\nThe default is 'melos_'."
},
"scriptNamePrefix": {
"type": "string",
"description": "The text prepended to generated IntelliJ run configuration names for Melos scripts.\n\nThe default is 'Melos Run -> '. Set this to an empty string to omit the prefix."
}
}
}
]
}
}
},
"command": {
"type": "object",
"description": "Command-specific configurations.\n\nThis allows customizing the default behavior of melos commands.",
"additionalProperties": false,
"properties": {
"bootstrap": {
"type": "object",
"description": "The bootstrap command configuration.",
"additionalProperties": false,
"properties": {
"runPubGetInParallel": {
"type": "boolean",
"description": "Whether to run `pub get` in parallel during bootstrapping."
},
"runPubGetOffline": {
"type": "boolean",
"description": "Whether to attempt to run `pub get` in offline mode during bootstrapping."
},
"enforceLockfile": {
"type": "boolean",
"description": "Whether `pubspec.lock` is enforced when running `pub get` or not.\nUseful when you want to ensure the same versions of dependencies are used across different environments/machines.\n\nDefaults to false."
},
"hooks": {
"description": "Hooks to run at certain points of the command lifecycle.",
"allOf": [{ "$ref": "#/$defs/commonHooks" }]
},
"dependencyOverridePaths": {
"type": "array",
"description": "A list of paths to local packages relative to the workspace directory that should be added to each workspace package's dependency overrides. Each entry can be a specific path or a glob pattern.",
"items": {
"type": "string"
}
},
"dependencyOverrides": {
"type": "object",
"description": "Dependencies that should be added to each workspace package's dependency overrides."
},
"environment": {
"type": "object",
"description": "Environment configuration to be synced between all packages."
},
"dependencies": {
"type": "object",
"description": "Dependencies to be synced between all packages."
},
"dev_dependencies": {
"type": "object",
"description": "Dev dependencies to be synced between all packages."
}
}
},
"publish": {
"type": "object",
"description": "The publish command configuration.",
"additionalProperties": false,
"properties": {
"hooks": {
"type": "object",
"description": "Hooks to run at certain points of the command lifecycle.",
"properties": {
"pre": {
"type": "string",
"description": "Hook to run before publishing."
},
"post": {
"type": "string",
"description": "Hook to run after publishing."
}
}
}
}
},
"version": {
"type": "object",
"description": "The version command configuration.",
"additionalProperties": false,
"properties": {
"message": {
"type": "string",
"description": "A custom header for the generated CHANGELOG.md."
},
"includeScopes": {
"type": "string",
"description": "Whether to include conventional commit scopes in the generated CHANGELOG.md."
},
"linkToCommits": {
"type": "boolean",
"description": "Whether to add links to commits in the generated CHANGELOG.md.\n\nDisabled by default."
},
"workspaceChangelog": {
"type": "boolean",
"description": "Whether to additionally generate a summary CHANGELOG.md at the root of the workspace."
},
"branch": {
"type": "string",
"description": "If specified, prevents `melos version` from being used inside branches other than the one specified."
},
"updateGitTagRefs": {
"type": "boolean",
"description": "Whether to also update pubspec with git referenced packages."
},
"releaseUrl": {
"type": "boolean",
"description": "Whether to generate and print a link to the prefilled release creation page for each package after versioning.\n\nDisabled by default."
},
"mode": {
"type": "string",
"enum": ["independent", "fixed"],
"description": "The mode in which packages in the workspace are versioned. In \"fixed\" mode (also known as lockstep versioning), every versioning run bumps all packages to the same new version, which is determined by the most significant change across the whole workspace.\n\nDefaults to \"independent\"."
},
"fetchTags": {
"type": "boolean",
"description": "Whether to fetch tags from the origin remote before versioning.\n\nDefaults to true."
},
"changelogFormat": {
"type": "object",
"description": "Configure the format of the generated CHANGELOG.md.",
"additionalProperties": false,
"properties": {
"includeDate": {
"type": "boolean",
"description": "Whether to include the date in the changelog entry in the `yyyy-MM-dd` format.\n\nDisabled by default."
},
"groupByType": {
"type": "boolean",
"description": "Whether to group changelog entries by their conventional commit type (e.g. all features under a \"Features\" header and all fixes under a \"Bug Fixes\" header).\n\nDisabled by default."
}
}
},
"hooks": {
"description": "Hooks to run at certain points of the command lifecycle.",
"allOf": [
{ "$id": "#/$defs/commonHooks" },
{
"type": "object",
"properties": {
"preCommit": { "$ref": "#/$defs/script" }
}
}
]
}
}
},
"clean": {
"type": "object",
"description": "The clean command configuration.",
"additionalProperties": false,
"properties": {
"hooks": {
"description": "Hooks to run at certain points of the command lifecycle.",
"allOf": [{ "$ref": "#/$defs/commonHooks" }]
}
}
}
}
},
"scripts": {
"type": "object",
"description": "A list of scripts that can be executed with `melos run` or will be executed before/after some specific melos commands.",
"additionalProperties": { "$ref": "#/$defs/script" }
}
},
"$defs": {
"script": {
"anyOf": [
{ "type": "string", "description": "The command to execute." },
{
"allOf": [
{
"anyOf": [
{
"type": "object",
"required": ["run"],
"properties": { "run": { "type": "string" } }
},
{
"type": "object",
"required": ["exec"],
"properties": { "exec": { "type": "string" } }
},
{
"type": "object",
"required": ["exec", "run"],
"properties": { "exec": { "type": "object" } }
}
]
},
{
"type": "object",
"description": "The script definition.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "A unique identifier for the script."
},
"description": {
"type": "string",
"description": "A short description, shown when using `melos run` with no argument."
},
"run": {
"type": "string",
"description": "The command to execute."
},
"exec": {
"anyOf": [
{
"type": "string",
"description": "The command to execute in multiple packages."
},
{
"type": "object",
"description": "The options to pass to `exec`.",
"properties": {
"concurrency": {
"type": "number",
"description": "The number of packages to execute the command in concurrently."
},
"failFast": {
"type": "boolean",
"description": "Whether exec should fail fast and not execute the script in further packages if the script fails in a individual package."
}
}
}
]
},
"env": {
"type": "object",
"description": "Environment variables that will be passed to the command to execute.",
"additionalProperties": {
"anyOf": [
{ "type": "string" },
{ "type": "number" },
{ "type": "integer" },
{ "type": "boolean" },
{ "type": "null" }
],
"description": "The value of the environment variable."
}
},
"packageFilters": {
"type": "object",
"description": "If the command to execute is a melos command, allows filtering packages that will execute the command.",
"additionalProperties": false,
"properties": {
"scope": {
"description": "Patterns for including packages by name.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"ignore": {
"description": "Patterns for excluding packages by name.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"dirExists": {
"description": "Include a package only if a given directory exists.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"fileExists": {
"description": "Include a package only if a given file exists.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"dependsOn": {
"description": "Include only packages that depend on a specific package.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"noDependsOn": {
"description": "Include only packages that do not depend on a specific package.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
},
"diff": {
"type": "string",
"description": "Filter packages based on whether there were changes between a commit and the current HEAD or within a range of commits. A range of commits can be specified using the git short hand syntax `<start-commit>..<end-commit>` and `<start-commit>...<end-commit>."
},
"private": {
"type": "boolean",
"description": "Include packages with `publish_to: none`."
},
"noPrivate": {
"type": "boolean",
"description": "Exclude packages with `publish_to: none`."
},
"published": {
"type": "boolean",
"description": "Include/Exclude packages that are up-to-date on pub.dev."
},
"nullSafety": {
"type": "boolean",
"description": "Include/Exclude packages that are null-safe."
},
"flutter": {
"type": "boolean",
"description": "Include/Exclude packages that are Flutter packages."
}
}
}
}
}
]
},
{
"type": "object",
"required": ["steps"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "A unique identifier for the script."
},
"description": {
"type": "string",
"description": "A short description, shown when using `melos run` with no argument."
},
"steps": {
"type": "array",
"description": "A list of commands to execute sequentially, enabling complex workflows.",
"items": { "type": "string" }
}
}
}
]
},
"commonHooks": {
"type": "object",
"properties": {
"pre": { "$ref": "#/$defs/script" },
"post": { "$ref": "#/$defs/script" }
}
}
}
}