MCPcopy
hub / github.com/anomalyco/opencode / generatedSql

Function generatedSql

packages/core/script/migration.ts:115–119  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

113}
114
115async function generatedSql(directory: string) {
116 const generated = await generatedMigrations(directory)
117 if (generated.length !== 1) throw new Error(`Expected one full schema migration, found ${generated.length}.`)
118 return Bun.file(path.join(directory, generated[0]!, "migration.sql")).text()
119}
120
121async function typescriptMigrations() {
122 return (await Array.fromAsync(new Bun.Glob("*.ts").scan({ cwd: tsDir })))

Callers 2

generateFunction · 0.85
checkFunction · 0.85

Calls 3

generatedMigrationsFunction · 0.85
fileMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected