/// <reference types="node" />
/// <reference types="node" />
import "reflect-metadata";
import { Container } from 'inversify';
import { Command } from '@oclif/core';
import * as fs from 'fs';
import { exec as nodeExec } from 'child_process';
import { IBetterLogger } from '@codiac.io/codiac-common/IBetterLogger';
import { IUserInputProvider, IOutputStyler } from '../ops';
import { CliEnviro, CliConfig } from "../ops/entities";
import { CliGlobalConfigRepo } from "../ops/data";
export declare interface IGlobalFlags {
    as?: string | undefined;
    remember?: boolean;
    rememberAs?: string | undefined;
    unremember?: string | undefined;
    withoutdefaults?: boolean;
}
export declare abstract class commandBase extends Command {
    protected static dependencyTargetingFlags: {
        only: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        includeDeps: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
    };
    protected static dependencyTargetingArgs: {
        name: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
    };
    /** Flags that can be available to multiple commands.
     *  Support them in a command by extending the flags object with this property using a spread operator.
     * eg:  static flags = { ...commandBase.globalFlags, myflag: flags.boolean(yadayada) }
     */
    static globalFlags: {
        as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        remember: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        rememberAs: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        unremember: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
        withoutdefaults: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
        verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
    };
    /** (optional: defaults to false) Declares whether this command must be called from within a folder (or subfolder) of an initialized codiac project (ie: requires that a codiac.json file exists in the path of the current folder). */
    requiresProjectScope: boolean | undefined;
    protected static isBootstrapped: boolean;
    /**
     * You must call the following command in the body of your bootstrap method implementation...
     *
     * eg:
     * ```typescript
     * const requiresProjectScope = false;  // if the command needs a `codiac.json` file
     * BootstrapperForCodiacCli.bootstrap(this.ioc, this.config, requiresProjectScope);
     * ```
     */
    protected abstract bootstrap(): void;
    protected pipedInput: string | undefined;
    /** Override method because oclif's exit is throwing error:
     * ```typescript
     * "TypeError [ERR_INVALID_ARG_TYPE]: The 'code' argument must be of type number. Received type string ('EEXIT')"
     * ``` */
    exit(exitCode?: number): void;
    protected readStdin(): Promise<void>;
    protected get ioc(): Container;
    private __ioc;
    get logger(): IBetterLogger;
    private __logger;
    protected get cliEnviro(): CliEnviro;
    private _cliEnviro_backer;
    protected get _cfgRepo(): CliGlobalConfigRepo;
    private __cfgRepo;
    /** Deprecated: use ioc instead.  This getter Lazyloads from ioc. */
    get _cliCfg(): CliConfig;
    private __cliCfg;
    /** Deprecated: use ioc instead.  This getter Lazyloads from ioc. */
    protected get _ui(): IUserInputProvider;
    protected __ui: IUserInputProvider | undefined;
    /** Deprecated: use ioc instead.  This getter Lazyloads from ioc. */
    protected get _styler(): IOutputStyler;
    protected __styler: IOutputStyler | undefined;
    protected execAsync: typeof nodeExec.__promisify__;
    protected copyAsync: typeof fs.copyFile.__promisify__;
    abstract run(): Promise<void>;
    /** Call this from the catch block of your command handler.
     * Writes the error message appropriately to the console,
     * minding stderr and stdout as required. */
    protected handleError(err: any): void;
}
