@tsed/platform-express 7.0.0-beta.12 → 7.0.0-beta.15
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/jest.config.js +14 -0
- package/lib/cjs/components/PlatformExpress.js +72 -66
- package/lib/cjs/components/PlatformExpress.js.map +1 -1
- package/lib/cjs/index.js +0 -7
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/PlatformExpressSettings.js.map +1 -1
- package/lib/esm/components/PlatformExpress.js +72 -67
- package/lib/esm/components/PlatformExpress.js.map +1 -1
- package/lib/esm/index.js +0 -7
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/PlatformExpressSettings.js.map +1 -1
- package/lib/types/components/PlatformExpress.d.ts +11 -26
- package/lib/types/index.d.ts +0 -7
- package/lib/types/interfaces/PlatformExpressSettings.d.ts +4 -4
- package/package.json +27 -20
- package/readme.md +1 -1
- package/lib/cjs/decorators/caseSensitive.js +0 -31
- package/lib/cjs/decorators/caseSensitive.js.map +0 -1
- package/lib/cjs/decorators/mergeParams.js +0 -31
- package/lib/cjs/decorators/mergeParams.js.map +0 -1
- package/lib/cjs/decorators/routerSettings.js +0 -32
- package/lib/cjs/decorators/routerSettings.js.map +0 -1
- package/lib/cjs/decorators/strict.js +0 -31
- package/lib/cjs/decorators/strict.js.map +0 -1
- package/lib/cjs/services/PlatformExpressHandler.js +0 -31
- package/lib/cjs/services/PlatformExpressHandler.js.map +0 -1
- package/lib/cjs/services/PlatformExpressRequest.js +0 -12
- package/lib/cjs/services/PlatformExpressRequest.js.map +0 -1
- package/lib/cjs/services/PlatformExpressResponse.js +0 -12
- package/lib/cjs/services/PlatformExpressResponse.js.map +0 -1
- package/lib/esm/decorators/caseSensitive.js +0 -27
- package/lib/esm/decorators/caseSensitive.js.map +0 -1
- package/lib/esm/decorators/mergeParams.js +0 -27
- package/lib/esm/decorators/mergeParams.js.map +0 -1
- package/lib/esm/decorators/routerSettings.js +0 -28
- package/lib/esm/decorators/routerSettings.js.map +0 -1
- package/lib/esm/decorators/strict.js +0 -27
- package/lib/esm/decorators/strict.js.map +0 -1
- package/lib/esm/services/PlatformExpressHandler.js +0 -27
- package/lib/esm/services/PlatformExpressHandler.js.map +0 -1
- package/lib/esm/services/PlatformExpressRequest.js +0 -8
- package/lib/esm/services/PlatformExpressRequest.js.map +0 -1
- package/lib/esm/services/PlatformExpressResponse.js +0 -8
- package/lib/esm/services/PlatformExpressResponse.js.map +0 -1
- package/lib/types/decorators/caseSensitive.d.ts +0 -23
- package/lib/types/decorators/mergeParams.d.ts +0 -23
- package/lib/types/decorators/routerSettings.d.ts +0 -24
- package/lib/types/decorators/strict.d.ts +0 -23
- package/lib/types/services/PlatformExpressHandler.d.ts +0 -9
- package/lib/types/services/PlatformExpressRequest.d.ts +0 -8
- 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,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
|
-
}
|