This commit is contained in:
KingKDot
2026-03-29 00:46:18 -05:00
parent 5a40164962
commit 677053546e
13 changed files with 1338 additions and 1 deletions
+16
View File
@@ -21,6 +21,7 @@ import { handleEnrollmentRoutes } from "./server/routes/enrollment-routes";
import { handleBuildRoutes } from "./server/routes/build-routes";
import { handleAssetsRoutes } from "./server/routes/assets-routes";
import { handleDeployRoutes } from "./server/routes/deploy-routes";
import { handleWinRERoutes } from "./server/routes/winre-routes";
import { cleanupFileTransferTempFiles, handleFileDownloadRoutes } from "./server/routes/file-download-routes";
import { handleClientRoutes } from "./server/routes/client-routes";
import { handleMiscRoutes } from "./server/routes/misc-routes";
@@ -141,6 +142,7 @@ const PLUGIN_ROOT = process.env.OVERLORD_PLUGIN_ROOT?.trim()
const PLUGIN_STATE_PATH = path.join(PLUGIN_ROOT, ".plugin-state.json");
const DATA_DIR = ensureDataDir();
const DEPLOY_ROOT = path.join(DATA_DIR, "deploy");
const WINRE_ROOT = path.join(DATA_DIR, "winre");
const TLS_CERT_PATH = config.tls.certPath;
const TLS_KEY_PATH = config.tls.keyPath;
@@ -213,6 +215,15 @@ type DeployUpload = {
const deployUploads = new Map<string, DeployUpload>();
type WinREUpload = {
id: string;
path: string;
name: string;
size: number;
};
const winreUploads = new Map<string, WinREUpload>();
type NotificationRateState = {
lastSent: number;
windowStart: number;
@@ -326,6 +337,10 @@ async function startServer() {
detectUploadOs,
normalizeClientOs,
},
winre: {
WINRE_ROOT,
winreUploads,
},
fileDownload: {
DATA_DIR,
secureHeaders,
@@ -508,6 +523,7 @@ async function startServer() {
handleUsersRoutes,
handleBuildRoutes,
handleDeployRoutes,
handleWinRERoutes,
handleFileDownloadRoutes,
handlePluginRoutes,
handleMiscRoutes,