chore: lock the plugin boundary and remove 2.9.0 leftovers

This commit is contained in:
LukeGus committed 2026-09-25 07:24:46 -05:00
1 parent 6489b62ece
commit 2961297989
399 files changed
+3964 -5627

No files matched your search

+7 -5
View File
@@ -317,16 +317,18 @@ function writeToRequest(request, chunk) {
}
const TRANSFER_ROUTES = Object.freeze({
uploadFileStream: "/ssh/uploadFileStream",
downloadFileStream: "/ssh/downloadFileStream",
uploadFileStream: "/uploadFileStream",
downloadFileStream: "/downloadFileStream",
});
const DEVICE_ID_PATTERN = /^[A-Za-z0-9._:-]{1,128}$/;
// A compact JWT (base64url segments joined by dots); anything else is refused.
const AUTH_TOKEN_PATTERN = /^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/;
const DEFAULT_LOCAL_FILE_MANAGER_BASE =
"http://localhost:30004/ssh/file_manager";
// The file-manager plugin serves both routes under /plugin-api/file-manager
// on the main backend.
const FILE_MANAGER_API = "/plugin-api/file-manager";
const DEFAULT_LOCAL_FILE_MANAGER_BASE = `http://localhost:30001${FILE_MANAGER_API}`;
function normalizeHttpBase(candidate, what) {
let parsed;
@@ -408,7 +410,7 @@ function createTargetResolver({
const jwt =
typeof getRemoteSyncJwt === "function" ? getRemoteSyncJwt() : null;
if (jwt) headers.Authorization = `Bearer ${jwt}`;
return { url: `${base}/ssh/file_manager${routePath}`, headers };
return { url: `${base}${FILE_MANAGER_API}${routePath}`, headers };
}
throw new Error(`Unknown transfer origin: ${String(origin)}`);
+1 -1
View File
@@ -1050,7 +1050,7 @@ function getBackendPidFilePath() {
// Manager) rather than through the normal quit flow, will-quit never fires
// and stopBackendServer() never runs -- the forked backend child is a
// genuinely separate OS process on Windows/mac/Linux, so it keeps running
// and holding every port the backend binds (30001, 30004). Every subsequent
// and holding the port the backend binds (30001). Every subsequent
// launch's own backend then fails outright
// with EADDRINUSE and the app is stuck until something manually kills the
// orphan. Reap any such leftover process, identified by PID file, before