import { HandlerResult } from "@atomist/automation-client"; import { CommandHandlerMetadata } from "@atomist/automation-client/lib/metadata/automationMetadata"; import { LocalSoftwareDeliveryMachineOptions } from "@atomist/sdm-core"; import { CommandHandlerInvocation } from "../../../../common/invocation/CommandHandlerInvocation"; import { InvocationTarget } from "../../../../common/invocation/InvocationTarget"; import { AutomationClientConnectionRequest } from "../../http/AutomationClientConnectionRequest"; /** * Listeners to command execution */ export interface CommandInvocationListener { /** * Action to perform after running the command * @return {Promise} */ before?: (chm: CommandHandlerMetadata) => Promise; onDispatch?: (chm: CommandHandlerMetadata, inv: CommandHandlerInvocation) => Promise; /** * Action to perform after running the command * @return {Promise} */ after?: (h: HandlerResult, inv: CommandHandlerInvocation, chm: CommandHandlerMetadata) => Promise; } /** * All invocations from the CLI to local SDMs go through this function. * Validate command line arguments and prompt for missing or invalid arguments. * @param command command populated by yargs * @return {Promise} */ export declare function runCommandOnColocatedAutomationClient(connectionConfig: AutomationClientConnectionRequest, opts: LocalSoftwareDeliveryMachineOptions, target: InvocationTarget, hm: CommandHandlerMetadata, command: any, listeners: CommandInvocationListener[]): Promise; /** * Convert this command to a displayable name * @param {string} name * @return {string} */ export declare function convertToDisplayable(name: string): string;