mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 10:34:02 +00:00
24 lines
706 B
TypeScript
24 lines
706 B
TypeScript
import { IPublicModelPluginContext, IPublicTypePlugin } from '@alilc/lowcode-types';
|
|
import { nodeCommand } from './node-command';
|
|
import { historyCommand } from './history-command';
|
|
|
|
export const defaultCommand: IPublicTypePlugin = (ctx: IPublicModelPluginContext) => {
|
|
const { plugins } = ctx;
|
|
|
|
return {
|
|
async init() {
|
|
await plugins.register(nodeCommand, {}, { autoInit: true });
|
|
await plugins.register(historyCommand, {}, { autoInit: true });
|
|
},
|
|
destroy() {
|
|
plugins.delete(nodeCommand.pluginName);
|
|
plugins.delete(historyCommand.pluginName);
|
|
},
|
|
};
|
|
};
|
|
|
|
defaultCommand.pluginName = '___default_command___';
|
|
defaultCommand.meta = {
|
|
commandScope: 'common',
|
|
};
|