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

bograch

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bograch - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

bograch-0.0.13.tgz

21

lib/client.js

@@ -21,3 +21,7 @@ 'use strict';

this._ttl = options.ttl || DEFAULT_TTL;
// Successfully handshaked with the server.
this._isConnected = false;
this.methods = {};
this._existingMethods = [];

@@ -31,3 +35,5 @@ cb = cb || function () {};

this._existingMethods = methods;
this.register(methods);
this._isConnected = true;
return cb(null, this);

@@ -53,3 +59,4 @@ }.bind(this));

var i = 0;
var cb;
var killed = false;
var cb, publicMethodName, timeoutId;

@@ -71,8 +78,14 @@ if (!methodName) {

var publicMethodName = createPublicMethodName(this._name, methodName);
if (this._isConnected && this._existingMethods.indexOf(methodName) === -1) {
var err = new ServerError('invalidMethod', 'Remote method `' + methodName + '` does not exist');
if (cb) {
return cb(err);
}
throw err;
}
var killed = false;
publicMethodName = createPublicMethodName(this._name, methodName);
if (cb) {
var timeoutId = setTimeout(function () {
timeoutId = setTimeout(function () {
killed = true;

@@ -79,0 +92,0 @@ cb(new ServerError('responseTimeout',

2

package.json
{
"name": "bograch",
"version": "0.0.12",
"version": "0.0.13",
"description": "A communication gateway for NodeJS microservices.",

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

@@ -42,3 +42,4 @@ 'use strict';

var boClient = new Client(transporter, {
name: 'test'
name: 'test',
ttl: 10
});

@@ -75,2 +76,9 @@

});
it('should return error if remote method does not exist', function (done) {
boClient.call('lochNess', function (err) {
expect(err.type).to.be.equal('invalidMethod');
done();
});
});
});
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