UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

95 lines (94 loc) 3.6 kB
/** * Represents the execution of a kind command and is responsible for parsing the response. */ export declare class KindExecution { /** * The message for a timeout error. */ private static readonly MSG_TIMEOUT_ERROR; /** * The message for an error deserializing the output into a specified class. */ private static readonly MSG_DESERIALIZATION_ERROR; /** * The message for an error reading the output from the process. */ private static readonly MSG_READ_OUTPUT_ERROR; /** * The message for a deserialization error. */ private static readonly MSG_LIST_DESERIALIZATION_ERROR; private readonly process; private output; private errOutput; private exitCodeValue; /** * Creates a new KindExecution instance. * @param command The command array to execute * @param environmentVariables The environment variables to set */ constructor(command: string[], environmentVariables: Record<string, string>); /** * Waits for the process to complete. * @returns A promise that resolves when the process completes */ private waitFor; /** * Waits for the process to complete with a timeout. * @param timeout The maximum time to wait, or null to wait indefinitely * @returns A promise that resolves with true if the process completed, or false if it timed out */ private waitForTimeout; /** * Gets the exit code of the process. * @returns The exit code or null if the process hasn't completed */ private exitCode; /** * Gets the standard output of the process. * @returns concatenated standard output as a string */ private standardOutput; /** * Gets the standard error of the process. * @returns concatenated standard error as a string */ private standardError; /** * Gets the response as a parsed object. * @param responseClass The class to parse the response into * @returns A promise that resolves with the parsed response */ responseAs<T>(responseClass: new (...arguments_: any[]) => T): Promise<T>; /** * Gets the response as a parsed object with a timeout. * @param responseClass The class to parse the response into * @param timeout The maximum time to wait, or null to wait indefinitely * @returns A promise that resolves with the parsed response or rejects on timeout */ private responseAsTimeout; /** * Gets the response as a list of parsed objects. * @param responseClass The class to parse each item in the response into * @returns A promise that resolves with the parsed response list */ responseAsList<T>(responseClass: new (...arguments_: any[]) => T): Promise<T[]>; /** * Gets the response as a list of parsed objects with a timeout. * @param responseClass The class to parse each item in the response into * @param timeout The maximum time to wait, or null to wait indefinitely * @returns A promise that resolves with the parsed response list or rejects on timeout */ private responseAsListTimeout; /** * Executes the command and waits for completion. * @returns A promise that resolves when the command completes */ call(): Promise<void>; /** * Executes the command and waits for completion with a timeout. * @param timeout The maximum time to wait, or null to wait indefinitely * @returns A promise that resolves when the command completes or rejects on timeout */ private callTimeout; }