@tsed/platform-koa 8.18.0 → 8.18.2
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.
|
@@ -4,6 +4,7 @@ import { PlatformResponse } from "@tsed/platform-http";
|
|
|
4
4
|
* @koa
|
|
5
5
|
*/
|
|
6
6
|
export class PlatformKoaResponse extends PlatformResponse {
|
|
7
|
+
#statusCode;
|
|
7
8
|
get ctx() {
|
|
8
9
|
return this.raw.ctx;
|
|
9
10
|
}
|
|
@@ -20,8 +21,7 @@ export class PlatformKoaResponse extends PlatformResponse {
|
|
|
20
21
|
return this.raw.res;
|
|
21
22
|
}
|
|
22
23
|
hasStatus() {
|
|
23
|
-
|
|
24
|
-
return this.statusCode !== 404;
|
|
24
|
+
return this.#statusCode !== undefined || this.statusCode !== 404;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Sets the HTTP status for the response.
|
|
@@ -30,6 +30,7 @@ export class PlatformKoaResponse extends PlatformResponse {
|
|
|
30
30
|
*/
|
|
31
31
|
status(status) {
|
|
32
32
|
this.raw.status = status;
|
|
33
|
+
this.#statusCode = status;
|
|
33
34
|
return this;
|
|
34
35
|
}
|
|
35
36
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/platform-koa",
|
|
3
3
|
"description": "Koa package for Ts.ED framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.18.
|
|
5
|
+
"version": "8.18.2",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"repository": "https://github.com/tsedio/tsed",
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@koa/cors": "5.0.0",
|
|
57
|
-
"@tsed/barrels": "8.18.
|
|
58
|
-
"@tsed/core": "8.18.
|
|
59
|
-
"@tsed/di": "8.18.
|
|
60
|
-
"@tsed/platform-http": "8.18.
|
|
61
|
-
"@tsed/platform-test-sdk": "8.18.
|
|
62
|
-
"@tsed/typescript": "8.18.
|
|
57
|
+
"@tsed/barrels": "8.18.2",
|
|
58
|
+
"@tsed/core": "8.18.2",
|
|
59
|
+
"@tsed/di": "8.18.2",
|
|
60
|
+
"@tsed/platform-http": "8.18.2",
|
|
61
|
+
"@tsed/platform-test-sdk": "8.18.2",
|
|
62
|
+
"@tsed/typescript": "8.18.2",
|
|
63
63
|
"@types/koa": "2.15.0",
|
|
64
64
|
"@types/koa-bodyparser": "4.3.12",
|
|
65
65
|
"@types/koa-compose": "3.2.8",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@types/koa-session": "6.4.5",
|
|
71
71
|
"@types/koa__router": "12.0.4",
|
|
72
72
|
"eslint": "9.12.0",
|
|
73
|
-
"koa": "3.0.
|
|
73
|
+
"koa": "3.0.3",
|
|
74
74
|
"koa-bodyparser": "4.4.1",
|
|
75
75
|
"koa-compress": "5.1.1",
|
|
76
76
|
"koa-override": "4.0.0",
|