Socket
Socket
Sign inDemoInstall

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 1.5.0 to 1.6.0

6

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

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

"scripts": {
"test": "NODE_ENV=test node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --ui bdd -t 5000",
"test-w": "NODE_ENV=test node_modules/mocha/bin/mocha -w",
"test": "NODE_ENV=test BUILD_NUMBER=123456789 node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- --ui bdd -t 5000",
"test-w": "NODE_ENV=test BUILD_NUMBER=123456789 node_modules/mocha/bin/mocha -w",
"publish": "publish"

@@ -14,0 +14,0 @@ },

@@ -8,10 +8,6 @@ "use strict";

git() {
function resolver(resolve) {
git.long(function (str) {
resolve(str);
});
}
return new Promise(resolver);
buildNumber() {
return process.env.BUILD_NUMBER || "0";
}
ec2instanceId() {

@@ -30,3 +26,13 @@ function resolver(resolve, reject) {

git() {
function resolver(resolve) {
git.long(function (str) {
resolve(str);
});
}
return new Promise(resolver);
}
values() {
let self = this;
return Promise.all([this.git(), this.ec2instanceId()])

@@ -36,3 +42,4 @@ .then(function (results) {

commit: results[0],
instanceId: results[1]
instanceId: results[1],
build: self.buildNumber()
};

@@ -39,0 +46,0 @@ });

@@ -32,2 +32,3 @@ "use strict";

results[0].instanceId = results[1].instanceId;
results[0].build = results[1].build;
return results[0];

@@ -34,0 +35,0 @@ });

@@ -24,2 +24,6 @@ "use strict";

it("should return the BUILD_NUMBER", function () {
expect(env.buildNumber()).to.be.eql("123456789");
});
it("should return the env variables combined", function (done) {

@@ -29,2 +33,3 @@ env.values().then(function (result) {

expect(result.instanceId).to.be.eql("localhost");
expect(result.build).to.be.eql("123456789");
done();

@@ -31,0 +36,0 @@ });

@@ -12,2 +12,3 @@ "use strict";

expect(result.commit).to.not.be.undefined;
expect(result.build).to.be.eql("123456789");
done();

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