envilder
Version:
A CLI and GitHub Action that securely centralizes your environment variables from AWS SSM or Azure Key Vault as a single source of truth
34 lines • 1.55 kB
TypeScript
import type { ILogger } from '../../domain/ports/ILogger.js';
import type { ISecretProvider } from '../../domain/ports/ISecretProvider.js';
import type { IVariableStore } from '../../domain/ports/IVariableStore.js';
import type { PushEnvToSecretsCommand } from './PushEnvToSecretsCommand.js';
export declare class PushEnvToSecretsCommandHandler {
private readonly secretProvider;
private readonly variableStore;
private readonly logger;
constructor(secretProvider: ISecretProvider, variableStore: IVariableStore, logger: ILogger);
/**
* Handles the PushEnvToSecretsCommand which imports environment variables
* from a local file and pushes them to the secret store.
* Uses a map file to determine the secret path for each environment variable.
*
* @param command - The PushEnvToSecretsCommand containing mapPath and envFilePath
*/
handle(command: PushEnvToSecretsCommand): Promise<void>;
private loadConfiguration;
/**
* Validates and groups environment variables by secret path.
* Ensures that all variables pointing to the same secret path have the same value.
* Returns a map of secret path to value.
*/
private validateAndGroupByPath;
private pushParametersToStore;
private pushParameter;
/**
* Retries an async operation with exponential backoff and jitter.
* Handles throttling errors from cloud providers.
*/
private retryWithBackoff;
private getErrorMessage;
}
//# sourceMappingURL=PushEnvToSecretsCommandHandler.d.ts.map