Comparing version 1.7.2 to 1.7.3
@@ -57,2 +57,3 @@ var Command, Option, Signature, _; | ||
return exports.state.getMatchCommand(args.command, function(error, command) { | ||
var error1; | ||
if (error != null) { | ||
@@ -66,4 +67,4 @@ return typeof callback === "function" ? callback(error) : void 0; | ||
return command.execute(args, callback); | ||
} catch (_error) { | ||
error = _error; | ||
} catch (error1) { | ||
error = error1; | ||
return typeof callback === "function" ? callback(error) : void 0; | ||
@@ -70,0 +71,0 @@ } |
@@ -75,3 +75,3 @@ var Command, Option, Signature, _, parse, settings, state, utils; | ||
return _this._checkElevation(function(error, isElevated) { | ||
var parsedOptions; | ||
var error1, parsedOptions; | ||
if (error != null) { | ||
@@ -87,7 +87,8 @@ return typeof callback === "function" ? callback(error) : void 0; | ||
parsedOptions = _this._parseOptions(args.options); | ||
} catch (_error) { | ||
error = _error; | ||
} catch (error1) { | ||
error = error1; | ||
return typeof callback === "function" ? callback(error) : void 0; | ||
} | ||
return _this.applyPermissions(function(error) { | ||
var error2; | ||
if (error != null) { | ||
@@ -98,4 +99,4 @@ return typeof callback === "function" ? callback(error) : void 0; | ||
_this.action(params, parsedOptions, callback); | ||
} catch (_error) { | ||
error = _error; | ||
} catch (error2) { | ||
error = error2; | ||
return typeof callback === "function" ? callback(error) : void 0; | ||
@@ -102,0 +103,0 @@ } |
@@ -31,6 +31,15 @@ var Parameter, _, settings, state, yargsParser; | ||
argv = exports.normalizeInput(argv); | ||
output = yargsParser(argv); | ||
output = yargsParser(argv, { | ||
configuration: { | ||
'parse-numbers': false | ||
} | ||
}); | ||
options = _.omit(output, '_'); | ||
result = {}; | ||
result.options = options; | ||
result.options = _.mapValues(options, function(value) { | ||
if (/^[\d\.]+$/.test(value)) { | ||
return parseFloat(value); | ||
} | ||
return value; | ||
}); | ||
result.global = exports.parseOptions(state.globalOptions, options); | ||
@@ -37,0 +46,0 @@ if (!_.isEmpty(output._)) { |
{ | ||
"name": "capitano", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "Powerful, non opitionated command line parser for serious applications", | ||
@@ -5,0 +5,0 @@ "main": "build/capitano.js", |
@@ -431,2 +431,10 @@ Capitano | ||
### 1.7.3 | ||
- Don't evaluate numbers in scientific notation automatically. | ||
### 1.7.2 | ||
- Replace `minimist` with `yargs-parser`. | ||
### 1.7.1 | ||
@@ -433,0 +441,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142933
777
532