2026-02-20 20:08:17 +01:00
|
|
|
import { readFileSync } from 'node:fs'
|
2026-02-20 20:19:17 +01:00
|
|
|
import { dirname, resolve } from 'node:path'
|
|
|
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
|
|
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
2026-02-20 20:08:17 +01:00
|
|
|
|
|
|
|
|
interface Fixtures {
|
|
|
|
|
gameId: number
|
|
|
|
|
runId: number
|
|
|
|
|
genlockeId: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let cached: Fixtures | null = null
|
|
|
|
|
|
|
|
|
|
export function loadFixtures(): Fixtures {
|
|
|
|
|
if (cached) return cached
|
|
|
|
|
const raw = readFileSync(resolve(__dirname, '.fixtures.json'), 'utf-8')
|
|
|
|
|
cached = JSON.parse(raw) as Fixtures
|
|
|
|
|
return cached
|
|
|
|
|
}
|