Files
enricobuehler 899028e20f feat: Effect services + HttpApi implementation + kit entry/CLI/dev server
- RomConfig/RomCache on the kit's ConfigService/CacheStore; RomSync wires the
  pure domain into the kit SyncEngine (poll/watch/coalesce/fingerprint) and
  ProviderClient; EngineStatus assembly shared by REST + SSE
- makeApi: HttpApiBuilder groups over live service values (handler runtime
  shares the plugin runtime's singletons) + sseRoute status feed
- index.ts: definePluginKit entry (async-main boundary); headless-first (UI
  serve failure logged, engine continues)
- cli.ts on the kit dispatcher: scan/detect/preview offline, sync/uninstall
  online; set-password is gone with the standalone server
- dev.ts: auth-free loopback API server (:5885) — the dev:live proxy target;
  never bundled
- verified live host-less: raw config round-trip on disk, status/platforms/
  preview endpoints, soft-fail reconcile without a host
- CI: workspace install, per-package typecheck, publish from plugin/

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 19:04:25 +02:00

84 lines
3.2 KiB
YAML

# CI for the rom-manager workspace (Gitea Actions). Mirrors the main repo's TS workflows:
# ubuntu-24.04 runner + the oven/bun:1 container, auth via the shared REGISTRY_TOKEN secret.
# One root install covers all workspaces (contract + plugin + ui); @punktfunk/* and
# @unom/* resolve from the Gitea registry via the root bunfig scope maps, effect and
# @effect/atom-react from npm. Publish runs on a `v*` tag, from plugin/.
name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
container:
image: oven/bun:1
timeout-minutes: 15
steps:
# oven/bun's slim base ships neither git nor a CA bundle — actions/checkout's HTTPS fetch needs both.
- name: Install git + CA certs
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git nodejs
- uses: actions/checkout@v4
- name: Registry auth
env:
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
test -n "$TOKEN" || { echo "REGISTRY_TOKEN secret is empty"; exit 1; }
printf '//git.unom.io/api/packages/unom/npm/:_authToken=%s\n' "$TOKEN" > "$HOME/.npmrc"
- name: Install (workspace)
run: bun install --frozen-lockfile
- name: Lint & format
run: bunx biome check
- name: Typecheck (contract)
working-directory: contract
run: bunx tsc --noEmit
- name: Typecheck (plugin)
working-directory: plugin
run: bunx tsc --noEmit
- name: Test (domain + services)
working-directory: plugin
run: bun test
- name: Build backend bundle + SPA
working-directory: plugin
run: bun run build:all
- name: Typecheck (UI)
working-directory: ui
run: bunx tsc --noEmit
- name: Sanity — plugin default export is a valid PluginDef
working-directory: plugin
run: |
bun -e 'import plugin from "./dist/index.js"; if (plugin?.name !== "rom-manager" || typeof plugin?.main !== "function") { console.error("bad default export", plugin); process.exit(1); } console.log("ok:", plugin.name)'
publish:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-24.04
container:
image: oven/bun:1
timeout-minutes: 15
steps:
- name: Install git + CA certs
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git nodejs
- uses: actions/checkout@v4
- name: Registry auth
env:
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
test -n "$TOKEN" || { echo "REGISTRY_TOKEN secret is empty"; exit 1; }
printf '//git.unom.io/api/packages/unom/npm/:_authToken=%s\n' "$TOKEN" > "$HOME/.npmrc"
- name: Install (workspace)
run: bun install --frozen-lockfile
- name: Tag matches package version
working-directory: plugin
run: |
TAG="${GITHUB_REF_NAME#v}"
PKG="$(node -p "require('./package.json').version")"
test "$TAG" = "$PKG" || { echo "tag $GITHUB_REF_NAME != package version $PKG"; exit 1; }
- name: Publish (prepublishOnly builds backend + SPA)
working-directory: plugin
run: bun publish