ddd-ts-kit 0.87.0 → 0.89.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 (1029) hide show
  1. package/CHANGELOG.md +616 -0
  2. package/README.fr.md +79 -38
  3. package/README.md +74 -35
  4. package/dist/check/canonical/earlier-context-file.d.ts +15 -0
  5. package/dist/check/canonical/earlier-context-file.d.ts.map +1 -0
  6. package/dist/check/canonical/earlier-context-file.js +33 -0
  7. package/dist/check/canonical/earlier-context-file.js.map +1 -0
  8. package/dist/check/canonical/roles.d.ts.map +1 -1
  9. package/dist/check/canonical/roles.js +4 -1
  10. package/dist/check/canonical/roles.js.map +1 -1
  11. package/dist/check/canonical/stray-entry.d.ts.map +1 -1
  12. package/dist/check/canonical/stray-entry.js +11 -9
  13. package/dist/check/canonical/stray-entry.js.map +1 -1
  14. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  15. package/dist/check/catalogue/architecture-rules.js +12 -0
  16. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  17. package/dist/check/catalogue/default-severities.d.ts.map +1 -1
  18. package/dist/check/catalogue/default-severities.js +9 -0
  19. package/dist/check/catalogue/default-severities.js.map +1 -1
  20. package/dist/check/catalogue/delegated-rules.js +1 -1
  21. package/dist/check/catalogue/delegated-rules.js.map +1 -1
  22. package/dist/check/catalogue/eslint-only-rules.d.ts.map +1 -1
  23. package/dist/check/catalogue/eslint-only-rules.js +24 -0
  24. package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
  25. package/dist/check/configuration/config-inspection.d.ts +2 -2
  26. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  27. package/dist/check/configuration/config-inspection.js +5 -4
  28. package/dist/check/configuration/config-inspection.js.map +1 -1
  29. package/dist/check/configuration/measure-settings.d.ts +10 -0
  30. package/dist/check/configuration/measure-settings.d.ts.map +1 -0
  31. package/dist/check/configuration/measure-settings.js +17 -0
  32. package/dist/check/configuration/measure-settings.js.map +1 -0
  33. package/dist/check/configuration/module-problems.js +2 -2
  34. package/dist/check/configuration/module-problems.js.map +1 -1
  35. package/dist/check/errors/code-list.d.ts +1 -1
  36. package/dist/check/errors/code-list.d.ts.map +1 -1
  37. package/dist/check/errors/is-codes-file.d.ts +1 -1
  38. package/dist/check/errors/is-codes-file.d.ts.map +1 -1
  39. package/dist/check/errors/is-codes-file.js +1 -1
  40. package/dist/check/errors/is-codes-file.js.map +1 -1
  41. package/dist/check/explain/errors-docs.js +5 -5
  42. package/dist/check/explain/errors-docs.js.map +1 -1
  43. package/dist/check/explain/language-docs.js +1 -1
  44. package/dist/check/explain/language-docs.js.map +1 -1
  45. package/dist/check/explain/module-docs.d.ts.map +1 -1
  46. package/dist/check/explain/module-docs.js +16 -12
  47. package/dist/check/explain/module-docs.js.map +1 -1
  48. package/dist/check/explain/privacy-docs.d.ts +3 -0
  49. package/dist/check/explain/privacy-docs.d.ts.map +1 -0
  50. package/dist/check/explain/privacy-docs.js +52 -0
  51. package/dist/check/explain/privacy-docs.js.map +1 -0
  52. package/dist/check/explain/rule-docs.d.ts.map +1 -1
  53. package/dist/check/explain/rule-docs.js +2 -0
  54. package/dist/check/explain/rule-docs.js.map +1 -1
  55. package/dist/check/explain/tenancy-docs.d.ts.map +1 -1
  56. package/dist/check/explain/tenancy-docs.js +13 -3
  57. package/dist/check/explain/tenancy-docs.js.map +1 -1
  58. package/dist/check/explain/tree-docs.d.ts.map +1 -1
  59. package/dist/check/explain/tree-docs.js +11 -0
  60. package/dist/check/explain/tree-docs.js.map +1 -1
  61. package/dist/check/explain/wiring-docs.js +1 -1
  62. package/dist/check/explain/wiring-docs.js.map +1 -1
  63. package/dist/check/fixtures/authz-granted-fixtures.js +2 -2
  64. package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
  65. package/dist/check/fixtures/authz-scope-narrows-fixtures.js +4 -4
  66. package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -1
  67. package/dist/check/fixtures/budget-fixtures.d.ts +3 -0
  68. package/dist/check/fixtures/budget-fixtures.d.ts.map +1 -0
  69. package/dist/check/fixtures/budget-fixtures.js +43 -0
  70. package/dist/check/fixtures/budget-fixtures.js.map +1 -0
  71. package/dist/check/fixtures/context-file-fixtures.d.ts +4 -0
  72. package/dist/check/fixtures/context-file-fixtures.d.ts.map +1 -0
  73. package/dist/check/fixtures/context-file-fixtures.js +36 -0
  74. package/dist/check/fixtures/context-file-fixtures.js.map +1 -0
  75. package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
  76. package/dist/check/fixtures/declarations-fixtures.js +17 -3
  77. package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
  78. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  79. package/dist/check/fixtures/fixtures.js +8 -0
  80. package/dist/check/fixtures/fixtures.js.map +1 -1
  81. package/dist/check/fixtures/module-fixtures.d.ts.map +1 -1
  82. package/dist/check/fixtures/module-fixtures.js +50 -17
  83. package/dist/check/fixtures/module-fixtures.js.map +1 -1
  84. package/dist/check/fixtures/mutation-fixtures.d.ts +3 -0
  85. package/dist/check/fixtures/mutation-fixtures.d.ts.map +1 -0
  86. package/dist/check/fixtures/mutation-fixtures.js +81 -0
  87. package/dist/check/fixtures/mutation-fixtures.js.map +1 -0
  88. package/dist/check/fixtures/named-refusal-fixtures.js +5 -5
  89. package/dist/check/fixtures/named-refusal-fixtures.js.map +1 -1
  90. package/dist/check/fixtures/privacy-fixtures.d.ts +3 -0
  91. package/dist/check/fixtures/privacy-fixtures.d.ts.map +1 -0
  92. package/dist/check/fixtures/privacy-fixtures.js +198 -0
  93. package/dist/check/fixtures/privacy-fixtures.js.map +1 -0
  94. package/dist/check/fixtures/tenancy-bypass.d.ts +24 -0
  95. package/dist/check/fixtures/tenancy-bypass.d.ts.map +1 -0
  96. package/dist/check/fixtures/tenancy-bypass.js +22 -0
  97. package/dist/check/fixtures/tenancy-bypass.js.map +1 -0
  98. package/dist/check/fixtures/tenancy-config.d.ts +3 -0
  99. package/dist/check/fixtures/tenancy-config.d.ts.map +1 -0
  100. package/dist/check/fixtures/tenancy-config.js +7 -0
  101. package/dist/check/fixtures/tenancy-config.js.map +1 -0
  102. package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
  103. package/dist/check/fixtures/tenancy-fixtures.js +31 -41
  104. package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
  105. package/dist/check/fixtures/tenancy-prisma-fixtures.d.ts +4 -0
  106. package/dist/check/fixtures/tenancy-prisma-fixtures.d.ts.map +1 -0
  107. package/dist/check/fixtures/tenancy-prisma-fixtures.js +73 -0
  108. package/dist/check/fixtures/tenancy-prisma-fixtures.js.map +1 -0
  109. package/dist/check/fixtures/tenancy-typeorm-fixtures.d.ts +4 -0
  110. package/dist/check/fixtures/tenancy-typeorm-fixtures.d.ts.map +1 -0
  111. package/dist/check/fixtures/tenancy-typeorm-fixtures.js +88 -0
  112. package/dist/check/fixtures/tenancy-typeorm-fixtures.js.map +1 -0
  113. package/dist/check/fixtures/vocabulary-fixtures.js +2 -2
  114. package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
  115. package/dist/check/mutation/stryker-settings.d.ts +8 -0
  116. package/dist/check/mutation/stryker-settings.d.ts.map +1 -0
  117. package/dist/check/mutation/stryker-settings.js +74 -0
  118. package/dist/check/mutation/stryker-settings.js.map +1 -0
  119. package/dist/check/privacy/column-definitions-in.d.ts +15 -0
  120. package/dist/check/privacy/column-definitions-in.d.ts.map +1 -0
  121. package/dist/check/privacy/column-definitions-in.js +32 -0
  122. package/dist/check/privacy/column-definitions-in.js.map +1 -0
  123. package/dist/check/privacy/declares-name.d.ts +4 -0
  124. package/dist/check/privacy/declares-name.d.ts.map +1 -0
  125. package/dist/check/privacy/declares-name.js +7 -0
  126. package/dist/check/privacy/declares-name.js.map +1 -0
  127. package/dist/check/privacy/personal-declarations-of.d.ts +15 -0
  128. package/dist/check/privacy/personal-declarations-of.d.ts.map +1 -0
  129. package/dist/check/privacy/personal-declarations-of.js +33 -0
  130. package/dist/check/privacy/personal-declarations-of.js.map +1 -0
  131. package/dist/check/privacy/personal-term-of.d.ts +3 -0
  132. package/dist/check/privacy/personal-term-of.d.ts.map +1 -0
  133. package/dist/check/privacy/personal-term-of.js +10 -0
  134. package/dist/check/privacy/personal-term-of.js.map +1 -0
  135. package/dist/check/privacy/personal-vocabulary.d.ts +9 -0
  136. package/dist/check/privacy/personal-vocabulary.d.ts.map +1 -0
  137. package/dist/check/privacy/personal-vocabulary.js +37 -0
  138. package/dist/check/privacy/personal-vocabulary.js.map +1 -0
  139. package/dist/check/privacy/prisma-columns-of.d.ts +17 -0
  140. package/dist/check/privacy/prisma-columns-of.d.ts.map +1 -0
  141. package/dist/check/privacy/prisma-columns-of.js +58 -0
  142. package/dist/check/privacy/prisma-columns-of.js.map +1 -0
  143. package/dist/check/privacy/privacy-judged.d.ts +8 -0
  144. package/dist/check/privacy/privacy-judged.d.ts.map +1 -0
  145. package/dist/check/privacy/privacy-judged.js +9 -0
  146. package/dist/check/privacy/privacy-judged.js.map +1 -0
  147. package/dist/check/privacy/published-events-of.d.ts +29 -0
  148. package/dist/check/privacy/published-events-of.d.ts.map +1 -0
  149. package/dist/check/privacy/published-events-of.js +80 -0
  150. package/dist/check/privacy/published-events-of.js.map +1 -0
  151. package/dist/check/privacy/same-name.d.ts +3 -0
  152. package/dist/check/privacy/same-name.d.ts.map +1 -0
  153. package/dist/check/privacy/same-name.js +6 -0
  154. package/dist/check/privacy/same-name.js.map +1 -0
  155. package/dist/check/privacy/vocabulary-of.d.ts +4 -0
  156. package/dist/check/privacy/vocabulary-of.d.ts.map +1 -0
  157. package/dist/check/privacy/vocabulary-of.js +10 -0
  158. package/dist/check/privacy/vocabulary-of.js.map +1 -0
  159. package/dist/check/privacy/words-of-name.d.ts +3 -0
  160. package/dist/check/privacy/words-of-name.d.ts.map +1 -0
  161. package/dist/check/privacy/words-of-name.js +9 -0
  162. package/dist/check/privacy/words-of-name.js.map +1 -0
  163. package/dist/check/project/locate.d.ts.map +1 -1
  164. package/dist/check/project/locate.js +18 -9
  165. package/dist/check/project/locate.js.map +1 -1
  166. package/dist/check/rules/config-valid.js +1 -1
  167. package/dist/check/rules/config-valid.js.map +1 -1
  168. package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -1
  169. package/dist/check/rules/declarations-port-adapter-wired.js +21 -2
  170. package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
  171. package/dist/check/rules/errors-code-listed.js +6 -8
  172. package/dist/check/rules/errors-code-listed.js.map +1 -1
  173. package/dist/check/rules/errors-code-unique.js +2 -2
  174. package/dist/check/rules/errors-code-unique.js.map +1 -1
  175. package/dist/check/rules/errors-known-code.js +2 -2
  176. package/dist/check/rules/errors-known-code.js.map +1 -1
  177. package/dist/check/rules/governance-recorded-deviation.d.ts.map +1 -1
  178. package/dist/check/rules/governance-recorded-deviation.js +20 -2
  179. package/dist/check/rules/governance-recorded-deviation.js.map +1 -1
  180. package/dist/check/rules/language-glossary-term.js +1 -1
  181. package/dist/check/rules/language-glossary-term.js.map +1 -1
  182. package/dist/check/rules/module-complete.d.ts.map +1 -1
  183. package/dist/check/rules/module-complete.js +67 -13
  184. package/dist/check/rules/module-complete.js.map +1 -1
  185. package/dist/check/rules/naming-suffix.d.ts.map +1 -1
  186. package/dist/check/rules/naming-suffix.js +12 -9
  187. package/dist/check/rules/naming-suffix.js.map +1 -1
  188. package/dist/check/rules/privacy-declared-field.d.ts +11 -0
  189. package/dist/check/rules/privacy-declared-field.d.ts.map +1 -0
  190. package/dist/check/rules/privacy-declared-field.js +63 -0
  191. package/dist/check/rules/privacy-declared-field.js.map +1 -0
  192. package/dist/check/rules/privacy-erasure-reaches-copies.d.ts +10 -0
  193. package/dist/check/rules/privacy-erasure-reaches-copies.d.ts.map +1 -0
  194. package/dist/check/rules/privacy-erasure-reaches-copies.js +46 -0
  195. package/dist/check/rules/privacy-erasure-reaches-copies.js.map +1 -0
  196. package/dist/check/rules/privacy-event-payload-declared.d.ts +10 -0
  197. package/dist/check/rules/privacy-event-payload-declared.d.ts.map +1 -0
  198. package/dist/check/rules/privacy-event-payload-declared.js +39 -0
  199. package/dist/check/rules/privacy-event-payload-declared.js.map +1 -0
  200. package/dist/check/rules/privacy-no-personal-data-in-logs.d.ts +12 -0
  201. package/dist/check/rules/privacy-no-personal-data-in-logs.d.ts.map +1 -0
  202. package/dist/check/rules/privacy-no-personal-data-in-logs.js +57 -0
  203. package/dist/check/rules/privacy-no-personal-data-in-logs.js.map +1 -0
  204. package/dist/check/rules/privacy-subject-is-opaque.d.ts +9 -0
  205. package/dist/check/rules/privacy-subject-is-opaque.d.ts.map +1 -0
  206. package/dist/check/rules/privacy-subject-is-opaque.js +50 -0
  207. package/dist/check/rules/privacy-subject-is-opaque.js.map +1 -0
  208. package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -1
  209. package/dist/check/rules/tenancy-scoped-statement.js +6 -2
  210. package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
  211. package/dist/check/rules/test-mutation-governed.d.ts +3 -0
  212. package/dist/check/rules/test-mutation-governed.d.ts.map +1 -0
  213. package/dist/check/rules/test-mutation-governed.js +12 -0
  214. package/dist/check/rules/test-mutation-governed.js.map +1 -0
  215. package/dist/check/rules/tree-closed.d.ts.map +1 -1
  216. package/dist/check/rules/tree-closed.js +8 -1
  217. package/dist/check/rules/tree-closed.js.map +1 -1
  218. package/dist/check/support/path-in-context.d.ts +5 -1
  219. package/dist/check/support/path-in-context.d.ts.map +1 -1
  220. package/dist/check/support/path-in-context.js +12 -3
  221. package/dist/check/support/path-in-context.js.map +1 -1
  222. package/dist/check/tenancy/accessor-uses.d.ts +13 -0
  223. package/dist/check/tenancy/accessor-uses.d.ts.map +1 -0
  224. package/dist/check/tenancy/accessor-uses.js +19 -0
  225. package/dist/check/tenancy/accessor-uses.js.map +1 -0
  226. package/dist/check/tenancy/declaration-of.d.ts +7 -0
  227. package/dist/check/tenancy/declaration-of.d.ts.map +1 -0
  228. package/dist/check/tenancy/declaration-of.js +11 -0
  229. package/dist/check/tenancy/declaration-of.js.map +1 -0
  230. package/dist/check/tenancy/declared-in-arguments.d.ts +13 -0
  231. package/dist/check/tenancy/declared-in-arguments.d.ts.map +1 -0
  232. package/dist/check/tenancy/declared-in-arguments.js +25 -0
  233. package/dist/check/tenancy/declared-in-arguments.js.map +1 -0
  234. package/dist/check/tenancy/declared-with.d.ts +3 -1
  235. package/dist/check/tenancy/declared-with.d.ts.map +1 -1
  236. package/dist/check/tenancy/declared-with.js +4 -3
  237. package/dist/check/tenancy/declared-with.js.map +1 -1
  238. package/dist/check/tenancy/drizzle-unscoped.d.ts.map +1 -1
  239. package/dist/check/tenancy/drizzle-unscoped.js +4 -3
  240. package/dist/check/tenancy/drizzle-unscoped.js.map +1 -1
  241. package/dist/check/tenancy/executor-uses.d.ts +3 -10
  242. package/dist/check/tenancy/executor-uses.d.ts.map +1 -1
  243. package/dist/check/tenancy/executor-uses.js +3 -11
  244. package/dist/check/tenancy/executor-uses.js.map +1 -1
  245. package/dist/check/tenancy/prisma-unscoped.d.ts +7 -0
  246. package/dist/check/tenancy/prisma-unscoped.d.ts.map +1 -0
  247. package/dist/check/tenancy/prisma-unscoped.js +60 -0
  248. package/dist/check/tenancy/prisma-unscoped.js.map +1 -0
  249. package/dist/check/tenancy/typeorm-unscoped.d.ts +7 -0
  250. package/dist/check/tenancy/typeorm-unscoped.d.ts.map +1 -0
  251. package/dist/check/tenancy/typeorm-unscoped.js +103 -0
  252. package/dist/check/tenancy/typeorm-unscoped.js.map +1 -0
  253. package/dist/check/tenancy/unscoped-read-models.js +2 -2
  254. package/dist/check/tenancy/unscoped-read-models.js.map +1 -1
  255. package/dist/commands/context-layout.d.ts +4 -0
  256. package/dist/commands/context-layout.d.ts.map +1 -0
  257. package/dist/commands/context-layout.js +48 -0
  258. package/dist/commands/context-layout.js.map +1 -0
  259. package/dist/commands/docs.d.ts.map +1 -1
  260. package/dist/commands/docs.js +23 -1
  261. package/dist/commands/docs.js.map +1 -1
  262. package/dist/commands/generate.js +11 -3
  263. package/dist/commands/generate.js.map +1 -1
  264. package/dist/commands/init.d.ts.map +1 -1
  265. package/dist/commands/init.js +4 -0
  266. package/dist/commands/init.js.map +1 -1
  267. package/dist/commands/lint.d.ts +3 -2
  268. package/dist/commands/lint.d.ts.map +1 -1
  269. package/dist/commands/lint.js +16 -4
  270. package/dist/commands/lint.js.map +1 -1
  271. package/dist/commands/move-to-module.d.ts.map +1 -1
  272. package/dist/commands/move-to-module.js +2 -0
  273. package/dist/commands/move-to-module.js.map +1 -1
  274. package/dist/commands/mutation.d.ts +14 -0
  275. package/dist/commands/mutation.d.ts.map +1 -0
  276. package/dist/commands/mutation.js +62 -0
  277. package/dist/commands/mutation.js.map +1 -0
  278. package/dist/config/budget-levels.d.ts +3 -0
  279. package/dist/config/budget-levels.d.ts.map +1 -0
  280. package/dist/config/budget-levels.js +3 -0
  281. package/dist/config/budget-levels.js.map +1 -0
  282. package/dist/config/budget-problems.d.ts +10 -0
  283. package/dist/config/budget-problems.d.ts.map +1 -0
  284. package/dist/config/budget-problems.js +61 -0
  285. package/dist/config/budget-problems.js.map +1 -0
  286. package/dist/config/budget.d.ts +10 -0
  287. package/dist/config/budget.d.ts.map +1 -0
  288. package/dist/config/budget.js +2 -0
  289. package/dist/config/budget.js.map +1 -0
  290. package/dist/config/config.d.ts +16 -0
  291. package/dist/config/config.d.ts.map +1 -1
  292. package/dist/config/index.d.ts +7 -1
  293. package/dist/config/index.d.ts.map +1 -1
  294. package/dist/config/index.js +7 -1
  295. package/dist/config/index.js.map +1 -1
  296. package/dist/config/is-duration.d.ts +3 -0
  297. package/dist/config/is-duration.d.ts.map +1 -0
  298. package/dist/config/is-duration.js +5 -0
  299. package/dist/config/is-duration.js.map +1 -0
  300. package/dist/config/is-reference-budget.d.ts +4 -0
  301. package/dist/config/is-reference-budget.d.ts.map +1 -0
  302. package/dist/config/is-reference-budget.js +8 -0
  303. package/dist/config/is-reference-budget.js.map +1 -0
  304. package/dist/config/is-reference-mutation.d.ts +4 -0
  305. package/dist/config/is-reference-mutation.d.ts.map +1 -0
  306. package/dist/config/is-reference-mutation.js +7 -0
  307. package/dist/config/is-reference-mutation.js.map +1 -0
  308. package/dist/config/mutation-layers.d.ts +3 -0
  309. package/dist/config/mutation-layers.d.ts.map +1 -0
  310. package/dist/config/mutation-layers.js +3 -0
  311. package/dist/config/mutation-layers.js.map +1 -0
  312. package/dist/config/mutation-problems.d.ts +10 -0
  313. package/dist/config/mutation-problems.d.ts.map +1 -0
  314. package/dist/config/mutation-problems.js +46 -0
  315. package/dist/config/mutation-problems.js.map +1 -0
  316. package/dist/config/mutation.d.ts +4 -0
  317. package/dist/config/mutation.d.ts.map +1 -0
  318. package/dist/config/mutation.js +2 -0
  319. package/dist/config/mutation.js.map +1 -0
  320. package/dist/config/parse-budget.d.ts +4 -0
  321. package/dist/config/parse-budget.d.ts.map +1 -0
  322. package/dist/config/parse-budget.js +17 -0
  323. package/dist/config/parse-budget.js.map +1 -0
  324. package/dist/config/parse-config.d.ts.map +1 -1
  325. package/dist/config/parse-config.js +6 -0
  326. package/dist/config/parse-config.js.map +1 -1
  327. package/dist/config/parse-mutation.d.ts +4 -0
  328. package/dist/config/parse-mutation.d.ts.map +1 -0
  329. package/dist/config/parse-mutation.js +16 -0
  330. package/dist/config/parse-mutation.js.map +1 -0
  331. package/dist/config/parse-privacy.d.ts +4 -0
  332. package/dist/config/parse-privacy.d.ts.map +1 -0
  333. package/dist/config/parse-privacy.js +12 -0
  334. package/dist/config/parse-privacy.js.map +1 -0
  335. package/dist/config/parse-stack.d.ts.map +1 -1
  336. package/dist/config/parse-stack.js +4 -1
  337. package/dist/config/parse-stack.js.map +1 -1
  338. package/dist/config/reference-budget.d.ts +8 -0
  339. package/dist/config/reference-budget.d.ts.map +1 -0
  340. package/dist/config/reference-budget.js +7 -0
  341. package/dist/config/reference-budget.js.map +1 -0
  342. package/dist/config/reference-mutation.d.ts +10 -0
  343. package/dist/config/reference-mutation.d.ts.map +1 -0
  344. package/dist/config/reference-mutation.js +9 -0
  345. package/dist/config/reference-mutation.js.map +1 -0
  346. package/dist/config/serialize-config.d.ts.map +1 -1
  347. package/dist/config/serialize-config.js +13 -1
  348. package/dist/config/serialize-config.js.map +1 -1
  349. package/dist/config/stack.d.ts +18 -1
  350. package/dist/config/stack.d.ts.map +1 -1
  351. package/dist/config/stack.js +2 -0
  352. package/dist/config/stack.js.map +1 -1
  353. package/dist/context-files/context-file-at.d.ts +7 -0
  354. package/dist/context-files/context-file-at.d.ts.map +1 -0
  355. package/dist/context-files/context-file-at.js +9 -0
  356. package/dist/context-files/context-file-at.js.map +1 -0
  357. package/dist/context-files/context-file-placement.d.ts +8 -0
  358. package/dist/context-files/context-file-placement.d.ts.map +1 -0
  359. package/dist/context-files/context-file-placement.js +23 -0
  360. package/dist/context-files/context-file-placement.js.map +1 -0
  361. package/dist/context-files/context-file.d.ts +16 -0
  362. package/dist/context-files/context-file.d.ts.map +1 -0
  363. package/dist/context-files/context-file.js +12 -0
  364. package/dist/context-files/context-file.js.map +1 -0
  365. package/dist/context-files/earlier-place-of.d.ts +7 -0
  366. package/dist/context-files/earlier-place-of.d.ts.map +1 -0
  367. package/dist/context-files/earlier-place-of.js +10 -0
  368. package/dist/context-files/earlier-place-of.js.map +1 -0
  369. package/dist/context-files/index.d.ts +5 -0
  370. package/dist/context-files/index.d.ts.map +1 -0
  371. package/dist/context-files/index.js +5 -0
  372. package/dist/context-files/index.js.map +1 -0
  373. package/dist/context-layout/context-layout.d.ts +19 -0
  374. package/dist/context-layout/context-layout.d.ts.map +1 -0
  375. package/dist/context-layout/context-layout.js +55 -0
  376. package/dist/context-layout/context-layout.js.map +1 -0
  377. package/dist/context-layout/index.d.ts +2 -0
  378. package/dist/context-layout/index.d.ts.map +1 -0
  379. package/dist/context-layout/index.js +2 -0
  380. package/dist/context-layout/index.js.map +1 -0
  381. package/dist/context-layout/module-moves.d.ts +21 -0
  382. package/dist/context-layout/module-moves.d.ts.map +1 -0
  383. package/dist/context-layout/module-moves.js +146 -0
  384. package/dist/context-layout/module-moves.js.map +1 -0
  385. package/dist/controllers/migrate-context.js +20 -15
  386. package/dist/controllers/migrate-context.js.map +1 -1
  387. package/dist/controllers/plan-context.d.ts +5 -1
  388. package/dist/controllers/plan-context.d.ts.map +1 -1
  389. package/dist/controllers/plan-context.js +19 -5
  390. package/dist/controllers/plan-context.js.map +1 -1
  391. package/dist/depcruise/layer-rules.js +21 -7
  392. package/dist/depcruise/layer-rules.js.map +1 -1
  393. package/dist/describe/read-adapters.d.ts.map +1 -1
  394. package/dist/describe/read-adapters.js +6 -4
  395. package/dist/describe/read-adapters.js.map +1 -1
  396. package/dist/describe/read-controllers.d.ts.map +1 -1
  397. package/dist/describe/read-controllers.js +5 -3
  398. package/dist/describe/read-controllers.js.map +1 -1
  399. package/dist/describe/read-errors.d.ts +1 -1
  400. package/dist/describe/read-errors.d.ts.map +1 -1
  401. package/dist/describe/read-errors.js +5 -3
  402. package/dist/describe/read-errors.js.map +1 -1
  403. package/dist/describe/read-routes.d.ts.map +1 -1
  404. package/dist/describe/read-routes.js +5 -5
  405. package/dist/describe/read-routes.js.map +1 -1
  406. package/dist/docs/behaviour-page.d.ts +8 -0
  407. package/dist/docs/behaviour-page.d.ts.map +1 -0
  408. package/dist/docs/behaviour-page.js +83 -0
  409. package/dist/docs/behaviour-page.js.map +1 -0
  410. package/dist/docs/context-facts.d.ts +9 -1
  411. package/dist/docs/context-facts.d.ts.map +1 -1
  412. package/dist/docs/counts-of.d.ts +10 -0
  413. package/dist/docs/counts-of.d.ts.map +1 -0
  414. package/dist/docs/counts-of.js +14 -0
  415. package/dist/docs/counts-of.js.map +1 -0
  416. package/dist/docs/declared-table-of.d.ts +14 -0
  417. package/dist/docs/declared-table-of.d.ts.map +1 -0
  418. package/dist/docs/declared-table-of.js +39 -0
  419. package/dist/docs/declared-table-of.js.map +1 -0
  420. package/dist/docs/ensure-personal-data-region.d.ts +7 -0
  421. package/dist/docs/ensure-personal-data-region.d.ts.map +1 -0
  422. package/dist/docs/ensure-personal-data-region.js +21 -0
  423. package/dist/docs/ensure-personal-data-region.js.map +1 -0
  424. package/dist/docs/page-section.d.ts +12 -0
  425. package/dist/docs/page-section.d.ts.map +1 -0
  426. package/dist/docs/page-section.js +2 -0
  427. package/dist/docs/page-section.js.map +1 -0
  428. package/dist/docs/personal-data-lines.d.ts +7 -0
  429. package/dist/docs/personal-data-lines.d.ts.map +1 -0
  430. package/dist/docs/personal-data-lines.js +29 -0
  431. package/dist/docs/personal-data-lines.js.map +1 -0
  432. package/dist/docs/personal-declarations-in.d.ts +13 -0
  433. package/dist/docs/personal-declarations-in.d.ts.map +1 -0
  434. package/dist/docs/personal-declarations-in.js +66 -0
  435. package/dist/docs/personal-declarations-in.js.map +1 -0
  436. package/dist/docs/personal-table-cells.d.ts +12 -0
  437. package/dist/docs/personal-table-cells.d.ts.map +1 -0
  438. package/dist/docs/personal-table-cells.js +13 -0
  439. package/dist/docs/personal-table-cells.js.map +1 -0
  440. package/dist/docs/personal-table-facts.d.ts +17 -0
  441. package/dist/docs/personal-table-facts.d.ts.map +1 -0
  442. package/dist/docs/personal-table-facts.js +2 -0
  443. package/dist/docs/personal-table-facts.js.map +1 -0
  444. package/dist/docs/privacy-register-lines.d.ts +7 -0
  445. package/dist/docs/privacy-register-lines.d.ts.map +1 -0
  446. package/dist/docs/privacy-register-lines.js +34 -0
  447. package/dist/docs/privacy-register-lines.js.map +1 -0
  448. package/dist/docs/read-context.d.ts.map +1 -1
  449. package/dist/docs/read-context.js +19 -2
  450. package/dist/docs/read-context.js.map +1 -1
  451. package/dist/docs/read-personal-data.d.ts +12 -0
  452. package/dist/docs/read-personal-data.d.ts.map +1 -0
  453. package/dist/docs/read-personal-data.js +22 -0
  454. package/dist/docs/read-personal-data.js.map +1 -0
  455. package/dist/docs/refresh-context-doc.d.ts.map +1 -1
  456. package/dist/docs/refresh-context-doc.js +10 -2
  457. package/dist/docs/refresh-context-doc.js.map +1 -1
  458. package/dist/docs/rules-in.d.ts +25 -0
  459. package/dist/docs/rules-in.d.ts.map +1 -0
  460. package/dist/docs/rules-in.js +83 -0
  461. package/dist/docs/rules-in.js.map +1 -0
  462. package/dist/docs/state-machine-lines.d.ts +1 -1
  463. package/dist/docs/state-machine-lines.d.ts.map +1 -1
  464. package/dist/docs/state-machine-lines.js +6 -2
  465. package/dist/docs/state-machine-lines.js.map +1 -1
  466. package/dist/docs/write-behaviour.d.ts +10 -0
  467. package/dist/docs/write-behaviour.d.ts.map +1 -0
  468. package/dist/docs/write-behaviour.js +97 -0
  469. package/dist/docs/write-behaviour.js.map +1 -0
  470. package/dist/docs/write-docs.d.ts +12 -2
  471. package/dist/docs/write-docs.d.ts.map +1 -1
  472. package/dist/docs/write-docs.js +8 -2
  473. package/dist/docs/write-docs.js.map +1 -1
  474. package/dist/docs/write-privacy-register.d.ts +9 -0
  475. package/dist/docs/write-privacy-register.d.ts.map +1 -0
  476. package/dist/docs/write-privacy-register.js +26 -0
  477. package/dist/docs/write-privacy-register.js.map +1 -0
  478. package/dist/file-moves/file-move.d.ts +6 -0
  479. package/dist/file-moves/file-move.d.ts.map +1 -0
  480. package/dist/file-moves/file-move.js +2 -0
  481. package/dist/file-moves/file-move.js.map +1 -0
  482. package/dist/file-moves/index.d.ts +3 -0
  483. package/dist/file-moves/index.d.ts.map +1 -0
  484. package/dist/file-moves/index.js +2 -0
  485. package/dist/file-moves/index.js.map +1 -0
  486. package/dist/file-moves/move-files.d.ts +15 -0
  487. package/dist/file-moves/move-files.d.ts.map +1 -0
  488. package/dist/file-moves/move-files.js +37 -0
  489. package/dist/file-moves/move-files.js.map +1 -0
  490. package/dist/generate/errors/codes-list.d.ts +1 -1
  491. package/dist/generate/errors/codes-list.d.ts.map +1 -1
  492. package/dist/generate/errors/write-named-refusal.d.ts +1 -1
  493. package/dist/generate/errors/write-named-refusal.d.ts.map +1 -1
  494. package/dist/generate/errors/write-named-refusal.js +3 -2
  495. package/dist/generate/errors/write-named-refusal.js.map +1 -1
  496. package/dist/generate/kind.d.ts +15 -1
  497. package/dist/generate/kind.d.ts.map +1 -1
  498. package/dist/generate/kinds/acceptance-kind.js +5 -1
  499. package/dist/generate/kinds/acceptance-kind.js.map +1 -1
  500. package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
  501. package/dist/generate/kinds/adapter-kind.js +22 -2
  502. package/dist/generate/kinds/adapter-kind.js.map +1 -1
  503. package/dist/generate/kinds/background/spec-family.d.ts +8 -0
  504. package/dist/generate/kinds/background/spec-family.d.ts.map +1 -0
  505. package/dist/generate/kinds/background/spec-family.js +9 -0
  506. package/dist/generate/kinds/background/spec-family.js.map +1 -0
  507. package/dist/generate/kinds/background-job-kind.d.ts.map +1 -1
  508. package/dist/generate/kinds/background-job-kind.js +6 -4
  509. package/dist/generate/kinds/background-job-kind.js.map +1 -1
  510. package/dist/generate/kinds/command-kind.d.ts.map +1 -1
  511. package/dist/generate/kinds/command-kind.js +4 -0
  512. package/dist/generate/kinds/command-kind.js.map +1 -1
  513. package/dist/generate/kinds/erasure-handler-kind.d.ts +3 -0
  514. package/dist/generate/kinds/erasure-handler-kind.d.ts.map +1 -0
  515. package/dist/generate/kinds/erasure-handler-kind.js +46 -0
  516. package/dist/generate/kinds/erasure-handler-kind.js.map +1 -0
  517. package/dist/generate/kinds/error-kind.js +1 -1
  518. package/dist/generate/kinds/error-kind.js.map +1 -1
  519. package/dist/generate/kinds/generate-repository.d.ts +2 -1
  520. package/dist/generate/kinds/generate-repository.d.ts.map +1 -1
  521. package/dist/generate/kinds/generate-repository.js +14 -11
  522. package/dist/generate/kinds/generate-repository.js.map +1 -1
  523. package/dist/generate/kinds/module-kind.js +1 -1
  524. package/dist/generate/kinds/module-kind.js.map +1 -1
  525. package/dist/generate/kinds/personal-data/class-header.d.ts +3 -0
  526. package/dist/generate/kinds/personal-data/class-header.d.ts.map +1 -0
  527. package/dist/generate/kinds/personal-data/class-header.js +7 -0
  528. package/dist/generate/kinds/personal-data/class-header.js.map +1 -0
  529. package/dist/generate/kinds/personal-data/column-lines.d.ts +4 -0
  530. package/dist/generate/kinds/personal-data/column-lines.d.ts.map +1 -0
  531. package/dist/generate/kinds/personal-data/column-lines.js +5 -0
  532. package/dist/generate/kinds/personal-data/column-lines.js.map +1 -0
  533. package/dist/generate/kinds/personal-data/declare-personal-data.d.ts +12 -0
  534. package/dist/generate/kinds/personal-data/declare-personal-data.d.ts.map +1 -0
  535. package/dist/generate/kinds/personal-data/declare-personal-data.js +73 -0
  536. package/dist/generate/kinds/personal-data/declare-personal-data.js.map +1 -0
  537. package/dist/generate/kinds/personal-data/fields-line.d.ts +3 -0
  538. package/dist/generate/kinds/personal-data/fields-line.d.ts.map +1 -0
  539. package/dist/generate/kinds/personal-data/fields-line.js +7 -0
  540. package/dist/generate/kinds/personal-data/fields-line.js.map +1 -0
  541. package/dist/generate/kinds/personal-data/personal-column.d.ts +7 -0
  542. package/dist/generate/kinds/personal-data/personal-column.d.ts.map +1 -0
  543. package/dist/generate/kinds/personal-data/personal-column.js +5 -0
  544. package/dist/generate/kinds/personal-data/personal-column.js.map +1 -0
  545. package/dist/generate/kinds/personal-data/personal-names.d.ts +21 -0
  546. package/dist/generate/kinds/personal-data/personal-names.d.ts.map +1 -0
  547. package/dist/generate/kinds/personal-data/personal-names.js +41 -0
  548. package/dist/generate/kinds/personal-data/personal-names.js.map +1 -0
  549. package/dist/generate/kinds/personal-data/personal-request-of.d.ts +18 -0
  550. package/dist/generate/kinds/personal-data/personal-request-of.d.ts.map +1 -0
  551. package/dist/generate/kinds/personal-data/personal-request-of.js +109 -0
  552. package/dist/generate/kinds/personal-data/personal-request-of.js.map +1 -0
  553. package/dist/generate/kinds/personal-data/personal-vars.d.ts +9 -0
  554. package/dist/generate/kinds/personal-data/personal-vars.d.ts.map +1 -0
  555. package/dist/generate/kinds/personal-data/personal-vars.js +107 -0
  556. package/dist/generate/kinds/personal-data/personal-vars.js.map +1 -0
  557. package/dist/generate/kinds/personal-data/property-of.d.ts +3 -0
  558. package/dist/generate/kinds/personal-data/property-of.d.ts.map +1 -0
  559. package/dist/generate/kinds/personal-data/property-of.js +5 -0
  560. package/dist/generate/kinds/personal-data/property-of.js.map +1 -0
  561. package/dist/generate/kinds/personal-data/row-object.d.ts +3 -0
  562. package/dist/generate/kinds/personal-data/row-object.d.ts.map +1 -0
  563. package/dist/generate/kinds/personal-data/row-object.js +5 -0
  564. package/dist/generate/kinds/personal-data/row-object.js.map +1 -0
  565. package/dist/generate/kinds/port-kind.d.ts.map +1 -1
  566. package/dist/generate/kinds/port-kind.js +3 -1
  567. package/dist/generate/kinds/port-kind.js.map +1 -1
  568. package/dist/generate/kinds/presentation/controller-of.d.ts +1 -1
  569. package/dist/generate/kinds/presentation/controller-of.d.ts.map +1 -1
  570. package/dist/generate/kinds/presentation/controller-of.js +7 -5
  571. package/dist/generate/kinds/presentation/controller-of.js.map +1 -1
  572. package/dist/generate/kinds/process-kind.d.ts.map +1 -1
  573. package/dist/generate/kinds/process-kind.js +5 -3
  574. package/dist/generate/kinds/process-kind.js.map +1 -1
  575. package/dist/generate/kinds/repository-kind.d.ts.map +1 -1
  576. package/dist/generate/kinds/repository-kind.js +6 -3
  577. package/dist/generate/kinds/repository-kind.js.map +1 -1
  578. package/dist/generate/kinds/repository-prefix.d.ts +5 -0
  579. package/dist/generate/kinds/repository-prefix.d.ts.map +1 -0
  580. package/dist/generate/kinds/repository-prefix.js +11 -0
  581. package/dist/generate/kinds/repository-prefix.js.map +1 -0
  582. package/dist/generate/kinds/state-machine/state-machine-vars.js +3 -1
  583. package/dist/generate/kinds/state-machine/state-machine-vars.js.map +1 -1
  584. package/dist/generate/kinds/wire-repository-on-first-use.d.ts +10 -0
  585. package/dist/generate/kinds/wire-repository-on-first-use.d.ts.map +1 -0
  586. package/dist/generate/kinds/wire-repository-on-first-use.js +14 -0
  587. package/dist/generate/kinds/wire-repository-on-first-use.js.map +1 -0
  588. package/dist/generate/kinds/write-event-sourced-aggregate.d.ts +2 -1
  589. package/dist/generate/kinds/write-event-sourced-aggregate.d.ts.map +1 -1
  590. package/dist/generate/kinds/write-event-sourced-aggregate.js +13 -2
  591. package/dist/generate/kinds/write-event-sourced-aggregate.js.map +1 -1
  592. package/dist/generate/kinds.d.ts.map +1 -1
  593. package/dist/generate/kinds.js +2 -0
  594. package/dist/generate/kinds.js.map +1 -1
  595. package/dist/generate/permissions-file.d.ts +4 -1
  596. package/dist/generate/permissions-file.d.ts.map +1 -1
  597. package/dist/generate/permissions-file.js +6 -2
  598. package/dist/generate/permissions-file.js.map +1 -1
  599. package/dist/generate/place-context-files.d.ts +9 -0
  600. package/dist/generate/place-context-files.d.ts.map +1 -0
  601. package/dist/generate/place-context-files.js +14 -0
  602. package/dist/generate/place-context-files.js.map +1 -0
  603. package/dist/generate/place-generated-files.d.ts +18 -0
  604. package/dist/generate/place-generated-files.d.ts.map +1 -0
  605. package/dist/generate/{place-in-modules.js → place-generated-files.js} +42 -17
  606. package/dist/generate/place-generated-files.js.map +1 -0
  607. package/dist/generate/refresh-docs.d.ts +2 -1
  608. package/dist/generate/refresh-docs.d.ts.map +1 -1
  609. package/dist/generate/refresh-docs.js +5 -2
  610. package/dist/generate/refresh-docs.js.map +1 -1
  611. package/dist/generate/refuse-earlier-layout.d.ts +9 -0
  612. package/dist/generate/refuse-earlier-layout.d.ts.map +1 -0
  613. package/dist/generate/refuse-earlier-layout.js +15 -0
  614. package/dist/generate/refuse-earlier-layout.js.map +1 -0
  615. package/dist/help/notes.d.ts +1 -1
  616. package/dist/help/notes.d.ts.map +1 -1
  617. package/dist/help/notes.js +40 -9
  618. package/dist/help/notes.js.map +1 -1
  619. package/dist/help/usage.d.ts +1 -1
  620. package/dist/help/usage.d.ts.map +1 -1
  621. package/dist/help/usage.js +5 -3
  622. package/dist/help/usage.js.map +1 -1
  623. package/dist/init/files/event-sourcing-files.d.ts +9 -0
  624. package/dist/init/files/event-sourcing-files.d.ts.map +1 -0
  625. package/dist/init/files/event-sourcing-files.js +18 -0
  626. package/dist/init/files/event-sourcing-files.js.map +1 -0
  627. package/dist/init/files/init-files.d.ts.map +1 -1
  628. package/dist/init/files/init-files.js +4 -0
  629. package/dist/init/files/init-files.js.map +1 -1
  630. package/dist/init/files/platform-files.js +6 -1
  631. package/dist/init/files/platform-files.js.map +1 -1
  632. package/dist/init/files/privacy-files.d.ts +10 -0
  633. package/dist/init/files/privacy-files.d.ts.map +1 -0
  634. package/dist/init/files/privacy-files.js +24 -0
  635. package/dist/init/files/privacy-files.js.map +1 -0
  636. package/dist/init/files/project-files.d.ts.map +1 -1
  637. package/dist/init/files/project-files.js +5 -0
  638. package/dist/init/files/project-files.js.map +1 -1
  639. package/dist/init/files/script-files.d.ts +1 -0
  640. package/dist/init/files/script-files.d.ts.map +1 -1
  641. package/dist/init/files/script-files.js +8 -0
  642. package/dist/init/files/script-files.js.map +1 -1
  643. package/dist/init/knip-vars.d.ts.map +1 -1
  644. package/dist/init/knip-vars.js +1 -0
  645. package/dist/init/knip-vars.js.map +1 -1
  646. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  647. package/dist/init/manifest/database-scripts.js +9 -3
  648. package/dist/init/manifest/database-scripts.js.map +1 -1
  649. package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
  650. package/dist/init/manifest/dependencies-for.js +6 -2
  651. package/dist/init/manifest/dependencies-for.js.map +1 -1
  652. package/dist/init/manifest/scripts-for.js +17 -0
  653. package/dist/init/manifest/scripts-for.js.map +1 -1
  654. package/dist/init/manifest/test-scripts.d.ts.map +1 -1
  655. package/dist/init/manifest/test-scripts.js +3 -0
  656. package/dist/init/manifest/test-scripts.js.map +1 -1
  657. package/dist/init/manifest/versions.d.ts.map +1 -1
  658. package/dist/init/manifest/versions.js +27 -24
  659. package/dist/init/manifest/versions.js.map +1 -1
  660. package/dist/init/rewire-personal-data.d.ts +10 -0
  661. package/dist/init/rewire-personal-data.d.ts.map +1 -0
  662. package/dist/init/rewire-personal-data.js +32 -0
  663. package/dist/init/rewire-personal-data.js.map +1 -0
  664. package/dist/init/run-init.d.ts.map +1 -1
  665. package/dist/init/run-init.js +9 -1
  666. package/dist/init/run-init.js.map +1 -1
  667. package/dist/init/stack/resolve-personal-data.d.ts +10 -0
  668. package/dist/init/stack/resolve-personal-data.d.ts.map +1 -0
  669. package/dist/init/stack/resolve-personal-data.js +22 -0
  670. package/dist/init/stack/resolve-personal-data.js.map +1 -0
  671. package/dist/init/stack/resolve-queue.d.ts +4 -3
  672. package/dist/init/stack/resolve-queue.d.ts.map +1 -1
  673. package/dist/init/stack/resolve-queue.js +4 -6
  674. package/dist/init/stack/resolve-queue.js.map +1 -1
  675. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  676. package/dist/init/stack/resolve-stack.js +2 -0
  677. package/dist/init/stack/resolve-stack.js.map +1 -1
  678. package/dist/init/stack/resolve-tenancy.d.ts +3 -3
  679. package/dist/init/stack/resolve-tenancy.js +5 -5
  680. package/dist/init/stack/resolve-tenancy.js.map +1 -1
  681. package/dist/init/stack/stack-options.d.ts +4 -0
  682. package/dist/init/stack/stack-options.d.ts.map +1 -1
  683. package/dist/init/write-contracts.d.ts +2 -1
  684. package/dist/init/write-contracts.d.ts.map +1 -1
  685. package/dist/init/write-contracts.js +6 -3
  686. package/dist/init/write-contracts.js.map +1 -1
  687. package/dist/knip/ignore-code-types-where-they-are.d.ts +11 -0
  688. package/dist/knip/ignore-code-types-where-they-are.d.ts.map +1 -0
  689. package/dist/knip/ignore-code-types-where-they-are.js +56 -0
  690. package/dist/knip/ignore-code-types-where-they-are.js.map +1 -0
  691. package/dist/knip/index.d.ts +2 -0
  692. package/dist/knip/index.d.ts.map +1 -0
  693. package/dist/knip/index.js +2 -0
  694. package/dist/knip/index.js.map +1 -0
  695. package/dist/lint/eslint-in-project.d.ts +3 -2
  696. package/dist/lint/eslint-in-project.d.ts.map +1 -1
  697. package/dist/lint/eslint-in-project.js +5 -3
  698. package/dist/lint/eslint-in-project.js.map +1 -1
  699. package/dist/lint/lint-cache-of.d.ts +7 -0
  700. package/dist/lint/lint-cache-of.d.ts.map +1 -0
  701. package/dist/lint/lint-cache-of.js +47 -0
  702. package/dist/lint/lint-cache-of.js.map +1 -0
  703. package/dist/lint/lint-run.d.ts +2 -0
  704. package/dist/lint/lint-run.d.ts.map +1 -1
  705. package/dist/model-modules/index.d.ts +1 -1
  706. package/dist/model-modules/index.d.ts.map +1 -1
  707. package/dist/model-modules/index.js +1 -1
  708. package/dist/model-modules/index.js.map +1 -1
  709. package/dist/model-modules/into-module.d.ts +5 -1
  710. package/dist/model-modules/into-module.d.ts.map +1 -1
  711. package/dist/model-modules/into-module.js +12 -5
  712. package/dist/model-modules/into-module.js.map +1 -1
  713. package/dist/model-modules/is-context-level.d.ts +5 -3
  714. package/dist/model-modules/is-context-level.d.ts.map +1 -1
  715. package/dist/model-modules/is-context-level.js +17 -4
  716. package/dist/model-modules/is-context-level.js.map +1 -1
  717. package/dist/model-modules/module-layers.d.ts +7 -1
  718. package/dist/model-modules/module-layers.d.ts.map +1 -1
  719. package/dist/model-modules/module-layers.js +8 -2
  720. package/dist/model-modules/module-layers.js.map +1 -1
  721. package/dist/model-modules/module-name-flaw.d.ts +2 -2
  722. package/dist/model-modules/module-name-flaw.js +4 -4
  723. package/dist/model-modules/module-name-flaw.js.map +1 -1
  724. package/dist/model-modules/module-placement.d.ts +5 -1
  725. package/dist/model-modules/module-placement.d.ts.map +1 -1
  726. package/dist/model-modules/module-placement.js +47 -18
  727. package/dist/model-modules/module-placement.js.map +1 -1
  728. package/dist/model-modules/module-split.d.ts +9 -5
  729. package/dist/model-modules/module-split.d.ts.map +1 -1
  730. package/dist/model-modules/module-split.js +30 -13
  731. package/dist/model-modules/module-split.js.map +1 -1
  732. package/dist/model-modules/role-directories-of.d.ts.map +1 -1
  733. package/dist/model-modules/role-directories-of.js +6 -1
  734. package/dist/model-modules/role-directories-of.js.map +1 -1
  735. package/dist/model-modules/role-folders-of.d.ts +1 -1
  736. package/dist/model-modules/role-folders-of.d.ts.map +1 -1
  737. package/dist/model-modules/role-folders-of.js +15 -5
  738. package/dist/model-modules/role-folders-of.js.map +1 -1
  739. package/dist/model-modules/role-folders.d.ts +2 -2
  740. package/dist/model-modules/role-folders.js +2 -2
  741. package/dist/move-to-module/module-move.d.ts +2 -4
  742. package/dist/move-to-module/module-move.d.ts.map +1 -1
  743. package/dist/move-to-module/move-to-module.d.ts +2 -6
  744. package/dist/move-to-module/move-to-module.d.ts.map +1 -1
  745. package/dist/move-to-module/move-to-module.js +2 -31
  746. package/dist/move-to-module/move-to-module.js.map +1 -1
  747. package/dist/move-to-module/moves-into-module.d.ts +1 -1
  748. package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
  749. package/dist/move-to-module/moves-into-module.js +25 -6
  750. package/dist/move-to-module/moves-into-module.js.map +1 -1
  751. package/dist/mutation/changed-files.d.ts +7 -0
  752. package/dist/mutation/changed-files.d.ts.map +1 -0
  753. package/dist/mutation/changed-files.js +15 -0
  754. package/dist/mutation/changed-files.js.map +1 -0
  755. package/dist/mutation/format-mutation.d.ts +4 -0
  756. package/dist/mutation/format-mutation.d.ts.map +1 -0
  757. package/dist/mutation/format-mutation.js +29 -0
  758. package/dist/mutation/format-mutation.js.map +1 -0
  759. package/dist/mutation/format-survivors.d.ts +8 -0
  760. package/dist/mutation/format-survivors.d.ts.map +1 -0
  761. package/dist/mutation/format-survivors.js +19 -0
  762. package/dist/mutation/format-survivors.js.map +1 -0
  763. package/dist/mutation/mutation-report-file.d.ts +3 -0
  764. package/dist/mutation/mutation-report-file.d.ts.map +1 -0
  765. package/dist/mutation/mutation-report-file.js +3 -0
  766. package/dist/mutation/mutation-report-file.js.map +1 -0
  767. package/dist/mutation/mutation-scores.d.ts +35 -0
  768. package/dist/mutation/mutation-scores.d.ts.map +1 -0
  769. package/dist/mutation/mutation-scores.js +55 -0
  770. package/dist/mutation/mutation-scores.js.map +1 -0
  771. package/dist/mutation/read-mutation-report.d.ts +16 -0
  772. package/dist/mutation/read-mutation-report.d.ts.map +1 -0
  773. package/dist/mutation/read-mutation-report.js +38 -0
  774. package/dist/mutation/read-mutation-report.js.map +1 -0
  775. package/dist/mutation/survivors.d.ts +19 -0
  776. package/dist/mutation/survivors.d.ts.map +1 -0
  777. package/dist/mutation/survivors.js +24 -0
  778. package/dist/mutation/survivors.js.map +1 -0
  779. package/dist/platform-layout/platform-layout.d.ts +2 -0
  780. package/dist/platform-layout/platform-layout.d.ts.map +1 -1
  781. package/dist/platform-layout/platform-layout.js +2 -0
  782. package/dist/platform-layout/platform-layout.js.map +1 -1
  783. package/dist/presets/apply-preset.js +2 -1
  784. package/dist/presets/apply-preset.js.map +1 -1
  785. package/dist/presets/identity-preset.d.ts.map +1 -1
  786. package/dist/presets/identity-preset.js +17 -1
  787. package/dist/presets/identity-preset.js.map +1 -1
  788. package/dist/presets/preset-files.d.ts.map +1 -1
  789. package/dist/presets/preset-files.js +1 -0
  790. package/dist/presets/preset-files.js.map +1 -1
  791. package/dist/presets/preset-step.d.ts +3 -1
  792. package/dist/presets/preset-step.d.ts.map +1 -1
  793. package/dist/refusals/code-types-pattern.d.ts +4 -0
  794. package/dist/refusals/code-types-pattern.d.ts.map +1 -0
  795. package/dist/refusals/code-types-pattern.js +6 -0
  796. package/dist/refusals/code-types-pattern.js.map +1 -0
  797. package/dist/refusals/ignore-code-types.d.ts +1 -1
  798. package/dist/refusals/ignore-code-types.d.ts.map +1 -1
  799. package/dist/refusals/ignore-code-types.js +3 -2
  800. package/dist/refusals/ignore-code-types.js.map +1 -1
  801. package/dist/refusals/path-from-contexts.d.ts +1 -1
  802. package/dist/refusals/path-from-contexts.js +2 -2
  803. package/dist/refusals/path-from-contexts.js.map +1 -1
  804. package/dist/refusals/with-codes.d.ts +1 -1
  805. package/dist/refusals/with-codes.d.ts.map +1 -1
  806. package/dist/refusals/with-codes.js +1 -1
  807. package/dist/refusals/with-codes.js.map +1 -1
  808. package/dist/refusals/write-refusal-classes.d.ts.map +1 -1
  809. package/dist/refusals/write-refusal-classes.js +4 -2
  810. package/dist/refusals/write-refusal-classes.js.map +1 -1
  811. package/dist/run.d.ts.map +1 -1
  812. package/dist/run.js +4 -0
  813. package/dist/run.js.map +1 -1
  814. package/dist/stack/audit-vars.d.ts +1 -1
  815. package/dist/stack/audit-vars.d.ts.map +1 -1
  816. package/dist/stack/audit-vars.js +26 -8
  817. package/dist/stack/audit-vars.js.map +1 -1
  818. package/dist/stack/stack-vars.d.ts.map +1 -1
  819. package/dist/stack/stack-vars.js +44 -2
  820. package/dist/stack/stack-vars.js.map +1 -1
  821. package/dist/version.d.ts +1 -1
  822. package/dist/version.js +1 -1
  823. package/package.json +4 -2
  824. package/templates/background-job/background-job.spec.buses.ts.tpl +57 -0
  825. package/templates/background-job/wiring.manual.tpl +4 -0
  826. package/templates/command/handler.spec.buses.ts.tpl +1 -1
  827. package/templates/command/handler.spec.tsyringe.ts.tpl +1 -1
  828. package/templates/context/CONTEXT.md.tpl +5 -0
  829. package/templates/context/permission-set.tpl +1 -1
  830. package/templates/context/permissions.spec.ts.tpl +1 -1
  831. package/templates/controller/guard.spec.ts.tpl +2 -2
  832. package/templates/docs/asyncapi.privacy.json.tpl +100 -0
  833. package/templates/docs/event-catalog.privacy.md +18 -0
  834. package/templates/docs/privacy-register.md.tpl +25 -0
  835. package/templates/erasure-handler/erasure-handler.declared.ts.tpl +22 -0
  836. package/templates/erasure-handler/erasure-handler.spec.ts.tpl +36 -0
  837. package/templates/erasure-handler/erasure-handler.ts.tpl +20 -0
  838. package/templates/erasure-handler/wiring.manual.tpl +23 -0
  839. package/templates/erasure-handler/wiring.tsyringe.tpl +6 -0
  840. package/templates/error/refusal.ts.tpl +1 -1
  841. package/templates/file-upload/handler.spec.ts.tpl +1 -1
  842. package/templates/init/README.md.tpl +43 -3
  843. package/templates/init/gitignore.tpl +3 -0
  844. package/templates/init/jest.config.js.tpl +2 -0
  845. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +19 -1
  846. package/templates/init/platform/audit/create-audit.ts.tpl +28 -6
  847. package/templates/init/platform/composition/compose-application.manual.ts.tpl +64 -6
  848. package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +12 -0
  849. package/templates/init/platform/composition/create-platform.manual.ts.tpl +7 -3
  850. package/templates/init/platform/composition/lay-foundations.manual.ts.tpl +14 -2
  851. package/templates/init/platform/composition/lay-foundations.tsyringe.ts.tpl +17 -1
  852. package/templates/init/platform/composition/platform-options.manual.ts.tpl +4 -1
  853. package/templates/init/platform/composition/platform-test.module.tsyringe.ts.tpl +36 -0
  854. package/templates/init/platform/composition/platform.manual.ts.tpl +16 -0
  855. package/templates/init/platform/database/open-persistence.memory.ts.tpl +20 -0
  856. package/templates/init/platform/database/open-test-database.prisma.ts.tpl +13 -2
  857. package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +21 -1
  858. package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +17 -1
  859. package/templates/init/platform/database/persistence-over.knex.ts.tpl +20 -1
  860. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +21 -0
  861. package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +14 -1
  862. package/templates/init/platform/database/persistence.memory.ts.tpl +9 -0
  863. package/templates/init/platform/database/persistence.orm.ts.tpl +9 -1
  864. package/templates/init/platform/database/schema.drizzle.ts.tpl +18 -3
  865. package/templates/init/platform/database/schema.knex.ts.tpl +8 -1
  866. package/templates/init/platform/database/schema.prisma.tpl +131 -1
  867. package/templates/init/platform/database/schema.typeorm.ts.tpl +32 -1
  868. package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +36 -0
  869. package/templates/init/platform/event-sourcing/event-sourcing.module.ts.tpl +22 -0
  870. package/templates/init/platform/jobs/background-jobs.ts.tpl +21 -0
  871. package/templates/init/platform/jobs/create-background-work.ts.tpl +147 -0
  872. package/templates/init/platform/jobs/job-settings.ts.tpl +11 -0
  873. package/templates/init/platform/privacy/data-subject-copies.manual.ts.tpl +14 -0
  874. package/templates/init/platform/privacy/data-subject-copies.tsyringe.ts.tpl +13 -0
  875. package/templates/init/platform/privacy/data-subject-exports.manual.ts.tpl +14 -0
  876. package/templates/init/platform/privacy/data-subject-exports.tsyringe.ts.tpl +13 -0
  877. package/templates/init/platform/privacy/privacy.module.tsyringe.ts.tpl +20 -0
  878. package/templates/init/platform/privacy/run-erasure.manual.ts.tpl +100 -0
  879. package/templates/init/platform/privacy/run-erasure.tsyringe.ts.tpl +104 -0
  880. package/templates/init/platform/privacy/run-export.manual.ts.tpl +64 -0
  881. package/templates/init/platform/privacy/run-export.tsyringe.ts.tpl +71 -0
  882. package/templates/init/platform/privacy/run-purge.manual.ts.tpl +39 -0
  883. package/templates/init/platform/privacy/run-purge.tsyringe.ts.tpl +45 -0
  884. package/templates/init/rules/application.md.tpl +3 -2
  885. package/templates/init/rules/domain.md.tpl +3 -2
  886. package/templates/init/rules/infrastructure.md.tpl +2 -1
  887. package/templates/init/rules/presentation.md.tpl +2 -1
  888. package/templates/init/rules/tests.md.tpl +1 -1
  889. package/templates/init/scripts/events.ts.tpl +12 -0
  890. package/templates/init/scripts/privacy-erase.manual.ts.tpl +78 -0
  891. package/templates/init/scripts/privacy-erase.tsyringe.ts.tpl +78 -0
  892. package/templates/init/scripts/privacy-export.manual.ts.tpl +79 -0
  893. package/templates/init/scripts/privacy-export.tsyringe.ts.tpl +79 -0
  894. package/templates/init/scripts/privacy-purge.manual.ts.tpl +48 -0
  895. package/templates/init/scripts/privacy-purge.tsyringe.ts.tpl +48 -0
  896. package/templates/personal-data/adapter-field.tpl +4 -0
  897. package/templates/personal-data/copies.manual.tpl +4 -0
  898. package/templates/personal-data/copies.tsyringe.tpl +4 -0
  899. package/templates/personal-data/declaration.drizzle.ts.tpl +22 -0
  900. package/templates/personal-data/declaration.knex.ts.tpl +24 -0
  901. package/templates/personal-data/declaration.prisma.ts.tpl +24 -0
  902. package/templates/personal-data/declaration.typeorm.ts.tpl +21 -0
  903. package/templates/personal-data/erasure.drizzle.ts.tpl +43 -0
  904. package/templates/personal-data/erasure.knex.ts.tpl +41 -0
  905. package/templates/personal-data/erasure.prisma.ts.tpl +43 -0
  906. package/templates/personal-data/erasure.typeorm.ts.tpl +41 -0
  907. package/templates/personal-data/export-fake.ts.tpl +24 -0
  908. package/templates/personal-data/export-port.ts.tpl +8 -0
  909. package/templates/personal-data/export.drizzle.ts.tpl +43 -0
  910. package/templates/personal-data/export.knex.ts.tpl +41 -0
  911. package/templates/personal-data/export.prisma.ts.tpl +43 -0
  912. package/templates/personal-data/export.typeorm.ts.tpl +41 -0
  913. package/templates/personal-data/exports.manual.tpl +4 -0
  914. package/templates/personal-data/exports.tsyringe.tpl +4 -0
  915. package/templates/personal-data/fake.ts.tpl +26 -0
  916. package/templates/personal-data/port.ts.tpl +8 -0
  917. package/templates/personal-data/spec.ts.tpl +280 -0
  918. package/templates/personal-data/wiring.tsyringe.tpl +12 -0
  919. package/templates/pipeline/github/workflows/ci.yml.tpl +62 -0
  920. package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +64 -2
  921. package/templates/pipeline/jest.mutation.config.js.tpl +8 -0
  922. package/templates/pipeline/knip.json.tpl +2 -2
  923. package/templates/pipeline/lefthook.yml +6 -0
  924. package/templates/pipeline/package-scripts.json +1 -1
  925. package/templates/pipeline/stryker.config.mjs.tpl +25 -0
  926. package/templates/pipeline/vitest.config.ts.tpl +2 -0
  927. package/templates/pipeline/vitest.mutation.config.ts.tpl +29 -0
  928. package/templates/policy/policy.declared.ts.tpl +1 -1
  929. package/templates/policy/policy.ts.tpl +1 -1
  930. package/templates/presets/identity/context/application/authorization/change-member-roles.policy.ts.tpl +1 -1
  931. package/templates/presets/identity/context/application/authorization/grant-delegations.policy.ts.tpl +1 -1
  932. package/templates/presets/identity/context/application/authorization/invite-members.policy.ts.tpl +1 -1
  933. package/templates/presets/identity/context/application/authorization/read-members.policy.ts.tpl +1 -1
  934. package/templates/presets/identity/context/application/authorization/remove-members.policy.ts.tpl +1 -1
  935. package/templates/presets/identity/context/application/authorization/revoke-delegations.policy.ts.tpl +1 -1
  936. package/templates/presets/identity/context/application/authorization/revoke-invitations.policy.ts.tpl +1 -1
  937. package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.command.ts.tpl +1 -1
  938. package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.command.ts.tpl +1 -1
  939. package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.handler.ts.tpl +1 -1
  940. package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.command.ts.tpl +1 -1
  941. package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.command.ts.tpl +1 -1
  942. package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.command.ts.tpl +1 -1
  943. package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.handler.ts.tpl +1 -1
  944. package/templates/presets/identity/context/application/commands/invite-member/invite-member.command.ts.tpl +1 -1
  945. package/templates/presets/identity/context/application/commands/invite-member/invite-member.handler.ts.tpl +1 -1
  946. package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.command.ts.tpl +1 -1
  947. package/templates/presets/identity/context/application/commands/provision-account/provision-account.command.ts.tpl +1 -1
  948. package/templates/presets/identity/context/application/commands/remove-member/remove-member.command.ts.tpl +1 -1
  949. package/templates/presets/identity/context/application/commands/remove-member/remove-member.handler.ts.tpl +1 -1
  950. package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.command.ts.tpl +1 -1
  951. package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.handler.ts.tpl +1 -1
  952. package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.command.ts.tpl +1 -1
  953. package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.handler.ts.tpl +1 -1
  954. package/templates/presets/identity/context/application/queries/search-members/search-members.handler.ts.tpl +1 -1
  955. package/templates/presets/identity/context/application/queries/search-members/search-members.query.ts.tpl +1 -1
  956. package/templates/presets/identity/context/domain/errors/above-own-role.error.named.ts.tpl +1 -1
  957. package/templates/presets/identity/context/domain/errors/account-already-deactivated.error.named.ts.tpl +1 -1
  958. package/templates/presets/identity/context/domain/errors/already-member.error.named.ts.tpl +1 -1
  959. package/templates/presets/identity/context/domain/errors/deactivated-account.error.named.ts.tpl +1 -1
  960. package/templates/presets/identity/context/domain/errors/delegation-not-active.error.named.ts.tpl +1 -1
  961. package/templates/presets/identity/context/domain/errors/delegation-period-inverted.error.named.ts.tpl +1 -1
  962. package/templates/presets/identity/context/domain/errors/delegation-to-oneself.error.named.ts.tpl +1 -1
  963. package/templates/presets/identity/context/domain/errors/delegation-too-long.error.named.ts.tpl +1 -1
  964. package/templates/presets/identity/context/domain/errors/delegation-with-no-right.error.named.ts.tpl +1 -1
  965. package/templates/presets/identity/context/domain/errors/email-not-verified.error.named.ts.tpl +1 -1
  966. package/templates/presets/identity/context/domain/errors/invalid-display-name.error.named.ts.tpl +1 -1
  967. package/templates/presets/identity/context/domain/errors/invalid-email-address.error.named.ts.tpl +1 -1
  968. package/templates/presets/identity/context/domain/errors/invalid-organisation-name.error.named.ts.tpl +1 -1
  969. package/templates/presets/identity/context/domain/errors/invalid-organisation-slug.error.named.ts.tpl +1 -1
  970. package/templates/presets/identity/context/domain/errors/invitation-expired.error.named.ts.tpl +1 -1
  971. package/templates/presets/identity/context/domain/errors/invitation-not-addressed-to-account.error.named.ts.tpl +1 -1
  972. package/templates/presets/identity/context/domain/errors/invitation-not-pending.error.named.ts.tpl +1 -1
  973. package/templates/presets/identity/context/domain/errors/last-owner.error.named.ts.tpl +1 -1
  974. package/templates/presets/identity/context/domain/errors/not-an-owner.error.named.ts.tpl +1 -1
  975. package/templates/presets/identity/context/domain/errors/organisation-slug-taken.error.named.ts.tpl +1 -1
  976. package/templates/presets/identity/context/domain/errors/own-role.error.named.ts.tpl +1 -1
  977. package/templates/presets/identity/context/domain/errors/right-not-in-role.error.named.ts.tpl +1 -1
  978. package/templates/presets/identity/context/domain/errors/unknown-account.error.named.ts.tpl +1 -1
  979. package/templates/presets/identity/context/domain/errors/unknown-delegation.error.named.ts.tpl +1 -1
  980. package/templates/presets/identity/context/domain/errors/unknown-invitation.error.named.ts.tpl +1 -1
  981. package/templates/presets/identity/context/domain/errors/unknown-member.error.named.ts.tpl +1 -1
  982. package/templates/presets/identity/context/domain/errors/unknown-organisation.error.named.ts.tpl +1 -1
  983. package/templates/presets/identity/context/infrastructure/persistence/account.personal-fields.privacy.drizzle.ts.tpl +17 -0
  984. package/templates/presets/identity/context/infrastructure/persistence/account.personal-fields.privacy.knex.ts.tpl +19 -0
  985. package/templates/presets/identity/context/infrastructure/persistence/invitation.personal-fields.privacy.drizzle.ts.tpl +18 -0
  986. package/templates/presets/identity/context/infrastructure/persistence/invitation.personal-fields.privacy.knex.ts.tpl +20 -0
  987. package/templates/presets/identity/context/test/unit/account-deactivated.integration-handler.spec.ts.tpl +4 -2
  988. package/templates/presets/identity/context/test/unit/deactivate-account.handler.spec.ts.tpl +7 -5
  989. package/templates/presets/identity/context/test/unit/environment-identity-provider-connection.adapter.spec.ts.tpl +7 -3
  990. package/templates/presets/identity/context/test/unit/invite-member.handler.spec.ts.tpl +7 -7
  991. package/templates/presets/identity/context/test/unit/member-joined.integration-handler.spec.ts.tpl +4 -2
  992. package/templates/presets/identity/context/test/unit/member-removed.integration-handler.spec.ts.tpl +5 -3
  993. package/templates/presets/identity/context/test/unit/organisation-opened.integration-handler.spec.ts.tpl +4 -2
  994. package/templates/presets/identity/context/test/unit/revoke-invitation.handler.spec.ts.tpl +7 -5
  995. package/templates/presets/identity/context/test/worlds/__context__.world.ts.tpl +1 -1
  996. package/templates/process/process.spec.ts.tpl +6 -3
  997. package/templates/process/timeout-job.spec.buses.ts.tpl +42 -0
  998. package/templates/process/timeout-job.wiring.manual.tpl +4 -0
  999. package/templates/query/handler.spec.buses.ts.tpl +1 -1
  1000. package/templates/query/handler.spec.tsyringe.ts.tpl +1 -1
  1001. package/templates/query/search.handler.declared.ts.tpl +1 -1
  1002. package/templates/query/search.handler.spec.buses.ts.tpl +1 -1
  1003. package/templates/query/search.handler.spec.tsyringe.ts.tpl +1 -1
  1004. package/templates/query/search.handler.ts.tpl +1 -1
  1005. package/templates/repository/drizzle/mapper.ts.tpl +10 -0
  1006. package/templates/repository/drizzle/table.tpl +6 -0
  1007. package/templates/repository/knex/mapper.ts.tpl +10 -0
  1008. package/templates/repository/knex/row.ts.tpl +3 -0
  1009. package/templates/repository/knex/table.tpl +3 -0
  1010. package/templates/repository/prisma/mapper.ts.tpl +16 -1
  1011. package/templates/repository/prisma/model.tpl +9 -0
  1012. package/templates/repository/prisma/repository.ts.tpl +55 -0
  1013. package/templates/repository/typeorm/mapper.ts.tpl +10 -0
  1014. package/templates/repository/typeorm/repository.ts.tpl +48 -0
  1015. package/templates/repository/typeorm/row.ts.tpl +9 -1
  1016. package/templates/repository/typeorm/table.tpl +27 -0
  1017. package/templates/value-object/value-object.spec.ts.tpl +1 -0
  1018. package/dist/generate/kinds/background/require-container.d.ts +0 -7
  1019. package/dist/generate/kinds/background/require-container.d.ts.map +0 -1
  1020. package/dist/generate/kinds/background/require-container.js +0 -13
  1021. package/dist/generate/kinds/background/require-container.js.map +0 -1
  1022. package/dist/generate/place-in-modules.d.ts +0 -16
  1023. package/dist/generate/place-in-modules.d.ts.map +0 -1
  1024. package/dist/generate/place-in-modules.js.map +0 -1
  1025. /package/templates/background-job/{background-job.spec.ts.tpl → background-job.spec.tsyringe.ts.tpl} +0 -0
  1026. /package/templates/presets/identity/context/{domain/errors/codes.named.ts.tpl → __context__.codes.named.ts.tpl} +0 -0
  1027. /package/templates/presets/identity/context/{application/authorization/__context__.permissions.ts.tpl → __context__.permissions.ts.tpl} +0 -0
  1028. /package/templates/process/{timeout-job.spec.ts.tpl → timeout-job.spec.tsyringe.ts.tpl} +0 -0
  1029. /package/templates/repository/{wiring.manual.tpl → first-use.wiring.manual.tpl} +0 -0
