@tsed/common 6.95.9 → 6.95.10

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.
Files changed (90) hide show
  1. package/package.json +15 -15
  2. package/lib/cjs/PlatformModule.d.ts +0 -6
  3. package/lib/cjs/builder/PlatformBuilder.d.ts +0 -104
  4. package/lib/cjs/builder/PlatformControllerBuilder.d.ts +0 -17
  5. package/lib/cjs/config/index.d.ts +0 -3
  6. package/lib/cjs/config/interfaces/ConverterSettings.d.ts +0 -6
  7. package/lib/cjs/config/interfaces/EndpointDirectoriesSettings.d.ts +0 -3
  8. package/lib/cjs/config/interfaces/PlatformLoggerSettings.d.ts +0 -44
  9. package/lib/cjs/config/interfaces/PlatformMulterSettings.d.ts +0 -138
  10. package/lib/cjs/config/interfaces/PlatformStaticsSettings.d.ts +0 -17
  11. package/lib/cjs/config/interfaces/index.d.ts +0 -97
  12. package/lib/cjs/config/services/PlatformConfiguration.d.ts +0 -81
  13. package/lib/cjs/constants/routerOptions.d.ts +0 -1
  14. package/lib/cjs/decorators/httpServer.d.ts +0 -28
  15. package/lib/cjs/decorators/httpsServer.d.ts +0 -28
  16. package/lib/cjs/decorators/index.d.ts +0 -16
  17. package/lib/cjs/decorators/method/acceptMime.d.ts +0 -19
  18. package/lib/cjs/decorators/method/endpointFn.d.ts +0 -9
  19. package/lib/cjs/decorators/method/location.d.ts +0 -1
  20. package/lib/cjs/decorators/method/redirect.d.ts +0 -1
  21. package/lib/cjs/decorators/method/route.d.ts +0 -1
  22. package/lib/cjs/decorators/method/view.d.ts +0 -25
  23. package/lib/cjs/decorators/multer/index.d.ts +0 -3
  24. package/lib/cjs/decorators/multer/multerFileSize.d.ts +0 -27
  25. package/lib/cjs/decorators/multer/multerOptions.d.ts +0 -41
  26. package/lib/cjs/decorators/multer/multipartFile.d.ts +0 -47
  27. package/lib/cjs/decorators/params/endpointInfo.d.ts +0 -13
  28. package/lib/cjs/decorators/params/error.d.ts +0 -7
  29. package/lib/cjs/decorators/params/next.d.ts +0 -22
  30. package/lib/cjs/decorators/params/request.d.ts +0 -46
  31. package/lib/cjs/decorators/params/response.d.ts +0 -40
  32. package/lib/cjs/decorators/params/responseData.d.ts +0 -9
  33. package/lib/cjs/domain/AnyToPromiseWithCtx.d.ts +0 -18
  34. package/lib/cjs/domain/ControllerProvider.d.ts +0 -24
  35. package/lib/cjs/domain/EndpointMetadata.d.ts +0 -50
  36. package/lib/cjs/domain/HandlerMetadata.d.ts +0 -32
  37. package/lib/cjs/domain/PlatformContext.d.ts +0 -65
  38. package/lib/cjs/domain/PlatformRouteDetails.d.ts +0 -23
  39. package/lib/cjs/domain/PropertyMetadata.d.ts +0 -17
  40. package/lib/cjs/domain/index.d.ts +0 -7
  41. package/lib/cjs/index.d.ts +0 -22
  42. package/lib/cjs/interfaces/AfterInit.d.ts +0 -3
  43. package/lib/cjs/interfaces/AfterListen.d.ts +0 -3
  44. package/lib/cjs/interfaces/AfterRoutesInit.d.ts +0 -3
  45. package/lib/cjs/interfaces/BeforeInit.d.ts +0 -3
  46. package/lib/cjs/interfaces/BeforeListen.d.ts +0 -3
  47. package/lib/cjs/interfaces/BeforeRoutesInit.d.ts +0 -3
  48. package/lib/cjs/interfaces/HandlerType.d.ts +0 -12
  49. package/lib/cjs/interfaces/IncomingEvent.d.ts +0 -6
  50. package/lib/cjs/interfaces/OnReady.d.ts +0 -3
  51. package/lib/cjs/interfaces/OnRequest.d.ts +0 -4
  52. package/lib/cjs/interfaces/OnResponse.d.ts +0 -4
  53. package/lib/cjs/interfaces/OnRoutesInit.d.ts +0 -3
  54. package/lib/cjs/interfaces/PathType.d.ts +0 -1
  55. package/lib/cjs/interfaces/PlatformAdapter.d.ts +0 -19
  56. package/lib/cjs/interfaces/PlatformRouteOptions.d.ts +0 -16
  57. package/lib/cjs/interfaces/ResponseErrorObject.d.ts +0 -8
  58. package/lib/cjs/interfaces/Route.d.ts +0 -10
  59. package/lib/cjs/interfaces/index.d.ts +0 -17
  60. package/lib/cjs/middlewares/AcceptMimesMiddleware.d.ts +0 -10
  61. package/lib/cjs/middlewares/GlobalAcceptMimesMiddleware.d.ts +0 -9
  62. package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.d.ts +0 -10
  63. package/lib/cjs/middlewares/PlatformMulterMiddleware.d.ts +0 -19
  64. package/lib/cjs/middlewares/__mock__/FakeCtrl.d.ts +0 -2
  65. package/lib/cjs/middlewares/bindEndpointMiddleware.d.ts +0 -5
  66. package/lib/cjs/middlewares/index.d.ts +0 -5
  67. package/lib/cjs/services/FakeRawDriver.d.ts +0 -15
  68. package/lib/cjs/services/Platform.d.ts +0 -37
  69. package/lib/cjs/services/PlatformApplication.d.ts +0 -21
  70. package/lib/cjs/services/PlatformHandler.d.ts +0 -80
  71. package/lib/cjs/services/PlatformMiddlewaresChain.d.ts +0 -6
  72. package/lib/cjs/services/PlatformRequest.d.ts +0 -112
  73. package/lib/cjs/services/PlatformResponse.d.ts +0 -161
  74. package/lib/cjs/services/PlatformRouter.d.ts +0 -48
  75. package/lib/cjs/services/PlatformTest.d.ts +0 -58
  76. package/lib/cjs/services/index.d.ts +0 -8
  77. package/lib/cjs/utils/createContext.d.ts +0 -9
  78. package/lib/cjs/utils/createHandlerMetadata.d.ts +0 -8
  79. package/lib/cjs/utils/createHttpServer.d.ts +0 -4
  80. package/lib/cjs/utils/createHttpsServer.d.ts +0 -4
  81. package/lib/cjs/utils/createInjector.d.ts +0 -7
  82. package/lib/cjs/utils/getConfiguration.d.ts +0 -2
  83. package/lib/cjs/utils/getStaticsOptions.d.ts +0 -5
  84. package/lib/cjs/utils/index.d.ts +0 -8
  85. package/lib/cjs/utils/listenServer.d.ts +0 -7
  86. package/lib/cjs/utils/loadInjector.d.ts +0 -6
  87. package/lib/cjs/utils/mapReturnedResponse.d.ts +0 -4
  88. package/lib/cjs/utils/printRoutes.d.ts +0 -2
  89. package/lib/cjs/utils/setResponseHeaders.d.ts +0 -5
  90. package/lib/cjs/utils/useCtxHandler.d.ts +0 -13
