Comparing version 13.0.0-0 to 13.0.0-1
@@ -14,3 +14,3 @@ /** | ||
* | ||
* @param {Object} machineDef | ||
* @param {Dictionary} machineDef | ||
* @return {Function} | ||
@@ -17,0 +17,0 @@ */ |
@@ -14,7 +14,7 @@ /** | ||
* | ||
* @param {Object} callbacks - an object of callback functions, with a key for each configured exit | ||
* @param {Dictionary} callbacks - an object of callback functions, with a key for each configured exit | ||
* @param {Object|false} _cache - the cache configuration | ||
* @param {String} hash - the hash string representing this particular input configuration | ||
* @param {Object} machine | ||
* @return {Object} of new callbacks which intercept the configured callback functions | ||
* @param {Dictionary} machine | ||
* @return {Dictionary} of new callbacks which intercept the configured callback functions | ||
*/ | ||
@@ -21,0 +21,0 @@ module.exports = function interceptExitCallbacks (callbacks, _cache, hash, machine){ |
@@ -14,3 +14,3 @@ /** | ||
* | ||
* @param {Object} machineDefinition | ||
* @param {Dictionary} machineDefinition | ||
* @return {Function} | ||
@@ -17,0 +17,0 @@ */ |
@@ -20,3 +20,3 @@ /** | ||
* | ||
* @optional {Object} machineDefinition | ||
* @optional {Dictionary} machineDefinition | ||
* • defaults to an anonymous "noop" machine definition which, when | ||
@@ -328,3 +328,3 @@ * executed, does nothing beyond calling its success exit. | ||
* | ||
* @param {Object} configuredInputVals | ||
* @param {Dictionary} configuredInputVals | ||
* @chainable | ||
@@ -338,3 +338,3 @@ */ | ||
/** | ||
* @param {Object} callbacks | ||
* @param {Dictionary} callbacks | ||
* @chainable | ||
@@ -359,2 +359,7 @@ */ | ||
else { | ||
// Make sure only declared exits are configured. | ||
var undeclaredExits = _.difference(_.keys(callbacks), _.keys(this.exits)); | ||
if (undeclaredExits.length) { | ||
throw new Error('The following exits were configured, but they aren\'t valid for this machine: `' + undeclaredExits.join(', ') + '`.'); | ||
} | ||
_.extend(this._configuredExits, callbacks); | ||
@@ -361,0 +366,0 @@ } |
@@ -11,8 +11,10 @@ /** | ||
/** | ||
* Build an object of callable machine functions. | ||
* Machine.pack() | ||
* | ||
* @param {Object} options | ||
* @required {Object} pkg | ||
* @optional {Object} dir | ||
* @return {Object} | ||
* Build a dictionary of machine instances. | ||
* - - - - - - - - - - - - - - - - - - - - - - - - - | ||
* @required {Dictionary} pkg | ||
* @optional {Dictionary} dir | ||
* | ||
* @returns {Dictionary} | ||
*/ | ||
@@ -19,0 +21,0 @@ |
@@ -11,3 +11,3 @@ /** | ||
* Provide cache settings. | ||
* @param {Object} cacheSettings | ||
* @param {Dictionary} cacheSettings | ||
* @chainable | ||
@@ -14,0 +14,0 @@ */ |
@@ -19,4 +19,4 @@ /** | ||
* | ||
* @returns {Object} | ||
* @property {Object} values - object of new, "lightly"-coerced input values, if they could be coerced | ||
* @returns {Dictionary} | ||
* @property {Dictionary} values - object of new, "lightly"-coerced input values, if they could be coerced | ||
* @property {Error} errors - error objects representing invalid configured inputs (or anything else that might have gone wrong) | ||
@@ -23,0 +23,0 @@ */ |
{ | ||
"name": "machine", | ||
"version": "13.0.0-0", | ||
"version": "13.0.0-1", | ||
"description": "Configure and execute machines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
115182
2451