Comparing version 6.2.1 to 6.2.2
@@ -36,2 +36,3 @@ 'use strict'; | ||
}; | ||
promptModule.prompts = {}; | ||
@@ -85,4 +86,5 @@ | ||
}; | ||
inquirer.restoreDefaultPrompts = function() { | ||
inquirer.prompt.restoreDefaultPrompts(); | ||
}; |
@@ -21,4 +21,6 @@ 'use strict'; | ||
} | ||
return val; | ||
} | ||
return new Choice(val, answers); | ||
@@ -25,0 +27,0 @@ }); |
@@ -164,2 +164,3 @@ 'use strict'; | ||
} | ||
this.render(); | ||
@@ -166,0 +167,0 @@ } |
@@ -24,2 +24,3 @@ 'use strict'; | ||
} | ||
return value; | ||
@@ -26,0 +27,0 @@ } |
@@ -105,2 +105,3 @@ 'use strict'; | ||
} | ||
var selected = this.opt.choices.where({ key: input.toLowerCase().trim() })[0]; | ||
@@ -134,2 +135,3 @@ if (!selected) { | ||
} | ||
output += choiceStr; | ||
@@ -148,2 +150,3 @@ }); | ||
} | ||
this.render(state.isValid); | ||
@@ -194,5 +197,7 @@ } | ||
} | ||
if (keymap[choice.key]) { | ||
errors.push(choice.key); | ||
} | ||
keymap[choice.key] = true; | ||
@@ -207,2 +212,3 @@ choice.key = String(choice.key).toLowerCase(); | ||
} | ||
if (keymap.h) { | ||
@@ -213,2 +219,3 @@ throw new Error( | ||
} | ||
if (errors.length) { | ||
@@ -239,2 +246,3 @@ throw new Error( | ||
} | ||
var defStr = this.opt.choices.pluck('key'); | ||
@@ -268,2 +276,3 @@ this.rawDefault = defStr[defIndex]; | ||
} | ||
output += choiceStr; | ||
@@ -270,0 +279,0 @@ }); |
@@ -78,2 +78,3 @@ 'use strict'; | ||
} | ||
return input; | ||
@@ -80,0 +81,0 @@ } |
@@ -143,2 +143,3 @@ 'use strict'; | ||
} | ||
this.render(); | ||
@@ -177,2 +178,3 @@ } | ||
} | ||
output += line + ' \n'; | ||
@@ -179,0 +181,0 @@ }); |
@@ -23,2 +23,3 @@ 'use strict'; | ||
} | ||
// If the input was invalid return the default value. | ||
@@ -25,0 +26,0 @@ return this.opt.default == null ? NaN : this.opt.default; |
@@ -84,2 +84,3 @@ 'use strict'; | ||
} | ||
return input; | ||
@@ -86,0 +87,0 @@ } |
@@ -177,3 +177,4 @@ 'use strict'; | ||
var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0; | ||
index += type === 'up' ? -1 : 1; | ||
if (type === 'up') index = index === 0 ? this.opt.choices.length - 1 : index - 1; | ||
else index = index === this.opt.choices.length - 1 ? 0 : index + 1; | ||
this.rl.line = String(index + 1); | ||
@@ -208,2 +209,3 @@ this.onKeypress(); | ||
} | ||
output += display; | ||
@@ -210,0 +212,0 @@ }); |
@@ -17,2 +17,3 @@ 'use strict'; | ||
} | ||
this.rl.resume(); | ||
@@ -19,0 +20,0 @@ |
@@ -95,2 +95,3 @@ 'use strict'; | ||
} | ||
this.rl.output.write(message); | ||
@@ -97,0 +98,0 @@ } |
@@ -98,2 +98,3 @@ 'use strict'; | ||
} | ||
return defer(() => of(question)); | ||
@@ -100,0 +101,0 @@ } |
@@ -42,2 +42,3 @@ 'use strict'; | ||
} | ||
this.lastIndex = active; | ||
@@ -44,0 +45,0 @@ |
@@ -43,2 +43,3 @@ 'use strict'; | ||
} | ||
this.rl.setPrompt(prompt); | ||
@@ -54,2 +55,3 @@ | ||
} | ||
// Manually insert an extra line if we're at the end of the line. | ||
@@ -61,2 +63,3 @@ // This prevent the cursor from appearing at the beginning of the | ||
} | ||
var fullContent = content + (bottomContent ? '\n' + bottomContent : ''); | ||
@@ -99,2 +102,3 @@ this.rl.output.write(fullContent); | ||
} | ||
util.clearLine(this.rl, this.height); | ||
@@ -101,0 +105,0 @@ } |
{ | ||
"name": "inquirer", | ||
"version": "6.2.1", | ||
"version": "6.2.2", | ||
"description": "A collection of common interactive command line user interfaces.", | ||
@@ -23,3 +23,3 @@ "author": "Simon Boudrias <admin@simonboudrias.com>", | ||
"devDependencies": { | ||
"chai": "^4.0.1", | ||
"chai": "^4.2.0", | ||
"chalk-pipe": "^2.0.0", | ||
@@ -41,16 +41,17 @@ "cmdify": "^0.0.4", | ||
"dependencies": { | ||
"ansi-escapes": "^3.0.0", | ||
"chalk": "^2.0.0", | ||
"ansi-escapes": "^3.2.0", | ||
"chalk": "^2.4.2", | ||
"cli-cursor": "^2.1.0", | ||
"cli-width": "^2.0.0", | ||
"external-editor": "^3.0.0", | ||
"external-editor": "^3.0.3", | ||
"figures": "^2.0.0", | ||
"lodash": "^4.17.10", | ||
"lodash": "^4.17.11", | ||
"mute-stream": "0.0.7", | ||
"run-async": "^2.2.0", | ||
"rxjs": "^6.1.0", | ||
"rxjs": "^6.4.0", | ||
"string-width": "^2.1.0", | ||
"strip-ansi": "^5.0.0", | ||
"through": "^2.3.6" | ||
} | ||
}, | ||
"gitHead": "ad23da64f321689ff19ba354f4fed7f00acb3fbc" | ||
} |
@@ -425,1 +425,9 @@ <img width="75px" height="75px" align="right" alt="Inquirer Logo" src="https://raw.githubusercontent.com/SBoudrias/Inquirer.js/master/assets/inquirer_readme.svg?sanitize=true" title="Inquirer.js"/> | ||
![inquirer-prompt-suggest](https://user-images.githubusercontent.com/5600126/40391192-d4f3d6d0-5ded-11e8-932f-4b75b642c09e.gif) | ||
[**inquirer-s3**](https://github.com/HQarroum/inquirer-s3)<br> | ||
An S3 object selector for Inquirer. | ||
![inquirer-s3](https://github.com/HQarroum/inquirer-s3/raw/master/docs/inquirer-screenshot.png) | ||
[**inquirer-autosubmit-prompt**](https://github.com/yaodingyd/inquirer-autosubmit-prompt)<br> | ||
Auto submit based on your current input, saving one extra enter |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75630
1968
433
Updatedansi-escapes@^3.2.0
Updatedchalk@^2.4.2
Updatedexternal-editor@^3.0.3
Updatedlodash@^4.17.11
Updatedrxjs@^6.4.0