Combines a root command definition with an array of command definition trees into a full tree with the command definitions as children of the root command For Imperative internal use

### Hierarchy

- DefinitionTreeResolver

## Index

### Accessors

- log

### Methods

- addBaseProfile
- combineAllCmdDefs
- resolve

## Accessors

### Static Private log

- get log(): Logger

- - Defined in @zowe/imperative/src/imperative/src/DefinitionTreeResolver.ts:162

  #### Returns Logger

## Methods

### Static Private addBaseProfile

- addBaseProfile(cmdDefs: ICommandDefinition[]): ICommandDefinition[]

- - Defined in @zowe/imperative/src/imperative/src/DefinitionTreeResolver.ts:150

  Append optional base profile to profile type array for all command definitions that have profiles associated.

  #### Parameters

  - ##### cmdDefs: ICommandDefinition[]

    An array of all resolved command definitions

  #### Returns ICommandDefinition[]

  - An array of command definitions with base profile added

### Static combineAllCmdDefs

- combineAllCmdDefs(callerDir: string, cmdDefs?: ICommandDefinition[], cmdModuleGlobs?: string[], addBaseProfile?: boolean): ICommandDefinition[]

- - Defined in @zowe/imperative/src/imperative/src/DefinitionTreeResolver.ts:95

  Combine all of the command definitions supplied explicitly in the cmdDefs parameter and those command definitions discovered by resolving the supplied cmdModuleGlobs.

  #### Parameters

  - ##### callerDir: string

    the directory that any childrenModuleGlobs are relative to

  - ##### Default value cmdDefs: ICommandDefinition[] = []

    An array of already-resolved definitions

  - ##### Default value cmdModuleGlobs: string[] = []

    list of globs that match definition files

  - ##### Optional addBaseProfile: boolean

    Specifies whether to add optional base profile to command definitions

  #### Returns ICommandDefinition[]

  - An array of all resolved command definitions

### Static resolve

- resolve(rootCommandDescription: string, displayName: string, callerDir: string, errorLogger: Logger, childrenDefinitions?: ICommandDefinition[], childrenModuleGlobs?: string[], addBaseProfile?: boolean): ICommandDefinition

- - Defined in @zowe/imperative/src/imperative/src/DefinitionTreeResolver.ts:36

  Get a fully constructed tree of command definitions from everything the CLI developer has specified

  #### Parameters

  - ##### rootCommandDescription: string

    Description to use for the root command (when

  - ##### displayName: string

    the display name for the product/CLI

  - ##### callerDir: string

    the directory that any childrenModuleGlobs are relative to

  - ##### errorLogger: Logger

    a logger instance to be used (e.g. a console logger) for errors

  - ##### Optional childrenDefinitions: ICommandDefinition[]

    already loaded definitions that have been passed by the user

  - ##### Optional childrenModuleGlobs: string[]

    list of globs that match definition files

  - ##### Optional addBaseProfile: boolean

    Specifies whether to add optional base profile to command definitions

  #### Returns ICommandDefinition

  - the complete command tree

Generated using TypeDoc