@expressots/core 2.3.0 → 2.4.0

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 (222) hide show
  1. package/lib/CHANGELOG.md +30 -0
  2. package/lib/cjs/application/app-container.js +10 -2
  3. package/lib/cjs/application/application-factory.js +33 -44
  4. package/lib/cjs/console/console.js +26 -39
  5. package/lib/cjs/controller/base-controller.js +2 -13
  6. package/lib/cjs/error/app-error.js +11 -0
  7. package/lib/cjs/error/report.js +4 -1
  8. package/lib/cjs/error/status-code.js +8 -2
  9. package/lib/cjs/middleware/middleware-resolver.js +15 -13
  10. package/lib/cjs/middleware/middleware-service.js +17 -11
  11. package/lib/cjs/provider/dto-validator/dto-validator.provider.js +3 -12
  12. package/lib/cjs/provider/environment/env-validator.provider.js +2 -2
  13. package/lib/cjs/provider/logger/logger-service.js +1 -0
  14. package/lib/cjs/provider/provider-service.js +2 -0
  15. package/lib/cjs/types/application/app-container.d.ts +0 -1
  16. package/lib/cjs/types/application/application-factory.d.ts +0 -1
  17. package/lib/cjs/types/application/index.d.ts +0 -1
  18. package/lib/cjs/types/common/color-service.provider.d.ts +0 -1
  19. package/lib/cjs/types/common/index.d.ts +0 -1
  20. package/lib/cjs/types/common/package-resolver.provider.d.ts +0 -1
  21. package/lib/cjs/types/common/project-config.provider.d.ts +0 -1
  22. package/lib/cjs/types/console/console.d.ts +0 -1
  23. package/lib/cjs/types/console/index.d.ts +0 -1
  24. package/lib/cjs/types/container-module/container-module.d.ts +0 -1
  25. package/lib/cjs/types/container-module/index.d.ts +0 -1
  26. package/lib/cjs/types/controller/base-controller.d.ts +2 -3
  27. package/lib/cjs/types/controller/index.d.ts +0 -1
  28. package/lib/cjs/types/decorator/index.d.ts +0 -1
  29. package/lib/cjs/types/decorator/scope-binding.d.ts +0 -1
  30. package/lib/cjs/types/error/app-error.d.ts +0 -1
  31. package/lib/cjs/types/error/error-handler-middleware.d.ts +0 -1
  32. package/lib/cjs/types/error/index.d.ts +0 -1
  33. package/lib/cjs/types/error/report.d.ts +0 -1
  34. package/lib/cjs/types/error/status-code.d.ts +0 -1
  35. package/lib/cjs/types/index.d.ts +0 -1
  36. package/lib/cjs/types/middleware/index.d.ts +1 -1
  37. package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts +0 -1
  38. package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts +0 -1
  39. package/lib/cjs/types/middleware/interfaces/cookie-parser.interface.d.ts +0 -1
  40. package/lib/cjs/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts +0 -1
  41. package/lib/cjs/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts +0 -1
  42. package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts +0 -1
  43. package/lib/cjs/types/middleware/interfaces/express-rate-limit.interface.d.ts +292 -0
  44. package/lib/cjs/types/middleware/interfaces/morgan.interface.d.ts +0 -1
  45. package/lib/cjs/types/middleware/interfaces/serve-favicon.interface.d.ts +0 -1
  46. package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts +0 -1
  47. package/lib/cjs/types/middleware/middleware-resolver.d.ts +0 -1
  48. package/lib/cjs/types/middleware/middleware-service.d.ts +9 -1
  49. package/lib/cjs/types/provider/dto-validator/dto-validator.provider.d.ts +0 -1
  50. package/lib/cjs/types/provider/environment/env-validator.provider.d.ts +0 -1
  51. package/lib/cjs/types/provider/index.d.ts +0 -1
  52. package/lib/cjs/types/provider/logger/logger-service.d.ts +0 -1
  53. package/lib/cjs/types/provider/provider-service.d.ts +0 -1
  54. package/lib/cjs/types/render/handlebars.interface.d.ts +0 -1
  55. package/lib/cjs/types/render/index.d.ts +0 -1
  56. package/lib/cjs/types/render/render.type.d.ts +0 -1
  57. package/lib/package.json +5 -6
  58. package/package.json +5 -6
  59. package/lib/cjs/types/application/app-container.d.ts.map +0 -1
  60. package/lib/cjs/types/application/application-factory.d.ts.map +0 -1
  61. package/lib/cjs/types/application/index.d.ts.map +0 -1
  62. package/lib/cjs/types/common/color-service.provider.d.ts.map +0 -1
  63. package/lib/cjs/types/common/index.d.ts.map +0 -1
  64. package/lib/cjs/types/common/package-resolver.provider.d.ts.map +0 -1
  65. package/lib/cjs/types/common/project-config.provider.d.ts.map +0 -1
  66. package/lib/cjs/types/console/console.d.ts.map +0 -1
  67. package/lib/cjs/types/console/index.d.ts.map +0 -1
  68. package/lib/cjs/types/container-module/container-module.d.ts.map +0 -1
  69. package/lib/cjs/types/container-module/index.d.ts.map +0 -1
  70. package/lib/cjs/types/controller/base-controller.d.ts.map +0 -1
  71. package/lib/cjs/types/controller/index.d.ts.map +0 -1
  72. package/lib/cjs/types/decorator/index.d.ts.map +0 -1
  73. package/lib/cjs/types/decorator/scope-binding.d.ts.map +0 -1
  74. package/lib/cjs/types/error/app-error.d.ts.map +0 -1
  75. package/lib/cjs/types/error/error-handler-middleware.d.ts.map +0 -1
  76. package/lib/cjs/types/error/index.d.ts.map +0 -1
  77. package/lib/cjs/types/error/report.d.ts.map +0 -1
  78. package/lib/cjs/types/error/status-code.d.ts.map +0 -1
  79. package/lib/cjs/types/index.d.ts.map +0 -1
  80. package/lib/cjs/types/middleware/index.d.ts.map +0 -1
  81. package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts.map +0 -1
  82. package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts.map +0 -1
  83. package/lib/cjs/types/middleware/interfaces/cookie-parser.interface.d.ts.map +0 -1
  84. package/lib/cjs/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts.map +0 -1
  85. package/lib/cjs/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts.map +0 -1
  86. package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts.map +0 -1
  87. package/lib/cjs/types/middleware/interfaces/morgan.interface.d.ts.map +0 -1
  88. package/lib/cjs/types/middleware/interfaces/serve-favicon.interface.d.ts.map +0 -1
  89. package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts.map +0 -1
  90. package/lib/cjs/types/middleware/middleware-resolver.d.ts.map +0 -1
  91. package/lib/cjs/types/middleware/middleware-service.d.ts.map +0 -1
  92. package/lib/cjs/types/provider/dto-validator/dto-validator.provider.d.ts.map +0 -1
  93. package/lib/cjs/types/provider/environment/env-validator.provider.d.ts.map +0 -1
  94. package/lib/cjs/types/provider/index.d.ts.map +0 -1
  95. package/lib/cjs/types/provider/logger/logger-service.d.ts.map +0 -1
  96. package/lib/cjs/types/provider/provider-service.d.ts.map +0 -1
  97. package/lib/cjs/types/render/handlebars.interface.d.ts.map +0 -1
  98. package/lib/cjs/types/render/index.d.ts.map +0 -1
  99. package/lib/cjs/types/render/render.type.d.ts.map +0 -1
  100. package/lib/esm/application/app-container.js +0 -82
  101. package/lib/esm/application/application-factory.js +0 -72
  102. package/lib/esm/application/index.js +0 -7
  103. package/lib/esm/common/color-service.provider.js +0 -46
  104. package/lib/esm/common/package-resolver.provider.js +0 -35
  105. package/lib/esm/common/project-config.provider.js +0 -2
  106. package/lib/esm/console/console.js +0 -61
  107. package/lib/esm/console/index.js +0 -5
  108. package/lib/esm/container-module/container-module.js +0 -111
  109. package/lib/esm/container-module/index.js +0 -6
  110. package/lib/esm/controller/base-controller.js +0 -75
  111. package/lib/esm/controller/index.js +0 -5
  112. package/lib/esm/decorator/index.js +0 -17
  113. package/lib/esm/decorator/scope-binding.js +0 -44
  114. package/lib/esm/error/app-error.js +0 -37
  115. package/lib/esm/error/error-handler-middleware.js +0 -28
  116. package/lib/esm/error/index.js +0 -9
  117. package/lib/esm/error/report.js +0 -57
  118. package/lib/esm/error/status-code.js +0 -89
  119. package/lib/esm/index.mjs +0 -26
  120. package/lib/esm/middleware/index.js +0 -29
  121. package/lib/esm/middleware/interfaces/body-parser.interface.js +0 -2
  122. package/lib/esm/middleware/interfaces/compression.interface.js +0 -2
  123. package/lib/esm/middleware/interfaces/cookie-parser.interface.js +0 -2
  124. package/lib/esm/middleware/interfaces/cookie-session/cookie-session.interface.js +0 -2
  125. package/lib/esm/middleware/interfaces/cookie-session/keygrip.interface.js +0 -2
  126. package/lib/esm/middleware/interfaces/cors.interface.js +0 -2
  127. package/lib/esm/middleware/interfaces/morgan.interface.js +0 -2
  128. package/lib/esm/middleware/interfaces/serve-favicon.interface.js +0 -2
  129. package/lib/esm/middleware/interfaces/serve-static.interface.js +0 -2
  130. package/lib/esm/middleware/middleware-resolver.js +0 -69
  131. package/lib/esm/middleware/middleware-service.js +0 -258
  132. package/lib/esm/provider/dto-validator/dto-validator.provider.js +0 -53
  133. package/lib/esm/provider/environment/env-validator.provider.js +0 -96
  134. package/lib/esm/provider/index.js +0 -11
  135. package/lib/esm/provider/logger/logger-service.js +0 -115
  136. package/lib/esm/provider/provider-service.js +0 -38
  137. package/lib/esm/render/handlebars.interface.js +0 -2
  138. package/lib/esm/render/index.js +0 -2
  139. package/lib/esm/render/render.type.js +0 -2
  140. package/lib/esm/types/application/app-container.d.ts +0 -126
  141. package/lib/esm/types/application/app-container.d.ts.map +0 -1
  142. package/lib/esm/types/application/application-factory.d.ts +0 -34
  143. package/lib/esm/types/application/application-factory.d.ts.map +0 -1
  144. package/lib/esm/types/application/index.d.ts +0 -3
  145. package/lib/esm/types/application/index.d.ts.map +0 -1
  146. package/lib/esm/types/common/color-service.provider.d.ts +0 -30
  147. package/lib/esm/types/common/color-service.provider.d.ts.map +0 -1
  148. package/lib/esm/types/common/index.d.ts +0 -2
  149. package/lib/esm/types/common/index.d.ts.map +0 -1
  150. package/lib/esm/types/common/package-resolver.provider.d.ts +0 -9
  151. package/lib/esm/types/common/package-resolver.provider.d.ts.map +0 -1
  152. package/lib/esm/types/common/project-config.provider.d.ts +0 -48
  153. package/lib/esm/types/common/project-config.provider.d.ts.map +0 -1
  154. package/lib/esm/types/console/console.d.ts +0 -28
  155. package/lib/esm/types/console/console.d.ts.map +0 -1
  156. package/lib/esm/types/console/index.d.ts +0 -2
  157. package/lib/esm/types/console/index.d.ts.map +0 -1
  158. package/lib/esm/types/container-module/container-module.d.ts +0 -29
  159. package/lib/esm/types/container-module/container-module.d.ts.map +0 -1
  160. package/lib/esm/types/container-module/index.d.ts +0 -2
  161. package/lib/esm/types/container-module/index.d.ts.map +0 -1
  162. package/lib/esm/types/controller/base-controller.d.ts +0 -49
  163. package/lib/esm/types/controller/base-controller.d.ts.map +0 -1
  164. package/lib/esm/types/controller/index.d.ts +0 -2
  165. package/lib/esm/types/controller/index.d.ts.map +0 -1
  166. package/lib/esm/types/decorator/index.d.ts +0 -2
  167. package/lib/esm/types/decorator/index.d.ts.map +0 -1
  168. package/lib/esm/types/decorator/scope-binding.d.ts +0 -34
  169. package/lib/esm/types/decorator/scope-binding.d.ts.map +0 -1
  170. package/lib/esm/types/error/app-error.d.ts +0 -30
  171. package/lib/esm/types/error/app-error.d.ts.map +0 -1
  172. package/lib/esm/types/error/error-handler-middleware.d.ts +0 -12
  173. package/lib/esm/types/error/error-handler-middleware.d.ts.map +0 -1
  174. package/lib/esm/types/error/index.d.ts +0 -4
  175. package/lib/esm/types/error/index.d.ts.map +0 -1
  176. package/lib/esm/types/error/report.d.ts +0 -26
  177. package/lib/esm/types/error/report.d.ts.map +0 -1
  178. package/lib/esm/types/error/status-code.d.ts +0 -137
  179. package/lib/esm/types/error/status-code.d.ts.map +0 -1
  180. package/lib/esm/types/index.d.ts +0 -11
  181. package/lib/esm/types/index.d.ts.map +0 -1
  182. package/lib/esm/types/middleware/index.d.ts +0 -10
  183. package/lib/esm/types/middleware/index.d.ts.map +0 -1
  184. package/lib/esm/types/middleware/interfaces/body-parser.interface.d.ts +0 -34
  185. package/lib/esm/types/middleware/interfaces/body-parser.interface.d.ts.map +0 -1
  186. package/lib/esm/types/middleware/interfaces/compression.interface.d.ts +0 -99
  187. package/lib/esm/types/middleware/interfaces/compression.interface.d.ts.map +0 -1
  188. package/lib/esm/types/middleware/interfaces/cookie-parser.interface.d.ts +0 -10
  189. package/lib/esm/types/middleware/interfaces/cookie-parser.interface.d.ts.map +0 -1
  190. package/lib/esm/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts +0 -58
  191. package/lib/esm/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts.map +0 -1
  192. package/lib/esm/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts +0 -28
  193. package/lib/esm/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts.map +0 -1
  194. package/lib/esm/types/middleware/interfaces/cors.interface.d.ts +0 -58
  195. package/lib/esm/types/middleware/interfaces/cors.interface.d.ts.map +0 -1
  196. package/lib/esm/types/middleware/interfaces/morgan.interface.d.ts +0 -41
  197. package/lib/esm/types/middleware/interfaces/morgan.interface.d.ts.map +0 -1
  198. package/lib/esm/types/middleware/interfaces/serve-favicon.interface.d.ts +0 -12
  199. package/lib/esm/types/middleware/interfaces/serve-favicon.interface.d.ts.map +0 -1
  200. package/lib/esm/types/middleware/interfaces/serve-static.interface.d.ts +0 -71
  201. package/lib/esm/types/middleware/interfaces/serve-static.interface.d.ts.map +0 -1
  202. package/lib/esm/types/middleware/middleware-resolver.d.ts +0 -12
  203. package/lib/esm/types/middleware/middleware-resolver.d.ts.map +0 -1
  204. package/lib/esm/types/middleware/middleware-service.d.ts +0 -237
  205. package/lib/esm/types/middleware/middleware-service.d.ts.map +0 -1
  206. package/lib/esm/types/provider/dto-validator/dto-validator.provider.d.ts +0 -12
  207. package/lib/esm/types/provider/dto-validator/dto-validator.provider.d.ts.map +0 -1
  208. package/lib/esm/types/provider/environment/env-validator.provider.d.ts +0 -31
  209. package/lib/esm/types/provider/environment/env-validator.provider.d.ts.map +0 -1
  210. package/lib/esm/types/provider/index.d.ts +0 -5
  211. package/lib/esm/types/provider/index.d.ts.map +0 -1
  212. package/lib/esm/types/provider/logger/logger-service.d.ts +0 -50
  213. package/lib/esm/types/provider/logger/logger-service.d.ts.map +0 -1
  214. package/lib/esm/types/provider/provider-service.d.ts +0 -31
  215. package/lib/esm/types/provider/provider-service.d.ts.map +0 -1
  216. package/lib/esm/types/render/handlebars.interface.d.ts +0 -47
  217. package/lib/esm/types/render/handlebars.interface.d.ts.map +0 -1
  218. package/lib/esm/types/render/index.d.ts +0 -3
  219. package/lib/esm/types/render/index.d.ts.map +0 -1
  220. package/lib/esm/types/render/render.type.d.ts +0 -13
  221. package/lib/esm/types/render/render.type.d.ts.map +0 -1
  222. /package/lib/{esm/common/index.js → cjs/middleware/interfaces/express-rate-limit.interface.js} +0 -0
