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

ecad

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecad - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

7

index.js

@@ -10,5 +10,6 @@ var net = require('net');

return this;
}
};
Ecad.prototype.fetch = function(fn) {
var that = this;
var opts = this.config;

@@ -31,3 +32,3 @@ var res = [];

client.on('end', function() {
var hosts = this._parse(res);
var hosts = that._parse(res);
if (hosts instanceof Error) return fn(hosts);

@@ -38,3 +39,5 @@ else return fn(null, hosts);

client.on('timeout', function() {
client.removeAllListeners();
client.end();
client.destroy();
return fn(new Error('Elasticache auto-discovery request timed out'));

@@ -41,0 +44,0 @@ });

{
"name": "ecad",
"version": "0.0.3",
"version": "0.0.4",
"description": "node.js Elasticache Auto Discovery client",

@@ -5,0 +5,0 @@ "author": {

@@ -42,3 +42,3 @@ var fs = require('fs');

var hosts = ecad._parse([payload]);
expect(function() { throw hosts })
expect(function() { throw hosts; })
.to.throw(/Bad response from Elasticache/);

@@ -50,3 +50,3 @@ });

var hosts = ecad._parse([payload]);
expect(function() { throw hosts })
expect(function() { throw hosts; })
.to.throw(/No Elasticache hosts found/);

@@ -60,3 +60,3 @@ });

ecad.fetch(function(err, hosts) {
expect(function() { throw err })
expect(function() { throw err; })
.to.throw(/Elasticache auto-discovery request timed out/);

@@ -69,16 +69,1 @@ done();

});
/*
it('should fail parsing empty payload', function() {
expect(server.config.timeout).to.deep.equal(500);
});
it('should fail parsing malformed payload', function() {
expect(server.config.timeout).to.deep.equal(500);
});
it('should timeout and fail if cannot reach host', function() {
expect(server.config.timeout).to.deep.equal(500);
});
*/
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