UNPKG

kist

Version:

Package Pipeline Processor

37 lines (36 loc) 1.24 kB
import { ConfigInterface } from "../../interface/ConfigInterface"; import { AbstractProcess } from "../abstract/AbstractProcess"; /** * ConfigLoader is responsible for loading and parsing configuration files. * Supports a custom path via `--config`, and falls back to `kist.yaml` or `kist.yml`. */ export declare class ConfigLoader extends AbstractProcess { /** * Resolved path to the configuration file, if found. */ private configPath; /** * Default filenames to search for configuration files. */ private readonly defaultFilenames; constructor(); /** * Initializes the loader by locating the configuration file. * Uses `--config` CLI flag if provided, otherwise defaults. */ initialize(): Promise<void>; /** * Loads and validates the configuration file. * * @returns Parsed and validated configuration object. * @throws Error if the configuration file cannot be read or validated. */ loadConfig(): Promise<ConfigInterface>; /** * Validates the structure of the configuration. * * @param config - The configuration object to validate. * @throws Error if validation fails. */ private validateConfig; }