/** * Environment type enum */ export declare enum EnvironmentType { DEVELOPMENT = "development", PRODUCTION = "production" } /** * Environment configuration interface */ export interface IEnvironmentConfig { /** * Get the current environment type * @returns {EnvironmentType} The current environment */ getEnvironment(): EnvironmentType; /** * Check if running in development mode * @returns {boolean} True if in development mode */ isDevelopment(): boolean; /** * Check if running in production mode * @returns {boolean} True if in production mode */ isProduction(): boolean; } /** * Environment configuration class that detects the current environment * @class EnvironmentConfig * @implements {IEnvironmentConfig} * * @description * This class provides environment detection based on multiple indicators: * 1. NODE_ENV environment variable * 2. Presence of workspace structure (workspaces field in package.json) * 3. Module resolution capability (can resolve published packages) * * @example * ```typescript * const envConfig = new EnvironmentConfig(); * if (envConfig.isDevelopment()) { * console.log('Running in development mode'); * } * ``` */ export declare class EnvironmentConfig implements IEnvironmentConfig { private environment; constructor(); /** * Detects the current environment based on various indicators * @returns {EnvironmentType} The detected environment type * @private */ private detectEnvironment; /** * Finds the project root by traversing up the directory tree * @param {string} startDir - Directory to start searching from * @returns {string | null} Path to project root or null if not found * @private */ private findProjectRoot; /** * Gets the current environment type * @returns {EnvironmentType} The current environment */ getEnvironment(): EnvironmentType; /** * Checks if running in development mode * @returns {boolean} True if in development mode */ isDevelopment(): boolean; /** * Checks if running in production mode * @returns {boolean} True if in production mode */ isProduction(): boolean; }