3a6c80558d
A punktfunk-plugin-* package that scans ROM directories, maps them to emulators, fetches box art, and reconciles them into the host game library under provider id `rom-manager` — with a console-hosted web UI. Engine (pure, unit-tested core): - Table-driven platform registry (~25 consoles) + emulator registry with best-effort per-OS detection (PATH / Flatpak / known paths) and RetroArch core discovery. - Scanner with disc folding (m3u/cue/gdi), archive gating, excludes. - No-Intro title parsing + optional per-platform region dedupe. - Security-critical quoting seam: POSIX single-quote + Windows double-quote with hostile-name refusal; ROM filenames never reach a shell un-quoted. - Pure desired-state reconcile (stable external_ids, scale guard, fingerprint skip) → full-replace PUT /library/provider/rom-manager. Box art (like Steam ROM Manager): SteamGridDB primary (portrait/hero/logo/ header, fuzzy match, operator API key) behind a provider seam, with keyless libretro-thumbnails as the zero-setup fallback (`auto` default). UI: console-hosted via the SDK `servePluginUi` (zero plugin-side auth) with a plugin-local REST/SSE API and a self-contained React SPA (Setup / Emulators / Games / Sync). Standalone password-gated fallback for host-only installs. CLI: scan / detect / preview / sync / uninstall / set-password. 48 engine tests, typecheck + biome clean, SPA builds. Verified end-to-end: scan → detect → reconcile PUT, fingerprint idempotence, and the standalone UI serving SPA + REST. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
# CI for punktfunk-plugin-rom-manager (Gitea Actions). `bun install` resolves `@punktfunk/host` from
|
|
# the Gitea npm registry (scope mapping in bunfig.toml). Publish runs on a `v*` tag.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
- name: Install
|
|
run: bun install --frozen-lockfile
|
|
- name: Lint & format
|
|
run: bunx biome check
|
|
- name: Typecheck (backend)
|
|
run: bunx tsc --noEmit
|
|
- name: Test (engine)
|
|
run: bun test
|
|
- name: Build backend
|
|
run: bun run build
|
|
- name: Build SPA
|
|
run: bun run build:ui
|
|
- name: Typecheck (UI)
|
|
working-directory: ui
|
|
run: bunx tsc --noEmit
|
|
- name: Bundle sanity — plugin default export is a valid PluginDef
|
|
run: |
|
|
bun -e 'import p from "./dist/index.js"; const d = p.default; if (d?.name !== "rom-manager" || typeof d?.main !== "function") { console.error("bad default export", d); process.exit(1); } console.log("ok:", d.name)'
|
|
|
|
publish:
|
|
needs: build
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
- name: Install
|
|
run: bun install --frozen-lockfile
|
|
- name: Build (backend + SPA)
|
|
run: bun run build:all
|
|
- name: Publish to the Gitea npm registry
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.GITEA_NPM_TOKEN }}
|
|
run: |
|
|
npm config set //git.unom.io/api/packages/unom/npm/:_authToken "$NPM_TOKEN"
|
|
npm publish --registry https://git.unom.io/api/packages/unom/npm/
|