@adonisjs/http-server
Advanced tools
Comparing version 1.2.9 to 1.2.10
@@ -10,5 +10,5 @@ /// <reference types="node" /> | ||
import { IncomingMessage, ServerResponse, Server as HttpServer } from 'http'; | ||
type HookNode = (ctx: HttpContextContract) => Promise<void>; | ||
type ErrorHandlerNode = string | ((error: any, ctx: HttpContextContract) => Promise<any>); | ||
type ResolvedErrorHandlerNode = { | ||
export type HookNode = (ctx: HttpContextContract) => Promise<void>; | ||
export type ErrorHandlerNode = string | ((error: any, ctx: HttpContextContract) => Promise<any>); | ||
export type ResolvedErrorHandlerNode = { | ||
type: 'function'; | ||
@@ -21,7 +21,7 @@ value: Exclude<ErrorHandlerNode, string>; | ||
}; | ||
interface HooksContract { | ||
export interface HooksContract { | ||
before(cb: HookNode): this; | ||
after(cb: HookNode): this; | ||
} | ||
interface ServerContract { | ||
export interface ServerContract { | ||
instance?: HttpServer | HttpsServer; | ||
@@ -35,3 +35,5 @@ router: RouterContract; | ||
} | ||
type ServerConfigContract = RequestConfigContract & ResponseConfigContract; | ||
export type ServerConfigContract = RequestConfigContract & ResponseConfigContract; | ||
const Server: ServerContract; | ||
export default Server; | ||
} |
{ | ||
"name": "@adonisjs/http-server", | ||
"version": "1.2.9", | ||
"version": "1.2.10", | ||
"description": "Extracted copy of AdonisJs HTTP server along with it's router", | ||
@@ -5,0 +5,0 @@ "files": [ |
100869
2492