@venizia/ignis 0.4.7 → 0.4.8-1

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 (427) hide show
  1. package/dist/esm/base/applications/base.d.ts +19 -0
  2. package/dist/esm/base/applications/base.js +22 -1
  3. package/dist/esm/base/applications/base.js.map +1 -1
  4. package/dist/esm/base/applications/boot-steps.d.ts +1 -0
  5. package/dist/esm/base/applications/boot-steps.js.map +1 -1
  6. package/dist/esm/base/applications/common/types.d.ts +21 -4
  7. package/dist/esm/base/applications/common/types.js.map +1 -1
  8. package/dist/esm/base/applications/server.js.map +1 -1
  9. package/dist/esm/base/controllers/grpc/abstract.js.map +1 -1
  10. package/dist/esm/base/controllers/grpc/adapter.js.map +1 -1
  11. package/dist/esm/base/controllers/grpc/base.js.map +1 -1
  12. package/dist/esm/base/metadata/request-context.d.ts +1 -0
  13. package/dist/esm/base/metadata/request-context.js +1 -0
  14. package/dist/esm/base/metadata/request-context.js.map +1 -1
  15. package/dist/esm/base/middlewares/request-spy/request-spy.middleware.js.map +1 -1
  16. package/dist/esm/components/api-reference/common/constants.d.ts +1 -0
  17. package/dist/esm/components/api-reference/common/constants.js +1 -0
  18. package/dist/esm/components/api-reference/common/constants.js.map +1 -1
  19. package/dist/esm/components/api-reference/common/keys.d.ts +1 -0
  20. package/dist/esm/components/api-reference/common/keys.js +1 -0
  21. package/dist/esm/components/api-reference/common/keys.js.map +1 -1
  22. package/dist/esm/components/api-reference/common/types.d.ts +18 -1
  23. package/dist/esm/components/api-reference/common/types.js.map +1 -1
  24. package/dist/esm/components/api-reference/component.d.ts +14 -0
  25. package/dist/esm/components/api-reference/component.js +14 -0
  26. package/dist/esm/components/api-reference/component.js.map +1 -1
  27. package/dist/esm/components/api-reference/ui/factory.d.ts +1 -0
  28. package/dist/esm/components/api-reference/ui/factory.js +1 -0
  29. package/dist/esm/components/api-reference/ui/factory.js.map +1 -1
  30. package/dist/esm/components/api-reference/ui/scalar.d.ts +1 -0
  31. package/dist/esm/components/api-reference/ui/scalar.js +1 -0
  32. package/dist/esm/components/api-reference/ui/scalar.js.map +1 -1
  33. package/dist/esm/components/api-reference/ui/swagger.d.ts +1 -0
  34. package/dist/esm/components/api-reference/ui/swagger.js +1 -0
  35. package/dist/esm/components/api-reference/ui/swagger.js.map +1 -1
  36. package/dist/esm/components/auth/authenticate/component.d.ts +1 -0
  37. package/dist/esm/components/auth/authenticate/component.js +1 -0
  38. package/dist/esm/components/auth/authenticate/component.js.map +1 -1
  39. package/dist/esm/components/auth/authenticate/controllers/factory.d.ts +1 -0
  40. package/dist/esm/components/auth/authenticate/controllers/factory.js +1 -0
  41. package/dist/esm/components/auth/authenticate/controllers/factory.js.map +1 -1
  42. package/dist/esm/components/auth/authenticate/controllers/jwks/controller.d.ts +1 -0
  43. package/dist/esm/components/auth/authenticate/controllers/jwks/controller.js +1 -0
  44. package/dist/esm/components/auth/authenticate/controllers/jwks/controller.js.map +1 -1
  45. package/dist/esm/components/auth/authenticate/controllers/service-certs/controller.js.map +1 -1
  46. package/dist/esm/components/auth/authenticate/services/basic/service.js.map +1 -1
  47. package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.js.map +1 -1
  48. package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.d.ts +1 -0
  49. package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.js +1 -0
  50. package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.js.map +1 -1
  51. package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.d.ts +1 -0
  52. package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.js +1 -0
  53. package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.js.map +1 -1
  54. package/dist/esm/components/auth/authenticate/services/bearer/jws.service.js.map +1 -1
  55. package/dist/esm/components/auth/authenticate/services/jose-loader.js.map +1 -1
  56. package/dist/esm/components/auth/authenticate/services/service/signer.service.js.map +1 -1
  57. package/dist/esm/components/auth/authenticate/services/service/verifier.service.js.map +1 -1
  58. package/dist/esm/components/auth/authenticate/strategies/basic.strategy.js.map +1 -1
  59. package/dist/esm/components/auth/authenticate/strategies/jwks/issuer.d.ts +1 -0
  60. package/dist/esm/components/auth/authenticate/strategies/jwks/issuer.js +1 -0
  61. package/dist/esm/components/auth/authenticate/strategies/jwks/issuer.js.map +1 -1
  62. package/dist/esm/components/auth/authenticate/strategies/jwks/verifier.d.ts +1 -0
  63. package/dist/esm/components/auth/authenticate/strategies/jwks/verifier.js +1 -0
  64. package/dist/esm/components/auth/authenticate/strategies/jwks/verifier.js.map +1 -1
  65. package/dist/esm/components/auth/authenticate/strategies/jws.strategy.d.ts +1 -0
  66. package/dist/esm/components/auth/authenticate/strategies/jws.strategy.js +1 -0
  67. package/dist/esm/components/auth/authenticate/strategies/jws.strategy.js.map +1 -1
  68. package/dist/esm/components/auth/authenticate/strategies/service.strategy.js.map +1 -1
  69. package/dist/esm/components/auth/authorize/adapters/base-filtered.js.map +1 -1
  70. package/dist/esm/components/auth/authorize/adapters/custom-grant-expander.js.map +1 -1
  71. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/adapter.js.map +1 -1
  72. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/common/types.d.ts +2 -0
  73. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/common/types.js.map +1 -1
  74. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/policy-edges.d.ts +1 -0
  75. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/policy-edges.js +1 -0
  76. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/policy-edges.js.map +1 -1
  77. package/dist/esm/components/auth/authorize/component.d.ts +1 -0
  78. package/dist/esm/components/auth/authorize/component.js +1 -0
  79. package/dist/esm/components/auth/authorize/component.js.map +1 -1
  80. package/dist/esm/components/auth/authorize/enforcers/casbin-module.js.map +1 -1
  81. package/dist/esm/components/auth/authorize/enforcers/casbin.enforcer.d.ts +1 -0
  82. package/dist/esm/components/auth/authorize/enforcers/casbin.enforcer.js +1 -0
  83. package/dist/esm/components/auth/authorize/enforcers/casbin.enforcer.js.map +1 -1
  84. package/dist/esm/components/auth/authorize/enforcers/policy-line-codec.js.map +1 -1
  85. package/dist/esm/components/auth/authorize/enforcers/user-policy-line-cache.js.map +1 -1
  86. package/dist/esm/components/auth/authorize/role-managers/base.js.map +1 -1
  87. package/dist/esm/components/auth/authorize/role-managers/domain-hierarchy.js.map +1 -1
  88. package/dist/esm/components/auth/authorize/role-managers/membership.js.map +1 -1
  89. package/dist/esm/components/auth/authorize/role-managers/resource.js.map +1 -1
  90. package/dist/esm/components/auth/models/entities/columns.d.ts +1 -0
  91. package/dist/esm/components/auth/models/entities/columns.js.map +1 -1
  92. package/dist/esm/components/auth/models/entities/permission.model.d.ts +2 -0
  93. package/dist/esm/components/auth/models/entities/permission.model.js.map +1 -1
  94. package/dist/esm/components/auth/models/entities/policy-definition.model.d.ts +1 -0
  95. package/dist/esm/components/auth/models/entities/policy-definition.model.js.map +1 -1
  96. package/dist/esm/components/controller/grpc/common/types.d.ts +2 -0
  97. package/dist/esm/components/controller/grpc/common/types.js +1 -0
  98. package/dist/esm/components/controller/grpc/common/types.js.map +1 -1
  99. package/dist/esm/components/controller/grpc/grpc.component.d.ts +1 -0
  100. package/dist/esm/components/controller/grpc/grpc.component.js +1 -0
  101. package/dist/esm/components/controller/grpc/grpc.component.js.map +1 -1
  102. package/dist/esm/components/health-check/common/constants.d.ts +1 -0
  103. package/dist/esm/components/health-check/common/constants.js +1 -0
  104. package/dist/esm/components/health-check/common/constants.js.map +1 -1
  105. package/dist/esm/components/health-check/common/keys.d.ts +1 -0
  106. package/dist/esm/components/health-check/common/keys.js +1 -0
  107. package/dist/esm/components/health-check/common/keys.js.map +1 -1
  108. package/dist/esm/components/health-check/common/rest-paths.d.ts +1 -0
  109. package/dist/esm/components/health-check/common/rest-paths.js +1 -0
  110. package/dist/esm/components/health-check/common/rest-paths.js.map +1 -1
  111. package/dist/esm/components/health-check/common/types.d.ts +24 -3
  112. package/dist/esm/components/health-check/common/types.js.map +1 -1
  113. package/dist/esm/components/health-check/component.d.ts +15 -0
  114. package/dist/esm/components/health-check/component.js +15 -0
  115. package/dist/esm/components/health-check/component.js.map +1 -1
  116. package/dist/esm/components/health-check/controller.d.ts +1 -0
  117. package/dist/esm/components/health-check/controller.js +1 -0
  118. package/dist/esm/components/health-check/controller.js.map +1 -1
  119. package/dist/esm/components/health-check/reporter.js.map +1 -1
  120. package/dist/esm/components/mail/common/constants.d.ts +6 -0
  121. package/dist/esm/components/mail/common/constants.js +5 -0
  122. package/dist/esm/components/mail/common/constants.js.map +1 -1
  123. package/dist/esm/components/mail/common/keys.d.ts +1 -0
  124. package/dist/esm/components/mail/common/keys.js +1 -0
  125. package/dist/esm/components/mail/common/keys.js.map +1 -1
  126. package/dist/esm/components/mail/common/types/message.d.ts +10 -0
  127. package/dist/esm/components/mail/common/types/message.js.map +1 -1
  128. package/dist/esm/components/mail/common/types/options.d.ts +22 -1
  129. package/dist/esm/components/mail/common/types/options.js.map +1 -1
  130. package/dist/esm/components/mail/common/types/queue.d.ts +7 -0
  131. package/dist/esm/components/mail/common/types/queue.js.map +1 -1
  132. package/dist/esm/components/mail/common/types/template.d.ts +2 -0
  133. package/dist/esm/components/mail/common/types/template.js.map +1 -1
  134. package/dist/esm/components/mail/common/types/verification.d.ts +5 -0
  135. package/dist/esm/components/mail/common/types/verification.js.map +1 -1
  136. package/dist/esm/components/mail/component.d.ts +1 -0
  137. package/dist/esm/components/mail/component.js +1 -0
  138. package/dist/esm/components/mail/component.js.map +1 -1
  139. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts +1 -0
  140. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js +1 -0
  141. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js.map +1 -1
  142. package/dist/esm/components/mail/helpers/executors/direct-executor.helper.d.ts +1 -0
  143. package/dist/esm/components/mail/helpers/executors/direct-executor.helper.js +1 -0
  144. package/dist/esm/components/mail/helpers/executors/direct-executor.helper.js.map +1 -1
  145. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.d.ts +1 -0
  146. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js +1 -0
  147. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.js.map +1 -1
  148. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.d.ts +1 -0
  149. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js +1 -0
  150. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.js.map +1 -1
  151. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.d.ts +1 -0
  152. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js +1 -0
  153. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.js.map +1 -1
  154. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.d.ts +1 -0
  155. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js +1 -0
  156. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.js.map +1 -1
  157. package/dist/esm/components/mail/providers/mail-queue-executor.provider.d.ts +2 -0
  158. package/dist/esm/components/mail/providers/mail-queue-executor.provider.js +1 -0
  159. package/dist/esm/components/mail/providers/mail-queue-executor.provider.js.map +1 -1
  160. package/dist/esm/components/mail/providers/mail-transporter.provider.d.ts +2 -0
  161. package/dist/esm/components/mail/providers/mail-transporter.provider.js +1 -0
  162. package/dist/esm/components/mail/providers/mail-transporter.provider.js.map +1 -1
  163. package/dist/esm/components/mail/services/generators/numeric-code.d.ts +1 -0
  164. package/dist/esm/components/mail/services/generators/numeric-code.js +1 -0
  165. package/dist/esm/components/mail/services/generators/numeric-code.js.map +1 -1
  166. package/dist/esm/components/mail/services/generators/random-token.d.ts +1 -0
  167. package/dist/esm/components/mail/services/generators/random-token.js +1 -0
  168. package/dist/esm/components/mail/services/generators/random-token.js.map +1 -1
  169. package/dist/esm/components/mail/services/generators/verification-data.d.ts +1 -0
  170. package/dist/esm/components/mail/services/generators/verification-data.js +1 -0
  171. package/dist/esm/components/mail/services/generators/verification-data.js.map +1 -1
  172. package/dist/esm/components/mail/services/mail.service.d.ts +1 -0
  173. package/dist/esm/components/mail/services/mail.service.js +1 -0
  174. package/dist/esm/components/mail/services/mail.service.js.map +1 -1
  175. package/dist/esm/components/mail/services/template.service.d.ts +1 -0
  176. package/dist/esm/components/mail/services/template.service.js +1 -0
  177. package/dist/esm/components/mail/services/template.service.js.map +1 -1
  178. package/dist/esm/components/mail/utilities/address.utility.d.ts +1 -0
  179. package/dist/esm/components/mail/utilities/address.utility.js +1 -0
  180. package/dist/esm/components/mail/utilities/address.utility.js.map +1 -1
  181. package/dist/esm/components/mail/utilities/attachment.utility.js.map +1 -1
  182. package/dist/esm/components/mail/utilities/mime.utility.d.ts +1 -0
  183. package/dist/esm/components/mail/utilities/mime.utility.js +1 -0
  184. package/dist/esm/components/mail/utilities/mime.utility.js.map +1 -1
  185. package/dist/esm/components/mail/utilities/verification.utility.d.ts +1 -0
  186. package/dist/esm/components/mail/utilities/verification.utility.js +1 -0
  187. package/dist/esm/components/mail/utilities/verification.utility.js.map +1 -1
  188. package/dist/esm/components/request-tracker/component.d.ts +1 -0
  189. package/dist/esm/components/request-tracker/component.js +1 -0
  190. package/dist/esm/components/request-tracker/component.js.map +1 -1
  191. package/dist/esm/components/socket-io/common/keys.d.ts +1 -0
  192. package/dist/esm/components/socket-io/common/keys.js +1 -0
  193. package/dist/esm/components/socket-io/common/keys.js.map +1 -1
  194. package/dist/esm/components/socket-io/component.d.ts +1 -0
  195. package/dist/esm/components/socket-io/component.js +1 -0
  196. package/dist/esm/components/socket-io/component.js.map +1 -1
  197. package/dist/esm/components/static-asset/common/commit-token.js.map +1 -1
  198. package/dist/esm/components/static-asset/common/constants.d.ts +3 -0
  199. package/dist/esm/components/static-asset/common/constants.js +1 -0
  200. package/dist/esm/components/static-asset/common/constants.js.map +1 -1
  201. package/dist/esm/components/static-asset/common/keys.d.ts +1 -0
  202. package/dist/esm/components/static-asset/common/keys.js +1 -0
  203. package/dist/esm/components/static-asset/common/keys.js.map +1 -1
  204. package/dist/esm/components/static-asset/common/types.d.ts +42 -6
  205. package/dist/esm/components/static-asset/common/types.js.map +1 -1
  206. package/dist/esm/components/static-asset/component.js.map +1 -1
  207. package/dist/esm/components/static-asset/controller/factory.d.ts +2 -0
  208. package/dist/esm/components/static-asset/controller/factory.js +1 -0
  209. package/dist/esm/components/static-asset/controller/factory.js.map +1 -1
  210. package/dist/esm/components/static-asset/controller/meta-link.js.map +1 -1
  211. package/dist/esm/components/static-asset/controller/route-options.js.map +1 -1
  212. package/dist/esm/components/static-asset/ingest.d.ts +5 -1
  213. package/dist/esm/components/static-asset/ingest.js.map +1 -1
  214. package/dist/esm/components/static-asset/models/base.model.d.ts +2 -0
  215. package/dist/esm/components/static-asset/models/base.model.js.map +1 -1
  216. package/dist/esm/components/websocket/common/keys.d.ts +1 -0
  217. package/dist/esm/components/websocket/common/keys.js +1 -0
  218. package/dist/esm/components/websocket/common/keys.js.map +1 -1
  219. package/dist/esm/components/websocket/component.d.ts +1 -0
  220. package/dist/esm/components/websocket/component.js +1 -0
  221. package/dist/esm/components/websocket/component.js.map +1 -1
  222. package/dist/esm/testing/assert-application-boots.d.ts +39 -8
  223. package/dist/esm/testing/assert-application-boots.js +14 -0
  224. package/dist/esm/testing/assert-application-boots.js.map +1 -1
  225. package/dist/esm/utilities/drizzle-result.utility.d.ts +1 -0
  226. package/dist/esm/utilities/drizzle-result.utility.js +1 -0
  227. package/dist/esm/utilities/drizzle-result.utility.js.map +1 -1
  228. package/dist/presets/app/files/.configs/builders/compile.ts +3 -1
  229. package/dist/presets/app/files/_env.example +1 -1
  230. package/dist/presets/app/files/src/smoke.test.ts +14 -8
  231. package/dist/presets/app/preset.json +4 -4
  232. package/dist/presets/lib/preset.json +3 -3
  233. package/dist/presets/shared/preset.json +1 -1
  234. package/package.json +10 -10
  235. package/dist/esm/base/applications/base.d.ts.map +0 -1
  236. package/dist/esm/base/applications/boot-steps.d.ts.map +0 -1
  237. package/dist/esm/base/applications/common/index.d.ts.map +0 -1
  238. package/dist/esm/base/applications/common/logger-startup.d.ts.map +0 -1
  239. package/dist/esm/base/applications/common/types.d.ts.map +0 -1
  240. package/dist/esm/base/applications/index.d.ts.map +0 -1
  241. package/dist/esm/base/applications/server.d.ts.map +0 -1
  242. package/dist/esm/base/controllers/grpc/abstract.d.ts.map +0 -1
  243. package/dist/esm/base/controllers/grpc/adapter.d.ts.map +0 -1
  244. package/dist/esm/base/controllers/grpc/base.d.ts.map +0 -1
  245. package/dist/esm/base/controllers/grpc/common/index.d.ts.map +0 -1
  246. package/dist/esm/base/controllers/grpc/common/types.d.ts.map +0 -1
  247. package/dist/esm/base/controllers/grpc/index.d.ts.map +0 -1
  248. package/dist/esm/base/controllers/index.d.ts.map +0 -1
  249. package/dist/esm/base/index.d.ts.map +0 -1
  250. package/dist/esm/base/metadata/index.d.ts.map +0 -1
  251. package/dist/esm/base/metadata/request-context.d.ts.map +0 -1
  252. package/dist/esm/base/middlewares/app-error/app-error.middleware.d.ts.map +0 -1
  253. package/dist/esm/base/middlewares/app-error/index.d.ts.map +0 -1
  254. package/dist/esm/base/middlewares/index.d.ts.map +0 -1
  255. package/dist/esm/base/middlewares/request-spy/index.d.ts.map +0 -1
  256. package/dist/esm/base/middlewares/request-spy/request-spy.middleware.d.ts.map +0 -1
  257. package/dist/esm/common/environments.d.ts.map +0 -1
  258. package/dist/esm/common/index.d.ts.map +0 -1
  259. package/dist/esm/components/api-reference/common/constants.d.ts.map +0 -1
  260. package/dist/esm/components/api-reference/common/index.d.ts.map +0 -1
  261. package/dist/esm/components/api-reference/common/keys.d.ts.map +0 -1
  262. package/dist/esm/components/api-reference/common/types.d.ts.map +0 -1
  263. package/dist/esm/components/api-reference/component.d.ts.map +0 -1
  264. package/dist/esm/components/api-reference/index.d.ts.map +0 -1
  265. package/dist/esm/components/api-reference/ui/factory.d.ts.map +0 -1
  266. package/dist/esm/components/api-reference/ui/index.d.ts.map +0 -1
  267. package/dist/esm/components/api-reference/ui/scalar.d.ts.map +0 -1
  268. package/dist/esm/components/api-reference/ui/swagger.d.ts.map +0 -1
  269. package/dist/esm/components/auth/authenticate/component.d.ts.map +0 -1
  270. package/dist/esm/components/auth/authenticate/controllers/factory.d.ts.map +0 -1
  271. package/dist/esm/components/auth/authenticate/controllers/index.d.ts.map +0 -1
  272. package/dist/esm/components/auth/authenticate/controllers/jwks/controller.d.ts.map +0 -1
  273. package/dist/esm/components/auth/authenticate/controllers/jwks/definitions.d.ts.map +0 -1
  274. package/dist/esm/components/auth/authenticate/controllers/jwks/index.d.ts.map +0 -1
  275. package/dist/esm/components/auth/authenticate/controllers/service-certs/controller.d.ts.map +0 -1
  276. package/dist/esm/components/auth/authenticate/controllers/service-certs/definitions.d.ts.map +0 -1
  277. package/dist/esm/components/auth/authenticate/controllers/service-certs/index.d.ts.map +0 -1
  278. package/dist/esm/components/auth/authenticate/index.d.ts.map +0 -1
  279. package/dist/esm/components/auth/authenticate/services/basic/index.d.ts.map +0 -1
  280. package/dist/esm/components/auth/authenticate/services/basic/service.d.ts.map +0 -1
  281. package/dist/esm/components/auth/authenticate/services/bearer/abstract.service.d.ts.map +0 -1
  282. package/dist/esm/components/auth/authenticate/services/bearer/index.d.ts.map +0 -1
  283. package/dist/esm/components/auth/authenticate/services/bearer/jwks/abstract.service.d.ts.map +0 -1
  284. package/dist/esm/components/auth/authenticate/services/bearer/jwks/index.d.ts.map +0 -1
  285. package/dist/esm/components/auth/authenticate/services/bearer/jwks/issuer.service.d.ts.map +0 -1
  286. package/dist/esm/components/auth/authenticate/services/bearer/jwks/verifier.service.d.ts.map +0 -1
  287. package/dist/esm/components/auth/authenticate/services/bearer/jws.service.d.ts.map +0 -1
  288. package/dist/esm/components/auth/authenticate/services/index.d.ts.map +0 -1
  289. package/dist/esm/components/auth/authenticate/services/jose-loader.d.ts.map +0 -1
  290. package/dist/esm/components/auth/authenticate/services/service/index.d.ts.map +0 -1
  291. package/dist/esm/components/auth/authenticate/services/service/signer.service.d.ts.map +0 -1
  292. package/dist/esm/components/auth/authenticate/services/service/verifier.service.d.ts.map +0 -1
  293. package/dist/esm/components/auth/authenticate/strategies/basic.strategy.d.ts.map +0 -1
  294. package/dist/esm/components/auth/authenticate/strategies/index.d.ts.map +0 -1
  295. package/dist/esm/components/auth/authenticate/strategies/jwks/index.d.ts.map +0 -1
  296. package/dist/esm/components/auth/authenticate/strategies/jwks/issuer.d.ts.map +0 -1
  297. package/dist/esm/components/auth/authenticate/strategies/jwks/verifier.d.ts.map +0 -1
  298. package/dist/esm/components/auth/authenticate/strategies/jws.strategy.d.ts.map +0 -1
  299. package/dist/esm/components/auth/authenticate/strategies/service.strategy.d.ts.map +0 -1
  300. package/dist/esm/components/auth/authorize/adapters/base-filtered.d.ts.map +0 -1
  301. package/dist/esm/components/auth/authorize/adapters/common/index.d.ts.map +0 -1
  302. package/dist/esm/components/auth/authorize/adapters/common/types.d.ts.map +0 -1
  303. package/dist/esm/components/auth/authorize/adapters/connector.d.ts.map +0 -1
  304. package/dist/esm/components/auth/authorize/adapters/custom-grant-expander.d.ts.map +0 -1
  305. package/dist/esm/components/auth/authorize/adapters/index.d.ts.map +0 -1
  306. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/adapter.d.ts.map +0 -1
  307. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/common/constants.d.ts.map +0 -1
  308. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/common/index.d.ts.map +0 -1
  309. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/common/types.d.ts.map +0 -1
  310. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/index.d.ts.map +0 -1
  311. package/dist/esm/components/auth/authorize/adapters/scoped-casbin/policy-edges.d.ts.map +0 -1
  312. package/dist/esm/components/auth/authorize/component.d.ts.map +0 -1
  313. package/dist/esm/components/auth/authorize/enforcers/casbin-module.d.ts.map +0 -1
  314. package/dist/esm/components/auth/authorize/enforcers/casbin.enforcer.d.ts.map +0 -1
  315. package/dist/esm/components/auth/authorize/enforcers/index.d.ts.map +0 -1
  316. package/dist/esm/components/auth/authorize/enforcers/models/index.d.ts.map +0 -1
  317. package/dist/esm/components/auth/authorize/enforcers/models/rbac-domain.model.d.ts.map +0 -1
  318. package/dist/esm/components/auth/authorize/enforcers/policy-line-codec.d.ts.map +0 -1
  319. package/dist/esm/components/auth/authorize/enforcers/user-policy-line-cache.d.ts.map +0 -1
  320. package/dist/esm/components/auth/authorize/index.d.ts.map +0 -1
  321. package/dist/esm/components/auth/authorize/role-managers/base.d.ts.map +0 -1
  322. package/dist/esm/components/auth/authorize/role-managers/domain-hierarchy.d.ts.map +0 -1
  323. package/dist/esm/components/auth/authorize/role-managers/index.d.ts.map +0 -1
  324. package/dist/esm/components/auth/authorize/role-managers/membership.d.ts.map +0 -1
  325. package/dist/esm/components/auth/authorize/role-managers/resource.d.ts.map +0 -1
  326. package/dist/esm/components/auth/index.d.ts.map +0 -1
  327. package/dist/esm/components/auth/models/entities/columns.d.ts.map +0 -1
  328. package/dist/esm/components/auth/models/entities/index.d.ts.map +0 -1
  329. package/dist/esm/components/auth/models/entities/permission.model.d.ts.map +0 -1
  330. package/dist/esm/components/auth/models/entities/policy-definition.model.d.ts.map +0 -1
  331. package/dist/esm/components/auth/models/index.d.ts.map +0 -1
  332. package/dist/esm/components/controller/grpc/common/index.d.ts.map +0 -1
  333. package/dist/esm/components/controller/grpc/common/types.d.ts.map +0 -1
  334. package/dist/esm/components/controller/grpc/grpc.component.d.ts.map +0 -1
  335. package/dist/esm/components/controller/grpc/index.d.ts.map +0 -1
  336. package/dist/esm/components/health-check/common/constants.d.ts.map +0 -1
  337. package/dist/esm/components/health-check/common/index.d.ts.map +0 -1
  338. package/dist/esm/components/health-check/common/keys.d.ts.map +0 -1
  339. package/dist/esm/components/health-check/common/rest-paths.d.ts.map +0 -1
  340. package/dist/esm/components/health-check/common/types.d.ts.map +0 -1
  341. package/dist/esm/components/health-check/component.d.ts.map +0 -1
  342. package/dist/esm/components/health-check/controller.d.ts.map +0 -1
  343. package/dist/esm/components/health-check/index.d.ts.map +0 -1
  344. package/dist/esm/components/health-check/reporter.d.ts.map +0 -1
  345. package/dist/esm/components/index.d.ts.map +0 -1
  346. package/dist/esm/components/mail/common/constants.d.ts.map +0 -1
  347. package/dist/esm/components/mail/common/errors.d.ts.map +0 -1
  348. package/dist/esm/components/mail/common/index.d.ts.map +0 -1
  349. package/dist/esm/components/mail/common/keys.d.ts.map +0 -1
  350. package/dist/esm/components/mail/common/types/index.d.ts.map +0 -1
  351. package/dist/esm/components/mail/common/types/message.d.ts.map +0 -1
  352. package/dist/esm/components/mail/common/types/options.d.ts.map +0 -1
  353. package/dist/esm/components/mail/common/types/queue.d.ts.map +0 -1
  354. package/dist/esm/components/mail/common/types/template.d.ts.map +0 -1
  355. package/dist/esm/components/mail/common/types/verification.d.ts.map +0 -1
  356. package/dist/esm/components/mail/component.d.ts.map +0 -1
  357. package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts.map +0 -1
  358. package/dist/esm/components/mail/helpers/executors/direct-executor.helper.d.ts.map +0 -1
  359. package/dist/esm/components/mail/helpers/executors/index.d.ts.map +0 -1
  360. package/dist/esm/components/mail/helpers/executors/internal-queue-executor.helper.d.ts.map +0 -1
  361. package/dist/esm/components/mail/helpers/index.d.ts.map +0 -1
  362. package/dist/esm/components/mail/helpers/transporters/amazon-ses-transporter.helper.d.ts.map +0 -1
  363. package/dist/esm/components/mail/helpers/transporters/index.d.ts.map +0 -1
  364. package/dist/esm/components/mail/helpers/transporters/mailgun-transporter.helper.d.ts.map +0 -1
  365. package/dist/esm/components/mail/helpers/transporters/nodemail-transporter.helper.d.ts.map +0 -1
  366. package/dist/esm/components/mail/index.d.ts.map +0 -1
  367. package/dist/esm/components/mail/providers/index.d.ts.map +0 -1
  368. package/dist/esm/components/mail/providers/mail-queue-executor.provider.d.ts.map +0 -1
  369. package/dist/esm/components/mail/providers/mail-transporter.provider.d.ts.map +0 -1
  370. package/dist/esm/components/mail/services/generators/index.d.ts.map +0 -1
  371. package/dist/esm/components/mail/services/generators/numeric-code.d.ts.map +0 -1
  372. package/dist/esm/components/mail/services/generators/random-token.d.ts.map +0 -1
  373. package/dist/esm/components/mail/services/generators/verification-data.d.ts.map +0 -1
  374. package/dist/esm/components/mail/services/index.d.ts.map +0 -1
  375. package/dist/esm/components/mail/services/mail.service.d.ts.map +0 -1
  376. package/dist/esm/components/mail/services/template.service.d.ts.map +0 -1
  377. package/dist/esm/components/mail/utilities/address.utility.d.ts.map +0 -1
  378. package/dist/esm/components/mail/utilities/attachment.utility.d.ts.map +0 -1
  379. package/dist/esm/components/mail/utilities/body.utility.d.ts.map +0 -1
  380. package/dist/esm/components/mail/utilities/index.d.ts.map +0 -1
  381. package/dist/esm/components/mail/utilities/mime.utility.d.ts.map +0 -1
  382. package/dist/esm/components/mail/utilities/type.utility.d.ts.map +0 -1
  383. package/dist/esm/components/mail/utilities/verification.utility.d.ts.map +0 -1
  384. package/dist/esm/components/request-tracker/component.d.ts.map +0 -1
  385. package/dist/esm/components/request-tracker/index.d.ts.map +0 -1
  386. package/dist/esm/components/socket-io/common/index.d.ts.map +0 -1
  387. package/dist/esm/components/socket-io/common/keys.d.ts.map +0 -1
  388. package/dist/esm/components/socket-io/common/types.d.ts.map +0 -1
  389. package/dist/esm/components/socket-io/component.d.ts.map +0 -1
  390. package/dist/esm/components/socket-io/handlers/bun.handler.d.ts.map +0 -1
  391. package/dist/esm/components/socket-io/handlers/index.d.ts.map +0 -1
  392. package/dist/esm/components/socket-io/index.d.ts.map +0 -1
  393. package/dist/esm/components/static-asset/common/commit-token.d.ts.map +0 -1
  394. package/dist/esm/components/static-asset/common/constants.d.ts.map +0 -1
  395. package/dist/esm/components/static-asset/common/errors.d.ts.map +0 -1
  396. package/dist/esm/components/static-asset/common/index.d.ts.map +0 -1
  397. package/dist/esm/components/static-asset/common/keys.d.ts.map +0 -1
  398. package/dist/esm/components/static-asset/common/types.d.ts.map +0 -1
  399. package/dist/esm/components/static-asset/component.d.ts.map +0 -1
  400. package/dist/esm/components/static-asset/controller/base.definition.d.ts.map +0 -1
  401. package/dist/esm/components/static-asset/controller/factory.d.ts.map +0 -1
  402. package/dist/esm/components/static-asset/controller/index.d.ts.map +0 -1
  403. package/dist/esm/components/static-asset/controller/key-scope.d.ts.map +0 -1
  404. package/dist/esm/components/static-asset/controller/meta-link.d.ts.map +0 -1
  405. package/dist/esm/components/static-asset/controller/route-options.d.ts.map +0 -1
  406. package/dist/esm/components/static-asset/index.d.ts.map +0 -1
  407. package/dist/esm/components/static-asset/ingest.d.ts.map +0 -1
  408. package/dist/esm/components/static-asset/models/base.model.d.ts.map +0 -1
  409. package/dist/esm/components/static-asset/models/index.d.ts.map +0 -1
  410. package/dist/esm/components/static-asset/repositories/base.repository.d.ts.map +0 -1
  411. package/dist/esm/components/static-asset/repositories/index.d.ts.map +0 -1
  412. package/dist/esm/components/websocket/common/index.d.ts.map +0 -1
  413. package/dist/esm/components/websocket/common/keys.d.ts.map +0 -1
  414. package/dist/esm/components/websocket/common/types.d.ts.map +0 -1
  415. package/dist/esm/components/websocket/component.d.ts.map +0 -1
  416. package/dist/esm/components/websocket/handlers/bun.handler.d.ts.map +0 -1
  417. package/dist/esm/components/websocket/handlers/index.d.ts.map +0 -1
  418. package/dist/esm/components/websocket/index.d.ts.map +0 -1
  419. package/dist/esm/connectors/index.d.ts.map +0 -1
  420. package/dist/esm/helpers/base-helper.d.ts.map +0 -1
  421. package/dist/esm/helpers/index.d.ts.map +0 -1
  422. package/dist/esm/index.d.ts.map +0 -1
  423. package/dist/esm/testing/assert-application-boots.d.ts.map +0 -1
  424. package/dist/esm/testing/index.d.ts.map +0 -1
  425. package/dist/esm/utilities/drizzle-result.utility.d.ts.map +0 -1
  426. package/dist/esm/utilities/index.d.ts.map +0 -1
  427. package/dist/esm/utilities/network.utility.d.ts.map +0 -1
