koatty 3.5.12-1 → 3.5.12-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 (79) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/index.mjs +2 -2
  5. package/dist/package.json +3 -3
  6. package/package.json +3 -3
  7. package/.commitlintrc.js +0 -3
  8. package/.eslintignore +0 -11
  9. package/.eslintrc.js +0 -43
  10. package/.huskyrc +0 -5
  11. package/.versionrc.js +0 -16
  12. package/api-extractor.json +0 -345
  13. package/docs/api/index.md +0 -12
  14. package/docs/api/koatty.apiinput.code.md +0 -11
  15. package/docs/api/koatty.apiinput.data.md +0 -11
  16. package/docs/api/koatty.apiinput.md +0 -22
  17. package/docs/api/koatty.apiinput.message.md +0 -11
  18. package/docs/api/koatty.apioutput.code.md +0 -11
  19. package/docs/api/koatty.apioutput.data.md +0 -11
  20. package/docs/api/koatty.apioutput.md +0 -22
  21. package/docs/api/koatty.apioutput.message.md +0 -11
  22. package/docs/api/koatty.appreadyhookfunc.md +0 -11
  23. package/docs/api/koatty.basecontroller._constructor_.md +0 -20
  24. package/docs/api/koatty.basecontroller._options.md +0 -11
  25. package/docs/api/koatty.basecontroller.app.md +0 -11
  26. package/docs/api/koatty.basecontroller.ctx.md +0 -11
  27. package/docs/api/koatty.basecontroller.fail.md +0 -28
  28. package/docs/api/koatty.basecontroller.init.md +0 -19
  29. package/docs/api/koatty.basecontroller.md +0 -39
  30. package/docs/api/koatty.basecontroller.ok.md +0 -28
  31. package/docs/api/koatty.baseservice._constructor_.md +0 -20
  32. package/docs/api/koatty.baseservice._options.md +0 -11
  33. package/docs/api/koatty.baseservice.app.md +0 -11
  34. package/docs/api/koatty.baseservice.init.md +0 -25
  35. package/docs/api/koatty.baseservice.md +0 -36
  36. package/docs/api/koatty.bindappreadyhook.md +0 -26
  37. package/docs/api/koatty.bootstrap.md +0 -27
  38. package/docs/api/koatty.component.md +0 -27
  39. package/docs/api/koatty.componentscan.md +0 -27
  40. package/docs/api/koatty.configurationscan.md +0 -27
  41. package/docs/api/koatty.controller.md +0 -27
  42. package/docs/api/koatty.httpcontroller.body.md +0 -28
  43. package/docs/api/koatty.httpcontroller.deny.md +0 -26
  44. package/docs/api/koatty.httpcontroller.expires.md +0 -26
  45. package/docs/api/koatty.httpcontroller.fail.md +0 -28
  46. package/docs/api/koatty.httpcontroller.header.md +0 -27
  47. package/docs/api/koatty.httpcontroller.isget.md +0 -19
  48. package/docs/api/koatty.httpcontroller.ismethod.md +0 -26
  49. package/docs/api/koatty.httpcontroller.ispost.md +0 -19
  50. package/docs/api/koatty.httpcontroller.json.md +0 -26
  51. package/docs/api/koatty.httpcontroller.md +0 -35
  52. package/docs/api/koatty.httpcontroller.ok.md +0 -28
  53. package/docs/api/koatty.httpcontroller.param.md +0 -26
  54. package/docs/api/koatty.httpcontroller.redirect.md +0 -27
  55. package/docs/api/koatty.httpcontroller.type.md +0 -27
  56. package/docs/api/koatty.icontroller.__after.md +0 -11
  57. package/docs/api/koatty.icontroller.__befor.md +0 -11
  58. package/docs/api/koatty.icontroller.app.md +0 -11
  59. package/docs/api/koatty.icontroller.ctx.md +0 -11
  60. package/docs/api/koatty.icontroller.fail.md +0 -11
  61. package/docs/api/koatty.icontroller.md +0 -25
  62. package/docs/api/koatty.icontroller.ok.md +0 -11
  63. package/docs/api/koatty.imiddleware.md +0 -20
  64. package/docs/api/koatty.imiddleware.run.md +0 -11
  65. package/docs/api/koatty.iplugin.md +0 -20
  66. package/docs/api/koatty.iplugin.run.md +0 -11
  67. package/docs/api/koatty.iservice.app.md +0 -11
  68. package/docs/api/koatty.iservice.md +0 -20
  69. package/docs/api/koatty.logger.md +0 -11
  70. package/docs/api/koatty.md +0 -51
  71. package/docs/api/koatty.middleware.md +0 -27
  72. package/docs/api/koatty.plugin.md +0 -27
  73. package/docs/api/koatty.service.md +0 -27
  74. package/jest.config.js +0 -34
  75. package/jest_html_reporters.html +0 -60
  76. package/rollup.config.js +0 -63
  77. package/scripts/copyright.js +0 -28
  78. package/scripts/postBuild.js +0 -10
  79. package/tsconfig.json +0 -69
