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

@hmcts/nodejs-healthcheck

Package Overview
Dependencies
Maintainers
16
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hmcts/nodejs-healthcheck - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

.github/workflows/npmpublish.yml

11

healthcheck/routes.js

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

'use strict'
'use strict';
const checks = require('./checks'),

@@ -6,2 +6,5 @@ outputs = require('./outputs'),

const { Logger } = require('@hmcts/nodejs-logging');
const logger = Logger.getLogger('@hmcts/nodejs-logging/routes');
function getBuildInfo(extra) {

@@ -44,2 +47,8 @@ return Promise.all([

const status = allOk ? 200 : 500;
if (!allOk) {
const downHealthChecks = Object.values(results)
.filter(result => result.status === outputs.DOWN);
logger.error('Health check failed, result for down endpoints: ', JSON.stringify(downHealthChecks));
}
res.status(status).json(output);

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

8

healthcheck/versionFile.js

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

const fs = require('fs-extra');
const fs = require('fs').promises;
const yaml = require('js-yaml');
let defaultObj
let defaultObj;

@@ -18,3 +18,3 @@ const versionFile = () => {

.catch((err) => defaultObj);
}
};

@@ -33,4 +33,4 @@ const version = () => {

return versionFile().then(props => props.date || defaultObj.date);
}
};
module.exports = { version, commit, date };
'use strict'
const request = require('superagent'),
checks = require('./healthcheck/checks'),
const checks = require('./healthcheck/checks'),
outputs = require('./healthcheck/outputs'),

@@ -9,3 +8,2 @@ routes = require('./healthcheck/routes'),

module.exports = {

@@ -12,0 +10,0 @@ "addTo": install.addTo,

{
"name": "@hmcts/nodejs-healthcheck",
"version": "1.5.1",
"version": "1.6.0",
"description": "Healthcheck endpoint for Reform nodejs applications",
"main": "index.js",
"engines": {
"node": ">10.0.0"
},
"scripts": {

@@ -16,5 +19,5 @@ "test": "mocha test/unit/* --reporter spec"

"dependencies": {
"fs-extra": "^4.0.1",
"@hmcts/nodejs-logging": "^3.0.1",
"js-yaml": "^3.8.4",
"superagent": "^3.5.1"
"superagent": "5"
},

@@ -24,10 +27,10 @@ "devDependencies": {

"chai-as-promised": "^7.1.1",
"mocha": "^3.4.2",
"nock": "^9.0.0",
"proxyquire": "^1.8.0",
"sinon": "^3.2.0",
"sinon-chai": "^2.10.0",
"supertest": "^3.4.2",
"express": "^4.16.4"
"express": "^4.16.4",
"mocha": "7",
"nock": "12",
"proxyquire": "2",
"sinon": "9",
"sinon-chai": "3",
"supertest": "4"
}
}

@@ -5,3 +5,3 @@ 'use strict'

const {expect, sinon} = require('../chai-sinon');
const fs = require('fs-extra');
const fs = require('fs').promises;
const versionFile = require('../../healthcheck/versionFile');

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