/// <reference types="node" />
import { SpawnOptions } from "child_process";
import { IManifest } from "cdktf";
export declare function shell(program: string, args?: string[], options?: SpawnOptions): Promise<string>;
export declare function withTempDir(dirname: string, closure: () => Promise<void>): Promise<void>;
export declare function mkdtemp(closure: (dir: string) => Promise<void>): Promise<void>;
export declare const exec: (command: string, args: string[], options: SpawnOptions, stdout?: ((chunk: Buffer) => any) | undefined, stderr?: ((chunk: string | Uint8Array) => any) | undefined, sendToStderr?: boolean) => Promise<string>;
export declare function readCDKTFVersion(outputDir: string): Promise<string>;
export declare function readCDKTFManifest(): Promise<IManifest>;
/**
 * Downcase the first character in a string.
 *
 * @param str the string to be processed.
 */
export declare function downcaseFirst(str: string): string;
export declare class HttpError extends Error {
    statusCode?: number | undefined;
    constructor(message?: string, statusCode?: number | undefined);
}
export declare function downloadFile(url: string, targetFilename: string): Promise<void>;
/**
 * Awaits a promise and makes sure it's error (if any) is only thrown after all other promises are settled
 * if the promise does not throw an error, the other promises won't be awaited
 * @param p promise to await
 * @param promises promises to await to be all settled if p failed before throwing error that p failed with
 */
export declare function ensureAllSettledBeforeThrowing(p: Promise<any>, promises: (Promise<any> | undefined)[]): Promise<void>;
