UNPKG

@hashgraph/solo

Version:

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

91 lines (90 loc) 3.09 kB
import { HelmExecution } from './helm-execution.js'; import { type SoloLogger } from '../../../core/logging/solo-logger.js'; import { ExecutionBuilder } from '../../execution-builder.js'; export declare class HelmExecutionBuilder extends ExecutionBuilder { private readonly logger?; private readonly helmInstallationDirectory?; private static readonly NAME_MUST_NOT_BE_NULL; private static readonly VALUE_MUST_NOT_BE_NULL; /** * The path to the helm executable. */ private readonly helmExecutable; /** * The list of subcommands to be used when execute the helm command. */ private readonly _subcommands; /** * The arguments to be passed to the helm command. */ private readonly _arguments; /** * The list of options and a list of their one or more values. */ private readonly _optionsWithMultipleValues; /** * The flags to be passed to the helm command. */ private readonly _flags; /** * The positional arguments to be passed to the helm command. */ private readonly _positionals; /** * The environment variables to be set when executing the helm command. */ private readonly _environmentVariables; /** * Creates a new HelmExecutionBuilder instance. */ constructor(logger?: SoloLogger, helmInstallationDirectory?: string); /** * Adds the list of subcommands to the helm execution. * @param commands the list of subcommands to be added * @returns this builder */ subcommands(...commands: string[]): HelmExecutionBuilder; /** * Adds an argument to the helm execution. * @param name the name of the argument * @param value the value of the argument * @returns this builder */ argument(name: string, value: string): HelmExecutionBuilder; /** * Adds an option with multiple values to the helm execution. * @param name the name of the option * @param value the list of values for the option * @returns this builder */ optionsWithMultipleValues(name: string, value: string[]): HelmExecutionBuilder; /** * Adds a positional argument to the helm execution. * @param value the value of the positional argument * @returns this builder */ positional(value: string): HelmExecutionBuilder; /** * Adds an environment variable to the helm execution. * @param name the name of the environment variable * @param value the value of the environment variable * @returns this builder */ environmentVariable(name: string, value: string): HelmExecutionBuilder; /** * Adds a flag to the helm execution. * @param flag the flag to be added * @returns this builder */ flag(flag: string): HelmExecutionBuilder; /** * Builds the HelmExecution instance. * @returns the HelmExecution instance */ build(): HelmExecution; /** * Builds the command array for the helm execution. * @returns the command array */ private buildCommand; }