UNPKG

@syntropysoft/praetorian

Version:

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

48 lines 1.4 kB
/** * TODO: DECLARATIVE PROGRAMMING PATTERN * * This file demonstrates excellent declarative programming practices: * - Pure functions with clear input/output contracts * - Functional composition with async/await * - Immutable data handling with spread operator * - Array methods (forEach, push, length) * - No imperative state mutations * - Clear separation of concerns * * Mutation Score: 100% - Declarative code is inherently testable! */ import { ValidationResult, ValidationContext } from '../../shared/types'; interface ValidatorOptions { plugins?: string[]; strict?: boolean; rules?: Record<string, boolean>; } export declare class Validator { private pluginLoader; private healthChecker; private pluginValidator; private resultBuilder; private options; constructor(options?: ValidatorOptions); /** * Validate a configuration using loaded plugins */ validate(config: Record<string, any>, context: ValidationContext): Promise<ValidationResult>; /** * Get all available validation rules */ getRules(): any[]; /** * Enable or disable a specific rule */ setRuleEnabled(ruleId: string, enabled: boolean): boolean; /** * Get plugin health status */ getHealth(): Promise<{ healthy: boolean; plugins: any[]; }>; } export {}; //# sourceMappingURL=Validator.d.ts.map