import { IContext, IDelegatedParameters, IFlow, IPlugin, IReporter } from '../interfaces'; import { ActionSnapshot } from '../models'; import { IMetadata } from '../interfaces/IMetadata'; export declare class FBLService { private plugins; private processedPlugins; static METADATA_PREFIX: string; private reporters; allowUnsafePlugins: boolean; allowUnsafeFlows: boolean; private constructor(); private static pInstance; static get instance(): FBLService; static reset(): void; /** * Extract idOrAlias from step object * @param {object} step * @return {string} */ static extractIdOrAlias(step: { [key: string]: any; }): string; /** * Extract step metadata * @param {object} step * @return {IMetadata} */ static extractMetadata(step: { [key: string]: any; }): IMetadata; /** * Get reporter by name * @param {string} name * @return {IReporter | undefined} */ getReporter(name: string): IReporter | undefined; /** * Find plugin by its name * @param {string} name * @return {IPlugin | undefined} */ getPlugin(name: string): IPlugin | undefined; /** * Register single plugin * @param {IPlugin} plugin */ registerPlugin(plugin: IPlugin): void; /** * Register plugins * @param {IPlugin[]} plugins */ registerPlugins(plugins: IPlugin[]): void; /** * Try to require plugin, just return null if not found. Doesn't throw exceptions * @param {string} pluginNameOrPath * @param {boolean} name * @return {IPlugin | null} */ static requirePluginSafe(pluginNameOrPath: string, name: boolean): Promise; /** * Require plugin * @param {string} pluginName * @param {string} wd * @return {IPlugin | null} */ static requirePlugin(pluginName: string, wd: string): Promise; /** * Validate plugin to be registered and try to auto load if not * @param {string} pluginName * @param {string} pluginExpectedVersion * @param {string[]} errors * @param {string} wd working directory * @param {boolean} dryRun if true plugin just be verified, not actually registered */ validateRequiredPlugin(pluginName: string, pluginExpectedVersion: string, errors: string[], wd: string, dryRun: boolean): Promise; /** * Validate plugin * @param {IPlugin} plugin * @param {string} wd */ validatePlugin(plugin: IPlugin, wd: string): Promise; /** * Validate plugins to be compatible * @param {string} wd */ validatePlugins(wd: string): Promise; /** * Validate flow requirements * @param {IFlow} flow * @param {string} wd * @return {Promise} */ validateFlowRequirements(flow: IFlow, wd: string): Promise; /** * Execute flow * @param {string} wd Working Directory * @param {IFlow} flow, * @param {IContext} context * @param {IDelegatedParameters} parameters * @returns {Promise} */ execute(source: string, wd: string, flow: IFlow, context: IContext, parameters: IDelegatedParameters): Promise; }