@celljs/web 3.0.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 (384) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/cell.yml +29 -0
  4. package/lib/browser/module.d.ts +3 -0
  5. package/lib/browser/module.d.ts.map +1 -0
  6. package/lib/browser/module.js +5 -0
  7. package/lib/browser/module.js.map +1 -0
  8. package/lib/common/constants.d.ts +5 -0
  9. package/lib/common/constants.d.ts.map +1 -0
  10. package/lib/common/constants.js +8 -0
  11. package/lib/common/constants.js.map +1 -0
  12. package/lib/common/index.d.ts +5 -0
  13. package/lib/common/index.d.ts.map +1 -0
  14. package/lib/common/index.js +21 -0
  15. package/lib/common/index.js.map +1 -0
  16. package/lib/common/module.d.ts +4 -0
  17. package/lib/common/module.d.ts.map +1 -0
  18. package/lib/common/module.js +6 -0
  19. package/lib/common/module.js.map +1 -0
  20. package/lib/common/pipe/index.d.ts +6 -0
  21. package/lib/common/pipe/index.d.ts.map +1 -0
  22. package/lib/common/pipe/index.js +22 -0
  23. package/lib/common/pipe/index.js.map +1 -0
  24. package/lib/common/pipe/pipe-manager.d.ts +6 -0
  25. package/lib/common/pipe/pipe-manager.d.ts.map +1 -0
  26. package/lib/common/pipe/pipe-manager.js +37 -0
  27. package/lib/common/pipe/pipe-manager.js.map +1 -0
  28. package/lib/common/pipe/pipe-protocol.d.ts +23 -0
  29. package/lib/common/pipe/pipe-protocol.d.ts.map +1 -0
  30. package/lib/common/pipe/pipe-protocol.js +7 -0
  31. package/lib/common/pipe/pipe-protocol.js.map +1 -0
  32. package/lib/common/pipe/pipe-provider.d.ts +8 -0
  33. package/lib/common/pipe/pipe-provider.d.ts.map +1 -0
  34. package/lib/common/pipe/pipe-provider.js +36 -0
  35. package/lib/common/pipe/pipe-provider.js.map +1 -0
  36. package/lib/common/pipe/pipe-transtorm.d.ts +11 -0
  37. package/lib/common/pipe/pipe-transtorm.d.ts.map +1 -0
  38. package/lib/common/pipe/pipe-transtorm.js +97 -0
  39. package/lib/common/pipe/pipe-transtorm.js.map +1 -0
  40. package/lib/common/pipe/validation-errors.d.ts +6 -0
  41. package/lib/common/pipe/validation-errors.d.ts.map +1 -0
  42. package/lib/common/pipe/validation-errors.js +11 -0
  43. package/lib/common/pipe/validation-errors.js.map +1 -0
  44. package/lib/common/resolver/index.d.ts +3 -0
  45. package/lib/common/resolver/index.d.ts.map +1 -0
  46. package/lib/common/resolver/index.js +19 -0
  47. package/lib/common/resolver/index.js.map +1 -0
  48. package/lib/common/resolver/path-resolver.d.ts +6 -0
  49. package/lib/common/resolver/path-resolver.d.ts.map +1 -0
  50. package/lib/common/resolver/path-resolver.js +40 -0
  51. package/lib/common/resolver/path-resolver.js.map +1 -0
  52. package/lib/common/resolver/resolver-protocol.d.ts +5 -0
  53. package/lib/common/resolver/resolver-protocol.d.ts.map +1 -0
  54. package/lib/common/resolver/resolver-protocol.js +5 -0
  55. package/lib/common/resolver/resolver-protocol.js.map +1 -0
  56. package/lib/common/utils/index.d.ts +2 -0
  57. package/lib/common/utils/index.d.ts.map +1 -0
  58. package/lib/common/utils/index.js +18 -0
  59. package/lib/common/utils/index.js.map +1 -0
  60. package/lib/common/utils/url-util.d.ts +11 -0
  61. package/lib/common/utils/url-util.d.ts.map +1 -0
  62. package/lib/common/utils/url-util.js +36 -0
  63. package/lib/common/utils/url-util.js.map +1 -0
  64. package/lib/hooks/serve.d.ts +8 -0
  65. package/lib/hooks/serve.d.ts.map +1 -0
  66. package/lib/hooks/serve.js +60 -0
  67. package/lib/hooks/serve.js.map +1 -0
  68. package/lib/node/application/dev-application-entry.d.ts +7 -0
  69. package/lib/node/application/dev-application-entry.d.ts.map +1 -0
  70. package/lib/node/application/dev-application-entry.js +23 -0
  71. package/lib/node/application/dev-application-entry.js.map +1 -0
  72. package/lib/node/body/body-middleware.d.ts +11 -0
  73. package/lib/node/body/body-middleware.d.ts.map +1 -0
  74. package/lib/node/body/body-middleware.js +43 -0
  75. package/lib/node/body/body-middleware.js.map +1 -0
  76. package/lib/node/body/body-protocol.d.ts +2 -0
  77. package/lib/node/body/body-protocol.d.ts.map +1 -0
  78. package/lib/node/body/body-protocol.js +6 -0
  79. package/lib/node/body/body-protocol.js.map +1 -0
  80. package/lib/node/body/index.d.ts +3 -0
  81. package/lib/node/body/index.d.ts.map +1 -0
  82. package/lib/node/body/index.js +19 -0
  83. package/lib/node/body/index.js.map +1 -0
  84. package/lib/node/context.d.ts +33 -0
  85. package/lib/node/context.d.ts.map +1 -0
  86. package/lib/node/context.js +79 -0
  87. package/lib/node/context.js.map +1 -0
  88. package/lib/node/cookies/cookies-factory.d.ts +7 -0
  89. package/lib/node/cookies/cookies-factory.d.ts.map +1 -0
  90. package/lib/node/cookies/cookies-factory.js +37 -0
  91. package/lib/node/cookies/cookies-factory.js.map +1 -0
  92. package/lib/node/cookies/cookies-middleware.d.ts +9 -0
  93. package/lib/node/cookies/cookies-middleware.d.ts.map +1 -0
  94. package/lib/node/cookies/cookies-middleware.js +37 -0
  95. package/lib/node/cookies/cookies-middleware.js.map +1 -0
  96. package/lib/node/cookies/cookies-protocol.d.ts +7 -0
  97. package/lib/node/cookies/cookies-protocol.d.ts.map +1 -0
  98. package/lib/node/cookies/cookies-protocol.js +7 -0
  99. package/lib/node/cookies/cookies-protocol.js.map +1 -0
  100. package/lib/node/cookies/index.d.ts +4 -0
  101. package/lib/node/cookies/index.d.ts.map +1 -0
  102. package/lib/node/cookies/index.js +20 -0
  103. package/lib/node/cookies/index.js.map +1 -0
  104. package/lib/node/cors/cors-middleware.d.ts +11 -0
  105. package/lib/node/cors/cors-middleware.d.ts.map +1 -0
  106. package/lib/node/cors/cors-middleware.js +51 -0
  107. package/lib/node/cors/cors-middleware.js.map +1 -0
  108. package/lib/node/cors/cors-protocol.d.ts +2 -0
  109. package/lib/node/cors/cors-protocol.d.ts.map +1 -0
  110. package/lib/node/cors/cors-protocol.js +6 -0
  111. package/lib/node/cors/cors-protocol.js.map +1 -0
  112. package/lib/node/cors/index.d.ts +3 -0
  113. package/lib/node/cors/index.d.ts.map +1 -0
  114. package/lib/node/cors/index.js +19 -0
  115. package/lib/node/cors/index.js.map +1 -0
  116. package/lib/node/dispatcher/dispatcher-protocol.d.ts +6 -0
  117. package/lib/node/dispatcher/dispatcher-protocol.d.ts.map +1 -0
  118. package/lib/node/dispatcher/dispatcher-protocol.js +5 -0
  119. package/lib/node/dispatcher/dispatcher-protocol.js.map +1 -0
  120. package/lib/node/dispatcher/dispatcher.d.ts +16 -0
  121. package/lib/node/dispatcher/dispatcher.d.ts.map +1 -0
  122. package/lib/node/dispatcher/dispatcher.js +71 -0
  123. package/lib/node/dispatcher/dispatcher.js.map +1 -0
  124. package/lib/node/dispatcher/index.d.ts +3 -0
  125. package/lib/node/dispatcher/index.d.ts.map +1 -0
  126. package/lib/node/dispatcher/index.js +19 -0
  127. package/lib/node/dispatcher/index.js.map +1 -0
  128. package/lib/node/error/error-hander-provider.d.ts +28 -0
  129. package/lib/node/error/error-hander-provider.d.ts.map +1 -0
  130. package/lib/node/error/error-hander-provider.js +97 -0
  131. package/lib/node/error/error-hander-provider.js.map +1 -0
  132. package/lib/node/error/error-protocol.d.ts +14 -0
  133. package/lib/node/error/error-protocol.d.ts.map +1 -0
  134. package/lib/node/error/error-protocol.js +8 -0
  135. package/lib/node/error/error-protocol.js.map +1 -0
  136. package/lib/node/error/http-error.d.ts +6 -0
  137. package/lib/node/error/http-error.d.ts.map +1 -0
  138. package/lib/node/error/http-error.js +12 -0
  139. package/lib/node/error/http-error.js.map +1 -0
  140. package/lib/node/error/index.d.ts +5 -0
  141. package/lib/node/error/index.d.ts.map +1 -0
  142. package/lib/node/error/index.js +21 -0
  143. package/lib/node/error/index.js.map +1 -0
  144. package/lib/node/error/not-found-error.d.ts +7 -0
  145. package/lib/node/error/not-found-error.d.ts.map +1 -0
  146. package/lib/node/error/not-found-error.js +15 -0
  147. package/lib/node/error/not-found-error.js.map +1 -0
  148. package/lib/node/handler/handler-execution-chain.d.ts +6 -0
  149. package/lib/node/handler/handler-execution-chain.d.ts.map +1 -0
  150. package/lib/node/handler/handler-execution-chain.js +27 -0
  151. package/lib/node/handler/handler-execution-chain.js.map +1 -0
  152. package/lib/node/handler/handler-mapping.d.ts +8 -0
  153. package/lib/node/handler/handler-mapping.d.ts.map +1 -0
  154. package/lib/node/handler/handler-mapping.js +56 -0
  155. package/lib/node/handler/handler-mapping.js.map +1 -0
  156. package/lib/node/handler/handler-protocol.d.ts +16 -0
  157. package/lib/node/handler/handler-protocol.d.ts.map +1 -0
  158. package/lib/node/handler/handler-protocol.js +7 -0
  159. package/lib/node/handler/handler-protocol.js.map +1 -0
  160. package/lib/node/handler/index.d.ts +4 -0
  161. package/lib/node/handler/index.d.ts.map +1 -0
  162. package/lib/node/handler/index.js +20 -0
  163. package/lib/node/handler/index.js.map +1 -0
  164. package/lib/node/health/health-errors.d.ts +6 -0
  165. package/lib/node/health/health-errors.d.ts.map +1 -0
  166. package/lib/node/health/health-errors.js +12 -0
  167. package/lib/node/health/health-errors.js.map +1 -0
  168. package/lib/node/health/health-executor.d.ts +8 -0
  169. package/lib/node/health/health-executor.d.ts.map +1 -0
  170. package/lib/node/health/health-executor.js +63 -0
  171. package/lib/node/health/health-executor.js.map +1 -0
  172. package/lib/node/health/health-indicator.d.ts +8 -0
  173. package/lib/node/health/health-indicator.d.ts.map +1 -0
  174. package/lib/node/health/health-indicator.js +24 -0
  175. package/lib/node/health/health-indicator.js.map +1 -0
  176. package/lib/node/health/health-middleware.d.ts +17 -0
  177. package/lib/node/health/health-middleware.d.ts.map +1 -0
  178. package/lib/node/health/health-middleware.js +68 -0
  179. package/lib/node/health/health-middleware.js.map +1 -0
  180. package/lib/node/health/health-protocol.d.ts +83 -0
  181. package/lib/node/health/health-protocol.d.ts.map +1 -0
  182. package/lib/node/health/health-protocol.js +30 -0
  183. package/lib/node/health/health-protocol.js.map +1 -0
  184. package/lib/node/health/health-status-aggregator.d.ts +5 -0
  185. package/lib/node/health/health-status-aggregator.d.ts.map +1 -0
  186. package/lib/node/health/health-status-aggregator.js +31 -0
  187. package/lib/node/health/health-status-aggregator.js.map +1 -0
  188. package/lib/node/health/index.d.ts +7 -0
  189. package/lib/node/health/index.d.ts.map +1 -0
  190. package/lib/node/health/index.js +23 -0
  191. package/lib/node/health/index.js.map +1 -0
  192. package/lib/node/http/http-middleware.d.ts +9 -0
  193. package/lib/node/http/http-middleware.d.ts.map +1 -0
  194. package/lib/node/http/http-middleware.js +46 -0
  195. package/lib/node/http/http-middleware.js.map +1 -0
  196. package/lib/node/http/http-protocol.d.ts +14 -0
  197. package/lib/node/http/http-protocol.d.ts.map +1 -0
  198. package/lib/node/http/http-protocol.js +7 -0
  199. package/lib/node/http/http-protocol.js.map +1 -0
  200. package/lib/node/http/index.d.ts +4 -0
  201. package/lib/node/http/index.d.ts.map +1 -0
  202. package/lib/node/http/index.js +20 -0
  203. package/lib/node/http/index.js.map +1 -0
  204. package/lib/node/http/server-aware.d.ts +7 -0
  205. package/lib/node/http/server-aware.d.ts.map +1 -0
  206. package/lib/node/http/server-aware.js +21 -0
  207. package/lib/node/http/server-aware.js.map +1 -0
  208. package/lib/node/index.d.ts +15 -0
  209. package/lib/node/index.d.ts.map +1 -0
  210. package/lib/node/index.js +31 -0
  211. package/lib/node/index.js.map +1 -0
  212. package/lib/node/matcher/index.d.ts +3 -0
  213. package/lib/node/matcher/index.d.ts.map +1 -0
  214. package/lib/node/matcher/index.js +19 -0
  215. package/lib/node/matcher/index.js.map +1 -0
  216. package/lib/node/matcher/matcher-protocol.d.ts +5 -0
  217. package/lib/node/matcher/matcher-protocol.d.ts.map +1 -0
  218. package/lib/node/matcher/matcher-protocol.js +5 -0
  219. package/lib/node/matcher/matcher-protocol.js.map +1 -0
  220. package/lib/node/matcher/request-matcher.d.ts +8 -0
  221. package/lib/node/matcher/request-matcher.d.ts.map +1 -0
  222. package/lib/node/matcher/request-matcher.js +52 -0
  223. package/lib/node/matcher/request-matcher.js.map +1 -0
  224. package/lib/node/middleware/compose.d.ts +4 -0
  225. package/lib/node/middleware/compose.d.ts.map +1 -0
  226. package/lib/node/middleware/compose.js +25 -0
  227. package/lib/node/middleware/compose.js.map +1 -0
  228. package/lib/node/middleware/express-middleware-converter.d.ts +4 -0
  229. package/lib/node/middleware/express-middleware-converter.d.ts.map +1 -0
  230. package/lib/node/middleware/express-middleware-converter.js +26 -0
  231. package/lib/node/middleware/express-middleware-converter.js.map +1 -0
  232. package/lib/node/middleware/index.d.ts +4 -0
  233. package/lib/node/middleware/index.d.ts.map +1 -0
  234. package/lib/node/middleware/index.js +20 -0
  235. package/lib/node/middleware/index.js.map +1 -0
  236. package/lib/node/middleware/middleware-provider.d.ts +13 -0
  237. package/lib/node/middleware/middleware-provider.d.ts.map +1 -0
  238. package/lib/node/middleware/middleware-provider.js +36 -0
  239. package/lib/node/middleware/middleware-provider.js.map +1 -0
  240. package/lib/node/module.d.ts +4 -0
  241. package/lib/node/module.d.ts.map +1 -0
  242. package/lib/node/module.js +6 -0
  243. package/lib/node/module.js.map +1 -0
  244. package/lib/node/redirect/index.d.ts +3 -0
  245. package/lib/node/redirect/index.d.ts.map +1 -0
  246. package/lib/node/redirect/index.js +19 -0
  247. package/lib/node/redirect/index.js.map +1 -0
  248. package/lib/node/redirect/redirect-protocol.d.ts +5 -0
  249. package/lib/node/redirect/redirect-protocol.d.ts.map +1 -0
  250. package/lib/node/redirect/redirect-protocol.js +5 -0
  251. package/lib/node/redirect/redirect-protocol.js.map +1 -0
  252. package/lib/node/redirect/redirect-strategy.d.ts +7 -0
  253. package/lib/node/redirect/redirect-strategy.d.ts.map +1 -0
  254. package/lib/node/redirect/redirect-strategy.js +33 -0
  255. package/lib/node/redirect/redirect-strategy.js.map +1 -0
  256. package/lib/node/session/index.d.ts +6 -0
  257. package/lib/node/session/index.d.ts.map +1 -0
  258. package/lib/node/session/index.js +22 -0
  259. package/lib/node/session/index.js.map +1 -0
  260. package/lib/node/session/session-manager.d.ts +12 -0
  261. package/lib/node/session/session-manager.d.ts.map +1 -0
  262. package/lib/node/session/session-manager.js +75 -0
  263. package/lib/node/session/session-manager.js.map +1 -0
  264. package/lib/node/session/session-middleware.d.ts +10 -0
  265. package/lib/node/session/session-middleware.d.ts.map +1 -0
  266. package/lib/node/session/session-middleware.js +45 -0
  267. package/lib/node/session/session-middleware.js.map +1 -0
  268. package/lib/node/session/session-protocol.d.ts +31 -0
  269. package/lib/node/session/session-protocol.d.ts.map +1 -0
  270. package/lib/node/session/session-protocol.js +11 -0
  271. package/lib/node/session/session-protocol.js.map +1 -0
  272. package/lib/node/session/session-store.d.ts +12 -0
  273. package/lib/node/session/session-store.d.ts.map +1 -0
  274. package/lib/node/session/session-store.js +57 -0
  275. package/lib/node/session/session-store.js.map +1 -0
  276. package/lib/node/session/session-strategy.d.ts +8 -0
  277. package/lib/node/session/session-strategy.d.ts.map +1 -0
  278. package/lib/node/session/session-strategy.js +50 -0
  279. package/lib/node/session/session-strategy.js.map +1 -0
  280. package/lib/node/session/session.d.ts +13 -0
  281. package/lib/node/session/session.d.ts.map +1 -0
  282. package/lib/node/session/session.js +42 -0
  283. package/lib/node/session/session.js.map +1 -0
  284. package/lib/node/trace/index.d.ts +5 -0
  285. package/lib/node/trace/index.d.ts.map +1 -0
  286. package/lib/node/trace/index.js +21 -0
  287. package/lib/node/trace/index.js.map +1 -0
  288. package/lib/node/trace/trace-id-provider.d.ts +5 -0
  289. package/lib/node/trace/trace-id-provider.d.ts.map +1 -0
  290. package/lib/node/trace/trace-id-provider.js +21 -0
  291. package/lib/node/trace/trace-id-provider.js.map +1 -0
  292. package/lib/node/trace/trace-id-resolver.d.ts +6 -0
  293. package/lib/node/trace/trace-id-resolver.d.ts.map +1 -0
  294. package/lib/node/trace/trace-id-resolver.js +35 -0
  295. package/lib/node/trace/trace-id-resolver.js.map +1 -0
  296. package/lib/node/trace/trace-middleware.d.ts +10 -0
  297. package/lib/node/trace/trace-middleware.d.ts.map +1 -0
  298. package/lib/node/trace/trace-middleware.js +40 -0
  299. package/lib/node/trace/trace-middleware.js.map +1 -0
  300. package/lib/node/trace/trace-protocol.d.ts +8 -0
  301. package/lib/node/trace/trace-protocol.d.ts.map +1 -0
  302. package/lib/node/trace/trace-protocol.js +9 -0
  303. package/lib/node/trace/trace-protocol.js.map +1 -0
  304. package/lib/package.spec.d.ts +1 -0
  305. package/lib/package.spec.d.ts.map +1 -0
  306. package/lib/package.spec.js +4 -0
  307. package/lib/package.spec.js.map +1 -0
  308. package/package.json +54 -0
  309. package/src/browser/module.ts +2 -0
  310. package/src/common/constants.ts +5 -0
  311. package/src/common/index.ts +4 -0
  312. package/src/common/module.ts +4 -0
  313. package/src/common/pipe/index.ts +5 -0
  314. package/src/common/pipe/pipe-manager.ts +23 -0
  315. package/src/common/pipe/pipe-protocol.ts +32 -0
  316. package/src/common/pipe/pipe-provider.ts +21 -0
  317. package/src/common/pipe/pipe-transtorm.ts +96 -0
  318. package/src/common/pipe/validation-errors.ts +10 -0
  319. package/src/common/resolver/index.ts +2 -0
  320. package/src/common/resolver/path-resolver.ts +23 -0
  321. package/src/common/resolver/resolver-protocol.ts +5 -0
  322. package/src/common/utils/index.ts +1 -0
  323. package/src/common/utils/url-util.ts +33 -0
  324. package/src/hooks/serve.ts +56 -0
  325. package/src/node/application/dev-application-entry.ts +6 -0
  326. package/src/node/body/body-middleware.ts +28 -0
  327. package/src/node/body/body-protocol.ts +4 -0
  328. package/src/node/body/index.ts +2 -0
  329. package/src/node/context.ts +97 -0
  330. package/src/node/cookies/cookies-factory.ts +22 -0
  331. package/src/node/cookies/cookies-middleware.ts +23 -0
  332. package/src/node/cookies/cookies-protocol.ts +10 -0
  333. package/src/node/cookies/index.ts +3 -0
  334. package/src/node/cors/cors-middleware.ts +35 -0
  335. package/src/node/cors/cors-protocol.ts +2 -0
  336. package/src/node/cors/index.ts +2 -0
  337. package/src/node/dispatcher/dispatcher-protocol.ts +7 -0
  338. package/src/node/dispatcher/dispatcher.ts +51 -0
  339. package/src/node/dispatcher/index.ts +2 -0
  340. package/src/node/error/error-hander-provider.ts +77 -0
  341. package/src/node/error/error-protocol.ts +16 -0
  342. package/src/node/error/http-error.ts +9 -0
  343. package/src/node/error/index.ts +4 -0
  344. package/src/node/error/not-found-error.ts +14 -0
  345. package/src/node/handler/handler-execution-chain.ts +17 -0
  346. package/src/node/handler/handler-mapping.ts +41 -0
  347. package/src/node/handler/handler-protocol.ts +21 -0
  348. package/src/node/handler/index.ts +3 -0
  349. package/src/node/health/health-errors.ts +7 -0
  350. package/src/node/health/health-executor.ts +50 -0
  351. package/src/node/health/health-indicator.ts +12 -0
  352. package/src/node/health/health-middleware.ts +51 -0
  353. package/src/node/health/health-protocol.ts +90 -0
  354. package/src/node/health/health-status-aggregator.ts +22 -0
  355. package/src/node/health/index.ts +6 -0
  356. package/src/node/http/http-middleware.ts +30 -0
  357. package/src/node/http/http-protocol.ts +17 -0
  358. package/src/node/http/index.ts +3 -0
  359. package/src/node/http/server-aware.ts +12 -0
  360. package/src/node/index.ts +14 -0
  361. package/src/node/matcher/index.ts +2 -0
  362. package/src/node/matcher/matcher-protocol.ts +5 -0
  363. package/src/node/matcher/request-matcher.ts +35 -0
  364. package/src/node/middleware/compose.ts +23 -0
  365. package/src/node/middleware/express-middleware-converter.ts +23 -0
  366. package/src/node/middleware/index.ts +3 -0
  367. package/src/node/middleware/middleware-provider.ts +30 -0
  368. package/src/node/module.ts +4 -0
  369. package/src/node/redirect/index.ts +2 -0
  370. package/src/node/redirect/redirect-protocol.ts +5 -0
  371. package/src/node/redirect/redirect-strategy.ts +19 -0
  372. package/src/node/session/index.ts +5 -0
  373. package/src/node/session/session-manager.ts +61 -0
  374. package/src/node/session/session-middleware.ts +28 -0
  375. package/src/node/session/session-protocol.ts +40 -0
  376. package/src/node/session/session-store.ts +45 -0
  377. package/src/node/session/session-strategy.ts +37 -0
  378. package/src/node/session/session.ts +45 -0
  379. package/src/node/trace/index.ts +4 -0
  380. package/src/node/trace/trace-id-provider.ts +10 -0
  381. package/src/node/trace/trace-id-resolver.ts +19 -0
  382. package/src/node/trace/trace-middleware.ts +24 -0
  383. package/src/node/trace/trace-protocol.ts +11 -0
  384. package/src/package.spec.ts +4 -0
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.HandlerMappingImpl = void 0;
16
+ const core_1 = require("@celljs/core");
17
+ const handler_protocol_1 = require("./handler-protocol");
18
+ const error_1 = require("../error");
19
+ const context_1 = require("../context");
20
+ let HandlerMappingImpl = class HandlerMappingImpl {
21
+ constructor(handlerAdapters = []) {
22
+ this.handlerAdapters = handlerAdapters;
23
+ this.prioritized = core_1.Prioritizeable.prioritizeAllSync(this.handlerAdapters).map(c => c.value);
24
+ }
25
+ async handle() {
26
+ let lastError;
27
+ for (const handler of this.prioritized) {
28
+ if (await handler.canHandle()) {
29
+ try {
30
+ await handler.handle();
31
+ return;
32
+ }
33
+ catch (error) {
34
+ if (error instanceof error_1.NotFoundAndContinueError) {
35
+ lastError = error;
36
+ }
37
+ else {
38
+ throw error;
39
+ }
40
+ }
41
+ }
42
+ }
43
+ if (lastError) {
44
+ throw lastError;
45
+ }
46
+ throw new error_1.NotFoundError(`Not found a suitable handler adapter: ${context_1.Context.getRequest().path}`);
47
+ }
48
+ };
49
+ HandlerMappingImpl = __decorate([
50
+ (0, core_1.Component)(handler_protocol_1.HandlerMapping),
51
+ __param(0, (0, core_1.Autowired)(handler_protocol_1.HandlerAdapter)),
52
+ __param(0, (0, core_1.Optional)()),
53
+ __metadata("design:paramtypes", [Array])
54
+ ], HandlerMappingImpl);
55
+ exports.HandlerMappingImpl = HandlerMappingImpl;
56
+ //# sourceMappingURL=handler-mapping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-mapping.js","sourceRoot":"","sources":["../../../src/node/handler/handler-mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAA8E;AAC9E,yDAAoE;AACpE,oCAAmE;AACnE,wCAAqC;AAG9B,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAI3B,YAGuB,kBAAoC,EAAE;QAAtC,oBAAe,GAAf,eAAe,CAAuB;QAEzD,IAAI,CAAC,WAAW,GAAG,qBAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC;IAED,KAAK,CAAC,MAAM;QACR,IAAI,SAAS,CAAC;QACd,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE;YACpC,IAAI,MAAM,OAAO,CAAC,SAAS,EAAE,EAAE;gBAC3B,IAAI;oBACA,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC;oBACvB,OAAO;iBACV;gBAAC,OAAO,KAAK,EAAE;oBACZ,IAAI,KAAK,YAAY,gCAAwB,EAAE;wBAC3C,SAAS,GAAG,KAAK,CAAC;qBACrB;yBAAM;wBACH,MAAM,KAAK,CAAC;qBACf;iBACJ;aACJ;SACJ;QACD,IAAI,SAAS,EAAE;YACX,MAAM,SAAS,CAAC;SACnB;QACD,MAAM,IAAI,qBAAa,CAAC,yCAA0C,iBAAO,CAAC,UAAU,EAAE,CAAC,IAAK,EAAE,CAAC,CAAC;IACpG,CAAC;CAEJ,CAAA;AAlCY,kBAAkB;IAD9B,IAAA,gBAAS,EAAC,iCAAc,CAAC;IAMjB,WAAA,IAAA,gBAAS,EAAC,iCAAc,CAAC,CAAA;IACzB,WAAA,IAAA,eAAQ,GAAE,CAAA;;GANN,kBAAkB,CAkC9B;AAlCY,gDAAkB"}
@@ -0,0 +1,16 @@
1
+ import { Middleware } from '../middleware';
2
+ export declare const HandlerExecutionChain: unique symbol;
3
+ export declare const HandlerAdapter: unique symbol;
4
+ export declare const HandlerMapping: unique symbol;
5
+ export interface HandlerExecutionChain {
6
+ execute(middlewares: Middleware[], next: () => Promise<void>): Promise<void>;
7
+ }
8
+ export interface HandlerAdapter {
9
+ readonly priority: number;
10
+ handle(): Promise<void>;
11
+ canHandle(): Promise<boolean>;
12
+ }
13
+ export interface HandlerMapping {
14
+ handle(): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=handler-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-protocol.d.ts","sourceRoot":"","sources":["../../../src/node/handler/handler-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,qBAAqB,eAAkC,CAAC;AAErE,eAAO,MAAM,cAAc,eAA2B,CAAC;AAEvD,eAAO,MAAM,cAAc,eAA2B,CAAC;AAEvD,MAAM,WAAW,qBAAqB;IAClC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC3B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HandlerMapping = exports.HandlerAdapter = exports.HandlerExecutionChain = void 0;
4
+ exports.HandlerExecutionChain = Symbol('HandlerExecutionChain');
5
+ exports.HandlerAdapter = Symbol('HandlerAdapter');
6
+ exports.HandlerMapping = Symbol('HandlerMapping');
7
+ //# sourceMappingURL=handler-protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-protocol.js","sourceRoot":"","sources":["../../../src/node/handler/handler-protocol.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAExD,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE1C,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './handler-execution-chain';
2
+ export * from './handler-mapping';
3
+ export * from './handler-protocol';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./handler-execution-chain"), exports);
18
+ __exportStar(require("./handler-mapping"), exports);
19
+ __exportStar(require("./handler-protocol"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/handler/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,qDAAmC"}
@@ -0,0 +1,6 @@
1
+ import { CustomError } from '@celljs/core';
2
+ export declare class HealthNotFoundError extends CustomError {
3
+ indicatorName: string;
4
+ constructor(indicatorName: string, message: string);
5
+ }
6
+ //# sourceMappingURL=health-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-errors.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,WAAW;IAC7B,aAAa,EAAE,MAAM;gBAArB,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAG5D"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthNotFoundError = void 0;
4
+ const core_1 = require("@celljs/core");
5
+ class HealthNotFoundError extends core_1.CustomError {
6
+ constructor(indicatorName, message) {
7
+ super(message);
8
+ this.indicatorName = indicatorName;
9
+ }
10
+ }
11
+ exports.HealthNotFoundError = HealthNotFoundError;
12
+ //# sourceMappingURL=health-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-errors.js","sourceRoot":"","sources":["../../../src/node/health/health-errors.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAE3C,MAAa,mBAAoB,SAAQ,kBAAW;IAChD,YAAmB,aAAqB,EAAE,OAAe;QACrD,KAAK,CAAC,OAAO,CAAC,CAAC;QADA,kBAAa,GAAb,aAAa,CAAQ;IAExC,CAAC;CACJ;AAJD,kDAIC"}
@@ -0,0 +1,8 @@
1
+ import { HealthComponent, HealthExecutor, HealthIndicator, HealthStatusAggregator } from './health-protocol';
2
+ export declare class HealthExecutorImpl implements HealthExecutor {
3
+ protected readonly healthIndicators: HealthIndicator[];
4
+ protected readonly healthStatusAggregator: HealthStatusAggregator;
5
+ protected getHealthIndicatorName(healthIndicator: HealthIndicator): string | undefined;
6
+ execute(indicatorName?: string): Promise<HealthComponent>;
7
+ }
8
+ //# sourceMappingURL=health-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-executor.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-executor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE9H,qBACa,kBAAmB,YAAW,cAAc;IAGrD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAGvD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IAElE,SAAS,CAAC,sBAAsB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS;IAIhF,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAgClE"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HealthExecutorImpl = void 0;
13
+ const core_1 = require("@celljs/core");
14
+ const health_errors_1 = require("./health-errors");
15
+ const health_protocol_1 = require("./health-protocol");
16
+ let HealthExecutorImpl = class HealthExecutorImpl {
17
+ getHealthIndicatorName(healthIndicator) {
18
+ var _a, _b;
19
+ return (_b = (_a = (0, core_1.getTargetClass)(healthIndicator)) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase();
20
+ }
21
+ async execute(indicatorName) {
22
+ if (indicatorName) {
23
+ const healthIndicator = this.healthIndicators.find(h => {
24
+ const name = this.getHealthIndicatorName(h);
25
+ return name === null || name === void 0 ? void 0 : name.startsWith(indicatorName);
26
+ });
27
+ if (healthIndicator) {
28
+ return healthIndicator.health();
29
+ }
30
+ throw new health_errors_1.HealthNotFoundError(indicatorName, `Health indicator ${indicatorName} not found`);
31
+ }
32
+ const components = {};
33
+ for (const healthIndicator of this.healthIndicators) {
34
+ const name = this.getHealthIndicatorName(healthIndicator);
35
+ if (name) {
36
+ components[name.toLowerCase().replace('healthindicator', '')] = await healthIndicator.health();
37
+ }
38
+ }
39
+ await Promise.all(this.healthIndicators.map(async (h) => {
40
+ const name = this.getHealthIndicatorName(h);
41
+ if (name) {
42
+ components[name.toLowerCase().replace('healthindicator', '')] = await h.health();
43
+ }
44
+ }));
45
+ return {
46
+ status: this.healthStatusAggregator.aggregate(Object.values(components).map(c => c.status)),
47
+ components
48
+ };
49
+ }
50
+ };
51
+ __decorate([
52
+ (0, core_1.Autowired)(health_protocol_1.HealthIndicator),
53
+ __metadata("design:type", Array)
54
+ ], HealthExecutorImpl.prototype, "healthIndicators", void 0);
55
+ __decorate([
56
+ (0, core_1.Autowired)(health_protocol_1.HealthStatusAggregator),
57
+ __metadata("design:type", Object)
58
+ ], HealthExecutorImpl.prototype, "healthStatusAggregator", void 0);
59
+ HealthExecutorImpl = __decorate([
60
+ (0, core_1.Component)(health_protocol_1.HealthExecutor)
61
+ ], HealthExecutorImpl);
62
+ exports.HealthExecutorImpl = HealthExecutorImpl;
63
+ //# sourceMappingURL=health-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-executor.js","sourceRoot":"","sources":["../../../src/node/health/health-executor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAoE;AACpE,mDAAsD;AACtD,uDAA8H;AAGvH,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAQjB,sBAAsB,CAAC,eAAgC;;QAC7D,OAAO,MAAA,MAAA,IAAA,qBAAc,EAAC,eAAe,CAAC,0CAAE,IAAI,0CAAE,WAAW,EAAE,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,aAAsB;QAChC,IAAI,aAAa,EAAE;YACf,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBACnD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;gBAC5C,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,CAAC,aAAa,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;YACH,IAAI,eAAe,EAAE;gBACjB,OAAO,eAAe,CAAC,MAAM,EAAE,CAAC;aACnC;YACD,MAAM,IAAI,mCAAmB,CAAC,aAAa,EAAE,oBAAoB,aAAa,YAAY,CAAC,CAAC;SAC/F;QACD,MAAM,UAAU,GAAuC,EAAE,CAAC;QAC1D,KAAK,MAAM,eAAe,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACjD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAC;YAC1D,IAAI,IAAI,EAAE;gBACN,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,eAAe,CAAC,MAAM,EAAE,CAAC;aAClG;SACJ;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;YAClD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,IAAI,EAAE;gBACN,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;aACpF;QACL,CAAC,CAAC,CAAC,CAAC;QAEJ,OAAwB;YACpB,MAAM,EAAE,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC3F,UAAU;SACb,CAAC;IACN,CAAC;CAEJ,CAAA;AA1CG;IAAC,IAAA,gBAAS,EAAC,iCAAe,CAAC;;4DAC4B;AAEvD;IAAC,IAAA,gBAAS,EAAC,wCAAsB,CAAC;;kEACgC;AANzD,kBAAkB;IAD9B,IAAA,gBAAS,EAAC,gCAAc,CAAC;GACb,kBAAkB,CA4C9B;AA5CY,gDAAkB"}
@@ -0,0 +1,8 @@
1
+ import { Health, HealthIndicator } from './health-protocol';
2
+ /**
3
+ * Default implementation of {@link HealthIndicator} that returns {@link HealthStatus.UP}.
4
+ */
5
+ export declare class PingHealthIndicator implements HealthIndicator {
6
+ health(): Promise<Health>;
7
+ }
8
+ //# sourceMappingURL=health-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-indicator.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-indicator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AAE1E;;GAEG;AACH,qBACa,mBAAoB,YAAW,eAAe;IACjD,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;CAGlC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.PingHealthIndicator = void 0;
10
+ const core_1 = require("@celljs/core");
11
+ const health_protocol_1 = require("./health-protocol");
12
+ /**
13
+ * Default implementation of {@link HealthIndicator} that returns {@link HealthStatus.UP}.
14
+ */
15
+ let PingHealthIndicator = class PingHealthIndicator {
16
+ async health() {
17
+ return { status: health_protocol_1.HealthStatus.UP };
18
+ }
19
+ };
20
+ PingHealthIndicator = __decorate([
21
+ (0, core_1.Component)(health_protocol_1.HealthIndicator)
22
+ ], PingHealthIndicator);
23
+ exports.PingHealthIndicator = PingHealthIndicator;
24
+ //# sourceMappingURL=health-indicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-indicator.js","sourceRoot":"","sources":["../../../src/node/health/health-indicator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyC;AACzC,uDAA0E;AAE1E;;GAEG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC5B,KAAK,CAAC,MAAM;QACR,OAAO,EAAE,MAAM,EAAE,8BAAY,CAAC,EAAE,EAAE,CAAC;IACvC,CAAC;CACJ,CAAA;AAJY,mBAAmB;IAD/B,IAAA,gBAAS,EAAC,iCAAe,CAAC;GACd,mBAAmB,CAI/B;AAJY,kDAAmB"}
@@ -0,0 +1,17 @@
1
+ import { Middleware } from '../middleware';
2
+ import { Context } from '../context';
3
+ import { HealthExecutor, HealthOptions } from './health-protocol';
4
+ import { RequestMatcher } from '../matcher';
5
+ import { PathResolver } from '../../common/resolver';
6
+ export declare class HealthMiddleware implements Middleware {
7
+ protected readonly healthExecutor: HealthExecutor;
8
+ protected readonly requestMatcher: RequestMatcher;
9
+ protected readonly pathResolver: PathResolver;
10
+ protected readonly healthOptions: HealthOptions;
11
+ handle(ctx: Context, next: () => Promise<void>): Promise<void>;
12
+ protected match(): Promise<{
13
+ indicatorName?: string;
14
+ }>;
15
+ readonly priority: number;
16
+ }
17
+ //# sourceMappingURL=health-middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-middleware.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,aAAa,EAA8B,MAAM,mBAAmB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,qBACa,gBAAiB,YAAW,UAAU;IAG/C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAG9C,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAE1C,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;cAmBpD,KAAK,IAAI,OAAO,CAAC;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAK5D,QAAQ,CAAC,QAAQ,SAA8B;CAElD"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HealthMiddleware = void 0;
13
+ const middleware_1 = require("../middleware");
14
+ const core_1 = require("@celljs/core");
15
+ const health_protocol_1 = require("./health-protocol");
16
+ const error_1 = require("../error");
17
+ const matcher_1 = require("../matcher");
18
+ const resolver_1 = require("../../common/resolver");
19
+ const http_1 = require("@celljs/http");
20
+ let HealthMiddleware = class HealthMiddleware {
21
+ constructor() {
22
+ this.priority = health_protocol_1.HEALTH_MIDDLEWARE_PRIORITY;
23
+ }
24
+ async handle(ctx, next) {
25
+ try {
26
+ await next();
27
+ }
28
+ catch (error) {
29
+ const { response } = ctx;
30
+ if (error instanceof error_1.NotFoundError && !response.writableEnded) {
31
+ const result = await this.match();
32
+ if (result) {
33
+ const health = await this.healthExecutor.execute(result.indicatorName);
34
+ response.status(200);
35
+ response.setHeader(http_1.HttpHeaders.CONTENT_TYPE, http_1.MediaType.APPLICATION_JSON);
36
+ response.body = JSON.stringify(health);
37
+ return;
38
+ }
39
+ }
40
+ throw error;
41
+ }
42
+ }
43
+ async match() {
44
+ const pattern = await this.pathResolver.resolve(this.healthOptions.url + '(/:indicatorName)');
45
+ return this.requestMatcher.match(pattern, this.healthOptions.method);
46
+ }
47
+ };
48
+ __decorate([
49
+ (0, core_1.Autowired)(health_protocol_1.HealthExecutor),
50
+ __metadata("design:type", Object)
51
+ ], HealthMiddleware.prototype, "healthExecutor", void 0);
52
+ __decorate([
53
+ (0, core_1.Autowired)(matcher_1.RequestMatcher),
54
+ __metadata("design:type", Object)
55
+ ], HealthMiddleware.prototype, "requestMatcher", void 0);
56
+ __decorate([
57
+ (0, core_1.Autowired)(resolver_1.PathResolver),
58
+ __metadata("design:type", Object)
59
+ ], HealthMiddleware.prototype, "pathResolver", void 0);
60
+ __decorate([
61
+ (0, core_1.Value)('cell.health'),
62
+ __metadata("design:type", Object)
63
+ ], HealthMiddleware.prototype, "healthOptions", void 0);
64
+ HealthMiddleware = __decorate([
65
+ (0, core_1.Component)(middleware_1.Middleware)
66
+ ], HealthMiddleware);
67
+ exports.HealthMiddleware = HealthMiddleware;
68
+ //# sourceMappingURL=health-middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-middleware.js","sourceRoot":"","sources":["../../../src/node/health/health-middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA2C;AAE3C,uCAA2D;AAC3D,uDAA8F;AAC9F,oCAAyC;AACzC,wCAA4C;AAC5C,oDAAqD;AACrD,uCAAsD;AAG/C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAsCM,aAAQ,GAAG,4CAA0B,CAAC;IAEnD,CAAC;IA1BG,KAAK,CAAC,MAAM,CAAC,GAAY,EAAE,IAAyB;QAChD,IAAI;YACA,MAAM,IAAI,EAAE,CAAC;SAChB;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;YACzB,IAAI,KAAK,YAAY,qBAAa,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;gBAC3D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;gBAClC,IAAI,MAAM,EAAE;oBACR,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;oBACvE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACrB,QAAQ,CAAC,SAAS,CAAC,kBAAW,CAAC,YAAY,EAAE,gBAAS,CAAC,gBAAgB,CAAC,CAAC;oBACzE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;oBACvC,OAAO;iBACV;aACJ;YACD,MAAM,KAAK,CAAC;SACf;IACL,CAAC;IAES,KAAK,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC;QAC9F,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;CAIJ,CAAA;AAtCG;IAAC,IAAA,gBAAS,EAAC,gCAAc,CAAC;;wDACwB;AAElD;IAAC,IAAA,gBAAS,EAAC,wBAAc,CAAC;;wDACwB;AAElD;IAAC,IAAA,gBAAS,EAAC,uBAAY,CAAC;;sDACsB;AAE9C;IAAC,IAAA,YAAK,EAAC,aAAa,CAAC;;uDAC2B;AAZvC,gBAAgB;IAD5B,IAAA,gBAAS,EAAC,uBAAU,CAAC;GACT,gBAAgB,CAwC5B;AAxCY,4CAAgB"}
@@ -0,0 +1,83 @@
1
+ export declare const HealthIndicator: unique symbol;
2
+ export declare const HealthExecutor: unique symbol;
3
+ export declare const HealthStatusAggregator: unique symbol;
4
+ export declare const HEALTH_MIDDLEWARE_PRIORITY: number;
5
+ export declare enum HealthStatus {
6
+ /**
7
+ * {@link HealthStatus} indicating that the component or subsystem is in an unknown state.
8
+ */
9
+ UP = "UP",
10
+ /**
11
+ * {@link HealthStatus} indicating that the component or subsystem has suffered an
12
+ * unexpected failure.
13
+ */
14
+ DOWN = "DOWN",
15
+ /**
16
+ * {@link HealthStatus} indicating that the component or subsystem has been taken out of
17
+ * service and should not be used.
18
+ */
19
+ OUT_OF_SERVICE = "OUT_OF_SERVICE",
20
+ /**
21
+ * {@link HealthStatus} indicating that the component or subsystem is in an unknown state.
22
+ */
23
+ UNKNOWN = "UNKNOWN"
24
+ }
25
+ /**
26
+ * A component that contributes data to results returned from the {@link HealthEndpoint}.
27
+ */
28
+ export interface HealthComponent {
29
+ status: HealthStatus;
30
+ }
31
+ /**
32
+ * Carries information about the health of a component or subsystem. Extends
33
+ * {@link HealthComponent} so that additional contextual details about the system can be
34
+ * returned along with the {@link HealthStatus}.
35
+ */
36
+ export interface Health extends HealthComponent {
37
+ details?: {
38
+ [key: string]: any;
39
+ };
40
+ }
41
+ /**
42
+ * A {@link HealthComponent} that is composed of other {@link HealthComponent} instances.
43
+ * Used to provide a unified view of related components. For example, a database health
44
+ * indicator may be a composite containing the {@link Health} of each datasource
45
+ * connection.
46
+ */
47
+ export interface CompositeHealth extends HealthComponent {
48
+ components: {
49
+ [key: string]: HealthComponent;
50
+ };
51
+ }
52
+ /**
53
+ * Strategy interface used to contribute {@link Health} to the results returned from the health endpoint.
54
+ */
55
+ export interface HealthIndicator {
56
+ /**
57
+ * Return an indication of health.
58
+ * @return the health
59
+ */
60
+ health(): Promise<Health>;
61
+ }
62
+ /**
63
+ * Strategy interface used to execute {@link HealthIndicator} instances.
64
+ */
65
+ export interface HealthExecutor {
66
+ execute(indicatorName?: string): Promise<HealthComponent>;
67
+ }
68
+ /**
69
+ * Strategy interface used to aggregate {@link HealthStatus} instances.
70
+ */
71
+ export interface HealthStatusAggregator {
72
+ /**
73
+ * Aggregate the given health statuses into a single status.
74
+ * @param statuses the health statuses to aggregate
75
+ * @return the aggregated status
76
+ */
77
+ aggregate(statuses: HealthStatus[]): HealthStatus;
78
+ }
79
+ export interface HealthOptions {
80
+ url: string;
81
+ method: string;
82
+ }
83
+ //# sourceMappingURL=health-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-protocol.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-protocol.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,eAAO,MAAM,0BAA0B,QAAiC,CAAC;AAEzE,oBAAY,YAAY;IACpB;;OAEG;IACH,EAAE,OAAO;IACT;;;OAGG;IACH,IAAI,SAAS;IACb;;;OAGG;IACH,cAAc,mBAAmB;IACjC;;OAEG;IACH,OAAO,YAAY;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,YAAY,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAO,SAAQ,eAAe;IAC3C,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACpD,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAE3B,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC;CACrD;AAED,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthStatus = exports.HEALTH_MIDDLEWARE_PRIORITY = exports.HealthStatusAggregator = exports.HealthExecutor = exports.HealthIndicator = void 0;
4
+ const http_protocol_1 = require("../http/http-protocol");
5
+ exports.HealthIndicator = Symbol('HealthIndicator');
6
+ exports.HealthExecutor = Symbol('HealthExecutor');
7
+ exports.HealthStatusAggregator = Symbol('HealthStatusAggregator');
8
+ exports.HEALTH_MIDDLEWARE_PRIORITY = http_protocol_1.HTTP_MIDDLEWARE_PRIORITY - 100;
9
+ var HealthStatus;
10
+ (function (HealthStatus) {
11
+ /**
12
+ * {@link HealthStatus} indicating that the component or subsystem is in an unknown state.
13
+ */
14
+ HealthStatus["UP"] = "UP";
15
+ /**
16
+ * {@link HealthStatus} indicating that the component or subsystem has suffered an
17
+ * unexpected failure.
18
+ */
19
+ HealthStatus["DOWN"] = "DOWN";
20
+ /**
21
+ * {@link HealthStatus} indicating that the component or subsystem has been taken out of
22
+ * service and should not be used.
23
+ */
24
+ HealthStatus["OUT_OF_SERVICE"] = "OUT_OF_SERVICE";
25
+ /**
26
+ * {@link HealthStatus} indicating that the component or subsystem is in an unknown state.
27
+ */
28
+ HealthStatus["UNKNOWN"] = "UNKNOWN";
29
+ })(HealthStatus = exports.HealthStatus || (exports.HealthStatus = {}));
30
+ //# sourceMappingURL=health-protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-protocol.js","sourceRoot":"","sources":["../../../src/node/health/health-protocol.ts"],"names":[],"mappings":";;;AAAA,yDAAiE;AAEpD,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC5C,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC1C,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAE1D,QAAA,0BAA0B,GAAG,wCAAwB,GAAG,GAAG,CAAC;AAEzE,IAAY,YAmBX;AAnBD,WAAY,YAAY;IACpB;;OAEG;IACH,yBAAS,CAAA;IACT;;;OAGG;IACH,6BAAa,CAAA;IACb;;;OAGG;IACH,iDAAiC,CAAA;IACjC;;OAEG;IACH,mCAAmB,CAAA;AACvB,CAAC,EAnBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAmBvB"}
@@ -0,0 +1,5 @@
1
+ import { HealthStatus, HealthStatusAggregator } from './health-protocol';
2
+ export declare class HealthStatusAggregatorImpl implements HealthStatusAggregator {
3
+ aggregate(statuses: HealthStatus[]): HealthStatus;
4
+ }
5
+ //# sourceMappingURL=health-status-aggregator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-status-aggregator.d.ts","sourceRoot":"","sources":["../../../src/node/health/health-status-aggregator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AASzE,qBACa,0BAA2B,YAAW,sBAAsB;IAErE,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,YAAY;CAQpD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.HealthStatusAggregatorImpl = void 0;
10
+ const core_1 = require("@celljs/core");
11
+ const health_protocol_1 = require("./health-protocol");
12
+ const defaultOrder = [
13
+ health_protocol_1.HealthStatus.DOWN,
14
+ health_protocol_1.HealthStatus.OUT_OF_SERVICE,
15
+ health_protocol_1.HealthStatus.UP,
16
+ health_protocol_1.HealthStatus.UNKNOWN
17
+ ];
18
+ let HealthStatusAggregatorImpl = class HealthStatusAggregatorImpl {
19
+ aggregate(statuses) {
20
+ return [...statuses, health_protocol_1.HealthStatus.UNKNOWN].reduce((a, b) => {
21
+ const orderA = defaultOrder.indexOf(a);
22
+ const orderB = defaultOrder.indexOf(b);
23
+ return orderA < orderB ? a : b;
24
+ });
25
+ }
26
+ };
27
+ HealthStatusAggregatorImpl = __decorate([
28
+ (0, core_1.Component)(health_protocol_1.HealthStatusAggregator)
29
+ ], HealthStatusAggregatorImpl);
30
+ exports.HealthStatusAggregatorImpl = HealthStatusAggregatorImpl;
31
+ //# sourceMappingURL=health-status-aggregator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-status-aggregator.js","sourceRoot":"","sources":["../../../src/node/health/health-status-aggregator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyC;AACzC,uDAAyE;AAEzE,MAAM,YAAY,GAAmB;IACjC,8BAAY,CAAC,IAAI;IACjB,8BAAY,CAAC,cAAc;IAC3B,8BAAY,CAAC,EAAE;IACf,8BAAY,CAAC,OAAO;CACvB,CAAC;AAGK,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAEnC,SAAS,CAAC,QAAwB;QAC9B,OAAO,CAAC,GAAG,QAAQ,EAAE,8BAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACvD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvC,OAAO,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC;CAEJ,CAAA;AAVY,0BAA0B;IADtC,IAAA,gBAAS,EAAC,wCAAsB,CAAC;GACrB,0BAA0B,CAUtC;AAVY,gEAA0B"}
@@ -0,0 +1,7 @@
1
+ export * from './health-indicator';
2
+ export * from './health-protocol';
3
+ export * from './health-executor';
4
+ export * from './health-errors';
5
+ export * from './health-middleware';
6
+ export * from './health-status-aggregator';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/health/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./health-indicator"), exports);
18
+ __exportStar(require("./health-protocol"), exports);
19
+ __exportStar(require("./health-executor"), exports);
20
+ __exportStar(require("./health-errors"), exports);
21
+ __exportStar(require("./health-middleware"), exports);
22
+ __exportStar(require("./health-status-aggregator"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/health/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,oDAAkC;AAClC,oDAAkC;AAClC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C"}
@@ -0,0 +1,9 @@
1
+ import { Middleware } from '../middleware';
2
+ import { Context } from '../context';
3
+ import { Logger } from '@celljs/core';
4
+ export declare class HttpMiddleware implements Middleware {
5
+ protected readonly logger: Logger;
6
+ handle(ctx: Context, next: () => Promise<void>): Promise<void>;
7
+ readonly priority: number;
8
+ }
9
+ //# sourceMappingURL=http-middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-middleware.d.ts","sourceRoot":"","sources":["../../../src/node/http/http-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAwB,MAAM,EAAE,MAAM,cAAc,CAAC;AAG5D,qBACa,cAAe,YAAW,UAAU;IAG7C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAE5B,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBpE,QAAQ,CAAC,QAAQ,SAA4B;CAEhD"}