(temporary: string, output: string, name?: string)
| 92 | } |
| 93 | |
| 94 | async function drizzle(temporary: string, output: string, name?: string) { |
| 95 | const config = path.join(temporary, `${path.basename(output)}.config.ts`) |
| 96 | await Bun.write( |
| 97 | config, |
| 98 | `import config from ${JSON.stringify(pathToFileURL(path.join(root, "packages/core/drizzle.config.ts")).href)} |
| 99 | |
| 100 | export default { ...config, out: ${JSON.stringify(output)} } |
| 101 | `, |
| 102 | ) |
| 103 | await $`bun drizzle-kit generate --config ${config} ${name ? ["--name", name] : []}`.cwd( |
| 104 | path.join(root, "packages/core"), |
| 105 | ) |
| 106 | } |
| 107 | |
| 108 | async function generatedMigrations(directory: string) { |
| 109 | return (await Array.fromAsync(new Bun.Glob("*/migration.sql").scan({ cwd: directory }))) |
no test coverage detected