@@ -0,0 +1,280 @@
1
+ import { afterAll, beforeAll, beforeEach, describe, expect, it } from '{{tests.module}}';
2
+ {{#if orm.drizzle}}
3
+ import { eq } from 'drizzle-orm';
4
+ {{/if}}
5
+ {{#if orm.knex}}
6
+ import type { Knex } from 'knex';
7
+ {{/if}}
8
+ import {
9
+ {{#if personal.pseudonymise}}
10
+ ERASED_PERSONAL_DATA,
11
+ {{/if}}
12
+ FixedClock,
13
+ FixedExecutionScope,
14
+ executionContext,
15
+ type Actor,
16
+ type ExecutionContext,
17
+ } from '@ddd-ts-kit/kernel';
18
+ import { {{adapter.pascal}}{{aggregate.pascal}}Repository } from '{{alias.context}}/infrastructure/persistence/{{adapter.kebab}}-{{aggregate.kebab}}.repository{{alias.ext}}';
19
+ import { {{personal.names.adapter}} } from '{{alias.context}}/infrastructure/persistence/{{personal.names.adapterKebab}}.repository{{alias.ext}}';
20
+ import { {{personal.names.exportAdapter}} } from '{{alias.context}}/infrastructure/persistence/{{personal.names.exportAdapterKebab}}.repository{{alias.ext}}';
21
+ {{#if orm.knex}}
22
+ import { {{context.constant}}_SCHEMA } from '{{alias.context}}/infrastructure/persistence/{{context.kebab}}.schema{{alias.ext}}';
23
+ import type { {{aggregate.pascal}}Row } from '{{alias.context}}/infrastructure/persistence/{{aggregate.kebab}}-row.schema{{alias.ext}}';
24
+ {{/if}}
25
+ {{#if orm.drizzle}}
26
+ import { {{aggregate.tableCamel}} } from '{{alias.context}}/infrastructure/persistence/{{context.kebab}}.schema{{alias.ext}}';
27
+ {{/if}}
28
+ {{#if orm.typeorm}}
29
+ import { {{aggregate.tableCamel}} } from '{{alias.context}}/infrastructure/persistence/{{context.kebab}}.schema{{alias.ext}}';
30
+ import type { {{aggregate.pascal}}Row } from '{{alias.context}}/infrastructure/persistence/{{aggregate.kebab}}-row.schema{{alias.ext}}';
31
+ {{/if}}
32
+ {{#if orm.prisma}}
33
+ import type { Prisma, {{context.pascal}}{{aggregate.pascal}} as {{aggregate.pascal}}Row } from '{{alias.generated}}/prisma/client{{alias.ext}}';
34
+ {{/if}}
35
+ import { openTestDatabase, type TestDatabase } from '{{alias.platform}}/database/open-test-database{{alias.ext}}';
36
+ import { {{aggregate.article}}{{aggregate.pascal}} } from '{{alias.context}}/test/builders/{{aggregate.kebab}}.builder{{alias.ext}}';
37
+ import { {{personal.names.fake}} } from '{{alias.context}}/test/fakes/{{personal.names.portKebab}}.fake{{alias.ext}}';
38
+ import { {{personal.names.exportFake}} } from '{{alias.context}}/test/fakes/{{personal.names.exportPortKebab}}.fake{{alias.ext}}';
39
+
40
+ {{#if orm.drizzle}}
41
+ type {{aggregate.pascal}}Row = typeof {{aggregate.tableCamel}}.$inferSelect;
42
+
43
+ /** What a test writes into the columns of a person: the generated mapper writes none of them yet. */
44
+ type Personal = Partial<typeof {{aggregate.tableCamel}}.$inferInsert>;
45
+ {{/if}}
46
+ {{#if orm.prisma}}
47
+ /** What a test writes into the columns of a person: the generated mapper writes none of them yet. */
48
+ type Personal = Prisma.{{context.pascal}}{{aggregate.pascal}}UpdateInput;
49
+ {{/if}}
50
+ {{#unless orm.drizzle}}
51
+ {{#unless orm.prisma}}
52
+ /** What a test writes into the columns of a person: the generated mapper writes none of them yet. */
53
+ type Personal = Partial<{{aggregate.pascal}}Row>;
54
+ {{/unless}}
55
+ {{/unless}}
56
+
57
+ const clock = new FixedClock(new Date('2026-01-01T00:00:00.000Z'));
58
+ {{#if personal.retains}}
59
+
60
+ /** Long before any retention ends. */
61
+ const LONG_AGO = new Date('2000-01-01T00:00:00.000Z');
62
+ {{/if}}
63
+
64
+ /** What `{{aggregate.table}}` keeps of two people in clear, as a use case would have written it. */
65
+ const OF_ADA: Personal = {{personal.ofAda}};
66
+
67
+ const OF_BOB: Personal = {{personal.ofBob}};
68
+ {{#if personal.pseudonymise}}
69
+
70
+ /** What the row of Ada reads once she is erased: the declaration says `pseudonymise`. */
71
+ const ERASED = {{personal.erased}};
72
+ {{/if}}
73
+
74
+ /** The source every record of `{{aggregate.table}}` names: the context, then the table. */
75
+ const SOURCE = '{{context.kebab}}.{{aggregate.table}}';
76
+
77
+ /** What the export hands over of Ada: the personal columns alone, as plain data. */
78
+ const EXPORTED_OF_ADA = {{personal.exportedOfAda}};
79
+ {{#if personal.pseudonymise}}
80
+
81
+ /** What the export hands over once Ada is erased: what the row reads. */
82
+ const EXPORTED_ERASED = {{personal.exportedErased}};
83
+ {{/if}}
84
+
85
+ let database: TestDatabase;
86
+ let scope: FixedExecutionScope;
87
+ let repository: {{adapter.pascal}}{{aggregate.pascal}}Repository;
88
+ let erasure: {{personal.names.adapter}};
89
+ let exported: {{personal.names.exportAdapter}};
90
+
91
+ beforeAll(async () => {
92
+ database = await openTestDatabase();
93
+ });
94
+
95
+ afterAll(async () => {
96
+ await database.close();
97
+ });
98
+
99
+ beforeEach(async () => {
100
+ await database.reset();
101
+ scope = new FixedExecutionScope(workOf('acme'));
102
+ repository = new {{adapter.pascal}}{{aggregate.pascal}}Repository(database.persistence.database, scope, clock);
103
+ erasure = new {{personal.names.adapter}}(database.persistence.database{{#if tenant.scoped}}, scope{{/if}});
104
+ exported = new {{personal.names.exportAdapter}}(database.persistence.database{{#if tenant.scoped}}, scope{{/if}});
105
+ });
106
+
107
+ describe('{{personal.names.adapter}}', () => {
108
+ it('erases what {{aggregate.table}} keeps of the subject, as the declaration says, and answers the rows it reached', async () => {
109
+ const ada = await saved(OF_ADA);
110
+ const bob = await saved(OF_BOB);
111
+
112
+ expect(await erasure.erase({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}})).toBe(1);
113
+ {{#if personal.pseudonymise}}
114
+ expect(await rowOf(ada)).toMatchObject(ERASED);
115
+ {{/if}}
116
+ {{#if personal.row}}
117
+ expect(await rowOf(ada)).toBeUndefined();
118
+ {{/if}}
119
+ expect(await rowOf(bob)).toMatchObject(OF_BOB);
120
+ });
121
+
122
+ it('reaches nothing the second time: an erasure run again completes one that failed half way', async () => {
123
+ {{#if personal.subjectIsId}}
124
+ const ada = await saved(OF_ADA);
125
+ {{/if}}
126
+ {{#unless personal.subjectIsId}}
127
+ await saved(OF_ADA);
128
+ {{/unless}}
129
+
130
+ await erasure.erase({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}});
131
+
132
+ expect(await erasure.erase({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}})).toBe(0);
133
+ });
134
+ });
135
+
136
+ {{#if personal.retains}}
137
+ describe('{{personal.names.adapter}}, the purge of what outlived its retention', () => {
138
+ it('erases the rows whose retention ended, as the declaration says, and leaves the others', async () => {
139
+ const ada = await saved({ ...OF_ADA, {{personal.retentionRow}}: LONG_AGO });
140
+ const bob = await saved(OF_BOB);
141
+
142
+ expect(await erasure.purgeExpired(clock.now())).toBe(1);
143
+ {{#if personal.pseudonymise}}
144
+ expect(await rowOf(ada)).toMatchObject(ERASED);
145
+ {{/if}}
146
+ {{#if personal.row}}
147
+ expect(await rowOf(ada)).toBeUndefined();
148
+ {{/if}}
149
+ expect(await rowOf(bob)).toMatchObject(OF_BOB);
150
+ expect(await erasure.purgeExpired(clock.now())).toBe(0);
151
+ });
152
+ });
153
+
154
+ {{/if}}
155
+ describe('{{personal.names.exportAdapter}}', () => {
156
+ it('hands over what {{aggregate.table}} keeps of the subject as plain data, under its source, and nothing of the others', async () => {
157
+ {{#if personal.subjectIsId}}
158
+ const ada = await saved(OF_ADA);
159
+
160
+ await saved(OF_BOB);
161
+ {{/if}}
162
+ {{#unless personal.subjectIsId}}
163
+ await saved(OF_ADA);
164
+ await saved(OF_BOB);
165
+ {{/unless}}
166
+
167
+ expect(await exported.exportOf({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}})).toEqual([{ source: SOURCE, values: EXPORTED_OF_ADA }]);
168
+ });
169
+
170
+ it('answers what the row reads once the subject is erased{{#if personal.row}}: nothing, the row is gone{{/if}}', async () => {
171
+ {{#if personal.subjectIsId}}
172
+ const ada = await saved(OF_ADA);
173
+ {{/if}}
174
+ {{#unless personal.subjectIsId}}
175
+ await saved(OF_ADA);
176
+ {{/unless}}
177
+
178
+ await erasure.erase({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}});
179
+
180
+ {{#if personal.pseudonymise}}
181
+ expect(await exported.exportOf({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}})).toEqual([{ source: SOURCE, values: EXPORTED_ERASED }]);
182
+ {{/if}}
183
+ {{#if personal.row}}
184
+ expect(await exported.exportOf({{#if personal.subjectIsId}}ada{{/if}}{{#unless personal.subjectIsId}}'ada'{{/unless}})).toEqual([]);
185
+ {{/if}}
186
+ });
187
+ });
188
+
189
+ describe('{{personal.names.fake}} and {{personal.names.exportFake}}', () => {
190
+ it('counts the rows it holds of a person, and forgets them at the first erasure', async () => {
191
+ const fake = new {{personal.names.fake}}().holds('ada', 2);
192
+
193
+ expect(await fake.erase('ada')).toBe(2);
194
+ expect(await fake.erase('ada')).toBe(0);
195
+ expect(fake.erased).toEqual(['ada', 'ada']);
196
+ });
197
+
198
+ it('hands over the records it holds of a person, and remembers who was asked', async () => {
199
+ const record = { source: SOURCE, values: EXPORTED_OF_ADA };
200
+ const fake = new {{personal.names.exportFake}}().holds('ada', record);
201
+
202
+ expect(await fake.exportOf('ada')).toEqual([record]);
203
+ expect(await fake.exportOf('bob')).toEqual([]);
204
+ expect(fake.asked).toEqual(['ada', 'bob']);
205
+ });
206
+ });
207
+
208
+ /** {{aggregate.article}} {{aggregate.pascal}} saved through its repository, then given what the table keeps of the person. Answers its id. */
209
+ async function saved(personal: Personal): Promise<string> {
210
+ const aggregate = {{aggregate.article}}{{aggregate.pascal}}().build();
211
+
212
+ await repository.save(aggregate);
213
+ await write(aggregate.id, personal);
214
+
215
+ return aggregate.id;
216
+ }
217
+
218
+ {{#if orm.knex}}
219
+ async function write(id: string, personal: Personal): Promise<void> {
220
+ await table().where({ id }).update(personal);
221
+ }
222
+
223
+ async function rowOf(id: string): Promise<{{aggregate.pascal}}Row | undefined> {
224
+ const row = await table().where({ id }).first();
225
+
226
+ return row;
227
+ }
228
+
229
+ /** A function and not a method: a query builder is thenable. */
230
+ function table(): Knex.QueryBuilder<{{aggregate.pascal}}Row, {{aggregate.pascal}}Row[]> {
231
+ const rows = database.persistence.database.executor()<{{aggregate.pascal}}Row, {{aggregate.pascal}}Row[]>('{{aggregate.table}}');
232
+
233
+ return rows.withSchema({{context.constant}}_SCHEMA);
234
+ }
235
+ {{/if}}
236
+ {{#if orm.drizzle}}
237
+ async function write(id: string, personal: Personal): Promise<void> {
238
+ const byId = eq({{aggregate.tableCamel}}.id, id);
239
+
240
+ await database.persistence.database.executor().update({{aggregate.tableCamel}}).set(personal).where(byId);
241
+ }
242
+
243
+ async function rowOf(id: string): Promise<{{aggregate.pascal}}Row | undefined> {
244
+ const byId = eq({{aggregate.tableCamel}}.id, id);
245
+ const [row] = await database.persistence.database.executor().select().from({{aggregate.tableCamel}}).where(byId);
246
+
247
+ return row;
248
+ }
249
+ {{/if}}
250
+ {{#if orm.prisma}}
251
+ async function write(id: string, personal: Personal): Promise<void> {
252
+ const rows = database.persistence.database.client().{{context.camel}}{{aggregate.pascal}};
253
+
254
+ await rows.update({ where: { id }, data: personal });
255
+ }
256
+
257
+ async function rowOf(id: string): Promise<{{aggregate.pascal}}Row | undefined> {
258
+ const rows = database.persistence.database.client().{{context.camel}}{{aggregate.pascal}};
259
+ const row = await rows.findUnique({ where: { id } });
260
+
261
+ return row ?? undefined;
262
+ }
263
+ {{/if}}
264
+ {{#if orm.typeorm}}
265
+ async function write(id: string, personal: Personal): Promise<void> {
266
+ await database.persistence.database.manager().update({{aggregate.tableCamel}}, { id }, personal);
267
+ }
268
+
269
+ async function rowOf(id: string): Promise<{{aggregate.pascal}}Row | undefined> {
270
+ const row = await database.persistence.database.manager().findOneBy({{aggregate.tableCamel}}, { id });
271
+
272
+ return row ?? undefined;
273
+ }
274
+ {{/if}}
275
+
276
+ function workOf(tenantId: string): ExecutionContext {
277
+ const actor: Actor = { id: 'member-of-' + tenantId, type: 'user', tenantId, roles: [], attributes: {} };
278
+
279
+ return executionContext({ correlationId: 'personal-data-spec', actor, origin: 'test' });
280
+ }
@@ -0,0 +1,12 @@
1
+ @@imports
2
+ {{#if tenant.scoped}}
3
+ import { ExecutionScope } from '@ddd-ts-kit/kernel';
4
+ {{/if}}
5
+ {{storage.moduleImport}}
6
+ import { {{personal.names.port}} } from '{{alias.context}}/application/ports/{{personal.names.portKebab}}.port{{alias.ext}}';
7
+ import { {{personal.names.exportPort}} } from '{{alias.context}}/application/ports/{{personal.names.exportPortKebab}}.port{{alias.ext}}';
8
+ import { {{personal.names.adapter}} } from '{{alias.context}}/infrastructure/persistence/{{personal.names.adapterKebab}}.repository{{alias.ext}}';
9
+ import { {{personal.names.exportAdapter}} } from '{{alias.context}}/infrastructure/persistence/{{personal.names.exportAdapterKebab}}.repository{{alias.ext}}';
10
+ @@registrations
11
+ builder.bind({{personal.names.port}}).toClass({{personal.names.adapter}}, [{{storage.token}}{{#if tenant.scoped}}, ExecutionScope{{/if}}]).as('repository');
12
+ builder.bind({{personal.names.exportPort}}).toClass({{personal.names.exportAdapter}}, [{{storage.token}}{{#if tenant.scoped}}, ExecutionScope{{/if}}]).as('repository');
@@ -56,11 +56,27 @@ jobs:
56
56
  steps:
57
57
  - uses: actions/checkout@v7
58
58
  - uses: ./.github/actions/setup
59
+ # The cache of ESLint (`ddd-ts-kit lint` keys it by the content of each file): a pull request restores the one the
60
+ # default branch wrote last for this lockfile and this config, and lints the files that changed since; the default
61
+ # branch and the night restore nothing, lint everything, which also sees a type changed in another file, and write it.
62
+ - name: The cache of ESLint, as the default branch wrote it last
63
+ if: ${{ github.event_name == 'pull_request' }}
64
+ uses: actions/cache/restore@v6
65
+ with:
66
+ path: .eslintcache/
67
+ key: eslint-${{ runner.os }}-${{ hashFiles('package-lock.json', 'eslint.config.mjs', 'ddd-ts-kit.config.json') }}-${{ github.sha }}
68
+ restore-keys: eslint-${{ runner.os }}-${{ hashFiles('package-lock.json', 'eslint.config.mjs', 'ddd-ts-kit.config.json') }}-
59
69
  - run: npm run ci:format
60
70
  - name: Lint (the contexts a pull request does not reach are left to the default branch)
61
71
  env:
62
72
  LINT: ${{ needs.install.outputs.lint }}
63
73
  run: npm run ci:lint -- $LINT
74
+ - name: The cache of ESLint, for the pull requests that follow
75
+ if: ${{ github.event_name != 'pull_request' }}
76
+ uses: actions/cache/save@v6
77
+ with:
78
+ path: .eslintcache/
79
+ key: eslint-${{ runner.os }}-${{ hashFiles('package-lock.json', 'eslint.config.mjs', 'ddd-ts-kit.config.json') }}-${{ github.sha }}
64
80
 
65
81
  architecture:
66
82
  name: Architecture
@@ -201,6 +217,52 @@ jobs:
201
217
  cache-from: type=gha
202
218
  cache-to: type=gha,mode=max
203
219
 
220
+ mutation:
221
+ name: Mutation score of the domain
222
+ needs: install
223
+ # The night only: minutes per hundred files is too long for the loop of a pull request, and nothing of this run is read before a merge.
224
+ if: ${{ github.event_name == 'schedule' }}
225
+ runs-on: ubuntu-26.04
226
+ timeout-minutes: 60
227
+ steps:
228
+ - uses: actions/checkout@v7
229
+ - uses: ./.github/actions/setup
230
+ - name: Stryker on the domain and application layers of every context, each layer held to its "mutation" floor of ddd-ts-kit.config.json
231
+ run: npm run test:mutation
232
+ - uses: actions/upload-artifact@v7
233
+ if: ${{ !cancelled() }}
234
+ with:
235
+ name: mutation
236
+ path: reports/mutation
237
+ if-no-files-found: ignore
238
+ retention-days: 30
239
+
240
+ mutation-changed:
241
+ name: Mutation score of the change
242
+ needs: install
243
+ # A pull request: the report of the last night is reused for what the change leaves alone, and the survivors of the files it touched are listed. A reading, not a gate: the floor is held by the night.
244
+ if: ${{ github.event_name == 'pull_request' }}
245
+ runs-on: ubuntu-26.04
246
+ timeout-minutes: 30
247
+ steps:
248
+ - uses: actions/checkout@v7
249
+ with:
250
+ # The whole history: the files of the change are those since its merge base with the base branch.
251
+ fetch-depth: 0
252
+ - uses: ./.github/actions/setup
253
+ - name: The report of the last night, when there is one
254
+ env:
255
+ GH_TOKEN: ${{ github.token }}
256
+ run: |
257
+ run=$(gh run list --workflow "${{ github.workflow }}" --event schedule --branch "${{ github.event.repository.default_branch }}" --status success --limit 1 --json databaseId --jq '.[0].databaseId')
258
+ if [ -n "$run" ]; then gh run download "$run" --name mutation --dir reports/mutation || echo "The last night kept no report: a full run."; fi
259
+ - name: Stryker on what the change touches, then the survivors of its files
260
+ run: |
261
+ mkdir -p reports/mutation
262
+ base=$(git merge-base "origin/${{ github.base_ref }}" HEAD)
263
+ DDD_TS_KIT_MUTATION_SINCE="$base" npm run --silent test:mutation | tee reports/mutation/changed.txt
264
+ { echo '```'; cat reports/mutation/changed.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
265
+
204
266
  gate:
205
267
  name: gate
206
268
  if: ${{ always() }}
@@ -2,10 +2,17 @@ workflow:
2
2
  auto_cancel:
3
3
  on_new_commit: interruptible
4
4
  rules:
5
+ # A merge request reads the cache of ESLint the default branch wrote; the default branch and the night write it.
5
6
  - if: $CI_PIPELINE_SOURCE == "merge_request_event"
7
+ variables:
8
+ LINT_CACHE_POLICY: pull
6
9
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
10
+ variables:
11
+ LINT_CACHE_POLICY: pull-push
7
12
  # A pipeline schedule (Build > Pipeline schedules, every night on the default branch) runs everything.
8
13
  - if: $CI_PIPELINE_SOURCE == "schedule"
14
+ variables:
15
+ LINT_CACHE_POLICY: pull-push
9
16
 
10
17
  {{#if extras.gitlabInclude}}
11
18
  {{#if extras.gitlabSecurity}}
@@ -136,6 +143,24 @@ lint:
136
143
  extends: .node
137
144
  stage: test
138
145
  needs: [install]
146
+ cache:
147
+ - key:
148
+ files:
149
+ - package-lock.json
150
+ - package.json
151
+ paths:
152
+ - node_modules/
153
+ policy: pull
154
+ # The cache of ESLint (`ddd-ts-kit lint` keys it by the content of each file): a merge request reads the one the
155
+ # default branch wrote last for this lockfile and this config; the default branch and the night lint everything,
156
+ # which also sees a type changed in another file, and write it.
157
+ - key:
158
+ files:
159
+ - package-lock.json
160
+ - eslint.config.mjs
161
+ paths:
162
+ - .eslintcache/
163
+ policy: $LINT_CACHE_POLICY
139
164
  variables:
140
165
  ESLINT_CODE_QUALITY_REPORT: reports/gl-code-quality-eslint.json
141
166
  script:
@@ -177,7 +202,7 @@ unit:
177
202
  script:
178
203
  - if [ "$AFFECTED_SCOPE" = "none" ]; then echo "Only documents changed, no spec to run."; exit 0; fi
179
204
  - export DDD_TS_KIT_AFFECTED="$AFFECTED_CONTEXTS"
180
- - npm run ci:test:unit -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
205
+ - npm run ci:test:unit -- --reporter=default --reporter=junit --reporter=@ddd-ts-kit/testing/budget/vitest --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
181
206
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
182
207
  artifacts:
183
208
  when: always
@@ -196,7 +221,7 @@ integration:
196
221
  - if [ "$AFFECTED_SCOPE" = "none" ]; then echo "Only documents changed, no spec to run."; exit 0; fi
197
222
  - export DDD_TS_KIT_AFFECTED="$AFFECTED_CONTEXTS"
198
223
  - npm run db:migrate
199
- - npm run ci:test:integration -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
224
+ - npm run ci:test:integration -- --reporter=default --reporter=junit --reporter=@ddd-ts-kit/testing/budget/vitest --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
200
225
 
201
226
  e2e:
202
227
  extends: [.node, .postgres, .junit]
@@ -208,6 +233,43 @@ e2e:
208
233
  # The whole application, whatever the contexts a change reaches.
209
234
  - npm run ci:test:e2e -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml
210
235
 
236
+ mutation:
237
+ extends: .node
238
+ stage: test
239
+ needs: [install]
240
+ # The pipeline schedule only (Build > Pipeline schedules, every night on the default branch): too long for a merge request, read by nobody before a merge.
241
+ rules:
242
+ - if: $CI_PIPELINE_SOURCE == "schedule"
243
+ script:
244
+ # Stryker on the domain and application layers of every context, each layer held to its "mutation" floor of ddd-ts-kit.config.json.
245
+ - npm run test:mutation
246
+ artifacts:
247
+ when: always
248
+ expire_in: 30 days
249
+ paths:
250
+ - reports/mutation
251
+
252
+ mutation_changed:
253
+ extends: .node
254
+ stage: test
255
+ needs: [install]
256
+ # A merge request: the report of the last night is reused for what the change leaves alone, and the survivors of the files it touched are listed. A reading, not a gate: the floor is held by the night.
257
+ rules:
258
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
259
+ variables:
260
+ # The whole history: the files of the change are those since its merge base with the target branch.
261
+ GIT_DEPTH: 0
262
+ script:
263
+ - 'curl --silent --fail --location --output night.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/artifacts/$CI_DEFAULT_BRANCH/download?job=mutation" && unzip -q -o night.zip && rm night.zip || echo "The last night kept no report: a full run."'
264
+ - git fetch --quiet origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
265
+ - base=$(git merge-base "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" HEAD)
266
+ - DDD_TS_KIT_MUTATION_SINCE="$base" npm run test:mutation
267
+ artifacts:
268
+ when: always
269
+ expire_in: 7 days
270
+ paths:
271
+ - reports/mutation
272
+
211
273
  build:
212
274
  extends: .node
213
275
  stage: test
@@ -0,0 +1,8 @@
1
+ import base from './jest.config.js';
2
+
3
+ // The specs Stryker runs against each mutant of the domain or of the application: the unit specs, which need no database and answer in milliseconds; the integration specs would pay a database per mutant for nothing a unit spec does not already notice.
4
+ export default {
5
+ ...base,
6
+ testMatch: ['<rootDir>/{{config.sourceRoot}}/**/*.spec.ts'],
7
+ testPathIgnorePatterns: [...base.testPathIgnorePatterns, '/{{config.contextsDir}}/[^/]+/test/integration/'],
8
+ };
@@ -17,11 +17,11 @@
17
17
  "ignoreExportsUsedInFile": true,
18
18
  {{#if refusals.named}}
19
19
  "ignoreIssues": {
20
- "{{config.contextsDir}}/*/domain/errors/codes.ts": ["types"]
20
+ "{{config.contextsDir}}/*/*.codes.ts": ["types"]
21
21
  },
22
22
  {{/if}}
23
23
  "vitest": {
24
- "config": ["vitest.config.ts"{{knip.e2eConfig}}],
24
+ "config": ["vitest.config.ts"{{knip.e2eConfig}}{{knip.mutationConfig}}],
25
25
  "entry": [
26
26
  "{{config.sourceRoot}}/**/*.spec.ts",
27
27
  "{{config.contextsDir}}/*/test/fakes/*.ts",
@@ -15,6 +15,12 @@ pre-commit:
15
15
  - name: architecture
16
16
  glob: 'src/**/*.{ts,mts,cts}'
17
17
  run: npx --no -- ddd-ts-kit check {staged_files}
18
+ - name: behaviour pages
19
+ glob: '**/*.spec.ts'
20
+ # A spec in the commit changes what the tests state: the pages of docs/behaviour/, and nothing else, are
21
+ # regenerated and join the commit, so that docs --check has nothing to say. A worker confined to its context (.ddd-ts-kit/worker.json)
22
+ # leaves them to the trunk, as every shared file.
23
+ run: 'if [ -f .ddd-ts-kit/worker.json ]; then echo "behaviour pages: left to the trunk, as every shared file of a worker."; else npx --no -- ddd-ts-kit docs --behaviour && git add docs/behaviour; fi'
18
24
  - name: commit size
19
25
  run: npx --no -- ddd-ts-kit check --commit-size --staged
20
26
  - name: secrets
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.5.15",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.87.0",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.89.0",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",
@@ -0,0 +1,25 @@
1
+ import { governedMutation } from '@ddd-ts-kit/testing/mutation';
2
+
3
+ export default {
4
+ {{#if tests.vitest}}
5
+ testRunner: 'vitest',
6
+ // The unit specs alone: a mutant of the domain or of the application is noticed by a spec of the domain or of the application, in milliseconds.
7
+ vitest: { configFile: 'vitest.mutation.config.ts' },
8
+ {{/if}}
9
+ {{#if tests.jest}}
10
+ testRunner: 'jest',
11
+ // The specs are ES modules and run under the flag the "test" script passes to Jest: Stryker passes it to the processes it runs Jest in.
12
+ testRunnerNodeArgs: ['--experimental-vm-modules'],
13
+ // The unit specs alone: a mutant of the domain or of the application is noticed by a spec of the domain or of the application, in milliseconds; Jest runs the specs that import the mutated file.
14
+ jest: { projectType: 'custom', configFile: 'jest.mutation.config.js', enableFindRelatedTests: true },
15
+ {{/if}}
16
+ // The compiler is not asked to check each mutant: a mutant the types refuse is one the tests refuse too, for less.
17
+ checkers: [],
18
+ coverageAnalysis: 'perTest',
19
+ reporters: ['clear-text', 'progress', 'json', 'html'],
20
+ jsonReporter: { fileName: 'reports/mutation/mutation.json' },
21
+ htmlReporter: { fileName: 'reports/mutation/index.html' },
22
+ tempDirName: '.stryker-tmp',
23
+ // What is mutated, what is left out and the floor come from "mutation" in ddd-ts-kit.config.json, the reference when it is absent: the floor is written nowhere else.
24
+ ...governedMutation(),
25
+ };
@@ -55,6 +55,8 @@ export default defineConfig(({ mode }) => ({
55
55
  // The integration project has no spec before the first repository or adapter of the project: its run passes until then.
56
56
  passWithNoTests: mode === INTEGRATION_MODE,
57
57
  ...WORKERS,
58
+ // Each spec file is held to the time budget of its level ("budget" in ddd-ts-kit.config.json, the reference when it is absent): the slowest named at the end of the run, a file over its budget fails it.
59
+ reporters: ['default', '@ddd-ts-kit/testing/budget/vitest'],
58
60
  {{#if assembly.discovery}}
59
61
  // Discovery imports the role files of a context itself: inlined, the package loads them through the runner, which compiles them.
60
62
  server: { deps: { inline: ['@ddd-ts-kit/di'] } },
@@ -0,0 +1,29 @@
1
+ {{#if decorators.standard}}
2
+ import { decorators } from '@ddd-ts-kit/testing/vitest';
3
+ {{/if}}
4
+ {{#if decorators.legacy}}
5
+ import { decoratorCoverage } from '@ddd-ts-kit/testing/vitest';
6
+ {{/if}}
7
+ import { defineConfig } from 'vitest/config';
8
+
9
+ // The specs Stryker runs against each mutant of the domain or of the application: the unit specs, which need no database and answer in milliseconds; the integration specs would pay a database per mutant for nothing a unit spec does not already notice.
10
+ export default defineConfig({
11
+ {{#if decorators.standard}}
12
+ // Vitest does not lower standard (TC39) decorators, which every class of a declared context carries: the compiler the project builds with does.
13
+ plugins: [decorators({ compiler: '@typescript/native' })],
14
+ {{/if}}
15
+ {{#if decorators.legacy}}
16
+ // Under `emitDecoratorMetadata` the transform guards every type a decorated class names with a branch no test can take: the statements that apply decorators are kept out of the measure.
17
+ plugins: [decoratorCoverage()],
18
+ {{/if}}
19
+ // An import alias is resolved from the "paths" of tsconfig.json, which name the sources.
20
+ resolve: { tsconfigPaths: true },
21
+ test: {
22
+ include: ['{{config.sourceRoot}}/**/*.spec.ts'],
23
+ exclude: ['{{config.contextsDir}}/*/test/integration/**'],
24
+ {{#if assembly.discovery}}
25
+ // Discovery imports the role files of a context itself: inlined, the package loads them through the runner, which compiles them.
26
+ server: { deps: { inline: ['@ddd-ts-kit/di'] } },
27
+ {{/if}}
28
+ },
29
+ });
@@ -1,6 +1,6 @@
1
1
  import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
2
2
  import { Policy } from '@ddd-ts-kit/kernel/declarations';
3
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
3
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
4
4
 
5
5
  // TODO(domain): give `allows` the aggregate "{{name.words}}" reads as its second parameter, add `appliesTo(subject: unknown): boolean { return subject instanceof <Aggregate>; }`, and decide from the actor, the loaded element and `now`; the handler asks it through `Access.authorize(command.actor, permission, <aggregate>)`, the loaded aggregate named after its concept (`invoice`, never `element`).
6
6
  @Policy({{context.camel}}Permissions['{{access.permission}}'], { name: '{{context.kebab}}.{{name.kebab}}' })
@@ -1,6 +1,6 @@
1
1
  import { definePolicy } from '@ddd-ts-kit/auth';
2
2
  import { isAuthenticated } from '@ddd-ts-kit/kernel';
3
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
3
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
4
4
 
5
5
  // TODO(domain): replace `unknown` by the aggregate "{{name.words}}" reads, add `appliesTo: (subject): subject is <Aggregate> => subject instanceof <Aggregate>`, and decide from the actor, the loaded element and `now`; the handler asks it through `Access.authorize(command.actor, permission, <aggregate>)`, the loaded aggregate named after its concept (`invoice`, never `element`).
6
6
  export const {{name.camel}} = definePolicy<unknown>({
@@ -2,7 +2,7 @@ import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
2
2
  import { Policy } from '@ddd-ts-kit/kernel/declarations';
3
3
  import { OrganisationRights } from '{{alias.context}}/domain/value-objects/organisation-rights.vo{{alias.ext}}';
4
4
  import { MemberRight } from '{{alias.context}}/domain/vocabularies/member-right.vocabulary{{alias.ext}}';
5
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
5
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
6
6
 
7
7
  /** An account changes the roles of an organisation where it manages the members. */
8
8
  @Policy({{context.camel}}Permissions['member.change-role'], { name: '{{context.kebab}}.change-member-roles' })
@@ -2,7 +2,7 @@ import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
2
2
  import { Policy } from '@ddd-ts-kit/kernel/declarations';
3
3
  import { OrganisationRights } from '{{alias.context}}/domain/value-objects/organisation-rights.vo{{alias.ext}}';
4
4
  import { MemberRight } from '{{alias.context}}/domain/vocabularies/member-right.vocabulary{{alias.ext}}';
5
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
5
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
6
6
 
7
7
  /** An account lends rights in an organisation where its role lets it delegate. */
8
8
  @Policy({{context.camel}}Permissions['delegation.grant'], { name: '{{context.kebab}}.grant-delegations' })
@@ -2,7 +2,7 @@ import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
2
2
  import { Policy } from '@ddd-ts-kit/kernel/declarations';
3
3
  import { OrganisationRights } from '{{alias.context}}/domain/value-objects/organisation-rights.vo{{alias.ext}}';
4
4
  import { MemberRight } from '{{alias.context}}/domain/vocabularies/member-right.vocabulary{{alias.ext}}';
5
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
5
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
6
6
 
7
7
  /** An account invites to an organisation when its role, or a delegation, lets it invite there. */
8
8
  @Policy({{context.camel}}Permissions['member.invite'], { name: '{{context.kebab}}.invite-members' })
@@ -2,7 +2,7 @@ import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
2
2
  import { Policy } from '@ddd-ts-kit/kernel/declarations';
3
3
  import { OrganisationRights } from '{{alias.context}}/domain/value-objects/organisation-rights.vo{{alias.ext}}';
4
4
  import { MemberRight } from '{{alias.context}}/domain/vocabularies/member-right.vocabulary{{alias.ext}}';
5
- import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
5
+ import { {{context.camel}}Permissions } from '{{alias.context}}/{{context.kebab}}.permissions{{alias.ext}}';
6
6
 
7
7
  /** An account searches the members of an organisation it belongs to. */
8
8
  @Policy({{context.camel}}Permissions['member.search'], { name: '{{context.kebab}}.read-members' })