@tsed/platform-koa 7.0.0-beta.11 → 7.0.0-beta.14

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 (50) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/components/PlatformKoa.js +60 -49
  3. package/lib/cjs/components/PlatformKoa.js.map +1 -1
  4. package/lib/cjs/index.js +0 -3
  5. package/lib/cjs/index.js.map +1 -1
  6. package/lib/cjs/interfaces/PlatformKoaSettings.js.map +1 -1
  7. package/lib/cjs/middlewares/resourceNotFoundMiddleware.js +3 -3
  8. package/lib/cjs/middlewares/resourceNotFoundMiddleware.js.map +1 -1
  9. package/lib/cjs/services/PlatformKoaHandler.js +14 -42
  10. package/lib/cjs/services/PlatformKoaHandler.js.map +1 -1
  11. package/lib/cjs/services/PlatformKoaRequest.js +8 -18
  12. package/lib/cjs/services/PlatformKoaRequest.js.map +1 -1
  13. package/lib/cjs/services/PlatformKoaResponse.js +3 -7
  14. package/lib/cjs/services/PlatformKoaResponse.js.map +1 -1
  15. package/lib/esm/components/PlatformKoa.js +61 -50
  16. package/lib/esm/components/PlatformKoa.js.map +1 -1
  17. package/lib/esm/index.js +0 -3
  18. package/lib/esm/index.js.map +1 -1
  19. package/lib/esm/interfaces/PlatformKoaSettings.js.map +1 -1
  20. package/lib/esm/middlewares/resourceNotFoundMiddleware.js +3 -3
  21. package/lib/esm/middlewares/resourceNotFoundMiddleware.js.map +1 -1
  22. package/lib/esm/services/PlatformKoaHandler.js +15 -43
  23. package/lib/esm/services/PlatformKoaHandler.js.map +1 -1
  24. package/lib/esm/services/PlatformKoaRequest.js +8 -18
  25. package/lib/esm/services/PlatformKoaRequest.js.map +1 -1
  26. package/lib/esm/services/PlatformKoaResponse.js +3 -8
  27. package/lib/esm/services/PlatformKoaResponse.js.map +1 -1
  28. package/lib/types/components/PlatformKoa.d.ts +12 -14
  29. package/lib/types/index.d.ts +0 -3
  30. package/lib/types/interfaces/PlatformKoaSettings.d.ts +1 -1
  31. package/lib/types/services/PlatformKoaHandler.d.ts +4 -7
  32. package/lib/types/services/PlatformKoaRequest.d.ts +3 -6
  33. package/lib/types/services/PlatformKoaResponse.d.ts +2 -3
  34. package/package.json +24 -16
  35. package/readme.md +2 -1
  36. package/lib/cjs/decorators/caseSensitive.js +0 -30
  37. package/lib/cjs/decorators/caseSensitive.js.map +0 -1
  38. package/lib/cjs/decorators/routerSettings.js +0 -31
  39. package/lib/cjs/decorators/routerSettings.js.map +0 -1
  40. package/lib/cjs/decorators/strict.js +0 -31
  41. package/lib/cjs/decorators/strict.js.map +0 -1
  42. package/lib/esm/decorators/caseSensitive.js +0 -26
  43. package/lib/esm/decorators/caseSensitive.js.map +0 -1
  44. package/lib/esm/decorators/routerSettings.js +0 -27
  45. package/lib/esm/decorators/routerSettings.js.map +0 -1
  46. package/lib/esm/decorators/strict.js +0 -27
  47. package/lib/esm/decorators/strict.js.map +0 -1
  48. package/lib/types/decorators/caseSensitive.d.ts +0 -22
  49. package/lib/types/decorators/routerSettings.d.ts +0 -24
  50. package/lib/types/decorators/strict.d.ts +0 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-koa",
3
- "version": "7.0.0-beta.11",
3
+ "version": "7.0.0-beta.14",
4
4
  "description": "Koa package for Ts.ED framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -18,7 +18,8 @@
18
18
  "build:cjs": "tsc --build tsconfig.compile.json",
19
19
  "build:esm": "tsc --build tsconfig.compile.esm.json",
20
20
  "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
