Files
parenthese/tools/layout-bench/load.mjs
T
IliesAllaliandClaude Opus 5 e8e2485dcd Parenthèse
Galaxie familiale : personnes, unions et filiations, photos, vidéos et voix sur chaque personne,
partage par lien avec consultation sans compte et contributions validées par le propriétaire.
Auto-hébergeable avec Docker. Licence PolyForm Noncommercial 1.0.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 15:49:05 +02:00

21 lines
958 B
JavaScript

// Charge une fixture (arbre réel) dans le format Galaxy via loadGraphData (code du repo, inchangé)
import { readFileSync } from 'node:fs'
import { fileURLToPath, pathToFileURL } from 'node:url'
export const REPO = fileURLToPath(new URL('../../frontend/src/', import.meta.url))
const mockData = await import(pathToFileURL(`${REPO}data/mockData.js`).href)
export async function loadFixture(name = process.env.FIXTURE || 'famille') {
const raw = JSON.parse(readFileSync(new URL(`./fixtures/${name}-graph.json`, import.meta.url), 'utf8'))
mockData.loadGraphData(raw.graph, { apiBaseUrl: '', authToken: '' })
return {
persons: mockData.persons,
unions: mockData.unions,
filiations: mockData.filiations,
medias: mockData.medias,
}
}
export const constants = await import(pathToFileURL(`${REPO}components/galaxy/constants.js`).href)
export const layoutModule = await import(pathToFileURL(`${REPO}components/galaxy/elkLayout.js`).href)