fix: harden plugin sockets, public routes, prebuilt binaries and login fallback

This commit is contained in:
LukeGus committed 2026-10-05 19:50:19 -05:00
1 parent efb4259438
commit 5e54d95e71
16 files changed
+318 -23

No files matched your search

+13 -1
View File
@@ -34,7 +34,19 @@ vi.mock("../../plugins/permissions.js", () => ({
invalidatePluginPermissionCache: vi.fn(),
}));
const CONSOLE_PORT = 39109;
// A fixed port can land in a range Windows reserves for Hyper-V or Docker.
function freePort(): Promise<number> {
return new Promise((resolve, reject) => {
const server = net.createServer();
server.once("error", reject);
server.listen(0, "127.0.0.1", () => {
const { port } = server.address() as net.AddressInfo;
server.close(() => resolve(port));
});
});
}
const CONSOLE_PORT = await freePort();
const cleanups: Array<() => void> = [];
function tempRoot(prefix: string): string {