Turns promotion into a first-class deployment (action='promote') so it lands in the deployments UI with before/after content, per-server restart tracking, and one-click rollback. Non-beta matching-scope servers get restart_state= pending so the existing sweep drains and restarts them the same way drift does. Also adds a per-version state (untested/tested/test-failed) so the upload flow can visibly signal that a beta must land before promotion, and swaps the scope-value text box for game/map dropdowns populated from the fleet. Beta rollback at ready-promote is now labelled Reject and marks the version test-failed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
13 lines
432 B
TypeScript
13 lines
432 B
TypeScript
import { json } from '@sveltejs/kit';
|
|
import { listDistinctGames, listMapsByGame } from '$lib/server/fleet/scripts.js';
|
|
|
|
// Powers the script-upload scope dropdowns. Options are always live from the
|
|
// fleet — no caching. This is a cheap two-query call and the servers list
|
|
// changes infrequently.
|
|
export async function GET() {
|
|
return json({
|
|
games: listDistinctGames(),
|
|
mapsByGame: listMapsByGame()
|
|
});
|
|
}
|