@expressots/core 2.3.0 → 2.5.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 (223) hide show
  1. package/lib/CHANGELOG.md +71 -26
  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 +16 -13
  10. package/lib/cjs/middleware/middleware-service.js +33 -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 +2 -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/helmet.interface.d.ts +210 -0
  45. package/lib/cjs/types/middleware/interfaces/morgan.interface.d.ts +0 -1
  46. package/lib/cjs/types/middleware/interfaces/serve-favicon.interface.d.ts +0 -1
  47. package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts +0 -1
  48. package/lib/cjs/types/middleware/middleware-resolver.d.ts +0 -1
  49. package/lib/cjs/types/middleware/middleware-service.d.ts +24 -1
  50. package/lib/cjs/types/provider/dto-validator/dto-validator.provider.d.ts +0 -1
  51. package/lib/cjs/types/provider/environment/env-validator.provider.d.ts +0 -1
  52. package/lib/cjs/types/provider/index.d.ts +0 -1
  53. package/lib/cjs/types/provider/logger/logger-service.d.ts +0 -1
  54. package/lib/cjs/types/provider/provider-service.d.ts +0 -1
  55. package/lib/cjs/types/render/handlebars.interface.d.ts +0 -1
  56. package/lib/cjs/types/render/index.d.ts +0 -1
  57. package/lib/cjs/types/render/render.type.d.ts +0 -1
  58. package/lib/package.json +7 -8
  59. package/package.json +7 -8
  60. package/lib/cjs/types/application/app-container.d.ts.map +0 -1
  61. package/lib/cjs/types/application/application-factory.d.ts.map +0 -1
  62. package/lib/cjs/types/application/index.d.ts.map +0 -1
  63. package/lib/cjs/types/common/color-service.provider.d.ts.map +0 -1
  64. package/lib/cjs/types/common/index.d.ts.map +0 -1
  65. package/lib/cjs/types/common/package-resolver.provider.d.ts.map +0 -1
  66. package/lib/cjs/types/common/project-config.provider.d.ts.map +0 -1
  67. package/lib/cjs/types/console/console.d.ts.map +0 -1
  68. package/lib/cjs/types/console/index.d.ts.map +0 -1
  69. package/lib/cjs/types/container-module/container-module.d.ts.map +0 -1
  70. package/lib/cjs/types/container-module/index.d.ts.map +0 -1
  71. package/lib/cjs/types/controller/base-controller.d.ts.map +0 -1
  72. package/lib/cjs/types/controller/index.d.ts.map +0 -1
  73. package/lib/cjs/types/decorator/index.d.ts.map +0 -1
  74. package/lib/cjs/types/decorator/scope-binding.d.ts.map +0 -1
  75. package/lib/cjs/types/error/app-error.d.ts.map +0 -1
  76. package/lib/cjs/types/error/error-handler-middleware.d.ts.map +0 -1
  77. package/lib/cjs/types/error/index.d.ts.map +0 -1
  78. package/lib/cjs/types/error/report.d.ts.map +0 -1
  79. package/lib/cjs/types/error/status-code.d.ts.map +0 -1
  80. package/lib/cjs/types/index.d.ts.map +0 -1
  81. package/lib/cjs/types/middleware/index.d.ts.map +0 -1
  82. package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts.map +0 -1
  83. package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts.map +0 -1
  84. package/lib/cjs/types/middleware/interfaces/cookie-parser.interface.d.ts.map +0 -1
  85. package/lib/cjs/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts.map +0 -1
  86. package/lib/cjs/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts.map +0 -1
  87. package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts.map +0 -1
  88. package/lib/cjs/types/middleware/interfaces/morgan.interface.d.ts.map +0 -1
  89. package/lib/cjs/types/middleware/interfaces/serve-favicon.interface.d.ts.map +0 -1
  90. package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts.map +0 -1
  91. package/lib/cjs/types/middleware/middleware-resolver.d.ts.map +0 -1
  92. package/lib/cjs/types/middleware/middleware-service.d.ts.map +0 -1
  93. package/lib/cjs/types/provider/dto-validator/dto-validator.provider.d.ts.map +0 -1
  94. package/lib/cjs/types/provider/environment/env-validator.provider.d.ts.map +0 -1
  95. package/lib/cjs/types/provider/index.d.ts.map +0 -1
  96. package/lib/cjs/types/provider/logger/logger-service.d.ts.map +0 -1
  97. package/lib/cjs/types/provider/provider-service.d.ts.map +0 -1
  98. package/lib/cjs/types/render/handlebars.interface.d.ts.map +0 -1
  99. package/lib/cjs/types/render/index.d.ts.map +0 -1
  100. package/lib/cjs/types/render/render.type.d.ts.map +0 -1
  101. package/lib/esm/application/app-container.js +0 -82
  102. package/lib/esm/application/application-factory.js +0 -72
  103. package/lib/esm/application/index.js +0 -7
  104. package/lib/esm/common/color-service.provider.js +0 -46
  105. package/lib/esm/common/package-resolver.provider.js +0 -35
  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
  223. /package/lib/{esm/common/project-config.provider.js → cjs/middleware/interfaces/helmet.interface.js} +0 -0
