Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SharedOptions

Options which can be reused between different Zowe commands

Hierarchy

  • SharedOptions

Index

Methods

Static Private readStdin

  • Read from standard in until EOF (if the option was specified)

    Parameters

    • args: Arguments

      arguments for the command

    • response: CommandResponse

      the response object to write to / log to if necessary

    • commandType: ICommandNodeType

      what type of command might have the --stdin option? If it's not "command" this method will return immediately

    • Default value stream: ReadStream & { fd: 0 } = process.stdin
    • done: (readErr: IImperativeError, attemptedStdinRead: boolean) => void

      callback for when stdin reading is done. attemptedStdinRead: whether we tried to read standard in based on the arguments and command definition

    Returns void

Static readStdinIfRequested

  • Promise based API for reading the standard in if the arguments dictate to do so. The response is placed in the arguments to be passed on the the command handlers.

    memberof

    SharedOptions

    Parameters

    • args: Arguments

      The yargs style command line arguments supplied by the user

    • response: CommandResponse

      The command response object (for messages, etc.)

    • commandType: ICommandNodeType

      The type of the command

    • Default value stream: ReadStream & { fd: 0 } = process.stdin

    Returns Promise<boolean>

    • The promise to be fulfilled (or rejected with an imperative error) - false if
                              stdin was read and false if it wasn't
      

Generated using TypeDoc