@tsed/common 6.86.2 → 6.88.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 +12 -14
- package/lib/decorators/index.d.ts +1 -0
- package/lib/decorators/method/view.d.ts +25 -0
- package/lib/domain/ControllerProvider.d.ts +1 -4
- package/lib/index.d.ts +0 -2
- package/lib/index.js +288 -262
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +286 -255
- package/lib/index.modern.js.map +1 -1
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/services/Platform.d.ts +0 -1
- package/lib/services/PlatformMiddlewaresChain.d.ts +6 -0
- package/lib/services/PlatformRequest.d.ts +2 -1
- package/lib/services/PlatformResponse.d.ts +4 -4
- package/lib/services/PlatformRouter.d.ts +1 -0
- package/lib/services/PlatformTest.d.ts +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/utils/createInjector.d.ts +7 -2
- package/lib/utils/index.d.ts +0 -1
- package/package.json +15 -15
- package/lib/interfaces/PlatformRouterMethods.d.ts +0 -10
- package/lib/registries/ControllerRegistry.d.ts +0 -1
- package/lib/utils/createPlatformApplication.d.ts +0 -2
|
@@ -113,5 +113,4 @@ export declare abstract class PlatformBuilder<App = TsED.Application, Router = T
|
|
|
113
113
|
protected listenServers(): Promise<void>;
|
|
114
114
|
protected logRoutes(): Promise<void>;
|
|
115
115
|
protected loadRoutes(): Promise<void>;
|
|
116
|
-
protected createInjector(module: Type<any>, providers: IProvider[], settings: any): void;
|
|
117
116
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { InjectorService } from "@tsed/di";
|
|
2
2
|
import { ControllerProvider } from "../domain/ControllerProvider";
|
|
3
|
-
import {
|
|
3
|
+
import { PlatformRouter } from "../services/PlatformRouter";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private buildMiddlewares;
|
|
19
|
-
}
|
|
7
|
+
export declare function getRouter(injector: InjectorService, provider: ControllerProvider): any;
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
11
|
+
export declare function createRouter(injector: InjectorService, provider: ControllerProvider): PlatformRouter;
|
|
12
|
+
/**
|
|
13
|
+
* @ignore
|
|
14
|
+
* @param injector
|
|
15
|
+
* @param provider
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildRouter(injector: InjectorService, provider: ControllerProvider): PlatformRouter<TsED.Router>;
|
|
@@ -6,6 +6,7 @@ export * from "./method/acceptMime";
|
|
|
6
6
|
export * from "./method/location";
|
|
7
7
|
export * from "./method/redirect";
|
|
8
8
|
export * from "./method/endpointFn";
|
|
9
|
+
export * from "./method/view";
|
|
9
10
|
export * from "./params/responseData";
|
|
10
11
|
export * from "./params/response";
|
|
11
12
|
export * from "./params/request";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use a view and sends the rendered HTML string to the client. Optional parameter:
|
|
3
|
+
*
|
|
4
|
+
* * viewOptions, an object whose properties define local variables for the view.
|
|
5
|
+
*
|
|
6
|
+
* The view argument is a string that is the file path of the view file to render.
|
|
7
|
+
* This can be an absolute path, or a path relative to the views setting.
|
|
8
|
+
* If the path does not contain a file extension, then the view engine setting determines the file extension.
|
|
9
|
+
* If the path does contain a file extension, then Express will load the module for the specified template engine (via require())
|
|
10
|
+
* and render it using the loaded module’s __express function.
|
|
11
|
+
*
|
|
12
|
+
* For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).
|
|
13
|
+
*
|
|
14
|
+
* > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,
|
|
15
|
+
* and as so for security reasons should not contain input from the end-user.
|
|
16
|
+
*
|
|
17
|
+
* @param path Relative path to the view file.
|
|
18
|
+
* @param options Additional options
|
|
19
|
+
* @decorator
|
|
20
|
+
* @operation
|
|
21
|
+
* @response
|
|
22
|
+
* @ignores
|
|
23
|
+
* @deprecated Use View decorator from @tsed/platform-views instead.
|
|
24
|
+
*/
|
|
25
|
+
export declare function View(path: string, options?: Object): MethodDecorator;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ControllerMiddlewares, Provider, TokenProvider } from "@tsed/di";
|
|
2
|
-
import { PlatformRouterMethods } from "../interfaces/PlatformRouterMethods";
|
|
3
2
|
export declare class ControllerProvider<T = any> extends Provider<T> {
|
|
4
|
-
|
|
3
|
+
readonly tokenRouter: string;
|
|
5
4
|
constructor(provide: TokenProvider, options?: Partial<Provider>);
|
|
6
5
|
/**
|
|
7
6
|
*
|
|
@@ -22,6 +21,4 @@ export declare class ControllerProvider<T = any> extends Provider<T> {
|
|
|
22
21
|
* @param middlewares
|
|
23
22
|
*/
|
|
24
23
|
set middlewares(middlewares: ControllerMiddlewares);
|
|
25
|
-
getRouter<T extends PlatformRouterMethods = any>(): T;
|
|
26
|
-
setRouter(router: PlatformRouterMethods): this;
|
|
27
24
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from "@tsed/platform-exceptions";
|
|
|
6
6
|
export * from "@tsed/platform-response-filter";
|
|
7
7
|
export * from "@tsed/platform-cache";
|
|
8
8
|
export * from "@tsed/platform-middlewares";
|
|
9
|
-
export * from "@tsed/platform-views";
|
|
10
9
|
export * from "@tsed/components-scan";
|
|
11
10
|
export * from "@tsed/platform-log-middleware";
|
|
12
11
|
export { $log, Logger } from "@tsed/logger";
|
|
@@ -19,6 +18,5 @@ export * from "./interfaces";
|
|
|
19
18
|
export * from "./middlewares";
|
|
20
19
|
export * from "./domain";
|
|
21
20
|
export * from "./services";
|
|
22
|
-
export * from "./registries/ControllerRegistry";
|
|
23
21
|
export * from "./utils";
|
|
24
22
|
export * from "./PlatformModule";
|