Skip to content

Commit ee0d120

Browse files
authored
feat: add config.customPluginTransducer to debugger plugins (alibaba#2147)
1 parent b50f7e1 commit ee0d120

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/designer/src/plugin/plugin-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ export class LowCodePluginManager implements ILowCodePluginManager {
8383
}
8484
const ctx = this._getLowCodePluginContext({ pluginName, meta });
8585
const customFilterValidOptions = engineConfig.get('customPluginFilterOptions', filterValidOptions);
86-
const config = pluginModel(ctx, customFilterValidOptions(options, preferenceDeclaration!));
86+
const pluginTransducer = engineConfig.get('customPluginTransducer', null);
87+
const newOptions = customFilterValidOptions(options, preferenceDeclaration!);
88+
const newPluginModel = pluginTransducer ? await pluginTransducer(pluginModel, ctx, newOptions) : pluginModel;
89+
const config = newPluginModel(ctx, newOptions);
8790
// compat the legacy way to declare pluginName
8891
// @ts-ignore
8992
pluginName = pluginName || config.name;

0 commit comments

Comments
 (0)