Huge News!Announcing our $40M Series B led by Abstract Ventures.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-6d532b2a9ec102a60f57eb0e28a30849855ff6d6

20

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,12 @@ return typeof callback === "function" ? callback(error) : void 0;

try {
_this.action(params, parsedOptions, callback);
actionPromise = _this.action(params, parsedOptions, callback);
if (actionPromise != null) {
if (typeof actionPromise["catch"] === "function") {
actionPromise["catch"](function(_error) {
if (_error) {
return typeof callback === "function" ? callback(_error) : void 0;
}
});
}
}
} catch (error1) {

@@ -101,0 +113,0 @@ error = error1;

2

build/option.js

@@ -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-6d532b2a9ec102a60f57eb0e28a30849855ff6d6",
"description": "Powerful, non opitionated command line parser for serious applications",

@@ -44,6 +44,6 @@ "main": "build/capitano.js",

"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

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