Comparing version 0.1.5 to 0.1.6
@@ -12,2 +12,3 @@ 'use strict'; | ||
var defaults = { | ||
middleware: [], | ||
amqpUrl: 'amqp://guest:guest@localhost:5672', | ||
@@ -30,2 +31,6 @@ exchange: 'amq.topic', | ||
if(options.middleware && !Array.isArray(options.middleware)){ | ||
throw new Error('Middleware must be supplied in an array.'); | ||
} | ||
this.options = xtend(defaults, options); | ||
@@ -62,4 +67,6 @@ this.options.route = route; | ||
var middleware = self.container.middleware.concat(self.options.middleware); | ||
// run all the middleware passing the message through each with the result being updateMsg | ||
pipeline(self.container.middleware, svcsMsg).then(function processMiddleware(updateMsg) { | ||
pipeline(middleware, svcsMsg).then(function processMiddleware(updateMsg) { | ||
// debug('updateMsg', updateMsg); | ||
@@ -66,0 +73,0 @@ // cater for pipeline returning an array if the array of functions passed was empty!? |
{ | ||
"name": "svcs", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "AMQP driven micro services for node.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
21257
528