Comparing version 2.0.8 to 2.0.9
@@ -18,2 +18,3 @@ import { StreamOutput } from './stream'; | ||
prompt(name: string, options?: IPromptOptions): Promise<any>; | ||
confirm(message: string): Promise<boolean>; | ||
log(data?: string, ...args: any[]): void; | ||
@@ -20,0 +21,0 @@ warn(err: Error | string, options?: Partial<IErrorOptions>): void; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -37,2 +45,8 @@ const prompt_1 = require("./prompt"); | ||
} | ||
confirm(message) { | ||
return this.action.pauseAsync(() => __awaiter(this, void 0, void 0, function* () { | ||
let response = yield this.Prompt.prompt(message); | ||
return ['y', 'yes'].includes(response.toLowerCase()); | ||
}), chalk_1.default.cyan('?')); | ||
} | ||
log(data, ...args) { | ||
@@ -39,0 +53,0 @@ this.action.pause(() => { |
{ | ||
"name": "cli-ux", | ||
"description": "set of CLI output utilities", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"author": "Jeff Dickey", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/jdxcode/cli-ux/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47808
1455