@tsed/common 7.0.0-beta.2 → 7.0.0-beta.20
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/coverage.json +6 -0
- package/jest.config.js +9 -0
- package/lib/cjs/builder/PlatformBuilder.js +94 -65
- package/lib/cjs/builder/PlatformBuilder.js.map +1 -1
- package/lib/cjs/config/interfaces/PlatformLoggerSettings.js.map +1 -1
- package/lib/cjs/config/interfaces/PlatformMulterSettings.js.map +1 -1
- package/lib/cjs/config/services/PlatformConfiguration.js +2 -66
- package/lib/cjs/config/services/PlatformConfiguration.js.map +1 -1
- package/lib/cjs/decorators/multer/multipartFile.js.map +1 -1
- package/lib/cjs/decorators/params/error.js +1 -1
- package/lib/cjs/decorators/params/error.js.map +1 -1
- package/lib/cjs/domain/AnyToPromiseWithCtx.js +4 -5
- package/lib/cjs/domain/AnyToPromiseWithCtx.js.map +1 -1
- package/lib/cjs/domain/EndpointMetadata.js +2 -66
- package/lib/cjs/domain/EndpointMetadata.js.map +1 -1
- package/lib/cjs/domain/PlatformContext.js +46 -38
- package/lib/cjs/domain/PlatformContext.js.map +1 -1
- package/lib/cjs/domain/PlatformRouteDetails.js +0 -21
- package/lib/cjs/domain/PlatformRouteDetails.js.map +1 -1
- package/lib/cjs/exports.js +32 -0
- package/lib/cjs/exports.js.map +1 -0
- package/lib/cjs/index.js +58 -30
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/PlatformRouteOptions.js.map +1 -1
- package/lib/cjs/interfaces/Route.js.map +1 -1
- package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js +10 -9
- package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
- package/lib/cjs/middlewares/PlatformMulterMiddleware.js +27 -13
- package/lib/cjs/middlewares/PlatformMulterMiddleware.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/services/FakeAdapter.js +49 -0
- package/lib/cjs/services/FakeAdapter.js.map +1 -0
- package/lib/cjs/services/Platform.js +33 -68
- package/lib/cjs/services/Platform.js.map +1 -1
- package/lib/cjs/services/PlatformAdapter.js +24 -0
- package/lib/cjs/services/PlatformAdapter.js.map +1 -0
- package/lib/cjs/services/PlatformApplication.js +26 -14
- package/lib/cjs/services/PlatformApplication.js.map +1 -1
- package/lib/cjs/services/PlatformHandler.js +115 -172
- package/lib/cjs/services/PlatformHandler.js.map +1 -1
- package/lib/cjs/services/PlatformMiddlewaresChain.js +46 -19
- package/lib/cjs/services/PlatformMiddlewaresChain.js.map +1 -1
- package/lib/cjs/services/PlatformRequest.js +17 -13
- package/lib/cjs/services/PlatformRequest.js.map +1 -1
- package/lib/cjs/services/PlatformResponse.js +20 -23
- package/lib/cjs/services/PlatformResponse.js.map +1 -1
- package/lib/cjs/services/PlatformTest.js +31 -10
- package/lib/cjs/services/PlatformTest.js.map +1 -1
- package/lib/cjs/utils/createContext.js +32 -21
- package/lib/cjs/utils/createContext.js.map +1 -1
- package/lib/cjs/utils/createHttpServer.js +6 -11
- package/lib/cjs/utils/createHttpServer.js.map +1 -1
- package/lib/cjs/utils/createHttpsServer.js +6 -11
- package/lib/cjs/utils/createHttpsServer.js.map +1 -1
- package/lib/cjs/utils/createInjector.js +16 -10
- package/lib/cjs/utils/createInjector.js.map +1 -1
- package/lib/cjs/utils/ensureContext.js +16 -0
- package/lib/cjs/utils/ensureContext.js.map +1 -0
- package/lib/cjs/utils/getConfiguration.js +6 -12
- package/lib/cjs/utils/getConfiguration.js.map +1 -1
- package/lib/cjs/utils/printRoutes.js +10 -8
- package/lib/cjs/utils/printRoutes.js.map +1 -1
- package/lib/cjs/utils/setResponseHeaders.js +8 -14
- package/lib/cjs/utils/setResponseHeaders.js.map +1 -1
- package/lib/esm/builder/PlatformBuilder.js +74 -68
- package/lib/esm/builder/PlatformBuilder.js.map +1 -1
- package/lib/esm/config/interfaces/PlatformLoggerSettings.js.map +1 -1
- package/lib/esm/config/interfaces/PlatformMulterSettings.js.map +1 -1
- package/lib/esm/config/services/PlatformConfiguration.js +0 -64
- package/lib/esm/config/services/PlatformConfiguration.js.map +1 -1
- package/lib/esm/decorators/multer/multerFileSize.js +1 -1
- package/lib/esm/decorators/multer/multerOptions.js +1 -1
- package/lib/esm/decorators/multer/multipartFile.js +1 -1
- package/lib/esm/decorators/multer/multipartFile.js.map +1 -1
- package/lib/esm/decorators/params/error.js +1 -1
- package/lib/esm/decorators/params/error.js.map +1 -1
- package/lib/esm/domain/AnyToPromiseWithCtx.js +4 -5
- package/lib/esm/domain/AnyToPromiseWithCtx.js.map +1 -1
- package/lib/esm/domain/EndpointMetadata.js +1 -66
- package/lib/esm/domain/EndpointMetadata.js.map +1 -1
- package/lib/esm/domain/PlatformContext.js +49 -41
- package/lib/esm/domain/PlatformContext.js.map +1 -1
- package/lib/esm/domain/PlatformRouteDetails.js +1 -19
- package/lib/esm/domain/PlatformRouteDetails.js.map +1 -1
- package/lib/esm/exports.js +14 -0
- package/lib/esm/exports.js.map +1 -0
- package/lib/esm/index.js +58 -27
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/PlatformRouteOptions.js.map +1 -1
- package/lib/esm/interfaces/Route.js.map +1 -1
- package/lib/esm/middlewares/PlatformAcceptMimesMiddleware.js +2 -1
- package/lib/esm/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
- package/lib/esm/middlewares/PlatformMulterMiddleware.js +18 -5
- package/lib/esm/middlewares/PlatformMulterMiddleware.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/FakeAdapter.js +45 -0
- package/lib/esm/services/FakeAdapter.js.map +1 -0
- package/lib/esm/services/Platform.js +34 -69
- package/lib/esm/services/Platform.js.map +1 -1
- package/lib/esm/services/PlatformAdapter.js +20 -0
- package/lib/esm/services/PlatformAdapter.js.map +1 -0
- package/lib/esm/services/PlatformApplication.js +27 -15
- package/lib/esm/services/PlatformApplication.js.map +1 -1
- package/lib/esm/services/PlatformHandler.js +116 -173
- package/lib/esm/services/PlatformHandler.js.map +1 -1
- package/lib/esm/services/PlatformMiddlewaresChain.js +49 -22
- package/lib/esm/services/PlatformMiddlewaresChain.js.map +1 -1
- package/lib/esm/services/PlatformRequest.js +16 -12
- package/lib/esm/services/PlatformRequest.js.map +1 -1
- package/lib/esm/services/PlatformResponse.js +19 -22
- package/lib/esm/services/PlatformResponse.js.map +1 -1
- package/lib/esm/services/PlatformTest.js +34 -14
- package/lib/esm/services/PlatformTest.js.map +1 -1
- package/lib/esm/utils/createContext.js +33 -23
- package/lib/esm/utils/createContext.js.map +1 -1
- package/lib/esm/utils/createHttpServer.js +6 -11
- package/lib/esm/utils/createHttpServer.js.map +1 -1
- package/lib/esm/utils/createHttpsServer.js +6 -11
- package/lib/esm/utils/createHttpsServer.js.map +1 -1
- package/lib/esm/utils/createInjector.js +20 -14
- package/lib/esm/utils/createInjector.js.map +1 -1
- package/lib/esm/utils/ensureContext.js +12 -0
- package/lib/esm/utils/ensureContext.js.map +1 -0
- package/lib/esm/utils/getConfiguration.js +8 -14
- package/lib/esm/utils/getConfiguration.js.map +1 -1
- package/lib/esm/utils/printRoutes.js +10 -8
- package/lib/esm/utils/printRoutes.js.map +1 -1
- package/lib/esm/utils/setResponseHeaders.js +8 -14
- package/lib/esm/utils/setResponseHeaders.js.map +1 -1
- package/lib/types/builder/PlatformBuilder.d.ts +19 -17
- package/lib/types/config/interfaces/PlatformLoggerSettings.d.ts +2 -43
- package/lib/types/config/interfaces/PlatformMulterSettings.d.ts +6 -130
- package/lib/types/config/services/PlatformConfiguration.d.ts +6 -21
- package/lib/types/domain/AnyToPromiseWithCtx.d.ts +1 -9
- package/lib/types/domain/EndpointMetadata.d.ts +1 -50
- package/lib/types/domain/PlatformContext.d.ts +32 -18
- package/lib/types/domain/PlatformRouteDetails.d.ts +4 -20
- package/lib/types/exports.d.ts +13 -0
- package/lib/types/index.d.ts +56 -18
- package/lib/types/interfaces/PlatformRouteOptions.d.ts +1 -2
- package/lib/types/interfaces/Route.d.ts +2 -3
- package/lib/types/middlewares/PlatformMulterMiddleware.d.ts +8 -3
- package/lib/types/services/FakeAdapter.d.ts +31 -0
- package/lib/types/services/Platform.d.ts +9 -21
- package/lib/types/services/PlatformAdapter.d.ts +58 -0
- package/lib/types/services/PlatformApplication.d.ts +15 -7
- package/lib/types/services/PlatformHandler.d.ts +21 -59
- package/lib/types/services/PlatformMiddlewaresChain.d.ts +6 -3
- package/lib/types/services/PlatformRequest.d.ts +8 -10
- package/lib/types/services/PlatformResponse.d.ts +15 -19
- package/lib/types/services/PlatformTest.d.ts +5 -4
- package/lib/types/utils/createContext.d.ts +4 -1
- package/lib/types/utils/createHttpServer.d.ts +1 -1
- package/lib/types/utils/createHttpsServer.d.ts +3 -1
- package/lib/types/utils/createInjector.d.ts +5 -3
- package/lib/types/utils/ensureContext.d.ts +2 -0
- package/lib/types/utils/listenServer.d.ts +2 -0
- package/package.json +43 -26
- package/readme.md +52 -58
- package/tsconfig.compile.esm.json +2 -12
- package/lib/cjs/builder/PlatformControllerBuilder.js +0 -85
- package/lib/cjs/builder/PlatformControllerBuilder.js.map +0 -1
- package/lib/cjs/config/index.js +0 -7
- package/lib/cjs/config/index.js.map +0 -1
- package/lib/cjs/config/interfaces/EndpointDirectoriesSettings.js +0 -3
- package/lib/cjs/config/interfaces/EndpointDirectoriesSettings.js.map +0 -1
- package/lib/cjs/config/interfaces/index.js +0 -8
- package/lib/cjs/config/interfaces/index.js.map +0 -1
- package/lib/cjs/decorators/httpServer.js +0 -32
- package/lib/cjs/decorators/httpServer.js.map +0 -1
- package/lib/cjs/decorators/httpsServer.js +0 -32
- package/lib/cjs/decorators/httpsServer.js.map +0 -1
- package/lib/cjs/decorators/index.js +0 -21
- package/lib/cjs/decorators/index.js.map +0 -1
- package/lib/cjs/decorators/method/acceptMime.js +0 -28
- package/lib/cjs/decorators/method/acceptMime.js.map +0 -1
- package/lib/cjs/decorators/method/endpointFn.js +0 -15
- package/lib/cjs/decorators/method/endpointFn.js.map +0 -1
- package/lib/cjs/decorators/method/location.js +0 -6
- package/lib/cjs/decorators/method/location.js.map +0 -1
- package/lib/cjs/decorators/method/redirect.js +0 -6
- package/lib/cjs/decorators/method/redirect.js.map +0 -1
- package/lib/cjs/decorators/method/route.js +0 -13
- package/lib/cjs/decorators/method/route.js.map +0 -1
- package/lib/cjs/decorators/method/view.js +0 -34
- package/lib/cjs/decorators/method/view.js.map +0 -1
- package/lib/cjs/decorators/multer/index.js +0 -7
- package/lib/cjs/decorators/multer/index.js.map +0 -1
- package/lib/cjs/domain/ControllerProvider.js +0 -51
- package/lib/cjs/domain/ControllerProvider.js.map +0 -1
- package/lib/cjs/domain/HandlerMetadata.js +0 -57
- package/lib/cjs/domain/HandlerMetadata.js.map +0 -1
- package/lib/cjs/domain/index.js +0 -10
- package/lib/cjs/domain/index.js.map +0 -1
- package/lib/cjs/interfaces/PathType.js +0 -3
- package/lib/cjs/interfaces/PathType.js.map +0 -1
- package/lib/cjs/interfaces/PlatformAdapter.js +0 -3
- package/lib/cjs/interfaces/PlatformAdapter.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -21
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/middlewares/__mock__/FakeCtrl.js +0 -12
- package/lib/cjs/middlewares/__mock__/FakeCtrl.js.map +0 -1
- package/lib/cjs/middlewares/bindEndpointMiddleware.js +0 -13
- package/lib/cjs/middlewares/bindEndpointMiddleware.js.map +0 -1
- package/lib/cjs/middlewares/index.js +0 -7
- package/lib/cjs/middlewares/index.js.map +0 -1
- package/lib/cjs/services/FakeRawDriver.js +0 -26
- package/lib/cjs/services/FakeRawDriver.js.map +0 -1
- package/lib/cjs/services/PlatformRouter.js +0 -126
- package/lib/cjs/services/PlatformRouter.js.map +0 -1
- package/lib/cjs/services/index.js +0 -12
- package/lib/cjs/services/index.js.map +0 -1
- package/lib/cjs/utils/createHandlerMetadata.js +0 -49
- package/lib/cjs/utils/createHandlerMetadata.js.map +0 -1
- package/lib/cjs/utils/index.js +0 -11
- package/lib/cjs/utils/index.js.map +0 -1
- package/lib/cjs/utils/useCtxHandler.js +0 -15
- package/lib/cjs/utils/useCtxHandler.js.map +0 -1
- package/lib/esm/builder/PlatformControllerBuilder.js +0 -79
- package/lib/esm/builder/PlatformControllerBuilder.js.map +0 -1
- package/lib/esm/config/index.js +0 -4
- package/lib/esm/config/index.js.map +0 -1
- package/lib/esm/config/interfaces/EndpointDirectoriesSettings.js +0 -2
- package/lib/esm/config/interfaces/EndpointDirectoriesSettings.js.map +0 -1
- package/lib/esm/config/interfaces/index.js +0 -5
- package/lib/esm/config/interfaces/index.js.map +0 -1
- package/lib/esm/decorators/httpServer.js +0 -28
- package/lib/esm/decorators/httpServer.js.map +0 -1
- package/lib/esm/decorators/httpsServer.js +0 -28
- package/lib/esm/decorators/httpsServer.js.map +0 -1
- package/lib/esm/decorators/index.js +0 -18
- package/lib/esm/decorators/index.js.map +0 -1
- package/lib/esm/decorators/method/acceptMime.js +0 -24
- package/lib/esm/decorators/method/acceptMime.js.map +0 -1
- package/lib/esm/decorators/method/endpointFn.js +0 -11
- package/lib/esm/decorators/method/endpointFn.js.map +0 -1
- package/lib/esm/decorators/method/location.js +0 -2
- package/lib/esm/decorators/method/location.js.map +0 -1
- package/lib/esm/decorators/method/redirect.js +0 -2
- package/lib/esm/decorators/method/redirect.js.map +0 -1
- package/lib/esm/decorators/method/route.js +0 -2
- package/lib/esm/decorators/method/route.js.map +0 -1
- package/lib/esm/decorators/method/view.js +0 -30
- package/lib/esm/decorators/method/view.js.map +0 -1
- package/lib/esm/decorators/multer/index.js +0 -4
- package/lib/esm/decorators/multer/index.js.map +0 -1
- package/lib/esm/domain/ControllerProvider.js +0 -47
- package/lib/esm/domain/ControllerProvider.js.map +0 -1
- package/lib/esm/domain/HandlerMetadata.js +0 -53
- package/lib/esm/domain/HandlerMetadata.js.map +0 -1
- package/lib/esm/domain/index.js +0 -7
- package/lib/esm/domain/index.js.map +0 -1
- package/lib/esm/interfaces/PathType.js +0 -2
- package/lib/esm/interfaces/PathType.js.map +0 -1
- package/lib/esm/interfaces/PlatformAdapter.js +0 -2
- package/lib/esm/interfaces/PlatformAdapter.js.map +0 -1
- package/lib/esm/interfaces/index.js +0 -18
- package/lib/esm/interfaces/index.js.map +0 -1
- package/lib/esm/middlewares/__mock__/FakeCtrl.js +0 -9
- package/lib/esm/middlewares/__mock__/FakeCtrl.js.map +0 -1
- package/lib/esm/middlewares/bindEndpointMiddleware.js +0 -9
- package/lib/esm/middlewares/bindEndpointMiddleware.js.map +0 -1
- package/lib/esm/middlewares/index.js +0 -4
- package/lib/esm/middlewares/index.js.map +0 -1
- package/lib/esm/services/FakeRawDriver.js +0 -22
- package/lib/esm/services/FakeRawDriver.js.map +0 -1
- package/lib/esm/services/PlatformRouter.js +0 -123
- package/lib/esm/services/PlatformRouter.js.map +0 -1
- package/lib/esm/services/index.js +0 -9
- package/lib/esm/services/index.js.map +0 -1
- package/lib/esm/utils/createHandlerMetadata.js +0 -45
- package/lib/esm/utils/createHandlerMetadata.js.map +0 -1
- package/lib/esm/utils/index.js +0 -8
- package/lib/esm/utils/index.js.map +0 -1
- package/lib/esm/utils/useCtxHandler.js +0 -11
- package/lib/esm/utils/useCtxHandler.js.map +0 -1
- package/lib/types/builder/PlatformControllerBuilder.d.ts +0 -17
- package/lib/types/config/index.d.ts +0 -3
- package/lib/types/config/interfaces/EndpointDirectoriesSettings.d.ts +0 -3
- package/lib/types/config/interfaces/index.d.ts +0 -97
- package/lib/types/decorators/httpServer.d.ts +0 -28
- package/lib/types/decorators/httpsServer.d.ts +0 -28
- package/lib/types/decorators/index.d.ts +0 -14
- package/lib/types/decorators/method/acceptMime.d.ts +0 -19
- package/lib/types/decorators/method/endpointFn.d.ts +0 -9
- package/lib/types/decorators/method/location.d.ts +0 -1
- package/lib/types/decorators/method/redirect.d.ts +0 -1
- package/lib/types/decorators/method/route.d.ts +0 -1
- package/lib/types/decorators/method/view.d.ts +0 -25
- package/lib/types/decorators/multer/index.d.ts +0 -3
- package/lib/types/domain/ControllerProvider.d.ts +0 -24
- package/lib/types/domain/HandlerMetadata.d.ts +0 -32
- package/lib/types/domain/index.d.ts +0 -6
- package/lib/types/interfaces/PathType.d.ts +0 -1
- package/lib/types/interfaces/PlatformAdapter.d.ts +0 -19
- package/lib/types/interfaces/index.d.ts +0 -17
- package/lib/types/middlewares/__mock__/FakeCtrl.d.ts +0 -2
- package/lib/types/middlewares/bindEndpointMiddleware.d.ts +0 -5
- package/lib/types/middlewares/index.d.ts +0 -3
- package/lib/types/services/FakeRawDriver.d.ts +0 -15
- package/lib/types/services/PlatformRouter.d.ts +0 -48
- package/lib/types/services/index.d.ts +0 -8
- package/lib/types/utils/createHandlerMetadata.d.ts +0 -8
- package/lib/types/utils/index.d.ts +0 -7
- package/lib/types/utils/useCtxHandler.d.ts +0 -13
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { getHostInfoFromPort } from "@tsed/core";
|
|
3
3
|
import { DIConfiguration, Injectable, ProviderScope } from "@tsed/di";
|
|
4
|
-
import { $log } from "@tsed/logger";
|
|
5
4
|
const rootDir = process.cwd();
|
|
6
5
|
/**
|
|
7
6
|
* `PlatformConfiguration` contains all information about your Server configuration.
|
|
@@ -10,18 +9,6 @@ let PlatformConfiguration = class PlatformConfiguration extends DIConfiguration
|
|
|
10
9
|
constructor() {
|
|
11
10
|
super({ rootDir });
|
|
12
11
|
}
|
|
13
|
-
get version() {
|
|
14
|
-
return this.getRaw("version");
|
|
15
|
-
}
|
|
16
|
-
set version(v) {
|
|
17
|
-
this.setRaw("version", v);
|
|
18
|
-
}
|
|
19
|
-
get rootDir() {
|
|
20
|
-
return this.getRaw("rootDir");
|
|
21
|
-
}
|
|
22
|
-
set rootDir(value) {
|
|
23
|
-
this.setRaw("rootDir", value);
|
|
24
|
-
}
|
|
25
12
|
get port() {
|
|
26
13
|
return this.httpPort;
|
|
27
14
|
}
|
|
@@ -46,24 +33,12 @@ let PlatformConfiguration = class PlatformConfiguration extends DIConfiguration
|
|
|
46
33
|
set httpsPort(value) {
|
|
47
34
|
this.setRaw("httpsPort", value);
|
|
48
35
|
}
|
|
49
|
-
get env() {
|
|
50
|
-
return this.getRaw("env");
|
|
51
|
-
}
|
|
52
|
-
set env(value) {
|
|
53
|
-
this.setRaw("env", value);
|
|
54
|
-
}
|
|
55
36
|
get mount() {
|
|
56
37
|
return this.get("mount");
|
|
57
38
|
}
|
|
58
39
|
set mount(value) {
|
|
59
40
|
this.setRaw("mount", value);
|
|
60
41
|
}
|
|
61
|
-
get componentsScan() {
|
|
62
|
-
return this.resolve(this.getRaw("componentsScan"));
|
|
63
|
-
}
|
|
64
|
-
set componentsScan(value) {
|
|
65
|
-
this.setRaw("componentsScan", value);
|
|
66
|
-
}
|
|
67
42
|
get statics() {
|
|
68
43
|
return this.getRaw("statics") || this.getRaw("serveStatic") || {};
|
|
69
44
|
}
|
|
@@ -76,51 +51,12 @@ let PlatformConfiguration = class PlatformConfiguration extends DIConfiguration
|
|
|
76
51
|
set acceptMimes(value) {
|
|
77
52
|
this.setRaw("acceptMimes", value || []);
|
|
78
53
|
}
|
|
79
|
-
get debug() {
|
|
80
|
-
return this.logger.level === "debug";
|
|
81
|
-
}
|
|
82
|
-
set debug(debug) {
|
|
83
|
-
this.logger = { ...this.logger, level: debug ? "debug" : "info" };
|
|
84
|
-
}
|
|
85
54
|
get converter() {
|
|
86
55
|
return this.get("converter") || {};
|
|
87
56
|
}
|
|
88
57
|
set converter(options) {
|
|
89
58
|
this.setRaw("converter", options);
|
|
90
59
|
}
|
|
91
|
-
get logger() {
|
|
92
|
-
return this.get("logger");
|
|
93
|
-
}
|
|
94
|
-
set logger(value) {
|
|
95
|
-
const logger = { ...this.logger, ...value };
|
|
96
|
-
logger.debug = logger.level === "debug";
|
|
97
|
-
this.setRaw("logger", logger);
|
|
98
|
-
this.setRaw("debug", logger.debug);
|
|
99
|
-
if (logger.format) {
|
|
100
|
-
$log.appenders.set("stdout", {
|
|
101
|
-
type: "stdout",
|
|
102
|
-
levels: ["info", "debug"],
|
|
103
|
-
layout: {
|
|
104
|
-
type: "pattern",
|
|
105
|
-
pattern: logger.format
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
$log.appenders.set("stderr", {
|
|
109
|
-
levels: ["trace", "fatal", "error", "warn"],
|
|
110
|
-
type: "stderr",
|
|
111
|
-
layout: {
|
|
112
|
-
type: "pattern",
|
|
113
|
-
pattern: logger.format
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
get exclude() {
|
|
119
|
-
return this.get("exclude");
|
|
120
|
-
}
|
|
121
|
-
set exclude(exclude) {
|
|
122
|
-
this.setRaw("exclude", exclude);
|
|
123
|
-
}
|
|
124
60
|
get additionalProperties() {
|
|
125
61
|
return this.get("converter.additionalProperties") === "accept";
|
|
126
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformConfiguration.js","sourceRoot":"","sources":["../../../../src/config/services/PlatformConfiguration.ts"],"names":[],"mappings":";AAAA,OAAO,EAAM,mBAAmB,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,eAAe,EAAE,UAAU,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"PlatformConfiguration.js","sourceRoot":"","sources":["../../../../src/config/services/PlatformConfiguration.ts"],"names":[],"mappings":"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","sourcesContent":["import {Env, getHostInfoFromPort} from \"@tsed/core\";\nimport {DIConfiguration, Injectable, ProviderScope, TokenProvider} from \"@tsed/di\";\nimport Https from \"https\";\nimport {ConverterSettings} from \"../interfaces/ConverterSettings\";\n\nconst rootDir = process.cwd();\n\n/**\n * `PlatformConfiguration` contains all information about your Server configuration.\n */\n@Injectable({\n scope: ProviderScope.SINGLETON,\n global: true\n})\nexport class PlatformConfiguration extends DIConfiguration {\n constructor() {\n super({rootDir});\n }\n\n get port(): string | number | false {\n return this.httpPort;\n }\n\n set port(value: string | number | false) {\n this.httpPort = value;\n }\n\n get httpsOptions(): Https.ServerOptions {\n return this.getRaw(\"httpsOptions\");\n }\n\n set httpsOptions(value: Https.ServerOptions) {\n this.setRaw(\"httpsOptions\", value);\n }\n\n get httpPort(): string | number | false {\n return this.getRaw(\"httpPort\");\n }\n\n set httpPort(value: string | number | false) {\n this.setRaw(\"httpPort\", value);\n }\n\n get httpsPort(): string | number | false {\n return this.getRaw(\"httpsPort\");\n }\n\n set httpsPort(value: string | number | false) {\n this.setRaw(\"httpsPort\", value);\n }\n\n get mount(): Record<string, TokenProvider[]> {\n return this.get(\"mount\");\n }\n\n set mount(value: Record<string, TokenProvider[]>) {\n this.setRaw(\"mount\", value);\n }\n\n get statics(): Record<string, (any | string)[]> {\n return this.getRaw(\"statics\") || this.getRaw(\"serveStatic\") || {};\n }\n\n set statics(value: Record<string, (any | string)[]>) {\n this.setRaw(\"statics\", value);\n }\n\n get acceptMimes(): string[] {\n return this.getRaw(\"acceptMimes\");\n }\n\n set acceptMimes(value: string[]) {\n this.setRaw(\"acceptMimes\", value || []);\n }\n\n get converter(): Partial<ConverterSettings> {\n return this.get(\"converter\") || {};\n }\n\n set converter(options: Partial<ConverterSettings>) {\n this.setRaw(\"converter\", options);\n }\n\n get additionalProperties() {\n return this.get(\"converter.additionalProperties\") === \"accept\";\n }\n\n /**\n *\n * @returns {string|number}\n */\n getHttpPort(): ReturnType<typeof getHostInfoFromPort> {\n return getHostInfoFromPort(\"http\", this.getRaw(\"httpPort\"));\n }\n\n /**\n *\n * @param settings\n */\n setHttpPort(settings: {address: string; port: number}) {\n this.setRaw(\"httpPort\", `${settings.address}:${settings.port}`);\n }\n\n /**\n *\n * @returns {string|number}\n */\n getHttpsPort() {\n return getHostInfoFromPort(\"https\", this.getRaw(\"httpsPort\"));\n }\n\n /**\n *\n * @param settings\n */\n setHttpsPort(settings: {address: string; port: number}) {\n this.setRaw(\"httpsPort\", `${settings.address}:${settings.port}`);\n }\n\n getBestHost() {\n const {httpsPort, httpPort} = this;\n\n if (httpsPort) {\n return this.getHttpsPort();\n }\n\n if (httpPort) {\n return this.getHttpPort();\n }\n\n return {\n toString() {\n return \"/\";\n }\n };\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoreMerge } from "@tsed/core";
|
|
2
|
-
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware";
|
|
2
|
+
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware.js";
|
|
3
3
|
/**
|
|
4
4
|
* Define multer option for all MultipartFile
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Metadata, StoreMerge, useDecorators, useMethodDecorators } from "@tsed/core";
|
|
2
2
|
import { ParamTypes, UseParam } from "@tsed/platform-params";
|
|
3
3
|
import { InFile } from "@tsed/schema";
|
|
4
|
-
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware";
|
|
4
|
+
import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddleware.js";
|
|
5
5
|
function mapOptions(name, maxCount) {
|
|
6
6
|
return {
|
|
7
7
|
fields: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multipartFile.js","sourceRoot":"","sources":["../../../../src/decorators/multer/multipartFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AACzG,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"multipartFile.js","sourceRoot":"","sources":["../../../../src/decorators/multer/multipartFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AACzG,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAqB,wBAAwB,EAAC,MAAM,4CAA4C,CAAC;AAExG,SAAS,UAAU,CAAC,IAAY,EAAE,QAA4B;IAC5D,OAAO;QACL,MAAM,EAAE;YACN;gBACE,IAAI;gBACJ,QAAQ;aACT;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,QAAiB;IAC3D,OAAO,CAAC,GAAG,IAAyB,EAAQ,EAAE;QAC5C,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;QAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,KAAe,CAAC,KAAK,KAAK,CAAC;QAExF,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAE,CAAC;QAEtD,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtE,MAAM,UAAU,GAAG,aAAa,CAC9B,MAAM,CAAC,IAAI,CAAC,EACZ,mBAAmB,CAAC,UAAU,CAAC,wBAAwB,EAAE,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrF,QAAQ,CAAC;YACP,SAAS,EAAE,UAAU,CAAC,KAAK;YAC3B,QAAQ,EAAE,oBAAoB;YAC9B,UAAU;YACV,aAAa,EAAE,IAAI;SACpB,CAAC,CACH,CAAC;QAEF,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {DecoratorParameters, Metadata, StoreMerge, useDecorators, useMethodDecorators} from \"@tsed/core\";\nimport {ParamTypes, UseParam} from \"@tsed/platform-params\";\nimport {InFile} from \"@tsed/schema\";\nimport {PlatformMulterFile} from \"../../config/interfaces/PlatformMulterSettings\";\nimport {MulterInputOptions, PlatformMulterMiddleware} from \"../../middlewares/PlatformMulterMiddleware\";\n\nfunction mapOptions(name: string, maxCount: number | undefined): MulterInputOptions {\n return {\n fields: [\n {\n name,\n maxCount\n }\n ]\n };\n}\n\n/**\n * Define a parameter as Multipart file.\n *\n * ```typescript\n * import {Controller, Post} from \"@tsed/common\";\n * import {MulterOptions, MultipartFile} from \"@tsed/common\";\n * import {Multer} from \"@types/multer\";\n *\n * type MulterFile = Express.Multer.File;\n *\n * @Controller('/')\n * class MyCtrl {\n * @Post('/file')\n * private uploadFile(@MultipartFile(\"file1\") file: MulterFile) {\n *\n * }\n *\n * @Post('/file')\n * @MulterOptions({dest: \"/other-dir\"})\n * private uploadFile(@MultipartFile(\"file1\") file: MulterFile) {\n *\n * }\n *\n * @Post('/file2')\n * @MulterOptions({dest: \"/other-dir\"})\n * private uploadFile(@MultipartFile(\"file1\") file: MulterFile, @MultipartFile(\"file2\") file2: MulterFile) {\n *\n * }\n *\n * @Post('/files')\n * private uploadFile(@MultipartFile(\"file1\") files: MulterFile[]) {\n *\n * }\n * }\n * ```\n *\n * > See the tutorial on the [multer configuration](/tutorials/multer.md).\n *\n * @param name\n * @param maxCount\n * @returns Function\n * @decorator\n * @input\n */\nexport function MultipartFile(name: string, maxCount?: number): ParameterDecorator {\n return (...args: DecoratorParameters): void => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index as number] === Array;\n\n name = (typeof name === \"object\" ? undefined : name)!;\n\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n\n const decorators = useDecorators(\n InFile(name),\n useMethodDecorators(StoreMerge(PlatformMulterMiddleware, mapOptions(name, maxCount))),\n UseParam({\n paramType: ParamTypes.FILES,\n dataPath: \"$ctx.request.files\",\n expression,\n useValidation: true\n })\n );\n\n decorators(...args);\n };\n}\n\nexport type MultipartFile = PlatformMulterFile;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../src/decorators/params/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,GAAG;IACjB,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,GAAG;QACzB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../src/decorators/params/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,GAAG;IACjB,OAAO,QAAQ,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,GAAG;QACzB,QAAQ,EAAE,YAAY;QACtB,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {ParamTypes, UseParam} from \"@tsed/platform-params\";\n\n/**\n * @returns {Function}\n * @decorator\n * @operation\n * @input\n */\nexport function Err(): Function {\n return UseParam({\n paramType: ParamTypes.ERR,\n dataPath: \"$ctx.error\",\n useValidation: false,\n useConverter: false\n });\n}\n"]}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { AnyToPromise } from "@tsed/core";
|
|
2
2
|
export class AnyToPromiseWithCtx extends AnyToPromise {
|
|
3
|
-
|
|
3
|
+
$ctx;
|
|
4
|
+
constructor($ctx) {
|
|
4
5
|
super();
|
|
5
6
|
this.$ctx = $ctx;
|
|
6
|
-
this.err = err;
|
|
7
7
|
}
|
|
8
8
|
isDone() {
|
|
9
9
|
const { $ctx } = this;
|
|
10
|
-
return
|
|
10
|
+
return $ctx?.isDone() || super.isDone();
|
|
11
11
|
}
|
|
12
12
|
async call(cb) {
|
|
13
13
|
return super.call(() => cb(this));
|
|
14
14
|
}
|
|
15
15
|
destroy() {
|
|
16
|
-
|
|
17
|
-
delete this.$ctx;
|
|
16
|
+
this.$ctx = null;
|
|
18
17
|
}
|
|
19
18
|
isCanceledResponse(process) {
|
|
20
19
|
return process === this.$ctx.getResponse();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnyToPromiseWithCtx.js","sourceRoot":"","sources":["../../../src/domain/AnyToPromiseWithCtx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"AnyToPromiseWithCtx.js","sourceRoot":"","sources":["../../../src/domain/AnyToPromiseWithCtx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAC,MAAM,YAAY,CAAC;AAG1D,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IAC5C,IAAI,CAAkB;IAE7B,YAAY,IAAqB;QAC/B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,EAAC,IAAI,EAAC,GAAG,IAAI,CAAC;QAEpB,OAAO,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAY;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,CAAC;IAED,OAAO;QACJ,IAAI,CAAC,IAAY,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,kBAAkB,CAAC,OAAY;QAC7B,OAAO,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import {AnyPromiseResult, AnyToPromise} from \"@tsed/core\";\nimport {PlatformContext} from \"./PlatformContext\";\n\nexport class AnyToPromiseWithCtx extends AnyToPromise {\n public $ctx: PlatformContext;\n\n constructor($ctx: PlatformContext) {\n super();\n this.$ctx = $ctx;\n }\n\n isDone(): boolean {\n const {$ctx} = this;\n\n return $ctx?.isDone() || super.isDone();\n }\n\n async call(cb: Function): Promise<AnyPromiseResult<any>> {\n return super.call(() => cb(this));\n }\n\n destroy() {\n (this.$ctx as any) = null;\n }\n\n isCanceledResponse(process: any) {\n return process === this.$ctx.getResponse();\n }\n}\n"]}
|
|
@@ -1,67 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { DecoratorTypes, deepMerge, descriptorOf, nameOf, prototypeOf, Store } from "@tsed/core";
|
|
3
|
-
import { JsonEntityComponent, JsonEntityStore, JsonMethodStore } from "@tsed/schema";
|
|
4
|
-
/**
|
|
5
|
-
* EndpointMetadata contains metadata about a controller and his method.
|
|
6
|
-
* Each annotation (@Get, @Body...) attached to a method are stored in a endpoint.
|
|
7
|
-
* EndpointMetadata convert this metadata to an array which contain arguments to call an Express method.
|
|
8
|
-
*
|
|
9
|
-
* Example :
|
|
10
|
-
*
|
|
11
|
-
* @Controller("/my-path")
|
|
12
|
-
* provide MyClass {
|
|
13
|
-
*
|
|
14
|
-
* @Get("/")
|
|
15
|
-
* @Authenticated()
|
|
16
|
-
* public myMethod(){}
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
let EndpointMetadata = class EndpointMetadata extends JsonMethodStore {
|
|
21
|
-
get targetName() {
|
|
22
|
-
return nameOf(this.token);
|
|
23
|
-
}
|
|
24
|
-
get params() {
|
|
25
|
-
return this.parameters;
|
|
26
|
-
}
|
|
27
|
-
get view() {
|
|
28
|
-
return this.store.get("view");
|
|
29
|
-
}
|
|
30
|
-
set view(view) {
|
|
31
|
-
this.store.set("view", view);
|
|
32
|
-
}
|
|
33
|
-
get acceptMimes() {
|
|
34
|
-
return this.store.get("acceptMimes", []);
|
|
35
|
-
}
|
|
36
|
-
set acceptMimes(mimes) {
|
|
37
|
-
this.store.set("acceptMimes", mimes);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Get an endpoint.
|
|
41
|
-
* @param target
|
|
42
|
-
* @param propertyKey
|
|
43
|
-
* @param descriptor
|
|
44
|
-
*/
|
|
45
|
-
static get(target, propertyKey, descriptor) {
|
|
46
|
-
descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);
|
|
47
|
-
return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);
|
|
48
|
-
}
|
|
49
|
-
addOperationPath(method, path, options = {}) {
|
|
50
|
-
return this.operation.addOperationPath(method, path, options);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Find the a value at the controller level. Let this value be extended or overridden by the endpoint itself.
|
|
54
|
-
*
|
|
55
|
-
* @param key
|
|
56
|
-
* @returns {any}
|
|
57
|
-
*/
|
|
58
|
-
get(key) {
|
|
59
|
-
const ctrlValue = Store.from(this.target).get(key);
|
|
60
|
-
return deepMerge(ctrlValue, this.store.get(key));
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
EndpointMetadata = __decorate([
|
|
64
|
-
JsonEntityComponent(DecoratorTypes.METHOD)
|
|
65
|
-
], EndpointMetadata);
|
|
66
|
-
export { EndpointMetadata };
|
|
1
|
+
export { EndpointMetadata } from "@tsed/schema";
|
|
67
2
|
//# sourceMappingURL=EndpointMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndpointMetadata.js","sourceRoot":"","sources":["../../../src/domain/EndpointMetadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EndpointMetadata.js","sourceRoot":"","sources":["../../../src/domain/EndpointMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC","sourcesContent":["export {EndpointMetadata} from \"@tsed/schema\";\n"]}
|
|
@@ -1,28 +1,46 @@
|
|
|
1
1
|
import { DIContext } from "@tsed/di";
|
|
2
|
-
import { PlatformApplication } from "../services/PlatformApplication";
|
|
3
|
-
import { PlatformRequest } from "../services/PlatformRequest";
|
|
4
|
-
import { PlatformResponse } from "../services/PlatformResponse";
|
|
2
|
+
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
3
|
+
import { PlatformRequest } from "../services/PlatformRequest.js";
|
|
4
|
+
import { PlatformResponse } from "../services/PlatformResponse.js";
|
|
5
5
|
export class PlatformContext extends DIContext {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
event;
|
|
7
|
+
/**
|
|
8
|
+
* The data return by the previous endpoint if you use multiple handler on the same route. By default data is empty.
|
|
9
|
+
*/
|
|
10
|
+
data;
|
|
11
|
+
/**
|
|
12
|
+
* The error caught by the current handler
|
|
13
|
+
*/
|
|
14
|
+
error;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
next;
|
|
19
|
+
/**
|
|
20
|
+
* The current @@PlatformResponse@@.
|
|
21
|
+
*/
|
|
22
|
+
response;
|
|
23
|
+
/**
|
|
24
|
+
* The current @@PlatformRequest@@.
|
|
25
|
+
*/
|
|
26
|
+
request;
|
|
27
|
+
/**
|
|
28
|
+
* The current @@EndpointMetadata@@ resolved by Ts.ED during the request.
|
|
29
|
+
*/
|
|
30
|
+
endpoint;
|
|
31
|
+
/**
|
|
32
|
+
* The current @@PlatformHandlerMetadata@@ resolved by Ts.ED during the request.
|
|
33
|
+
*/
|
|
34
|
+
handlerMetadata;
|
|
35
|
+
#isFinished = false;
|
|
36
|
+
constructor(options) {
|
|
37
|
+
super(options);
|
|
38
|
+
options.endpoint && (this.endpoint = options.endpoint);
|
|
39
|
+
this.event = options.event;
|
|
40
|
+
this.response = new (options.ResponseKlass || PlatformResponse)(this);
|
|
41
|
+
this.request = new (options.RequestKlass || PlatformRequest)(this);
|
|
20
42
|
this.request.request.$ctx = this;
|
|
21
43
|
this.request.request.id = this.id;
|
|
22
|
-
this.logger.url = this.url;
|
|
23
|
-
this.container.set(PlatformResponse, this.response);
|
|
24
|
-
this.container.set(PlatformRequest, this.request);
|
|
25
|
-
this.container.set(PlatformContext, this);
|
|
26
44
|
this.response.setHeader("x-request-id", this.id);
|
|
27
45
|
}
|
|
28
46
|
get url() {
|
|
@@ -31,28 +49,18 @@ export class PlatformContext extends DIContext {
|
|
|
31
49
|
get app() {
|
|
32
50
|
return this.injector.get(PlatformApplication);
|
|
33
51
|
}
|
|
34
|
-
async
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
delete this.response;
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
delete this.request;
|
|
52
|
+
async start() {
|
|
53
|
+
return this.emit("$onRequest", this);
|
|
54
|
+
}
|
|
55
|
+
async finish() {
|
|
56
|
+
await Promise.all([this.emit("$onResponse", this), this.destroy()]);
|
|
57
|
+
this.#isFinished = true;
|
|
58
|
+
}
|
|
59
|
+
isFinished() {
|
|
60
|
+
return this.#isFinished;
|
|
46
61
|
}
|
|
47
62
|
isDone() {
|
|
48
|
-
|
|
49
|
-
if (!this.request || !this.response) {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
if ((_a = this.request) === null || _a === void 0 ? void 0 : _a.isAborted()) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return (_b = this.response) === null || _b === void 0 ? void 0 : _b.isDone();
|
|
63
|
+
return this.request?.isAborted() || this.response?.isDone() || this.isFinished();
|
|
56
64
|
}
|
|
57
65
|
/**
|
|
58
66
|
* Return the framework request instance (Express, Koa, etc...)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformContext.js","sourceRoot":"","sources":["../../../src/domain/PlatformContext.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PlatformContext.js","sourceRoot":"","sources":["../../../src/domain/PlatformContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,UAAU,CAAC;AAKrD,OAAO,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAc9D,MAAM,OAAO,eAGX,SAAQ,SAAS;IACV,KAAK,CAAgB;IAC5B;;OAEG;IACI,IAAI,CAAM;IACjB;;OAEG;IACI,KAAK,CAAW;IACvB;;OAEG;IACI,IAAI,CAAO;IAClB;;OAEG;IACM,QAAQ,CAAO;IACxB;;OAEG;IACM,OAAO,CAAO;IACvB;;OAEG;IACH,QAAQ,CAAmB;IAC3B;;OAEG;IACH,eAAe,CAA0B;IAEzC,WAAW,GAAY,KAAK,CAAC;IAE7B,YAAY,OAA+B;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,OAAO,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEvD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC;QAEnE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAElC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;IAC1B,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAsB,mBAAmB,CAAE,CAAC;IACtE,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAO,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAO,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAS,CAAC;IAClC,CAAC;CACF","sourcesContent":["import {DIContext, DIContextOptions} from \"@tsed/di\";\nimport {PlatformHandlerMetadata} from \"@tsed/platform-router\";\nimport {EndpointMetadata} from \"@tsed/schema\";\nimport {IncomingMessage, ServerResponse} from \"http\";\nimport {IncomingEvent} from \"../interfaces/IncomingEvent\";\nimport {PlatformApplication} from \"../services/PlatformApplication\";\nimport {PlatformRequest} from \"../services/PlatformRequest\";\nimport {PlatformResponse} from \"../services/PlatformResponse\";\n\ndeclare global {\n namespace TsED {\n export interface Context extends PlatformContext {}\n }\n}\n\nexport interface PlatformContextOptions extends DIContextOptions {\n event: IncomingEvent;\n ignoreUrlPatterns?: any[];\n endpoint?: EndpointMetadata;\n}\n\nexport class PlatformContext<\n PReq extends PlatformRequest = PlatformRequest,\n PRes extends PlatformResponse = PlatformResponse\n> extends DIContext {\n public event: IncomingEvent;\n /**\n * The data return by the previous endpoint if you use multiple handler on the same route. By default data is empty.\n */\n public data: any;\n /**\n * The error caught by the current handler\n */\n public error?: unknown;\n /**\n *\n */\n public next?: any;\n /**\n * The current @@PlatformResponse@@.\n */\n readonly response: PRes;\n /**\n * The current @@PlatformRequest@@.\n */\n readonly request: PReq;\n /**\n * The current @@EndpointMetadata@@ resolved by Ts.ED during the request.\n */\n endpoint: EndpointMetadata;\n /**\n * The current @@PlatformHandlerMetadata@@ resolved by Ts.ED during the request.\n */\n handlerMetadata: PlatformHandlerMetadata;\n\n #isFinished: boolean = false;\n\n constructor(options: PlatformContextOptions) {\n super(options);\n\n options.endpoint && (this.endpoint = options.endpoint);\n\n this.event = options.event;\n this.response = new (options.ResponseKlass || PlatformResponse)(this);\n this.request = new (options.RequestKlass || PlatformRequest)(this);\n\n this.request.request.$ctx = this;\n this.request.request.id = this.id;\n\n this.response.setHeader(\"x-request-id\", this.id);\n }\n\n get url() {\n return this.request.url;\n }\n\n get app() {\n return this.injector.get<PlatformApplication>(PlatformApplication)!;\n }\n\n async start() {\n return this.emit(\"$onRequest\", this);\n }\n\n async finish() {\n await Promise.all([this.emit(\"$onResponse\", this), this.destroy()]);\n this.#isFinished = true;\n }\n\n isFinished() {\n return this.#isFinished;\n }\n\n isDone() {\n return this.request?.isAborted() || this.response?.isDone() || this.isFinished();\n }\n\n /**\n * Return the framework request instance (Express, Koa, etc...)\n */\n getRequest<Req = any>(): Req {\n return this.request.getRequest<Req>();\n }\n\n /**\n * Return the framework response instance (Express, Koa, etc...)\n */\n getResponse<Res = any>(): Res {\n return this.response.getResponse<Res>();\n }\n\n /**\n * Get Node.js request\n */\n getReq(): IncomingMessage {\n return this.request.getReq();\n }\n\n /**\n * Get Node.js response\n */\n getRes(): ServerResponse {\n return this.response.getRes();\n }\n\n /**\n * Return the original application instance.\n */\n getApp<T = any>(): T {\n return this.app.getApp() as any;\n }\n}\n"]}
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { JsonOperationRoute } from "@tsed/schema";
|
|
3
|
-
export class PlatformRouteDetails extends JsonOperationRoute {
|
|
4
|
-
constructor(options = {}) {
|
|
5
|
-
super(options);
|
|
6
|
-
this.rawBody = !!this.endpoint.parameters.find((param) => param.paramType === ParamTypes.RAW_BODY);
|
|
7
|
-
}
|
|
8
|
-
toJSON() {
|
|
9
|
-
return {
|
|
10
|
-
method: this.method,
|
|
11
|
-
name: this.name,
|
|
12
|
-
url: this.url,
|
|
13
|
-
className: this.className,
|
|
14
|
-
methodClassName: this.methodClassName,
|
|
15
|
-
parameters: this.parameters,
|
|
16
|
-
rawBody: this.rawBody
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
export {};
|
|
20
2
|
//# sourceMappingURL=PlatformRouteDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformRouteDetails.js","sourceRoot":"","sources":["../../../src/domain/PlatformRouteDetails.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlatformRouteDetails.js","sourceRoot":"","sources":["../../../src/domain/PlatformRouteDetails.ts"],"names":[],"mappings":"","sourcesContent":["export interface PlatformRouteDetails {\n method: string;\n name: string;\n url: string;\n className: string;\n methodClassName: string;\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@tsed/logger";
|
|
2
|
+
import "@tsed/logger-file";
|
|
3
|
+
export * from "@tsed/di";
|
|
4
|
+
export * from "@tsed/platform-params";
|
|
5
|
+
export * from "@tsed/platform-exceptions";
|
|
6
|
+
export * from "@tsed/platform-response-filter";
|
|
7
|
+
export * from "@tsed/platform-cache";
|
|
8
|
+
export * from "@tsed/platform-middlewares";
|
|
9
|
+
export * from "@tsed/components-scan";
|
|
10
|
+
export * from "@tsed/platform-log-middleware";
|
|
11
|
+
export * from "@tsed/platform-router";
|
|
12
|
+
export { $log, Logger } from "@tsed/logger";
|
|
13
|
+
export { AcceptMime, Location, Redirect, View, Get, Post, Put, Patch, Delete, Head, Options, All } from "@tsed/schema";
|
|
14
|
+
//# sourceMappingURL=exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAE3B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAC,MAAM,cAAc,CAAC","sourcesContent":["import \"@tsed/logger\";\nimport \"@tsed/logger-file\";\n\nexport * from \"@tsed/di\";\nexport * from \"@tsed/platform-params\";\nexport * from \"@tsed/platform-exceptions\";\nexport * from \"@tsed/platform-response-filter\";\nexport * from \"@tsed/platform-cache\";\nexport * from \"@tsed/platform-middlewares\";\nexport * from \"@tsed/components-scan\";\nexport * from \"@tsed/platform-log-middleware\";\nexport * from \"@tsed/platform-router\";\n\nexport {$log, Logger} from \"@tsed/logger\";\n\nexport {AcceptMime, Location, Redirect, View, Get, Post, Put, Patch, Delete, Head, Options, All} from \"@tsed/schema\";\n"]}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,28 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from "
|
|
5
|
-
export * from "
|
|
6
|
-
export * from "
|
|
7
|
-
export * from "
|
|
8
|
-
export * from "
|
|
9
|
-
export * from "
|
|
10
|
-
export
|
|
11
|
-
export * from "./
|
|
12
|
-
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
|
|
16
|
-
export * from "./decorators";
|
|
17
|
-
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
|
|
21
|
-
export * from "./
|
|
22
|
-
|
|
23
|
-
export * from "./
|
|
24
|
-
|
|
25
|
-
export * from "./
|
|
26
|
-
|
|
27
|
-
export * from "./
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./exports.js";
|
|
5
|
+
export * from "./builder/PlatformBuilder.js";
|
|
6
|
+
export * from "./config/interfaces/ConverterSettings.js";
|
|
7
|
+
export * from "./config/interfaces/PlatformLoggerSettings.js";
|
|
8
|
+
export * from "./config/interfaces/PlatformMulterSettings.js";
|
|
9
|
+
export * from "./config/interfaces/PlatformStaticsSettings.js";
|
|
10
|
+
export * from "./config/services/PlatformConfiguration.js";
|
|
11
|
+
export * from "./constants/routerOptions.js";
|
|
12
|
+
export * from "./decorators/multer/multerFileSize.js";
|
|
13
|
+
export * from "./decorators/multer/multerOptions.js";
|
|
14
|
+
export * from "./decorators/multer/multipartFile.js";
|
|
15
|
+
export * from "./decorators/params/error.js";
|
|
16
|
+
export * from "./decorators/params/next.js";
|
|
17
|
+
export * from "./decorators/params/request.js";
|
|
18
|
+
export * from "./decorators/params/response.js";
|
|
19
|
+
export * from "./domain/AnyToPromiseWithCtx.js";
|
|
20
|
+
export * from "./domain/EndpointMetadata.js";
|
|
21
|
+
export * from "./domain/PlatformContext.js";
|
|
22
|
+
export * from "./domain/PlatformRouteDetails.js";
|
|
23
|
+
export * from "./interfaces/AfterInit.js";
|
|
24
|
+
export * from "./interfaces/AfterListen.js";
|
|
25
|
+
export * from "./interfaces/AfterRoutesInit.js";
|
|
26
|
+
export * from "./interfaces/BeforeInit.js";
|
|
27
|
+
export * from "./interfaces/BeforeListen.js";
|
|
28
|
+
export * from "./interfaces/BeforeRoutesInit.js";
|
|
29
|
+
export * from "./interfaces/HandlerType.js";
|
|
30
|
+
export * from "./interfaces/IncomingEvent.js";
|
|
31
|
+
export * from "./interfaces/OnReady.js";
|
|
32
|
+
export * from "./interfaces/OnRequest.js";
|
|
33
|
+
export * from "./interfaces/OnResponse.js";
|
|
34
|
+
export * from "./interfaces/OnRoutesInit.js";
|
|
35
|
+
export * from "./interfaces/PlatformRouteOptions.js";
|
|
36
|
+
export * from "./interfaces/ResponseErrorObject.js";
|
|
37
|
+
export * from "./interfaces/Route.js";
|
|
38
|
+
export * from "./middlewares/PlatformAcceptMimesMiddleware.js";
|
|
39
|
+
export * from "./middlewares/PlatformMulterMiddleware.js";
|
|
40
|
+
export * from "./services/FakeAdapter.js";
|
|
41
|
+
export * from "./services/Platform.js";
|
|
42
|
+
export * from "./services/PlatformAdapter.js";
|
|
43
|
+
export * from "./services/PlatformApplication.js";
|
|
44
|
+
export * from "./services/PlatformHandler.js";
|
|
45
|
+
export * from "./services/PlatformMiddlewaresChain.js";
|
|
46
|
+
export * from "./services/PlatformRequest.js";
|
|
47
|
+
export * from "./services/PlatformResponse.js";
|
|
48
|
+
export * from "./services/PlatformTest.js";
|
|
49
|
+
export * from "./utils/createContext.js";
|
|
50
|
+
export * from "./utils/createHttpServer.js";
|
|
51
|
+
export * from "./utils/createHttpsServer.js";
|
|
52
|
+
export * from "./utils/createInjector.js";
|
|
53
|
+
export * from "./utils/ensureContext.js";
|
|
54
|
+
export * from "./utils/getStaticsOptions.js";
|
|
55
|
+
export * from "./utils/listenServer.js";
|
|
56
|
+
export * from "./utils/mapReturnedResponse.js";
|
|
57
|
+
export * from "./utils/printRoutes.js";
|
|
58
|
+
export * from "./utils/setResponseHeaders.js";
|
|
28
59
|
//# sourceMappingURL=index.js.map
|