Initial commit — SvelteKit fleet manager for T5 Plutonium servers

Ports push_scripts.sh (1497 lines of bash) to a SvelteKit + SQLite web app
that manages a fleet of T5 Plutonium servers running on Komodo. Same push
and beta workflow as the shell script, with a live SSE pipeline view, a
!rt-token-gated auth modal that hard-pauses deployments on stale tokens,
per-file audit diffs, and a Komodo-container deployment target.

- Push/beta engines port the exact filter, held-by-beta, conflict, and
  stale-backup rules from the shell script
- SQLite (better-sqlite3) replaces script_metadata.json; a one-shot
  importer moves legacy state over on first boot
- 16 vitest tests cover push add/update/skip, beta open→rollback,
  open→promote, conflict guards, sweep frozen/manual branches, and IW4M
  login/status parsing
- docker/ + komodo/stack.toml deploy as a managed container on the same
  host as the game servers, /root/zombies bind-mounted at the same path
  the shell script used
This commit is contained in:
2026-09-12 00:23:51 -04:00
commit d99711563e
67 changed files with 9415 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
#!/usr/bin/env node
/**
* Seed a test-fixtures/zombies/ tree so the app has something to point at
* during local dev on Windows/macOS (where /root/zombies doesn't exist).
*
* Usage:
* npm run seed:fixture
* SHARED_SCRIPTS=./test-fixtures/zombies/shared/scripts \
* SERVERS_ROOT=./test-fixtures/zombies/t5 \
* npm run dev
*/
import { mkdir, writeFile } from 'node:fs/promises';
import { join } from 'node:path';
const root = process.env.FIXTURE_ROOT ?? './test-fixtures/zombies';
async function main(): Promise<void> {
const shared = join(root, 'shared/scripts');
const staging = join(shared, 'betas');
const t5 = join(root, 't5');
await mkdir(shared, { recursive: true });
await mkdir(staging, { recursive: true });
// A handful of representative GSC files
await writeFile(
join(shared, 'hud.gsc'),
'#include maps\\_utility;\n\ninit() { println("hud v1"); }\n'
);
await writeFile(
join(shared, 'zom.gsc'),
'#include maps\\_zombiemode;\n\ninit() { println("zom v1"); }\n'
);
await writeFile(
join(shared, 'perks.gsc'),
'#include maps\\_zombiemode_perks;\n\ninit() { println("perks v1"); }\n'
);
// Three servers, one already up-to-date, one empty, one with old copies
const rel = 'runtime/plutonium/storage/t5/raw/scripts/sp';
for (const name of ['t5_kino_1', 't5_ascension_1', 't5_cotd_1']) {
const dest = join(t5, name, rel);
await mkdir(dest, { recursive: true });
}
// t5_kino_1 is already up-to-date
await writeFile(
join(t5, 't5_kino_1', rel, 'hud.gsc'),
'#include maps\\_utility;\n\ninit() { println("hud v1"); }\n'
);
// t5_cotd_1 has an older version of zom
await writeFile(
join(t5, 't5_cotd_1', rel, 'zom.gsc'),
'#include maps\\_zombiemode;\n\ninit() { println("zom v0"); }\n'
);
console.log(`seeded ${root}`);
console.log(` set SHARED_SCRIPTS=${shared}`);
console.log(` set SERVERS_ROOT=${t5}`);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});