Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default
    • default

Index

Constructors

  • new default(argv: string[], config: IConfig): default
  • Parameters

    • argv: string[]
    • config: IConfig

    Returns default

Properties

argv: string[]
config: IConfig
id: undefined | string
_base: string
aliases: string[]

An array of aliases for this command

args: { name: string; required: boolean }[] = ...
description: string = ...
examples: string[] = ...
flags: { basePath: IOptionFlag<string>; extended: IBooleanFlag<boolean>; help: IBooleanFlag<void>; verbose: IBooleanFlag<boolean> } = BaseGetCommand.flags

Type declaration

  • basePath: IOptionFlag<string>
  • extended: IBooleanFlag<boolean>
  • help: IBooleanFlag<void>
  • verbose: IBooleanFlag<boolean>
help: undefined | string
hidden: boolean

hide the command from help?

id: string

A command ID, used mostly in error or verbose reporting

parse: boolean
parserOptions: {}

Type declaration

    plugin: undefined | IPlugin
    run: (argv?: string[], config?: LoadOptions) => PromiseLike<any>

    Type declaration

      • (argv?: string[], config?: LoadOptions): PromiseLike<any>
      • instantiate and run the command

        Parameters

        • Optional argv: string[]

          argv

        • Optional config: LoadOptions

        Returns PromiseLike<any>

        Promise

    strict: boolean

    When set to false, allows a variable amount of arguments

    title: undefined | string
    usage: undefined | string | string[]

    An override string (or strings) for the default usage documentation

    Accessors

    • get ctor(): typeof default
    • Returns typeof default

    Methods

    • _run<T>(): Promise<undefined | T>
    • Type parameters

      • T

      Returns Promise<undefined | T>

    • error(input: string | Error, options: { code?: string; exit: false } & PrettyPrintableError): void
    • error(input: string | Error, options?: { code?: string; exit?: number } & PrettyPrintableError): never
    • Parameters

      • input: string | Error
      • options: { code?: string; exit: false } & PrettyPrintableError

      Returns void

    • Parameters

      • input: string | Error
      • Optional options: { code?: string; exit?: number } & PrettyPrintableError

      Returns never

    • exit(code?: number): never
    • Parameters

      • Optional code: number

      Returns never

    • init(): Promise<void>
    • log(message?: string, ...args: any[]): void
    • Parameters

      • Optional message: string
      • Rest ...args: any[]

      Returns void

    • run(): Promise<void>
    • warn(input: string | Error): void
    • Parameters

      • input: string | Error

      Returns void