Imperative web help manager. Single instance class used to launch web help in browser which handles (re)building web help files first if necessary.

export

### Hierarchy

- WebHelpManager

### Implements

- IWebHelpManager

## Index

### Properties

- mFullCommandTree
- mInstance

### Accessors

- fullCommandTree
- webHelpDir
- instance

### Methods

- calcPackageMetadata
- checkIfMetadataChanged
- eqPackageMetadata
- openHelp
- openRootHelp
- writePackageMetadata

## Properties

### Private mFullCommandTree

mFullCommandTree: ICommandDefinition

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:53

Imperative command tree to build help for

memberof

  WebHelpManager

### Static Private mInstance

mInstance: WebHelpManager = null

- Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:46

Singleton instance of this class

static
memberof

  WebHelpManager

## Accessors

### fullCommandTree

- get fullCommandTree(): ICommandDefinition
- set fullCommandTree(fullCommandTree: ICommandDefinition): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:146

  Get a reference to our CLI's full command tree.

  #### Returns ICommandDefinition

  The command tree.

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:138

  Record a reference to our CLI's full command tree.

  #### Parameters

  - ##### fullCommandTree: ICommandDefinition

    The command tree.

  #### Returns void

  The command tree.

### Private webHelpDir

- get webHelpDir(): string

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:156

  Gets the directory where built copy of web help is stored

  readonly

  #### Returns string

  Absolute path of directory

### Static instance

- get instance(): WebHelpManager

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:60

  Return a singleton instance of this class

  static
  readonly

  #### Returns WebHelpManager

## Methods

### Private calcPackageMetadata

- calcPackageMetadata(packageJson: any, pluginsJson: any): IWebHelpPackageMetadata[]

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:167

  Computes current package metadata based on version of core and installed plug-ins

  #### Parameters

  - ##### packageJson: any

    CLI package JSON

  - ##### pluginsJson: any

    Imperative plug-ins JSON

  #### Returns IWebHelpPackageMetadata[]

  Names and versions of all components

### Private checkIfMetadataChanged

- checkIfMetadataChanged(): MaybePackageMetadata

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:193

  Checks if cached package metadata is non-existent or out of date

  #### Returns MaybePackageMetadata

  Updated metadata, or `null` if cached metadata is already up to date

### Private eqPackageMetadata

- eqPackageMetadata(cached: IWebHelpPackageMetadata[], current: IWebHelpPackageMetadata[]): boolean

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:183

  Compares two package metadata objects to see if they are equal

  #### Parameters

  - ##### cached: IWebHelpPackageMetadata[]

    Old cached package metadata

  - ##### current: IWebHelpPackageMetadata[]

    Freshly computed package metadata

  #### Returns boolean

  True if the package metadata objects are equal

### openHelp

- openHelp(inContext: string, cmdResponse: IHandlerResponseApi): void

- Implementation of IWebHelpManager.openHelp

  - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:83

  Launch help page for specific group/command in browser.

  memberof

    WebHelpManager

  #### Parameters

  - ##### inContext: string

    Name of page for group/command to jump to

  - ##### cmdResponse: IHandlerResponseApi

    Command response object to use for output

  #### Returns void

### openRootHelp

- openRootHelp(cmdResponse: IHandlerResponseApi): void

- Implementation of IWebHelpManager.openRootHelp

  - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:73

  Launch root help page in browser.

  memberof

    WebHelpManager

  #### Parameters

  - ##### cmdResponse: IHandlerResponseApi

    Command response object to use for output

  #### Returns void

### Private writePackageMetadata

- writePackageMetadata(metadata: IWebHelpPackageMetadata[]): void

- - Defined in @zowe/imperative/src/cmd/src/help/WebHelpManager.ts:216

  Updates cached package metadata

  #### Parameters

  - ##### metadata: IWebHelpPackageMetadata[]

    New metadata to save to disk

  #### Returns void

Generated using TypeDoc