@@ -1,58 +0,0 @@
1
- import { DITest, InjectorService } from "@tsed/di";
2
- import { PlatformContext, PlatformContextOptions } from "../domain/PlatformContext";
3
- import { PlatformAdapter, PlatformBuilderSettings } from "../interfaces/PlatformAdapter";
4
- import { Type } from "@tsed/core";
5
- /**
6
- * @platform
7
- */
8
- export declare class PlatformTest extends DITest {
9
- static adapter: Type<PlatformAdapter>;
10
- static create(settings?: Partial<TsED.Configuration>): Promise<void>;
11
- /**
12
- * Create a new injector with the right default services
13
- */
14
- static createInjector(settings?: any): InjectorService;
15
- /**
16
- * Load the server silently without listening port and configure it on test profile.
17
- * @decorator
18
- * @param mod
19
- * @param listen
20
- * @param settings
21
- * @returns {Promise<void>}
22
- */
23
- static bootstrap(mod: any, { listen, ...settings }?: Partial<PlatformBuilderSettings & {
24
- listen: boolean;
25
- }>): () => Promise<void>;
26
- /**
27
- * It injects services into the test function where you can alter, spy on, and manipulate them.
28
- *
29
- * The inject function has two parameters
30
- *
31
- * * an array of Service dependency injection tokens,
32
- * * a test function whose parameters correspond exactly to each item in the injection token array.
33
- *
34
- * @param targets
35
- * @param func
36
- */
37
- static inject<T>(targets: any[], func: (...args: any[]) => Promise<T> | T): () => Promise<T>;
38
- /**
39
- * Return the raw application (express or koa).
40
- * Use this callback with SuperTest.
41
- *
42
- * ```typescript
43
- * let request: SuperTest.SuperTest<SuperTest.Test>;
44
- * beforeEach(PlatformTest.bootstrap(Server, {
45
- * mount: {
46
- * "/rest": [ProductsController]
47
- * }
48
- * }));
49
- * beforeEach(() => {
50
- * request = SuperTest(PlatformTest.callback());
51
- * });
52
- * ```
53
- */
54
- static callback(): any;
55
- static createRequest(options?: any): any;
56
- static createResponse(options?: any): any;
57
- static createRequestContext(options?: Partial<PlatformContextOptions & any>): PlatformContext;
58
- }
@@ -1,8 +0,0 @@
1
- export * from "./Platform";
2
- export * from "./PlatformApplication";
3
- export * from "./PlatformHandler";
4
- export * from "./PlatformRequest";
5
- export * from "./PlatformResponse";
6
- export * from "./PlatformRouter";
7
- export * from "./PlatformTest";
8
- export * from "./PlatformMiddlewaresChain";
@@ -1,9 +0,0 @@
1
- import { InjectorService } from "@tsed/di";
2
- import { PlatformContext } from "../domain/PlatformContext";
3
- import { IncomingEvent } from "../interfaces/IncomingEvent";
4
- /**
5
- * Create the TsED context to wrap request, response, injector, etc...
6
- * @param injector
7
- * @ignore
8
- */
9
- export declare function createContext(injector: InjectorService): (event: IncomingEvent) => Promise<PlatformContext>;
@@ -1,8 +0,0 @@
1
- import { InjectorService } from "@tsed/di";
2
- import { EndpointMetadata } from "../domain/EndpointMetadata";
3
- import { HandlerMetadata } from "../domain/HandlerMetadata";
4
- import { PlatformRouteWithoutHandlers } from "../interfaces/PlatformRouteOptions";
5
- /**
6
- * @ignore
7
- */
8
- export declare function createHandlerMetadata(injector: InjectorService, obj: any | EndpointMetadata, routeOptions?: PlatformRouteWithoutHandlers): HandlerMetadata;
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- import { InjectorService } from "@tsed/di";
3
- import Http from "http";
4
- export declare function createHttpServer(injector: InjectorService, requestListener: Http.RequestListener): (() => Promise<void>) | undefined;
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- import { InjectorService } from "@tsed/di";
3
- import Http from "http";
4
- export declare function createHttpsServer(injector: InjectorService, requestListener?: Http.RequestListener): (() => Promise<void>) | undefined;
@@ -1,7 +0,0 @@
1
- import { InjectorService, IProvider } from "@tsed/di";
2
- interface CreateInjectorOptions {
3
- providers?: IProvider[];
4
- settings?: Partial<TsED.Configuration>;
5
- }
6
- export declare function createInjector({ providers, settings }: CreateInjectorOptions): InjectorService;
7
- export {};
@@ -1,2 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- export declare function getConfiguration(configuration?: any, module?: Type<any> | null): any;
@@ -1,5 +0,0 @@
1
- import { PlatformStaticsOptions, PlatformStaticsSettings } from "../config/interfaces/PlatformStaticsSettings";
2
- export declare function getStaticsOptions(statics?: PlatformStaticsSettings): {
3
- path: string;
4
- options: PlatformStaticsOptions;
5
- }[];
@@ -1,8 +0,0 @@
1
- export * from "./createInjector";
2
- export * from "./createHttpServer";
3
- export * from "./createHttpsServer";
4
- export * from "./loadInjector";
5
- export * from "./printRoutes";
6
- export * from "./listenServer";
7
- export * from "./createContext";
8
- export * from "./useCtxHandler";
@@ -1,7 +0,0 @@
1
- /// <reference types="node" />
2
- import type Http from "http";
3
- import type Https from "https";
4
- import type Http2 from "http2";
5
- import { InjectorService } from "@tsed/di";
6
- import { getHostInfoFromPort } from "@tsed/core";
7
- export declare function listenServer(injector: InjectorService, server: Http.Server | Https.Server | Http2.Http2Server, hostInfo: ReturnType<typeof getHostInfoFromPort>): Promise<ReturnType<typeof getHostInfoFromPort>>;
@@ -1,6 +0,0 @@
1
- import { Container, InjectorService, LocalsContainer } from "@tsed/di";
2
- /**
3
- * @ignore
4
- * @deprecated User injector.load(container, module) instead
5
- */
6
- export declare function loadInjector(injector: InjectorService, container?: Container): Promise<LocalsContainer<any>>;
@@ -1,4 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare function mapReturnedResponse({ use, collection, ...options }: any): any;
@@ -1,2 +0,0 @@
1
- import { PlatformRouteDetails } from "../domain/PlatformRouteDetails";
2
- export declare function printRoutes(routes: PlatformRouteDetails[]): string;
@@ -1,5 +0,0 @@
1
- import { PlatformContext } from "../domain/PlatformContext";
2
- /**
3
- * @ignore
4
- */
5
- export declare function setResponseHeaders(ctx: PlatformContext): void;
@@ -1,13 +0,0 @@
1
- import { PlatformContext } from "../domain/PlatformContext";
2
- import { HandlerType } from "../interfaces/HandlerType";
3
- export declare type PlatformCtxHandler = ($ctx: PlatformContext) => any | Promise<any>;
4
- /**
5
- * Create Ts.ED context handler
6
- * @param fn
7
- * @ignore
8
- */
9
- export declare function useCtxHandler(fn: PlatformCtxHandler & {
10
- type?: HandlerType;
11
- }): PlatformCtxHandler & {
12
- type?: HandlerType | undefined;
13
- };