Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImperativeConfig

This class is used to contain all configuration being set by Imperative. It is a singleton and should be accessed via ImperativeConfig.instance.

Hierarchy

  • ImperativeConfig

Index

Properties

Private mCallerLocation

mCallerLocation: string = null

This parameter is used to contain the caller location of imperative configuration file.

Private mCommandLine

mCommandLine: string

Current command needed for processing

Private mConfig

mConfig: Config

The config object

Private mDaemonContext

mDaemonContext: IDaemonContext

This is the daemon context needed to pass to yargs.fail() in the event that we cannot extract context through a yargs.parse() call.

memberof

ImperativeConfig

Private mHostPackageName

mHostPackageName: string

This is the package name of the host application. It will only be set once accessed to lessen loads to the host package.json.

Private mImperativePackageName

mImperativePackageName: string

This is the name of our imperative package. It will only be set once accessed to lessen loads to the imperative package.json.

It isn't hardcoded so that the name of our package can change without affecting modules dependent on it.

Private mLoadedConfig

mLoadedConfig: IImperativeConfig = null

This parameter is used as the container of all loaded configuration for Imperative.

Private mRootCommandName

mRootCommandName: string

This is our calling CLI's command name (taken from package.json: bin).

Static Private mInstance

mInstance: ImperativeConfig = null

This is the variable that stores the specific instance of Imperative Config. Defined as static so that it can be accessed from anywhere.

Accessors

callerLocation

  • get callerLocation(): string
  • set callerLocation(location: string): void

callerPackageJson

  • get callerPackageJson(): any

cliHome

  • get cliHome(): string

commandLine

  • get commandLine(): string
  • set commandLine(args: string): void

config

daemonContext

envVariablePrefix

  • get envVariablePrefix(): string

hostPackageName

  • get hostPackageName(): string

imperativePackageName

  • get imperativePackageName(): string

loadedConfig

profileDir

  • get profileDir(): string

profileSchemas

  • get profileSchemas(): {}

rootCommandName

  • get rootCommandName(): string
  • set rootCommandName(rootCommandName: string): void

Static instance

Methods

findPackageBinName

  • findPackageBinName(): string

getCallerFile

  • getCallerFile(file: string): any
  • Require a file from a project using imperative accounting for imperative being contained separately from the current implementers directory.

    Parameters

    • file: string

      the file to require from project using imperative

    Returns any

Generated using TypeDoc