/// import { ExecOptions } from 'child_process'; import { ObjectMap } from '@ts-ioc/core'; import { Src, ActivityConfigure, CtxType, OnActivityInit, Activity } from '@taskfr/core'; import { IPipeContext } from '../core'; /** * shell task config. * * @export * @interface ShellTaskConfig * @extends {ActivityConfigure} */ export interface ShellTaskConfig extends ActivityConfigure { /** * shell cmd * * @type {CtxType} * @memberof ShellTaskConfig */ shell: CtxType; /** * shell args. * * @type {CtxType>} * @memberof ShellTaskConfig */ args?: CtxType>; /** * shell exec options. * * @type {CtxType} * @memberof ShellTaskConfig */ options?: CtxType; /** * allow error or not. * * @type {CtxType} * @memberof ShellTaskConfig */ allowError: CtxType; } /** * Shell Task * * @class ShellTask * @implements {ITask} */ export declare class ExecShellTask extends Activity implements OnActivityInit { /** * shell cmd. * * @type {Src} * @memberof ExecShellTask */ shell: Src; /** * shell args. * * @type {string[]} * @memberof ExecShellTask */ args: string[]; /** * shell exec options. * * @type {ExecOptions} * @memberof ExecShellTask */ options: ExecOptions; /** * allow error or not. * * @memberof ExecShellTask */ allowError: boolean; context: IPipeContext; onActivityInit(config: ShellTaskConfig): Promise; run(): Promise; protected formatShell(shell: string): string; protected formatArgs(env: ObjectMap): string[]; protected execShell(cmd: string, options?: ExecOptions, allowError?: boolean): Promise; static classAnnations: any; }