MCPcopy
hub / github.com/prisma/prisma / readSchemaFromDirectory

Function readSchemaFromDirectory

packages/internals/src/cli/getSchema.ts:129–137  ·  view source on GitHub ↗
(schemaPath: string)

Source from the content-addressed store, hash-verified

127}
128
129async 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
139async function readSchemaFromFileOrDirectory(schemaPath: string): Promise<LookupResult> {
140 let stats: fs.Stats

Callers 1

Calls 3

ensureTypeFunction · 0.90
loadSchemaFilesFunction · 0.90
debugFunction · 0.85

Tested by

no test coverage detected