fix(core): stabilize migration registry generation (#30105)
This commit is contained in:
@@ -113,8 +113,10 @@ function escapeTemplate(line: string) {
|
|||||||
function renderRegistry(names: string[]) {
|
function renderRegistry(names: string[]) {
|
||||||
return `import type { DatabaseMigration } from "./migration"
|
return `import type { DatabaseMigration } from "./migration"
|
||||||
|
|
||||||
export const migrations = (await Promise.all([
|
export const migrations = (
|
||||||
${names.map((name) => ` import("./migration/${name}"),`).join("\n")}
|
await Promise.all([
|
||||||
])).map((module) => module.default) satisfies DatabaseMigration.Migration[]
|
${names.map((name) => ` import("./migration/${name}"),`).join("\n")}
|
||||||
|
])
|
||||||
|
).map((module) => module.default) satisfies DatabaseMigration.Migration[]
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user