@tsed/platform-http 8.24.1 → 8.25.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.
@@ -216,9 +216,9 @@ export class PlatformBuilder {
216
216
  this.#promise = this.#promise || this.runLifecycle();
217
217
  return this.#promise;
218
218
  }
219
- mapRouters() {
219
+ async mapRouters() {
220
220
  const layers = this.platform.getLayers();
221
- this.adapter.mapLayers(layers);
221
+ await this.adapter.mapLayers(layers);
222
222
  const rawBody = constant("rawBody") ||
223
223
  layers.some(({ handlers }) => {
224
224
  return handlers.some((handler) => handler.opts?.paramsTypes?.RAW_BODY);
@@ -1,3 +1,5 @@
1
1
  export function closeServer(server) {
2
- return new Promise((resolve) => server.close(() => resolve(undefined)));
2
+ if (server.close) {
3
+ return new Promise((resolve) => server.close(() => resolve(undefined)));
4
+ }
3
5
  }
@@ -20,7 +20,7 @@ export declare abstract class PlatformAdapter<App = TsED.Application> {
20
20
  /**
21
21
  * Map router layer to the targeted framework
22
22
  */
23
- abstract mapLayers(layer: PlatformLayer[]): void;
23
+ abstract mapLayers(layer: PlatformLayer[]): void | Promise<void>;
24
24
  /**
25
25
  * Map handler to the targeted framework
26
26
  */
@@ -1,4 +1,4 @@
1
1
  import type Http from "node:http";
2
2
  import type Https from "node:https";
3
3
  import type Http2 from "http2";
4
- export declare function closeServer(server: Http.Server | Https.Server | Http2.Http2Server): Promise<unknown>;
4
+ export declare function closeServer(server: Http.Server | Https.Server | Http2.Http2Server): Promise<unknown> | undefined;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/platform-http",
3
3
  "description": "A TypeScript Framework on top of Express",
4
4
  "type": "module",
5
- "version": "8.24.1",
5
+ "version": "8.25.0",
6
6
  "source": "./src/common/index.ts",
7
7
  "main": "./lib/esm/common/index.js",
8
8
  "module": "./lib/esm/common/index.js",
@@ -70,22 +70,22 @@
70
70
  }
71
71
  ],
72
72
  "dependencies": {
73
- "@tsed/core": "8.24.1",
74
- "@tsed/di": "8.24.1",
75
- "@tsed/exceptions": "8.24.1",
76
- "@tsed/hooks": "8.24.1",
77
- "@tsed/json-mapper": "8.24.1",
73
+ "@tsed/core": "8.25.0",
74
+ "@tsed/di": "8.25.0",
75
+ "@tsed/exceptions": "8.25.0",
76
+ "@tsed/hooks": "8.25.0",
77
+ "@tsed/json-mapper": "8.25.0",
78
78
  "@tsed/logger": "^8.0.0",
79
79
  "@tsed/logger-std": "^8.0.0",
80
- "@tsed/platform-accept-mimes": "8.24.1",
81
- "@tsed/platform-exceptions": "8.24.1",
82
- "@tsed/platform-middlewares": "8.24.1",
83
- "@tsed/platform-multer": "8.24.1",
84
- "@tsed/platform-params": "8.24.1",
85
- "@tsed/platform-response-filter": "8.24.1",
86
- "@tsed/platform-router": "8.24.1",
87
- "@tsed/platform-views": "8.24.1",
88
- "@tsed/schema": "8.24.1",
80
+ "@tsed/platform-accept-mimes": "8.25.0",
81
+ "@tsed/platform-exceptions": "8.25.0",
82
+ "@tsed/platform-middlewares": "8.25.0",
83
+ "@tsed/platform-multer": "8.25.0",
84
+ "@tsed/platform-params": "8.25.0",
85
+ "@tsed/platform-response-filter": "8.25.0",
86
+ "@tsed/platform-router": "8.25.0",
87
+ "@tsed/platform-views": "8.25.0",
88
+ "@tsed/schema": "8.25.0",
89
89
  "@types/json-schema": "7.0.15",
90
90
  "accepts": "^1.3.8",
91
91
  "encodeurl": "^2.0.0",
@@ -93,9 +93,9 @@
93
93
  "uuid": "10.0.0"
94
94
  },
95
95
  "devDependencies": {
96
- "@tsed/barrels": "8.24.1",
97
- "@tsed/engines": "8.24.1",
98
- "@tsed/typescript": "8.24.1",
96
+ "@tsed/barrels": "8.25.0",
97
+ "@tsed/engines": "8.25.0",
98
+ "@tsed/typescript": "8.25.0",
99
99
  "cross-env": "7.0.3",
100
100
  "eslint": "9.12.0",
101
101
  "typescript": "5.9.3",