export type ConsoleColors = { /** * - The ANSI reset code. */ RESET: string; /** * - The ANSI green code. */ GREEN: string; /** * - The ANSI red code. */ RED: string; /** * - The ANSI yellow code. */ YELLOW: string; /** * - The ANSI cyan code. */ CYAN: string; /** * - The ANSI dim code. */ DIM: string; }; export type ValidatorOptions = { /** * - Custom name for the project report. */ projectName?: string; /** * - If true, no logs will be printed to the console. */ silent?: boolean; /** * - Custom message templates. */ messages?: DefaultMessages; }; export type DefaultMessages = { header: string; divider: string; itemValid: string; itemInvalid: string; itemMissing: string; successHeader: string; failureHeader: string; errorLoad: string; noExports: string; errorNotFound: string; errorParse: string; errorUnexpected: string; }; /** * Class responsible for validating package exports. * Implements state encapsulation, custom logging, and recursive search logic. */ declare class TinyPkgExportValidator { #private; get COLORS(): ConsoleColors; /** * Updates the color constants with a new configuration. * * @param {ConsoleColors} newColors - The new color configuration object. * @throws {TypeError} If newColors is not an object, if keys do not match exactly, or if any value is not a string. */ set COLORS(newColors: ConsoleColors); get packageData(): Record; get packageJsonPath(): string; get rootDir(): string; get results(): { path: string; valid: boolean; errorPath?: string; }[]; get started(): boolean; get projectName(): string; get silent(): boolean; /** * Creates an instance of TinyPkgExportValidator. * * @param {string} packageJsonPath - The package.json JSON file path. * @param {string} rootDir - The project root directory. * @param {ValidatorOptions} [options={}] - Configuration options. * @throws {TypeError} If arguments are not strings or if options fails deep validation. */ constructor(packageJsonPath: string, rootDir: string, options?: ValidatorOptions); /** * Provides a CLI-based testing interface to execute specific methods or tasks * defined in the `actions` object via command-line arguments. * * If no command-line argument is provided, all actions in the object will be executed * sequentially. If an argument is provided, only the corresponding action will run. * * @param {Record Promise | void>} actions - An object where keys are * command names (passed via CLI) and values are the functions to be executed. * @param {string[]} args - The array of command-line arguments. * Defaults to `process.argv` if not provided. * @throws {TypeError} If the `actions` argument is not a non-null object. */ execCommandTester(actions: Record Promise | void>, args: string[]): Promise; /** * Loads and parses the package.json file from the specified path. * * @returns {Promise} A promise that resolves when the package data is loaded. * @throws {TypeError} If the parsed JSON content is not a non-null object. * @throws {Error} If the file cannot be read or parsed. */ start(): Promise; /** * Executes the validation process. * @returns {Promise} Returns true if all paths are valid, false otherwise. */ validate(): Promise; } export default TinyPkgExportValidator; //# sourceMappingURL=TinyPkgExportValidator.d.mts.map