@tsed/platform-http 8.0.0-rc.5 → 8.0.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.
- package/lib/esm/common/builder/PlatformBuilder.js +55 -51
- package/lib/esm/common/builder/PlatformBuilder.js.map +1 -1
- package/lib/esm/common/builder/__fixtures__/PlatformCustom.js +35 -0
- package/lib/esm/common/builder/__fixtures__/PlatformCustom.js.map +1 -0
- package/lib/esm/common/decorators/PlatformProvider.js +6 -2
- package/lib/esm/common/decorators/PlatformProvider.js.map +1 -1
- package/lib/esm/common/domain/PlatformContext.js +5 -4
- package/lib/esm/common/domain/PlatformContext.js.map +1 -1
- package/lib/esm/common/fn/adapter.js +15 -0
- package/lib/esm/common/fn/adapter.js.map +1 -0
- package/lib/esm/common/fn/application.js +9 -0
- package/lib/esm/common/fn/application.js.map +1 -0
- package/lib/esm/common/index.js +4 -1
- package/lib/esm/common/index.js.map +1 -1
- package/lib/esm/common/middlewares/PlatformAcceptMimesMiddleware.js +7 -14
- package/lib/esm/common/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
- package/lib/esm/common/middlewares/PlatformMulterMiddleware.js +9 -22
- package/lib/esm/common/middlewares/PlatformMulterMiddleware.js.map +1 -1
- package/lib/esm/common/services/Platform.js +13 -25
- package/lib/esm/common/services/Platform.js.map +1 -1
- package/lib/esm/common/services/PlatformAdapter.js +15 -56
- package/lib/esm/common/services/PlatformAdapter.js.map +1 -1
- package/lib/esm/common/services/PlatformApplication.js +8 -18
- package/lib/esm/common/services/PlatformApplication.js.map +1 -1
- package/lib/esm/common/services/PlatformHandler.js +12 -34
- package/lib/esm/common/services/PlatformHandler.js.map +1 -1
- package/lib/esm/common/services/PlatformMiddlewaresChain.js +8 -20
- package/lib/esm/common/services/PlatformMiddlewaresChain.js.map +1 -1
- package/lib/esm/common/services/PlatformRequest.js +4 -10
- package/lib/esm/common/services/PlatformRequest.js.map +1 -1
- package/lib/esm/common/services/PlatformResponse.js +4 -10
- package/lib/esm/common/services/PlatformResponse.js.map +1 -1
- package/lib/esm/common/utils/createContext.js +5 -5
- package/lib/esm/common/utils/createContext.js.map +1 -1
- package/lib/esm/common/utils/createHttpServer.js +5 -5
- package/lib/esm/common/utils/createHttpServer.js.map +1 -1
- package/lib/esm/common/utils/createHttpsServer.js +5 -5
- package/lib/esm/common/utils/createHttpsServer.js.map +1 -1
- package/lib/esm/common/utils/createInjector.js +18 -17
- package/lib/esm/common/utils/createInjector.js.map +1 -1
- package/lib/esm/common/utils/createServer.js +7 -8
- package/lib/esm/common/utils/createServer.js.map +1 -1
- package/lib/esm/common/utils/resolveControllers.js +48 -0
- package/lib/esm/common/utils/resolveControllers.js.map +1 -0
- package/lib/esm/testing/FakeAdapter.js +51 -1
- package/lib/esm/testing/FakeAdapter.js.map +1 -1
- package/lib/esm/testing/PlatformTest.js +12 -13
- package/lib/esm/testing/PlatformTest.js.map +1 -1
- package/lib/types/common/builder/PlatformBuilder.d.ts +12 -10
- package/lib/types/common/builder/__fixtures__/PlatformCustom.d.ts +17 -0
- package/lib/types/common/decorators/PlatformProvider.d.ts +4 -0
- package/lib/types/common/fn/adapter.d.ts +6 -0
- package/lib/types/common/fn/application.d.ts +6 -0
- package/lib/types/common/index.d.ts +4 -1
- package/lib/types/common/middlewares/PlatformMulterMiddleware.d.ts +2 -3
- package/lib/types/common/services/Platform.d.ts +3 -6
- package/lib/types/common/services/PlatformAdapter.d.ts +4 -33
- package/lib/types/common/services/PlatformApplication.d.ts +1 -3
- package/lib/types/common/services/PlatformHandler.d.ts +3 -3
- package/lib/types/common/services/PlatformMiddlewaresChain.d.ts +1 -3
- package/lib/types/common/utils/createContext.d.ts +1 -3
- package/lib/types/common/utils/createHttpServer.d.ts +1 -2
- package/lib/types/common/utils/createHttpsServer.d.ts +1 -2
- package/lib/types/common/utils/createInjector.d.ts +1 -8
- package/lib/types/common/utils/createServer.d.ts +3 -3
- package/lib/types/common/utils/resolveControllers.d.ts +8 -0
- package/lib/types/testing/FakeAdapter.d.ts +29 -1
- package/lib/types/testing/PlatformTest.d.ts +1 -3
- package/package.json +16 -18
- package/vitest.config.mts +9 -5
- package/lib/esm/common/utils/registerPlatformAdapter.js +0 -7
- package/lib/esm/common/utils/registerPlatformAdapter.js.map +0 -1
- package/lib/types/common/utils/registerPlatformAdapter.d.ts +0 -3
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import { Type } from "@tsed/core";
|
|
3
2
|
import { DITest, InjectorService } from "@tsed/di";
|
|
4
3
|
import type { IncomingMessage, RequestListener, ServerResponse } from "http";
|
|
5
4
|
import { PlatformContext, PlatformContextOptions } from "../common/domain/PlatformContext.js";
|
|
6
|
-
import {
|
|
5
|
+
import { PlatformBuilderSettings } from "../common/services/PlatformAdapter.js";
|
|
7
6
|
/**
|
|
8
7
|
* @platform
|
|
9
8
|
*/
|
|
10
9
|
export declare class PlatformTest extends DITest {
|
|
11
|
-
static adapter: Type<PlatformAdapter>;
|
|
12
10
|
static create(settings?: Partial<TsED.Configuration>): Promise<void>;
|
|
13
11
|
/**
|
|
14
12
|
* Create a new injector with the right default services
|
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.0.0
|
|
5
|
+
"version": "8.0.0",
|
|
6
6
|
"source": "./src/common/index.ts",
|
|
7
7
|
"main": "./lib/esm/common/index.js",
|
|
8
8
|
"module": "./lib/esm/common/index.js",
|
|
@@ -68,28 +68,29 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tsed/core": "8.0.0
|
|
72
|
-
"@tsed/di": "8.0.0
|
|
73
|
-
"@tsed/exceptions": "8.0.0
|
|
74
|
-
"@tsed/
|
|
71
|
+
"@tsed/core": "8.0.0",
|
|
72
|
+
"@tsed/di": "8.0.0",
|
|
73
|
+
"@tsed/exceptions": "8.0.0",
|
|
74
|
+
"@tsed/hooks": "8.0.0",
|
|
75
|
+
"@tsed/json-mapper": "8.0.0",
|
|
75
76
|
"@tsed/logger": "^6.7.8",
|
|
76
77
|
"@tsed/logger-file": "^6.7.8",
|
|
77
|
-
"@tsed/platform-exceptions": "8.0.0
|
|
78
|
-
"@tsed/platform-middlewares": "8.0.0
|
|
79
|
-
"@tsed/platform-params": "8.0.0
|
|
80
|
-
"@tsed/platform-response-filter": "8.0.0
|
|
81
|
-
"@tsed/platform-router": "8.0.0
|
|
82
|
-
"@tsed/platform-views": "8.0.0
|
|
83
|
-
"@tsed/schema": "8.0.0
|
|
78
|
+
"@tsed/platform-exceptions": "8.0.0",
|
|
79
|
+
"@tsed/platform-middlewares": "8.0.0",
|
|
80
|
+
"@tsed/platform-params": "8.0.0",
|
|
81
|
+
"@tsed/platform-response-filter": "8.0.0",
|
|
82
|
+
"@tsed/platform-router": "8.0.0",
|
|
83
|
+
"@tsed/platform-views": "8.0.0",
|
|
84
|
+
"@tsed/schema": "8.0.0",
|
|
84
85
|
"@types/json-schema": "7.0.15",
|
|
85
86
|
"accepts": "^1.3.8",
|
|
86
87
|
"tslib": "2.7.0",
|
|
87
88
|
"uuid": "10.0.0"
|
|
88
89
|
},
|
|
89
90
|
"devDependencies": {
|
|
90
|
-
"@tsed/barrels": "8.0.0
|
|
91
|
-
"@tsed/engines": "8.0.0
|
|
92
|
-
"@tsed/typescript": "8.0.0
|
|
91
|
+
"@tsed/barrels": "8.0.0",
|
|
92
|
+
"@tsed/engines": "8.0.0",
|
|
93
|
+
"@tsed/typescript": "8.0.0",
|
|
93
94
|
"cross-env": "7.0.3",
|
|
94
95
|
"eslint": "9.12.0",
|
|
95
96
|
"typescript": "5.4.5",
|
|
@@ -105,8 +106,5 @@
|
|
|
105
106
|
"@tsed/logger-file": {
|
|
106
107
|
"optional": false
|
|
107
108
|
}
|
|
108
|
-
},
|
|
109
|
-
"publishConfig": {
|
|
110
|
-
"tag": "rc"
|
|
111
109
|
}
|
|
112
110
|
}
|
package/vitest.config.mts
CHANGED
|
@@ -9,13 +9,17 @@ export default defineConfig(
|
|
|
9
9
|
...presets.test,
|
|
10
10
|
coverage: {
|
|
11
11
|
...presets.test.coverage,
|
|
12
|
+
exclude:[
|
|
13
|
+
...presets.test.coverage.exclude ||[],
|
|
14
|
+
"**/Fake*"
|
|
15
|
+
],
|
|
12
16
|
thresholds: {
|
|
13
|
-
statements:
|
|
14
|
-
branches:
|
|
15
|
-
functions:
|
|
16
|
-
lines:
|
|
17
|
+
statements: 96.88,
|
|
18
|
+
branches: 95.5,
|
|
19
|
+
functions: 94.11,
|
|
20
|
+
lines: 96.88
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
|
-
);
|
|
25
|
+
);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PlatformTest } from "../../testing/PlatformTest.js";
|
|
2
|
-
import { PlatformBuilder } from "../builder/PlatformBuilder.js";
|
|
3
|
-
export function registerPlatformAdapter(adapter) {
|
|
4
|
-
PlatformTest.adapter = adapter;
|
|
5
|
-
PlatformBuilder.adapter = adapter;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=registerPlatformAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerPlatformAdapter.js","sourceRoot":"","sources":["../../../../src/common/utils/registerPlatformAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAG9D,MAAM,UAAU,uBAAuB,CAAC,OAAmC;IACzE,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;AACpC,CAAC"}
|