@lenne.tech/nest-server 11.43.2 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1404) hide show
  1. package/.claude/rules/architecture.md +82 -0
  2. package/.claude/rules/module-deprecation.md +3 -2
  3. package/.claude/rules/package-management.md +26 -15
  4. package/.claude/rules/role-system.md +17 -0
  5. package/.claude/rules/testing.md +24 -15
  6. package/CLAUDE.md +29 -4
  7. package/FRAMEWORK-API.md +215 -215
  8. package/bin/migrate.js +18 -17
  9. package/bin/package.json +3 -0
  10. package/dist/config.env.d.ts +1 -1
  11. package/dist/config.env.js +34 -43
  12. package/dist/config.env.js.map +1 -1
  13. package/dist/core/common/args/filter.args.d.ts +2 -2
  14. package/dist/core/common/args/filter.args.js +13 -16
  15. package/dist/core/common/args/filter.args.js.map +1 -1
  16. package/dist/core/common/args/pagination.args.d.ts +2 -2
  17. package/dist/core/common/args/pagination.args.js +20 -23
  18. package/dist/core/common/args/pagination.args.js.map +1 -1
  19. package/dist/core/common/decorators/api-methods.decorator.js +3 -7
  20. package/dist/core/common/decorators/api-methods.decorator.js.map +1 -1
  21. package/dist/core/common/decorators/common-error.decorator.js +6 -10
  22. package/dist/core/common/decorators/common-error.decorator.js.map +1 -1
  23. package/dist/core/common/decorators/current-user.decorator.js +3 -6
  24. package/dist/core/common/decorators/current-user.decorator.js.map +1 -1
  25. package/dist/core/common/decorators/graphql-populate.decorator.d.ts +1 -1
  26. package/dist/core/common/decorators/graphql-populate.decorator.js +3 -6
  27. package/dist/core/common/decorators/graphql-populate.decorator.js.map +1 -1
  28. package/dist/core/common/decorators/graphql-service-options.decorator.d.ts +1 -1
  29. package/dist/core/common/decorators/graphql-service-options.decorator.js +7 -10
  30. package/dist/core/common/decorators/graphql-service-options.decorator.js.map +1 -1
  31. package/dist/core/common/decorators/graphql-user.decorator.js +4 -7
  32. package/dist/core/common/decorators/graphql-user.decorator.js.map +1 -1
  33. package/dist/core/common/decorators/nested-type.registry.js +3 -7
  34. package/dist/core/common/decorators/nested-type.registry.js.map +1 -1
  35. package/dist/core/common/decorators/response-model.decorator.d.ts +1 -1
  36. package/dist/core/common/decorators/response-model.decorator.js +3 -7
  37. package/dist/core/common/decorators/response-model.decorator.js.map +1 -1
  38. package/dist/core/common/decorators/rest-service-options.decorator.js +4 -7
  39. package/dist/core/common/decorators/rest-service-options.decorator.js.map +1 -1
  40. package/dist/core/common/decorators/rest-user.decorator.js +2 -5
  41. package/dist/core/common/decorators/rest-user.decorator.js.map +1 -1
  42. package/dist/core/common/decorators/restricted.decorator.d.ts +3 -3
  43. package/dist/core/common/decorators/restricted.decorator.js +42 -52
  44. package/dist/core/common/decorators/restricted.decorator.js.map +1 -1
  45. package/dist/core/common/decorators/restrictions-checked.marker.js +8 -14
  46. package/dist/core/common/decorators/restrictions-checked.marker.js.map +1 -1
  47. package/dist/core/common/decorators/roles.decorator.js +2 -6
  48. package/dist/core/common/decorators/roles.decorator.js.map +1 -1
  49. package/dist/core/common/decorators/translatable.decorator.js +4 -9
  50. package/dist/core/common/decorators/translatable.decorator.js.map +1 -1
  51. package/dist/core/common/decorators/unified-field.decorator.d.ts +4 -4
  52. package/dist/core/common/decorators/unified-field.decorator.js +56 -64
  53. package/dist/core/common/decorators/unified-field.decorator.js.map +1 -1
  54. package/dist/core/common/enums/comparison-operator.enum.js +4 -7
  55. package/dist/core/common/enums/comparison-operator.enum.js.map +1 -1
  56. package/dist/core/common/enums/logical-operator.enum.js +4 -7
  57. package/dist/core/common/enums/logical-operator.enum.js.map +1 -1
  58. package/dist/core/common/enums/process-type.enum.js +2 -5
  59. package/dist/core/common/enums/process-type.enum.js.map +1 -1
  60. package/dist/core/common/enums/role.enum.js +14 -22
  61. package/dist/core/common/enums/role.enum.js.map +1 -1
  62. package/dist/core/common/enums/sort-order.emum.js +4 -7
  63. package/dist/core/common/enums/sort-order.emum.js.map +1 -1
  64. package/dist/core/common/exceptions/access-denied.exception.js +5 -8
  65. package/dist/core/common/exceptions/access-denied.exception.js.map +1 -1
  66. package/dist/core/common/filters/http-exception-log.filter.js +7 -9
  67. package/dist/core/common/filters/http-exception-log.filter.js.map +1 -1
  68. package/dist/core/common/filters/mongoose-cast-error.filter.js +16 -23
  69. package/dist/core/common/filters/mongoose-cast-error.filter.js.map +1 -1
  70. package/dist/core/common/helpers/clone.helper.js +6 -10
  71. package/dist/core/common/helpers/clone.helper.js.map +1 -1
  72. package/dist/core/common/helpers/common.helper.js +2 -6
  73. package/dist/core/common/helpers/common.helper.js.map +1 -1
  74. package/dist/core/common/helpers/config.helper.d.ts +1 -0
  75. package/dist/core/common/helpers/config.helper.js +35 -40
  76. package/dist/core/common/helpers/config.helper.js.map +1 -1
  77. package/dist/core/common/helpers/content-disposition.helper.js +1 -4
  78. package/dist/core/common/helpers/content-disposition.helper.js.map +1 -1
  79. package/dist/core/common/helpers/context.helper.js +4 -8
  80. package/dist/core/common/helpers/context.helper.js.map +1 -1
  81. package/dist/core/common/helpers/cookies.helper.d.ts +1 -1
  82. package/dist/core/common/helpers/cookies.helper.js +20 -37
  83. package/dist/core/common/helpers/cookies.helper.js.map +1 -1
  84. package/dist/core/common/helpers/db.helper.d.ts +5 -5
  85. package/dist/core/common/helpers/db.helper.js +32 -52
  86. package/dist/core/common/helpers/db.helper.js.map +1 -1
  87. package/dist/core/common/helpers/decorator.helper.js +9 -13
  88. package/dist/core/common/helpers/decorator.helper.js.map +1 -1
  89. package/dist/core/common/helpers/execution-context-request.helper.js +1 -4
  90. package/dist/core/common/helpers/execution-context-request.helper.js.map +1 -1
  91. package/dist/core/common/helpers/file.helper.d.ts +1 -1
  92. package/dist/core/common/helpers/file.helper.js +24 -32
  93. package/dist/core/common/helpers/file.helper.js.map +1 -1
  94. package/dist/core/common/helpers/filter.helper.d.ts +2 -2
  95. package/dist/core/common/helpers/filter.helper.js +35 -44
  96. package/dist/core/common/helpers/filter.helper.js.map +1 -1
  97. package/dist/core/common/helpers/graceful-shutdown.helper.js +5 -8
  98. package/dist/core/common/helpers/graceful-shutdown.helper.js.map +1 -1
  99. package/dist/core/common/helpers/graphql-ws-connection.helper.d.ts +3 -1
  100. package/dist/core/common/helpers/graphql-ws-connection.helper.js +25 -32
  101. package/dist/core/common/helpers/graphql-ws-connection.helper.js.map +1 -1
  102. package/dist/core/common/helpers/graphql-ws-context.helper.d.ts +2 -2
  103. package/dist/core/common/helpers/graphql-ws-context.helper.js +25 -33
  104. package/dist/core/common/helpers/graphql-ws-context.helper.js.map +1 -1
  105. package/dist/core/common/helpers/graphql.helper.js +14 -29
  106. package/dist/core/common/helpers/graphql.helper.js.map +1 -1
  107. package/dist/core/common/helpers/gridfs.helper.js +3 -7
  108. package/dist/core/common/helpers/gridfs.helper.js.map +1 -1
  109. package/dist/core/common/helpers/id.helper.d.ts +1 -1
  110. package/dist/core/common/helpers/id.helper.js +9 -15
  111. package/dist/core/common/helpers/id.helper.js.map +1 -1
  112. package/dist/core/common/helpers/input.helper.d.ts +3 -3
  113. package/dist/core/common/helpers/input.helper.js +68 -110
  114. package/dist/core/common/helpers/input.helper.js.map +1 -1
  115. package/dist/core/common/helpers/interceptor.helper.d.ts +1 -1
  116. package/dist/core/common/helpers/interceptor.helper.js +7 -11
  117. package/dist/core/common/helpers/interceptor.helper.js.map +1 -1
  118. package/dist/core/common/helpers/logging.helper.js +7 -16
  119. package/dist/core/common/helpers/logging.helper.js.map +1 -1
  120. package/dist/core/common/helpers/meta.helper.js +14 -20
  121. package/dist/core/common/helpers/meta.helper.js.map +1 -1
  122. package/dist/core/common/helpers/model.helper.js +20 -31
  123. package/dist/core/common/helpers/model.helper.js.map +1 -1
  124. package/dist/core/common/helpers/module-location.helper.d.ts +1 -0
  125. package/dist/core/common/helpers/module-location.helper.js +20 -0
  126. package/dist/core/common/helpers/module-location.helper.js.map +1 -0
  127. package/dist/core/common/helpers/outbound-url.helper.js +24 -33
  128. package/dist/core/common/helpers/outbound-url.helper.js.map +1 -1
  129. package/dist/core/common/helpers/process-diagnostics.helper.js +6 -10
  130. package/dist/core/common/helpers/process-diagnostics.helper.js.map +1 -1
  131. package/dist/core/common/helpers/project-name.helper.js +4 -8
  132. package/dist/core/common/helpers/project-name.helper.js.map +1 -1
  133. package/dist/core/common/helpers/register-enum.helper.js +11 -16
  134. package/dist/core/common/helpers/register-enum.helper.js.map +1 -1
  135. package/dist/core/common/helpers/scim.helper.js +1 -4
  136. package/dist/core/common/helpers/scim.helper.js.map +1 -1
  137. package/dist/core/common/helpers/service.helper.d.ts +3 -3
  138. package/dist/core/common/helpers/service.helper.js +29 -36
  139. package/dist/core/common/helpers/service.helper.js.map +1 -1
  140. package/dist/core/common/helpers/swagger.helper.d.ts +2 -2
  141. package/dist/core/common/helpers/swagger.helper.js +116 -86
  142. package/dist/core/common/helpers/swagger.helper.js.map +1 -1
  143. package/dist/core/common/helpers/table.helper.js +1 -4
  144. package/dist/core/common/helpers/table.helper.js.map +1 -1
  145. package/dist/core/common/helpers/validation-message.helper.js +2 -6
  146. package/dist/core/common/helpers/validation-message.helper.js.map +1 -1
  147. package/dist/core/common/inputs/combined-filter.input.d.ts +1 -1
  148. package/dist/core/common/inputs/combined-filter.input.js +1 -5
  149. package/dist/core/common/inputs/combined-filter.input.js.map +1 -1
  150. package/dist/core/common/inputs/core-input.input.d.ts +1 -1
  151. package/dist/core/common/inputs/core-input.input.js +4 -8
  152. package/dist/core/common/inputs/core-input.input.js.map +1 -1
  153. package/dist/core/common/inputs/filter.input.d.ts +3 -3
  154. package/dist/core/common/inputs/filter.input.js +31 -34
  155. package/dist/core/common/inputs/filter.input.js.map +1 -1
  156. package/dist/core/common/inputs/single-filter.input.d.ts +2 -2
  157. package/dist/core/common/inputs/single-filter.input.js +28 -31
  158. package/dist/core/common/inputs/single-filter.input.js.map +1 -1
  159. package/dist/core/common/inputs/sort.input.d.ts +2 -2
  160. package/dist/core/common/inputs/sort.input.js +16 -19
  161. package/dist/core/common/inputs/sort.input.js.map +1 -1
  162. package/dist/core/common/interceptors/check-response.interceptor.d.ts +1 -1
  163. package/dist/core/common/interceptors/check-response.interceptor.js +12 -15
  164. package/dist/core/common/interceptors/check-response.interceptor.js.map +1 -1
  165. package/dist/core/common/interceptors/check-security.interceptor.d.ts +1 -1
  166. package/dist/core/common/interceptors/check-security.interceptor.js +16 -19
  167. package/dist/core/common/interceptors/check-security.interceptor.js.map +1 -1
  168. package/dist/core/common/interceptors/response-model.interceptor.d.ts +1 -1
  169. package/dist/core/common/interceptors/response-model.interceptor.js +16 -19
  170. package/dist/core/common/interceptors/response-model.interceptor.js.map +1 -1
  171. package/dist/core/common/interceptors/translate-response.interceptor.js +12 -15
  172. package/dist/core/common/interceptors/translate-response.interceptor.js.map +1 -1
  173. package/dist/core/common/interfaces/core-persistence-model.interface.d.ts +1 -1
  174. package/dist/core/common/interfaces/core-persistence-model.interface.js +1 -2
  175. package/dist/core/common/interfaces/cron-job-config-with-time-zone.interface.d.ts +1 -1
  176. package/dist/core/common/interfaces/cron-job-config-with-time-zone.interface.js +1 -2
  177. package/dist/core/common/interfaces/cron-job-config-with-utc-offset.interface.d.ts +1 -1
  178. package/dist/core/common/interfaces/cron-job-config-with-utc-offset.interface.js +1 -2
  179. package/dist/core/common/interfaces/cron-job-config.interface.js +1 -2
  180. package/dist/core/common/interfaces/mailjet-options.interface.js +1 -2
  181. package/dist/core/common/interfaces/prepare-input-options.interface.js +1 -2
  182. package/dist/core/common/interfaces/prepare-output-options.interface.js +1 -2
  183. package/dist/core/common/interfaces/resolve-selector.interface.js +1 -2
  184. package/dist/core/common/interfaces/scim-array-filter-node.interface.d.ts +1 -1
  185. package/dist/core/common/interfaces/scim-array-filter-node.interface.js +1 -2
  186. package/dist/core/common/interfaces/scim-condition-node.interface.d.ts +1 -1
  187. package/dist/core/common/interfaces/scim-condition-node.interface.js +1 -2
  188. package/dist/core/common/interfaces/scim-logical-node.interface.d.ts +2 -2
  189. package/dist/core/common/interfaces/scim-logical-node.interface.js +1 -2
  190. package/dist/core/common/interfaces/server-options.interface.d.ts +8 -9
  191. package/dist/core/common/interfaces/server-options.interface.js +1 -2
  192. package/dist/core/common/interfaces/service-options.interface.d.ts +3 -3
  193. package/dist/core/common/interfaces/service-options.interface.js +1 -2
  194. package/dist/core/common/interfaces/swagger-setup-options.interface.js +1 -2
  195. package/dist/core/common/middleware/request-context.middleware.js +6 -9
  196. package/dist/core/common/middleware/request-context.middleware.js.map +1 -1
  197. package/dist/core/common/middlewares/security-headers.middleware.d.ts +2 -2
  198. package/dist/core/common/middlewares/security-headers.middleware.js +6 -9
  199. package/dist/core/common/middlewares/security-headers.middleware.js.map +1 -1
  200. package/dist/core/common/middlewares/to-lower-case.middleware.js +1 -5
  201. package/dist/core/common/middlewares/to-lower-case.middleware.js.map +1 -1
  202. package/dist/core/common/models/core-model.model.js +3 -7
  203. package/dist/core/common/models/core-model.model.js.map +1 -1
  204. package/dist/core/common/models/core-persistence.model.d.ts +1 -1
  205. package/dist/core/common/models/core-persistence.model.js +27 -30
  206. package/dist/core/common/models/core-persistence.model.js.map +1 -1
  207. package/dist/core/common/models/pagination-info.model.js +11 -14
  208. package/dist/core/common/models/pagination-info.model.js.map +1 -1
  209. package/dist/core/common/pipes/check-input.pipe.js +10 -13
  210. package/dist/core/common/pipes/check-input.pipe.js.map +1 -1
  211. package/dist/core/common/pipes/map-and-validate.pipe.js +63 -66
  212. package/dist/core/common/pipes/map-and-validate.pipe.js.map +1 -1
  213. package/dist/core/common/plugins/complexity.plugin.d.ts +1 -1
  214. package/dist/core/common/plugins/complexity.plugin.js +13 -16
  215. package/dist/core/common/plugins/complexity.plugin.js.map +1 -1
  216. package/dist/core/common/plugins/mongoose-audit-fields.plugin.js +7 -10
  217. package/dist/core/common/plugins/mongoose-audit-fields.plugin.js.map +1 -1
  218. package/dist/core/common/plugins/mongoose-id.plugin.js +1 -4
  219. package/dist/core/common/plugins/mongoose-id.plugin.js.map +1 -1
  220. package/dist/core/common/plugins/mongoose-password.plugin.js +10 -16
  221. package/dist/core/common/plugins/mongoose-password.plugin.js.map +1 -1
  222. package/dist/core/common/plugins/mongoose-role-guard.plugin.js +14 -17
  223. package/dist/core/common/plugins/mongoose-role-guard.plugin.js.map +1 -1
  224. package/dist/core/common/plugins/mongoose-system-role.plugin.js +6 -9
  225. package/dist/core/common/plugins/mongoose-system-role.plugin.js.map +1 -1
  226. package/dist/core/common/plugins/mongoose-tenant.plugin.js +15 -18
  227. package/dist/core/common/plugins/mongoose-tenant.plugin.js.map +1 -1
  228. package/dist/core/common/scalars/any.scalar.js +14 -17
  229. package/dist/core/common/scalars/any.scalar.js.map +1 -1
  230. package/dist/core/common/scalars/date-timestamp.scalar.js +7 -10
  231. package/dist/core/common/scalars/date-timestamp.scalar.js.map +1 -1
  232. package/dist/core/common/scalars/date.scalar.js +7 -10
  233. package/dist/core/common/scalars/date.scalar.js.map +1 -1
  234. package/dist/core/common/scalars/json.scalar.js +14 -17
  235. package/dist/core/common/scalars/json.scalar.js.map +1 -1
  236. package/dist/core/common/scalars/upload.scalar.d.ts +2 -0
  237. package/dist/core/common/scalars/upload.scalar.js +3 -0
  238. package/dist/core/common/scalars/upload.scalar.js.map +1 -0
  239. package/dist/core/common/services/brevo.service.d.ts +7 -3
  240. package/dist/core/common/services/brevo.service.js +11 -13
  241. package/dist/core/common/services/brevo.service.js.map +1 -1
  242. package/dist/core/common/services/config.service.d.ts +1 -1
  243. package/dist/core/common/services/config.service.js +18 -23
  244. package/dist/core/common/services/config.service.js.map +1 -1
  245. package/dist/core/common/services/core-body-parser.initializer.d.ts +1 -1
  246. package/dist/core/common/services/core-body-parser.initializer.js +17 -21
  247. package/dist/core/common/services/core-body-parser.initializer.js.map +1 -1
  248. package/dist/core/common/services/core-cron-jobs.initializer.d.ts +2 -2
  249. package/dist/core/common/services/core-cron-jobs.initializer.js +12 -17
  250. package/dist/core/common/services/core-cron-jobs.initializer.js.map +1 -1
  251. package/dist/core/common/services/core-cron-jobs.registry.d.ts +1 -1
  252. package/dist/core/common/services/core-cron-jobs.registry.js +2 -6
  253. package/dist/core/common/services/core-cron-jobs.registry.js.map +1 -1
  254. package/dist/core/common/services/core-cron-jobs.service.d.ts +4 -4
  255. package/dist/core/common/services/core-cron-jobs.service.js +37 -35
  256. package/dist/core/common/services/core-cron-jobs.service.js.map +1 -1
  257. package/dist/core/common/services/core-redis-pubsub.d.ts +1 -1
  258. package/dist/core/common/services/core-redis-pubsub.js +4 -8
  259. package/dist/core/common/services/core-redis-pubsub.js.map +1 -1
  260. package/dist/core/common/services/core-redis.service.d.ts +2 -2
  261. package/dist/core/common/services/core-redis.service.js +11 -14
  262. package/dist/core/common/services/core-redis.service.js.map +1 -1
  263. package/dist/core/common/services/core-s3.service.d.ts +2 -2
  264. package/dist/core/common/services/core-s3.service.js +21 -17
  265. package/dist/core/common/services/core-s3.service.js.map +1 -1
  266. package/dist/core/common/services/core-tenant-context.registry.d.ts +5 -1
  267. package/dist/core/common/services/core-tenant-context.registry.js +2 -6
  268. package/dist/core/common/services/core-tenant-context.registry.js.map +1 -1
  269. package/dist/core/common/services/core-trust-proxy.initializer.d.ts +1 -1
  270. package/dist/core/common/services/core-trust-proxy.initializer.js +11 -14
  271. package/dist/core/common/services/core-trust-proxy.initializer.js.map +1 -1
  272. package/dist/core/common/services/crud.service.d.ts +6 -6
  273. package/dist/core/common/services/crud.service.js +35 -39
  274. package/dist/core/common/services/crud.service.js.map +1 -1
  275. package/dist/core/common/services/email.service.d.ts +5 -5
  276. package/dist/core/common/services/email.service.js +27 -30
  277. package/dist/core/common/services/email.service.js.map +1 -1
  278. package/dist/core/common/services/mailjet.service.d.ts +1 -1
  279. package/dist/core/common/services/mailjet.service.js +9 -11
  280. package/dist/core/common/services/mailjet.service.js.map +1 -1
  281. package/dist/core/common/services/model-doc.service.d.ts +1 -1
  282. package/dist/core/common/services/model-doc.service.js +9 -13
  283. package/dist/core/common/services/model-doc.service.js.map +1 -1
  284. package/dist/core/common/services/model-registry.service.d.ts +1 -1
  285. package/dist/core/common/services/model-registry.service.js +1 -5
  286. package/dist/core/common/services/model-registry.service.js.map +1 -1
  287. package/dist/core/common/services/module.service.d.ts +5 -5
  288. package/dist/core/common/services/module.service.js +25 -29
  289. package/dist/core/common/services/module.service.js.map +1 -1
  290. package/dist/core/common/services/rate-limit-store.d.ts +1 -1
  291. package/dist/core/common/services/rate-limit-store.js +9 -15
  292. package/dist/core/common/services/rate-limit-store.js.map +1 -1
  293. package/dist/core/common/services/request-context.service.js +3 -7
  294. package/dist/core/common/services/request-context.service.js.map +1 -1
  295. package/dist/core/common/services/template.service.d.ts +1 -1
  296. package/dist/core/common/services/template.service.js +12 -15
  297. package/dist/core/common/services/template.service.js.map +1 -1
  298. package/dist/core/common/types/array-element.type.js +1 -2
  299. package/dist/core/common/types/core-model-constructor.type.d.ts +1 -1
  300. package/dist/core/common/types/core-model-constructor.type.js +1 -2
  301. package/dist/core/common/types/falsy.type.js +1 -2
  302. package/dist/core/common/types/field-selection.type.d.ts +1 -1
  303. package/dist/core/common/types/field-selection.type.js +1 -2
  304. package/dist/core/common/types/id.type.js +1 -2
  305. package/dist/core/common/types/ids.type.d.ts +1 -1
  306. package/dist/core/common/types/ids.type.js +1 -2
  307. package/dist/core/common/types/is-one-of.type.js +1 -2
  308. package/dist/core/common/types/maybe-promise.type.js +1 -2
  309. package/dist/core/common/types/plain-input.type.js +1 -2
  310. package/dist/core/common/types/plain-object-deep.type.js +1 -2
  311. package/dist/core/common/types/plain-object.type.js +1 -2
  312. package/dist/core/common/types/populate-config.type.js +1 -2
  313. package/dist/core/common/types/remove-methods.type.js +1 -2
  314. package/dist/core/common/types/require-only-one.type.js +1 -2
  315. package/dist/core/common/types/required-at-least-one.type.js +1 -2
  316. package/dist/core/common/types/scim-comparator.type.js +1 -2
  317. package/dist/core/common/types/scim-logical-operator.type.js +1 -2
  318. package/dist/core/common/types/scim-node.type.d.ts +3 -3
  319. package/dist/core/common/types/scim-node.type.js +1 -2
  320. package/dist/core/common/types/string-or-object-id.type.js +1 -2
  321. package/dist/core/common/types/wrapper.type.js +1 -2
  322. package/dist/core/modules/ai/core-ai-mcp-oauth.initializer.d.ts +1 -1
  323. package/dist/core/modules/ai/core-ai-mcp-oauth.initializer.js +39 -42
  324. package/dist/core/modules/ai/core-ai-mcp-oauth.initializer.js.map +1 -1
  325. package/dist/core/modules/ai/core-ai-mcp.controller.d.ts +9 -4
  326. package/dist/core/modules/ai/core-ai-mcp.controller.js +69 -49
  327. package/dist/core/modules/ai/core-ai-mcp.controller.js.map +1 -1
  328. package/dist/core/modules/ai/core-ai.constants.js +22 -25
  329. package/dist/core/modules/ai/core-ai.constants.js.map +1 -1
  330. package/dist/core/modules/ai/core-ai.controller.d.ts +38 -38
  331. package/dist/core/modules/ai/core-ai.controller.js +223 -226
  332. package/dist/core/modules/ai/core-ai.controller.js.map +1 -1
  333. package/dist/core/modules/ai/core-ai.module.d.ts +19 -19
  334. package/dist/core/modules/ai/core-ai.module.js +136 -139
  335. package/dist/core/modules/ai/core-ai.module.js.map +1 -1
  336. package/dist/core/modules/ai/core-ai.resolver.d.ts +36 -36
  337. package/dist/core/modules/ai/core-ai.resolver.js +236 -239
  338. package/dist/core/modules/ai/core-ai.resolver.js.map +1 -1
  339. package/dist/core/modules/ai/helpers/ai-mcp-oauth-consent.helper.js +11 -17
  340. package/dist/core/modules/ai/helpers/ai-mcp-oauth-consent.helper.js.map +1 -1
  341. package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.d.ts +2 -2
  342. package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.js +13 -17
  343. package/dist/core/modules/ai/helpers/ai-mcp-oauth.helper.js.map +1 -1
  344. package/dist/core/modules/ai/helpers/ai-mcp-oauth.registry.js +2 -6
  345. package/dist/core/modules/ai/helpers/ai-mcp-oauth.registry.js.map +1 -1
  346. package/dist/core/modules/ai/hooks/ai-hook.base.d.ts +2 -2
  347. package/dist/core/modules/ai/hooks/ai-hook.base.js +7 -10
  348. package/dist/core/modules/ai/hooks/ai-hook.base.js.map +1 -1
  349. package/dist/core/modules/ai/hooks/ai-hook.registry.d.ts +3 -3
  350. package/dist/core/modules/ai/hooks/ai-hook.registry.js +5 -8
  351. package/dist/core/modules/ai/hooks/ai-hook.registry.js.map +1 -1
  352. package/dist/core/modules/ai/index.d.ts +71 -71
  353. package/dist/core/modules/ai/index.js +71 -87
  354. package/dist/core/modules/ai/index.js.map +1 -1
  355. package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.d.ts +1 -1
  356. package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.js +16 -19
  357. package/dist/core/modules/ai/inputs/core-ai-budget-limit-create.input.js.map +1 -1
  358. package/dist/core/modules/ai/inputs/core-ai-budget-limit.input.js +21 -24
  359. package/dist/core/modules/ai/inputs/core-ai-budget-limit.input.js.map +1 -1
  360. package/dist/core/modules/ai/inputs/core-ai-connection-create.input.d.ts +1 -1
  361. package/dist/core/modules/ai/inputs/core-ai-connection-create.input.js +16 -19
  362. package/dist/core/modules/ai/inputs/core-ai-connection-create.input.js.map +1 -1
  363. package/dist/core/modules/ai/inputs/core-ai-connection-preference.input.js +18 -21
  364. package/dist/core/modules/ai/inputs/core-ai-connection-preference.input.js.map +1 -1
  365. package/dist/core/modules/ai/inputs/core-ai-connection.input.js +52 -55
  366. package/dist/core/modules/ai/inputs/core-ai-connection.input.js.map +1 -1
  367. package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.d.ts +1 -1
  368. package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.js +9 -12
  369. package/dist/core/modules/ai/inputs/core-ai-conversation-create.input.js.map +1 -1
  370. package/dist/core/modules/ai/inputs/core-ai-conversation.input.js +12 -15
  371. package/dist/core/modules/ai/inputs/core-ai-conversation.input.js.map +1 -1
  372. package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.d.ts +1 -1
  373. package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.js +20 -23
  374. package/dist/core/modules/ai/inputs/core-ai-prompt-create.input.js.map +1 -1
  375. package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.d.ts +1 -1
  376. package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.js +14 -17
  377. package/dist/core/modules/ai/inputs/core-ai-prompt-hint-create.input.js.map +1 -1
  378. package/dist/core/modules/ai/inputs/core-ai-prompt-hint.input.js +18 -21
  379. package/dist/core/modules/ai/inputs/core-ai-prompt-hint.input.js.map +1 -1
  380. package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.d.ts +1 -1
  381. package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.js +19 -22
  382. package/dist/core/modules/ai/inputs/core-ai-prompt-update.input.js.map +1 -1
  383. package/dist/core/modules/ai/inputs/core-ai-prompt.input.js +37 -40
  384. package/dist/core/modules/ai/inputs/core-ai-prompt.input.js.map +1 -1
  385. package/dist/core/modules/ai/inputs/core-ai-slot-create.input.d.ts +1 -1
  386. package/dist/core/modules/ai/inputs/core-ai-slot-create.input.js +14 -17
  387. package/dist/core/modules/ai/inputs/core-ai-slot-create.input.js.map +1 -1
  388. package/dist/core/modules/ai/inputs/core-ai-slot-update.input.js +24 -27
  389. package/dist/core/modules/ai/inputs/core-ai-slot-update.input.js.map +1 -1
  390. package/dist/core/modules/ai/interfaces/ai-hook.interface.d.ts +3 -3
  391. package/dist/core/modules/ai/interfaces/ai-hook.interface.js +1 -2
  392. package/dist/core/modules/ai/interfaces/ai-interaction-record.interface.js +1 -2
  393. package/dist/core/modules/ai/interfaces/ai-placeholder.interface.d.ts +1 -1
  394. package/dist/core/modules/ai/interfaces/ai-placeholder.interface.js +1 -2
  395. package/dist/core/modules/ai/interfaces/ai-tool.interface.d.ts +2 -2
  396. package/dist/core/modules/ai/interfaces/ai-tool.interface.js +1 -2
  397. package/dist/core/modules/ai/interfaces/llm-provider.interface.js +1 -2
  398. package/dist/core/modules/ai/interfaces/resolved-ai-connection.interface.js +1 -2
  399. package/dist/core/modules/ai/models/core-ai-action.model.js +12 -15
  400. package/dist/core/modules/ai/models/core-ai-action.model.js.map +1 -1
  401. package/dist/core/modules/ai/models/core-ai-available-connection.model.js +13 -16
  402. package/dist/core/modules/ai/models/core-ai-available-connection.model.js.map +1 -1
  403. package/dist/core/modules/ai/models/core-ai-budget-limit.model.d.ts +1 -1
  404. package/dist/core/modules/ai/models/core-ai-budget-limit.model.js +24 -27
  405. package/dist/core/modules/ai/models/core-ai-budget-limit.model.js.map +1 -1
  406. package/dist/core/modules/ai/models/core-ai-connection-preference.model.d.ts +1 -1
  407. package/dist/core/modules/ai/models/core-ai-connection-preference.model.js +22 -25
  408. package/dist/core/modules/ai/models/core-ai-connection-preference.model.js.map +1 -1
  409. package/dist/core/modules/ai/models/core-ai-connection.model.d.ts +1 -1
  410. package/dist/core/modules/ai/models/core-ai-connection.model.js +56 -59
  411. package/dist/core/modules/ai/models/core-ai-connection.model.js.map +1 -1
  412. package/dist/core/modules/ai/models/core-ai-conversation.model.d.ts +2 -2
  413. package/dist/core/modules/ai/models/core-ai-conversation.model.js +31 -34
  414. package/dist/core/modules/ai/models/core-ai-conversation.model.js.map +1 -1
  415. package/dist/core/modules/ai/models/core-ai-interaction.model.d.ts +1 -1
  416. package/dist/core/modules/ai/models/core-ai-interaction.model.js +39 -42
  417. package/dist/core/modules/ai/models/core-ai-interaction.model.js.map +1 -1
  418. package/dist/core/modules/ai/models/core-ai-message.model.js +10 -13
  419. package/dist/core/modules/ai/models/core-ai-message.model.js.map +1 -1
  420. package/dist/core/modules/ai/models/core-ai-mode.model.d.ts +1 -1
  421. package/dist/core/modules/ai/models/core-ai-mode.model.js +27 -30
  422. package/dist/core/modules/ai/models/core-ai-mode.model.js.map +1 -1
  423. package/dist/core/modules/ai/models/core-ai-prompt-hint.model.d.ts +1 -1
  424. package/dist/core/modules/ai/models/core-ai-prompt-hint.model.js +26 -29
  425. package/dist/core/modules/ai/models/core-ai-prompt-hint.model.js.map +1 -1
  426. package/dist/core/modules/ai/models/core-ai-prompt.model.d.ts +1 -1
  427. package/dist/core/modules/ai/models/core-ai-prompt.model.js +29 -32
  428. package/dist/core/modules/ai/models/core-ai-prompt.model.js.map +1 -1
  429. package/dist/core/modules/ai/models/core-ai-response.model.d.ts +3 -3
  430. package/dist/core/modules/ai/models/core-ai-response.model.js +28 -31
  431. package/dist/core/modules/ai/models/core-ai-response.model.js.map +1 -1
  432. package/dist/core/modules/ai/models/core-ai-slot.model.d.ts +1 -1
  433. package/dist/core/modules/ai/models/core-ai-slot.model.js +32 -35
  434. package/dist/core/modules/ai/models/core-ai-slot.model.js.map +1 -1
  435. package/dist/core/modules/ai/models/core-ai-tool-grant.model.d.ts +1 -1
  436. package/dist/core/modules/ai/models/core-ai-tool-grant.model.js +26 -29
  437. package/dist/core/modules/ai/models/core-ai-tool-grant.model.js.map +1 -1
  438. package/dist/core/modules/ai/models/core-ai-tool-policy.model.d.ts +1 -1
  439. package/dist/core/modules/ai/models/core-ai-tool-policy.model.js +36 -39
  440. package/dist/core/modules/ai/models/core-ai-tool-policy.model.js.map +1 -1
  441. package/dist/core/modules/ai/models/core-ai-usage-info.model.js +33 -36
  442. package/dist/core/modules/ai/models/core-ai-usage-info.model.js.map +1 -1
  443. package/dist/core/modules/ai/models/core-ai-usage.model.js +10 -13
  444. package/dist/core/modules/ai/models/core-ai-usage.model.js.map +1 -1
  445. package/dist/core/modules/ai/providers/claude-cli.provider.d.ts +2 -2
  446. package/dist/core/modules/ai/providers/claude-cli.provider.js +14 -18
  447. package/dist/core/modules/ai/providers/claude-cli.provider.js.map +1 -1
  448. package/dist/core/modules/ai/providers/llm-provider.factory.d.ts +2 -2
  449. package/dist/core/modules/ai/providers/llm-provider.factory.js +7 -10
  450. package/dist/core/modules/ai/providers/llm-provider.factory.js.map +1 -1
  451. package/dist/core/modules/ai/providers/openai-compatible.provider.d.ts +2 -2
  452. package/dist/core/modules/ai/providers/openai-compatible.provider.js +12 -16
  453. package/dist/core/modules/ai/providers/openai-compatible.provider.js.map +1 -1
  454. package/dist/core/modules/ai/services/ai-crypto.service.js +15 -18
  455. package/dist/core/modules/ai/services/ai-crypto.service.js.map +1 -1
  456. package/dist/core/modules/ai/services/core-ai-budget.service.d.ts +8 -8
  457. package/dist/core/modules/ai/services/core-ai-budget.service.js +22 -28
  458. package/dist/core/modules/ai/services/core-ai-budget.service.js.map +1 -1
  459. package/dist/core/modules/ai/services/core-ai-connection-preference.service.d.ts +5 -5
  460. package/dist/core/modules/ai/services/core-ai-connection-preference.service.js +14 -19
  461. package/dist/core/modules/ai/services/core-ai-connection-preference.service.js.map +1 -1
  462. package/dist/core/modules/ai/services/core-ai-connection-resolver.service.d.ts +5 -5
  463. package/dist/core/modules/ai/services/core-ai-connection-resolver.service.js +17 -20
  464. package/dist/core/modules/ai/services/core-ai-connection-resolver.service.js.map +1 -1
  465. package/dist/core/modules/ai/services/core-ai-connection.service.d.ts +11 -11
  466. package/dist/core/modules/ai/services/core-ai-connection.service.js +27 -32
  467. package/dist/core/modules/ai/services/core-ai-connection.service.js.map +1 -1
  468. package/dist/core/modules/ai/services/core-ai-conversation.service.d.ts +8 -8
  469. package/dist/core/modules/ai/services/core-ai-conversation.service.js +18 -23
  470. package/dist/core/modules/ai/services/core-ai-conversation.service.js.map +1 -1
  471. package/dist/core/modules/ai/services/core-ai-interaction.service.d.ts +5 -5
  472. package/dist/core/modules/ai/services/core-ai-interaction.service.js +13 -18
  473. package/dist/core/modules/ai/services/core-ai-interaction.service.js.map +1 -1
  474. package/dist/core/modules/ai/services/core-ai-mcp-client.service.d.ts +3 -3
  475. package/dist/core/modules/ai/services/core-ai-mcp-client.service.js +9 -12
  476. package/dist/core/modules/ai/services/core-ai-mcp-client.service.js.map +1 -1
  477. package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.d.ts +28 -4
  478. package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.js +44 -48
  479. package/dist/core/modules/ai/services/core-ai-mcp-oauth.service.js.map +1 -1
  480. package/dist/core/modules/ai/services/core-ai-mcp.service.d.ts +1 -1
  481. package/dist/core/modules/ai/services/core-ai-mcp.service.js +9 -12
  482. package/dist/core/modules/ai/services/core-ai-mcp.service.js.map +1 -1
  483. package/dist/core/modules/ai/services/core-ai-mode.service.d.ts +4 -4
  484. package/dist/core/modules/ai/services/core-ai-mode.service.js +14 -19
  485. package/dist/core/modules/ai/services/core-ai-mode.service.js.map +1 -1
  486. package/dist/core/modules/ai/services/core-ai-placeholder.registry.d.ts +2 -2
  487. package/dist/core/modules/ai/services/core-ai-placeholder.registry.js +9 -12
  488. package/dist/core/modules/ai/services/core-ai-placeholder.registry.js.map +1 -1
  489. package/dist/core/modules/ai/services/core-ai-prompt-builder.service.d.ts +5 -5
  490. package/dist/core/modules/ai/services/core-ai-prompt-builder.service.js +20 -23
  491. package/dist/core/modules/ai/services/core-ai-prompt-builder.service.js.map +1 -1
  492. package/dist/core/modules/ai/services/core-ai-prompt-hint.service.d.ts +6 -6
  493. package/dist/core/modules/ai/services/core-ai-prompt-hint.service.js +16 -21
  494. package/dist/core/modules/ai/services/core-ai-prompt-hint.service.js.map +1 -1
  495. package/dist/core/modules/ai/services/core-ai-prompt.service.d.ts +7 -7
  496. package/dist/core/modules/ai/services/core-ai-prompt.service.js +26 -31
  497. package/dist/core/modules/ai/services/core-ai-prompt.service.js.map +1 -1
  498. package/dist/core/modules/ai/services/core-ai-slot.service.d.ts +7 -7
  499. package/dist/core/modules/ai/services/core-ai-slot.service.js +25 -31
  500. package/dist/core/modules/ai/services/core-ai-slot.service.js.map +1 -1
  501. package/dist/core/modules/ai/services/core-ai-tool-grant.service.d.ts +4 -4
  502. package/dist/core/modules/ai/services/core-ai-tool-grant.service.js +14 -19
  503. package/dist/core/modules/ai/services/core-ai-tool-grant.service.js.map +1 -1
  504. package/dist/core/modules/ai/services/core-ai-tool-policy.service.d.ts +4 -4
  505. package/dist/core/modules/ai/services/core-ai-tool-policy.service.js +14 -19
  506. package/dist/core/modules/ai/services/core-ai-tool-policy.service.js.map +1 -1
  507. package/dist/core/modules/ai/services/core-ai.service.d.ts +27 -27
  508. package/dist/core/modules/ai/services/core-ai.service.js +82 -85
  509. package/dist/core/modules/ai/services/core-ai.service.js.map +1 -1
  510. package/dist/core/modules/ai/tools/ai-tool.base.d.ts +3 -3
  511. package/dist/core/modules/ai/tools/ai-tool.base.js +7 -10
  512. package/dist/core/modules/ai/tools/ai-tool.base.js.map +1 -1
  513. package/dist/core/modules/ai/tools/ai-tool.registry.d.ts +1 -1
  514. package/dist/core/modules/ai/tools/ai-tool.registry.js +25 -28
  515. package/dist/core/modules/ai/tools/ai-tool.registry.js.map +1 -1
  516. package/dist/core/modules/ai/tools/ask-user-question.tool.d.ts +4 -4
  517. package/dist/core/modules/ai/tools/ask-user-question.tool.js +12 -15
  518. package/dist/core/modules/ai/tools/ask-user-question.tool.js.map +1 -1
  519. package/dist/core/modules/ai/tools/search-tools.tool.d.ts +4 -4
  520. package/dist/core/modules/ai/tools/search-tools.tool.js +10 -13
  521. package/dist/core/modules/ai/tools/search-tools.tool.js.map +1 -1
  522. package/dist/core/modules/api-token/core-api-token.constants.js +4 -7
  523. package/dist/core/modules/api-token/core-api-token.constants.js.map +1 -1
  524. package/dist/core/modules/api-token/core-api-token.decorators.js +3 -7
  525. package/dist/core/modules/api-token/core-api-token.decorators.js.map +1 -1
  526. package/dist/core/modules/api-token/core-api-token.helpers.d.ts +2 -2
  527. package/dist/core/modules/api-token/core-api-token.helpers.js +79 -109
  528. package/dist/core/modules/api-token/core-api-token.helpers.js.map +1 -1
  529. package/dist/core/modules/api-token/core-api-token.middleware.d.ts +1 -1
  530. package/dist/core/modules/api-token/core-api-token.middleware.js +15 -18
  531. package/dist/core/modules/api-token/core-api-token.middleware.js.map +1 -1
  532. package/dist/core/modules/api-token/core-api-token.model.d.ts +2 -2
  533. package/dist/core/modules/api-token/core-api-token.model.js +59 -62
  534. package/dist/core/modules/api-token/core-api-token.model.js.map +1 -1
  535. package/dist/core/modules/api-token/core-api-token.module.d.ts +2 -2
  536. package/dist/core/modules/api-token/core-api-token.module.js +15 -18
  537. package/dist/core/modules/api-token/core-api-token.module.js.map +1 -1
  538. package/dist/core/modules/api-token/core-api-token.registry.js +2 -6
  539. package/dist/core/modules/api-token/core-api-token.registry.js.map +1 -1
  540. package/dist/core/modules/api-token/core-api-token.service.d.ts +8 -8
  541. package/dist/core/modules/api-token/core-api-token.service.js +103 -108
  542. package/dist/core/modules/api-token/core-api-token.service.js.map +1 -1
  543. package/dist/core/modules/auth/auth-guard-strategy.enum.js +2 -5
  544. package/dist/core/modules/auth/auth-guard-strategy.enum.js.map +1 -1
  545. package/dist/core/modules/auth/core-auth.controller.d.ts +7 -7
  546. package/dist/core/modules/auth/core-auth.controller.js +71 -74
  547. package/dist/core/modules/auth/core-auth.controller.js.map +1 -1
  548. package/dist/core/modules/auth/core-auth.model.d.ts +2 -2
  549. package/dist/core/modules/auth/core-auth.model.js +19 -22
  550. package/dist/core/modules/auth/core-auth.model.js.map +1 -1
  551. package/dist/core/modules/auth/core-auth.module.d.ts +4 -4
  552. package/dist/core/modules/auth/core-auth.module.js +45 -48
  553. package/dist/core/modules/auth/core-auth.module.js.map +1 -1
  554. package/dist/core/modules/auth/core-auth.resolver.d.ts +7 -7
  555. package/dist/core/modules/auth/core-auth.resolver.js +54 -57
  556. package/dist/core/modules/auth/core-auth.resolver.js.map +1 -1
  557. package/dist/core/modules/auth/core-legacy-auth-deprecation.initializer.d.ts +2 -2
  558. package/dist/core/modules/auth/core-legacy-auth-deprecation.initializer.js +18 -16
  559. package/dist/core/modules/auth/core-legacy-auth-deprecation.initializer.js.map +1 -1
  560. package/dist/core/modules/auth/exceptions/expired-refresh-token.exception.js +2 -6
  561. package/dist/core/modules/auth/exceptions/expired-refresh-token.exception.js.map +1 -1
  562. package/dist/core/modules/auth/exceptions/expired-token.exception.js +2 -6
  563. package/dist/core/modules/auth/exceptions/expired-token.exception.js.map +1 -1
  564. package/dist/core/modules/auth/exceptions/invalid-token.exception.js +2 -6
  565. package/dist/core/modules/auth/exceptions/invalid-token.exception.js.map +1 -1
  566. package/dist/core/modules/auth/exceptions/legacy-auth-disabled.exception.js +2 -6
  567. package/dist/core/modules/auth/exceptions/legacy-auth-disabled.exception.js.map +1 -1
  568. package/dist/core/modules/auth/guards/auth.guard.d.ts +1 -1
  569. package/dist/core/modules/auth/guards/auth.guard.js +56 -46
  570. package/dist/core/modules/auth/guards/auth.guard.js.map +1 -1
  571. package/dist/core/modules/auth/guards/legacy-auth-rate-limit.guard.d.ts +1 -1
  572. package/dist/core/modules/auth/guards/legacy-auth-rate-limit.guard.js +11 -14
  573. package/dist/core/modules/auth/guards/legacy-auth-rate-limit.guard.js.map +1 -1
  574. package/dist/core/modules/auth/guards/refresh-token.guard.d.ts +1 -1
  575. package/dist/core/modules/auth/guards/refresh-token.guard.js +6 -9
  576. package/dist/core/modules/auth/guards/refresh-token.guard.js.map +1 -1
  577. package/dist/core/modules/auth/guards/roles-guard-registry.js +3 -7
  578. package/dist/core/modules/auth/guards/roles-guard-registry.js.map +1 -1
  579. package/dist/core/modules/auth/guards/roles.guard.d.ts +2 -2
  580. package/dist/core/modules/auth/guards/roles.guard.js +52 -55
  581. package/dist/core/modules/auth/guards/roles.guard.js.map +1 -1
  582. package/dist/core/modules/auth/helpers/legacy-endpoints.helper.d.ts +1 -1
  583. package/dist/core/modules/auth/helpers/legacy-endpoints.helper.js +1 -4
  584. package/dist/core/modules/auth/helpers/legacy-endpoints.helper.js.map +1 -1
  585. package/dist/core/modules/auth/inputs/core-auth-sign-in.input.d.ts +1 -1
  586. package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js +23 -26
  587. package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js.map +1 -1
  588. package/dist/core/modules/auth/inputs/core-auth-sign-up.input.d.ts +1 -1
  589. package/dist/core/modules/auth/inputs/core-auth-sign-up.input.js +9 -12
  590. package/dist/core/modules/auth/inputs/core-auth-sign-up.input.js.map +1 -1
  591. package/dist/core/modules/auth/interfaces/auth-provider.interface.d.ts +1 -1
  592. package/dist/core/modules/auth/interfaces/auth-provider.interface.js +1 -4
  593. package/dist/core/modules/auth/interfaces/auth-provider.interface.js.map +1 -1
  594. package/dist/core/modules/auth/interfaces/core-auth-user.interface.d.ts +1 -1
  595. package/dist/core/modules/auth/interfaces/core-auth-user.interface.js +1 -2
  596. package/dist/core/modules/auth/interfaces/core-token-data.interface.js +1 -2
  597. package/dist/core/modules/auth/interfaces/jwt-payload.interface.js +1 -2
  598. package/dist/core/modules/auth/services/core-auth-user.service.d.ts +2 -2
  599. package/dist/core/modules/auth/services/core-auth-user.service.js +1 -5
  600. package/dist/core/modules/auth/services/core-auth-user.service.js.map +1 -1
  601. package/dist/core/modules/auth/services/core-auth.service.d.ts +10 -10
  602. package/dist/core/modules/auth/services/core-auth.service.js +50 -53
  603. package/dist/core/modules/auth/services/core-auth.service.js.map +1 -1
  604. package/dist/core/modules/auth/services/legacy-auth-rate-limiter.service.d.ts +3 -3
  605. package/dist/core/modules/auth/services/legacy-auth-rate-limiter.service.js +15 -18
  606. package/dist/core/modules/auth/services/legacy-auth-rate-limiter.service.js.map +1 -1
  607. package/dist/core/modules/auth/strategies/jwt-refresh.strategy.d.ts +2 -2
  608. package/dist/core/modules/auth/strategies/jwt-refresh.strategy.js +15 -18
  609. package/dist/core/modules/auth/strategies/jwt-refresh.strategy.js.map +1 -1
  610. package/dist/core/modules/auth/strategies/jwt.strategy.d.ts +3 -3
  611. package/dist/core/modules/auth/strategies/jwt.strategy.js +15 -18
  612. package/dist/core/modules/auth/strategies/jwt.strategy.js.map +1 -1
  613. package/dist/core/modules/auth/tokens.decorator.d.ts +1 -1
  614. package/dist/core/modules/auth/tokens.decorator.js +4 -7
  615. package/dist/core/modules/auth/tokens.decorator.js.map +1 -1
  616. package/dist/core/modules/better-auth/better-auth-cookie-prefix.helper.js +3 -8
  617. package/dist/core/modules/better-auth/better-auth-cookie-prefix.helper.js.map +1 -1
  618. package/dist/core/modules/better-auth/better-auth-roles.guard.js +30 -33
  619. package/dist/core/modules/better-auth/better-auth-roles.guard.js.map +1 -1
  620. package/dist/core/modules/better-auth/better-auth-token.service.d.ts +3 -3
  621. package/dist/core/modules/better-auth/better-auth-token.service.js +16 -20
  622. package/dist/core/modules/better-auth/better-auth-token.service.js.map +1 -1
  623. package/dist/core/modules/better-auth/better-auth.config.d.ts +3 -2
  624. package/dist/core/modules/better-auth/better-auth.config.js +84 -58
  625. package/dist/core/modules/better-auth/better-auth.config.js.map +1 -1
  626. package/dist/core/modules/better-auth/better-auth.resolver.d.ts +7 -7
  627. package/dist/core/modules/better-auth/better-auth.resolver.js +69 -72
  628. package/dist/core/modules/better-auth/better-auth.resolver.js.map +1 -1
  629. package/dist/core/modules/better-auth/better-auth.types.d.ts +1 -1
  630. package/dist/core/modules/better-auth/better-auth.types.js +5 -12
  631. package/dist/core/modules/better-auth/better-auth.types.js.map +1 -1
  632. package/dist/core/modules/better-auth/core-better-auth-account-issuer.helper.js +3 -7
  633. package/dist/core/modules/better-auth/core-better-auth-account-issuer.helper.js.map +1 -1
  634. package/dist/core/modules/better-auth/core-better-auth-api.middleware.d.ts +10 -3
  635. package/dist/core/modules/better-auth/core-better-auth-api.middleware.js +73 -39
  636. package/dist/core/modules/better-auth/core-better-auth-api.middleware.js.map +1 -1
  637. package/dist/core/modules/better-auth/core-better-auth-auth.model.d.ts +1 -1
  638. package/dist/core/modules/better-auth/core-better-auth-auth.model.js +17 -20
  639. package/dist/core/modules/better-auth/core-better-auth-auth.model.js.map +1 -1
  640. package/dist/core/modules/better-auth/core-better-auth-challenge.service.d.ts +2 -2
  641. package/dist/core/modules/better-auth/core-better-auth-challenge.service.js +12 -17
  642. package/dist/core/modules/better-auth/core-better-auth-challenge.service.js.map +1 -1
  643. package/dist/core/modules/better-auth/core-better-auth-cookie.helper.js +15 -20
  644. package/dist/core/modules/better-auth/core-better-auth-cookie.helper.js.map +1 -1
  645. package/dist/core/modules/better-auth/core-better-auth-email-verification.service.d.ts +8 -8
  646. package/dist/core/modules/better-auth/core-better-auth-email-verification.service.js +39 -37
  647. package/dist/core/modules/better-auth/core-better-auth-email-verification.service.js.map +1 -1
  648. package/dist/core/modules/better-auth/core-better-auth-error-codes.helper.js +13 -17
  649. package/dist/core/modules/better-auth/core-better-auth-error-codes.helper.js.map +1 -1
  650. package/dist/core/modules/better-auth/core-better-auth-migration-status.model.js +12 -15
  651. package/dist/core/modules/better-auth/core-better-auth-migration-status.model.js.map +1 -1
  652. package/dist/core/modules/better-auth/core-better-auth-models.js +62 -65
  653. package/dist/core/modules/better-auth/core-better-auth-models.js.map +1 -1
  654. package/dist/core/modules/better-auth/core-better-auth-openapi.helper.d.ts +1 -1
  655. package/dist/core/modules/better-auth/core-better-auth-openapi.helper.js +15 -25
  656. package/dist/core/modules/better-auth/core-better-auth-openapi.helper.js.map +1 -1
  657. package/dist/core/modules/better-auth/core-better-auth-password-reset.registry.js +4 -8
  658. package/dist/core/modules/better-auth/core-better-auth-password-reset.registry.js.map +1 -1
  659. package/dist/core/modules/better-auth/core-better-auth-rate-limit.middleware.d.ts +2 -2
  660. package/dist/core/modules/better-auth/core-better-auth-rate-limit.middleware.js +11 -14
  661. package/dist/core/modules/better-auth/core-better-auth-rate-limit.middleware.js.map +1 -1
  662. package/dist/core/modules/better-auth/core-better-auth-rate-limiter.service.d.ts +3 -3
  663. package/dist/core/modules/better-auth/core-better-auth-rate-limiter.service.js +13 -16
  664. package/dist/core/modules/better-auth/core-better-auth-rate-limiter.service.js.map +1 -1
  665. package/dist/core/modules/better-auth/core-better-auth-signup-validator.service.d.ts +2 -2
  666. package/dist/core/modules/better-auth/core-better-auth-signup-validator.service.js +10 -13
  667. package/dist/core/modules/better-auth/core-better-auth-signup-validator.service.js.map +1 -1
  668. package/dist/core/modules/better-auth/core-better-auth-token.helper.js +9 -19
  669. package/dist/core/modules/better-auth/core-better-auth-token.helper.js.map +1 -1
  670. package/dist/core/modules/better-auth/core-better-auth-user.mapper.d.ts +1 -1
  671. package/dist/core/modules/better-auth/core-better-auth-user.mapper.js +42 -37
  672. package/dist/core/modules/better-auth/core-better-auth-user.mapper.js.map +1 -1
  673. package/dist/core/modules/better-auth/core-better-auth-web.helper.js +23 -34
  674. package/dist/core/modules/better-auth/core-better-auth-web.helper.js.map +1 -1
  675. package/dist/core/modules/better-auth/core-better-auth.constants.js +8 -11
  676. package/dist/core/modules/better-auth/core-better-auth.constants.js.map +1 -1
  677. package/dist/core/modules/better-auth/core-better-auth.controller.d.ts +7 -7
  678. package/dist/core/modules/better-auth/core-better-auth.controller.js +151 -157
  679. package/dist/core/modules/better-auth/core-better-auth.controller.js.map +1 -1
  680. package/dist/core/modules/better-auth/core-better-auth.middleware.d.ts +2 -2
  681. package/dist/core/modules/better-auth/core-better-auth.middleware.js +17 -20
  682. package/dist/core/modules/better-auth/core-better-auth.middleware.js.map +1 -1
  683. package/dist/core/modules/better-auth/core-better-auth.module.d.ts +10 -10
  684. package/dist/core/modules/better-auth/core-better-auth.module.js +146 -150
  685. package/dist/core/modules/better-auth/core-better-auth.module.js.map +1 -1
  686. package/dist/core/modules/better-auth/core-better-auth.registry.d.ts +5 -1
  687. package/dist/core/modules/better-auth/core-better-auth.registry.js +18 -8
  688. package/dist/core/modules/better-auth/core-better-auth.registry.js.map +1 -1
  689. package/dist/core/modules/better-auth/core-better-auth.resolver.d.ts +7 -7
  690. package/dist/core/modules/better-auth/core-better-auth.resolver.js +127 -128
  691. package/dist/core/modules/better-auth/core-better-auth.resolver.js.map +1 -1
  692. package/dist/core/modules/better-auth/core-better-auth.service.d.ts +7 -7
  693. package/dist/core/modules/better-auth/core-better-auth.service.js +67 -73
  694. package/dist/core/modules/better-auth/core-better-auth.service.js.map +1 -1
  695. package/dist/core/modules/better-auth/index.d.ts +24 -24
  696. package/dist/core/modules/better-auth/index.js +24 -40
  697. package/dist/core/modules/better-auth/index.js.map +1 -1
  698. package/dist/core/modules/error-code/core-error-code.controller.d.ts +2 -2
  699. package/dist/core/modules/error-code/core-error-code.controller.js +12 -15
  700. package/dist/core/modules/error-code/core-error-code.controller.js.map +1 -1
  701. package/dist/core/modules/error-code/core-error-code.service.d.ts +2 -2
  702. package/dist/core/modules/error-code/core-error-code.service.js +6 -9
  703. package/dist/core/modules/error-code/core-error-code.service.js.map +1 -1
  704. package/dist/core/modules/error-code/error-code.module.d.ts +1 -1
  705. package/dist/core/modules/error-code/error-code.module.js +16 -19
  706. package/dist/core/modules/error-code/error-code.module.js.map +1 -1
  707. package/dist/core/modules/error-code/error-codes.js +6 -11
  708. package/dist/core/modules/error-code/error-codes.js.map +1 -1
  709. package/dist/core/modules/error-code/index.d.ts +5 -5
  710. package/dist/core/modules/error-code/index.js +5 -21
  711. package/dist/core/modules/error-code/index.js.map +1 -1
  712. package/dist/core/modules/error-code/interfaces/error-code.interfaces.d.ts +2 -2
  713. package/dist/core/modules/error-code/interfaces/error-code.interfaces.js +1 -2
  714. package/dist/core/modules/file/core-file-access-audit.initializer.d.ts +1 -1
  715. package/dist/core/modules/file/core-file-access-audit.initializer.js +20 -23
  716. package/dist/core/modules/file/core-file-access-audit.initializer.js.map +1 -1
  717. package/dist/core/modules/file/core-file-info.model.d.ts +1 -1
  718. package/dist/core/modules/file/core-file-info.model.js +25 -28
  719. package/dist/core/modules/file/core-file-info.model.js.map +1 -1
  720. package/dist/core/modules/file/core-file.controller.d.ts +3 -3
  721. package/dist/core/modules/file/core-file.controller.js +35 -39
  722. package/dist/core/modules/file/core-file.controller.js.map +1 -1
  723. package/dist/core/modules/file/core-file.resolver.d.ts +2 -2
  724. package/dist/core/modules/file/core-file.resolver.js +30 -33
  725. package/dist/core/modules/file/core-file.resolver.js.map +1 -1
  726. package/dist/core/modules/file/core-file.service.d.ts +11 -11
  727. package/dist/core/modules/file/core-file.service.js +85 -89
  728. package/dist/core/modules/file/core-file.service.js.map +1 -1
  729. package/dist/core/modules/file/file-access.helper.js +5 -10
  730. package/dist/core/modules/file/file-access.helper.js.map +1 -1
  731. package/dist/core/modules/file/file-metadata.helper.js +6 -12
  732. package/dist/core/modules/file/file-metadata.helper.js.map +1 -1
  733. package/dist/core/modules/file/file-roles.config.d.ts +1 -1
  734. package/dist/core/modules/file/file-roles.config.js +19 -27
  735. package/dist/core/modules/file/file-roles.config.js.map +1 -1
  736. package/dist/core/modules/file/file-roles.helper.d.ts +3 -3
  737. package/dist/core/modules/file/file-roles.helper.js +11 -21
  738. package/dist/core/modules/file/file-roles.helper.js.map +1 -1
  739. package/dist/core/modules/file/file-storage.helper.d.ts +1 -1
  740. package/dist/core/modules/file/file-storage.helper.js +10 -18
  741. package/dist/core/modules/file/file-storage.helper.js.map +1 -1
  742. package/dist/core/modules/file/filesystem-file.helper.d.ts +1 -1
  743. package/dist/core/modules/file/filesystem-file.helper.js +26 -30
  744. package/dist/core/modules/file/filesystem-file.helper.js.map +1 -1
  745. package/dist/core/modules/file/interfaces/file-service-options.interface.js +1 -2
  746. package/dist/core/modules/file/interfaces/file-upload.interface.d.ts +1 -1
  747. package/dist/core/modules/file/interfaces/file-upload.interface.js +1 -2
  748. package/dist/core/modules/file/s3-file.helper.d.ts +2 -2
  749. package/dist/core/modules/file/s3-file.helper.js +14 -20
  750. package/dist/core/modules/file/s3-file.helper.js.map +1 -1
  751. package/dist/core/modules/health-check/core-health-check-result.model.d.ts +2 -2
  752. package/dist/core/modules/health-check/core-health-check-result.model.js +25 -28
  753. package/dist/core/modules/health-check/core-health-check-result.model.js.map +1 -1
  754. package/dist/core/modules/health-check/core-health-check.controller.d.ts +1 -1
  755. package/dist/core/modules/health-check/core-health-check.controller.js +11 -14
  756. package/dist/core/modules/health-check/core-health-check.controller.js.map +1 -1
  757. package/dist/core/modules/health-check/core-health-check.module.js +11 -14
  758. package/dist/core/modules/health-check/core-health-check.module.js.map +1 -1
  759. package/dist/core/modules/health-check/core-health-check.resolver.d.ts +1 -1
  760. package/dist/core/modules/health-check/core-health-check.resolver.js +12 -15
  761. package/dist/core/modules/health-check/core-health-check.resolver.js.map +1 -1
  762. package/dist/core/modules/health-check/core-health-check.service.d.ts +1 -1
  763. package/dist/core/modules/health-check/core-health-check.service.js +18 -17
  764. package/dist/core/modules/health-check/core-health-check.service.js.map +1 -1
  765. package/dist/core/modules/hub/core-hub-actions.controller.d.ts +1 -1
  766. package/dist/core/modules/hub/core-hub-actions.controller.js +36 -39
  767. package/dist/core/modules/hub/core-hub-actions.controller.js.map +1 -1
  768. package/dist/core/modules/hub/core-hub-html.service.d.ts +1 -1
  769. package/dist/core/modules/hub/core-hub-html.service.js +15 -18
  770. package/dist/core/modules/hub/core-hub-html.service.js.map +1 -1
  771. package/dist/core/modules/hub/core-hub.controller.d.ts +11 -11
  772. package/dist/core/modules/hub/core-hub.controller.js +100 -103
  773. package/dist/core/modules/hub/core-hub.controller.js.map +1 -1
  774. package/dist/core/modules/hub/core-hub.module.d.ts +2 -2
  775. package/dist/core/modules/hub/core-hub.module.js +53 -56
  776. package/dist/core/modules/hub/core-hub.module.js.map +1 -1
  777. package/dist/core/modules/hub/core-hub.service.d.ts +5 -5
  778. package/dist/core/modules/hub/core-hub.service.js +20 -25
  779. package/dist/core/modules/hub/core-hub.service.js.map +1 -1
  780. package/dist/core/modules/hub/helpers/hub-client-js.helper.js +1 -4
  781. package/dist/core/modules/hub/helpers/hub-client-js.helper.js.map +1 -1
  782. package/dist/core/modules/hub/helpers/hub-command-shape.helper.js +1 -4
  783. package/dist/core/modules/hub/helpers/hub-command-shape.helper.js.map +1 -1
  784. package/dist/core/modules/hub/helpers/hub-mask.helper.js +1 -4
  785. package/dist/core/modules/hub/helpers/hub-mask.helper.js.map +1 -1
  786. package/dist/core/modules/hub/helpers/hub-mermaid.helper.js +1 -4
  787. package/dist/core/modules/hub/helpers/hub-mermaid.helper.js.map +1 -1
  788. package/dist/core/modules/hub/helpers/hub-shell.helper.js +10 -19
  789. package/dist/core/modules/hub/helpers/hub-shell.helper.js.map +1 -1
  790. package/dist/core/modules/hub/hub-action-messages.js +1 -4
  791. package/dist/core/modules/hub/hub-action-messages.js.map +1 -1
  792. package/dist/core/modules/hub/hub-buffer.d.ts +2 -2
  793. package/dist/core/modules/hub/hub-buffer.js +3 -7
  794. package/dist/core/modules/hub/hub-buffer.js.map +1 -1
  795. package/dist/core/modules/hub/hub-config.helper.d.ts +1 -1
  796. package/dist/core/modules/hub/hub-config.helper.js +23 -29
  797. package/dist/core/modules/hub/hub-config.helper.js.map +1 -1
  798. package/dist/core/modules/hub/hub-nav.js +4 -8
  799. package/dist/core/modules/hub/hub-nav.js.map +1 -1
  800. package/dist/core/modules/hub/hub-ring-buffer.js +1 -5
  801. package/dist/core/modules/hub/hub-ring-buffer.js.map +1 -1
  802. package/dist/core/modules/hub/hub.constants.js +18 -21
  803. package/dist/core/modules/hub/hub.constants.js.map +1 -1
  804. package/dist/core/modules/hub/index.d.ts +25 -25
  805. package/dist/core/modules/hub/index.js +25 -41
  806. package/dist/core/modules/hub/index.js.map +1 -1
  807. package/dist/core/modules/hub/interfaces/hub-config.interface.js +1 -2
  808. package/dist/core/modules/hub/interfaces/hub-panels.interface.js +1 -2
  809. package/dist/core/modules/hub/middleware/hub-trace.middleware.d.ts +1 -1
  810. package/dist/core/modules/hub/middleware/hub-trace.middleware.js +6 -9
  811. package/dist/core/modules/hub/middleware/hub-trace.middleware.js.map +1 -1
  812. package/dist/core/modules/hub/services/core-hub-actions.service.d.ts +10 -10
  813. package/dist/core/modules/hub/services/core-hub-actions.service.js +30 -33
  814. package/dist/core/modules/hub/services/core-hub-actions.service.js.map +1 -1
  815. package/dist/core/modules/hub/services/core-hub-db.service.d.ts +5 -5
  816. package/dist/core/modules/hub/services/core-hub-db.service.js +35 -39
  817. package/dist/core/modules/hub/services/core-hub-db.service.js.map +1 -1
  818. package/dist/core/modules/hub/services/core-hub-email.service.d.ts +4 -4
  819. package/dist/core/modules/hub/services/core-hub-email.service.js +20 -22
  820. package/dist/core/modules/hub/services/core-hub-email.service.js.map +1 -1
  821. package/dist/core/modules/hub/services/core-hub-mailbox.service.d.ts +4 -4
  822. package/dist/core/modules/hub/services/core-hub-mailbox.service.js +13 -16
  823. package/dist/core/modules/hub/services/core-hub-mailbox.service.js.map +1 -1
  824. package/dist/core/modules/hub/services/core-hub-migrations.service.d.ts +5 -5
  825. package/dist/core/modules/hub/services/core-hub-migrations.service.js +25 -30
  826. package/dist/core/modules/hub/services/core-hub-migrations.service.js.map +1 -1
  827. package/dist/core/modules/hub/services/core-hub-sources.service.d.ts +1 -1
  828. package/dist/core/modules/hub/services/core-hub-sources.service.js +26 -27
  829. package/dist/core/modules/hub/services/core-hub-sources.service.js.map +1 -1
  830. package/dist/core/modules/hub/services/hub-log-buffer.service.d.ts +3 -3
  831. package/dist/core/modules/hub/services/hub-log-buffer.service.js +20 -23
  832. package/dist/core/modules/hub/services/hub-log-buffer.service.js.map +1 -1
  833. package/dist/core/modules/hub/services/hub-query-profiler.service.d.ts +4 -4
  834. package/dist/core/modules/hub/services/hub-query-profiler.service.js +20 -25
  835. package/dist/core/modules/hub/services/hub-query-profiler.service.js.map +1 -1
  836. package/dist/core/modules/hub/services/hub-trace-buffer.service.d.ts +3 -3
  837. package/dist/core/modules/hub/services/hub-trace-buffer.service.js +11 -14
  838. package/dist/core/modules/hub/services/hub-trace-buffer.service.js.map +1 -1
  839. package/dist/core/modules/migrate/cli/migrate-cli.d.ts +4 -1
  840. package/dist/core/modules/migrate/cli/migrate-cli.js +38 -18
  841. package/dist/core/modules/migrate/cli/migrate-cli.js.map +1 -1
  842. package/dist/core/modules/migrate/helpers/migration.helper.d.ts +1 -11
  843. package/dist/core/modules/migrate/helpers/migration.helper.js +14 -108
  844. package/dist/core/modules/migrate/helpers/migration.helper.js.map +1 -1
  845. package/dist/core/modules/migrate/helpers/package.json +3 -0
  846. package/dist/core/modules/migrate/helpers/ts-compiler-hooks.d.mts +2 -0
  847. package/dist/core/modules/migrate/helpers/ts-compiler-hooks.mjs +73 -0
  848. package/dist/core/modules/migrate/helpers/ts-compiler-hooks.mjs.map +1 -0
  849. package/dist/core/modules/migrate/helpers/ts-compiler.cjs +96 -0
  850. package/dist/core/modules/migrate/helpers/ts-compiler.cjs.map +1 -0
  851. package/dist/core/modules/migrate/helpers/ts-compiler.d.cts +32 -0
  852. package/dist/core/modules/migrate/helpers/ts-compiler.d.ts +1 -1
  853. package/dist/core/modules/migrate/helpers/ts-compiler.js +2 -2
  854. package/dist/core/modules/migrate/helpers/ts-compiler.js.map +1 -1
  855. package/dist/core/modules/migrate/index.d.ts +4 -4
  856. package/dist/core/modules/migrate/index.js +4 -20
  857. package/dist/core/modules/migrate/index.js.map +1 -1
  858. package/dist/core/modules/migrate/migration-runner.d.ts +1 -1
  859. package/dist/core/modules/migrate/migration-runner.js +13 -19
  860. package/dist/core/modules/migrate/migration-runner.js.map +1 -1
  861. package/dist/core/modules/migrate/migration.helper.d.ts +11 -0
  862. package/dist/core/modules/migrate/migration.helper.js +116 -0
  863. package/dist/core/modules/migrate/migration.helper.js.map +1 -0
  864. package/dist/core/modules/migrate/mongo-state-store.js +13 -20
  865. package/dist/core/modules/migrate/mongo-state-store.js.map +1 -1
  866. package/dist/core/modules/migrate/templates/migration-project.template.ts +29 -12
  867. package/dist/core/modules/permissions/core-permissions.controller.d.ts +2 -2
  868. package/dist/core/modules/permissions/core-permissions.controller.js +13 -16
  869. package/dist/core/modules/permissions/core-permissions.controller.js.map +1 -1
  870. package/dist/core/modules/permissions/core-permissions.module.d.ts +1 -1
  871. package/dist/core/modules/permissions/core-permissions.module.js +14 -17
  872. package/dist/core/modules/permissions/core-permissions.module.js.map +1 -1
  873. package/dist/core/modules/permissions/core-permissions.service.d.ts +1 -1
  874. package/dist/core/modules/permissions/core-permissions.service.js +17 -20
  875. package/dist/core/modules/permissions/core-permissions.service.js.map +1 -1
  876. package/dist/core/modules/permissions/interfaces/permissions.interface.js +1 -2
  877. package/dist/core/modules/permissions/permissions-scanner.d.ts +1 -1
  878. package/dist/core/modules/permissions/permissions-scanner.js +62 -84
  879. package/dist/core/modules/permissions/permissions-scanner.js.map +1 -1
  880. package/dist/core/modules/system-setup/core-system-setup.controller.d.ts +1 -1
  881. package/dist/core/modules/system-setup/core-system-setup.controller.js +34 -38
  882. package/dist/core/modules/system-setup/core-system-setup.controller.js.map +1 -1
  883. package/dist/core/modules/system-setup/core-system-setup.module.js +8 -11
  884. package/dist/core/modules/system-setup/core-system-setup.module.js.map +1 -1
  885. package/dist/core/modules/system-setup/core-system-setup.service.d.ts +4 -4
  886. package/dist/core/modules/system-setup/core-system-setup.service.js +26 -31
  887. package/dist/core/modules/system-setup/core-system-setup.service.js.map +1 -1
  888. package/dist/core/modules/tenant/core-role-scope.registry.js +12 -16
  889. package/dist/core/modules/tenant/core-role-scope.registry.js.map +1 -1
  890. package/dist/core/modules/tenant/core-tenant-guard.registry.js +2 -6
  891. package/dist/core/modules/tenant/core-tenant-guard.registry.js.map +1 -1
  892. package/dist/core/modules/tenant/core-tenant-member.model.d.ts +2 -2
  893. package/dist/core/modules/tenant/core-tenant-member.model.js +34 -37
  894. package/dist/core/modules/tenant/core-tenant-member.model.js.map +1 -1
  895. package/dist/core/modules/tenant/core-tenant-role.helper.js +13 -17
  896. package/dist/core/modules/tenant/core-tenant-role.helper.js.map +1 -1
  897. package/dist/core/modules/tenant/core-tenant.decorators.js +6 -10
  898. package/dist/core/modules/tenant/core-tenant.decorators.js.map +1 -1
  899. package/dist/core/modules/tenant/core-tenant.enums.js +6 -10
  900. package/dist/core/modules/tenant/core-tenant.enums.js.map +1 -1
  901. package/dist/core/modules/tenant/core-tenant.guard.d.ts +8 -3
  902. package/dist/core/modules/tenant/core-tenant.guard.js +105 -102
  903. package/dist/core/modules/tenant/core-tenant.guard.js.map +1 -1
  904. package/dist/core/modules/tenant/core-tenant.helpers.d.ts +2 -2
  905. package/dist/core/modules/tenant/core-tenant.helpers.js +33 -53
  906. package/dist/core/modules/tenant/core-tenant.helpers.js.map +1 -1
  907. package/dist/core/modules/tenant/core-tenant.module.d.ts +2 -2
  908. package/dist/core/modules/tenant/core-tenant.module.js +31 -34
  909. package/dist/core/modules/tenant/core-tenant.module.js.map +1 -1
  910. package/dist/core/modules/tenant/core-tenant.service.d.ts +2 -2
  911. package/dist/core/modules/tenant/core-tenant.service.js +49 -53
  912. package/dist/core/modules/tenant/core-tenant.service.js.map +1 -1
  913. package/dist/core/modules/tus/core-tus.controller.d.ts +2 -2
  914. package/dist/core/modules/tus/core-tus.controller.js +31 -34
  915. package/dist/core/modules/tus/core-tus.controller.js.map +1 -1
  916. package/dist/core/modules/tus/core-tus.service.d.ts +5 -5
  917. package/dist/core/modules/tus/core-tus.service.js +58 -61
  918. package/dist/core/modules/tus/core-tus.service.js.map +1 -1
  919. package/dist/core/modules/tus/index.d.ts +5 -5
  920. package/dist/core/modules/tus/index.js +5 -21
  921. package/dist/core/modules/tus/index.js.map +1 -1
  922. package/dist/core/modules/tus/interfaces/tus-config.interface.d.ts +2 -2
  923. package/dist/core/modules/tus/interfaces/tus-config.interface.js +10 -15
  924. package/dist/core/modules/tus/interfaces/tus-config.interface.js.map +1 -1
  925. package/dist/core/modules/tus/tus-redis-locker.d.ts +1 -1
  926. package/dist/core/modules/tus/tus-redis-locker.js +6 -11
  927. package/dist/core/modules/tus/tus-redis-locker.js.map +1 -1
  928. package/dist/core/modules/tus/tus.constants.js +4 -7
  929. package/dist/core/modules/tus/tus.constants.js.map +1 -1
  930. package/dist/core/modules/tus/tus.module.d.ts +4 -4
  931. package/dist/core/modules/tus/tus.module.js +39 -43
  932. package/dist/core/modules/tus/tus.module.js.map +1 -1
  933. package/dist/core/modules/user/core-user.model.d.ts +2 -2
  934. package/dist/core/modules/user/core-user.model.js +50 -53
  935. package/dist/core/modules/user/core-user.model.js.map +1 -1
  936. package/dist/core/modules/user/core-user.service.d.ts +9 -9
  937. package/dist/core/modules/user/core-user.service.js +53 -57
  938. package/dist/core/modules/user/core-user.service.js.map +1 -1
  939. package/dist/core/modules/user/inputs/core-user-create.input.d.ts +1 -1
  940. package/dist/core/modules/user/inputs/core-user-create.input.js +14 -17
  941. package/dist/core/modules/user/inputs/core-user-create.input.js.map +1 -1
  942. package/dist/core/modules/user/inputs/core-user.input.d.ts +1 -1
  943. package/dist/core/modules/user/inputs/core-user.input.js +28 -31
  944. package/dist/core/modules/user/inputs/core-user.input.js.map +1 -1
  945. package/dist/core/modules/user/interfaces/core-user-service-options.interface.d.ts +1 -1
  946. package/dist/core/modules/user/interfaces/core-user-service-options.interface.js +1 -2
  947. package/dist/core.module.d.ts +1 -1
  948. package/dist/core.module.js +144 -219
  949. package/dist/core.module.js.map +1 -1
  950. package/dist/index.d.ts +204 -203
  951. package/dist/index.js +204 -219
  952. package/dist/index.js.map +1 -1
  953. package/dist/main.js +40 -42
  954. package/dist/main.js.map +1 -1
  955. package/dist/server/common/models/persistence.model.d.ts +1 -1
  956. package/dist/server/common/models/persistence.model.js +21 -24
  957. package/dist/server/common/models/persistence.model.js.map +1 -1
  958. package/dist/server/common/services/cron-jobs.service.d.ts +5 -3
  959. package/dist/server/common/services/cron-jobs.service.js +14 -18
  960. package/dist/server/common/services/cron-jobs.service.js.map +1 -1
  961. package/dist/server/modules/ai/ai-tools.module.d.ts +1 -1
  962. package/dist/server/modules/ai/ai-tools.module.js +15 -18
  963. package/dist/server/modules/ai/ai-tools.module.js.map +1 -1
  964. package/dist/server/modules/ai/tools/delete-user.tool.d.ts +5 -5
  965. package/dist/server/modules/ai/tools/delete-user.tool.js +13 -16
  966. package/dist/server/modules/ai/tools/delete-user.tool.js.map +1 -1
  967. package/dist/server/modules/ai/tools/find-users.tool.d.ts +6 -6
  968. package/dist/server/modules/ai/tools/find-users.tool.js +12 -15
  969. package/dist/server/modules/ai/tools/find-users.tool.js.map +1 -1
  970. package/dist/server/modules/ai/tools/get-user.tool.d.ts +6 -6
  971. package/dist/server/modules/ai/tools/get-user.tool.js +13 -16
  972. package/dist/server/modules/ai/tools/get-user.tool.js.map +1 -1
  973. package/dist/server/modules/ai/tools/update-user-job-title.tool.d.ts +6 -6
  974. package/dist/server/modules/ai/tools/update-user-job-title.tool.js +16 -19
  975. package/dist/server/modules/ai/tools/update-user-job-title.tool.js.map +1 -1
  976. package/dist/server/modules/auth/auth.controller.d.ts +3 -3
  977. package/dist/server/modules/auth/auth.controller.js +13 -16
  978. package/dist/server/modules/auth/auth.controller.js.map +1 -1
  979. package/dist/server/modules/auth/auth.model.d.ts +2 -2
  980. package/dist/server/modules/auth/auth.model.js +17 -20
  981. package/dist/server/modules/auth/auth.model.js.map +1 -1
  982. package/dist/server/modules/auth/auth.module.js +15 -18
  983. package/dist/server/modules/auth/auth.module.js.map +1 -1
  984. package/dist/server/modules/auth/auth.resolver.d.ts +7 -7
  985. package/dist/server/modules/auth/auth.resolver.js +30 -33
  986. package/dist/server/modules/auth/auth.resolver.js.map +1 -1
  987. package/dist/server/modules/auth/auth.service.d.ts +8 -8
  988. package/dist/server/modules/auth/auth.service.js +17 -20
  989. package/dist/server/modules/auth/auth.service.js.map +1 -1
  990. package/dist/server/modules/auth/inputs/auth-sign-in.input.d.ts +1 -1
  991. package/dist/server/modules/auth/inputs/auth-sign-in.input.js +9 -12
  992. package/dist/server/modules/auth/inputs/auth-sign-in.input.js.map +1 -1
  993. package/dist/server/modules/auth/inputs/auth-sign-up.input.d.ts +1 -1
  994. package/dist/server/modules/auth/inputs/auth-sign-up.input.js +14 -17
  995. package/dist/server/modules/auth/inputs/auth-sign-up.input.js.map +1 -1
  996. package/dist/server/modules/better-auth/better-auth.controller.d.ts +6 -6
  997. package/dist/server/modules/better-auth/better-auth.controller.js +21 -24
  998. package/dist/server/modules/better-auth/better-auth.controller.js.map +1 -1
  999. package/dist/server/modules/better-auth/better-auth.module.d.ts +1 -1
  1000. package/dist/server/modules/better-auth/better-auth.module.js +11 -14
  1001. package/dist/server/modules/better-auth/better-auth.module.js.map +1 -1
  1002. package/dist/server/modules/better-auth/better-auth.resolver.d.ts +8 -8
  1003. package/dist/server/modules/better-auth/better-auth.resolver.js +75 -78
  1004. package/dist/server/modules/better-auth/better-auth.resolver.js.map +1 -1
  1005. package/dist/server/modules/error-code/error-code.controller.d.ts +2 -2
  1006. package/dist/server/modules/error-code/error-code.controller.js +14 -17
  1007. package/dist/server/modules/error-code/error-code.controller.js.map +1 -1
  1008. package/dist/server/modules/error-code/error-code.service.d.ts +1 -1
  1009. package/dist/server/modules/error-code/error-code.service.js +8 -11
  1010. package/dist/server/modules/error-code/error-code.service.js.map +1 -1
  1011. package/dist/server/modules/error-code/error-codes.js +3 -6
  1012. package/dist/server/modules/error-code/error-codes.js.map +1 -1
  1013. package/dist/server/modules/error-code/index.d.ts +3 -3
  1014. package/dist/server/modules/error-code/index.js +3 -19
  1015. package/dist/server/modules/error-code/index.js.map +1 -1
  1016. package/dist/server/modules/file/file-info.model.d.ts +1 -1
  1017. package/dist/server/modules/file/file-info.model.js +12 -15
  1018. package/dist/server/modules/file/file-info.model.js.map +1 -1
  1019. package/dist/server/modules/file/file.controller.d.ts +4 -4
  1020. package/dist/server/modules/file/file.controller.js +26 -29
  1021. package/dist/server/modules/file/file.controller.js.map +1 -1
  1022. package/dist/server/modules/file/file.module.js +16 -19
  1023. package/dist/server/modules/file/file.module.js.map +1 -1
  1024. package/dist/server/modules/file/file.resolver.d.ts +5 -5
  1025. package/dist/server/modules/file/file.resolver.js +23 -26
  1026. package/dist/server/modules/file/file.resolver.js.map +1 -1
  1027. package/dist/server/modules/file/file.service.d.ts +6 -6
  1028. package/dist/server/modules/file/file.service.js +15 -20
  1029. package/dist/server/modules/file/file.service.js.map +1 -1
  1030. package/dist/server/modules/file/multer-config.service.js +6 -9
  1031. package/dist/server/modules/file/multer-config.service.js.map +1 -1
  1032. package/dist/server/modules/user/avatar.controller.d.ts +3 -3
  1033. package/dist/server/modules/user/avatar.controller.js +25 -29
  1034. package/dist/server/modules/user/avatar.controller.js.map +1 -1
  1035. package/dist/server/modules/user/inputs/user-create.input.d.ts +1 -1
  1036. package/dist/server/modules/user/inputs/user-create.input.js +12 -15
  1037. package/dist/server/modules/user/inputs/user-create.input.js.map +1 -1
  1038. package/dist/server/modules/user/inputs/user.input.d.ts +1 -1
  1039. package/dist/server/modules/user/inputs/user.input.js +12 -15
  1040. package/dist/server/modules/user/inputs/user.input.js.map +1 -1
  1041. package/dist/server/modules/user/outputs/find-and-count-users-result.output.d.ts +2 -2
  1042. package/dist/server/modules/user/outputs/find-and-count-users-result.output.js +16 -19
  1043. package/dist/server/modules/user/outputs/find-and-count-users-result.output.js.map +1 -1
  1044. package/dist/server/modules/user/user.controller.d.ts +5 -5
  1045. package/dist/server/modules/user/user.controller.js +100 -103
  1046. package/dist/server/modules/user/user.controller.js.map +1 -1
  1047. package/dist/server/modules/user/user.model.d.ts +3 -3
  1048. package/dist/server/modules/user/user.model.js +36 -39
  1049. package/dist/server/modules/user/user.model.js.map +1 -1
  1050. package/dist/server/modules/user/user.module.js +24 -27
  1051. package/dist/server/modules/user/user.module.js.map +1 -1
  1052. package/dist/server/modules/user/user.resolver.d.ts +8 -8
  1053. package/dist/server/modules/user/user.resolver.js +70 -73
  1054. package/dist/server/modules/user/user.resolver.js.map +1 -1
  1055. package/dist/server/modules/user/user.service.d.ts +9 -9
  1056. package/dist/server/modules/user/user.service.js +26 -29
  1057. package/dist/server/modules/user/user.service.js.map +1 -1
  1058. package/dist/server/server.controller.d.ts +1 -1
  1059. package/dist/server/server.controller.js +12 -15
  1060. package/dist/server/server.controller.js.map +1 -1
  1061. package/dist/server/server.module.js +33 -36
  1062. package/dist/server/server.module.js.map +1 -1
  1063. package/dist/test/test.helper.js +17 -21
  1064. package/dist/test/test.helper.js.map +1 -1
  1065. package/docs/REQUEST-LIFECYCLE.md +12 -2
  1066. package/docs/security-overrides.md +50 -29
  1067. package/migration-guides/11.43.2-to-11.43.3.md +80 -0
  1068. package/migration-guides/11.43.x-to-12.0.x.md +828 -0
  1069. package/package.json +68 -68
  1070. package/src/config.env.ts +32 -30
  1071. package/src/core/common/args/filter.args.ts +3 -3
  1072. package/src/core/common/args/pagination.args.ts +4 -4
  1073. package/src/core/common/decorators/current-user.decorator.ts +1 -1
  1074. package/src/core/common/decorators/graphql-populate.decorator.ts +1 -1
  1075. package/src/core/common/decorators/graphql-service-options.decorator.ts +2 -2
  1076. package/src/core/common/decorators/response-model.decorator.ts +1 -1
  1077. package/src/core/common/decorators/rest-service-options.decorator.ts +2 -2
  1078. package/src/core/common/decorators/restricted.decorator.ts +11 -11
  1079. package/src/core/common/decorators/unified-field.decorator.ts +12 -7
  1080. package/src/core/common/exceptions/access-denied.exception.ts +1 -1
  1081. package/src/core/common/filters/http-exception-log.filter.ts +16 -2
  1082. package/src/core/common/filters/mongoose-cast-error.filter.ts +1 -1
  1083. package/src/core/common/helpers/clone.helper.ts +2 -2
  1084. package/src/core/common/helpers/config.helper.ts +47 -29
  1085. package/src/core/common/helpers/cookies.helper.ts +1 -1
  1086. package/src/core/common/helpers/db.helper.ts +8 -8
  1087. package/src/core/common/helpers/decorator.helper.ts +2 -2
  1088. package/src/core/common/helpers/execution-context-request.helper.ts +2 -2
  1089. package/src/core/common/helpers/file.helper.ts +1 -1
  1090. package/src/core/common/helpers/filter.helper.ts +9 -9
  1091. package/src/core/common/helpers/graceful-shutdown.helper.ts +1 -1
  1092. package/src/core/common/helpers/graphql-ws-connection.helper.ts +31 -6
  1093. package/src/core/common/helpers/graphql-ws-context.helper.ts +10 -11
  1094. package/src/core/common/helpers/graphql.helper.ts +1 -1
  1095. package/src/core/common/helpers/id.helper.ts +2 -2
  1096. package/src/core/common/helpers/input.helper.ts +11 -11
  1097. package/src/core/common/helpers/interceptor.helper.ts +6 -9
  1098. package/src/core/common/helpers/model.helper.ts +1 -1
  1099. package/src/core/common/helpers/module-location.helper.ts +33 -0
  1100. package/src/core/common/helpers/outbound-url.helper.ts +2 -2
  1101. package/src/core/common/helpers/process-diagnostics.helper.ts +1 -1
  1102. package/src/core/common/helpers/register-enum.helper.ts +1 -1
  1103. package/src/core/common/helpers/scim.helper.ts +3 -3
  1104. package/src/core/common/helpers/service.helper.ts +11 -11
  1105. package/src/core/common/helpers/swagger.helper.ts +94 -35
  1106. package/src/core/common/inputs/combined-filter.input.ts +1 -1
  1107. package/src/core/common/inputs/core-input.input.ts +2 -2
  1108. package/src/core/common/inputs/filter.input.ts +7 -7
  1109. package/src/core/common/inputs/single-filter.input.ts +6 -6
  1110. package/src/core/common/inputs/sort.input.ts +5 -5
  1111. package/src/core/common/interceptors/check-response.interceptor.ts +3 -3
  1112. package/src/core/common/interceptors/check-security.interceptor.ts +5 -5
  1113. package/src/core/common/interceptors/response-model.interceptor.ts +5 -5
  1114. package/src/core/common/interceptors/translate-response.interceptor.ts +1 -1
  1115. package/src/core/common/interfaces/core-persistence-model.interface.ts +1 -1
  1116. package/src/core/common/interfaces/cron-job-config-with-time-zone.interface.ts +1 -1
  1117. package/src/core/common/interfaces/cron-job-config-with-utc-offset.interface.ts +1 -1
  1118. package/src/core/common/interfaces/scim-array-filter-node.interface.ts +1 -1
  1119. package/src/core/common/interfaces/scim-condition-node.interface.ts +1 -1
  1120. package/src/core/common/interfaces/scim-logical-node.interface.ts +2 -2
  1121. package/src/core/common/interfaces/server-options.interface.ts +17 -13
  1122. package/src/core/common/interfaces/service-options.interface.ts +3 -3
  1123. package/src/core/common/middleware/request-context.middleware.ts +1 -1
  1124. package/src/core/common/middlewares/security-headers.middleware.ts +2 -2
  1125. package/src/core/common/models/core-model.model.ts +1 -1
  1126. package/src/core/common/models/core-persistence.model.ts +5 -5
  1127. package/src/core/common/models/pagination-info.model.ts +1 -1
  1128. package/src/core/common/pipes/check-input.pipe.ts +2 -2
  1129. package/src/core/common/pipes/map-and-validate.pipe.ts +6 -6
  1130. package/src/core/common/plugins/complexity.plugin.ts +1 -1
  1131. package/src/core/common/plugins/mongoose-audit-fields.plugin.ts +1 -1
  1132. package/src/core/common/plugins/mongoose-password.plugin.ts +2 -2
  1133. package/src/core/common/plugins/mongoose-role-guard.plugin.ts +3 -3
  1134. package/src/core/common/plugins/mongoose-system-role.plugin.ts +1 -1
  1135. package/src/core/common/plugins/mongoose-tenant.plugin.ts +2 -2
  1136. package/src/core/common/scalars/date-timestamp.scalar.ts +1 -1
  1137. package/src/core/common/scalars/date.scalar.ts +1 -1
  1138. package/src/core/common/scalars/upload.scalar.ts +23 -0
  1139. package/src/core/common/services/brevo.service.ts +32 -6
  1140. package/src/core/common/services/config.service.ts +13 -9
  1141. package/src/core/common/services/core-body-parser.initializer.ts +3 -3
  1142. package/src/core/common/services/core-cron-jobs.initializer.ts +3 -3
  1143. package/src/core/common/services/core-cron-jobs.registry.ts +1 -1
  1144. package/src/core/common/services/core-cron-jobs.service.ts +45 -30
  1145. package/src/core/common/services/core-redis-pubsub.ts +1 -1
  1146. package/src/core/common/services/core-redis.service.ts +3 -3
  1147. package/src/core/common/services/core-s3.service.ts +17 -3
  1148. package/src/core/common/services/core-tenant-context.registry.ts +13 -1
  1149. package/src/core/common/services/core-trust-proxy.initializer.ts +2 -2
  1150. package/src/core/common/services/crud.service.ts +10 -10
  1151. package/src/core/common/services/email.service.ts +13 -12
  1152. package/src/core/common/services/mailjet.service.ts +10 -2
  1153. package/src/core/common/services/model-doc.service.ts +3 -3
  1154. package/src/core/common/services/model-registry.service.ts +1 -1
  1155. package/src/core/common/services/module.service.ts +12 -12
  1156. package/src/core/common/services/rate-limit-store.ts +6 -3
  1157. package/src/core/common/services/template.service.ts +3 -3
  1158. package/src/core/common/types/core-model-constructor.type.ts +1 -1
  1159. package/src/core/common/types/field-selection.type.ts +1 -1
  1160. package/src/core/common/types/ids.type.ts +1 -1
  1161. package/src/core/common/types/plain-input.type.ts +3 -0
  1162. package/src/core/common/types/scim-node.type.ts +3 -3
  1163. package/src/core/common/types/wrapper.type.ts +14 -1
  1164. package/src/core/modules/ai/README.md +6 -0
  1165. package/src/core/modules/ai/core-ai-mcp-oauth.initializer.ts +6 -6
  1166. package/src/core/modules/ai/core-ai-mcp.controller.ts +76 -17
  1167. package/src/core/modules/ai/core-ai.controller.ts +42 -42
  1168. package/src/core/modules/ai/core-ai.module.ts +46 -39
  1169. package/src/core/modules/ai/core-ai.resolver.ts +40 -40
  1170. package/src/core/modules/ai/helpers/ai-mcp-oauth.helper.ts +4 -4
  1171. package/src/core/modules/ai/hooks/ai-hook.base.ts +2 -2
  1172. package/src/core/modules/ai/hooks/ai-hook.registry.ts +3 -3
  1173. package/src/core/modules/ai/index.ts +71 -71
  1174. package/src/core/modules/ai/inputs/core-ai-budget-limit-create.input.ts +4 -4
  1175. package/src/core/modules/ai/inputs/core-ai-budget-limit.input.ts +3 -3
  1176. package/src/core/modules/ai/inputs/core-ai-connection-create.input.ts +4 -4
  1177. package/src/core/modules/ai/inputs/core-ai-connection-preference.input.ts +3 -3
  1178. package/src/core/modules/ai/inputs/core-ai-connection.input.ts +3 -3
  1179. package/src/core/modules/ai/inputs/core-ai-conversation-create.input.ts +3 -3
  1180. package/src/core/modules/ai/inputs/core-ai-conversation.input.ts +3 -3
  1181. package/src/core/modules/ai/inputs/core-ai-prompt-create.input.ts +4 -4
  1182. package/src/core/modules/ai/inputs/core-ai-prompt-hint-create.input.ts +4 -4
  1183. package/src/core/modules/ai/inputs/core-ai-prompt-hint.input.ts +3 -3
  1184. package/src/core/modules/ai/inputs/core-ai-prompt-update.input.ts +4 -4
  1185. package/src/core/modules/ai/inputs/core-ai-prompt.input.ts +4 -4
  1186. package/src/core/modules/ai/inputs/core-ai-slot-create.input.ts +4 -4
  1187. package/src/core/modules/ai/inputs/core-ai-slot-update.input.ts +3 -3
  1188. package/src/core/modules/ai/interfaces/ai-hook.interface.ts +3 -3
  1189. package/src/core/modules/ai/interfaces/ai-placeholder.interface.ts +1 -1
  1190. package/src/core/modules/ai/interfaces/ai-tool.interface.ts +2 -2
  1191. package/src/core/modules/ai/models/core-ai-action.model.ts +3 -3
  1192. package/src/core/modules/ai/models/core-ai-available-connection.model.ts +2 -2
  1193. package/src/core/modules/ai/models/core-ai-budget-limit.model.ts +4 -4
  1194. package/src/core/modules/ai/models/core-ai-connection-preference.model.ts +4 -4
  1195. package/src/core/modules/ai/models/core-ai-connection.model.ts +4 -4
  1196. package/src/core/modules/ai/models/core-ai-conversation.model.ts +6 -6
  1197. package/src/core/modules/ai/models/core-ai-interaction.model.ts +5 -5
  1198. package/src/core/modules/ai/models/core-ai-message.model.ts +2 -2
  1199. package/src/core/modules/ai/models/core-ai-mode.model.ts +4 -4
  1200. package/src/core/modules/ai/models/core-ai-prompt-hint.model.ts +4 -4
  1201. package/src/core/modules/ai/models/core-ai-prompt.model.ts +4 -4
  1202. package/src/core/modules/ai/models/core-ai-response.model.ts +6 -6
  1203. package/src/core/modules/ai/models/core-ai-slot.model.ts +4 -4
  1204. package/src/core/modules/ai/models/core-ai-tool-grant.model.ts +4 -4
  1205. package/src/core/modules/ai/models/core-ai-tool-policy.model.ts +5 -5
  1206. package/src/core/modules/ai/models/core-ai-usage-info.model.ts +2 -2
  1207. package/src/core/modules/ai/models/core-ai-usage.model.ts +2 -2
  1208. package/src/core/modules/ai/providers/claude-cli.provider.ts +4 -4
  1209. package/src/core/modules/ai/providers/llm-provider.factory.ts +3 -3
  1210. package/src/core/modules/ai/providers/openai-compatible.provider.ts +4 -4
  1211. package/src/core/modules/ai/services/ai-crypto.service.ts +2 -2
  1212. package/src/core/modules/ai/services/core-ai-budget.service.ts +11 -11
  1213. package/src/core/modules/ai/services/core-ai-connection-preference.service.ts +11 -7
  1214. package/src/core/modules/ai/services/core-ai-connection-resolver.service.ts +6 -6
  1215. package/src/core/modules/ai/services/core-ai-connection.service.ts +14 -14
  1216. package/src/core/modules/ai/services/core-ai-conversation.service.ts +10 -10
  1217. package/src/core/modules/ai/services/core-ai-interaction.service.ts +6 -6
  1218. package/src/core/modules/ai/services/core-ai-mcp-client.service.ts +3 -3
  1219. package/src/core/modules/ai/services/core-ai-mcp-oauth.service.ts +45 -9
  1220. package/src/core/modules/ai/services/core-ai-mcp.service.ts +2 -2
  1221. package/src/core/modules/ai/services/core-ai-mode.service.ts +5 -5
  1222. package/src/core/modules/ai/services/core-ai-placeholder.registry.ts +3 -3
  1223. package/src/core/modules/ai/services/core-ai-prompt-builder.service.ts +6 -6
  1224. package/src/core/modules/ai/services/core-ai-prompt-hint.service.ts +8 -8
  1225. package/src/core/modules/ai/services/core-ai-prompt.service.ts +9 -9
  1226. package/src/core/modules/ai/services/core-ai-slot.service.ts +10 -10
  1227. package/src/core/modules/ai/services/core-ai-tool-grant.service.ts +5 -5
  1228. package/src/core/modules/ai/services/core-ai-tool-policy.service.ts +5 -5
  1229. package/src/core/modules/ai/services/core-ai.service.ts +37 -33
  1230. package/src/core/modules/ai/tools/ai-tool.base.ts +3 -3
  1231. package/src/core/modules/ai/tools/ai-tool.registry.ts +5 -5
  1232. package/src/core/modules/ai/tools/ask-user-question.tool.ts +4 -4
  1233. package/src/core/modules/ai/tools/search-tools.tool.ts +4 -4
  1234. package/src/core/modules/api-token/core-api-token.decorators.ts +1 -1
  1235. package/src/core/modules/api-token/core-api-token.helpers.ts +8 -8
  1236. package/src/core/modules/api-token/core-api-token.middleware.ts +3 -3
  1237. package/src/core/modules/api-token/core-api-token.model.ts +10 -10
  1238. package/src/core/modules/api-token/core-api-token.module.ts +4 -4
  1239. package/src/core/modules/api-token/core-api-token.service.ts +13 -13
  1240. package/src/core/modules/auth/core-auth.controller.ts +19 -19
  1241. package/src/core/modules/auth/core-auth.model.ts +5 -5
  1242. package/src/core/modules/auth/core-auth.module.ts +12 -12
  1243. package/src/core/modules/auth/core-auth.resolver.ts +19 -19
  1244. package/src/core/modules/auth/core-legacy-auth-deprecation.initializer.ts +17 -3
  1245. package/src/core/modules/auth/guards/auth.guard.ts +40 -12
  1246. package/src/core/modules/auth/guards/legacy-auth-rate-limit.guard.ts +1 -1
  1247. package/src/core/modules/auth/guards/refresh-token.guard.ts +1 -1
  1248. package/src/core/modules/auth/guards/roles.guard.ts +13 -13
  1249. package/src/core/modules/auth/helpers/legacy-endpoints.helper.ts +1 -1
  1250. package/src/core/modules/auth/inputs/core-auth-sign-in.input.ts +4 -4
  1251. package/src/core/modules/auth/inputs/core-auth-sign-up.input.ts +3 -3
  1252. package/src/core/modules/auth/interfaces/auth-provider.interface.ts +1 -1
  1253. package/src/core/modules/auth/interfaces/core-auth-user.interface.ts +1 -1
  1254. package/src/core/modules/auth/services/core-auth-user.service.ts +2 -2
  1255. package/src/core/modules/auth/services/core-auth.service.ts +14 -14
  1256. package/src/core/modules/auth/services/legacy-auth-rate-limiter.service.ts +4 -4
  1257. package/src/core/modules/auth/strategies/jwt-refresh.strategy.ts +3 -3
  1258. package/src/core/modules/auth/strategies/jwt.strategy.ts +4 -4
  1259. package/src/core/modules/auth/tokens.decorator.ts +1 -1
  1260. package/src/core/modules/better-auth/better-auth-roles.guard.ts +10 -10
  1261. package/src/core/modules/better-auth/better-auth-token.service.ts +3 -3
  1262. package/src/core/modules/better-auth/better-auth.config.ts +79 -14
  1263. package/src/core/modules/better-auth/better-auth.resolver.ts +9 -9
  1264. package/src/core/modules/better-auth/better-auth.types.ts +1 -1
  1265. package/src/core/modules/better-auth/core-better-auth-api.middleware.ts +84 -12
  1266. package/src/core/modules/better-auth/core-better-auth-auth.model.ts +3 -3
  1267. package/src/core/modules/better-auth/core-better-auth-challenge.service.ts +3 -3
  1268. package/src/core/modules/better-auth/core-better-auth-cookie.helper.ts +4 -4
  1269. package/src/core/modules/better-auth/core-better-auth-email-verification.service.ts +21 -11
  1270. package/src/core/modules/better-auth/core-better-auth-error-codes.helper.ts +1 -1
  1271. package/src/core/modules/better-auth/core-better-auth-models.ts +2 -2
  1272. package/src/core/modules/better-auth/core-better-auth-openapi.helper.ts +1 -1
  1273. package/src/core/modules/better-auth/core-better-auth-rate-limit.middleware.ts +2 -2
  1274. package/src/core/modules/better-auth/core-better-auth-rate-limiter.service.ts +3 -3
  1275. package/src/core/modules/better-auth/core-better-auth-signup-validator.service.ts +3 -3
  1276. package/src/core/modules/better-auth/core-better-auth-user.mapper.ts +25 -5
  1277. package/src/core/modules/better-auth/core-better-auth-web.helper.ts +2 -2
  1278. package/src/core/modules/better-auth/core-better-auth.controller.ts +20 -17
  1279. package/src/core/modules/better-auth/core-better-auth.middleware.ts +5 -5
  1280. package/src/core/modules/better-auth/core-better-auth.module.ts +29 -27
  1281. package/src/core/modules/better-auth/core-better-auth.registry.ts +35 -1
  1282. package/src/core/modules/better-auth/core-better-auth.resolver.ts +16 -13
  1283. package/src/core/modules/better-auth/core-better-auth.service.ts +17 -17
  1284. package/src/core/modules/better-auth/index.ts +24 -24
  1285. package/src/core/modules/error-code/core-error-code.controller.ts +4 -4
  1286. package/src/core/modules/error-code/core-error-code.service.ts +2 -2
  1287. package/src/core/modules/error-code/error-code.module.ts +3 -3
  1288. package/src/core/modules/error-code/index.ts +5 -5
  1289. package/src/core/modules/error-code/interfaces/error-code.interfaces.ts +2 -2
  1290. package/src/core/modules/file/core-file-access-audit.initializer.ts +5 -5
  1291. package/src/core/modules/file/core-file-info.model.ts +4 -4
  1292. package/src/core/modules/file/core-file.controller.ts +8 -8
  1293. package/src/core/modules/file/core-file.resolver.ts +8 -9
  1294. package/src/core/modules/file/core-file.service.ts +20 -20
  1295. package/src/core/modules/file/file-access.helper.ts +1 -1
  1296. package/src/core/modules/file/file-roles.config.ts +2 -2
  1297. package/src/core/modules/file/file-roles.helper.ts +6 -6
  1298. package/src/core/modules/file/file-storage.helper.ts +1 -1
  1299. package/src/core/modules/file/filesystem-file.helper.ts +2 -2
  1300. package/src/core/modules/file/interfaces/file-upload.interface.ts +1 -1
  1301. package/src/core/modules/file/s3-file.helper.ts +2 -2
  1302. package/src/core/modules/health-check/core-health-check-result.model.ts +5 -5
  1303. package/src/core/modules/health-check/core-health-check.controller.ts +3 -3
  1304. package/src/core/modules/health-check/core-health-check.module.ts +3 -3
  1305. package/src/core/modules/health-check/core-health-check.resolver.ts +4 -4
  1306. package/src/core/modules/health-check/core-health-check.service.ts +18 -9
  1307. package/src/core/modules/hub/core-hub-actions.controller.ts +2 -2
  1308. package/src/core/modules/hub/core-hub-html.service.ts +4 -4
  1309. package/src/core/modules/hub/core-hub.controller.ts +17 -17
  1310. package/src/core/modules/hub/core-hub.module.ts +17 -17
  1311. package/src/core/modules/hub/core-hub.service.ts +9 -9
  1312. package/src/core/modules/hub/hub-buffer.ts +2 -2
  1313. package/src/core/modules/hub/hub-config.helper.ts +4 -4
  1314. package/src/core/modules/hub/index.ts +25 -25
  1315. package/src/core/modules/hub/middleware/hub-trace.middleware.ts +1 -1
  1316. package/src/core/modules/hub/services/core-hub-actions.service.ts +12 -12
  1317. package/src/core/modules/hub/services/core-hub-db.service.ts +11 -11
  1318. package/src/core/modules/hub/services/core-hub-email.service.ts +7 -6
  1319. package/src/core/modules/hub/services/core-hub-mailbox.service.ts +6 -6
  1320. package/src/core/modules/hub/services/core-hub-migrations.service.ts +8 -8
  1321. package/src/core/modules/hub/services/core-hub-sources.service.ts +12 -6
  1322. package/src/core/modules/hub/services/hub-log-buffer.service.ts +6 -6
  1323. package/src/core/modules/hub/services/hub-query-profiler.service.ts +8 -8
  1324. package/src/core/modules/hub/services/hub-trace-buffer.service.ts +5 -5
  1325. package/src/core/modules/migrate/MIGRATION_FROM_NODEPIT.md +1 -1
  1326. package/src/core/modules/migrate/README.md +32 -8
  1327. package/src/core/modules/migrate/cli/migrate-cli.ts +71 -7
  1328. package/src/core/modules/migrate/helpers/migration.helper.ts +7 -284
  1329. package/src/core/modules/migrate/helpers/package.json +3 -0
  1330. package/src/core/modules/migrate/helpers/ts-compiler-hooks.mjs +90 -0
  1331. package/src/core/modules/migrate/helpers/ts-compiler.cjs +183 -0
  1332. package/src/core/modules/migrate/helpers/ts-compiler.js +7 -10
  1333. package/src/core/modules/migrate/index.ts +4 -4
  1334. package/src/core/modules/migrate/migration-runner.ts +9 -10
  1335. package/src/core/modules/migrate/migration.helper.ts +310 -0
  1336. package/src/core/modules/migrate/templates/migration-project.template.ts +29 -12
  1337. package/src/core/modules/permissions/core-permissions.controller.ts +2 -2
  1338. package/src/core/modules/permissions/core-permissions.module.ts +4 -4
  1339. package/src/core/modules/permissions/core-permissions.service.ts +2 -2
  1340. package/src/core/modules/permissions/permissions-scanner.ts +1 -1
  1341. package/src/core/modules/system-setup/core-system-setup.controller.ts +3 -3
  1342. package/src/core/modules/system-setup/core-system-setup.module.ts +2 -2
  1343. package/src/core/modules/system-setup/core-system-setup.service.ts +6 -6
  1344. package/src/core/modules/tenant/core-role-scope.registry.ts +3 -3
  1345. package/src/core/modules/tenant/core-tenant-member.model.ts +8 -8
  1346. package/src/core/modules/tenant/core-tenant-role.helper.ts +4 -4
  1347. package/src/core/modules/tenant/core-tenant.decorators.ts +1 -1
  1348. package/src/core/modules/tenant/core-tenant.guard.ts +73 -43
  1349. package/src/core/modules/tenant/core-tenant.helpers.ts +6 -6
  1350. package/src/core/modules/tenant/core-tenant.module.ts +7 -7
  1351. package/src/core/modules/tenant/core-tenant.service.ts +6 -6
  1352. package/src/core/modules/tus/core-tus.controller.ts +6 -6
  1353. package/src/core/modules/tus/core-tus.service.ts +14 -14
  1354. package/src/core/modules/tus/index.ts +5 -5
  1355. package/src/core/modules/tus/interfaces/tus-config.interface.ts +5 -5
  1356. package/src/core/modules/tus/tus-redis-locker.ts +1 -1
  1357. package/src/core/modules/tus/tus.module.ts +10 -10
  1358. package/src/core/modules/user/core-user.model.ts +5 -5
  1359. package/src/core/modules/user/core-user.service.ts +19 -19
  1360. package/src/core/modules/user/inputs/core-user-create.input.ts +4 -4
  1361. package/src/core/modules/user/inputs/core-user.input.ts +5 -5
  1362. package/src/core/modules/user/interfaces/core-user-service-options.interface.ts +1 -1
  1363. package/src/core.module.ts +63 -158
  1364. package/src/index.ts +204 -203
  1365. package/src/main.ts +19 -16
  1366. package/src/server/common/models/persistence.model.ts +6 -6
  1367. package/src/server/common/services/cron-jobs.service.ts +7 -8
  1368. package/src/server/modules/ai/ai-tools.module.ts +7 -7
  1369. package/src/server/modules/ai/tools/delete-user.tool.ts +5 -5
  1370. package/src/server/modules/ai/tools/find-users.tool.ts +5 -5
  1371. package/src/server/modules/ai/tools/get-user.tool.ts +5 -5
  1372. package/src/server/modules/ai/tools/update-user-job-title.tool.ts +6 -6
  1373. package/src/server/modules/auth/auth.controller.ts +5 -5
  1374. package/src/server/modules/auth/auth.model.ts +6 -6
  1375. package/src/server/modules/auth/auth.module.ts +7 -7
  1376. package/src/server/modules/auth/auth.resolver.ts +10 -10
  1377. package/src/server/modules/auth/auth.service.ts +8 -8
  1378. package/src/server/modules/auth/inputs/auth-sign-in.input.ts +3 -3
  1379. package/src/server/modules/auth/inputs/auth-sign-up.input.ts +4 -4
  1380. package/src/server/modules/better-auth/better-auth.controller.ts +8 -8
  1381. package/src/server/modules/better-auth/better-auth.module.ts +4 -4
  1382. package/src/server/modules/better-auth/better-auth.resolver.ts +10 -10
  1383. package/src/server/modules/error-code/error-code.controller.ts +5 -5
  1384. package/src/server/modules/error-code/error-code.service.ts +2 -2
  1385. package/src/server/modules/error-code/error-codes.ts +1 -1
  1386. package/src/server/modules/error-code/index.ts +3 -3
  1387. package/src/server/modules/file/file-info.model.ts +3 -3
  1388. package/src/server/modules/file/file.controller.ts +5 -5
  1389. package/src/server/modules/file/file.module.ts +5 -5
  1390. package/src/server/modules/file/file.resolver.ts +6 -7
  1391. package/src/server/modules/file/file.service.ts +7 -7
  1392. package/src/server/modules/user/avatar.controller.ts +9 -10
  1393. package/src/server/modules/user/inputs/user-create.input.ts +4 -4
  1394. package/src/server/modules/user/inputs/user.input.ts +4 -4
  1395. package/src/server/modules/user/outputs/find-and-count-users-result.output.ts +5 -5
  1396. package/src/server/modules/user/user.controller.ts +10 -10
  1397. package/src/server/modules/user/user.model.ts +7 -7
  1398. package/src/server/modules/user/user.module.ts +9 -9
  1399. package/src/server/modules/user/user.resolver.ts +11 -11
  1400. package/src/server/modules/user/user.service.ts +10 -10
  1401. package/src/server/server.controller.ts +1 -1
  1402. package/src/server/server.module.ts +16 -16
  1403. package/src/test/test.helper.ts +5 -5
  1404. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,828 @@