@@ -6,5 +6,5 @@ export { CookieSessionOptions } from "./interfaces/cookie-session/cookie-session
6
6
  export { Keygrip } from "./interfaces/cookie-session/keygrip.interface";
7
7
  export { CookieParserOptions } from "./interfaces/cookie-parser.interface";
8
8
  export { ServeFaviconOptions } from "./interfaces/serve-favicon.interface";
9
+ export { RateLimitOptions } from "./interfaces/express-rate-limit.interface";
9
10
  export * as IMorgan from "./interfaces/morgan.interface";
10
- //# sourceMappingURL=index.d.ts.map
@@ -31,4 +31,3 @@ interface OptionsJson {
31
31
  strict?: boolean | undefined;
32
32
  }
33
33
  export { OptionsJson };
34
- //# sourceMappingURL=body-parser.interface.d.ts.map
@@ -96,4 +96,3 @@ interface CompressionOptions {
96
96
  [property: string]: any;
97
97
  }
98
98
  export { CompressionOptions };
99
- //# sourceMappingURL=compression.interface.d.ts.map
@@ -7,4 +7,3 @@ interface CookieParserOptions {
7
7
  decode?(val: string): string;
8
8
  }
9
9
  export { CookieParserOptions };
10
- //# sourceMappingURL=cookie-parser.interface.d.ts.map
@@ -55,4 +55,3 @@ interface CookieSessionOptions {
55
55
  overwrite?: boolean | undefined;
56
56
  }