21
- "start": "ts-node -r tsconfig-paths/register test/app/index.ts"
21
+ "start": "ts-node -r tsconfig-paths/register test/app/index.ts",
22
+ "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --testTimeout 10000"
22
23
  },
23
24
  "keywords": [
24
25
  "Koa",
@@ -51,10 +52,10 @@
51
52
  "repository": "https://github.com/tsedio/tsed",
52
53
  "devDependencies": {
53
54
  "@koa/cors": "3.3.0",
54
- "@tsed/common": "7.0.0-beta.11",
55
- "@tsed/core": "7.0.0-beta.11",
56
- "@tsed/di": "7.0.0-beta.11",
57
- "@tsed/platform-test-utils": "7.0.0-beta.11",
55
+ "@tsed/common": "7.0.0-beta.14",
56
+ "@tsed/core": "7.0.0-beta.14",
57
+ "@tsed/di": "7.0.0-beta.14",
58
+ "@tsed/platform-test-utils": "7.0.0-beta.14",
58
59
  "@types/koa": "2.13.4",
59
60
  "@types/koa-bodyparser": "4.3.7",
60
61
  "@types/koa-compose": "3.2.5",
@@ -75,23 +76,24 @@
75
76
  "@koa/router": "^10.1.1",
76
77
  "encodeurl": "^1.0.2",
77
78
  "koa-send": "5.0.1",
78
- "multer": "^1.4.2",
79
- "tslib": "2.3.1"
79
+ "multer": "^1.4.5-lts.1",
80
+ "tslib": "2.4.0"
80
81
  },
81
82
  "peerDependencies": {
82
- "@tsed/common": "^7.0.0-beta.11",
83
- "@tsed/core": "^7.0.0-beta.11",
84
- "@tsed/di": "^7.0.0-beta.11",
85
- "@tsed/json-mapper": "^7.0.0-beta.11",
86
- "@tsed/logger": ">=6.1.1",
87
- "@tsed/openspec": "^7.0.0-beta.11",
88
- "@tsed/schema": "^7.0.0-beta.11",
83
+ "@tsed/common": "^7.0.0-beta.14",
84
+ "@tsed/core": "^7.0.0-beta.14",
85
+ "@tsed/di": "^7.0.0-beta.14",
86
+ "@tsed/json-mapper": "^7.0.0-beta.14",
87
+ "@tsed/logger": ">=6.2.0",
88
+ "@tsed/openspec": "^7.0.0-beta.14",
89
+ "@tsed/schema": "^7.0.0-beta.14",
89
90
  "koa": ">=2.13.0",
90
91
  "koa-bodyparser": ">=4.3.0",
91
92
  "koa-compress": ">=5.0.1",
92
93
  "koa-override": ">=3.0.0",
93
94
  "koa-qs": ">=3.0.0",
94
- "koa-session": ">=6.2.0"
95
+ "koa-session": ">=6.2.0",
96
+ "multer": "^1.4.5-lts.1"
95
97
  },
96
98
  "peerDependenciesMeta": {
97
99
  "@tsed/common": {
@@ -114,6 +116,12 @@
114
116
  },
115
117
  "@tsed/logger": {
116
118
  "optional": false
119
+ },
120
+ "multer": {
121
+ "optional": false
117
122
  }
123
+ },
124
+ "publishConfig": {
125
+ "tag": "beta"
118
126
  }
119
127
  }
