@tsed/common 7.0.0-beta.9 → 7.0.0-rc.3
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 +86 -68
- package/lib/cjs/builder/PlatformBuilder.js.map +1 -1
- package/lib/cjs/config/interfaces/PlatformLoggerSettings.js.map +1 -1
- package/lib/cjs/config/services/PlatformConfiguration.js +0 -64
- package/lib/cjs/config/services/PlatformConfiguration.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/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 +1 -1
- package/lib/cjs/exports.js.map +1 -1
- package/lib/cjs/index.js +1 -9
- 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 +2 -1
- package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
- package/lib/cjs/middlewares/PlatformMulterMiddleware.js +2 -0
- package/lib/cjs/middlewares/PlatformMulterMiddleware.js.map +1 -1
- package/lib/cjs/services/FakeAdapter.js +6 -12
- package/lib/cjs/services/FakeAdapter.js.map +1 -1
- package/lib/cjs/services/Platform.js +30 -86
- package/lib/cjs/services/Platform.js.map +1 -1
- package/lib/cjs/services/PlatformAdapter.js +10 -0
- package/lib/cjs/services/PlatformAdapter.js.map +1 -1
- package/lib/cjs/services/PlatformApplication.js +23 -9
- package/lib/cjs/services/PlatformApplication.js.map +1 -1
- package/lib/cjs/services/PlatformHandler.js +112 -171
- package/lib/cjs/services/PlatformHandler.js.map +1 -1
- package/lib/cjs/services/PlatformMiddlewaresChain.js +5 -19
- package/lib/cjs/services/PlatformMiddlewaresChain.js.map +1 -1
- package/lib/cjs/services/PlatformRequest.js +16 -12
- package/lib/cjs/services/PlatformRequest.js.map +1 -1
- package/lib/cjs/services/PlatformResponse.js +19 -22
- package/lib/cjs/services/PlatformResponse.js.map +1 -1
- package/lib/cjs/services/PlatformTest.js +29 -9
- 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 +3 -3
- package/lib/cjs/utils/createHttpServer.js.map +1 -1
- package/lib/cjs/utils/createHttpsServer.js +3 -3
- package/lib/cjs/utils/createHttpsServer.js.map +1 -1
- package/lib/cjs/utils/createInjector.js +6 -8
- 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 +63 -68
- package/lib/esm/builder/PlatformBuilder.js.map +1 -1
- package/lib/esm/config/interfaces/PlatformLoggerSettings.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/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/PlatformContext.js +46 -38
- 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 +1 -1
- package/lib/esm/exports.js.map +1 -1
- package/lib/esm/index.js +1 -9
- 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 +2 -0
- package/lib/esm/middlewares/PlatformMulterMiddleware.js.map +1 -1
- package/lib/esm/services/FakeAdapter.js +6 -12
- package/lib/esm/services/FakeAdapter.js.map +1 -1
- package/lib/esm/services/Platform.js +31 -87
- package/lib/esm/services/Platform.js.map +1 -1
- package/lib/esm/services/PlatformAdapter.js +10 -0
- package/lib/esm/services/PlatformAdapter.js.map +1 -1
- package/lib/esm/services/PlatformApplication.js +23 -9
- package/lib/esm/services/PlatformApplication.js.map +1 -1
- package/lib/esm/services/PlatformHandler.js +114 -173
- package/lib/esm/services/PlatformHandler.js.map +1 -1
- package/lib/esm/services/PlatformMiddlewaresChain.js +5 -19
- 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 +29 -9
- package/lib/esm/services/PlatformTest.js.map +1 -1
- package/lib/esm/utils/createContext.js +30 -20
- package/lib/esm/utils/createContext.js.map +1 -1
- package/lib/esm/utils/createHttpServer.js +3 -3
- package/lib/esm/utils/createHttpServer.js.map +1 -1
- package/lib/esm/utils/createHttpsServer.js +3 -3
- package/lib/esm/utils/createHttpsServer.js.map +1 -1
- package/lib/esm/utils/createInjector.js +7 -9
- 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 +17 -16
- package/lib/types/config/interfaces/PlatformLoggerSettings.d.ts +2 -43
- package/lib/types/config/services/PlatformConfiguration.d.ts +6 -22
- package/lib/types/domain/AnyToPromiseWithCtx.d.ts +1 -9
- package/lib/types/domain/PlatformContext.d.ts +32 -18
- package/lib/types/domain/PlatformRouteDetails.d.ts +4 -19
- package/lib/types/exports.d.ts +1 -1
- package/lib/types/index.d.ts +1 -9
- package/lib/types/interfaces/PlatformRouteOptions.d.ts +0 -1
- package/lib/types/interfaces/Route.d.ts +2 -3
- package/lib/types/middlewares/PlatformMulterMiddleware.d.ts +1 -1
- package/lib/types/services/FakeAdapter.d.ts +7 -6
- package/lib/types/services/Platform.d.ts +7 -28
- package/lib/types/services/PlatformAdapter.d.ts +22 -11
- package/lib/types/services/PlatformApplication.d.ts +14 -6
- package/lib/types/services/PlatformHandler.d.ts +21 -59
- package/lib/types/services/PlatformMiddlewaresChain.d.ts +1 -2
- package/lib/types/services/PlatformRequest.d.ts +8 -10
- package/lib/types/services/PlatformResponse.d.ts +11 -15
- package/lib/types/services/PlatformTest.d.ts +4 -3
- package/lib/types/utils/createContext.d.ts +4 -1
- package/lib/types/utils/createHttpsServer.d.ts +1 -0
- package/lib/types/utils/createInjector.d.ts +2 -2
- package/lib/types/utils/ensureContext.d.ts +2 -0
- package/lib/types/utils/listenServer.d.ts +2 -0
- package/package.json +27 -25
- package/readme.md +2 -1
- package/lib/cjs/builder/PlatformControllerBuilder.js +0 -82
- package/lib/cjs/builder/PlatformControllerBuilder.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/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/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/services/PlatformRouter.js +0 -108
- package/lib/cjs/services/PlatformRouter.js.map +0 -1
- package/lib/cjs/utils/__mock__/Test1.js +0 -8
- package/lib/cjs/utils/__mock__/Test1.js.map +0 -1
- package/lib/cjs/utils/__mock__/Test2.js +0 -8
- package/lib/cjs/utils/__mock__/Test2.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/importProviders.js +0 -29
- package/lib/cjs/utils/importProviders.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 -76
- package/lib/esm/builder/PlatformControllerBuilder.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/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/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/services/PlatformRouter.js +0 -105
- package/lib/esm/services/PlatformRouter.js.map +0 -1
- package/lib/esm/utils/__mock__/Test1.js +0 -4
- package/lib/esm/utils/__mock__/Test1.js.map +0 -1
- package/lib/esm/utils/__mock__/Test2.js +0 -4
- package/lib/esm/utils/__mock__/Test2.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/importProviders.js +0 -25
- package/lib/esm/utils/importProviders.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 -18
- package/lib/types/config/interfaces/EndpointDirectoriesSettings.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/middlewares/__mock__/FakeCtrl.d.ts +0 -2
- package/lib/types/middlewares/bindEndpointMiddleware.d.ts +0 -6
- package/lib/types/services/PlatformRouter.d.ts +0 -51
- package/lib/types/utils/__mock__/Test1.d.ts +0 -3
- package/lib/types/utils/__mock__/Test2.d.ts +0 -3
- package/lib/types/utils/createHandlerMetadata.d.ts +0 -8
- package/lib/types/utils/importProviders.d.ts +0 -10
- package/lib/types/utils/useCtxHandler.d.ts +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectorService, TokenProvider } from "@tsed/di";
|
|
2
|
-
import {
|
|
2
|
+
import { PlatformRouters } from "@tsed/platform-router";
|
|
3
3
|
import { Route, RouteController } from "../interfaces/Route";
|
|
4
4
|
import { PlatformApplication } from "./PlatformApplication";
|
|
5
5
|
/**
|
|
@@ -8,39 +8,18 @@ import { PlatformApplication } from "./PlatformApplication";
|
|
|
8
8
|
* @platform
|
|
9
9
|
*/
|
|
10
10
|
export declare class Platform {
|
|
11
|
+
#private;
|
|
11
12
|
readonly injector: InjectorService;
|
|
12
13
|
readonly platformApplication: PlatformApplication;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
get app(): PlatformApplication<TsED.Application, TsED.Router>;
|
|
17
|
-
get routes(): PlatformRouteDetails[];
|
|
14
|
+
readonly platformRouters: PlatformRouters;
|
|
15
|
+
constructor(injector: InjectorService, platformApplication: PlatformApplication, platformRouters: PlatformRouters);
|
|
16
|
+
get app(): PlatformApplication<TsED.Application>;
|
|
18
17
|
addRoutes(routes: Route[]): void;
|
|
19
|
-
addRoute(
|
|
20
|
-
|
|
21
|
-
* Get all routes built by TsExpressDecorators and mounted on Express application.
|
|
22
|
-
* @returns {PlatformRouteDetails[]}
|
|
23
|
-
*/
|
|
24
|
-
getRoutes(): PlatformRouteDetails[];
|
|
18
|
+
addRoute(route: string, token: TokenProvider): this;
|
|
19
|
+
getLayers(): import("@tsed/platform-router").PlatformLayer[];
|
|
25
20
|
/**
|
|
26
21
|
* Get all controllers mounted on the application.
|
|
27
22
|
* @returns {RouteController[]}
|
|
28
23
|
*/
|
|
29
24
|
getMountedControllers(): RouteController[];
|
|
30
|
-
protected $onInit(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Create routers from the collected controllers.
|
|
33
|
-
* @private
|
|
34
|
-
*/
|
|
35
|
-
private createRouters;
|
|
36
|
-
/**
|
|
37
|
-
* Get all router controllers from the controller token.
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private getAllControllers;
|
|
41
|
-
/**
|
|
42
|
-
* Create controllers from DI
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
private buildControllers;
|
|
46
25
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Type } from "@tsed/core";
|
|
2
3
|
import { ProviderOpts } from "@tsed/di";
|
|
4
|
+
import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
|
|
5
|
+
import { IncomingMessage, ServerResponse } from "http";
|
|
3
6
|
import { PlatformMulter, PlatformMulterSettings } from "../config/interfaces/PlatformMulterSettings";
|
|
4
7
|
import { PlatformStaticsOptions } from "../config/interfaces/PlatformStaticsSettings";
|
|
5
|
-
|
|
6
|
-
export declare abstract class PlatformAdapter<App = TsED.Application, Router = TsED.Router> {
|
|
8
|
+
export declare abstract class PlatformAdapter<App = TsED.Application> {
|
|
7
9
|
/**
|
|
8
10
|
* Load providers in top priority
|
|
9
11
|
*/
|
|
@@ -14,15 +16,24 @@ export declare abstract class PlatformAdapter<App = TsED.Application, Router = T
|
|
|
14
16
|
onInit?: () => any;
|
|
15
17
|
beforeLoadRoutes?: () => Promise<any>;
|
|
16
18
|
afterLoadRoutes?: () => Promise<any>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* create initial context
|
|
21
|
+
*/
|
|
22
|
+
abstract useContext: () => any;
|
|
23
|
+
/**
|
|
24
|
+
* Map router layer to the targeted framework
|
|
25
|
+
*/
|
|
26
|
+
abstract mapLayers: (layer: PlatformLayer[]) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Map handler to the targeted framework
|
|
29
|
+
*/
|
|
30
|
+
abstract mapHandler: (handler: Function, layer: PlatformHandlerMetadata) => Function;
|
|
31
|
+
/**
|
|
32
|
+
* Return the app instance
|
|
33
|
+
*/
|
|
19
34
|
abstract app(): {
|
|
20
35
|
app: App;
|
|
21
|
-
callback():
|
|
22
|
-
};
|
|
23
|
-
abstract router(routerOptions?: Partial<RouterOptions>): {
|
|
24
|
-
router: Router;
|
|
25
|
-
callback(): any;
|
|
36
|
+
callback(): (req: IncomingMessage, res: ServerResponse) => void;
|
|
26
37
|
};
|
|
27
38
|
/**
|
|
28
39
|
* Return the statics middlewares
|
|
@@ -42,6 +53,6 @@ export declare abstract class PlatformAdapter<App = TsED.Application, Router = T
|
|
|
42
53
|
*/
|
|
43
54
|
abstract bodyParser(type: string, opts?: Record<string, any>): any;
|
|
44
55
|
}
|
|
45
|
-
export interface PlatformBuilderSettings<App = TsED.Application
|
|
46
|
-
adapter?: Type<PlatformAdapter<App
|
|
56
|
+
export interface PlatformBuilderSettings<App = TsED.Application> extends Partial<TsED.Configuration> {
|
|
57
|
+
adapter?: Type<PlatformAdapter<App>>;
|
|
47
58
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="multer" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { InjectorService } from "@tsed/di";
|
|
4
|
+
import { PlatformRouter } from "@tsed/platform-router";
|
|
5
|
+
import { IncomingMessage, ServerResponse } from "http";
|
|
6
|
+
import { PlatformMulterSettings } from "../config/interfaces/PlatformMulterSettings";
|
|
3
7
|
import { PlatformAdapter } from "./PlatformAdapter";
|
|
4
8
|
declare global {
|
|
5
9
|
namespace TsED {
|
|
@@ -12,10 +16,14 @@ declare global {
|
|
|
12
16
|
*
|
|
13
17
|
* @platform
|
|
14
18
|
*/
|
|
15
|
-
export declare class PlatformApplication<App = TsED.Application
|
|
16
|
-
|
|
19
|
+
export declare class PlatformApplication<App = TsED.Application> extends PlatformRouter {
|
|
20
|
+
adapter: PlatformAdapter<App>;
|
|
21
|
+
injector: InjectorService;
|
|
17
22
|
rawApp: App;
|
|
18
|
-
|
|
19
|
-
constructor(
|
|
23
|
+
rawCallback: () => any;
|
|
24
|
+
constructor(adapter: PlatformAdapter<App>, injector: InjectorService);
|
|
20
25
|
getApp(): App;
|
|
26
|
+
multer(options: PlatformMulterSettings): import("multer").Multer;
|
|
27
|
+
callback(): (req: IncomingMessage, res: ServerResponse) => any;
|
|
28
|
+
callback(req: IncomingMessage, res: ServerResponse): any;
|
|
21
29
|
}
|
|
@@ -1,80 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Provider } from "@tsed/di";
|
|
2
|
+
import { PlatformExceptions } from "@tsed/platform-exceptions";
|
|
3
|
+
import { PlatformParams, PlatformParamsCallback } from "@tsed/platform-params";
|
|
3
4
|
import { PlatformResponseFilter } from "@tsed/platform-response-filter";
|
|
4
|
-
import {
|
|
5
|
-
import { HandlerMetadata } from "../domain/HandlerMetadata";
|
|
5
|
+
import { PlatformHandlerMetadata, PlatformRouters } from "@tsed/platform-router";
|
|
6
6
|
import { PlatformContext } from "../domain/PlatformContext";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
$ctx: PlatformContext;
|
|
10
|
-
metadata: HandlerMetadata;
|
|
11
|
-
handler: HandlerWithScope;
|
|
12
|
-
next?: any;
|
|
13
|
-
err?: any;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}
|
|
7
|
+
import { PlatformApplication } from "./PlatformApplication";
|
|
8
|
+
import { PlatformMiddlewaresChain } from "./PlatformMiddlewaresChain";
|
|
16
9
|
/**
|
|
17
10
|
* Platform Handler abstraction layer. Wrap original class method to a pure platform handler (Express, Koa, etc...).
|
|
18
11
|
* @platform
|
|
19
12
|
*/
|
|
20
13
|
export declare class PlatformHandler {
|
|
21
|
-
protected
|
|
22
|
-
protected params: PlatformParams;
|
|
14
|
+
protected platformRouters: PlatformRouters;
|
|
23
15
|
protected responseFilter: PlatformResponseFilter;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
createHandler(input: EndpointMetadata | HandlerMetadata | any, options?: PlatformRouteWithoutHandlers): any;
|
|
16
|
+
protected platformParams: PlatformParams;
|
|
17
|
+
protected platformExceptions: PlatformExceptions;
|
|
18
|
+
protected platformApplication: PlatformApplication;
|
|
19
|
+
protected platformMiddlewaresChain: PlatformMiddlewaresChain;
|
|
20
|
+
constructor(platformRouters: PlatformRouters);
|
|
21
|
+
createHandler(handlerMetadata: PlatformHandlerMetadata): any;
|
|
31
22
|
/**
|
|
32
|
-
* Create injectable handler from the given provider
|
|
33
23
|
* @param provider
|
|
34
24
|
* @param propertyKey
|
|
35
25
|
*/
|
|
36
|
-
createCustomHandler(provider: Provider, propertyKey: string): ($ctx: PlatformContext
|
|
26
|
+
createCustomHandler(provider: Provider, propertyKey: string): ($ctx: PlatformContext) => Promise<any>;
|
|
37
27
|
/**
|
|
38
28
|
* Send the response to the consumer.
|
|
39
|
-
* @param data
|
|
40
|
-
* @param ctx
|
|
41
|
-
* @protected
|
|
42
|
-
*/
|
|
43
|
-
flush(data: any, ctx: PlatformContext): Promise<void>;
|
|
44
|
-
compileHandler(metadata: HandlerMetadata): (scope: Record<string, any>) => Promise<any>;
|
|
45
|
-
protected onCtxRequest(requestOptions: OnRequestOptions): Promise<any>;
|
|
46
|
-
/**
|
|
47
|
-
* Call handler when a request his handle
|
|
48
|
-
* @param requestOptions
|
|
49
|
-
*/
|
|
50
|
-
protected onRequest(requestOptions: OnRequestOptions): Promise<any>;
|
|
51
|
-
protected onError(er: Error, requestOptions: OnRequestOptions): Promise<any>;
|
|
52
|
-
/**
|
|
53
|
-
* Manage success scenario
|
|
54
|
-
* @param data
|
|
55
|
-
* @param requestOptions
|
|
56
29
|
* @protected
|
|
30
|
+
* @param $ctx
|
|
57
31
|
*/
|
|
58
|
-
|
|
32
|
+
flush($ctx: PlatformContext): Promise<void>;
|
|
59
33
|
/**
|
|
60
|
-
*
|
|
61
|
-
* @param middleware
|
|
62
|
-
* @param ctx
|
|
63
|
-
* @param next
|
|
64
|
-
* @protected
|
|
34
|
+
* @param $ctx
|
|
65
35
|
*/
|
|
66
|
-
|
|
36
|
+
next($ctx: PlatformContext): any;
|
|
67
37
|
/**
|
|
68
|
-
*
|
|
69
|
-
* @param metadata
|
|
70
|
-
*/
|
|
71
|
-
protected createRawHandler(metadata: HandlerMetadata): any;
|
|
72
|
-
/**
|
|
73
|
-
* Set response headers
|
|
74
|
-
* @param ctx
|
|
75
|
-
* @protected
|
|
38
|
+
* Call handler when a request his handle
|
|
76
39
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
protected getDefaultArgs(metadata: HandlerMetadata): (scope: ArgScope<PlatformContext>) => Promise<any[]>;
|
|
40
|
+
onRequest(handler: PlatformParamsCallback, $ctx: PlatformContext): Promise<any>;
|
|
41
|
+
onFinish($ctx: PlatformContext): Promise<unknown>;
|
|
80
42
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { JsonOperationRoute } from "@tsed/schema";
|
|
2
|
-
import { ControllerProvider } from "../domain/ControllerProvider";
|
|
3
2
|
import { PlatformAdapter } from "../services/PlatformAdapter";
|
|
4
3
|
export declare class PlatformMiddlewaresChain {
|
|
5
4
|
protected acceptMimes: string[];
|
|
6
5
|
protected adapter: PlatformAdapter;
|
|
7
|
-
get(
|
|
6
|
+
get(allMiddlewares: any[], operationRoute: JsonOperationRoute): any[];
|
|
8
7
|
protected hasAcceptMimes(operationRoute: JsonOperationRoute): number;
|
|
9
8
|
protected getParamTypes(middlewares: any[], operationRoute: JsonOperationRoute): any;
|
|
10
9
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { IncomingHttpHeaders, IncomingMessage } from "http";
|
|
3
3
|
import type { PlatformContext } from "../domain/PlatformContext";
|
|
4
|
-
import { IncomingEvent } from "../interfaces/IncomingEvent";
|
|
5
4
|
import type { PlatformResponse } from "./PlatformResponse";
|
|
6
5
|
declare global {
|
|
7
6
|
namespace TsED {
|
|
8
7
|
interface Request {
|
|
9
8
|
id: string;
|
|
10
|
-
$ctx: PlatformContext;
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
11
|
}
|
|
@@ -15,16 +13,16 @@ declare global {
|
|
|
15
13
|
* Platform Request abstraction layer.
|
|
16
14
|
* @platform
|
|
17
15
|
*/
|
|
18
|
-
export declare class PlatformRequest<
|
|
16
|
+
export declare class PlatformRequest<Req extends {
|
|
19
17
|
[key: string]: any;
|
|
20
18
|
} = any> {
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
readonly $ctx: PlatformContext;
|
|
20
|
+
constructor($ctx: PlatformContext);
|
|
23
21
|
/**
|
|
24
22
|
* The current @@PlatformResponse@@.
|
|
25
23
|
*/
|
|
26
|
-
response: PlatformResponse;
|
|
27
|
-
|
|
24
|
+
get response(): PlatformResponse;
|
|
25
|
+
get raw(): Req;
|
|
28
26
|
get secure(): boolean;
|
|
29
27
|
get host(): string;
|
|
30
28
|
get protocol(): string;
|
|
@@ -72,10 +70,11 @@ export declare class PlatformRequest<T extends {
|
|
|
72
70
|
[key: string]: any;
|
|
73
71
|
};
|
|
74
72
|
get files(): any;
|
|
73
|
+
get route(): import("@tsed/platform-router").SinglePathType;
|
|
75
74
|
/**
|
|
76
75
|
* Return the original request framework instance
|
|
77
76
|
*/
|
|
78
|
-
get request():
|
|
77
|
+
get request(): Req;
|
|
79
78
|
/**
|
|
80
79
|
* Return the original request node.js instance
|
|
81
80
|
*/
|
|
@@ -100,11 +99,10 @@ export declare class PlatformRequest<T extends {
|
|
|
100
99
|
accepts(mime: string): string | false;
|
|
101
100
|
accepts(mime: string[]): string[] | false;
|
|
102
101
|
isAborted(): any;
|
|
103
|
-
destroy(): void;
|
|
104
102
|
/**
|
|
105
103
|
* Return the Framework response object (express, koa, etc...)
|
|
106
104
|
*/
|
|
107
|
-
getRequest<
|
|
105
|
+
getRequest<R = Req>(): R;
|
|
108
106
|
/**
|
|
109
107
|
* Return the Node.js response object
|
|
110
108
|
*/
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { OutgoingHttpHeaders, ServerResponse } from "http";
|
|
3
|
-
import { IncomingEvent } from "../interfaces/IncomingEvent";
|
|
4
|
-
import type { PlatformRequest } from "./PlatformRequest";
|
|
5
3
|
import type { PlatformContext } from "../domain/PlatformContext";
|
|
4
|
+
import type { PlatformRequest } from "./PlatformRequest";
|
|
6
5
|
declare global {
|
|
7
6
|
namespace TsED {
|
|
8
7
|
interface Response {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
export declare type HeaderValue = Array<boolean | number | string> | boolean | number | string;
|
|
13
11
|
/**
|
|
14
12
|
* Platform Response abstraction layer.
|
|
15
13
|
* @platform
|
|
16
14
|
*/
|
|
17
|
-
export declare class PlatformResponse<
|
|
18
|
-
|
|
15
|
+
export declare class PlatformResponse<Res extends Record<string, any> = any> {
|
|
16
|
+
readonly $ctx: PlatformContext;
|
|
17
|
+
data: any;
|
|
18
|
+
constructor($ctx: PlatformContext);
|
|
19
19
|
/**
|
|
20
20
|
* The current @@PlatformRequest@@.
|
|
21
21
|
*/
|
|
22
|
-
request: PlatformRequest;
|
|
23
|
-
|
|
24
|
-
raw: T;
|
|
25
|
-
constructor({ response }: IncomingEvent, $ctx: PlatformContext);
|
|
22
|
+
get request(): PlatformRequest;
|
|
23
|
+
get raw(): Res;
|
|
26
24
|
/**
|
|
27
25
|
* Get the current statusCode
|
|
28
26
|
*/
|
|
@@ -36,12 +34,11 @@ export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
|
36
34
|
/**
|
|
37
35
|
* Return the original response framework instance
|
|
38
36
|
*/
|
|
39
|
-
get response():
|
|
37
|
+
get response(): Res;
|
|
40
38
|
/**
|
|
41
39
|
* Return the original response node.js instance
|
|
42
40
|
*/
|
|
43
41
|
get res(): ServerResponse;
|
|
44
|
-
static onFinished(res: any, cb: (er: Error | null, message: string) => void): void;
|
|
45
42
|
/**
|
|
46
43
|
* Returns the HTTP response header specified by field. The match is case-insensitive.
|
|
47
44
|
*
|
|
@@ -56,7 +53,7 @@ export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
|
56
53
|
/**
|
|
57
54
|
* Return the Framework response object (express, koa, etc...)
|
|
58
55
|
*/
|
|
59
|
-
getResponse<
|
|
56
|
+
getResponse<R = Res>(): R;
|
|
60
57
|
/**
|
|
61
58
|
* Return the Node.js response object
|
|
62
59
|
*/
|
|
@@ -144,7 +141,7 @@ export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
|
144
141
|
* Send any data to your consumer.
|
|
145
142
|
*
|
|
146
143
|
* This method accept a ReadableStream, a plain object, boolean, string, number, null and undefined data.
|
|
147
|
-
* It
|
|
144
|
+
* It chooses the better way to send the data.
|
|
148
145
|
*
|
|
149
146
|
* @param data
|
|
150
147
|
*/
|
|
@@ -154,8 +151,7 @@ export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
|
154
151
|
* Add a listener to handler the end of the request/response.
|
|
155
152
|
* @param cb
|
|
156
153
|
*/
|
|
157
|
-
onEnd(cb: (
|
|
154
|
+
onEnd(cb: () => Promise<void> | void): this;
|
|
158
155
|
isDone(): boolean;
|
|
159
|
-
destroy(): void;
|
|
160
156
|
isHeadersSent(): boolean;
|
|
161
157
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
2
|
import { Type } from "@tsed/core";
|
|
3
|
+
import { DITest, DITestOptions, InjectorService } from "@tsed/di";
|
|
3
4
|
import { PlatformContext, PlatformContextOptions } from "../domain/PlatformContext";
|
|
4
5
|
import { PlatformAdapter, PlatformBuilderSettings } from "./PlatformAdapter";
|
|
5
6
|
/**
|
|
@@ -51,8 +52,8 @@ export declare class PlatformTest extends DITest {
|
|
|
51
52
|
* });
|
|
52
53
|
* ```
|
|
53
54
|
*/
|
|
54
|
-
static callback(): any;
|
|
55
|
+
static callback(): ((req: import("http").IncomingMessage, res: import("http").ServerResponse) => any) | undefined;
|
|
55
56
|
static createRequest(options?: any): any;
|
|
56
57
|
static createResponse(options?: any): any;
|
|
57
|
-
static createRequestContext(options?: Partial<PlatformContextOptions & any>): PlatformContext
|
|
58
|
+
static createRequestContext(options?: Partial<PlatformContextOptions & any>): PlatformContext<import("./PlatformRequest").PlatformRequest<any>, import("./PlatformResponse").PlatformResponse<any>>;
|
|
58
59
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { InjectorService } from "@tsed/di";
|
|
2
2
|
import { PlatformContext } from "../domain/PlatformContext";
|
|
3
3
|
import { IncomingEvent } from "../interfaces/IncomingEvent";
|
|
4
|
+
import { PlatformRequest } from "../services/PlatformRequest";
|
|
5
|
+
import { PlatformResponse } from "../services/PlatformResponse";
|
|
6
|
+
export declare function buildIgnoreLog(ignoreUrlPatterns: any[] | undefined): ((ignore: boolean, data: any, url: string) => any) | undefined;
|
|
4
7
|
/**
|
|
5
8
|
* Create the TsED context to wrap request, response, injector, etc...
|
|
6
9
|
* @param injector
|
|
7
10
|
* @ignore
|
|
8
11
|
*/
|
|
9
|
-
export declare function createContext(injector: InjectorService): (event: IncomingEvent) => Promise<PlatformContext
|
|
12
|
+
export declare function createContext(injector: InjectorService): (event: IncomingEvent) => Promise<PlatformContext<PlatformRequest<any>, PlatformResponse<any>>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InjectorService } from "@tsed/di";
|
|
2
1
|
import { Type } from "@tsed/core";
|
|
2
|
+
import { InjectorService } from "@tsed/di";
|
|
3
3
|
import { PlatformAdapter } from "../services/PlatformAdapter";
|
|
4
4
|
interface CreateInjectorOptions {
|
|
5
|
-
adapter?: Type<PlatformAdapter<any
|
|
5
|
+
adapter?: Type<PlatformAdapter<any>>;
|
|
6
6
|
settings?: Partial<TsED.Configuration>;
|
|
7
7
|
}
|
|
8
8
|
export declare function createInjector({ adapter, settings }: CreateInjectorOptions): InjectorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/common",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-rc.3",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
18
18
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
19
19
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
20
|
-
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\" -e \"getConfiguration\""
|
|
20
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\" -e \"getConfiguration\"",
|
|
21
|
+
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2"
|
|
21
22
|
},
|
|
22
23
|
"keywords": [
|
|
23
24
|
"Express",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"bugs": {
|
|
49
50
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
50
51
|
},
|
|
51
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
52
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/common",
|
|
52
53
|
"repository": "https://github.com/tsedio/tsed",
|
|
53
54
|
"funding": [
|
|
54
55
|
{
|
|
@@ -61,31 +62,29 @@
|
|
|
61
62
|
}
|
|
62
63
|
],
|
|
63
64
|
"dependencies": {
|
|
64
|
-
"@tsed/components-scan": "7.0.0-
|
|
65
|
-
"@tsed/core": "7.0.0-
|
|
66
|
-
"@tsed/di": "7.0.0-
|
|
67
|
-
"@tsed/exceptions": "7.0.0-
|
|
68
|
-
"@tsed/json-mapper": "7.0.0-
|
|
69
|
-
"@tsed/logger": ">=6.
|
|
70
|
-
"@tsed/logger-file": ">=6.
|
|
71
|
-
"@tsed/perf": "7.0.0-
|
|
72
|
-
"@tsed/platform-
|
|
73
|
-
"@tsed/platform-
|
|
74
|
-
"@tsed/platform-
|
|
75
|
-
"@tsed/platform-
|
|
76
|
-
"@tsed/platform-
|
|
77
|
-
"@tsed/platform-
|
|
78
|
-
"@tsed/platform-views": "7.0.0-
|
|
79
|
-
"@tsed/schema": "7.0.0-
|
|
65
|
+
"@tsed/components-scan": "7.0.0-rc.3",
|
|
66
|
+
"@tsed/core": "7.0.0-rc.3",
|
|
67
|
+
"@tsed/di": "7.0.0-rc.3",
|
|
68
|
+
"@tsed/exceptions": "7.0.0-rc.3",
|
|
69
|
+
"@tsed/json-mapper": "7.0.0-rc.3",
|
|
70
|
+
"@tsed/logger": ">=6.2.0",
|
|
71
|
+
"@tsed/logger-file": ">=6.2.0",
|
|
72
|
+
"@tsed/perf": "7.0.0-rc.3",
|
|
73
|
+
"@tsed/platform-exceptions": "7.0.0-rc.3",
|
|
74
|
+
"@tsed/platform-log-middleware": "7.0.0-rc.3",
|
|
75
|
+
"@tsed/platform-middlewares": "7.0.0-rc.3",
|
|
76
|
+
"@tsed/platform-params": "7.0.0-rc.3",
|
|
77
|
+
"@tsed/platform-response-filter": "7.0.0-rc.3",
|
|
78
|
+
"@tsed/platform-router": "7.0.0-rc.3",
|
|
79
|
+
"@tsed/platform-views": "7.0.0-rc.3",
|
|
80
|
+
"@tsed/schema": "7.0.0-rc.3",
|
|
80
81
|
"@types/json-schema": "7.0.11",
|
|
81
|
-
"
|
|
82
|
-
"on-finished": "2.4.1",
|
|
83
|
-
"tslib": "2.3.1",
|
|
82
|
+
"tslib": "2.4.0",
|
|
84
83
|
"uuid": "8.3.2"
|
|
85
84
|
},
|
|
86
85
|
"peerDependencies": {
|
|
87
|
-
"@tsed/logger": ">=6.
|
|
88
|
-
"@tsed/logger-file": ">=6.
|
|
86
|
+
"@tsed/logger": ">=6.2.0",
|
|
87
|
+
"@tsed/logger-file": ">=6.2.0"
|
|
89
88
|
},
|
|
90
89
|
"peerDependenciesMeta": {
|
|
91
90
|
"@tsed/logger": {
|
|
@@ -95,5 +94,8 @@
|
|
|
95
94
|
"optional": false
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
|
-
"devDependencies": {}
|
|
97
|
+
"devDependencies": {},
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"tag": "rc"
|
|
100
|
+
}
|
|
99
101
|
}
|
package/readme.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
12
12
|
[](https://github.com/semantic-release/semantic-release)
|
|
13
13
|
[](https://github.com/prettier/prettier)
|
|
14
|
-
[](https://github.com/sponsors/romakita)
|
|
15
|
+
[](https://opencollective.com/tsed)
|
|
15
16
|
|
|
16
17
|
</div>
|
|
17
18
|
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildRouter = exports.createRouter = exports.getRouter = void 0;
|
|
4
|
-
const di_1 = require("@tsed/di");
|
|
5
|
-
const schema_1 = require("@tsed/schema");
|
|
6
|
-
const ControllerProvider_1 = require("../domain/ControllerProvider");
|
|
7
|
-
const PlatformRouter_1 = require("../services/PlatformRouter");
|
|
8
|
-
const PlatformMiddlewaresChain_1 = require("../services/PlatformMiddlewaresChain");
|
|
9
|
-
di_1.GlobalProviders.createRegistry(di_1.ProviderType.CONTROLLER, ControllerProvider_1.ControllerProvider, {
|
|
10
|
-
onInvoke(provider, locals, { injector }) {
|
|
11
|
-
const router = createRouter(injector, provider);
|
|
12
|
-
locals.set(PlatformRouter_1.PlatformRouter, router);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* @ignore
|
|
17
|
-
*/
|
|
18
|
-
function formatMethod(method) {
|
|
19
|
-
return (method === schema_1.OperationMethods.CUSTOM ? "use" : method || "use").toLowerCase();
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @ignore
|
|
23
|
-
*/
|
|
24
|
-
function getRouter(injector, provider) {
|
|
25
|
-
return injector.get(provider.tokenRouter);
|
|
26
|
-
}
|
|
27
|
-
exports.getRouter = getRouter;
|
|
28
|
-
/**
|
|
29
|
-
* @ignore
|
|
30
|
-
*/
|
|
31
|
-
function createRouter(injector, provider) {
|
|
32
|
-
const token = provider.tokenRouter;
|
|
33
|
-
if (injector.has(token)) {
|
|
34
|
-
return getRouter(injector, provider);
|
|
35
|
-
}
|
|
36
|
-
const router = PlatformRouter_1.PlatformRouter.create(injector, provider.routerOptions);
|
|
37
|
-
return injector
|
|
38
|
-
.add(token, {
|
|
39
|
-
useValue: router
|
|
40
|
-
})
|
|
41
|
-
.invoke(token);
|
|
42
|
-
}
|
|
43
|
-
exports.createRouter = createRouter;
|
|
44
|
-
/**
|
|
45
|
-
* @ignore
|
|
46
|
-
* @param injector
|
|
47
|
-
* @param provider
|
|
48
|
-
* @param parentUseBefore
|
|
49
|
-
*/
|
|
50
|
-
function buildRouter(injector, provider, parentUseBefore = []) {
|
|
51
|
-
const { middlewares: { useBefore }, children } = provider;
|
|
52
|
-
// Controller lifecycle
|
|
53
|
-
const router = createRouter(injector, provider);
|
|
54
|
-
if (!router.isBuilt) {
|
|
55
|
-
router.isBuilt = true;
|
|
56
|
-
const platformMiddlewaresChain = injector.get(PlatformMiddlewaresChain_1.PlatformMiddlewaresChain);
|
|
57
|
-
// build all endpoints and his middlewares
|
|
58
|
-
(0, schema_1.getOperationsRoutes)(provider.token).forEach((operationRoute) => {
|
|
59
|
-
const handlers = platformMiddlewaresChain === null || platformMiddlewaresChain === void 0 ? void 0 : platformMiddlewaresChain.get(provider, operationRoute, parentUseBefore);
|
|
60
|
-
router.addRoute({
|
|
61
|
-
handlers,
|
|
62
|
-
token: operationRoute.token,
|
|
63
|
-
method: formatMethod(operationRoute.method),
|
|
64
|
-
path: operationRoute.path,
|
|
65
|
-
isFinal: operationRoute.isFinal
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
const middlewares = [...parentUseBefore, ...useBefore];
|
|
69
|
-
// build children controllers
|
|
70
|
-
children.forEach((child) => {
|
|
71
|
-
const childProvider = injector.getProvider(child);
|
|
72
|
-
/* istanbul ignore next */
|
|
73
|
-
if (!childProvider) {
|
|
74
|
-
throw new Error("Controller component not found in the ControllerRegistry");
|
|
75
|
-
}
|
|
76
|
-
router.use(childProvider.path, buildRouter(injector, childProvider, middlewares));
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return router;
|
|
80
|
-
}
|
|
81
|
-
exports.buildRouter = buildRouter;
|
|
82
|
-
//# sourceMappingURL=PlatformControllerBuilder.js.map
|