import * as Dockerode from 'dockerode'; import { EventEmitter } from 'events'; import StrictEventEmitter from 'strict-event-emitter-types'; import { CommandOutput, StageContainers } from './container'; import Dockerfile from './dockerfile'; export interface LivepushEvents { commandExecute: { stageIdx: number; command: string; }; commandOutput: { stageIdx: number; output: CommandOutput; }; commandReturn: { stageIdx: number; returnCode: number; command: string; }; containerRestart: { containerId: string; }; cancel: void; } export type LivepushConstructOpts = ({ dockerfile: Dockerfile; } | { dockerfileContent: Buffer | string; }) & { context: string; containerId: string; stageImages: string[]; docker: Dockerode; skipContainerRestart?: boolean; }; type ContainerEventEmitter = StrictEventEmitter; declare const Livepush_base: { new (): ContainerEventEmitter; }; export declare class Livepush extends Livepush_base { dockerfile: Dockerfile; containers: StageContainers; private livepushRunning; private cancelRun; private constructor(); static init(opts: LivepushConstructOpts): Promise; performLivepush(addedOrUpdated: string[], deleted: string[]): Promise; livepushNeeded(addedOrUpdated: string[], deleted: string[]): boolean; cleanupIntermediateContainers(): Promise; cancel(): Promise; setBuildArgs(buildArgs: Record): void; private assignEventHandlers; } export default Livepush;