@tsed/platform-http 8.0.0-beta.10

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 (196) hide show
  1. package/.barrelsby.json +5 -0
  2. package/lib/esm/common/builder/PlatformBuilder.js +308 -0
  3. package/lib/esm/common/builder/PlatformBuilder.js.map +1 -0
  4. package/lib/esm/common/config/interfaces/PlatformJsonMapperSettings.js +2 -0
  5. package/lib/esm/common/config/interfaces/PlatformJsonMapperSettings.js.map +1 -0
  6. package/lib/esm/common/config/interfaces/PlatformMulterSettings.js +2 -0
  7. package/lib/esm/common/config/interfaces/PlatformMulterSettings.js.map +1 -0
  8. package/lib/esm/common/config/interfaces/PlatformRouterSettings.js +2 -0
  9. package/lib/esm/common/config/interfaces/PlatformRouterSettings.js.map +1 -0
  10. package/lib/esm/common/config/interfaces/PlatformStaticsSettings.js +2 -0
  11. package/lib/esm/common/config/interfaces/PlatformStaticsSettings.js.map +1 -0
  12. package/lib/esm/common/config/services/PlatformConfiguration.js +119 -0
  13. package/lib/esm/common/config/services/PlatformConfiguration.js.map +1 -0
  14. package/lib/esm/common/constants/routerOptions.js +2 -0
  15. package/lib/esm/common/constants/routerOptions.js.map +1 -0
  16. package/lib/esm/common/decorators/PlatformProvider.js +7 -0
  17. package/lib/esm/common/decorators/PlatformProvider.js.map +1 -0
  18. package/lib/esm/common/decorators/multer/multerFileSize.js +32 -0
  19. package/lib/esm/common/decorators/multer/multerFileSize.js.map +1 -0
  20. package/lib/esm/common/decorators/multer/multerOptions.js +50 -0
  21. package/lib/esm/common/decorators/multer/multerOptions.js.map +1 -0
  22. package/lib/esm/common/decorators/multer/multipartFile.js +75 -0
  23. package/lib/esm/common/decorators/multer/multipartFile.js.map +1 -0
  24. package/lib/esm/common/decorators/params/error.js +16 -0
  25. package/lib/esm/common/decorators/params/error.js.map +1 -0
  26. package/lib/esm/common/decorators/params/next.js +17 -0
  27. package/lib/esm/common/decorators/params/next.js.map +1 -0
  28. package/lib/esm/common/decorators/params/request.js +34 -0
  29. package/lib/esm/common/decorators/params/request.js.map +1 -0
  30. package/lib/esm/common/decorators/params/response.js +28 -0
  31. package/lib/esm/common/decorators/params/response.js.map +1 -0
  32. package/lib/esm/common/domain/AnyToPromiseWithCtx.js +21 -0
  33. package/lib/esm/common/domain/AnyToPromiseWithCtx.js.map +1 -0
  34. package/lib/esm/common/domain/EndpointMetadata.js +2 -0
  35. package/lib/esm/common/domain/EndpointMetadata.js.map +1 -0
  36. package/lib/esm/common/domain/PlatformContext.js +69 -0
  37. package/lib/esm/common/domain/PlatformContext.js.map +1 -0
  38. package/lib/esm/common/domain/PlatformRouteDetails.js +2 -0
  39. package/lib/esm/common/domain/PlatformRouteDetails.js.map +1 -0
  40. package/lib/esm/common/exports.js +5 -0
  41. package/lib/esm/common/exports.js.map +1 -0
  42. package/lib/esm/common/index.js +61 -0
  43. package/lib/esm/common/index.js.map +1 -0
  44. package/lib/esm/common/interfaces/AfterInit.js +2 -0
  45. package/lib/esm/common/interfaces/AfterInit.js.map +1 -0
  46. package/lib/esm/common/interfaces/AfterListen.js +2 -0
  47. package/lib/esm/common/interfaces/AfterListen.js.map +1 -0
  48. package/lib/esm/common/interfaces/AfterRoutesInit.js +2 -0
  49. package/lib/esm/common/interfaces/AfterRoutesInit.js.map +1 -0
  50. package/lib/esm/common/interfaces/BeforeInit.js +2 -0
  51. package/lib/esm/common/interfaces/BeforeInit.js.map +1 -0
  52. package/lib/esm/common/interfaces/BeforeListen.js +2 -0
  53. package/lib/esm/common/interfaces/BeforeListen.js.map +1 -0
  54. package/lib/esm/common/interfaces/BeforeRoutesInit.js +2 -0
  55. package/lib/esm/common/interfaces/BeforeRoutesInit.js.map +1 -0
  56. package/lib/esm/common/interfaces/HandlerType.js +14 -0
  57. package/lib/esm/common/interfaces/HandlerType.js.map +1 -0
  58. package/lib/esm/common/interfaces/IncomingEvent.js +2 -0
  59. package/lib/esm/common/interfaces/IncomingEvent.js.map +1 -0
  60. package/lib/esm/common/interfaces/OnReady.js +2 -0
  61. package/lib/esm/common/interfaces/OnReady.js.map +1 -0
  62. package/lib/esm/common/interfaces/OnRequest.js +2 -0
  63. package/lib/esm/common/interfaces/OnRequest.js.map +1 -0
  64. package/lib/esm/common/interfaces/OnResponse.js +2 -0
  65. package/lib/esm/common/interfaces/OnResponse.js.map +1 -0
  66. package/lib/esm/common/interfaces/OnRoutesInit.js +2 -0
  67. package/lib/esm/common/interfaces/OnRoutesInit.js.map +1 -0
  68. package/lib/esm/common/interfaces/PlatformRouteOptions.js +2 -0
  69. package/lib/esm/common/interfaces/PlatformRouteOptions.js.map +1 -0
  70. package/lib/esm/common/interfaces/ResponseErrorObject.js +2 -0
  71. package/lib/esm/common/interfaces/ResponseErrorObject.js.map +1 -0
  72. package/lib/esm/common/interfaces/Route.js +2 -0
  73. package/lib/esm/common/interfaces/Route.js.map +1 -0
  74. package/lib/esm/common/middlewares/PlatformAcceptMimesMiddleware.js +36 -0
  75. package/lib/esm/common/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -0
  76. package/lib/esm/common/middlewares/PlatformMulterMiddleware.js +66 -0
  77. package/lib/esm/common/middlewares/PlatformMulterMiddleware.js.map +1 -0
  78. package/lib/esm/common/services/Platform.js +73 -0
  79. package/lib/esm/common/services/Platform.js.map +1 -0
  80. package/lib/esm/common/services/PlatformAdapter.js +77 -0
  81. package/lib/esm/common/services/PlatformAdapter.js.map +1 -0
  82. package/lib/esm/common/services/PlatformApplication.js +41 -0
  83. package/lib/esm/common/services/PlatformApplication.js.map +1 -0
  84. package/lib/esm/common/services/PlatformHandler.js +130 -0
  85. package/lib/esm/common/services/PlatformHandler.js.map +1 -0
  86. package/lib/esm/common/services/PlatformMiddlewaresChain.js +57 -0
  87. package/lib/esm/common/services/PlatformMiddlewaresChain.js.map +1 -0
  88. package/lib/esm/common/services/PlatformRequest.js +141 -0
  89. package/lib/esm/common/services/PlatformRequest.js.map +1 -0
  90. package/lib/esm/common/services/PlatformResponse.js +306 -0
  91. package/lib/esm/common/services/PlatformResponse.js.map +1 -0
  92. package/lib/esm/common/utils/closeServer.js +4 -0
  93. package/lib/esm/common/utils/closeServer.js.map +1 -0
  94. package/lib/esm/common/utils/createContext.js +44 -0
  95. package/lib/esm/common/utils/createContext.js.map +1 -0
  96. package/lib/esm/common/utils/createHttpServer.js +13 -0
  97. package/lib/esm/common/utils/createHttpServer.js.map +1 -0
  98. package/lib/esm/common/utils/createHttpsServer.js +13 -0
  99. package/lib/esm/common/utils/createHttpsServer.js.map +1 -0
  100. package/lib/esm/common/utils/createInjector.js +41 -0
  101. package/lib/esm/common/utils/createInjector.js.map +1 -0
  102. package/lib/esm/common/utils/createServer.js +29 -0
  103. package/lib/esm/common/utils/createServer.js.map +1 -0
  104. package/lib/esm/common/utils/ensureContext.js +12 -0
  105. package/lib/esm/common/utils/ensureContext.js.map +1 -0
  106. package/lib/esm/common/utils/getConfiguration.js +32 -0
  107. package/lib/esm/common/utils/getConfiguration.js.map +1 -0
  108. package/lib/esm/common/utils/getStaticsOptions.js +17 -0
  109. package/lib/esm/common/utils/getStaticsOptions.js.map +1 -0
  110. package/lib/esm/common/utils/listenServer.js +10 -0
  111. package/lib/esm/common/utils/listenServer.js.map +1 -0
  112. package/lib/esm/common/utils/mapReturnedResponse.js +11 -0
  113. package/lib/esm/common/utils/mapReturnedResponse.js.map +1 -0
  114. package/lib/esm/common/utils/printRoutes.js +34 -0
  115. package/lib/esm/common/utils/printRoutes.js.map +1 -0
  116. package/lib/esm/common/utils/registerPlatformAdapter.js +7 -0
  117. package/lib/esm/common/utils/registerPlatformAdapter.js.map +1 -0
  118. package/lib/esm/common/utils/setResponseHeaders.js +25 -0
  119. package/lib/esm/common/utils/setResponseHeaders.js.map +1 -0
  120. package/lib/esm/index.js +3 -0
  121. package/lib/esm/index.js.map +1 -0
  122. package/lib/esm/testing/FakeAdapter.js +2 -0
  123. package/lib/esm/testing/FakeAdapter.js.map +1 -0
  124. package/lib/esm/testing/FakeResponse.js +55 -0
  125. package/lib/esm/testing/FakeResponse.js.map +1 -0
  126. package/lib/esm/testing/PlatformTest.js +131 -0
  127. package/lib/esm/testing/PlatformTest.js.map +1 -0
  128. package/lib/esm/testing/index.js +6 -0
  129. package/lib/esm/testing/index.js.map +1 -0
  130. package/lib/types/common/builder/PlatformBuilder.d.ts +100 -0
  131. package/lib/types/common/config/interfaces/PlatformJsonMapperSettings.d.ts +10 -0
  132. package/lib/types/common/config/interfaces/PlatformMulterSettings.d.ts +14 -0
  133. package/lib/types/common/config/interfaces/PlatformRouterSettings.d.ts +10 -0
  134. package/lib/types/common/config/interfaces/PlatformStaticsSettings.d.ts +17 -0
  135. package/lib/types/common/config/services/PlatformConfiguration.d.ts +78 -0
  136. package/lib/types/common/constants/routerOptions.d.ts +1 -0
  137. package/lib/types/common/decorators/PlatformProvider.d.ts +3 -0
  138. package/lib/types/common/decorators/multer/multerFileSize.d.ts +28 -0
  139. package/lib/types/common/decorators/multer/multerOptions.d.ts +43 -0
  140. package/lib/types/common/decorators/multer/multipartFile.d.ts +48 -0
  141. package/lib/types/common/decorators/params/error.d.ts +7 -0
  142. package/lib/types/common/decorators/params/next.d.ts +22 -0
  143. package/lib/types/common/decorators/params/request.d.ts +46 -0
  144. package/lib/types/common/decorators/params/response.d.ts +40 -0
  145. package/lib/types/common/domain/AnyToPromiseWithCtx.d.ts +10 -0
  146. package/lib/types/common/domain/EndpointMetadata.d.ts +1 -0
  147. package/lib/types/common/domain/PlatformContext.d.ts +80 -0
  148. package/lib/types/common/domain/PlatformRouteDetails.d.ts +7 -0
  149. package/lib/types/common/exports.d.ts +4 -0
  150. package/lib/types/common/index.d.ts +60 -0
  151. package/lib/types/common/interfaces/AfterInit.d.ts +3 -0
  152. package/lib/types/common/interfaces/AfterListen.d.ts +3 -0
  153. package/lib/types/common/interfaces/AfterRoutesInit.d.ts +3 -0
  154. package/lib/types/common/interfaces/BeforeInit.d.ts +3 -0
  155. package/lib/types/common/interfaces/BeforeListen.d.ts +3 -0
  156. package/lib/types/common/interfaces/BeforeRoutesInit.d.ts +3 -0
  157. package/lib/types/common/interfaces/HandlerType.d.ts +12 -0
  158. package/lib/types/common/interfaces/IncomingEvent.d.ts +6 -0
  159. package/lib/types/common/interfaces/OnReady.d.ts +3 -0
  160. package/lib/types/common/interfaces/OnRequest.d.ts +4 -0
  161. package/lib/types/common/interfaces/OnResponse.d.ts +4 -0
  162. package/lib/types/common/interfaces/OnRoutesInit.d.ts +3 -0
  163. package/lib/types/common/interfaces/PlatformRouteOptions.d.ts +15 -0
  164. package/lib/types/common/interfaces/ResponseErrorObject.d.ts +8 -0
  165. package/lib/types/common/interfaces/Route.d.ts +10 -0
  166. package/lib/types/common/middlewares/PlatformAcceptMimesMiddleware.d.ts +10 -0
  167. package/lib/types/common/middlewares/PlatformMulterMiddleware.d.ts +24 -0
  168. package/lib/types/common/services/Platform.d.ts +25 -0
  169. package/lib/types/common/services/PlatformAdapter.d.ts +89 -0
  170. package/lib/types/common/services/PlatformApplication.d.ts +29 -0
  171. package/lib/types/common/services/PlatformHandler.d.ts +39 -0
  172. package/lib/types/common/services/PlatformMiddlewaresChain.d.ts +17 -0
  173. package/lib/types/common/services/PlatformRequest.d.ts +111 -0
  174. package/lib/types/common/services/PlatformResponse.d.ts +175 -0
  175. package/lib/types/common/utils/closeServer.d.ts +7 -0
  176. package/lib/types/common/utils/createContext.d.ts +10 -0
  177. package/lib/types/common/utils/createHttpServer.d.ts +4 -0
  178. package/lib/types/common/utils/createHttpsServer.d.ts +4 -0
  179. package/lib/types/common/utils/createInjector.d.ts +8 -0
  180. package/lib/types/common/utils/createServer.d.ts +17 -0
  181. package/lib/types/common/utils/ensureContext.d.ts +2 -0
  182. package/lib/types/common/utils/getConfiguration.d.ts +2 -0
  183. package/lib/types/common/utils/getStaticsOptions.d.ts +5 -0
  184. package/lib/types/common/utils/listenServer.d.ts +8 -0
  185. package/lib/types/common/utils/mapReturnedResponse.d.ts +4 -0
  186. package/lib/types/common/utils/printRoutes.d.ts +2 -0
  187. package/lib/types/common/utils/registerPlatformAdapter.d.ts +3 -0
  188. package/lib/types/common/utils/setResponseHeaders.d.ts +5 -0
  189. package/lib/types/index.d.ts +2 -0
  190. package/lib/types/testing/FakeAdapter.d.ts +1 -0
  191. package/lib/types/testing/FakeResponse.d.ts +22 -0
  192. package/lib/types/testing/PlatformTest.d.ts +61 -0
  193. package/lib/types/testing/index.d.ts +5 -0
  194. package/package.json +111 -0
  195. package/readme.md +226 -0
  196. package/vitest.config.mts +21 -0
