Build cross-runtime CultUI parity smoke

This commit is contained in:
Meta Vens 2026-06-05 22:07:43 +01:00
commit c12d78726a
29 changed files with 1435 additions and 156 deletions

View file

@ -0,0 +1,36 @@
import { mkdir, readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { compileEveDsl } from "../../web/eve-dsl.js";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const manifest = JSON.parse(await readFile(path.join(repoRoot, "tools/parity/parity-manifest.json"), "utf8"));
const fixtureId = process.argv[2] || "cultui-inspector";
const outputPath = process.argv[3]
? path.resolve(process.argv[3])
: path.join(repoRoot, "artifacts/parity/fixtures", `${fixtureId}.surface.json`);
const fixture = manifest.fixtures.find(candidate =>
candidate.id === fixtureId || candidate.expect?.providerId === fixtureId);
if (!fixture) {
throw new Error(`Unknown parity fixture: ${fixtureId}`);
}
const surface = await loadSurface(fixture.surface);
surface.fixtureId = fixture.id;
surface.values ||= surface.mesh?.snapshot?.() || {};
delete surface.mesh;
await mkdir(path.dirname(outputPath), { recursive: true });
await writeFile(outputPath, `${JSON.stringify(surface, null, 2)}\n`);
console.log(outputPath);
async function loadSurface(surface) {
const absolutePath = path.join(repoRoot, surface.path);
const source = await readFile(absolutePath, "utf8");
if (surface.transport === "local-eve-dsl") return compileEveDsl(source);
if (surface.transport === "local-json") return JSON.parse(source);
throw new Error(`Unsupported parity surface transport: ${surface.transport}`);
}

View file

@ -74,6 +74,36 @@
]
}
},
{
"id": "sai-vn",
"title": "Sai VN",
"surface": {
"transport": "local-json",
"path": "web/fixtures/sai-vn-surface.json"
},
"expect": {
"providerId": "gamecult.home.vn",
"componentKinds": [
"vn.stage",
"image.background",
"embed.norn",
"embed.tex",
"panel.dialogue",
"rail.actions",
"control.button"
],
"styleTokens": [
"colorBackground",
"colorPanel",
"colorPanelAlt",
"colorText",
"colorAccent",
"fontBody",
"fontTitle",
"pixelArt"
]
}
},
{
"id": "reactive-dsl",
"title": "Reactive DSL",
@ -125,7 +155,7 @@
{
"id": "linux-flutter",
"title": "Linux / Flutter",
"kind": "requires-linux-runner",
"kind": "active",
"expectedPaths": ["flutter/eve_parity/linux", "scripts/capture-flutter-parity.ps1"],
"capture": {
"status": "ssh-golden",
@ -135,7 +165,7 @@
{
"id": "ios-uikit",
"title": "iOS / UIKit",
"kind": "native-proof",
"kind": "active",
"expectedPaths": ["Sources/EVEViewController.mm", "scripts/capture-eve-screenshot.ps1"],
"capture": {
"status": "ssh-png",
@ -145,7 +175,7 @@
{
"id": "android-kotlin",
"title": "Android / Kotlin",
"kind": "device-proof",
"kind": "active",
"expectedPaths": ["android/app/src/main/java/org/gamecult/eve/MainActivity.kt", "scripts/build-android.ps1"],
"capture": {
"status": "adb-png",
@ -155,7 +185,7 @@
{
"id": "direct2d",
"title": "Fensalir Direct2D",
"kind": "specialized-native",
"kind": "pending",
"expectedPaths": ["web/fixtures/fensalir-client-surface.json"],
"capture": {
"status": "missing",