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

+4
View File
@@ -60,6 +60,7 @@ import { ActionSlot, ComponentSlot } from "@/shell/ActionSlot";
import type { Host, Tab } from "@/types/ui-types";
import { createPluginApp } from "./app";
import { installPluginHostBridge, setPluginApiForTesting } from "./bridge";
import { setRemoteServerUrlForTesting } from "./desktop";
import { setPluginSummaries, setFrontendState } from "./plugin-store";
import {
notifyShellReady,
@@ -81,6 +82,7 @@ function recordingShell(calls: ShellCall[]): TabShellCallbacks {
return {
openTab: record("openTab"),
openSingletonTab: record("openSingletonTab"),
connectHost: record("connectHost"),
closeTab: record("closeTab"),
renameTab: record("renameTab"),
openRailView: record("openRailView"),
@@ -187,6 +189,7 @@ export async function renderPlugin(
pluginId,
(options.api as Parameters<typeof setPluginApiForTesting>[1]) ?? null,
);
setRemoteServerUrlForTesting(options.remoteServerUrl ?? null);
const handle = createPluginApp(pluginId, manifest, summary.contributes, {
guest: options.guest,
});
@@ -407,6 +410,7 @@ export async function renderPlugin(
handle.dispose();
setFrontendState(pluginId, "inactive");
setPluginApiForTesting(pluginId, null);
setRemoteServerUrlForTesting(null);
}
},
};