@salesforce/sf-plugins-core 2.0.2 → 2.1.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/lib/sfCommand.d.ts +2 -1
- package/lib/sfCommand.js +3 -2
- package/package.json +1 -1
package/lib/sfCommand.d.ts
CHANGED
|
@@ -234,9 +234,10 @@ export declare abstract class SfCommand<T> extends Command {
|
|
|
234
234
|
*
|
|
235
235
|
* @param message text to display. Do not include a question mark.
|
|
236
236
|
* @param ms milliseconds to wait for user input. Defaults to 10s.
|
|
237
|
+
* @param defaultAnswer boolean to set the default answer to. Defaults to true.
|
|
237
238
|
* @return true if the user confirms, false if they do not.
|
|
238
239
|
*/
|
|
239
|
-
confirm(message: string, ms?: number): Promise<boolean>;
|
|
240
|
+
confirm(message: string, ms?: number, defaultAnswer?: boolean): Promise<boolean>;
|
|
240
241
|
/**
|
|
241
242
|
* Prompt user for information with a timeout (in milliseconds). See https://www.npmjs.com/package/inquirer for more.
|
|
242
243
|
*/
|
package/lib/sfCommand.js
CHANGED
|
@@ -168,10 +168,11 @@ class SfCommand extends core_1.Command {
|
|
|
168
168
|
*
|
|
169
169
|
* @param message text to display. Do not include a question mark.
|
|
170
170
|
* @param ms milliseconds to wait for user input. Defaults to 10s.
|
|
171
|
+
* @param defaultAnswer boolean to set the default answer to. Defaults to true.
|
|
171
172
|
* @return true if the user confirms, false if they do not.
|
|
172
173
|
*/
|
|
173
|
-
async confirm(message, ms = 10000) {
|
|
174
|
-
return this.prompter.confirm(message, ms);
|
|
174
|
+
async confirm(message, ms = 10000, defaultAnswer = true) {
|
|
175
|
+
return this.prompter.confirm(message, ms, defaultAnswer);
|
|
175
176
|
}
|
|
176
177
|
/**
|
|
177
178
|
* Prompt user for information with a timeout (in milliseconds). See https://www.npmjs.com/package/inquirer for more.
|