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
package/CHANGELOG.md CHANGED
@@ -4,6 +4,622 @@ What each version changes for someone who uses the kit. The packages of `package
4
4
  together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
5
5
  list the pull requests behind it.
6
6
 
7
+ ## 0.89.0
8
+
9
+ **`clean/one-export-per-file` runs under the JS plugin API of Oxlint.** The rule walked the
10
+ tree of a file through a node a parser may leave null (the body of a declaration without one),
11
+ which the parser of ESLint never does and the one of Oxlint does: under Oxlint the rule stopped
12
+ on 2,494 of the files of the kit with `Cannot convert undefined or null to object`. The walker
13
+ now walks nothing for what is not a node. The plugin as a whole runs under
14
+ `oxlint --type-aware` with `jsPlugins` set to `@ddd-ts-kit/eslint-plugin`, which stays a trial:
15
+ the API is alpha, and `no-redeclare` of Oxlint contradicts the compiler on a class and an
16
+ interface of one name.
17
+
18
+ **`clean/stepdown` reports on a JavaScript file too.** The rule kept the references of a function
19
+ that the scope manager of typescript-eslint marks as values; the scope manager of the default
20
+ parser of ESLint, which lints a `.mjs`, `.cjs` or `.js` file, marks nothing, so on such a file the
21
+ rule found no caller and reported nothing. A reference the parser does not qualify is a value
22
+ now. The preset of the kit applies the rule to TypeScript sources only; a project that applies it
23
+ to its scripts as well sees what it reports there from this version on.
24
+
25
+ **`ddd-ts-kit lint` keeps the cache of ESLint, and the pipeline of a project restores it.** The
26
+ command lints with the cache of ESLint keyed by the content of each file (`.eslintcache/`, ignored
27
+ by git): a second run on a tree that did not change lints the files that changed since, in a
28
+ second or two instead of the whole project. The cache keys on the files and the config, not on the
29
+ rules as installed, so the command drops it when the lockfile, `eslint.config.mjs` or
30
+ `ddd-ts-kit.config.json` changed since it was written. The lint job of the pipeline `init` writes
31
+ restores, on a pull request or a merge request, the cache the default branch wrote last for the
32
+ same lockfile and config, and the default branch and the night lint everything and write it: a
33
+ type changed in another file is seen there. `ddd-ts-kit lint --no-cache` lints every file again.
34
+
35
+ To move, by hand, not with `init --force`, which rewrites far more than the pipeline: add
36
+ `.eslintcache/` to `.gitignore`; in `.github/workflows/ci.yml`, give the lint job the two steps of
37
+ the template (`actions/cache/restore` of `.eslintcache/` before the lint, on a pull request only,
38
+ keyed by the lockfile, `eslint.config.mjs` and `ddd-ts-kit.config.json` with a prefix fallback;
39
+ `actions/cache/save` after it, on the default branch and the night only), as
40
+ `node_modules/ddd-ts-kit/templates/pipeline/github/workflows/ci.yml.tpl` writes them; in
41
+ `.gitlab-ci.yml`, add the second `cache:` entry of the lint job (`.eslintcache/`, keyed by the
42
+ lockfile and `eslint.config.mjs`, `policy: $LINT_CACHE_POLICY`) and the `LINT_CACHE_POLICY` variable
43
+ of each workflow rule (`pull` on a merge request, `pull-push` on the default branch and the night),
44
+ as `templates/pipeline/gitlab/gitlab-ci.yml.tpl` writes them.
45
+
46
+ **A proposal page says what privacy by design asks of the kit beyond event sourcing, and the
47
+ pull requests that build it.** `docs/proposals/privacy-by-design.md` verifies what the kit
48
+ erases today (the personal values of stored events, by crypto-shredding, with a dated audit
49
+ entry) and what nothing of the kit erases, exports, retains or inventories: the aggregates kept
50
+ as rows on the four ORMs, the read models, the copies a person leaves in the contexts that
51
+ consumed its events, the masks of the audit trail. It designs one declaration of the personal
52
+ fields, read by ports with an adapter per ORM, by generators, by a generated register and by
53
+ `privacy/*` rules, nothing of it mandatory for a project without personal data; cuts the work
54
+ into pull requests in merge order, the example first; and says what a tool can never guarantee,
55
+ with the wording that follows for the README. The glossary of the translations gains the terms
56
+ of the page. Nothing of the code changes.
57
+
58
+ **The scheduling example erases a person from every copy the contexts keep, not from the sealed
59
+ words alone.** `npm run erase:patient` destroyed the key the words of a patient were sealed with
60
+ and rebuilt the projections, and left the person named and reachable in the tables: the person of
61
+ `identity` (name and address), the contact of `notification`, the notes the staff wrote on their
62
+ appointments, the reasons of their cancellations, the documents attached to those appointments and
63
+ the name the practitioner directory of `scheduling` copied. The erasure now reaches each of them,
64
+ network by network (`NETWORKS`), after the key and before the rebuilds: `identity` forgets the
65
+ person (`PersonRepository.erase`), `notification` deletes the contact, `scheduling` replaces the
66
+ notes and the reasons by `[erased]` and deletes the documents from the file storage
67
+ (`KnexPatientErasure`). The report of the script counts the rows each copy reached; a copy that
68
+ fails does not stop the others and running the script again completes the erasure; a run again
69
+ once nothing is left is refused and recorded. The README of the example says what an erasure does
70
+ not reach: the events published before it, the backups, the opaque ids of the audit trail. The
71
+ first part of the proposal [privacy by design](../docs/proposals/privacy-by-design.md) built; the
72
+ hand-written steps are the specification of the erasure port the next parts bring to the kit.
73
+
74
+ **A proposal specifies a second example, spend management on the most popular stack.** `docs/proposals/spend-management-example.md` runs the stack NestJS, class-validator, Jest, Prisma, Kafka, Redis, S3, shared-table tenancy, Keycloak, ABAC, Winston, Scalar through `init --dry-run` and lists what the kit refuses today on it: the queue and the processes on `--di nest`, the shared-table tenancy, the jobs table and the SQL audit trail on Prisma, the identity preset on Nest, Prisma and the explicit style. It specifies those fixes first, then the example (seven bounded contexts on expense reports, corporate cards, approvals, budgets, reimbursements and the ledger), then what the repository gains; MySQL is left out with the list of what it would take. Nothing is built by this change.
75
+
76
+ **The kernel declares the personal fields of a table and erases a data subject end to end: the
77
+ key, every copy in every tenant, the rebuilds.** `personalFields(table, { subject, fields,
78
+ erasure, files? })` says, next to the mapper, which columns of a table are personal, whose they
79
+ are and how the rows of a subject are erased, `row` deleted or `pseudonymise` read as `[erased]`,
80
+ the files they name deleted from the storage. Two ports a context extends and names, as it extends
81
+ `Repository`: `PersonalDataErasure` (`erase(subject)` answers the rows reached, none the second
82
+ time) and `PersonalDataExport` (`exportOf(subject)` answers one `PersonalDataRecord` per row,
83
+ each personal column as plain data). `eraseDataSubject`, lifted from the scheduling example,
84
+ destroys the key, erases every copy in every tenant (`inEachTenant` runs a copy in the context of
85
+ the work given each tenant, since a write of tenant data is never widened), rebuilds the
86
+ projections fed by the store, and reports `{ erased, copies, rebuilt }`; a copy that fails does
87
+ not stop the others, and running the erasure again completes it; a subject that is not an opaque
88
+ identifier is refused before any key is touched, and an id nothing is left of is refused before
89
+ the rebuilds; `keys` may be left out, as in a project whose aggregates are rows and seal nothing:
90
+ the copies alone are erased, and the report says no key was destroyed. `InMemoryPersonalData` implements both ports over one declaration, and
91
+ `personalDataErasureContract` and `personalDataExportContract` of `@ddd-ts-kit/testing` hold it
92
+ and every adapter to the same behaviour. The adapters of the persistence packages, the platform
93
+ folder `init` writes and the register come with the next parts of
94
+ [privacy by design](../docs/proposals/privacy-by-design.md). The persistence skill says it.
95
+
96
+ **The audit trail masks a personal value under the key of the person it belongs to, so that
97
+ erasing the person makes its masks meaningless.** `subjectMasker(keys)` of `@ddd-ts-kit/audit` is
98
+ an `AuditMasker` over the `SubjectKeyStore` of the kernel, the same keys that seal the personal
99
+ values of the stored events: each mask is an HMAC under a key derived from the key of the data
100
+ subject (HKDF, labelled for the trail), written `<keyId>:<hex>`; `SubjectKeyStore.erase` destroys
101
+ the key, and the masks made with it become tokens nobody can recompute while the entries and the
102
+ chain stay as they are. A masked field says whose its value is, `masked('patientEmail', { subject:
103
+ 'patientId' })` or `subjectOf: (command) => ...`; `auditMiddleware` refuses, at wiring time, a
104
+ masked field that names none when the masker is keyed per data subject
105
+ (`MissingDataSubjectError`), and the masker refuses a subject that is not an opaque identifier
106
+ before any key is created (`MaskingSubjectNotAnIdError`): a name or an email named as the subject
107
+ would be written into the key store in clear. `hmacMasker` under one secret stays as it was.
108
+
109
+ What a masker or a declaration written by hand sees: `MaskingSubject` gains `dataSubject`, set
110
+ only for a masked field declared with `subject` or `subjectOf`; `AuditProjection` gains
111
+ `subjects`, the data subject of each masked value by field, which `auditedFields` fills and a
112
+ projection of your own may fill; `AuditedMessage` gains `subjectless`, optional, the masked fields
113
+ that name no subject, which `auditedFields` lists and a declaration of your own may leave out;
114
+ `AuditMasker` gains `requiresDataSubject`, optional, which a masker keyed per person sets so that
115
+ the middleware checks the declarations at wiring time. Nothing existing changes shape or meaning.
116
+ Part 2 of [privacy by design](../docs/proposals/privacy-by-design.md).
117
+
118
+ **`init` writes `src/platform/privacy/` with `--privacy on`, the default with an ORM, and wires the
119
+ event store with `--event-sourcing on`: a generated project erases and exports a data subject from
120
+ its first minute, and pays no table it did not ask for.** Two choices of the stack, recorded as
121
+ `stack.privacy` and `stack.eventSourcing`, each changed later by `init --force`.
122
+
123
+ `--privacy on` writes `src/platform/privacy/`: a context that erases or exports what it keeps of a
124
+ person lists its port in `data-subject-copies.ts` or `data-subject-exports.ts`; `run-erasure.ts`
125
+ opens an execution context of origin `cli` with the operator as actor and runs `eraseDataSubject`
126
+ of the kernel over the copies, in every tenant with `--tenancy shared-table` (`inEachTenant`);
127
+ `run-export.ts` gathers every record. Two scripts answer the requests: `npm run privacy:erase --
128
+ <subject-id> [--operator <who-asks>]` and `npm run privacy:export -- <subject-id>`, on the sources
129
+ with the variables of `.env`, the tenants named by `TENANTS`. What they cannot reach is said where
130
+ they are written: backups, logs, exports and a copy no context declared. No HTTP command erases yet.
131
+ A project without personal data takes `--privacy off` and gets none of it.
132
+
133
+ `--event-sourcing on`, off unless asked, since keeping an aggregate as its events is a choice made
134
+ per aggregate: `Persistence` gains `eventSourcing` (`create<Orm>EventSourcing` in the `event_store`
135
+ schema, whose five tables the schema file of Knex, Drizzle, Prisma and TypeORM then declares; the
136
+ in-memory stores without a database), and `src/platform/event-sourcing/` holds the `SubjectKeyStore`
137
+ of that store, wrapped by `auditedSubjectKeys` of `@ddd-ts-kit/audit` when the audit trail is on, so
138
+ that every erasure leaves a dated entry, and the `PersonalDataCipher` over it; `event-sourcing.module.ts`
139
+ binds `EventStore`, `SnapshotStore`, `CheckpointStore`, `SubjectKeyStore` and `PersonalDataCipher`
140
+ on tsyringe, the hand-wired `Platform` carries them as `platform.eventSourcing`, and
141
+ `platform-test.module.ts` binds the in-memory stores, so a handler spec of an event-sourced
142
+ aggregate needs no fake. With both choices on, the erasure destroys the key first. The event store
143
+ of the kit runs on PostgreSQL through the four ORM packages: `--event-sourcing on` is refused with
144
+ `--orm custom`, with what to bind instead, and `generate aggregate --event-sourced` is refused
145
+ while the project has no event store, with the `init --force --event-sourcing on` to run. The
146
+ architecture reference (section 2), the CLI README, the config reference, the event sourcing page,
147
+ the persistence skill and the stack criteria say it.
148
+
149
+ To move: a project generated before this version keeps its platform as it is; `npx ddd-ts-kit init
150
+ --force --privacy on` writes the privacy folder and the two scripts, `npx ddd-ts-kit init --force
151
+ --event-sourcing on` the event store, then a migration creates the tables of the `event_store`
152
+ schema (`npm run db:generate event-store`).
153
+
154
+ **The erasure of a data subject from the tables of a context exists on the four ORMs, from the
155
+ `personalFields` declarations.** `KnexPersonalDataErasure`, `DrizzlePersonalDataErasure`,
156
+ `PrismaPersonalDataErasure` and `TypeOrmPersonalDataErasure` implement the `PersonalDataErasure`
157
+ port of the kernel over the unit of work of their package: the files the rows name are deleted
158
+ from the storage first, then the rows of the subject are deleted (`row`) or pseudonymised
159
+ (`pseudonymise`: a text column reads `[erased]`, a column of any other type nothing, a file column
160
+ nothing), and the rows reached are counted, none the second time. With the `tenant` option every
161
+ statement is confined to the tenant of the work and never widened by an elevation. A subject that
162
+ is not an opaque identifier is refused before any statement; a declaration that names file columns
163
+ without a file storage is refused when the adapter is built, and one that names a column or a
164
+ property the table does not have is refused before any file or row is touched. The types of the columns decide how a
165
+ column is pseudonymised (`pseudonymisedValueOf` of the kernel, the one rule the four follow), read
166
+ from the database on Knex and Prisma, from the table definition on Drizzle, from the entity on
167
+ TypeORM: a personal column that is not a text has to accept null, and a declaration that would
168
+ pseudonymise one that does not is refused before any file or row is touched
169
+ (`NotNullablePersonalColumnError`), so that an erasure never deletes the files of a person and
170
+ leaves their rows in clear. The four pass
171
+ `personalDataErasureContract` of `@ddd-ts-kit/testing`, on PGlite and PostgreSQL. Part 3 of
172
+ [privacy by design](../docs/proposals/privacy-by-design.md); the generator writes the declarations
173
+ in part 5, and the example adopts the adapter in part 11.
174
+
175
+ **The background jobs and the process managers run on a platform wired by hand: NestJS and `--di manual` gain `--queue database|redis`, `generate background-job` and `generate process`.** The platform of a project whose contexts are wired in a module file gains `src/platform/jobs/create-background-work.ts`, which builds the queue a use case enqueues through (`platform.jobQueue`), the worker that consumes it (`platform.backgroundJobs`) and the runner of the process managers (`platform.processes`) on the store `stack.queue` names: the jobs table of Knex or Drizzle, the server of the cache with Redis, the memory of the process otherwise, each job traced and its failures reported as on tsyringe. `init --queue database` and `--queue redis` are accepted with every container (the default stays `database` on Knex or Drizzle with tsyringe, `memory` otherwise), the application starts and stops the worker with its jobs, and `generate background-job` and `generate process` register the job in `<context>.module.ts` (`platform.backgroundJobs.register(..)`) with a spec built on the test buses of `@ddd-ts-kit/testing`, where they were refused before. The generated matrix runs background work on every stack, Nest with the jobs in the database and on Redis among them.
176
+
177
+ To move: a project on Nest or wired by hand that initialised before this version keeps its queue in memory; `init --force --queue database` (Knex or Drizzle) or `--queue redis` (with `--cache redis`) writes `create-background-work.ts` and the stores, then `generate background-job` works as on tsyringe. `PlatformOptions` gains `queues` (concurrency per queue, polling interval, grace period of the worker).
178
+
179
+ **The shared-table tenancy reaches Prisma and TypeORM: `init --tenancy shared-table` and `generate repository --tenant-scoped` work on the four ORMs, and `tenancy/scoped-statement` judges their adapters.** `@ddd-ts-kit/prisma` and `@ddd-ts-kit/typeorm` gain `tenantWhere(scope)`, spread into the where of every read (the tenant of the work, or the tenants an elevation of platform staff reaches), and `ownTenantWhere(scope)`, spread into the where of every update and delete (the one tenant of the work, which an elevation never widens); an inserted row spreads `tenantScopeOf`. Their outbox keeps the tenant of each event so that its consumers run in that tenant: `tenant: true` on `PrismaOutboxStore`, with the `tenantId` field the shipped fragment leaves commented out, and `outboxEntity({ tenant: true })` on TypeORM. Their read model stores take the `tenant` option of the Knex and Drizzle ones: every row written in the tenant of the work, every read, search and write confined to it, the copy of a rebuild included. Both repositories pass `tenantIsolationContract` of `@ddd-ts-kit/testing`, both outboxes the outbox contract with the tenant. `init` accepts `--tenancy shared-table` with `--orm prisma` and `--orm typeorm`: the generated repositories read with `findFirst` or `findOneBy` and `tenantWhere`, write with `ownTenantWhere`, name the tenant on the insert, declare `tenant_id` and an index that starts with it (the Prisma model, `tenantColumn()` on TypeORM), and the generated outbox keeps the tenant. The rule `tenancy/scoped-statement` reads a Prisma statement on the client (a read without `tenantWhere`, a write without `ownTenantWhere`, a create without `tenantScopeOf`, `findUnique` and `upsert`, raw SQL, the client held in a variable) and a TypeORM statement on the manager (the same, `save` and `upsert`, a query builder without the condition, a row handed to `insertIgnoringConflict` that names no tenant, `query`), and a read model store of the four ORMs built without its `tenant`. The generated matrix gains a Prisma and a TypeORM stack on shared tables.
180
+
181
+ To move: a Prisma or TypeORM project that confined its statements by hand with `tenantScopeOf` keeps working; `tenantWhere` in the where of its reads lets an elevation of platform staff read across tenants, and the rule asks for it once the project records `"stack.tenancy": "shared-table"`. A multi-tenant project on Prisma adds `tenantId String? @map("tenant_id")` to its outbox model, migrates, and gives `PrismaOutboxStore` `tenant: true`; on TypeORM it builds its outbox with `outboxEntity({ schema, tenant: true })` and generates the migration that adds the column.
182
+
183
+ **`generate repository --personal <column>,...` declares what a table keeps of a person, and writes the
184
+ erasure of its context: one command, and `npm run privacy:erase` reaches the new copy.** The named
185
+ columns join the storage and the row type of the aggregate as nullable text (the mapper writes them
186
+ empty until the aggregate carries them), and `<aggregate>.personal-fields.ts` declares them next to
187
+ the mapper with `personalFields` of the kernel: the subject column, `id` unless `--subject` names the
188
+ column that holds the id of the person, the fields, and `pseudonymise` unless `--erasure row` asks for
189
+ the row to be deleted; the declaration is spelled as the erasure of the ORM reads it, SQL names on
190
+ Knex and Prisma, properties on Drizzle and TypeORM. The first table of a context that declares
191
+ personal data brings the erasure of the context: the port
192
+ `application/ports/<context>-personal-data-erasure.port.ts` (`extends PersonalDataErasure`), the
193
+ adapter `<orm>-<context>-personal-data-erasure.repository.ts` over `<Orm>PersonalDataErasure` of the
194
+ ORM package (confined to the tenant of the work on a tenant-scoped repository), its fake, a spec that
195
+ saves two people through the repository and proves the erasure on the test database, the binding
196
+ where the context binds its adapters (the decorator in the declared style, the module file otherwise,
197
+ the factory of the hand-wired platform wrapped like any other adapter) and its line in
198
+ `src/platform/privacy/data-subject-copies.ts`. A second table of the same context joins the
199
+ declarations of that adapter. `*.personal-fields.ts` is a file of `infrastructure/persistence/` the
200
+ `naming/suffix` rule knows. Refused before anything is written: a project whose `stack.privacy` is
201
+ off (`init --force --privacy on`), `--orm none` or `custom` (no erasure adapter of the kit reads the
202
+ declaration), a column that is not one, a column the table keeps for itself, a subject listed as
203
+ personal, a mode that does not exist, `--subject` or `--erasure` without `--personal`. The CLI README,
204
+ the scaffold and persistence skills, the architecture reference and the proposal say it; a projection
205
+ keeps its rows in a read model store, not in a table of its own, so its declaration waits for the
206
+ register.
207
+
208
+ Proven end to end on generated projects: through the composed application (the container of
209
+ tsyringe, the platform wired by hand under Nest), two contexts and three tables, one person erased
210
+ from all of them in one run, in every tenant of a multi-tenant project or in the tenants given, the
211
+ key of the event store first when the project has one. That run uncovered a fault of the Knex erasure
212
+ adapter the direct tests could not see: bound in an application, every method of an adapter is
213
+ wrapped by tracing and by the aspects, and a helper that answered a query builder was awaited and its
214
+ chain broken; the helper is a function now, and the Knex spec runs the adapter wrapped the way the
215
+ platform binds it. `init --force`, which rewrites `data-subject-copies.ts`, lists the erasure of each
216
+ context again, as the port or as the factory of the hand-wired platform. The new concept page
217
+ [Personal data in a generated project](../docs/concepts/personal-data.md) draws the erasure end to
218
+ end, what stays out of reach and what the tool does not decide, in both languages.
219
+
220
+ **Mutation testing runs on a project of the kit, with Stryker 10.1.1 and its Vitest runner.** The
221
+ documentation said it did not: Stryker 10.0 executed no test per mutant under Vitest 5. Measured
222
+ on 2026-10-24 on the example application, 10.1.1 runs the tests per mutant and kills 1347 of the
223
+ 1441 mutants of the domain layer of its four contexts in 8 minutes, a score of 94.5%; the
224
+ pipeline README holds the measure, the configuration to run it by hand (no checker, the unit
225
+ specs alone, the domain layer as `mutate`) and what shipping it as a scheduled job with a floor
226
+ per context would take. The kit ships no gate yet.
227
+
228
+ **The right of access and to portability comes built in: `KnexPersonalDataExport`,
229
+ `DrizzlePersonalDataExport`, `PrismaPersonalDataExport` and `TypeOrmPersonalDataExport` read the same
230
+ `personalFields` declarations as the erasure, `exportDataSubject` of the kernel gathers every export
231
+ into one dated document, `auditedPersonalDataExport` of the audit package leaves the entry of each
232
+ handover, and `generate repository --personal` writes the export of a context beside its erasure.**
233
+ Each adapter answers one `PersonalDataRecord` per row about the subject in every declared table, under
234
+ `<name>.<table>`, with the personal columns and the keys of the files as plain data, no other column
235
+ and nothing of anyone else; the same `tenant` option confines every statement to the tenant of the
236
+ work, a subject that is not an opaque identifier is refused before any statement, and each passes
237
+ `personalDataExportContract`, whose `source` now reads the name of the exporter alone or followed by
238
+ the table. `exportDataSubject(subject, { exports, inEveryTenant, clock, isKnown })` answers a
239
+ `PersonalDataExportDocument`: `format` (`ddd-ts-kit/personal-data-export@1`), `subject`, `exportedAt`,
240
+ `records`; the exports run in the order listed and one that fails stops the gathering, a mistyped id
241
+ is refused when `isKnown` denies it rather than answered with an empty document, and
242
+ `recordsInEachTenant(scope, tenants)` reaches every tenant as `inEachTenant` does for an erasure
243
+ (both over `eachTenant`). `auditedPersonalDataExport(port, trail, { scope, clock, ids })` wraps a
244
+ port so that every `exportOf` writes an entry of category `data-access` and action
245
+ `personal-data:export` (`PERSONAL_DATA_EXPORT_ACTION`), with the subject as resource, the context,
246
+ the number of records and never the values, before the records are handed over: when the entry
247
+ cannot be written, nothing is handed over. In a generated project, `src/platform/privacy/run-export.ts`
248
+ runs `exportDataSubject` over the exports, each wrapped when the trail is on, and
249
+ `scripts/privacy-export.ts` prints the document as JSON; `generate repository <ctx> <Aggregate>
250
+ --personal <column>,...` writes, once per context, the export port (`extends PersonalDataExport`),
251
+ the adapter over `<Orm>PersonalDataExport`, its fake and its line in `data-subject-exports.ts`, bound
252
+ where the context binds its adapters, and one spec `test/integration/<context>-personal-data.spec.ts`
253
+ proves the erasure and the export; a second table joins the declarations of both adapters, and
254
+ `init --force` lists the exports again. The concept page draws the export end to end with its
255
+ diagram, in both languages, and the kernel, audit, ORM and CLI READMEs, the audit trail page, the
256
+ proposal and the skills say it.
257
+
258
+ **Mutation testing of the domain layer runs every night, each context held to a floor.** `init`
259
+ writes `stryker.config.mjs`, which spreads `governedMutation()` of `@ddd-ts-kit/testing/mutation`:
260
+ the domain layer of every context mutated, at its level and in the modules of its model, the
261
+ texts of refusals left out by an ignorer the kit ships, since a refusal is asserted by its code and
262
+ never by its text, every other string measured, the static mutants ignored, those of code that runs
263
+ once when the module loads, the floor as
264
+ `thresholds`; and `vitest.mutation.config.ts`, the unit specs alone. `npm run test:mutation` runs
265
+ Stryker, then `ddd-ts-kit mutation`, a new command that reads `reports/mutation/mutation.json` and
266
+ holds the domain of each context to the `mutation` floor of `ddd-ts-kit.config.json`, 80 by the
267
+ reference (a lower floor is a recorded deviation, `"what": "mutation.domain"`), and exits 1 under
268
+ it; the ignored mutants of each context are shown beside its score, since a rule written as a
269
+ declaration is never mutated and its test is its only proof. The pipelines of GitHub and GitLab get a
270
+ `mutation` job that runs it when the schedule fires, never on a pull or merge request, and keeps
271
+ the report as an artifact. A new rule, `test/mutation-governed`, refuses a `mutate`,
272
+ `mutator`, `ignorers`, `ignoreStatic` or `thresholds` written by hand in a Stryker config, and a
273
+ Stryker config that does not read the kit. The example application and the pipeline of the kit run
274
+ the same job. On both runners: a project on Jest gets `jest.mutation.config.js` in place of the
275
+ Vitest one, and its Stryker config passes the ES modules flag to the processes that run the specs.
276
+
277
+ To move: `npm i -D @stryker-mutator/core @stryker-mutator/vitest-runner` (`jest-runner` on Jest),
278
+ copy `stryker.config.mjs` and `vitest.mutation.config.ts` or `jest.mutation.config.js` from a
279
+ freshly initialised project (or run `init --force` on a copy and take the two files and the
280
+ `test:mutation` script), add the
281
+ `mutation` job to your pipeline from `pipeline/github/workflows/ci.yml` or
282
+ `pipeline/gitlab/.gitlab-ci.yml`, list `vitest.mutation.config.ts` under `vitest.config` of
283
+ `knip.json`, and add `.stryker-tmp/` and `/reports/mutation/` to `.gitignore`. Run
284
+ `npm run test:mutation` once: a context under 80 names the rules its tests do not state.
285
+
286
+ **Six rules of `@ddd-ts-kit/eslint-plugin` hold the shape of a test.** The testing skill asked
287
+ for it and nothing checked it: a test is named after the rule it proves, holds no logic, asserts an
288
+ outcome, asserts a refusal by its code, never by a snapshot, and every test runs. Each is a rule
289
+ of the architecture reference now, on every test file of the project (`*.spec.ts`, `*.test.ts`,
290
+ the `test/` of a context), read by ESLint alone: `test/no-only-no-skip` (no `.only`, `.skip`, `fit`,
291
+ `xit`, `xdescribe`, no `.skipIf` or `.runIf` on a constant), `test/title-states-a-rule` (the title of an `it`
292
+ in lower case, what the subject does, after the rows and the criterion it cites, never `should`,
293
+ `test`, `works` nor a method or a class; a `describe` named after the unit),
294
+ `test/no-logic` (no `if`, `switch`, ternary, loop or `try` in a test), `test/assertion-present`
295
+ (an `expect`, an `expect...` or `assert...` helper, or `thenEvents`, `thenError`, `thenState` in
296
+ every test; `it('title')` without a body written `it.todo`), `test/refusal-by-code` (`toThrow`
297
+ with a message, a regular expression, a class or nothing reported in the specs of the model and of
298
+ the application, not in those of the adapters and of the platform; `thenError`, `expectRefusal`,
299
+ `rejects.toMatchObject({ code })` and `expectProblem` instead, and `rejects.toBe(outage)` for a
300
+ failure the test injected) and
301
+ `test/no-snapshot`. `ddd-ts-kit rules` lists them as checked by the plugin, `ddd-ts-kit explain`
302
+ explains each, the config sets their severity under `rules`. The `it.todo` left in a spec was
303
+ already a marker `ddd-ts-kit todo` lists and `story --gate close` refuses while it belongs to the
304
+ story: the testing strategy and the skill now say so. The example application and the templates
305
+ follow the six rules; the rules of the agents on tests (`.claude/rules/tests.md`,
306
+ `.github/instructions/tests.instructions.md`) name them.
307
+
308
+ To move: run `npm run lint`. `test/no-only-no-skip` and `test/no-snapshot` are errors, as nothing
309
+ legitimate trips them; the four rules that read what a test says, `test/title-states-a-rule`,
310
+ `test/no-logic`, `test/assertion-present` and `test/refusal-by-code`, are warnings until 0.90.0,
311
+ listed by `ddd-ts-kit lint` after its report without failing it. Rename a title that says
312
+ `should` or names a method, move a loop to an `it.each` and a decision to a builder or a fake,
313
+ replace a `toThrow('message')` by the code of the refusal, and write `it.todo` where a test has
314
+ no body. A project that wants none of a rule sets it to `off` under `rules` of
315
+ `ddd-ts-kit.config.json`.
316
+
317
+ **A pull request gets a reading of its mutation score, the night keeps the whole measure.** The
318
+ pipelines of GitHub and GitLab get a `mutation-changed` job on a pull or merge request: it reuses
319
+ the report of the last night for what the change leaves alone (Stryker's incremental mode, turned
320
+ on by `governedMutation()` when `DDD_TS_KIT_MUTATION_SINCE` names the merge base of the change,
321
+ the results kept in `reports/mutation/incremental.json` beside the report), runs everything again
322
+ when the change touches code the tests lean on and Stryker does not diff (a fake, a builder, a
323
+ world, the platform, a dependency), and lists the survivors of the files the change touched:
324
+ `ddd-ts-kit mutation` reads the same variable (`--changed <ref>` says it by hand) and exits 0
325
+ whatever the scores, a reading and never a gate, so that `npm run test:mutation` is the one script
326
+ of the night and of a pull request. `ddd-ts-kit mutation --survivors` lists every survivor of the
327
+ report, where, what mutator and what the code became. `test/mutation-governed` also refuses `incremental` and `force` written by
328
+ hand.
329
+
330
+ To move: add the `mutation-changed` job to your pipeline from `pipeline/github/workflows/ci.yml` or
331
+ `pipeline/gitlab/.gitlab-ci.yml`; nothing else changes, the Stryker config spreads
332
+ `governedMutation()` already.
333
+
334
+ **The invariants of a value object are stated as properties, with fast-check.** `fast-check` joins
335
+ the development dependencies with the first property (`npm i -D fast-check`, under Vitest as under
336
+ Jest: a project without a property carries no dead dependency); `fc.assert(fc.property(..))` is an
337
+ assertion for `test/assertion-present`; and the spec `generate value-object` writes ends with a
338
+ planned rule, `keeps its invariants for any value a generator can produce, as a property`, to remind
339
+ of it. A property states a law of the model once and checks it on generated values, the failing one
340
+ printed with its seed and shrunk to the smallest: two ranges overlap in both directions or in none,
341
+ a slot is held at least until it ends, a parse then a format gives the value back. The example
342
+ states four on its ranges and slots. A property is for a law, an invariant, a symmetry, a round trip,
343
+ an idempotence; the orchestration of a use case is stated by its scenarios. The testing skill and
344
+ the testing strategy say when and how.
345
+
346
+ To move: `npm i -D fast-check`, then state the first law a value object of yours holds for every
347
+ value.
348
+
349
+ **An erasure now reaches beyond the database the platform holds: `privacy:erase` announces
350
+ `privacy.data-subject.erased` through the outbox once every copy is erased, `generate
351
+ erasure-handler <context>` writes the idempotent handler of a context that erases its own copy, and
352
+ an integration event says which fields of its payload are personal, and whose.** The event is
353
+ `dataSubjectErasedV1` of `@ddd-ts-kit/kernel`, version 1, `{ subjectId, erasedAt }`:
354
+ the id of the person and nobody else, the operator staying in the audit trail that the correlation id
355
+ of the event leads to, a name or an email refused at `create` (`InvalidDataSubjectErasedError`). It lives
356
+ in the kernel because the application layer of every context handles it, and it is shaped as a
357
+ definition of `@ddd-ts-kit/events`, so that the registry, the catalog, AsyncAPI, `on`, `consume`,
358
+ `@IntegrationEventHandler` and the container take it as any other. A generated project with
359
+ `--privacy on` publishes it at the end of `runErasure`, once per tenant with shared tables, never
360
+ after a failed erasure, and lists it in its event catalog and AsyncAPI document with the contexts
361
+ that consume it. `generate erasure-handler <context>` writes
362
+ `application/integration/handlers/data-subject-erased.integration-handler.ts` over the
363
+ `<Context>PersonalDataErasure` of the context, its spec on the fake, and its subscription under the
364
+ consumer name `<context>.data-subject-erased`: the decorator in the declared style, the module file
365
+ of an explicit context, the hand-wired platform with the adapter wrapped as any other (in a
366
+ transaction behind a broker); it refuses a context that has no erasure yet. `defineIntegrationEvent`
367
+ takes `personal: { subject, fields }`, checked against the fields the payload schema documents (no
368
+ field, a field twice, a personal subject or an unknown path is refused), written by the catalog
369
+ under the payload and by AsyncAPI as `x-personal-data` on the message. The events, kernel and CLI
370
+ READMEs, the concept page and its diagram, the proposal and the persistence and integration event
371
+ skills say it, in English and in French.
372
+
373
+ **The mutation score holds the application layer too, at a floor of its own.** `governedMutation()`
374
+ mutates the application layer of every context beside its domain, at its level and in the modules
375
+ of its model, and `ddd-ts-kit mutation` scores each layer of each context against its floor: the
376
+ `mutation` key of `ddd-ts-kit.config.json` takes `"application"` beside `"domain"`, 75 by the
377
+ reference, five below the domain as the coverage reference steps down from one layer to the next,
378
+ and lowering it is a recorded deviation (`"what": "mutation.application"`). The use cases hold
379
+ rules the domain does not: the permission a command requires, the idempotence of a handler, the
380
+ event it publishes, the refusal it relays; a survivor there is a rule no test states as much as in
381
+ an aggregate. On the example the application layer scores 95.7, its lowest context 93.5, and the
382
+ run grows by twenty seconds: the initial test run is what the night pays for, not the mutants.
383
+
384
+ To move: nothing, unless a context sits under 75 on its application layer: `npm run test:mutation`
385
+ names the survivors to read, a test to write for each rule, or a deviation to record.
386
+
387
+ **The audit trail of a generated project on Prisma or TypeORM is kept in its database, no longer in
388
+ the memory of the process: `@ddd-ts-kit/audit/prisma` and `@ddd-ts-kit/audit/typeorm` give
389
+ `PrismaAuditTrail` and `TypeOrmAuditTrail`, held to the same contract as the Knex and Drizzle
390
+ stores.** Until now `--orm prisma` and `--orm typeorm` started on an `InMemoryAuditTrail` behind a
391
+ `TODO(platform)`, so the proof of every command, decision, erasure, export and purge was lost when
392
+ the process stopped. The four stores share one PostgreSQL implementation (the hash chain, the head
393
+ locked per chain, the entries written at the commit of the unit of work). `auditPrismaModels(schema)`
394
+ gives the two Prisma models and `auditEntities({ schema })` the two TypeORM entities; their specs
395
+ prove that, created by the migrations of a project, they give the columns, the keys and the
396
+ indexes of `createAuditTables`. On Prisma the statements are raw ones on the client of the unit of
397
+ work, an append inside a transaction takes a savepoint, a failure of the database comes back with
398
+ its SQLSTATE as `code`, and the reader asks PostgreSQL for the instant in UTC, since the adapter of
399
+ pg reads a `timestamptz` without the offset of the session (the shared reader does so for every
400
+ store). `init --audit on` with Prisma or TypeORM writes the models in `prisma/schema.prisma` (the
401
+ `audit` schema added to the datasource) or the entities in `schema.ts`, binds the store in
402
+ `create-audit.ts`, adds `npm run db:audit-guard` for the append-only guard to paste in a
403
+ migration, and the test databases install that guard and leave the trail out of `reset()`.
404
+
405
+ To move: a project on Prisma or TypeORM with `--audit on` runs `init --force` to get the store, then
406
+ generates a migration for the two tables and adds one holding what `npm run db:audit-guard`
407
+ prints.
408
+
409
+ **Each spec file is held to the time budget of its level.** The reporter of the test runner the kit
410
+ ships, `@ddd-ts-kit/testing/budget/vitest` and `@ddd-ts-kit/testing/budget/jest`, named in the runner
411
+ config `init` writes and passed with `--reporter` where the pipeline names its reporters, reads the
412
+ `budget` key of `ddd-ts-kit.config.json`, five seconds for a unit spec file and thirty for an
413
+ integration spec file by the reference, names the slowest spec of each level at the end of every run,
414
+ and warns when a spec file took more than its budget, its tests and hooks timed, the loading of its modules left out; `"enforce": true` under `budget` makes it fail the run, once the measures of a project are stable, since a duration depends on the load of the machine as much as on the spec. A unit
415
+ spec of a context runs the model and the use cases on fakes; an integration spec of a context, and a
416
+ spec of the platform, opens a database or reaches a server; the specs of the application outside the
417
+ contexts (end to end, acceptance, architecture) are not held. A slow spec hides a world rebuilt per
418
+ test, I/O behind a fake, or a wait: lowering a budget is free, raising one above the reference is a
419
+ recorded deviation (`"what": "budget.unit"`), and a budget that is no duration is reported by
420
+ `config/valid`. On the example, the slowest unit spec takes 1.6 seconds and the slowest integration
421
+ spec 11, under load.
422
+
423
+ To move: name the reporter in your runner config, `reporters: ['default', '@ddd-ts-kit/testing/budget/vitest']`
424
+ (or `budget/jest`), and in the commands of your pipeline that pass `--reporter`.
425
+
426
+ **The oldest entries of the audit trail leave the database for the file storage, verified and
427
+ anchored: `archiveBefore(date, { files, clock })` on the four SQL stores and on
428
+ `InMemoryAuditTrail`, and a generated project archives every month what is older than the twelve
429
+ whole months it keeps online.** Each entry keeps the identifiers of a person, and a trail grows
430
+ for as long as the system lives (GDPR article 5(1)(e)). For each chain, in one transaction
431
+ holding its head, the entries after the last archive and older than the date are verified from
432
+ the anchor of the archive before them, written to one file (`audit-archives/<chain>/<from>-<to>.ndjson`,
433
+ one canonical JSON per line), recorded in the new `audit_archives` table with their last hash
434
+ and the SHA-256 of the file, then deleted: the guard of the trail lets a `DELETE` through only
435
+ for entries an archive covers, and refuses any change to the archives. A chain that does not
436
+ verify is refused (`AuditArchiveRefusedError`) and keeps every entry. `archivesOf(chain)` lists
437
+ the archives, `verifyArchive(text, archive, previous)` checks a file again, and `verifyChain`
438
+ takes `after`, the anchor the entries left in the database start from. `ArchiveAuditEntries` is
439
+ the scheduled job; `init` registers it as `audit.archive` (first day of the month, 04:00 UTC,
440
+ `JOB_AUDIT_ARCHIVE_ENABLED=false` switches it off) when the trail is in a database and the
441
+ project keeps files in a storage, and declares the archives with the rest of the trail on the
442
+ four ORMs. Archiving moves, it does not erase: how long the files are kept is the controller's
443
+ decision.
444
+
445
+ To move: a trail created before this version adds the archives once, in a migration:
446
+ `addAuditArchives(knex, { schema: 'audit' })` on Knex; on Drizzle, Prisma and TypeORM, `init
447
+ --force` declares the table, the migration of the ORM creates it, and a migration of your own
448
+ runs the statements of `auditArchiveUpgradeStatements('audit')` (the guard that lets archived
449
+ entries go, and the guard of the archives). Until then, `archiveBefore` fails on the missing
450
+ table and the job reports the failed run.
451
+
452
+ **In a context wired by hand (`--di manual`, `--di nest`), `generate repository` no longer creates
453
+ the repository in the module file: the first `generate command --aggregate` that needs it does, and
454
+ the next one finds it there.** Until now the module file of a context with a repository and no
455
+ command yet held a constant nothing read, and its import, which the lint of the project refused
456
+ (`no-unused-vars`). `declarations/port-adapter-wired` agrees: an adapter whose port no class needs
457
+ yet (no file outside the infrastructure and the tests names it, but the one that declares it) is not
458
+ reported, since nothing misses it at run time.
459
+
460
+ To move: nothing. A module file written by an earlier version keeps its constant; the next command
461
+ on the same aggregate finds it and adds nothing.
462
+
463
+ **What a table keeps of a person can now be kept for a set time: `personalFields` takes a
464
+ `retention`, the erasure adapters of the four ORMs purge what outlived it, and a generated project
465
+ runs that purge every night, audited.** `retention: { after, days | months | years }` counts the
466
+ period from a date column of the row that is not personal data, one positive unit (refused
467
+ otherwise); a row whose date is empty never expires. The kernel adds the port
468
+ `PersonalDataRetention` (`purgeExpired(now)`), `purgeExpiredPersonalData(now, retentions)`, which
469
+ runs every copy at one instant and answers the rows each reached, `expiredBefore` and
470
+ `isPersonalDataRetention`; `InMemoryPersonalData` implements it, and
471
+ `personalDataRetentionContract` of `@ddd-ts-kit/testing` holds every adapter to it. The erasure
472
+ adapters of Knex, Drizzle, Prisma and TypeORM implement `purgeExpired` from the same declarations,
473
+ as the declaration says, files first, in the tenant of the work or in every tenant when the work
474
+ names none: the one write of the kit across tenants, chosen because a tenant left out of a list
475
+ would keep what it should not, bounded to an erasure by the date of the row, and written in the
476
+ multitenancy page. `auditedPersonalDataRetention` of `@ddd-ts-kit/audit` records each purge (`data-access`,
477
+ `personal-data:purge`, the context, `changes: { rows }`, no person). `generate repository ...
478
+ --personal ... --retention <column>:<n><d|m|y>` writes the retention in the declaration, adds a
479
+ column that dates the end of the relation to the storage as a nullable timestamp, empty while it
480
+ lasts (it refuses `registered_at` and the other columns the table keeps for itself: counted from the
481
+ registration, the purge would erase people who are still customers), and proves the purge in the
482
+ generated spec. `init --privacy on` writes `src/platform/privacy/run-purge.ts`, schedules
483
+ `privacy.purge-expired` every night at 03:00 UTC (the privacy module on tsyringe, the platform wired
484
+ by hand), switched off by `JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false`, and the script `privacy:purge`.
485
+ The concept page, the kernel, audit, ORM and CLI READMEs, the proposal and the skills say it, in
486
+ English and in French.
487
+
488
+ To move: `init --force` on a project with `--privacy on` writes the purge runner, the job and the
489
+ script; a declaration without `retention` purges nothing.
490
+
491
+ **`ddd-ts-kit docs` writes the register of personal data from the code: a Personal data section in
492
+ each `CONTEXT.md`, and with `--privacy on` the file `docs/privacy/register.md`, held to the code by
493
+ `docs --check`.** It reads every `personalFields` call of `infrastructure/persistence/*.personal-fields.ts`,
494
+ the one `generate repository --personal` writes or one written by hand (several per file), and the
495
+ `personal` option of the integration events. Each table is one row: the column that names the
496
+ person, the personal columns and files, what an erasure does (`pseudonymised`, `row deleted`), how
497
+ long the rows are kept (`36 months after ended_at`, or `until erased`); the columns are named as the
498
+ database names them on the four ORMs, a Drizzle or TypeORM declaration read back through the table it
499
+ names. The register adds the integration events that carry personal data and the contexts
500
+ downstream of their producer. It is not the record of processing activities of GDPR article 30:
501
+ the purposes, the lawful basis, the recipients outside the system and what the code does not purge
502
+ are sections around the markers that the controller writes and `docs` keeps.
503
+
504
+ To move: nothing to do. The next `npx ddd-ts-kit docs` (or `generate`) of a project with
505
+ `stack.privacy: "on"` creates `docs/privacy/register.md`, and adds the Personal data section to the
506
+ `CONTEXT.md` of each context that declares personal data; commit both, `docs --check` holds them
507
+ from then on.
508
+
509
+ **`ddd-ts-kit check` holds a project whose `stack.privacy` is `on` to its declarations of personal
510
+ data, with five new rules, all warnings: `privacy/declared-field`, `privacy/event-payload-declared`,
511
+ `privacy/erasure-reaches-copies`, `privacy/subject-is-opaque` and `privacy/no-personal-data-in-logs`.**
512
+ The erasure, the export, the retention and the register read the `personalFields` declarations and
513
+ the `personal` option of the integration events, never the columns: a copy of a person nobody
514
+ declared is a copy nobody erases, and nothing failed until now.
515
+
516
+ - `privacy/declared-field`: a column of a table of a context (Knex, Drizzle, TypeORM, and the Prisma
517
+ models in the schema of the context) whose name holds a word of the personal vocabulary and that
518
+ no declaration of its context names.
519
+ - `privacy/event-payload-declared`: a field of the payload of an integration event named like
520
+ personal data that its `personal` option does not list.
521
+ - `privacy/erasure-reaches-copies`: a context that consumes an event carrying personal data (a
522
+ handler, a projection, a process manager) and declares no `PersonalDataErasure` and handles no
523
+ `privacy.data-subject.erased`.
524
+ - `privacy/subject-is-opaque`: the subject of a declaration or of an event that is personal data
525
+ itself, or one of its personal fields.
526
+ - `privacy/no-personal-data-in-logs`: a call to the logger or to the metrics that names a declared
527
+ personal field.
528
+
529
+ The identity preset declares what it keeps of people when `stack.privacy` is `on`: the address and
530
+ the name of an account (pseudonymised when the person is erased) and the address an invitation was
531
+ sent to (the row deleted thirty days after the invitation expired, by the nightly purge), with the
532
+ erasure and the export of the context written and listed in the platform, not confined to a tenant
533
+ since its tables belong to none.
534
+
535
+ The vocabulary is the one of the kit (`email`, `phone`, `first_name`, `birth_date`, `address`,
536
+ `iban`, `ip_address` and the others listed in the configuration reference); the new config key
537
+ `privacy`, `{ "vocabulary": [...], "allow": [...] }`, adds the words of the business and removes a
538
+ word that never names a person in the project. A project with `stack.privacy` off, or whose config
539
+ predates the choice, is not judged.
540
+
541
+ To move: nothing blocks. `npx ddd-ts-kit check --rule privacy/declared-field` (and the four others)
542
+ lists what to take up: declare the column (`generate repository ... --personal`), list the field in
543
+ `personal: { subject, fields }`, erase the copy (`generate erasure-handler` for a service of its own),
544
+ or record a column that holds nothing of a person, `// ddd-ts-kit-disable-next-line
545
+ privacy/declared-field -- ADR-NNNN: <why>` or a word of `privacy.allow`. The rules stay warnings:
546
+ they read names, never contents, so a column `address` of a warehouse is reported as well as the
547
+ address of a person; no later version turns them into errors. A team that wants them blocking sets
548
+ `"rules": { "privacy/declared-field": "error" }` in ddd-ts-kit.config.json, rule by rule.
549
+
550
+ **The monthly archive of the audit trail runs by default only when the files of the project are in
551
+ an object store, and no entry leaves the database before its file reads back from the storage as it
552
+ was written.** An archive removes the entries from the database; with `--storage local`, the default
553
+ of `init`, the files are on the disk of the server, which a redeployment may wipe and a backup may
554
+ not reach, and the proof of who did what would be lost a year after going live. A generated project
555
+ with `--storage s3` keeps the job on (`JOB_AUDIT_ARCHIVE_ENABLED=false` switches it off); one with
556
+ `--storage local` writes it off, and `JOB_AUDIT_ARCHIVE_ENABLED=true` switches it on once that disk
557
+ is durable and backed up, which `job-settings.ts` says next to the line. `archiveBefore` of the
558
+ four SQL stores and of `InMemoryAuditTrail` reads each file back and checks its digest before the
559
+ entries are removed: a storage that did not keep it is refused with the new
560
+ `AuditArchiveNotStoredError`, and the trail keeps every entry.
561
+
562
+ To move: a project generated with `--storage local` by the previous version has the job on; change
563
+ its line of `src/platform/jobs/job-settings.ts` to
564
+ `'audit.archive': { enabled: environment['JOB_AUDIT_ARCHIVE_ENABLED'] === 'true' }`, or keep it on
565
+ where the files already land on a durable, backed-up disk.
566
+
567
+ **The scheduling example declares what it keeps of people and erases and exports it through the
568
+ ports of the kit: `personalFields` in each context, a `PersonalDataErasure` and a
569
+ `PersonalDataExport` per context over the adapters of `@ddd-ts-kit/knex`, `eraseDataSubject` and
570
+ `exportDataSubject` of the kernel, and the register and the privacy rules on.** The persons of
571
+ identity and the contacts of notification are deleted, the notes, the cancellation reasons, the
572
+ documents and the copied names of scheduling pseudonymised; notification keeps its own erasure,
573
+ which deletes a contact under a stamp so that a redelivered announcement does not bring the address
574
+ back. The hand-written erasure engine of the example is gone, its platform folder is
575
+ `src/platform/privacy/`, `npm run erase:patient` becomes `npm run privacy:erase`, and `npm run
576
+ privacy:export` hands over one dated document of what every context keeps of a person, every
577
+ handover audited. `identity.person.registered` and `identity.practice.member-added` declare their
578
+ personal fields, so the event catalog and AsyncAPI say so; `docs/privacy/register.md` is generated,
579
+ with the sections a controller writes filled in as an illustration.
580
+
581
+ To move: nothing for a project. For a reader of the example: run `npm run privacy:erase` where
582
+ `npm run erase:patient` was run; the report names each copy by its context (`identity`,
583
+ `notification`, `scheduling`) and counts the rows reached.
584
+
585
+ **The tests are read back as a document: `ddd-ts-kit docs` writes `docs/behaviour/`, one page per
586
+ context of what its tests state.** Each page lists, in the words of the test titles, the rules of
587
+ the context grouped as the specs group them (`describe` and `it`, a table of cases as one rule), with
588
+ the role of each spec (`slot (value object), in calendars`), a planned rule (`it.todo`) and a spec
589
+ put aside said so, and the counts; `docs/behaviour/application.md` does the same for the specs
590
+ outside the contexts (end to end, acceptance, architecture) and `docs/behaviour/README.md` indexes
591
+ them. `npm run docs:generate` writes them with the other generated documents, the pre-commit hook `init` writes regenerates and adds them when a spec is staged, with `ddd-ts-kit docs --behaviour`, which writes those pages alone, and `docs --check` holds them
592
+ current, so a spec whose title changed never reaches the trunk without its page. This
593
+ is the reading the business asks of Gherkin, without a second language to keep in step: the title of
594
+ a test, which `test/title-states-a-rule` makes a rule, is the sentence. Under `generate --local-only`
595
+ the pages are left to the trunk, as every shared file is.
596
+
597
+ To move: run `npm run docs:generate` once and commit `docs/behaviour/`; add the `behaviour pages`
598
+ job to the `pre-commit` of your `lefthook.yml` from `pipeline/lefthook.yml`.
599
+
600
+ ## 0.88.0
601
+
602
+ **The code list and the permission set of a context sit at its root: `<context>.codes.ts` and `<context>.permissions.ts`.** They are one per context, whatever its modules, so they now sit next to `CONTEXT.md` and `<context>.declarations.ts` instead of `domain/errors/codes.ts` and `application/authorization/<context>.permissions.ts`. `domain/errors/` holds the refusal classes, `application/authorization/` the policies, and a folder that held the code list or the permission set alone is gone. In a context divided into modules, `domain/` and `application/` now hold nothing but their modules. Every rule reads the two files as it read them in their role folder: `<context>.codes.ts` is the code list of the domain for `errors/*`, `naming/suffix` and the layer rules, `<context>.permissions.ts` the permission set of the application for `authz/*`. `ddd-ts-kit check`, the ESLint plugin and the generated `.dependency-cruiser.cjs` follow (the domain may import the code list of its context, the application both files). The generators, the templates, the identity preset and `error-factories` write them at the root, and knip is told of the code types as `src/contexts/*/*.codes.ts`, and also where 0.86 and 0.87 kept them as long as one context still holds its list there (`init`, `generate` and `context-layout` keep the two patterns in step with the tree). `ddd-ts-kit context-layout [<context>...] [--dry-run]` is new: it moves the two files of every context, or of the ones named, from where 0.86 and 0.87 wrote them to the root, rewrites every import of them under the source root, `test/` and `scripts/`, removes a role folder the move leaves empty, writes again what derives from the tree (`.dependency-cruiser.cjs`, the generated declarations) and tells knip of the code lists where they now are; it says each file it wrote, `--dry-run` included.
603
+
604
+ To move: run `npx ddd-ts-kit context-layout`, then the formatter, the checks and the tests, and commit the result. The generated `.dependency-cruiser.cjs` changes with this version, and `npm run depcruise` checks it first: `npx ddd-ts-kit depcruise-config --write`, `context-layout` or any `generate` writes it again. Beyond that file, upgrading alone fails nothing: for one minor version, a code list or a permission set still where 0.86 and 0.87 wrote it is accepted. `ddd-ts-kit check` reports it as a warning of `tree/closed` (exit 0) that names the command, and the generators and `init --force` keep writing it where it is, the imports they write included. A file both at the root and in its earlier place is an error. A later minor version reports the earlier places as errors.
605
+
606
+ **A module of the model holds its own layers: `<module>/domain/`, `<module>/application/`, `<module>/infrastructure/`, `<module>/presentation/`, and its specs sit in `test/unit/<module>/`.** In a context divided into modules, everything about one part of the model, its model, its use cases, its adapters and its routes, is now under one folder, instead of `domain/<module>/` and `application/<module>/` with the adapters, routes and specs left organised by technique. What every module shares stays at the level of the context: `CONTEXT.md`, `<context>.codes.ts`, `<context>.permissions.ts`, the generated declarations, `published-language/`, the schema, tables and migrations of its database (the `*.schema.ts` of `infrastructure/persistence/` that are no row schema), its route groups with `guards/` and `shared/`, and `test/fakes/`, `test/builders/` and `test/worlds/`. `ddd-ts-kit check`, the ESLint plugin (its layer rules and the globs of its preset), the generated `.dependency-cruiser.cjs`, the coverage of `@ddd-ts-kit/testing` (each layer of each module held to its threshold), `discoverContext` of `@ddd-ts-kit/di`, the generated declarations (`<module>/<layer>/<layer>.declarations.ts`) and the guard of the plugin read the new layout; every rule reads a file of a module as the same file outside one. `generate ... --module <module>` writes the files of every layer into the module and each spec into the module of the file it is named after, and refuses a file of a layer without `--module` in a context that declares modules. `move-to-module` takes files of any layer and specs, and the specs named after a moved file follow it. `module/complete` reports a file of a layer outside every module and a spec left at the level of the context while its subject sits in a module. A folder at the root of a context that the config does not declare is reported by `tree/closed`, whose fix names `generate module`.
607
+
608
+ The coverage of `@ddd-ts-kit/testing` now holds each layer of each module to its floor on its own (`calendars/domain/`, `waitlist/domain/`), where 0.86 and 0.87 measured `domain/` of the context as one, so a module with few specs no longer hides behind a well tested one: a project whose pipeline passed may fail the coverage of one module right after `context-layout`. Run the coverage once after the move and write the specs of the layer it names; the floors themselves stay those of the `coverage` key of `ddd-ts-kit.config.json`, the same for every context and module (Jest sums a threshold over one folder, so a layer of a module cannot be summed with the same layer of the context).
609
+
610
+ To move: run `npx ddd-ts-kit context-layout`, then the formatter, the checks and the tests, and commit the result. The command moves each module from `domain/<module>/` and `application/<module>/` to its folder, and each adapter, route and spec left at the level of the context to the module of what it imports (a spec to the module of the file it is named after, a file that imports nothing of a module to the module of the files that import it), every import of them under the source root, `test/` and `scripts/` following; a file whose imports name two modules, or none, is listed and stays where it is. For one minor version, a module still where 0.86 and 0.87 put it is read and reported as a warning of `module/complete` that names the command, but the generators refuse to write in such a context until it is moved: a file written in the layout of today would sit apart from the rest of its module.
611
+
612
+ **A study of the velocity of the build, the checks and the tests, with its measures and its plan.**
613
+ The proposal page `docs/proposals/build-and-test-velocity.md` (and its French page) measures
614
+ where the time and the memory of this repository go, on a workstation and in the pipeline, tests
615
+ the levers of Vitest, ESLint, Oxlint, the native compiler and the package managers on this tree,
616
+ summarizes what other teams published about orchestrators, package managers, test selection and
617
+ GitHub Actions, and ends with a plan in order of gain per cost: fewer jobs per pipeline run and
618
+ the heavy families narrowed on a pull request, the compile matrix of five spec files in
619
+ parallel, half the cores and `related` tests before a push, the ESLint content cache, the type
620
+ check of the specs in parallel; Oxlint and arm64 runners to try; pnpm not now; no orchestrator.
621
+ Nothing of the pipeline or of the templates changes in this pull request.
622
+
7
623
  ## 0.87.0
8
624
 
9
625
  **`S3FileStorage.put` stores a file larger than one part.** The SDK read the `size` of the