mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:30:43 +00:00
fix(plugins): enforce synchronous registration
This commit is contained in:
@@ -3,7 +3,7 @@ import { loadBundledPluginPublicSurfaceSync } from "../../../src/test-utils/bund
|
||||
|
||||
type BundledPluginEntryModule = {
|
||||
default: {
|
||||
register(api: OpenClawPluginApi): void | Promise<void>;
|
||||
register(api: OpenClawPluginApi): void;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ type RegisteredProviderCollections = {
|
||||
};
|
||||
|
||||
type ProviderPluginModule = {
|
||||
register(api: ReturnType<typeof createTestPluginApi>): void | Promise<void>;
|
||||
register(api: ReturnType<typeof createTestPluginApi>): void;
|
||||
};
|
||||
|
||||
export async function registerProviderPlugin(params: {
|
||||
@@ -33,7 +33,7 @@ export async function registerProviderPlugin(params: {
|
||||
const musicProviders: MusicGenerationProviderPlugin[] = [];
|
||||
const videoProviders: VideoGenerationProviderPlugin[] = [];
|
||||
|
||||
await params.plugin.register(
|
||||
params.plugin.register(
|
||||
createTestPluginApi({
|
||||
id: params.id,
|
||||
name: params.name,
|
||||
|
||||
Reference in New Issue
Block a user