UNPKG

@syntropysoft/praetorian

Version:

Praetorian CLI – A universal multi-environment configuration validator for DevSecOps teams. Validate, compare, and secure YAML/ENV files with ease.

51 lines 1.74 kB
/** * TODO: DECLARATIVE PROGRAMMING PATTERN * * This file demonstrates excellent declarative programming practices: * - Pure functions with arrow functions and functional composition * - Immutable data transformations with Object.keys() and filter() * - Functional array methods (map, filter) * - Promise.all() for concurrent operations * - Null coalescing operators (??) * - No imperative loops or state mutations * * Mutation Score: 85.25% - Functional patterns make testing straightforward! */ import { ConfigFile } from '../types'; export interface EnvironmentConfig { [environment: string]: string; } export interface EnvironmentValidationResult { environment: string; configFile: string; success: boolean; errors: any[]; warnings: any[]; } export declare class EnvironmentManager { private readonly fs; private readonly yaml; constructor(); /** * Load environment configuration from file */ loadEnvironmentConfig(filePath: string): EnvironmentConfig; /** * Validate specific environment */ validateEnvironment(environment: string, environmentConfig: EnvironmentConfig, validationFunction: (files: ConfigFile[]) => Promise<any>): Promise<EnvironmentValidationResult>; /** * Validate all environments */ validateAllEnvironments(environmentConfig: EnvironmentConfig, validationFunction: (files: ConfigFile[]) => Promise<any>): Promise<EnvironmentValidationResult[]>; /** * Get environment summary */ getEnvironmentSummary(results: EnvironmentValidationResult[]): { total: number; passed: number; failed: number; success: boolean; }; } //# sourceMappingURL=EnvironmentManager.d.ts.map