fastify-healthcheck
Advanced tools
Comparing version 2.3.1 to 3.0.0
# Change Log | ||
## [3.0.0](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/3.0.0) (2020-07-24) | ||
[Full Changelog](https://github.com/smartiniOnGitHub/fastify-favicon/compare/2.3.1...3.0.0) | ||
Summary Changelog: | ||
- Updated requirements to Fastify '^3.0.0' (as dev dependency) | ||
- Updated all dependencies to latest | ||
- Update TypeScript types | ||
## [2.3.1](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/2.3.1) (2020-06-01) | ||
@@ -4,0 +11,0 @@ Summary Changelog: |
/* | ||
* Copyright 2018 the original author or authors. | ||
* Copyright 2018-2020 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/* | ||
* Copyright 2018 the original author or authors. | ||
* Copyright 2018-2020 the original author or authors. | ||
* | ||
@@ -20,3 +20,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
// register plugin with all its options shown but disabled (as a sample) | ||
// register plugin with all its options shown but commented (as a sample) | ||
fastify.register(require('../src/plugin'), { | ||
@@ -23,0 +23,0 @@ // healthcheckUrl: '/custom-health', |
{ | ||
"name": "fastify-healthcheck", | ||
"version": "2.3.1", | ||
"version": "3.0.0", | ||
"description": "Fastify Plugin to serve responses for health checks", | ||
@@ -34,19 +34,16 @@ "main": "src/plugin", | ||
"dependencies": { | ||
"under-pressure": "^4.0.0" | ||
"under-pressure": "^5.1.0" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^3.0.2", | ||
"@typescript-eslint/parser": "^3.0.2", | ||
"fastify": "^2.14.1", | ||
"@types/node": "^14.0.24", | ||
"@typescript-eslint/eslint-plugin": "^3.7.0", | ||
"@typescript-eslint/parser": "^3.7.0", | ||
"fastify": "^3.0.0", | ||
"simple-get": "^4.0.0", | ||
"standard": "^14.3.4", | ||
"standardx": "^5.0.0", | ||
"tap": "^14.10.7", | ||
"tsd": "^0.11.0", | ||
"typescript": "^3.9.3" | ||
"tap": "^14.10.8", | ||
"tsd": "^0.13.1", | ||
"typescript": "^3.9.7" | ||
}, | ||
"peerDependencies": {}, | ||
"engines": { | ||
"node": ">=8.16.0" | ||
}, | ||
"tsd": { | ||
@@ -65,2 +62,6 @@ "directory": "types", | ||
}, | ||
"peerDependencies": {}, | ||
"engines": { | ||
"node": ">=10.13.0" | ||
}, | ||
"homepage": "https://github.com/smartiniOnGitHub/fastify-healthcheck#readme", | ||
@@ -67,0 +68,0 @@ "repository": { |
@@ -91,4 +91,4 @@ # fastify-healthcheck | ||
Fastify ^2.1.0 , Node.js 8.16.x or later. | ||
Note that plugin releases 2.x are for Fastify 2.x, etc. | ||
Fastify ^3.0.0 , Node.js 10.13.x or later. | ||
Note that plugin releases 2.x are for Fastify 2.x, 3.x are for Fastify 3.x, etc. | ||
@@ -95,0 +95,0 @@ |
/* | ||
* Copyright 2018 the original author or authors. | ||
* Copyright 2018-2020 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/* | ||
* Copyright 2018 the original author or authors. | ||
* Copyright 2018-2020 the original author or authors. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -1,4 +0,6 @@ | ||
import * as fastify from 'fastify' | ||
import * as http from 'http' | ||
/// <reference types="node" /> | ||
import underPressure from 'under-pressure' | ||
import { FastifyPlugin } from 'fastify' | ||
export interface FastifyHealthcheckOptions { | ||
@@ -9,12 +11,6 @@ healthcheckUrl?: string | ||
exposeUptime?: boolean | ||
underPressureOptions?: Record<string, any> | ||
underPressureOptions?: underPressure.UnderPressureOptions | ||
} | ||
export const fastifyHealthcheck: fastify.Plugin< | ||
http.Server, | ||
http.IncomingMessage, | ||
http.ServerResponse, | ||
FastifyHealthcheckOptions | ||
> | ||
declare const fastifyHealthcheck: FastifyPlugin<FastifyHealthcheckOptions> | ||
export default fastifyHealthcheck |
@@ -0,7 +1,7 @@ | ||
import fastify from 'fastify' | ||
import healthcheckPlugin, { FastifyHealthcheckOptions } from '..' | ||
import { expectAssignable } from 'tsd' | ||
import fastify from 'fastify' | ||
const app = fastify() | ||
app.register(healthcheckPlugin, { | ||
const options: FastifyHealthcheckOptions = { | ||
healthcheckUrl: '/health', | ||
@@ -12,6 +12,12 @@ healthcheckUrlDisable: false, | ||
underPressureOptions: { } | ||
} | ||
app.register(healthcheckPlugin, options) | ||
app.listen(3000, (err, address) => { | ||
if (err) throw err | ||
console.log(`Server listening on '${address}' ...`) | ||
}) | ||
expectAssignable < FastifyHealthcheckOptions >({}) | ||
expectAssignable < FastifyHealthcheckOptions >({ | ||
expectAssignable<FastifyHealthcheckOptions>({}) | ||
expectAssignable<FastifyHealthcheckOptions>({ | ||
healthcheckUrl: '/health', | ||
@@ -18,0 +24,0 @@ healthcheckUrlDisable: true, |
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"lib": [ "es2015" ], | ||
"target": "ES6", | ||
"lib": [ "ES2015", "DOM" ], | ||
"module": "commonjs", | ||
@@ -6,0 +6,0 @@ "noEmit": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37470
267
10
+ Added@fastify/error@2.0.0(transitive)
+ Addedfastify-plugin@3.0.1(transitive)
+ Addedunder-pressure@5.8.1(transitive)
- Removedfastify-plugin@1.6.1(transitive)
- Removedsemver@6.3.1(transitive)
- Removedunder-pressure@4.0.0(transitive)
Updatedunder-pressure@^5.1.0