import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import type { Manifest } from '../src/manifest.js'; export const root = fileURLToPath(new URL('../../../', import.meta.url)); export const readManifest = (): Manifest => JSON.parse(readFileSync(`${root}art/manifest.json`, 'utf8')) as Manifest; export const readStyle = (): string => readFileSync(`${root}art/STYLE.md`, 'utf8'); /** A deep copy to break on purpose. */ export const clone = (v: T): T => JSON.parse(JSON.stringify(v)) as T;