inquirerer 0.7.0 → 0.8.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
@@ -81,6 +81,10 @@ export class Inquirerer {
81
81
  obj[question.name] = question.default;
82
82
  continue;
83
83
  }
84
+ if ('default' in question && question.useDefault) {
85
+ obj[question.name] = question.default;
86
+ continue;
87
+ }
84
88
  const ctx = {
85
89
  numTries
86
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "0.7.0",
3
+ "version": "0.8.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": "49eaa8d76816d598381eaed418c9a8a276656a52"
38
+ "gitHead": "085d11be60905cbc3ce81cfb5e95aedc0cf371f7"
39
39
  }
package/prompt.js CHANGED
@@ -87,6 +87,10 @@ class Inquirerer {
87
87
  obj[question.name] = question.default;
88
88
  continue;
89
89
  }
90
+ if ('default' in question && question.useDefault) {
91
+ obj[question.name] = question.default;
92
+ continue;
93
+ }
90
94
  const ctx = {
91
95
  numTries
92
96
  };
@@ -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
  }