Crypto CLI
    Preparing search index...

    Function secretPrompt

    • The secret prompt of a run: promptHidden when stdin is a terminal, else undefined (a pipe cannot answer a prompt).

      Parameters

      • stdin: { isTTY?: boolean }

        The input stream.

      Returns ((message: string) => Promise<string | undefined>) | undefined

      • (message: string) => Promise<string | undefined>
          • (message: string): Promise<string | undefined>
          • Ask for a secret on the terminal without echoing it. The prompt goes to stderr, so stdout keeps only the result.

            Parameters

            • message: string

              The prompt.

            Returns Promise<string | undefined>

            The answer, or undefined when the prompt was cancelled.

      • undefined