{"_id":"@inquirer/confirm@6.4.0","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"aef6e3ed14e8da1acd05a1983635b2576b85631e","tarball":"http://registry-npm.ywwl.com/@inquirer/confirm/download/@inquirer/confirm-6.4.0.tgz","integrity":"sha512-+DCZxrOF01Q/1SzTQkgycAQPS/Jf+Yol0h1P/MVmopukTsxGOu1h/LKqf30y0eHKFZYYrgUMVhGDhEbPmSPi9A==","fileCount":5,"unpackedSize":11864,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@inquirer%2fconfirm@6.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID0V+NMcJHC/cqqJy5l+A8bX9A0STFnr984dC9Ly54sQAiBl2QZyAwOM+mM7Vh630XHbpFAbqQOvkKpXF0Fwx0B14w=="}],"size":4453,"noattachment":false,"key":"/@inquirer/confirm/-/@inquirer/confirm-6.4.0.tgz"},"main":"./dist/index.js","name":"@inquirer/confirm","type":"module","types":"./dist/index.d.ts","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"engines":{"node":"^22.22.2 || ^24.15.0 || >=26.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"00ded073f80523aaeaf8a903bbfb535994990475","license":"MIT","scripts":{"tsc":"tsc"},"version":"6.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"81a15851-ce1e-4e8a-b498-0179ef8267fd"},"approver":{"name":"sboudrias","email":"admin@simonboudrias.com"}},"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/HEAD/packages/confirm/README.md","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"],"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/5.6.4/node@v24.22.2+x64 (linux)","description":"Inquirer confirm prompt","directories":{},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"sideEffects":false,"_nodeVersion":"24.22.2","dependencies":{"@inquirer/core":"^12.1.0","@inquirer/type":"4.3.0"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^7.0.2","@repo/tsconfig":"0.1.0"},"peerDependencies":{"@types/node":">=18"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/confirm_6.4.0_1794348926815_0.8937897520830562"},"_hasShrinkwrap":false,"readme":"# `@inquirer/confirm`\n\nSimple interactive command line prompt to gather boolean input from users.\n\n![Confirm prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/confirm.svg)\n\n# Installation\n\n<table>\n<tr>\n  <th>yarn</th>\n  <th>pnpm</th>\n</tr>\n<tr>\n<td>\n\n```sh\nyarn add @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\npnpm add @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n  <th>bun</th>\n  <th>deno</th>\n</tr>\n<tr>\n<td>\n\n```sh\nbun add @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\ndeno add npm:@inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<th colSpan=\"2\">npm</th>\n</tr>\n<tr>\n<td colSpan=\"2\">\n\n```sh\nnpm install @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<td colSpan=\"2\" align=\"center\">Or</td>\n</tr>\n<tr>\n  <th>yarn</th>\n  <th>pnpm</th>\n</tr>\n<tr>\n<td>\n\n```sh\nyarn add @inquirer/confirm\n```\n\n</td>\n<td>\n\n```sh\npnpm add @inquirer/confirm\n```\n\n</td>\n</tr>\n<tr>\n  <th>bun</th>\n  <th>deno</th>\n</tr>\n<tr>\n<td>\n\n```sh\nbun add @inquirer/confirm\n```\n\n</td>\n<td>\n\n```sh\ndeno add npm:@inquirer/confirm\n```\n\n</td>\n</tr>\n<tr>\n<th colSpan=\"2\">npm</th>\n</tr>\n<tr>\n<td colSpan=\"2\">\n\n```sh\nnpm install @inquirer/confirm\n```\n\n</td>\n</tr>\n</table>\n\nOn Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.\n\n# Usage\n\n```js\nimport { confirm } from '@inquirer/prompts';\n// Or\n// import confirm from '@inquirer/confirm';\n\nconst answer = await confirm({ message: 'Continue?' });\n```\n\n## Options\n\n| Property    | Type                    | Required | Description                                             |\n| ----------- | ----------------------- | -------- | ------------------------------------------------------- |\n| message     | `string`                | yes      | The question to ask                                     |\n| default     | `boolean`               | no       | Default answer (true or false)                          |\n| transformer | `(boolean) => string`   | no       | Transform the prompt printed message to a custom string |\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  keywords: {\n    yes: string;\n    no: string;\n    error: (keywords: { yes: string; no: string }) => string;\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string, status: 'idle' | 'done' | 'loading') => string;\n    defaultAnswer: (text: string) => string;\n    confirmDefault: (text: string) => string;\n  };\n};\n```\n\nThe `keywords` property defines the words accepted as \"yes\" and \"no\". Matching is\nprefix-based and case-insensitive, and the first character of each word is shown in\nthe hint (e.g. `Y/n`). The matched word is also displayed once the prompt is answered.\n\nThe built-in `y`/`n`/`yes`/`no` answers are always accepted, whatever the keywords\nare. Unrecognized input shows the `keywords.error` message instead of silently\nfalling back on the default answer.\n\nOverriding `keywords` is how `@inquirer/i18n` localizes the prompt:\n\n```ts\nconfirm({\n  message: '¿Continuar?',\n  theme: {\n    keywords: { yes: 'Sí', no: 'No' },\n  },\n});\n```\n\nThe `confirmDefault` style marks the character representing the default answer in the\nhint. By default it uppercases the character (`Y/n`); for scripts without case\n(e.g. Chinese) it highlights the character with a color instead.\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1794348926924,"_cnpm_publish_time":1794348926924,"dist-tags":{"latest":"6.4.0"}}