Global constants, methods, and configuration.

Constructors

Properties

SFDX_INTEROPERABILITY: boolean = ...

Enable interoperability between .sfdx and .sf.

When @salesforce/core@v2 is deprecated and no longer used, this can be removed.

SFDX_STATE_FOLDER: ".sfdx" = '.sfdx'

The global folder in which sfdx state is stored.

SF_STATE_FOLDER: ".sf" = '.sf'

The global folder in which sf state is stored.

STATE_FOLDER: ".sfdx" = Global.SFDX_STATE_FOLDER

The preferred global folder in which state is stored.

Accessors

  • get DIR(): string
  • The full system path to the preferred global state folder

    Returns string

Methods

  • Creates a directory within Global.SFDX_DIR, or Global.SFDX_DIR itself if the dirPath param is not provided. This is resolved or rejected when the directory creation operation has completed.

    Parameters

    • Optional dirPath: string

      The directory path to be created within Global.SFDX_DIR.

    Returns Promise<void>

  • Gets the current mode environment variable as a Mode instance.

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

    Returns Mode