mirror of
https://github.com/KytyPS5/kytyps5.github.io.git
synced 2026-10-09 08:49:37 -07:00
Replace the standing report PR (which piled every converted game into one branch) with an issue-driven flow: the poller mirrors each unconverted KytyPS5 game-status issue here as a `compat`-labeled issue, and commenting /compat converts one mirror into its own per-game report PR (updated in place on re-runs, mirror closed on success). Screenshots from the issue now travel with their report: the converter copies the `<img>` URLs out of the mirrored issue into a `screenshots` frontmatter array, the game page hotlinks the latest accepted report's images (nothing is downloaded into the repo), and the validator requires each to be an http(s) URL on a report with a linked source. The /getss download flow is removed. README and the contributing page document the /compat workflow.
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
/**
|
|
* Type declarations for the JS twin parser/index builder that the site export
|
|
* runs in plain Node. scripts/ is outside the main tsconfig's `include`, so
|
|
* this file gives TypeScript the shapes it needs when src/lib/compat.test.ts
|
|
* imports it for the parity suite.
|
|
*/
|
|
|
|
export interface ParsedReport {
|
|
slug: string;
|
|
title: string;
|
|
titleId: string;
|
|
status: "doesnt-boot" | "logo" | "main-menu" | "in-game";
|
|
testedVersion: string;
|
|
testedDate: string;
|
|
os: "windows" | "linux" | "macos";
|
|
hardware?: string;
|
|
score?: number;
|
|
gameVersion?: string;
|
|
screenshot?: string;
|
|
screenshotVerified?: boolean;
|
|
screenshots?: string[];
|
|
notes: string;
|
|
source?: { label: string; url?: string };
|
|
}
|
|
|
|
export interface SiteIndexEntry {
|
|
key: string;
|
|
title: string;
|
|
titleId?: string;
|
|
cover?: string;
|
|
overall: string;
|
|
os: Partial<Record<"windows" | "linux" | "macos", string>>;
|
|
reportCounts: Partial<Record<"windows" | "linux" | "macos", number>>;
|
|
latestTested?: string;
|
|
screenshots?: { title: string; screenshot: string; testedDate?: string }[];
|
|
reports: ParsedReport[];
|
|
}
|
|
|
|
export function parseReport(raw: string, slug: string): ParsedReport;
|
|
export function extractSource(raw: string): { source?: { label: string; url?: string }; body: string };
|
|
export function buildSiteIndex(
|
|
games: ReadonlyArray<{ titleId: string; allTitleIds?: string[]; name: string; cover?: string }>,
|
|
reports: readonly ParsedReport[],
|
|
): SiteIndexEntry[];
|