This class encapulates operations for Zowe CLI environment information. We use the term environment loosely. Sometimes it is an environment variable. It can also be something in the runtime environment, like version of NodeJS.

### Hierarchy

- EnvQuery

## Index

### Properties

- allEolRegex
- divider
- eolMatch
- indent
- lastEolRegex

### Methods

- detectProbVal
- getCmdOutput
- getConfigInfo
- getEnvItemProblems
- getEnvItemVal
- getNpmInfo
- getOtherZoweEnvVars
- getPluginInfo
- getZoweVer
- updateProgressBar

## Properties

### Static Private Readonly allEolRegex

allEolRegex: RegExp = new RegExp(EnvQuery.eolMatch, "g")

- Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:61

### Static Private Readonly divider

divider: string = `______________________________________________${os.EOL}`

- Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:58

### Static Private Readonly eolMatch

eolMatch: string = "( ?|)"

- Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:60

### Static Private Readonly indent

indent: " " = " "

- Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:59

### Static Private Readonly lastEolRegex

lastEolRegex: RegExp = new RegExp(EnvQuery.eolMatch + "$")

- Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:62

## Methods

### Static Private detectProbVal

- detectProbVal(value: string, probTest: IProbTest): boolean

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:154

  Detect if a specified problem test finds a problem for the specified value.

  #### Parameters

  - ##### value: string

  - ##### probTest: IProbTest

    A problem test to be evaluated.

  #### Returns boolean

  True if we find a problem. False otherwise.

### Static Private getCmdOutput

- getCmdOutput(cmdToRun: string, args: string[]): string

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:170

  Run a command that displays output.

  #### Parameters

  - ##### cmdToRun: string

    The command name to be run.

  - ##### args: string[]

    The arguments to the command.

  #### Returns string

  The output of the command.

### Static Private getConfigInfo

- getConfigInfo(getResult: IGetItemVal, getItemOpts: IGetItemOpts): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:212

  Get information about the Zowe configuration.

  #### Parameters

  - ##### getResult: IGetItemVal

    The itemVal and itemValMsg properties are filled by this function.

  - ##### getItemOpts: IGetItemOpts

    options that affect our behavior.

  #### Returns Promise<void>

### Static Private getEnvItemProblems

- getEnvItemProblems(itemId: ItemId, itemVal: string): string

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:357

  For the specified itemId, get any known problems.

  #### Parameters

  - ##### itemId: ItemId

    ID of the environmental item for which we want to detect problems.

  - ##### itemVal: string

    The value of the environmental item.

  #### Returns string

  A string with a message about the problems. An empty string if no problems are detected.

### Static getEnvItemVal

- getEnvItemVal(itemId: ItemId, getItemOpts?: IGetItemOpts): Promise<IGetItemVal>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:73

  For the specified itemId, get its value.

  #### Parameters

  - ##### itemId: ItemId

    ID of the environmental item for which we want get the value.

  - ##### Default value getItemOpts: IGetItemOpts = {}

    options that affect our behavior.

  #### Returns Promise<IGetItemVal>

  An object with the item value, a display message, and a problem message.

### Static Private getNpmInfo

- getNpmInfo(getResult: IGetItemVal, getItemOpts: IGetItemOpts): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:380

  Get information about the NPM configuration.

  #### Parameters

  - ##### getResult: IGetItemVal

    The itemVal and itemValMsg properties are filled by this function.

  - ##### getItemOpts: IGetItemOpts

    options that affect our behavior.

  #### Returns Promise<void>

### Static Private getOtherZoweEnvVars

- getOtherZoweEnvVars(getResult: IGetItemVal): void

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:477

  Get other Zowe variables, beyond the ones we check for problem values.

  #### Parameters

  - ##### getResult: IGetItemVal

    The itemValMsg property is filled by this function. The itemVal property is given no value by this function.

  #### Returns void

### Static Private getPluginInfo

- getPluginInfo(getResult: IGetItemVal, getItemOpts: IGetItemOpts): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:510

  Get information about Zowe plugins. Logic stolen from plugins list command handler.

  #### Parameters

  - ##### getResult: IGetItemVal

    The itemVal and itemValMsg properties are filled by this function.

  - ##### getItemOpts: IGetItemOpts

  #### Returns Promise<void>

### Static Private getZoweVer

- getZoweVer(getResult: IGetItemVal): void

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:554

  Get the Zowe version number.

  #### Parameters

  - ##### getResult: IGetItemVal

    The itemVal and itemValMsg properties are filled by this function.

  #### Returns void

### Static Private updateProgressBar

- updateProgressBar(doesProgBarExist: boolean, firstUpdate?: boolean): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/report-env/EnvQuery.ts:575

  If a progress bar is in use, pause long enough to let it update its status.

  #### Parameters

  - ##### doesProgBarExist: boolean

           Is the progress bar availbale for use?

  - ##### Default value firstUpdate: boolean = false

           Is this our first progress bar update?
           Initialization of the progress bar takes extra time.

  #### Returns Promise<void>

Generated using TypeDoc