UNPKG

nest-simple-config

Version:

A powerful and flexible configuration management library for NestJS applications. Supports JSON, YAML file loading, environment variable overrides, immutable configurations, and type-safe configuration access with dependency injection.

26 lines (25 loc) 772 B
export type ArrayMergeMode = 'section' | 'all'; export interface ConfigurationBuilderOption { keyPathDelimiter?: string; arrayMergeMode?: ArrayMergeMode; validator?: ConfigValidatorOptions; } export interface SimpleConfigOptional extends ConfigurationBuilderOption { configFileOptions?: ConfigurationFileOptions; envOptions?: EnvironmentOptions; } export type FileType = 'json' | 'yaml'; export interface ConfigurationFileOptions { fileType?: FileType; rootPath?: string; filename?: string; includeMiddleNames?: string[]; } export interface EnvironmentOptions { prefix?: string; delimiter?: string; } export interface ConfigValidatorOptions { validator: (config: any) => void; checkLevel: 'warn' | 'error' | 'detail'; }