UNPKG

@lokalise/fastify-extras

Version:

Opinionated set of fastify plugins, commonly used in Lokalise

20 lines (19 loc) 750 B
import type { FastifyPluginCallback } from 'fastify'; import type { HealthCheckerSync } from './healthcheckCommons.js'; export interface CommonSyncHealthcheckPluginOptions { responsePayload?: Record<string, unknown>; logLevel?: 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent'; healthChecks: readonly HealthCheckSync[]; infoProviders?: readonly InfoProvider[]; isRootRouteEnabled?: boolean; } export type InfoProvider = { name: string; dataResolver: () => Record<string, unknown>; }; export type HealthCheckSync = { name: string; isMandatory: boolean; checker: HealthCheckerSync; }; export declare const commonSyncHealthcheckPlugin: FastifyPluginCallback<CommonSyncHealthcheckPluginOptions>;