@eggjs/koa 3.1.0-beta.3 → 3.1.0-beta.5

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.
package/dist/context.d.ts CHANGED
@@ -7,7 +7,7 @@ import { IncomingMessage, ServerResponse } from "node:http";
7
7
  import Cookies from "cookies";
8
8
  import { ParsedUrlQuery } from "node:querystring";
9
9
  import { Accepts } from "accepts";
10
- import * as http4 from "http";
10
+ import * as http6 from "http";
11
11
 
12
12
  //#region src/context.d.ts
13
13
  declare class Context {
@@ -29,12 +29,12 @@ declare class Context {
29
29
  request: {
30
30
  method: string;
31
31
  url: string;
32
- header: http4.IncomingHttpHeaders;
32
+ header: http6.IncomingHttpHeaders;
33
33
  };
34
34
  response: {
35
35
  status: number;
36
36
  message: string;
37
- header: http4.OutgoingHttpHeaders;
37
+ header: http6.OutgoingHttpHeaders;
38
38
  };
39
39
  app: {
40
40
  subdomainOffset: number;
@@ -53,12 +53,12 @@ declare class Context {
53
53
  request: {
54
54
  method: string;
55
55
  url: string;
56
- header: http4.IncomingHttpHeaders;
56
+ header: http6.IncomingHttpHeaders;
57
57
  };
58
58
  response: {
59
59
  status: number;
60
60
  message: string;
61
- header: http4.OutgoingHttpHeaders;
61
+ header: http6.OutgoingHttpHeaders;
62
62
  };
63
63
  app: {
64
64
  subdomainOffset: number;
@@ -82,12 +82,12 @@ declare class Context {
82
82
  request: {
83
83
  method: string;
84
84
  url: string;
85
- header: http4.IncomingHttpHeaders;
85
+ header: http6.IncomingHttpHeaders;
86
86
  };
87
87
  response: {
88
88
  status: number;
89
89
  message: string;
90
- header: http4.OutgoingHttpHeaders;
90
+ header: http6.OutgoingHttpHeaders;
91
91
  };
92
92
  app: {
93
93
  subdomainOffset: number;
@@ -191,8 +191,8 @@ declare class Context {
191
191
  get host(): string;
192
192
  get hostname(): string;
193
193
  get URL(): URL;
194
- get header(): http4.IncomingHttpHeaders;
195
- get headers(): http4.IncomingHttpHeaders;
194
+ get header(): http6.IncomingHttpHeaders;
195
+ get headers(): http6.IncomingHttpHeaders;
196
196
  get secure(): boolean;
197
197
  get stale(): boolean;
198
198
  get fresh(): boolean;
package/dist/request.d.ts CHANGED
@@ -6,7 +6,7 @@ import { IncomingMessage, ServerResponse } from "node:http";
6
6
  import { Socket } from "node:net";
7
7
  import { ParsedUrlQuery } from "node:querystring";
8
8
  import { Accepts } from "accepts";
9
- import * as http12 from "http";
9
+ import * as http0 from "http";
10
10
 
11
11
  //#region src/request.d.ts
12
12
  interface RequestSocket extends Socket {
@@ -24,19 +24,19 @@ declare class Request {
24
24
  /**
25
25
  * Return request header.
26
26
  */
27
- get header(): http12.IncomingHttpHeaders;
27
+ get header(): http0.IncomingHttpHeaders;
28
28
  /**
29
29
  * Set request header.
30
30
  */
31
- set header(val: http12.IncomingHttpHeaders);
31
+ set header(val: http0.IncomingHttpHeaders);
32
32
  /**
33
33
  * Return request header, alias as request.header
34
34
  */
35
- get headers(): http12.IncomingHttpHeaders;
35
+ get headers(): http0.IncomingHttpHeaders;
36
36
  /**
37
37
  * Set request header, alias as request.header
38
38
  */
39
- set headers(val: http12.IncomingHttpHeaders);
39
+ set headers(val: http0.IncomingHttpHeaders);
40
40
  /**
41
41
  * Get request URL.
42
42
  */
@@ -320,7 +320,7 @@ declare class Request {
320
320
  inspect(): {
321
321
  method: string;
322
322
  url: string;
323
- header: http12.IncomingHttpHeaders;
323
+ header: http0.IncomingHttpHeaders;
324
324
  } | undefined;
325
325
  /**
326
326
  * Custom inspection implementation for newer Node.js versions.
@@ -328,7 +328,7 @@ declare class Request {
328
328
  [util.inspect.custom](): {
329
329
  method: string;
330
330
  url: string;
331
- header: http12.IncomingHttpHeaders;
331
+ header: http0.IncomingHttpHeaders;
332
332
  } | undefined;
333
333
  /**
334
334
  * Return JSON representation.
@@ -336,7 +336,7 @@ declare class Request {
336
336
  toJSON(): {
337
337
  method: string;
338
338
  url: string;
339
- header: http12.IncomingHttpHeaders;
339
+ header: http0.IncomingHttpHeaders;
340
340
  };
341
341
  }
342
342
  //#endregion
@@ -5,7 +5,7 @@ import util from "node:util";
5
5
  import Stream from "node:stream";
6
6
  import { IncomingMessage, ServerResponse } from "node:http";
7
7
  import { Options } from "content-disposition";
8
- import * as http0 from "http";
8
+ import * as http14 from "http";
9
9
  import * as net0 from "net";
10
10
 
11
11
  //#region src/response.d.ts
@@ -24,11 +24,11 @@ declare class Response {
24
24
  /**
25
25
  * Return response header.
26
26
  */
27
- get header(): http0.OutgoingHttpHeaders;
27
+ get header(): http14.OutgoingHttpHeaders;
28
28
  /**
29
29
  * Return response header, alias as response.header
30
30
  */
31
- get headers(): http0.OutgoingHttpHeaders;
31
+ get headers(): http14.OutgoingHttpHeaders;
32
32
  _explicitStatus: boolean;
33
33
  /**
34
34
  * Get response status code.
@@ -207,12 +207,12 @@ declare class Response {
207
207
  inspect(): {
208
208
  status: number;
209
209
  message: string;
210
- header: http0.OutgoingHttpHeaders;
210
+ header: http14.OutgoingHttpHeaders;
211
211
  } | undefined;
212
212
  [util.inspect.custom](): {
213
213
  status: number;
214
214
  message: string;
215
- header: http0.OutgoingHttpHeaders;
215
+ header: http14.OutgoingHttpHeaders;
216
216
  } | undefined;
217
217
  /**
218
218
  * Return JSON representation.
@@ -220,7 +220,7 @@ declare class Response {
220
220
  toJSON(): {
221
221
  status: number;
222
222
  message: string;
223
- header: http0.OutgoingHttpHeaders;
223
+ header: http14.OutgoingHttpHeaders;
224
224
  };
225
225
  /**
226
226
  * Flush any set headers and begin the body
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eggjs/koa",
3
- "version": "3.1.0-beta.3",
3
+ "version": "3.1.0-beta.5",
4
4
  "engines": {
5
5
  "node": ">= 20.19.0"
6
6
  },
@@ -42,7 +42,7 @@
42
42
  "content-type": "^1.0.5",
43
43
  "cookies": "^0.9.1",
44
44
  "destroy": "^1.0.4",
45
- "encodeurl": "^1.0.2",
45
+ "encodeurl": "^2.0.0",
46
46
  "escape-html": "^1.0.3",
47
47
  "fresh": "~0.5.2",
48
48
  "gals": "1",
@@ -52,7 +52,7 @@
52
52
  "on-finished": "^2.4.1",
53
53
  "parseurl": "^1.3.3",
54
54
  "statuses": "^2.0.1",
55
- "type-is": "^1.6.18",
55
+ "type-is": "^2.0.0",
56
56
  "vary": "^1.1.2"
57
57
  },
58
58
  "devDependencies": {
@@ -69,16 +69,17 @@
69
69
  "@types/on-finished": "^2.3.4",
70
70
  "@types/parseurl": "^1.3.3",
71
71
  "@types/statuses": "^2.0.5",
72
- "@types/supertest": "^6.0.2",
73
72
  "@types/type-is": "^1.6.6",
74
73
  "@types/vary": "^1.1.3",
75
74
  "mm": "^4.0.2",
76
- "supertest": "^3.1.0",
77
75
  "tsdown": "^0.15.0",
78
- "typescript": "5"
76
+ "typescript": "5.9.2",
77
+ "@eggjs/supertest": "8.3.0-beta.5"
79
78
  },
80
79
  "scripts": {
81
80
  "build": "tsdown",
81
+ "typecheck": "tsc --noEmit",
82
+ "lint": "oxlint --type-aware",
82
83
  "test": "vitest run"
83
84
  }
84
85
  }