ddd-ts-kit 0.89.0 → 0.91.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 (463) hide show
  1. package/CHANGELOG.md +318 -0
  2. package/README.fr.md +58 -12
  3. package/README.md +54 -11
  4. package/dist/alias/index.d.ts +2 -1
  5. package/dist/alias/index.d.ts.map +1 -1
  6. package/dist/alias/index.js +1 -0
  7. package/dist/alias/index.js.map +1 -1
  8. package/dist/alias/mapper-target-text.d.ts +4 -0
  9. package/dist/alias/mapper-target-text.d.ts.map +1 -0
  10. package/dist/alias/mapper-target-text.js +5 -0
  11. package/dist/alias/mapper-target-text.js.map +1 -0
  12. package/dist/alias/module-name-mapper.d.ts +5 -2
  13. package/dist/alias/module-name-mapper.d.ts.map +1 -1
  14. package/dist/alias/module-name-mapper.js +5 -2
  15. package/dist/alias/module-name-mapper.js.map +1 -1
  16. package/dist/check/alias/test-runners.js +8 -3
  17. package/dist/check/alias/test-runners.js.map +1 -1
  18. package/dist/check/baseline/apply-baseline.d.ts +14 -0
  19. package/dist/check/baseline/apply-baseline.d.ts.map +1 -0
  20. package/dist/check/baseline/apply-baseline.js +30 -0
  21. package/dist/check/baseline/apply-baseline.js.map +1 -0
  22. package/dist/check/baseline/baseline-following-moves.d.ts +9 -0
  23. package/dist/check/baseline/baseline-following-moves.d.ts.map +1 -0
  24. package/dist/check/baseline/baseline-following-moves.js +10 -0
  25. package/dist/check/baseline/baseline-following-moves.js.map +1 -0
  26. package/dist/check/baseline/baseline-move.d.ts +6 -0
  27. package/dist/check/baseline/baseline-move.d.ts.map +1 -0
  28. package/dist/check/baseline/baseline-move.js +2 -0
  29. package/dist/check/baseline/baseline-move.js.map +1 -0
  30. package/dist/check/baseline/baseline-text.d.ts +4 -0
  31. package/dist/check/baseline/baseline-text.d.ts.map +1 -0
  32. package/dist/check/baseline/baseline-text.js +12 -0
  33. package/dist/check/baseline/baseline-text.js.map +1 -0
  34. package/dist/check/baseline/baseline.d.ts +6 -0
  35. package/dist/check/baseline/baseline.d.ts.map +1 -0
  36. package/dist/check/baseline/baseline.js +2 -0
  37. package/dist/check/baseline/baseline.js.map +1 -0
  38. package/dist/check/baseline/moved-baseline-text.d.ts +4 -0
  39. package/dist/check/baseline/moved-baseline-text.d.ts.map +1 -0
  40. package/dist/check/baseline/moved-baseline-text.js +13 -0
  41. package/dist/check/baseline/moved-baseline-text.js.map +1 -0
  42. package/dist/check/baseline/parse-baseline.d.ts +4 -0
  43. package/dist/check/baseline/parse-baseline.d.ts.map +1 -0
  44. package/dist/check/baseline/parse-baseline.js +19 -0
  45. package/dist/check/baseline/parse-baseline.js.map +1 -0
  46. package/dist/check/baseline/pruned-baseline.d.ts +5 -0
  47. package/dist/check/baseline/pruned-baseline.d.ts.map +1 -0
  48. package/dist/check/baseline/pruned-baseline.js +14 -0
  49. package/dist/check/baseline/pruned-baseline.js.map +1 -0
  50. package/dist/check/baseline/read-baseline.d.ts +6 -0
  51. package/dist/check/baseline/read-baseline.d.ts.map +1 -0
  52. package/dist/check/baseline/read-baseline.js +11 -0
  53. package/dist/check/baseline/read-baseline.js.map +1 -0
  54. package/dist/check/baseline/recorded-baseline.d.ts +5 -0
  55. package/dist/check/baseline/recorded-baseline.d.ts.map +1 -0
  56. package/dist/check/baseline/recorded-baseline.js +11 -0
  57. package/dist/check/baseline/recorded-baseline.js.map +1 -0
  58. package/dist/check/baseline/renamed-files.d.ts +8 -0
  59. package/dist/check/baseline/renamed-files.d.ts.map +1 -0
  60. package/dist/check/baseline/renamed-files.js +23 -0
  61. package/dist/check/baseline/renamed-files.js.map +1 -0
  62. package/dist/check/baseline/write-baseline.d.ts +4 -0
  63. package/dist/check/baseline/write-baseline.d.ts.map +1 -0
  64. package/dist/check/baseline/write-baseline.js +9 -0
  65. package/dist/check/baseline/write-baseline.js.map +1 -0
  66. package/dist/check/canonical/stray-entry.d.ts.map +1 -1
  67. package/dist/check/canonical/stray-entry.js +5 -1
  68. package/dist/check/canonical/stray-entry.js.map +1 -1
  69. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  70. package/dist/check/catalogue/architecture-rules.js +4 -0
  71. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  72. package/dist/check/catalogue/default-severities.d.ts.map +1 -1
  73. package/dist/check/catalogue/default-severities.js +0 -4
  74. package/dist/check/catalogue/default-severities.js.map +1 -1
  75. package/dist/check/commands/check-command.d.ts.map +1 -1
  76. package/dist/check/commands/check-command.js +46 -1
  77. package/dist/check/commands/check-command.js.map +1 -1
  78. package/dist/check/commands/check-file-command.d.ts +5 -0
  79. package/dist/check/commands/check-file-command.d.ts.map +1 -1
  80. package/dist/check/commands/check-file-command.js +27 -6
  81. package/dist/check/commands/check-file-command.js.map +1 -1
  82. package/dist/check/explain/nest-docs.d.ts +3 -0
  83. package/dist/check/explain/nest-docs.d.ts.map +1 -0
  84. package/dist/check/explain/nest-docs.js +31 -0
  85. package/dist/check/explain/nest-docs.js.map +1 -0
  86. package/dist/check/explain/rule-docs.d.ts.map +1 -1
  87. package/dist/check/explain/rule-docs.js +2 -0
  88. package/dist/check/explain/rule-docs.js.map +1 -1
  89. package/dist/check/fixtures/alias-declared-fixtures.js +1 -1
  90. package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
  91. package/dist/check/fixtures/authz-declared-fixtures.js +1 -1
  92. package/dist/check/fixtures/authz-declared-fixtures.js.map +1 -1
  93. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  94. package/dist/check/fixtures/fixtures.js +4 -0
  95. package/dist/check/fixtures/fixtures.js.map +1 -1
  96. package/dist/check/fixtures/nest-controllers-fixtures.d.ts +3 -0
  97. package/dist/check/fixtures/nest-controllers-fixtures.d.ts.map +1 -0
  98. package/dist/check/fixtures/nest-controllers-fixtures.js +86 -0
  99. package/dist/check/fixtures/nest-controllers-fixtures.js.map +1 -0
  100. package/dist/check/fixtures/nest-fixtures.d.ts +3 -0
  101. package/dist/check/fixtures/nest-fixtures.d.ts.map +1 -0
  102. package/dist/check/fixtures/nest-fixtures.js +59 -0
  103. package/dist/check/fixtures/nest-fixtures.js.map +1 -0
  104. package/dist/check/nest/nest-equivalents-of.d.ts +14 -0
  105. package/dist/check/nest/nest-equivalents-of.d.ts.map +1 -0
  106. package/dist/check/nest/nest-equivalents-of.js +119 -0
  107. package/dist/check/nest/nest-equivalents-of.js.map +1 -0
  108. package/dist/check/project/load-project.d.ts +2 -0
  109. package/dist/check/project/load-project.d.ts.map +1 -1
  110. package/dist/check/project/load-project.js +7 -3
  111. package/dist/check/project/load-project.js.map +1 -1
  112. package/dist/check/rules/nest-controllers-current.d.ts +3 -0
  113. package/dist/check/rules/nest-controllers-current.d.ts.map +1 -0
  114. package/dist/check/rules/nest-controllers-current.js +43 -0
  115. package/dist/check/rules/nest-controllers-current.js.map +1 -0
  116. package/dist/check/rules/nest-no-parallel-pipeline.d.ts +3 -0
  117. package/dist/check/rules/nest-no-parallel-pipeline.d.ts.map +1 -0
  118. package/dist/check/rules/nest-no-parallel-pipeline.js +70 -0
  119. package/dist/check/rules/nest-no-parallel-pipeline.js.map +1 -0
  120. package/dist/check/support/is-generated-context-file.d.ts.map +1 -1
  121. package/dist/check/support/is-generated-context-file.js +4 -1
  122. package/dist/check/support/is-generated-context-file.js.map +1 -1
  123. package/dist/commands/doctor.d.ts.map +1 -1
  124. package/dist/commands/doctor.js +4 -2
  125. package/dist/commands/doctor.js.map +1 -1
  126. package/dist/commands/init.d.ts.map +1 -1
  127. package/dist/commands/init.js +1 -0
  128. package/dist/commands/init.js.map +1 -1
  129. package/dist/config/config.d.ts +6 -0
  130. package/dist/config/config.d.ts.map +1 -1
  131. package/dist/config/index.d.ts +1 -1
  132. package/dist/config/index.d.ts.map +1 -1
  133. package/dist/config/index.js +1 -1
  134. package/dist/config/index.js.map +1 -1
  135. package/dist/config/parse-config.js +1 -0
  136. package/dist/config/parse-config.js.map +1 -1
  137. package/dist/config/parse-stack.d.ts.map +1 -1
  138. package/dist/config/parse-stack.js +2 -1
  139. package/dist/config/parse-stack.js.map +1 -1
  140. package/dist/config/serialize-config.js +9 -2
  141. package/dist/config/serialize-config.js.map +1 -1
  142. package/dist/config/stack.d.ts +17 -4
  143. package/dist/config/stack.d.ts.map +1 -1
  144. package/dist/config/stack.js +4 -1
  145. package/dist/config/stack.js.map +1 -1
  146. package/dist/dev/refresh-declarations.d.ts.map +1 -1
  147. package/dist/dev/refresh-declarations.js +4 -1
  148. package/dist/dev/refresh-declarations.js.map +1 -1
  149. package/dist/docs/write-docs.d.ts.map +1 -1
  150. package/dist/docs/write-docs.js +2 -0
  151. package/dist/docs/write-docs.js.map +1 -1
  152. package/dist/doctor/diagnose.d.ts +2 -1
  153. package/dist/doctor/diagnose.d.ts.map +1 -1
  154. package/dist/doctor/diagnose.js +4 -1
  155. package/dist/doctor/diagnose.js.map +1 -1
  156. package/dist/doctor/doctor-finding.d.ts +3 -2
  157. package/dist/doctor/doctor-finding.d.ts.map +1 -1
  158. package/dist/doctor/format-diagnosis.js +4 -1
  159. package/dist/doctor/format-diagnosis.js.map +1 -1
  160. package/dist/doctor/override-findings.d.ts +10 -0
  161. package/dist/doctor/override-findings.d.ts.map +1 -0
  162. package/dist/doctor/override-findings.js +87 -0
  163. package/dist/doctor/override-findings.js.map +1 -0
  164. package/dist/file-moves/move-files.d.ts.map +1 -1
  165. package/dist/file-moves/move-files.js +10 -0
  166. package/dist/file-moves/move-files.js.map +1 -1
  167. package/dist/generate/kinds/property-kind.d.ts +3 -0
  168. package/dist/generate/kinds/property-kind.d.ts.map +1 -0
  169. package/dist/generate/kinds/property-kind.js +51 -0
  170. package/dist/generate/kinds/property-kind.js.map +1 -0
  171. package/dist/generate/kinds/route/nest-controller-vars.d.ts +11 -0
  172. package/dist/generate/kinds/route/nest-controller-vars.d.ts.map +1 -0
  173. package/dist/generate/kinds/route/nest-controller-vars.js +97 -0
  174. package/dist/generate/kinds/route/nest-controller-vars.js.map +1 -0
  175. package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
  176. package/dist/generate/kinds/route/route-vars.js +1 -9
  177. package/dist/generate/kinds/route/route-vars.js.map +1 -1
  178. package/dist/generate/kinds/route/success-status.d.ts +5 -0
  179. package/dist/generate/kinds/route/success-status.d.ts.map +1 -0
  180. package/dist/generate/kinds/route/success-status.js +11 -0
  181. package/dist/generate/kinds/route/success-status.js.map +1 -0
  182. package/dist/generate/kinds/route/write-nest-controller.d.ts +8 -0
  183. package/dist/generate/kinds/route/write-nest-controller.d.ts.map +1 -0
  184. package/dist/generate/kinds/route/write-nest-controller.js +52 -0
  185. package/dist/generate/kinds/route/write-nest-controller.js.map +1 -0
  186. package/dist/generate/kinds/route-kind.d.ts.map +1 -1
  187. package/dist/generate/kinds/route-kind.js +6 -1
  188. package/dist/generate/kinds/route-kind.js.map +1 -1
  189. package/dist/generate/kinds.d.ts.map +1 -1
  190. package/dist/generate/kinds.js +2 -0
  191. package/dist/generate/kinds.js.map +1 -1
  192. package/dist/generate/refresh-docs.d.ts.map +1 -1
  193. package/dist/generate/refresh-docs.js +2 -0
  194. package/dist/generate/refresh-docs.js.map +1 -1
  195. package/dist/generate/shared-writes.d.ts.map +1 -1
  196. package/dist/generate/shared-writes.js +5 -0
  197. package/dist/generate/shared-writes.js.map +1 -1
  198. package/dist/help/notes.d.ts +1 -1
  199. package/dist/help/notes.d.ts.map +1 -1
  200. package/dist/help/notes.js +3 -1
  201. package/dist/help/notes.js.map +1 -1
  202. package/dist/help/usage.d.ts +1 -1
  203. package/dist/help/usage.d.ts.map +1 -1
  204. package/dist/help/usage.js +4 -2
  205. package/dist/help/usage.js.map +1 -1
  206. package/dist/init/agent-permissions.js +2 -0
  207. package/dist/init/agent-permissions.js.map +1 -1
  208. package/dist/init/files/audit-files.js +1 -1
  209. package/dist/init/files/audit-files.js.map +1 -1
  210. package/dist/init/files/persistence-files.d.ts.map +1 -1
  211. package/dist/init/files/persistence-files.js +2 -0
  212. package/dist/init/files/persistence-files.js.map +1 -1
  213. package/dist/init/knip-vars.d.ts.map +1 -1
  214. package/dist/init/knip-vars.js +10 -2
  215. package/dist/init/knip-vars.js.map +1 -1
  216. package/dist/init/manifest/dependencies-against-stack.d.ts +18 -0
  217. package/dist/init/manifest/dependencies-against-stack.d.ts.map +1 -0
  218. package/dist/init/manifest/dependencies-against-stack.js +95 -0
  219. package/dist/init/manifest/dependencies-against-stack.js.map +1 -0
  220. package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
  221. package/dist/init/manifest/dependencies-for.js +12 -2
  222. package/dist/init/manifest/dependencies-for.js.map +1 -1
  223. package/dist/init/manifest/overrides-for.d.ts +7 -0
  224. package/dist/init/manifest/overrides-for.d.ts.map +1 -0
  225. package/dist/init/manifest/overrides-for.js +9 -0
  226. package/dist/init/manifest/overrides-for.js.map +1 -0
  227. package/dist/init/manifest/pinned-below-a-fix.d.ts +14 -0
  228. package/dist/init/manifest/pinned-below-a-fix.d.ts.map +1 -0
  229. package/dist/init/manifest/pinned-below-a-fix.js +20 -0
  230. package/dist/init/manifest/pinned-below-a-fix.js.map +1 -0
  231. package/dist/init/manifest/scripts-for.js +5 -2
  232. package/dist/init/manifest/scripts-for.js.map +1 -1
  233. package/dist/init/manifest/versions.d.ts.map +1 -1
  234. package/dist/init/manifest/versions.js +31 -25
  235. package/dist/init/manifest/versions.js.map +1 -1
  236. package/dist/init/manifest/write-overrides.d.ts +9 -0
  237. package/dist/init/manifest/write-overrides.d.ts.map +1 -0
  238. package/dist/init/manifest/write-overrides.js +56 -0
  239. package/dist/init/manifest/write-overrides.js.map +1 -0
  240. package/dist/init/run-init.d.ts.map +1 -1
  241. package/dist/init/run-init.js +19 -3
  242. package/dist/init/run-init.js.map +1 -1
  243. package/dist/init/stack/resolve-queue.d.ts +4 -10
  244. package/dist/init/stack/resolve-queue.d.ts.map +1 -1
  245. package/dist/init/stack/resolve-queue.js +7 -11
  246. package/dist/init/stack/resolve-queue.js.map +1 -1
  247. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  248. package/dist/init/stack/resolve-stack.js +23 -4
  249. package/dist/init/stack/resolve-stack.js.map +1 -1
  250. package/dist/init/stack/stack-options.d.ts +2 -0
  251. package/dist/init/stack/stack-options.d.ts.map +1 -1
  252. package/dist/nest-controllers/controllers-file.d.ts +3 -0
  253. package/dist/nest-controllers/controllers-file.d.ts.map +1 -0
  254. package/dist/nest-controllers/controllers-file.js +5 -0
  255. package/dist/nest-controllers/controllers-file.js.map +1 -0
  256. package/dist/nest-controllers/nest-answer.d.ts +16 -0
  257. package/dist/nest-controllers/nest-answer.d.ts.map +1 -0
  258. package/dist/nest-controllers/nest-answer.js +2 -0
  259. package/dist/nest-controllers/nest-answer.js.map +1 -0
  260. package/dist/nest-controllers/nest-controller-entry.d.ts +16 -0
  261. package/dist/nest-controllers/nest-controller-entry.d.ts.map +1 -0
  262. package/dist/nest-controllers/nest-controller-entry.js +2 -0
  263. package/dist/nest-controllers/nest-controller-entry.js.map +1 -0
  264. package/dist/nest-controllers/read-nest-controllers.d.ts +15 -0
  265. package/dist/nest-controllers/read-nest-controllers.d.ts.map +1 -0
  266. package/dist/nest-controllers/read-nest-controllers.js +89 -0
  267. package/dist/nest-controllers/read-nest-controllers.js.map +1 -0
  268. package/dist/nest-controllers/refresh-nest-controllers.d.ts +9 -0
  269. package/dist/nest-controllers/refresh-nest-controllers.d.ts.map +1 -0
  270. package/dist/nest-controllers/refresh-nest-controllers.js +32 -0
  271. package/dist/nest-controllers/refresh-nest-controllers.js.map +1 -0
  272. package/dist/nest-controllers/render-controllers-file.d.ts +8 -0
  273. package/dist/nest-controllers/render-controllers-file.d.ts.map +1 -0
  274. package/dist/nest-controllers/render-controllers-file.js +56 -0
  275. package/dist/nest-controllers/render-controllers-file.js.map +1 -0
  276. package/dist/platform-folders/platform-folders.d.ts.map +1 -1
  277. package/dist/platform-folders/platform-folders.js +10 -0
  278. package/dist/platform-folders/platform-folders.js.map +1 -1
  279. package/dist/presets/apply-preset.d.ts.map +1 -1
  280. package/dist/presets/apply-preset.js +22 -2
  281. package/dist/presets/apply-preset.js.map +1 -1
  282. package/dist/presets/identity-preset.d.ts.map +1 -1
  283. package/dist/presets/identity-preset.js +4 -1
  284. package/dist/presets/identity-preset.js.map +1 -1
  285. package/dist/presets/identity-refusal.d.ts.map +1 -1
  286. package/dist/presets/identity-refusal.js +11 -5
  287. package/dist/presets/identity-refusal.js.map +1 -1
  288. package/dist/presets/lay-out-prisma-models.d.ts +8 -0
  289. package/dist/presets/lay-out-prisma-models.d.ts.map +1 -0
  290. package/dist/presets/lay-out-prisma-models.js +51 -0
  291. package/dist/presets/lay-out-prisma-models.js.map +1 -0
  292. package/dist/presets/preset-files.d.ts.map +1 -1
  293. package/dist/presets/preset-files.js +3 -0
  294. package/dist/presets/preset-files.js.map +1 -1
  295. package/dist/presets/preset.d.ts +11 -0
  296. package/dist/presets/preset.d.ts.map +1 -1
  297. package/dist/sdk/client-files.d.ts +5 -3
  298. package/dist/sdk/client-files.d.ts.map +1 -1
  299. package/dist/sdk/client-files.js +8 -3
  300. package/dist/sdk/client-files.js.map +1 -1
  301. package/dist/sdk/client-manifest.d.ts +3 -0
  302. package/dist/sdk/client-manifest.d.ts.map +1 -1
  303. package/dist/sdk/client-manifest.js +15 -2
  304. package/dist/sdk/client-manifest.js.map +1 -1
  305. package/dist/sdk/client-operation.d.ts +6 -0
  306. package/dist/sdk/client-operation.d.ts.map +1 -1
  307. package/dist/sdk/read-operation.d.ts.map +1 -1
  308. package/dist/sdk/read-operation.js +6 -0
  309. package/dist/sdk/read-operation.js.map +1 -1
  310. package/dist/sdk/render-orpc.d.ts +8 -0
  311. package/dist/sdk/render-orpc.d.ts.map +1 -0
  312. package/dist/sdk/render-orpc.js +42 -0
  313. package/dist/sdk/render-orpc.js.map +1 -0
  314. package/dist/sdk/render-readme.d.ts +3 -0
  315. package/dist/sdk/render-readme.d.ts.map +1 -1
  316. package/dist/sdk/render-readme.js +46 -0
  317. package/dist/sdk/render-readme.js.map +1 -1
  318. package/dist/sdk/render-trpc.d.ts +9 -0
  319. package/dist/sdk/render-trpc.d.ts.map +1 -0
  320. package/dist/sdk/render-trpc.js +36 -0
  321. package/dist/sdk/render-trpc.js.map +1 -0
  322. package/dist/sdk/rpc-packages.d.ts +7 -0
  323. package/dist/sdk/rpc-packages.d.ts.map +1 -0
  324. package/dist/sdk/rpc-packages.js +9 -0
  325. package/dist/sdk/rpc-packages.js.map +1 -0
  326. package/dist/sdk/rpc.d.ts +4 -0
  327. package/dist/sdk/rpc.d.ts.map +1 -0
  328. package/dist/sdk/rpc.js +2 -0
  329. package/dist/sdk/rpc.js.map +1 -0
  330. package/dist/sdk/write-clients.d.ts.map +1 -1
  331. package/dist/sdk/write-clients.js +18 -3
  332. package/dist/sdk/write-clients.js.map +1 -1
  333. package/dist/stack/alias-vars.d.ts.map +1 -1
  334. package/dist/stack/alias-vars.js +2 -2
  335. package/dist/stack/alias-vars.js.map +1 -1
  336. package/dist/stack/audit-vars.js +1 -1
  337. package/dist/stack/audit-vars.js.map +1 -1
  338. package/dist/stack/cache-vars.d.ts +5 -1
  339. package/dist/stack/cache-vars.d.ts.map +1 -1
  340. package/dist/stack/cache-vars.js +9 -3
  341. package/dist/stack/cache-vars.js.map +1 -1
  342. package/dist/stack/stack-vars.d.ts +1 -1
  343. package/dist/stack/stack-vars.d.ts.map +1 -1
  344. package/dist/stack/stack-vars.js +11 -6
  345. package/dist/stack/stack-vars.js.map +1 -1
  346. package/dist/version.d.ts +1 -1
  347. package/dist/version.js +1 -1
  348. package/package.json +4 -4
  349. package/templates/architecture/extractable.declared.spec.ts.tpl +22 -17
  350. package/templates/architecture/extractable.manual.spec.ts.tpl +14 -9
  351. package/templates/architecture/extractable.tsyringe.spec.ts.tpl +19 -14
  352. package/templates/context/module.manual.ts.tpl +11 -0
  353. package/templates/init/jest.config.js.tpl +6 -0
  354. package/templates/init/platform/composition/compose-application.manual.ts.tpl +50 -0
  355. package/templates/init/platform/composition/platform.module.tsyringe.ts.tpl +9 -3
  356. package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +1 -1
  357. package/templates/init/platform/database/persistence-over.knex.ts.tpl +1 -1
  358. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +30 -1
  359. package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +23 -1
  360. package/templates/init/platform/database/persistence.contract.spec.ts.tpl +113 -0
  361. package/templates/init/platform/database/persistence.orm.ts.tpl +8 -3
  362. package/templates/init/platform/database/schema.prisma.tpl +53 -0
  363. package/templates/init/platform/database/schema.typeorm.ts.tpl +17 -3
  364. package/templates/init/platform/database/table-statements.drizzle.ts.tpl +36 -0
  365. package/templates/init/platform/files/bind-files.tsyringe.ts.tpl +1 -1
  366. package/templates/init/platform/files/create-files.ts.tpl +1 -1
  367. package/templates/init/platform/http/create-app-module.ts.tpl +20 -0
  368. package/templates/init/platform/http/start-http-server.express.ts.tpl +48 -1
  369. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +50 -2
  370. package/templates/init/platform/http/start-http-server.hono.ts.tpl +60 -1
  371. package/templates/init/platform/http/start-http-server.nest.ts.tpl +61 -3
  372. package/templates/init/platform/jobs/create-background-work.ts.tpl +2 -2
  373. package/templates/init/rules/infrastructure.md.tpl +3 -0
  374. package/templates/init/rules/presentation.md.tpl +7 -0
  375. package/templates/nest-controller/controller.spec.ts.tpl +57 -0
  376. package/templates/nest-controller/controller.ts.tpl +65 -0
  377. package/templates/pipeline/knip.json.tpl +4 -8
  378. package/templates/pipeline/package-scripts.json +1 -1
  379. package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +254 -0
  380. package/templates/presets/identity/context/application/authorization/change-member-roles.policy.ts.tpl +10 -0
  381. package/templates/presets/identity/context/application/authorization/grant-delegations.policy.ts.tpl +10 -0
  382. package/templates/presets/identity/context/application/authorization/invite-members.policy.ts.tpl +10 -0
  383. package/templates/presets/identity/context/application/authorization/read-members.policy.ts.tpl +10 -0
  384. package/templates/presets/identity/context/application/authorization/remove-members.policy.ts.tpl +10 -0
  385. package/templates/presets/identity/context/application/authorization/revoke-delegations.policy.ts.tpl +10 -0
  386. package/templates/presets/identity/context/application/authorization/revoke-invitations.policy.ts.tpl +10 -0
  387. package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.command.ts.tpl +6 -0
  388. package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +12 -0
  389. package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.command.ts.tpl +6 -0
  390. package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.handler.ts.tpl +12 -0
  391. package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.command.ts.tpl +6 -0
  392. package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.handler.ts.tpl +12 -0
  393. package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.command.ts.tpl +6 -0
  394. package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.handler.ts.tpl +12 -0
  395. package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.command.ts.tpl +6 -0
  396. package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.handler.ts.tpl +12 -0
  397. package/templates/presets/identity/context/application/commands/invite-member/invite-member.command.ts.tpl +6 -0
  398. package/templates/presets/identity/context/application/commands/invite-member/invite-member.handler.ts.tpl +12 -0
  399. package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.command.ts.tpl +6 -0
  400. package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.handler.ts.tpl +12 -0
  401. package/templates/presets/identity/context/application/commands/provision-account/provision-account.command.ts.tpl +6 -0
  402. package/templates/presets/identity/context/application/commands/provision-account/provision-account.handler.ts.tpl +12 -0
  403. package/templates/presets/identity/context/application/commands/remove-member/remove-member.command.ts.tpl +6 -0
  404. package/templates/presets/identity/context/application/commands/remove-member/remove-member.handler.ts.tpl +12 -0
  405. package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.command.ts.tpl +6 -0
  406. package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.handler.ts.tpl +12 -0
  407. package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.command.ts.tpl +6 -0
  408. package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.handler.ts.tpl +12 -0
  409. package/templates/presets/identity/context/application/integration/handlers/account-deactivated.integration-handler.ts.tpl +4 -0
  410. package/templates/presets/identity/context/application/integration/handlers/member-joined.integration-handler.ts.tpl +4 -0
  411. package/templates/presets/identity/context/application/integration/handlers/member-removed.integration-handler.ts.tpl +4 -0
  412. package/templates/presets/identity/context/application/integration/handlers/organisation-opened.integration-handler.ts.tpl +4 -0
  413. package/templates/presets/identity/context/application/integration/publishers/account-deactivated.publisher.ts.tpl +10 -1
  414. package/templates/presets/identity/context/application/integration/publishers/delegation-granted.publisher.ts.tpl +10 -1
  415. package/templates/presets/identity/context/application/integration/publishers/delegation-revoked.publisher.ts.tpl +10 -1
  416. package/templates/presets/identity/context/application/integration/publishers/member-joined.publisher.ts.tpl +10 -1
  417. package/templates/presets/identity/context/application/integration/publishers/member-removed.publisher.ts.tpl +10 -1
  418. package/templates/presets/identity/context/application/integration/publishers/member-role-changed.publisher.ts.tpl +10 -1
  419. package/templates/presets/identity/context/application/integration/publishers/organisation-opened.publisher.ts.tpl +10 -1
  420. package/templates/presets/identity/context/application/queries/search-members/search-members.handler.ts.tpl +12 -0
  421. package/templates/presets/identity/context/application/queries/search-members/search-members.query.ts.tpl +6 -0
  422. package/templates/presets/identity/context/infrastructure/external/crypto-invitation-tokens.adapter.ts.tpl +9 -0
  423. package/templates/presets/identity/context/infrastructure/external/environment-identity-provider-connection.adapter.ts.tpl +9 -0
  424. package/templates/presets/identity/context/infrastructure/external/keycloak-identity-provider-admin.adapter.ts.tpl +9 -0
  425. package/templates/presets/identity/context/infrastructure/persistence/account.mapper.prisma.ts.tpl +36 -0
  426. package/templates/presets/identity/context/infrastructure/persistence/account.personal-fields.privacy.prisma.ts.tpl +19 -0
  427. package/templates/presets/identity/context/infrastructure/persistence/delegation.mapper.prisma.ts.tpl +48 -0
  428. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +9 -0
  429. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +9 -0
  430. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +9 -0
  431. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +9 -0
  432. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +9 -0
  433. package/templates/presets/identity/context/infrastructure/persistence/drizzle-search-members-reader.repository.drizzle.ts.tpl +9 -0
  434. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.prisma.ts.tpl +43 -0
  435. package/templates/presets/identity/context/infrastructure/persistence/invitation.personal-fields.privacy.prisma.ts.tpl +20 -0
  436. package/templates/presets/identity/context/infrastructure/persistence/knex-account.repository.knex.ts.tpl +9 -0
  437. package/templates/presets/identity/context/infrastructure/persistence/knex-delegation.repository.knex.ts.tpl +9 -0
  438. package/templates/presets/identity/context/infrastructure/persistence/knex-invitation.repository.knex.ts.tpl +9 -0
  439. package/templates/presets/identity/context/infrastructure/persistence/knex-member.repository.knex.ts.tpl +9 -0
  440. package/templates/presets/identity/context/infrastructure/persistence/knex-organisation.repository.knex.ts.tpl +9 -0
  441. package/templates/presets/identity/context/infrastructure/persistence/knex-search-members-reader.repository.knex.ts.tpl +9 -0
  442. package/templates/presets/identity/context/infrastructure/persistence/member.mapper.prisma.ts.tpl +34 -0
  443. package/templates/presets/identity/context/infrastructure/persistence/organisation.mapper.prisma.ts.tpl +26 -0
  444. package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +63 -0
  445. package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +81 -0
  446. package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +69 -0
  447. package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +80 -0
  448. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +63 -0
  449. package/templates/presets/identity/context/infrastructure/persistence/prisma-search-members-reader.repository.prisma.ts.tpl +82 -0
  450. package/templates/presets/identity/context/test/integration/account.repository.contract.spec.ts.tpl +3 -3
  451. package/templates/presets/identity/context/test/integration/delegation.repository.contract.spec.ts.tpl +5 -5
  452. package/templates/presets/identity/context/test/integration/invitation.repository.contract.spec.ts.tpl +5 -5
  453. package/templates/presets/identity/context/test/integration/member.repository.contract.spec.ts.tpl +5 -5
  454. package/templates/presets/identity/context/test/integration/organisation.repository.contract.spec.ts.tpl +3 -3
  455. package/templates/presets/identity/context/test/integration/search-members-reader.spec.ts.tpl +8 -8
  456. package/templates/presets/identity/context/test/unit/__context__.module.spec.explicit.ts.tpl +95 -0
  457. package/templates/presets/identity/context/test/worlds/__context__.world.explicit.ts.tpl +332 -0
  458. package/templates/presets/identity/explicit/access-policies.wiring.tpl +16 -0
  459. package/templates/presets/identity/prisma/models.prisma.tpl +128 -0
  460. package/templates/property/value-object.properties.spec.ts.tpl +38 -0
  461. package/templates/sdk/orpc.ts.tpl +46 -0
  462. package/templates/sdk/trpc.ts.tpl +86 -0
  463. /package/templates/presets/identity/context/test/worlds/{__context__.world.ts.tpl → __context__.world.declared.ts.tpl} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAoDtC,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAsDtC,CAAC"}
