@botonic/plugin-flow-builder
Version:
Botonic plugin for **Hubtype Flow Builder**: run and bridge flow-driven logic from bots on the **current** line.
13 lines • 583 B
JavaScript
const FLOW_BUILDER_PLUGIN_NAME = 'BotonicPluginFlowBuilder';
export function getFlowBuilderPlugin(plugins) {
const ERROR_MESSAGE = `You must include '@botonic/plugin-flow-builder' in your plugins file.`;
if (Object.values(plugins).length === 0) {
throw new Error(ERROR_MESSAGE);
}
const flowBuilderPlugin = Object.values(plugins).find(plugin => plugin.constructor.name === FLOW_BUILDER_PLUGIN_NAME);
if (!flowBuilderPlugin) {
throw new Error(ERROR_MESSAGE);
}
return flowBuilderPlugin;
}
//# sourceMappingURL=get-flow-builder-plugin.js.map