@velajs/vela 1.19.0 → 1.19.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 (449) hide show
  1. package/CHANGELOG.md +22 -14
  2. package/dist/configurable-module.builder-5FGMaXG6.js +91 -0
  3. package/dist/configurable-module.builder-5FGMaXG6.js.map +1 -0
  4. package/dist/container-BqUHID4l.js +645 -0
  5. package/dist/container-BqUHID4l.js.map +1 -0
  6. package/dist/cron-matcher-C9qv5OUA.js +113 -0
  7. package/dist/cron-matcher-C9qv5OUA.js.map +1 -0
  8. package/dist/decorate-GcSMAbKn.js +528 -0
  9. package/dist/decorate-GcSMAbKn.js.map +1 -0
  10. package/dist/decorators-C8YBFCIk.js +53 -0
  11. package/dist/decorators-C8YBFCIk.js.map +1 -0
  12. package/dist/define-module-NOyOZNXD.js +235 -0
  13. package/dist/define-module-NOyOZNXD.js.map +1 -0
  14. package/dist/discovery.service-BYm95SSD.js +368 -0
  15. package/dist/discovery.service-BYm95SSD.js.map +1 -0
  16. package/dist/discovery.service-Cpf1QcZ5.d.ts +648 -0
  17. package/dist/i18n/index.d.ts +138 -10
  18. package/dist/i18n/index.js +270 -8
  19. package/dist/i18n/index.js.map +1 -0
  20. package/dist/index-D72EQfcC.d.ts +430 -0
  21. package/dist/index-DhShDLCM.d.ts +2310 -0
  22. package/dist/index.d.ts +6 -70
  23. package/dist/index.js +14 -76
  24. package/dist/internal.d.ts +13 -17
  25. package/dist/internal.js +6 -19
  26. package/dist/live/index.d.ts +2 -12
  27. package/dist/live/index.js +826 -16
  28. package/dist/live/index.js.map +1 -0
  29. package/dist/metadata.registry-D1od8ZBt.d.ts +842 -0
  30. package/dist/plugin-ByBlVOve.js +1387 -0
  31. package/dist/plugin-ByBlVOve.js.map +1 -0
  32. package/dist/queue/index.d.ts +247 -10
  33. package/dist/queue/index.js +384 -12
  34. package/dist/queue/index.js.map +1 -0
  35. package/dist/request-context-C3nCGJNd.js +26 -0
  36. package/dist/request-context-C3nCGJNd.js.map +1 -0
  37. package/dist/route.manager-DRAZ5X04.js +991 -0
  38. package/dist/route.manager-DRAZ5X04.js.map +1 -0
  39. package/dist/schedule-node/index.d.ts +32 -3
  40. package/dist/schedule-node/index.js +97 -3
  41. package/dist/schedule-node/index.js.map +1 -0
  42. package/dist/schedule.registry-DVm7Jp5w.d.ts +55 -0
  43. package/dist/seeder/index.d.ts +75 -5
  44. package/dist/seeder/index.js +105 -4
  45. package/dist/seeder/index.js.map +1 -0
  46. package/dist/signed-url-CMmi0SIb.js +56 -0
  47. package/dist/signed-url-CMmi0SIb.js.map +1 -0
  48. package/dist/signed-url-DKhgja4U.d.ts +16 -0
  49. package/dist/src-eb5CI6Xn.js +2151 -0
  50. package/dist/src-eb5CI6Xn.js.map +1 -0
  51. package/dist/storage/index.d.ts +57 -4
  52. package/dist/storage/index.js +22 -5
  53. package/dist/storage/index.js.map +1 -0
  54. package/dist/streaming/index.d.ts +2 -2
  55. package/dist/streaming/index.js +2 -1
  56. package/dist/websocket/index.d.ts +3 -12
  57. package/dist/websocket/index.js +2 -16
  58. package/dist/websocket-DXmB-MWJ.js +697 -0
  59. package/dist/websocket-DXmB-MWJ.js.map +1 -0
  60. package/dist/websocket-node/index.d.ts +108 -6
  61. package/dist/websocket-node/index.js +228 -6
  62. package/dist/websocket-node/index.js.map +1 -0
  63. package/package.json +66 -53
  64. package/dist/__tests__/workers/entry.d.ts +0 -9
  65. package/dist/__tests__/workers-als/entry-als.d.ts +0 -9
  66. package/dist/application.d.ts +0 -104
  67. package/dist/application.js +0 -364
  68. package/dist/cache/cache.decorators.d.ts +0 -2
  69. package/dist/cache/cache.decorators.js +0 -4
  70. package/dist/cache/cache.interceptor.d.ts +0 -9
  71. package/dist/cache/cache.interceptor.js +0 -60
  72. package/dist/cache/cache.module.d.ts +0 -7
  73. package/dist/cache/cache.module.js +0 -58
  74. package/dist/cache/cache.service.d.ts +0 -9
  75. package/dist/cache/cache.service.js +0 -42
  76. package/dist/cache/cache.store.d.ts +0 -12
  77. package/dist/cache/cache.store.js +0 -51
  78. package/dist/cache/cache.tokens.d.ts +0 -6
  79. package/dist/cache/cache.tokens.js +0 -5
  80. package/dist/cache/cache.types.d.ts +0 -41
  81. package/dist/cache/cache.types.js +0 -1
  82. package/dist/cache/index.d.ts +0 -8
  83. package/dist/cache/index.js +0 -7
  84. package/dist/cache/tiered-cache.store.d.ts +0 -19
  85. package/dist/cache/tiered-cache.store.js +0 -40
  86. package/dist/config/config.module.d.ts +0 -19
  87. package/dist/config/config.module.js +0 -98
  88. package/dist/config/config.service.d.ts +0 -20
  89. package/dist/config/config.service.js +0 -43
  90. package/dist/config/config.store.d.ts +0 -46
  91. package/dist/config/config.store.js +0 -119
  92. package/dist/config/config.tokens.d.ts +0 -13
  93. package/dist/config/config.tokens.js +0 -14
  94. package/dist/config/config.types.d.ts +0 -41
  95. package/dist/config/config.types.js +0 -4
  96. package/dist/config/index.d.ts +0 -7
  97. package/dist/config/index.js +0 -5
  98. package/dist/config/register-as.d.ts +0 -52
  99. package/dist/config/register-as.js +0 -39
  100. package/dist/constants.d.ts +0 -44
  101. package/dist/constants.js +0 -46
  102. package/dist/container/container.d.ts +0 -154
  103. package/dist/container/container.js +0 -849
  104. package/dist/container/decorators.d.ts +0 -17
  105. package/dist/container/decorators.js +0 -57
  106. package/dist/container/disposable.d.ts +0 -5
  107. package/dist/container/disposable.js +0 -33
  108. package/dist/container/index.d.ts +0 -6
  109. package/dist/container/index.js +0 -5
  110. package/dist/container/mixin.d.ts +0 -24
  111. package/dist/container/mixin.js +0 -26
  112. package/dist/container/module-ref.d.ts +0 -21
  113. package/dist/container/module-ref.js +0 -48
  114. package/dist/container/types.d.ts +0 -154
  115. package/dist/container/types.js +0 -49
  116. package/dist/cors/cors.module.d.ts +0 -7
  117. package/dist/cors/cors.module.js +0 -37
  118. package/dist/cors/cors.tokens.d.ts +0 -3
  119. package/dist/cors/cors.tokens.js +0 -2
  120. package/dist/cors/cors.types.d.ts +0 -8
  121. package/dist/cors/cors.types.js +0 -1
  122. package/dist/cors/index.d.ts +0 -3
  123. package/dist/cors/index.js +0 -2
  124. package/dist/crypto/signed-url.d.ts +0 -12
  125. package/dist/crypto/signed-url.js +0 -60
  126. package/dist/discovery/discoverable.decorator.d.ts +0 -38
  127. package/dist/discovery/discoverable.decorator.js +0 -42
  128. package/dist/discovery/discovery.service.d.ts +0 -102
  129. package/dist/discovery/discovery.service.js +0 -177
  130. package/dist/discovery/index.d.ts +0 -2
  131. package/dist/discovery/index.js +0 -2
  132. package/dist/entrypoint/entrypoint.registry.d.ts +0 -42
  133. package/dist/entrypoint/entrypoint.registry.js +0 -112
  134. package/dist/entrypoint/entrypoint.types.d.ts +0 -41
  135. package/dist/entrypoint/entrypoint.types.js +0 -3
  136. package/dist/entrypoint/execution-context.d.ts +0 -15
  137. package/dist/entrypoint/execution-context.js +0 -21
  138. package/dist/entrypoint/execution-scope.d.ts +0 -21
  139. package/dist/entrypoint/execution-scope.js +0 -28
  140. package/dist/entrypoint/index.d.ts +0 -4
  141. package/dist/entrypoint/index.js +0 -4
  142. package/dist/errors/http-exception.d.ts +0 -63
  143. package/dist/errors/http-exception.js +0 -142
  144. package/dist/errors/index.d.ts +0 -1
  145. package/dist/errors/index.js +0 -1
  146. package/dist/event-emitter/event-emitter.decorators.d.ts +0 -1
  147. package/dist/event-emitter/event-emitter.decorators.js +0 -10
  148. package/dist/event-emitter/event-emitter.module.d.ts +0 -2
  149. package/dist/event-emitter/event-emitter.module.js +0 -23
  150. package/dist/event-emitter/event-emitter.service.d.ts +0 -13
  151. package/dist/event-emitter/event-emitter.service.js +0 -127
  152. package/dist/event-emitter/event-emitter.subscriber.d.ts +0 -9
  153. package/dist/event-emitter/event-emitter.subscriber.js +0 -45
  154. package/dist/event-emitter/event-emitter.tokens.d.ts +0 -1
  155. package/dist/event-emitter/event-emitter.tokens.js +0 -1
  156. package/dist/event-emitter/event-emitter.types.d.ts +0 -5
  157. package/dist/event-emitter/event-emitter.types.js +0 -1
  158. package/dist/event-emitter/index.d.ts +0 -6
  159. package/dist/event-emitter/index.js +0 -5
  160. package/dist/exceptions/errors.module.d.ts +0 -40
  161. package/dist/exceptions/errors.module.js +0 -46
  162. package/dist/exceptions/exception-handler.d.ts +0 -56
  163. package/dist/exceptions/exception-handler.js +0 -17
  164. package/dist/exceptions/index.d.ts +0 -6
  165. package/dist/exceptions/index.js +0 -3
  166. package/dist/exceptions/reporter.d.ts +0 -21
  167. package/dist/exceptions/reporter.js +0 -70
  168. package/dist/factory/adapter.d.ts +0 -36
  169. package/dist/factory/adapter.js +0 -18
  170. package/dist/factory/bootstrap.d.ts +0 -23
  171. package/dist/factory/bootstrap.js +0 -110
  172. package/dist/factory.d.ts +0 -16
  173. package/dist/factory.js +0 -36
  174. package/dist/fetch/fetch.module.d.ts +0 -7
  175. package/dist/fetch/fetch.module.js +0 -31
  176. package/dist/fetch/fetch.service.d.ts +0 -24
  177. package/dist/fetch/fetch.service.js +0 -145
  178. package/dist/fetch/fetch.types.d.ts +0 -24
  179. package/dist/fetch/fetch.types.js +0 -1
  180. package/dist/fetch/index.d.ts +0 -3
  181. package/dist/fetch/index.js +0 -2
  182. package/dist/health/health.http.d.ts +0 -14
  183. package/dist/health/health.http.js +0 -75
  184. package/dist/health/health.indicator.d.ts +0 -9
  185. package/dist/health/health.indicator.js +0 -32
  186. package/dist/health/health.module.d.ts +0 -2
  187. package/dist/health/health.module.js +0 -26
  188. package/dist/health/health.service.d.ts +0 -7
  189. package/dist/health/health.service.js +0 -69
  190. package/dist/health/health.types.d.ts +0 -15
  191. package/dist/health/health.types.js +0 -1
  192. package/dist/health/index.d.ts +0 -6
  193. package/dist/health/index.js +0 -4
  194. package/dist/http/ambient.d.ts +0 -17
  195. package/dist/http/ambient.js +0 -44
  196. package/dist/http/argument-resolver.d.ts +0 -10
  197. package/dist/http/argument-resolver.js +0 -89
  198. package/dist/http/decorators.d.ts +0 -198
  199. package/dist/http/decorators.js +0 -321
  200. package/dist/http/execution-context.d.ts +0 -8
  201. package/dist/http/execution-context.js +0 -35
  202. package/dist/http/handler-executor.d.ts +0 -20
  203. package/dist/http/handler-executor.js +0 -133
  204. package/dist/http/index.d.ts +0 -12
  205. package/dist/http/index.js +0 -7
  206. package/dist/http/instantiate.d.ts +0 -4
  207. package/dist/http/instantiate.js +0 -45
  208. package/dist/http/lazy-param.decorator.d.ts +0 -37
  209. package/dist/http/lazy-param.decorator.js +0 -117
  210. package/dist/http/request-container.d.ts +0 -16
  211. package/dist/http/request-container.js +0 -19
  212. package/dist/http/request-context.d.ts +0 -13
  213. package/dist/http/request-context.js +0 -22
  214. package/dist/http/response-mapper.d.ts +0 -8
  215. package/dist/http/response-mapper.js +0 -42
  216. package/dist/http/route-contributor.d.ts +0 -68
  217. package/dist/http/route-contributor.js +0 -22
  218. package/dist/http/route-map.d.ts +0 -30
  219. package/dist/http/route-map.js +0 -27
  220. package/dist/http/route.manager.d.ts +0 -92
  221. package/dist/http/route.manager.js +0 -481
  222. package/dist/http/types.d.ts +0 -37
  223. package/dist/http/types.js +0 -1
  224. package/dist/http/url/index.d.ts +0 -4
  225. package/dist/http/url/index.js +0 -3
  226. package/dist/http/url/signed-url.guard.d.ts +0 -27
  227. package/dist/http/url/signed-url.guard.js +0 -62
  228. package/dist/http/url/signing-secret.d.ts +0 -20
  229. package/dist/http/url/signing-secret.js +0 -24
  230. package/dist/http/url/url-generator.service.d.ts +0 -52
  231. package/dist/http/url/url-generator.service.js +0 -104
  232. package/dist/i18n/deep-merge.d.ts +0 -2
  233. package/dist/i18n/deep-merge.js +0 -15
  234. package/dist/i18n/i18n.middleware.d.ts +0 -15
  235. package/dist/i18n/i18n.middleware.js +0 -94
  236. package/dist/i18n/i18n.module.d.ts +0 -13
  237. package/dist/i18n/i18n.module.js +0 -69
  238. package/dist/i18n/i18n.options.d.ts +0 -30
  239. package/dist/i18n/i18n.options.js +0 -16
  240. package/dist/i18n/i18n.service.d.ts +0 -20
  241. package/dist/i18n/i18n.service.js +0 -49
  242. package/dist/i18n/i18n.tokens.d.ts +0 -6
  243. package/dist/i18n/i18n.tokens.js +0 -3
  244. package/dist/i18n/i18n.types.d.ts +0 -6
  245. package/dist/i18n/i18n.types.js +0 -1
  246. package/dist/i18n/message-loader.service.d.ts +0 -21
  247. package/dist/i18n/message-loader.service.js +0 -90
  248. package/dist/i18n/message-registry.d.ts +0 -16
  249. package/dist/i18n/message-registry.js +0 -49
  250. package/dist/lifecycle/index.d.ts +0 -20
  251. package/dist/lifecycle/index.js +0 -15
  252. package/dist/live/live.cursor.d.ts +0 -22
  253. package/dist/live/live.cursor.js +0 -56
  254. package/dist/live/live.decorators.d.ts +0 -32
  255. package/dist/live/live.decorators.js +0 -46
  256. package/dist/live/live.delta.d.ts +0 -15
  257. package/dist/live/live.delta.js +0 -51
  258. package/dist/live/live.engine.d.ts +0 -88
  259. package/dist/live/live.engine.js +0 -471
  260. package/dist/live/live.invalidation.d.ts +0 -45
  261. package/dist/live/live.invalidation.js +0 -99
  262. package/dist/live/live.module.d.ts +0 -28
  263. package/dist/live/live.module.js +0 -87
  264. package/dist/live/live.tokens.d.ts +0 -9
  265. package/dist/live/live.tokens.js +0 -8
  266. package/dist/live/live.types.d.ts +0 -138
  267. package/dist/live/live.types.js +0 -1
  268. package/dist/live/presence.d.ts +0 -44
  269. package/dist/live/presence.js +0 -130
  270. package/dist/metadata.d.ts +0 -10
  271. package/dist/metadata.js +0 -20
  272. package/dist/module/configurable-module.builder.d.ts +0 -56
  273. package/dist/module/configurable-module.builder.js +0 -84
  274. package/dist/module/configurable-module.types.d.ts +0 -93
  275. package/dist/module/configurable-module.types.js +0 -5
  276. package/dist/module/decorators.d.ts +0 -10
  277. package/dist/module/decorators.js +0 -47
  278. package/dist/module/define-module.d.ts +0 -112
  279. package/dist/module/define-module.js +0 -232
  280. package/dist/module/graph.d.ts +0 -10
  281. package/dist/module/graph.js +0 -35
  282. package/dist/module/index.d.ts +0 -10
  283. package/dist/module/index.js +0 -7
  284. package/dist/module/lazy-modules.d.ts +0 -82
  285. package/dist/module/lazy-modules.js +0 -231
  286. package/dist/module/lazy-provider.d.ts +0 -65
  287. package/dist/module/lazy-provider.js +0 -111
  288. package/dist/module/middleware.d.ts +0 -30
  289. package/dist/module/middleware.js +0 -67
  290. package/dist/module/module-loader.d.ts +0 -58
  291. package/dist/module/module-loader.js +0 -484
  292. package/dist/module/stable-hash.d.ts +0 -15
  293. package/dist/module/stable-hash.js +0 -52
  294. package/dist/module/types.d.ts +0 -1
  295. package/dist/module/types.js +0 -1
  296. package/dist/openapi/decorators.d.ts +0 -34
  297. package/dist/openapi/decorators.js +0 -66
  298. package/dist/openapi/document.d.ts +0 -3
  299. package/dist/openapi/document.js +0 -316
  300. package/dist/openapi/index.d.ts +0 -7
  301. package/dist/openapi/index.js +0 -6
  302. package/dist/openapi/redoc-ui.d.ts +0 -1
  303. package/dist/openapi/redoc-ui.js +0 -19
  304. package/dist/openapi/scalar-ui.d.ts +0 -1
  305. package/dist/openapi/scalar-ui.js +0 -19
  306. package/dist/openapi/swagger-ui.d.ts +0 -1
  307. package/dist/openapi/swagger-ui.js +0 -23
  308. package/dist/openapi/types.d.ts +0 -182
  309. package/dist/openapi/types.js +0 -4
  310. package/dist/openapi/zod-to-json-schema.d.ts +0 -4
  311. package/dist/openapi/zod-to-json-schema.js +0 -57
  312. package/dist/pipeline/app-providers.d.ts +0 -10
  313. package/dist/pipeline/app-providers.js +0 -43
  314. package/dist/pipeline/component.manager.d.ts +0 -25
  315. package/dist/pipeline/component.manager.js +0 -66
  316. package/dist/pipeline/decorators.d.ts +0 -10
  317. package/dist/pipeline/decorators.js +0 -42
  318. package/dist/pipeline/index.d.ts +0 -12
  319. package/dist/pipeline/index.js +0 -7
  320. package/dist/pipeline/pipeline-runner.d.ts +0 -31
  321. package/dist/pipeline/pipeline-runner.js +0 -40
  322. package/dist/pipeline/pipes.d.ts +0 -48
  323. package/dist/pipeline/pipes.js +0 -104
  324. package/dist/pipeline/reflector.d.ts +0 -86
  325. package/dist/pipeline/reflector.js +0 -121
  326. package/dist/pipeline/scoped-components.d.ts +0 -26
  327. package/dist/pipeline/scoped-components.js +0 -27
  328. package/dist/pipeline/tokens.d.ts +0 -57
  329. package/dist/pipeline/tokens.js +0 -47
  330. package/dist/pipeline/types.d.ts +0 -64
  331. package/dist/pipeline/types.js +0 -1
  332. package/dist/plugin/plugin.d.ts +0 -31
  333. package/dist/plugin/plugin.js +0 -111
  334. package/dist/queue/inline.driver.d.ts +0 -30
  335. package/dist/queue/inline.driver.js +0 -58
  336. package/dist/queue/queue.binding.d.ts +0 -23
  337. package/dist/queue/queue.binding.js +0 -60
  338. package/dist/queue/queue.client.d.ts +0 -20
  339. package/dist/queue/queue.client.js +0 -33
  340. package/dist/queue/queue.decorators.d.ts +0 -23
  341. package/dist/queue/queue.decorators.js +0 -46
  342. package/dist/queue/queue.dispatch.d.ts +0 -36
  343. package/dist/queue/queue.dispatch.js +0 -109
  344. package/dist/queue/queue.module.d.ts +0 -32
  345. package/dist/queue/queue.module.js +0 -80
  346. package/dist/queue/queue.tokens.d.ts +0 -21
  347. package/dist/queue/queue.tokens.js +0 -34
  348. package/dist/queue/queue.types.d.ts +0 -61
  349. package/dist/queue/queue.types.js +0 -4
  350. package/dist/registry/index.d.ts +0 -2
  351. package/dist/registry/index.js +0 -1
  352. package/dist/registry/metadata.registry.d.ts +0 -73
  353. package/dist/registry/metadata.registry.js +0 -357
  354. package/dist/registry/paths.d.ts +0 -3
  355. package/dist/registry/paths.js +0 -15
  356. package/dist/registry/types.d.ts +0 -116
  357. package/dist/registry/types.js +0 -1
  358. package/dist/registry/util.d.ts +0 -3
  359. package/dist/registry/util.js +0 -8
  360. package/dist/schedule/cron-matcher.d.ts +0 -2
  361. package/dist/schedule/cron-matcher.js +0 -62
  362. package/dist/schedule/index.d.ts +0 -8
  363. package/dist/schedule/index.js +0 -5
  364. package/dist/schedule/schedule.decorators.d.ts +0 -2
  365. package/dist/schedule/schedule.decorators.js +0 -18
  366. package/dist/schedule/schedule.module.d.ts +0 -9
  367. package/dist/schedule/schedule.module.js +0 -28
  368. package/dist/schedule/schedule.registry.d.ts +0 -23
  369. package/dist/schedule/schedule.registry.js +0 -63
  370. package/dist/schedule/schedule.tokens.d.ts +0 -2
  371. package/dist/schedule/schedule.tokens.js +0 -2
  372. package/dist/schedule/schedule.types.d.ts +0 -8
  373. package/dist/schedule/schedule.types.js +0 -1
  374. package/dist/schedule-node/schedule-node.module.d.ts +0 -9
  375. package/dist/schedule-node/schedule-node.module.js +0 -28
  376. package/dist/schedule-node/schedule.executor.d.ts +0 -19
  377. package/dist/schedule-node/schedule.executor.js +0 -112
  378. package/dist/seeder/seeder.decorator.d.ts +0 -7
  379. package/dist/seeder/seeder.decorator.js +0 -15
  380. package/dist/seeder/seeder.module.d.ts +0 -16
  381. package/dist/seeder/seeder.module.js +0 -44
  382. package/dist/seeder/seeder.registry.d.ts +0 -23
  383. package/dist/seeder/seeder.registry.js +0 -83
  384. package/dist/seeder/seeder.tokens.d.ts +0 -2
  385. package/dist/seeder/seeder.tokens.js +0 -1
  386. package/dist/seeder/seeder.types.d.ts +0 -20
  387. package/dist/seeder/seeder.types.js +0 -1
  388. package/dist/serialization/index.d.ts +0 -2
  389. package/dist/serialization/index.js +0 -2
  390. package/dist/serialization/serialize.decorator.d.ts +0 -6
  391. package/dist/serialization/serialize.decorator.js +0 -7
  392. package/dist/serialization/serializer.interceptor.d.ts +0 -4
  393. package/dist/serialization/serializer.interceptor.js +0 -16
  394. package/dist/services/index.d.ts +0 -2
  395. package/dist/services/index.js +0 -1
  396. package/dist/services/logger.d.ts +0 -59
  397. package/dist/services/logger.js +0 -159
  398. package/dist/storage/path-template.d.ts +0 -9
  399. package/dist/storage/path-template.js +0 -20
  400. package/dist/storage/storage.types.d.ts +0 -41
  401. package/dist/storage/storage.types.js +0 -5
  402. package/dist/throttler/index.d.ts +0 -6
  403. package/dist/throttler/index.js +0 -5
  404. package/dist/throttler/throttler.decorators.d.ts +0 -3
  405. package/dist/throttler/throttler.decorators.js +0 -4
  406. package/dist/throttler/throttler.guard.d.ts +0 -9
  407. package/dist/throttler/throttler.guard.js +0 -72
  408. package/dist/throttler/throttler.module.d.ts +0 -7
  409. package/dist/throttler/throttler.module.js +0 -41
  410. package/dist/throttler/throttler.storage.d.ts +0 -10
  411. package/dist/throttler/throttler.storage.js +0 -44
  412. package/dist/throttler/throttler.tokens.d.ts +0 -6
  413. package/dist/throttler/throttler.tokens.js +0 -5
  414. package/dist/throttler/throttler.types.d.ts +0 -25
  415. package/dist/throttler/throttler.types.js +0 -1
  416. package/dist/validation/create-zod-dto.d.ts +0 -13
  417. package/dist/validation/create-zod-dto.js +0 -18
  418. package/dist/validation/index.d.ts +0 -3
  419. package/dist/validation/index.js +0 -2
  420. package/dist/validation/validation.pipe.d.ts +0 -4
  421. package/dist/validation/validation.pipe.js +0 -19
  422. package/dist/websocket/websocket.decorators.d.ts +0 -47
  423. package/dist/websocket/websocket.decorators.js +0 -80
  424. package/dist/websocket/websocket.module.d.ts +0 -35
  425. package/dist/websocket/websocket.module.js +0 -63
  426. package/dist/websocket/websocket.tokens.d.ts +0 -30
  427. package/dist/websocket/websocket.tokens.js +0 -27
  428. package/dist/websocket/websocket.types.d.ts +0 -102
  429. package/dist/websocket/websocket.types.js +0 -4
  430. package/dist/websocket/ws-argument-resolver.d.ts +0 -13
  431. package/dist/websocket/ws-argument-resolver.js +0 -40
  432. package/dist/websocket/ws-dispatcher.d.ts +0 -54
  433. package/dist/websocket/ws-dispatcher.js +0 -343
  434. package/dist/websocket/ws-exception.d.ts +0 -25
  435. package/dist/websocket/ws-exception.js +0 -42
  436. package/dist/websocket/ws-execution-context.d.ts +0 -9
  437. package/dist/websocket/ws-execution-context.js +0 -24
  438. package/dist/websocket/ws-server.d.ts +0 -31
  439. package/dist/websocket/ws-server.js +0 -74
  440. package/dist/websocket/ws-sync.d.ts +0 -47
  441. package/dist/websocket/ws-sync.js +0 -74
  442. package/dist/websocket-node/node-ws-client.d.ts +0 -24
  443. package/dist/websocket-node/node-ws-client.js +0 -49
  444. package/dist/websocket-node/redis-live.d.ts +0 -24
  445. package/dist/websocket-node/redis-live.js +0 -57
  446. package/dist/websocket-node/redis-sync.d.ts +0 -33
  447. package/dist/websocket-node/redis-sync.js +0 -56
  448. package/dist/websocket-node/register-gateways.d.ts +0 -20
  449. package/dist/websocket-node/register-gateways.js +0 -61