package/readme.md CHANGED
@@ -11,7 +11,8 @@
11
11
  [![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)
12
12
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
13
13
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
14
- [![backers](https://opencollective.com/tsed/tiers/badge.svg)](https://opencollective.com/tsed)
14
+ [![github](https://img.shields.io/static/v1?label=Github%20sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/romakita)
15
+ [![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor&message=%E2%9D%A4&logo=OpenCollective&color=%23fe8e86)](https://opencollective.com/tsed)
15
16
 
16
17
  </div>
17
18
 
@@ -1,30 +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
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
20
- *
21
- * @returns {Function}
22
- * @decorator
23
- * @koa
24
- * @param sensitive
25
- */
26
- function CaseSensitive(sensitive) {
27
- return (0, routerSettings_1.RouterSettings)({ sensitive });
28
- }
29
- exports.CaseSensitive = CaseSensitive;
30
- //# sourceMappingURL=caseSensitive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"caseSensitive.js","sourceRoot":"","sources":["../../../src/decorators/caseSensitive.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,aAAa,CAAC,SAAkB;IAC9C,OAAO,IAAA,+BAAc,EAAC,EAAC,SAAS,EAAC,CAAC,CAAC;AACrC,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 * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @returns {Function}\n * @decorator\n * @koa\n * @param sensitive\n */\nexport function CaseSensitive(sensitive: boolean) {\n return RouterSettings({sensitive});\n}\n"]}
@@ -1,31 +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({sensitive: true})
12
- * class MyCtrl {
13
- *
14
- * }
15
- * ```
16
- *
17
- * Property | Description | Default
18
- * ---|---|---
19
- * sensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
20
- * strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
21
- *
22
- * @returns {(target:any)=>void}
23
- * @decorator
24
- * @param routerOptions
25
- * @koa
26
- */
27
- function RouterSettings(routerOptions) {
28
- return (0, core_1.StoreMerge)(common_1.ROUTER_OPTIONS, routerOptions);
29
- }
30
- exports.RouterSettings = RouterSettings;
31
- //# 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;;;;;;;;;;;;;;;;;;;;GAoBG;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 \"@koa/router\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @RouterSettings({sensitive: true})\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * sensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\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 * @koa\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
- * @koa
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 * @koa\n */\nexport function Strict(strict: boolean) {\n return RouterSettings({strict});\n}\n"]}
@@ -1,26 +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
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
17
- *
18
- * @returns {Function}
19
- * @decorator
20
- * @koa
21
- * @param sensitive
22
- */
23
- export function CaseSensitive(sensitive) {
24
- return RouterSettings({ sensitive });
25
- }
26
- //# 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;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,aAAa,CAAC,SAAkB;IAC9C,OAAO,cAAc,CAAC,EAAC,SAAS,EAAC,CAAC,CAAC;AACrC,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 * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.\n *\n * @returns {Function}\n * @decorator\n * @koa\n * @param sensitive\n */\nexport function CaseSensitive(sensitive: boolean) {\n return RouterSettings({sensitive});\n}\n"]}
@@ -1,27 +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({sensitive: true})
9
- * class MyCtrl {
10
- *
11
- * }
12
- * ```
13
- *
14
- * Property | Description | Default
15
- * ---|---|---
16
- * sensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
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
- * @koa
23
- */
24
- export function RouterSettings(routerOptions) {
25
- return StoreMerge(ROUTER_OPTIONS, routerOptions);
26
- }
27
- //# 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;;;;;;;;;;;;;;;;;;;;GAoBG;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 \"@koa/router\";\n\n/**\n * Specify the behavior of the router controller.\n *\n * ```typescript\n * @Controller(\"/\")\n * @RouterSettings({sensitive: true})\n * class MyCtrl {\n *\n * }\n * ```\n *\n * Property | Description | Default\n * ---|---|---\n * sensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.\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 * @koa\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
- * @koa
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 * @koa\n */\nexport function Strict(strict: boolean) {\n return RouterSettings({strict});\n}\n"]}
@@ -1,22 +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
- * Strict | Enable strict routing. | Disabled by default, “/foo” and “/foo/” are treated the same by the router.
16
- *
17
- * @returns {Function}
18
- * @decorator
19
- * @koa
20
- * @param sensitive
21
- */
22
- export declare function CaseSensitive(sensitive: boolean): Function;
@@ -1,24 +0,0 @@
1
- /// <reference types="koa__router" />
2
- import { RouterOptions } from "@koa/router";
3
- /**
4
- * Specify the behavior of the router controller.
5
- *
6
- * ```typescript
7
- * @Controller("/")
8
- * @RouterSettings({sensitive: true})
9
- * class MyCtrl {
10
- *
11
- * }
12
- * ```
13
- *
14
- * Property | Description | Default
15
- * ---|---|---
16
- * sensitive | Enable case sensitivity. | Disabled by default, treating “/Foo” and “/foo” as the same.
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
- * @koa
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
- * @koa
22
- */
23
- export declare function Strict(strict: boolean): Function;