()
| 808 | } |
| 809 | |
| 810 | async function taskCheckStrict() { |
| 811 | const ajv = await ajvFactory({ |
| 812 | draftVersion: 'draft-07', |
| 813 | fullStrictMode: false, |
| 814 | }) |
| 815 | const metaSchemaFile = await toFile( |
| 816 | './src/schemas/json/metaschema-draft-07-unofficial-strict.json', |
| 817 | ) |
| 818 | let validateFn |
| 819 | try { |
| 820 | validateFn = ajv.compile(metaSchemaFile.json) |
| 821 | } catch (err) { |
| 822 | printErrorAndExit(err, [ |
| 823 | `Failed to compile schema file "./${metaSchemaFile.path}"`, |
| 824 | ]) |
| 825 | } |
| 826 | |
| 827 | await forEachFile({ |
| 828 | actionName: 'strict metaschema check', |
| 829 | async onSchemaFile(schemaFile, { spinner }) { |
| 830 | if (!validateFn(schemaFile.json)) { |
| 831 | spinner.fail() |
| 832 | printSchemaValidationErrorAndExit( |
| 833 | schemaFile.path, |
| 834 | metaSchemaFile.path, |
| 835 | validateFn.errors, |
| 836 | ) |
| 837 | } |
| 838 | }, |
| 839 | }) |
| 840 | |
| 841 | // Print information. |
| 842 | console.info(`===== REPORT =====`) |
| 843 | await printSimpleStatistics() |
| 844 | } |
| 845 | |
| 846 | async function taskCheckRemote() { |
| 847 | console.info('TODO') |
nothing calls this directly
no test coverage detected