@axah/koa
Advanced tools
Comparing version 0.0.0-20241029150222 to 0.0.0-20250218145850
import { Middleware, Context, Next } from 'koa'; | ||
import { Logger } from 'pino'; | ||
export { c as createLogMiddleware, g as getDataFromMdc, _ as redact } from './shared/koa.cccf011b.js'; | ||
import z, { ZodType, ZodTypeDef } from 'zod'; | ||
import { StatusCodes } from 'http-status-codes'; | ||
import { Logger } from 'pino'; | ||
declare const errorHandler: Middleware; | ||
type MdcData = { | ||
messageId: string; | ||
user?: string; | ||
role?: string; | ||
initialMessageId?: string; | ||
sessionId?: string; | ||
}; | ||
declare function getDataFromMdc(): MdcData | undefined; | ||
declare function createLogMiddleware(logger: Logger, logRequests?: boolean): (ctx: Context, next: () => Promise<void> | void) => Promise<void>; | ||
declare const dateSchema: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>]>; | ||
@@ -35,2 +26,3 @@ | ||
PARASHIFT = "PARASHIFT", | ||
PROSPECT = "PROSPECT", | ||
PAYMENT_SERVICE = "PAYMENT_SERVICE", | ||
@@ -79,6 +71,2 @@ EMR = "EMR", | ||
declare const _default: { | ||
paths: string[]; | ||
}; | ||
declare const markServiceAsReady: () => void; | ||
@@ -99,2 +87,2 @@ declare const healthChecksMiddleware: Middleware; | ||
export { type Authentication, UserRole, createApiMethod, createLogMiddleware, dateSchema, errorHandler, getDataFromMdc, healthChecksMiddleware, markServiceAsReady, _default as redact, setupGracefulShutdown }; | ||
export { type Authentication, UserRole, createApiMethod, dateSchema, errorHandler, healthChecksMiddleware, markServiceAsReady, setupGracefulShutdown }; |
{ | ||
"name": "@axah/koa", | ||
"version": "0.0.0-20241029150222", | ||
"version": "0.0.0-20250218145850", | ||
"type": "module", | ||
@@ -15,2 +15,12 @@ "exports": { | ||
} | ||
}, | ||
"./log": { | ||
"import": { | ||
"types": "./lib/logger.d.mts", | ||
"default": "./lib/logger.mjs" | ||
}, | ||
"require": { | ||
"types": "./lib/logger.d.cts", | ||
"default": "./lib/logger.cjs" | ||
} | ||
} | ||
@@ -17,0 +27,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
45036
17
1099
11