{"name":"@inquirer/input","version":"5.0.7","keywords":["answer","answers","ask","base","cli","command","command-line","confirm","enquirer","generate","generator","hyper","input","inquire","inquirer","interface","iterm","javascript","menu","node","nodejs","prompt","promptly","prompts","question","readline","scaffold","scaffolder","scaffolding","stdin","stdout","terminal","tty","ui","yeoman","yo","zsh"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"@inquirer/input@5.0.7","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/main/packages/input/README.md","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"60b619f65307062aa5446b31aefde48c90e7e78e","tarball":"http://registry-npm.ywwl.com/@inquirer/input/download/@inquirer/input-5.0.7.tgz","fileCount":5,"integrity":"sha512-b+eKk/eUvKLQ6c+rDu9u4I1+twdjOfrEaw9NURDpCrWYJTWL1/JQEudZi0AeqXDGcn0tMdhlfpEfjcqr33B/qw==","signatures":[{"sig":"MEUCIA0ojHPAo++AtQFWJAj9bM/Kqkj0VUpK4iFYOuzLxuGaAiEAy27Pwxo8YapZb7UzzuADRBXKso9lR/7x+D0/0T08Xgs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12375,"size":4407,"noattachment":false,"key":"/@inquirer/input/-/@inquirer/input-5.0.7.tgz"},"type":"module","engines":{"node":">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"},"exports":{".":"./src/index.ts","./package.json":"./package.json"},"gitHead":"fd001c191cfb287b430d5e90cb159cf8f6500dc5","scripts":{"tsc":"tsc"},"_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/4.11.2/node@v24.13.0+arm64 (darwin)","description":"Inquirer input text prompt","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"@inquirer/core":"^11.1.4","@inquirer/type":"^4.0.3"},"publishConfig":{"main":"./dist/index.js","types":"./dist/index.d.ts","access":"public","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@repo/tsconfig":"workspace:*","@inquirer/testing":"^3.2.0"},"peerDependencies":{"@types/node":">=18"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/input_5.0.7_1771267487063_0.2043195609218762","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@inquirer/input`\n\nInteractive free text input component for command line interfaces. Supports validation, filtering, transformation, etc.\n\n![Input prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/input.svg)\n\n# Installation\n\n<table>\n<tr>\n  <th>npm</th>\n  <th>yarn</th>\n</tr>\n<tr>\n<td>\n\n```sh\nnpm install @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\nyarn add @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<td colSpan=\"2\" align=\"center\">Or</td>\n</tr>\n<tr>\n<td>\n\n```sh\nnpm install @inquirer/input\n```\n\n</td>\n<td>\n\n```sh\nyarn add @inquirer/input\n```\n\n</td>\n</tr>\n</table>\n\n# Usage\n\n```js\nimport { input } from '@inquirer/prompts';\n// Or\n// import input from '@inquirer/input';\n\nconst answer = await input({ message: 'Enter your name' });\n```\n\n## Options\n\n| Property     | Type                                                        | Required | Description                                                                                                                                                                                                             |\n| ------------ | ----------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| message      | `string`                                                    | yes      | The question to ask                                                                                                                                                                                                     |\n| default      | `string`                                                    | no       | Default value if no answer is provided; see the prefill option below for governing it's behaviour.                                                                                                                      |\n| prefill      | `'tab' \\| 'editable'`                                       | no       | Defaults to `'tab'`. If set to `'tab'`, pressing `backspace` will clear the default and pressing `tab` will inline the value for edits; If set to `'editable'`, the default value will already be inlined to edit.      |\n| required     | `boolean`                                                   | no       | Defaults to `false`. If set to true, `undefined` (empty) will not be accepted for this.                                                                                                                                 |\n| transformer  | `(string, { isFinal: boolean }) => string`                  | no       | Transform/Format the raw value entered by the user. Once the prompt is completed, `isFinal` will be `true`. This function is purely visual, modify the answer in your code if needed.                                   |\n| validate     | `string => boolean \\| string \\| Promise<boolean \\| string>` | no       | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |\n| pattern      | `RegExp`                                                    | no       | Regular expression to validate the input against. If the input doesn't match the pattern, validation will fail with the error message specified in `patternError`.                                                      |\n| patternError | `string`                                                    | no       | Error message to display when the input doesn't match the `pattern`. Defaults to `'Invalid input'`.                                                                                                                     |\n| theme        | [See Theming](#Theming)                                     | no       | Customize look of the prompt.                                                                                                                                                                                           |\n\n## Theming\n\nYou can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.\n\n```ts\ntype Theme = {\n  prefix: string | { idle: string; done: string };\n  spinner: {\n    interval: number;\n    frames: string[];\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string, status: 'idle' | 'done' | 'loading') => string;\n    error: (text: string) => string;\n    defaultAnswer: (text: string) => string;\n  };\n  validationFailureMode: 'keep' | 'clear';\n};\n```\n\n`validationFailureMode` defines the behavior of the prompt when the value submitted is invalid. By default, we'll keep the value allowing the user to edit it. When the theme option is set to `clear`, we'll remove and reset to an empty string.\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1771267487215,"_cnpm_publish_time":1771267487215,"dist-tags":{"latest":"5.2.0"}}