CI / Typecheck, lint, tests, e2e (push) Failing after 3m51s
- Title screen over a real-time voxel office rendered at low resolution and quantized to a rotating 32-colour palette with Bayer dithering; day part and season re-light the scene and every surface. - 16-bit UI kit: name-plate dialogs, menu cursor, inventory, XP bar, badges, NPC speech, GAME OVER with CONTINUE, hand-placed 12x12 icons, Fusion Pixel font (Latin subset preloaded). - Sections as a game: quest log (onboarding), character select (AI CEO / AI Co-Founder), inventory (features), party roster (providers), live download XP, save point (all v1.5.1 builds), FAQ as NPC dialog, credits. - Downloads and source point to the Gitea release; the download function only redirects to git.zacharyzhang.com. - Tailwind and the old components removed; unit tests for platform/downloads, rewritten e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { platformDownloads, RELEASE_HOST, type PlatformDownload, type PlatformDownloadAsset } from "./release-links";
|
|
|
|
export const DOWNLOAD_COUNT_SEED = 13674;
|
|
export const DOWNLOAD_DEDUP_WINDOW_HOURS = 24;
|
|
export const DOWNLOAD_DEDUP_WINDOW_MS = DOWNLOAD_DEDUP_WINDOW_HOURS * 60 * 60 * 1000;
|
|
|
|
export type ReleaseDownloadAsset = PlatformDownloadAsset & {
|
|
platformId: PlatformDownload["id"];
|
|
platformTitle: string;
|
|
};
|
|
|
|
export const downloadAssets: ReleaseDownloadAsset[] = platformDownloads.flatMap((platform) =>
|
|
platform.assets.map((asset) => ({
|
|
...asset,
|
|
platformId: platform.id,
|
|
platformTitle: platform.title,
|
|
})),
|
|
);
|
|
|
|
const downloadAssetMap = new Map(downloadAssets.map((asset) => [asset.id, asset]));
|
|
|
|
export function getDownloadAsset(assetId: string) {
|
|
return downloadAssetMap.get(assetId) ?? null;
|
|
}
|
|
|
|
export function getTrackedDownloadHref(assetId: string) {
|
|
return `/api/download?asset=${encodeURIComponent(assetId)}`;
|
|
}
|
|
|
|
export function isAllowedDownloadUrl(href: string) {
|
|
const url = new URL(href);
|
|
return url.protocol === "https:" && url.host === RELEASE_HOST;
|
|
}
|