Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exorelay

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exorelay - npm Package Compare versions

Comparing version 0.19.1 to 0.19.2

dist/websocket-connector/websocket-connector-spec.js

36

dist/exorelay.js
// 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc