Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICommandResponse

Command response object built by the command processor (and command handler). The response object is always built internally, but displayed to the command issuer if response-format-json is specified.

For handlers, see the HandlerResponse (IHandlerResponseApi) for the public APIs used to by handlers to create this response.

export
interface

ICommandResponse

Hierarchy

  • ICommandResponse

Index

Properties

Optional data

data: any

Handlers (and help, etc.) can choose to append a data object to the response. Not displayed to the console unless response format JSON is specified.

memberof

ICommandResponse

Optional error

Error object automatically appended by the command processor when a handler rejects the promise. Contains the stack and other messages to help diagnosis. Not displayed to the console unless response format JSON is specified.

memberof

ICommandResponse

exitCode

exitCode: number

Requested exit code for the process when your command is complete. If this is not specified, the default is 0 for successful commands and 1 for failed commands according to the value of the above "success" field.

memberof

ICommandResponse

message

message: string

Message appended by the handlers. The message is not displayed on the console, only displayed if response format JSON is indicated.

memberof

ICommandResponse

Optional stderr

stderr: Buffer

The stderr from the command. Buffered regardless of response format specification.

memberof

ICommandResponse

Optional stdout

stdout: Buffer

The stdout from the command. Buffered regardless of response format specification.

memberof

ICommandResponse

success

success: boolean

Overall command success flag. True indicates that the command handler/processor/help was successful.

memberof

ICommandResponse

Generated using TypeDoc