Private
constructorThe constructor of ConfigManager is private and is called only by GetInstance to ensure it works as singleton.
Private
configPrivate
specsStatic
Private
instanceDisplay the current ENV using either the logger you provide or console.log by default.
This retrieves the config and fills defaults. Additionnaly, the config object you get is decorated with a few helper fonctions such as Print, Validate, etc... to help you easily use your config
Private
isPrivate
isPrivate
printPrivate
printPrivate
validaThis is the actual function performing the validation of a given field according to the spcs
The specs
Static
clearStatic
Private
getStatic
getConfigManager is a singleton.
Optional
specs: string | ConfigSpecsThe config specs the ConfigManager will rely on. It can be a ConfigSpecs object or the path of a file. In that case, the file can be either a YAML file or a JSON file.
Static
Private
isregStatic
loadLoad specs from a YAML file
Path of the YAML file
Static
loadStatic
Private
stringGenerated using TypeDoc
The ConfigManager class is where everything happens.
The ConfigManager allows you loading your config specs definition, it also loads your actual config and lets you access it.