@adonisjs/http-server 6.0.1-0 → 6.0.2-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,8 +16,7 @@ export declare class Server<NamedMiddleware extends Record<string, LazyImport<Mi
16
16
  errorHandler(handler: LazyImport<ErrorHandlerAsAClass>): this;
17
17
  boot(): Promise<void>;
18
18
  setNodeServer(server: HttpServer | HttpsServer): void;
19
- close(): Promise<void>;
20
19
  getNodeServer(): HttpServer<typeof IncomingMessage, typeof ServerResponse> | HttpsServer<typeof IncomingMessage, typeof ServerResponse> | undefined;
21
- getRouter(): Router<any> | undefined;
20
+ getRouter(): Router<NamedMiddleware> | undefined;
22
21
  handle(req: IncomingMessage, res: ServerResponse): Promise<any>;
23
22
  }
@@ -93,20 +93,6 @@ export class Server {
93
93
  setNodeServer(server) {
94
94
  this.#underlyingHttpServer = server;
95
95
  }
96
- close() {
97
- return new Promise((resolve, reject) => {
98
- if (!this.#underlyingHttpServer || !this.#underlyingHttpServer.listening) {
99
- resolve();
100
- return;
101
- }
102
- this.#underlyingHttpServer.close((error) => {
103
- if (error) {
104
- return reject(error);
105
- }
106
- resolve();
107
- });
108
- });
109
- }
110
96
  getNodeServer() {
111
97
  return this.#underlyingHttpServer;
112
98
  }
@@ -1,3 +1,4 @@
1
+ export type { NextFn } from '@poppinss/middleware/types';
1
2
  export type Constructor<T> = new (...args: any[]) => T;
2
3
  export type LazyImport<DefaultExport> = () => Promise<{
3
4
  default: DefaultExport;
@@ -1,6 +1,5 @@
1
1
  import type { ContainerResolver } from '@adonisjs/fold';
2
- import type { NextFn } from '@poppinss/middleware/types';
3
- import type { Constructor } from './base.js';
2
+ import type { Constructor, NextFn } from './base.js';
4
3
  import type { HttpContext } from '../http_context/main.js';
5
4
  export type MiddlewareAsClass = Constructor<{
6
5
  handle: (ctx: HttpContext, next: NextFn, args?: any) => any;
@@ -1,8 +1,8 @@
1
+ import type { QSParserConfig } from './qs.js';
1
2
  import type { Constructor } from './base.js';
2
3
  import type { RequestConfig } from './request.js';
3
4
  import type { ResponseConfig } from './response.js';
4
5
  import type { HttpContext } from '../http_context/main.js';
5
- import { QSParserConfig } from './qs.js';
6
6
  export type ServerErrorHandler = {
7
7
  handle: (error: any, ctx: HttpContext) => any;
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/http-server",
3
- "version": "6.0.1-0",
3
+ "version": "6.0.2-0",
4
4
  "description": "AdonisJS HTTP server with support packed with Routing and Cookies",
5
5
  "main": "build/index.js",
6
6
  "type": "module",