Comparing version 1.0.2 to 1.1.0
@@ -16,3 +16,3 @@ module.exports = createTriggerLoader | ||
function triggerFunction() { | ||
function triggerFunction(emittedData) { | ||
logger.info('"' + trigger.desc + '"', 'triggered...') | ||
@@ -26,3 +26,8 @@ evaluateConditionals(trigger.if, function (result) { | ||
, args = then.action.input.slice(0) | ||
, emittedDataIndex = args.indexOf('#OUTPUT#') | ||
if (emittedDataIndex > -1) { | ||
args[emittedDataIndex] = emittedData | ||
} | ||
args.push(eachCb) | ||
@@ -43,5 +48,5 @@ plugin[then.action.name].apply(plugin, args) | ||
if (!plugins[when.plugin]) { | ||
throw new Error('No plugin registered for:', when.plugin) | ||
throw new Error('No plugin registered for: ' + when.plugin) | ||
} else if (!plugins[when.plugin].on) { | ||
throw new Error('Plugin is not an event emitter:', when.plugin) | ||
throw new Error('Plugin is not an event emitter: ' + when.plugin) | ||
} | ||
@@ -48,0 +53,0 @@ plugins[when.plugin].on(when.event, triggerFunction) |
{ | ||
"name": "automait", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
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
6653
133