(dir: string)
| 418 | } |
| 419 | |
| 420 | async function listSqlFiles(dir: string): Promise<string[]> { |
| 421 | const out: string[] = [] |
| 422 | const entries = await readdir(dir, { withFileTypes: true }) |
| 423 | for (const e of entries) { |
| 424 | const full = path.join(dir, e.name) |
| 425 | if (e.isDirectory()) out.push(...(await listSqlFiles(full))) |
| 426 | else if (e.name.endsWith('.sql')) out.push(full) |
| 427 | } |
| 428 | return out |
| 429 | } |
| 430 | |
| 431 | async function resolveFiles(argv: string[]): Promise<string[] | null> { |
| 432 | if (argv.includes('--all')) { |
no test coverage detected