mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-08 15:42:42 +00:00
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>
21 lines
958 B
JavaScript
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)
|