import SSE from 'express-sse';
import { ModuleName } from '../../../types/protocol';
import { Deps } from '../../../protocol/typeUtil';
import { Commands } from '../../../protocol';
import { ProjectInfo, BlockConfig, AppMeta, BlockInfo } from '../../../types/commonData';
import { DSLBlockHost } from '../../../types/preview';
import BlockUtilsBase from './BlockBase';
interface Options {
    projectPath: string;
    execute: Commands<Deps<ModuleName.preview>>;
    watch?: boolean;
}
declare class Block extends BlockUtilsBase<DSLBlockHost> {
    private projectPath;
    private watch;
    CDPClient: any;
    ServerSentEvents: SSE;
    private compilePackagePath;
    currentBlockTypeID: string;
    private compileTask;
    extensionPath: string;
    projectConfigFileName: string;
    private useNewCompiler;
    constructor(options: Options);
    setWatch(watch: boolean): void;
    useNewCompilerOnNextRequest(): void;
    compile(blockTypeId: string): Promise<string>;
    readProjectConfig(): ProjectInfo;
    readBlockInfoByPath(blockPath: string): BlockInfo;
    readBlockConfig(): BlockConfig[];
    readBlockConfig(blockTypeId: string): BlockConfig | undefined;
    readBlockConfig(blockTypeId: string, projectConfig?: ProjectInfo): BlockConfig | undefined;
    readBlockConfig(blockTypeId: undefined, projectConfig: ProjectInfo): BlockConfig[];
    private returnSuccess;
    getAppMeta(blockTypeID: string): Promise<AppMeta>;
    private getBlockMeta;
    private getUserInfo;
    private searchUser;
    private httpServerPort;
    startHTTPServer(devToolsPath: string): Promise<number>;
    choose(): Promise<string>;
    getAvailableBlockHost(): {
        name: string;
        value: string;
    }[];
    getRelativePath(config?: BlockConfig): string;
    rewriteProjectConfig(config?: BlockConfig): () => void;
}
export default Block;
