Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Command
    • Send

Index

Constructors

constructor

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

    • argv: string[]
    • config: IConfig

    Returns Send

Properties

argv

argv: string[]

config

config: IConfig

ctor

ctor: Command

Protected debug

debug: function

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

id

id: string | undefined

Static _base

_base: string

Static aliases

aliases: string[]

An array of aliases for this command

Static args

args: object[] = [{ name: "requests", description: "Path to requests file in JSONL or YAML format", required: true }]

Static description

description: string = "Send HTTP requests using a queue"

Static examples

examples: string[] | undefined

An array of example strings to show at the end of the command's help

Static help

help: string | undefined

Static hidden

hidden: boolean

hide the command from help?

Static id

id: string

A command ID, used mostly in error or verbose reporting

Static parse

parse: boolean

Static parserOptions

parserOptions: __type

Static plugin

plugin: IPlugin | undefined

Static run

run: run

instantiate and run the command

Static strict

strict: boolean

When set to false, allows a variable amount of arguments

Static title

title: string | undefined

Static usage

usage: string | string[] | undefined

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

Methods

Protected _help

  • _help(): never
  • Returns never

Protected _helpOverride

  • _helpOverride(): boolean
  • Returns boolean

_run

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

    • T

    Returns Promise<T | undefined>

Protected _version

  • _version(): never
  • Returns never

Protected catch

  • catch(err: any): Promise<any>
  • Parameters

    • err: any

    Returns Promise<any>

error

  • error(input: string | Error, options: object): void
  • error(input: string | Error, options?: undefined | object): never
  • Parameters

    • input: string | Error
    • options: object
      • Optional code?: undefined | string
      • exit: false

    Returns void

  • Parameters

    • input: string | Error
    • Optional options: undefined | object

    Returns never

exit

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

    • Optional code: undefined | number

    Returns never

Protected finally

  • finally(_: Error | undefined): Promise<any>
  • Parameters

    • _: Error | undefined

    Returns Promise<any>

Protected init

  • init(): Promise<any>
  • Returns Promise<any>

log

  • log(message?: undefined | string, ...args: any[]): void
  • Parameters

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

    Returns void

Protected parse

  • parse<F, A>(options?: Parser.Input<F>, argv?: string[]): Parser.Output<F, A>
  • Type parameters

    • F

    • A: object

    Parameters

    • Optional options: Parser.Input<F>
    • Optional argv: string[]

    Returns Parser.Output<F, A>

run

  • run(): Promise<void>

warn

  • warn(input: string | Error): void
  • Parameters

    • input: string | Error

    Returns void

Object literals

Static flags

flags: object

force

force: object & object = flags.boolean({char: "f",description: "Send network requests. Defaults to false (dry-run).",default: false,})

headers

headers: object & object & object = flags.string({char: "H",multiple: true,description: "Header to add to every request. For example, 'X-My-Header:123'",})

help

help: object & object = flags.help({ char: "h" })

Generated using TypeDoc