Files
orca/cloud/apps/relay-edge/test/generate-object-store-schema.ts
OrcaWinandOrcaWin 88aa9fa82a test: remove 154 low-value tests and redundant relay checkpoints (#39814)
* 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>
2026-11-08 03:06:41 -08:00

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) }
}