@tsed/platform-express 7.0.0-beta.13 → 7.0.0-beta.16
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/cjs/components/PlatformExpress.js +63 -54
- 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/esm/components/PlatformExpress.js +64 -55
- 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/types/components/PlatformExpress.d.ts +11 -26
- package/lib/types/index.d.ts +0 -7
- package/package.json +16 -14
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-express",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.16",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"tslib": "2.4.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@tsed/common": "7.0.0-beta.
|
|
61
|
-
"@tsed/core": "7.0.0-beta.
|
|
62
|
-
"@tsed/di": "7.0.0-beta.
|
|
63
|
-
"@tsed/platform-test-utils": "7.0.0-beta.
|
|
64
|
-
"@tsed/platform-views": "7.0.0-beta.
|
|
60
|
+
"@tsed/common": "7.0.0-beta.16",
|
|
61
|
+
"@tsed/core": "7.0.0-beta.16",
|
|
62
|
+
"@tsed/di": "7.0.0-beta.16",
|
|
63
|
+
"@tsed/platform-test-utils": "7.0.0-beta.16",
|
|
64
|
+
"@tsed/platform-views": "7.0.0-beta.16",
|
|
65
65
|
"@types/body-parser": "1.19.2",
|
|
66
66
|
"@types/compression": "1.7.2",
|
|
67
67
|
"@types/cookie-parser": "1.4.2",
|
|
@@ -69,22 +69,24 @@
|
|
|
69
69
|
"@types/express-session": "1.17.4",
|
|
70
70
|
"@types/method-override": "0.0.32",
|
|
71
71
|
"@types/multer": "^1.4.3",
|
|
72
|
+
"@types/on-finished": "2.3.1",
|
|
72
73
|
"body-parser": "1.19.2",
|
|
73
74
|
"compression": "1.7.4",
|
|
74
75
|
"cookie-parser": "1.4.6",
|
|
75
76
|
"cors": "2.8.5",
|
|
76
77
|
"express-session": "1.17.2",
|
|
77
|
-
"method-override": "3.0.0"
|
|
78
|
+
"method-override": "3.0.0",
|
|
79
|
+
"on-finished": "2.4.1"
|
|
78
80
|
},
|
|
79
81
|
"peerDependencies": {
|
|
80
|
-
"@tsed/common": "^7.0.0-beta.
|
|
81
|
-
"@tsed/core": "^7.0.0-beta.
|
|
82
|
-
"@tsed/di": "^7.0.0-beta.
|
|
83
|
-
"@tsed/json-mapper": "^7.0.0-beta.
|
|
82
|
+
"@tsed/common": "^7.0.0-beta.16",
|
|
83
|
+
"@tsed/core": "^7.0.0-beta.16",
|
|
84
|
+
"@tsed/di": "^7.0.0-beta.16",
|
|
85
|
+
"@tsed/json-mapper": "^7.0.0-beta.16",
|
|
84
86
|
"@tsed/logger": ">=6.2.0",
|
|
85
|
-
"@tsed/openspec": "^7.0.0-beta.
|
|
86
|
-
"@tsed/platform-views": "^7.0.0-beta.
|
|
87
|
-
"@tsed/schema": "^7.0.0-beta.
|
|
87
|
+
"@tsed/openspec": "^7.0.0-beta.16",
|
|
88
|
+
"@tsed/platform-views": "^7.0.0-beta.16",
|
|
89
|
+
"@tsed/schema": "^7.0.0-beta.16",
|
|
88
90
|
"@types/multer": "^1.4.5",
|
|
89
91
|
"body-parser": "^1.19.0",
|
|
90
92
|
"multer": "^1.4.5-lts.1"
|
package/readme.md
CHANGED
|
@@ -59,7 +59,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|
|
59
59
|
|
|
60
60
|
The MIT License (MIT)
|
|
61
61
|
|
|
62
|
-
Copyright (c) 2016 -
|
|
62
|
+
Copyright (c) 2016 - 2022 Romain Lenzotti
|
|
63
63
|
|
|
64
64
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
65
65
|
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CaseSensitive = void 0;
|
|
4
|
-
const routerSettings_1 = require("./routerSettings");
|
|
5
|
-
/**
|
|
6
|
-
* Specify the behavior of the router controller.
|
|
7
|
-
*
|
|
8
|
-
* ```typescript
|
|
9
|
-
* @Controller("/")
|
|
10
|
-
* @CaseSensitive(true)
|
|
11
|
-
* class MyCtrl {
|
|
12
|
-
*
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* Property | Description | Default
|
|
17
|
-
* ---|---|---
|
|
18
|
-
* CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
|
|
19
|
-
* 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
|
|
20
|
-
* Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
|
|
21
|
-
*
|
|
22
|
-
* @param caseSensitive
|
|
23
|
-
* @returns {Function}
|
|
24
|
-
* @decorator
|
|
25
|
-
* @express
|
|
26
|
-
*/
|
|
27
|
-
function CaseSensitive(caseSensitive) {
|
|
28
|
-
return (0, routerSettings_1.RouterSettings)({ caseSensitive });
|
|
29
|
-
}
|
|
30
|
-
exports.CaseSensitive = CaseSensitive;
|
|
31
|
-
//# sourceMappingURL=caseSensitive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"caseSensitive.js","sourceRoot":"","sources":["../../../src/decorators/caseSensitive.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,aAAa,CAAC,aAAsB;IAClD,OAAO,IAAA,+BAAc,EAAC,EAAC,aAAa,EAAC,CAAC,CAAC;AACzC,CAAC;AAFD,sCAEC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @CaseSensitive(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param caseSensitive\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function CaseSensitive(caseSensitive: boolean) {\n return RouterSettings({caseSensitive});\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MergeParams = void 0;
|
|
4
|
-
const routerSettings_1 = require("./routerSettings");
|
|
5
|
-
/**
|
|
6
|
-
* Specify the behavior of the router controller.
|
|
7
|
-
*
|
|
8
|
-
* ```typescript
|
|
9
|
-
* @Controller("/")
|
|
10
|
-
* @MergeParams(true)
|
|
11
|
-
* class MyCtrl {
|
|
12
|
-
*
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* Property | Description | Default
|
|
17
|
-
* ---|---|---
|
|
18
|
-
* CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
|
|
19
|
-
* 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
|
|
20
|
-
* Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
|
|
21
|
-
*
|
|
22
|
-
* @param mergeParams
|
|
23
|
-
* @returns {Function}
|
|
24
|
-
* @decorator
|
|
25
|
-
* @express
|
|
26
|
-
*/
|
|
27
|
-
function MergeParams(mergeParams = true) {
|
|
28
|
-
return (0, routerSettings_1.RouterSettings)({ mergeParams });
|
|
29
|
-
}
|
|
30
|
-
exports.MergeParams = MergeParams;
|
|
31
|
-
//# sourceMappingURL=mergeParams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeParams.js","sourceRoot":"","sources":["../../../src/decorators/mergeParams.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,WAAW,CAAC,cAAuB,IAAI;IACrD,OAAO,IAAA,+BAAc,EAAC,EAAC,WAAW,EAAC,CAAC,CAAC;AACvC,CAAC;AAFD,kCAEC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @MergeParams(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param mergeParams\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function MergeParams(mergeParams: boolean = true) {\n return RouterSettings({mergeParams});\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RouterSettings = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
const core_1 = require("@tsed/core");
|
|
6
|
-
/**
|
|
7
|
-
* Specify the behavior of the router controller.
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* @Controller("/")
|
|
11
|
-
* @RouterSettings({mergeParams: true})
|
|
12
|
-
* class MyCtrl {
|
|
13
|
-
*
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* Property | Description | Default
|
|
18
|
-
* ---|---|---
|
|
19
|
-
* caseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
|
|
20
|
-
* 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
|
|
21
|
-
* strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
|
|
22
|
-
*
|
|
23
|
-
* @returns {(target:any)=>void}
|
|
24
|
-
* @decorator
|
|
25
|
-
* @param routerOptions
|
|
26
|
-
* @express
|
|
27
|
-
*/
|
|
28
|
-
function RouterSettings(routerOptions) {
|
|
29
|
-
return (0, core_1.StoreMerge)(common_1.ROUTER_OPTIONS, routerOptions);
|
|
30
|
-
}
|
|
31
|
-
exports.RouterSettings = RouterSettings;
|
|
32
|
-
//# sourceMappingURL=routerSettings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routerSettings.js","sourceRoot":"","sources":["../../../src/decorators/routerSettings.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,qCAAsC;AAGtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,cAAc,CAAC,aAA4B;IACzD,OAAO,IAAA,iBAAU,EAAC,uBAAc,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC;AAFD,wCAEC","sourcesContent":["import {ROUTER_OPTIONS} from \"@tsed/common\";\nimport {StoreMerge} from \"@tsed/core\";\nimport {RouterOptions} from \"express\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @RouterSettings({mergeParams: true})\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * caseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @returns {(target:any)=>void}\n * @decorator\n * @param routerOptions\n * @express\n */\nexport function RouterSettings(routerOptions: RouterOptions): Function {\n return StoreMerge(ROUTER_OPTIONS, routerOptions);\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Strict = void 0;
|
|
4
|
-
const routerSettings_1 = require("./routerSettings");
|
|
5
|
-
/**
|
|
6
|
-
* Specify the behavior of the router controller.
|
|
7
|
-
*
|
|
8
|
-
* ```typescript
|
|
9
|
-
* @Controller("/")
|
|
10
|
-
* @Strict(true)
|
|
11
|
-
* class MyCtrl {
|
|
12
|
-
*
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* Property | Description | Default
|
|
17
|
-
* ---|---|---
|
|
18
|
-
* CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
|
|
19
|
-
* 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
|
|
20
|
-
* Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
|
|
21
|
-
*
|
|
22
|
-
* @param strict
|
|
23
|
-
* @returns {Function}
|
|
24
|
-
* @decorator
|
|
25
|
-
* @express
|
|
26
|
-
*/
|
|
27
|
-
function Strict(strict) {
|
|
28
|
-
return (0, routerSettings_1.RouterSettings)({ strict });
|
|
29
|
-
}
|
|
30
|
-
exports.Strict = Strict;
|
|
31
|
-
//# sourceMappingURL=strict.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../src/decorators/strict.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,MAAM,CAAC,MAAe;IACpC,OAAO,IAAA,+BAAc,EAAC,EAAC,MAAM,EAAC,CAAC,CAAC;AAClC,CAAC;AAFD,wBAEC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @Strict(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param strict\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function Strict(strict: boolean) {\n return RouterSettings({strict});\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformExpressHandler = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
/**
|
|
6
|
-
* @platform
|
|
7
|
-
* @express
|
|
8
|
-
*/
|
|
9
|
-
class PlatformExpressHandler extends common_1.PlatformHandler {
|
|
10
|
-
createRawHandler(metadata) {
|
|
11
|
-
if (metadata.type === common_1.HandlerType.ERR_MIDDLEWARE) {
|
|
12
|
-
const handler = this.compileHandler(metadata);
|
|
13
|
-
return async (err, req, res, next) => handler({
|
|
14
|
-
err,
|
|
15
|
-
next,
|
|
16
|
-
$ctx: req.$ctx
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return super.createRawHandler(metadata);
|
|
20
|
-
}
|
|
21
|
-
async onCtxRequest(requestOptions) {
|
|
22
|
-
try {
|
|
23
|
-
return await super.onCtxRequest(requestOptions);
|
|
24
|
-
}
|
|
25
|
-
catch (er) {
|
|
26
|
-
return this.onError(er, requestOptions);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.PlatformExpressHandler = PlatformExpressHandler;
|
|
31
|
-
//# sourceMappingURL=PlatformExpressHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpressHandler.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressHandler.ts"],"names":[],"mappings":";;;AAAA,yCAA6F;AAE7F;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,wBAAe;IAC/C,gBAAgB,CAAC,QAAyB;QAClD,IAAI,QAAQ,CAAC,IAAI,KAAK,oBAAW,CAAC,cAAc,EAAE;YAChD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC9C,OAAO,KAAK,EAAE,GAAQ,EAAE,GAAQ,EAAE,GAAQ,EAAE,IAAS,EAAE,EAAE,CACvD,OAAO,CAAC;gBACN,GAAG;gBACH,IAAI;gBACJ,IAAI,EAAE,GAAG,CAAC,IAAI;aACf,CAAC,CAAC;SACN;QAED,OAAO,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAES,KAAK,CAAC,YAAY,CAAC,cAAgC;QAC3D,IAAI;YACF,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;SACjD;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACzC;IACH,CAAC;CACF;AAtBD,wDAsBC","sourcesContent":["import {HandlerMetadata, HandlerType, OnRequestOptions, PlatformHandler} from \"@tsed/common\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpressHandler extends PlatformHandler {\n protected createRawHandler(metadata: HandlerMetadata): Function {\n if (metadata.type === HandlerType.ERR_MIDDLEWARE) {\n const handler = this.compileHandler(metadata);\n return async (err: any, req: any, res: any, next: any) =>\n handler({\n err,\n next,\n $ctx: req.$ctx\n });\n }\n\n return super.createRawHandler(metadata);\n }\n\n protected async onCtxRequest(requestOptions: OnRequestOptions): Promise<any> {\n try {\n return await super.onCtxRequest(requestOptions);\n } catch (er) {\n return this.onError(er, requestOptions);\n }\n }\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformExpressRequest = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
/**
|
|
6
|
-
* @platform
|
|
7
|
-
* @express
|
|
8
|
-
*/
|
|
9
|
-
class PlatformExpressRequest extends common_1.PlatformRequest {
|
|
10
|
-
}
|
|
11
|
-
exports.PlatformExpressRequest = PlatformExpressRequest;
|
|
12
|
-
//# sourceMappingURL=PlatformExpressRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpressRequest.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressRequest.ts"],"names":[],"mappings":";;;AAAA,yCAA8D;AAG9D;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,wBAAgC;CAAG;AAA/E,wDAA+E","sourcesContent":["import {PlatformContext, PlatformRequest} from \"@tsed/common\";\nimport type Express from \"express\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpressRequest extends PlatformRequest<Express.Request> {}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformExpressResponse = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
/**
|
|
6
|
-
* @platform
|
|
7
|
-
* @express
|
|
8
|
-
*/
|
|
9
|
-
class PlatformExpressResponse extends common_1.PlatformResponse {
|
|
10
|
-
}
|
|
11
|
-
exports.PlatformExpressResponse = PlatformExpressResponse;
|
|
12
|
-
//# sourceMappingURL=PlatformExpressResponse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpressResponse.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressResponse.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAS9C;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,yBAAkC;CAAG;AAAlF,0DAAkF","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,27 +0,0 @@
|
|
|
1
|
-
import { RouterSettings } from "./routerSettings.js";
|
|
2
|
-
/**
|
|
3
|
-
* Specify the behavior of the router controller.
|
|
4
|
-
*
|
|
5
|
-
* ```typescript
|
|
6
|
-
* @Controller("/")
|
|
7
|
-
* @CaseSensitive(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
|
-
* @param caseSensitive
|
|
20
|
-
* @returns {Function}
|
|
21
|
-
* @decorator
|
|
22
|
-
* @express
|
|
23
|
-
*/
|
|
24
|
-
export function CaseSensitive(caseSensitive) {
|
|
25
|
-
return RouterSettings({ caseSensitive });
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=caseSensitive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"caseSensitive.js","sourceRoot":"","sources":["../../../src/decorators/caseSensitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,aAAa,CAAC,aAAsB;IAClD,OAAO,cAAc,CAAC,EAAC,aAAa,EAAC,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @CaseSensitive(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param caseSensitive\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function CaseSensitive(caseSensitive: boolean) {\n return RouterSettings({caseSensitive});\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { RouterSettings } from "./routerSettings.js";
|
|
2
|
-
/**
|
|
3
|
-
* Specify the behavior of the router controller.
|
|
4
|
-
*
|
|
5
|
-
* ```typescript
|
|
6
|
-
* @Controller("/")
|
|
7
|
-
* @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
|
-
* @param mergeParams
|
|
20
|
-
* @returns {Function}
|
|
21
|
-
* @decorator
|
|
22
|
-
* @express
|
|
23
|
-
*/
|
|
24
|
-
export function MergeParams(mergeParams = true) {
|
|
25
|
-
return RouterSettings({ mergeParams });
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=mergeParams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeParams.js","sourceRoot":"","sources":["../../../src/decorators/mergeParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,WAAW,CAAC,cAAuB,IAAI;IACrD,OAAO,cAAc,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @MergeParams(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param mergeParams\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function MergeParams(mergeParams: boolean = true) {\n return RouterSettings({mergeParams});\n}\n"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ROUTER_OPTIONS } from "@tsed/common";
|
|
2
|
-
import { StoreMerge } from "@tsed/core";
|
|
3
|
-
/**
|
|
4
|
-
* Specify the behavior of the router controller.
|
|
5
|
-
*
|
|
6
|
-
* ```typescript
|
|
7
|
-
* @Controller("/")
|
|
8
|
-
* @RouterSettings({mergeParams: true})
|
|
9
|
-
* class MyCtrl {
|
|
10
|
-
*
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* Property | Description | Default
|
|
15
|
-
* ---|---|---
|
|
16
|
-
* caseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
|
|
17
|
-
* 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
|
|
18
|
-
* strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
|
|
19
|
-
*
|
|
20
|
-
* @returns {(target:any)=>void}
|
|
21
|
-
* @decorator
|
|
22
|
-
* @param routerOptions
|
|
23
|
-
* @express
|
|
24
|
-
*/
|
|
25
|
-
export function RouterSettings(routerOptions) {
|
|
26
|
-
return StoreMerge(ROUTER_OPTIONS, routerOptions);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=routerSettings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routerSettings.js","sourceRoot":"","sources":["../../../src/decorators/routerSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,cAAc,CAAC,aAA4B;IACzD,OAAO,UAAU,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import {ROUTER_OPTIONS} from \"@tsed/common\";\nimport {StoreMerge} from \"@tsed/core\";\nimport {RouterOptions} from \"express\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @RouterSettings({mergeParams: true})\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * caseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @returns {(target:any)=>void}\n * @decorator\n * @param routerOptions\n * @express\n */\nexport function RouterSettings(routerOptions: RouterOptions): Function {\n return StoreMerge(ROUTER_OPTIONS, routerOptions);\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { RouterSettings } from "./routerSettings.js";
|
|
2
|
-
/**
|
|
3
|
-
* Specify the behavior of the router controller.
|
|
4
|
-
*
|
|
5
|
-
* ```typescript
|
|
6
|
-
* @Controller("/")
|
|
7
|
-
* @Strict(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
|
-
* @param strict
|
|
20
|
-
* @returns {Function}
|
|
21
|
-
* @decorator
|
|
22
|
-
* @express
|
|
23
|
-
*/
|
|
24
|
-
export function Strict(strict) {
|
|
25
|
-
return RouterSettings({ strict });
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=strict.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../src/decorators/strict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,OAAO,cAAc,CAAC,EAAC,MAAM,EAAC,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import {RouterSettings} from \"./routerSettings\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @Strict(true)\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * CaseSensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\n * 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\n * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @param strict\n * @returns {Function}\n * @decorator\n * @express\n */\nexport function Strict(strict: boolean) {\n return RouterSettings({strict});\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { HandlerType, PlatformHandler } from "@tsed/common";
|
|
2
|
-
/**
|
|
3
|
-
* @platform
|
|
4
|
-
* @express
|
|
5
|
-
*/
|
|
6
|
-
export class PlatformExpressHandler extends PlatformHandler {
|
|
7
|
-
createRawHandler(metadata) {
|
|
8
|
-
if (metadata.type === HandlerType.ERR_MIDDLEWARE) {
|
|
9
|
-
const handler = this.compileHandler(metadata);
|
|
10
|
-
return async (err, req, res, next) => handler({
|
|
11
|
-
err,
|
|
12
|
-
next,
|
|
13
|
-
$ctx: req.$ctx
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return super.createRawHandler(metadata);
|
|
17
|
-
}
|
|
18
|
-
async onCtxRequest(requestOptions) {
|
|
19
|
-
try {
|
|
20
|
-
return await super.onCtxRequest(requestOptions);
|
|
21
|
-
}
|
|
22
|
-
catch (er) {
|
|
23
|
-
return this.onError(er, requestOptions);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=PlatformExpressHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpressHandler.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAoB,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7F;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,eAAe;IAC/C,gBAAgB,CAAC,QAAyB;QAClD,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,CAAC,cAAc,EAAE;YAChD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC9C,OAAO,KAAK,EAAE,GAAQ,EAAE,GAAQ,EAAE,GAAQ,EAAE,IAAS,EAAE,EAAE,CACvD,OAAO,CAAC;gBACN,GAAG;gBACH,IAAI;gBACJ,IAAI,EAAE,GAAG,CAAC,IAAI;aACf,CAAC,CAAC;SACN;QAED,OAAO,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAES,KAAK,CAAC,YAAY,CAAC,cAAgC;QAC3D,IAAI;YACF,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;SACjD;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACzC;IACH,CAAC;CACF","sourcesContent":["import {HandlerMetadata, HandlerType, OnRequestOptions, PlatformHandler} from \"@tsed/common\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpressHandler extends PlatformHandler {\n protected createRawHandler(metadata: HandlerMetadata): Function {\n if (metadata.type === HandlerType.ERR_MIDDLEWARE) {\n const handler = this.compileHandler(metadata);\n return async (err: any, req: any, res: any, next: any) =>\n handler({\n err,\n next,\n $ctx: req.$ctx\n });\n }\n\n return super.createRawHandler(metadata);\n }\n\n protected async onCtxRequest(requestOptions: OnRequestOptions): Promise<any> {\n try {\n return await super.onCtxRequest(requestOptions);\n } catch (er) {\n return this.onError(er, requestOptions);\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpressRequest.js","sourceRoot":"","sources":["../../../src/services/PlatformExpressRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAC,MAAM,cAAc,CAAC;AAG9D;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,eAAgC;CAAG","sourcesContent":["import {PlatformContext, PlatformRequest} from \"@tsed/common\";\nimport type Express from \"express\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpressRequest extends PlatformRequest<Express.Request> {}\n"]}
|
|
@@ -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
|
-
}
|