Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefinitionTreeResolver

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

Static Private log

Methods

Static Private addBaseProfile

Static combineAllCmdDefs

  • 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
  • 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