57
57
  export { CookieSessionOptions };
58
- //# sourceMappingURL=cookie-session.interface.d.ts.map
@@ -25,4 +25,3 @@ interface KeygripFunction {
25
25
  (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
26
26
  }
27
27
  export { KeygripFunction as Keygrip };
28
- //# sourceMappingURL=keygrip.interface.d.ts.map
@@ -55,4 +55,3 @@ interface CorsOptions {
55
55
  optionsSuccessStatus?: number | undefined;
56
56
  }
57
57
  export { CorsOptions };
58
- //# sourceMappingURL=cors.interface.d.ts.map
@@ -0,0 +1,292 @@
1
+ import { Request, Response, NextFunction } from "express";
2
+ /**
3
+ * Method (in the form of middleware) to generate/retrieve a value based on the
4
+ * incoming request.
5
+ *
6
+ * @param request {Request} - The Express request object.
7
+ * @param response {Response} - The Express response object.
8
+ *
9
+ * @returns {T} - The value needed.
10
+ */
11
+ type ValueDeterminingMiddleware<T> = (request: Request, response: Response) => T | Promise<T>;
12
+ /**
13
+ * Express request handler that sends back a response when a client is
14
+ * rate-limited.
15
+ * @param request {Request} - The Express request object.
16
+ * @param response {Response} - The Express response object.
17
+ * @param next {NextFunction} - The Express `next` function, can be called to skip responding.
18
+ * @param optionsUsed {Options} - The options used to set up the middleware.
19
+ */
20
+ type RateLimitExceededEventHandler = (request: Request, response: Response, next: NextFunction, optionsUsed: RateLimitOptions) => void;
21
+ /**
22
+ * Data returned from the `Store` when a client's hit counter is incremented.
23
+ *
24
+ * @property totalHits {number} - The number of hits for that client so far.
25
+ * @property resetTime {Date | undefined} - The time when the counter resets.
26
+ */
27
+ type ClientRateLimitInfo = {
28
+ totalHits: number;
29
+ resetTime: Date | undefined;
30
+ };
31
+ type IncrementResponse = ClientRateLimitInfo;
32
+ /**
33
+ * An interface that all hit counter stores must implement.
34
+ */
35
+ interface Store {
36
+ /**
37
+ * Method that initializes the store, and has access to the options passed to
38
+ * the middleware too.
39
+ *
40
+ * @param options {Options} - The options used to setup the middleware.
41
+ */
42
+ init?: (options: RateLimitOptions) => void;
43
+ /**
44
+ * Method to fetch a client's hit count and reset time.
45
+ *
46
+ * @param key {string} - The identifier for a client.
47
+ *
48
+ * @returns {ClientRateLimitInfo} - The number of hits and reset time for that client.
49
+ */
50
+ get?: (key: string) => Promise<ClientRateLimitInfo | undefined> | ClientRateLimitInfo | undefined;
51
+ /**
52
+ * Method to increment a client's hit counter.
53
+ *
54
+ * @param key {string} - The identifier for a client.
55
+ *
56
+ * @returns {IncrementResponse | undefined} - The number of hits and reset time for that client.
57
+ */
58
+ increment: (key: string) => Promise<IncrementResponse> | IncrementResponse;
59
+ /**
60
+ * Method to decrement a client's hit counter.
61
+ *
62
+ * @param key {string} - The identifier for a client.
63
+ */
64
+ decrement: (key: string) => Promise<void> | void;
65
+ /**
66
+ * Method to reset a client's hit counter.
67
+ *
68
+ * @param key {string} - The identifier for a client.
69
+ */
70
+ resetKey: (key: string) => Promise<void> | void;
71
+ /**
72
+ * Method to reset everyone's hit counter.
73
+ */
74
+ resetAll?: () => Promise<void> | void;
75
+ /**
76
+ * Method to shutdown the store, stop timers, and release all resources.
77
+ */
78
+ shutdown?: () => Promise<void> | void;
79
+ /**
80
+ * Flag to indicate that keys incremented in one instance of this store can
81
+ * not affect other instances. Typically false if a database is used, true for
82
+ * MemoryStore.
83
+ *
84
+ * Used to help detect double-counting misconfigurations.
85
+ */
86
+ localKeys?: boolean;
87
+ /**
88
+ * Optional value that the store prepends to keys
89
+ *
90
+ * Used by the double-count check to avoid false-positives when a key is counted twice, but with different prefixes
91
+ */
92
+ prefix?: string;
93
+ }
94
+ interface Validations {
95
+ enabled: {
96
+ [key: string]: boolean;
97
+ };
98
+ disable(): void;
99
+ /**
100
+ * Checks whether the IP address is valid, and that it does not have a port
101
+ * number in it.
102
+ *
103
+ * See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_invalid_ip_address.
104
+ *
105
+ * @param ip {string | undefined} - The IP address provided by Express as request.ip.
106
+ *
107
+ * @returns {void}
108
+ */
109
+ ip(ip: string | undefined): void;
110
+ /**
111
+ * Makes sure the trust proxy setting is not set to `true`.
112
+ *
113
+ * See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_permissive_trust_proxy.
114
+ *
115
+ * @param request {Request} - The Express request object.
116
+ *
117
+ * @returns {void}
118
+ */
119
+ trustProxy(request: Request): void;
120
+ /**
121
+ * Makes sure the trust proxy setting is set in case the `X-Forwarded-For`
122
+ * header is present.
123
+ *
124
+ * See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_unset_trust_proxy.
125
+ *
126
+ * @param request {Request} - The Express request object.
127
+ *
128
+ * @returns {void}
129
+ */
130
+ xForwardedForHeader(request: Request): void;
131
+ /**
132
+ * Ensures totalHits value from store is a positive integer.
133
+ *
134
+ * @param hits {any} - The `totalHits` returned by the store.
135
+ */
136
+ positiveHits(hits: any): void;
137
+ /**
138
+ * Ensures a given key is incremented only once per request.
139
+ *
140
+ * @param request {Request} - The Express request object.
141
+ * @param store {Store} - The store class.
142
+ * @param key {string} - The key used to store the client's hit count.
143
+ *
144
+ * @returns {void}
145
+ */
146
+ singleCount(request: Request, store: Store, key: string): void;
147
+ /**
148
+ * Warns the user that the behaviour for `max: 0` / `limit: 0` is changing in the next
149
+ * major release.
150
+ *
151
+ * @param limit {number} - The maximum number of hits per client.
152
+ *
153
+ * @returns {void}
154
+ */
155
+ limit(limit: number): void;
156
+ /**
157
+ * Warns the user that the `draft_polli_ratelimit_headers` option is deprecated
158
+ * and will be removed in the next major release.
159
+ *
160
+ * @param draft_polli_ratelimit_headers {any | undefined} - The now-deprecated setting that was used to enable standard headers.
161
+ *
162
+ * @returns {void}
163
+ */
164
+ draftPolliHeaders(draft_polli_ratelimit_headers?: any): void;
165
+ /**
166
+ * Warns the user that the `onLimitReached` option is deprecated and will be removed in the next
167
+ * major release.
168
+ *
169
+ * @param onLimitReached {any | undefined} - The maximum number of hits per client.
170
+ *
171
+ * @returns {void}
172
+ */
173
+ onLimitReached(onLimitReached?: any): void;
174
+ /**
175
+ * Warns the user when the selected headers option requires a reset time but
176
+ * the store does not provide one.
177
+ *
178
+ * @param resetTime {Date | undefined} - The timestamp when the client's hit count will be reset.
179
+ *
180
+ * @returns {void}
181
+ */
182
+ headersResetTime(resetTime?: Date): void;
183
+ /**
184
+ * Checks the options.validate setting to ensure that only recognized validations are enabled or disabled.
185
+ *
186
+ * If any unrecognized values are found, an error is logged that includes the list of supported vaidations.
187
+ */
188
+ validationsConfig(): void;
189
+ }
190
+ type DraftHeadersVersion = "draft-6" | "draft-7";
191
+ interface RateLimitOptions {
192
+ /**
193
+ * How long we should remember the requests.
194
+ *
195
+ * Defaults to `60000` ms (= 1 minute).
196
+ */
197
+ windowMs?: number;
198
+ /**
199
+ * The maximum number of connections to allow during the `window` before
200
+ * rate limiting the client.
201
+ *
202
+ * Can be the limit itself as a number or express middleware that parses
203
+ * the request and then figures out the limit.
204
+ *
205
+ * Defaults to `5`.
206
+ */
207
+ limit?: number | ValueDeterminingMiddleware<number>;
208
+ /**
209
+ * The response body to send back when a client is rate limited.
210
+ *
211
+ * Defaults to `'Too many requests, please try again later.'`
212
+ */
213
+ message?: any | ValueDeterminingMiddleware<any>;
214
+ /**
215
+ * The HTTP status code to send back when a client is rate limited.
216
+ *
217
+ * Defaults to `HTTP 429 Too Many Requests` (RFC 6585).
218
+ */
219
+ statusCode?: number;
220
+ /**
221
+ * Whether to send `X-RateLimit-*` headers with the rate limit and the number
222
+ * of requests.
223
+ *
224
+ * Defaults to `true` (for backward compatibility).
225
+ */
226
+ legacyHeaders?: boolean;
227
+ /**
228
+ * Whether to enable support for the standardized rate limit headers (`RateLimit-*`).
229
+ *
230
+ * Defaults to `false` (for backward compatibility, but its use is recommended).
231
+ */
232
+ standardHeaders?: false | DraftHeadersVersion;
233
+ /**
234
+ * The name of the property on the request object to store the rate limit info.
235
+ *
236
+ * Defaults to `rateLimit`.
237
+ */
238
+ requestPropertyName?: string;
239
+ /**
240
+ * If `true`, the library will (by default) skip all requests that have a 4XX
241
+ * or 5XX status.
242
+ *
243
+ * Defaults to `false`.
244
+ */
245
+ skipFailedRequests?: boolean;
246
+ /**
247
+ * If `true`, the library will (by default) skip all requests that have a
248
+ * status code less than 400.
249
+ *
250
+ * Defaults to `false`.
251
+ */
252
+ skipSuccessfulRequests?: boolean;
253
+ /**
254
+ * Method to generate custom identifiers for clients.
255
+ *
256
+ * By default, the client's IP address is used.
257
+ */
258
+ keyGenerator?: ValueDeterminingMiddleware<string>;
259
+ /**
260
+ * Express request handler that sends back a response when a client is
261
+ * rate-limited.
262
+ *
263
+ * By default, sends back the `statusCode` and `message` set via the options.
264
+ */
265
+ handler?: RateLimitExceededEventHandler;
266
+ /**
267
+ * Method (in the form of middleware) to determine whether or not this request
268
+ * counts towards a client's quota.
269
+ *
270
+ * By default, skips no requests.
271
+ */
272
+ skip?: ValueDeterminingMiddleware<boolean>;
273
+ /**
274
+ * Method to determine whether or not the request counts as 'succesful'. Used
275
+ * when either `skipSuccessfulRequests` or `skipFailedRequests` is set to true.
276
+ *
277
+ * By default, requests with a response status code less than 400 are considered
278
+ * successful.
279
+ */
280
+ requestWasSuccessful?: ValueDeterminingMiddleware<boolean>;
281
+ /**
282
+ * The `Store` to use to store the hit count for each client.
283
+ *
284
+ * By default, the built-in `MemoryStore` will be used.
285
+ */
286
+ store?: Store;
287
+ /**
288
+ * The list of validation checks that should run.
289
+ */
290
+ validations?: Validations;
291
+ }
292
+ export { RateLimitOptions };
@@ -38,4 +38,3 @@ export type TokenCallbackFn = (req: http.IncomingMessage, res: http.ServerRespon
38
38
  export interface TokenIndexer {
39
39
  [tokenName: string]: TokenCallbackFn;
40
40
  }
41
- //# sourceMappingURL=morgan.interface.d.ts.map
@@ -9,4 +9,3 @@ interface ServeFaviconOptions {
9
9
  maxAge?: number | string | undefined;
10
10
  }
11
11
  export { ServeFaviconOptions };
12
- //# sourceMappingURL=serve-favicon.interface.d.ts.map
@@ -68,4 +68,3 @@ interface ServeStaticOptions<R extends http.ServerResponse = http.ServerResponse
68
68
  setHeaders?: ((res: R, path: string, stat: any) => any) | undefined;
69
69
  }
70
70
  export { ServeStaticOptions };
71
- //# sourceMappingURL=serve-static.interface.d.ts.map
@@ -9,4 +9,3 @@ import express from "express";
9
9
  */
10
10
  declare function middlewareResolver(middleware: string, ...options: any): express.RequestHandler | null;
11
11
  export { middlewareResolver };
12
- //# sourceMappingURL=middleware-resolver.d.ts.map
@@ -8,6 +8,7 @@ import { ServeStaticOptions } from "./interfaces/serve-static.interface";
8
8
  import { CookieSessionOptions } from "./interfaces/cookie-session/cookie-session.interface";
9
9
  import { ServeFaviconOptions } from "./interfaces/serve-favicon.interface";
10
10
  import { FormatFn, OptionsMorgan } from "./interfaces/morgan.interface";
11
+ import { RateLimitOptions } from "./interfaces/express-rate-limit.interface";
11
12
  /**
12
13
  * ExpressHandler Type
13
14
  *
@@ -53,6 +54,13 @@ interface MiddlewarePipeline {
53
54
  * Provides methods to be added automatically in the application without the need to import packages.
54
55
  */
55
56
  interface IMiddleware {
57
+ /**
58
+ * Adds a Rate Limit middleware to the middleware collection.
59
+ * The rate limiter is responsible for adding dynamic rate limit and request throttling to the application.
60
+ *
61
+ * @param options - Optional configuration options for the JSON body parser.
62
+ */
63
+ addRateLimiter(options?: RateLimitOptions): void;
56
64
  /**
57
65
  * Adds a Body Parser middleware to the middleware collection.
58
66
  * The body parser is responsible for parsing the incoming request bodies in a middleware.
@@ -153,6 +161,7 @@ declare class Middleware implements IMiddleware {
153
161
  * @returns A boolean value indicating whether the middleware exists or not.
154
162
  */
155
163
  private middlewareExists;
164
+ addRateLimiter(options?: RateLimitOptions): void;
156
165
  /**
157
166
  * Adds a Body Parser middleware to the middleware collection using the given options.
158
167
  *
@@ -234,4 +243,3 @@ declare class Middleware implements IMiddleware {
234
243
  getErrorHandler(): ExpressHandler;
235
244
  }
236
245
  export { Middleware, IMiddleware };
237
- //# sourceMappingURL=middleware-service.d.ts.map
@@ -9,4 +9,3 @@ import { RequestHandler } from "express";
9
9
  */
10
10
  declare function ValidateDTO<T extends object>(type: new () => T): RequestHandler;
11
11
  export { ValidateDTO };
12
- //# sourceMappingURL=dto-validator.provider.d.ts.map
@@ -28,4 +28,3 @@ declare global {
28
28
  }
29
29
  }
30
30
  export { EnvValidatorProvider };
31
- //# sourceMappingURL=env-validator.provider.d.ts.map
@@ -2,4 +2,3 @@ export { Provider, IProvider } from "./provider-service";
2
2
  export { Logger } from "./logger/logger-service";
3
3
  export { EnvValidatorProvider as Env } from "./environment/env-validator.provider";
4
4
  export { ValidateDTO } from "./dto-validator/dto-validator.provider";
5
- //# sourceMappingURL=index.d.ts.map
@@ -47,4 +47,3 @@ declare class Logger {
47
47
  error(message: string, module?: string): void;
48
48
  }
49
49
  export { Logger, LogLevel };
50
- //# sourceMappingURL=logger-service.d.ts.map
@@ -28,4 +28,3 @@ declare class Provider implements IProvider {
28
28
  constructor();
29
29
  }
30
30
  export { IProvider, Provider };
31
- //# sourceMappingURL=provider-service.d.ts.map
@@ -44,4 +44,3 @@ interface IHandlebars {
44
44
  engine: Engine;
45
45
  }
46
46
  export { IHandlebars };
47
- //# sourceMappingURL=handlebars.interface.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { IHandlebars } from "./handlebars.interface";
2
2
  export { RenderTemplateOptions } from "./render.type";
3
- //# sourceMappingURL=index.d.ts.map
@@ -10,4 +10,3 @@ import { IHandlebars } from "./handlebars.interface";
10
10
  */
11
11
  type RenderTemplateOptions = IHandlebars;
12
12
  export { RenderTemplateOptions };
13
- //# sourceMappingURL=render.type.d.ts.map
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/core",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Expressots - modern, fast, lightweight nodejs web framework (@core)",
5
5
  "author": "Richard Zampieri",
6
6
  "main": "./lib/cjs/index.js",
@@ -54,12 +54,13 @@
54
54
  "clean": "node scripts/rm.js lib",
55
55
  "copy": "node scripts/copy.js package.json README.md CHANGELOG.md lib",
56
56
  "rename:esm": "node scripts/mv.js lib/esm/index.js lib/esm/index.mjs",
57
- "build": "npm run clean && npm run build:esm && npm run build:cjs && npm run copy",
57
+ "build:full": "npm run clean && npm run build:esm && npm run build:cjs && npm run copy",
58
+ "build": "npm run clean && npm run build:cjs && npm run copy",
58
59
  "build:esm": "tsc -p tsconfig.esm.json && npm run rename:esm",
59
60
  "build:cjs": "tsc -p tsconfig.cjs.json",
60
61
  "release": "release-it",
61
62
  "coverage": "vitest run --coverage",
62
- "test": "vitest run",
63
+ "test": "vitest run --reporter default",
63
64
  "test:watch": "vitest",
64
65
  "format": "prettier --write \"packages/**/*.ts\" --cache",
65
66
  "lint": "eslint \"packages/**/*.ts\"",
@@ -79,6 +80,7 @@
79
80
  "@types/node": "^20.4.9",
80
81
  "@typescript-eslint/eslint-plugin": "^6.6.0",
81
82
  "@typescript-eslint/parser": "^6.6.0",
83
+ "@vitest/coverage-v8": "^0.34.6",
82
84
  "eslint": "^8.48.0",
83
85
  "eslint-config-prettier": "^9.0.0",
84
86
  "husky": "^8.0.3",
@@ -89,9 +91,6 @@
89
91
  "vite": "4.4.9",
90
92
  "vitest": "0.34.5"
91
93
  },
