Files
PBandDev 7afb5b351b feat: ship v2 organizer rewrite (#5)
* Add comfy skill

* feat: squash v2 branch
2026-03-23 16:57:00 -05:00

23 lines
741 B
TypeScript

import { readdirSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
const fixturesRoot = resolve(
fileURLToPath(new URL("../fixtures/", import.meta.url)),
);
export function loadWorkflowData(path: string): Record<string, unknown> {
return JSON.parse(readFileSync(path, "utf-8")) as Record<string, unknown>;
}
export function listRepoFixtures(): string[] {
return readdirSync(fixturesRoot)
.filter((entry) => entry.endsWith(".json"))
.map((entry) => entry.replace(/\.json$/, ""))
.sort((a, b) => a.localeCompare(b));
}
export function loadFixture(name: string): Record<string, unknown> {
return loadWorkflowData(resolve(fixturesRoot, `${name}.json`));
}