@kabyeon/nexusjs 0.6.5

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 (669) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +860 -0
  3. package/dist/auth/auth.controller.d.ts +175 -0
  4. package/dist/auth/auth.controller.d.ts.map +1 -0
  5. package/dist/auth/auth.d.ts +47 -0
  6. package/dist/auth/auth.d.ts.map +1 -0
  7. package/dist/auth/auth.module.d.ts +34 -0
  8. package/dist/auth/auth.module.d.ts.map +1 -0
  9. package/dist/auth/auth.service.d.ts +192 -0
  10. package/dist/auth/auth.service.d.ts.map +1 -0
  11. package/dist/auth/decorators/current-user.d.ts +58 -0
  12. package/dist/auth/decorators/current-user.d.ts.map +1 -0
  13. package/dist/auth/index.d.ts +43 -0
  14. package/dist/auth/index.d.ts.map +1 -0
  15. package/dist/auth/index.js +730 -0
  16. package/dist/auth/index.js.map +25 -0
  17. package/dist/auth/middleware.d.ts +50 -0
  18. package/dist/auth/middleware.d.ts.map +1 -0
  19. package/dist/auth/types.d.ts +135 -0
  20. package/dist/auth/types.d.ts.map +1 -0
  21. package/dist/cache/cache.module.d.ts +22 -0
  22. package/dist/cache/cache.module.d.ts.map +1 -0
  23. package/dist/cache/cache.service.d.ts +37 -0
  24. package/dist/cache/cache.service.d.ts.map +1 -0
  25. package/dist/cache/index.d.ts +9 -0
  26. package/dist/cache/index.d.ts.map +1 -0
  27. package/dist/cache/index.js +814 -0
  28. package/dist/cache/index.js.map +25 -0
  29. package/dist/cache/stores/drizzle.d.ts +76 -0
  30. package/dist/cache/stores/drizzle.d.ts.map +1 -0
  31. package/dist/cache/stores/index.d.ts +10 -0
  32. package/dist/cache/stores/index.d.ts.map +1 -0
  33. package/dist/cache/stores/memory.d.ts +34 -0
  34. package/dist/cache/stores/memory.d.ts.map +1 -0
  35. package/dist/cache/stores/redis.d.ts +46 -0
  36. package/dist/cache/stores/redis.d.ts.map +1 -0
  37. package/dist/cache/types.d.ts +88 -0
  38. package/dist/cache/types.d.ts.map +1 -0
  39. package/dist/cli/commands/config.d.ts +44 -0
  40. package/dist/cli/commands/config.d.ts.map +1 -0
  41. package/dist/cli/commands/db-generate.d.ts +20 -0
  42. package/dist/cli/commands/db-generate.d.ts.map +1 -0
  43. package/dist/cli/commands/db-migrate.d.ts +33 -0
  44. package/dist/cli/commands/db-migrate.d.ts.map +1 -0
  45. package/dist/cli/commands/db-seed.d.ts +43 -0
  46. package/dist/cli/commands/db-seed.d.ts.map +1 -0
  47. package/dist/cli/commands/index.d.ts +11 -0
  48. package/dist/cli/commands/index.d.ts.map +1 -0
  49. package/dist/cli/commands/info.d.ts +11 -0
  50. package/dist/cli/commands/info.d.ts.map +1 -0
  51. package/dist/cli/commands/init.d.ts +38 -0
  52. package/dist/cli/commands/init.d.ts.map +1 -0
  53. package/dist/cli/commands/make-auth.d.ts +17 -0
  54. package/dist/cli/commands/make-auth.d.ts.map +1 -0
  55. package/dist/cli/commands/make-controller.d.ts +16 -0
  56. package/dist/cli/commands/make-controller.d.ts.map +1 -0
  57. package/dist/cli/commands/make-crud.d.ts +28 -0
  58. package/dist/cli/commands/make-crud.d.ts.map +1 -0
  59. package/dist/cli/commands/make-listener.d.ts +15 -0
  60. package/dist/cli/commands/make-listener.d.ts.map +1 -0
  61. package/dist/cli/commands/make-middleware.d.ts +7 -0
  62. package/dist/cli/commands/make-middleware.d.ts.map +1 -0
  63. package/dist/cli/commands/make-migration.d.ts +21 -0
  64. package/dist/cli/commands/make-migration.d.ts.map +1 -0
  65. package/dist/cli/commands/make-model.d.ts +22 -0
  66. package/dist/cli/commands/make-model.d.ts.map +1 -0
  67. package/dist/cli/commands/make-module.d.ts +11 -0
  68. package/dist/cli/commands/make-module.d.ts.map +1 -0
  69. package/dist/cli/commands/make-queue.d.ts +17 -0
  70. package/dist/cli/commands/make-queue.d.ts.map +1 -0
  71. package/dist/cli/commands/make-schedule.d.ts +17 -0
  72. package/dist/cli/commands/make-schedule.d.ts.map +1 -0
  73. package/dist/cli/commands/make-service.d.ts +7 -0
  74. package/dist/cli/commands/make-service.d.ts.map +1 -0
  75. package/dist/cli/commands/make-session.d.ts +15 -0
  76. package/dist/cli/commands/make-session.d.ts.map +1 -0
  77. package/dist/cli/commands/make-validator.d.ts +7 -0
  78. package/dist/cli/commands/make-validator.d.ts.map +1 -0
  79. package/dist/cli/commands/new.d.ts +14 -0
  80. package/dist/cli/commands/new.d.ts.map +1 -0
  81. package/dist/cli/commands/repl.d.ts +42 -0
  82. package/dist/cli/commands/repl.d.ts.map +1 -0
  83. package/dist/cli/commands/route-list.d.ts +12 -0
  84. package/dist/cli/commands/route-list.d.ts.map +1 -0
  85. package/dist/cli/core/args.d.ts +29 -0
  86. package/dist/cli/core/args.d.ts.map +1 -0
  87. package/dist/cli/core/config.d.ts +137 -0
  88. package/dist/cli/core/config.d.ts.map +1 -0
  89. package/dist/cli/core/fs.d.ts +38 -0
  90. package/dist/cli/core/fs.d.ts.map +1 -0
  91. package/dist/cli/core/index.d.ts +42 -0
  92. package/dist/cli/core/index.d.ts.map +1 -0
  93. package/dist/cli/core/logger.d.ts +46 -0
  94. package/dist/cli/core/logger.d.ts.map +1 -0
  95. package/dist/cli/core/loose-json.d.ts +26 -0
  96. package/dist/cli/core/loose-json.d.ts.map +1 -0
  97. package/dist/cli/core/prompts.d.ts +22 -0
  98. package/dist/cli/core/prompts.d.ts.map +1 -0
  99. package/dist/cli/core/template.d.ts +26 -0
  100. package/dist/cli/core/template.d.ts.map +1 -0
  101. package/dist/cli/index.d.ts +1 -0
  102. package/dist/cli/index.d.ts.map +1 -0
  103. package/dist/cli/index.js +6136 -0
  104. package/dist/cli/index.js.map +91 -0
  105. package/dist/cli/templates/controller/adonis.d.ts +10 -0
  106. package/dist/cli/templates/controller/adonis.d.ts.map +1 -0
  107. package/dist/cli/templates/controller/functional.d.ts +9 -0
  108. package/dist/cli/templates/controller/functional.d.ts.map +1 -0
  109. package/dist/cli/templates/controller/nest.d.ts +17 -0
  110. package/dist/cli/templates/controller/nest.d.ts.map +1 -0
  111. package/dist/cli/templates/crud/controller.d.ts +8 -0
  112. package/dist/cli/templates/crud/controller.d.ts.map +1 -0
  113. package/dist/cli/templates/crud/dto.d.ts +8 -0
  114. package/dist/cli/templates/crud/dto.d.ts.map +1 -0
  115. package/dist/cli/templates/crud/index.d.ts +33 -0
  116. package/dist/cli/templates/crud/index.d.ts.map +1 -0
  117. package/dist/cli/templates/crud/module.d.ts +6 -0
  118. package/dist/cli/templates/crud/module.d.ts.map +1 -0
  119. package/dist/cli/templates/crud/test.d.ts +10 -0
  120. package/dist/cli/templates/crud/test.d.ts.map +1 -0
  121. package/dist/cli/templates/index.d.ts +39 -0
  122. package/dist/cli/templates/index.d.ts.map +1 -0
  123. package/dist/cli/templates/middleware/middleware.d.ts +8 -0
  124. package/dist/cli/templates/middleware/middleware.d.ts.map +1 -0
  125. package/dist/cli/templates/migration/drizzle.d.ts +12 -0
  126. package/dist/cli/templates/migration/drizzle.d.ts.map +1 -0
  127. package/dist/cli/templates/migration/sql.d.ts +10 -0
  128. package/dist/cli/templates/migration/sql.d.ts.map +1 -0
  129. package/dist/cli/templates/model/drizzle-dialect.d.ts +29 -0
  130. package/dist/cli/templates/model/drizzle-dialect.d.ts.map +1 -0
  131. package/dist/cli/templates/model/drizzle.d.ts +14 -0
  132. package/dist/cli/templates/model/drizzle.d.ts.map +1 -0
  133. package/dist/cli/templates/model/kysely.d.ts +12 -0
  134. package/dist/cli/templates/model/kysely.d.ts.map +1 -0
  135. package/dist/cli/templates/model/prisma.d.ts +12 -0
  136. package/dist/cli/templates/model/prisma.d.ts.map +1 -0
  137. package/dist/cli/templates/module/module.d.ts +16 -0
  138. package/dist/cli/templates/module/module.d.ts.map +1 -0
  139. package/dist/cli/templates/project/drizzle.config.d.ts +12 -0
  140. package/dist/cli/templates/project/drizzle.config.d.ts.map +1 -0
  141. package/dist/cli/templates/project/nx.config.d.ts +7 -0
  142. package/dist/cli/templates/project/nx.config.d.ts.map +1 -0
  143. package/dist/cli/templates/repository/repository.d.ts +13 -0
  144. package/dist/cli/templates/repository/repository.d.ts.map +1 -0
  145. package/dist/cli/templates/service/service.d.ts +12 -0
  146. package/dist/cli/templates/service/service.d.ts.map +1 -0
  147. package/dist/cli/templates/validator/validator.d.ts +8 -0
  148. package/dist/cli/templates/validator/validator.d.ts.map +1 -0
  149. package/dist/config/config.module.d.ts +39 -0
  150. package/dist/config/config.module.d.ts.map +1 -0
  151. package/dist/config/config.service.d.ts +47 -0
  152. package/dist/config/config.service.d.ts.map +1 -0
  153. package/dist/config/index.d.ts +39 -0
  154. package/dist/config/index.d.ts.map +1 -0
  155. package/dist/config/index.js +436 -0
  156. package/dist/config/index.js.map +21 -0
  157. package/dist/config/types.d.ts +78 -0
  158. package/dist/config/types.d.ts.map +1 -0
  159. package/dist/core/application.d.ts +77 -0
  160. package/dist/core/application.d.ts.map +1 -0
  161. package/dist/core/constants.d.ts +48 -0
  162. package/dist/core/constants.d.ts.map +1 -0
  163. package/dist/core/decorators/controller.d.ts +21 -0
  164. package/dist/core/decorators/controller.d.ts.map +1 -0
  165. package/dist/core/decorators/http-methods.d.ts +33 -0
  166. package/dist/core/decorators/http-methods.d.ts.map +1 -0
  167. package/dist/core/decorators/index.d.ts +12 -0
  168. package/dist/core/decorators/index.d.ts.map +1 -0
  169. package/dist/core/decorators/injectable.d.ts +42 -0
  170. package/dist/core/decorators/injectable.d.ts.map +1 -0
  171. package/dist/core/decorators/metadata.d.ts +7 -0
  172. package/dist/core/decorators/metadata.d.ts.map +1 -0
  173. package/dist/core/decorators/module.d.ts +23 -0
  174. package/dist/core/decorators/module.d.ts.map +1 -0
  175. package/dist/core/decorators/params.d.ts +33 -0
  176. package/dist/core/decorators/params.d.ts.map +1 -0
  177. package/dist/core/decorators/repository.d.ts +24 -0
  178. package/dist/core/decorators/repository.d.ts.map +1 -0
  179. package/dist/core/decorators/validate.d.ts +21 -0
  180. package/dist/core/decorators/validate.d.ts.map +1 -0
  181. package/dist/core/di/container.d.ts +70 -0
  182. package/dist/core/di/container.d.ts.map +1 -0
  183. package/dist/core/di/index.d.ts +9 -0
  184. package/dist/core/di/index.d.ts.map +1 -0
  185. package/dist/core/di/request-middleware.d.ts +36 -0
  186. package/dist/core/di/request-middleware.d.ts.map +1 -0
  187. package/dist/core/di/request-scope.d.ts +45 -0
  188. package/dist/core/di/request-scope.d.ts.map +1 -0
  189. package/dist/core/di/scanner.d.ts +36 -0
  190. package/dist/core/di/scanner.d.ts.map +1 -0
  191. package/dist/core/di/tokens.d.ts +98 -0
  192. package/dist/core/di/tokens.d.ts.map +1 -0
  193. package/dist/core/http/context.d.ts +30 -0
  194. package/dist/core/http/context.d.ts.map +1 -0
  195. package/dist/core/http/index.d.ts +8 -0
  196. package/dist/core/http/index.d.ts.map +1 -0
  197. package/dist/core/http/middleware.d.ts +31 -0
  198. package/dist/core/http/middleware.d.ts.map +1 -0
  199. package/dist/core/http/router.d.ts +46 -0
  200. package/dist/core/http/router.d.ts.map +1 -0
  201. package/dist/core/http/server.d.ts +58 -0
  202. package/dist/core/http/server.d.ts.map +1 -0
  203. package/dist/core/index.d.ts +20 -0
  204. package/dist/core/index.d.ts.map +1 -0
  205. package/dist/core/orm/drizzle-adapter.d.ts +73 -0
  206. package/dist/core/orm/drizzle-adapter.d.ts.map +1 -0
  207. package/dist/core/orm/index.d.ts +5 -0
  208. package/dist/core/orm/index.d.ts.map +1 -0
  209. package/dist/core/runtime/bun.d.ts +13 -0
  210. package/dist/core/runtime/bun.d.ts.map +1 -0
  211. package/dist/core/runtime/cloudflare.d.ts +18 -0
  212. package/dist/core/runtime/cloudflare.d.ts.map +1 -0
  213. package/dist/core/runtime/index.d.ts +11 -0
  214. package/dist/core/runtime/index.d.ts.map +1 -0
  215. package/dist/core/runtime/node.d.ts +10 -0
  216. package/dist/core/runtime/node.d.ts.map +1 -0
  217. package/dist/core/validation/index.d.ts +5 -0
  218. package/dist/core/validation/index.d.ts.map +1 -0
  219. package/dist/core/validation/validator.d.ts +46 -0
  220. package/dist/core/validation/validator.d.ts.map +1 -0
  221. package/dist/crypto/encryption.d.ts +71 -0
  222. package/dist/crypto/encryption.d.ts.map +1 -0
  223. package/dist/crypto/hash.d.ts +52 -0
  224. package/dist/crypto/hash.d.ts.map +1 -0
  225. package/dist/crypto/index.d.ts +49 -0
  226. package/dist/crypto/index.d.ts.map +1 -0
  227. package/dist/crypto/index.js +533 -0
  228. package/dist/crypto/index.js.map +14 -0
  229. package/dist/crypto/module.d.ts +28 -0
  230. package/dist/crypto/module.d.ts.map +1 -0
  231. package/dist/crypto/types.d.ts +81 -0
  232. package/dist/crypto/types.d.ts.map +1 -0
  233. package/dist/drive/drive.module.d.ts +20 -0
  234. package/dist/drive/drive.module.d.ts.map +1 -0
  235. package/dist/drive/drive.service.d.ts +21 -0
  236. package/dist/drive/drive.service.d.ts.map +1 -0
  237. package/dist/drive/drivers/index.d.ts +9 -0
  238. package/dist/drive/drivers/index.d.ts.map +1 -0
  239. package/dist/drive/drivers/local.d.ts +24 -0
  240. package/dist/drive/drivers/local.d.ts.map +1 -0
  241. package/dist/drive/drivers/memory.d.ts +19 -0
  242. package/dist/drive/drivers/memory.d.ts.map +1 -0
  243. package/dist/drive/drivers/s3.d.ts +44 -0
  244. package/dist/drive/drivers/s3.d.ts.map +1 -0
  245. package/dist/drive/index.d.ts +9 -0
  246. package/dist/drive/index.d.ts.map +1 -0
  247. package/dist/drive/index.js +714 -0
  248. package/dist/drive/index.js.map +25 -0
  249. package/dist/drive/types.d.ts +97 -0
  250. package/dist/drive/types.d.ts.map +1 -0
  251. package/dist/drizzle/decorators/columns.d.ts +16 -0
  252. package/dist/drizzle/decorators/columns.d.ts.map +1 -0
  253. package/dist/drizzle/decorators/index.d.ts +6 -0
  254. package/dist/drizzle/decorators/index.d.ts.map +1 -0
  255. package/dist/drizzle/drivers/base.d.ts +32 -0
  256. package/dist/drizzle/drivers/base.d.ts.map +1 -0
  257. package/dist/drizzle/drivers/bun-sqlite.d.ts +6 -0
  258. package/dist/drizzle/drivers/bun-sqlite.d.ts.map +1 -0
  259. package/dist/drizzle/drivers/d1.d.ts +7 -0
  260. package/dist/drizzle/drivers/d1.d.ts.map +1 -0
  261. package/dist/drizzle/drivers/index.d.ts +14 -0
  262. package/dist/drizzle/drivers/index.d.ts.map +1 -0
  263. package/dist/drizzle/drivers/mysql.d.ts +6 -0
  264. package/dist/drizzle/drivers/mysql.d.ts.map +1 -0
  265. package/dist/drizzle/drivers/postgres.d.ts +12 -0
  266. package/dist/drizzle/drivers/postgres.d.ts.map +1 -0
  267. package/dist/drizzle/drivers/sqlite.d.ts +8 -0
  268. package/dist/drizzle/drivers/sqlite.d.ts.map +1 -0
  269. package/dist/drizzle/drizzle.module.d.ts +29 -0
  270. package/dist/drizzle/drizzle.module.d.ts.map +1 -0
  271. package/dist/drizzle/drizzle.service.d.ts +52 -0
  272. package/dist/drizzle/drizzle.service.d.ts.map +1 -0
  273. package/dist/drizzle/index.d.ts +13 -0
  274. package/dist/drizzle/index.d.ts.map +1 -0
  275. package/dist/drizzle/index.js +979 -0
  276. package/dist/drizzle/index.js.map +32 -0
  277. package/dist/drizzle/model.d.ts +26 -0
  278. package/dist/drizzle/model.d.ts.map +1 -0
  279. package/dist/drizzle/raw-query.d.ts +41 -0
  280. package/dist/drizzle/raw-query.d.ts.map +1 -0
  281. package/dist/drizzle/repository/index.d.ts +6 -0
  282. package/dist/drizzle/repository/index.d.ts.map +1 -0
  283. package/dist/drizzle/repository/repository.d.ts +60 -0
  284. package/dist/drizzle/repository/repository.d.ts.map +1 -0
  285. package/dist/drizzle/types.d.ts +160 -0
  286. package/dist/drizzle/types.d.ts.map +1 -0
  287. package/dist/events/decorators/on-event.d.ts +49 -0
  288. package/dist/events/decorators/on-event.d.ts.map +1 -0
  289. package/dist/events/emitter.d.ts +52 -0
  290. package/dist/events/emitter.d.ts.map +1 -0
  291. package/dist/events/event.service.d.ts +27 -0
  292. package/dist/events/event.service.d.ts.map +1 -0
  293. package/dist/events/events.module.d.ts +35 -0
  294. package/dist/events/events.module.d.ts.map +1 -0
  295. package/dist/events/index.d.ts +43 -0
  296. package/dist/events/index.d.ts.map +1 -0
  297. package/dist/events/index.js +646 -0
  298. package/dist/events/index.js.map +23 -0
  299. package/dist/events/types.d.ts +120 -0
  300. package/dist/events/types.d.ts.map +1 -0
  301. package/dist/grpc/decorators.d.ts +34 -0
  302. package/dist/grpc/decorators.d.ts.map +1 -0
  303. package/dist/grpc/index.d.ts +70 -0
  304. package/dist/grpc/index.d.ts.map +1 -0
  305. package/dist/grpc/index.js +528 -0
  306. package/dist/grpc/index.js.map +22 -0
  307. package/dist/grpc/module.d.ts +32 -0
  308. package/dist/grpc/module.d.ts.map +1 -0
  309. package/dist/grpc/service.d.ts +60 -0
  310. package/dist/grpc/service.d.ts.map +1 -0
  311. package/dist/grpc/types.d.ts +79 -0
  312. package/dist/grpc/types.d.ts.map +1 -0
  313. package/dist/health/health.controller.d.ts +61 -0
  314. package/dist/health/health.controller.d.ts.map +1 -0
  315. package/dist/health/health.module.d.ts +29 -0
  316. package/dist/health/health.module.d.ts.map +1 -0
  317. package/dist/health/health.service.d.ts +34 -0
  318. package/dist/health/health.service.d.ts.map +1 -0
  319. package/dist/health/index.d.ts +38 -0
  320. package/dist/health/index.d.ts.map +1 -0
  321. package/dist/health/index.js +599 -0
  322. package/dist/health/index.js.map +25 -0
  323. package/dist/health/indicators/drizzle.d.ts +18 -0
  324. package/dist/health/indicators/drizzle.d.ts.map +1 -0
  325. package/dist/health/indicators/index.d.ts +59 -0
  326. package/dist/health/indicators/index.d.ts.map +1 -0
  327. package/dist/health/types.d.ts +105 -0
  328. package/dist/health/types.d.ts.map +1 -0
  329. package/dist/i18n/decorators.d.ts +14 -0
  330. package/dist/i18n/decorators.d.ts.map +1 -0
  331. package/dist/i18n/index.d.ts +48 -0
  332. package/dist/i18n/index.d.ts.map +1 -0
  333. package/dist/i18n/index.js +589 -0
  334. package/dist/i18n/index.js.map +17 -0
  335. package/dist/i18n/middleware.d.ts +26 -0
  336. package/dist/i18n/middleware.d.ts.map +1 -0
  337. package/dist/i18n/module.d.ts +39 -0
  338. package/dist/i18n/module.d.ts.map +1 -0
  339. package/dist/i18n/service.d.ts +130 -0
  340. package/dist/i18n/service.d.ts.map +1 -0
  341. package/dist/i18n/types.d.ts +65 -0
  342. package/dist/i18n/types.d.ts.map +1 -0
  343. package/dist/index.d.ts +2 -0
  344. package/dist/index.js +2056 -0
  345. package/dist/index.js.map +53 -0
  346. package/dist/limiter/backends/drizzle.d.ts +40 -0
  347. package/dist/limiter/backends/drizzle.d.ts.map +1 -0
  348. package/dist/limiter/backends/index.d.ts +6 -0
  349. package/dist/limiter/backends/index.d.ts.map +1 -0
  350. package/dist/limiter/backends/memory.d.ts +28 -0
  351. package/dist/limiter/backends/memory.d.ts.map +1 -0
  352. package/dist/limiter/index.d.ts +9 -0
  353. package/dist/limiter/index.d.ts.map +1 -0
  354. package/dist/limiter/index.js +640 -0
  355. package/dist/limiter/index.js.map +25 -0
  356. package/dist/limiter/limiter.middleware.d.ts +11 -0
  357. package/dist/limiter/limiter.middleware.d.ts.map +1 -0
  358. package/dist/limiter/limiter.module.d.ts +23 -0
  359. package/dist/limiter/limiter.module.d.ts.map +1 -0
  360. package/dist/limiter/limiter.service.d.ts +18 -0
  361. package/dist/limiter/limiter.service.d.ts.map +1 -0
  362. package/dist/limiter/types.d.ts +99 -0
  363. package/dist/limiter/types.d.ts.map +1 -0
  364. package/dist/logger/index.d.ts +36 -0
  365. package/dist/logger/index.d.ts.map +1 -0
  366. package/dist/logger/index.js +538 -0
  367. package/dist/logger/index.js.map +22 -0
  368. package/dist/logger/logger.module.d.ts +35 -0
  369. package/dist/logger/logger.module.d.ts.map +1 -0
  370. package/dist/logger/logger.service.d.ts +55 -0
  371. package/dist/logger/logger.service.d.ts.map +1 -0
  372. package/dist/logger/transports/index.d.ts +35 -0
  373. package/dist/logger/transports/index.d.ts.map +1 -0
  374. package/dist/logger/types.d.ts +58 -0
  375. package/dist/logger/types.d.ts.map +1 -0
  376. package/dist/mail/index.d.ts +9 -0
  377. package/dist/mail/index.d.ts.map +1 -0
  378. package/dist/mail/index.js +479 -0
  379. package/dist/mail/index.js.map +25 -0
  380. package/dist/mail/mail.module.d.ts +21 -0
  381. package/dist/mail/mail.module.d.ts.map +1 -0
  382. package/dist/mail/mail.service.d.ts +18 -0
  383. package/dist/mail/mail.service.d.ts.map +1 -0
  384. package/dist/mail/transports/file.d.ts +19 -0
  385. package/dist/mail/transports/file.d.ts.map +1 -0
  386. package/dist/mail/transports/index.d.ts +9 -0
  387. package/dist/mail/transports/index.d.ts.map +1 -0
  388. package/dist/mail/transports/null.d.ts +11 -0
  389. package/dist/mail/transports/null.d.ts.map +1 -0
  390. package/dist/mail/transports/smtp.d.ts +40 -0
  391. package/dist/mail/transports/smtp.d.ts.map +1 -0
  392. package/dist/mail/types.d.ts +73 -0
  393. package/dist/mail/types.d.ts.map +1 -0
  394. package/dist/metrics/controller.d.ts +27 -0
  395. package/dist/metrics/controller.d.ts.map +1 -0
  396. package/dist/metrics/counter.d.ts +36 -0
  397. package/dist/metrics/counter.d.ts.map +1 -0
  398. package/dist/metrics/decorators/counted.d.ts +26 -0
  399. package/dist/metrics/decorators/counted.d.ts.map +1 -0
  400. package/dist/metrics/decorators/index.d.ts +3 -0
  401. package/dist/metrics/decorators/index.d.ts.map +1 -0
  402. package/dist/metrics/decorators/timed.d.ts +25 -0
  403. package/dist/metrics/decorators/timed.d.ts.map +1 -0
  404. package/dist/metrics/gauge.d.ts +38 -0
  405. package/dist/metrics/gauge.d.ts.map +1 -0
  406. package/dist/metrics/histogram.d.ts +52 -0
  407. package/dist/metrics/histogram.d.ts.map +1 -0
  408. package/dist/metrics/index.d.ts +35 -0
  409. package/dist/metrics/index.d.ts.map +1 -0
  410. package/dist/metrics/index.js +1033 -0
  411. package/dist/metrics/index.js.map +21 -0
  412. package/dist/metrics/module.d.ts +33 -0
  413. package/dist/metrics/module.d.ts.map +1 -0
  414. package/dist/metrics/registry.d.ts +52 -0
  415. package/dist/metrics/registry.d.ts.map +1 -0
  416. package/dist/metrics/service.d.ts +42 -0
  417. package/dist/metrics/service.d.ts.map +1 -0
  418. package/dist/metrics/summary.d.ts +50 -0
  419. package/dist/metrics/summary.d.ts.map +1 -0
  420. package/dist/metrics/types.d.ts +115 -0
  421. package/dist/metrics/types.d.ts.map +1 -0
  422. package/dist/openapi/decorators/body.d.ts +9 -0
  423. package/dist/openapi/decorators/body.d.ts.map +1 -0
  424. package/dist/openapi/decorators/index.d.ts +11 -0
  425. package/dist/openapi/decorators/index.d.ts.map +1 -0
  426. package/dist/openapi/decorators/operation.d.ts +9 -0
  427. package/dist/openapi/decorators/operation.d.ts.map +1 -0
  428. package/dist/openapi/decorators/param.d.ts +17 -0
  429. package/dist/openapi/decorators/param.d.ts.map +1 -0
  430. package/dist/openapi/decorators/property.d.ts +24 -0
  431. package/dist/openapi/decorators/property.d.ts.map +1 -0
  432. package/dist/openapi/decorators/response.d.ts +10 -0
  433. package/dist/openapi/decorators/response.d.ts.map +1 -0
  434. package/dist/openapi/decorators/security.d.ts +9 -0
  435. package/dist/openapi/decorators/security.d.ts.map +1 -0
  436. package/dist/openapi/decorators/tags.d.ts +2 -0
  437. package/dist/openapi/decorators/tags.d.ts.map +1 -0
  438. package/dist/openapi/index.d.ts +10 -0
  439. package/dist/openapi/index.d.ts.map +1 -0
  440. package/dist/openapi/index.js +974 -0
  441. package/dist/openapi/index.js.map +31 -0
  442. package/dist/openapi/openapi.module.d.ts +46 -0
  443. package/dist/openapi/openapi.module.d.ts.map +1 -0
  444. package/dist/openapi/openapi.service.d.ts +55 -0
  445. package/dist/openapi/openapi.service.d.ts.map +1 -0
  446. package/dist/openapi/scalar.d.ts +16 -0
  447. package/dist/openapi/scalar.d.ts.map +1 -0
  448. package/dist/openapi/types.d.ts +266 -0
  449. package/dist/openapi/types.d.ts.map +1 -0
  450. package/dist/openapi/zod-to-json-schema.d.ts +34 -0
  451. package/dist/openapi/zod-to-json-schema.d.ts.map +1 -0
  452. package/dist/package.json +59 -0
  453. package/dist/queue/backends/bullmq.d.ts +41 -0
  454. package/dist/queue/backends/bullmq.d.ts.map +1 -0
  455. package/dist/queue/backends/cloudflare.d.ts +84 -0
  456. package/dist/queue/backends/cloudflare.d.ts.map +1 -0
  457. package/dist/queue/backends/index.d.ts +7 -0
  458. package/dist/queue/backends/index.d.ts.map +1 -0
  459. package/dist/queue/backends/memory.d.ts +24 -0
  460. package/dist/queue/backends/memory.d.ts.map +1 -0
  461. package/dist/queue/decorators/on-queue-ready.d.ts +43 -0
  462. package/dist/queue/decorators/on-queue-ready.d.ts.map +1 -0
  463. package/dist/queue/index.d.ts +57 -0
  464. package/dist/queue/index.d.ts.map +1 -0
  465. package/dist/queue/index.js +961 -0
  466. package/dist/queue/index.js.map +25 -0
  467. package/dist/queue/queue.module.d.ts +46 -0
  468. package/dist/queue/queue.module.d.ts.map +1 -0
  469. package/dist/queue/queue.service.d.ts +61 -0
  470. package/dist/queue/queue.service.d.ts.map +1 -0
  471. package/dist/queue/types.d.ts +204 -0
  472. package/dist/queue/types.d.ts.map +1 -0
  473. package/dist/redis/adapters/bun.d.ts +27 -0
  474. package/dist/redis/adapters/bun.d.ts.map +1 -0
  475. package/dist/redis/adapters/cloudflare.d.ts +51 -0
  476. package/dist/redis/adapters/cloudflare.d.ts.map +1 -0
  477. package/dist/redis/adapters/index.d.ts +29 -0
  478. package/dist/redis/adapters/index.d.ts.map +1 -0
  479. package/dist/redis/adapters/memory.d.ts +28 -0
  480. package/dist/redis/adapters/memory.d.ts.map +1 -0
  481. package/dist/redis/adapters/node.d.ts +36 -0
  482. package/dist/redis/adapters/node.d.ts.map +1 -0
  483. package/dist/redis/index.d.ts +33 -0
  484. package/dist/redis/index.d.ts.map +1 -0
  485. package/dist/redis/index.js +667 -0
  486. package/dist/redis/index.js.map +25 -0
  487. package/dist/redis/module.d.ts +32 -0
  488. package/dist/redis/module.d.ts.map +1 -0
  489. package/dist/redis/types.d.ts +146 -0
  490. package/dist/redis/types.d.ts.map +1 -0
  491. package/dist/schedule/backends/cloudflare.d.ts +55 -0
  492. package/dist/schedule/backends/cloudflare.d.ts.map +1 -0
  493. package/dist/schedule/backends/index.d.ts +3 -0
  494. package/dist/schedule/backends/index.d.ts.map +1 -0
  495. package/dist/schedule/backends/memory.d.ts +39 -0
  496. package/dist/schedule/backends/memory.d.ts.map +1 -0
  497. package/dist/schedule/cron-parser.d.ts +48 -0
  498. package/dist/schedule/cron-parser.d.ts.map +1 -0
  499. package/dist/schedule/decorators/cron.d.ts +71 -0
  500. package/dist/schedule/decorators/cron.d.ts.map +1 -0
  501. package/dist/schedule/index.d.ts +51 -0
  502. package/dist/schedule/index.d.ts.map +1 -0
  503. package/dist/schedule/index.js +1108 -0
  504. package/dist/schedule/index.js.map +25 -0
  505. package/dist/schedule/schedule.module.d.ts +44 -0
  506. package/dist/schedule/schedule.module.d.ts.map +1 -0
  507. package/dist/schedule/schedule.service.d.ts +51 -0
  508. package/dist/schedule/schedule.service.d.ts.map +1 -0
  509. package/dist/schedule/types.d.ts +150 -0
  510. package/dist/schedule/types.d.ts.map +1 -0
  511. package/dist/session/backends/cookie.d.ts +56 -0
  512. package/dist/session/backends/cookie.d.ts.map +1 -0
  513. package/dist/session/backends/drizzle.d.ts +65 -0
  514. package/dist/session/backends/drizzle.d.ts.map +1 -0
  515. package/dist/session/backends/index.d.ts +6 -0
  516. package/dist/session/backends/index.d.ts.map +1 -0
  517. package/dist/session/backends/memory.d.ts +32 -0
  518. package/dist/session/backends/memory.d.ts.map +1 -0
  519. package/dist/session/backends/redis.d.ts +53 -0
  520. package/dist/session/backends/redis.d.ts.map +1 -0
  521. package/dist/session/decorators/current-session.d.ts +56 -0
  522. package/dist/session/decorators/current-session.d.ts.map +1 -0
  523. package/dist/session/index.d.ts +42 -0
  524. package/dist/session/index.d.ts.map +1 -0
  525. package/dist/session/index.js +1498 -0
  526. package/dist/session/index.js.map +28 -0
  527. package/dist/session/session-middleware.d.ts +29 -0
  528. package/dist/session/session-middleware.d.ts.map +1 -0
  529. package/dist/session/session.module.d.ts +35 -0
  530. package/dist/session/session.module.d.ts.map +1 -0
  531. package/dist/session/session.service.d.ts +49 -0
  532. package/dist/session/session.service.d.ts.map +1 -0
  533. package/dist/session/types.d.ts +201 -0
  534. package/dist/session/types.d.ts.map +1 -0
  535. package/dist/shield/guards/csrf.d.ts +33 -0
  536. package/dist/shield/guards/csrf.d.ts.map +1 -0
  537. package/dist/shield/guards/headers.d.ts +22 -0
  538. package/dist/shield/guards/headers.d.ts.map +1 -0
  539. package/dist/shield/guards/index.d.ts +6 -0
  540. package/dist/shield/guards/index.d.ts.map +1 -0
  541. package/dist/shield/index.d.ts +8 -0
  542. package/dist/shield/index.d.ts.map +1 -0
  543. package/dist/shield/index.js +728 -0
  544. package/dist/shield/index.js.map +25 -0
  545. package/dist/shield/shield.module.d.ts +25 -0
  546. package/dist/shield/shield.module.d.ts.map +1 -0
  547. package/dist/shield/shield.service.d.ts +21 -0
  548. package/dist/shield/shield.service.d.ts.map +1 -0
  549. package/dist/shield/types.d.ts +95 -0
  550. package/dist/shield/types.d.ts.map +1 -0
  551. package/dist/sse/index.d.ts +7 -0
  552. package/dist/sse/index.d.ts.map +1 -0
  553. package/dist/sse/index.js +214 -0
  554. package/dist/sse/index.js.map +13 -0
  555. package/dist/sse/sse-stream.d.ts +46 -0
  556. package/dist/sse/sse-stream.d.ts.map +1 -0
  557. package/dist/sse/sse.d.ts +24 -0
  558. package/dist/sse/sse.d.ts.map +1 -0
  559. package/dist/sse/types.d.ts +84 -0
  560. package/dist/sse/types.d.ts.map +1 -0
  561. package/dist/static/index.d.ts +41 -0
  562. package/dist/static/index.d.ts.map +1 -0
  563. package/dist/static/index.js +313 -0
  564. package/dist/static/index.js.map +13 -0
  565. package/dist/static/static.module.d.ts +41 -0
  566. package/dist/static/static.module.d.ts.map +1 -0
  567. package/dist/static/static.service.d.ts +38 -0
  568. package/dist/static/static.service.d.ts.map +1 -0
  569. package/dist/tracing/decorators/index.d.ts +2 -0
  570. package/dist/tracing/decorators/index.d.ts.map +1 -0
  571. package/dist/tracing/decorators/trace.d.ts +37 -0
  572. package/dist/tracing/decorators/trace.d.ts.map +1 -0
  573. package/dist/tracing/hono-instrumentation.d.ts +21 -0
  574. package/dist/tracing/hono-instrumentation.d.ts.map +1 -0
  575. package/dist/tracing/index.d.ts +29 -0
  576. package/dist/tracing/index.d.ts.map +1 -0
  577. package/dist/tracing/index.js +782 -0
  578. package/dist/tracing/index.js.map +24 -0
  579. package/dist/tracing/module.d.ts +45 -0
  580. package/dist/tracing/module.d.ts.map +1 -0
  581. package/dist/tracing/propagation.d.ts +53 -0
  582. package/dist/tracing/propagation.d.ts.map +1 -0
  583. package/dist/tracing/service.d.ts +95 -0
  584. package/dist/tracing/service.d.ts.map +1 -0
  585. package/dist/tracing/types.d.ts +90 -0
  586. package/dist/tracing/types.d.ts.map +1 -0
  587. package/dist/upload/decorators/index.d.ts +6 -0
  588. package/dist/upload/decorators/index.d.ts.map +1 -0
  589. package/dist/upload/decorators/upload.d.ts +16 -0
  590. package/dist/upload/decorators/upload.d.ts.map +1 -0
  591. package/dist/upload/decorators/uploaded-file.d.ts +10 -0
  592. package/dist/upload/decorators/uploaded-file.d.ts.map +1 -0
  593. package/dist/upload/index.d.ts +9 -0
  594. package/dist/upload/index.d.ts.map +1 -0
  595. package/dist/upload/index.js +553 -0
  596. package/dist/upload/index.js.map +25 -0
  597. package/dist/upload/types.d.ts +103 -0
  598. package/dist/upload/types.d.ts.map +1 -0
  599. package/dist/upload/upload.middleware.d.ts +15 -0
  600. package/dist/upload/upload.middleware.d.ts.map +1 -0
  601. package/dist/upload/upload.module.d.ts +33 -0
  602. package/dist/upload/upload.module.d.ts.map +1 -0
  603. package/dist/upload/upload.service.d.ts +29 -0
  604. package/dist/upload/upload.service.d.ts.map +1 -0
  605. package/dist/view/edge.d.ts +23 -0
  606. package/dist/view/edge.d.ts.map +1 -0
  607. package/dist/view/eta.d.ts +30 -0
  608. package/dist/view/eta.d.ts.map +1 -0
  609. package/dist/view/index.d.ts +34 -0
  610. package/dist/view/index.d.ts.map +1 -0
  611. package/dist/view/index.js +240 -0
  612. package/dist/view/index.js.map +14 -0
  613. package/dist/view/inertia/default-ssr.d.ts +15 -0
  614. package/dist/view/inertia/default-ssr.d.ts.map +1 -0
  615. package/dist/view/inertia/form-helper.d.ts +102 -0
  616. package/dist/view/inertia/form-helper.d.ts.map +1 -0
  617. package/dist/view/inertia/form-middleware.d.ts +53 -0
  618. package/dist/view/inertia/form-middleware.d.ts.map +1 -0
  619. package/dist/view/inertia/helpers.d.ts +149 -0
  620. package/dist/view/inertia/helpers.d.ts.map +1 -0
  621. package/dist/view/inertia/index.d.ts +18 -0
  622. package/dist/view/inertia/index.d.ts.map +1 -0
  623. package/dist/view/inertia/inertia-adapter.d.ts +93 -0
  624. package/dist/view/inertia/inertia-adapter.d.ts.map +1 -0
  625. package/dist/view/inertia/inertia-response.d.ts +51 -0
  626. package/dist/view/inertia/inertia-response.d.ts.map +1 -0
  627. package/dist/view/inertia/ssr/index.d.ts +13 -0
  628. package/dist/view/inertia/ssr/index.d.ts.map +1 -0
  629. package/dist/view/inertia/ssr/react-adapter.d.ts +33 -0
  630. package/dist/view/inertia/ssr/react-adapter.d.ts.map +1 -0
  631. package/dist/view/inertia/ssr/registry.d.ts +42 -0
  632. package/dist/view/inertia/ssr/registry.d.ts.map +1 -0
  633. package/dist/view/inertia/ssr/solid-adapter.d.ts +31 -0
  634. package/dist/view/inertia/ssr/solid-adapter.d.ts.map +1 -0
  635. package/dist/view/inertia/ssr/svelte-adapter.d.ts +31 -0
  636. package/dist/view/inertia/ssr/svelte-adapter.d.ts.map +1 -0
  637. package/dist/view/inertia/ssr/vue-adapter.d.ts +26 -0
  638. package/dist/view/inertia/ssr/vue-adapter.d.ts.map +1 -0
  639. package/dist/view/inertia/types.d.ts +131 -0
  640. package/dist/view/inertia/types.d.ts.map +1 -0
  641. package/dist/view/rendu.d.ts +11 -0
  642. package/dist/view/rendu.d.ts.map +1 -0
  643. package/dist/view/types.d.ts +52 -0
  644. package/dist/view/types.d.ts.map +1 -0
  645. package/dist/view/view-engine.d.ts +28 -0
  646. package/dist/view/view-engine.d.ts.map +1 -0
  647. package/dist/ws/client.d.ts +42 -0
  648. package/dist/ws/client.d.ts.map +1 -0
  649. package/dist/ws/decorators.d.ts +44 -0
  650. package/dist/ws/decorators.d.ts.map +1 -0
  651. package/dist/ws/index.d.ts +57 -0
  652. package/dist/ws/index.d.ts.map +1 -0
  653. package/dist/ws/index.js +796 -0
  654. package/dist/ws/index.js.map +26 -0
  655. package/dist/ws/module.d.ts +48 -0
  656. package/dist/ws/module.d.ts.map +1 -0
  657. package/dist/ws/runtime/bun.d.ts +41 -0
  658. package/dist/ws/runtime/bun.d.ts.map +1 -0
  659. package/dist/ws/runtime/index.d.ts +14 -0
  660. package/dist/ws/runtime/index.d.ts.map +1 -0
  661. package/dist/ws/runtime/node.d.ts +46 -0
  662. package/dist/ws/runtime/node.d.ts.map +1 -0
  663. package/dist/ws/runtime/types.d.ts +18 -0
  664. package/dist/ws/runtime/types.d.ts.map +1 -0
  665. package/dist/ws/service.d.ts +65 -0
  666. package/dist/ws/service.d.ts.map +1 -0
  667. package/dist/ws/types.d.ts +77 -0
  668. package/dist/ws/types.d.ts.map +1 -0
  669. package/package.json +262 -0
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Application.
3
+ *
4
+ * The Application is the user-facing entry point: it owns the DI container,
5
+ * the HTTP server, and the view engine. Typical bootstrap:
6
+ *
7
+ * ```ts
8
+ * const app = await new Application(AppModule).bootstrap();
9
+ * await app.listen(3000);
10
+ * ```
11
+ *
12
+ * The class is intentionally small — every feature (DI, HTTP, ORM, view)
13
+ * is a separate concern with its own module. Application composes them.
14
+ */
15
+ import "reflect-metadata";
16
+ import { ApplicationContainer } from "./di/container.js";
17
+ import { NexusServer, type NexusServerOptions } from "./http/server.js";
18
+ import type { ViewAdapter } from "../view/types.js";
19
+ import type { Type } from "./di/tokens.js";
20
+ import { Inertia, type InertiaConfig } from "../view/inertia/index.js";
21
+ export interface ApplicationOptions extends NexusServerOptions {
22
+ /** Default view adapter. Defaults to Rendu. */
23
+ viewAdapter?: ViewAdapter;
24
+ /** Inertia configuration. If supplied, `app.inertia` is initialized. */
25
+ inertia?: InertiaConfig;
26
+ }
27
+ export declare class Application {
28
+ readonly container: ApplicationContainer;
29
+ readonly server: NexusServer;
30
+ /** Inertia adapter (or `null` if not configured). Always defined after ctor. */
31
+ readonly inertia: Inertia | null;
32
+ private viewAdapter;
33
+ constructor(rootModule: Type<any>, options?: ApplicationOptions);
34
+ /** Try to load nx.config.ts and apply runtime-relevant settings. */
35
+ private tryLoadNxConfig;
36
+ /** Replace the default view adapter. */
37
+ setViewAdapter(adapter: ViewAdapter): this;
38
+ /**
39
+ * Set the directories to search when a controller returns
40
+ * `{ view: 'about.html' }`. Defaults to `[]` (no file-based
41
+ * views; controllers must pass inline template source).
42
+ *
43
+ * The Application auto-loads nx.config.ts at construction time, so if
44
+ * you already set viewPaths there, no explicit call is needed.
45
+ * This method exists to override the config-file value at runtime.
46
+ *
47
+ * Typical setup in nx.config.ts (auto-detected):
48
+ *
49
+ * export default {
50
+ * view: 'rendu',
51
+ * viewPaths: 'resources/views',
52
+ * };
53
+ *
54
+ * After this, `@Get('/about') return { view: 'about.html', data }`
55
+ * loads `views/about.html` from disk instead of treating the
56
+ * string as inline template source.
57
+ *
58
+ * Edge-only runtimes (Cloudflare Workers) should leave this
59
+ * empty and pass inline template strings.
60
+ */
61
+ setViewPaths(path: string): this;
62
+ /** Render a view using the configured adapter. */
63
+ render(view: string, data?: Record<string, any>): Promise<string>;
64
+ /**
65
+ * Convenience: start the server using the auto-detected runtime adapter.
66
+ */
67
+ listen(port?: number): Promise<any>;
68
+ /**
69
+ * For Cloudflare / Workers: return the fetch handler.
70
+ */
71
+ get fetch(): (req: Request, env?: any, ctx?: any) => Promise<Response>;
72
+ /**
73
+ * Static factory that mirrors the typical `bootstrap()` pattern.
74
+ */
75
+ static bootstrap(rootModule: Type<any>, options?: ApplicationOptions): Application;
76
+ }
77
+ //# sourceMappingURL=application.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/core/application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC7D,+CAA+C;IAC/C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,qBAAa,WAAW;IACvB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,WAAW,CAAc;gBAErB,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,GAAE,kBAAuB;IAmDnE,oEAAoE;IACpE,OAAO,CAAC,eAAe;IAiBvB,wCAAwC;IACxC,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAK1C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKhC,kDAAkD;IAC5C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI3E;;OAEG;IACG,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAOzC;;OAEG;IACH,IAAI,KAAK,8DAER;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CACf,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,EACrB,OAAO,CAAC,EAAE,kBAAkB,GAC1B,WAAW;CAGd"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Metadata keys used by reflect-metadata for storing decorator data.
3
+ *
4
+ * These constants are the contract between decorators and the framework
5
+ * core (DI container, router, validator).
6
+ */
7
+ export declare const METADATA_KEY: {
8
+ /** Marks a class as a Nest-style controller, stores route prefix. */
9
+ readonly CONTROLLER: "nexus:controller";
10
+ /** Marks a class as an injectable provider. */
11
+ readonly INJECTABLE: "nexus:injectable";
12
+ /** Marks a class as a repository. */
13
+ readonly REPOSITORY: "nexus:repository";
14
+ /** Marks a class as a module. Stores module options. */
15
+ readonly MODULE: "nexus:module";
16
+ /** HTTP method routes registered on a controller (Get/Post/...). */
17
+ readonly ROUTES: "nexus:routes";
18
+ /** Method parameter type metadata (body/query/param/headers/ctx). */
19
+ readonly PARAMS: "nexus:params";
20
+ /** Validation schema per method (Zod schema or class). */
21
+ readonly VALIDATE: "nexus:validate";
22
+ /** Class-level design:paramtypes (built-in). */
23
+ readonly PARAMTYPES: "design:paramtypes";
24
+ /** Class-level design:type (built-in). */
25
+ readonly TYPE: "design:type";
26
+ /** Class-level design:returntype (built-in). */
27
+ readonly RETURNTYPE: "design:returntype";
28
+ /** Provider token to inject for a parameter (for custom tokens). */
29
+ readonly INJECT: "nexus:inject";
30
+ };
31
+ export type MetadataKey = (typeof METADATA_KEY)[keyof typeof METADATA_KEY];
32
+ /** Available parameter decorator locations. */
33
+ export declare const PARAM_TYPES: {
34
+ readonly REQUEST: 0;
35
+ readonly RESPONSE: 1;
36
+ readonly NEXT: 2;
37
+ readonly BODY: 3;
38
+ readonly QUERY: 4;
39
+ readonly PARAM: 5;
40
+ readonly HEADERS: 6;
41
+ readonly CTX: 7;
42
+ readonly USER: 8;
43
+ };
44
+ export type ParamType = (typeof PARAM_TYPES)[keyof typeof PARAM_TYPES];
45
+ /** HTTP methods supported by the router. */
46
+ export declare const HTTP_METHODS: readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"];
47
+ export type HttpMethod = (typeof HTTP_METHODS)[number];
48
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;IACxB,qEAAqE;;IAGrE,+CAA+C;;IAG/C,qCAAqC;;IAGrC,wDAAwD;;IAGxD,oEAAoE;;IAGpE,qEAAqE;;IAGrE,0DAA0D;;IAG1D,gDAAgD;;IAGhD,0CAA0C;;IAG1C,gDAAgD;;IAGhD,oEAAoE;;CAE3D,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE3E,+CAA+C;AAC/C,eAAO,MAAM,WAAW;;;;;;;;;;CAUd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEvE,4CAA4C;AAC5C,eAAO,MAAM,YAAY,uEAQf,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @Controller decorator.
3
+ *
4
+ * Marks a class as a controller and registers a route prefix.
5
+ * Routes inside the controller class are decorated with @Get/@Post/etc.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * @Controller('/users')
10
+ * class UserController {
11
+ * @Get('/')
12
+ * list() { ... }
13
+ * }
14
+ * ```
15
+ */
16
+ import "reflect-metadata";
17
+ import type { ControllerMetadata } from "../di/tokens.js";
18
+ export declare function Controller(prefix?: string): ClassDecorator;
19
+ export declare function getControllerMetadata(target: any): ControllerMetadata;
20
+ export declare function isController(target: any): boolean;
21
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,wBAAgB,UAAU,CAAC,MAAM,GAAE,MAAY,GAAG,cAAc,CAM/D;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,kBAAkB,CAIrE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAEjD"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * HTTP method decorators.
3
+ *
4
+ * `@Get`, `@Post`, `@Put`, `@Delete`, `@Patch`, `@Options`, `@Head` mark a
5
+ * controller method as a route handler. The path argument is appended to
6
+ * the controller's prefix.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * @Controller('/users')
11
+ * class UserController {
12
+ * @Get('/')
13
+ * list() {}
14
+ *
15
+ * @Post('/')
16
+ * create(@Body() body: CreateUserDto) {}
17
+ * }
18
+ * ```
19
+ */
20
+ import "reflect-metadata";
21
+ import { HTTP_METHODS } from "../constants.js";
22
+ import type { RouteMetadata } from "../di/tokens.js";
23
+ export declare const Get: (path?: string) => MethodDecorator;
24
+ export declare const Post: (path?: string) => MethodDecorator;
25
+ export declare const Put: (path?: string) => MethodDecorator;
26
+ export declare const Delete: (path?: string) => MethodDecorator;
27
+ export declare const Patch: (path?: string) => MethodDecorator;
28
+ export declare const Options: (path?: string) => MethodDecorator;
29
+ export declare const Head: (path?: string) => MethodDecorator;
30
+ export declare function getRoutes(target: any): RouteMetadata[];
31
+ export { HTTP_METHODS };
32
+ export type { RouteMetadata };
33
+ //# sourceMappingURL=http-methods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-methods.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/http-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAiC,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA2BrD,eAAO,MAAM,GAAG,GAAI,OAAM,MAAY,oBAA6B,CAAC;AACpE,eAAO,MAAM,IAAI,GAAI,OAAM,MAAY,oBAA8B,CAAC;AACtE,eAAO,MAAM,GAAG,GAAI,OAAM,MAAY,oBAA6B,CAAC;AACpE,eAAO,MAAM,MAAM,GAAI,OAAM,MAAY,oBAAgC,CAAC;AAC1E,eAAO,MAAM,KAAK,GAAI,OAAM,MAAY,oBAA+B,CAAC;AACxE,eAAO,MAAM,OAAO,GAAI,OAAM,MAAY,oBAAiC,CAAC;AAC5E,eAAO,MAAM,IAAI,GAAI,OAAM,MAAY,oBAA8B,CAAC;AAEtE,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,EAAE,CAEtD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Convenience barrel for all decorators.
3
+ */
4
+ export * from "./module.js";
5
+ export * from "./controller.js";
6
+ export * from "./injectable.js";
7
+ export * from "./http-methods.js";
8
+ export * from "./params.js";
9
+ export * from "./validate.js";
10
+ export * from "./repository.js";
11
+ export * from "./metadata.js";
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @Injectable decorator.
3
+ *
4
+ * Marks a class as available for DI. The container uses reflect-metadata's
5
+ * `design:paramtypes` to read constructor parameter types and resolve them
6
+ * automatically.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * @Injectable()
11
+ * class UserService {
12
+ * constructor(private repo: UserRepository) {}
13
+ * }
14
+ *
15
+ * @Injectable({ scope: 'request' })
16
+ * class RequestContext {
17
+ * constructor(@Inject(REQUEST) private req: any) {}
18
+ * }
19
+ * ```
20
+ */
21
+ import "reflect-metadata";
22
+ export interface InjectableOptions {
23
+ scope?: "singleton" | "request" | "transient";
24
+ }
25
+ export declare function Injectable(options?: InjectableOptions): ClassDecorator;
26
+ export declare function isInjectable(target: any): boolean;
27
+ /**
28
+ * Read the scope declared on a class via `@Injectable({ scope })`.
29
+ * Returns undefined when no scope is declared (defaults to singleton).
30
+ */
31
+ export declare function getScope(target: any): "singleton" | "request" | "transient" | undefined;
32
+ /**
33
+ * Mark a parameter as resolved by a specific token instead of its declared
34
+ * type. Useful for interfaces, abstract classes, or string tokens.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * constructor(@Inject('CONFIG') private config: AppConfig) {}
39
+ * ```
40
+ */
41
+ export declare function Inject<T = any>(token: any): ParameterDecorator;
42
+ //# sourceMappingURL=injectable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectable.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/injectable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,kBAAkB,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IACjC,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,cAAc,CAW1E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAEjD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACvB,MAAM,EAAE,GAAG,GACT,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,kBAAkB,CAW9D"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reflect-metadata helper. Centralizes the keys the framework uses so
3
+ * decorator files stay clean.
4
+ */
5
+ export { METADATA_KEY, PARAM_TYPES, HTTP_METHODS } from "../constants.js";
6
+ export type { MetadataKey, ParamType, HttpMethod } from "../constants.js";
7
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @Module decorator.
3
+ *
4
+ * Marks a class as a Nest-style module: a logical grouping of
5
+ * controllers and providers with explicit imports/exports.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * @Module({
10
+ * imports: [UserModule],
11
+ * controllers: [UserController],
12
+ * providers: [UserService],
13
+ * exports: [UserService],
14
+ * })
15
+ * class AppModule {}
16
+ * ```
17
+ */
18
+ import "reflect-metadata";
19
+ import type { ModuleOptions, Type } from "../di/tokens.js";
20
+ export declare function Module(options?: ModuleOptions): ClassDecorator;
21
+ /** Read the @Module options from a class. */
22
+ export declare function getModuleOptions(target: Type<any>): ModuleOptions;
23
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE3D,wBAAgB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,cAAc,CAIlE;AAED,6CAA6C;AAC7C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,aAAa,CAEjE"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Parameter decorators.
3
+ *
4
+ * These mark a controller method argument as a source of request data:
5
+ * - `@Req()` → Hono context
6
+ * - `@Res()` → Response helper
7
+ * - `@Next()` → next() callback (for middleware-style handlers)
8
+ * - `@Body()` → request body (parsed)
9
+ * - `@Query('key')` → a single query param, or full query object
10
+ * - `@Param('key')` → a single path param, or full params object
11
+ * - `@Headers('k')` → a single header, or full headers object
12
+ * - `@Ctx()` → Hono context (alias for @Req)
13
+ * - `@User()` → authenticated user (resolved via auth provider)
14
+ *
15
+ * The metadata is read by the router at mount time to build the
16
+ * handler invocation list.
17
+ */
18
+ import "reflect-metadata";
19
+ import { PARAM_TYPES } from "../constants.js";
20
+ import type { ParamMetadata } from "../di/tokens.js";
21
+ export declare function createParamDecorator(type: number, data?: string | object): ParameterDecorator;
22
+ export declare const Req: () => ParameterDecorator;
23
+ export declare const Res: () => ParameterDecorator;
24
+ export declare const Next: () => ParameterDecorator;
25
+ export declare const Body: (key?: string) => ParameterDecorator;
26
+ export declare const Query: (key?: string) => ParameterDecorator;
27
+ export declare const Param: (key?: string) => ParameterDecorator;
28
+ export declare const Headers: (key?: string) => ParameterDecorator;
29
+ export declare const Ctx: () => ParameterDecorator;
30
+ export declare const User: () => ParameterDecorator;
31
+ export declare function getParamMetadata(target: any, propertyKey: string | symbol): ParamMetadata[];
32
+ export { PARAM_TYPES };
33
+ //# sourceMappingURL=params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAgB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GACpB,kBAAkB,CA8BpB;AAED,eAAO,MAAM,GAAG,0BAAkD,CAAC;AACnE,eAAO,MAAM,GAAG,0BAAmD,CAAC;AACpE,eAAO,MAAM,IAAI,0BAA+C,CAAC;AACjE,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,uBACW,CAAC;AAC7C,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,uBACW,CAAC;AAC9C,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,uBACW,CAAC;AAC9C,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,uBACW,CAAC;AAChD,eAAO,MAAM,GAAG,0BAA8C,CAAC;AAC/D,eAAO,MAAM,IAAI,0BAA+C,CAAC;AAEjE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,GAAG,MAAM,GAC1B,aAAa,EAAE,CAEjB;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @Repository decorator.
3
+ *
4
+ * Marks a class as a Spring-style repository. Repositories are normal
5
+ * `@Injectable()` classes; the decorator is a marker so the framework
6
+ * can register them with a database adapter (Drizzle/Prisma) and emit
7
+ * a friendly error if you forget to wire one.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * @Repository()
12
+ * class UserRepository {
13
+ * findAll() { return db.select().from(users); }
14
+ * }
15
+ * ```
16
+ */
17
+ import "reflect-metadata";
18
+ import type { InjectionToken } from "../di/tokens.js";
19
+ export declare function Repository(entityToken?: InjectionToken<any>): ClassDecorator;
20
+ export declare function getRepositoryMetadata(target: any): {
21
+ entity?: InjectionToken<any>;
22
+ } | undefined;
23
+ export declare function isRepository(target: any): boolean;
24
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/repository.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wBAAgB,UAAU,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAS5E;AAED,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,GAAG,GACT;IAAE,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;CAAE,GAAG,SAAS,CAE9C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAEjD"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @Validate decorator.
3
+ *
4
+ * Attaches Zod schemas (or class validators) to a route handler. Each
5
+ * schema is run against the corresponding request part before the handler
6
+ * executes; failed validation throws or returns a 400 response.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const UserSchema = z.object({ name: z.string(), email: z.email() });
11
+ *
12
+ * @Post('/')
13
+ * @Validate({ body: UserSchema })
14
+ * create(@Body() body: z.infer<typeof UserSchema>) { ... }
15
+ * ```
16
+ */
17
+ import "reflect-metadata";
18
+ import type { ValidationMetadata } from "../di/tokens.js";
19
+ export declare function Validate(options: ValidationMetadata): MethodDecorator;
20
+ export declare function getValidationMetadata(target: any, propertyKey: string | symbol): ValidationMetadata | undefined;
21
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/core/decorators/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,eAAe,CAarE;AAED,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,GAAG,MAAM,GAC1B,kBAAkB,GAAG,SAAS,CAEhC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Dependency Injection Container.
3
+ *
4
+ * The container is the heart of the framework. It:
5
+ * - Registers providers (classes, values, factories, aliases)
6
+ * - Resolves dependencies recursively through reflect-metadata
7
+ * - Manages instance lifecycles (singleton / request / transient)
8
+ * - Detects circular dependencies and throws helpful errors
9
+ *
10
+ * Design notes:
11
+ * - Modules each have their own container scope, but share the root
12
+ * container for global providers. Exports propagate tokens upward.
13
+ * - The container is lazy: nothing is instantiated until first resolve.
14
+ */
15
+ import "reflect-metadata";
16
+ import type { InjectionToken, Provider, Type } from "./tokens.js";
17
+ export declare class DIContainer {
18
+ /** Token -> provider record. */
19
+ private providers;
20
+ /** Token -> singleton instance (lazy). */
21
+ private singletons;
22
+ /** Token -> "currently resolving" flag for cycle detection. */
23
+ private resolving;
24
+ /** Parent container (for hierarchical lookup of exports). */
25
+ private parent?;
26
+ constructor(parent?: DIContainer);
27
+ /** Create a child container (used by modules). */
28
+ createChild(): DIContainer;
29
+ /** Register a provider or list of providers. */
30
+ register(providers: Provider<any> | Provider<any>[]): void;
31
+ private registerOne;
32
+ /**
33
+ * Normalize a provider union into a uniform ProviderRecord.
34
+ * - Type<...> → useClass equivalent
35
+ * - { useClass | useValue | useFactory | useExisting } → as-is
36
+ */
37
+ private normalizeProvider;
38
+ /** Read constructor parameter types from a class using reflect-metadata. */
39
+ private readClassDependencies;
40
+ /** Read dependencies from a structured provider's `inject` array (factory). */
41
+ private readProviderDependencies;
42
+ /**
43
+ * Resolve a token to an instance. Walks up the parent chain on miss.
44
+ * Returns undefined when nothing is registered and the token is optional.
45
+ */
46
+ resolve<T = any>(token: InjectionToken<T>): T;
47
+ /** Try to resolve; return undefined instead of throwing when missing. */
48
+ tryResolve<T = any>(token: InjectionToken<T>): T | undefined;
49
+ /**
50
+ * Instantiate a single provider record. Calls itself recursively
51
+ * for each constructor parameter.
52
+ */
53
+ private instantiate;
54
+ /** Check whether a token is registered locally (does not consult parent). */
55
+ has(token: InjectionToken<any>): boolean;
56
+ /** Inspect the registered tokens (debug aid). */
57
+ list(): string[];
58
+ private isClass;
59
+ private tokenName;
60
+ }
61
+ /**
62
+ * Root application container. Modules created via @Module register their
63
+ * providers into child containers of this root.
64
+ */
65
+ export declare class ApplicationContainer extends DIContainer {
66
+ private moduleContainers;
67
+ registerModule(moduleClass: Type<any>, container: DIContainer): void;
68
+ getModuleContainer(moduleClass: Type<any>): DIContainer | undefined;
69
+ }
70
+ //# sourceMappingURL=container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/core/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAEX,cAAc,EACd,QAAQ,EAER,IAAI,EAEJ,MAAM,aAAa,CAAC;AAWrB,qBAAa,WAAW;IACvB,gCAAgC;IAChC,OAAO,CAAC,SAAS,CAAkD;IAEnE,0CAA0C;IAC1C,OAAO,CAAC,UAAU,CAAuC;IAEzD,+DAA+D;IAC/D,OAAO,CAAC,SAAS,CAAkC;IAEnD,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAC,CAAc;gBAEjB,MAAM,CAAC,EAAE,WAAW;IAIhC,kDAAkD;IAClD,WAAW,IAAI,WAAW;IAI1B,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI;IAO1D,OAAO,CAAC,WAAW;IAWnB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA2BzB,4EAA4E;IAC5E,OAAO,CAAC,qBAAqB;IAU7B,+EAA+E;IAC/E,OAAO,CAAC,wBAAwB;IAsBhC;;;OAGG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC;IAyD7C,yEAAyE;IACzE,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS;IAQ5D;;;OAGG;IACH,OAAO,CAAC,WAAW;IAoGnB,6EAA6E;IAC7E,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,OAAO;IAIxC,iDAAiD;IACjD,IAAI,IAAI,MAAM,EAAE;IAIhB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;CAKjB;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACpD,OAAO,CAAC,gBAAgB,CAAqC;IAE7D,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI;IAIpE,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,WAAW,GAAG,SAAS;CAGnE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * DI barrel exports.
3
+ */
4
+ export * from "./tokens.js";
5
+ export * from "./container.js";
6
+ export * from "./scanner.js";
7
+ export * from "./request-scope.js";
8
+ export { requestScopeMiddleware } from "./request-middleware.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/di/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Hono middleware that activates a `RequestScope` for the duration
3
+ * of an HTTP request. The scope is held in `AsyncLocalStorage` and
4
+ * propagated through the entire async call tree.
5
+ *
6
+ * - At request start: build a new `RequestScope` (with a child
7
+ * DI container that inherits from the application's container).
8
+ * - Run the rest of the request inside the scope.
9
+ * - At request end: the scope (and child container) is dropped,
10
+ * so all per-request state is garbage-collected.
11
+ *
12
+ * The framework installs this middleware on the Hono app at
13
+ * `NexusServer.start()` / `Application.listen()` time.
14
+ */
15
+ import type { MiddlewareHandler } from "hono";
16
+ import { DIContainer } from "./container.js";
17
+ /**
18
+ * One-time setup: register the `REQUEST` and `REQUEST_SCOPE` tokens
19
+ * on the root container. The factory reads the active scope on
20
+ * each resolve, so the same `REQUEST` always points at the
21
+ * current request regardless of which container resolves it.
22
+ *
23
+ * Idempotent — calling it twice is a no-op.
24
+ */
25
+ export declare function installRequestTokens(root: DIContainer): void;
26
+ /**
27
+ * Build the request-scope middleware against the given root container.
28
+ * The root container is the application's `ApplicationContainer` —
29
+ * the one that holds every singleton provider.
30
+ *
31
+ * Call `installRequestTokens(root)` once before the server starts.
32
+ * (The framework does this for you; you only need to call this
33
+ * factory directly when wiring a custom Hono app.)
34
+ */
35
+ export declare function requestScopeMiddleware(root: DIContainer): MiddlewareHandler;
36
+ //# sourceMappingURL=request-middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-middleware.d.ts","sourceRoot":"","sources":["../../../src/core/di/request-middleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQ7C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAe5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,iBAAiB,CAS3E"}
@@ -0,0 +1,45 @@
1
+ import type { DIContainer } from "./container.js";
2
+ /** The Hono context type. Kept loose to avoid a circular import. */
3
+ export type HonoContext = any;
4
+ /**
5
+ * Per-request state. Created by the HTTP middleware, lives for the
6
+ * duration of a single request, and is propagated through the entire
7
+ * async call tree via `AsyncLocalStorage`.
8
+ */
9
+ export interface RequestScope {
10
+ /** Unique id for this request. Useful for log correlation. */
11
+ readonly id: string;
12
+ /** The Hono context (c). */
13
+ context: HonoContext;
14
+ /** A per-request DI container (singleton container + this scope). */
15
+ container: DIContainer;
16
+ /** User-extensible state bag. Modules can stash request-scoped data here. */
17
+ state: Map<string | symbol, unknown>;
18
+ }
19
+ /** Symbol token: inject the active Hono context. */
20
+ export declare const REQUEST: unique symbol;
21
+ /** Symbol token: inject the entire RequestScope. */
22
+ export declare const REQUEST_SCOPE: unique symbol;
23
+ /** Internal: read/write access to the AsyncLocalStorage slot. */
24
+ export declare const RequestScopeStorage: {
25
+ /** Get the current scope, or `undefined` if not inside a request. */
26
+ get(): RequestScope | undefined;
27
+ /**
28
+ * Run `fn` inside a new request scope. The scope is propagated
29
+ * through the async call tree.
30
+ */
31
+ run<T>(scope: RequestScope, fn: () => T | Promise<T>): T | Promise<T>;
32
+ /**
33
+ * Create a new scope. Used by the HTTP middleware.
34
+ */
35
+ create(context: HonoContext, container: DIContainer): RequestScope;
36
+ };
37
+ /** Get the active Hono context, or `undefined` if not in a request. */
38
+ export declare function getRequest<T = HonoContext>(): T | undefined;
39
+ /** Get the active RequestScope, or `undefined`. */
40
+ export declare function getRequestScope(): RequestScope | undefined;
41
+ /** Get a piece of request-scoped state by key. */
42
+ export declare function getRequestState<T = unknown>(key: string | symbol): T | undefined;
43
+ /** Set a piece of request-scoped state. */
44
+ export declare function setRequestState(key: string | symbol, value: unknown): void;
45
+ //# sourceMappingURL=request-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-scope.d.ts","sourceRoot":"","sources":["../../../src/core/di/request-scope.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,oEAAoE;AACpE,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAE9B;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,OAAO,EAAE,WAAW,CAAC;IACrB,qEAAqE;IACrE,SAAS,EAAE,WAAW,CAAC;IACvB,6EAA6E;IAC7E,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,oDAAoD;AACpD,eAAO,MAAM,OAAO,eAA8B,CAAC;AAEnD,oDAAoD;AACpD,eAAO,MAAM,aAAa,eAAoC,CAAC;AAS/D,iEAAiE;AACjE,eAAO,MAAM,mBAAmB;IAC/B,qEAAqE;WAC9D,YAAY,GAAG,SAAS;IAG/B;;;OAGG;QACC,CAAC,SAAS,YAAY,MAAM,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAGrE;;OAEG;oBACa,WAAW,aAAa,WAAW,GAAG,YAAY;CAQlE,CAAC;AAMF,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,CAAC,GAAG,WAAW,KAAK,CAAC,GAAG,SAAS,CAE3D;AAED,mDAAmD;AACnD,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAE1D;AAED,kDAAkD;AAClD,wBAAgB,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,SAAS,CAEhF;AAED,2CAA2C;AAC3C,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAG1E"}
@@ -0,0 +1,36 @@
1
+ import type { ApplicationContainer, DIContainer } from "./container.js";
2
+ import type { Provider, Type } from "./tokens.js";
3
+ interface ScanResult {
4
+ /** Controllers registered by this module. */
5
+ controllers: Type[];
6
+ /** Providers registered locally (classes + non-class providers). */
7
+ providers: Provider[];
8
+ /** Tokens exported by this module. */
9
+ exports: any[];
10
+ /** Container holding the module's locally-scoped providers. */
11
+ container: DIContainer;
12
+ }
13
+ export declare class ModuleScanner {
14
+ private root;
15
+ private scanned;
16
+ constructor(root: ApplicationContainer);
17
+ /**
18
+ * Scan a module tree starting from `rootModule`, registering all
19
+ * providers and controllers into the appropriate containers.
20
+ */
21
+ scan(rootModule: Type<any>): {
22
+ root: ScanResult;
23
+ modules: ScanResult[];
24
+ };
25
+ /**
26
+ * Scan one module. Recurses into its `imports`, then registers its
27
+ * providers and controllers. Exports are exposed to the parent
28
+ * container.
29
+ */
30
+ private scanModule;
31
+ private readModuleOptions;
32
+ /** Get a previously-scanned module's result (debug aid). */
33
+ get(moduleClass: Type<any>): ScanResult | undefined;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../../src/core/di/scanner.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAiB,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEjE,UAAU,UAAU;IACnB,6CAA6C;IAC7C,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,oEAAoE;IACpE,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,sCAAsC;IACtC,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,+DAA+D;IAC/D,SAAS,EAAE,WAAW,CAAC;CACvB;AAED,qBAAa,aAAa;IAGb,OAAO,CAAC,IAAI;IAFxB,OAAO,CAAC,OAAO,CAAoC;gBAE/B,IAAI,EAAE,oBAAoB;IAE9C;;;OAGG;IACH,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;IAMxE;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAiElB,OAAO,CAAC,iBAAiB;IAYzB,4DAA4D;IAC5D,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,GAAG,SAAS;CAGnD"}