fix: type errors and lint failures from merged plugin prs

This commit is contained in:
LukeGus committed 2026-09-30 10:04:17 -05:00
1 parent 9b690b9935
commit f4c9090b88
8 files changed
+14 -11

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ function createC2SAuthBridge(ipcMain, getWindow) {
window.isDestroyed() || window.isDestroyed() ||
active.size || active.size ||
typeof message.requestId !== "string" || typeof message.requestId !== "string" ||
!["totp", "input", "browser"].includes(message.request?.kind) !["totp", "input", "browser"].includes(message.request?.kind) // plugin-id-ok: SSH prompt kind, not the plugin
) { ) {
ws.close(); ws.close();
return; return;
@@ -1,3 +1,4 @@
/// <reference types="vite/client" />
import ts from "typescript"; import ts from "typescript";
import Guacamole from "guacamole-common-js"; import Guacamole from "guacamole-common-js";
import { afterEach, describe, expect, it, vi } from "vitest"; import { afterEach, describe, expect, it, vi } from "vitest";
+1 -1
View File
@@ -104,7 +104,7 @@
] ]
} }
}, },
"uses": ["session.remoteDisplay.token", "terminal.open"] "uses": ["session.remoteDisplay.token", "terminal.open", "terminal.overlay"]
}, },
"locales": "locales", "locales": "locales",
"platforms": ["linux", "win32", "darwin"] "platforms": ["linux", "win32", "darwin"]
@@ -92,14 +92,13 @@ export async function startServer(
}, },
}); });
const refs = await db.database.refs(); const refs = await db.database.refs();
db.database.refs = async () => db.database.refs = (async () => ({
({ ...(refs as object),
...refs, hosts: sqliteTable("ssh_data", {
hosts: sqliteTable("ssh_data", { id: integer("id").primaryKey(),
id: integer("id").primaryKey(), syncId: text("sync_id"),
syncId: text("sync_id"), }),
}), })) as typeof db.database.refs;
}) as Awaited<ReturnType<typeof db.database.refs>>;
for (const user of options.users ?? ["alice", "bob", "carol"]) { for (const user of options.users ?? ["alice", "bob", "carol"]) {
db.sqlite db.sqlite
.prepare("INSERT INTO users (id, username, is_admin) VALUES (?, ?, ?)") .prepare("INSERT INTO users (id, username, is_admin) VALUES (?, ?, ?)")
@@ -1,3 +1,4 @@
/// <reference types="vite/client" />
import ts from "typescript"; import ts from "typescript";
import { describe, expect, it, vi } from "vitest"; import { describe, expect, it, vi } from "vitest";
import roomSource from "../../src/frontend/CollabRoomTab.tsx?raw"; import roomSource from "../../src/frontend/CollabRoomTab.tsx?raw";
@@ -1,3 +1,4 @@
/// <reference types="vite/client" />
import ts from "typescript"; import ts from "typescript";
import { describe, expect, it, vi } from "vitest"; import { describe, expect, it, vi } from "vitest";
import sourceText from "../../../src/frontend/terminal/Terminal.tsx?raw"; import sourceText from "../../../src/frontend/terminal/Terminal.tsx?raw";
@@ -1,3 +1,4 @@
/// <reference types="vite/client" />
import ts from "typescript"; import ts from "typescript";
import { afterEach, describe, expect, it, vi } from "vitest"; import { afterEach, describe, expect, it, vi } from "vitest";
import sourceText from "../../../src/frontend/terminal/Terminal.tsx?raw"; import sourceText from "../../../src/frontend/terminal/Terminal.tsx?raw";
@@ -52,7 +52,7 @@ describe("interactive client relay", () => {
return { client, dispose, host: host(), jumpClient: null }; return { client, dispose, host: host(), jumpClient: null };
}, },
); );
mock.ctx.ssh.connect = connect as typeof mock.ctx.ssh.connect; mock.ctx.ssh.connect = connect as unknown as typeof mock.ctx.ssh.connect;
const handle = createC2SRelay(mock.ctx); const handle = createC2SRelay(mock.ctx);
const anchor = new Socket(); const anchor = new Socket();
const socket = new Socket(); const socket = new Socket();