Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

15

cli.js

@@ -155,3 +155,2 @@ /**

cli.options = {};
cli.args = [];
cli.command = null;

@@ -727,3 +726,3 @@ };

//default value (if specified) - otherwise fail
if (!argv.length || argv[0][0] === '-') {
if (!argv.length || (argv[0].length === 1 && argv[0][0] === '-')) {
throw 'No value';

@@ -1075,3 +1074,3 @@ }

if (errback) {
return errback(err);
return errback(err, stdout);
}

@@ -1093,4 +1092,5 @@ return cli.fatal('exec() failed\n' + err);

var last_progress_call, progress_len = 74;
cli.progress = function (progress) {
cli.progress = function (progress, decimals) {
if (progress < 0 || progress > 1 || isNaN(progress)) return;
if (!decimals) decimals = 0;
var now = (new Date()).getTime();

@@ -1111,3 +1111,8 @@ if (last_progress_call && (now - last_progress_call) < 100 && progress !== 1) {

}
cli.native.util.print('[' + str + '] ' + Math.floor(progress * 100) + '%' + (progress === 1 ? '\n' : '\u000D'));
var pwr = Math.pow(10, decimals);
var percentage = Math.floor(progress * 100 * pwr) / pwr + '%';
for (i = 0; i < decimals; i++) {
percentage += ' ';
}
cli.native.util.print('[' + str + '] ' + percentage + (progress === 1 ? '\n' : '\u000D'));
};

@@ -1114,0 +1119,0 @@

{ "name" : "cli",
"description" : "A tool for rapidly building command line apps",
"version" : "0.4.4",
"version" : "0.4.5",
"homepage" : "http://github.com/chriso/cli",

@@ -5,0 +5,0 @@ "keywords" : ["cli","command line","opts","parseopt","opt","args","console","argsparse","optparse","daemon","autocomplete","command","autocompletion"],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc