prompts/000755 001751 000177 0000000000 14526766570014323 5ustar00runner000000 000000 1452676657014526766570prompts/LICENSE000644 001751 000177 0000002165 14526766570015334 0ustar00runner000000 000000 1452676657014526766570 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE prompts/README.md000644 001751 000177 0000001540 14526766570015577 0ustar00runner000000 000000 1452677724114526766570# Installation > `npm install --save @types/prompts` # Summary This package contains type definitions for prompts (https://github.com/terkelg/prompts). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prompts. ### Additional Details * Last updated: Mon, 20 Nov 2023 23:36:24 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [kleur](https://npmjs.com/package/kleur) # Credits These definitions were written by [Berkay GURSOY](https://github.com/Berkays), [Daniel Perez Alvarez](https://github.com/unindented), [Kamontat Chantrachirathumrong](https://github.com/kamontat), [theweirdone](https://github.com/theweirdone), [whoaa512](https://github.com/whoaa512), [John Reilly](https://github.com/johnnyreilly), and [Christopher Hiller](https://github.com/boneskull). prompts/index.d.ts000644 001751 000177 0000010117 14526766570016224 0ustar00runner000000 000000 1452676657014526766570/// export = prompts; import { Kleur } from "kleur"; import { Readable, Writable } from "stream"; declare function prompts( questions: prompts.PromptObject | Array>, options?: prompts.Options, ): Promise>; declare namespace prompts { // Circular reference from prompts const prompt: any; function inject(arr: readonly any[]): void; namespace inject { const prototype: {}; } function override(obj: { [key: string]: any }): void; namespace override { const prototype: {}; } namespace prompts { function autocomplete(args: PromptObject): any; function confirm(args: PromptObject): void; function date(args: PromptObject): any; function invisible(args: PromptObject): any; function list(args: PromptObject): any; function multiselect(args: PromptObject): any; function number(args: PromptObject): void; function password(args: PromptObject): any; function select(args: PromptObject): void; function text(args: PromptObject): void; function toggle(args: PromptObject): void; } // Based upon: https://github.com/terkelg/prompts/blob/d7d2c37a0009e3235b2e88a7d5cdbb114ac271b2/lib/elements/select.js#L29 interface Choice { title: string; value?: any; disabled?: boolean | undefined; selected?: boolean | undefined; description?: string | undefined; } interface Options { onSubmit?: ((prompt: PromptObject, answer: any, answers: any[]) => void) | undefined; onCancel?: ((prompt: PromptObject, answers: any) => void) | undefined; } interface PromptObject { type: PromptType | Falsy | PrevCaller; name: ValueOrFunc; message?: ValueOrFunc | undefined; initial?: InitialReturnValue | PrevCaller> | undefined; style?: string | PrevCaller | undefined; format?: PrevCaller | undefined; validate?: PrevCaller> | undefined; onState?: PrevCaller | undefined; onRender?: ((kleur: Kleur) => void) | undefined; min?: number | PrevCaller | undefined; max?: number | PrevCaller | undefined; float?: boolean | PrevCaller | undefined; round?: number | PrevCaller | undefined; instructions?: string | boolean | undefined; increment?: number | PrevCaller | undefined; separator?: string | PrevCaller | undefined; active?: string | PrevCaller | undefined; inactive?: string | PrevCaller | undefined; choices?: Choice[] | PrevCaller | undefined; hint?: string | PrevCaller | undefined; warn?: string | PrevCaller | undefined; suggest?: ((input: any, choices: Choice[]) => Promise) | undefined; limit?: number | PrevCaller | undefined; mask?: string | PrevCaller | undefined; stdout?: Writable | undefined; stdin?: Readable | undefined; } type Answers = { [id in T]: any }; type PrevCaller = ( prev: any, values: Answers, prompt: PromptObject, ) => R; type Falsy = false | null | undefined; type PromptType = | "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete" | "date" | "autocompleteMultiselect"; type ValueOrFunc = T | PrevCaller; type InitialReturnValue = string | number | boolean | Date; } prompts/package.json000644 001751 000177 0000003361 14526766570016611 0ustar00runner000000 000000 1452677724114526766570{ "name": "@types/prompts", "version": "2.4.9", "description": "TypeScript definitions for prompts", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prompts", "license": "MIT", "contributors": [ { "name": "Berkay GURSOY", "githubUsername": "Berkays", "url": "https://github.com/Berkays" }, { "name": "Daniel Perez Alvarez", "githubUsername": "unindented", "url": "https://github.com/unindented" }, { "name": "Kamontat Chantrachirathumrong", "githubUsername": "kamontat", "url": "https://github.com/kamontat" }, { "name": "theweirdone", "githubUsername": "theweirdone", "url": "https://github.com/theweirdone" }, { "name": "whoaa512", "githubUsername": "whoaa512", "url": "https://github.com/whoaa512" }, { "name": "John Reilly", "githubUsername": "johnnyreilly", "url": "https://github.com/johnnyreilly" }, { "name": "Christopher Hiller", "githubUsername": "boneskull", "url": "https://github.com/boneskull" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/prompts" }, "scripts": {}, "dependencies": { "@types/node": "*", "kleur": "^3.0.3" }, "typesPublisherContentHash": "7d953904b623b8eecf106aca53b3442e9d8cabb93fbca4f3f2c0b877999c6758", "typeScriptVersion": "4.5" }