Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for managing service environments.

Hierarchy

  • Environment

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private service

service: Service

Service instance.

Accessors

path

  • get path(): string
  • Getter for the selected environment file path.

    function

    path

    memberof

    Environment

    Returns string

    Path to the environment specific .env file.

Methods

Private create

  • create(): void

createDotEnv

  • createDotEnv(): void

get

  • get(name: string): string | null
  • Gets an environment variable value.

    function

    get

    memberof

    Environment

    Parameters

    • name: string

      Name of the environment variable.

    Returns string | null

    Value of the env var or null if it doesn't exist.

Private read

  • read(): string

set

  • set(name: string, value: string): void
  • Sets an environment variable.

    function

    set

    memberof

    Environment

    Parameters

    • name: string

      Name of the environment variable.

    • value: string

      Value of the environment variable.

    Returns void

Private write

  • write(content: string): void
  • Writes content to the environment .env file.

    function

    write

    memberof

    Environment

    Parameters

    • content: string

      Content to write to the environment file.

    Returns void

Generated using TypeDoc