fastify-healthcheck
Advanced tools
Comparing version 3.0.0 to 3.1.0
# Change Log | ||
## [3.1.0](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/3.1.0) (2021-02-09) | ||
[Full Changelog](https://github.com/smartiniOnGitHub/fastify-favicon/compare/3.0.0...3.1.0) | ||
Summary Changelog: | ||
- Updated requirements to Under-pressure '^5.6.0' | ||
- Update all dependencies to latest, and removed 'standardx' (as dev dependency) | ||
- Fix some (now) failing tests | ||
- Fix exposure of uptime after requested the first time | ||
- Ensure compatibility with Under-pressure option to specify a custom route for healthcheck/status | ||
## [3.0.0](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/3.0.0) (2020-07-24) | ||
@@ -4,0 +13,0 @@ [Full Changelog](https://github.com/smartiniOnGitHub/fastify-favicon/compare/2.3.1...3.0.0) |
/* | ||
* Copyright 2018-2020 the original author or authors. | ||
* Copyright 2018-2021 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/* | ||
* Copyright 2018-2020 the original author or authors. | ||
* Copyright 2018-2021 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
{ | ||
"name": "fastify-healthcheck", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Fastify Plugin to serve responses for health checks", | ||
@@ -22,28 +22,33 @@ "main": "src/plugin", | ||
"start": "node src/healthcheck", | ||
"lint": "standard \"./*.js\" \"./src/**/*.js\" \"./test/**/*.test.js\" \"./example/**/*.js\"", | ||
"lint:types": "standardx \"./types/**/*.ts\"", | ||
"lint:types:fix": "standardx \"./types/**/*.ts\" --fix", | ||
"lint": "npm run lint:standard && npm run lint:typescript", | ||
"lint:fix": "standard --fix", | ||
"lint:standard": "standard --verbose", | ||
"lint:typescript": "eslint -c types/.eslintrc.json types/*.d.ts types/*.test-d.ts", | ||
"test:coverage": "npm run test:unit -- --cov --coverage-report=html", | ||
"test:coverage:all": "npm run test:unit -- --cov", | ||
"test:types": "tsd && tsc --p ./types", | ||
"test:unit": "tap -J --comments --no-esm --strict test/*.test.js", | ||
"test:unit:debug": "tap -T --node-arg=--inspect-brk --comments --no-esm --strict test/*.test.js", | ||
"test:unit:dev": "tap -J --comments --no-esm --strict --watch test/*.test.js", | ||
"test": "npm run lint && npm run lint:types && npm run test:types && npm run test:unit" | ||
"test:types": "tsd", | ||
"test:unit": "tap -j 1 test/*.test.js", | ||
"test:unit:debug": "tap -T --node-arg=--inspect-brk test/*.test.js", | ||
"test:unit:dev": "tap --watch --cov test/*.test.js", | ||
"test": "npm run lint:standard && npm run lint:typescript && npm run test:types && npm run test:unit" | ||
}, | ||
"dependencies": { | ||
"under-pressure": "^5.1.0" | ||
"under-pressure": "^5.6.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.0.24", | ||
"@typescript-eslint/eslint-plugin": "^3.7.0", | ||
"@typescript-eslint/parser": "^3.7.0", | ||
"@types/node": "^14.14.25", | ||
"@typescript-eslint/eslint-plugin": "^4.15.0", | ||
"@typescript-eslint/parser": "^4.15.0", | ||
"fastify": "^3.0.0", | ||
"simple-get": "^4.0.0", | ||
"standard": "^14.3.4", | ||
"standardx": "^5.0.0", | ||
"tap": "^14.10.8", | ||
"tsd": "^0.13.1", | ||
"typescript": "^3.9.7" | ||
"standard": "^16.0.3", | ||
"tap": "^14.11.0", | ||
"tsd": "^0.14.0", | ||
"typescript": "^4.1.3" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"types/*" | ||
] | ||
}, | ||
"tsd": { | ||
@@ -56,8 +61,2 @@ "directory": "types", | ||
}, | ||
"standardx": { | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint/eslint-plugin" | ||
] | ||
}, | ||
"peerDependencies": {}, | ||
@@ -64,0 +63,0 @@ "engines": { |
@@ -91,3 +91,3 @@ # fastify-healthcheck | ||
Fastify ^3.0.0 , Node.js 10.13.x or later. | ||
Fastify ^3.0.0 , Node.js 10 LTS (10.13.0) or later. | ||
Note that plugin releases 2.x are for Fastify 2.x, 3.x are for Fastify 3.x, etc. | ||
@@ -94,0 +94,0 @@ |
/* | ||
* Copyright 2018-2020 the original author or authors. | ||
* Copyright 2018-2021 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/* | ||
* Copyright 2018-2020 the original author or authors. | ||
* Copyright 2018-2021 the original author or authors. | ||
* | ||
@@ -72,4 +72,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
function normalHandlerWithUptime (req, reply) { | ||
payloadOK.uptime = process.uptime() | ||
reply.code(200).send(payloadOK) | ||
reply.code(200).send({ ...payloadOK, uptime: process.uptime() }) | ||
} | ||
@@ -76,0 +75,0 @@ |
/// <reference types="node" /> | ||
import underPressure from 'under-pressure' | ||
import { FastifyPlugin } from 'fastify' | ||
import { FastifyPluginCallback } from 'fastify' | ||
@@ -14,3 +14,3 @@ export interface FastifyHealthcheckOptions { | ||
declare const fastifyHealthcheck: FastifyPlugin<FastifyHealthcheckOptions> | ||
declare const fastifyHealthcheck: FastifyPluginCallback<FastifyHealthcheckOptions> | ||
export default fastifyHealthcheck |
@@ -10,3 +10,3 @@ { | ||
}, | ||
"includes": [ | ||
"include": [ | ||
"/types/*.test-d.ts", | ||
@@ -13,0 +13,0 @@ "/types/*.d.ts" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37942
9
15
266
Updatedunder-pressure@^5.6.0