@@ -1,26 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md) &gt; [json](./koatty.httpcontroller.json.md)
4
-
5
- ## HttpController.json() method
6
-
7
- Respond to json formatted content
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- json(data: any): Promise<any>;
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | data | any | |
20
-
21
- <b>Returns:</b>
22
-
23
- Promise&lt;any&gt;
24
-
25
- {<!-- -->Promise<any>} HttpController
26
-
@@ -1,35 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md)
4
-
5
- ## HttpController class
6
-
7
- HTTP controller
8
-
9
- HttpController {<!-- -->IController<!-- -->}
10
-
11
- <b>Signature:</b>
12
-
13
- ```typescript
14
- export declare class HttpController extends BaseController
15
- ```
16
- <b>Extends:</b> [BaseController](./koatty.basecontroller.md)
17
-
18
- ## Methods
19
-
20
- | Method | Modifiers | Description |
21
- | --- | --- | --- |
22
- | [body(data, contentType, encoding)](./koatty.httpcontroller.body.md) | | Set response Body content |
23
- | [deny(code)](./koatty.httpcontroller.deny.md) | | Block access |
24
- | [expires(timeout)](./koatty.httpcontroller.expires.md) | | set cache-control and expires header |
25
- | [fail(msg, data, code)](./koatty.httpcontroller.fail.md) | | Response to normalize json format content for fail |
26
- | [header(name, value)](./koatty.httpcontroller.header.md) | | Get/Set headers. |
27
- | [isGet()](./koatty.httpcontroller.isget.md) | | Whether it is a GET request |
28
- | [isMethod(method)](./koatty.httpcontroller.ismethod.md) | | Determines whether the METHOD request is specified |
29
- | [isPost()](./koatty.httpcontroller.ispost.md) | | Whether it is a POST request |
30
- | [json(data)](./koatty.httpcontroller.json.md) | | Respond to json formatted content |
31
- | [ok(msg, data, code)](./koatty.httpcontroller.ok.md) | | Response to normalize json format content for success |
32
- | [param(name)](./koatty.httpcontroller.param.md) | | Get POST/GET parameters, the POST value is priority. |
33
- | [redirect(urls, alt)](./koatty.httpcontroller.redirect.md) | | Url redirect |
34
- | [type(contentType, encoding)](./koatty.httpcontroller.type.md) | | Set response content-type |
35
-
@@ -1,28 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md) &gt; [ok](./koatty.httpcontroller.ok.md)
4
-
5
- ## HttpController.ok() method
6
-
7
- Response to normalize json format content for success
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- ok(msg: string | ApiInput, data?: any, code?: number): Promise<any>;
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | msg | string \| [ApiInput](./koatty.apiinput.md) | 待处理的message消息 |
20
- | data | any | 待处理的数据 |
21
- | code | number | 错误码,默认0 |
22
-
23
- <b>Returns:</b>
24
-
25
- Promise&lt;any&gt;
26
-
27
- {<!-- -->\*<!-- -->} HttpController
28
-
@@ -1,26 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md) &gt; [param](./koatty.httpcontroller.param.md)
4
-
5
- ## HttpController.param() method
6
-
7
- Get POST/GET parameters, the POST value is priority.
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- param(name?: string): any;
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | name | string | |
20
-
21
- <b>Returns:</b>
22
-
23
- any
24
-
25
- HttpController
26
-
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md) &gt; [redirect](./koatty.httpcontroller.redirect.md)
4
-
5
- ## HttpController.redirect() method
6
-
7
- Url redirect
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- redirect(urls: string, alt?: string): void;
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | urls | string | |
20
- | alt | string | |
21
-
22
- <b>Returns:</b>
23
-
24
- void
25
-
26
- {<!-- -->void<!-- -->} HttpController
27
-
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [HttpController](./koatty.httpcontroller.md) &gt; [type](./koatty.httpcontroller.type.md)
4
-
5
- ## HttpController.type() method
6
-
7
- Set response content-type
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- type(contentType: string, encoding?: string | boolean): string;
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | contentType | string | |
20
- | encoding | string \| boolean | |
21
-
22
- <b>Returns:</b>
23
-
24
- string
25
-
26
- {<!-- -->string<!-- -->} HttpController
27
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [\_\_after](./koatty.icontroller.__after.md)
4
-
5
- ## IController.\_\_after property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- __after?: () => Promise<any>;
11
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [\_\_befor](./koatty.icontroller.__befor.md)
4
-
5
- ## IController.\_\_befor property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- __befor?: () => Promise<any>;
11
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [app](./koatty.icontroller.app.md)
4
-
5
- ## IController.app property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- app: Koatty;
11
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [ctx](./koatty.icontroller.ctx.md)
4
-
5
- ## IController.ctx property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- readonly ctx: KoattyContext;
11
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [fail](./koatty.icontroller.fail.md)
4
-
5
- ## IController.fail property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- readonly fail: (msg?: Error | string | ApiInput, data?: any, ret?: number) => Promise<any>;
11
- ```
@@ -1,25 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md)
4
-
5
- ## IController interface
6
-
7
- Interface for Controller
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export interface IController
13
- ```
14
-
15
- ## Properties
16
-
17
- | Property | Type | Description |
18
- | --- | --- | --- |
19
- | [\_\_after?](./koatty.icontroller.__after.md) | () =&gt; Promise&lt;any&gt; | <i>(Optional)</i> |
20
- | [\_\_befor?](./koatty.icontroller.__befor.md) | () =&gt; Promise&lt;any&gt; | <i>(Optional)</i> |
21
- | [app](./koatty.icontroller.app.md) | Koatty | |
22
- | [ctx](./koatty.icontroller.ctx.md) | KoattyContext | |
23
- | [fail](./koatty.icontroller.fail.md) | (msg?: Error \| string \| [ApiInput](./koatty.apiinput.md)<!-- -->, data?: any, ret?: number) =&gt; Promise&lt;any&gt; | |
24
- | [ok](./koatty.icontroller.ok.md) | (msg?: string \| [ApiInput](./koatty.apiinput.md)<!-- -->, data?: any, ret?: number) =&gt; Promise&lt;any&gt; | |
25
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IController](./koatty.icontroller.md) &gt; [ok](./koatty.icontroller.ok.md)
4
-
5
- ## IController.ok property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- readonly ok: (msg?: string | ApiInput, data?: any, ret?: number) => Promise<any>;
11
- ```
@@ -1,20 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IMiddleware](./koatty.imiddleware.md)
4
-
5
- ## IMiddleware interface
6
-
7
- Interface for Middleware
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export interface IMiddleware
13
- ```
14
-
15
- ## Properties
16
-
17
- | Property | Type | Description |
18
- | --- | --- | --- |
19
- | [run](./koatty.imiddleware.run.md) | (options: any, app: Koatty) =&gt; Koa.Middleware | |
20
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IMiddleware](./koatty.imiddleware.md) &gt; [run](./koatty.imiddleware.run.md)
4
-
5
- ## IMiddleware.run property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- run: (options: any, app: Koatty) => Koa.Middleware;
11
- ```
@@ -1,20 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IPlugin](./koatty.iplugin.md)
4
-
5
- ## IPlugin interface
6
-
7
- Interface for Plugin
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export interface IPlugin
13
- ```
14
-
15
- ## Properties
16
-
17
- | Property | Type | Description |
18
- | --- | --- | --- |
19
- | [run](./koatty.iplugin.run.md) | (options: any, app: Koatty) =&gt; Promise&lt;any&gt; | |
20
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IPlugin](./koatty.iplugin.md) &gt; [run](./koatty.iplugin.run.md)
4
-
5
- ## IPlugin.run property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- run: (options: any, app: Koatty) => Promise<any>;
11
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IService](./koatty.iservice.md) &gt; [app](./koatty.iservice.app.md)
4
-
5
- ## IService.app property
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- app: Koatty;
11
- ```
@@ -1,20 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [IService](./koatty.iservice.md)
4
-
5
- ## IService interface
6
-
7
- Interface for Service
8
-
9
- <b>Signature:</b>
10
-
11
- ```typescript
12
- export interface IService
13
- ```
14
-
15
- ## Properties
16
-
17
- | Property | Type | Description |
18
- | --- | --- | --- |
19
- | [app](./koatty.iservice.app.md) | Koatty | |
20
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [Logger](./koatty.logger.md)
4
-
5
- ## Logger variable
6
-
7
- <b>Signature:</b>
8
-
9
- ```typescript
10
- Logger: import("koatty_logger").Logger
11
- ```
@@ -1,51 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md)
4
-
5
- ## koatty package
6
-
7
- ## Classes
8
-
9
- | Class | Description |
10
- | --- | --- |
11
- | [BaseController](./koatty.basecontroller.md) | Base controller BaseController {<!-- -->IController<!-- -->} |
12
- | [BaseService](./koatty.baseservice.md) | Base class Base |
13
- | [HttpController](./koatty.httpcontroller.md) | HTTP controller HttpController {<!-- -->IController<!-- -->} |
14
-
15
- ## Functions
16
-
17
- | Function | Description |
18
- | --- | --- |
19
- | [BindAppReadyHook(func, target)](./koatty.bindappreadyhook.md) | bind AppReadyHookFunc example: export function TestDecorator(): ClassDecorator { return (target: any) =<!-- -->&gt; { BindAppReadyHook((app: Koatty) =<!-- -->&gt; { // todo return Promise.resolve(); }<!-- -->, target) } } |
20
- | [Bootstrap(bootFunc)](./koatty.bootstrap.md) | Bootstrap application |
21
- | [Component(identifier)](./koatty.component.md) | Indicates that an decorated class is a "component". |
22
- | [ComponentScan(scanPath)](./koatty.componentscan.md) | Define project scan path |
23
- | [ConfigurationScan(scanPath)](./koatty.configurationscan.md) | Define project configuration scan path |
24
- | [Controller(path)](./koatty.controller.md) | Indicates that an decorated class is a "controller". |
25
- | [Middleware(identifier)](./koatty.middleware.md) | Indicates that an decorated class is a "middleware". |
26
- | [Plugin(identifier)](./koatty.plugin.md) | Indicates that an decorated class is a "plugin". |
27
- | [Service(identifier)](./koatty.service.md) | Indicates that an decorated class is a "service". |
28
-
29
- ## Interfaces
30
-
31
- | Interface | Description |
32
- | --- | --- |
33
- | [ApiInput](./koatty.apiinput.md) | Interface for Api input |
34
- | [ApiOutput](./koatty.apioutput.md) | Interface for Api output |
35
- | [IController](./koatty.icontroller.md) | Interface for Controller |
36
- | [IMiddleware](./koatty.imiddleware.md) | Interface for Middleware |
37
- | [IPlugin](./koatty.iplugin.md) | Interface for Plugin |
38
- | [IService](./koatty.iservice.md) | Interface for Service |
39
-
40
- ## Variables
41
-
42
- | Variable | Description |
43
- | --- | --- |
44
- | [Logger](./koatty.logger.md) | |
45
-
46
- ## Type Aliases
47
-
48
- | Type Alias | Description |
49
- | --- | --- |
50
- | [AppReadyHookFunc](./koatty.appreadyhookfunc.md) | |
51
-
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [Middleware](./koatty.middleware.md)
4
-
5
- ## Middleware() function
6
-
7
- Indicates that an decorated class is a "middleware".
8
-
9
-
10
- <b>Signature:</b>
11
-
12
- ```typescript
13
- export declare function Middleware(identifier?: string): ClassDecorator;
14
- ```
15
-
16
- ## Parameters
17
-
18
- | Parameter | Type | Description |
19
- | --- | --- | --- |
20
- | identifier | string | middleware name |
21
-
22
- <b>Returns:</b>
23
-
24
- ClassDecorator
25
-
26
- {<!-- -->ClassDecorator<!-- -->}
27
-
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [Plugin](./koatty.plugin.md)
4
-
5
- ## Plugin() function
6
-
7
- Indicates that an decorated class is a "plugin".
8
-
9
-
10
- <b>Signature:</b>
11
-
12
- ```typescript
13
- export declare function Plugin(identifier?: string): ClassDecorator;
14
- ```
15
-
16
- ## Parameters
17
-
18
- | Parameter | Type | Description |
19
- | --- | --- | --- |
20
- | identifier | string | |
21
-
22
- <b>Returns:</b>
23
-
24
- ClassDecorator
25
-
26
- {<!-- -->ClassDecorator<!-- -->}
27
-
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [koatty](./koatty.md) &gt; [Service](./koatty.service.md)
4
-
5
- ## Service() function
6
-
7
- Indicates that an decorated class is a "service".
8
-
9
-
10
- <b>Signature:</b>
11
-
12
- ```typescript
13
- export declare function Service(identifier?: string): ClassDecorator;
14
- ```
15
-
16
- ## Parameters
17
-
18
- | Parameter | Type | Description |
19
- | --- | --- | --- |
20
- | identifier | string | middleware name |
21
-
22
- <b>Returns:</b>
23
-
24
- ClassDecorator
25
-
26
- {<!-- -->ClassDecorator<!-- -->}
27
-
package/jest.config.js DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- *
3
- */
4
-
5
- // jest详细配置参见:
6
- // https://jestjs.io/docs/en/configuration.html
7
-
8
- module.exports = {
9
- preset: 'ts-jest',
10
- testEnvironment: 'node', // 测试用例运行环境
11
- testMatch: ['<rootDir>/test/**/*.(spec|test).[jt]s'], // 匹配测试用例的路径规则
12
- reporters: [
13
- 'default',
14
- 'jest-html-reporters'
15
- ], // 测试用例报告
16
- collectCoverage: true, // 是否收集测试时的覆盖率信息
17
- coverageReporters: [
18
- 'html',
19
- 'lcov',
20
- 'json',
21
- 'text',
22
- 'clover',
23
- 'text-summary',
24
- ], // 收集测试时的覆盖率信息
25
- // 将 `ts-jest` 的配置注入到运行时的全局变量中
26
- globals: {
27
- 'ts-jest': {
28
- // 编译 Typescript 所依赖的配置
29
- tsconfig: '<rootDir>/tsconfig.json',
30
- // 是否启用报告诊断,这里是不启用
31
- diagnostics: false,
32
- },
33
- }
34
- };