(schemaPathFromConfig: string)
| 252 | } |
| 253 | |
| 254 | export async function getConfigProvidedSchemaFile(schemaPathFromConfig: string): Promise<GetSchemaResult> { |
| 255 | const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig) |
| 256 | |
| 257 | if (!schemaResult.ok) { |
| 258 | throw new Error( |
| 259 | `Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError( |
| 260 | schemaResult.error, |
| 261 | )}`, |
| 262 | ) |
| 263 | } |
| 264 | |
| 265 | return schemaResult.schema |
| 266 | } |
| 267 | |
| 268 | async function getDefaultSchema(cwd: string, failures: DefaultLookupRuleFailure[] = []): Promise<DefaultLookupResult> { |
| 269 | const lookupPaths = [path.join(cwd, 'schema.prisma'), path.join(cwd, 'prisma', 'schema.prisma')] |
no test coverage detected