Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

6
node_modules/prompts/lib/index.js generated vendored
View File

@@ -65,7 +65,7 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
try {
// Get the injected answer if there is one or prompt the user
answer = prompt._injected ? getInjectedAnswer(prompt._injected) : await prompts[type](question);
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question);
answers[name] = answer = await getFormattedAnswer(question, answer, true);
quit = await onSubmit(question, answer, answers);
} catch (err) {
@@ -78,13 +78,13 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
return answers;
}
function getInjectedAnswer(injected) {
function getInjectedAnswer(injected, deafultValue) {
const answer = injected.shift();
if (answer instanceof Error) {
throw answer;
}
return answer;
return (answer === undefined) ? deafultValue : answer;
}
function inject(answers) {