feat(plugins,host): pluginRoot officiel transmis au contexte activate(ctx) des plugins — #285 (domain ports + infrastructure plugin: racine du package installé résolue depuis la même source de vérité que la substitution manifest ${pluginRoot}; application runtime_catalog + slash_command; backend dto + app-tauri dto_plugins; frontend domain + plugins runtime loader transmettent pluginRoot au contexte activé; bump pointeur IdeaSDK e3a0f46 via feature/285-plugin-root-runtime-api; QA verte: cargo check domain/application/infrastructure/backend/app-tauri, runtime_catalog 5/5, plugin_install_load 5/5, dto_plugins 2/2, frontend typecheck + 33 tests/3 fichiers, cargo fmt --check, git diff --check; réserves: rebuild AppImage + validation live ctx.pluginRoot dans le binaire actif restants)
This commit is contained in:
@ -38,6 +38,7 @@ export type { PluginGatewaySet } from "./registry";
|
||||
|
||||
export interface IdeaPluginContext {
|
||||
pluginId: string;
|
||||
pluginRoot: string;
|
||||
pluginDisplayName: string;
|
||||
version: string;
|
||||
logger: PluginLogger;
|
||||
@ -270,6 +271,7 @@ async function loadOne(
|
||||
const pluginId = safePluginId(entry);
|
||||
const displayName = nonEmptyString(entryObject.displayName) ?? pluginId;
|
||||
const version = nonEmptyString(entryObject.version) ?? "";
|
||||
const pluginRoot = nonEmptyString(entryObject.pluginRoot);
|
||||
let activation: void | PluginActivation = undefined;
|
||||
const subscriptions: Disposable[] = [];
|
||||
try {
|
||||
@ -280,6 +282,9 @@ async function loadOne(
|
||||
if (!bundleUrl) {
|
||||
throw new Error("missing plugin bundle URL");
|
||||
}
|
||||
if (!pluginRoot) {
|
||||
throw new Error("missing installed plugin root");
|
||||
}
|
||||
|
||||
installHostReactImportMap();
|
||||
const mod = resolveIdeaPluginModule(
|
||||
@ -308,6 +313,7 @@ async function loadOne(
|
||||
|
||||
const ctx: IdeaPluginContext = {
|
||||
pluginId,
|
||||
pluginRoot,
|
||||
pluginDisplayName: displayName,
|
||||
version,
|
||||
logger: createPluginLogger(entry),
|
||||
|
||||
Reference in New Issue
Block a user