Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

constructor

  • new default(__namedParameters?: DotenvAzureOptions): default
  • Initializes a new instance of the DotenvAzure class.

    Parameters

    • __namedParameters: DotenvAzureOptions = {}

    Returns default

Properties

Private Optional Readonly clientId

clientId: string

Private Optional Readonly clientSecret

clientSecret: string

Private Optional Readonly connectionString

connectionString: string

Private Readonly keyVaultClients

keyVaultClients: {}

Type declaration

  • [vaultURL: string]: SecretClient

Private Readonly keyVaultRateLimitMinTime

keyVaultRateLimitMinTime: number

Private Optional Readonly tenantId

tenantId: string

Methods

config

  • config(options?: DotenvAzureConfigOptions): Promise<DotenvAzureConfigOutput>
  • Loads Azure App Configuration and Key Vault variables and .env file contents into process.env. Example: 'KEY=value' becomes { parsed: { KEY: 'value' } }

    Parameters

    • options: DotenvAzureConfigOptions = {}

      controls behavior

    Returns Promise<DotenvAzureConfigOutput>

Protected getAppConfigurations

  • getAppConfigurations(client: AppConfigurationClient): Promise<AppConfigurations>

Private getAzureCredentials

Protected getKeyVaultClient

  • getKeyVaultClient(credentials: AzureCredentials, vaultURL: string): SecretClient
  • Parameters

    • credentials: AzureCredentials
    • vaultURL: string

    Returns SecretClient

Protected getKeyVaultReferenceInfo

  • getKeyVaultReferenceInfo(__namedParameters: ConfigurationSetting): KeyVaultReferenceInfo
  • Parameters

    • __namedParameters: ConfigurationSetting

    Returns KeyVaultReferenceInfo

Protected getSecretsFromKeyVault

  • getSecretsFromKeyVault(credentials: AzureCredentials, vars: KeyVaultReferences): Promise<VariablesObject>
  • Parameters

    • credentials: AzureCredentials
    • vars: KeyVaultReferences

    Returns Promise<VariablesObject>

Protected isKeyVaultReference

  • isKeyVaultReference(config: ConfigurationSetting): boolean

loadFromAzure

  • Loads your Azure App Configuration and Key Vault variables. It does not change process.env.

    Parameters

    • Optional dotenvVars: DotenvParseOutput

      dotenv parse() output containing azure credentials variables

    Returns Promise<VariablesObject>

    an object with keys and values

parse

  • Parses a string or buffer in the .env file format into an object and merges it with your Azure App Configuration and Key Vault variables. It does not change process.env.

    Parameters

    • src: string

      contents to be parsed

    • Optional options: DotenvParseOptions

      additional options

    Returns Promise<VariablesObject>

    an object with keys and values

Protected validateFromEnvExample

  • validateFromEnvExample(options: DotenvAzureConfigOptions, dotenvError?: Error): void
  • Parameters

    • options: DotenvAzureConfigOptions
    • Optional dotenvError: Error

    Returns void

Legend

  • Constructor
  • Method
  • Private property
  • Private method
  • Protected method

Generated using TypeDoc