import { ChildProcess } from 'child_process';
import { CoreModels } from 'tnp-core';
import type { BaseProject, TypeOfCommit } from './base';
import type { BaseProcessManger } from './base/classes/base-process-manager';
export type BaseProjectType = CoreModels.BaseProjectType;
export declare const BaseProjectTypeArr: string[];
export type CommandActionType = 'deep' | 'first-level' | 'only-this';
/**
 * Angular project type
 */
export type NgProject = {
    projectType: 'library' | 'application';
    /**
     * where ng-packagr.json is located, tsconfig etc.
     */
    root: string;
    /**
     * Source code project
     */
    sourceRoot: string;
    prefix: string;
};
export type LibraryBuildCommandOptions = {
    watch?: boolean;
};
export type LibrariesBuildOptions<PROJECT extends BaseProject = BaseProject> = {
    strategy?: 'link' | 'copy';
    /**
     * by default we are copying all libraries to node_modules of itself
     */
    copylink_to_node_modules?: string[];
    releaseBuild?: boolean;
    /**
     * override build options for specific libraries
     * @todo
     */
    libraries?: PROJECT[];
    outputLineReplace?: (libForOutput: PROJECT, useExternalProvidedLibs: boolean) => (line: string) => string;
    useLastUserConfiguration?: boolean;
};
export type TestBuildOptions = {
    onlySpecyficFiles?: string[];
    updateSnapshot?: boolean;
};
export interface ChangelogData {
    changes: string[];
    version: string;
    date: string;
}
export interface PushProcessOptions {
    force?: boolean;
    typeofCommit?: TypeOfCommit;
    mergeUpdateCommits?: boolean;
    askToConfirmPush?: boolean;
    askToConfirmCommit?: boolean;
    skipLint?: boolean;
    askToConfirmBranchChange?: boolean;
    origin?: string;
    args?: string[];
    setOrigin?: 'ssh' | 'http';
    exitCallBack?: () => void;
    forcePushNoQuestion?: boolean;
    overrideCommitMessage?: string;
    commitMessageRequired?: boolean;
    /**
     * only needed when push github
     * and I forgot to add my username before issue
     * taon pfix proper input my-repo#344
     * that should be
     * taon pfix proper input my-username/my-repo#344
     */
    currentOrigin?: string;
    skipChildren?: boolean;
    noExit?: boolean;
}
export declare class CommandConfig {
    static from(config: CommandConfig): CommandConfig;
    private constructor();
    name: string;
    cmd: string;
    headerMessageWhenActive?: string;
    /**
     * If true, the output will be stored in a buffer and displayed when requested.
     * Default: true
     */
    useDataBuffer?: boolean;
    /**
     * Process that should be started
     * before this process starts.
     */
    shouldBeActiveOrAlreadyBuild?: CommandConfig[];
    goToNextCommandWhenOutput?: string | {
        stdoutContains?: string | string[];
        stderrContains?: string | string[];
    };
}
export interface ProcessManagerConfig<PROJECT> {
    title: string;
    header?: string;
    commands: CommandConfig[];
    /**
     * Default: false
     * If false - after first selection of processes, it will be not possible
     * to add new processes to build and build will be done after
     * all processes are done.
     */
    watch?: boolean;
}
export declare enum CommandProcessState {
    NOT_STARTED = "not-started",
    WAITING_TO_START = "waiting-to-start",
    RUNNING = "running",
    FINISHED_AND_RUNNING = "finished-and-running",// only for watch mode
    FINISHED = "finished"
}
export interface CommandProcessRunOptions {
    progress?: (n: number, total: number) => void;
    resolveNextProcess?: (currentProcess: CommandProcess) => Promise<CommandProcess>;
    resolveWhenFinish?: boolean;
}
export declare class CommandProcess {
    private project;
    private config;
    private manager;
    private state;
    readonly child_process?: ChildProcess;
    protected get cmd(): string;
    get name(): string;
    get headerMessageWhenActive(): string | undefined;
    get pid(): number | undefined;
    get isFinished(): boolean;
    get isRunning(): boolean;
    get isWaitingToStart(): boolean;
    markForStart(): void;
    dependenciesProcesses: CommandProcess[];
    constructor(project: BaseProject, config: CommandConfig, manager: BaseProcessManger);
    start(options?: CommandProcessRunOptions): Promise<void>;
    stop(): Promise<void>;
}
export interface DockerComposeFile {
    version: string;
    services: Record<string, DockerService>;
    networks?: Record<string, DockerNetwork>;
    volumes?: Record<string, DockerVolume>;
}
export interface DockerService {
    build?: string | DockerBuild;
    image?: string;
    container_name?: string;
    ports?: string[];
    environment?: Record<string, string> | string[];
    volumes?: string[];
    depends_on?: string[];
    command?: string | string[];
    networks?: string[] | Record<string, unknown>;
    restart?: string;
    entrypoint?: string | string[];
    working_dir?: string;
    labels?: Record<string, string>;
    env_file?: string | string[];
    args?: Record<string, string> | string[];
}
export interface DockerBuild {
    context: string;
    dockerfile?: string;
    args?: Record<string, string>;
    target?: string;
}
export interface DockerNetwork {
    driver?: string;
    external?: boolean;
    name?: string;
}
export interface DockerVolume {
    driver?: string;
    external?: boolean;
    name?: string;
}