inquirerer 0.7.0 → 0.8.1

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
@@ -77,8 +77,9 @@ export class Inquirerer {
77
77
  let numTries = 0;
78
78
  while (index < questions.length) {
79
79
  const question = questions[index];
80
- if ('default' in question && this.useDefaults) {
80
+ if ('default' in question && (this.useDefaults || question.useDefault)) {
81
81
  obj[question.name] = question.default;
82
+ index++; // Move to the next question
82
83
  continue;
83
84
  }
84
85
  const ctx = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
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": "49eaa8d76816d598381eaed418c9a8a276656a52"
38
+ "gitHead": "3b4b7a1d3939599b6c843a6a8cc2ffa2c2ba9fc7"
39
39
  }
package/prompt.js CHANGED
@@ -83,8 +83,9 @@ class Inquirerer {
83
83
  let numTries = 0;
84
84
  while (index < questions.length) {
85
85
  const question = questions[index];
86
- if ('default' in question && this.useDefaults) {
86
+ if ('default' in question && (this.useDefaults || question.useDefault)) {
87
87
  obj[question.name] = question.default;
88
+ index++; // Move to the next question
88
89
  continue;
89
90
  }
90
91
  const ctx = {
@@ -6,6 +6,7 @@ export interface BaseQuestion {
6
6
  name: string;
7
7
  type: string;
8
8
  default?: any;
9
+ useDefault?: boolean;
9
10
  required?: boolean;
10
11
  message?: string;
11
12
  }