1
+ # Migration Guide: 11.43.x → 12.0.x
2
+
3
+ ## Why this is a MAJOR
4
+
5
+ Per `.claude/rules/versioning.md` the MAJOR digit mirrors NestJS and moves only when NestJS does. `12.0.0` is
6
+ the release that targets **NestJS 12**. It carries the breaking changes of NestJS 12 and of its ecosystem
7
+ packages, plus the TypeScript 6 upgrade NestJS 12's tooling requires. The framework's own API is unchanged:
8
+ no `Core*` signature, decorator, config key or default changed in this release.
9
+
10
+ **What every project has to do:** raise the NestJS family and TypeScript together with this package (§1), and
11
+ make its `tsconfig.json` explicit for TypeScript 6 (§2). Everything else applies only if a project uses the
12
+ specific feature: deep imports into `@nestjs/*/dist` (§3), the legacy `subscriptions-transport-ws` protocol
13
+ or a playground config object (§4), a subclass that redeclares a constructor with optional dependencies (§5),
14
+ a custom Terminus health indicator (§6), `@All()` routes in Swagger (§7), or Jest as test runner (§12).
15
+ **Vendor-mode projects** additionally move their dev start and their migration bootstrap
16
+ (`migrations-utils/ts-compiler.js`) from ts-node to the framework's loader (§14).
17
+
18
+ **nest-server ships as an ES module, like every NestJS 12 package — and CommonJS projects stay CommonJS** (§17).
19
+ ESM projects, what `nest new` generates since NestJS 12, are supported in npm and vendor mode. All NestJS 12 packages
20
+ and nest-server ship as ESM only, but Node loads them from CommonJS through `require(esm)` (Node 20.19+ / 22.12+, unflagged). This package keeps `engines.node: ">= 22.15"`,
21
+ which is above that floor, so nothing about the runtime requirement changes. The **CLI's generators** need more:
22
+ `@nestjs/schematics` 12 (through the Angular devkit 22.2.3) requires Node **^22.22.3, ^24.15 or >= 26** for
23
+ `nest new` / `nest generate` / `nest upgrade` — an older 22.x or 24.x runs the application and `nest build` fine,
24
+ but `pnpm install` reports unsupported engines for those packages. The latest active LTS satisfies everything.
25
+
26
+ ## Overview
27
+
28
+ | Category | Details |
29
+ | -------------------- | ------- |
30
+ | **Breaking Changes** | NestJS 12 family required (§1). TypeScript 6 changes compiler defaults (`strict` on, `rootDir`, `types`) (§2). Deep imports into `@nestjs/*/dist` no longer resolve (§3). `subscriptions-transport-ws` removed, playground settings object removed (§4). A redeclared constructor no longer inherits its parent's `@Optional()` flags (§5). Terminus: legacy `HealthIndicator` API removed, a thrown indicator error is a 500 (§6). Vendor mode: ts-node can no longer load the core — the dev start (`nodemon.json`) and `migrations-utils/ts-compiler.js` must use the framework's loader (§14) |
31
+ | **Behaviour changes** | `ConsoleLogger` prints objects after the message as structured params (§8). Lifecycle hooks run by component hierarchy level; the Express adapter drains in-flight requests on shutdown (§9). Swagger drops `SEARCH`/`QUERY` operations of `@All()` routes from OpenAPI 3.0 documents (§7). Duplicate `@Cron`/`@Interval`/`@Timeout` names fail the boot (§10). TypeScript migrations and `config.env.ts` are compiled with SWC instead of ts-node — the `migrate:*` scripts are unchanged, the project needs `@swc/core` (§14). A refused GraphQL WebSocket handshake closes with 4401 instead of 4500 (§4). Behaviour changes of NestJS 12.0.2 – 12.2.0 (§15). The framework's own log output goes through Nest's `Logger`, and `new ConfigService()` no longer prints the merged configuration (§16) |
32
+ | **Bugfixes** | `setupSwagger()` handles OpenAPI 3.2 `additionalOperations` (§7). The health check translates the deprecated `database.options.timeout` into Terminus' `.withTimeout()` (§6). Vendor mode: `migrate create` no longer writes migrations that import `@lenne.tech/nest-server` (it points them at the vendored core), and the migration runner no longer uses a relative dynamic `import()` that a source run cannot resolve (§2). Boot and shutdown logs are clean: the AI connection preference no longer triggers Mongoose's deprecated `new` option, the legacy-auth deprecation report appears once per application (it ran twice when `AuthModule.forRoot()` is both passed to `CoreModule.forRoot()` and imported), and an IAM migration-status read interrupted by the application closing is logged at debug level instead of as an ERROR. **IAM password routes accept a plaintext password everywhere** (§16): `/iam/two-factor/*`, `/iam/delete-user`, `/iam/verify-password` and `/iam/change-password` no longer refuse the right plaintext password — and `change-password` no longer stores a plaintext new password in a shape the next sign-in rejects. A reset mail never carries a relative link from an unusable `redirectTo` (§16). `loadLocalConfig` reads the project's `config.json` (it searched inside the package and merged too late), and `uploadFileToGridFS()` resolves a relative path against the calling migration (§17) |
33
+ | **New features** | `GraphQLUpload` exported from nest-server (§13). nest-server ships as an ES module like every `@nestjs/*` package — CommonJS projects load it through `require(esm)` and change nothing; ESM projects (`"type": "module"`) are supported in npm and vendor mode, including running TypeScript from source (§17) |
34
+ | **Dependencies** | See §1 |
35
+ | **Migration Effort** | Moderate for a starter-based project: dependency bump, `tsconfig.json`, a grep for deep imports. Vendor mode adds the loader switch (§14) |
36
+
37
+ ## Quick Migration
38
+
39
+ ```bash
40
+ # npm mode: raise the framework, then let the starter's sync script align the shared pins
41
+ pnpm add @lenne.tech/nest-server@12.0.0
42
+ pnpm run update # raises every pin the project shares with nest-server (see §1)
43
+
44
+ # make tsconfig.json explicit for TypeScript 6 (§2), then
45
+ pnpm run build
46
+ pnpm test
47
+
48
+ # the migrate:* scripts now compile TypeScript with @swc/core (§14) — starter-based projects have it
49
+ pnpm run migrate:list
50
+ ```
51
+
52
+ Vendor-mode projects pick the core up through `/lt-dev:backend:update-nest-server-core`; §1 and §2 apply to their
53
+ `package.json` and `tsconfig.json` all the same, because the vendored core is compiled with the project's own config.
54
+ **Vendor mode also has to move off ts-node** (§14): ts-node cannot load the 12.0.0 core. That concerns the dev start
55
+ (`nodemon.json`) and, in projects converted by an lt CLI up to 1.51.5, `migrations-utils/ts-compiler.js` — otherwise
56
+ every `migrate:*` script fails:
57
+
58
+ ```bash
59
+ # vendor mode, CommonJS project: the migration bootstrap becomes the core's loader
60
+ echo "module.exports = require('../src/core/modules/migrate/helpers/ts-compiler.js');" > migrations-utils/ts-compiler.js
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 1. Dependencies
66
+
67
+ Raise every pin the project shares with nest-server **together with it**. A project that keeps
68
+ `@nestjs/common` 11 next to nest-server 12 installs two copies of NestJS, and the build fails with type errors
69
+ that look unrelated (`Class 'CronJobs' incorrectly extends base class 'CoreCronJobs'`).
70
+
71
+ | Package | 11.43.x | 12.0.0 |
72
+ |---------|---------|--------|
73
+ | `@nestjs/common`, `@nestjs/core`, `@nestjs/platform-express`, `@nestjs/testing` | 11.2.7 | **12.2.0** |
74
+ | `@nestjs/apollo`, `@nestjs/graphql` | 13.4.5 | **14.0.3** |
75
+ | `@nestjs/jwt` | 11.0.2 | **12.0.3** |
76
+ | `@nestjs/mongoose` | 11.0.4 | **12.0.0** |
77
+ | `@nestjs/passport` | 11.0.5 | **12.0.0** |
78
+ | `@nestjs/schedule` | 6.1.3 | **12.0.2** (there is no 7.x) |
79
+ | `@nestjs/swagger` | 11.4.7 | **12.0.4** |
80
+ | `@nestjs/terminus` | 11.1.1 | **12.1.0** |
81
+ | `@nestjs/cli`, `@nestjs/schematics` | 11.0.24 / 11.1.0 | **12.0.10** |
82
+ | `typescript` | 5.9.3 | **6.0.3** |
83
+ | `express` | 5.2.1 | **5.3.0** (the version `@nestjs/platform-express` 12.2.0 pins) |
84
+ | `ws` | 8.21.3 | **8.22.0** (the version `@nestjs/graphql` 14.0.3 pins) |
85
+ | `graphql-ws` | 6.2.1 | **6.3.0** (the version `@nestjs/graphql` 14.0.3 pins) |
86
+ | `multer` | 2.4.0 | **2.5.0** (GHSA-q7qp-rjg7-q26m, high — see "Security overrides" below) |
87
+ | `dotenv` | 17.4.2 | **18.0.9** |
88
+ | `ejs` | 6.0.1 | **7.0.2** |
89
+ | `nodemailer` | 10.1.2 | **10.2.1** (three `addressparser` advisories) |
90
+ | `mongoose` | 9.11.2 | **9.11.4** |
91
+ | `better-auth`, `@better-auth/core`, `@better-auth/passkey` | 1.7.7 | **1.7.12** — the **peer range** moves to `>=1.7.12 <1.8.0` (was `>=1.7.7 <1.8.0`), in lockstep with `@lenne.tech/nuxt-extensions`; the project owns the version, api and app must resolve the same one. 1.7.12 verifies JWTs with the algorithm of the stored key. nest-server's own tests run on **1.7.13** (inside the range; a type-declaration fix, no security change), so a project may take it together with its app, but does not have to |
92
+ | `vitest`, `@vitest/coverage-v8` (dev) | 4.1.12 | **5.0.5** (§12) |
93
+ | `vite` (dev) | 8.3.4 | **8.3.4** — deliberately not 8.3.5 while vitest is 5.0.5 (§12) |
94
+ | `oxlint` / `oxfmt` (dev) | 1.88.0 / 0.73.0 | **1.89.0 / 0.74.0** |
95
+ | `@swc/core` (dev) | 1.16.18 | **1.16.20** — also what the TypeScript loader now compiles with (§14) |
96
+
97
+ `pnpm run update` in a starter-based project applies the table: it raises a pin the project already declares to
98
+ the framework's version when that is newer (`extras/sync-packages.mjs`). It never adds a package.
99
+
100
+ **`dotenv` 18 and `ejs` 7** are majors, but only matter if a project uses what they removed: dotenv 18 drops the
101
+ `-r dotenv/config` preload, `.env.vault` support and the `dotenv/lib/cli-options` / `lib/env-options` subpaths
102
+ (`dotenv.config({ … })` is unchanged); ejs 7 no longer reads render options from the **data** object, which only
103
+ `ejs.render(str, data)` / `ejs.renderFile()` ever did — nest-server's `TemplateService` uses `ejs.compile(src)(data)`
104
+ and is unaffected.
105
+
106
+ ### Security overrides
107
+
108
+ `overrides:` in `pnpm-workspace.yaml` apply only to the ROOT project of an install, so nest-server's entries do
109
+ not reach a consumer's tree (`docs/security-overrides.md`). Two of them are load-bearing again with the NestJS 12
110
+ pins, so mirror them:
111
+
112
+ ```yaml
113
+ # pnpm-workspace.yaml of the project
114
+ overrides:
115
+ # @nestjs/platform-express 12.2.0 exact-pins multer 2.4.0 (GHSA-q7qp-rjg7-q26m, fixed 2.5.0)
116
+ 'multer@>=2.0.0 <2.5.0': '2.5.0'
117
+ # @nestjs/graphql 14.0.3 exact-pins @graphql-tools/utils 12.0.1 (GHSA-c4qx-w738-7hr3, fixed 12.0.2)
118
+ '@graphql-tools/utils@>=12.0.0 <12.1.0': '12.1.0'
119
+ ```
120
+
121
+ An entry the project already carries for one of them must have its key and target raised — a target below the
122
+ fix pins the vulnerable version in place. Three more advisories of the same weeks need no override, only a
123
+ lockfile refresh: `pnpm update --depth Infinity body-parser fast-uri zod`. **But a project that already carries
124
+ an entry for `body-parser` or `fast-uri`** (starter-based projects do) must raise it, for the same reason:
125
+
126
+ ```yaml
127
+ 'body-parser@>=2.0.0 <2.4.0': '2.4.0' # was '<2.3.0': '2.3.0' — GHSA-27r3-jxmh-p828, high
128
+ 'fast-uri@<3.1.9': '3.1.9' # was '<3.1.8': '3.1.8' — four advisories up to moderate
129
+ ```
130
+
131
+ `pnpm run check:overrides`, where a project has it, reports each of these as `TOO LOW`. A mirrored
132
+ `@nestjs/cli>webpack` entry can go (see below).
133
+
134
+ **TypeScript 7 is not an option yet.** `@nestjs/graphql` 14 and `@nestjs/swagger` 12 declare `typescript`
135
+ `^5.5.0 || ^6.0.0` as peer, and `@nestjs/schematics` 12 requires `>=6.0.0` — 6.0.x is the only line both accept.
136
+
137
+ **Overrides.** A project that mirrors nest-server's `@nestjs/cli>webpack` override can remove it: `@nestjs/cli` 12
138
+ no longer depends on webpack (it is an optional peer there), and with it the `browserslist@<4.28.7` entry, whose
139
+ package left the tree together with webpack. A `ws` or `js-yaml` override can go too: `@nestjs/graphql` 14 and
140
+ `@nestjs/swagger` 12 pin patched versions (`ws` 8.22.0, `js-yaml` 5.5.0) themselves. A `ws` entry that stays must
141
+ target **8.22.0**: pnpm rewrites `graphql-ws`'s `ws` peer range to the override target, so an entry still targeting
142
+ 8.21.3 makes `pnpm peers check` report `unmet peer ws — Installed: 8.22.0, Wanted: 8.21.3 (graphql-ws@6.3.0)`.
143
+ nest-server itself now carries only the two entries below; see `docs/security-overrides.md`.
144
+
145
+ ---
146
+
147
+ ## 2. TypeScript 6 — make `tsconfig.json` explicit
148
+
149
+ TypeScript 6 changes several compiler **defaults**. A tsconfig that relied on them compiles differently, or not at
150
+ all, without a single line of source having changed:
151
+
152
+ | Default | TypeScript 5.9 | TypeScript 6 | Symptom |
153
+ |---------|----------------|--------------|---------|
154
+ | `strict` | `false` | **`true`** | hundreds of `TS2322` / `TS18048` errors (`Type 'null' is not assignable…`, `…is possibly 'undefined'`) |
155
+ | `rootDir` | common directory of the inputs | **directory of the tsconfig** | `TS5011 The common source directory … is './src'. The 'rootDir' setting must be explicitly set` — or, where the error does not fire, output moves from `dist/main.js` to `dist/src/main.js` |
156
+ | `types` | every `@types/*` package | **`[]`** | `Cannot find name 'process'` / `'Buffer'` |
157
+ | `moduleResolution` with `module: commonjs` | `node10` | **`bundler`** | `exports` maps are now enforced at type level — deep imports fail (§3) |
158
+ | explicit `moduleResolution: "node"` / `"node10"` | fine | **error** | `TS5107 Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0` |
159
+
160
+ The settings nest-server itself uses since 12.0.0 match the CommonJS template `nest new` generates for NestJS 12:
161
+
162
+ ```jsonc
163
+ // tsconfig.json
164
+ {
165
+ "compilerOptions": {
166
+ "module": "nodenext", // was "commonjs"; emits CommonJS for a package.json without "type"
167
+ "moduleResolution": "nodenext", // resolves exactly like Node, `exports` maps included
168
+ "resolvePackageJsonExports": true,
169
+ "strict": false, // TypeScript 6 turns it on by default
170
+ "types": ["node", "vitest/globals"],
171
+ // …the rest unchanged
172
+ }
173
+ }
174
+ ```
175
+
176
+ ```jsonc
177
+ // tsconfig.build.json — only when the build does not set it already
178
+ {
179
+ "extends": "./tsconfig.json",
180
+ "compilerOptions": { "rootDir": "./src" } // keeps dist/main.js where `start:prod` expects it
181
+ }
182
+ ```
183
+
184
+ A project whose build already sets `rootDir` (the starter uses `"./"` and starts `dist/src/main.js`) keeps it.
185
+
186
+ ### What `nodenext` changes beyond resolution
187
+
188
+ Two things are worth knowing before switching, both visible in the emitted JavaScript:
189
+
190
+ - **A dynamic `import()` stays a native `import()`** in the CommonJS output (under `module: commonjs` TypeScript
191
+ rewrote it to `require()`). It therefore follows ESM rules, and a package with separate CommonJS and ESM
192
+ builds is loaded as its **ESM build**. **Avoid relative dynamic imports altogether**: no specifier works
193
+ everywhere — `tsc` output needs `./x.js`, while a source run of a CommonJS project turns the `import()` into a
194
+ `require()`, which ts-node does not map from `.js` to `.ts` without `experimentalResolver`. Use a static import,
195
+ or move what a cycle needs into a module of its own; nest-server's own source has no relative dynamic import (guarded by
196
+ `tests/unit/module-format-invariants.spec.ts`). Do not mix a lazy `import()` and a
197
+ static import of the same dual package in one process: the two builds are two module instances, and an
198
+ `instanceof` across them fails. nest-server's own lazy imports (`ioredis`, `bullmq`, `@aws-sdk/*`,
199
+ `@modelcontextprotocol/sdk`, `@getbrevo/brevo`) are lazy everywhere, so each loads one build.
200
+ - **`esModuleInterop` is always on** (TypeScript 6 refuses `false`). `import * as x from 'cjs-package'` now
201
+ compiles to `__importStar(require('cjs-package'))` — a namespace object that COPIES the module's properties
202
+ instead of being the module itself. A namespace import that is *called* (`express()`) becomes a type error;
203
+ switch it to a default import. One that is *used as a value* compiles without an error and is the wrong object at
204
+ runtime: `import * as GraphQLUpload from 'graphql-upload/GraphQLUpload.js'` with `type: () => GraphQLUpload` is no
205
+ longer a `GraphQLScalarType`, and the boot fails with `Cannot determine a GraphQL input type for the "file"` (§13).
206
+ `import x = require('cjs-package')` keeps the plain `require()` and is unaffected — in a CommonJS project; it is not
207
+ valid in an ES module (§17).
208
+
209
+ **Test files** run through vitest, which resolves like a bundler (extensionless relative imports, the `import`
210
+ condition). If `tsc` over the tests complains about missing extensions on `await import('../src/…')`, give the
211
+ test tsconfig `"module": "preserve", "moduleResolution": "bundler"` — that is what nest-server's
212
+ `tsconfig.tests.json` does, and it describes the resolver the tests actually run under.
213
+
214
+ **Minimal alternative.** Keeping `module: commonjs` and only adding `"strict": false` (plus `rootDir` / `types`
215
+ where needed) also compiles under TypeScript 6 — it then resolves with `bundler` semantics (see the table) and
216
+ keeps the old dynamic-import emit. `"ignoreDeprecations": "6.0"` silences TS5107 for an explicit `node10`, but
217
+ TypeScript 7 removes that resolution mode entirely; treat it as a stopgap, not a target.
218
+
219
+ **Vendor mode.** The vendored core is compiled with the project's tsconfig. It compiles — declarations
220
+ included — under the `nodenext` settings above, under the minimal alternative, and under TypeScript 5.9 with
221
+ `module: commonjs` (verified 2026-10-24; nest-server's `check` now runs a `module: commonjs` type-check of
222
+ `src/` for exactly this). It contains no relative dynamic `import()`, so it also runs from source (§14).
223
+
224
+ ---
225
+
226
+ ## 3. Deep imports into `@nestjs/*` no longer resolve
227
+
228
+ The NestJS 12 packages declare `exports` maps. A path that is not listed there fails at runtime with
229
+ `ERR_PACKAGE_PATH_NOT_EXPORTED`, and — under `nodenext` or `bundler` resolution — at compile time with `TS2307`.
230
+
231
+ | Package | What still resolves |
232
+ |---------|---------------------|
233
+ | `@nestjs/common`, `@nestjs/core`, `@nestjs/platform-express` | the root and any subpath (`./*`), e.g. `@nestjs/common/constants`, `@nestjs/core/router/route-path-factory` |
234
+ | `@nestjs/graphql` | the root, `@nestjs/graphql/plugin`, and explicit file paths (`./*`) |
235
+ | `@nestjs/swagger` | the root and `@nestjs/swagger/plugin` |
236
+ | `@nestjs/jwt`, `@nestjs/mongoose`, `@nestjs/passport`, `@nestjs/schedule`, `@nestjs/terminus` | **the root only** |
237
+
238
+ ```bash
239
+ # find what needs changing
240
+ grep -rnE "from '@nestjs/(jwt|mongoose|passport|schedule|swagger|terminus)/" src tests
241
+ ```
242
+
243
+ What nest-server changed, as examples of the replacements:
244
+
245
+ ```typescript
246
+ // Before (11.x)
247
+ import type { JwtSignOptions } from '@nestjs/jwt/dist/interfaces/index.js';
248
+ import type { MongoosePingCheckSettings } from '@nestjs/terminus/dist/health-indicator/database/mongoose.health.js';
249
+ import type { EnumAllowedTypes } from '@nestjs/swagger/dist/interfaces/schema-object-metadata.interface.js';
250
+
251
+ // After (12.0)
252
+ import type { JwtSignOptions } from '@nestjs/jwt';
253
+ import type { MongoosePingCheckSettings } from '@nestjs/terminus';
254
+ type EnumAllowedTypes = NonNullable<ApiPropertyOptions['enum']>; // not exported at the root — derive it
255
+ ```
256
+
257
+ Internals that are not exported at all (`@nestjs/passport`'s `defaultOptions` and `memoize`) have to be inlined.
258
+
259
+ ---
260
+
261
+ ## 4. GraphQL: `subscriptions-transport-ws` and the playground are gone
262
+
263
+ `@nestjs/graphql` 14 removed the unmaintained `subscriptions-transport-ws` transport. `graphql-ws` is the only
264
+ subscription protocol, and `CoreModule` no longer configures the old one.
265
+
266
+ - **Clients** that still speak the legacy `graphql-ws` *subprotocol* — Apollo Client 2, or anything built on the
267
+ `subscriptions-transport-ws` package — can no longer subscribe. Move them to the `graphql-transport-ws`
268
+ protocol (the `graphql-ws` client library).
269
+ - **Server config** that passes `graphQl.driver.subscriptions['subscriptions-transport-ws']` is now ignored
270
+ without an error. Remove it; put `onConnect` etc. under `'graphql-ws'`. A custom `onConnect` must still call
271
+ `registerWsConnection()` to keep the open-socket re-check (unchanged since 11.42.3).
272
+ - **A refused handshake is closed with 4401 Unauthorized** (missing, expired or unknown token). Until 12.0.0
273
+ `CoreModule`'s `onConnect` threw, which graphql-ws's ws adapter answers with **4500** and the log line
274
+ "Internal error occurred during message handling. Please check your implementation." plus a stack trace — in
275
+ production too, for every expired token. The graphql-ws client retries neither code, so reconnect behaviour is
276
+ unchanged; only a client that inspected `4500` must look for `4401`. A custom `onConnect` should refuse the same
277
+ way: `return refuseWsHandshake(extra.socket, 'reason')` (exported) — returning plain `false` closes with 4403,
278
+ which the client RETRIES with the same refused credential.
279
+
280
+ The **GraphQL Playground** was removed too. GraphiQL is the built-in IDE and is enabled by default outside
281
+ production. `playground: true | false` still works as a deprecated alias; the settings **object** form is
282
+ rejected:
283
+
284
+ ```typescript
285
+ // Before
286
+ graphQl: { driver: { playground: envName !== 'production' } }
287
+
288
+ // After — same behaviour, current option name
289
+ graphQl: { driver: { graphiql: envName !== 'production' } }
290
+ ```
291
+
292
+ ---
293
+
294
+ ## 5. `@Optional()` on a redeclared constructor
295
+
296
+ NestJS 11 read the optional-dependency markers with `Reflect.getMetadata`, which returns the nearest class in the
297
+ prototype chain that has any. A subclass that **redeclared its constructor** without a single `@Optional()` took
298
+ over its parent's optional *indices* — whatever its own parameters at those positions were.
299
+
300
+ NestJS 12 (12.1+) reads them from the class whose constructor is actually called:
301
+
302
+ | Subclass | NestJS 11 | NestJS 12 |
303
+ |----------|-----------|-----------|
304
+ | no constructor of its own | inherits parameters and their `@Optional()` | **same** |
305
+ | own constructor, own `@Optional()` | uses its own | **same** |
306
+ | own constructor, **no** `@Optional()` | inherited the parent's indices | **nothing is optional** — a missing provider throws `UnknownDependenciesException` |
307
+
308
+ ```typescript
309
+ // Before — worked in 11.x only because CoreXService marks index 2 optional
310
+ @Injectable()
311
+ export class XService extends CoreXService {
312
+ constructor(configService: ConfigService, emailService: EmailService, mapper?: SomeMapper) {
313
+ super(configService, emailService, mapper);
314
+ }
315
+ }
316
+
317
+ // After — mark it where the constructor is declared
318
+ constructor(configService: ConfigService, emailService: EmailService, @Optional() mapper?: SomeMapper) {
319
+ ```
320
+
321
+ `nest-server-starter` is not affected: every subclass there that redeclares a constructor either marks its
322
+ optional parameters itself or extends a class without optional ones. `tests/unit/optional-dependency-inheritance.spec.ts`
323
+ pins all three rows. (NestJS 12.0.x inherited no flags at all; 12.1 restored them for constructor-less subclasses,
324
+ and nest-server pins 12.2.0.)
325
+
326
+ ---
327
+
328
+ ## 6. Health check (Terminus 12)
329
+
330
+ `CoreHealthCheckService` and its config are unchanged for projects. What changed underneath:
331
+
332
+ - The deprecated `HealthIndicator` base class, `getStatus()` and the error classes (`HealthCheckError`, …) are
333
+ removed. A **custom** indicator in a project must use `HealthIndicatorService`:
334
+ `this.healthIndicatorService.check(key).up(data)` / `.down(data)`, or `.attempt(fn)` for "up unless it throws".
335
+ - An error **thrown** inside an indicator is now a **500**, not a 503. Only a returned `down` result marks the
336
+ check unhealthy.
337
+ - The `timeout` option on the database indicator is deprecated in favour of `.withTimeout(ms)`. nest-server
338
+ translates `healthCheck.configs.database.options.timeout` (default 300 ms) into `.withTimeout()` itself, so the
339
+ config keeps working after Terminus drops the option.
340
+ - The Mongoose indicator now pings the database instead of reading `readyState`; results carry `responseTime`,
341
+ and an indicator may report `degraded` (HTTP 200).
342
+ - **Use Terminus 12.1.0 or later.** 12.0.0 leaks memory in `attempt().withTimeout()` (nestjs/terminus#2767) —
343
+ exactly the path nest-server's database check uses. nest-server pins 12.1.0; a project that pins Terminus itself
344
+ must not stay on 12.0.x.
345
+
346
+ ---
347
+
348
+ ## 7. Swagger (`@nestjs/swagger` 12)
349
+
350
+ - **`@All()` routes.** Swagger 12 emits `@All()` handlers for `search` and `query` as well, and normalises the
351
+ document: in an OpenAPI **3.0** document (the default) the methods outside the fixed path-item set are
352
+ dropped — 11.x wrote a bare `search` key, which no OpenAPI version allows. In a **3.2** document
353
+ (`setupSwagger(app, { configureBuilder: (b) => b.setOpenAPIVersion('3.2.0') })`) `QUERY` is a regular method
354
+ and `SEARCH` goes into `additionalOperations`. `setupSwagger()` enriches those like every other operation
355
+ (API-token line, tenant header) and keeps them in the API-token view.
356
+ - **Nullable schemas** are spelled per document version: `nullable: true` in 3.0 documents (also for responses,
357
+ which emitted `oneOf … type: 'null'` before), type unions / `anyOf … null` in 3.1+. Snapshot tests of the
358
+ document need updating.
359
+ - `lodash` is no longer a dependency of `@nestjs/swagger` — only relevant if a project relied on it arriving
360
+ transitively.
361
+
362
+ ---
363
+
364
+ ## 8. Logger output (`ConsoleLogger`)
365
+
366
+ `ConsoleLogger` now treats plain objects after the message as **structured params of the same entry**
367
+ (`logger.log('User created', { userId: 1 })`); in JSON mode they are nested under `params`. Before, each was
368
+ printed as a separate line. Log parsers that split on that behaviour need adjusting, or opt out with
369
+ `new ConsoleLogger({ structuredParams: false })`. The Hub's log capture is unaffected — it records the raw
370
+ arguments, not the formatted line.
371
+
372
+ ---
373
+
374
+ ## 9. Lifecycle hooks and shutdown
375
+
376
+ - `onModuleInit`, `onApplicationBootstrap` and the shutdown hooks are called **by component hierarchy level**.
377
+ The order between providers that depend on each other can change. nest-server's own initializers do not rely
378
+ on a cross-module order, and its whole suite passes unchanged, but review project hooks that assumed one.
379
+ - The Express adapter **drains in-flight requests** on shutdown. `installGracefulShutdown(app)` and
380
+ `shutdownDelayMs` work as before (the graceful-shutdown e2e suite covers them against real Redis and S3).
381
+ - HTTP error mapping in the adapters was reworked upstream; nest-server's exception filters and every status-code
382
+ assertion in its suite are unchanged.
383
+
384
+ ---
385
+
386
+ ## 10. `@nestjs/schedule` 12
387
+
388
+ Two `@Cron` / `@Interval` / `@Timeout` declarations with the **same explicit name** now fail at startup
389
+ (`DUPLICATE_SCHEDULER`) instead of conflicting later. `CoreCronJobs` is not affected (it does not use those
390
+ decorators); a project that does should check its names.
391
+
392
+ ---
393
+
394
+ ## 11. `nest build`: an asset glob for a missing directory fails
395
+
396
+ `@nestjs/cli` 12 (the `glob` package left in 12.0.0) matches asset patterns itself, and returns the literal base
397
+ of a pattern like `assets/**` even when `src/assets` does not exist — and then fails:
398
+
399
+ ```
400
+ Error An error occurred during the assets copying process. ENOENT: no such file or directory, stat '…/src/assets'
401
+ ```
402
+
403
+ Remove the entry from `nest-cli.json` → `compilerOptions.assets`, or create the directory. Patterns with a
404
+ wildcard in the last segment (`**/*.json`) are not affected. Every `nest build` / `nest start` runs this code —
405
+ including a project whose `build` uses `tsc`: the starter builds with `tsc`, but its `start:dev:swc` and
406
+ `start:local:swc` call `nest start`, and its `nest-cli.json` lists `templates/**` without a `src/templates`
407
+ directory. For a directory that exists only in some layouts, end the pattern with a wildcard segment —
408
+ `templates/**/*` builds whether `src/templates` exists or not (verified with CLI 11.0.24 and 12.0.10), and still
409
+ copies it where it does; the starter keeps it that way, because in vendor mode the lt CLI puts the core's mail
410
+ templates there. Remove entries whose directory never exists.
411
+
412
+ ---
413
+
414
+ ## 12. Test runners
415
+
416
+ - **vitest** (the starter's runner) works with NestJS 12 unchanged. nest-server itself moved to **vitest 5.0.5**
417
+ (with `@vitest/coverage-v8` 5.0.5), and `pnpm run update` raises a project's vitest pins to it as well. vitest 5
418
+ requires Node 22.12+ and Vite 6.4+, and changes test behaviour in ways a suite can notice:
419
+ - **mocks are cleared before every test** (`clearMocks` on by default) — a test that counted calls a mock
420
+ received in a `beforeAll` or in a previous test now sees zero;
421
+ - **an asynchronous assertion that is not awaited fails the test** (`expect(p).rejects…` without `await`);
422
+ - `vi.mock()` / `vi.hoisted()` outside the top level of a file **throw** instead of being hoisted;
423
+ - the `sequential` test/suite option is gone (use `concurrent: false`), `-t` uses `>` between suite and test
424
+ names, and the config file is no longer looked up in parent directories;
425
+ - `disableConsoleIntercept` still exists and still prevents the `Closing rpc while "onUserConsoleLog" was
426
+ pending` teardown error described in nest-server's `.claude/rules/testing.md`.
427
+
428
+ - **keep `vite` at 8.3.4 with vitest 5.0.5.** vitest 5.0.5 evaluates `globalSetup` and reporter modules as a
429
+ Buffer, and Vite 8.3.5 calls `code.charCodeAt()` on it while mapping a stack trace — from then on reading the
430
+ `.stack` of any error in the vitest MAIN process throws `TypeError: code.charCodeAt is not a function`, and the run
431
+ exits 1 after every test passed (here: the MongoDB driver's monitor while the DB reporter closes its connection).
432
+ vitest-dev/vitest#11682, fixed upstream but not in 5.0.5. A project with a `globalSetup` or its own reporter that
433
+ does not pin `vite` resolves 8.3.5 on a fresh install — add `"vite": "8.3.4"` to its devDependencies.
434
+
435
+ nest-server's suites (3706 unit + 1994 e2e tests, its custom DB-lifecycle reporter and the mutation gate that
436
+ parses vitest's summary) needed no change beyond the `vite` pin (guarded by `tests/unit/toolchain-compat.spec.ts`).
437
+ Keep vitest 4 by not raising the pin if a project's suite needs time.
438
+ - **Jest 30** loads ESM-only packages only on **Node 24.9+**; older versions fail with `ERR_REQUIRE_ASYNC_MODULE`.
439
+ Run the tests on Node 24.9+ or move to vitest.
440
+ - **AWS Lambda** disables `require(esm)` on its Node 20/22/24 runtimes — set
441
+ `NODE_OPTIONS=--experimental-require-module`.
442
+
443
+ ---
444
+
445
+ ## 13. GraphQL uploads: import the `Upload` scalar from nest-server (new)
446
+
447
+ `@lenne.tech/nest-server` now exports `GraphQLUpload`. Use it instead of importing the scalar from
448
+ `graphql-upload` yourself:
449
+
450
+ ```typescript
451
+ // Before — breaks as soon as nest-server moves graphql-upload to another major
452
+ import GraphQLUpload = require('graphql-upload/GraphQLUpload.js');
453
+
454
+ // Before — BROKEN under TypeScript 6 (§2): tsc compiles it without an error, the boot then fails with
455
+ // "Cannot determine a GraphQL input type for the "file"". nest-server's own CoreFileResolver used this form up to
456
+ // 11.43.3 (so does a core vendored from it); a project built, tested or started through tsc, ts-node or ts-jest
457
+ // must switch. The lt CLI generates the import in the right form for the installed framework.
458
+ import * as GraphQLUpload from 'graphql-upload/GraphQLUpload.js';
459
+
460
+ // After
461
+ import { GraphQLUpload } from '@lenne.tech/nest-server';
462
+
463
+ @Mutation(() => FileInfo)
464
+ async uploadFile(@Args({ name: 'file', type: () => GraphQLUpload }) file: FileUpload) { … }
465
+ ```
466
+
467
+ Why it matters: the scalar accepts a value only if it is `instanceof Upload` of **its** copy of graphql-upload,
468
+ and the `Upload` instances come from the multipart middleware `CoreModule` installs — nest-server's copy. With two
469
+ copies every upload is refused. graphql-upload's import paths also change across majors (15: `GraphQLUpload.js`,
470
+ 16+: `GraphQLUpload.mjs`), so a direct import ties the project to nest-server's choice of major. A project that no
471
+ longer imports `graphql-upload` anywhere can drop it from its own `package.json`.
472
+
473
+ ## 14. TypeScript sources: SWC instead of ts-node
474
+
475
+ `dist/core/modules/migrate/helpers/ts-compiler.js` — the file every `migrate:*` script names in
476
+ `--compiler ts:…` — no longer registers ts-node. It is now a small CommonJS `require` hook that compiles `.ts` /
477
+ `.cts` with **SWC** (`@swc/core`), with the options of the `tsc` build: target `es2022`, legacy decorators with
478
+ `design:*` metadata, define semantics for class fields, class names kept. Path, file name and the
479
+ `--compiler ts:<file>` contract are unchanged, so **the scripts need no edit**. nest-server's own dev start,
480
+ `docs:ci` and the migrate CLI's source fallback run through the same file, and ts-node left its devDependencies.
481
+
482
+ **What a project needs:** `@swc/core` as devDependency, resolvable from the project directory. Starter-based
483
+ projects have had it since NestJS 10 (vitest's `unplugin-swc` and `nest start -b swc` use it). nest-server
484
+ declares it as an optional peer (`>=1.10.0 <2`), so `pnpm peers check` reports an incompatible version. Without
485
+ it the loader stops with `Running TypeScript sources needs @swc/core … pnpm add -D @swc/core`.
486
+
487
+ **Why:** ts-node is unmaintained (10.9.2, December 2023). Under TypeScript 6 it fails on options it inherits from
488
+ the project (`TS5011` without `rootDir`, `TS5107` for its bundled `node` resolution, `TS5110` for `commonjs` on a
489
+ `nodenext` config), and it type-checks what it loads on every start. Measured 2026-10-24 (Node 24.12) to "Server
490
+ started": nest-server's own dev server, which compiles the whole framework from source, 13.5 s → 3.7 s; the starter,
491
+ which loads the framework from `dist/`, 4.8 s → 3.4 s. It also depends on
492
+ TypeScript's JavaScript API, which TypeScript 7 (now `latest` on npm) no longer ships in that form. The same holds
493
+ for `@swc-node/register` (peer `typescript <7`), which is why the framework did not switch to it. The SWC loader
494
+ does not touch TypeScript at all.
495
+
496
+ **What you give up:** the source run checks no types — a type error no longer stops `migrate up` or the dev
497
+ server. `tsc` (`pnpm run build`, `check`) and the IDE report it as before. Where checking while watching matters,
498
+ `nest start -b swc -w --type-check` (the starter's `start:local:swc`) does it; note that `@nestjs/cli`'s SWC
499
+ defaults use `useDefineForClassFields: false`, unlike the `tsc` build and this loader. ES modules (`"type": "module"`, `.mts`) are
500
+ supported through Node module hooks the loader registers (§17). Not supported: tsconfig `paths` (the starter has
501
+ none) and a project `.swcrc` (ignored on purpose).
502
+
503
+ **The dev start: REQUIRED in vendor mode, optional in npm mode.** The 12.0.0 core writes every relative import as
504
+ `./x.js` (§17), and ts-node does not map `./x.js` to `x.ts` — not even with `TS_NODE_EXPERIMENTAL_RESOLVER`. A
505
+ vendor-mode project, which runs the core from source, therefore fails at `pnpm start` with
506
+ `Error: Cannot find module './core.module.js'` (or another `.js` file of the core) as long as nodemon starts ts-node —
507
+ while `build` and the tests pass. Switch the dev start to the loader:
508
+
509
+ ```jsonc
510
+ // nodemon.json
511
+ { "exec": "node -r ./src/core/modules/migrate/helpers/ts-compiler.js src/main.ts" } // vendor mode
512
+ { "exec": "node -r ./node_modules/@lenne.tech/nest-server/dist/core/modules/migrate/helpers/ts-compiler.js src/main.ts" } // npm mode
513
+ // nodemon-debug.json: the same with node --inspect-brk -r … — the same path in CommonJS and ESM projects (§17)
514
+ ```
515
+
516
+ Keep a `-r tsconfig-paths/register` the command carried, if the project declares `paths`. Replace the other
517
+ `ts-node <file>.ts` scripts that load the core (`docs:ci`, `start:nodemon`) with `node -r <same path> <file>.ts`. The
518
+ lt CLI does this when it converts a project to vendor mode with a 12.0.0+ core; a project already in vendor mode that
519
+ takes the core update needs the edit above. In npm mode the core comes compiled from `dist/`, so ts-node keeps working
520
+ there — switching is optional and saves the type check on every start.
521
+
522
+ **The migration bootstrap: REQUIRED in vendor mode.** The `migrate:*` scripts of a vendor-mode project name
523
+ `--compiler ts:./migrations-utils/ts-compiler.js`, a file the lt CLI writes once when it converts the project. Up to
524
+ lt CLI 1.51.5 that file registers ts-node, which fails on the 12.0.0 core like the dev start does:
525
+ `Cannot find module '../migration.helper.js'` (the old helper path forwards to the moved helper, §17), or `TS5110` /
526
+ `TS5011` before that when `tsconfig.json` is `nodenext` (§2) — ts-node reads it. Point the file at the core's loader:
527
+
528
+ ```js
529
+ // migrations-utils/ts-compiler.js (CommonJS project)
530
+ module.exports = require('../src/core/modules/migrate/helpers/ts-compiler.js');
531
+ ```
532
+
533
+ The scripts themselves stay as they are: the CLI requires this file and calls its export, and the core's loader
534
+ exports the same idempotent function. `lt fullstack update` of lt CLI 1.52.0 or newer replaces the file
535
+ automatically while it is still the generated version; a file the project changed is left alone and needs the line
536
+ above. In an ESM project, where this file would be an ES module, name the loader in the scripts directly:
537
+ `--compiler ts:./src/core/modules/migrate/helpers/ts-compiler.js` — CommonJS in every project (§17).
538
+
539
+ Remove `ts-node` from devDependencies only once nothing registers it any more — no script, no `nodemon*.json`, no
540
+ `migrations-utils/ts-compiler.js` (`grep -rn ts-node package.json nodemon*.json migrations-utils/`) — and
541
+ `tsconfig-paths` with it when `tsconfig.json` declares no `paths`.
542
+
543
+ **Jest with ts-jest (vendor mode)** resolves `./x.js` to nothing as well. Map it:
544
+ `moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1' }` — or move to vitest (§12), which resolves it as it is.
545
+
546
+ ## 15. NestJS 12.0.2 – 12.2.0: changes a project can notice
547
+
548
+ nest-server pins `@nestjs/*` 12.2.0. Beyond the 12.0.0 release, these patch and minor releases changed behaviour
549
+ that a nest-server project can run into (from the NestJS release notes; microservice, Fastify and gateway changes
550
+ omitted):
551
+
552
+ | Since | Change | What to do |
553
+ |-------|--------|------------|
554
+ | 12.0.2 | An `Error` that merely carries a `statusCode` property is no longer treated as an HTTP error — it answers **500** (nestjs/nest#17709). Express's own body-parser errors are still mapped (malformed JSON → 400, too large → 413) | Throw `HttpException` subclasses from project code, not plain errors with a `statusCode` |
555
+ | 12.2.0 | Multipart: `fieldNestingDepth` 32 and `fieldArrayIndexLimit` 1000 by default | Only deeply nested or very long form-field arrays are affected; raise them in the upload options |
556
+ | 12.2.0 | Files uploaded with a request that a pipe rejected are removed from storage | Nothing — previously they were left behind |
557
+ | 12.2.0 | Object error bodies are sent as `application/json` also on routes with a non-JSON `Content-Type` | A client that parsed such an error as text gets JSON |
558
+ | 12.2.0 | `BaseExceptionFilter` answers `http-errors` errors with `expose: false` (the default from 500) with the standard reason phrase, not their message | Nothing for nest-server's filters |
559
+ | 12.2.0 | A global enhancer the injector failed to instantiate now **fails the startup** | A boot that used to log and continue now stops — fix the enhancer |
560
+ | 12.2.0 | `MiddlewareConsumer.exclude()` compiles excluded routes with the router's case and trailing-slash matching | Review exclusions that relied on the looser match |
561
+ | 12.2.0 | `@nestjs/platform-express` 12.2.0 needs `@nestjs/core` 12.2.0: with an older core it does not load and the app stops with "No driver (HTTP) has been selected" (nestjs/nest#18251, fixed upstream, unreleased) | Keep every `@nestjs/*` pin in lockstep — `pnpm run update` does |
562
+ | `@nestjs/passport` 12 | `getAuthenticateOptions()` changed its signature | Only for project guards that override it |
563
+ | 12.x | Pipe `transform()` signatures refined; `ArgumentMetadata` is generic | Only project pipes with hand-written signatures — nest-server's pipes compile unchanged |
564
+
565
+ ## 16. Log output, IAM passwords and other corrections
566
+
567
+ **Framework log output goes through Nest's `Logger`.** These wrote to `console` directly — no context, no respect
568
+ for the application's log levels, JSON mode or a custom logger — and now use a `Logger` with the context shown:
569
+
570
+ | Source | Context | Level |
571
+ |--------|---------|-------|
572
+ | `CoreCronJobs` (job registration, lease and BullMQ messages, shutdown wait) | `CronJobs` | as before (`log` for info, `warn`, `error` with the stack) |
573
+ | `CoreModule.forRoot()` configuration warnings (equal JWT secrets, ignored overrides, unguarded Hub) | `CoreModule` | `warn` |
574
+ | `HttpExceptionLogFilter` (the stack of each handled exception, with `logExceptions`) | `HttpExceptionLogFilter` | `debug` — still printed with Nest's default levels; hidden where a project narrows them |
575
+ | `InMemoryRateLimitStore` capacity warning | `InMemoryRateLimitStore` | `warn` |
576
+ | Better-Auth's own messages (failed sign-ins, refused CSRF attempts) | `BetterAuth` | as Better-Auth classifies them; its `level` filter still applies. A project's `betterAuth.options.logger` is merged over it, its own `log` handler wins |
577
+ | AWS SDK warnings (e.g. "non-retryable streaming request" on an aborted upload) | `CoreS3Service` | `warn`; the SDK's debug/info/error stay silent as before |
578
+ | Passkey auto-detection ("Using rpId=…") | `BetterAuthConfig` | **`log`** (was `warn`) — only "Passkey disabled" is still a warning |
579
+
580
+ A project that filters its logs by these exact `console` lines must match the Nest format instead.
581
+
582
+ **`new ConfigService(config)` no longer prints the configuration.** The constructor defaulted to `warn: true`, so
583
+ every construction after the first — `CoreModule.forRoot()` running a second time in one process: tests, scripts,
584
+ a second application — wrote the whole merged config, **secrets included**, to stdout. It now defaults to `false`
585
+ like `setConfig()` and `mergeConfig()`; pass `{ warn: true }` for the dump while debugging.
586
+
587
+ **IAM password routes accept a plaintext password everywhere.** Sign-in, sign-up and the reset routes normalized a
588
+ plaintext password to sha256 (the shape every credential is stored in); the other native Better-Auth routes did
589
+ not. A plaintext password was refused as "Invalid password" by `/iam/two-factor/enable`, `/disable`,
590
+ `/generate-backup-codes`, `/get-totp-uri`, `/iam/delete-user` and `/iam/verify-password`, and
591
+ `/iam/change-password` stored a plaintext `newPassword` unnormalized — the account was locked out at its next
592
+ sign-in. nuxt-extensions hashes in the browser and was never affected; apps, scripts and API clients were. A new
593
+ plaintext password on `change-password` is now also held to `minPasswordLength` / `maxPasswordLength`, like a
594
+ reset. A password outside those bounds is answered with **400** and the bounds in the message — on the reset routes
595
+ this refusal used to come back as a 500 "Authentication handler error" with an ERROR log line. A client that treated
596
+ that 500 as "password rejected" should check for the 400. No other action needed; an already hashed password passes
597
+ through unchanged.
598
+
599
+ **The reset link ignores an unusable `redirectTo`.** A `redirectTo` that is neither an absolute http(s) URL nor a
600
+ path starting with `/` (`'reset'`, or a template literal over an unset variable: `'undefined/reset'`) was mailed
601
+ verbatim as a relative link that resolves nowhere. The mail now points at the default page,
602
+ `<appUrl>/auth/reset-password`.
603
+
604
+ **Smaller corrections:** the legacy-auth deprecation report appears once per application (it ran twice, with two
605
+ status reads, when `AuthModule.forRoot()` is passed to `CoreModule.forRoot()` and imported again); a migration-status
606
+ read interrupted by the application closing is logged at debug level; the AI connection preference no longer uses
607
+ Mongoose's deprecated `new: true` option (a `[MONGOOSE] Warning` on every call); `CoreBetterAuthMiddleware` is bound
608
+ with path-to-regexp 8's `{*path}` instead of the legacy `(.*)`, which only worked through Nest's route converter.
609
+
610
+ ## 17. ES modules: nest-server is ESM, projects may be either (new)
611
+
612
+ `nest new` generates ESM projects (`"type": "module"`) since NestJS 12, every `@nestjs/*` package ships as ESM only,
613
+ and more and more other packages do too. **nest-server follows NestJS: since 12.0.0 the package is an ES module**
614
+ (`"type": "module"`, one ESM build, no CommonJS build). **A CommonJS project changes nothing for that** — it loads
615
+ nest-server through Node's `require(esm)` exactly as it already loads every `@nestjs/*` package (Node 20.19+ /
616
+ 22.12+; nest-server requires 22.15+).
617
+
618
+ | Project | What it gets |
619
+ |---------|--------------|
620
+ | CommonJS, npm mode | unchanged: `require('@lenne.tech/nest-server')` / `import … from` compiled to `require()` returns all exports. Verified against the unchanged nest-server-starter: type check, all unit and e2e tests, build, `migrate:list`, production start |
621
+ | ESM, npm mode | one module graph with NestJS: `import { CoreModule } from '@lenne.tech/nest-server'`. Packages that ship separate builds (`@apollo/server`, `graphql-ws`, `nodemailer`) are loaded once instead of twice |
622
+ | vendor mode, either | the vendored core compiles with the project's own settings — as CommonJS in a CommonJS project, as ESM in an ESM project. nest-server's `check` proves both (`typecheck:vendor`, `check:esm`) |
623
+
624
+ Paths projects reference stay where they are: `dist/core/modules/migrate/helpers/ts-compiler.js` (the loader of §14),
625
+ `bin/migrate.js` (the `migrate` binary) and `dist/core/modules/migrate/templates/migration-project.template.ts`. The
626
+ first two remain **CommonJS in every project** — `helpers/package.json` and `bin/package.json` declare
627
+ `"type": "commonjs"` for their directory — so `--compiler ts:…/ts-compiler.js`, `node -r …/ts-compiler.js` and the
628
+ loader's function export work as before, in CommonJS and ESM projects alike. The migration helpers moved from
629
+ `migrate/helpers/migration.helper` to `migrate/migration.helper`; the old path forwards, so a
630
+ `migrations-utils/migrate.js` that requires it keeps working.
631
+
632
+ **What a CommonJS project may notice:** the same as for NestJS 12 itself — Jest needs Node 24.9+ to load ESM packages
633
+ (§12), and AWS Lambda needs `NODE_OPTIONS=--experimental-require-module`. Nothing beyond that: if `@nestjs/core`
634
+ loads, nest-server loads.
635
+
636
+ **Deployment is unchanged.** The starter's Docker image, its entrypoint (migrations, then `node dist/…/main.js`) and
637
+ the way TurboOps and Kubernetes start it do not depend on the module format. Verified with the starter image, as
638
+ CommonJS and as ESM project: compiled migrations ran from the entrypoint, the container reported healthy and
639
+ `/health-check` answered 200.
640
+
641
+ ### Converting a project to ESM (optional)
642
+
643
+ Worth it when a project needs a package that only loads from an ES module (one with top-level `await`, which
644
+ `require(esm)` refuses with `ERR_REQUIRE_ASYNC_MODULE`), or to match what `nest new` generates. lt CLI 1.52.0 or newer
645
+ converts the api project with `lt server convert-esm` (npm and vendor mode; `--dry-run` shows the changes first);
646
+ these are the steps it takes, measured on a copy of nest-server-starter:
647
+
648
+ 1. `"type": "module"` in `package.json`; `tsconfig.json`: `"module": "nodenext"`, `"moduleResolution": "nodenext"`,
649
+ `"isolatedModules": true`.
650
+ 2. Every relative import names the emitted file: `./x.js`, `./dir/index.js` — including dynamic `import()`.
651
+ [`ts2esm`](https://www.npmjs.com/package/ts2esm) does the static ones (run it after step 1, otherwise it asks
652
+ about a bundler).
653
+ 3. `import x = require('pkg')` becomes `import x from 'pkg'`; a JSON import gets `with { type: 'json' }`;
654
+ `__dirname` / `__filename` become `import.meta.dirname` / `import.meta.filename`; a file that must load another
655
+ file synchronously uses `createRequire(import.meta.url)`.
656
+ 4. `migrations-utils/*.js` become ES modules (`import { createMigrationStore } from '@lenne.tech/nest-server'`,
657
+ `export default createMigrationStore(…)`) — the migrate CLI reads the default export. **Vendor mode:** the store
658
+ must not `import` the vendored core. The migrate CLI loads the store with `require()`, and `require()` of an ES
659
+ module does not run the loader's ESM hooks, so `import … from '../src/core/index.js'` fails with
660
+ `Cannot find module …/src/core/index.js` in development. Require the helper instead — the loader's require hook
661
+ compiles it in development, and in the image the same line loads the compiled helper:
662
+
663
+ ```js
664
+ // migrations-utils/migrate.js — vendor mode, ESM project
665
+ import { createRequire } from 'node:module';
666
+
667
+ const require = createRequire(import.meta.url);
668
+ const { createMigrationStore } = require('../src/core/modules/migrate/migration.helper');
669
+
670
+ export default createMigrationStore(/* the MongoDB URI and collection name, as before */);
671
+ ```
672
+
673
+ The scripts name the core's loader directly (`--compiler ts:./src/core/modules/migrate/helpers/ts-compiler.js`,
674
+ §14) instead of `migrations-utils/ts-compiler.js`, which would be an ES module now.
675
+ 5. A type used in a decorated signature that is not a class (`ServiceOptions`, `FileUpload`, `CoreModelConstructor`)
676
+ moves to `import type` — `isolatedModules` reports each one as `TS1272`. Never do this for a class whose type
677
+ drives dependency injection.
678
+ 6. **A named import of a CommonJS package that Node cannot see.** ESM learns a CommonJS module's names by static
679
+ analysis, which misses some: `import { Connection } from 'mongoose'` and `import { cloneDeep } from 'lodash'` fail
680
+ with `does not provide an export named …`. Use `import type` for a type, the default import for a value. **The
681
+ tests do not show this** — vitest is more lenient than Node; on the starter all 489 tests passed and the
682
+ production start failed. Start the built server (`check:server-start`) after converting.
683
+ 7. **Import cycles.** A decorated property or constructor parameter whose type comes from a module on an import
684
+ cycle (two models that reference each other) reads that class while the cycle is still loading. CommonJS reads
685
+ `undefined` and carries on; ESM throws `ReferenceError: Cannot access 'X' before initialization` at start-up. Type
686
+ such a declaration as `WrapperType<X>` (exported by nest-server, NestJS's name for it) — the decorator keeps the
687
+ real type through its thunk:
688
+
689
+ ```typescript
690
+ @UnifiedField({ type: () => User })
691
+ owner?: WrapperType<User>;
692
+ ```
693
+
694
+ Our own projects carry between 2 and 11 import cycles each; only those with a decorated declaration on them fail.
695
+ 8. The dev start keeps `node -r …/helpers/ts-compiler.js src/main.ts` (§14): the loader compiles ES modules too,
696
+ including decorators, `.js` specifiers and JSON import attributes, which Node's own type stripping cannot.
697
+
698
+ ### Tests: vitest must resolve like Node
699
+
700
+ Add to every vitest config of the project (unit and e2e):
701
+
702
+ ```ts
703
+ resolve: { extensions: ['.js', '.mjs', '.mts', '.ts', '.jsx', '.tsx', '.json'] },
704
+ ```
705
+
706
+ graphql declares an extensionless `main: "index"` next to an `index.mjs`. Node loads `index.js`; Vite probes `.mjs`
707
+ first and loads a SECOND, ESM copy of graphql for every `import` it resolves itself — the vendored core in vendor
708
+ mode, and any test that imports graphql. Schema objects from one copy are refused by the other: subscriptions close
709
+ with 4500, and the server log says "Cannot use GraphQLSchema from another module or realm". The order above is Vite's
710
+ default with `.js` moved before `.mjs`.
711
+
712
+ ### Corrected along the way
713
+
714
+ Two settings a project may have relied on without them ever working:
715
+
716
+ - **`loadLocalConfig`** loaded its file with an `import()` relative to the config helper's own directory: `true`
717
+ searched `dist/core/common/helpers` (inside `node_modules` in npm mode) instead of the project, and the merge landed
718
+ after the configuration had been returned. Now `true` reads `config.json` from the working directory, then
719
+ `src/config.json`; a path resolves against the working directory (`.json` as JSON, anything else as a module, its
720
+ default export used); the merge happens before `getEnvironmentConfig()` returns. A project that set
721
+ `loadLocalConfig` and has such a file gets its values applied for the first time — check what is in it.
722
+ - **`uploadFileToGridFS(url, relativePath)`** resolved a relative path against the helper's own directory, inside
723
+ `node_modules/@lenne.tech/nest-server/dist` in npm mode. It now resolves against the calling migration's directory,
724
+ and falls back to the helper's directory when the file is not there, so a migration written for the old anchoring
725
+ keeps working.
726
+
727
+ ### Lint (optional, recommended)
728
+
729
+ NestJS 12's template lints with `oxlint --type-aware` and
730
+ `typescript/no-floating-promises: "error"`; nest-server does the same since 12.0.0 (`oxlint-tsgolint` as a
731
+ devDependency). An un-awaited promise's rejection is unhandled, and Node ends the process on that by default. The
732
+ rule found eight places in nest-server; one could actually reject — stopping a cron job from the Hub while its tick
733
+ was still running, now logged instead. Type-aware mode also turns on
734
+ every other type-aware rule of the enabled categories; under `strict: false` most of them only report "requires
735
+ strictNullChecks" or flag deliberate idioms, so nest-server switches those off by name (see its `.oxlintrc.json`).
736
+
737
+ ---
738
+
739
+ ## Not in this release, on purpose
740
+
741
+ | Package | Stays at | Why |
742
+ |---------|----------|-----|
743
+ | `graphql-upload` | 15.0.2 | 16+ exports only `.mjs` paths, so every project importing `GraphQLUpload.js` would break with no way to prepare under 11.x. 17.1.0 follows in **12.1.0**, once projects import the scalar from nest-server (§13) — then it changes nothing for them. 18 requires graphql 17 |
744
+ | `undici` | 7.30.1 (still patched) | undici 8 replaces the global dispatcher of Node's built-in `fetch` as soon as it is loaded: afterwards a plain `fetch(url, { method: 'POST', headers: { 'Content-Length': '0' } })` anywhere in the process fails with `UND_ERR_INVALID_ARG` (reproduced on Node 24.12 with 8.12.3). nest-server would bring that into every project's process. 8 also requires Node ≥ 22.19 |
745
+ | `graphql` 17 | 16.14.2 | `@apollo/server` 5 and `graphql-subscriptions` 3 peer `^16` only |
746
+ | `typescript` 7 | 6.0.3 | `@nestjs/graphql` 14 and `@nestjs/swagger` 12 peer `^5.5 \|\| ^6` |
747
+
748
+ ## Compatibility Notes
749
+
750
+ | Pattern | Status |
751
+ |---------|--------|
752
+ | CommonJS project (`package.json` without `"type": "module"`) | works unchanged — it loads the ESM package through `require(esm)`, as it does every `@nestjs/*` package. Switching the project to ESM is optional (§17) |
753
+ | ESM project (`"type": "module"`), npm or vendor mode | supported (§17) |
754
+ | `CoreModule.forRoot(envConfig)` / the three-argument legacy form | unchanged |
755
+ | Extending `Core*` services, resolvers, controllers | unchanged, except §5 |
756
+ | `class X extends AuthGuard('…') {}` without a constructor | works (§5, first row) |
757
+ | GraphQL subscriptions over `graphql-ws`, tenant context on the WebSocket, open-socket re-check | unchanged |
758
+ | `setupSwagger()` | unchanged API; see §7 for the document |
759
+ | `healthCheck` config | unchanged (§6) |
760
+ | `nest start -b swc` / `check:swc-tdz` | unchanged |
761
+ | `migrate:*` scripts with `--compiler ts:…/helpers/ts-compiler.js` | unchanged scripts; the file compiles with `@swc/core` now (§14) |
762
+ | Vendor mode: `migrate:*` scripts with `--compiler ts:./migrations-utils/ts-compiler.js` | unchanged scripts; the file must load the core's loader instead of ts-node (§14) |
763
+ | Compiled migrations in the production image (`dist/migrations`, no `--compiler`) | unchanged — no TypeScript loader involved |
764
+
765
+ ## Troubleshooting
766
+
767
+ | Symptom | Cause | Fix |
768
+ |---------|-------|-----|
769
+ | Hundreds of `TS2322` / `TS18048` after the upgrade | TypeScript 6 turned `strict` on | `"strict": false` (§2) |
770
+ | `TS5011 … The 'rootDir' setting must be explicitly set` | TypeScript 6 `rootDir` default | set `rootDir` (§2) |
771
+ | `node dist/main.js` → `Cannot find module` | output moved to `dist/src/` | set `rootDir` (§2) |
772
+ | `TS5107 Option 'moduleResolution=node10' is deprecated` | explicit `"moduleResolution": "node"` | `nodenext` (§2) |
773
+ | `Cannot find name 'process'` | TypeScript 6 `types: []` default | add `"node"` to `types` (§2) |
774
+ | `TS2307 Cannot find module '@nestjs/…/dist/…'` or `ERR_PACKAGE_PATH_NOT_EXPORTED` | deep import (§3) | import from the package root |
775
+ | `TS2835 Relative import paths need explicit file extensions` | relative dynamic `import()` under `nodenext` | a static import (§2); bundler resolution for test files (§2) |
776
+ | `Class 'X' incorrectly extends base class 'CoreX'` | two copies of a NestJS package | align the pins (§1), `pnpm run update` |
777
+ | `Nest can't resolve dependencies of the XService (…, ?)` | §5 | `@Optional()` on the redeclared constructor |
778
+ | Subscriptions never connect from an old client | legacy protocol (§4) | `graphql-ws` client |
779
+ | Every GraphQL upload fails with `Upload value invalid.` | the scalar and the multipart middleware come from two graphql-upload copies | `import { GraphQLUpload } from '@lenne.tech/nest-server'` (§13) |
780
+ | Boot fails with `Cannot determine a GraphQL input type for the "file"` although `tsc` passed | `import * as GraphQLUpload from 'graphql-upload/…'` — TypeScript 6 wraps it in `__importStar` (§2) | `import { GraphQLUpload } from '@lenne.tech/nest-server'` (§13) |
781
+ | `ENOENT … stat '…/src/assets'` (or `…/src/templates`) during `nest build` / `nest start` | §11 | remove the asset entry or create the directory |
782
+ | `No driver (HTTP) has been selected` at startup | `@nestjs/platform-express` 12.2.0 next to an older `@nestjs/core` (§15) | align all `@nestjs/*` pins, `pnpm run update` |
783
+ | WebSocket closed with `4401` | the handshake's token authenticates nobody (§4) | sign in again; was `4500` before 12.0.0 |
784
+ | `Invalid password` from `/iam/two-factor/enable` (or `/delete-user`, `/change-password`) with the right password, on 11.x | the route did not normalize a plaintext password (§16) | fixed in 12.0.0; on 11.x send the sha256 of the password |
785
+ | Log lines of cron jobs, Better-Auth or the exception filter look different | they go through Nest's `Logger` now (§16) | match the Nest format (`[Nest] … [CronJobs] …`) |
786
+ | Jest: `ERR_REQUIRE_ASYNC_MODULE` | §12 | Node 24.9+ or vitest |
787
+ | Vendor mode: `pnpm start` fails with `Cannot find module './core.module.js'` (or another `.js` of the core) | nodemon still starts ts-node, which does not map `.js` to `.ts` (§14) | `node -r ./src/core/modules/migrate/helpers/ts-compiler.js src/main.ts` in `nodemon.json` (§14) |
788
+ | Vendor mode, Jest: `Cannot find module './….js' from 'src/core/…'` | ts-jest does not map `.js` to `.ts` (§14) | `moduleNameMapper` (§14) or vitest |
789
+ | Vendor mode: every `migrate:*` fails with `Cannot find module '../migration.helper.js'` (or another `.js` of the core) | `migrations-utils/ts-compiler.js` still registers ts-node (§14) | `module.exports = require('../src/core/modules/migrate/helpers/ts-compiler.js');` in that file (§14) |
790
+ | Vendor mode: `TS5110` / `TS5011` / `TS5107` from a `migrate:*` script | the ts-node bootstrap in `migrations-utils/ts-compiler.js` reads the project's `tsconfig.json` (§14) | the same one-line bootstrap (§14) |
791
+ | ESM vendor-mode project: `migrate:*` fails with `Cannot find module …/src/core/index.js` | `migrations-utils/migrate.js` imports the vendored core; the migrate CLI's `require()` does not run the loader's ESM hooks (§17, step 4) | load the helper with `createRequire(import.meta.url)` (§17, step 4) |
792
+ | `Running TypeScript sources needs @swc/core, which this project does not have` | a `migrate:*` script or `node -r …/ts-compiler.js` in a project without `@swc/core` (§14) | `pnpm add -D @swc/core` |
793
+ | Tests only: subscriptions close with `4500`, log says `Cannot use GraphQLSchema from another module or realm` | vitest loaded a second, ESM copy of graphql (§17) | `resolve.extensions` in Node's order in every vitest config (§17) |
794
+ | ESM vendor-mode project: `require is not defined in ES module scope` from `bin/migrate.js` | the project's `bin/` lacks the `package.json` that keeps the migrate binary CommonJS (§17) | copy `bin/package.json` (`{ "type": "commonjs" }`) next to `bin/migrate.js` |
795
+ | CommonJS project, Jest: `ERR_REQUIRE_ESM` / `ERR_REQUIRE_ASYNC_MODULE` for `@lenne.tech/nest-server` | Jest loads ES modules from CommonJS only on Node 24.9+ — the same applies to `@nestjs/*` (§12) | Node 24.9+ or vitest |
796
+ | ESM project: `ReferenceError: Cannot access 'X' before initialization` at start-up | a decorated declaration on an import cycle (§17, step 7) | type it as `WrapperType<X>` |
797
+ | `The requested module 'x' does not provide an export named 'y'` in an ESM project | a named import of a CommonJS package Node cannot detect (§17, step 6) | `import type` for a type, otherwise the default import: `import x from 'x'`, then `x.y` |
798
+ | Values from `config.json` suddenly apply | `loadLocalConfig` reads the project's file now (§17) | review the file, or remove `loadLocalConfig` |
799
+ | Dev server starts although the code has a type error | the SWC loader strips types without checking them (§14) | `pnpm run build` / the IDE report it; `nest start -b swc -w --type-check` checks while watching |
800
+
801
+ ## Module Documentation
802
+
803
+ ### Health Check
804
+
805
+ - **Key Files:** `src/core/modules/health-check/core-health-check.service.ts` (indicator wiring, timeout translation)
806
+
807
+ ### Auth (Legacy)
808
+
809
+ - **README:** [src/core/modules/auth/README.md](../src/core/modules/auth/README.md)
810
+ - **Key Files:** `src/core/modules/auth/guards/auth.guard.ts` (the passport defaults are inlined, §3)
811
+
812
+ ### GraphQL WebSocket wiring
813
+
814
+ - **Key Files:** `src/core.module.ts` (the three driver builders, `'graphql-ws'` only), `src/core/common/helpers/graphql-ws-connection.helper.ts`
815
+
816
+ ### Swagger
817
+
818
+ - **Key Files:** `src/core/common/helpers/swagger.helper.ts` (`operationsOf()`, `additionalOperations`)
819
+
820
+ ## References
821
+
822
+ - [NestJS v12 migration guide](https://docs.nestjs.com/migration-guide)
823
+ - [TypeScript 6.0 release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/)
824
+ - Release notes: [@nestjs/graphql 14.0.0](https://github.com/nestjs/graphql/releases/tag/v14.0.0),
825
+ [@nestjs/swagger 12.0.0](https://github.com/nestjs/swagger/releases/tag/12.0.0),
826
+ [@nestjs/terminus 12.0.0](https://github.com/nestjs/terminus/releases/tag/12.0.0),
827
+ [@nestjs/passport 12.0.0](https://github.com/nestjs/passport/releases/tag/12.0.0)
828
+ - [nest-server-starter](https://github.com/lenneTech/nest-server-starter) (reference implementation)