New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@clack/prompts

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clack/prompts - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

6

CHANGELOG.md
# @clack/prompts
## 0.6.1
### Patch Changes
- ca08fb6: Support complex value types for `select`, `multiselect` and `groupMultiselect`.
## 0.6.0

@@ -4,0 +10,0 @@

32

dist/index.d.ts

@@ -25,30 +25,34 @@ export { isCancel } from '@clack/core';

type Primitive = Readonly<string | boolean | number>;
interface Option<Value extends Primitive> {
type Option<Value> = Value extends Primitive ? {
value: Value;
label?: string;
hint?: string;
}
interface SelectOptions<Options extends Option<Value>[], Value extends Primitive> {
} : {
value: Value;
label: string;
hint?: string;
};
interface SelectOptions<Options extends Option<Value>[], Value> {
message: string;
options: Options;
initialValue?: Options[number]['value'];
initialValue?: Value;
}
declare const select: <Options extends Option<Value>[], Value extends Primitive>(opts: SelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"]>;
declare const selectKey: <Options extends Option<Value>[], Value extends string>(opts: SelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"]>;
interface MultiSelectOptions<Options extends Option<Value>[], Value extends Primitive> {
declare const select: <Options extends Option<Value>[], Value>(opts: SelectOptions<Options, Value>) => Promise<symbol | Value>;
declare const selectKey: <Options extends Option<Value>[], Value extends string>(opts: SelectOptions<Options, Value>) => Promise<symbol | Value>;
interface MultiSelectOptions<Options extends Option<Value>[], Value> {
message: string;
options: Options;
initialValues?: Options[number]['value'][];
initialValues?: Value[];
required?: boolean;
cursorAt?: Options[number]['value'];
cursorAt?: Value;
}
declare const multiselect: <Options extends Option<Value>[], Value extends Primitive>(opts: MultiSelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"][]>;
interface GroupMultiSelectOptions<Options extends Option<Value>[], Value extends Primitive> {
declare const multiselect: <Options extends Option<Value>[], Value>(opts: MultiSelectOptions<Options, Value>) => Promise<symbol | Value[]>;
interface GroupMultiSelectOptions<Options extends Option<Value>[], Value> {
message: string;
options: Record<string, Options>;
initialValues?: Options[number]['value'][];
initialValues?: Value[];
required?: boolean;
cursorAt?: Options[number]['value'];
cursorAt?: Value;
}
declare const groupMultiselect: <Options extends Option<Value>[], Value extends Primitive>(opts: GroupMultiSelectOptions<Options, Value>) => Promise<symbol | Options[number]["value"][]>;
declare const groupMultiselect: <Options extends Option<Value>[], Value>(opts: GroupMultiSelectOptions<Options, Value>) => Promise<symbol | Value[]>;
declare const note: (message?: string, title?: string) => void;

@@ -55,0 +59,0 @@ declare const cancel: (message?: string) => void;

{
"name": "@clack/prompts",
"version": "0.6.0",
"version": "0.6.1",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./dist/index.cjs",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc