Scripts become first-class: named, versioned, uploaded via the UI, optionally scoped to a game or map. Any change that would land on scope-matched servers (marking-required or new version of a scoped script) must first pass a beta. The beta runs a per-server state machine — deploy -beta.gsc → wait empty → Komodo restart → wait healthy → optionally wait for a real match end (games_sp.log 'ExitLevel: executed') — before it's eligible for promotion. Rollback is always available and restores from .OLD. The shared/scripts mirror and its betas/ staging folder are gone. Every server now has a tracked script inventory (server_scripts table), populated only by explicit upload flows. New: /scripts, /scripts/[id], /betas/[id] UI; /api/scripts + /api/betas + /api/servers/[name]/scripts endpoints; scripts.ts, inventory.ts, beta.ts (rewritten), beta-runner.ts, match-log.ts, komodoInspectHealthy(). Removed: push.ts, /api/push, BetaPanel, legacy importer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
#!/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).
|
|
*
|
|
* Since the upload-only rework, there's no shared/scripts source dir — the
|
|
* seed just creates empty server folders. Upload scripts via the /scripts UI
|
|
* to populate them.
|
|
*
|
|
* Usage:
|
|
* npm run seed:fixture
|
|
* SERVERS_ROOT=./test-fixtures/zombies/t5 \
|
|
* BETA_ARCHIVE_DIR=./test-fixtures/zombies/beta-archive \
|
|
* npm run dev
|
|
*/
|
|
|
|
import { mkdir } from 'node:fs/promises';
|
|
import { join } from 'node:path';
|
|
|
|
const root = process.env.FIXTURE_ROOT ?? './test-fixtures/zombies';
|
|
|
|
async function main(): Promise<void> {
|
|
const t5 = join(root, 't5');
|
|
const betaArchive = join(root, 'beta-archive');
|
|
await mkdir(betaArchive, { recursive: true });
|
|
|
|
const rel = 'runtime/plutonium/storage/t5/raw/scripts/sp';
|
|
for (const name of ['t5_kino_1', 't5_ascension_1', 't5_cotd_1']) {
|
|
await mkdir(join(t5, name, rel), { recursive: true });
|
|
await mkdir(join(t5, name, 'logs'), { recursive: true });
|
|
}
|
|
|
|
console.log(`seeded ${root}`);
|
|
console.log(` set SERVERS_ROOT=${t5}`);
|
|
console.log(` set BETA_ARCHIVE_DIR=${betaArchive}`);
|
|
}
|
|
|
|
main().catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|