fix(supabase): confirmed uploads gate asset reads (hash claim), seeds-listed test, Dockerfile workspace manifests; importer declares every authored label, real in=out control

This commit is contained in:
bchanot committed 2026-10-09 00:50:36 +02:00
1 parent bbfb8d6203
commit dee4ce43d9
28 files changed
+511 -87

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { readFile } from 'node:fs/promises'
import { join, relative } from 'node:path'
import { listSeeds, seedDir, supabaseDir } from './harness'
/**
* The CLI applies only the literal files of config.toml sql_paths, while the
* harness applies every seed on disk: a seed forgotten in the list would pass
* here and never reach `supabase db reset`.
*/
describe('versioned seeds', () => {
it('are all listed in config.toml [db.seed] sql_paths', async () => {
const config = await readFile(join(supabaseDir, 'config.toml'), 'utf8')
const line = config.match(/^sql_paths\s*=\s*\[(.*)\]/m)?.[1] ?? ''
const listed = [...line.matchAll(/"([^"]+)"/g)].map((m) => m[1])
for (const file of await listSeeds()) {
const path = './' + relative(supabaseDir, join(seedDir, file))
expect(listed, `${path} missing from sql_paths`).toContain(path)
}
})
})