/// <reference types="node" />
import { CompileType, AppType } from '../../types/commonData';
import { PackageType, Engine, LynxBundler } from '../../types/compile';
import { ModuleName } from '../../protocol';
import { From, CompileEndResult } from '../../protocol/compile';
import { ChildProcess } from 'child_process';
import Logger from '../../common/Logger';
import CompileModule from './index';
export type AppInfo = {
    type: CompileType;
    packageType?: PackageType;
    frameWorkType?: 'default' | 'upgrade';
    blockEngineType?: Engine;
    blockTypeId?: string;
    remoteDebugUrl?: string;
    needWatch?: boolean;
    blockLynxBundler?: LynxBundler;
};
export type CompileOptions = {
    sourcePath: string;
    distPath: string;
    appType: AppType;
    type: From;
    appInfo: AppInfo;
};
type CompileProcess = {
    process: ChildProcess;
    info: {
        status: 'start' | 'processing' | 'end' | 'stop';
        progress: number;
        isUpdate: boolean;
    };
};
export default abstract class Compile {
    private _appId;
    processList: CompileProcess[];
    module: CompileModule;
    options: CompileOptions;
    errMsgs: string[];
    isUpdate: boolean;
    constructor(module: CompileModule, options: CompileOptions);
    abstract start(): Promise<CompileEndResult>;
    abstract get events(): any;
    run(): Promise<CompileEndResult>;
    getPackVersion(): string;
    startProcess(processArgs: any): Promise<CompileEndResult>;
    onMessage(proccess: CompileProcess, msg: {
        type: string;
        data: {
            errorMessage: string;
            productName: string;
        };
        extra: unknown;
    }): CompileEndResult | void;
    onStdout(proccess: CompileProcess, data: string): void;
    onError(proccess: CompileProcess, data: Error): void;
    onExit(_: CompileProcess): void;
    emitProgress(): void;
    destroy(): void;
    alive(): boolean;
    get compileType(): From;
    get log(): Logger<ModuleName | "Common">;
    get emit(): <N extends keyof import("../../protocol/compile").EventMap>(name: N, data: import("../../types/protocol").EventParam<import("../../protocol/compile").EventMap, N, "params">) => void;
    getAppId(): Promise<string>;
}
export {};
