Comparing version 1.2.20 to 1.2.21
@@ -5,2 +5,2 @@ export * from './listr'; | ||
export * from './interfaces/manager.interface'; | ||
export { createPrompt } from './utils/prompt'; | ||
export { createPrompt, newPrompt } from './utils/prompt'; |
@@ -12,2 +12,3 @@ "use strict"; | ||
exports.createPrompt = prompt_1.createPrompt; | ||
exports.newPrompt = prompt_1.newPrompt; | ||
//# sourceMappingURL=index.js.map |
@@ -0,2 +1,4 @@ | ||
import { Prompt } from 'enquirer'; | ||
import { PromptOptionsType, PromptTypes } from './prompt.interface'; | ||
export declare function newPrompt<T extends PromptTypes>(type: T, options: PromptOptionsType<T>): Prompt; | ||
export declare function createPrompt<T extends PromptTypes>(type: T, options: PromptOptionsType<T>): Promise<any>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const listr_interface_1 = require("../interfaces/listr.interface"); | ||
function createPrompt(type, options) { | ||
function newPrompt(type, options) { | ||
let prompt; | ||
@@ -69,3 +69,7 @@ switch (type.toString().toLocaleLowerCase()) { | ||
} | ||
return prompt.on('cancel', () => { | ||
return prompt; | ||
} | ||
exports.newPrompt = newPrompt; | ||
function createPrompt(type, options) { | ||
return newPrompt(type, options).on('cancel', () => { | ||
return 'Cancelled prompt.'; | ||
@@ -72,0 +76,0 @@ }).run(); |
{ | ||
"name": "listr2", | ||
"version": "1.2.20", | ||
"version": "1.2.21", | ||
"description": "Terminal task list reborn!", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
77244
1135