New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

capitano

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capitano - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2-67-fix-ignored-error-in-async-action-functions-071074f58e7ce369ba85f38f6c6188540f039f79

29

build/command.js

@@ -5,4 +5,2 @@ var Command, Option, Signature, _, parse, settings, state, utils;

_.str = require('underscore.string');
parse = require('./parse');

@@ -35,3 +33,7 @@

this.options = [];
_.each(options.options, this.option, this);
_.forEach(options.options, (function(_this) {
return function(option) {
return _this.option(option);
};
})(this));
_.extend(this, _.omit(options, 'options'));

@@ -93,2 +95,3 @@ }

return _this.applyPermissions(function(error) {
var actionPromise;
if (error != null) {

@@ -98,3 +101,3 @@ return typeof callback === "function" ? callback(error) : void 0;

try {
_this.action(params, parsedOptions, callback);
actionPromise = _this.action(params, parsedOptions, callback);
} catch (error1) {

@@ -104,4 +107,18 @@ error = error1;

}
if (_this.action.length < 3) {
return typeof callback === "function" ? callback() : void 0;
if (callback != null) {
if ((actionPromise != null ? actionPromise.then : void 0) != null) {
return actionPromise.then(function(_value) {
if (_this.action.length < 3) {
return callback();
}
}, function(_error) {
if (_error) {
return callback(_error);
}
});
} else {
if (_this.action.length < 3) {
return callback();
}
}
}

@@ -108,0 +125,0 @@ });

@@ -58,3 +58,3 @@ var Option, Signature, _, isValidAlias, parse;

}
return !_.any([this.boolean && !_.isBoolean(value), !this.boolean && _.isBoolean(value)]);
return !_.some([this.boolean && !_.isBoolean(value), !this.boolean && _.isBoolean(value)]);
};

@@ -61,0 +61,0 @@

@@ -52,3 +52,3 @@ var Parameter, REGEX_MULTIWORD, REGEX_OPTIONAL, REGEX_REQUIRED, REGEX_STDIN, REGEX_VARIADIC, STDIN_CHARACTER, _, parse;

Parameter.prototype.isWord = function() {
return !_.any([this.isRequired(), this.isOptional()]);
return !_.some([this.isRequired(), this.isOptional()]);
};

@@ -55,0 +55,0 @@

@@ -5,4 +5,2 @@ var Parameter, Signature, _, appearedMoreThanOnce, async, isLastOne, parse, settings, utils;

_.str = require('underscore.string');
async = require('async');

@@ -37,3 +35,7 @@

this.parameters = [];
_.each(parse.split(signature), this._addParameter, this);
_.forEach(parse.split(signature), (function(_this) {
return function(word) {
return _this._addParameter(word);
};
})(this));
if (this.allowsStdin()) {

@@ -70,3 +72,3 @@ isStdin = function(parameter) {

Signature.prototype.hasParameters = function() {
return _.any(this.parameters, function(parameter) {
return _.some(this.parameters, function(parameter) {
return !parameter.isWord();

@@ -77,3 +79,3 @@ });

Signature.prototype.hasVariadicParameters = function() {
return _.any(this.parameters, function(parameter) {
return _.some(this.parameters, function(parameter) {
return parameter.isVariadic();

@@ -84,3 +86,3 @@ });

Signature.prototype.allowsStdin = function() {
return _.any(this.parameters, function(parameter) {
return _.some(this.parameters, function(parameter) {
return parameter.allowsStdin();

@@ -102,3 +104,3 @@ });

Signature.prototype.isWildcard = function() {
return _.all([this.parameters.length === 1, this.parameters[0].toString() === settings.signatures.wildcard]);
return _.every([this.parameters.length === 1, this.parameters[0].toString() === settings.signatures.wildcard]);
};

@@ -111,3 +113,3 @@

}
if (_.str.startsWith(error.message, 'Missing')) {
if (_.startsWith(error.message, 'Missing')) {
return callback(true);

@@ -114,0 +116,0 @@ }

@@ -7,2 +7,7 @@ # Change Log

## 1.8.2 - 2018-11-12
* Fix ignored error in async action functions [Paulo Castro]
* Dependencies: Update lodash and underscore.string packages [Lucian Buzzo]
## v1.8.1 - 2018-08-28

@@ -9,0 +14,0 @@

{
"name": "capitano",
"version": "1.8.1",
"version": "1.8.2-67-fix-ignored-error-in-async-action-functions-071074f58e7ce369ba85f38f6c6188540f039f79",
"description": "Powerful, non opitionated command line parser for serious applications",

@@ -29,2 +29,3 @@ "main": "build/capitano.js",

"devDependencies": {
"bluebird": "^3.3.3",
"chai": "~2.3.0",

@@ -45,6 +46,6 @@ "coffee-script": "~1.9.2",

"is-elevated": "^1.0.0",
"lodash": "~3.9.1",
"underscore.string": "~3.0.3",
"lodash": "~4.17.10",
"underscore.string": "~3.3.4",
"yargs-parser": "^2.4.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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