Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.__defineGetter__('prompt', function () {
if (!this._prompt) {
//
// Pass-thru any prompt specific options that are supplied.
//
var prompt = require('prompt'),
self = this;
prompt.allowEmpty = options.allowEmpty || prompt.allowEmpty;
prompt.message = options.message || prompt.message;
prompt.delimiter = options.delimiter || prompt.delimiter;
prompt.properties = options.properties || prompt.properties;
//
// Setup `destroy` property for destructive commands
//
prompt.properties.destroy = {
name: 'destroy',
message: 'This operation cannot be undone, Would you like to proceed?',
default: 'yes'
};
//
// Hoist up any prompt specific events and re-emit them as
// `prompt::*` events.
this.__defineGetter__('prompt', function () {
if (!this._prompt) {
//
// Pass-thru any prompt specific options that are supplied.
//
var prompt = require('prompt'),
self = this;
prompt.allowEmpty = options.allowEmpty || prompt.allowEmpty;
prompt.message = options.message || prompt.message;
prompt.delimiter = options.delimiter || prompt.delimiter;
prompt.properties = options.properties || prompt.properties;
//
// Setup `destroy` property for destructive commands
//
prompt.properties.destroy = {
name: 'destroy',
message: 'This operation cannot be undone, Would you like to proceed?',
default: 'yes'
};
//
// Hoist up any prompt specific events and re-emit them as
// `prompt::*` events.
this.__defineGetter__('prompt', function () {
if (!this._prompt) {
// Pass-thru any prompt specific options that are supplied.
var prompt = require('prompt'),
self = this;
prompt.allowEmpty = options.allowEmpty || prompt.allowEmpty;
prompt.message = options.message || prompt.message;
prompt.delimiter = options.delimiter || prompt.delimiter;
prompt.properties = options.properties || prompt.properties;
// Setup `destroy` property for destructive commands
prompt.properties.destroy = {
name: 'destroy',
message: 'This operation cannot be undone, Would you like to proceed?',
default: 'yes'
};
// Hoist up any prompt specific events and re-emit them as
// `prompt::*` events.
['start', 'pause', 'resume', 'prompt', 'invalid'].forEach(function (ev) {
prompt.on(ev, function () {
var args = Array.prototype.slice.call(arguments);