h3 0.7.19 → 0.7.20

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +7 -7
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import http, { OutgoingMessage } from 'http';
1
+ import { IncomingMessage as IncomingMessage$1, ServerResponse as ServerResponse$1, OutgoingMessage } from 'http';
2
2
  import { CookieSerializeOptions } from 'cookie-es';
3
3
  import * as ufo from 'ufo';
4
4
 
@@ -39,11 +39,11 @@ declare class H3Event implements Pick<FetchEvent, 'respondWith'> {
39
39
  res: ServerResponse;
40
40
  event: H3Event;
41
41
  context: H3EventContext;
42
- constructor(req: http.IncomingMessage | IncomingMessage, res: http.ServerResponse | ServerResponse);
42
+ constructor(req: IncomingMessage$1 | IncomingMessage, res: ServerResponse$1 | ServerResponse);
43
43
  respondWith(r: H3Response | PromiseLike<H3Response>): void;
44
44
  }
45
45
  declare function isEvent(input: any): input is H3Event;
46
- declare function createEvent(req: http.IncomingMessage, res: http.ServerResponse): H3Event;
46
+ declare function createEvent(req: IncomingMessage$1, res: ServerResponse$1): H3Event;
47
47
 
48
48
  declare function defineEventHandler<T = any>(handler: EventHandler<T>): EventHandler<T>;
49
49
  declare const eventHandler: typeof defineEventHandler;
@@ -62,14 +62,14 @@ interface CompatibilityRequestProps {
62
62
  /** Only available with connect and press */
63
63
  originalUrl?: string;
64
64
  }
65
- interface IncomingMessage extends http.IncomingMessage, CompatibilityRequestProps {
65
+ interface IncomingMessage extends IncomingMessage$1, CompatibilityRequestProps {
66
66
  req: H3Event['req'];
67
67
  res: H3Event['res'];
68
68
  }
69
- interface ServerResponse extends http.ServerResponse {
69
+ interface ServerResponse extends ServerResponse$1 {
70
70
  event: H3Event;
71
71
  res: H3Event['res'];
72
- req: http.ServerResponse['req'] & CompatibilityRequestProps;
72
+ req: ServerResponse$1['req'] & CompatibilityRequestProps;
73
73
  }
74
74
  declare type Handler<T = any, ReqT = {}> = (req: IncomingMessage & ReqT, res: ServerResponse) => T;
75
75
  declare type PromisifiedHandler = Handler<Promise<any>>;
@@ -111,7 +111,7 @@ interface AppUse {
111
111
  (handler: CompatibilityEventHandler | CompatibilityEventHandler[], options?: Partial<InputLayer>): App;
112
112
  (options: InputLayer): App;
113
113
  }
114
- declare type NodeHandler = (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
114
+ declare type NodeHandler = (req: IncomingMessage$1, res: ServerResponse$1) => Promise<void>;
115
115
  interface App extends NodeHandler {
116
116
  stack: Stack;
117
117
  handler: EventHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h3",
3
- "version": "0.7.19",
3
+ "version": "0.7.20",
4
4
  "description": "Tiny JavaScript Server",
5
5
  "repository": "unjs/h3",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "@types/supertest": "^2.0.12",
33
33
  "@vitest/coverage-c8": "^0.22.1",
34
34
  "autocannon": "^7.9.0",
35
- "changelogen": "^0.2.3",
35
+ "changelogen": "^0.3.0",
36
36
  "connect": "^3.7.0",
37
37
  "eslint": "^8.23.0",
38
38
  "express": "^4.18.1",
@@ -41,7 +41,7 @@
41
41
  "listhen": "^0.2.15",
42
42
  "supertest": "^6.2.4",
43
43
  "typescript": "^4.8.2",
44
- "unbuild": "^0.8.9",
44
+ "unbuild": "^0.8.10",
45
45
  "vitest": "^0.22.1"
46
46
  },
47
47
  "packageManager": "pnpm@7.9.5",