refactor: make provisioning own instance lifecycle operations

This commit is contained in:
2026-09-27 14:45:00 -04:00
parent cfed584614
commit df265d1900
44 changed files with 1791 additions and 1609 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { json, error } from '@sveltejs/kit';
import { db } from '$lib/server/db/index.js';
import { getDeployment } from '$lib/server/fleet/deployments.js';
import { getDeployment } from '$lib/server/provisioning/index.js';
export async function GET({ params }: { params: { id: string } }) {
const lifecycle = getDeployment(params.id);
@@ -1,5 +1,5 @@
import { json } from '@sveltejs/kit';
import { cancelRemoval } from '$lib/server/fleet/deployments.js';
import { cancelRemoval } from '$lib/server/provisioning/index.js';
export function POST({ params }: { params: { id: string } }) {
if (!cancelRemoval(params.id)) return json({ error: 'Removal has already begun or this request is no longer waiting. Refresh to see its current state.' }, { status: 409 });
@@ -1,5 +1,5 @@
import { json } from '@sveltejs/kit';
import { resumeVerification, resumeCleanup, resumeRebuild } from '$lib/server/fleet/deployments.js';
import { resumeVerification, resumeCleanup, resumeRebuild } from '$lib/server/provisioning/index.js';
import { kick } from '$lib/server/pipeline/worker.js';
export function POST({ params }: { params: { id: string } }) {