@tsed/platform-http 8.38.1 → 8.38.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.
|
@@ -76,6 +76,17 @@ export class PlatformBuilder {
|
|
|
76
76
|
get injector() {
|
|
77
77
|
return injector();
|
|
78
78
|
}
|
|
79
|
+
static options(adapter, rootModule, settings) {
|
|
80
|
+
if (typeof rootModule !== "function") {
|
|
81
|
+
settings = rootModule;
|
|
82
|
+
rootModule = undefined;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
rootModule,
|
|
86
|
+
...settings,
|
|
87
|
+
adapter
|
|
88
|
+
};
|
|
89
|
+
}
|
|
79
90
|
static create(settings) {
|
|
80
91
|
return new PlatformBuilder({
|
|
81
92
|
httpsPort: false,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
-
import { InjectorService, ProviderOpts, TokenProvider } from "@tsed/di";
|
|
2
|
+
import { InjectorService, ProviderOpts, ProviderScope, TokenProvider } from "@tsed/di";
|
|
3
3
|
import { PlatformAdapter, PlatformBuilderSettings } from "../services/PlatformAdapter.js";
|
|
4
4
|
import { Platform } from "../services/Platform.js";
|
|
5
5
|
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
6
6
|
import { PlatformLayer } from "@tsed/platform-router";
|
|
7
|
-
import type {
|
|
7
|
+
import type { PlatformStaticsSettings } from "../config/PlatformStaticsSettings.js";
|
|
8
|
+
import { type Type } from "@tsed/core";
|
|
8
9
|
/**
|
|
9
10
|
* @platform
|
|
10
11
|
*/
|
|
@@ -43,6 +44,33 @@ export declare class PlatformBuilder<App = TsED.Application> {
|
|
|
43
44
|
* @deprecated use injector() instead of this method.
|
|
44
45
|
*/
|
|
45
46
|
get injector(): InjectorService;
|
|
47
|
+
static options<Adapter>(adapter: Type<PlatformAdapter<Adapter>>, rootModule: Type<any> | Partial<TsED.Configuration>, settings?: Partial<TsED.Configuration>): {
|
|
48
|
+
adapter: Type<PlatformAdapter<Adapter>>;
|
|
49
|
+
logger?: TsED.LoggerConfiguration;
|
|
50
|
+
scopes?: {
|
|
51
|
+
[key: string]: ProviderScope;
|
|
52
|
+
} | undefined;
|
|
53
|
+
lazyProviders?: boolean;
|
|
54
|
+
imports?: any[] | undefined;
|
|
55
|
+
mount?: Record<string, any[]> | undefined;
|
|
56
|
+
multer?: import("multer").Options;
|
|
57
|
+
middlewares?: any[] | undefined;
|
|
58
|
+
acceptMimes?: string[];
|
|
59
|
+
views?: import("@tsed/platform-views").PlatformViewsSettings | undefined;
|
|
60
|
+
responseFilters?: Type<import("@tsed/platform-response-filter").ResponseFilterMethods<unknown>>[] | undefined;
|
|
61
|
+
rootModule: Type;
|
|
62
|
+
rootDir?: string;
|
|
63
|
+
httpPort?: string | number | false;
|
|
64
|
+
httpsPort?: string | number | false;
|
|
65
|
+
jsonMapper?: import("@tsed/json-mapper").JsonMapperGlobalOptions;
|
|
66
|
+
router?: import("../index.js").PlatformRouterSettings;
|
|
67
|
+
statics?: PlatformStaticsSettings;
|
|
68
|
+
getBestHost?: typeof import("../index.js").getBestHost | undefined;
|
|
69
|
+
getHttpPort?: typeof import("../index.js").getHttpPort | undefined;
|
|
70
|
+
getHttpsPort?: typeof import("../index.js").getHttpsPort | undefined;
|
|
71
|
+
setHttpsPort?: typeof import("../index.js").setHttpsPort | undefined;
|
|
72
|
+
setHttpPort?: typeof import("../index.js").setHttpPort | undefined;
|
|
73
|
+
};
|
|
46
74
|
static create<App = TsED.Application>(settings?: PlatformBuilderSettings<App>): PlatformBuilder<App>;
|
|
47
75
|
/**
|
|
48
76
|
* Bootstrap a server application
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-http",
|
|
3
|
-
"version": "8.38.
|
|
3
|
+
"version": "8.38.4",
|
|
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.
|
|
74
|
-
"@tsed/di": "8.38.
|
|
75
|
-
"@tsed/exceptions": "8.38.
|
|
76
|
-
"@tsed/hooks": "8.38.
|
|
77
|
-
"@tsed/json-mapper": "8.38.
|
|
73
|
+
"@tsed/core": "8.38.4",
|
|
74
|
+
"@tsed/di": "8.38.4",
|
|
75
|
+
"@tsed/exceptions": "8.38.4",
|
|
76
|
+
"@tsed/hooks": "8.38.4",
|
|
77
|
+
"@tsed/json-mapper": "8.38.4",
|
|
78
78
|
"@tsed/logger": "^8.0.0",
|
|
79
79
|
"@tsed/logger-std": "^8.0.0",
|
|
80
|
-
"@tsed/platform-accept-mimes": "8.38.
|
|
81
|
-
"@tsed/platform-exceptions": "8.38.
|
|
82
|
-
"@tsed/platform-middlewares": "8.38.
|
|
83
|
-
"@tsed/platform-multer": "8.38.
|
|
84
|
-
"@tsed/platform-params": "8.38.
|
|
85
|
-
"@tsed/platform-response-filter": "8.38.
|
|
86
|
-
"@tsed/platform-router": "8.38.
|
|
87
|
-
"@tsed/platform-views": "8.38.
|
|
88
|
-
"@tsed/schema": "8.38.
|
|
80
|
+
"@tsed/platform-accept-mimes": "8.38.4",
|
|
81
|
+
"@tsed/platform-exceptions": "8.38.4",
|
|
82
|
+
"@tsed/platform-middlewares": "8.38.4",
|
|
83
|
+
"@tsed/platform-multer": "8.38.4",
|
|
84
|
+
"@tsed/platform-params": "8.38.4",
|
|
85
|
+
"@tsed/platform-response-filter": "8.38.4",
|
|
86
|
+
"@tsed/platform-router": "8.38.4",
|
|
87
|
+
"@tsed/platform-views": "8.38.4",
|
|
88
|
+
"@tsed/schema": "8.38.4",
|
|
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.
|
|
97
|
-
"@tsed/engines": "8.38.
|
|
98
|
-
"@tsed/typescript": "8.38.
|
|
96
|
+
"@tsed/barrels": "8.38.4",
|
|
97
|
+
"@tsed/engines": "8.38.4",
|
|
98
|
+
"@tsed/typescript": "8.38.4",
|
|
99
99
|
"cross-env": "7.0.3",
|
|
100
100
|
"typescript": "6.0.2",
|
|
101
101
|
"vitest": "4.1.4"
|