machine-as-script
Advanced tools
Comparing version 1.0.4 to 1.1.0
21
index.js
@@ -122,4 +122,23 @@ /** | ||
}, | ||
success: function() { | ||
success: function(output) { | ||
// If output is not undefined and expected, then log it. | ||
if (!_.isUndefined(output)) { | ||
try { | ||
if ( | ||
!_.isUndefined(liveMachine.exits.success.example) || | ||
_.isFunction(liveMachine.exits.success.getExample) || | ||
!_.isUndefined(liveMachine.exits.success.like) || | ||
!_.isUndefined(liveMachine.exits.success.itemOf) | ||
) { | ||
console.log(util.inspect(output, {depth: null, colors: true})); | ||
} | ||
} | ||
catch (e) { /* fail silently if anything goes awry */ } | ||
return; | ||
} | ||
// Otherwise, log a generic message. | ||
console.log(chalk.green('OK.')); | ||
} | ||
@@ -126,0 +145,0 @@ }); |
{ | ||
"name": "machine-as-script", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Run a machine as a command-line script.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
6124
120