@tsed/common 6.75.10 → 6.77.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/builder/PlatformBuilder.d.ts +0 -1
- package/lib/builder/PlatformControllerBuilder.d.ts +1 -1
- package/lib/decorators/method/endpointFn.d.ts +1 -0
- package/lib/domain/ControllerProvider.d.ts +0 -26
- package/lib/domain/EndpointMetadata.d.ts +0 -7
- package/lib/domain/PlatformRouteDetails.d.ts +4 -5
- package/lib/index.d.ts +2 -0
- package/lib/index.js +103 -268
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +107 -272
- package/lib/index.modern.js.map +1 -1
- package/lib/interfaces/PlatformRouteOptions.d.ts +6 -4
- package/lib/services/Platform.d.ts +3 -8
- package/lib/services/PlatformRouter.d.ts +2 -2
- package/package.json +17 -16
- package/lib/utils/getControllerPath.d.ts +0 -2
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from "@tsed/core";
|
|
2
|
+
import { PathType } from "./PathType";
|
|
2
3
|
/**
|
|
3
4
|
* @ignore
|
|
4
5
|
*/
|
|
5
6
|
export interface PlatformRouteOptions {
|
|
6
|
-
|
|
7
|
-
path
|
|
8
|
-
|
|
7
|
+
token?: Type<any>;
|
|
8
|
+
path?: PathType | undefined;
|
|
9
|
+
method?: string;
|
|
9
10
|
isFinal?: boolean;
|
|
11
|
+
handlers: any[];
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* @ignore
|
|
@@ -2,6 +2,7 @@ import { InjectorService, TokenProvider } from "@tsed/di";
|
|
|
2
2
|
import { PlatformRouteDetails } from "../domain";
|
|
3
3
|
import { Route, RouteController } from "../interfaces/Route";
|
|
4
4
|
import { PlatformApplication } from "./PlatformApplication";
|
|
5
|
+
import "../registries/ControllerRegistry";
|
|
5
6
|
/**
|
|
6
7
|
* `Platform` is used to provide all routes collected by annotation `@Controller`.
|
|
7
8
|
*
|
|
@@ -15,15 +16,15 @@ export declare class Platform {
|
|
|
15
16
|
constructor(injector: InjectorService, platformApplication: PlatformApplication);
|
|
16
17
|
get app(): PlatformApplication<TsED.Application, TsED.Router>;
|
|
17
18
|
get routes(): PlatformRouteDetails[];
|
|
18
|
-
protected $onInit(): void;
|
|
19
19
|
addRoutes(routes: Route[]): void;
|
|
20
|
-
addRoute(
|
|
20
|
+
addRoute(basePath: string, token: TokenProvider): this | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* Get all routes built by TsExpressDecorators and mounted on Express application.
|
|
23
23
|
* @returns {PlatformRouteDetails[]}
|
|
24
24
|
*/
|
|
25
25
|
getRoutes(): PlatformRouteDetails[];
|
|
26
26
|
getMountedControllers(): RouteController[];
|
|
27
|
+
protected $onInit(): void;
|
|
27
28
|
/**
|
|
28
29
|
* Create routers from the collected controllers.
|
|
29
30
|
* @private
|
|
@@ -34,10 +35,4 @@ export declare class Platform {
|
|
|
34
35
|
* @private
|
|
35
36
|
*/
|
|
36
37
|
private buildControllers;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param ctrl
|
|
40
|
-
* @param endpointUrl
|
|
41
|
-
*/
|
|
42
|
-
private buildRoutes;
|
|
43
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectorService, PathType } from "@tsed/di";
|
|
2
2
|
import { PlatformMulter, PlatformMulterSettings, PlatformStaticsOptions } from "../config";
|
|
3
|
-
import {
|
|
3
|
+
import { PlatformRouteOptions, PlatformRouteWithoutHandlers } from "../interfaces";
|
|
4
4
|
import { PlatformHandler } from "./PlatformHandler";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
@@ -32,7 +32,7 @@ export declare class PlatformRouter<Router = TsED.Router> {
|
|
|
32
32
|
callback(): any;
|
|
33
33
|
getRouter(): Router;
|
|
34
34
|
use(...handlers: any[]): this;
|
|
35
|
-
addRoute(options: PlatformRouteOptions): this;
|
|
35
|
+
addRoute(options: Partial<PlatformRouteOptions>): this;
|
|
36
36
|
all(path: PathType, ...handlers: any[]): this;
|
|
37
37
|
get(path: PathType, ...handlers: any[]): this;
|
|
38
38
|
post(path: PathType, ...handlers: any[]): this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.77.0",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -55,21 +55,22 @@
|
|
|
55
55
|
"build": "microbundle --target node --no-compress --format modern,cjs --tsconfig ./tsconfig.compile.json"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@tsed/components-scan": "6.
|
|
59
|
-
"@tsed/core": "6.
|
|
60
|
-
"@tsed/di": "6.
|
|
61
|
-
"@tsed/exceptions": "6.
|
|
62
|
-
"@tsed/json-mapper": "6.
|
|
63
|
-
"@tsed/logger": "^
|
|
64
|
-
"@tsed/
|
|
65
|
-
"@tsed/
|
|
66
|
-
"@tsed/platform-
|
|
67
|
-
"@tsed/platform-
|
|
68
|
-
"@tsed/platform-
|
|
69
|
-
"@tsed/platform-
|
|
70
|
-
"@tsed/platform-
|
|
71
|
-
"@tsed/platform-
|
|
72
|
-
"@tsed/
|
|
58
|
+
"@tsed/components-scan": "6.77.0",
|
|
59
|
+
"@tsed/core": "6.77.0",
|
|
60
|
+
"@tsed/di": "6.77.0",
|
|
61
|
+
"@tsed/exceptions": "6.77.0",
|
|
62
|
+
"@tsed/json-mapper": "6.77.0",
|
|
63
|
+
"@tsed/logger": "^6.0.0",
|
|
64
|
+
"@tsed/logger-file": "^6.0.0",
|
|
65
|
+
"@tsed/perf": "6.77.0",
|
|
66
|
+
"@tsed/platform-cache": "6.77.0",
|
|
67
|
+
"@tsed/platform-exceptions": "6.77.0",
|
|
68
|
+
"@tsed/platform-log-middleware": "6.77.0",
|
|
69
|
+
"@tsed/platform-middlewares": "6.77.0",
|
|
70
|
+
"@tsed/platform-params": "6.77.0",
|
|
71
|
+
"@tsed/platform-response-filter": "6.77.0",
|
|
72
|
+
"@tsed/platform-views": "6.77.0",
|
|
73
|
+
"@tsed/schema": "6.77.0",
|
|
73
74
|
"@types/json-schema": "7.0.7",
|
|
74
75
|
"json-schema": "^0.2.3",
|
|
75
76
|
"on-finished": "2.3.0",
|