(schemaPath: string)
| 127 | } |
| 128 | |
| 129 | async function readSchemaFromDirectory(schemaPath: string): Promise<LookupResult> { |
| 130 | debug('Reading schema from multiple files', schemaPath) |
| 131 | const typeError = await ensureType(schemaPath, 'directory') |
| 132 | if (typeError) { |
| 133 | return { ok: false, error: typeError } |
| 134 | } |
| 135 | const files = await loadSchemaFiles(schemaPath) |
| 136 | return { ok: true, schema: { schemaPath, schemaRootDir: schemaPath, schemas: files } } |
| 137 | } |
| 138 | |
| 139 | async function readSchemaFromFileOrDirectory(schemaPath: string): Promise<LookupResult> { |
| 140 | let stats: fs.Stats |
no test coverage detected