test(image-generation): load live provider sources

This commit is contained in:
Vincent Koc
2026-06-09 14:22:10 +09:00
parent ea51c3ea50
commit a1fb8cf304

View File

@@ -1,6 +1,6 @@
// Media generation provider builders create bundled provider fixtures for tests.
import type { OpenClawPluginApi } from "../../../src/plugins/types.js";
import { loadBundledPluginPublicSurfaceSync } from "../../../src/test-utils/bundled-plugin-public-surface.js";
import { loadBundledPluginPublicSurfaceSourceSync } from "../../../src/test-utils/bundled-plugin-public-surface.js";
// Public-surface loader for bundled media provider plugin tests.
@@ -12,8 +12,10 @@ type BundledPluginEntryModule = {
/** Load a bundled provider plugin entrypoint through the public surface helper. */
export function loadBundledProviderPlugin(pluginId: string): BundledPluginEntryModule["default"] {
return loadBundledPluginPublicSurfaceSync<BundledPluginEntryModule>({
pluginId,
artifactBasename: "index.js",
}).default;
return (
loadBundledPluginPublicSurfaceSourceSync({
pluginId,
artifactBasename: "index.js",
}) as BundledPluginEntryModule
).default;
}