* @param {string} filepath * @param {string} schemaFilepath * @param {unknown[] | null | undefined} ajvErrors * @returns {never}
( filepath, schemaFilepath, ajvErrors, )
| 556 | * @returns {never} |
| 557 | */ |
| 558 | function printSchemaValidationErrorAndExit( |
| 559 | filepath, |
| 560 | schemaFilepath, |
| 561 | ajvErrors, |
| 562 | ) { |
| 563 | printErrorAndExit( |
| 564 | null, |
| 565 | [ |
| 566 | `Failed to validate file "${filepath}" against schema file "./${schemaFilepath}"`, |
| 567 | `Showing first error out of ${ajvErrors?.length ?? '?'} total error(s)`, |
| 568 | ], |
| 569 | util.formatWithOptions({ colors: true }, '%O', ajvErrors?.[0] ?? '???'), |
| 570 | ) |
| 571 | } |
| 572 | |
| 573 | async function taskNewSchema() { |
| 574 | const rl = readline.createInterface({ |
no test coverage detected