fastify-healthcheck
Advanced tools
Comparing version 2.3.0 to 2.3.1
# Change Log | ||
## [2.3.1](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/2.3.1) (2020-06-01) | ||
Summary Changelog: | ||
- Fix TypeScript types | ||
## [2.3.0](https://github.com/smartiniOnGitHub/fastify-healthcheck/releases/tag/2.3.0) (2020-05-26) | ||
@@ -4,0 +8,0 @@ Summary Changelog: |
{ | ||
"name": "fastify-healthcheck", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Fastify Plugin to serve responses for health checks", | ||
@@ -23,9 +23,11 @@ "main": "src/plugin", | ||
"lint": "standard \"./*.js\" \"./src/**/*.js\" \"./test/**/*.test.js\" \"./example/**/*.js\"", | ||
"lint:types": "standardx \"./types/**/*.ts\"", | ||
"lint:types:fix": "standardx \"./types/**/*.ts\" --fix", | ||
"test:coverage": "npm run test:unit -- --cov --coverage-report=html", | ||
"test:coverage:all": "npm run test:unit -- --cov", | ||
"test:types": "tsd", | ||
"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 test:types && npm run test:unit" | ||
"test": "npm run lint && npm run lint:types && npm run test:types && npm run test:unit" | ||
}, | ||
@@ -36,5 +38,8 @@ "dependencies": { | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^3.0.2", | ||
"@typescript-eslint/parser": "^3.0.2", | ||
"fastify": "^2.14.1", | ||
"simple-get": "^4.0.0", | ||
"standard": "^14.3.4", | ||
"standardx": "^5.0.0", | ||
"tap": "^14.10.7", | ||
@@ -49,4 +54,14 @@ "tsd": "^0.11.0", | ||
"tsd": { | ||
"directory": "types" | ||
"directory": "types", | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"strict": true | ||
} | ||
}, | ||
"standardx": { | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint/eslint-plugin" | ||
] | ||
}, | ||
"homepage": "https://github.com/smartiniOnGitHub/fastify-healthcheck#readme", | ||
@@ -53,0 +68,0 @@ "repository": { |
@@ -1,4 +0,5 @@ | ||
import { FastifyMiddleware } from 'fastify' | ||
import * as fastify from 'fastify' | ||
import * as http from 'http' | ||
export interface HealthcheckPluginOptions { | ||
export interface FastifyHealthcheckOptions { | ||
healthcheckUrl?: string | ||
@@ -11,3 +12,9 @@ healthcheckUrlDisable?: boolean | ||
declare const healthcheckPlugin: FastifyMiddleware<HealthcheckPluginOptions> | ||
export default healthcheckPlugin | ||
export const fastifyHealthcheck: fastify.Plugin< | ||
http.Server, | ||
http.IncomingMessage, | ||
http.ServerResponse, | ||
FastifyHealthcheckOptions | ||
> | ||
export default fastifyHealthcheck |
@@ -1,10 +0,7 @@ | ||
import healthcheckPlugin, { HealthcheckPluginOptions } from '..' | ||
import healthcheckPlugin, { FastifyHealthcheckOptions } from '..' | ||
import { expectAssignable } from 'tsd' | ||
const fastify = require('fastify') | ||
import fastify from 'fastify' | ||
const app = fastify() | ||
app.register(healthcheckPlugin) | ||
expectAssignable < HealthcheckPluginOptions > ({}) | ||
expectAssignable < HealthcheckPluginOptions > ({ | ||
app.register(healthcheckPlugin, { | ||
healthcheckUrl: '/health', | ||
@@ -16,1 +13,9 @@ healthcheckUrlDisable: false, | ||
}) | ||
expectAssignable < FastifyHealthcheckOptions >({}) | ||
expectAssignable < FastifyHealthcheckOptions >({ | ||
healthcheckUrl: '/health', | ||
healthcheckUrlDisable: true, | ||
healthcheckUrlAlwaysFail: true, | ||
exposeUptime: true | ||
}) |
@@ -7,3 +7,4 @@ { | ||
"noEmit": true, | ||
"strict": true | ||
"strict": true, | ||
"esModuleInterop": true | ||
}, | ||
@@ -10,0 +11,0 @@ "includes": [ |
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
36877
266
9