Comparing version 0.16.2 to 0.16.3
// Generated by LiveScript 1.4.0 | ||
var debug, EventEmitter, HandlerRegistry; | ||
var ref$, bold, red, debug, EventEmitter, HandlerRegistry; | ||
ref$ = require('chalk'), bold = ref$.bold, red = ref$.red; | ||
debug = require('debug'); | ||
@@ -15,7 +16,14 @@ EventEmitter = require('events').EventEmitter; | ||
prototype.handleCommand = function(arg$, methods){ | ||
var messageName, payload, handler; | ||
var messageName, payload, handler, e; | ||
messageName = arg$.messageName, payload = arg$.payload; | ||
if (handler = this.getHandler(messageName)) { | ||
debug("handling message '" + messageName + "'"); | ||
handler(payload, methods); | ||
try { | ||
handler(payload, methods); | ||
} catch (e$) { | ||
e = e$; | ||
console.log("\n" + red(bold(e.message)) + "\n"); | ||
console.log(e.stack); | ||
throw e; | ||
} | ||
} | ||
@@ -25,9 +33,16 @@ return !!handler; | ||
prototype.handleReply = function(arg$){ | ||
var messageName, responseTo, payload, handler; | ||
var messageName, responseTo, payload, handler, e; | ||
messageName = arg$.messageName, responseTo = arg$.responseTo, payload = arg$.payload; | ||
if (handler = this.getHandler(responseTo)) { | ||
debug("handling message '" + messageName + "' in response to '" + responseTo + "'"); | ||
handler(payload, { | ||
outcome: messageName | ||
}); | ||
try { | ||
handler(payload, { | ||
outcome: messageName | ||
}); | ||
} catch (e$) { | ||
e = e$; | ||
console.log("\n" + red(bold(e.message)) + "\n"); | ||
console.log(e.stack); | ||
throw e; | ||
} | ||
} | ||
@@ -34,0 +49,0 @@ return !!handler; |
{ | ||
"name": "exorelay", | ||
"version": "0.16.2", | ||
"version": "0.16.3", | ||
"author": "Kevin Goslar", | ||
"dependencies": { | ||
"body-parser": "1.15.0", | ||
"chalk": "1.1.1", | ||
"debug": "2.2.0", | ||
@@ -17,3 +18,2 @@ "express": "4.13.4", | ||
"chai": "3.5.0", | ||
"chalk": "1.1.1", | ||
"cucumber": "0.9.5", | ||
@@ -20,0 +20,0 @@ "dependency-lint": "3.1.2", |
Sorry, the diff of this file is too big to display
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
135940
15
3262
8
+ Addedchalk@1.1.1
+ Addedchalk@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)