@tsed/platform-http 8.38.2 → 8.38.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.
@@ -3,7 +3,6 @@ import { colors, configuration, constant, createContainer, destroyInjector, inje
3
3
  import { PlatformAdapter } from "../services/PlatformAdapter.js";
4
4
  import { Platform } from "../services/Platform.js";
5
5
  import { PlatformApplication } from "../services/PlatformApplication.js";
6
- import { isClass } from "@tsed/core";
7
6
  import { application } from "../fn/application.js";
8
7
  import { closeServer } from "../utils/closeServer.js";
9
8
  import { createInjector } from "../utils/createInjector.js";
@@ -77,10 +76,14 @@ export class PlatformBuilder {
77
76
  get injector() {
78
77
  return injector();
79
78
  }
80
- static options(adapter, module, settings) {
79
+ static options(adapter, rootModule, settings) {
80
+ if (typeof rootModule !== "function") {
81
+ settings = rootModule;
82
+ rootModule = undefined;
83
+ }
81
84
  return {
82
- rootModule: settings ? module : undefined,
83
- ...(!isClass(module) && !settings ? module : settings),
85
+ rootModule,
86
+ ...settings,
84
87
  adapter
85
88
  };
86
89
  }
@@ -44,7 +44,7 @@ export declare class PlatformBuilder<App = TsED.Application> {
44
44
  * @deprecated use injector() instead of this method.
45
45
  */
46
46
  get injector(): InjectorService;
47
- static options<Adapter>(adapter: Type<PlatformAdapter<Adapter>>, module: Type<any> | Partial<TsED.Configuration>, settings?: Partial<TsED.Configuration>): {
47
+ static options<Adapter>(adapter: Type<PlatformAdapter<Adapter>>, rootModule: Type<any> | Partial<TsED.Configuration>, settings?: Partial<TsED.Configuration>): {
48
48
  adapter: Type<PlatformAdapter<Adapter>>;
49
49
  logger?: TsED.LoggerConfiguration;
50
50
  scopes?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-http",
3
- "version": "8.38.2",
3
+ "version": "8.38.5",
4
4
  "description": "A TypeScript Framework on top of Express",
5
5
  "keywords": [
6
6
  "Controller",
@@ -70,22 +70,22 @@
70
70
  "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
71
71
  },
72
72
  "dependencies": {
73
- "@tsed/core": "8.38.2",
74
- "@tsed/di": "8.38.2",
75
- "@tsed/exceptions": "8.38.2",
76
- "@tsed/hooks": "8.38.2",
77
- "@tsed/json-mapper": "8.38.2",
73
+ "@tsed/core": "8.38.5",
74
+ "@tsed/di": "8.38.5",
75
+ "@tsed/exceptions": "8.38.5",
76
+ "@tsed/hooks": "8.38.5",
77
+ "@tsed/json-mapper": "8.38.5",
78
78
  "@tsed/logger": "^8.0.0",
79
79
  "@tsed/logger-std": "^8.0.0",
80
- "@tsed/platform-accept-mimes": "8.38.2",
81
- "@tsed/platform-exceptions": "8.38.2",
82
- "@tsed/platform-middlewares": "8.38.2",
83
- "@tsed/platform-multer": "8.38.2",
84
- "@tsed/platform-params": "8.38.2",
85
- "@tsed/platform-response-filter": "8.38.2",
86
- "@tsed/platform-router": "8.38.2",
87
- "@tsed/platform-views": "8.38.2",
88
- "@tsed/schema": "8.38.2",
80
+ "@tsed/platform-accept-mimes": "8.38.5",
81
+ "@tsed/platform-exceptions": "8.38.5",
82
+ "@tsed/platform-middlewares": "8.38.5",
83
+ "@tsed/platform-multer": "8.38.5",
84
+ "@tsed/platform-params": "8.38.5",
85
+ "@tsed/platform-response-filter": "8.38.5",
86
+ "@tsed/platform-router": "8.38.5",
87
+ "@tsed/platform-views": "8.38.5",
88
+ "@tsed/schema": "8.38.5",
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": "14.0.0"
94
94
  },
95
95
  "devDependencies": {
96
- "@tsed/barrels": "8.38.2",
97
- "@tsed/engines": "8.38.2",
98
- "@tsed/typescript": "8.38.2",
96
+ "@tsed/barrels": "8.38.5",
97
+ "@tsed/engines": "8.38.5",
98
+ "@tsed/typescript": "8.38.5",
99
99
  "cross-env": "7.0.3",
100
100
  "typescript": "6.0.2",
101
101
  "vitest": "4.1.4"