@@ -35,6 +35,8 @@ import { LIFECYCLE_FIXTURES } from './lifecycle-fixtures.js';
35
35
  import { MODULE_FIXTURES } from './module-fixtures.js';
36
36
  import { NAMED_REFUSAL_FIXTURES } from './named-refusal-fixtures.js';
37
37
  import { NAMING_FIXTURES } from './naming-fixtures.js';
38
+ import { NEST_CONTROLLERS_FIXTURES } from './nest-controllers-fixtures.js';
39
+ import { NEST_FIXTURES } from './nest-fixtures.js';
38
40
  import { OUTBOX_FIXTURES } from './outbox-fixtures.js';
39
41
  import { PERSISTENCE_FIXTURES } from './persistence-fixtures.js';
40
42
  import { PORTS_FIXTURES } from './ports-fixtures.js';
@@ -99,6 +101,8 @@ export const FIXTURES = [
99
101
  ...PURITY_FIXTURES,
100
102
  ...SCHEDULING_FIXTURES,
101
103
  ...STANDARD_FIXTURES,
104
+ ...NEST_FIXTURES,
105
+ ...NEST_CONTROLLERS_FIXTURES,
102
106
  ...TENANCY_FIXTURES,
103
107
  ...PRIVACY_FIXTURES,
104
108
  ...TEST_FIXTURES,
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAA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IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,eAAe;IAClB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,qBAAqB;IACxB,GAAG,6BAA6B;IAChC,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,uBAAuB;IAC1B,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,0BAA0B;IAC7B,GAAG,uBAAuB;CAC3B,CAAC"}
1
+ {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,O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XTURES: readonly Fixture[];
3
+ //# sourceMappingURL=nest-controllers-fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-controllers-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/nest-controllers-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgDzC,eAAO,MAAM,yBAAyB,EAAE,SAAS,OAAO,EAgCvD,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { CONFIG_FILE } from '../../config/index.js';
2
+ import { renderControllersFile } from '../../nest-controllers/render-controllers-file.js';
3
+ import { config } from './config.js';
4
+ import { PATHS } from './paths.js';
5
+ import { project } from './project.js';
6
+ const { BILLING, CATALOG } = PATHS;
7
+ const RULE = 'nest/controllers-current';
8
+ const FOLDER = `${BILLING}/presentation/http/invoices/issue-invoice`;
9
+ const CONTROLLER = `${FOLDER}/issue-invoice.controller.ts`;
10
+ const ANSWER = `${FOLDER}/issue-invoice.answer.ts`;
11
+ const BILLING_FILE = `${BILLING}/billing.controllers.ts`;
12
+ const CATALOG_FILE = `${CATALOG}/catalog.controllers.ts`;
13
+ const NEST = { stack: { http: 'nest', di: 'nest', validation: 'class-validator', routes: 'nest' } };
14
+ const controller = (answered) => `import { Controller, Post } from '@nestjs/common';
15
+ import { KitRoutes } from '@ddd-ts-kit/http/nest';
16
+ import { IssueInvoiceAnswer } from '@/contexts/billing/presentation/http/invoices/issue-invoice/issue-invoice.answer.js';
17
+
18
+ @Controller('invoices')
19
+ @KitRoutes({ guards: [] })
20
+ export class IssueInvoiceController {
21
+ @Post()
22
+ async issueInvoice(): Promise<${answered}> {
23
+ return new IssueInvoiceAnswer();
24
+ }
25
+ }
26
+ `;
27
+ const ANSWERED = renderControllersFile('billing', 'billingControllers', [
28
+ {
29
+ file: CONTROLLER,
30
+ className: 'IssueInvoiceController',
31
+ specifier: '@/contexts/billing/presentation/http/invoices/issue-invoice/issue-invoice.controller.js',
32
+ methods: [
33
+ {
34
+ name: 'issueInvoice',
35
+ line: 9,
36
+ answer: {
37
+ kind: 'class',
38
+ name: 'IssueInvoiceAnswer',
39
+ specifier: '@/contexts/billing/presentation/http/invoices/issue-invoice/issue-invoice.answer.js',
40
+ },
41
+ declaresResponse: false,
42
+ },
43
+ ],
44
+ },
45
+ ]);
46
+ export const NEST_CONTROLLERS_FIXTURES = [
47
+ {
48
+ ruleId: RULE,
49
+ name: 'the generated list of a context, the answer of each method read from its signature',
50
+ expect: 'pass',
51
+ files: nestProject({ [CONTROLLER]: controller('IssueInvoiceAnswer'), [BILLING_FILE]: ANSWERED }),
52
+ },
53
+ {
54
+ ruleId: RULE,
55
+ name: 'the generated list left behind a controller written since',
56
+ expect: { file: BILLING_FILE },
57
+ files: nestProject({
58
+ [CONTROLLER]: controller('IssueInvoiceAnswer'),
59
+ [BILLING_FILE]: renderControllersFile('billing', 'billingControllers', []),
60
+ }),
61
+ },
62
+ {
63
+ ruleId: RULE,
64
+ name: 'a method that answers a list the kit cannot read into a schema',
65
+ expect: { file: CONTROLLER },
66
+ files: nestProject({
67
+ [CONTROLLER]: controller('IssueInvoiceAnswer[]'),
68
+ [BILLING_FILE]: renderControllersFile('billing', 'billingControllers', [
69
+ {
70
+ file: CONTROLLER,
71
+ className: 'IssueInvoiceController',
72
+ specifier: '@/contexts/billing/presentation/http/invoices/issue-invoice/issue-invoice.controller.js',
73
+ methods: [{ name: 'issueInvoice', line: 9, answer: { kind: 'unread', text: '' }, declaresResponse: false }],
74
+ },
75
+ ]),
76
+ }),
77
+ },
78
+ ];
79
+ function nestProject(files) {
80
+ return project({
81
+ [ANSWER]: 'export class IssueInvoiceAnswer {}\n',
82
+ [CATALOG_FILE]: renderControllersFile('catalog', 'catalogControllers', []),
83
+ ...files,
84
+ }, { [CONFIG_FILE]: config(NEST) });
85
+ }
86
+ //# sourceMappingURL=nest-controllers-fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-controllers-fixtures.js","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A6B;IAChD,OAAO,OAAO,CACZ;QACE,CAAC,MAAM,CAAC,EAAE,sCAAsC;QAChD,CAAC,YAAY,CAAC,EAAE,qBAAqB,CAAC,SAAS,EAAE,oBAAoB,EAAE,EAAE,CAAC;QAC1E,GAAG,KAAK;KACT,EACD,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAChC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Fixture } from './fixture.js';
2
+ export declare const NEST_FIXTURES: readonly Fixture[];
3
+ //# sourceMappingURL=nest-fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/nest-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,eAAO,MAAM,aAAa,EAAE,SAAS,OAAO,EA0D3C,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { PATHS } from './paths.js';
2
+ import { project } from './project.js';
3
+ const { BILLING, ADAPTER, GATEWAY, MODULE } = PATHS;
4
+ const RULE = 'nest/no-parallel-pipeline';
5
+ const NEST_CONTROLLER = `${BILLING}/presentation/http/invoices.controller.ts`;
6
+ const PLATFORM_CONTROLLER = 'src/platform/http/invoices.controller.ts';
7
+ export const NEST_FIXTURES = [
8
+ {
9
+ ruleId: RULE,
10
+ name: 'Nest in the platform, a client of Nest microservices in an adapter, and the testing module of Nest in a spec',
11
+ expect: 'pass',
12
+ files: project({
13
+ 'src/platform/http/app-module.ts': "import { Module } from '@nestjs/common';\nimport { APP_GUARD } from '@nestjs/core';\n\n@Module({})\nexport class AppModule {\n readonly guard = APP_GUARD;\n}\n",
14
+ [GATEWAY]: "import type { ClientProxy } from '@nestjs/microservices';\n\nexport class InProcessPriceCatalogGateway {\n constructor(private readonly client: ClientProxy) {}\n}\n",
15
+ [`${BILLING}/test/unit/invoices.spec.ts`]: "import { Test } from '@nestjs/testing';\nimport { it } from 'vitest';\n\nit.todo(String(Test));\n",
16
+ }),
17
+ },
18
+ {
19
+ ruleId: RULE,
20
+ name: 'a controller of Nest in a context, behind a guard of Nest',
21
+ expect: { file: NEST_CONTROLLER },
22
+ files: project({
23
+ [NEST_CONTROLLER]: "import { Controller, Post, UseGuards } from '@nestjs/common';\n\n@Controller('invoices')\nexport class InvoicesController {\n @Post()\n @UseGuards()\n issue(): void {}\n}\n",
24
+ }),
25
+ },
26
+ {
27
+ ruleId: RULE,
28
+ name: 'an HTTP exception of Nest thrown by an adapter',
29
+ expect: { file: ADAPTER },
30
+ files: project({
31
+ [ADAPTER]: "import { NotFoundException } from '@nestjs/common';\n\nexport class InMemoryInvoiceRepository {\n find(): never {\n throw new NotFoundException();\n }\n}\n",
32
+ }),
33
+ },
34
+ {
35
+ ruleId: RULE,
36
+ name: 'the configuration module of Nest in the module file of a context',
37
+ expect: { file: MODULE },
38
+ files: project({
39
+ [MODULE]: "import { ConfigService } from '@nestjs/config';\n\nexport const settings = ConfigService;\n",
40
+ }),
41
+ },
42
+ {
43
+ ruleId: RULE,
44
+ name: 'a Nest controller of a context the kit serves, its routes declared with the decorators of Nest',
45
+ expect: 'pass',
46
+ files: project({
47
+ [NEST_CONTROLLER]: "import { Body, Controller, Post } from '@nestjs/common';\nimport { KitRoute } from '@ddd-ts-kit/http/nest';\n\n@Controller('invoices')\nexport class InvoicesController {\n @Post()\n @KitRoute({ operationId: 'issueInvoice', summary: 'Issue' })\n issue(@Body() body: object): object {\n return body;\n }\n}\n",
48
+ }),
49
+ },
50
+ {
51
+ ruleId: RULE,
52
+ name: 'a controller Nest serves in the platform that sends a command',
53
+ expect: { file: PLATFORM_CONTROLLER },
54
+ files: project({
55
+ [PLATFORM_CONTROLLER]: "import { Controller } from '@nestjs/common';\nimport type { CommandBus } from '@ddd-ts-kit/kernel';\n\n@Controller('invoices')\nexport class InvoicesController {\n constructor(readonly commands: CommandBus) {}\n}\n",
56
+ }),
57
+ },
58
+ ];
59
+ //# sourceMappingURL=nest-fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/nest-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;AACpD,MAAM,IAAI,GAAG,2BAA2B,CAAC;AACzC,MAAM,eAAe,GAAG,GAAG,OAAO,2CAA2C,CAAC;AAC9E,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAEvE,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,8GAA8G;QACpH,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC;YACb,iCAAiC,EAC/B,kKAAkK;YACpK,CAAC,OAAO,CAAC,EACP,uKAAuK;YACzK,CAAC,GAAG,OAAO,6BAA6B,CAAC,EACvC,mGAAmG;SACtG,CAAC;KACH;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,2DAA2D;QACjE,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;QACjC,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,eAAe,CAAC,EACf,iLAAiL;SACpL,CAAC;KACH;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,gDAAgD;QACtD,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,OAAO,CAAC,EACP,kKAAkK;SACrK,CAAC;KACH;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,kEAAkE;QACxE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,MAAM,CAAC,EAAE,6FAA6F;SACxG,CAAC;KACH;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,gGAAgG;QACtG,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,eAAe,CAAC,EACf,2TAA2T;SAC9T,CAAC;KACH;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,+DAA+D;QACrE,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QACrC,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,mBAAmB,CAAC,EACnB,yNAAyN;SAC5N,CAAC;KACH;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ /** A tool of Nest a context reached for, and what the kit does in its place. */
2
+ export interface NestEquivalent {
3
+ readonly tool: string;
4
+ readonly instead: string;
5
+ }
6
+ /**
7
+ * What a context imports of Nest that the kit does in its own way, one per tool: none for a
8
+ * package of Nest the kit has no answer to (WebSockets, GraphQL, microservices, testing), nor for
9
+ * its container (`Injectable`, `Inject`), which an adapter bound as a Nest provider may carry. In
10
+ * a controller the kit serves (`servedByKit`: it carries `@KitRoute`), the decorators that declare
11
+ * a route are what the kit reads, and are not reported.
12
+ */
13
+ export declare function nestEquivalentsOf(packageName: string, names: readonly string[], servedByKit?: boolean): readonly NestEquivalent[];
14
+ //# sourceMappingURL=nest-equivalents-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-equivalents-of.d.ts","sourceRoot":"","sources":["../../../src/check/nest/nest-equivalents-of.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAwHD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,WAAW,UAAQ,GAClB,SAAS,cAAc,EAAE,CAc3B"}
@@ -0,0 +1,119 @@
1
+ const ROUTE = {
2
+ tool: 'a controller Nest serves',
3
+ instead: 'a route of the kit: `@KitRoute` of `@ddd-ts-kit/http/nest` on each method of the controller, served by `createControllersModule`, or `generate route`. Its security is declared, its refusals are problem documents with their codes, and it is in the contract',
4
+ };
5
+ const RAW = {
6
+ tool: 'the raw request or answer',
7
+ instead: 'the parts of the request a route of the kit validates (`@Body`, `@Query`, `@Param`, `@Headers`, `@CurrentActor`, `@RouteContext`), and an answer it declares (`response` of `@KitRoute`, `cache` for its headers)',
8
+ };
9
+ const GUARD = {
10
+ tool: 'a guard',
11
+ instead: 'the guards of a route group of the kit for a control at the edge (`generate guard`), and the permission of the use case for a right (`@Requires`, or `requires` in the module file), which the bus checks on every door: HTTP, /rpc, /trpc, a job, an event',
12
+ };
13
+ const PIPE = {
14
+ tool: 'a pipe',
15
+ instead: 'the schemas of the route (`request.body`, `params`, `query`), the ones the contract documents',
16
+ };
17
+ const FILTER = {
18
+ tool: 'an exception filter or an HTTP exception',
19
+ instead: 'a refusal of the domain or the application from the code list of the context, which the error mapper answers as a problem document with its code',
20
+ };
21
+ const INTERCEPTOR = {
22
+ tool: 'an interceptor',
23
+ instead: 'a bus middleware or an aspect (logging, retry, timeout), and the `cache` of the route for what a cache keeps',
24
+ };
25
+ const LOGGER = { tool: 'its logger', instead: 'the `Logger` of `@ddd-ts-kit/kernel`' };
26
+ const SIDE_EFFECT = {
27
+ tool: 'its common package',
28
+ instead: 'nothing: a context needs no side effect of Nest, which the platform sets up',
29
+ };
30
+ const PIPELINE = {
31
+ tool: 'its request pipeline',
32
+ instead: 'the platform, for what acts on Nest itself: the routes of the kit do not go through `APP_GUARD`, `APP_FILTER` or `APP_INTERCEPTOR`',
33
+ };
34
+ /** The tools of `@nestjs/common`, by the names a context imports. */
35
+ const COMMON = [
36
+ [/^(?:Controller|Get|Post|Put|Patch|Delete|All|Head|Options|Search|Body|Param|Query|Headers|HttpCode)$/, ROUTE],
37
+ [/^(?:Req|Request|Res|Response|Next|Header|Redirect|Render|Sse|Ip|HostParam|Session|UploadedFiles?)$/, RAW],
38
+ [/^(?:UseGuards|CanActivate|SetMetadata|applyDecorators)$/, GUARD],
39
+ [/^(?:UsePipes|PipeTransform|ArgumentMetadata)$|Pipe$/, PIPE],
40
+ [/^(?:UseFilters|Catch|ExceptionFilter|ArgumentsHost)$|Exception$/, FILTER],
41
+ [/^(?:UseInterceptors|NestInterceptor|CallHandler|ExecutionContext)$/, INTERCEPTOR],
42
+ [/^(?:Logger|ConsoleLogger|LoggerService)$/, LOGGER],
43
+ ];
44
+ /** The packages of Nest whose work the kit does, and what it does in their place. */
45
+ const PACKAGES = {
46
+ '@nestjs/core': PIPELINE,
47
+ '@nestjs/platform-express': PIPELINE,
48
+ '@nestjs/platform-fastify': PIPELINE,
49
+ '@nestjs/swagger': {
50
+ tool: 'Swagger',
51
+ instead: 'the OpenAPI contract the kit generates from the routes (`npm run docs:generate`), with its error codes',
52
+ },
53
+ '@nestjs/cqrs': {
54
+ tool: 'CQRS',
55
+ instead: 'the `CommandBus` and `QueryBus` of the kit, whose middlewares check the permission, open the unit of work and write the outbox',
56
+ },
57
+ '@nestjs/passport': {
58
+ tool: 'Passport',
59
+ instead: 'the authentication of the platform, read by `resolvePrincipal` of the HTTP boundary',
60
+ },
61
+ '@nestjs/jwt': {
62
+ tool: 'its JWT module',
63
+ instead: 'the authentication of the platform, read by `resolvePrincipal` of the HTTP boundary',
64
+ },
65
+ '@nestjs/schedule': {
66
+ tool: 'its scheduler',
67
+ instead: 'a job of the kit (`generate job`), which sends a command through the bus',
68
+ },
69
+ '@nestjs/bull': { tool: 'its queues', instead: 'a background job of the kit, which sends a command through the bus' },
70
+ '@nestjs/bullmq': {
71
+ tool: 'its queues',
72
+ instead: 'a background job of the kit, which sends a command through the bus',
73
+ },
74
+ '@nestjs/config': {
75
+ tool: 'its configuration',
76
+ instead: 'the configuration of the platform, validated at start and handed to the module of the context',
77
+ },
78
+ '@nestjs/throttler': { tool: 'its throttler', instead: 'the rate limit of the platform (`rateLimit` of the config)' },
79
+ '@nestjs/cache-manager': {
80
+ tool: 'its cache',
81
+ instead: 'the `Cache` port of the kernel, and the `cache` of a route for what HTTP caches keep',
82
+ },
83
+ '@nestjs/event-emitter': {
84
+ tool: 'its event emitter',
85
+ instead: 'domain events, which leave with the save, and integration events through the outbox',
86
+ },
87
+ '@nestjs/typeorm': {
88
+ tool: 'its ORM module',
89
+ instead: 'the repository adapter of the context on the ORM package of the kit, inside the unit of work',
90
+ },
91
+ '@nestjs/mongoose': {
92
+ tool: 'its ORM module',
93
+ instead: 'the repository adapter of the context, inside the unit of work',
94
+ },
95
+ '@nestjs/sequelize': {
96
+ tool: 'its ORM module',
97
+ instead: 'the repository adapter of the context, inside the unit of work',
98
+ },
99
+ '@nestjs/terminus': { tool: 'its health checks', instead: 'the readiness of the platform' },
100
+ };
101
+ /**
102
+ * What a context imports of Nest that the kit does in its own way, one per tool: none for a
103
+ * package of Nest the kit has no answer to (WebSockets, GraphQL, microservices, testing), nor for
104
+ * its container (`Injectable`, `Inject`), which an adapter bound as a Nest provider may carry. In
105
+ * a controller the kit serves (`servedByKit`: it carries `@KitRoute`), the decorators that declare
106
+ * a route are what the kit reads, and are not reported.
107
+ */
108
+ export function nestEquivalentsOf(packageName, names, servedByKit = false) {
109
+ if (packageName !== '@nestjs/common') {
110
+ const equivalent = PACKAGES[packageName];
111
+ return equivalent === undefined ? [] : [equivalent];
112
+ }
113
+ if (names.length === 0) {
114
+ return [SIDE_EFFECT];
115
+ }
116
+ const found = names.flatMap((name) => COMMON.find(([pattern]) => pattern.test(name))?.[1] ?? []);
117
+ return [...new Set(found.filter((equivalent) => !(servedByKit && equivalent === ROUTE)))];
118
+ }
119
+ //# sourceMappingURL=nest-equivalents-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-equivalents-of.js","sourceRoot":"","s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C5F,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,WAAmB,EACnB,KAAwB,EACxB,WAAW,GAAG,KAAK;IAEnB,IAAI,WAAW,KAAK,gBAAgB,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;QAEzC,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAEjG,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC"}
@@ -2,6 +2,8 @@ import type { Project } from '../model/project.js';
2
2
  export interface ProjectOptions {
3
3
  /** Load only this source instead of walking the tree (editor hook path). */
4
4
  readonly onlyFile?: string;
5
+ /** The text to judge for that file instead of what is on disk: what a session is about to write. */
6
+ readonly text?: string | undefined;
5
7
  }
6
8
  export declare function loadProject(root: string, options?: ProjectOptions): Project;
7
9
  //# sourceMappingURL=load-project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../../../src/check/project/load-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAK/E"}
1
+ {"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../../../src/check/project/load-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAID,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAS/E"}
@@ -8,11 +8,15 @@ import { loadSourceFile } from './load-source-file.js';
8
8
  import { walkDirectory } from './walk-directory.js';
9
9
  export function loadProject(root, options = {}) {
10
10
  const { config, text: configText } = readConfig(root);
11
- const tree = options.onlyFile === undefined ? walkTree(root, config) : oneFile(root, config, options.onlyFile);
11
+ const tree = options.onlyFile === undefined
12
+ ? walkTree(root, config)
13
+ : oneFile(root, config, { file: options.onlyFile, text: options.text });
12
14
  return assembleProject({ root, config, configText, ...tree });
13
15
  }
14
- function oneFile(root, config, file) {
15
- return { files: [readSource(root, config, file)], contextEntries: [], contextsOnDisk: [] };
16
+ /** The one source the editor hook asks about: its text on disk, or the text about to be written. */
17
+ function oneFile(root, config, { file, text }) {
18
+ const source = text === undefined ? readSource(root, config, file) : loadSourceFile(config, file, text);
19
+ return { files: [source], contextEntries: [], contextsOnDisk: [] };
16
20
  }
17
21
  function walkTree(root, config) {
18
22
  const files = [];
@@ -1 +1 @@
1
- {"version":3,"file":"load-project.js","sourceRoot":"","sources":["../../../src/check/project/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GAAa,EAAE,CAAC;IAEpC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE;QAC3D,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;YACtC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC;YACnE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AACnD,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY;IAC5D,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '../model/rule.js';
2
+ export declare const nestControllersCurrent: Rule;
3
+ //# sourceMappingURL=nest-controllers-current.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-controllers-current.d.ts","sourceRoot":"","sources":["../../../src/check/rules/nest-controllers-current.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAO1C,eAAO,MAAM,sBAAsB,EAAE,IAgBpC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { controllersFile } from '../../nest-controllers/controllers-file.js';
2
+ import { readNestControllers } from '../../nest-controllers/read-nest-controllers.js';
3
+ import { renderControllersFile } from '../../nest-controllers/render-controllers-file.js';
4
+ import { toName } from '../../naming/index.js';
5
+ import { reporter } from '../support/reporter.js';
6
+ const REGENERATE = 'Run `ddd-ts-kit docs` or `ddd-ts-kit generate`, or restart `npm run dev`, which rewrite it from the Nest controllers of the context and the signatures of their methods: the file is never edited by hand.';
7
+ export const nestControllersCurrent = {
8
+ id: 'nest/controllers-current',
9
+ description: 'With Nest controllers ("stack.routes": "nest"), the generated <context>.controllers.ts of each context lists its Nest controllers with what each method answers, as its signature says it, and every route method answers a type the kit reads into a schema: a DTO class, `Accepted` or `void`, or says its body in `response` of `@KitRoute`.',
10
+ scope: 'project',
11
+ run(project) {
12
+ if (project.config.stack.routes !== 'nest') {
13
+ return [];
14
+ }
15
+ const files = projectFiles(project);
16
+ return project.contextsOnDisk
17
+ .filter((context) => project.config.contexts[context] !== undefined)
18
+ .flatMap((context) => judged(project, files, context));
19
+ },
20
+ };
21
+ function judged(project, files, context) {
22
+ const report = reporter(project, nestControllersCurrent.id);
23
+ const entries = readNestControllers(files, project.config, context);
24
+ const file = `${project.config.contextsDir}/${context}/${controllersFile(context)}`;
25
+ const expected = renderControllersFile(context, `${toName(context).camel}Controllers`, entries);
26
+ const stale = files.read(file) === expected
27
+ ? []
28
+ : [
29
+ report({ file, line: 1 }, `${controllersFile(context)} is not what ddd-ts-kit writes from the Nest controllers of "${context}".`, REGENERATE),
30
+ ];
31
+ const unread = entries.flatMap((entry) => entry.methods
32
+ .filter(({ answer, declaresResponse }) => answer.kind === 'unread' && !declaresResponse)
33
+ .map(({ name, line, answer }) => report({ file: entry.file, line }, `${entry.className}.${name} answers ${answer.kind === 'unread' ? answer.text : ''}, which the kit cannot read into the body of its route.`, 'Answer a DTO class (`Promise<InvoiceDetailsAnswer>`), `Accepted` or `void`, or say the body in `response` of `@KitRoute`.')));
34
+ return [...stale, ...unread];
35
+ }
36
+ function projectFiles(project) {
37
+ const texts = new Map(project.files.map((file) => [file.path, file.text]));
38
+ return {
39
+ read: (file) => texts.get(file),
40
+ under: (directory) => [...texts.keys()].filter((file) => file.startsWith(`${directory}/`)),
41
+ };
42
+ }
43
+ //# sourceMappingURL=nest-controllers-current.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-controllers-current.js","sourceRoot":"","sources":["../../../src/check/rules/nest-controllers-current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAqB,MAAM,8CAA8C,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,UAAU,GACd,4MAA4M,CAAC;AAE/M,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,EAAE,EAAE,0BAA0B;IAC9B,WAAW,EACT,iVAAiV;IACnV,KAAK,EAAE,SAAS;IAChB,GAAG,CAAC,OAAO;QACT,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC3C,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QAEpC,OAAO,OAAO,CAAC,cAAc;aAC1B,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;aACnE,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,O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M,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,yDAAyD,EAC1I,2HAA2H,CAC5H,CACF,CACJ,CAAC;IAEF,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE3E,OAAO;QACL,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QAC/B,KAAK,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;KAC3F,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '../model/rule.js';
2
+ export declare const nestNoParallelPipeline: Rule;
3
+ //# sourceMappingURL=nest-no-parallel-pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-no-parallel-pipeline.d.ts","sourceRoot":"","sources":["../../../src/check/rules/nest-no-parallel-pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAe1C,eAAO,MAAM,sBAAsB,EAAE,IAkBpC,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { nestEquivalentsOf } from '../nest/nest-equivalents-of.js';
2
+ import { perFile } from '../support/per-file.js';
3
+ /** `domain/`, `application/` and the published language refuse every framework already (`layer/*`, `context/*`). */
4
+ const JUDGED = ['presentation', 'infrastructure', 'module', 'root'];
5
+ const NEST_COMMON = '@nestjs/common';
6
+ const NEST_BRIDGE = '@ddd-ts-kit/http/nest';
7
+ /** What a controller sends a use case through. */
8
+ const BUSES = ['CommandBus', 'QueryBus'];
9
+ const ROUTED_BY_NEST_FIX = 'Make it a route of the kit: `@KitRoute` of `@ddd-ts-kit/http/nest` on each method, served by `createControllersModule`, with its guards, its refusals and its place in the contract. A controller of Nest stays for what reaches no use case (health, metrics).';
10
+ export const nestNoParallelPipeline = {
11
+ id: 'nest/no-parallel-pipeline',
12
+ description: "A context uses none of the tools of Nest that the kit does its own way (guards, pipes, exception filters, interceptors, its logger, Swagger, CQRS, its scheduler, a controller Nest serves): they would bypass the security, the errors and the contract of the kit. A Nest controller the kit serves (`@KitRoute`) declares its routes with Nest's decorators. Outside the contexts, a controller Nest serves reaches no use case. Nest stays in the platform for the rest.",
13
+ scope: 'file',
14
+ run(project) {
15
+ return perFile(project, this.id, (file) => {
16
+ if (file.isTest) {
17
+ return [];
18
+ }
19
+ if (file.location.area === 'context') {
20
+ return JUDGED.includes(file.location.layer) ? nestToolsIn(file) : [];
21
+ }
22
+ return isUnderSources(file, project) ? routedByNest(file) : [];
23
+ });
24
+ },
25
+ };
26
+ /** In a context: each import of a tool of Nest whose work the kit does. */
27
+ function nestToolsIn(file) {
28
+ const servedByKit = servesThroughTheKit(file);
29
+ return file.imports.flatMap(({ line, specifier, names, target }) => {
30
+ const equivalents = target.kind === 'package' ? nestEquivalentsOf(target.name, names, servedByKit) : [];
31
+ if (equivalents.length === 0) {
32
+ return [];
33
+ }
34
+ return [
35
+ {
36
+ line,
37
+ message: `"${specifier}" brings ${equivalents.map(({ tool }) => tool).join(' and ')} of Nest into a context, where the pipeline of the kit does not see it.`,
38
+ fix: `Use ${equivalents.map(({ instead }) => instead).join('; and ')}.`,
39
+ },
40
+ ];
41
+ });
42
+ }
43
+ /**
44
+ * Outside the contexts: a controller Nest serves that reaches a use case, through a bus or a file of
45
+ * a context, is a route with none of the guarantees of the kit, wherever it is written.
46
+ */
47
+ function routedByNest(file) {
48
+ const controller = file.imports.find(({ target, names }) => target.kind === 'package' && target.name === NEST_COMMON && names.includes('Controller'));
49
+ if (controller === undefined || servesThroughTheKit(file) || !reachesUseCase(file)) {
50
+ return [];
51
+ }
52
+ return [
53
+ {
54
+ line: controller.line,
55
+ message: 'A controller Nest serves reaches a use case: its routes have no declared security, no problem codes and no place in the contract.',
56
+ fix: ROUTED_BY_NEST_FIX,
57
+ },
58
+ ];
59
+ }
60
+ function servesThroughTheKit(file) {
61
+ return file.imports.some(({ specifier, names }) => specifier === NEST_BRIDGE && (names.includes('KitRoute') || names.includes('KitRoutes')));
62
+ }
63
+ function reachesUseCase(file) {
64
+ return file.imports.some(({ target, names }) => (target.kind === 'file' && target.location.area === 'context') ||
65
+ (target.kind === 'package' && names.some((name) => BUSES.includes(name))));
66
+ }
67
+ function isUnderSources({ path }, { config }) {
68
+ return path.startsWith(`${config.sourceRoot}/`);
69
+ }
70
+ //# sourceMappingURL=nest-no-parallel-pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nest-no-parallel-pipeline.js","sourceRoot":"","sources":["../../../src/check/rules/nest-no-parallel-pipeline.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,oHAAoH;AACpH,MAAM,MAAM,GAAqB,CAAC,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACtF,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAC5C,kDAAkD;AAClD,MAAM,KAAK,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAEzC,MAAM,kBAAkB,GACtB,iQAAiQ,CAAC;AAEpQ,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC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AE,CACpB,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;QAC9D,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE,MAAM,EAAW;IAC/D,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;AAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-generated-context-file.d.ts","sourceRoot":"","sources":["../../../src/check/support/is-generated-context-file.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAehE"}
1
+ {"version":3,"file":"is-generated-context-file.d.ts","sourceRoot":"","sources":["../../../src/check/support/is-generated-context-file.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAiBhE"}
@@ -1,6 +1,7 @@
1
1
  import path from 'node:path';
2
2
  import { dependenciesFile, isDeclarationsFile } from '../../declared/index.js';
3
3
  import { WITHOUT_MODULE } from '../../model-modules/index.js';
4
+ import { controllersFile } from '../../nest-controllers/controllers-file.js';
4
5
  /**
5
6
  * The generated files of a declared context: the declarations of each layer and their
6
7
  * summary at its root, or `<context>.dependencies.ts`; `declarations/barrel-current` holds every
@@ -14,6 +15,8 @@ export function isGeneratedContextFile(file) {
14
15
  const inContext = location.layer === 'root' && location.inside.length === 0
15
16
  ? path.posix.basename(file.path)
16
17
  : [location.layer, ...location.inside].join('/');
17
- return (isDeclarationsFile(location.context, inContext, WITHOUT_MODULE) || inContext === dependenciesFile(location.context));
18
+ return (isDeclarationsFile(location.context, inContext, WITHOUT_MODULE) ||
19
+ inContext === dependenciesFile(location.context) ||
20
+ inContext === controllersFile(location.context));
18
21
  }
19
22
  //# sourceMappingURL=is-generated-context-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-generated-context-file.js","sourceRoot":"","sources":["../../../src/check/support/is-generated-context-file.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAgB;IACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE1B,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GACb,QAAQ,CAAC,KAAK,KAAK,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QACvD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAChC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,CACL,kBAAkB,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,cAAc,CAAC,IAAI,SAAS,KAAK,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,CACpH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"is-generated-context-file.js","sourceRoot":"","sources":["../../../src/check/support/is-generated-context-file.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAG1E;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAgB;IACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE1B,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GACb,QAAQ,CAAC,KAAK,KAAK,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QACvD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAChC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,CACL,kBAAkB,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,cAAc,CAAC;QAC/D,SAAS,KAAK,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC;QAChD,SAAS,KAAK,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAChD,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAa3B,CAAC"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAa3B,CAAC"}