@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.
@@ -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 { PlatformRouterMethods } from "../interfaces/PlatformRouterMethods";
3
+ import { PlatformRouter } from "../services/PlatformRouter";
4
4
  /**
5
5
  * @ignore
6
6
  */
7
- export declare class PlatformControllerBuilder {
8
- private provider;
9
- constructor(provider: ControllerProvider);
10
- /**
11
- * @returns {any}
12
- */
13
- build(injector: InjectorService): PlatformRouterMethods;
14
- private buildEndpoints;
15
- private buildEndpoint;
16
- private getMiddlewares;
17
- private buildChildrenCtrls;
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
- private router;
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";