ConfigManager cache command flag values so that user doesn't need to enter the same values repeatedly.

For example, 'namespace' is usually remains the same across commands once it is entered, and therefore user doesn't need to enter it repeatedly. However, user should still be able to specify the flag explicitly for any command.

Constructors

Properties

config: Record<string, any>

Methods

  • Apply the command flags precedence

    It uses the below precedence for command flag values:

    1. User input of the command flag
    2. Default value of the command flag if the command is not 'init'.

    Parameters

    • argv: Argv<any>
    • aliases: any

    Returns Argv<any>

  • Run prompts for the given set of flags

    Parameters

    • task: TaskWrapper<any, any, any>

      task object from listr2

    • flagList: CommandFlag[] = []

      list of flag objects

    Returns Promise<void>