136 lines
18 KiB
JSON
136 lines
18 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "inquirer@^3.0.1",
|
|
"scope": null,
|
|
"escapedName": "inquirer",
|
|
"name": "inquirer",
|
|
"rawSpec": "^3.0.1",
|
|
"spec": ">=3.0.1 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native-scripts"
|
|
]
|
|
],
|
|
"_from": "inquirer@>=3.0.1 <4.0.0",
|
|
"_id": "inquirer@3.3.0",
|
|
"_inCache": true,
|
|
"_location": "/inquirer",
|
|
"_nodeVersion": "8.1.3",
|
|
"_npmOperationalInternal": {
|
|
"host": "s3://npm-registry-packages",
|
|
"tmp": "tmp/inquirer-3.3.0.tgz_1505746703250_0.32175100315362215"
|
|
},
|
|
"_npmUser": {
|
|
"name": "sboudrias",
|
|
"email": "admin@simonboudrias.com"
|
|
},
|
|
"_npmVersion": "5.0.3",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "inquirer@^3.0.1",
|
|
"scope": null,
|
|
"escapedName": "inquirer",
|
|
"name": "inquirer",
|
|
"rawSpec": "^3.0.1",
|
|
"spec": ">=3.0.1 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/react-native-scripts"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
|
|
"_shasum": "9dd2f2ad765dcab1ff0443b491442a20ba227dc9",
|
|
"_shrinkwrap": null,
|
|
"_spec": "inquirer@^3.0.1",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native-scripts",
|
|
"author": {
|
|
"name": "Simon Boudrias",
|
|
"email": "admin@simonboudrias.com"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/SBoudrias/Inquirer.js/issues"
|
|
},
|
|
"dependencies": {
|
|
"ansi-escapes": "^3.0.0",
|
|
"chalk": "^2.0.0",
|
|
"cli-cursor": "^2.1.0",
|
|
"cli-width": "^2.0.0",
|
|
"external-editor": "^2.0.4",
|
|
"figures": "^2.0.0",
|
|
"lodash": "^4.3.0",
|
|
"mute-stream": "0.0.7",
|
|
"run-async": "^2.2.0",
|
|
"rx-lite": "^4.0.8",
|
|
"rx-lite-aggregates": "^4.0.8",
|
|
"string-width": "^2.1.0",
|
|
"strip-ansi": "^4.0.0",
|
|
"through": "^2.3.6"
|
|
},
|
|
"description": "A collection of common interactive command line user interfaces.",
|
|
"devDependencies": {
|
|
"chai": "^4.0.1",
|
|
"cmdify": "^0.0.4",
|
|
"eslint": "^4.2.0",
|
|
"eslint-config-xo-space": "^0.16.0",
|
|
"gulp": "^3.9.0",
|
|
"gulp-codacy": "^1.0.0",
|
|
"gulp-coveralls": "^0.1.0",
|
|
"gulp-eslint": "^4.0.0",
|
|
"gulp-exclude-gitignore": "^1.0.0",
|
|
"gulp-istanbul": "^1.1.2",
|
|
"gulp-line-ending-corrector": "^1.0.1",
|
|
"gulp-mocha": "^3.0.0",
|
|
"gulp-nsp": "^2.1.0",
|
|
"gulp-plumber": "^1.0.0",
|
|
"mocha": "^3.4.2",
|
|
"mockery": "^2.1.0",
|
|
"sinon": "^3.0.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==",
|
|
"shasum": "9dd2f2ad765dcab1ff0443b491442a20ba227dc9",
|
|
"tarball": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz"
|
|
},
|
|
"files": [
|
|
"lib"
|
|
],
|
|
"gitHead": "dcf31103e8e86efab7fa687b563be21f26807175",
|
|
"homepage": "https://github.com/SBoudrias/Inquirer.js#readme",
|
|
"keywords": [
|
|
"command",
|
|
"prompt",
|
|
"stdin",
|
|
"cli",
|
|
"tty",
|
|
"menu"
|
|
],
|
|
"license": "MIT",
|
|
"main": "lib/inquirer.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "mischah",
|
|
"email": "mail@michael-kuehnel.de"
|
|
},
|
|
{
|
|
"name": "sboudrias",
|
|
"email": "admin@simonboudrias.com"
|
|
}
|
|
],
|
|
"name": "inquirer",
|
|
"optionalDependencies": {},
|
|
"readme": "Inquirer.js\n===========\n\n[![npm](https://badge.fury.io/js/inquirer.svg)](http://badge.fury.io/js/inquirer) [![tests](https://travis-ci.org/SBoudrias/Inquirer.js.svg?branch=master)](http://travis-ci.org/SBoudrias/Inquirer.js) [![Coverage Status](https://coveralls.io/repos/yeoman/generator/badge.svg)](https://coveralls.io/r/SBoudrias/Inquirer.js) [![dependencies](https://david-dm.org/SBoudrias/Inquirer.js.svg?theme=shields.io)](https://david-dm.org/SBoudrias/Inquirer.js)\n\nA collection of common interactive command line user interfaces.\n\n## Table of Contents\n\n 1. [Documentation](#documentation)\n 1. [Installation](#installation)\n 2. [Examples](#examples)\n 3. [Methods](#methods)\n 4. [Objects](#objects)\n 1. [Questions](#questions)\n 2. [Answers](#answers)\n 3. [Separator](#separator)\n 4. [Prompt Types](#prompt)\n 2. [User Interfaces and Layouts](#layouts)\n 1. [Reactive Interface](#reactive)\n 3. [Support](#support)\n 4. [News](#news)\n 5. [Contributing](#contributing)\n 6. [License](#license)\n 7. [Plugins](#plugins)\n\n\n## Goal and Philosophy\n\n<img align=\"right\" alt=\"Inquirer Logo\" src=\"/assets/inquirer_readme.png\" title=\"Inquirer.js\"/>\n\n**`Inquirer.js`** strives to be an easily embeddable and beautiful command line interface for [Node.js](https://nodejs.org/) (and perhaps the \"CLI [Xanadu](https://en.wikipedia.org/wiki/Citizen_Kane)\").\n\n**`Inquirer.js`** should ease the process of\n- providing *error feedback*\n- *asking questions*\n- *parsing* input\n- *validating* answers\n- managing *hierarchical prompts*\n\n> **Note:** **`Inquirer.js`** provides the user interface and the inquiry session flow. If you're searching for a full blown command line program utility, then check out [commander](https://github.com/visionmedia/commander.js), [vorpal](https://github.com/dthree/vorpal) or [args](https://github.com/leo/args).\n\n\n## [Documentation](#documentation)\n<a name=\"documentation\"></a>\n\n### Installation\n<a name=\"installation\"></a>\n\n``` shell\nnpm install inquirer\n```\n\n```javascript\nvar inquirer = require('inquirer');\ninquirer.prompt([/* Pass your questions in here */]).then(function (answers) {\n\t// Use user feedback for... whatever!!\n});\n```\n\n<a name=\"examples\"></a>\n### Examples (Run it and see it)\nCheck out the `examples/` folder for code and interface examples.\n\n``` shell\nnode examples/pizza.js\nnode examples/checkbox.js\n# etc...\n```\n\n\n### Methods\n<a name=\"methods\"></a>\n#### `inquirer.prompt(questions) -> promise`\n\nLaunch the prompt interface (inquiry session)\n\n- **questions** (Array) containing [Question Object](#question) (using the [reactive interface](#reactive-interface), you can also pass a `Rx.Observable` instance)\n- returns a **Promise**\n\n#### `inquirer.registerPrompt(name, prompt)`\n\nRegister prompt plugins under `name`.\n\n- **name** (string) name of the this new prompt. (used for question `type`)\n- **prompt** (object) the prompt object itself (the plugin)\n\n#### `inquirer.createPromptModule() -> prompt function`\n\nCreate a self contained inquirer module. If you don't want to affect other libraries that also rely on inquirer when you overwrite or add new prompt types.\n\n```js\nvar prompt = inquirer.createPromptModule();\n\nprompt(questions).then(/* ... */);\n```\n\n### Objects\n<a name=\"objects\"></a>\n\n#### Question\n<a name=\"questions\"></a>\nA question object is a `hash` containing question related values:\n\n- **type**: (String) Type of the prompt. Defaults: `input` - Possible values: `input`, `confirm`,\n`list`, `rawlist`, `expand`, `checkbox`, `password`, `editor`\n- **name**: (String) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash.\n- **message**: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.\n- **default**: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers.\n- **choices**: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers.\nArray values can be simple `strings`, or `objects` containing a `name` (to display in list), a `value` (to save in the answers hash) and a `short` (to display after selection) properties. The choices array can also contain [a `Separator`](#separator).\n- **validate**: (Function) Receive the user input and answers hash. Should return `true` if the value is valid, and an error message (`String`) otherwise. If `false` is returned, a default error message is provided.\n- **filter**: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the _Answers_ hash.\n- **when**: (Function, Boolean) Receive the current user answers hash and should return `true` or `false` depending on whether or not this question should be asked. The value can also be a simple boolean.\n- **pageSize**: (Number) Change the number of lines that will be rendered when using `list`, `rawList`, `expand` or `checkbox`.\n- **prefix**: (String) Change the default _prefix_ message.\n- **suffix**: (String) Change the default _suffix_ message.\n\n`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronous. Either return a promise or use `this.async()` to get a callback you'll call with the final value.\n\n``` javascript\n{\n /* Preferred way: with promise */\n filter: function () {\n return new Promise(/* etc... */);\n },\n\n /* Legacy way: with this.async */\n validate: function (input) {\n // Declare function as asynchronous, and save the done callback\n var done = this.async();\n\n // Do async stuff\n setTimeout(function () {\n if (typeof input !== 'number') {\n // Pass the return value in the done callback\n done('You need to provide a number');\n return;\n }\n // Pass the return value in the done callback\n done(null, true);\n }, 3000);\n }\n}\n```\n\n### Answers\n<a name=\"answers\"></a>\nA key/value hash containing the client answers in each prompt.\n\n- **Key** The `name` property of the _question_ object\n- **Value** (Depends on the prompt)\n - `confirm`: (Boolean)\n - `input` : User input (filtered if `filter` is defined) (String)\n - `rawlist`, `list` : Selected choice value (or name if no value specified) (String)\n\n### Separator\n<a name=\"separator\"></a>\nA separator can be added to any `choices` array:\n\n```\n// In the question object\nchoices: [ \"Choice A\", new inquirer.Separator(), \"choice B\" ]\n\n// Which'll be displayed this way\n[?] What do you want to do?\n > Order a pizza\n Make a reservation\n --------\n Ask opening hours\n Talk to the receptionist\n```\n\nThe constructor takes a facultative `String` value that'll be use as the separator. If omitted, the separator will be `--------`.\n\nSeparator instances have a property `type` equal to `separator`. This should allow tools façading Inquirer interface from detecting separator types in lists.\n\n<a name=\"prompt\"></a>\n### Prompt types\n---------------------\n\n> **Note:**: _allowed options written inside square brackets (`[]`) are optional. Others are required._\n\n#### List - `{type: 'list'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must be the choice `index` in the array or a choice `value`)\n\n![List prompt](assets/screenshots/list-prompt.png)\n\n---\n\n#### Raw List - `{type: 'rawlist'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must the choice `index` in the array)\n\n![Raw list prompt](assets/screenshots/rawlist-prompt.png)\n\n---\n\n#### Expand - `{type: 'expand'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`] properties. (Note that\ndefault must be the choice `index` in the array. If `default` key not provided, then `help` will be used as default choice)\n\nNote that the `choices` object will take an extra parameter called `key` for the `expand` prompt. This parameter must be a single (lowercased) character. The `h` option is added by the prompt and shouldn't be defined by the user.\n\nSee `examples/expand.js` for a running example.\n\n![Expand prompt closed](assets/screenshots/expand-prompt-1.png)\n![Expand prompt expanded](assets/screenshots/expand-prompt-2.png)\n\n---\n\n#### Checkbox - `{type: 'checkbox'}`\n\nTake `type`, `name`, `message`, `choices`[, `filter`, `validate`, `default`] properties. `default` is expected to be an Array of the checked choices value.\n\nChoices marked as `{checked: true}` will be checked by default.\n\nChoices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to `\"Disabled\"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string.\n\n![Checkbox prompt](assets/screenshots/checkbox-prompt.png)\n\n---\n\n#### Confirm - `{type: 'confirm'}`\n\nTake `type`, `name`, `message`[, `default`] properties. `default` is expected to be a boolean if used.\n\n![Confirm prompt](assets/screenshots/confirm-prompt.png)\n\n---\n\n#### Input - `{type: 'input'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n![Input prompt](assets/screenshots/input-prompt.png)\n\n---\n\n#### Password - `{type: 'password'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n![Password prompt](assets/screenshots/password-prompt.png)\n\n---\n\n#### Editor - `{type: 'editor'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties\n\nLaunches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the contents of the temporary file are read in as the result. The editor to use is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used.\n\n<a name=\"layouts\"></a>\n## User Interfaces and layouts\n\n\nAlong with the prompts, Inquirer offers some basic text UI.\n\n#### Bottom Bar - `inquirer.ui.BottomBar`\n\nThis UI present a fixed text at the bottom of a free text zone. This is useful to keep a message to the bottom of the screen while outputting command outputs on the higher section.\n\n```javascript\nvar ui = new inquirer.ui.BottomBar();\n\n// pipe a Stream to the log zone\noutputStream.pipe(ui.log);\n\n// Or simply write output\nui.log.write('something just happened.');\nui.log.write('Almost over, standby!');\n\n// During processing, update the bottom bar content to display a loader\n// or output a progress bar, etc\nui.updateBottomBar('new bottom bar content');\n```\n\n<a name=\"reactive\"></a>\n## Reactive interface\n\n\nInternally, Inquirer uses the [JS reactive extension](https://github.com/Reactive-Extensions/RxJS) to handle events and async flows.\n\nThis mean you can take advantage of this feature to provide more advanced flows. For example, you can dynamically add questions to be asked:\n\n```js\nvar prompts = new Rx.Subject();\ninquirer.prompt(prompts);\n\n// At some point in the future, push new questions\nprompts.onNext({ /* question... */ });\nprompts.onNext({ /* question... */ });\n\n// When you're done\nprompts.onCompleted();\n```\n\nAnd using the return value `process` property, you can access more fine grained callbacks:\n\n```js\ninquirer.prompt(prompts).ui.process.subscribe(\n onEachAnswer,\n onError,\n onComplete\n);\n```\n\n## Support (OS Terminals)\n<a name=\"support\"></a>\n\nYou should expect mostly good support for the CLI below. This does not mean we won't\nlook at issues found on other command line - feel free to report any!\n\n- **Mac OS**:\n - Terminal.app\n - iTerm\n- **Windows**:\n - [ConEmu](https://conemu.github.io/)\n - cmd.exe\n - Powershell\n - Cygwin\n- **Linux (Ubuntu, openSUSE, Arch Linux, etc)**:\n - gnome-terminal (Terminal GNOME)\n - konsole\n\n\n## News on the march (Release notes)\n<a name=\"news\"></a>\n\n\nPlease refer to the [Github releases section for the changelog](https://github.com/SBoudrias/Inquirer.js/releases)\n\n\n## Contributing\n<a name=\"contributing\"></a>\n\n**Unit test**\nUnit test are written in [Mocha](https://mochajs.org/). Please add a unit test for every new feature or bug fix. `npm test` to run the test suite.\n\n**Documentation**\nAdd documentation for every API change. Feel free to send typo fixes and better docs!\n\nWe're looking to offer good support for multiple prompts and environments. If you want to\nhelp, we'd like to keep a list of testers for each terminal/OS so we can contact you and\nget feedback before release. Let us know if you want to be added to the list (just tweet\nto [@vaxilart](https://twitter.com/Vaxilart)) or just add your name to [the wiki](https://github.com/SBoudrias/Inquirer.js/wiki/Testers)\n\n## License\n<a name=\"license\"></a>\n\nCopyright (c) 2016 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))\nLicensed under the MIT license.\n\n## Plugins\n<a name=\"plugins\"></a>\n\n### Prompts ###\n\n[__autocomplete__](https://github.com/mokkabonna/inquirer-autocomplete-prompt)<br>\nPresents a list of options as the user types, compatible with other packages such as fuzzy (for search)<br>\n<br>\n![autocomplete prompt](https://github.com/mokkabonna/inquirer-autocomplete-prompt/raw/master/inquirer.gif)\n\n[__datetime__](https://github.com/DerekTBrown/inquirer-datepicker-prompt)<br>\nCustomizable date/time selector using both number pad and arrow keys<br>\n<br>\n![Datetime Prompt](https://github.com/DerekTBrown/inquirer-datepicker-prompt/raw/master/example/datetime-prompt.png)\n\n[__inquirer-select-line__](https://github.com/adam-golab/inquirer-select-line)<br>\nPrompt for selecting index in array where add new element<br>\n<br>\n![inquirer-select-line gif](https://media.giphy.com/media/xUA7b1MxpngddUvdHW/giphy.gif)\n\n[__command__](https://github.com/sullof/inquirer-command-prompt)<br>\n<br>\nSimple prompt with command history and dynamic autocomplete\n\n[__inquirer-chalk-pipe__](https://github.com/LitoMore/inquirer-chalk-pipe)<br>\nPrompt for input chalk-pipe style strings<br>\n<br>\n![inquirer-chalk-pipe](https://github.com/LitoMore/inquirer-chalk-pipe/raw/master/screenshot.gif)\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/SBoudrias/Inquirer.js.git"
|
|
},
|
|
"scripts": {
|
|
"prepublish": "gulp prepublish",
|
|
"test": "gulp"
|
|
},
|
|
"version": "3.3.0"
|
|
}
|