How to use the prompt.stop function in prompt

To help you get started, we’ve selected a few prompt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / here-cli / src / here-transform.ts View on Github external
transform.read(path, true).then(result => {
            console.log(JSON.stringify({ features: transform.transform(result, opt.lat, opt.lon, opt.alt), type: "FeatureCollection" }, null, 3)); //Converted json object from csv data
        });
    });

program
    .command('shp2geo 
github whats-this / owo.js / bin / owo.js View on Github external
.then(() => {;
      console.log('Success!');
      prompt.stop();
    });
}
github HospitalRun / hospitalrun-server / utils / reset-db.js View on Github external
}, function (err, result) {
    if (err) {
      console.log('Error getting prompt:',err);
    } else if (result.confirm === 'CONTINUE') {
      prompt.stop();
      console.log('Getting list of records to delete');
      maindb.list(function(err, results) {
        if (!err) {
          results.rows.forEach(function(result) {
            var recordToDelete = {
              '_id': result.id,
              '_rev': result.value.rev,
              '_deleted': true
            };
            recordsToDelete.push(recordToDelete);
          });
          if (recordsToDelete.length > 0) {
            console.log('About to delete ' + recordsToDelete.length + ' records.');
            maindb.bulk({ docs: recordsToDelete}, function(err, results) {
              if (err) {
                console.log('Error deleting records.', JSON.stringify(err, null, 2));
github heremaps / here-cli / src / here-configure.ts View on Github external
}catch(error){
            console.log(error.message);
        }
    });
}

program
    .command('verify')
    .arguments('[env]')
    .description('Verify credentials')
    .action(function (env, options) {
        common.verify();
    });


prompter.stop();

program.parse(process.argv);

if (!program.args.length) {
    setUserPass();
} else {
    common.validate(["help","set","verify","account"], [process.argv[2]], program);
}

process.on('uncaughtException', error => {
    console.log(error.message);
});
github mapbox / HecateJS / lib / schema.js View on Github external
prompt.get(args, (err, argv) => {
            prompt.stop();

            if (argv.username) {
                this.api.user = {
                    username: argv.username,
                    password: argv.password
                };
            }

            return run(argv);
        });
github mapbox / HecateJS / lib / bounds.js View on Github external
prompt.get(args, (err, argv) => {
                if (err) throw err;

                prompt.stop();

                if (argv.hecate_username) {
                    self.api.user = {
                        username: argv.hecate_username,
                        password: argv.hecate_password
                    };
                }

                return main();
            });
        } else {
github mapbox / HecateJS / lib / tiles.js View on Github external
prompt.get(args, (err, argv) => {
                if (err) throw err;

                prompt.stop();

                if (argv.hecate_username) {
                    self.api.user = {
                        username: argv.hecate_username,
                        password: argv.hecate_password
                    };
                }

                options.limit = argv.limit;

                return main();
            });
        } else {
github nathangoulding / grpcli / lib / index.js View on Github external
}, function (err, result) {
			if (err) {
				throw new Error('Must select a service to continue');
			}
			prompt.stop();
			_opts.serviceName = result.serviceName;
			_opts.service = def[result.serviceName];
			callback();
		});
	};
github mapbox / HecateJS / lib / bbox.js View on Github external
prompt.get(args, (err, argv) => {
            prompt.stop();

            if (argv.username) {
                this.api.user = {
                    username: argv.username,
                    password: argv.password
                };
            }

            return run(argv);
        });
github postor / mysql-restful-api / lib / cli / promise-prompt.js View on Github external
promisePrompt.close = function(){
  prompt.stop()
}