@@ -2,6 +2,7 @@ import { type BaseApplication } from '../../base/applications/index.js';
2
2
  import { BaseComponent } from '@venizia/ignis-kernel';
3
3
  import { type ValueOrPromise } from '@venizia/ignis-helpers/common';
4
4
  import { type IServerOptions } from './common/index.js';
5
+ /** Starts a WebSocket server on Bun after the application starts. Requires a Redis helper at `WebSocketBindingKeys.REDIS_CONNECTION` and an authenticate handler at `AUTHENTICATE_HANDLER`; binding throws without them. */
5
6
  export declare class WebSocketComponent extends BaseComponent {
6
7
  private application;
7
8
  protected serverOptions: IServerOptions;
@@ -20,6 +20,7 @@ import { HTTP } from '@venizia/ignis-helpers/common';
20
20
  import { isRedisHelper, WebSocketDefaults, WebSocketServerHelper, } from '@venizia/ignis-helpers';
21
21
  import { WebSocketBindingKeys, DEFAULT_SERVER_OPTIONS, } from './common/index.js';
22
22
  import { WebSocketBunHandler } from './handlers/index.js';
23
+ /** Starts a WebSocket server on Bun after the application starts. Requires a Redis helper at `WebSocketBindingKeys.REDIS_CONNECTION` and an authenticate handler at `AUTHENTICATE_HANDLER`; binding throws without them. */
23
24
  let WebSocketComponent = WebSocketComponent_1 = class WebSocketComponent extends BaseComponent {
24
25
  constructor(application) {
25
26
  super({
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/websocket/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAuB,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAEL,aAA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AC;gBAE1F,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC;gBAE5D,cAAc,CAAC,MAAM,CAAC;oBACpB,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;oBACrE,SAAS,EAAE,QAAQ,CAAC,sBAAsB,EAAE;iBAC7C,CAAC,CAAC;gBAEH,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YACvD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEQ,OAAO;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAElD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,QAAQ,CAAC;gBACb,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB;gBACrD,OAAO,EAAE,0DAA0D;aACpE,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QAEpD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAEjE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;CACF,CAAA;AApMY,kBAAkB;IAI1B,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,CAAC,CAAA;;GAJ1C,kBAAkB,CAoM9B","sourcesContent":["import { type BaseApplication, type TBunServerInstance } from '@/base/applications';\nimport { BaseComponent } from '@venizia/ignis-kernel';\nimport { inject } from '@/base/metadata';\nimport { CoreBindings } from '@venizia/ignis-kernel';\nimport { Binding } from '@venizia/ignis-kernel';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport { HTTP, type ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport {\n type AbstractRedisHelper,\n isRedisHelper,\n type TWebSocketAuthenticateFn,\n type TWebSocketClientConnectedFn,\n type TWebSocketClientDisconnectedFn,\n type TWebSocketMessageHandler,\n type TWebSocketHandshakeFn,\n type TWebSocketOutboundTransformer,\n type TWebSocketValidateRoomFn,\n WebSocketDefaults,\n WebSocketServerHelper,\n} from '@venizia/ignis-helpers';\nimport {\n WebSocketBindingKeys,\n DEFAULT_SERVER_OPTIONS,\n type IResolvedBindings,\n type IServerOptions,\n} from './common';\nimport { WebSocketBunHandler } from './handlers';\n\nexport class WebSocketComponent extends BaseComponent {\n protected serverOptions: IServerOptions;\n\n constructor(\n @inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,\n ) {\n super({\n scope: WebSocketComponent.name,\n initDefault: { enable: true, container: application },\n bindings: {\n [WebSocketBindingKeys.SERVER_OPTIONS]: Binding.bind<Partial<IServerOptions>>({\n key: WebSocketBindingKeys.SERVER_OPTIONS,\n }).toValue(DEFAULT_SERVER_OPTIONS),\n\n [WebSocketBindingKeys.REDIS_CONNECTION]: Binding.bind<AbstractRedisHelper | null>({\n key: WebSocketBindingKeys.REDIS_CONNECTION,\n }).toValue(null),\n\n [WebSocketBindingKeys.AUTHENTICATE_HANDLER]: Binding.bind<TWebSocketAuthenticateFn | null>({\n key: WebSocketBindingKeys.AUTHENTICATE_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.VALIDATE_ROOM_HANDLER]: Binding.bind<TWebSocketValidateRoomFn | null>(\n {\n key: WebSocketBindingKeys.VALIDATE_ROOM_HANDLER,\n },\n ).toValue(null),\n\n [WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER]:\n Binding.bind<TWebSocketClientConnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER]:\n Binding.bind<TWebSocketClientDisconnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.MESSAGE_HANDLER]: Binding.bind<TWebSocketMessageHandler | null>({\n key: WebSocketBindingKeys.MESSAGE_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.OUTBOUND_TRANSFORMER]:\n Binding.bind<TWebSocketOutboundTransformer | null>({\n key: WebSocketBindingKeys.OUTBOUND_TRANSFORMER,\n }).toValue(null),\n\n [WebSocketBindingKeys.HANDSHAKE_HANDLER]: Binding.bind<TWebSocketHandshakeFn | null>({\n key: WebSocketBindingKeys.HANDSHAKE_HANDLER,\n }).toValue(null),\n },\n });\n }\n\n private resolveBindings(): IResolvedBindings {\n const extraServerOptions =\n this.application.get<Partial<IServerOptions>>({\n key: WebSocketBindingKeys.SERVER_OPTIONS,\n isOptional: true,\n }) ?? {};\n this.serverOptions = Object.assign({}, DEFAULT_SERVER_OPTIONS, extraServerOptions);\n\n const redisConnection = this.application.get<AbstractRedisHelper>({\n key: WebSocketBindingKeys.REDIS_CONNECTION,\n });\n if (!isRedisHelper(redisConnection)) {\n throw getError({\n message:\n '[WebSocketComponent][resolveBindings] Invalid instance of redisConnection | Please init connection with RedisSingleHelper (single), RedisClusterHelper (cluster), or RedisSentinelHelper (sentinel)!',\n });\n }\n\n const authenticateFn = this.application.get<TWebSocketAuthenticateFn>({\n key: WebSocketBindingKeys.AUTHENTICATE_HANDLER,\n });\n if (!authenticateFn) {\n throw getError({\n message: '[WebSocketComponent] Invalid authenticateFn to setup WebSocket server!',\n });\n }\n\n const validateRoomFn =\n this.application.get<TWebSocketValidateRoomFn | null>({\n key: WebSocketBindingKeys.VALIDATE_ROOM_HANDLER,\n }) ?? undefined;\n const clientConnectedFn =\n this.application.get<TWebSocketClientConnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER,\n }) ?? undefined;\n const clientDisconnectedFn =\n this.application.get<TWebSocketClientDisconnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER,\n }) ?? undefined;\n const messageHandler =\n this.application.get<TWebSocketMessageHandler | null>({\n key: WebSocketBindingKeys.MESSAGE_HANDLER,\n }) ?? undefined;\n const outboundTransformer =\n this.application.get<TWebSocketOutboundTransformer | null>({\n key: WebSocketBindingKeys.OUTBOUND_TRANSFORMER,\n }) ?? undefined;\n const handshakeFn =\n this.application.get<TWebSocketHandshakeFn | null>({\n key: WebSocketBindingKeys.HANDSHAKE_HANDLER,\n }) ?? undefined;\n\n return {\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n };\n }\n\n private registerBunHook(opts: IResolvedBindings) {\n const {\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n } = opts;\n const serverOptions = this.serverOptions;\n\n const logger = this.logger.for(this.registerBunHook.name);\n\n this.application.registerPostStartHook({\n identifier: 'websocket-initialize',\n hook: async () => {\n const serverInstance = this.application.getServerInstance<TBunServerInstance>();\n const honoServer = this.application.getServer();\n\n if (!serverInstance) {\n throw getError({\n message: '[WebSocketComponent] Bun server instance not available!',\n });\n }\n\n const wsHelper = new WebSocketServerHelper({\n identifier: serverOptions.identifier,\n path: serverOptions.path,\n defaultRooms: serverOptions.defaultRooms,\n serverOptions: serverOptions.serverOptions,\n heartbeatInterval: serverOptions.heartbeatInterval,\n heartbeatTimeout: serverOptions.heartbeatTimeout,\n server: serverInstance,\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n requireEncryption: serverOptions.requireEncryption,\n });\n await wsHelper.configure();\n\n this.application.bind({ key: WebSocketBindingKeys.WEBSOCKET_INSTANCE }).toValue(wsHelper);\n\n const wsPath = serverOptions.path ?? WebSocketDefaults.PATH;\n\n serverInstance.reload({\n fetch: WebSocketBunHandler.createFetchHandler({ wsPath, honoServer }),\n websocket: wsHelper.getBunWebSocketHandler(),\n });\n\n logger.info('WebSocket initialized for Bun runtime');\n },\n });\n }\n\n override binding(): ValueOrPromise<void> {\n const logger = this.logger.for(this.binding.name);\n\n if (!this.application) {\n throw getError({\n statusCode: HTTP.ResultCodes.RS_5.InternalServerError,\n message: '[binding] Invalid application to bind WebSocketComponent',\n });\n }\n\n logger.info('Binding WebSocket for application...');\n\n const resolved = this.resolveBindings();\n logger.debug('WebSocket Server Options: %j', this.serverOptions);\n\n this.registerBunHook(resolved);\n }\n}\n"]}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/websocket/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAuB,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAEL,aAAa,EAQb,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,4NAA4N;AAC5N,IAAa,kBAAkB,0BAA/B,MAAa,kBAAmB,SAAQ,aAAa;IAGnD,YAC8D,WAA4B;QAExF,KAAK,CAAC;YACJ,KAAK,EAAE,oBAAkB,CAAC,IAAI;YAC9B,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE;Y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AAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAElD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,QAAQ,CAAC;gBACb,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB;gBACrD,OAAO,EAAE,0DAA0D;aACpE,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QAEpD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAEjE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;CACF,CAAA;AAtMY,kBAAkB;IAI1B,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,CAAC,CAAA;;GAJ1C,kBAAkB,CAsM9B","sourcesContent":["import { type BaseApplication, type TBunServerInstance } from '@/base/applications';\nimport { BaseComponent } from '@venizia/ignis-kernel';\nimport { inject } from '@/base/metadata';\nimport { CoreBindings } from '@venizia/ignis-kernel';\nimport { Binding } from '@venizia/ignis-kernel';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport { HTTP, type ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport {\n type AbstractRedisHelper,\n isRedisHelper,\n type TWebSocketAuthenticateFn,\n type TWebSocketClientConnectedFn,\n type TWebSocketClientDisconnectedFn,\n type TWebSocketMessageHandler,\n type TWebSocketHandshakeFn,\n type TWebSocketOutboundTransformer,\n type TWebSocketValidateRoomFn,\n WebSocketDefaults,\n WebSocketServerHelper,\n} from '@venizia/ignis-helpers';\nimport {\n WebSocketBindingKeys,\n DEFAULT_SERVER_OPTIONS,\n type IResolvedBindings,\n type IServerOptions,\n} from './common';\nimport { WebSocketBunHandler } from './handlers';\n\n/** Starts a WebSocket server on Bun after the application starts. Requires a Redis helper at `WebSocketBindingKeys.REDIS_CONNECTION` and an authenticate handler at `AUTHENTICATE_HANDLER`; binding throws without them. */\nexport class WebSocketComponent extends BaseComponent {\n protected serverOptions: IServerOptions;\n\n constructor(\n @inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,\n ) {\n super({\n scope: WebSocketComponent.name,\n initDefault: { enable: true, container: application },\n bindings: {\n [WebSocketBindingKeys.SERVER_OPTIONS]: Binding.bind<Partial<IServerOptions>>({\n key: WebSocketBindingKeys.SERVER_OPTIONS,\n }).toValue(DEFAULT_SERVER_OPTIONS),\n\n [WebSocketBindingKeys.REDIS_CONNECTION]: Binding.bind<AbstractRedisHelper | null>({\n key: WebSocketBindingKeys.REDIS_CONNECTION,\n }).toValue(null),\n\n [WebSocketBindingKeys.AUTHENTICATE_HANDLER]: Binding.bind<TWebSocketAuthenticateFn | null>({\n key: WebSocketBindingKeys.AUTHENTICATE_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.VALIDATE_ROOM_HANDLER]: Binding.bind<TWebSocketValidateRoomFn | null>(\n {\n key: WebSocketBindingKeys.VALIDATE_ROOM_HANDLER,\n },\n ).toValue(null),\n\n [WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER]:\n Binding.bind<TWebSocketClientConnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER]:\n Binding.bind<TWebSocketClientDisconnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.MESSAGE_HANDLER]: Binding.bind<TWebSocketMessageHandler | null>({\n key: WebSocketBindingKeys.MESSAGE_HANDLER,\n }).toValue(null),\n\n [WebSocketBindingKeys.OUTBOUND_TRANSFORMER]:\n Binding.bind<TWebSocketOutboundTransformer | null>({\n key: WebSocketBindingKeys.OUTBOUND_TRANSFORMER,\n }).toValue(null),\n\n [WebSocketBindingKeys.HANDSHAKE_HANDLER]: Binding.bind<TWebSocketHandshakeFn | null>({\n key: WebSocketBindingKeys.HANDSHAKE_HANDLER,\n }).toValue(null),\n },\n });\n }\n\n private resolveBindings(): IResolvedBindings {\n const extraServerOptions =\n this.application.get<Partial<IServerOptions>>({\n key: WebSocketBindingKeys.SERVER_OPTIONS,\n isOptional: true,\n }) ?? {};\n this.serverOptions = Object.assign({}, DEFAULT_SERVER_OPTIONS, extraServerOptions);\n\n const redisConnection = this.application.get<AbstractRedisHelper>({\n key: WebSocketBindingKeys.REDIS_CONNECTION,\n });\n\n if (!isRedisHelper(redisConnection)) {\n throw getError({\n message:\n '[WebSocketComponent][resolveBindings] Invalid instance of redisConnection | Please init connection with RedisSingleHelper (single), RedisClusterHelper (cluster), or RedisSentinelHelper (sentinel)!',\n });\n }\n\n const authenticateFn = this.application.get<TWebSocketAuthenticateFn>({\n key: WebSocketBindingKeys.AUTHENTICATE_HANDLER,\n });\n\n if (!authenticateFn) {\n throw getError({\n message: '[WebSocketComponent] Invalid authenticateFn to setup WebSocket server!',\n });\n }\n\n const validateRoomFn =\n this.application.get<TWebSocketValidateRoomFn | null>({\n key: WebSocketBindingKeys.VALIDATE_ROOM_HANDLER,\n }) ?? undefined;\n const clientConnectedFn =\n this.application.get<TWebSocketClientConnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_CONNECTED_HANDLER,\n }) ?? undefined;\n const clientDisconnectedFn =\n this.application.get<TWebSocketClientDisconnectedFn | null>({\n key: WebSocketBindingKeys.CLIENT_DISCONNECTED_HANDLER,\n }) ?? undefined;\n const messageHandler =\n this.application.get<TWebSocketMessageHandler | null>({\n key: WebSocketBindingKeys.MESSAGE_HANDLER,\n }) ?? undefined;\n const outboundTransformer =\n this.application.get<TWebSocketOutboundTransformer | null>({\n key: WebSocketBindingKeys.OUTBOUND_TRANSFORMER,\n }) ?? undefined;\n const handshakeFn =\n this.application.get<TWebSocketHandshakeFn | null>({\n key: WebSocketBindingKeys.HANDSHAKE_HANDLER,\n }) ?? undefined;\n\n return {\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n };\n }\n\n private registerBunHook(opts: IResolvedBindings) {\n const {\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n } = opts;\n const serverOptions = this.serverOptions;\n\n const logger = this.logger.for(this.registerBunHook.name);\n\n this.application.registerPostStartHook({\n identifier: 'websocket-initialize',\n hook: async () => {\n const serverInstance = this.application.getServerInstance<TBunServerInstance>();\n const honoServer = this.application.getServer();\n\n if (!serverInstance) {\n throw getError({\n message: '[WebSocketComponent] Bun server instance not available!',\n });\n }\n\n const wsHelper = new WebSocketServerHelper({\n identifier: serverOptions.identifier,\n path: serverOptions.path,\n defaultRooms: serverOptions.defaultRooms,\n serverOptions: serverOptions.serverOptions,\n heartbeatInterval: serverOptions.heartbeatInterval,\n heartbeatTimeout: serverOptions.heartbeatTimeout,\n server: serverInstance,\n redisConnection,\n authenticateFn,\n validateRoomFn,\n clientConnectedFn,\n clientDisconnectedFn,\n messageHandler,\n outboundTransformer,\n handshakeFn,\n requireEncryption: serverOptions.requireEncryption,\n });\n await wsHelper.configure();\n\n this.application.bind({ key: WebSocketBindingKeys.WEBSOCKET_INSTANCE }).toValue(wsHelper);\n\n const wsPath = serverOptions.path ?? WebSocketDefaults.PATH;\n\n serverInstance.reload({\n fetch: WebSocketBunHandler.createFetchHandler({ wsPath, honoServer }),\n websocket: wsHelper.getBunWebSocketHandler(),\n });\n\n logger.info('WebSocket initialized for Bun runtime');\n },\n });\n }\n\n override binding(): ValueOrPromise<void> {\n const logger = this.logger.for(this.binding.name);\n\n if (!this.application) {\n throw getError({\n statusCode: HTTP.ResultCodes.RS_5.InternalServerError,\n message: '[binding] Invalid application to bind WebSocketComponent',\n });\n }\n\n logger.info('Binding WebSocket for application...');\n\n const resolved = this.resolveBindings();\n logger.debug('WebSocket Server Options: %j', this.serverOptions);\n\n this.registerBunHook(resolved);\n }\n}\n"]}
@@ -3,38 +3,55 @@ import { type TServerBootStep } from '../base/applications/index.js';
3
3
  import type { AnyType, TClass } from '@venizia/ignis-helpers/common';
4
4
  /** A class (matched against the instance's constructor) or a string (matched against the binding key or the class name). */
5
5
  export type TBootProbeTarget = TClass<AnyType> | string;
6
+ /** Options of `ApplicationBootAssertion.assert`; each field narrows or relaxes what the boot probe runs and verifies. */
6
7
  export interface IAssertApplicationBootsOptions {
7
8
  /**
8
9
  * Datasources whose real `configure()` runs. Every other datasource is bound and resolved but not
9
10
  * configured, so no connection is made. Close a kept one with `await application.stop()`.
11
+ *
12
+ * @default []
10
13
  */
11
14
  keepDataSources?: TBootProbeTarget[];
12
15
  /**
13
16
  * Components whose `configure()` (and so their `binding()`) is skipped, for the few that need
14
- * infrastructure. Components run by default. What a skipped component would have registered is
15
- * not registered.
17
+ * infrastructure. What a skipped component would have registered is not registered.
18
+ *
19
+ * @default []
16
20
  */
17
21
  skipComponents?: TBootProbeTarget[];
18
22
  /**
19
- * Boot steps that do not run. Default: `hydrateSecrets` and `wireSecretRotatables`, so a remote
20
- * secrets provider is never contacted. A value REPLACES the default; an unknown name rejects
21
- * before anything boots.
23
+ * Boot steps that do not run, so a remote secrets provider is never contacted. A value REPLACES
24
+ * the default; an unknown name rejects before anything boots.
25
+ *
26
+ * @default [ServerBootSteps.HYDRATE_SECRETS, ServerBootSteps.WIRE_SECRET_ROTATABLES]
22
27
  */
23
28
  skipSteps?: TServerBootStep[];
24
29
  /**
25
- * Default `true`: after boot, resolves every service and repository with the shared core of
30
+ * After boot, resolves every service and repository with the shared core of
26
31
  * `@venizia/ignis-inversion`, so an injection nobody references at boot still fails. An explicit value
27
32
  * wins over the application's own `bootChecks`, whose boot step is off for the run.
33
+ *
34
+ * @default true
28
35
  */
29
36
  verifyBindings?: boolean;
30
37
  /**
31
38
  * Services or repositories the verification leaves unresolved, for one whose constructor needs
32
39
  * infrastructure. A class (exact), a class name or a binding key. A name that matches nothing rejects.
40
+ *
41
+ * @default []
33
42
  */
34
43
  skipBindings?: TBootProbeTarget[];
35
- /** Default `false`: an application that registered no controller proves nothing, for example when the artifact index was empty. */
44
+ /**
45
+ * Whether an application that registered no controller passes. Off, it fails: it proves nothing, for example when the artifact index was empty.
46
+ *
47
+ * @default false
48
+ */
36
49
  allowNoControllers?: boolean;
37
- /** Default `true`: this helper's own check that no method and path is mounted twice. IGNIS boot does not detect that. */
50
+ /**
51
+ * This helper's own check that no method and path is mounted twice. IGNIS boot does not detect that.
52
+ *
53
+ * @default true
54
+ */
38
55
  routes?: boolean;
39
56
  }
40
57
  /**
@@ -51,6 +68,20 @@ export interface IAssertApplicationBootsOptions {
51
68
  *
52
69
  * It wraps `registerDynamicBindings` and `getBootSequence` on THIS instance only (an application's
53
70
  * own override of either still runs) and restores them whatever happens.
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * import { ApplicationBootAssertion } from '@venizia/ignis/testing';
75
+ * import { test } from 'bun:test';
76
+ * import { Application } from './application';
77
+ *
78
+ * test('the application boots offline', async () => {
79
+ * await ApplicationBootAssertion.assert({
80
+ * application: () => new Application({ scope: 'Application', config: { host: '127.0.0.1', port: 0, path: { base: '/', isStrict: true } } }),
81
+ * options: { skipComponents: ['MailComponent'], allowNoControllers: true },
82
+ * });
83
+ * });
84
+ * ```
54
85
  */
55
86
  export declare class ApplicationBootAssertion {
56
87
  static assert<Application extends BaseApplication>(opts: {
@@ -108,6 +108,20 @@ const assertNoDuplicateRoutes = (opts) => {
108
108
  *
109
109
  * It wraps `registerDynamicBindings` and `getBootSequence` on THIS instance only (an application's
110
110
  * own override of either still runs) and restores them whatever happens.
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * import { ApplicationBootAssertion } from '@venizia/ignis/testing';
115
+ * import { test } from 'bun:test';
116
+ * import { Application } from './application';
117
+ *
118
+ * test('the application boots offline', async () => {
119
+ * await ApplicationBootAssertion.assert({
120
+ * application: () => new Application({ scope: 'Application', config: { host: '127.0.0.1', port: 0, path: { base: '/', isStrict: true } } }),
121
+ * options: { skipComponents: ['MailComponent'], allowNoControllers: true },
122
+ * });
123
+ * });
124
+ * ```
111
125
  */
112
126
  export class ApplicationBootAssertion {
113
127
  static async assert(opts) {
@@ -1 +1 @@
1
- {"version":3,"file":"assert-application-boots.js","sourceRoot":"","sources":["../../../src/testing/assert-application-boots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAwB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAGL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AA8C/B,8FAA8F;AAC9F,MAAM,eAAe,GAAG,CAAC,yBAAyB,EAAE,iBAAiB,CAAU,CAAC;AAEhF,MAAM,qBAAqB,GAAsB;IAC/C,eAAe,CAAC,eAAe;IAC/B,eAAe,CAAC,sBAAsB;CACvC,CAAC;AAEF,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAU,CAAC;AAiBjD,MAAM,aAAa,GAAG,CAAC,IAItB,EAAW,EAAE;IACZ,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,SAAS,GAAuB,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC;IAElE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAC7B,OAAO,MAAM,KAAK,QAAQ;QACxB,CAAC,CAAC,MAAM,KAAK,O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AiB,CAAC,UAAU,CAAC;oBACrE,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,gBAAgB;iBACxB,CAAC,CAAC;YACL,CAAC;YAED,IACE,CAAC,kBAAkB;gBACnB,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,iBAAiB,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,EACpE,CAAC;gBACD,IAAI,CACF,iNAAiN,CAClN,CAAC;YACJ,CAAC;YAED,IAAI,MAAM,EAAE,CAAC;gBACX,uBAAuB,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;YACnD,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,CAAC,MAAM;qBACV,GAAG,CAAC,iCAAiC,CAAC;qBACtC,IAAI,CACH,oCAAoC,OAAO,oDAAoD,OAAO,oEAAoE,CAC3K,CAAC;YACN,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;gBACtC,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,CAAC;YAED,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;gBACrC,OAAO,OAAO,CAAC,UAAU,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,UAAU,GAAG,kBAAkB,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import type { BaseApplication } from '@/base/applications';\nimport { ServerBootSteps, type TServerBootStep } from '@/base/applications';\nimport type { AnyType, TClass } from '@venizia/ignis-helpers/common';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport { BindingVerifier } from '@venizia/ignis-inversion';\nimport {\n type AbstractRestController,\n type Binding,\n BindingNamespaces,\n BindingValueTypes,\n ControllerTransports,\n CoreBindings,\n MetadataRegistry,\n} from '@venizia/ignis-kernel';\n\n/** A class (matched against the instance's constructor) or a string (matched against the binding key or the class name). */\nexport type TBootProbeTarget = TClass<AnyType> | string;\n\nexport interface IAssertApplicationBootsOptions {\n /**\n * Datasources whose real `configure()` runs. Every other datasource is bound and resolved but not\n * configured, so no connection is made. Close a kept one with `await application.stop()`.\n */\n keepDataSources?: TBootProbeTarget[];\n\n /**\n * Components whose `configure()` (and so their `binding()`) is skipped, for the few that need\n * infrastructure. Components run by default. What a skipped component would have registered is\n * not registered.\n */\n skipComponents?: TBootProbeTarget[];\n\n /**\n * Boot steps that do not run. Default: `hydrateSecrets` and `wireSecretRotatables`, so a remote\n * secrets provider is never contacted. A value REPLACES the default; an unknown name rejects\n * before anything boots.\n */\n skipSteps?: TServerBootStep[];\n\n /**\n * Default `true`: after boot, resolves every service and repository with the shared core of\n * `@venizia/ignis-inversion`, so an injection nobody references at boot still fails. An explicit value\n * wins over the application's own `bootChecks`, whose boot step is off for the run.\n */\n verifyBindings?: boolean;\n\n /**\n * Services or repositories the verification leaves unresolved, for one whose constructor needs\n * infrastructure. A class (exact), a class name or a binding key. A name that matches nothing rejects.\n */\n skipBindings?: TBootProbeTarget[];\n\n /** Default `false`: an application that registered no controller proves nothing, for example when the artifact index was empty. */\n allowNoControllers?: boolean;\n\n /** Default `true`: this helper's own check that no method and path is mounted twice. IGNIS boot does not detect that. */\n routes?: boolean;\n}\n\n/** The boot sequence is the contract; these two are what the helper wraps on one instance. */\nconst WRAPPED_METHODS = ['registerDynamicBindings', 'getBootSequence'] as const;\n\nconst DEFAULT_SKIPPED_STEPS: TServerBootStep[] = [\n ServerBootSteps.HYDRATE_SECRETS,\n ServerBootSteps.WIRE_SECRET_ROTATABLES,\n];\n\n/** Methods a route entry may carry that are middleware, not a mounted handler. */\nconst NON_ROUTE_METHOD = 'ALL';\n\nconst bootedApplications = new WeakSet<object>();\n\ninterface IProbeBinding {\n key: string;\n}\n\ninterface IDynamicBindingsOptions {\n namespace: string;\n onBeforeConfigure?: (opts: { binding: Binding<AnyType> }) => Promise<void>;\n onAfterConfigure?: (opts: { binding: Binding<AnyType>; instance: AnyType }) => Promise<void>;\n}\n\n/** What the helper replaced, so every path puts it back. */\ninterface IPatch {\n restore: () => void;\n}\n\nconst matchesTarget = (opts: {\n targets: TBootProbeTarget[];\n binding: IProbeBinding;\n instance: AnyType;\n}): boolean => {\n const { targets, binding, instance } = opts;\n const className: string | undefined = instance?.constructor?.name;\n\n return targets.some((target) =>\n typeof target === 'string'\n ? target === binding.key || target === className\n : instance?.constructor === target,\n );\n};\n\nconst fail = (message: string): never => {\n throw getError({ message: `[ApplicationBootAssertion.assert] ${message}` });\n};\n\n/** Replaces `object[name]` and returns the way back, even when `name` was inherited. */\nconst patchProperty = (opts: { object: AnyType; name: string; value: unknown }): IPatch => {\n const { object, name, value } = opts;\n const descriptor = Object.getOwnPropertyDescriptor(object, name);\n\n Object.defineProperty(object, name, { value, configurable: true, writable: true });\n\n return {\n restore: () => {\n if (descriptor) {\n Object.defineProperty(object, name, descriptor);\n return;\n }\n\n delete object[name];\n },\n };\n};\n\nconst normalizePath = (path: string): string => {\n const withParams = path.replace(/:[A-Za-z0-9_]+/g, ':param').replace(/\\/{2,}/g, '/');\n return withParams.length > 1 ? withParams.replace(/\\/$/, '') : withParams;\n};\n\n/** The helper's own check: IGNIS mounts a method and path twice without complaint, and the first one wins. */\nconst assertNoDuplicateRoutes = (opts: { application: BaseApplication }): void => {\n const { application } = opts;\n // signature -> controller key -> how many times that controller declares it\n const mounted = new Map<string, Map<string, number>>();\n const record = (signature: string, key: string, declarations: number): void => {\n const owners = mounted.get(signature) ?? new Map<string, number>();\n owners.set(key, Math.max(owners.get(key) ?? 0, declarations));\n mounted.set(signature, owners);\n };\n\n for (const binding of application.findByTag<AbstractRestController>({\n tag: BindingNamespaces.CONTROLLER,\n })) {\n const target = binding.getBindingMeta({ type: BindingValueTypes.CLASS });\n const metadata = target\n ? MetadataRegistry.getInstance().getControllerMetadata({ target })\n : undefined;\n\n if (!metadata?.path || metadata.transport === ControllerTransports.GRPC) {\n continue;\n }\n\n const instance = application.get<AbstractRestController>({\n key: binding.key,\n isOptional: true,\n });\n // Hono's `routes` has one entry PER HANDLER (a validator, an authenticate and the handler of one route are three\n // entries with the same method and path), so an entry is not a declaration: a controller counts once per signature.\n for (const route of instance?.getRouter().routes ?? []) {\n if (route.method === NON_ROUTE_METHOD) {\n continue;\n }\n\n record(`${route.method} ${normalizePath(`${metadata.path}/${route.path}`)}`, binding.key, 1);\n }\n\n // What the router cannot show: one controller declaring a method and path twice. Decorated routes are one\n // metadata entry per declaration, so those are counted there.\n const declared = new Map<string, number>();\n for (const route of MetadataRegistry.getInstance()\n .getRoutes({ target: (target as TClass<AnyType>).prototype })\n ?.values() ?? []) {\n const signature = `${String(route.method).toUpperCase()} ${normalizePath(`${metadata.path}/${route.path}`)}`;\n declared.set(signature, (declared.get(signature) ?? 0) + 1);\n }\n for (const [signature, declarations] of declared) {\n record(signature, binding.key, declarations);\n }\n }\n\n const duplicates = [...mounted.entries()].filter(\n ([, owners]) =>\n owners.size > 1 || [...owners.values()].some((declarations) => declarations > 1),\n );\n if (duplicates.length === 0) {\n return;\n }\n\n const lines = duplicates.map(\n ([signature, owners]) =>\n `${signature} | controllers: ${[...owners]\n .map(([key, declarations]) =>\n declarations > 1 ? `${key} (declared ${declarations} times)` : key,\n )\n .join(', ')}`,\n );\n fail(\n `${duplicates.length} route(s) are mounted more than once, and only the first one answers | ${lines.join(' ; ')} | This is the helper's own check (IGNIS boot does not detect it); pass { routes: false } to turn it off`,\n );\n};\n\n/**\n * Proves an IGNIS application boots, without a datasource connection, a socket or a secrets provider:\n * it runs the application's own boot sequence (`init()` then `initialize()`) and never calls `start()`,\n * so no socket is opened and no post-start hook runs.\n *\n * Datasources are bound and resolved but not configured, unless named in `keepDataSources`; the\n * secrets steps are skipped; every other step and every component runs as in a real boot. A component\n * that opens Redis, Kafka or S3 in `binding()` therefore runs for real: name it in `skipComponents`.\n * When the boot fails inside a component, one warning names it; the rejection is still the original error. When the\n * boot fails, the rejection is the original error. The application stays booted and is returned;\n * a failed boot leaves a half-booted instance, so build a new one rather than reuse it.\n *\n * It wraps `registerDynamicBindings` and `getBootSequence` on THIS instance only (an application's\n * own override of either still runs) and restores them whatever happens.\n */\nexport class ApplicationBootAssertion {\n static async assert<Application extends BaseApplication>(opts: {\n application: Application | (() => Application | Promise<Application>);\n options?: IAssertApplicationBootsOptions;\n }): Promise<Application> {\n const { application, options = {} } = opts;\n const {\n keepDataSources = [],\n skipComponents = [],\n skipSteps = DEFAULT_SKIPPED_STEPS,\n verifyBindings = true,\n skipBindings = [],\n allowNoControllers = false,\n routes = true,\n } = options;\n\n for (const step of skipSteps) {\n if (!ServerBootSteps.isValid(step)) {\n fail(\n `Unknown boot step in skipSteps: '${String(step)}' | Expected one of: ${[...ServerBootSteps.SCHEME_SET].join(', ')}`,\n );\n }\n }\n\n let target: Application;\n if (typeof application === 'function') {\n const built = await application();\n target = built;\n } else {\n target = application;\n }\n\n if (\n bootedApplications.has(target) ||\n Object.keys(target['registeredBindings'] ?? {}).length > 0\n ) {\n fail(\n `This application instance was already booted | A failed or finished boot leaves registrations behind, so build a new instance (pass a factory) for each call`,\n );\n }\n bootedApplications.add(target);\n\n for (const name of WRAPPED_METHODS) {\n if (typeof target[name] !== 'function') {\n fail(\n `The kernel method '${name}' is missing on this application | The helper cannot keep a boot offline without it, so it refuses to boot`,\n );\n }\n }\n\n const skippedSteps = new Set<string>(skipSteps);\n const patches: IPatch[] = [];\n let sweepsSeen = 0;\n // The components whose `configure()` is running, innermost last: when the boot rejects, the last one is where it failed.\n const configuringComponents: string[] = [];\n\n const neutralise = async (entry: {\n namespace: string;\n binding: Binding<AnyType>;\n }): Promise<void> => {\n const { namespace, binding } = entry;\n const isDataSource = namespace === BindingNamespaces.DATASOURCE;\n const isComponent = namespace === BindingNamespaces.COMPONENT;\n if (!isDataSource && !isComponent) {\n return;\n }\n\n const instance = target.get<AnyType>({ key: binding.key, isOptional: false });\n if (typeof instance?.configure !== 'function') {\n return;\n }\n\n const shouldRun = isDataSource\n ? matchesTarget({ targets: keepDataSources, binding, instance })\n : !matchesTarget({ targets: skipComponents, binding, instance });\n if (shouldRun) {\n return;\n }\n\n patches.push(patchProperty({ object: instance, name: 'configure', value: async () => {} }));\n };\n\n const originalRegisterDynamicBindings = target['registerDynamicBindings'] as unknown as (\n opts: IDynamicBindingsOptions,\n ) => Promise<void>;\n const originalGetBootSequence = target['getBootSequence'] as unknown as () => Array<{\n name: string;\n }>;\n\n const wrappedRegister = async (sweepOptions: IDynamicBindingsOptions): Promise<void> => {\n sweepsSeen += 1;\n const userBefore = sweepOptions.onBeforeConfigure;\n const userAfter = sweepOptions.onAfterConfigure;\n\n return originalRegisterDynamicBindings.call(target, {\n ...sweepOptions,\n onBeforeConfigure: async ({ binding }) => {\n await neutralise({ namespace: sweepOptions.namespace, binding });\n if (sweepOptions.namespace === BindingNamespaces.COMPONENT) {\n const instance = target.get<AnyType>({ key: binding.key, isOptional: true });\n configuringComponents.push(String(instance?.constructor?.name ?? binding.key));\n }\n await userBefore?.({ binding });\n },\n onAfterConfigure: async ({ binding, instance }) => {\n if (sweepOptions.namespace === BindingNamespaces.COMPONENT) {\n configuringComponents.pop();\n }\n await userAfter?.({ binding, instance });\n },\n });\n };\n\n patches.push(\n patchProperty({ object: target, name: 'registerDynamicBindings', value: wrappedRegister }),\n );\n patches.push(\n patchProperty({\n object: target,\n name: 'getBootSequence',\n value: () =>\n originalGetBootSequence.call(target).filter((step) => !skippedSteps.has(step.name)),\n }),\n );\n\n if ((target['registerDynamicBindings'] as unknown) !== wrappedRegister) {\n patches.forEach((patch) => patch.restore());\n fail(\n `The wrap of 'registerDynamicBindings' did not take effect | Refusing to boot against real infrastructure`,\n );\n }\n\n const configs = target['configs'];\n const originalBootChecks = configs.bootChecks;\n const originalBinding = originalBootChecks?.binding;\n configs.bootChecks = {\n ...originalBootChecks,\n binding: {\n allowManual: originalBinding?.allowManual ?? true,\n allowOverride: originalBinding?.allowOverride ?? true,\n doVerify: false,\n },\n };\n\n try {\n if (!target.isBound({ key: CoreBindings.APPLICATION_INSTANCE })) {\n target.init();\n }\n\n await target.initialize();\n\n const sweepsExpected = [\n ServerBootSteps.REGISTER_DATA_SOURCES,\n ServerBootSteps.REGISTER_COMPONENTS,\n ServerBootSteps.REGISTER_CONTRIBUTED_DATA_SOURCES,\n ].some((step) => !skippedSteps.has(step));\n if (sweepsExpected && sweepsSeen === 0) {\n fail(\n `The boot never went through 'registerDynamicBindings' | The wrap did not take effect, so datasources may have been configured`,\n );\n }\n\n if (verifyBindings) {\n BindingVerifier.assertResolve({\n container: target,\n namespaces: [BindingNamespaces.SERVICE, BindingNamespaces.REPOSITORY],\n skip: skipBindings,\n scope: 'verifyBindings',\n });\n }\n\n if (\n !allowNoControllers &&\n target.findByTag({ tag: BindingNamespaces.CONTROLLER }).length === 0\n ) {\n fail(\n `The application registered no controller | A boot that registers nothing proves nothing: check the artifact index (for example the AutoArtifacts plugin under 'bun test'), or pass { allowNoControllers: true }`,\n );\n }\n\n if (routes) {\n assertNoDuplicateRoutes({ application: target });\n }\n\n return target;\n } catch (error) {\n const failing = configuringComponents.at(-1);\n if (failing) {\n target.logger\n .for('ApplicationBootAssertion.assert')\n .warn(\n `The boot failed inside component ${failing} | If it needs infrastructure, skipComponents: ['${failing}'] skips it, and skipBindings lists the services that depend on it`,\n );\n }\n\n throw error;\n } finally {\n for (const patch of patches.reverse()) {\n patch.restore();\n }\n\n if (originalBootChecks === undefined) {\n delete configs.bootChecks;\n } else {\n configs.bootChecks = originalBootChecks;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"assert-application-boots.js","sourceRoot":"","sources":["../../../src/testing/assert-application-boots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EA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,CAAC,CAAC;YACnD,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAE7C,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,CAAC,MAAM;qBACV,GAAG,CAAC,iCAAiC,CAAC;qBACtC,IAAI,CACH,oCAAoC,OAAO,oDAAoD,OAAO,oEAAoE,CAC3K,CAAC;YACN,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;gBACtC,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,CAAC;YAED,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;gBACrC,OAAO,OAAO,CAAC,UAAU,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,UAAU,GAAG,kBAAkB,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import type { BaseApplication } from '@/base/applications';\nimport { ServerBootSteps, type TServerBootStep } from '@/base/applications';\nimport type { AnyType, TClass } from '@venizia/ignis-helpers/common';\nimport { getError } from '@venizia/ignis-helpers/core';\nimport { BindingVerifier } from '@venizia/ignis-inversion';\nimport {\n type AbstractRestController,\n type Binding,\n BindingNamespaces,\n BindingValueTypes,\n ControllerTransports,\n CoreBindings,\n MetadataRegistry,\n} from '@venizia/ignis-kernel';\n\n/** A class (matched against the instance's constructor) or a string (matched against the binding key or the class name). */\nexport type TBootProbeTarget = TClass<AnyType> | string;\n\n/** Options of `ApplicationBootAssertion.assert`; each field narrows or relaxes what the boot probe runs and verifies. */\nexport interface IAssertApplicationBootsOptions {\n /**\n * Datasources whose real `configure()` runs. Every other datasource is bound and resolved but not\n * configured, so no connection is made. Close a kept one with `await application.stop()`.\n *\n * @default []\n */\n keepDataSources?: TBootProbeTarget[];\n\n /**\n * Components whose `configure()` (and so their `binding()`) is skipped, for the few that need\n * infrastructure. What a skipped component would have registered is not registered.\n *\n * @default []\n */\n skipComponents?: TBootProbeTarget[];\n\n /**\n * Boot steps that do not run, so a remote secrets provider is never contacted. A value REPLACES\n * the default; an unknown name rejects before anything boots.\n *\n * @default [ServerBootSteps.HYDRATE_SECRETS, ServerBootSteps.WIRE_SECRET_ROTATABLES]\n */\n skipSteps?: TServerBootStep[];\n\n /**\n * After boot, resolves every service and repository with the shared core of\n * `@venizia/ignis-inversion`, so an injection nobody references at boot still fails. An explicit value\n * wins over the application's own `bootChecks`, whose boot step is off for the run.\n *\n * @default true\n */\n verifyBindings?: boolean;\n\n /**\n * Services or repositories the verification leaves unresolved, for one whose constructor needs\n * infrastructure. A class (exact), a class name or a binding key. A name that matches nothing rejects.\n *\n * @default []\n */\n skipBindings?: TBootProbeTarget[];\n\n /**\n * Whether an application that registered no controller passes. Off, it fails: it proves nothing, for example when the artifact index was empty.\n *\n * @default false\n */\n allowNoControllers?: boolean;\n\n /**\n * This helper's own check that no method and path is mounted twice. IGNIS boot does not detect that.\n *\n * @default true\n */\n routes?: boolean;\n}\n\n/** The boot sequence is the contract; these two are what the helper wraps on one instance. */\nconst WRAPPED_METHODS = ['registerDynamicBindings', 'getBootSequence'] as const;\n\nconst DEFAULT_SKIPPED_STEPS: TServerBootStep[] = [\n ServerBootSteps.HYDRATE_SECRETS,\n ServerBootSteps.WIRE_SECRET_ROTATABLES,\n];\n\n/** Methods a route entry may carry that are middleware, not a mounted handler. */\nconst NON_ROUTE_METHOD = 'ALL';\n\nconst bootedApplications = new WeakSet<object>();\n\ninterface IProbeBinding {\n key: string;\n}\n\ninterface IDynamicBindingsOptions {\n namespace: string;\n onBeforeConfigure?: (opts: { binding: Binding<AnyType> }) => Promise<void>;\n onAfterConfigure?: (opts: { binding: Binding<AnyType>; instance: AnyType }) => Promise<void>;\n}\n\n/** What the helper replaced, so every path puts it back. */\ninterface IPatch {\n restore: () => void;\n}\n\nconst matchesTarget = (opts: {\n targets: TBootProbeTarget[];\n binding: IProbeBinding;\n instance: AnyType;\n}): boolean => {\n const { targets, binding, instance } = opts;\n const className: string | undefined = instance?.constructor?.name;\n\n return targets.some((target) =>\n typeof target === 'string'\n ? target === binding.key || target === className\n : instance?.constructor === target,\n );\n};\n\nconst fail = (message: string): never => {\n throw getError({ message: `[ApplicationBootAssertion.assert] ${message}` });\n};\n\n/** Replaces `object[name]` and returns the way back, even when `name` was inherited. */\nconst patchProperty = (opts: { object: AnyType; name: string; value: unknown }): IPatch => {\n const { object, name, value } = opts;\n const descriptor = Object.getOwnPropertyDescriptor(object, name);\n\n Object.defineProperty(object, name, { value, configurable: true, writable: true });\n\n return {\n restore: () => {\n if (descriptor) {\n Object.defineProperty(object, name, descriptor);\n\n return;\n }\n\n delete object[name];\n },\n };\n};\n\nconst normalizePath = (path: string): string => {\n const withParams = path.replace(/:[A-Za-z0-9_]+/g, ':param').replace(/\\/{2,}/g, '/');\n\n return withParams.length > 1 ? withParams.replace(/\\/$/, '') : withParams;\n};\n\n/** The helper's own check: IGNIS mounts a method and path twice without complaint, and the first one wins. */\nconst assertNoDuplicateRoutes = (opts: { application: BaseApplication }): void => {\n const { application } = opts;\n // signature -> controller key -> how many times that controller declares it\n const mounted = new Map<string, Map<string, number>>();\n\n const record = (signature: string, key: string, declarations: number): void => {\n const owners = mounted.get(signature) ?? new Map<string, number>();\n owners.set(key, Math.max(owners.get(key) ?? 0, declarations));\n mounted.set(signature, owners);\n };\n\n for (const binding of application.findByTag<AbstractRestController>({\n tag: BindingNamespaces.CONTROLLER,\n })) {\n const target = binding.getBindingMeta({ type: BindingValueTypes.CLASS });\n const metadata = target\n ? MetadataRegistry.getInstance().getControllerMetadata({ target })\n : undefined;\n\n if (!metadata?.path || metadata.transport === ControllerTransports.GRPC) {\n continue;\n }\n\n const instance = application.get<AbstractRestController>({\n key: binding.key,\n isOptional: true,\n });\n\n // Hono's `routes` has one entry PER HANDLER (a validator, an authenticate and the handler of one route are three\n // entries with the same method and path), so an entry is not a declaration: a controller counts once per signature.\n for (const route of instance?.getRouter().routes ?? []) {\n if (route.method === NON_ROUTE_METHOD) {\n continue;\n }\n\n record(`${route.method} ${normalizePath(`${metadata.path}/${route.path}`)}`, binding.key, 1);\n }\n\n // What the router cannot show: one controller declaring a method and path twice. Decorated routes are one\n // metadata entry per declaration, so those are counted there.\n const declared = new Map<string, number>();\n\n for (const route of MetadataRegistry.getInstance()\n .getRoutes({ target: (target as TClass<AnyType>).prototype })\n ?.values() ?? []) {\n const signature = `${String(route.method).toUpperCase()} ${normalizePath(`${metadata.path}/${route.path}`)}`;\n declared.set(signature, (declared.get(signature) ?? 0) + 1);\n }\n\n for (const [signature, declarations] of declared) {\n record(signature, binding.key, declarations);\n }\n }\n\n const duplicates = [...mounted.entries()].filter(\n ([, owners]) =>\n owners.size > 1 || [...owners.values()].some((declarations) => declarations > 1),\n );\n\n if (duplicates.length === 0) {\n return;\n }\n\n const lines = duplicates.map(\n ([signature, owners]) =>\n `${signature} | controllers: ${[...owners]\n .map(([key, declarations]) =>\n declarations > 1 ? `${key} (declared ${declarations} times)` : key,\n )\n .join(', ')}`,\n );\n fail(\n `${duplicates.length} route(s) are mounted more than once, and only the first one answers | ${lines.join(' ; ')} | This is the helper's own check (IGNIS boot does not detect it); pass { routes: false } to turn it off`,\n );\n};\n\n/**\n * Proves an IGNIS application boots, without a datasource connection, a socket or a secrets provider:\n * it runs the application's own boot sequence (`init()` then `initialize()`) and never calls `start()`,\n * so no socket is opened and no post-start hook runs.\n *\n * Datasources are bound and resolved but not configured, unless named in `keepDataSources`; the\n * secrets steps are skipped; every other step and every component runs as in a real boot. A component\n * that opens Redis, Kafka or S3 in `binding()` therefore runs for real: name it in `skipComponents`.\n * When the boot fails inside a component, one warning names it; the rejection is still the original error. When the\n * boot fails, the rejection is the original error. The application stays booted and is returned;\n * a failed boot leaves a half-booted instance, so build a new one rather than reuse it.\n *\n * It wraps `registerDynamicBindings` and `getBootSequence` on THIS instance only (an application's\n * own override of either still runs) and restores them whatever happens.\n *\n * @example\n * ```typescript\n * import { ApplicationBootAssertion } from '@venizia/ignis/testing';\n * import { test } from 'bun:test';\n * import { Application } from './application';\n *\n * test('the application boots offline', async () => {\n * await ApplicationBootAssertion.assert({\n * application: () => new Application({ scope: 'Application', config: { host: '127.0.0.1', port: 0, path: { base: '/', isStrict: true } } }),\n * options: { skipComponents: ['MailComponent'], allowNoControllers: true },\n * });\n * });\n * ```\n */\nexport class ApplicationBootAssertion {\n static async assert<Application extends BaseApplication>(opts: {\n application: Application | (() => Application | Promise<Application>);\n options?: IAssertApplicationBootsOptions;\n }): Promise<Application> {\n const { application, options = {} } = opts;\n const {\n keepDataSources = [],\n skipComponents = [],\n skipSteps = DEFAULT_SKIPPED_STEPS,\n verifyBindings = true,\n skipBindings = [],\n allowNoControllers = false,\n routes = true,\n } = options;\n\n for (const step of skipSteps) {\n if (!ServerBootSteps.isValid(step)) {\n fail(\n `Unknown boot step in skipSteps: '${String(step)}' | Expected one of: ${[...ServerBootSteps.SCHEME_SET].join(', ')}`,\n );\n }\n }\n\n let target: Application;\n\n if (typeof application === 'function') {\n const built = await application();\n target = built;\n } else {\n target = application;\n }\n\n if (\n bootedApplications.has(target) ||\n Object.keys(target['registeredBindings'] ?? {}).length > 0\n ) {\n fail(\n `This application instance was already booted | A failed or finished boot leaves registrations behind, so build a new instance (pass a factory) for each call`,\n );\n }\n\n bootedApplications.add(target);\n\n for (const name of WRAPPED_METHODS) {\n if (typeof target[name] !== 'function') {\n fail(\n `The kernel method '${name}' is missing on this application | The helper cannot keep a boot offline without it, so it refuses to boot`,\n );\n }\n }\n\n const skippedSteps = new Set<string>(skipSteps);\n const patches: IPatch[] = [];\n let sweepsSeen = 0;\n // The components whose `configure()` is running, innermost last: when the boot rejects, the last one is where it failed.\n const configuringComponents: string[] = [];\n\n const neutralise = async (entry: {\n namespace: string;\n binding: Binding<AnyType>;\n }): Promise<void> => {\n const { namespace, binding } = entry;\n const isDataSource = namespace === BindingNamespaces.DATASOURCE;\n const isComponent = namespace === BindingNamespaces.COMPONENT;\n\n if (!isDataSource && !isComponent) {\n return;\n }\n\n const instance = target.get<AnyType>({ key: binding.key, isOptional: false });\n\n if (typeof instance?.configure !== 'function') {\n return;\n }\n\n const shouldRun = isDataSource\n ? matchesTarget({ targets: keepDataSources, binding, instance })\n : !matchesTarget({ targets: skipComponents, binding, instance });\n\n if (shouldRun) {\n return;\n }\n\n patches.push(patchProperty({ object: instance, name: 'configure', value: async () => {} }));\n };\n\n const originalRegisterDynamicBindings = target['registerDynamicBindings'] as unknown as (\n opts: IDynamicBindingsOptions,\n ) => Promise<void>;\n const originalGetBootSequence = target['getBootSequence'] as unknown as () => Array<{\n name: string;\n }>;\n\n const wrappedRegister = async (sweepOptions: IDynamicBindingsOptions): Promise<void> => {\n sweepsSeen += 1;\n const userBefore = sweepOptions.onBeforeConfigure;\n const userAfter = sweepOptions.onAfterConfigure;\n\n return originalRegisterDynamicBindings.call(target, {\n ...sweepOptions,\n onBeforeConfigure: async ({ binding }) => {\n await neutralise({ namespace: sweepOptions.namespace, binding });\n\n if (sweepOptions.namespace === BindingNamespaces.COMPONENT) {\n const instance = target.get<AnyType>({ key: binding.key, isOptional: true });\n configuringComponents.push(String(instance?.constructor?.name ?? binding.key));\n }\n\n await userBefore?.({ binding });\n },\n onAfterConfigure: async ({ binding, instance }) => {\n if (sweepOptions.namespace === BindingNamespaces.COMPONENT) {\n configuringComponents.pop();\n }\n\n await userAfter?.({ binding, instance });\n },\n });\n };\n\n patches.push(\n patchProperty({ object: target, name: 'registerDynamicBindings', value: wrappedRegister }),\n );\n patches.push(\n patchProperty({\n object: target,\n name: 'getBootSequence',\n value: () =>\n originalGetBootSequence.call(target).filter((step) => !skippedSteps.has(step.name)),\n }),\n );\n\n if ((target['registerDynamicBindings'] as unknown) !== wrappedRegister) {\n patches.forEach((patch) => patch.restore());\n fail(\n `The wrap of 'registerDynamicBindings' did not take effect | Refusing to boot against real infrastructure`,\n );\n }\n\n const configs = target['configs'];\n const originalBootChecks = configs.bootChecks;\n const originalBinding = originalBootChecks?.binding;\n configs.bootChecks = {\n ...originalBootChecks,\n binding: {\n allowManual: originalBinding?.allowManual ?? true,\n allowOverride: originalBinding?.allowOverride ?? true,\n doVerify: false,\n },\n };\n\n try {\n if (!target.isBound({ key: CoreBindings.APPLICATION_INSTANCE })) {\n target.init();\n }\n\n await target.initialize();\n\n const sweepsExpected = [\n ServerBootSteps.REGISTER_DATA_SOURCES,\n ServerBootSteps.REGISTER_COMPONENTS,\n ServerBootSteps.REGISTER_CONTRIBUTED_DATA_SOURCES,\n ].some((step) => !skippedSteps.has(step));\n\n if (sweepsExpected && sweepsSeen === 0) {\n fail(\n `The boot never went through 'registerDynamicBindings' | The wrap did not take effect, so datasources may have been configured`,\n );\n }\n\n if (verifyBindings) {\n BindingVerifier.assertResolve({\n container: target,\n namespaces: [BindingNamespaces.SERVICE, BindingNamespaces.REPOSITORY],\n skip: skipBindings,\n scope: 'verifyBindings',\n });\n }\n\n if (\n !allowNoControllers &&\n target.findByTag({ tag: BindingNamespaces.CONTROLLER }).length === 0\n ) {\n fail(\n `The application registered no controller | A boot that registers nothing proves nothing: check the artifact index (for example the AutoArtifacts plugin under 'bun test'), or pass { allowNoControllers: true }`,\n );\n }\n\n if (routes) {\n assertNoDuplicateRoutes({ application: target });\n }\n\n return target;\n } catch (error) {\n const failing = configuringComponents.at(-1);\n\n if (failing) {\n target.logger\n .for('ApplicationBootAssertion.assert')\n .warn(\n `The boot failed inside component ${failing} | If it needs infrastructure, skipComponents: ['${failing}'] skips it, and skipBindings lists the services that depend on it`,\n );\n }\n\n throw error;\n } finally {\n for (const patch of patches.reverse()) {\n patch.restore();\n }\n\n if (originalBootChecks === undefined) {\n delete configs.bootChecks;\n } else {\n configs.bootChecks = originalBootChecks;\n }\n }\n }\n}\n"]}
@@ -1,3 +1,4 @@
1
+ /** Normalizes the result of a raw Drizzle `execute()` call across the postgres-js and node-postgres drivers. */
1
2
  export declare class DrizzleResultUtility {
2
3
  /** Rows returned by `connector.execute(...)`. */
3
4
  static readResultRows<TRow>(opts: {
@@ -1,4 +1,5 @@
1
1
  import { getError } from '@venizia/ignis-helpers/core';
2
+ /** Normalizes the result of a raw Drizzle `execute()` call across the postgres-js and node-postgres drivers. */
2
3
  export class DrizzleResultUtility {
3
4
  /** Rows returned by `connector.execute(...)`. */
4
5
  static readResultRows(opts) {
@@ -1 +1 @@
1
- {"version":3,"file":"drizzle-result.utility.js","sourceRoot":"","sources":["../../../src/utilities/drizzle-result.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,MAAM,OAAO,oBAAoB;IAC/B,iDAAiD;IACjD,MAAM,CAAC,cAAc,CAAO,IAAyB;QACnD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAExB,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,2CAA2C;QAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,OAAO,MAAgB,CAAC;QAC1B,CAAC;QAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,4HAA4H,OAAO,MAAM,EAAE;aACrJ,CAAC,CAAC;QACL,CAAC;QAED,iCAAiC;QACjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAA4B,CAAC;QAE9C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,IAAc,CAAC;QACxB,CAAC;QAED,MAAM,QAAQ,CAAC;YACb,OAAO,EAAE,oJAAoJ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SAC9L,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { getError } from '@venizia/ignis-helpers/core';\n\nexport class DrizzleResultUtility {\n /** Rows returned by `connector.execute(...)`. */\n static readResultRows<TRow>(opts: { result: unknown }): TRow[] {\n const { result } = opts;\n\n if (result === null || result === undefined) {\n return [];\n }\n\n // postgres-js: the result IS the row list.\n if (Array.isArray(result)) {\n return result as TRow[];\n }\n\n if (typeof result !== 'object') {\n throw getError({\n message: `[DrizzleResultUtility.readResultRows] Unrecognized driver result | expected pg.QueryResult or postgres-js RowList | got: ${typeof result}`,\n });\n }\n\n // node-postgres: pg.QueryResult.\n const { rows } = result as { rows?: unknown };\n\n if (Array.isArray(rows)) {\n return rows as TRow[];\n }\n\n throw getError({\n message: `[DrizzleResultUtility.readResultRows] Unrecognized driver result | expected an array (postgres-js) or a 'rows' array (node-postgres) | got keys: ${Object.keys(result).join(', ')}`,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"drizzle-result.utility.js","sourceRoot":"","sources":["../../../src/utilities/drizzle-result.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,gHAAgH;AAChH,MAAM,OAAO,oBAAoB;IAC/B,iDAAiD;IACjD,MAAM,CAAC,cAAc,CAAO,IAAyB;QACnD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAExB,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,2CAA2C;QAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,OAAO,MAAgB,CAAC;QAC1B,CAAC;QAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,4HAA4H,OAAO,MAAM,EAAE;aACrJ,CAAC,CAAC;QACL,CAAC;QAED,iCAAiC;QACjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAA4B,CAAC;QAE9C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,IAAc,CAAC;QACxB,CAAC;QAED,MAAM,QAAQ,CAAC;YACb,OAAO,EAAE,oJAAoJ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SAC9L,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { getError } from '@venizia/ignis-helpers/core';\n\n/** Normalizes the result of a raw Drizzle `execute()` call across the postgres-js and node-postgres drivers. */\nexport class DrizzleResultUtility {\n /** Rows returned by `connector.execute(...)`. */\n static readResultRows<TRow>(opts: { result: unknown }): TRow[] {\n const { result } = opts;\n\n if (result === null || result === undefined) {\n return [];\n }\n\n // postgres-js: the result IS the row list.\n if (Array.isArray(result)) {\n return result as TRow[];\n }\n\n if (typeof result !== 'object') {\n throw getError({\n message: `[DrizzleResultUtility.readResultRows] Unrecognized driver result | expected pg.QueryResult or postgres-js RowList | got: ${typeof result}`,\n });\n }\n\n // node-postgres: pg.QueryResult.\n const { rows } = result as { rows?: unknown };\n\n if (Array.isArray(rows)) {\n return rows as TRow[];\n }\n\n throw getError({\n message: `[DrizzleResultUtility.readResultRows] Unrecognized driver result | expected an array (postgres-js) or a 'rows' array (node-postgres) | got keys: ${Object.keys(result).join(', ')}`,\n });\n }\n}\n"]}
@@ -2,10 +2,12 @@ import { BunCompiler } from '@venizia/dev-configs/compilers';
2
2
  import { IgnisArtifactsPlugin } from '@venizia/ignis-boot/bun';
3
3
  import { BuildInfoStamp } from '@venizia/ignis-boot/build-info';
4
4
 
5
+ const define = await BuildInfoStamp.define();
6
+
5
7
  await BunCompiler.compile({
6
8
  entrypoint: './src/index.ts',
7
9
  outfile: './dist/bin',
8
10
  plugins: [IgnisArtifactsPlugin.create()],
9
- define: await BuildInfoStamp.define(),
11
+ define,
10
12
  check: true,
11
13
  });
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Application
5
5
  APP_ENV_APPLICATION_NAME={{app}}
6
- APP_ENV_APPLICATION_TIMEZONE=Asia/Ho_Chi_Minh
6
+ APP_ENV_APPLICATION_TIMEZONE=UTC
7
7
 
8
8
  # Server. PORT, when set, wins over APP_ENV_SERVER_PORT: a container or a cloud host sets it.
9
9
  APP_ENV_SERVER_HOST=0.0.0.0
@@ -12,11 +12,13 @@ const findFreePort = async () => {
12
12
  const probe = Bun.serve({ hostname: HOST, port: 0, fetch: () => new Response() });
13
13
  const port = probe.port;
14
14
  await probe.stop(true);
15
+
15
16
  return port;
16
17
  };
17
18
 
18
19
  const waitForServer = async (opts: { url: string; process: Bun.Subprocess }) => {
19
20
  const deadline = Date.now() + START_TIMEOUT_MS;
21
+ let lastError: unknown;
20
22
 
21
23
  while (Date.now() < deadline) {
22
24
  if (opts.process.exitCode !== null) {
@@ -25,20 +27,22 @@ const waitForServer = async (opts: { url: string; process: Bun.Subprocess }) =>
25
27
  });
26
28
  }
27
29
 
28
- const isUp = await fetch(opts.url).then(
29
- (response) => response.ok,
30
- () => false,
31
- );
30
+ try {
31
+ const response = await fetch(opts.url);
32
32
 
33
- if (isUp) {
34
- return;
33
+ if (response.ok) {
34
+ return;
35
+ }
36
+ } catch (error) {
37
+ // The server is not listening yet: poll again until the deadline.
38
+ lastError = error;
35
39
  }
36
40
 
37
41
  await Bun.sleep(POLL_INTERVAL_MS);
38
42
  }
39
43
 
40
44
  throw getError({
41
- message: `[smoke] server did not answer within ${START_TIMEOUT_MS} ms | Url: ${opts.url}`,
45
+ message: `[smoke] server did not answer within ${START_TIMEOUT_MS} ms | Url: ${opts.url} | Last error: ${lastError}`,
42
46
  });
43
47
  };
44
48
 
@@ -68,8 +72,10 @@ describe('{{app}}', () => {
68
72
  test('GET /hello says hello', async () => {
69
73
  const response = await fetch(`${baseUrl}/hello`);
70
74
 
75
+ const body = await response.json();
76
+
71
77
  expect(response.status).toBe(200);
72
- expect(await response.json()).toEqual({ message: 'Hello from IGNIS!' });
78
+ expect(body).toEqual({ message: 'Hello from IGNIS!' });
73
79
  });
74
80
 
75
81
  test('GET /doc/explorer serves the API reference', async () => {
@@ -14,9 +14,9 @@
14
14
  "dependencies": {
15
15
  "@hono/zod-openapi": "^1.6.3",
16
16
  "@scalar/hono-api-reference": "^0.12.13",
17
- "@venizia/ignis": "0.4.7",
18
- "@venizia/ignis-boot": "0.4.7",
19
- "@venizia/ignis-helpers": "0.4.7",
17
+ "@venizia/ignis": "0.4.8-1",
18
+ "@venizia/ignis-boot": "0.4.8-1",
19
+ "@venizia/ignis-helpers": "0.4.8-1",
20
20
  "hono": "^4.13.13",
21
21
  "winston": "^3.19.0",
22
22
  "winston-daily-rotate-file": "^5.0.0",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "^1.4.3",
27
- "@venizia/dev-configs": "0.4.7",
27
+ "@venizia/dev-configs": "0.4.8-1",
28
28
  "eslint": "^10.13.0",
29
29
  "oxlint": "1.89.0",
30
30
  "oxlint-tsgolint": "7.0.2004",
@@ -4,15 +4,15 @@
4
4
  "dependencies": {},
5
5
  "devDependencies": {
6
6
  "@types/bun": "^1.4.3",
7
- "@venizia/dev-configs": "0.4.7",
8
- "@venizia/ignis": "0.4.7",
7
+ "@venizia/dev-configs": "0.4.8-1",
8
+ "@venizia/ignis": "0.4.8-1",
9
9
  "eslint": "^10.13.0",
10
10
  "oxlint": "1.89.0",
11
11
  "oxlint-tsgolint": "7.0.2004",
12
12
  "typescript": "^6.0.3"
13
13
  },
14
14
  "peerDependencies": {
15
- "@venizia/ignis": "0.4.7"
15
+ "@venizia/ignis": "0.4.8-1"
16
16
  },
17
17
  "scripts": {
18
18
  "typecheck": "bun check",
@@ -4,7 +4,7 @@
4
4
  "dependencies": {},
5
5
  "devDependencies": {
6
6
  "@types/bun": "^1.4.3",
7
- "@venizia/dev-configs": "0.4.7",
7
+ "@venizia/dev-configs": "0.4.8-1",
8
8
  "eslint": "^10.13.0",
9
9
  "oxlint": "1.89.0",
10
10
  "oxlint-tsgolint": "7.0.2004",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@venizia/ignis",
3
- "version": "0.4.7",
4
- "description": "TypeScript server framework with decorator-based DI, the repository pattern and a component system, on Hono. Features auto-generated OpenAPI docs, Drizzle ORM type-safe SQL, JWT/Basic authentication, Casbin authorization, convention-based bootstrapping, and pluggable components for health checks, Swagger UI, mail, Socket.IO, and static assets. Built for Bun and Node.js.",
3
+ "version": "0.4.8-1",
4
+ "description": "TypeScript server framework with decorator-based DI, the repository pattern and a component system, on Hono. Features auto-generated OpenAPI docs, Drizzle ORM type-safe SQL, JWT/Basic authentication, Casbin authorization, convention-based bootstrapping, and pluggable components for health checks, Swagger UI, mail, Socket.IO, and static assets. Built for Bun.",
5
5
  "keywords": [
6
6
  "access-control",
7
7
  "amazon-ses",
@@ -40,7 +40,6 @@
40
40
  "middleware",
41
41
  "mixin",
42
42
  "model",
43
- "nodejs",
44
43
  "nodemailer",
45
44
  "openapi",
46
45
  "orm",
@@ -92,6 +91,7 @@
92
91
  "LICENSE.md",
93
92
  "dist",
94
93
  "!**/__tests__",
94
+ "!**/*.d.ts.map",
95
95
  "!**/*.tsbuildinfo"
96
96
  ],
97
97
  "sideEffects": false,
@@ -134,11 +134,11 @@
134
134
  "force-update": "sh ../../scripts/build/force-update.sh"
135
135
  },
136
136
  "dependencies": {
137
- "@venizia/ignis-connectors": "0.4.7",
138
- "@venizia/ignis-filter": "0.4.6",
139
- "@venizia/ignis-helpers": "0.4.7",
140
- "@venizia/ignis-inversion": "0.4.6",
141
- "@venizia/ignis-kernel": "0.4.7",
137
+ "@venizia/ignis-connectors": "0.4.8-1",
138
+ "@venizia/ignis-filter": "0.4.7-1",
139
+ "@venizia/ignis-helpers": "0.4.8-1",
140
+ "@venizia/ignis-inversion": "0.4.7-1",
141
+ "@venizia/ignis-kernel": "0.4.8-1",
142
142
  "reflect-metadata": "^0.2.2"
143
143
  },
144
144
  "devDependencies": {
@@ -151,8 +151,8 @@
151
151
  "@types/bun": "^1.4.3",
152
152
  "@types/nodemailer": "^8.0.2",
153
153
  "@types/pg": "^8.23.1",
154
- "@venizia/dev-configs": "0.4.7",
155
- "@venizia/ignis-boot": "0.4.7",
154
+ "@venizia/dev-configs": "0.4.8-1",
155
+ "@venizia/ignis-boot": "0.4.8-1",
156
156
  "casbin": "^5.51.1",
157
157
  "eslint": "^10.13.0",
158
158
  "meilisearch": "^0.62.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/applications/base.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EACV,mBAAmB,EAEnB,cAAc,EACd,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,kBAAkB,EAA0B,MAAM,gBAAgB,CAAC;AAI5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAgC/D,8BAAsB,eAAgB,SAAQ,iBAAkB,YAAW,gBAAgB;IACzF,SAAS,CAAC,eAAe,CAAC,EAAE,cAAc,CAAC;IAC3C,SAAS,CAAC,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAErD,SAAS,CAAC,aAAa,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM;IAKtD,6IAA6I;IAC9H,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAuDnD,eAAe,IAAI,cAAc,CAAC,oBAAoB,CAAC;IAIjD,cAAc,IA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AAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,mKAAmK;AACnK,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,sBAAsB;IACzD,MAAM,CAAC,QAAQ,CAAC,aAAa,kBAAkB;IAC/C,MAAM,CAAC,QAAQ,CAAC,eAAe,oBAAoB;IACnD,MAAM,CAAC,QAAQ,CAAC,sBAAsB,0BAA0B;IAChE,MAAM,CAAC,QAAQ,CAAC,6BAA6B,gCAAgC;IAG7E,gBAAyB,UAAU,cAOhC;CACJ;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/base/applications/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger-startup.d.ts","sourceRoot":"","sources":["../../../../../src/base/applications/common/logger-startup.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,qBAAa,mBAAmB;WACjB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/base/applications/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,IAAI,yBAAyB,EACjD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sOAAsO;IACtO,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kGAAkG;IAClG,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED,8GAA8G;AAC9G,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,6DAA6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;IAE3B,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8GAA8G;IAC9G,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB,CACjC,MAAM,SAAS,GAAG,GAAG,GAAG,EACxB,SAAS,SAAS,MAAM,GAAG,MAAM,EACjC,QAAQ,SAAS,MAAM,GAAG,GAAG,CAC7B,SAAQ,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;IACjD,aAAa,IAAI,MAAM,CAAC;IACxB,aAAa,IAAI,MAAM,CAAC;IACxB,gBAAgB,IAAI,MAAM,CAAC;IAE3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/applications/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAC;AAEtC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/base/applications/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIt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QAAQ,EACR,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,CACpB;IACC,sFAAsF;IACtF,SAAS,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,GAAG,qBAAqB,CAAC,QAAQ,CAAC;IAY3E,sEAAsE;IACtE,WAAW,CAAC,IAAI,EAAE;QAChB,OAAO,EAAE,YAAY,CAAC;QACtB,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;KAClD,GAAG,uBAAuB;IAM3B,oGAAoG;IACpG,OAAO,CAAC,aAAa;CAqBtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/base/controllers/grpc/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/base/controllers/grpc/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE;QACP,mBAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,aAAa,CAAC;KACxE,CAAC;IACF,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