-
Notifications
You must be signed in to change notification settings - Fork 1
/
melos.yaml.schema.json
346 lines (346 loc) · 13.7 KB
/
melos.yaml.schema.json
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
{
"$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."
},
"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_'."
}
}
}
]
}
}
},
"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": {
"usePubspecOverrides": {
"type": "boolean",
"description": "Whether to use `pubspec_overrides.yaml` for overriding workspace dependencies during development."
},
"runPubGetInParallel": {
"type": "boolean",
"description": "Whether to run `pub get` in parallel during bootstrapping."
}
}
},
"version": {
"type": "object",
"description": "The version command configuration.",
"additionalProperties": false,
"properties": {
"message": {
"type": "string",
"description": "A custom header for 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."
}
}
}
}
},
"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": {
"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."
},
"concurrency": {
"type": "number",
"description": "Defines the max concurrency value of how many packages will execute the command in at any one time. Defaults to 5"
},
"fail-fast": {
"type": "boolean",
"description": "Whether exec should fail fast and not execute the script in further packages if the script fails in an individual package. Defaults to false."
},
"order-dependents": {
"type": "boolean",
"description": "Whether exec should order the execution of the script in multiple packages based on the dependency graph of the packages. The script will be executed in leaf packages first and then in packages that depend on them and so on. This is useful for example, for a script that generates code in multiple packages, which depend on each other. Defaults to false."
},
"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" }
}
]
},
"since": {
"type": "string",
"description": "Filter package based on whether they received changed since a specific git commit/tag ID."
},
"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."
},
"null-safety": {
"type": "boolean",
"description": "Include/Exclude packages that are null-safe."
},
"flutter": {
"type": "boolean",
"description": "Include/Exclude packages that are Flutter packages."
}
}
}
}
}
]
}
]
}
}
}
}