Files
openclaw/src/cli/plugins-install-command.test-support.ts
Peter Steinberger 9497450511 refactor: eliminate dead-export baseline (#108376)
Burn the grandfathered unused-export baseline to zero and enforce a hard-zero Knip gate.
2026-07-15 17:05:07 +01:00

30 lines
966 B
TypeScript

import type {
ConfigMutationPreflight,
ConfigSnapshotForInstallPersist,
} from "../plugins/install-persistence.js";
import type { PluginInstallRequestContext } from "./plugin-install-config-policy.js";
import "./plugins-install-command.js";
type ConfigSnapshotForInstallExecution = ConfigSnapshotForInstallPersist & {
hookMutation: ConfigMutationPreflight;
pluginMutation: ConfigMutationPreflight;
};
type PluginsInstallCommandTestApi = {
loadConfigForInstall(
request: PluginInstallRequestContext,
): Promise<ConfigSnapshotForInstallExecution>;
};
function getTestApi(): PluginsInstallCommandTestApi {
return (globalThis as Record<PropertyKey, unknown>)[
Symbol.for("openclaw.pluginsInstallCommandTestApi")
] as PluginsInstallCommandTestApi;
}
export async function loadConfigForInstall(
request: PluginInstallRequestContext,
): Promise<ConfigSnapshotForInstallExecution> {
return await getTestApi().loadConfigForInstall(request);
}