Amplify Toolbox
    Preparing search index...

    Wrapper for prompter library Because @inquirer/prompts library set the methods as non-configurable, we cannot mock the methods directly. see details: https://github.com/orgs/nodejs/discussions/47959

    Index

    Constructors

    Methods

    Constructors

    Methods

    • An input style prompt.

      Parameters

      • options:
            | { defaultValue?: string; message: string; required?: undefined }
            | { defaultValue?: undefined; message: string; required: true }

        for displaying the prompt

        • { defaultValue?: string; message: string; required?: undefined }
          • OptionaldefaultValue?: string

            if user submits without typing anything. Default: "."

          • message: string

            display for the prompt

          • Optionalrequired?: undefined

            if the user input is required, incompatible with options.defaultValue

        • { defaultValue?: undefined; message: string; required: true }
          • OptionaldefaultValue?: undefined

            if user submits without typing anything. Default: "."

          • message: string

            display for the prompt

          • required: true

            if the user input is required, incompatible with options.defaultValue

      Returns Promise<string>

      Promise the user input

    • A confirm style prompt. Styles question as y/N

      Parameters

      • options: { defaultValue?: boolean; message: string }

        for displaying the prompt

        • OptionaldefaultValue?: boolean

          if user submits without typing anything. Defaults false

        • message: string

          display for the prompt

      Returns Promise<boolean>

      the boolean answer