@eggjs/koa 3.1.0-beta.3 → 3.1.0-beta.4
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 +9 -9
- package/dist/response.d.ts +6 -6
- package/package.json +6 -5
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
|
|
10
|
+
import * as http0 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:
|
|
32
|
+
header: http0.IncomingHttpHeaders;
|
|
33
33
|
};
|
|
34
34
|
response: {
|
|
35
35
|
status: number;
|
|
36
36
|
message: string;
|
|
37
|
-
header:
|
|
37
|
+
header: http0.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:
|
|
56
|
+
header: http0.IncomingHttpHeaders;
|
|
57
57
|
};
|
|
58
58
|
response: {
|
|
59
59
|
status: number;
|
|
60
60
|
message: string;
|
|
61
|
-
header:
|
|
61
|
+
header: http0.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:
|
|
85
|
+
header: http0.IncomingHttpHeaders;
|
|
86
86
|
};
|
|
87
87
|
response: {
|
|
88
88
|
status: number;
|
|
89
89
|
message: string;
|
|
90
|
-
header:
|
|
90
|
+
header: http0.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():
|
|
195
|
-
get headers():
|
|
194
|
+
get header(): http0.IncomingHttpHeaders;
|
|
195
|
+
get headers(): http0.IncomingHttpHeaders;
|
|
196
196
|
get secure(): boolean;
|
|
197
197
|
get stale(): boolean;
|
|
198
198
|
get fresh(): boolean;
|
package/dist/response.d.ts
CHANGED
|
@@ -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
|
|
8
|
+
import * as http7 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():
|
|
27
|
+
get header(): http7.OutgoingHttpHeaders;
|
|
28
28
|
/**
|
|
29
29
|
* Return response header, alias as response.header
|
|
30
30
|
*/
|
|
31
|
-
get headers():
|
|
31
|
+
get headers(): http7.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:
|
|
210
|
+
header: http7.OutgoingHttpHeaders;
|
|
211
211
|
} | undefined;
|
|
212
212
|
[util.inspect.custom](): {
|
|
213
213
|
status: number;
|
|
214
214
|
message: string;
|
|
215
|
-
header:
|
|
215
|
+
header: http7.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:
|
|
223
|
+
header: http7.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
|
+
"version": "3.1.0-beta.4",
|
|
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": "^
|
|
45
|
+
"encodeurl": "^2.0.0",
|
|
46
46
|
"escape-html": "^1.0.3",
|
|
47
47
|
"fresh": "~0.5.2",
|
|
48
48
|
"gals": "1",
|
|
@@ -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.4"
|
|
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
|
}
|