mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 00:31:22 +00:00
refactor(plugins): drop generic status report alias (#59700)
This commit is contained in:
@@ -143,6 +143,8 @@ describe("plugin-sdk facade runtime", () => {
|
||||
}),
|
||||
).toThrow("plugin load failure");
|
||||
|
||||
expect(listImportedBundledPluginFacadeIds()).toEqual(["bad"]);
|
||||
|
||||
// A second call must also throw (not return a stale empty sentinel).
|
||||
expect(() =>
|
||||
loadBundledPluginPublicSurfaceModuleSync<{ marker: string }>({
|
||||
|
||||
@@ -337,9 +337,11 @@ export function loadBundledPluginPublicSurfaceModuleSync<T extends object>(param
|
||||
|
||||
let loaded: T;
|
||||
try {
|
||||
// Track the owning plugin once module evaluation begins. Facade top-level
|
||||
// code may have already executed even if the module later throws.
|
||||
loadedFacadePluginIds.add(resolveTrackedFacadePluginId(params.dirName));
|
||||
loaded = getJiti(location.modulePath)(location.modulePath) as T;
|
||||
Object.assign(sentinel, loaded);
|
||||
loadedFacadePluginIds.add(resolveTrackedFacadePluginId(params.dirName));
|
||||
} catch (err) {
|
||||
loadedFacadeModules.delete(location.modulePath);
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user