UNPKG

lightweight-browser-load-tester

Version:

A lightweight load testing tool using real browsers for streaming applications with DRM support

90 lines 2.52 kB
/** * Configuration management system for the lightweight browser load tester */ import Joi from 'joi'; import { TestConfiguration } from '../types'; /** * Configuration source types */ export type ConfigSource = 'file' | 'cli' | 'env' | 'default'; /** * Configuration with metadata about sources */ export interface ConfigurationWithMeta { config: TestConfiguration; sources: Record<keyof TestConfiguration, ConfigSource>; } /** * Configuration file formats */ export type ConfigFormat = 'json' | 'yaml' | 'yml'; /** * Configuration parsing options */ export interface ConfigParseOptions { configFile?: string; cliArgs?: string[]; validateOnly?: boolean; } /** * Configuration parsing and validation errors */ export declare class ConfigurationError extends Error { source?: ConfigSource | undefined; field?: string | undefined; constructor(message: string, source?: ConfigSource | undefined, field?: string | undefined); } /** * Main configuration manager class */ export declare class ConfigurationManager { /** * Parse configuration from multiple sources with priority order: * 1. Command line arguments (highest priority) * 2. Environment variables * 3. Configuration file * 4. Default values (lowest priority) */ static parseConfiguration(options?: ConfigParseOptions): Promise<ConfigurationWithMeta>; /** * Load configuration from file (JSON or YAML) */ private static loadConfigFile; /** * Detect configuration file format from extension */ private static detectFileFormat; /** * Load configuration from environment variables */ private static loadFromEnvironment; /** * Parse command line arguments using Commander.js */ private static parseCommandLineArgs; /** * Merge configurations with source tracking */ private static mergeConfigs; /** * Set nested object value using dot notation */ private static setNestedValue; /** * Parse environment variable value to appropriate type */ private static parseEnvValue; /** * Validate configuration using Joi schema */ private static validateConfiguration; /** * Get configuration schema for external validation */ static getValidationSchema(): Joi.ObjectSchema; /** * Create example configuration file */ static generateExampleConfig(format?: ConfigFormat): string; } //# sourceMappingURL=index.d.ts.map