@tsed/common 7.0.0-beta.1 → 7.0.0-beta.12

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 (298) hide show
  1. package/lib/cjs/builder/PlatformBuilder.js +48 -42
  2. package/lib/cjs/builder/PlatformBuilder.js.map +1 -1
  3. package/lib/cjs/builder/PlatformControllerBuilder.js +5 -8
  4. package/lib/cjs/builder/PlatformControllerBuilder.js.map +1 -1
  5. package/lib/cjs/config/interfaces/PlatformMulterSettings.js.map +1 -1
  6. package/lib/cjs/config/services/PlatformConfiguration.js +8 -2
  7. package/lib/cjs/config/services/PlatformConfiguration.js.map +1 -1
  8. package/lib/cjs/decorators/multer/multipartFile.js.map +1 -1
  9. package/lib/cjs/domain/EndpointMetadata.js +2 -66
  10. package/lib/cjs/domain/EndpointMetadata.js.map +1 -1
  11. package/lib/cjs/domain/PlatformContext.js.map +1 -1
  12. package/lib/cjs/domain/PlatformRouteDetails.js.map +1 -1
  13. package/lib/cjs/exports.js +31 -0
  14. package/lib/cjs/exports.js.map +1 -0
  15. package/lib/cjs/index.js +64 -30
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/cjs/interfaces/PlatformRouteOptions.js.map +1 -1
  18. package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js +8 -8
  19. package/lib/cjs/middlewares/PlatformAcceptMimesMiddleware.js.map +1 -1
  20. package/lib/cjs/middlewares/PlatformMulterMiddleware.js +25 -13
  21. package/lib/cjs/middlewares/PlatformMulterMiddleware.js.map +1 -1
  22. package/lib/cjs/middlewares/__mock__/FakeCtrl.js +1 -1
  23. package/lib/cjs/middlewares/bindEndpointMiddleware.js.map +1 -1
  24. package/lib/cjs/package.json +3 -0
  25. package/lib/cjs/services/FakeAdapter.js +55 -0
  26. package/lib/cjs/services/FakeAdapter.js.map +1 -0
  27. package/lib/cjs/services/Platform.js +30 -9
  28. package/lib/cjs/services/Platform.js.map +1 -1
  29. package/lib/cjs/services/PlatformAdapter.js +14 -0
  30. package/lib/cjs/services/PlatformAdapter.js.map +1 -0
  31. package/lib/cjs/services/PlatformApplication.js +9 -11
  32. package/lib/cjs/services/PlatformApplication.js.map +1 -1
  33. package/lib/cjs/services/PlatformHandler.js +11 -9
  34. package/lib/cjs/services/PlatformHandler.js.map +1 -1
  35. package/lib/cjs/services/PlatformMiddlewaresChain.js +56 -15
  36. package/lib/cjs/services/PlatformMiddlewaresChain.js.map +1 -1
  37. package/lib/cjs/services/PlatformRequest.js +2 -2
  38. package/lib/cjs/services/PlatformResponse.js +5 -5
  39. package/lib/cjs/services/PlatformResponse.js.map +1 -1
  40. package/lib/cjs/services/PlatformRouter.js +14 -32
  41. package/lib/cjs/services/PlatformRouter.js.map +1 -1
  42. package/lib/cjs/services/PlatformTest.js +10 -3
  43. package/lib/cjs/services/PlatformTest.js.map +1 -1
  44. package/lib/cjs/utils/__mock__/Test1.js +8 -0
  45. package/lib/cjs/utils/__mock__/Test1.js.map +1 -0
  46. package/lib/cjs/utils/__mock__/Test2.js +8 -0
  47. package/lib/cjs/utils/__mock__/Test2.js.map +1 -0
  48. package/lib/cjs/utils/__mock__/controllers/rest/TestCtrl.js +12 -0
  49. package/lib/cjs/utils/__mock__/controllers/rest/TestCtrl.js.map +1 -0
  50. package/lib/cjs/utils/__mock__/module1/Module1.js +19 -0
  51. package/lib/cjs/utils/__mock__/module1/Module1.js.map +1 -0
  52. package/lib/cjs/utils/__mock__/module1/controllers/M1Ctrl1.js +17 -0
  53. package/lib/cjs/utils/__mock__/module1/controllers/M1Ctrl1.js.map +1 -0
  54. package/lib/cjs/utils/__mock__/module1/services/M1Service.js +17 -0
  55. package/lib/cjs/utils/__mock__/module1/services/M1Service.js.map +1 -0
  56. package/lib/cjs/utils/__mock__/module1/submodule/SubModule.js +15 -0
  57. package/lib/cjs/utils/__mock__/module1/submodule/SubModule.js.map +1 -0
  58. package/lib/cjs/utils/__mock__/module1/submodule/SubService.js +12 -0
  59. package/lib/cjs/utils/__mock__/module1/submodule/SubService.js.map +1 -0
  60. package/lib/cjs/utils/__mock__/module2/Module2.js +18 -0
  61. package/lib/cjs/utils/__mock__/module2/Module2.js.map +1 -0
  62. package/lib/cjs/utils/__mock__/module2/controllers/M2Ctrl.js +12 -0
  63. package/lib/cjs/utils/__mock__/module2/controllers/M2Ctrl.js.map +1 -0
  64. package/lib/cjs/utils/createContext.js +2 -2
  65. package/lib/cjs/utils/createContext.js.map +1 -1
  66. package/lib/cjs/utils/createHandlerMetadata.js +2 -2
  67. package/lib/cjs/utils/createHandlerMetadata.js.map +1 -1
  68. package/lib/cjs/utils/createHttpServer.js +3 -8
  69. package/lib/cjs/utils/createHttpServer.js.map +1 -1
  70. package/lib/cjs/utils/createHttpsServer.js +3 -8
  71. package/lib/cjs/utils/createHttpsServer.js.map +1 -1
  72. package/lib/cjs/utils/createInjector.js +11 -3
  73. package/lib/cjs/utils/createInjector.js.map +1 -1
  74. package/lib/cjs/utils/getConfiguration.js +4 -0
  75. package/lib/cjs/utils/getConfiguration.js.map +1 -1
  76. package/lib/cjs/utils/setResponseHeaders.js.map +1 -1
  77. package/lib/esm/builder/PlatformBuilder.js +38 -32
  78. package/lib/esm/builder/PlatformBuilder.js.map +1 -1
  79. package/lib/esm/builder/PlatformControllerBuilder.js +8 -11
  80. package/lib/esm/builder/PlatformControllerBuilder.js.map +1 -1
  81. package/lib/esm/config/interfaces/PlatformMulterSettings.js.map +1 -1
  82. package/lib/esm/config/services/PlatformConfiguration.js +6 -0
  83. package/lib/esm/config/services/PlatformConfiguration.js.map +1 -1
  84. package/lib/esm/decorators/multer/multerFileSize.js +1 -1
  85. package/lib/esm/decorators/multer/multerOptions.js +1 -1
  86. package/lib/esm/decorators/multer/multipartFile.js +1 -1
  87. package/lib/esm/decorators/multer/multipartFile.js.map +1 -1
  88. package/lib/esm/domain/ControllerProvider.js +1 -1
  89. package/lib/esm/domain/EndpointMetadata.js +1 -66
  90. package/lib/esm/domain/EndpointMetadata.js.map +1 -1
  91. package/lib/esm/domain/HandlerMetadata.js +1 -1
  92. package/lib/esm/domain/PlatformContext.js +3 -3
  93. package/lib/esm/domain/PlatformContext.js.map +1 -1
  94. package/lib/esm/domain/PlatformRouteDetails.js.map +1 -1
  95. package/lib/esm/exports.js +13 -0
  96. package/lib/esm/exports.js.map +1 -0
  97. package/lib/esm/index.js +64 -27
  98. package/lib/esm/index.js.map +1 -1
  99. package/lib/esm/interfaces/PlatformRouteOptions.js.map +1 -1
  100. package/lib/esm/middlewares/PlatformMulterMiddleware.js +16 -5
  101. package/lib/esm/middlewares/PlatformMulterMiddleware.js.map +1 -1
  102. package/lib/esm/middlewares/bindEndpointMiddleware.js.map +1 -1
  103. package/lib/esm/package.json +3 -0
  104. package/lib/esm/services/FakeAdapter.js +51 -0
  105. package/lib/esm/services/FakeAdapter.js.map +1 -0
  106. package/lib/esm/services/Platform.js +31 -10
  107. package/lib/esm/services/Platform.js.map +1 -1
  108. package/lib/esm/services/PlatformAdapter.js +10 -0
  109. package/lib/esm/services/PlatformAdapter.js.map +1 -0
  110. package/lib/esm/services/PlatformApplication.js +11 -13
  111. package/lib/esm/services/PlatformApplication.js.map +1 -1
  112. package/lib/esm/services/PlatformHandler.js +13 -11
  113. package/lib/esm/services/PlatformHandler.js.map +1 -1
  114. package/lib/esm/services/PlatformMiddlewaresChain.js +61 -20
  115. package/lib/esm/services/PlatformMiddlewaresChain.js.map +1 -1
  116. package/lib/esm/services/PlatformResponse.js +1 -1
  117. package/lib/esm/services/PlatformResponse.js.map +1 -1
  118. package/lib/esm/services/PlatformRouter.js +13 -31
  119. package/lib/esm/services/PlatformRouter.js.map +1 -1
  120. package/lib/esm/services/PlatformTest.js +14 -8
  121. package/lib/esm/services/PlatformTest.js.map +1 -1
  122. package/lib/esm/utils/__mock__/Test1.js +4 -0
  123. package/lib/esm/utils/__mock__/Test1.js.map +1 -0
  124. package/lib/esm/utils/__mock__/Test2.js +4 -0
  125. package/lib/esm/utils/__mock__/Test2.js.map +1 -0
  126. package/lib/esm/utils/__mock__/controllers/rest/TestCtrl.js +9 -0
  127. package/lib/esm/utils/__mock__/controllers/rest/TestCtrl.js.map +1 -0
  128. package/lib/esm/utils/__mock__/module1/Module1.js +16 -0
  129. package/lib/esm/utils/__mock__/module1/Module1.js.map +1 -0
  130. package/lib/esm/utils/__mock__/module1/controllers/M1Ctrl1.js +14 -0
  131. package/lib/esm/utils/__mock__/module1/controllers/M1Ctrl1.js.map +1 -0
  132. package/lib/esm/utils/__mock__/module1/services/M1Service.js +14 -0
  133. package/lib/esm/utils/__mock__/module1/services/M1Service.js.map +1 -0
  134. package/lib/esm/utils/__mock__/module1/submodule/SubModule.js +12 -0
  135. package/lib/esm/utils/__mock__/module1/submodule/SubModule.js.map +1 -0
  136. package/lib/esm/utils/__mock__/module1/submodule/SubService.js +9 -0
  137. package/lib/esm/utils/__mock__/module1/submodule/SubService.js.map +1 -0
  138. package/lib/esm/utils/__mock__/module2/Module2.js +15 -0
  139. package/lib/esm/utils/__mock__/module2/Module2.js.map +1 -0
  140. package/lib/esm/utils/__mock__/module2/controllers/M2Ctrl.js +9 -0
  141. package/lib/esm/utils/__mock__/module2/controllers/M2Ctrl.js.map +1 -0
  142. package/lib/esm/utils/createContext.js +5 -5
  143. package/lib/esm/utils/createContext.js.map +1 -1
  144. package/lib/esm/utils/createHandlerMetadata.js +3 -3
  145. package/lib/esm/utils/createHandlerMetadata.js.map +1 -1
  146. package/lib/esm/utils/createHttpServer.js +3 -8
  147. package/lib/esm/utils/createHttpServer.js.map +1 -1
  148. package/lib/esm/utils/createHttpsServer.js +3 -8
  149. package/lib/esm/utils/createHttpsServer.js.map +1 -1
  150. package/lib/esm/utils/createInjector.js +18 -10
  151. package/lib/esm/utils/createInjector.js.map +1 -1
  152. package/lib/esm/utils/getConfiguration.js +4 -0
  153. package/lib/esm/utils/getConfiguration.js.map +1 -1
  154. package/lib/esm/utils/setResponseHeaders.js.map +1 -1
  155. package/lib/esm/utils/useCtxHandler.js +1 -1
  156. package/lib/types/builder/PlatformBuilder.d.ts +9 -8
  157. package/lib/types/builder/PlatformControllerBuilder.d.ts +2 -1
  158. package/lib/types/config/interfaces/PlatformMulterSettings.d.ts +6 -130
  159. package/lib/types/config/services/PlatformConfiguration.d.ts +12 -6
  160. package/lib/types/domain/EndpointMetadata.d.ts +1 -50
  161. package/lib/types/domain/PlatformContext.d.ts +1 -1
  162. package/lib/types/domain/PlatformRouteDetails.d.ts +2 -3
  163. package/lib/types/exports.d.ts +12 -0
  164. package/lib/types/index.d.ts +61 -17
  165. package/lib/types/interfaces/PlatformRouteOptions.d.ts +1 -1
  166. package/lib/types/middlewares/PlatformMulterMiddleware.d.ts +8 -3
  167. package/lib/types/middlewares/bindEndpointMiddleware.d.ts +2 -1
  168. package/lib/types/services/FakeAdapter.d.ts +30 -0
  169. package/lib/types/services/Platform.d.ts +10 -1
  170. package/lib/types/services/PlatformAdapter.d.ts +47 -0
  171. package/lib/types/services/PlatformApplication.d.ts +3 -3
  172. package/lib/types/services/PlatformHandler.d.ts +1 -1
  173. package/lib/types/services/PlatformMiddlewaresChain.d.ts +6 -2
  174. package/lib/types/services/PlatformResponse.d.ts +6 -6
  175. package/lib/types/services/PlatformRouter.d.ts +10 -7
  176. package/lib/types/services/PlatformTest.d.ts +2 -2
  177. package/lib/types/utils/__mock__/Test1.d.ts +3 -0
  178. package/lib/types/utils/__mock__/Test2.d.ts +3 -0
  179. package/lib/types/utils/__mock__/controllers/rest/TestCtrl.d.ts +2 -0
  180. package/lib/types/utils/__mock__/module1/Module1.d.ts +2 -0
  181. package/lib/types/utils/__mock__/module1/controllers/M1Ctrl1.d.ts +5 -0
  182. package/lib/types/utils/__mock__/module1/services/M1Service.d.ts +5 -0
  183. package/lib/types/utils/__mock__/module1/submodule/SubModule.d.ts +2 -0
  184. package/lib/types/utils/__mock__/module1/submodule/SubService.d.ts +2 -0
  185. package/lib/types/utils/__mock__/module2/Module2.d.ts +2 -0
  186. package/lib/types/utils/__mock__/module2/controllers/M2Ctrl.d.ts +2 -0
  187. package/lib/types/utils/createHandlerMetadata.d.ts +1 -1
  188. package/lib/types/utils/createHttpServer.d.ts +1 -1
  189. package/lib/types/utils/createHttpsServer.d.ts +2 -1
  190. package/lib/types/utils/createInjector.d.ts +5 -3
  191. package/package.json +41 -26
  192. package/readme.md +52 -58
  193. package/tsconfig.compile.esm.json +2 -12
  194. package/lib/cjs/config/index.js +0 -7
  195. package/lib/cjs/config/index.js.map +0 -1
  196. package/lib/cjs/config/interfaces/EndpointDirectoriesSettings.js +0 -3
  197. package/lib/cjs/config/interfaces/EndpointDirectoriesSettings.js.map +0 -1
  198. package/lib/cjs/config/interfaces/index.js +0 -8
  199. package/lib/cjs/config/interfaces/index.js.map +0 -1
  200. package/lib/cjs/decorators/httpServer.js +0 -32
  201. package/lib/cjs/decorators/httpServer.js.map +0 -1
  202. package/lib/cjs/decorators/httpsServer.js +0 -32
  203. package/lib/cjs/decorators/httpsServer.js.map +0 -1
  204. package/lib/cjs/decorators/index.js +0 -21
  205. package/lib/cjs/decorators/index.js.map +0 -1
  206. package/lib/cjs/decorators/method/acceptMime.js +0 -28
  207. package/lib/cjs/decorators/method/acceptMime.js.map +0 -1
  208. package/lib/cjs/decorators/method/endpointFn.js +0 -15
  209. package/lib/cjs/decorators/method/endpointFn.js.map +0 -1
  210. package/lib/cjs/decorators/method/location.js +0 -6
  211. package/lib/cjs/decorators/method/location.js.map +0 -1
  212. package/lib/cjs/decorators/method/redirect.js +0 -6
  213. package/lib/cjs/decorators/method/redirect.js.map +0 -1
  214. package/lib/cjs/decorators/method/route.js +0 -13
  215. package/lib/cjs/decorators/method/route.js.map +0 -1
  216. package/lib/cjs/decorators/method/view.js +0 -34
  217. package/lib/cjs/decorators/method/view.js.map +0 -1
  218. package/lib/cjs/decorators/multer/index.js +0 -7
  219. package/lib/cjs/decorators/multer/index.js.map +0 -1
  220. package/lib/cjs/domain/index.js +0 -10
  221. package/lib/cjs/domain/index.js.map +0 -1
  222. package/lib/cjs/interfaces/PathType.js +0 -3
  223. package/lib/cjs/interfaces/PathType.js.map +0 -1
  224. package/lib/cjs/interfaces/PlatformAdapter.js +0 -3
  225. package/lib/cjs/interfaces/PlatformAdapter.js.map +0 -1
  226. package/lib/cjs/interfaces/index.js +0 -21
  227. package/lib/cjs/interfaces/index.js.map +0 -1
  228. package/lib/cjs/middlewares/index.js +0 -7
  229. package/lib/cjs/middlewares/index.js.map +0 -1
  230. package/lib/cjs/services/FakeRawDriver.js +0 -26
  231. package/lib/cjs/services/FakeRawDriver.js.map +0 -1
  232. package/lib/cjs/services/index.js +0 -12
  233. package/lib/cjs/services/index.js.map +0 -1
  234. package/lib/cjs/utils/index.js +0 -11
  235. package/lib/cjs/utils/index.js.map +0 -1
  236. package/lib/esm/config/index.js +0 -4
  237. package/lib/esm/config/index.js.map +0 -1
  238. package/lib/esm/config/interfaces/EndpointDirectoriesSettings.js +0 -2
  239. package/lib/esm/config/interfaces/EndpointDirectoriesSettings.js.map +0 -1
  240. package/lib/esm/config/interfaces/index.js +0 -5
  241. package/lib/esm/config/interfaces/index.js.map +0 -1
  242. package/lib/esm/decorators/httpServer.js +0 -28
  243. package/lib/esm/decorators/httpServer.js.map +0 -1
  244. package/lib/esm/decorators/httpsServer.js +0 -28
  245. package/lib/esm/decorators/httpsServer.js.map +0 -1
  246. package/lib/esm/decorators/index.js +0 -18
  247. package/lib/esm/decorators/index.js.map +0 -1
  248. package/lib/esm/decorators/method/acceptMime.js +0 -24
  249. package/lib/esm/decorators/method/acceptMime.js.map +0 -1
  250. package/lib/esm/decorators/method/endpointFn.js +0 -11
  251. package/lib/esm/decorators/method/endpointFn.js.map +0 -1
  252. package/lib/esm/decorators/method/location.js +0 -2
  253. package/lib/esm/decorators/method/location.js.map +0 -1
  254. package/lib/esm/decorators/method/redirect.js +0 -2
  255. package/lib/esm/decorators/method/redirect.js.map +0 -1
  256. package/lib/esm/decorators/method/route.js +0 -2
  257. package/lib/esm/decorators/method/route.js.map +0 -1
  258. package/lib/esm/decorators/method/view.js +0 -30
  259. package/lib/esm/decorators/method/view.js.map +0 -1
  260. package/lib/esm/decorators/multer/index.js +0 -4
  261. package/lib/esm/decorators/multer/index.js.map +0 -1
  262. package/lib/esm/domain/index.js +0 -7
  263. package/lib/esm/domain/index.js.map +0 -1
  264. package/lib/esm/interfaces/PathType.js +0 -2
  265. package/lib/esm/interfaces/PathType.js.map +0 -1
  266. package/lib/esm/interfaces/PlatformAdapter.js +0 -2
  267. package/lib/esm/interfaces/PlatformAdapter.js.map +0 -1
  268. package/lib/esm/interfaces/index.js +0 -18
  269. package/lib/esm/interfaces/index.js.map +0 -1
  270. package/lib/esm/middlewares/index.js +0 -4
  271. package/lib/esm/middlewares/index.js.map +0 -1
  272. package/lib/esm/services/FakeRawDriver.js +0 -22
  273. package/lib/esm/services/FakeRawDriver.js.map +0 -1
  274. package/lib/esm/services/index.js +0 -9
  275. package/lib/esm/services/index.js.map +0 -1
  276. package/lib/esm/utils/index.js +0 -8
  277. package/lib/esm/utils/index.js.map +0 -1
  278. package/lib/types/config/index.d.ts +0 -3
  279. package/lib/types/config/interfaces/EndpointDirectoriesSettings.d.ts +0 -3
  280. package/lib/types/config/interfaces/index.d.ts +0 -97
  281. package/lib/types/decorators/httpServer.d.ts +0 -28
  282. package/lib/types/decorators/httpsServer.d.ts +0 -28
  283. package/lib/types/decorators/index.d.ts +0 -14
  284. package/lib/types/decorators/method/acceptMime.d.ts +0 -19
  285. package/lib/types/decorators/method/endpointFn.d.ts +0 -9
  286. package/lib/types/decorators/method/location.d.ts +0 -1
  287. package/lib/types/decorators/method/redirect.d.ts +0 -1
  288. package/lib/types/decorators/method/route.d.ts +0 -1
  289. package/lib/types/decorators/method/view.d.ts +0 -25
  290. package/lib/types/decorators/multer/index.d.ts +0 -3
  291. package/lib/types/domain/index.d.ts +0 -6
  292. package/lib/types/interfaces/PathType.d.ts +0 -1
  293. package/lib/types/interfaces/PlatformAdapter.d.ts +0 -19
  294. package/lib/types/interfaces/index.d.ts +0 -17
  295. package/lib/types/middlewares/index.d.ts +0 -3
  296. package/lib/types/services/FakeRawDriver.d.ts +0 -15
  297. package/lib/types/services/index.d.ts +0 -8
  298. package/lib/types/utils/index.d.ts +0 -7
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./AnyToPromiseWithCtx"), exports);
5
- (0, tslib_1.__exportStar)(require("./PlatformContext"), exports);
6
- (0, tslib_1.__exportStar)(require("./PlatformRouteDetails"), exports);
7
- (0, tslib_1.__exportStar)(require("./ControllerProvider"), exports);
8
- (0, tslib_1.__exportStar)(require("./EndpointMetadata"), exports);
9
- (0, tslib_1.__exportStar)(require("./HandlerMetadata"), exports);
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":";;;AAAA,qEAAsC;AACtC,iEAAkC;AAClC,sEAAuC;AACvC,oEAAqC;AACrC,kEAAmC;AACnC,iEAAkC","sourcesContent":["export * from \"./AnyToPromiseWithCtx\";\nexport * from \"./PlatformContext\";\nexport * from \"./PlatformRouteDetails\";\nexport * from \"./ControllerProvider\";\nexport * from \"./EndpointMetadata\";\nexport * from \"./HandlerMetadata\";\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=PathType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PathType.js","sourceRoot":"","sources":["../../../src/interfaces/PathType.ts"],"names":[],"mappings":"","sourcesContent":["export type PathType = string | RegExp | (string | RegExp)[];\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=PlatformAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlatformAdapter.js","sourceRoot":"","sources":["../../../src/interfaces/PlatformAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {IProvider} from \"@tsed/di\";\n\nexport interface PlatformAdapter<App = TsED.Application, Router = TsED.Router> {\n /**\n * Load providers in top priority\n */\n readonly providers: IProvider[];\n /**\n * Called after the injector instantiation\n */\n onInit?: () => any;\n beforeLoadRoutes?: () => Promise<any>;\n afterLoadRoutes?: () => Promise<any>;\n useRouter?: () => any;\n useContext?: () => any;\n}\n\nexport interface PlatformBuilderSettings<App = TsED.Application, Router = TsED.Router> extends Partial<TsED.Configuration> {\n adapter?: Type<PlatformAdapter<App, Router>>;\n}\n"]}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./ResponseErrorObject"), exports);
5
- (0, tslib_1.__exportStar)(require("./HandlerType"), exports);
6
- (0, tslib_1.__exportStar)(require("./PlatformRouteOptions"), exports);
7
- (0, tslib_1.__exportStar)(require("./BeforeInit"), exports);
8
- (0, tslib_1.__exportStar)(require("./AfterInit"), exports);
9
- (0, tslib_1.__exportStar)(require("./AfterRoutesInit"), exports);
10
- (0, tslib_1.__exportStar)(require("./BeforeListen"), exports);
11
- (0, tslib_1.__exportStar)(require("./AfterListen"), exports);
12
- (0, tslib_1.__exportStar)(require("./BeforeRoutesInit"), exports);
13
- (0, tslib_1.__exportStar)(require("./AfterRoutesInit"), exports);
14
- (0, tslib_1.__exportStar)(require("./OnRoutesInit"), exports);
15
- (0, tslib_1.__exportStar)(require("./OnReady"), exports);
16
- (0, tslib_1.__exportStar)(require("./OnRequest"), exports);
17
- (0, tslib_1.__exportStar)(require("./OnResponse"), exports);
18
- (0, tslib_1.__exportStar)(require("./Route"), exports);
19
- (0, tslib_1.__exportStar)(require("./IncomingEvent"), exports);
20
- (0, tslib_1.__exportStar)(require("./PlatformAdapter"), exports);
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,qEAAsC;AACtC,6DAA8B;AAC9B,sEAAuC;AACvC,4DAA6B;AAC7B,2DAA4B;AAC5B,iEAAkC;AAClC,8DAA+B;AAC/B,6DAA8B;AAC9B,kEAAmC;AACnC,iEAAkC;AAClC,8DAA+B;AAC/B,yDAA0B;AAC1B,2DAA4B;AAC5B,4DAA6B;AAC7B,uDAAwB;AACxB,+DAAgC;AAChC,iEAAkC","sourcesContent":["export * from \"./ResponseErrorObject\";\nexport * from \"./HandlerType\";\nexport * from \"./PlatformRouteOptions\";\nexport * from \"./BeforeInit\";\nexport * from \"./AfterInit\";\nexport * from \"./AfterRoutesInit\";\nexport * from \"./BeforeListen\";\nexport * from \"./AfterListen\";\nexport * from \"./BeforeRoutesInit\";\nexport * from \"./AfterRoutesInit\";\nexport * from \"./OnRoutesInit\";\nexport * from \"./OnReady\";\nexport * from \"./OnRequest\";\nexport * from \"./OnResponse\";\nexport * from \"./Route\";\nexport * from \"./IncomingEvent\";\nexport * from \"./PlatformAdapter\";\n"]}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./bindEndpointMiddleware"), exports);
5
- (0, tslib_1.__exportStar)(require("./PlatformMulterMiddleware"), exports);
6
- (0, tslib_1.__exportStar)(require("./PlatformAcceptMimesMiddleware"), exports);
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,wEAAyC;AACzC,0EAA2C;AAC3C,+EAAgD","sourcesContent":["export * from \"./bindEndpointMiddleware\";\nexport * from \"./PlatformMulterMiddleware\";\nexport * from \"./PlatformAcceptMimesMiddleware\";\n"]}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFakeRawDriver = void 0;
4
- /**
5
- * @ignore
6
- */
7
- const createFakeRawDriver = () => {
8
- // istanbul ignore next
9
- function FakeRawDriver() { }
10
- // istanbul ignore next
11
- function use() {
12
- return this;
13
- }
14
- FakeRawDriver.use = use;
15
- FakeRawDriver.all = use;
16
- FakeRawDriver.get = use;
17
- FakeRawDriver.patch = use;
18
- FakeRawDriver.post = use;
19
- FakeRawDriver.put = use;
20
- FakeRawDriver.head = use;
21
- FakeRawDriver.delete = use;
22
- FakeRawDriver.options = use;
23
- return FakeRawDriver;
24
- };
25
- exports.createFakeRawDriver = createFakeRawDriver;
26
- //# sourceMappingURL=FakeRawDriver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FakeRawDriver.js","sourceRoot":"","sources":["../../../src/services/FakeRawDriver.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,uBAAuB;IACvB,SAAS,aAAa,KAAI,CAAC;IAE3B,uBAAuB;IACvB,SAAS,GAAG;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,KAAK,GAAG,GAAG,CAAC;IAC1B,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC;IACzB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC;IACzB,aAAa,CAAC,MAAM,GAAG,GAAG,CAAC;IAC3B,aAAa,CAAC,OAAO,GAAG,GAAG,CAAC;IAE5B,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B","sourcesContent":["/**\n * @ignore\n */\nexport const createFakeRawDriver = () => {\n // istanbul ignore next\n function FakeRawDriver() {}\n\n // istanbul ignore next\n function use() {\n return this;\n }\n\n FakeRawDriver.use = use;\n FakeRawDriver.all = use;\n FakeRawDriver.get = use;\n FakeRawDriver.patch = use;\n FakeRawDriver.post = use;\n FakeRawDriver.put = use;\n FakeRawDriver.head = use;\n FakeRawDriver.delete = use;\n FakeRawDriver.options = use;\n\n return FakeRawDriver;\n};\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./Platform"), exports);
5
- (0, tslib_1.__exportStar)(require("./PlatformApplication"), exports);
6
- (0, tslib_1.__exportStar)(require("./PlatformHandler"), exports);
7
- (0, tslib_1.__exportStar)(require("./PlatformRequest"), exports);
8
- (0, tslib_1.__exportStar)(require("./PlatformResponse"), exports);
9
- (0, tslib_1.__exportStar)(require("./PlatformRouter"), exports);
10
- (0, tslib_1.__exportStar)(require("./PlatformTest"), exports);
11
- (0, tslib_1.__exportStar)(require("./PlatformMiddlewaresChain"), exports);
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;AAAA,0DAA2B;AAC3B,qEAAsC;AACtC,iEAAkC;AAClC,iEAAkC;AAClC,kEAAmC;AACnC,gEAAiC;AACjC,8DAA+B;AAC/B,0EAA2C","sourcesContent":["export * from \"./Platform\";\nexport * from \"./PlatformApplication\";\nexport * from \"./PlatformHandler\";\nexport * from \"./PlatformRequest\";\nexport * from \"./PlatformResponse\";\nexport * from \"./PlatformRouter\";\nexport * from \"./PlatformTest\";\nexport * from \"./PlatformMiddlewaresChain\";\n"]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./createInjector"), exports);
5
- (0, tslib_1.__exportStar)(require("./createHttpServer"), exports);
6
- (0, tslib_1.__exportStar)(require("./createHttpsServer"), exports);
7
- (0, tslib_1.__exportStar)(require("./printRoutes"), exports);
8
- (0, tslib_1.__exportStar)(require("./listenServer"), exports);
9
- (0, tslib_1.__exportStar)(require("./createContext"), exports);
10
- (0, tslib_1.__exportStar)(require("./useCtxHandler"), exports);
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiC;AACjC,kEAAmC;AACnC,mEAAoC;AACpC,6DAA8B;AAC9B,8DAA+B;AAC/B,+DAAgC;AAChC,+DAAgC","sourcesContent":["export * from \"./createInjector\";\nexport * from \"./createHttpServer\";\nexport * from \"./createHttpsServer\";\nexport * from \"./printRoutes\";\nexport * from \"./listenServer\";\nexport * from \"./createContext\";\nexport * from \"./useCtxHandler\";\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./interfaces";
2
- export * from "./services/PlatformConfiguration";
3
- export * from "./services/PlatformConfiguration";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from \"./interfaces\";\nexport * from \"./services/PlatformConfiguration\";\nexport * from \"./services/PlatformConfiguration\";\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=EndpointDirectoriesSettings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EndpointDirectoriesSettings.js","sourceRoot":"","sources":["../../../../src/config/interfaces/EndpointDirectoriesSettings.ts"],"names":[],"mappings":"","sourcesContent":["export interface EndpointDirectoriesSettings {\n [endpoint: string]: any | string | (any | string)[];\n}\n"]}
@@ -1,5 +0,0 @@
1
- export * from "./PlatformLoggerSettings";
2
- export * from "./EndpointDirectoriesSettings";
3
- export * from "./PlatformStaticsSettings";
4
- export * from "./PlatformMulterSettings";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/interfaces/index.ts"],"names":[],"mappings":"AA6FA,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC","sourcesContent":["import {Env} from \"@tsed/core\";\nimport {ConverterSettings} from \"./ConverterSettings\";\nimport {EndpointDirectoriesSettings} from \"./EndpointDirectoriesSettings\";\nimport {PlatformLoggerSettings} from \"./PlatformLoggerSettings\";\nimport {PlatformMulterSettings} from \"./PlatformMulterSettings\";\nimport {PlatformStaticsSettings} from \"./PlatformStaticsSettings\";\nimport type Http from \"http\";\nimport type Https from \"https\";\n\ndeclare global {\n namespace TsED {\n interface LoggerConfiguration extends Partial<PlatformLoggerSettings> {}\n interface Configuration {\n /**\n * The root directory where you build run project. By default, it's equal to `process.cwd().\n */\n rootDir: string;\n /**\n * The environment profile. By default the environment profile is equals to `NODE_ENV`.\n */\n env: Env;\n /**\n * Port number for the [HTTP.Server](https://nodejs.org/api/http.html#http_class_http_server).\n */\n port: string | number;\n /**\n * Port number for the [HTTP.Server](https://nodejs.org/api/http.html#http_class_http_server).\n */\n httpPort: string | number | boolean;\n /**\n * [Https.ServerOptions](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener)):\n * - `key` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | &lt;Object[]&gt;: The private key of the server in PEM format. To support multiple keys using different algorithms an array can be provided either as a plain array of key strings or an array of objects in the format `{pem: key, passphrase: passphrase}`. This option is required for ciphers that make use of private keys.\n * - `passphrase` &lt;string&gt; A string containing the passphrase for the private key or pfx.\n * - `cert` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | [&lt;Buffer[]&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer): A string, Buffer, array of strings, or array of Buffers containing the certificate key of the server in PEM format. (Required)\n * - `ca` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | [&lt;Buffer[]&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer): A string, Buffer, array of strings, or array of Buffers of trusted certificates in PEM format. If this is omitted several well known \"root\" CAs (like VeriSign) will be used. These are used to authorize connections.\n */\n httpOptions: Http.ServerOptions;\n /**\n * Port number for the [HTTPs.Server](https://nodejs.org/api/https.html#https_class_https_server).\n */\n httpsPort: string | number | boolean;\n /**\n * [Https.ServerOptions](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener)):\n * - `key` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | &lt;Object[]&gt;: The private key of the server in PEM format. To support multiple keys using different algorithms an array can be provided either as a plain array of key strings or an array of objects in the format `{pem: key, passphrase: passphrase}`. This option is required for ciphers that make use of private keys.\n * - `passphrase` &lt;string&gt; A string containing the passphrase for the private key or pfx.\n * - `cert` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | [&lt;Buffer[]&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer): A string, Buffer, array of strings, or array of Buffers containing the certificate key of the server in PEM format. (Required)\n * - `ca` &lt;string&gt; | &lt;string[]&gt; | [&lt;Buffer&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer) | [&lt;Buffer[]&gt;](https://nodejs.org/api/buffer.html#buffer_class_buffer): A string, Buffer, array of strings, or array of Buffers of trusted certificates in PEM format. If this is omitted several well known \"root\" CAs (like VeriSign) will be used. These are used to authorize connections.\n */\n httpsOptions: Https.ServerOptions;\n /**\n * Mount all controllers under a directories to an endpoint.\n */\n mount: EndpointDirectoriesSettings;\n /**\n * List of directories to scan [Services](/docs/services.md), [Middlewares](/docs/middlewares.md) or [Converters](/docs/converters.md).\n */\n componentsScan: (string | RegExp)[];\n /**\n * Disable the glob pattern. In v7 the componentsScan options will be removed in favor of external module loader.\n */\n disableComponentsScan: boolean;\n /**\n * List of glob patterns. Exclude all files which matching with this list when Server scan all components with the `mount` or `scanComponents` options.\n */\n exclude: string[];\n /**\n * Configure the mimes accepted by default by the server.\n */\n acceptMimes: string[];\n /**\n * Enable debug mode. By default debug is false.\n */\n debug: boolean;\n /**\n * Converter configuration.\n */\n converter: Partial<ConverterSettings>;\n /**\n * Logger configuration.\n */\n logger?: LoggerConfiguration;\n /**\n * Object to mount all directories under to his endpoints. See more on [Serve Static](/tutorials/serve-static-files.md).\n */\n statics: PlatformStaticsSettings;\n /**\n * Object configure Multer. See more on [Upload file](/tutorials/serve-static-files.md).\n */\n multer: PlatformMulterSettings;\n }\n }\n}\n\nexport * from \"./PlatformLoggerSettings\";\nexport * from \"./EndpointDirectoriesSettings\";\nexport * from \"./PlatformStaticsSettings\";\nexport * from \"./PlatformMulterSettings\";\n"]}
@@ -1,28 +0,0 @@
1
- import { Inject } from "@tsed/di";
2
- /**
3
- * Inject the Http.Server instance.
4
- *
5
- * ### Example
6
- *
7
- * ```typescript
8
- * import {HttpServer, Service} from "@tsed/common";
9
- *
10
- * @Service()
11
- * export default class OtherService {
12
- * constructor(@HttpServer httpServer: HttpServer) {}
13
- * }
14
- * ```
15
- *
16
- * > Note: TypeScript transform and store `HttpServer` as `Function` type in the metadata. So to inject a factory, you must use the `@Inject(type)` decorator.
17
- *
18
- * @param {Type<any>} target
19
- * @param {string} targetKey
20
- * @param {TypedPropertyDescriptor<Function> | number} descriptor
21
- * @returns {any}
22
- * @decorator
23
- * @deprecated Use Https.Server from "http"
24
- */
25
- export function HttpServer(target, targetKey, descriptor) {
26
- return Inject(HttpServer)(target, targetKey, descriptor);
27
- }
28
- //# sourceMappingURL=httpServer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpServer.js","sourceRoot":"","sources":["../../../src/decorators/httpServer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAGhC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,UAAU,CAAC,MAAiB,EAAE,SAAiB,EAAE,UAAsD;IACrH,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {Inject} from \"@tsed/di\";\nimport Http from \"http\";\n\n/**\n * Inject the Http.Server instance.\n *\n * ### Example\n *\n * ```typescript\n * import {HttpServer, Service} from \"@tsed/common\";\n *\n * @Service()\n * export default class OtherService {\n * constructor(@HttpServer httpServer: HttpServer) {}\n * }\n * ```\n *\n * > Note: TypeScript transform and store `HttpServer` as `Function` type in the metadata. So to inject a factory, you must use the `@Inject(type)` decorator.\n *\n * @param {Type<any>} target\n * @param {string} targetKey\n * @param {TypedPropertyDescriptor<Function> | number} descriptor\n * @returns {any}\n * @decorator\n * @deprecated Use Https.Server from \"http\"\n */\nexport function HttpServer(target: Type<any>, targetKey: string, descriptor: TypedPropertyDescriptor<Function> | number) {\n return Inject(HttpServer)(target, targetKey, descriptor);\n}\n\nexport type HttpServer = Http.Server;\n"]}
@@ -1,28 +0,0 @@
1
- import { Inject } from "@tsed/di";
2
- /**
3
- * Inject the Https.Server instance.
4
- *
5
- * ### Example
6
- *
7
- * ```typescript
8
- * import {HttpsServer, Service} from "@tsed/common";
9
- *
10
- * @Service()
11
- * export default class OtherService {
12
- * constructor(@HttpsServer httpServer: HttpServer) {}
13
- * }
14
- * ```
15
- *
16
- * > Note: TypeScript transform and store `HttpsServer` as `Function` type in the metadata. So to inject a factory, you must use the `@Inject(type)` decorator.
17
- *
18
- * @param {Type<any>} target
19
- * @param {string} targetKey
20
- * @param {TypedPropertyDescriptor<Function> | number} descriptor
21
- * @returns {any}
22
- * @decorator
23
- * @deprecated Use Https.Server from "https"
24
- */
25
- export function HttpsServer(target, targetKey, descriptor) {
26
- return Inject(HttpsServer)(target, targetKey, descriptor);
27
- }
28
- //# sourceMappingURL=httpsServer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpsServer.js","sourceRoot":"","sources":["../../../src/decorators/httpsServer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAGhC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,WAAW,CAAC,MAAiB,EAAE,SAAiB,EAAE,UAAsD;IACtH,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {Inject} from \"@tsed/di\";\nimport Https from \"https\";\n\n/**\n * Inject the Https.Server instance.\n *\n * ### Example\n *\n * ```typescript\n * import {HttpsServer, Service} from \"@tsed/common\";\n *\n * @Service()\n * export default class OtherService {\n * constructor(@HttpsServer httpServer: HttpServer) {}\n * }\n * ```\n *\n * > Note: TypeScript transform and store `HttpsServer` as `Function` type in the metadata. So to inject a factory, you must use the `@Inject(type)` decorator.\n *\n * @param {Type<any>} target\n * @param {string} targetKey\n * @param {TypedPropertyDescriptor<Function> | number} descriptor\n * @returns {any}\n * @decorator\n * @deprecated Use Https.Server from \"https\"\n */\nexport function HttpsServer(target: Type<any>, targetKey: string, descriptor: TypedPropertyDescriptor<Function> | number) {\n return Inject(HttpsServer)(target, targetKey, descriptor);\n}\n\nexport type HttpsServer = Https.Server;\n"]}
@@ -1,18 +0,0 @@
1
- export * from "./httpServer";
2
- export * from "./httpsServer";
3
- export * from "./multer";
4
- // Method
5
- export * from "./method/route";
6
- export * from "./method/acceptMime";
7
- export * from "./method/location";
8
- export * from "./method/redirect";
9
- export * from "./method/endpointFn";
10
- export * from "./method/view";
11
- // Params
12
- export * from "./params/response";
13
- export * from "./params/request";
14
- export * from "./params/next";
15
- export * from "./params/error";
16
- // utils
17
- export * from "../utils/mapReturnedResponse";
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,SAAS;AACT,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAE9B,SAAS;AACT,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,QAAQ;AACR,cAAc,8BAA8B,CAAC","sourcesContent":["export * from \"./httpServer\";\nexport * from \"./httpsServer\";\n\nexport * from \"./multer\";\n\n// Method\nexport * from \"./method/route\";\nexport * from \"./method/acceptMime\";\nexport * from \"./method/location\";\nexport * from \"./method/redirect\";\nexport * from \"./method/endpointFn\";\nexport * from \"./method/view\";\n\n// Params\nexport * from \"./params/response\";\nexport * from \"./params/request\";\nexport * from \"./params/next\";\nexport * from \"./params/error\";\n\n// utils\nexport * from \"../utils/mapReturnedResponse\";\n"]}
@@ -1,24 +0,0 @@
1
- import { StoreSet, useDecorators } from "@tsed/core";
2
- import { Produces } from "@tsed/schema";
3
- /**
4
- * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.
5
- *
6
- * ```typescript
7
- * @Controller('/mypath')
8
- * export class MyCtrl {
9
- *
10
- * @Get('/')
11
- * @AcceptMime('application/json')
12
- * public getResource(){}
13
- * }
14
- * ```
15
- *
16
- * @param mimes
17
- * @decorator
18
- * @operation
19
- * @response
20
- */
21
- export function AcceptMime(...mimes) {
22
- return useDecorators(Produces(...mimes), StoreSet("acceptMimes", mimes));
23
- }
24
- //# sourceMappingURL=acceptMime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acceptMime.js","sourceRoot":"","sources":["../../../../src/decorators/method/acceptMime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,GAAG,KAAe;IAC3C,OAAO,aAAa,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import {StoreSet, useDecorators} from \"@tsed/core\";\nimport {Produces} from \"@tsed/schema\";\n\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes: string[]): Function {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { JsonEntityFn } from "@tsed/schema";
2
- /**
3
- *
4
- * @param fn
5
- * @decorator
6
- * @deprecated Deprecated since 2021-10-05. Use JsonEntityFn instead.
7
- */
8
- export function EndpointFn(fn) {
9
- return JsonEntityFn(fn);
10
- }
11
- //# sourceMappingURL=endpointFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpointFn.js","sourceRoot":"","sources":["../../../../src/decorators/method/endpointFn.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAG1C;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EAAyE;IAClG,OAAO,YAAY,CAAmB,EAAE,CAAQ,CAAC;AACnD,CAAC","sourcesContent":["import {DecoratorParameters} from \"@tsed/core\";\nimport {JsonEntityFn} from \"@tsed/schema\";\nimport {EndpointMetadata} from \"../../domain\";\n\n/**\n *\n * @param fn\n * @decorator\n * @deprecated Deprecated since 2021-10-05. Use JsonEntityFn instead.\n */\nexport function EndpointFn(fn: (endpoint: EndpointMetadata, parameters: DecoratorParameters) => void): MethodDecorator {\n return JsonEntityFn<EndpointMetadata>(fn) as any;\n}\n"]}
@@ -1,2 +0,0 @@
1
- export { Location } from "@tsed/schema";
2
- //# sourceMappingURL=location.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../../src/decorators/method/location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC","sourcesContent":["export {Location} from \"@tsed/schema\";\n"]}
@@ -1,2 +0,0 @@
1
- export { Redirect } from "@tsed/schema";
2
- //# sourceMappingURL=redirect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../src/decorators/method/redirect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC","sourcesContent":["export {Redirect} from \"@tsed/schema\";\n"]}
@@ -1,2 +0,0 @@
1
- export { Get, Post, Put, Patch, Delete, Head, Options, All } from "@tsed/schema";
2
- //# sourceMappingURL=route.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/decorators/method/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAC,MAAM,cAAc,CAAC","sourcesContent":["export {Get, Post, Put, Patch, Delete, Head, Options, All} from \"@tsed/schema\";\n"]}
@@ -1,30 +0,0 @@
1
- import { StoreSet } from "@tsed/core";
2
- /**
3
- * Use a view and sends the rendered HTML string to the client. Optional parameter:
4
- *
5
- * * viewOptions, an object whose properties define local variables for the view.
6
- *
7
- * The view argument is a string that is the file path of the view file to render.
8
- * This can be an absolute path, or a path relative to the views setting.
9
- * If the path does not contain a file extension, then the view engine setting determines the file extension.
10
- * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())
11
- * and render it using the loaded module’s __express function.
12
- *
13
- * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).
14
- *
15
- * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,
16
- * and as so for security reasons should not contain input from the end-user.
17
- *
18
- * @param path Relative path to the view file.
19
- * @param options Additional options
20
- * @decorator
21
- * @operation
22
- * @response
23
- * @ignores
24
- * @deprecated Use View decorator from @tsed/platform-views instead.
25
- */
26
- // istanbul ignore next
27
- export function View(path, options) {
28
- return StoreSet("view", { path, options });
29
- }
30
- //# sourceMappingURL=view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/decorators/method/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,uBAAuB;AACvB,MAAM,UAAU,IAAI,CAAC,IAAY,EAAE,OAAgB;IACjD,OAAO,QAAQ,CAAC,MAAM,EAAE,EAAC,IAAI,EAAE,OAAO,EAAC,CAAQ,CAAC;AAClD,CAAC","sourcesContent":["import {StoreSet} from \"@tsed/core\";\n\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n * @ignores\n * @deprecated Use View decorator from @tsed/platform-views instead.\n */\n// istanbul ignore next\nexport function View(path: string, options?: Object): MethodDecorator {\n return StoreSet(\"view\", {path, options}) as any;\n}\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./multerFileSize";
2
- export * from "./multerOptions";
3
- export * from "./multipartFile";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorators/multer/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./multerFileSize\";\nexport * from \"./multerOptions\";\nexport * from \"./multipartFile\";\n"]}
@@ -1,7 +0,0 @@
1
- export * from "./AnyToPromiseWithCtx";
2
- export * from "./PlatformContext";
3
- export * from "./PlatformRouteDetails";
4
- export * from "./ControllerProvider";
5
- export * from "./EndpointMetadata";
6
- export * from "./HandlerMetadata";
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from \"./AnyToPromiseWithCtx\";\nexport * from \"./PlatformContext\";\nexport * from \"./PlatformRouteDetails\";\nexport * from \"./ControllerProvider\";\nexport * from \"./EndpointMetadata\";\nexport * from \"./HandlerMetadata\";\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=PathType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PathType.js","sourceRoot":"","sources":["../../../src/interfaces/PathType.ts"],"names":[],"mappings":"","sourcesContent":["export type PathType = string | RegExp | (string | RegExp)[];\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=PlatformAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlatformAdapter.js","sourceRoot":"","sources":["../../../src/interfaces/PlatformAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {IProvider} from \"@tsed/di\";\n\nexport interface PlatformAdapter<App = TsED.Application, Router = TsED.Router> {\n /**\n * Load providers in top priority\n */\n readonly providers: IProvider[];\n /**\n * Called after the injector instantiation\n */\n onInit?: () => any;\n beforeLoadRoutes?: () => Promise<any>;\n afterLoadRoutes?: () => Promise<any>;\n useRouter?: () => any;\n useContext?: () => any;\n}\n\nexport interface PlatformBuilderSettings<App = TsED.Application, Router = TsED.Router> extends Partial<TsED.Configuration> {\n adapter?: Type<PlatformAdapter<App, Router>>;\n}\n"]}
@@ -1,18 +0,0 @@
1
- export * from "./ResponseErrorObject";
2
- export * from "./HandlerType";
3
- export * from "./PlatformRouteOptions";
4
- export * from "./BeforeInit";
5
- export * from "./AfterInit";
6
- export * from "./AfterRoutesInit";
7
- export * from "./BeforeListen";
8
- export * from "./AfterListen";
9
- export * from "./BeforeRoutesInit";
10
- export * from "./AfterRoutesInit";
11
- export * from "./OnRoutesInit";
12
- export * from "./OnReady";
13
- export * from "./OnRequest";
14
- export * from "./OnResponse";
15
- export * from "./Route";
16
- export * from "./IncomingEvent";
17
- export * from "./PlatformAdapter";
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from \"./ResponseErrorObject\";\nexport * from \"./HandlerType\";\nexport * from \"./PlatformRouteOptions\";\nexport * from \"./BeforeInit\";\nexport * from \"./AfterInit\";\nexport * from \"./AfterRoutesInit\";\nexport * from \"./BeforeListen\";\nexport * from \"./AfterListen\";\nexport * from \"./BeforeRoutesInit\";\nexport * from \"./AfterRoutesInit\";\nexport * from \"./OnRoutesInit\";\nexport * from \"./OnReady\";\nexport * from \"./OnRequest\";\nexport * from \"./OnResponse\";\nexport * from \"./Route\";\nexport * from \"./IncomingEvent\";\nexport * from \"./PlatformAdapter\";\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./bindEndpointMiddleware";
2
- export * from "./PlatformMulterMiddleware";
3
- export * from "./PlatformAcceptMimesMiddleware";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/middlewares/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./bindEndpointMiddleware\";\nexport * from \"./PlatformMulterMiddleware\";\nexport * from \"./PlatformAcceptMimesMiddleware\";\n"]}
@@ -1,22 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export const createFakeRawDriver = () => {
5
- // istanbul ignore next
6
- function FakeRawDriver() { }
7
- // istanbul ignore next
8
- function use() {
9
- return this;
10
- }
11
- FakeRawDriver.use = use;
12
- FakeRawDriver.all = use;
13
- FakeRawDriver.get = use;
14
- FakeRawDriver.patch = use;
15
- FakeRawDriver.post = use;
16
- FakeRawDriver.put = use;
17
- FakeRawDriver.head = use;
18
- FakeRawDriver.delete = use;
19
- FakeRawDriver.options = use;
20
- return FakeRawDriver;
21
- };
22
- //# sourceMappingURL=FakeRawDriver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FakeRawDriver.js","sourceRoot":"","sources":["../../../src/services/FakeRawDriver.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,uBAAuB;IACvB,SAAS,aAAa,KAAI,CAAC;IAE3B,uBAAuB;IACvB,SAAS,GAAG;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,KAAK,GAAG,GAAG,CAAC;IAC1B,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC;IACzB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;IACxB,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC;IACzB,aAAa,CAAC,MAAM,GAAG,GAAG,CAAC;IAC3B,aAAa,CAAC,OAAO,GAAG,GAAG,CAAC;IAE5B,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC","sourcesContent":["/**\n * @ignore\n */\nexport const createFakeRawDriver = () => {\n // istanbul ignore next\n function FakeRawDriver() {}\n\n // istanbul ignore next\n function use() {\n return this;\n }\n\n FakeRawDriver.use = use;\n FakeRawDriver.all = use;\n FakeRawDriver.get = use;\n FakeRawDriver.patch = use;\n FakeRawDriver.post = use;\n FakeRawDriver.put = use;\n FakeRawDriver.head = use;\n FakeRawDriver.delete = use;\n FakeRawDriver.options = use;\n\n return FakeRawDriver;\n};\n"]}
@@ -1,9 +0,0 @@
1
- export * from "./Platform";
2
- export * from "./PlatformApplication";
3
- export * from "./PlatformHandler";
4
- export * from "./PlatformRequest";
5
- export * from "./PlatformResponse";
6
- export * from "./PlatformRouter";
7
- export * from "./PlatformTest";
8
- export * from "./PlatformMiddlewaresChain";
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC","sourcesContent":["export * from \"./Platform\";\nexport * from \"./PlatformApplication\";\nexport * from \"./PlatformHandler\";\nexport * from \"./PlatformRequest\";\nexport * from \"./PlatformResponse\";\nexport * from \"./PlatformRouter\";\nexport * from \"./PlatformTest\";\nexport * from \"./PlatformMiddlewaresChain\";\n"]}
@@ -1,8 +0,0 @@
1
- export * from "./createInjector";
2
- export * from "./createHttpServer";
3
- export * from "./createHttpsServer";
4
- export * from "./printRoutes";
5
- export * from "./listenServer";
6
- export * from "./createContext";
7
- export * from "./useCtxHandler";
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./createInjector\";\nexport * from \"./createHttpServer\";\nexport * from \"./createHttpsServer\";\nexport * from \"./printRoutes\";\nexport * from \"./listenServer\";\nexport * from \"./createContext\";\nexport * from \"./useCtxHandler\";\n"]}
@@ -1,3 +0,0 @@
1
- export * from "./interfaces";
2
- export * from "./services/PlatformConfiguration";
3
- export * from "./services/PlatformConfiguration";
@@ -1,3 +0,0 @@
1
- export interface EndpointDirectoriesSettings {
2
- [endpoint: string]: any | string | (any | string)[];
3
- }