@poppinss/prompts
Advanced tools
Comparing version 3.0.0-0 to 3.0.0-1
@@ -1,2 +0,2 @@ | ||
import { PromptChoice, EnumPromptOptions, TextPromptOptions, TogglePromptOptions, ChoicePromptOptions, BooleanPromptOptions, MultiplePromptOptions, AutoCompletePromptOptions } from './types.js'; | ||
import { PromptChoice, TextPromptOptions, TogglePromptOptions, ChoicePromptOptions, BooleanPromptOptions, MultiplePromptOptions, AutoCompletePromptOptions, ListPromptOptions } from './types.js'; | ||
import { MockedPrompt } from './mocked_prompt.js'; | ||
@@ -8,3 +8,3 @@ export declare abstract class BasePrompt { | ||
ask<Result extends any = string>(title: string, options?: TextPromptOptions<Result>): Promise<Result>; | ||
enum<Result extends any = string[]>(title: string, options?: EnumPromptOptions<Result>): Promise<Result>; | ||
list<Result extends any = string[]>(title: string, options?: ListPromptOptions<Result>): Promise<Result>; | ||
secure<Result extends any = string>(title: string, options?: TextPromptOptions<Result>): Promise<Result>; | ||
@@ -11,0 +11,0 @@ confirm<Result extends any = boolean>(title: string, options?: BooleanPromptOptions<Result>): Promise<Result>; |
@@ -43,3 +43,3 @@ import { ObjectBuilder } from '@poppinss/utils'; | ||
} | ||
async enum(title, options) { | ||
async list(title, options) { | ||
options = options || {}; | ||
@@ -46,0 +46,0 @@ const builder = new ObjectBuilder(); |
@@ -18,3 +18,3 @@ export declare type PromptState<T extends any> = { | ||
}; | ||
export declare type EnumPromptOptions<Result extends any> = { | ||
export declare type ListPromptOptions<Result extends any> = { | ||
default?: string; | ||
@@ -21,0 +21,0 @@ name?: string; |
{ | ||
"name": "@poppinss/prompts", | ||
"version": "3.0.0-0", | ||
"version": "3.0.0-1", | ||
"description": "Wrapper over enquirer with better support for testing", | ||
@@ -13,3 +13,4 @@ "main": "build/index.js", | ||
"exports": { | ||
".": "./build/index.js" | ||
".": "./build/index.js", | ||
"./types": "./build/src/types.js" | ||
}, | ||
@@ -16,0 +17,0 @@ "scripts": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
35842
0