@xec-sh/cli
Version:
Xec: The Universal Shell for TypeScript
34 lines (33 loc) • 1.21 kB
TypeScript
import { SecretManager } from '../secrets/index.js';
import type { Configuration, VariableContext } from './types.js';
type VariableType = 'vars' | 'env' | 'cmd' | 'secret' | 'params';
interface VariableReference {
type: VariableType;
path: string;
defaultValue?: string;
raw: string;
}
export declare class VariableInterpolator {
private static readonly VARIABLE_REGEX;
private static readonly MAX_DEPTH;
private secretsCache;
private secretManager?;
constructor(secretManager?: SecretManager);
interpolate(value: string, context: VariableContext): string;
interpolateAsync(value: string, context: VariableContext): Promise<string>;
resolveConfig(config: Configuration, context: VariableContext): Promise<Configuration>;
hasVariables(value: any): boolean;
parseVariables(value: string): VariableReference[];
private interpolateWithDepth;
private interpolateWithDepthAsync;
private parseReference;
private resolveVariable;
private resolveVariableAsync;
private resolveObject;
private executeCommandAsync;
private getSecretSync;
private getSecretAsync;
private getByPath;
clearSecretsCache(): void;
}
export {};