feat: harden plugin api for separate repos, signed updates and generic external login

This commit is contained in:
LukeGus committed 2026-09-29 18:11:59 -05:00
1 parent fb9c168b6b
commit 80944301dd
310 files changed
+6577 -4927

No files matched your search

@@ -12,7 +12,9 @@ function setup(remote: object, owned = true) {
(req: Request, res: Response) => Promise<unknown>
>();
registerFileDownloadRoutes(
{ post: (path, handler) => routes.set(path, handler) } as Express,
{
post: (path, handler) => routes.set(path, handler),
} as unknown as Express,
{
ctx: {
currentActor: () => "user",
@@ -6,7 +6,7 @@ import {
LOCAL_FILES_DRAG_MIME,
REMOTE_FILES_DRAG_MIME,
} from "../../src/frontend/local-transfer-utils";
import type { LocalFileEntry } from "@termix/plugin-sdk/ui";
import type { LocalFileEntry } from "@termix/plugin-sdk/frontend";
// jsdom has no layout, so render every row instead of a virtual window.
vi.mock("@tanstack/react-virtual", () => ({
@@ -57,12 +57,15 @@ describe(`${manifest.id} activate`, () => {
expect(rendered.registered.hostEditorSections()).toEqual([]);
});
it("registers its open actions, including the shell's host.openFiles", async () => {
it("registers its open actions and the tab menu entry", async () => {
rendered = await renderWithApp(plugin, { manifest, locales });
expect(rendered.registered.actions().sort()).toEqual([
"file-manager.openFromTab",
"files.openEditor",
"files.openHost",
"host.openFiles",
]);
expect(rendered.registered.slot("tab.menu")).toEqual([
"file-manager.openFromTab",
]);
});
@@ -25,7 +25,7 @@ import {
serializeLocalFilesDragPayload,
sortLocalEntries,
} from "../../src/frontend/local-transfer-utils";
import type { LocalFileEntry } from "@termix/plugin-sdk/ui";
import type { LocalFileEntry } from "@termix/plugin-sdk/frontend";
describe("drag payloads", () => {
it("round-trips local file payloads", () => {