Comparing version 0.9.22 to 0.9.26
var async = require('async'); | ||
var _ = require('lodash'); | ||
var Liner = require('./warpers/Liner'); | ||
var liner = new Liner(); | ||
/** | ||
@@ -11,3 +15,3 @@ * Message bus to deliver events to listeners | ||
this.firestarters = [ ]; | ||
this._divisions = [ ]; | ||
this.warpers = {}; | ||
this.systemName = systemName; | ||
@@ -19,9 +23,17 @@ this.logger = logger; | ||
barrel.setWarper = function( division, warper ){ | ||
if( this.warpers[division] ) | ||
this.warpers[division] = warper; | ||
}; | ||
barrel.warpers = function(){ | ||
return this.warpers; | ||
}; | ||
barrel.addDivision = function( division ){ | ||
if( division && !this. _divisions.contains(division) ) | ||
this._divisions.push( division ); | ||
this.setWarper( division, liner ); | ||
}; | ||
barrel.divisions = function(){ | ||
return this. _divisions; | ||
return _.keys( this.warpers ); | ||
}; | ||
@@ -142,2 +154,6 @@ | ||
var self = this; | ||
if( this.warpers[ comm.division ] && !this.warpers[ comm.division ].allow(comm) ) | ||
return self.appease( comm, new Error('Communication has been blocked.'), [] ); | ||
var matching = this.firestarters.filter( function( fs ){ return fs.active && fs.matches( comm.division, comm.event ); } ); | ||
@@ -144,0 +160,0 @@ |
@@ -8,3 +8,3 @@ var Communication = require('../lib/Communication'); | ||
var VERSION = exports.VERSION = '0.9.22'; | ||
var VERSION = exports.VERSION = '0.9.26'; | ||
@@ -83,2 +83,10 @@ function extend(obj, extension){ | ||
inflicter.setWarper = function( division, warper ){ | ||
return this.barrel.setWarper( division, warper ); | ||
}; | ||
inflicter.warpers = function(){ | ||
return this.barrel.warpers( ); | ||
}; | ||
inflicter.divisions = function(){ | ||
@@ -85,0 +93,0 @@ return this.barrel.divisions( ); |
{ | ||
"name": "harcon", | ||
"version": "0.9.22", | ||
"version": "0.9.26", | ||
"description": "Messaging/Service Bus for the harmonic convergence of node-based enterprise entities.", | ||
@@ -30,3 +30,4 @@ "keywords": [ | ||
"async": "latest", | ||
"clerobee": "latest" | ||
"clerobee": "latest", | ||
"lodash": "~2" | ||
}, | ||
@@ -40,6 +41,6 @@ "devDependencies": { | ||
"gulp-mocha": "latest", | ||
"gulp-util": "^3.0.1", | ||
"mkdirp": "^0.5.0", | ||
"watch": "^0.13.0", | ||
"webpack": "^1.4.13", | ||
"gulp-util": "~3", | ||
"mkdirp": "latest", | ||
"watch": "latest", | ||
"webpack": "~1", | ||
"winston": "latest" | ||
@@ -50,3 +51,3 @@ }, | ||
}, | ||
"_id": "harcon@0.9.22" | ||
"_id": "harcon@0.9.26" | ||
} |
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
700733
37
9623
3
+ Addedlodash@~2
+ Addedlodash@2.4.2(transitive)