mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: harden plugin api for separate repos, signed updates and generic external login
This commit is contained in:
1 parent
fb9c168b6b
commit
80944301dd
310 files changed
+6577
-4927
No files matched your search
@@ -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);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user