mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 02:17:31 +00:00
* test: remove 155 low-value tests and two relay checkpoints * test: retain schema drift protection and remove dead imports --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
11 lines
715 B
TypeScript
11 lines
715 B
TypeScript
import { readFileSync, writeFileSync } from 'node:fs'
|
|
import { relayObjectStoreSchema } from './object-store-schema'
|
|
|
|
const FILE = new URL('../src/object-store-schema.generated.ts', import.meta.url)
|
|
|
|
if (process.env.UPDATE_OBJECT_STORE_SCHEMA === '1') {
|
|
const expected = await relayObjectStoreSchema()
|
|
const body = `// GENERATED from the relay's SQLite schema (sqlite_master) by test/generate-object-store-schema.ts.\n// Do not edit; regenerate with UPDATE_OBJECT_STORE_SCHEMA=1 ./node_modules/.bin/tsx test/generate-object-store-schema.ts.\nexport const OBJECT_STORE_SCHEMA: readonly string[] = ${JSON.stringify(expected, null, 2)}\n`
|
|
if (readFileSync(FILE, 'utf8') !== body) { writeFileSync(FILE, body) }
|
|
}
|