UNPKG

@dynrl/drl-settings

Version:

Standardizes settings access

31 lines (30 loc) 981 B
/** * Wrapper for accessing settings in DRL apps and modules. */ export declare class DrlSettings { private static WhiteList; /** * Detects if importing .env files is allowed. This requires that the * environment variable DRL_HOST_ENV be set to CI or LOCAL. */ static useEnvFile(): boolean; /** * Initializes and validates anticipated keys. * @param keys - A list of keys that are going to be used * @param filePath - An optional */ static initSettings(keys: Array<string>, filePath?: string): void; /** * Lists all available keys */ static getSettingKeys(): string[]; /** * Grabs setting value for a given key. * @param key - key to look up * @throws - If key has not be properly registered or doesn't exist in process.env */ static getSetting(key: string): string; private static warn; private static log; private static checkKeys; }