MCPcopy
hub / github.com/prisma/prisma / findSchemaPath

Function findSchemaPath

packages/cli/src/bootstrap/project-state.ts:16–22  ·  view source on GitHub ↗
(baseDir: string)

Source from the content-addressed store, hash-verified

14const MODEL_PATTERN = /^\s*model\s+\w+/m
15
16function findSchemaPath(baseDir: string): string | null {
17 for (const candidate of SCHEMA_CANDIDATES) {
18 const full = path.join(baseDir, candidate)
19 if (fs.existsSync(full)) return full
20 }
21 return null
22}
23
24function checkSeedScript(baseDir: string): boolean {
25 if (checkSeedInPackageJson(baseDir)) return true

Callers 2

getModelNamesFunction · 0.85
detectProjectStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected