@roit/roit-environment
Version:
Facilitate environment management in node applications
37 lines (36 loc) • 1.25 kB
TypeScript
import { Env } from "./Env";
import { EnvOptions } from "./EnvOptions";
export declare class Environment {
private static instance;
private envEnum;
private env;
private option?;
private constructor();
static envOptions(options?: EnvOptions): void;
private static getInstance;
static addProperty(key: string, value: any, setInEnv?: boolean): void;
private static createDotNotationObject;
private static getEnvValue;
private static getValueFromCurrentEnv;
private static getValueFromGlobalEnv;
static acceptedEnv(...environments: Env[]): boolean;
static currentEnv(): Env;
private loadEnvironment;
private setEnvironmentType;
private loadYamlFile;
private handleYamlError;
private handlePropertyOverride;
private loadEnvVariables;
private processEnvironmentVariables;
private isObject;
private isLeveledKey;
private processLeveledVariable;
private buildRelativePath;
private setEnvironmentVariable;
static getProperty(key: string): string;
private static findLeveledValue;
private static findKeysWithLevel;
static getRelativePath(levels: number, key: string): string;
private static buildRelativePath;
static reload(): void;
}