@@ -1,137 +0,0 @@
1
- declare enum InformationResponse {
2
- Continue = 100,
3
- SwitchingProtocols = 101,
4
- Processing = 102,
5
- eEarlyHints = 103
6
- }
7
- declare enum SuccessfulResponse {
8
- OK = 200,
9
- Created = 201,
10
- Accepted = 202,
11
- NonAuthoritativeInformation = 203,
12
- NoContent = 204,
13
- ResetContent = 205,
14
- PartialContent = 206,
15
- MultiStatus = 207,
16
- AlreadyReported = 208,
17
- IMUsed = 226
18
- }
19
- declare enum RedirectionMessage {
20
- MultipleChoices = 300,
21
- MovedPermanently = 301,
22
- Found = 302,
23
- SeeOther = 303,
24
- NotModified = 304,
25
- TemporaryRedirect = 307,
26
- PermanentRedirect = 308
27
- }
28
- declare enum ClientErrorResponse {
29
- BadRequest = 400,
30
- Unauthorized = 401,
31
- PaymentRequired = 402,
32
- Forbidden = 403,
33
- NotFound = 404,
34
- MethodNotAllowed = 405,
35
- NotAcceptable = 406,
36
- ProxyAuthenticationRequired = 407,
37
- RequestTimeout = 408,
38
- Conflict = 409,
39
- Gone = 410,
40
- LengthRequired = 411,
41
- PreconditionFailed = 412,
42
- PayloadTooLarge = 413,
43
- URITooLong = 414,
44
- UnsupportedMediaType = 415,
45
- RangeNotSatisfiable = 416,
46
- ExpectationFailed = 417,
47
- ImATeapot = 418,
48
- MisdirectedRequest = 421,
49
- UnprocessableEntity = 422,
50
- Locked = 423,
51
- FailedDependency = 424,
52
- TooEarly = 425,
53
- UpgradeRequired = 426,
54
- PreconditionRequired = 428,
55
- TooManyRequests = 429,
56
- RequestHeaderFieldsTooLarge = 431,
57
- UnavailableForLegalReasons = 451
58
- }
59
- declare enum ServerErrorResponse {
60
- InternalServerError = 500,
61
- NotImplemented = 501,
62
- BadGateway = 502,
63
- ServiceUnavailable = 503,
64
- GatewayTimeout = 504,
65
- HTTPVersionNotSupported = 505,
66
- VariantAlsoNegotiates = 506,
67
- InsufficientStorage = 507,
68
- LoopDetected = 508,
69
- NotExtended = 510,
70
- NetworkAuthenticationRequired = 511
71
- }
72
- declare const StatusCode: {
73
- [x: number]: string;
74
- InternalServerError: ServerErrorResponse.InternalServerError;
75
- NotImplemented: ServerErrorResponse.NotImplemented;
76
- BadGateway: ServerErrorResponse.BadGateway;
77
- ServiceUnavailable: ServerErrorResponse.ServiceUnavailable;
78
- GatewayTimeout: ServerErrorResponse.GatewayTimeout;
79
- HTTPVersionNotSupported: ServerErrorResponse.HTTPVersionNotSupported;
80
- VariantAlsoNegotiates: ServerErrorResponse.VariantAlsoNegotiates;
81
- InsufficientStorage: ServerErrorResponse.InsufficientStorage;
82
- LoopDetected: ServerErrorResponse.LoopDetected;
83
- NotExtended: ServerErrorResponse.NotExtended;
84
- NetworkAuthenticationRequired: ServerErrorResponse.NetworkAuthenticationRequired;
85
- BadRequest: ClientErrorResponse.BadRequest;
86
- Unauthorized: ClientErrorResponse.Unauthorized;
87
- PaymentRequired: ClientErrorResponse.PaymentRequired;
88
- Forbidden: ClientErrorResponse.Forbidden;
89
- NotFound: ClientErrorResponse.NotFound;
90
- MethodNotAllowed: ClientErrorResponse.MethodNotAllowed;
91
- NotAcceptable: ClientErrorResponse.NotAcceptable;
92
- ProxyAuthenticationRequired: ClientErrorResponse.ProxyAuthenticationRequired;
93
- RequestTimeout: ClientErrorResponse.RequestTimeout;
94
- Conflict: ClientErrorResponse.Conflict;
95
- Gone: ClientErrorResponse.Gone;
96
- LengthRequired: ClientErrorResponse.LengthRequired;
97
- PreconditionFailed: ClientErrorResponse.PreconditionFailed;
98
- PayloadTooLarge: ClientErrorResponse.PayloadTooLarge;
99
- URITooLong: ClientErrorResponse.URITooLong;
100
- UnsupportedMediaType: ClientErrorResponse.UnsupportedMediaType;
101
- RangeNotSatisfiable: ClientErrorResponse.RangeNotSatisfiable;
102
- ExpectationFailed: ClientErrorResponse.ExpectationFailed;
103
- ImATeapot: ClientErrorResponse.ImATeapot;
104
- MisdirectedRequest: ClientErrorResponse.MisdirectedRequest;
105
- UnprocessableEntity: ClientErrorResponse.UnprocessableEntity;
106
- Locked: ClientErrorResponse.Locked;
107
- FailedDependency: ClientErrorResponse.FailedDependency;
108
- TooEarly: ClientErrorResponse.TooEarly;
109
- UpgradeRequired: ClientErrorResponse.UpgradeRequired;
110
- PreconditionRequired: ClientErrorResponse.PreconditionRequired;
111
- TooManyRequests: ClientErrorResponse.TooManyRequests;
112
- RequestHeaderFieldsTooLarge: ClientErrorResponse.RequestHeaderFieldsTooLarge;
113
- UnavailableForLegalReasons: ClientErrorResponse.UnavailableForLegalReasons;
114
- MultipleChoices: RedirectionMessage.MultipleChoices;
115
- MovedPermanently: RedirectionMessage.MovedPermanently;
116
- Found: RedirectionMessage.Found;
117
- SeeOther: RedirectionMessage.SeeOther;
118
- NotModified: RedirectionMessage.NotModified;
119
- TemporaryRedirect: RedirectionMessage.TemporaryRedirect;
120
- PermanentRedirect: RedirectionMessage.PermanentRedirect;
121
- OK: SuccessfulResponse.OK;
122
- Created: SuccessfulResponse.Created;
123
- Accepted: SuccessfulResponse.Accepted;
124
- NonAuthoritativeInformation: SuccessfulResponse.NonAuthoritativeInformation;
125
- NoContent: SuccessfulResponse.NoContent;
126
- ResetContent: SuccessfulResponse.ResetContent;
127
- PartialContent: SuccessfulResponse.PartialContent;
128
- MultiStatus: SuccessfulResponse.MultiStatus;
129
- AlreadyReported: SuccessfulResponse.AlreadyReported;
130
- IMUsed: SuccessfulResponse.IMUsed;
131
- Continue: InformationResponse.Continue;
132
- SwitchingProtocols: InformationResponse.SwitchingProtocols;
133
- Processing: InformationResponse.Processing;
134
- eEarlyHints: InformationResponse.eEarlyHints;
135
- };
136
- export { StatusCode };
137
- //# sourceMappingURL=status-code.d.ts.map
@@ -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,11 +0,0 @@
1
- export * from "./application";
2
- export * from "./common";
3
- export * from "./console";
4
- export * from "./container-module";
5
- export * from "./controller";
6
- export * from "./decorator";
7
- export * from "./error";
8
- export * from "./middleware";
9
- export * from "./provider";
10
- export * from "./render";
11
- //# sourceMappingURL=index.d.ts.map
@@ -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,10 +0,0 @@
1
- export { IMiddleware, Middleware } from "./middleware-service";
2
- export { OptionsJson } from "./interfaces/body-parser.interface";
3
- export { CorsOptions } from "./interfaces/cors.interface";
4
- export { CompressionOptions } from "./interfaces/compression.interface";
5
- export { CookieSessionOptions } from "./interfaces/cookie-session/cookie-session.interface";
6
- export { Keygrip } from "./interfaces/cookie-session/keygrip.interface";
7
- export { CookieParserOptions } from "./interfaces/cookie-parser.interface";
8
- export { ServeFaviconOptions } from "./interfaces/serve-favicon.interface";
9
- export * as IMorgan from "./interfaces/morgan.interface";
10
- //# sourceMappingURL=index.d.ts.map
@@ -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,34 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import * as http from "http";
4
- interface OptionsJson {
5
- /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
6
- inflate?: boolean | undefined;
7
- /**
8
- * Controls the maximum request body size. If this is a number,
9
- * then the value specifies the number of bytes; if it is a string,
10
- * the value is passed to the bytes library for parsing. Defaults to '100kb'.
11
- */
12
- limit?: number | string | undefined;
13
- /**
14
- * The type option is used to determine what media type the middleware will parse
15
- */
16
- type?: string | Array<string> | ((req: http.IncomingMessage) => any) | undefined;
17
- /**
18
- * The verify option, if supplied, is called as verify(req, res, buf, encoding),
19
- * where buf is a Buffer of the raw request body and encoding is the encoding of the request.
20
- */
21
- verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
22
- /**
23
- *
24
- * The reviver option is passed directly to JSON.parse as the second argument.
25
- */
26
- reviver?(key: string, value: any): any;
27
- /**
28
- * When set to `true`, will only accept arrays and objects;
29
- * when `false` will accept anything JSON.parse accepts. Defaults to `true`.
30
- */
31
- strict?: boolean | undefined;
32
- }
33
- export { OptionsJson };
34
- //# sourceMappingURL=body-parser.interface.d.ts.map
@@ -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,99 +0,0 @@
1
- import express from "express";
2
- interface CompressionFilter {
3
- (req: express.Request, res: express.Response): boolean;
4
- }
5
- interface CompressionOptions {
6
- /**
7
- * @default zlib.constants.Z_DEFAULT_CHUNK or 16384
8
- * @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning| Node.js documentation}
9
- * @see {@link https://github.com/expressjs/compression#chunksize|chunkSize documentation}
10
- */
11
- chunkSize?: number | undefined;
12
- /**
13
- * A function to decide if the response should be considered for compression. This function is called as
14
- * `filter(req, res)` and is expected to return `true` to consider the response for compression, or `false` to
15
- * not compress the response.
16
- *
17
- * The default filter function uses the `compressible` module to determine if `res.getHeader('Content-Type')`
18
- * is compressible.
19
- *
20
- * @see {@link https://github.com/expressjs/compression#filter|`filter` documentation}
21
- * @see {@link https://www.npmjs.com/package/compressible|compressible module}
22
- */
23
- filter?: CompressionFilter | undefined;
24
- /**
25
- * The level of zlib compression to apply to responses. A higher level will result in better compression, but
26
- * will take longer to complete. A lower level will result in less compression, but will be much faster.
27
- *
28
- * This is an integer in the range of `0` (no compression) to `9` (maximum compression). The special value `-1`
29
- * can be used to mean the "default compression level", which is a default compromise between speed and
30
- * compression (currently equivalent to level 6).
31
- *
32
- * - `-1` Default compression level (also `zlib.constants.Z_DEFAULT_COMPRESSION`).
33
- * - `0` No compression (also `zlib.constants.Z_NO_COMPRESSION`).
34
- * - `1` Fastest compression (also `zlib.constants.Z_BEST_SPEED`).
35
- * - `2`
36
- * - `3`
37
- * - `4`
38
- * - `5`
39
- * - `6` (currently what `zlib.constants.Z_DEFAULT_COMPRESSION` points to).
40
- * - `7`
41
- * - `8`
42
- * - `9` Best compression (also `zlib.constants.Z_BEST_COMPRESSION`).
43
- *
44
- * **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
45
- *
46
- * @default zlib.constants.DEFAULT_COMPRESSION or -1
47
- * @see {@link https://github.com/expressjs/compression#level|`level` documentation}
48
- */
49
- level?: number | undefined;
50
- /**
51
- * This specifies how much memory should be allocated for the internal compression state and is an integer in
52
- * the range of `1` (minimum level) and `9` (maximum level).
53
- *
54
- * @default zlib.constants.DEFAULT_MEMLEVEL or 8
55
- * @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
56
- * @see {@link https://github.com/expressjs/compression#memlevel|`memLevel` documentation}
57
- */
58
- memLevel?: number | undefined;
59
- /**
60
- * This is used to tune the compression algorithm. This value only affects the compression ratio, not the
61
- * correctness of the compressed output, even if it is not set appropriately.
62
- *
63
- * - `zlib.constants.Z_DEFAULT_STRATEGY` Use for normal data.
64
- * - `zlib.constants.Z_FILTERED` Use for data produced by a filter (or predictor). Filtered data consists mostly of small
65
- * values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress
66
- * them better. The effect is to force more Huffman coding and less string matching; it is somewhat intermediate
67
- * between `zlib.constants.Z_DEFAULT_STRATEGY` and `zlib.constants.Z_HUFFMAN_ONLY`.
68
- * - `zlib.constants.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
69
- * - `zlib.constants.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
70
- * - `zlib.constants.Z_RLE` Use to limit match distances to one (run-length encoding). This is designed to be almost as
71
- * fast as `zlib.constants.Z_HUFFMAN_ONLY`, but give better compression for PNG image data.
72
- *
73
- * **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
74
- */
75
- strategy?: number | undefined;
76
- /**
77
- * The byte threshold for the response body size before compression is considered for the response, defaults to
78
- * 1kb. This is a number of bytes or any string accepted by the bytes module.
79
- *
80
- * **Note** this is only an advisory setting; if the response size cannot be determined at the time the response
81
- * headers are written, then it is assumed the response is *over* the threshold. To guarantee the response size
82
- * can be determined, be sure set a `Content-Length` response header.
83
- *
84
- * @see {@link https://www.npmjs.com/package/bytes|`bytes` module}
85
- * @see {@link https://github.com/expressjs/compression#threshold|`threshold` documentation}
86
- */
87
- threshold?: number | string | undefined;
88
- /**
89
- * @default zlib.constants.Z_DEFAULT_WINDOWBITS or 15.
90
- * @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
91
- */
92
- windowBits?: number | undefined;
93
- /**
94
- * In addition , `zlib` options may be passed in to the options object.
95
- */
96
- [property: string]: any;
97
- }
98
- export { CompressionOptions };
99
- //# sourceMappingURL=compression.interface.d.ts.map
@@ -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,10 +0,0 @@
1
- interface CookieParserOptions {
2
- /**
3
- * A function used for decoding cookies.
4
- * By default, `decodeURIComponent` is used.
5
- * You can provide a custom decoding function here.
6
- */
7
- decode?(val: string): string;
8
- }
9
- export { CookieParserOptions };
10
- //# sourceMappingURL=cookie-parser.interface.d.ts.map
@@ -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"}
@@ -1,58 +0,0 @@
1
- import { Keygrip } from "./keygrip.interface";
2
- interface CookieSessionOptions {
3
- /**
4
- * The name of the cookie to set, defaults to session.
5
- */
6
- name?: string | undefined;
7
- /**
8
- * The list of keys to use to sign & verify cookie values. Set cookies are always signed with keys[0], while the other keys are valid for verification, allowing for key rotation.
9
- */
10
- keys: Array<string> | Keygrip;
11
- /**
12
- * A string which will be used as single key if keys is not provided.
13
- */
14
- secret?: string | undefined;
15
- /**
16
- * a number representing the milliseconds from Date.now() for expiry.
17
- */
18
- maxAge?: number | undefined;
19
- /**
20
- * a Date object indicating the cookie's expiration date (expires at the end of session by default).
21
- */
22
- expires?: Date | undefined;
23
- /**
24
- * a string indicating the path of the cookie (/ by default).
25
- */
26
- path?: string | undefined;
27
- /**
28
- * a string indicating the domain of the cookie (no default).
29
- */
30
- domain?: string | undefined;
31
- /**
32
- * a boolean or string indicating whether the cookie is a "same site" cookie (false by default). This can be set to 'strict', 'lax', 'none', or true (which maps to 'strict').
33
- */
34
- sameSite?: "strict" | "lax" | "none" | boolean | undefined;
35
- /**
36
- * a boolean indicating whether the cookie is only to be sent over HTTPS (false by default for HTTP, true by default for HTTPS).
37
- */
38
- secure?: boolean | undefined;
39
- /**
40
- * a boolean indicating whether the cookie is only to be sent over HTTPS (use this if you handle SSL not in your node process).
41
- */
42
- secureProxy?: boolean | undefined;
43
- /**
44
- * a boolean indicating whether the cookie is only to be sent over HTTP(S), and not made available to client JavaScript (true by default).
45
- */
46
- httpOnly?: boolean | undefined;
47
- /**
48
- * a boolean indicating whether the cookie is to be signed (true by default). If this is true, another cookie of the same name with the .sig suffix appended will also be sent, with a 27-byte url-safe base64 SHA1 value representing the hash of cookie-name=cookie-value against the
49
- * first Keygrip key. This signature key is used to detect tampering the next time a cookie is received.
50
- */
51
- signed?: boolean | undefined;
52
- /**
53
- * a boolean indicating whether to overwrite previously set cookies of the same name (true by default). If this is true, all cookies set during the same request with the same name (regardless of path or domain) are filtered out of the Set-Cookie header when setting this cookie.
54
- */
55
- overwrite?: boolean | undefined;
56
- }
57
- export { CookieSessionOptions };
58
- //# sourceMappingURL=cookie-session.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookie-session.interface.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/middleware/interfaces/cookie-session/cookie-session.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,UAAU,oBAAoB;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;IAE9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,28 +0,0 @@
1
- interface Keygrip {
2
- /**
3
- * Signs the provided data and returns the signature as a string.
4
- * @param data Data to be signed.
5
- * @returns Signature string.
6
- */
7
- sign(data: any): string;
8
- /**
9
- * Verifies the provided data against a given digest (signature).
10
- * @param data Data to be verified.
11
- * @param digest Signature to verify against.
12
- * @returns True if the verification is successful, otherwise false.
13
- */
14
- verify(data: any, digest: string): boolean;
15
- /**
16
- * Retrieves the index of the provided data in relation to a given digest (signature).
17
- * @param data Data to find the index for.
18
- * @param digest Signature to search for.
19
- * @returns Index of the data, or -1 if not found.
20
- */
21
- index(data: any, digest: string): number;
22
- }
23
- interface KeygripFunction {
24
- new (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
25
- (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
26
- }
27
- export { KeygripFunction as Keygrip };
28
- //# sourceMappingURL=keygrip.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keygrip.interface.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/middleware/interfaces/cookie-session/keygrip.interface.ts"],"names":[],"mappings":"AACA,UAAU,OAAO;IACf;;;;OAIG;IAEH,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAAC;IAExB;;;;;OAKG;IAEH,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAE3C;;;;;OAKG;IAEH,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C;AAGD,UAAU,eAAe;IACvB,KACE,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;IACX,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/E;AAGD,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -1,58 +0,0 @@
1
- /**
2
- * Represents the possible values for the `origin` property in the `CorsOptions` interface.
3
- */
4
- type StaticOrigin = boolean | string | RegExp | (boolean | string | RegExp)[];
5
- /**
6
- * A function type to define a custom origin configuration in the `CorsOptions` interface.
7
- *
8
- * @param requestOrigin - The origin of the incoming request, or undefined if not available.
9
- * @param callback - A callback function to indicate whether the request origin is allowed or not.
10
- */
11
- type CustomOrigin = (requestOrigin: string | undefined, callback: (err: Error | null, origin?: StaticOrigin) => void) => void;
12
- /**
13
- * Interface to define Cross-Origin Resource Sharing (CORS) options.
14
- */
15
- interface CorsOptions {
16
- /**
17
- * Configures the Access-Control-Allow-Origin CORS header.
18
- *
19
- * @default '*' (allows requests from any origin)
20
- */
21
- origin?: StaticOrigin | CustomOrigin | undefined;
22
- /**
23
- * Configures the Access-Control-Allow-Methods CORS header.
24
- *
25
- * @default 'GET,HEAD,PUT,PATCH,POST,DELETE' (allows these HTTP methods)
26
- */
27
- methods?: string | Array<string> | undefined;
28
- /**
29
- * Configures the Access-Control-Allow-Headers CORS header.
30
- */
31
- allowedHeaders?: string | Array<string> | undefined;
32
- /**
33
- * Configures the Access-Control-Expose-Headers CORS header.
34
- */
35
- exposedHeaders?: string | Array<string> | undefined;
36
- /**
37
- * Configures the Access-Control-Allow-Credentials CORS header.
38
- */
39
- credentials?: boolean | undefined;
40
- /**
41
- * Configures the Access-Control-Max-Age CORS header.
42
- */
43
- maxAge?: number | undefined;
44
- /**
45
- * If true, allows preflight requests to pass to the next handler.
46
- *
47
- * @default false
48
- */
49
- preflightContinue?: boolean | undefined;
50
- /**
51
- * Defines the status code to be sent to the client on a successful OPTIONS request, as a part of the preflight request.
52
- *
53
- * @default 204
54
- */
55
- optionsSuccessStatus?: number | undefined;
56
- }
57
- export { CorsOptions };
58
- //# sourceMappingURL=cors.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cors.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/cors.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,KAAK,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE9E;;;;;GAKG;AACH,KAAK,YAAY,GAAG,CAClB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI,KACzD,IAAI,CAAC;AAEV;;GAEG;AACH,UAAU,WAAW;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;IACjD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAE7C;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAEpD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAEpD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAExC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,41 +0,0 @@
1
- /// <reference types="node" />
2
- import http from "http";
3
- export interface StreamOptions {
4
- /**
5
- * Output stream for writing log lines.
6
- */
7
- write(str: string): void;
8
- }
9
- /***
10
- * Morgan accepts these properties in the options object.
11
- */
12
- export interface OptionsMorgan {
13
- /***
14
- * Buffer duration before writing logs to the stream, defaults to false.
15
- * When set to true, defaults to 1000 ms.
16
- * @deprecated
17
- */
18
- buffer?: boolean | undefined;
19
- /***
20
- * Write log line on request instead of response. This means that a
21
- * requests will be logged even if the server crashes, but data from the
22
- * response cannot be logged (like the response code).
23
- */
24
- immediate?: boolean | undefined;
25
- /***
26
- * Function to determine if logging is skipped, defaults to false. This
27
- * function will be called as skip(req, res).
28
- */
29
- skip?(req: http.IncomingMessage, res: http.ServerResponse): boolean;
30
- /***
31
- * Output stream for writing log lines, defaults to process.stdout.
32
- * @param str
33
- */
34
- stream?: StreamOptions | undefined;
35
- }
36
- export type FormatFn = (tokens: TokenIndexer, req: http.IncomingMessage, res: http.ServerResponse) => string;
37
- export type TokenCallbackFn = (req: http.IncomingMessage, res: http.ServerResponse, arg?: string | number) => string | number;
38
- export interface TokenIndexer {
39
- [tokenName: string]: TokenCallbackFn;
40
- }
41
- //# sourceMappingURL=morgan.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"morgan.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/morgan.interface.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEhC;;;OAGG;IACH,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;IAEpE;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,MAAM,QAAQ,GAAG,CACrB,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,KACrB,MAAM,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAC5B,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,KAClB,MAAM,GAAG,MAAM,CAAC;AAErB,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;CACtC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * ServeFaviconOptions defines the available options for configuring the serve-favicon middleware.
3
- */
4
- interface ServeFaviconOptions {
5
- /**
6
- * The cache-control max-age directive in ms, defaulting to 1 year.
7
- * This can also be a string accepted by the `ms` module.
8
- */
9
- maxAge?: number | string | undefined;
10
- }
11
- export { ServeFaviconOptions };
12
- //# sourceMappingURL=serve-favicon.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve-favicon.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/serve-favicon.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,UAAU,mBAAmB;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,71 +0,0 @@
1
- /// <reference types="node" />
2
- import http from "http";
3
- interface ServeStaticOptions<R extends http.ServerResponse = http.ServerResponse> {
4
- /**
5
- * Enable or disable accepting ranged requests, defaults to true.
6
- * Disabling this will not send Accept-Ranges and ignore the contents of the Range request header.
7
- */
8
- acceptRanges?: boolean | undefined;
9
- /**
10
- * Enable or disable setting Cache-Control response header, defaults to true.
11
- * Disabling this will ignore the immutable and maxAge options.
12
- */
13
- cacheControl?: boolean | undefined;
14
- /**
15
- * Set how "dotfiles" are treated when encountered. A dotfile is a file or directory that begins with a dot (".").
16
- * Note this check is done on the path itself without checking if the path actually exists on the disk.
17
- * If root is specified, only the dotfiles above the root are checked (i.e. the root itself can be within a dotfile when when set to "deny").
18
- * The default value is 'ignore'.
19
- * 'allow' No special treatment for dotfiles
20
- * 'deny' Send a 403 for any request for a dotfile
21
- * 'ignore' Pretend like the dotfile does not exist and call next()
22
- */
23
- dotfiles?: string | undefined;
24
- /**
25
- * Enable or disable etag generation, defaults to true.
26
- */
27
- etag?: boolean | undefined;
28
- /**
29
- * Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for.
30
- * The first that exists will be served. Example: ['html', 'htm'].
31
- * The default value is false.
32
- */
33
- extensions?: Array<string> | false | undefined;
34
- /**
35
- * Let client errors fall-through as unhandled requests, otherwise forward a client error.
36
- * The default value is true.
37
- */
38
- fallthrough?: boolean | undefined;
39
- /**
40
- * Enable or disable the immutable directive in the Cache-Control response header.
41
- * If enabled, the maxAge option should also be specified to enable caching. The immutable directive will prevent supported clients from making conditional requests during the life of the maxAge option to check if the file has changed.
42
- */
43
- immutable?: boolean | undefined;
44
- /**
45
- * By default this module will send "index.html" files in response to a request on a directory.
46
- * To disable this set false or to supply a new index pass a string or an array in preferred order.
47
- */
48
- index?: boolean | string | Array<string> | undefined;
49
- /**
50
- * Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value.
51
- */
52
- lastModified?: boolean | undefined;
53
- /**
54
- * Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module.
55
- */
56
- maxAge?: number | string | undefined;
57
- /**
58
- * Redirect to trailing "/" when the pathname is a dir. Defaults to true.
59
- */
60
- redirect?: boolean | undefined;
61
- /**
62
- * Function to set custom headers on response. Alterations to the headers need to occur synchronously.
63
- * The function is called as fn(res, path, stat), where the arguments are:
64
- * res the response object
65
- * path the file path that is being sent
66
- * stat the stat object of the file that is being sent
67
- */
68
- setHeaders?: ((res: R, path: string, stat: any) => any) | undefined;
69
- }
70
- export { ServeStaticOptions };
71
- //# sourceMappingURL=serve-static.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve-static.interface.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/middleware/interfaces/serve-static.interface.ts"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,UAAU,kBAAkB,CAC1B,CAAC,SAAS,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc;IAEnD;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEnC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEnC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,SAAS,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAElC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEhC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B;;;;;;OAMG;IAEH,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,SAAS,CAAC;CACrE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,12 +0,0 @@
1
- import express from "express";
2
- /**
3
- * A utility function that wraps the creation and retrieval of middleware.
4
- * It creates a new instance of MiddlewareResolver and calls the getMiddleware method.
5
- *
6
- * @param {string} middleware - The name of the middleware to be retrieved.
7
- * @param {...any} options - Optional arguments to configure the middleware.
8
- * @returns {express.RequestHandler | null} - Returns the configured middleware or null if not found or not installed.
9
- */
10
- declare function middlewareResolver(middleware: string, ...options: any): express.RequestHandler | null;
11
- export { middlewareResolver };
12
- //# sourceMappingURL=middleware-resolver.d.ts.map