|
67 | 67 | "description": "Indicates if the argument is positional.", |
68 | 68 | "type": "boolean" |
69 | 69 | }, |
| 70 | + "choices": { |
| 71 | + "description": "Constrain the accepted values for an argument to a fixed set.", |
| 72 | + "oneOf": [ |
| 73 | + { "items": { "type": "string" } }, |
| 74 | + { "items": { "type": "integer" } }, |
| 75 | + { "items": { "type": "number" } } |
| 76 | + ], |
| 77 | + "type": "array" |
| 78 | + }, |
70 | 79 | "required": { |
71 | 80 | "description": "Indicates if the argument is required.", |
72 | 81 | "type": "boolean" |
|
160 | 169 | "then": { "not": { "required": ["capture_stdout"] } }, |
161 | 170 | "type": "object" |
162 | 171 | }, |
| 172 | + "ignore_fail_exec_option": { |
| 173 | + "description": "Return exit code 0 even if the task fails, or specify a list of task exit codes to ignore.", |
| 174 | + "examples": [true], |
| 175 | + "oneOf": [ |
| 176 | + { "type": "array", "items": { "type": "integer" } }, |
| 177 | + { "type": "boolean" } |
| 178 | + ] |
| 179 | + }, |
| 180 | + "ignore_fail_tasks_option": { |
| 181 | + "description": "If set, the sequence will continue running even if one of the tasks fails.", |
| 182 | + "examples": [true, "return_zero", "return_non_zero"], |
| 183 | + "oneOf": [ |
| 184 | + { |
| 185 | + "type": "boolean" |
| 186 | + }, |
| 187 | + { |
| 188 | + "enum": ["return_zero", "return_non_zero"], |
| 189 | + "type": "string" |
| 190 | + } |
| 191 | + ] |
| 192 | + }, |
163 | 193 | "env_option": { |
164 | 194 | "additionalProperties": false, |
165 | 195 | "patternProperties": { |
|
185 | 215 | "description": "Provide one or more env files to be loaded before running this task. If an array is provided, files will be loaded in the given order.", |
186 | 216 | "oneOf": [ |
187 | 217 | { |
188 | | - "description": "The name or relative path to a single env file.", |
189 | | - "type": "string" |
| 218 | + "$ref": "#/definitions/envfile_option/definitions/envfile" |
190 | 219 | }, |
191 | 220 | { |
192 | | - "description": "An array of names or relative paths to env files which will be loaded in the given order.", |
193 | | - "items": { |
194 | | - "description": "The name or relative path to an env file.", |
195 | | - "type": "string" |
| 221 | + "properties": { |
| 222 | + "expected": { |
| 223 | + "$ref": "#/definitions/envfile_option/definitions/envfile", |
| 224 | + "description": "Provide one or more env files to be loaded before running this task. Emit a warning if any specified envfile is missing." |
| 225 | + }, |
| 226 | + "optional": { |
| 227 | + "$ref": "#/definitions/envfile_option/definitions/envfile", |
| 228 | + "description": "Provide one or more env files to be loaded before running this task. Do not emit a warning even if a specified envfile is missing." |
| 229 | + } |
196 | 230 | }, |
197 | | - "type": "array" |
| 231 | + "type": "object" |
198 | 232 | } |
199 | | - ] |
| 233 | + ], |
| 234 | + "definitions": { |
| 235 | + "envfile": { |
| 236 | + "oneOf": [ |
| 237 | + { |
| 238 | + "description": "The name or relative path to a single env file.", |
| 239 | + "type": "string" |
| 240 | + }, |
| 241 | + { |
| 242 | + "description": "An array of names or relative paths to env files which will be loaded in the given order.", |
| 243 | + "items": { |
| 244 | + "description": "The name or relative path to an env file.", |
| 245 | + "type": "string" |
| 246 | + }, |
| 247 | + "type": "array" |
| 248 | + } |
| 249 | + ] |
| 250 | + } |
| 251 | + } |
200 | 252 | }, |
201 | 253 | "executor_option": { |
202 | | - "additionalProperties": false, |
203 | 254 | "description": "Configure the executor type for running tasks. Can be 'auto', 'poetry', 'virtualenv', or 'simple', with 'auto' being the default.", |
204 | | - "properties": { |
205 | | - "location": { |
206 | | - "description": "Specifies the location of the virtualenv relative to the parent directory. Relevant when 'type' is set to 'virtualenv'.", |
207 | | - "type": "string" |
| 255 | + "oneOf": [ |
| 256 | + { |
| 257 | + "properties": { |
| 258 | + "type": { |
| 259 | + "$ref": "#/definitions/executor_option/definitions/type" |
| 260 | + } |
| 261 | + }, |
| 262 | + "oneOf": [ |
| 263 | + { |
| 264 | + "properties": { |
| 265 | + "extra": { |
| 266 | + "description": "Include optional dependencies from the specified extra name.", |
| 267 | + "oneOf": [ |
| 268 | + { "type": "string" }, |
| 269 | + { |
| 270 | + "items": { |
| 271 | + "type": "string" |
| 272 | + }, |
| 273 | + "type": "array" |
| 274 | + } |
| 275 | + ] |
| 276 | + }, |
| 277 | + "group": { |
| 278 | + "description": "Include dependencies from the specified dependency group.", |
| 279 | + "oneOf": [ |
| 280 | + { "type": "string" }, |
| 281 | + { |
| 282 | + "items": { |
| 283 | + "type": "string" |
| 284 | + }, |
| 285 | + "type": "array" |
| 286 | + } |
| 287 | + ] |
| 288 | + }, |
| 289 | + "no-group": { |
| 290 | + "description": "Disable the specified dependency group.", |
| 291 | + "oneOf": [ |
| 292 | + { "type": "string" }, |
| 293 | + { |
| 294 | + "items": { |
| 295 | + "type": "string" |
| 296 | + }, |
| 297 | + "type": "array" |
| 298 | + } |
| 299 | + ] |
| 300 | + }, |
| 301 | + "with": { |
| 302 | + "description": "Run with the given packages installed.", |
| 303 | + "oneOf": [ |
| 304 | + { "type": "string" }, |
| 305 | + { |
| 306 | + "items": { |
| 307 | + "type": "string" |
| 308 | + }, |
| 309 | + "type": "array" |
| 310 | + } |
| 311 | + ] |
| 312 | + }, |
| 313 | + "isolated": { |
| 314 | + "description": "Run the command in an isolated virtual environment.", |
| 315 | + "type": "boolean" |
| 316 | + }, |
| 317 | + "no-sync": { |
| 318 | + "description": "Avoid syncing the virtual environment.", |
| 319 | + "type": "boolean" |
| 320 | + }, |
| 321 | + "locked": { |
| 322 | + "description": "Run without updating the uv.lock file.", |
| 323 | + "type": "boolean" |
| 324 | + }, |
| 325 | + "frozen": { |
| 326 | + "description": "Run without updating the uv.lock file.", |
| 327 | + "type": "boolean" |
| 328 | + }, |
| 329 | + "no-project": { |
| 330 | + "description": "Avoid discovering the project or workspace.", |
| 331 | + "type": "boolean" |
| 332 | + }, |
| 333 | + "python": { |
| 334 | + "description": "The Python interpreter to use for the run environment.", |
| 335 | + "type": "string" |
| 336 | + }, |
| 337 | + "type": { |
| 338 | + "const": "uv", |
| 339 | + "type": "string" |
| 340 | + } |
| 341 | + } |
| 342 | + }, |
| 343 | + { |
| 344 | + "properties": { |
| 345 | + "location": { |
| 346 | + "description": "Specifies the location of the virtualenv relative to the parent directory. Relevant when 'type' is set to 'virtualenv'.", |
| 347 | + "type": "string" |
| 348 | + }, |
| 349 | + "type": { |
| 350 | + "const": "virtualenv", |
| 351 | + "type": "string" |
| 352 | + } |
| 353 | + } |
| 354 | + }, |
| 355 | + {} |
| 356 | + ], |
| 357 | + "required": ["type"], |
| 358 | + "type": "object" |
208 | 359 | }, |
| 360 | + { |
| 361 | + "$ref": "#/definitions/executor_option/definitions/type" |
| 362 | + } |
| 363 | + ], |
| 364 | + "definitions": { |
209 | 365 | "type": { |
210 | 366 | "default": "auto", |
211 | 367 | "description": "Specifies the executor type. 'auto' uses the most appropriate executor, 'poetry' uses the poetry environment, 'uv' uses `uv run` to run tasks, 'virtualenv' specifies a virtual environment, and 'simple' runs tasks without any specific environment setup.", |
212 | 368 | "enum": ["auto", "poetry", "uv", "virtualenv", "simple"], |
213 | 369 | "type": "string" |
214 | 370 | } |
215 | | - }, |
216 | | - "type": "object" |
| 371 | + } |
217 | 372 | }, |
218 | 373 | "cmd_task": { |
219 | 374 | "allOf": [ |
|
234 | 389 | "description": "Determines how to handle glob patterns with no matches. The default is 'pass', which causes unmatched patterns to be passed through to the command (just like in bash). Setting it to 'null' will replace an unmatched pattern with nothing, and setting it to 'fail' will cause the task to fail with an error if there are no matches.", |
235 | 390 | "enum": ["pass", "null", "fail"] |
236 | 391 | }, |
| 392 | + "ignore_fail": { |
| 393 | + "$ref": "#/definitions/ignore_fail_exec_option" |
| 394 | + }, |
237 | 395 | "cmd": { |
238 | 396 | "title": "Command to execute", |
239 | 397 | "description": "Executes a single command as a subprocess without a shell. Supports glob patterns for file matching, parameter expansion, and pattern matching. Environment variable templating is also supported within the command.", |
|
273 | 431 | "description": "A Python expression to be evaluated. Can include environment variables and arguments.", |
274 | 432 | "type": "string" |
275 | 433 | }, |
| 434 | + "ignore_fail": { |
| 435 | + "$ref": "#/definitions/ignore_fail_exec_option" |
| 436 | + }, |
276 | 437 | "imports": { |
277 | 438 | "description": "A list of Python modules to be imported for use in the expression.", |
278 | 439 | "items": { |
|
296 | 457 | { |
297 | 458 | "type": "object", |
298 | 459 | "properties": { |
| 460 | + "ignore_fail": { |
| 461 | + "description": "If true the failure of the referenced task will be ignored and the ref task will return exit code 0.", |
| 462 | + "examples": [true], |
| 463 | + "oneOf": [ |
| 464 | + { |
| 465 | + "type": "boolean" |
| 466 | + } |
| 467 | + ] |
| 468 | + }, |
299 | 469 | "ref": { |
300 | 470 | "description": "A reference to another task by name, with optional additional arguments appended.", |
301 | 471 | "type": "string" |
302 | 472 | } |
303 | 473 | }, |
| 474 | + "not": { |
| 475 | + "properties": { |
| 476 | + "executor": { |
| 477 | + "not": false |
| 478 | + } |
| 479 | + }, |
| 480 | + "required": ["executor"] |
| 481 | + }, |
304 | 482 | "required": ["ref"] |
305 | 483 | } |
306 | 484 | ] |
|
319 | 497 | { |
320 | 498 | "type": "object", |
321 | 499 | "properties": { |
| 500 | + "ignore_fail": { |
| 501 | + "$ref": "#/definitions/ignore_fail_exec_option" |
| 502 | + }, |
322 | 503 | "print_result": { |
323 | 504 | "default": false, |
324 | 505 | "description": "If true then the return value of the Python callable will be output to stdout, unless it is None.", |
|
352 | 533 | "type": "string" |
353 | 534 | }, |
354 | 535 | "ignore_fail": { |
355 | | - "description": "If set, the sequence will continue running even if one of the tasks fails.", |
356 | | - "oneOf": [ |
357 | | - { |
358 | | - "type": "boolean" |
359 | | - }, |
360 | | - { |
361 | | - "enum": ["return_zero", "return_non_zero"], |
362 | | - "type": "string" |
363 | | - } |
364 | | - ] |
| 536 | + "$ref": "#/definitions/ignore_fail_tasks_option" |
365 | 537 | }, |
366 | 538 | "sequence": { |
367 | 539 | "$ref": "#/definitions/tasks_array", |
|
386 | 558 | "type": "string" |
387 | 559 | }, |
388 | 560 | "ignore_fail": { |
389 | | - "description": "If true then the failure (or non-zero return value) of one task in the parallel group does not abort the execution.", |
390 | | - "oneOf": [ |
391 | | - { |
392 | | - "type": "boolean" |
393 | | - }, |
394 | | - { |
395 | | - "enum": ["return_zero", "return_non_zero"], |
396 | | - "type": "string" |
397 | | - } |
398 | | - ] |
| 561 | + "$ref": "#/definitions/ignore_fail_tasks_option" |
399 | 562 | }, |
400 | 563 | "prefix": { |
401 | 564 | "default": "{name}", |
|
432 | 595 | { |
433 | 596 | "type": "object", |
434 | 597 | "properties": { |
| 598 | + "ignore_fail": { |
| 599 | + "$ref": "#/definitions/ignore_fail_exec_option" |
| 600 | + }, |
435 | 601 | "interpreter": { |
436 | 602 | "description": "Specify the shell interpreter that this task should execute with, or a list of interpreters in order of preference.", |
437 | 603 | "examples": [ |
|
0 commit comments