inquirerer 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/prompt.js CHANGED
@@ -100,13 +100,7 @@ export class Inquirerer {
100
100
  if (!noTty) {
101
101
  this.rl = readline.createInterface({
102
102
  input,
103
- // dissallow readline from prompting user, since we'll handle it!
104
103
  output
105
- // : new Writable({
106
- // write(chunk, encoding, callback) {
107
- // callback(); // Do nothing with the data
108
- // }
109
- // })
110
104
  });
111
105
  this.keypress = new TerminalKeypress(noTty, input);
112
106
  }
@@ -283,6 +277,11 @@ export class Inquirerer {
283
277
  for (let index = 0; index < questions.length; index++) {
284
278
  const question = questions[index];
285
279
  const ctx = new PromptContext();
280
+ // obj is already either argv itself, or a clone, but let's check if it has the property
281
+ if (question.name in obj) {
282
+ ctx.nextQuestion();
283
+ continue;
284
+ }
286
285
  // Apply default value if applicable
287
286
  if ('default' in question && (this.useDefaults || question.useDefault)) {
288
287
  obj[question.name] = question.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "inquirerer",
6
6
  "main": "index.js",
@@ -35,5 +35,5 @@
35
35
  "minimist": "^1.2.8"
36
36
  },
37
37
  "keywords": [],
38
- "gitHead": "25c70c84b496b546e74bd4268eadc0a49bc6d9e7"
38
+ "gitHead": "273e730c2481312b2d332d3711b1728210799e83"
39
39
  }
package/prompt.js CHANGED
@@ -106,13 +106,7 @@ class Inquirerer {
106
106
  if (!noTty) {
107
107
  this.rl = readline_1.default.createInterface({
108
108
  input,
109
- // dissallow readline from prompting user, since we'll handle it!
110
109
  output
111
- // : new Writable({
112
- // write(chunk, encoding, callback) {
113
- // callback(); // Do nothing with the data
114
- // }
115
- // })
116
110
  });
117
111
  this.keypress = new keypress_1.TerminalKeypress(noTty, input);
118
112
  }
@@ -289,6 +283,11 @@ class Inquirerer {
289
283
  for (let index = 0; index < questions.length; index++) {
290
284
  const question = questions[index];
291
285
  const ctx = new PromptContext();
286
+ // obj is already either argv itself, or a clone, but let's check if it has the property
287
+ if (question.name in obj) {
288
+ ctx.nextQuestion();
289
+ continue;
290
+ }
292
291
  // Apply default value if applicable
293
292
  if ('default' in question && (this.useDefaults || question.useDefault)) {
294
293
  obj[question.name] = question.default;