package/readme.md ADDED
@@ -0,0 +1,226 @@
1
+ <p style="text-align: center" align="center">
2
+ <a href="https://tsed.io" target="_blank"><img src="https://tsed.io/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
3
+ </p>
4
+
5
+ <div align="center">
6
+ <h1>@tsed/common</h1>
7
+
8
+ [![Build & Release](https://github.com/tsedio/tsed/workflows/Build%20&%20Release/badge.svg)](https://github.com/tsedio/tsed/actions?query=workflow%3A%22Build+%26+Release%22)
9
+ [![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tsedio/tsed/blob/master/CONTRIBUTING.md)
10
+ [![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)
11
+ [![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)
12
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
13
+ [![github](https://img.shields.io/static/v1?label=Github%20sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/romakita)
14
+ [![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor&message=%E2%9D%A4&logo=OpenCollective&color=%23fe8e86)](https://opencollective.com/tsed)
15
+
16
+ </div>
17
+
18
+ <div align="center">
19
+ <a href="https://tsed.io/">Website</a>
20
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
21
+ <a href="https://tsed.io/getting-started/">Getting started</a>
22
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
23
+ <a href="https://api.tsed.io/rest/slack/tsedio/tsed">Slack</a>
24
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
25
+ <a href="https://twitter.com/TsED_io">Twitter</a>
26
+ </div>
27
+
28
+ <hr />
29
+
30
+ > A Node.js and TypeScript Framework on top of Express. It provides a lot of decorators and guidelines to write your
31
+ > code.
32
+
33
+ ## What it is
34
+
35
+ Ts.ED is a framework on top of Express that helps you to write your application in TypeScript (or in ES6). It provides a
36
+ lot of decorators
37
+ to make your code more readable and less error-prone.
38
+
39
+ ## Features
40
+
41
+ - Use our CLI to create a new project https://cli.tsed.io
42
+ - Support TypeORM, Mongoose, GraphQL, Socket.io, Swagger-ui, Passport.js, etc...
43
+ - Define class as Controller,
44
+ - Define class as Service (IoC),
45
+ - Define class as Middleware and MiddlewareError,
46
+ - Define class as Json Mapper (POJ to Model and Model to POJ),
47
+ - Define root path for an entire controller and versioning your Rest API,
48
+ - Define as sub-route path for a method,
49
+ - Define routes on GET, POST, PUT, DELETE and HEAD verbs,
50
+ - Define middlewares on routes,
51
+ - Define required parameters,
52
+ - Inject data from query string, path parameters, entire body, cookies, session or header,
53
+ - Inject Request, Response, Next object from Express request,
54
+ - Template (View),
55
+ - Testing.
56
+
57
+ ## Documentation
58
+
59
+ Documentation is available on [https://tsed.io](https://tsed.io)
60
+
61
+ ## Getting started
62
+
63
+ See our [getting started here](https://tsed.io/getting-started/) to create new Ts.ED project or use
64
+ our [CLI](https://cli.tsed.io)
65
+
66
+ ## Examples
67
+
68
+ Examples are available on [https://tsed.io/tutorials/](https://tsed.io/tutorials/)
69
+
70
+ ## Overview
71
+
72
+ ### Server example
73
+
74
+ Here an example to create a Server with Ts.ED:
75
+
76
+ ```typescript
77
+ import {Configuration, Inject} from "@tsed/di";
78
+ import {PlatformApplication} from "@tsed/platform-http";
79
+ import "@tsed/platform-express";
80
+ import Path from "path";
81
+ import cookieParser from "cookie-parser";
82
+ import compress from "compression";
83
+ import methodOverride from "method-override";
84
+
85
+ @Configuration({
86
+ port: 3000,
87
+ middlewares: ["cookie-parser", "compression", "method-override", "json-parser", "urlencoded-parser"]
88
+ })
89
+ export class Server {}
90
+ ```
91
+
92
+ To run your server, you have to use Platform API to bootstrap your application with the expected
93
+ platform like Express.
94
+
95
+ ```typescript
96
+ import {$log} from "@tsed/logger";
97
+ import {PlatformExpress} from "@tsed/platform-express";
98
+ import {Server} from "./Server.js";
99
+
100
+ async function bootstrap() {
101
+ try {
102
+ $log.debug("Start server...");
103
+ const platform = await PlatformExpress.bootstrap(Server);
104
+
105
+ await platform.listen();
106
+ $log.debug("Server initialized");
107
+ } catch (er) {
108
+ $log.error(er);
109
+ }
110
+ }
111
+
112
+ bootstrap();
113
+ ```
114
+
115
+ To customize the server settings see [Configure server with decorator](https://tsed.io/docs/configuration.md)
116
+
117
+ #### Controller example
118
+
119
+ This is a simple controller to expose user resource. It use decorators to build the endpoints:
120
+
121
+ ```typescript
122
+ import {Inject} from "@tsed/di";
123
+ import {Summary} from "@tsed/swagger";
124
+ import {
125
+ Returns,
126
+ ReturnsArray,
127
+ Controller,
128
+ Get,
129
+ QueryParams,
130
+ PathParams,
131
+ Delete,
132
+ Post,
133
+ Required,
134
+ BodyParams,
135
+ Status,
136
+ Put
137
+ } from "@tsed/schema";
138
+ import {BadRequest} from "@tsed/exceptions";
139
+ import {UsersService} from "../services/UsersService.js";
140
+ import {User} from "../models/User.js";
141
+
142
+ @Controller("/users")
143
+ export class UsersCtrl {
144
+ @Inject()
145
+ protected usersService: UsersService;
146
+
147
+ @Get("/:id")
148
+ @Summary("Get a user from his Id")
149
+ @Returns(User)
150
+ async getUser(@PathParams("id") id: string): Promise<User> {
151
+ return this.usersService.findById(id);
152
+ }
153
+
154
+ @Post("/")
155
+ @Status(201)
156
+ @Summary("Create a new user")
157
+ @Returns(User)
158
+ async postUser(@Required() @BodyParams() user: User): Promise<User> {
159
+ return this.usersService.save(user);
160
+ }
161
+
162
+ @Put("/:id")
163
+ @Status(201)
164
+ @Summary("Update the given user")
165
+ @Returns(User)
166
+ async putUser(@PathParams("id") id: string, @Required() @BodyParams() user: User): Promise<User> {
167
+ if (user.id !== id) {
168
+ throw new BadRequest("ID mismatch with the given payload");
169
+ }
170
+
171
+ return this.usersService.save(user);
172
+ }
173
+
174
+ @Delete("/:id")
175
+ @Summary("Remove a user")
176
+ @Status(204)
177
+ async deleteUser(@PathParams("id") @Required() id: string): Promise<User> {
178
+ await this.usersService.delete(user);
179
+ }
180
+
181
+ @Get("/")
182
+ @Summary("Get all users")
183
+ @ReturnsArray(User)
184
+ async findUser(@QueryParams("name") name: string) {
185
+ return this.usersService.find({name});
186
+ }
187
+ }
188
+ ```
189
+
190
+ ## Contributors
191
+
192
+ Please read [contributing guidelines here](./CONTRIBUTING.md).
193
+
194
+ <a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
195
+
196
+ ## Backers
197
+
198
+ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
199
+
200
+ <a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
201
+
202
+ ## Sponsors
203
+
204
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your
205
+ website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
206
+
207
+ ## License
208
+
209
+ The MIT License (MIT)
210
+
211
+ Copyright (c) 2016 - 2020 Romain Lenzotti
212
+
213
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
214
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
215
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
216
+ persons to whom the Software is furnished to do so, subject to the following conditions:
217
+
218
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
219
+ Software.
220
+
221
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
222
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
223
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
224
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
225
+
226
+ [travis]: https://travis-ci.org/
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import {presets} from "@tsed/vitest/presets";
3
+ import {defineConfig} from "vitest/config";
4
+
5
+ export default defineConfig(
6
+ {
7
+ ...presets,
8
+ test: {
9
+ ...presets.test,
10
+ coverage: {
11
+ ...presets.test.coverage,
12
+ thresholds: {
13
+ statements: 97.98,
14
+ branches: 97.47,
15
+ functions: 95.29,
16
+ lines: 97.98
17
+ }
18
+ }
19
+ }
20
+ }
21
+ );