(baseDir: string)
| 53 | } |
| 54 | |
| 55 | export function getModelNames(baseDir: string): string[] { |
| 56 | const schemaPath = findSchemaPath(baseDir) |
| 57 | if (!schemaPath) return [] |
| 58 | try { |
| 59 | const content = fs.readFileSync(schemaPath, 'utf-8') |
| 60 | const matches = content.matchAll(/^\s*model\s+(\w+)/gm) |
| 61 | return Array.from(matches, (m) => m[1]) |
| 62 | } catch { |
| 63 | return [] |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | export function getSeedCommand(baseDir: string): string | null { |
| 68 | const packageJsonPath = path.join(baseDir, 'package.json') |
no test coverage detected