Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Global

Global constants, methods, and configuration.

Hierarchy

  • Global

Index

Properties

Static DIR

DIR: string = path.join(os.homedir(), Global.STATE_FOLDER)

The full system path to the global state folder.

See Global.STATE_FOLDER

Static LOG_FILE_PATH

LOG_FILE_PATH: string = path.join(Global.DIR, 'sfdx.log')

The full system path to the global log file.

Static STATE_FOLDER

STATE_FOLDER: ".sfdx" = ".sfdx"

The global folder in which state is stored.

Methods

Static createDir

  • createDir(dirPath?: undefined | string): Promise<void>
  • Creates a directory within Global.DIR, or Global.DIR itself if the dirPath param is not provided. This is resolved or rejected when the directory creation operation has completed.

    Parameters

    • Optional dirPath: undefined | string

      The directory path to be created within Global.DIR.

    Returns Promise<void>

Static getEnvironmentMode

  • getEnvironmentMode(): Mode
  • Gets the current mode environment variable as a Mode instance.

    console.log(Global.getEnvironmentMode() === Mode.PRODUCTION);

    Returns Mode