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

btrz-health-check

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btrz-health-check - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

10

package.json
{
"name": "btrz-health-check",
"version": "2.3.0",
"version": "3.0.0",
"description": "A series of classes that will ping different service types to verify accessibility.",

@@ -35,10 +35,10 @@ "main": "index.js",

"devDependencies": {
"chai": "4.3.6",
"mocha": "10.0.0",
"sinon": "14.0.0"
"chai": "4.3.7",
"mocha": "10.2.0",
"sinon": "15.0.4"
},
"dependencies": {
"superagent": "8.0.0",
"superagent": "8.0.9",
"git-rev": "^0.2.1"
}
}

@@ -1,5 +0,2 @@

"use strict";
let ServiceStatus = require("./service-status").ServiceStatus;
class SQSHealthChecker {

@@ -16,13 +13,9 @@ constructor(queue, options) {

let self = this;
function resolver(resolve, reject) {
self.queue.listQueues(function (err, result) {
if (err) {
reject(self.serviceStatus.fails(err));
}
if (result) {
resolve(self.serviceStatus.success());
}
return self.queue.listQueues({})
.then(() => {
return self.serviceStatus.success();
})
.catch((err) => {
return Promise.reject(self.serviceStatus.fails(err));
});
}
return new Promise(resolver);
}

@@ -29,0 +22,0 @@ }

@@ -5,3 +5,3 @@ "use strict";

let SQSHealthChecker = require("../src/sqs-health-checker").SQSHealthChecker,
sqs = {listQueues: function (cb) {cb(null, []); }},
sqs = {listQueues: function () { return Promise.resolve();}},
expect = require("chai").expect;

@@ -43,4 +43,4 @@

let sqs =
{listQueues: function (cb) {
cb(new Error());
{listQueues: function () {
return Promise.reject();
}

@@ -58,4 +58,4 @@ };

let sqs =
{listQueues: function (cb) {
cb(new Error());
{listQueues: function () {
return Promise.reject();
}

@@ -79,4 +79,4 @@ },

let sqs =
{listQueues: function (cb) {
cb(new Error());
{listQueues: function () {
return Promise.reject();
}

@@ -83,0 +83,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