@dnlup/fastify-traps
Advanced tools
Comparing version 3.0.1 to 3.0.2
import { | ||
FastifyPluginCallback, | ||
} from 'fastify-plugin' | ||
} from 'fastify' | ||
export interface TrapsPluginOptions { | ||
timeout?: number, | ||
onSignal?: (signal: 'SIGTERM' | 'SIGINT') => void, | ||
onClose?: () => void, | ||
onTimeout?: (timeout: number) => void, | ||
onError?: (error: Error|any) => void, | ||
strict?: boolean | ||
type FastifyTrapsPlugin = FastifyPluginCallback<fastifyTraps.FastifyTrapsOptions> | ||
declare namespace fastifyTraps { | ||
export interface FastifyTrapsOptions { | ||
timeout?: number, | ||
onSignal?: (signal: 'SIGTERM' | 'SIGINT') => void, | ||
onClose?: () => void, | ||
onTimeout?: (timeout: number) => void, | ||
onError?: (error: Error|any) => void, | ||
strict?: boolean | ||
} | ||
export const fastifyTraps: FastifyTrapsPlugin | ||
export { fastifyTraps as default } | ||
} | ||
const plugin: FastifyPluginCallback<TrapsPluginOptions>; | ||
export = plugin; | ||
declare function fastifyTraps( | ||
...params: Parameters<FastifyTrapsPlugin> | ||
): ReturnType<FastifyTrapsPlugin> | ||
export = fastifyTraps; |
{ | ||
"name": "@dnlup/fastify-traps", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A Fastify plugin to close the server gracefully on SIGINT and SIGTERM signals", | ||
@@ -52,3 +52,3 @@ "main": "index.js", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^14.0.0", | ||
"lint-staged": "^15.2.0", | ||
"markdown-toc": "^1.2.0", | ||
@@ -55,0 +55,0 @@ "snazzy": "^9.0.0", |
9103
92