New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

exorelay

Package Overview
Dependencies
Maintainers
1
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.5.2 to 0.5.3

12

lib/command-manager.js

@@ -19,11 +19,13 @@ // Generated by LiveScript 1.4.0

prototype.handleRequest = function(arg$, methods){
var command, responseTo, payload;
command = arg$.command, responseTo = arg$.responseTo, payload = arg$.payload;
var command, requestId, responseTo, payload;
command = arg$.command, requestId = arg$.requestId, responseTo = arg$.responseTo, payload = arg$.payload;
switch (false) {
case !!requestId:
return 'missing request id';
case !this.replyHandlers.hasHandler(responseTo):
return this.replyHandlers.handle(responseTo, payload);
return this.replyHandlers.handle(responseTo, payload) && 'success';
case !this.commandHandlers.hasHandler(command):
return this.commandHandlers.handle(command, payload, methods);
return this.commandHandlers.handle(command, payload, methods) && 'success';
default:
return debug("no handler found for command '" + command + "' and request-id '" + responseTo + "'");
return 'unknown command';
}

@@ -30,0 +32,0 @@ };

@@ -46,2 +46,6 @@ // Generated by LiveScript 1.4.0

prototype._onIncomingCommand = function(requestData){
switch (false) {
case !!requestData.requestId:
return 'missing request id';
}
return this.commandHandler.handleRequest(requestData, {

@@ -48,0 +52,0 @@ reply: this.commandSender.replyMethodFor(requestData.requestId)

@@ -50,9 +50,14 @@ // Generated by LiveScript 1.4.0

prototype._commandController = function(req, res){
var requestData;
var requestData, result;
requestData = this._parseRequest(req);
this._log(requestData);
if (this.handleCommand(requestData)) {
switch (result = this.handleCommand(requestData)) {
case 'success':
return res.status(200).end();
} else {
return res.status(404).end();
case 'missing request id':
return res.status(400).end('missing request id');
case 'unknown command':
return res.status(404).end("unknown command: '" + requestData.command + "'");
default:
throw new Error("unknown result code: '" + this.result + "'");
}

@@ -59,0 +64,0 @@ };

{
"name": "exorelay",
"version": "0.5.2",
"version": "0.5.3",
"description": "Communication relay between JavaScript code bases and the Exosphere environment",

@@ -5,0 +5,0 @@ "main": "lib/exorelay.js",

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