@@ -0,0 +1,528 @@
1
+ //#region src/registry/util.ts
2
+ function getOrCreate(map, key, factory) {
3
+ let v = map.get(key);
4
+ if (v === void 0) map.set(key, v = factory());
5
+ return v;
6
+ }
7
+ const getOrCreateMap = (map, key) => getOrCreate(map, key, () => /* @__PURE__ */ new Map());
8
+ const getOrCreateArray = (map, key) => getOrCreate(map, key, () => []);
9
+ //#endregion
10
+ //#region src/registry/metadata.registry.ts
11
+ function emptyComponentByOwner() {
12
+ return {
13
+ middleware: /* @__PURE__ */ new Map(),
14
+ guard: /* @__PURE__ */ new Map(),
15
+ pipe: /* @__PURE__ */ new Map(),
16
+ interceptor: /* @__PURE__ */ new Map(),
17
+ filter: /* @__PURE__ */ new Map()
18
+ };
19
+ }
20
+ function createRegistryState() {
21
+ return {
22
+ routes: /* @__PURE__ */ new Map(),
23
+ controllers: /* @__PURE__ */ new Map(),
24
+ controllerOptions: /* @__PURE__ */ new Map(),
25
+ modules: /* @__PURE__ */ new Map(),
26
+ parameters: /* @__PURE__ */ new Map(),
27
+ injectables: /* @__PURE__ */ new Set(),
28
+ scopes: /* @__PURE__ */ new Map(),
29
+ injectTokens: /* @__PURE__ */ new Map(),
30
+ handlerHttpMeta: /* @__PURE__ */ new Map(),
31
+ catchTypes: /* @__PURE__ */ new Map(),
32
+ routeVersions: /* @__PURE__ */ new Map(),
33
+ classMeta: /* @__PURE__ */ new Map(),
34
+ handlerMeta: /* @__PURE__ */ new Map(),
35
+ classMetaIndex: /* @__PURE__ */ new Map(),
36
+ handlerMetaIndex: /* @__PURE__ */ new Map(),
37
+ controllerComponents: emptyComponentByOwner(),
38
+ handlerComponents: {
39
+ middleware: /* @__PURE__ */ new Map(),
40
+ guard: /* @__PURE__ */ new Map(),
41
+ pipe: /* @__PURE__ */ new Map(),
42
+ interceptor: /* @__PURE__ */ new Map(),
43
+ filter: /* @__PURE__ */ new Map()
44
+ }
45
+ };
46
+ }
47
+ const REGISTRY_STATE_KEY = Symbol.for("vela:registry:v1");
48
+ const EMPTY_TARGET_SET = /* @__PURE__ */ new Set();
49
+ function registryState() {
50
+ const g = globalThis;
51
+ const state = g[REGISTRY_STATE_KEY] ??= createRegistryState();
52
+ state.classMetaIndex ??= /* @__PURE__ */ new Map();
53
+ state.handlerMetaIndex ??= /* @__PURE__ */ new Map();
54
+ return state;
55
+ }
56
+ var MetadataRegistry = class {
57
+ static get routes() {
58
+ return registryState().routes;
59
+ }
60
+ static get controllers() {
61
+ return registryState().controllers;
62
+ }
63
+ static get controllerOptions() {
64
+ return registryState().controllerOptions;
65
+ }
66
+ static get modules() {
67
+ return registryState().modules;
68
+ }
69
+ static get parameters() {
70
+ return registryState().parameters;
71
+ }
72
+ static get injectables() {
73
+ return registryState().injectables;
74
+ }
75
+ static get scopes() {
76
+ return registryState().scopes;
77
+ }
78
+ static get injectTokens() {
79
+ return registryState().injectTokens;
80
+ }
81
+ static get handlerHttpMeta() {
82
+ return registryState().handlerHttpMeta;
83
+ }
84
+ static get catchTypes() {
85
+ return registryState().catchTypes;
86
+ }
87
+ static get routeVersions() {
88
+ return registryState().routeVersions;
89
+ }
90
+ static get classMeta() {
91
+ return registryState().classMeta;
92
+ }
93
+ static get handlerMeta() {
94
+ return registryState().handlerMeta;
95
+ }
96
+ static get classMetaIndex() {
97
+ return registryState().classMetaIndex;
98
+ }
99
+ static get handlerMetaIndex() {
100
+ return registryState().handlerMetaIndex;
101
+ }
102
+ static get controllerComponents() {
103
+ return registryState().controllerComponents;
104
+ }
105
+ static get handlerComponents() {
106
+ return registryState().handlerComponents;
107
+ }
108
+ static getRoutes(controller) {
109
+ return this.routes.get(controller) ?? [];
110
+ }
111
+ static addRoute(controller, route) {
112
+ getOrCreateArray(this.routes, controller).push(route);
113
+ }
114
+ static getControllerPath(controller) {
115
+ return this.controllers.get(controller) ?? "";
116
+ }
117
+ static setControllerPath(controller, path) {
118
+ this.controllers.set(controller, path);
119
+ }
120
+ static getControllerOptions(controller) {
121
+ return this.controllerOptions.get(controller) ?? {};
122
+ }
123
+ static setControllerOptions(controller, options) {
124
+ this.controllerOptions.set(controller, options);
125
+ }
126
+ static getModuleOptions(module) {
127
+ return this.modules.get(module);
128
+ }
129
+ static setModuleOptions(module, options) {
130
+ this.modules.set(module, options);
131
+ }
132
+ static getParameters(controller) {
133
+ return this.parameters.get(controller) ?? /* @__PURE__ */ new Map();
134
+ }
135
+ static addParameter(controller, methodName, param) {
136
+ getOrCreateArray(getOrCreateMap(this.parameters, controller), methodName).push(param);
137
+ }
138
+ static registerController(type, controller, component) {
139
+ const map = this.controllerComponents[type];
140
+ getOrCreateArray(map, controller).push(component);
141
+ }
142
+ static getController(type, controller) {
143
+ return this.controllerComponents[type].get(controller) ?? [];
144
+ }
145
+ static registerHandler(type, controller, methodName, component) {
146
+ const map = this.handlerComponents[type];
147
+ getOrCreateArray(getOrCreateMap(map, controller), methodName).push(component);
148
+ }
149
+ static getHandler(type, controller, methodName) {
150
+ return this.handlerComponents[type].get(controller)?.get(methodName) ?? [];
151
+ }
152
+ static markInjectable(target) {
153
+ this.injectables.add(target);
154
+ }
155
+ static hasInjectable(target) {
156
+ return this.injectables.has(target);
157
+ }
158
+ static setScope(target, scope) {
159
+ this.scopes.set(target, scope);
160
+ }
161
+ static getScope(target) {
162
+ return this.scopes.get(target);
163
+ }
164
+ static setInjectTokens(target, tokens) {
165
+ this.injectTokens.set(target, tokens);
166
+ }
167
+ static getInjectTokens(target) {
168
+ return this.injectTokens.get(target);
169
+ }
170
+ static setHandlerHttpMeta(controller, method, meta) {
171
+ const methodMap = getOrCreateMap(this.handlerHttpMeta, controller);
172
+ const existing = methodMap.get(method) ?? {};
173
+ const merged = {
174
+ ...existing,
175
+ ...meta
176
+ };
177
+ if (meta.responseHeaders) merged.responseHeaders = [...existing.responseHeaders ?? [], ...meta.responseHeaders];
178
+ methodMap.set(method, merged);
179
+ }
180
+ static getHandlerHttpMeta(controller, method) {
181
+ return this.handlerHttpMeta.get(controller)?.get(method);
182
+ }
183
+ static setCatchTypes(filter, types) {
184
+ this.catchTypes.set(filter, types);
185
+ }
186
+ static getCatchTypes(filter) {
187
+ return this.catchTypes.get(filter);
188
+ }
189
+ static hasCatchTypes(filter) {
190
+ return this.catchTypes.has(filter);
191
+ }
192
+ static setRouteVersion(controller, method, version) {
193
+ getOrCreateMap(this.routeVersions, controller).set(method, version);
194
+ }
195
+ static getRouteVersion(controller, method) {
196
+ return this.routeVersions.get(controller)?.get(method);
197
+ }
198
+ static setCustomClassMeta(target, key, value) {
199
+ getOrCreate(this.classMeta, target, () => /* @__PURE__ */ new Map()).set(key, value);
200
+ if (!key.startsWith("design:")) getOrCreate(this.classMetaIndex, key, () => /* @__PURE__ */ new Set()).add(target);
201
+ }
202
+ static getCustomClassMeta(target, key) {
203
+ return this.classMeta.get(target)?.get(key);
204
+ }
205
+ static getCustomClassMetaAll(target) {
206
+ return this.classMeta.get(target);
207
+ }
208
+ static setCustomHandlerMeta(target, handler, key, value) {
209
+ getOrCreate(getOrCreate(this.handlerMeta, target, () => /* @__PURE__ */ new Map()), handler, () => /* @__PURE__ */ new Map()).set(key, value);
210
+ if (!key.startsWith("design:")) getOrCreate(this.handlerMetaIndex, key, () => /* @__PURE__ */ new Set()).add(target);
211
+ }
212
+ static getCustomHandlerMeta(target, handler, key) {
213
+ return this.handlerMeta.get(target)?.get(handler)?.get(key);
214
+ }
215
+ static getCustomHandlerMetaAll(target, handler) {
216
+ return this.handlerMeta.get(target)?.get(handler);
217
+ }
218
+ static appendCustomClassMeta(target, key, item) {
219
+ const list = this.getCustomClassMeta(target, key) ?? [];
220
+ list.push(item);
221
+ this.setCustomClassMeta(target, key, list);
222
+ }
223
+ static appendCustomHandlerMeta(target, handler, key, item) {
224
+ const list = this.getCustomHandlerMeta(target, handler, key) ?? [];
225
+ list.push(item);
226
+ this.setCustomHandlerMeta(target, handler, key, list);
227
+ }
228
+ static getClassesWithClassMeta(key) {
229
+ return this.classMetaIndex.get(key) ?? EMPTY_TARGET_SET;
230
+ }
231
+ static getClassesWithHandlerMeta(key) {
232
+ return this.handlerMetaIndex.get(key) ?? EMPTY_TARGET_SET;
233
+ }
234
+ /** Every (handler, value) pair on `target` carrying metadata under `key`. */
235
+ static getHandlersWithMeta(target, key) {
236
+ const byHandler = this.handlerMeta.get(target);
237
+ if (!byHandler) return [];
238
+ const out = [];
239
+ for (const [handler, metaMap] of byHandler) if (metaMap.has(key)) out.push({
240
+ handler,
241
+ value: metaMap.get(key)
242
+ });
243
+ return out;
244
+ }
245
+ static setReflectMetadata(target, key, value, propertyKey) {
246
+ if (propertyKey !== void 0) this.setCustomHandlerMeta(target, propertyKey, key, value);
247
+ else this.setCustomClassMeta(target, key, value);
248
+ }
249
+ static getReflectMetadata(target, key, propertyKey) {
250
+ if (propertyKey !== void 0) return this.getCustomHandlerMeta(target, propertyKey, key);
251
+ return this.getCustomClassMeta(target, key);
252
+ }
253
+ static getParamTypes(target, propertyKey) {
254
+ return this.getReflectMetadata(target, "design:paramtypes", propertyKey);
255
+ }
256
+ static propagateControllerComponents(from, to) {
257
+ for (const type of [
258
+ "middleware",
259
+ "guard",
260
+ "pipe",
261
+ "interceptor",
262
+ "filter"
263
+ ]) {
264
+ const map = this.controllerComponents[type];
265
+ const components = map.get(from);
266
+ if (components && components.length > 0) getOrCreateArray(map, to).push(...components);
267
+ }
268
+ }
269
+ static clear() {}
270
+ static reset() {
271
+ this.routes.clear();
272
+ this.controllers.clear();
273
+ this.controllerOptions.clear();
274
+ this.modules.clear();
275
+ this.parameters.clear();
276
+ this.injectables.clear();
277
+ this.scopes.clear();
278
+ this.injectTokens.clear();
279
+ this.handlerHttpMeta.clear();
280
+ this.catchTypes.clear();
281
+ this.routeVersions.clear();
282
+ this.classMeta.clear();
283
+ this.handlerMeta.clear();
284
+ this.classMetaIndex.clear();
285
+ this.handlerMetaIndex.clear();
286
+ for (const type of [
287
+ "middleware",
288
+ "guard",
289
+ "pipe",
290
+ "interceptor",
291
+ "filter"
292
+ ]) {
293
+ this.controllerComponents[type].clear();
294
+ this.handlerComponents[type].clear();
295
+ }
296
+ }
297
+ };
298
+ //#endregion
299
+ //#region src/container/types.ts
300
+ var InjectionToken = class {
301
+ description;
302
+ options;
303
+ constructor(description, options) {
304
+ this.description = description;
305
+ this.options = options;
306
+ }
307
+ toString() {
308
+ return `InjectionToken(${this.description})`;
309
+ }
310
+ };
311
+ var ForwardRef = class {
312
+ factory;
313
+ constructor(factory) {
314
+ this.factory = factory;
315
+ }
316
+ };
317
+ function forwardRef(factory) {
318
+ return new ForwardRef(factory);
319
+ }
320
+ /**
321
+ * Human-readable token label — class name, `InjectionToken(desc)`, symbol
322
+ * string, or String() fallback. Public so introspection tooling (module
323
+ * graphs, entrypoint listings) renders tokens the same way vela's own errors
324
+ * do.
325
+ */
326
+ function describeToken(token) {
327
+ if (token instanceof InjectionToken) return token.toString();
328
+ if (typeof token === "function") return token.name;
329
+ if (typeof token === "symbol") return token.toString();
330
+ return String(token);
331
+ }
332
+ var ModuleVisibilityError = class extends Error {
333
+ moduleId;
334
+ token;
335
+ constructor(moduleId, token) {
336
+ super(`Module '${moduleId}' cannot resolve '${describeToken(token)}': not declared in providers, not imported from another module's exports, not @Global. Either add to imports/exports or mark as @Global.`);
337
+ this.moduleId = moduleId;
338
+ this.token = token;
339
+ this.name = "ModuleVisibilityError";
340
+ }
341
+ };
342
+ var MultipleProvidersFoundError = class extends Error {
343
+ moduleId;
344
+ token;
345
+ candidates;
346
+ constructor(moduleId, token, candidates) {
347
+ super(`Multiple providers found for '${describeToken(token)}' in module '${moduleId}':\n` + candidates.map((c) => ` - ${c}`).join("\n") + "\nResolve ambiguity by importing only one instance, or by using a per-instance accessor exposed by the module (e.g., Module.tokenFor(key)).");
348
+ this.moduleId = moduleId;
349
+ this.token = token;
350
+ this.candidates = candidates;
351
+ this.name = "MultipleProvidersFoundError";
352
+ }
353
+ };
354
+ const ROOT_MODULE_ID = "__root__";
355
+ //#endregion
356
+ //#region src/pipeline/tokens.ts
357
+ /**
358
+ * Register global guards via module providers instead of app.useGlobalGuards().
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * @Module({
363
+ * providers: [
364
+ * AuthGuard,
365
+ * { provide: APP_GUARD, useClass: AuthGuard },
366
+ * ],
367
+ * })
368
+ * class AppModule {}
369
+ * ```
370
+ */
371
+ const APP_GUARD = new InjectionToken("APP_GUARD");
372
+ /**
373
+ * Register global pipes via module providers.
374
+ */
375
+ const APP_PIPE = new InjectionToken("APP_PIPE");
376
+ /**
377
+ * Register global interceptors via module providers.
378
+ */
379
+ const APP_INTERCEPTOR = new InjectionToken("APP_INTERCEPTOR");
380
+ /**
381
+ * Register global filters via module providers.
382
+ */
383
+ const APP_FILTER = new InjectionToken("APP_FILTER");
384
+ /**
385
+ * Register global middleware via module providers.
386
+ */
387
+ const APP_MIDDLEWARE = new InjectionToken("APP_MIDDLEWARE");
388
+ /**
389
+ * Register the application-wide exception handler via module providers.
390
+ * Consumed by the shared error reporter (`resolveErrorReporter`) at every
391
+ * transport edge to customize how errors are reported and rendered.
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * @Module({
396
+ * providers: [
397
+ * { provide: APP_EXCEPTION_HANDLER, useValue: { report: (e) => sentry.capture(e) } },
398
+ * ],
399
+ * })
400
+ * class AppModule {}
401
+ * ```
402
+ */
403
+ const APP_EXCEPTION_HANDLER = new InjectionToken("APP_EXCEPTION_HANDLER");
404
+ /**
405
+ * Provide the composed error catalog (`composeCatalogs(CORE_CATALOG, …)`)
406
+ * consulted when rendering wire-bound error bodies. Defaults to the core
407
+ * catalog when unset.
408
+ */
409
+ const ERROR_CATALOG = new InjectionToken("ERROR_CATALOG");
410
+ //#endregion
411
+ //#region src/constants.ts
412
+ const METADATA_KEYS = {
413
+ INJECTABLE: "vela:injectable",
414
+ INJECT: "vela:inject",
415
+ SCOPE: "vela:scope",
416
+ MODULE: "vela:module",
417
+ MODULE_OPTIONS: "vela:module-options",
418
+ CONTROLLER: "vela:controller",
419
+ ROUTES: "vela:routes",
420
+ PARAMS: "vela:params",
421
+ HTTP_CODE: "vela:http-code",
422
+ RESPONSE_HEADERS: "vela:response-headers",
423
+ REDIRECT: "vela:redirect",
424
+ CATCH: "vela:catch",
425
+ CRUD: "vela:crud"
426
+ };
427
+ const HttpMethod = {
428
+ GET: "GET",
429
+ POST: "POST",
430
+ PUT: "PUT",
431
+ PATCH: "PATCH",
432
+ DELETE: "DELETE",
433
+ OPTIONS: "OPTIONS",
434
+ HEAD: "HEAD",
435
+ ALL: "ALL"
436
+ };
437
+ const ParamType = {
438
+ BODY: "body",
439
+ QUERY: "query",
440
+ PARAM: "param",
441
+ HEADERS: "headers",
442
+ REQUEST: "request",
443
+ RESPONSE: "response",
444
+ IP: "ip",
445
+ COOKIE: "cookie",
446
+ RAW_BODY: "raw_body"
447
+ };
448
+ const Scope = {
449
+ SINGLETON: "singleton",
450
+ TRANSIENT: "transient",
451
+ REQUEST: "request"
452
+ };
453
+ //#endregion
454
+ //#region src/container/decorators.ts
455
+ function Injectable(options = {}) {
456
+ return (target) => {
457
+ const { scope = Scope.SINGLETON } = options;
458
+ MetadataRegistry.markInjectable(target);
459
+ MetadataRegistry.setScope(target, scope);
460
+ };
461
+ }
462
+ function Optional() {
463
+ return (target, _propertyKey, parameterIndex) => {
464
+ const existing = getInjectMetadata(target);
465
+ const entry = existing.find((m) => m.index === parameterIndex);
466
+ if (entry) entry.optional = true;
467
+ else existing.push({
468
+ index: parameterIndex,
469
+ optional: true
470
+ });
471
+ MetadataRegistry.setInjectTokens(target, existing);
472
+ };
473
+ }
474
+ function Inject(token) {
475
+ return (target, _propertyKey, parameterIndex) => {
476
+ const existing = getInjectMetadata(target);
477
+ const entry = existing.find((m) => m.index === parameterIndex);
478
+ if (entry) entry.token = token;
479
+ else existing.push({
480
+ index: parameterIndex,
481
+ token
482
+ });
483
+ MetadataRegistry.setInjectTokens(target, existing);
484
+ };
485
+ }
486
+ function isInjectable(target) {
487
+ return MetadataRegistry.hasInjectable(target);
488
+ }
489
+ function getScope(target) {
490
+ return MetadataRegistry.getScope(target) ?? Scope.SINGLETON;
491
+ }
492
+ /**
493
+ * Read through Reflect so dist/src coexistence in tests routes through the
494
+ * single polyfill-installed registry — SWC writes `design:paramtypes` via
495
+ * Reflect, so reads must too. The runtime contract is that each entry is a
496
+ * constructor reference (a `Token`); we surface that contract directly so
497
+ * callers don't need to re-cast.
498
+ */
499
+ function getConstructorDependencies(target) {
500
+ return Reflect.getMetadata("design:paramtypes", target) ?? [];
501
+ }
502
+ function getInjectMetadata(target) {
503
+ return MetadataRegistry.getInjectTokens(target) ?? [];
504
+ }
505
+ //#endregion
506
+ //#region \0@oxc-project+runtime@0.139.0/helpers/esm/decorateMetadata.js
507
+ function __decorateMetadata(k, v) {
508
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
509
+ }
510
+ //#endregion
511
+ //#region \0@oxc-project+runtime@0.139.0/helpers/esm/decorateParam.js
512
+ function __decorateParam(paramIndex, decorator) {
513
+ return function(target, key) {
514
+ decorator(target, key, paramIndex);
515
+ };
516
+ }
517
+ //#endregion
518
+ //#region \0@oxc-project+runtime@0.139.0/helpers/esm/decorate.js
519
+ function __decorate(decorators, target, key, desc) {
520
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
521
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
522
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
523
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
524
+ }
525
+ //#endregion
526
+ export { getOrCreateArray as A, InjectionToken as C, describeToken as D, ROOT_MODULE_ID as E, forwardRef as O, ForwardRef as S, MultipleProvidersFoundError as T, APP_GUARD as _, Injectable as a, APP_PIPE as b, getInjectMetadata as c, HttpMethod as d, METADATA_KEYS as f, APP_FILTER as g, APP_EXCEPTION_HANDLER as h, Inject as i, MetadataRegistry as k, getScope as l, Scope as m, __decorateParam as n, Optional as o, ParamType as p, __decorateMetadata as r, getConstructorDependencies as s, __decorate as t, isInjectable as u, APP_INTERCEPTOR as v, ModuleVisibilityError as w, ERROR_CATALOG as x, APP_MIDDLEWARE as y };
527
+
528
+ //# sourceMappingURL=decorate-GcSMAbKn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorate-GcSMAbKn.js","names":[],"sources":["../src/registry/util.ts","../src/registry/metadata.registry.ts","../src/container/types.ts","../src/pipeline/tokens.ts","../src/constants.ts","../src/container/decorators.ts"],"sourcesContent":["// Single map.get + optional set. Replaces `map.has(key) || map.set(key, …); map.get(key)!` patterns.\nexport function getOrCreate<K, V>(map: Map<K, V>, key: K, factory: () => V): V {\n let v = map.get(key);\n if (v === undefined) map.set(key, (v = factory()));\n return v;\n}\n\nexport const getOrCreateMap = <K, NK, NV>(map: Map<K, Map<NK, NV>>, key: K) =>\n getOrCreate(map, key, () => new Map<NK, NV>());\n\nexport const getOrCreateArray = <K, V>(map: Map<K, V[]>, key: K) =>\n getOrCreate(map, key, () => [] as V[]);\n","import type { Scope } from '../constants';\nimport type { InjectMetadata } from '../container/types';\nimport type {\n ComponentType,\n ComponentTypeMap,\n Constructor,\n FilterType,\n GuardType,\n HttpHandlerMeta,\n InterceptorType,\n MiddlewareType,\n ModuleOptions,\n ParameterMetadata,\n PipeType,\n RouteDefinition,\n Type,\n} from './types';\nimport { getOrCreate, getOrCreateArray, getOrCreateMap } from './util';\n\nexport interface ControllerOptions {\n version?: number | number[];\n}\n\ninterface ComponentByOwner<O> {\n middleware: Map<O, MiddlewareType[]>;\n guard: Map<O, GuardType[]>;\n pipe: Map<O, PipeType[]>;\n interceptor: Map<O, InterceptorType[]>;\n filter: Map<O, FilterType[]>;\n}\n\nfunction emptyComponentByOwner<O>(): ComponentByOwner<O> {\n return {\n middleware: new Map(),\n guard: new Map(),\n pipe: new Map(),\n interceptor: new Map(),\n filter: new Map(),\n };\n}\n\ntype HandlerComponentStore = {\n middleware: Map<Constructor, Map<string | symbol, MiddlewareType[]>>;\n guard: Map<Constructor, Map<string | symbol, GuardType[]>>;\n pipe: Map<Constructor, Map<string | symbol, PipeType[]>>;\n interceptor: Map<Constructor, Map<string | symbol, InterceptorType[]>>;\n filter: Map<Constructor, Map<string | symbol, FilterType[]>>;\n};\n\ninterface RegistryState {\n routes: Map<Constructor, RouteDefinition[]>;\n controllers: Map<Constructor, string>;\n controllerOptions: Map<Constructor, ControllerOptions>;\n modules: Map<Constructor, ModuleOptions>;\n parameters: Map<Constructor, Map<string | symbol, ParameterMetadata[]>>;\n injectables: Set<Constructor>;\n scopes: Map<Constructor, Scope>;\n injectTokens: Map<Constructor, InjectMetadata[]>;\n handlerHttpMeta: Map<Constructor, Map<string | symbol, HttpHandlerMeta>>;\n catchTypes: Map<Constructor, Type<Error>[]>;\n routeVersions: Map<Constructor, Map<string | symbol, number | number[]>>;\n classMeta: Map<object, Map<string, unknown>>;\n handlerMeta: Map<object, Map<string | symbol, Map<string, unknown>>>;\n // Reverse indexes: metadata key -> targets carrying it. Backs DiscoveryService\n // so metadata-driven discovery never scans every container token. `design:*`\n // keys (SWC-emitted type info) are excluded — high-volume, never discovered.\n classMetaIndex: Map<string, Set<object>>;\n handlerMetaIndex: Map<string, Set<object>>;\n controllerComponents: ComponentByOwner<Constructor>;\n handlerComponents: HandlerComponentStore;\n}\n\nfunction createRegistryState(): RegistryState {\n return {\n routes: new Map(),\n controllers: new Map(),\n controllerOptions: new Map(),\n modules: new Map(),\n parameters: new Map(),\n injectables: new Set(),\n scopes: new Map(),\n injectTokens: new Map(),\n handlerHttpMeta: new Map(),\n catchTypes: new Map(),\n routeVersions: new Map(),\n classMeta: new Map(),\n handlerMeta: new Map(),\n classMetaIndex: new Map(),\n handlerMetaIndex: new Map(),\n controllerComponents: emptyComponentByOwner<Constructor>(),\n handlerComponents: {\n middleware: new Map(),\n guard: new Map(),\n pipe: new Map(),\n interceptor: new Map(),\n filter: new Map(),\n },\n };\n}\n\n// HMR-safe: anchor ALL backing state on `globalThis` so a Vite dev re-eval of\n// this module reuses the SAME maps that classes were already decorated against.\n// Without this, re-eval creates fresh empty statics → split-brain (lost routes,\n// spurious \"not @Injectable\" warnings, duplicated global components). The\n// versioned symbol avoids collisions across framework major versions in one\n// process. `globalThis` + `Symbol.for` exist on every target runtime; no node:*.\nconst REGISTRY_STATE_KEY = Symbol.for('vela:registry:v1');\n\n// Shared empty result for index misses — avoids allocating per lookup.\nconst EMPTY_TARGET_SET: ReadonlySet<object> = new Set<object>();\n\nfunction registryState(): RegistryState {\n const g = globalThis as unknown as Record<symbol, RegistryState | undefined>;\n const state = (g[REGISTRY_STATE_KEY] ??= createRegistryState());\n // Backfill fields added after the v1 state shape was first anchored: a state\n // created by an older copy of this module (dist/src coexistence in tests,\n // mixed package versions in one process) must not crash newer readers.\n state.classMetaIndex ??= new Map();\n state.handlerMetaIndex ??= new Map();\n return state;\n}\n\nexport class MetadataRegistry {\n // Every field is a getter over the globalThis-anchored state (registryState).\n // Method bodies keep using `this.<field>`; the getter returns the live map so\n // `.set`/`.get`/`.clear` mutate the shared state.\n private static get routes(): RegistryState['routes'] {\n return registryState().routes;\n }\n private static get controllers(): RegistryState['controllers'] {\n return registryState().controllers;\n }\n private static get controllerOptions(): RegistryState['controllerOptions'] {\n return registryState().controllerOptions;\n }\n private static get modules(): RegistryState['modules'] {\n return registryState().modules;\n }\n private static get parameters(): RegistryState['parameters'] {\n return registryState().parameters;\n }\n private static get injectables(): RegistryState['injectables'] {\n return registryState().injectables;\n }\n private static get scopes(): RegistryState['scopes'] {\n return registryState().scopes;\n }\n private static get injectTokens(): RegistryState['injectTokens'] {\n return registryState().injectTokens;\n }\n private static get handlerHttpMeta(): RegistryState['handlerHttpMeta'] {\n return registryState().handlerHttpMeta;\n }\n private static get catchTypes(): RegistryState['catchTypes'] {\n return registryState().catchTypes;\n }\n private static get routeVersions(): RegistryState['routeVersions'] {\n return registryState().routeVersions;\n }\n private static get classMeta(): RegistryState['classMeta'] {\n return registryState().classMeta;\n }\n private static get handlerMeta(): RegistryState['handlerMeta'] {\n return registryState().handlerMeta;\n }\n private static get classMetaIndex(): RegistryState['classMetaIndex'] {\n return registryState().classMetaIndex;\n }\n private static get handlerMetaIndex(): RegistryState['handlerMetaIndex'] {\n return registryState().handlerMetaIndex;\n }\n private static get controllerComponents(): RegistryState['controllerComponents'] {\n return registryState().controllerComponents;\n }\n private static get handlerComponents(): RegistryState['handlerComponents'] {\n return registryState().handlerComponents;\n }\n\n // Routes\n\n static getRoutes(controller: Constructor): RouteDefinition[] {\n return this.routes.get(controller) ?? [];\n }\n\n static addRoute(controller: Constructor, route: RouteDefinition): void {\n getOrCreateArray(this.routes, controller).push(route);\n }\n\n // Controllers\n\n static getControllerPath(controller: Constructor): string {\n return this.controllers.get(controller) ?? '';\n }\n\n static setControllerPath(controller: Constructor, path: string): void {\n this.controllers.set(controller, path);\n }\n\n static getControllerOptions(controller: Constructor): ControllerOptions {\n return this.controllerOptions.get(controller) ?? {};\n }\n\n static setControllerOptions(controller: Constructor, options: ControllerOptions): void {\n this.controllerOptions.set(controller, options);\n }\n\n // Modules\n\n static getModuleOptions(module: Constructor): ModuleOptions | undefined {\n return this.modules.get(module);\n }\n\n static setModuleOptions(module: Constructor, options: ModuleOptions): void {\n this.modules.set(module, options);\n }\n\n // Parameters\n\n static getParameters(controller: Constructor): Map<string | symbol, ParameterMetadata[]> {\n return this.parameters.get(controller) ?? new Map();\n }\n\n static addParameter(\n controller: Constructor,\n methodName: string | symbol,\n param: ParameterMetadata,\n ): void {\n const methodMap = getOrCreateMap(this.parameters, controller);\n getOrCreateArray(methodMap, methodName).push(param);\n }\n\n // Component registration — controller-level. (There is deliberately NO\n // global tier here: app-wide components live on the per-app RouteManager,\n // one source, never process-global state.)\n\n static registerController<T extends ComponentType>(\n type: T,\n controller: Constructor,\n component: ComponentTypeMap[T],\n ): void {\n const map = this.controllerComponents[type] as Map<Constructor, ComponentTypeMap[T][]>;\n getOrCreateArray(map, controller).push(component);\n }\n\n static getController<T extends ComponentType>(\n type: T,\n controller: Constructor,\n ): ComponentTypeMap[T][] {\n const map = this.controllerComponents[type] as Map<Constructor, ComponentTypeMap[T][]>;\n return map.get(controller) ?? [];\n }\n\n // Component registration — handler-level\n\n static registerHandler<T extends ComponentType>(\n type: T,\n controller: Constructor,\n methodName: string | symbol,\n component: ComponentTypeMap[T],\n ): void {\n const map = this.handlerComponents[type] as Map<\n Constructor,\n Map<string | symbol, ComponentTypeMap[T][]>\n >;\n const methodMap = getOrCreateMap(map, controller);\n getOrCreateArray(methodMap, methodName).push(component);\n }\n\n static getHandler<T extends ComponentType>(\n type: T,\n controller: Constructor,\n methodName: string | symbol,\n ): ComponentTypeMap[T][] {\n const map = this.handlerComponents[type] as Map<\n Constructor,\n Map<string | symbol, ComponentTypeMap[T][]>\n >;\n return map.get(controller)?.get(methodName) ?? [];\n }\n\n // DI metadata\n\n static markInjectable(target: object): void {\n this.injectables.add(target as Constructor);\n }\n\n static hasInjectable(target: object): boolean {\n return this.injectables.has(target as Constructor);\n }\n\n static setScope(target: object, scope: Scope): void {\n this.scopes.set(target as Constructor, scope);\n }\n\n static getScope(target: object): Scope | undefined {\n return this.scopes.get(target as Constructor);\n }\n\n static setInjectTokens(target: object, tokens: InjectMetadata[]): void {\n this.injectTokens.set(target as Constructor, tokens);\n }\n\n static getInjectTokens(target: object): InjectMetadata[] | undefined {\n return this.injectTokens.get(target as Constructor);\n }\n\n // HTTP handler metadata\n\n static setHandlerHttpMeta(\n controller: Constructor,\n method: string | symbol,\n meta: HttpHandlerMeta,\n ): void {\n const methodMap = getOrCreateMap(this.handlerHttpMeta, controller);\n const existing = methodMap.get(method) ?? {};\n const merged: HttpHandlerMeta = { ...existing, ...meta };\n if (meta.responseHeaders) {\n merged.responseHeaders = [...(existing.responseHeaders ?? []), ...meta.responseHeaders];\n }\n methodMap.set(method, merged);\n }\n\n static getHandlerHttpMeta(\n controller: Constructor,\n method: string | symbol,\n ): HttpHandlerMeta | undefined {\n return this.handlerHttpMeta.get(controller)?.get(method);\n }\n\n // Exception filter types\n\n static setCatchTypes(filter: Constructor, types: Type<Error>[]): void {\n this.catchTypes.set(filter, types);\n }\n\n static getCatchTypes(filter: Constructor): Type<Error>[] | undefined {\n return this.catchTypes.get(filter);\n }\n\n static hasCatchTypes(filter: Constructor): boolean {\n return this.catchTypes.has(filter);\n }\n\n // Route versions\n\n static setRouteVersion(\n controller: Constructor,\n method: string | symbol,\n version: number | number[],\n ): void {\n getOrCreateMap(this.routeVersions, controller).set(method, version);\n }\n\n static getRouteVersion(\n controller: Constructor,\n method: string | symbol,\n ): number | number[] | undefined {\n return this.routeVersions.get(controller)?.get(method);\n }\n\n // Custom class/handler metadata. One slot per (target, key) for class-level,\n // (target, handler, key) for handler-level. The same slots back @SetMetadata,\n // every feature decorator (@Cron, @OnEvent, @ApiDoc, …), the SWC shim, and\n // external Reflect.defineMetadata calls — one model, one source of truth.\n\n static setCustomClassMeta(target: object, key: string, value: unknown): void {\n getOrCreate(this.classMeta, target, () => new Map<string, unknown>()).set(key, value);\n if (!key.startsWith('design:')) {\n getOrCreate(this.classMetaIndex, key, () => new Set<object>()).add(target);\n }\n }\n\n static getCustomClassMeta(target: object, key: string): unknown {\n return this.classMeta.get(target)?.get(key);\n }\n\n static getCustomClassMetaAll(target: object): Map<string, unknown> | undefined {\n return this.classMeta.get(target);\n }\n\n static setCustomHandlerMeta(\n target: object,\n handler: string | symbol,\n key: string,\n value: unknown,\n ): void {\n const byHandler = getOrCreate(\n this.handlerMeta,\n target,\n () => new Map<string | symbol, Map<string, unknown>>(),\n );\n getOrCreate(byHandler, handler, () => new Map<string, unknown>()).set(key, value);\n if (!key.startsWith('design:')) {\n getOrCreate(this.handlerMetaIndex, key, () => new Set<object>()).add(target);\n }\n }\n\n static getCustomHandlerMeta(target: object, handler: string | symbol, key: string): unknown {\n return this.handlerMeta.get(target)?.get(handler)?.get(key);\n }\n\n static getCustomHandlerMetaAll(\n target: object,\n handler: string | symbol,\n ): Map<string, unknown> | undefined {\n return this.handlerMeta.get(target)?.get(handler);\n }\n\n // Append helpers — for stackable metadata like @Cron / @Interval / @OnEvent / @ApiResponse.\n\n static appendCustomClassMeta<T>(target: object, key: string, item: T): void {\n const list = (this.getCustomClassMeta(target, key) as T[] | undefined) ?? [];\n list.push(item);\n this.setCustomClassMeta(target, key, list);\n }\n\n static appendCustomHandlerMeta<T>(\n target: object,\n handler: string | symbol,\n key: string,\n item: T,\n ): void {\n const list = (this.getCustomHandlerMeta(target, handler, key) as T[] | undefined) ?? [];\n list.push(item);\n this.setCustomHandlerMeta(target, handler, key, list);\n }\n\n // Reverse-index readers — the DiscoveryService seam. Return the constructors\n // known to carry class-level (resp. handler-level) metadata under `key`.\n // Callers must still intersect with container-registered tokens: decoration\n // alone does not make a class a provider.\n\n static getClassesWithClassMeta(key: string): ReadonlySet<object> {\n return this.classMetaIndex.get(key) ?? EMPTY_TARGET_SET;\n }\n\n static getClassesWithHandlerMeta(key: string): ReadonlySet<object> {\n return this.handlerMetaIndex.get(key) ?? EMPTY_TARGET_SET;\n }\n\n /** Every (handler, value) pair on `target` carrying metadata under `key`. */\n static getHandlersWithMeta(\n target: object,\n key: string,\n ): Array<{ handler: string | symbol; value: unknown }> {\n const byHandler = this.handlerMeta.get(target);\n if (!byHandler) return [];\n const out: Array<{ handler: string | symbol; value: unknown }> = [];\n for (const [handler, metaMap] of byHandler) {\n if (metaMap.has(key)) out.push({ handler, value: metaMap.get(key) });\n }\n return out;\n }\n\n // Reflect-style API — same storage as the typed setters above. Lets external\n // code (and the SWC shim's Reflect.metadata polyfill) write/read uniformly.\n\n static setReflectMetadata(\n target: object,\n key: string,\n value: unknown,\n propertyKey?: string | symbol,\n ): void {\n if (propertyKey !== undefined) {\n this.setCustomHandlerMeta(target, propertyKey, key, value);\n } else {\n this.setCustomClassMeta(target, key, value);\n }\n }\n\n static getReflectMetadata<T = unknown>(\n target: object,\n key: string,\n propertyKey?: string | symbol,\n ): T | undefined {\n if (propertyKey !== undefined) {\n return this.getCustomHandlerMeta(target, propertyKey, key) as T | undefined;\n }\n return this.getCustomClassMeta(target, key) as T | undefined;\n }\n\n // SWC-emitted design:paramtypes — class-level for constructors, handler-level for methods.\n\n static getParamTypes(target: object, propertyKey?: string | symbol): unknown[] | undefined {\n return this.getReflectMetadata<unknown[]>(target, 'design:paramtypes', propertyKey);\n }\n\n // Propagate all controller-level components from one class to another.\n\n static propagateControllerComponents(from: Constructor, to: Constructor): void {\n for (const type of ['middleware', 'guard', 'pipe', 'interceptor', 'filter'] as const) {\n const map = this.controllerComponents[type];\n const components = map.get(from);\n if (components && components.length > 0) {\n const target = getOrCreateArray(map as Map<Constructor, unknown[]>, to) as unknown[];\n target.push(...components);\n }\n }\n }\n\n // Clear app-time state. Decoration metadata persists — once a class is\n // decorated, that fact is permanent for the lifetime of the process.\n // Currently a no-op: the last piece of app-time registry state (the global\n // component tier) moved to the per-app RouteManager. Kept because test\n // suites call it between cases and future app-time state belongs here.\n\n static clear(): void {\n // no app-time state to clear\n }\n\n // Full reset, including decoration metadata. Used in framework-internal scenarios.\n\n static reset(): void {\n this.routes.clear();\n this.controllers.clear();\n this.controllerOptions.clear();\n this.modules.clear();\n this.parameters.clear();\n this.injectables.clear();\n this.scopes.clear();\n this.injectTokens.clear();\n this.handlerHttpMeta.clear();\n this.catchTypes.clear();\n this.routeVersions.clear();\n this.classMeta.clear();\n this.handlerMeta.clear();\n this.classMetaIndex.clear();\n this.handlerMetaIndex.clear();\n for (const type of ['middleware', 'guard', 'pipe', 'interceptor', 'filter'] as const) {\n this.controllerComponents[type].clear();\n this.handlerComponents[type].clear();\n }\n }\n}\n","import type { Scope } from '../constants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Type<T = any> = new (...args: any[]) => T;\n\n// Broader: matches concrete and abstract classes. Used for metadata keying,\n// where any class reference is acceptable.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Constructor<T = unknown> = abstract new (...args: any[]) => T;\n\nexport interface InjectionTokenOptions<T> {\n factory?: () => T;\n}\n\nexport class InjectionToken<T = unknown> {\n constructor(\n private readonly description: string,\n public readonly options?: InjectionTokenOptions<T>,\n ) {}\n\n toString(): string {\n return `InjectionToken(${this.description})`;\n }\n}\n\nexport class ForwardRef<T = unknown> {\n constructor(public readonly factory: () => Token<T>) {}\n}\n\nexport function forwardRef<T>(factory: () => Token<T>): ForwardRef<T> {\n return new ForwardRef(factory);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Token<T = any> = Type<T> | InjectionToken<T> | string | symbol;\n\n/**\n * Maps a single DI `Token<T>` to its resolved value type at the type level:\n * - `InjectionToken<T>` → `T`\n * - `Type<T>` / `Constructor<T>` → `T` (the instance type)\n * - `ForwardRef<T>` → `T`\n * - `string` / `symbol` → `unknown` (runtime-only tokens carry no\n * static type info; the consumer asserts).\n *\n * Used by `AsyncModuleOptions` to give `useFactory` parameters their real\n * types based on the literal `inject` tuple — without `as const` at the call\n * site (relies on the `const` type parameter on the consuming generic).\n */\nexport type InferToken<T> =\n T extends InjectionToken<infer U>\n ? U\n : T extends ForwardRef<infer U>\n ? U\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n T extends abstract new (...args: any[]) => infer U\n ? U\n : unknown;\n\n/**\n * Map every position of a `Token[]` tuple to its resolved value type.\n * Pairs with `const Inject extends readonly Token<unknown>[]` generics to\n * give `useFactory(...deps)` parameter types inferred from the literal\n * `inject` array.\n */\nexport type InferTokens<T extends readonly unknown[]> = {\n [K in keyof T]: InferToken<T[K]>;\n};\n\nexport interface InjectableOptions {\n scope?: Scope;\n}\n\nexport interface InjectMetadata {\n index: number;\n token?: Token | ForwardRef;\n optional?: boolean;\n}\n\nexport interface ProviderOptions<T = unknown> {\n provide?: Token<T>;\n scope?: Scope;\n useValue?: T;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useFactory?: (...args: any[]) => T | Promise<T>;\n useClass?: Type<T>;\n // Accepts both mutable and readonly token arrays — the latter is what\n // const-tuple-inferred `AsyncModuleOptions.inject` produces when threaded\n // through to module-internal provider registrations. Behavior is identical\n // at runtime; the container iterates and resolves.\n inject?: readonly Token[];\n useExisting?: Token<T>;\n}\n\nexport interface ProviderRegistration<T = unknown> {\n provide: Token<T>;\n /** The declared scope (from `@Injectable`/`@Controller`/provider options). */\n scope: Scope;\n /**\n * Scope after request-scope bubbling: `REQUEST` if this provider (transitively)\n * depends on a request-scoped provider, else the declared scope. Computed once\n * at bootstrap (`Container.computeEffectiveScopes`); falls back to `scope`\n * until then. Governs caching + eager instantiation.\n */\n effectiveScope?: Scope;\n /**\n * Module that owns this registration. Used by `resolveClass` to determine\n * the POV from which the class's dependencies resolve. Sandbox/bootstrap\n * registrations land in the `\"__root__\"` bucket.\n */\n declaringModuleId: string;\n instance?: T;\n useValue?: T;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useFactory?: (...args: any[]) => T | Promise<T>;\n useClass?: Type<T>;\n inject?: readonly Token[];\n useExisting?: Token<T>;\n}\n\n// Module visibility\nexport interface ModuleScope {\n moduleId: string;\n localProviders: Set<Token>;\n importedModules: Set<string>;\n exportedTokens: Set<Token>;\n isGlobal: boolean;\n /** Module instance opted into deferred (first-use) materialization. */\n lazy?: boolean;\n}\n\n/**\n * The container's seam into lazy-module materialization (implemented by\n * `LazyModuleManager`). The container only ever *claims* a pending module at\n * a resolution trigger and *drains* completed claims when the resolution\n * stack has fully unwound — construction and hook replay live behind this\n * interface so the container stays module-system-agnostic.\n */\nexport interface LazyResolutionHook {\n /** Is this module instance still deferred (untriggered)? */\n isPending(moduleId: string): boolean;\n /** Mark a pending module as triggered; idempotent. */\n claim(moduleId: string): void;\n /** Any claimed-but-unmaterialized groups? (cheap fast-path check) */\n hasClaimed(): boolean;\n /**\n * A drain loop is currently running. The container must NOT start (or\n * await) another drain from inside it — the running loop picks pending\n * claims up; awaiting would self-deadlock on the async path.\n */\n isDraining(): boolean;\n /** Complete claimed groups synchronously; throws if async work surfaces. */\n drainSync(): void;\n /** Complete claimed groups, awaiting async construction and hooks. */\n drainAsync(): Promise<void>;\n}\n\nexport type Diagnostics = 'silent' | 'log' | 'throw';\n\nexport interface ContainerOptions {\n diagnostics?: Diagnostics;\n}\n\n/**\n * Human-readable token label — class name, `InjectionToken(desc)`, symbol\n * string, or String() fallback. Public so introspection tooling (module\n * graphs, entrypoint listings) renders tokens the same way vela's own errors\n * do.\n */\nexport function describeToken(token: Token): string {\n if (token instanceof InjectionToken) return token.toString();\n if (typeof token === 'function') return token.name;\n if (typeof token === 'symbol') return token.toString();\n return String(token);\n}\n\n/**\n * One module instance in the loaded graph, serializable (strings only) —\n * what `Container.getModuleDescriptions()` returns for introspection tooling\n * (`vela module graph`). Reads registration state only; never constructs.\n */\nexport interface ModuleDescription {\n moduleId: string;\n /** moduleIds this instance imports. */\n imports: string[];\n isGlobal: boolean;\n lazy: boolean;\n /** Token labels registered in this instance's bucket (registration order). */\n providers: string[];\n /** Token labels this instance exports. */\n exports: string[];\n}\n\nexport class ModuleVisibilityError extends Error {\n constructor(\n public readonly moduleId: string,\n public readonly token: Token,\n ) {\n super(\n `Module '${moduleId}' cannot resolve '${describeToken(token)}': ` +\n `not declared in providers, not imported from another module's exports, not @Global. ` +\n `Either add to imports/exports or mark as @Global.`,\n );\n this.name = 'ModuleVisibilityError';\n }\n}\n\nexport class MultipleProvidersFoundError extends Error {\n constructor(\n public readonly moduleId: string,\n public readonly token: Token,\n public readonly candidates: string[],\n ) {\n super(\n `Multiple providers found for '${describeToken(token)}' in module '${moduleId}':\\n` +\n candidates.map((c) => ` - ${c}`).join('\\n') +\n `\\nResolve ambiguity by importing only one instance, or by using a per-instance ` +\n `accessor exposed by the module (e.g., Module.tokenFor(key)).`,\n );\n this.name = 'MultipleProvidersFoundError';\n }\n}\n\nexport const ROOT_MODULE_ID = '__root__';\n","import type { Catalog } from '@velajs/errors';\nimport { InjectionToken } from '../container/types';\nimport type { ExceptionHandler } from '../exceptions/exception-handler';\nimport type {\n CanActivate,\n ExceptionFilter,\n NestInterceptor,\n NestMiddleware,\n PipeTransform,\n} from './types';\n\n/**\n * Register global guards via module providers instead of app.useGlobalGuards().\n *\n * @example\n * ```ts\n * @Module({\n * providers: [\n * AuthGuard,\n * { provide: APP_GUARD, useClass: AuthGuard },\n * ],\n * })\n * class AppModule {}\n * ```\n */\nexport const APP_GUARD = new InjectionToken<CanActivate>('APP_GUARD');\n\n/**\n * Register global pipes via module providers.\n */\nexport const APP_PIPE = new InjectionToken<PipeTransform>('APP_PIPE');\n\n/**\n * Register global interceptors via module providers.\n */\nexport const APP_INTERCEPTOR = new InjectionToken<NestInterceptor>('APP_INTERCEPTOR');\n\n/**\n * Register global filters via module providers.\n */\nexport const APP_FILTER = new InjectionToken<ExceptionFilter>('APP_FILTER');\n\n/**\n * Register global middleware via module providers.\n */\nexport const APP_MIDDLEWARE = new InjectionToken<NestMiddleware>('APP_MIDDLEWARE');\n\n/**\n * Register the application-wide exception handler via module providers.\n * Consumed by the shared error reporter (`resolveErrorReporter`) at every\n * transport edge to customize how errors are reported and rendered.\n *\n * @example\n * ```ts\n * @Module({\n * providers: [\n * { provide: APP_EXCEPTION_HANDLER, useValue: { report: (e) => sentry.capture(e) } },\n * ],\n * })\n * class AppModule {}\n * ```\n */\nexport const APP_EXCEPTION_HANDLER = new InjectionToken<ExceptionHandler>('APP_EXCEPTION_HANDLER');\n\n/**\n * Provide the composed error catalog (`composeCatalogs(CORE_CATALOG, …)`)\n * consulted when rendering wire-bound error bodies. Defaults to the core\n * catalog when unset.\n */\nexport const ERROR_CATALOG = new InjectionToken<Catalog<string>>('ERROR_CATALOG');\n","export const METADATA_KEYS = {\n // DI\n INJECTABLE: 'vela:injectable',\n INJECT: 'vela:inject',\n SCOPE: 'vela:scope',\n\n // Module\n MODULE: 'vela:module',\n MODULE_OPTIONS: 'vela:module-options',\n\n // HTTP\n CONTROLLER: 'vela:controller',\n ROUTES: 'vela:routes',\n PARAMS: 'vela:params',\n HTTP_CODE: 'vela:http-code',\n RESPONSE_HEADERS: 'vela:response-headers',\n REDIRECT: 'vela:redirect',\n\n // Pipeline\n CATCH: 'vela:catch',\n\n // CRUD\n CRUD: 'vela:crud',\n} as const;\n\nexport const HttpMethod = {\n GET: 'GET',\n POST: 'POST',\n PUT: 'PUT',\n PATCH: 'PATCH',\n DELETE: 'DELETE',\n OPTIONS: 'OPTIONS',\n HEAD: 'HEAD',\n ALL: 'ALL',\n} as const;\nexport type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];\n\nexport const ParamType = {\n BODY: 'body',\n QUERY: 'query',\n PARAM: 'param',\n HEADERS: 'headers',\n REQUEST: 'request',\n RESPONSE: 'response',\n IP: 'ip',\n COOKIE: 'cookie',\n RAW_BODY: 'raw_body',\n} as const;\nexport type ParamType = (typeof ParamType)[keyof typeof ParamType];\n\nexport const Scope = {\n SINGLETON: 'singleton',\n TRANSIENT: 'transient',\n REQUEST: 'request',\n} as const;\nexport type Scope = (typeof Scope)[keyof typeof Scope];\n","import { Scope } from '../constants';\nimport { MetadataRegistry } from '../registry/metadata.registry';\nimport type { InjectableOptions, InjectMetadata, Token } from './types';\nimport { ForwardRef } from './types';\n\nexport function Injectable(options: InjectableOptions = {}): ClassDecorator {\n return (target: object) => {\n const { scope = Scope.SINGLETON } = options;\n MetadataRegistry.markInjectable(target);\n MetadataRegistry.setScope(target, scope);\n };\n}\n\nexport function Optional(): ParameterDecorator {\n return (target: object, _propertyKey: string | symbol | undefined, parameterIndex: number) => {\n const existing = getInjectMetadata(target);\n const entry = existing.find((m) => m.index === parameterIndex);\n if (entry) {\n entry.optional = true;\n } else {\n existing.push({ index: parameterIndex, optional: true });\n }\n MetadataRegistry.setInjectTokens(target, existing);\n };\n}\n\nexport function Inject(token: Token | ForwardRef): ParameterDecorator {\n return (target: object, _propertyKey: string | symbol | undefined, parameterIndex: number) => {\n const existing = getInjectMetadata(target);\n const entry = existing.find((m) => m.index === parameterIndex);\n if (entry) {\n entry.token = token;\n } else {\n existing.push({ index: parameterIndex, token });\n }\n MetadataRegistry.setInjectTokens(target, existing);\n };\n}\n\nexport function isInjectable(target: object): boolean {\n return MetadataRegistry.hasInjectable(target);\n}\n\nexport function getScope(target: object): Scope {\n return MetadataRegistry.getScope(target) ?? Scope.SINGLETON;\n}\n\n/**\n * Read through Reflect so dist/src coexistence in tests routes through the\n * single polyfill-installed registry — SWC writes `design:paramtypes` via\n * Reflect, so reads must too. The runtime contract is that each entry is a\n * constructor reference (a `Token`); we surface that contract directly so\n * callers don't need to re-cast.\n */\nexport function getConstructorDependencies(target: object): Array<Token | undefined> {\n return (\n (Reflect.getMetadata('design:paramtypes', target) as Array<Token | undefined> | undefined) ?? []\n );\n}\n\nexport function getInjectMetadata(target: object): InjectMetadata[] {\n return MetadataRegistry.getInjectTokens(target) ?? [];\n}\n"],"mappings":";AACA,SAAgB,YAAkB,KAAgB,KAAQ,SAAqB;CAC7E,IAAI,IAAI,IAAI,IAAI,GAAG;CACnB,IAAI,MAAM,KAAA,GAAW,IAAI,IAAI,KAAM,IAAI,QAAQ,CAAE;CACjD,OAAO;AACT;AAEA,MAAa,kBAA6B,KAA0B,QAClE,YAAY,KAAK,2BAAW,IAAI,IAAY,CAAC;AAE/C,MAAa,oBAA0B,KAAkB,QACvD,YAAY,KAAK,WAAW,CAAC,CAAQ;;;ACoBvC,SAAS,wBAAgD;CACvD,OAAO;EACL,4BAAY,IAAI,IAAI;EACpB,uBAAO,IAAI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AAM,QAAQ,SAAS,MAAM,MAAM,EAAE,UAAU,cAAc;EAC7D,IAAI,OACF,MAAM,QAAQ;OAEd,SAAS,KAAK;GAAE,OAAO;GAAgB;EAAM,CAAC;EAEhD,iBAAiB,gBAAgB,QAAQ,QAAQ;CACnD;AACF;AAEA,SAAgB,aAAa,QAAyB;CACpD,OAAO,iBAAiB,cAAc,MAAM;AAC9C;AAEA,SAAgB,SAAS,QAAuB;CAC9C,OAAO,iBAAiB,SAAS,MAAM,KAAK,MAAM;AACpD;;;;;;;;AASA,SAAgB,2BAA2B,QAA0C;CACnF,OACG,QAAQ,YAAY,qBAAqB,MAAM,KAA8C,CAAC;AAEnG;AAEA,SAAgB,kBAAkB,QAAkC;CAClE,OAAO,iBAAiB,gBAAgB,MAAM,KAAK,CAAC;AACtD"}
@@ -0,0 +1,53 @@
1
+ import { k as MetadataRegistry } from "./decorate-GcSMAbKn.js";
2
+ //#region src/module/decorators.ts
3
+ function Global() {
4
+ return (target) => {
5
+ const ctor = target;
6
+ const existing = MetadataRegistry.getModuleOptions(ctor);
7
+ MetadataRegistry.setModuleOptions(ctor, {
8
+ ...existing,
9
+ isGlobal: true
10
+ });
11
+ };
12
+ }
13
+ function Module(options = {}) {
14
+ return (target) => {
15
+ MetadataRegistry.setModuleOptions(target, {
16
+ imports: options.imports,
17
+ providers: options.providers,
18
+ controllers: options.controllers,
19
+ exports: options.exports,
20
+ isGlobal: options.isGlobal,
21
+ lazy: options.lazy
22
+ });
23
+ };
24
+ }
25
+ function isModule(target) {
26
+ return MetadataRegistry.getModuleOptions(target) !== void 0;
27
+ }
28
+ /**
29
+ * Normalize a DynamicModule, defaulting `key` to `"default"`. Module authors
30
+ * call this from `forRoot()` so the loader always sees an explicit key.
31
+ */
32
+ function defineDynamicModule(input) {
33
+ return {
34
+ ...input,
35
+ key: input.key ?? "default"
36
+ };
37
+ }
38
+ function getModuleMetadata(target) {
39
+ const options = MetadataRegistry.getModuleOptions(target);
40
+ if (!options) return void 0;
41
+ return {
42
+ providers: options.providers ?? [],
43
+ controllers: options.controllers ?? [],
44
+ imports: options.imports ?? [],
45
+ exports: options.exports ?? [],
46
+ isGlobal: options.isGlobal === true,
47
+ lazy: options.lazy === true
48
+ };
49
+ }
50
+ //#endregion
51
+ export { isModule as a, getModuleMetadata as i, Module as n, defineDynamicModule as r, Global as t };
52
+
53
+ //# sourceMappingURL=decorators-C8YBFCIk.js.map