@tsed/platform-express 7.0.0-beta.8 → 7.0.0-rc.2

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 (52) hide show
  1. package/coverage.json +6 -0
  2. package/jest.config.js +9 -0
  3. package/lib/cjs/components/PlatformExpress.js +67 -66
  4. package/lib/cjs/components/PlatformExpress.js.map +1 -1
  5. package/lib/cjs/index.js +0 -7
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/interfaces/PlatformExpressSettings.js.map +1 -1
  8. package/lib/esm/components/PlatformExpress.js +67 -67
  9. package/lib/esm/components/PlatformExpress.js.map +1 -1
  10. package/lib/esm/index.js +0 -7
  11. package/lib/esm/index.js.map +1 -1
  12. package/lib/esm/interfaces/PlatformExpressSettings.js.map +1 -1
  13. package/lib/types/components/PlatformExpress.d.ts +12 -27
  14. package/lib/types/index.d.ts +0 -7
  15. package/lib/types/interfaces/PlatformExpressSettings.d.ts +4 -4
  16. package/package.json +28 -20
  17. package/readme.md +3 -2
  18. package/lib/cjs/decorators/caseSensitive.js +0 -31
  19. package/lib/cjs/decorators/caseSensitive.js.map +0 -1
  20. package/lib/cjs/decorators/mergeParams.js +0 -31
  21. package/lib/cjs/decorators/mergeParams.js.map +0 -1
  22. package/lib/cjs/decorators/routerSettings.js +0 -32
  23. package/lib/cjs/decorators/routerSettings.js.map +0 -1
  24. package/lib/cjs/decorators/strict.js +0 -31
  25. package/lib/cjs/decorators/strict.js.map +0 -1
  26. package/lib/cjs/services/PlatformExpressHandler.js +0 -31
  27. package/lib/cjs/services/PlatformExpressHandler.js.map +0 -1
  28. package/lib/cjs/services/PlatformExpressRequest.js +0 -12
  29. package/lib/cjs/services/PlatformExpressRequest.js.map +0 -1
  30. package/lib/cjs/services/PlatformExpressResponse.js +0 -12
  31. package/lib/cjs/services/PlatformExpressResponse.js.map +0 -1
  32. package/lib/esm/decorators/caseSensitive.js +0 -27
  33. package/lib/esm/decorators/caseSensitive.js.map +0 -1
  34. package/lib/esm/decorators/mergeParams.js +0 -27
  35. package/lib/esm/decorators/mergeParams.js.map +0 -1
  36. package/lib/esm/decorators/routerSettings.js +0 -28
  37. package/lib/esm/decorators/routerSettings.js.map +0 -1
  38. package/lib/esm/decorators/strict.js +0 -27
  39. package/lib/esm/decorators/strict.js.map +0 -1
  40. package/lib/esm/services/PlatformExpressHandler.js +0 -27
  41. package/lib/esm/services/PlatformExpressHandler.js.map +0 -1
  42. package/lib/esm/services/PlatformExpressRequest.js +0 -8
  43. package/lib/esm/services/PlatformExpressRequest.js.map +0 -1
  44. package/lib/esm/services/PlatformExpressResponse.js +0 -8
  45. package/lib/esm/services/PlatformExpressResponse.js.map +0 -1
  46. package/lib/types/decorators/caseSensitive.d.ts +0 -23
  47. package/lib/types/decorators/mergeParams.d.ts +0 -23
  48. package/lib/types/decorators/routerSettings.d.ts +0 -24
  49. package/lib/types/decorators/strict.d.ts +0 -23
  50. package/lib/types/services/PlatformExpressHandler.d.ts +0 -9
  51. package/lib/types/services/PlatformExpressRequest.d.ts +0 -8
  52. package/lib/types/services/PlatformExpressResponse.d.ts +0 -14
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlatformExpressResponse.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAS9C;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,gBAAkC;CAAG","sourcesContent":["import {PlatformResponse} from \"@tsed/common\";\nimport type Express from \"express\";\n\ndeclare global {\n namespace TsED {\n export interface Response extends Express.Response {}\n }\n}\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpressResponse extends PlatformResponse<Express.Response> {}\n"]}
@@ -1,23 +0,0 @@
1
- /**
2
- * Specify the behavior of the router controller.
3
- *
4
- * ```typescript
5
- * @Controller("/")
6
- * @CaseSensitive(true)
7
- * class MyCtrl {
8
- *
9
- * }
10
- * ```
11
- *
12
- * Property | Description | Default
13
- * ---|---|---
14
- * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
15
- * MergeParams | Preserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child’s value take precedence. | false
16
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
17
- *
18
- * @param caseSensitive
19
- * @returns {Function}
20
- * @decorator
21
- * @express
22
- */
23
- export declare function CaseSensitive(caseSensitive: boolean): Function;
@@ -1,23 +0,0 @@
1
- /**
2
- * Specify the behavior of the router controller.
3
- *
4
- * ```typescript
5
- * @Controller("/")
6
- * @MergeParams(true)
7
- * class MyCtrl {
8
- *
9
- * }
10
- * ```
11
- *
12
- * Property | Description | Default
13
- * ---|---|---
14
- * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
15
- * MergeParams | Preserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child’s value take precedence. | false
16
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
17
- *
18
- * @param mergeParams
19
- * @returns {Function}
20
- * @decorator
21
- * @express
22
- */
23
- export declare function MergeParams(mergeParams?: boolean): Function;
@@ -1,24 +0,0 @@
1
- import { RouterOptions } from "express";
2
- /**
3
- * Specify the behavior of the router controller.
4
- *
5
- * ```typescript
6
- * @Controller("/")
7
- * @RouterSettings({mergeParams: true})
8
- * class MyCtrl {
9
- *
10
- * }
11
- * ```
12
- *
13
- * Property | Description | Default
14
- * ---|---|---
15
- * caseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
16
- * mergeParams | Preserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child’s value take precedence. | false
17
- * strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
18
- *
19
- * @returns {(target:any)=>void}
20
- * @decorator
21
- * @param routerOptions
22
- * @express
23
- */
24
- export declare function RouterSettings(routerOptions: RouterOptions): Function;
@@ -1,23 +0,0 @@
1
- /**
2
- * Specify the behavior of the router controller.
3
- *
4
- * ```typescript
5
- * @Controller("/")
6
- * @Strict(true)
7
- * class MyCtrl {
8
- *
9
- * }
10
- * ```
11
- *
12
- * Property | Description | Default
13
- * ---|---|---
14
- * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
15
- * MergeParams | Preserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child’s value take precedence. | false
16
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
17
- *
18
- * @param strict
19
- * @returns {Function}
20
- * @decorator
21
- * @express
22
- */
23
- export declare function Strict(strict: boolean): Function;
@@ -1,9 +0,0 @@
1
- import { HandlerMetadata, OnRequestOptions, PlatformHandler } from "@tsed/common";
2
- /**
3
- * @platform
4
- * @express
5
- */
6
- export declare class PlatformExpressHandler extends PlatformHandler {
7
- protected createRawHandler(metadata: HandlerMetadata): Function;
8
- protected onCtxRequest(requestOptions: OnRequestOptions): Promise<any>;
9
- }
@@ -1,8 +0,0 @@
1
- import { PlatformRequest } from "@tsed/common";
2
- import type Express from "express";
3
- /**
4
- * @platform
5
- * @express
6
- */
7
- export declare class PlatformExpressRequest extends PlatformRequest<Express.Request> {
8
- }
@@ -1,14 +0,0 @@
1
- import { PlatformResponse } from "@tsed/common";
2
- import type Express from "express";
3
- declare global {
4
- namespace TsED {
5
- interface Response extends Express.Response {
6
- }
7
- }
8
- }
9
- /**
10
- * @platform
11
- * @express
12
- */
13
- export declare class PlatformExpressResponse extends PlatformResponse<Express.Response> {
14
- }