UNPKG

ask-cli

Version:

Alexa Skills Kit (ASK) Command Line Interfaces

32 lines (31 loc) 925 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.informReceivedError = exports.confirmAllowSignIn = void 0; const inquirer = require("inquirer"); const questions = require("./questions"); module.exports = { confirmAllowSignIn, informReceivedError }; function confirmAllowSignIn(callback) { inquirer .prompt(questions.CONFIRM_ALLOW_BROWSER_SIGN_IN) .then((answer) => { callback(null, answer.choice); }) .catch((error) => { callback(error); }); } exports.confirmAllowSignIn = confirmAllowSignIn; function informReceivedError(callback, error) { inquirer .prompt([{ ...questions.INFORM_ERROR, message: `Sign in error: ${error}.` }]) .then((answer) => { callback(null, answer.choice); }) .catch((error) => { callback(error); }); } exports.informReceivedError = informReceivedError;