Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigEnvironmentVariables

Hierarchy

  • ConfigEnvironmentVariables

Index

Properties

Static Private Readonly complexEnvironmentVariableRegexGlobal

complexEnvironmentVariableRegexGlobal: RegExp = /\${([^}]+)}/g

Static Private Readonly simpleEnvironmentVariableRegexGlobal

simpleEnvironmentVariableRegexGlobal: RegExp = /\$(\w+)/g

Methods

Static Private findEnvironmentVariables

  • findEnvironmentVariables(candidate: string): Set<string>
  • Find all environment variables in a given string and return the variable names

    internal

    Parameters

    • candidate: string

      The string to search for enviornment variables

    Returns Set<string>

    A set of strings if environment variables are found, an empty set otherwise

Static replaceEnvironmentVariablesInConfigLayer

  • replaceEnvironmentVariablesInConfigLayer(obj: any, config: Config, layer: IConfigLayer, path?: string): void
  • internal

    Replace environment variables in a config layer with their real values

    Parameters

    • obj: any

      The config object to iterate over

    • config: Config

      The overall config class to modify

    • layer: IConfigLayer

      The config layer being operated on

    • Default value path: string = ""

      The current high level path to the properties being evaluated

    Returns void

Static Private replaceEnvironmentVariablesInString

  • replaceEnvironmentVariablesInString(candidate: string): string

Static Private replaceRegexText

  • replaceRegexText(text: string, regex: RegExpExecArray, newValue: string): string

Static restoreEnvironmentVariablesInConfigLayer

  • restoreEnvironmentVariablesInConfigLayer(obj: any, config: Config, layer: IConfigLayer, path?: string): void
  • internal

    Replace the real values of the variables with the variable names

    Parameters

    • obj: any

      The config object to iterate over

    • config: Config

      The overall config class to modify

    • layer: IConfigLayer

      The config layer being operated on

    • Default value path: string = ""

      The current high level path to the properties being evaluated

    Returns void

Generated using TypeDoc