@nexe/config-manager
Version:
Nexe Config Manager - A flexible configuration management solution with multiple sources and hot reload support
34 lines • 894 B
TypeScript
import type { IConfigSource } from '../interfaces';
/**
* 环境变量配置源
*/
export declare class EnvironmentConfigSource implements IConfigSource {
private prefix;
/**
* @param prefix 环境变量前缀,例如:'APP_'
*/
constructor(prefix?: string);
/**
* 从环境变量加载配置
*/
load(key?: string, _pathPrefix?: string): Promise<unknown>;
/**
* 获取配置源名称
*/
getName(): string;
/**
* 环境变量配置不支持热更新
*/
supportsHotReload(): boolean;
/**
* 转换环境变量键名
* 将点分隔的配置键转换为下划线分隔的环境变量键
* 例如:'app.server.port' -> 'APP_SERVER_PORT'
*/
private getEnvKey;
/**
* 尝试解析环境变量值
*/
private parseValue;
}
//# sourceMappingURL=environment-config-source.d.ts.map