92
- "peerDependencies": {
93
- "@expressots/adapter-express": "latest"
94
- },
95
94
  "release-it": {
96
95
  "git": {
97
96
  "commitMessage": "chore(release): ${version}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/core",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Expressots - modern, fast, lightweight nodejs web framework (@core)",
5
5
  "author": "Richard Zampieri",
6
6
  "main": "./lib/cjs/index.js",
@@ -54,12 +54,13 @@
54
54
  "clean": "node scripts/rm.js lib",
55
55
  "copy": "node scripts/copy.js package.json README.md CHANGELOG.md lib",
56
56
  "rename:esm": "node scripts/mv.js lib/esm/index.js lib/esm/index.mjs",
57
- "build": "npm run clean && npm run build:esm && npm run build:cjs && npm run copy",
57
+ "build:full": "npm run clean && npm run build:esm && npm run build:cjs && npm run copy",
58
+ "build": "npm run clean && npm run build:cjs && npm run copy",
58
59
  "build:esm": "tsc -p tsconfig.esm.json && npm run rename:esm",
59
60
  "build:cjs": "tsc -p tsconfig.cjs.json",
60
61
  "release": "release-it",
61
62
  "coverage": "vitest run --coverage",
62
- "test": "vitest run",
63
+ "test": "vitest run --reporter default",
63
64
  "test:watch": "vitest",
64
65
  "format": "prettier --write \"packages/**/*.ts\" --cache",
65
66
  "lint": "eslint \"packages/**/*.ts\"",
@@ -79,6 +80,7 @@
79
80
  "@types/node": "^20.4.9",
80
81
  "@typescript-eslint/eslint-plugin": "^6.6.0",
81
82
  "@typescript-eslint/parser": "^6.6.0",
83
+ "@vitest/coverage-v8": "^0.34.6",
82
84
  "eslint": "^8.48.0",
83
85
  "eslint-config-prettier": "^9.0.0",
84
86
  "husky": "^8.0.3",
@@ -89,9 +91,6 @@
89
91
  "vite": "4.4.9",
90
92
  "vitest": "0.34.5"
91
93
  },
92
- "peerDependencies": {
93
- "@expressots/adapter-express": "latest"
94
- },
95
94
  "release-it": {
96
95
  "git": {
97
96
  "commitMessage": "chore(release): ${version}"
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-container.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/app-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,eAAe,EACf,UAAU,EACX,MAAM,WAAW,CAAC;AAGnB;;GAEG;AACH,UAAU,OAAO;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,KAAK,iBAAiB,GAAG,OAAO,MAAM,CAAC;AAEvC;;GAEG;AACH,UAAU,gBAAgB;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC;IAEvC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,cACM,YAAY;IAChB,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,OAAO,CAAmB;IAElC;;;OAGG;gBACS,OAAO,CAAC,EAAE,gBAAgB;IAOtC;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,SAAS;IAYzD;;;OAGG;IACI,oBAAoB,IAAI,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAIrE;;;OAGG;IACI,mBAAmB,IAAI,UAAU,CAAC,gBAAgB;IAIzD;;;OAGG;IACH,IAAW,SAAS,IAAI,SAAS,CAEhC;CACF;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"application-factory.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/application-factory.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAK9E;;;;;GAKG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,MAAM,CAAC,MAAM,CAAwB;IAC7C;;;;;OAKG;WACiB,MAAM,CACxB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,UAAU,UAAU,EACnC,iBAAiB,CAAC,EAAE,UAAU,UAAU,GACvC,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;;;;OAKG;WACiB,MAAM,CACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAC1C,iBAAiB,CAAC,EAAE,UAAU,UAAU,GACvC,OAAO,CAAC,UAAU,CAAC;IA+DtB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;CAK7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"color-service.provider.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/common/color-service.provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9E;;;;;GAKG;AACH,QAAA,MAAM,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAQrC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAQvC,CAAC;AAEF;;;;;GAKG;AACH,aAAK,UAAU;IACb,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-resolver.provider.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/common/package-resolver.provider.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,iBAAS,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CA8BzE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-config.provider.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/common/project-config.provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,mBAAW,OAAO;IAChB,UAAU,cAAc;IACxB,UAAU,eAAe;IACzB,WAAW,eAAe;IAC1B,UAAU,cAAc;CACzB;AAED;;;;;;;GAOG;AACH,UAAU,UAAU;IAClB,MAAM,CAAC,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH;AAED;;;;;;;;;GASG;AACH,UAAU,cAAc;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/console/console.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,UAAU,4BAA4B;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,cACM,OAAO;IACX;;;;OAIG;YACW,UAAU;IAWxB;;;;;OAKG;IACU,aAAa,CACxB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,4BAA4B,GAC5C,OAAO,CAAC,IAAI,CAAC;CA6BjB;AAED,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/console/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"container-module.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/container-module/container-module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAS1E;;;;GAIG;AACH,QAAA,MAAM,KAAK,YAAa,WAAW,YAAY,cACpB,GAAG,SAiB7B,CAAC;AAOF;;;GAGG;AACH,cACM,UAAU;IACd;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAY5B;;;;;OAKG;WACW,qBAAqB,CACjC,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,EACvB,KAAK,CAAC,EAAE,UAAU,CAAC,YAAY,GAC9B,eAAe;CAyCnB;AAED,QAAA,MAAM,YAAY,yCAAmC,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/container-module/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/base-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD;;;;GAIG;AACH,uBACe,cAAe,YAAW,UAAU;IACjD;;;;;OAKG;cACa,gBAAgB,CAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,GAAG,EAAE,QAAQ,EACb,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,GAAG,CAAC;IAIf;;;;;OAKG;IACH,SAAS,CAAC,WAAW,CACnB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,QAAQ,EACb,iBAAiB,EAAE,MAAM,GACxB,GAAG;IAIN;;;;;;;;;;OAUG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,IAAI;IAI5E;;;;;;;;;;OAUG;IACH,SAAS,CAAC,kBAAkB,CAC1B,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,KAAK,GACX,OAAO,CAAC,MAAM,CAAC;CAUnB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/decorator/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scope-binding.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/decorator/scope-binding.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,gBAAgB,eAAgB,GAAG,yBAExC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,gBAAgB,eAAgB,GAAG,yBAExC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-error.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/app-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAM,QAAS,SAAQ,KAAK;IAC1B;;;OAGG;IACI,UAAU,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACI,OAAO,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,UAAU,GAAE,MAAY,EAAE,OAAO,CAAC,EAAE,MAAM;CAMxE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-handler-middleware.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/error-handler-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI1D;;;;;;;GAOG;AACH,iBAAS,mBAAmB,CAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EAEb,IAAI,EAAE,YAAY,GACjB,IAAI,CAWN;AAED,eAAe,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/report.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;GAIG;AACH,cACM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,MAAM,CAAS;;IAMvB;;;;;;;;;;;OAWG;IACI,KAAK,CACV,KAAK,EAAE,KAAK,GAAG,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,MAAM,GACf,QAAQ;CAgBZ;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"status-code.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/status-code.ts"],"names":[],"mappings":"AAQA,aAAK,mBAAmB;IACtB,QAAQ,MAAM;IACd,kBAAkB,MAAM;IACxB,UAAU,MAAM;IAChB,WAAW,MAAM;CAClB;AAED,aAAK,kBAAkB;IACrB,EAAE,MAAM;IACR,OAAO,MAAM;IACb,QAAQ,MAAM;IACd,2BAA2B,MAAM;IACjC,SAAS,MAAM;IACf,YAAY,MAAM;IAClB,cAAc,MAAM;IACpB,WAAW,MAAM;IACjB,eAAe,MAAM;IACrB,MAAM,MAAM;CACb;AAED,aAAK,kBAAkB;IACrB,eAAe,MAAM;IACrB,gBAAgB,MAAM;IACtB,KAAK,MAAM;IACX,QAAQ,MAAM;IACd,WAAW,MAAM;IACjB,iBAAiB,MAAM;IACvB,iBAAiB,MAAM;CACxB;AAED,aAAK,mBAAmB;IACtB,UAAU,MAAM;IAChB,YAAY,MAAM;IAClB,eAAe,MAAM;IACrB,SAAS,MAAM;IACf,QAAQ,MAAM;IACd,gBAAgB,MAAM;IACtB,aAAa,MAAM;IACnB,2BAA2B,MAAM;IACjC,cAAc,MAAM;IACpB,QAAQ,MAAM;IACd,IAAI,MAAM;IACV,cAAc,MAAM;IACpB,kBAAkB,MAAM;IACxB,eAAe,MAAM;IACrB,UAAU,MAAM;IAChB,oBAAoB,MAAM;IAC1B,mBAAmB,MAAM;IACzB,iBAAiB,MAAM;IACvB,SAAS,MAAM;IACf,kBAAkB,MAAM;IACxB,mBAAmB,MAAM;IACzB,MAAM,MAAM;IACZ,gBAAgB,MAAM;IACtB,QAAQ,MAAM;IACd,eAAe,MAAM;IACrB,oBAAoB,MAAM;IAC1B,eAAe,MAAM;IACrB,2BAA2B,MAAM;IACjC,0BAA0B,MAAM;CACjC;AAED,aAAK,mBAAmB;IACtB,mBAAmB,MAAM;IACzB,cAAc,MAAM;IACpB,UAAU,MAAM;IAChB,kBAAkB,MAAM;IACxB,cAAc,MAAM;IACpB,uBAAuB,MAAM;IAC7B,qBAAqB,MAAM;IAC3B,mBAAmB,MAAM;IACzB,YAAY,MAAM;IAClB,WAAW,MAAM;IACjB,6BAA6B,MAAM;CACpC;AASD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-parser.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/body-parser.interface.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,UAAU,WAAW;IACnB,wIAAwI;IACxI,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,IAAI,CAAC,EACD,MAAM,GACN,KAAK,CAAC,MAAM,CAAC,GACb,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,eAAe,KAAK,GAAG,CAAC,GACpC,SAAS,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,CACL,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,IAAI,CAAC;IACR;;;OAGG;IACH,OAAO,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"compression.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/compression.interface.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC;CACxD;AAED,UAAU,kBAAkB;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAExC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookie-parser.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/cookie-parser.interface.ts"],"names":[],"mappings":"AAAA,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}