Comparing version 0.19.1 to 0.19.2
// Generated by LiveScript 1.5.0 | ||
var EventEmitter, ip, HandlerManager, MessageSender, ref$, delegate, delegateEvent, ZmqListener, debug, ExoRelay; | ||
var EventEmitter, HandlerManager, ref$, delegate, delegateEvent, WebSocketConnector, WebSocket, debug, ExoRelay; | ||
EventEmitter = require('events').EventEmitter; | ||
ip = require('ip'); | ||
HandlerManager = require('./message-handler/message-manager'); | ||
MessageSender = require('./message-sender/message-sender'); | ||
ref$ = require('rails-delegate'), delegate = ref$.delegate, delegateEvent = ref$.delegateEvent; | ||
ZmqListener = require('./zmq-listener/zmq-listener'); | ||
WebSocketConnector = require('./websocket-connector/websocket-connector'); | ||
WebSocket = require('ws'); | ||
debug = require('debug')('exorelay'); | ||
@@ -28,14 +27,9 @@ ExoRelay = (function(superclass){ | ||
this.messageHandler = new HandlerManager(); | ||
this.messageSender = new MessageSender(config); | ||
x$ = this.zmqListener = new ZmqListener(); | ||
x$ = this.websocketConnector = new WebSocketConnector(config); | ||
x$.on('message', this._onIncomingMessage); | ||
x$.on('online', this._sendRoutingConfig); | ||
delegate('closePort', { | ||
delegate('close', 'listen', { | ||
from: this, | ||
to: this.messageSender | ||
to: this.websocketConnector | ||
}); | ||
delegate('close', 'listen', 'port', { | ||
from: this, | ||
to: this.zmqListener | ||
}); | ||
delegate('hasHandler', 'registerHandler', 'registerHandlers', { | ||
@@ -46,7 +40,7 @@ from: this, | ||
delegateEvent('error', { | ||
from: [this.zmqListener, this.messageHandler, this.messageSender], | ||
from: [this.websocketConnector, this.messageHandler], | ||
to: this | ||
}); | ||
delegateEvent('status', 'offline', { | ||
from: this.zmqListener, | ||
delegateEvent('offline', { | ||
from: this.websocketConnector, | ||
to: this | ||
@@ -61,3 +55,3 @@ }); | ||
} | ||
messageId = this.messageSender.send(messageName, payload); | ||
messageId = this.websocketConnector.send(messageName, payload); | ||
if (replyHandler) { | ||
@@ -70,7 +64,7 @@ this.messageHandler.registerReplyHandler(messageId, replyHandler); | ||
if (requestData.messageName === '__status') { | ||
this.messageSender.send("__status-ok"); | ||
this.websocketConnector.send("__status-ok"); | ||
return 'success'; | ||
} | ||
return this.messageHandler.handleRequest(requestData, { | ||
reply: this.messageSender.replyMethodFor(requestData.id), | ||
reply: this.websocketConnector.replyMethodFor(requestData.id), | ||
send: this.send | ||
@@ -82,7 +76,5 @@ }); | ||
name: this.config.serviceName, | ||
internalNamespace: this.config.internalNamespace, | ||
host: ip.address(), | ||
port: this.zmqListener.port | ||
internalNamespace: this.config.internalNamespace | ||
}); | ||
return this.emit('online', this.zmqListener.port); | ||
return this.emit('online', this.websocketConnector.exocomPort); | ||
}; | ||
@@ -89,0 +81,0 @@ return ExoRelay; |
{ | ||
"name": "exorelay", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"author": "Kevin Goslar", | ||
@@ -8,7 +8,6 @@ "dependencies": { | ||
"debug": "2.2.0", | ||
"ip": "1.1.3", | ||
"lodash.isempty": "4.4.0", | ||
"node-uuid": "1.4.7", | ||
"rails-delegate": "0.6.2", | ||
"zmq": "2.15.3" | ||
"ws": "1.1.1" | ||
}, | ||
@@ -22,3 +21,4 @@ "description": "Communication relay between JavaScript code bases and the Exosphere environment", | ||
"ejs": "2.5.2", | ||
"exocom-mock": "0.8.1", | ||
"exocom-mock": "0.9.0", | ||
"ip": "1.1.4", | ||
"jsdiff-console": "2.2.1", | ||
@@ -25,0 +25,0 @@ "livescript": "1.5.0", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
6
17968
20
7
426
1
+ Addedws@1.1.1
+ Addedoptions@0.0.6(transitive)
+ Addedultron@1.0.2(transitive)
+ Addedws@1.1.1(transitive)
- Removedip@1.1.3
- Removedzmq@2.15.3
- Removedbindings@1.2.1(transitive)
- Removedip@1.1.3(transitive)
- Removednan@2.3.5(transitive)
- Removedzmq@2.15.3(transitive)