IF Commons GitHub

sql/cli/prompt

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0047-arcactl-init FR-013

Asking a person (commons data 0047-arcactl-init FR-013): the questions arcactl init may ask at a terminal, as an interface, so that a test answers them and the server model (where nothing is asked) has none. The terminal's own reads a line, and reads a secret with what is typed not shown.

Source: commons/data/sql/cli/prompt.ts

1 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Prompterinterface
interface Prompter

Questions a person is asked.

MemberTypeWhat it is
interactiveboolean
ask(question: string, fallback?: string | undefined) => Promise<string | undefined>A line, or the fallback where nothing is typed; none where nobody can answer.
secret(question: string) => Promise<string | undefined>A line with what is typed not shown.
confirm(question: string) => Promise<boolean>

Imported by 8 tests of the run (8 passed, 0 failed): the library's results

silentconstno test imports it
const silent: Prompter

Where nothing can be asked: every question has no answer.

terminalPrompterfunctionno test imports it
function terminalPrompter(): Prompter

The prompter of a terminal.

Titles, headings, exports, tables, columns and requirements. Esc closes.