ddd-ts-kit 0.102.0 → 0.104.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 (724) hide show
  1. package/CHANGELOG.md +278 -0
  2. package/README.fr.md +26 -15
  3. package/README.md +26 -14
  4. package/dist/acceptance/check-locked-files.d.ts.map +1 -1
  5. package/dist/acceptance/check-locked-files.js +6 -3
  6. package/dist/acceptance/check-locked-files.js.map +1 -1
  7. package/dist/build/rewrite-aliases.d.ts.map +1 -1
  8. package/dist/build/rewrite-aliases.js +3 -0
  9. package/dist/build/rewrite-aliases.js.map +1 -1
  10. package/dist/check/baseline/write-baseline.d.ts.map +1 -1
  11. package/dist/check/baseline/write-baseline.js +2 -3
  12. package/dist/check/baseline/write-baseline.js.map +1 -1
  13. package/dist/check/canonical/stray-entry.d.ts.map +1 -1
  14. package/dist/check/canonical/stray-entry.js +14 -1
  15. package/dist/check/canonical/stray-entry.js.map +1 -1
  16. package/dist/check/catalogue/eslint-only-rules.d.ts.map +1 -1
  17. package/dist/check/catalogue/eslint-only-rules.js +1 -1
  18. package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
  19. package/dist/check/commands/check-command.d.ts.map +1 -1
  20. package/dist/check/commands/check-command.js +24 -1
  21. package/dist/check/commands/check-command.js.map +1 -1
  22. package/dist/check/commands/check-file-command.d.ts.map +1 -1
  23. package/dist/check/commands/check-file-command.js +3 -0
  24. package/dist/check/commands/check-file-command.js.map +1 -1
  25. package/dist/check/commands/explain-command.d.ts.map +1 -1
  26. package/dist/check/commands/explain-command.js +8 -21
  27. package/dist/check/commands/explain-command.js.map +1 -1
  28. package/dist/check/errors/kit-error-codes.d.ts.map +1 -1
  29. package/dist/check/errors/kit-error-codes.js +1 -0
  30. package/dist/check/errors/kit-error-codes.js.map +1 -1
  31. package/dist/check/explain/authz-docs.js +1 -1
  32. package/dist/check/explain/authz-docs.js.map +1 -1
  33. package/dist/check/explain/delegated-doc.d.ts +4 -0
  34. package/dist/check/explain/delegated-doc.d.ts.map +1 -0
  35. package/dist/check/explain/delegated-doc.js +11 -0
  36. package/dist/check/explain/delegated-doc.js.map +1 -0
  37. package/dist/check/explain/delegated-docs.d.ts +8 -0
  38. package/dist/check/explain/delegated-docs.d.ts.map +1 -0
  39. package/dist/check/explain/delegated-docs.js +292 -0
  40. package/dist/check/explain/delegated-docs.js.map +1 -0
  41. package/dist/check/explain/errors-docs.js +1 -1
  42. package/dist/check/explain/errors-docs.js.map +1 -1
  43. package/dist/check/explain/layer-docs.d.ts.map +1 -1
  44. package/dist/check/explain/layer-docs.js +6 -4
  45. package/dist/check/explain/layer-docs.js.map +1 -1
  46. package/dist/check/explain/ports-docs.js +1 -1
  47. package/dist/check/explain/ports-docs.js.map +1 -1
  48. package/dist/check/explain/tree-docs.js +2 -2
  49. package/dist/check/explain/tree-docs.js.map +1 -1
  50. package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
  51. package/dist/check/fixtures/authz-policy-fixtures.js +13 -1
  52. package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
  53. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  54. package/dist/check/fixtures/fixtures.js +4 -0
  55. package/dist/check/fixtures/fixtures.js.map +1 -1
  56. package/dist/check/fixtures/layer-entry-fixtures.d.ts +4 -0
  57. package/dist/check/fixtures/layer-entry-fixtures.d.ts.map +1 -0
  58. package/dist/check/fixtures/layer-entry-fixtures.js +35 -0
  59. package/dist/check/fixtures/layer-entry-fixtures.js.map +1 -0
  60. package/dist/check/fixtures/layer-fixtures.d.ts.map +1 -1
  61. package/dist/check/fixtures/layer-fixtures.js.map +1 -1
  62. package/dist/check/fixtures/other-language-fixtures.d.ts.map +1 -1
  63. package/dist/check/fixtures/other-language-fixtures.js +1 -1
  64. package/dist/check/fixtures/other-language-fixtures.js.map +1 -1
  65. package/dist/check/fixtures/ports-fixtures.d.ts.map +1 -1
  66. package/dist/check/fixtures/ports-fixtures.js +1 -0
  67. package/dist/check/fixtures/ports-fixtures.js.map +1 -1
  68. package/dist/check/fixtures/purity-fixtures.d.ts.map +1 -1
  69. package/dist/check/fixtures/purity-fixtures.js +18 -0
  70. package/dist/check/fixtures/purity-fixtures.js.map +1 -1
  71. package/dist/check/fixtures/role-folder-fixtures.d.ts +4 -0
  72. package/dist/check/fixtures/role-folder-fixtures.d.ts.map +1 -0
  73. package/dist/check/fixtures/role-folder-fixtures.js +31 -0
  74. package/dist/check/fixtures/role-folder-fixtures.js.map +1 -0
  75. package/dist/check/fixtures/test-fixtures.d.ts.map +1 -1
  76. package/dist/check/fixtures/test-fixtures.js +9 -0
  77. package/dist/check/fixtures/test-fixtures.js.map +1 -1
  78. package/dist/check/fixtures/tree-fixtures.d.ts.map +1 -1
  79. package/dist/check/fixtures/tree-fixtures.js +0 -1
  80. package/dist/check/fixtures/tree-fixtures.js.map +1 -1
  81. package/dist/check/layers/outer-entry.d.ts +13 -0
  82. package/dist/check/layers/outer-entry.d.ts.map +1 -0
  83. package/dist/check/layers/outer-entry.js +29 -0
  84. package/dist/check/layers/outer-entry.js.map +1 -0
  85. package/dist/check/rules/authz-policy-asked.d.ts.map +1 -1
  86. package/dist/check/rules/authz-policy-asked.js +45 -6
  87. package/dist/check/rules/authz-policy-asked.js.map +1 -1
  88. package/dist/check/rules/clean-braces.js +1 -1
  89. package/dist/check/rules/clean-braces.js.map +1 -1
  90. package/dist/check/rules/layer-application-inward.d.ts.map +1 -1
  91. package/dist/check/rules/layer-application-inward.js +3 -1
  92. package/dist/check/rules/layer-application-inward.js.map +1 -1
  93. package/dist/check/rules/layer-domain-purity.d.ts.map +1 -1
  94. package/dist/check/rules/layer-domain-purity.js +3 -1
  95. package/dist/check/rules/layer-domain-purity.js.map +1 -1
  96. package/dist/check/rules/naming-suffix.js +7 -1
  97. package/dist/check/rules/naming-suffix.js.map +1 -1
  98. package/dist/check/rules/ports-abstract-class.d.ts.map +1 -1
  99. package/dist/check/rules/ports-abstract-class.js +16 -2
  100. package/dist/check/rules/ports-abstract-class.js.map +1 -1
  101. package/dist/check/rules/purity-no-ambient-randomness.d.ts.map +1 -1
  102. package/dist/check/rules/purity-no-ambient-randomness.js +4 -0
  103. package/dist/check/rules/purity-no-ambient-randomness.js.map +1 -1
  104. package/dist/check/rules/purity-no-environment.d.ts.map +1 -1
  105. package/dist/check/rules/purity-no-environment.js +5 -0
  106. package/dist/check/rules/purity-no-environment.js.map +1 -1
  107. package/dist/check/rules/purity-no-system-clock.d.ts.map +1 -1
  108. package/dist/check/rules/purity-no-system-clock.js +4 -0
  109. package/dist/check/rules/purity-no-system-clock.js.map +1 -1
  110. package/dist/check/rules/test-no-mocks.d.ts.map +1 -1
  111. package/dist/check/rules/test-no-mocks.js +16 -6
  112. package/dist/check/rules/test-no-mocks.js.map +1 -1
  113. package/dist/check/rules/test-spec-required.d.ts.map +1 -1
  114. package/dist/check/rules/test-spec-required.js +3 -1
  115. package/dist/check/rules/test-spec-required.js.map +1 -1
  116. package/dist/check/scan/named-outside-imports.d.ts +3 -0
  117. package/dist/check/scan/named-outside-imports.d.ts.map +1 -0
  118. package/dist/check/scan/named-outside-imports.js +8 -0
  119. package/dist/check/scan/named-outside-imports.js.map +1 -0
  120. package/dist/check/scan/star-exports-of.d.ts +3 -0
  121. package/dist/check/scan/star-exports-of.d.ts.map +1 -0
  122. package/dist/check/scan/star-exports-of.js +8 -0
  123. package/dist/check/scan/star-exports-of.js.map +1 -0
  124. package/dist/check/scan/string-at.d.ts +3 -0
  125. package/dist/check/scan/string-at.d.ts.map +1 -0
  126. package/dist/check/scan/string-at.js +5 -0
  127. package/dist/check/scan/string-at.js.map +1 -0
  128. package/dist/check/text/closing-bracket.d.ts +6 -0
  129. package/dist/check/text/closing-bracket.d.ts.map +1 -0
  130. package/dist/check/text/closing-bracket.js +24 -0
  131. package/dist/check/text/closing-bracket.js.map +1 -0
  132. package/dist/commands/affected.d.ts.map +1 -1
  133. package/dist/commands/affected.js +5 -4
  134. package/dist/commands/affected.js.map +1 -1
  135. package/dist/commands/cited.d.ts.map +1 -1
  136. package/dist/commands/cited.js +2 -1
  137. package/dist/commands/cited.js.map +1 -1
  138. package/dist/commands/depcruise-config.d.ts.map +1 -1
  139. package/dist/commands/depcruise-config.js +14 -7
  140. package/dist/commands/depcruise-config.js.map +1 -1
  141. package/dist/commands/digest.d.ts.map +1 -1
  142. package/dist/commands/digest.js +2 -1
  143. package/dist/commands/digest.js.map +1 -1
  144. package/dist/commands/drizzle-generate.d.ts +3 -2
  145. package/dist/commands/drizzle-generate.d.ts.map +1 -1
  146. package/dist/commands/drizzle-generate.js +22 -7
  147. package/dist/commands/drizzle-generate.js.map +1 -1
  148. package/dist/commands/generate.d.ts.map +1 -1
  149. package/dist/commands/generate.js +3 -2
  150. package/dist/commands/generate.js.map +1 -1
  151. package/dist/commands/knex-generate.d.ts +10 -0
  152. package/dist/commands/knex-generate.d.ts.map +1 -0
  153. package/dist/commands/knex-generate.js +80 -0
  154. package/dist/commands/knex-generate.js.map +1 -0
  155. package/dist/commands/lint.d.ts +2 -1
  156. package/dist/commands/lint.d.ts.map +1 -1
  157. package/dist/commands/lint.js +42 -4
  158. package/dist/commands/lint.js.map +1 -1
  159. package/dist/commands/move-to-module.d.ts.map +1 -1
  160. package/dist/commands/move-to-module.js +3 -0
  161. package/dist/commands/move-to-module.js.map +1 -1
  162. package/dist/commands/mutation.d.ts.map +1 -1
  163. package/dist/commands/mutation.js +4 -3
  164. package/dist/commands/mutation.js.map +1 -1
  165. package/dist/commands/parse-migration-arguments.d.ts +11 -0
  166. package/dist/commands/parse-migration-arguments.d.ts.map +1 -0
  167. package/dist/commands/parse-migration-arguments.js +17 -0
  168. package/dist/commands/parse-migration-arguments.js.map +1 -0
  169. package/dist/commands/plan-waves.d.ts.map +1 -1
  170. package/dist/commands/plan-waves.js +2 -1
  171. package/dist/commands/plan-waves.js.map +1 -1
  172. package/dist/commands/prisma-generate.d.ts.map +1 -1
  173. package/dist/commands/prisma-generate.js +9 -14
  174. package/dist/commands/prisma-generate.js.map +1 -1
  175. package/dist/commands/typeorm-generate.d.ts +2 -1
  176. package/dist/commands/typeorm-generate.d.ts.map +1 -1
  177. package/dist/commands/typeorm-generate.js +22 -16
  178. package/dist/commands/typeorm-generate.js.map +1 -1
  179. package/dist/commands/verify-slice.d.ts.map +1 -1
  180. package/dist/commands/verify-slice.js +3 -2
  181. package/dist/commands/verify-slice.js.map +1 -1
  182. package/dist/commit/resolved-trunk.d.ts +3 -0
  183. package/dist/commit/resolved-trunk.d.ts.map +1 -0
  184. package/dist/commit/resolved-trunk.js +7 -0
  185. package/dist/commit/resolved-trunk.js.map +1 -0
  186. package/dist/commit/trunk-example.d.ts +3 -0
  187. package/dist/commit/trunk-example.d.ts.map +1 -0
  188. package/dist/commit/trunk-example.js +6 -0
  189. package/dist/commit/trunk-example.js.map +1 -0
  190. package/dist/describe/context-description.d.ts +2 -0
  191. package/dist/describe/context-description.d.ts.map +1 -1
  192. package/dist/describe/describe-context.d.ts.map +1 -1
  193. package/dist/describe/describe-context.js +6 -0
  194. package/dist/describe/describe-context.js.map +1 -1
  195. package/dist/describe/format-description.js +1 -1
  196. package/dist/describe/format-description.js.map +1 -1
  197. package/dist/digest/branch-points.d.ts.map +1 -1
  198. package/dist/digest/branch-points.js +3 -2
  199. package/dist/digest/branch-points.js.map +1 -1
  200. package/dist/doctor/permission-findings.d.ts.map +1 -1
  201. package/dist/doctor/permission-findings.js +68 -4
  202. package/dist/doctor/permission-findings.js.map +1 -1
  203. package/dist/generate/concept-role.d.ts +10 -0
  204. package/dist/generate/concept-role.d.ts.map +1 -1
  205. package/dist/generate/concept.d.ts.map +1 -1
  206. package/dist/generate/concept.js +5 -1
  207. package/dist/generate/concept.js.map +1 -1
  208. package/dist/generate/emit.d.ts +5 -2
  209. package/dist/generate/emit.d.ts.map +1 -1
  210. package/dist/generate/emit.js +5 -4
  211. package/dist/generate/emit.js.map +1 -1
  212. package/dist/generate/errors/refuse-taken-class-name.d.ts +9 -0
  213. package/dist/generate/errors/refuse-taken-class-name.d.ts.map +1 -0
  214. package/dist/generate/errors/refuse-taken-class-name.js +22 -0
  215. package/dist/generate/errors/refuse-taken-class-name.js.map +1 -0
  216. package/dist/generate/errors/write-named-refusal.d.ts.map +1 -1
  217. package/dist/generate/errors/write-named-refusal.js +2 -0
  218. package/dist/generate/errors/write-named-refusal.js.map +1 -1
  219. package/dist/generate/event-names.d.ts.map +1 -1
  220. package/dist/generate/event-names.js.map +1 -1
  221. package/dist/generate/files-without-modules.d.ts +8 -0
  222. package/dist/generate/files-without-modules.d.ts.map +1 -0
  223. package/dist/generate/files-without-modules.js +12 -0
  224. package/dist/generate/files-without-modules.js.map +1 -0
  225. package/dist/generate/grant-permission.js +2 -2
  226. package/dist/generate/grant-permission.js.map +1 -1
  227. package/dist/generate/kinds/aggregate-kind.js +4 -4
  228. package/dist/generate/kinds/aggregate-kind.js.map +1 -1
  229. package/dist/generate/kinds/command-kind.d.ts.map +1 -1
  230. package/dist/generate/kinds/command-kind.js +6 -1
  231. package/dist/generate/kinds/command-kind.js.map +1 -1
  232. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  233. package/dist/generate/kinds/declare-storage.js +4 -10
  234. package/dist/generate/kinds/declare-storage.js.map +1 -1
  235. package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
  236. package/dist/generate/kinds/domain-event-kind.js +3 -1
  237. package/dist/generate/kinds/domain-event-kind.js.map +1 -1
  238. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  239. package/dist/generate/kinds/e2e-kind.js +8 -1
  240. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  241. package/dist/generate/kinds/ensure-domain-event.d.ts.map +1 -1
  242. package/dist/generate/kinds/ensure-domain-event.js +2 -0
  243. package/dist/generate/kinds/ensure-domain-event.js.map +1 -1
  244. package/dist/generate/kinds/extraction/add-compose-service.js +1 -1
  245. package/dist/generate/kinds/extraction/add-compose-service.js.map +1 -1
  246. package/dist/generate/kinds/extraction/compose-service-of.d.ts +5 -0
  247. package/dist/generate/kinds/extraction/compose-service-of.d.ts.map +1 -0
  248. package/dist/generate/kinds/extraction/compose-service-of.js +8 -0
  249. package/dist/generate/kinds/extraction/compose-service-of.js.map +1 -0
  250. package/dist/generate/kinds/gateway-kind.js +9 -0
  251. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  252. package/dist/generate/kinds/generate-context.d.ts.map +1 -1
  253. package/dist/generate/kinds/generate-context.js +37 -0
  254. package/dist/generate/kinds/generate-context.js.map +1 -1
  255. package/dist/generate/kinds/generate-repository.d.ts.map +1 -1
  256. package/dist/generate/kinds/generate-repository.js +13 -0
  257. package/dist/generate/kinds/generate-repository.js.map +1 -1
  258. package/dist/generate/kinds/query-kind.d.ts.map +1 -1
  259. package/dist/generate/kinds/query-kind.js +24 -2
  260. package/dist/generate/kinds/query-kind.js.map +1 -1
  261. package/dist/generate/kinds/route/find-use-case.js +1 -1
  262. package/dist/generate/kinds/route/find-use-case.js.map +1 -1
  263. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  264. package/dist/generate/kinds/service-kind.js +3 -2
  265. package/dist/generate/kinds/service-kind.js.map +1 -1
  266. package/dist/generate/kinds/tables-files.d.ts +3 -0
  267. package/dist/generate/kinds/tables-files.d.ts.map +1 -0
  268. package/dist/generate/kinds/tables-files.js +7 -0
  269. package/dist/generate/kinds/tables-files.js.map +1 -0
  270. package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
  271. package/dist/generate/kinds/worker-kind.js +12 -0
  272. package/dist/generate/kinds/worker-kind.js.map +1 -1
  273. package/dist/generate/kinds/write-birth.d.ts +8 -0
  274. package/dist/generate/kinds/write-birth.d.ts.map +1 -0
  275. package/dist/generate/kinds/write-birth.js +13 -0
  276. package/dist/generate/kinds/write-birth.js.map +1 -0
  277. package/dist/generate/kinds/write-event-sourced-aggregate.d.ts.map +1 -1
  278. package/dist/generate/kinds/write-event-sourced-aggregate.js +8 -1
  279. package/dist/generate/kinds/write-event-sourced-aggregate.js.map +1 -1
  280. package/dist/generate/mark-policy-questions.js +2 -2
  281. package/dist/generate/mark-policy-questions.js.map +1 -1
  282. package/dist/generate/permission-name.d.ts +3 -0
  283. package/dist/generate/permission-name.d.ts.map +1 -0
  284. package/dist/generate/permission-name.js +3 -0
  285. package/dist/generate/permission-name.js.map +1 -0
  286. package/dist/generate/permission-named.d.ts.map +1 -1
  287. package/dist/generate/permission-named.js +1 -1
  288. package/dist/generate/permission-named.js.map +1 -1
  289. package/dist/generate/permission-words.d.ts +7 -0
  290. package/dist/generate/permission-words.d.ts.map +1 -0
  291. package/dist/generate/permission-words.js +11 -0
  292. package/dist/generate/permission-words.js.map +1 -0
  293. package/dist/generate/refined-by-policy.js +2 -2
  294. package/dist/generate/refined-by-policy.js.map +1 -1
  295. package/dist/generate/refuse-stuttering-event.d.ts +8 -0
  296. package/dist/generate/refuse-stuttering-event.d.ts.map +1 -0
  297. package/dist/generate/refuse-stuttering-event.js +14 -0
  298. package/dist/generate/refuse-stuttering-event.js.map +1 -0
  299. package/dist/generate/shared-writes.d.ts.map +1 -1
  300. package/dist/generate/shared-writes.js +1 -0
  301. package/dist/generate/shared-writes.js.map +1 -1
  302. package/dist/generate/spoken-in-language.d.ts +11 -2
  303. package/dist/generate/spoken-in-language.d.ts.map +1 -1
  304. package/dist/generate/spoken-in-language.js +27 -12
  305. package/dist/generate/spoken-in-language.js.map +1 -1
  306. package/dist/help/flag-notes.d.ts.map +1 -1
  307. package/dist/help/flag-notes.js +5 -1
  308. package/dist/help/flag-notes.js.map +1 -1
  309. package/dist/help/tool-notes.d.ts.map +1 -1
  310. package/dist/help/tool-notes.js +16 -0
  311. package/dist/help/tool-notes.js.map +1 -1
  312. package/dist/help/usage.d.ts.map +1 -1
  313. package/dist/help/usage.js +1 -0
  314. package/dist/help/usage.js.map +1 -1
  315. package/dist/init/agent-permissions.d.ts.map +1 -1
  316. package/dist/init/agent-permissions.js +18 -3
  317. package/dist/init/agent-permissions.js.map +1 -1
  318. package/dist/init/files/audit-files.d.ts.map +1 -1
  319. package/dist/init/files/audit-files.js +1 -0
  320. package/dist/init/files/audit-files.js.map +1 -1
  321. package/dist/init/files/persistence-files.d.ts.map +1 -1
  322. package/dist/init/files/persistence-files.js +2 -1
  323. package/dist/init/files/persistence-files.js.map +1 -1
  324. package/dist/init/files/script-files.d.ts +4 -1
  325. package/dist/init/files/script-files.d.ts.map +1 -1
  326. package/dist/init/files/script-files.js +6 -1
  327. package/dist/init/files/script-files.js.map +1 -1
  328. package/dist/init/is-team-file.d.ts +2 -2
  329. package/dist/init/is-team-file.d.ts.map +1 -1
  330. package/dist/init/is-team-file.js +5 -3
  331. package/dist/init/is-team-file.js.map +1 -1
  332. package/dist/init/keep-regions.d.ts +21 -0
  333. package/dist/init/keep-regions.d.ts.map +1 -0
  334. package/dist/init/keep-regions.js +63 -0
  335. package/dist/init/keep-regions.js.map +1 -0
  336. package/dist/init/kept-combination-notes.d.ts.map +1 -1
  337. package/dist/init/kept-combination-notes.js +6 -2
  338. package/dist/init/kept-combination-notes.js.map +1 -1
  339. package/dist/init/kept-compose-services.d.ts +6 -0
  340. package/dist/init/kept-compose-services.d.ts.map +1 -0
  341. package/dist/init/kept-compose-services.js +42 -0
  342. package/dist/init/kept-compose-services.js.map +1 -0
  343. package/dist/init/kept-role-vocabulary.d.ts +3 -0
  344. package/dist/init/kept-role-vocabulary.d.ts.map +1 -0
  345. package/dist/init/kept-role-vocabulary.js +7 -0
  346. package/dist/init/kept-role-vocabulary.js.map +1 -0
  347. package/dist/init/kept-roles.d.ts +12 -0
  348. package/dist/init/kept-roles.d.ts.map +1 -0
  349. package/dist/init/kept-roles.js +29 -0
  350. package/dist/init/kept-roles.js.map +1 -0
  351. package/dist/init/kept-wiring.d.ts +22 -0
  352. package/dist/init/kept-wiring.d.ts.map +1 -0
  353. package/dist/init/kept-wiring.js +91 -0
  354. package/dist/init/kept-wiring.js.map +1 -0
  355. package/dist/init/knip-vars.d.ts.map +1 -1
  356. package/dist/init/knip-vars.js +5 -1
  357. package/dist/init/knip-vars.js.map +1 -1
  358. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  359. package/dist/init/manifest/database-scripts.js +5 -3
  360. package/dist/init/manifest/database-scripts.js.map +1 -1
  361. package/dist/init/manifest/scripts-for.d.ts.map +1 -1
  362. package/dist/init/manifest/scripts-for.js +8 -0
  363. package/dist/init/manifest/scripts-for.js.map +1 -1
  364. package/dist/init/manifest/versions.js +24 -24
  365. package/dist/init/orphaned-wiring-notes.d.ts +13 -0
  366. package/dist/init/orphaned-wiring-notes.d.ts.map +1 -0
  367. package/dist/init/orphaned-wiring-notes.js +42 -0
  368. package/dist/init/orphaned-wiring-notes.js.map +1 -0
  369. package/dist/init/profile-hooks.js +1 -1
  370. package/dist/init/profile-hooks.js.map +1 -1
  371. package/dist/init/repositories-left-behind.d.ts +12 -0
  372. package/dist/init/repositories-left-behind.d.ts.map +1 -0
  373. package/dist/init/repositories-left-behind.js +26 -0
  374. package/dist/init/repositories-left-behind.js.map +1 -0
  375. package/dist/init/rewire-audited-events.d.ts +10 -0
  376. package/dist/init/rewire-audited-events.d.ts.map +1 -0
  377. package/dist/init/rewire-audited-events.js +32 -0
  378. package/dist/init/rewire-audited-events.js.map +1 -0
  379. package/dist/init/rewire-contexts.d.ts +15 -0
  380. package/dist/init/rewire-contexts.d.ts.map +1 -0
  381. package/dist/init/rewire-contexts.js +41 -0
  382. package/dist/init/rewire-contexts.js.map +1 -0
  383. package/dist/init/rewire-preset.d.ts +9 -0
  384. package/dist/init/rewire-preset.d.ts.map +1 -0
  385. package/dist/init/rewire-preset.js +29 -0
  386. package/dist/init/rewire-preset.js.map +1 -0
  387. package/dist/init/rewire-tables.d.ts +10 -0
  388. package/dist/init/rewire-tables.d.ts.map +1 -0
  389. package/dist/init/rewire-tables.js +54 -0
  390. package/dist/init/rewire-tables.js.map +1 -0
  391. package/dist/init/run-init.d.ts.map +1 -1
  392. package/dist/init/run-init.js +28 -28
  393. package/dist/init/run-init.js.map +1 -1
  394. package/dist/init/stack/kept-flag-notes.d.ts +7 -0
  395. package/dist/init/stack/kept-flag-notes.d.ts.map +1 -0
  396. package/dist/init/stack/kept-flag-notes.js +24 -0
  397. package/dist/init/stack/kept-flag-notes.js.map +1 -0
  398. package/dist/init/stack/refuse-unused-no-outbox.d.ts +4 -0
  399. package/dist/init/stack/refuse-unused-no-outbox.d.ts.map +1 -0
  400. package/dist/init/stack/refuse-unused-no-outbox.js +9 -0
  401. package/dist/init/stack/refuse-unused-no-outbox.js.map +1 -0
  402. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  403. package/dist/init/stack/resolve-stack.js +10 -0
  404. package/dist/init/stack/resolve-stack.js.map +1 -1
  405. package/dist/init/stack-before.d.ts +4 -0
  406. package/dist/init/stack-before.d.ts.map +1 -0
  407. package/dist/init/stack-before.js +11 -0
  408. package/dist/init/stack-before.js.map +1 -0
  409. package/dist/init/wiring-notes.d.ts +9 -0
  410. package/dist/init/wiring-notes.d.ts.map +1 -0
  411. package/dist/init/wiring-notes.js +22 -0
  412. package/dist/init/wiring-notes.js.map +1 -0
  413. package/dist/init/with-named-imports.d.ts +8 -0
  414. package/dist/init/with-named-imports.d.ts.map +1 -0
  415. package/dist/init/with-named-imports.js +69 -0
  416. package/dist/init/with-named-imports.js.map +1 -0
  417. package/dist/init/with-system-grants.d.ts +7 -0
  418. package/dist/init/with-system-grants.d.ts.map +1 -0
  419. package/dist/init/with-system-grants.js +26 -0
  420. package/dist/init/with-system-grants.js.map +1 -0
  421. package/dist/init/write-local-environment.d.ts +8 -0
  422. package/dist/init/write-local-environment.d.ts.map +1 -0
  423. package/dist/init/write-local-environment.js +18 -0
  424. package/dist/init/write-local-environment.js.map +1 -0
  425. package/dist/lint/eslint-in-project.d.ts +1 -1
  426. package/dist/lint/eslint-in-project.d.ts.map +1 -1
  427. package/dist/lint/eslint-in-project.js +11 -2
  428. package/dist/lint/eslint-in-project.js.map +1 -1
  429. package/dist/markers/index.d.ts +3 -0
  430. package/dist/markers/index.d.ts.map +1 -1
  431. package/dist/markers/index.js +3 -0
  432. package/dist/markers/index.js.map +1 -1
  433. package/dist/markers/region-marker.d.ts +3 -0
  434. package/dist/markers/region-marker.d.ts.map +1 -0
  435. package/dist/markers/region-marker.js +3 -0
  436. package/dist/markers/region-marker.js.map +1 -0
  437. package/dist/markers/regions-of.d.ts +9 -0
  438. package/dist/markers/regions-of.d.ts.map +1 -0
  439. package/dist/markers/regions-of.js +20 -0
  440. package/dist/markers/regions-of.js.map +1 -0
  441. package/dist/markers/unpaired-markers.d.ts +3 -0
  442. package/dist/markers/unpaired-markers.d.ts.map +1 -0
  443. package/dist/markers/unpaired-markers.js +13 -0
  444. package/dist/markers/unpaired-markers.js.map +1 -0
  445. package/dist/measures/format-measures.js +1 -1
  446. package/dist/measures/format-measures.js.map +1 -1
  447. package/dist/measures/measures-view.d.ts +1 -1
  448. package/dist/measures/measures-view.d.ts.map +1 -1
  449. package/dist/merge/apply-resolutions.d.ts.map +1 -1
  450. package/dist/merge/apply-resolutions.js +6 -4
  451. package/dist/merge/apply-resolutions.js.map +1 -1
  452. package/dist/merge/continue-merge.d.ts.map +1 -1
  453. package/dist/merge/continue-merge.js +1 -0
  454. package/dist/merge/continue-merge.js.map +1 -1
  455. package/dist/merge/ensure-mergeable.js +1 -1
  456. package/dist/merge/ensure-mergeable.js.map +1 -1
  457. package/dist/merge/lost/verify-merges.d.ts.map +1 -1
  458. package/dist/merge/lost/verify-merges.js +4 -0
  459. package/dist/merge/lost/verify-merges.js.map +1 -1
  460. package/dist/merge/merge-state.d.ts.map +1 -1
  461. package/dist/merge/merge-state.js +2 -2
  462. package/dist/merge/merge-state.js.map +1 -1
  463. package/dist/merge/merge-trunk.d.ts.map +1 -1
  464. package/dist/merge/merge-trunk.js +4 -0
  465. package/dist/merge/merge-trunk.js.map +1 -1
  466. package/dist/merge/refuse-shallow-history.d.ts +10 -0
  467. package/dist/merge/refuse-shallow-history.d.ts.map +1 -0
  468. package/dist/merge/refuse-shallow-history.js +15 -0
  469. package/dist/merge/refuse-shallow-history.js.map +1 -0
  470. package/dist/merge/resume-merge.js +2 -2
  471. package/dist/merge/resume-merge.js.map +1 -1
  472. package/dist/merge/settle-regions.d.ts.map +1 -1
  473. package/dist/merge/settle-regions.js +3 -4
  474. package/dist/merge/settle-regions.js.map +1 -1
  475. package/dist/migration/answered-as-json.d.ts +13 -0
  476. package/dist/migration/answered-as-json.d.ts.map +1 -0
  477. package/dist/migration/answered-as-json.js +38 -0
  478. package/dist/migration/answered-as-json.js.map +1 -0
  479. package/dist/migration/audit-guard/append-audit-guard.d.ts +4 -2
  480. package/dist/migration/audit-guard/append-audit-guard.d.ts.map +1 -1
  481. package/dist/migration/audit-guard/append-audit-guard.js +18 -3
  482. package/dist/migration/audit-guard/append-audit-guard.js.map +1 -1
  483. package/dist/migration/audit-guard/run-orm-tool.d.ts.map +1 -1
  484. package/dist/migration/audit-guard/run-orm-tool.js +2 -1
  485. package/dist/migration/audit-guard/run-orm-tool.js.map +1 -1
  486. package/dist/migration/declared-tables.d.ts +8 -0
  487. package/dist/migration/declared-tables.d.ts.map +1 -0
  488. package/dist/migration/declared-tables.js +13 -0
  489. package/dist/migration/declared-tables.js.map +1 -0
  490. package/dist/migration/find-project-formatter.d.ts.map +1 -1
  491. package/dist/migration/find-project-formatter.js +2 -1
  492. package/dist/migration/find-project-formatter.js.map +1 -1
  493. package/dist/migration/index.d.ts +9 -0
  494. package/dist/migration/index.d.ts.map +1 -1
  495. package/dist/migration/index.js +9 -0
  496. package/dist/migration/index.js.map +1 -1
  497. package/dist/migration/knex-migration-text.d.ts +4 -0
  498. package/dist/migration/knex-migration-text.d.ts.map +1 -0
  499. package/dist/migration/knex-migration-text.js +24 -0
  500. package/dist/migration/knex-migration-text.js.map +1 -0
  501. package/dist/migration/knex-schema-difference.d.ts +12 -0
  502. package/dist/migration/knex-schema-difference.d.ts.map +1 -0
  503. package/dist/migration/knex-schema-difference.js +166 -0
  504. package/dist/migration/knex-schema-difference.js.map +1 -0
  505. package/dist/migration/listed-in-index.d.ts +6 -0
  506. package/dist/migration/listed-in-index.d.ts.map +1 -0
  507. package/dist/migration/listed-in-index.js +8 -0
  508. package/dist/migration/listed-in-index.js.map +1 -0
  509. package/dist/migration/refuse-other-orm.d.ts +8 -0
  510. package/dist/migration/refuse-other-orm.d.ts.map +1 -0
  511. package/dist/migration/refuse-other-orm.js +34 -0
  512. package/dist/migration/refuse-other-orm.js.map +1 -0
  513. package/dist/migration/required-migration-name.d.ts +3 -0
  514. package/dist/migration/required-migration-name.d.ts.map +1 -0
  515. package/dist/migration/required-migration-name.js +11 -0
  516. package/dist/migration/required-migration-name.js.map +1 -0
  517. package/dist/migration/run-on-in-process-database.d.ts.map +1 -1
  518. package/dist/migration/run-on-in-process-database.js +2 -1
  519. package/dist/migration/run-on-in-process-database.js.map +1 -1
  520. package/dist/migration/tool-stdio.d.ts +6 -0
  521. package/dist/migration/tool-stdio.d.ts.map +1 -0
  522. package/dist/migration/tool-stdio.js +17 -0
  523. package/dist/migration/tool-stdio.js.map +1 -0
  524. package/dist/migration/warn-dropped-context-tables.d.ts +12 -0
  525. package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -0
  526. package/dist/migration/warn-dropped-context-tables.js +88 -0
  527. package/dist/migration/warn-dropped-context-tables.js.map +1 -0
  528. package/dist/package-manager/dialects.js +1 -1
  529. package/dist/package-manager/dialects.js.map +1 -1
  530. package/dist/package-manager/in-project-dialect.d.ts +8 -0
  531. package/dist/package-manager/in-project-dialect.d.ts.map +1 -0
  532. package/dist/package-manager/in-project-dialect.js +22 -0
  533. package/dist/package-manager/in-project-dialect.js.map +1 -0
  534. package/dist/plan/batched-waves.d.ts +2 -0
  535. package/dist/plan/batched-waves.d.ts.map +1 -1
  536. package/dist/plan/batched-waves.js +6 -4
  537. package/dist/plan/batched-waves.js.map +1 -1
  538. package/dist/plan/plan-problems.d.ts +5 -0
  539. package/dist/plan/plan-problems.d.ts.map +1 -1
  540. package/dist/plan/plan-problems.js +6 -1
  541. package/dist/plan/plan-problems.js.map +1 -1
  542. package/dist/plan/plan-waves.d.ts +2 -0
  543. package/dist/plan/plan-waves.d.ts.map +1 -1
  544. package/dist/plan/plan-waves.js +1 -1
  545. package/dist/plan/plan-waves.js.map +1 -1
  546. package/dist/presets/adapter-of.d.ts +5 -0
  547. package/dist/presets/adapter-of.d.ts.map +1 -0
  548. package/dist/presets/adapter-of.js +6 -0
  549. package/dist/presets/adapter-of.js.map +1 -0
  550. package/dist/presets/apply-preset.d.ts.map +1 -1
  551. package/dist/presets/apply-preset.js +1 -5
  552. package/dist/presets/apply-preset.js.map +1 -1
  553. package/dist/presets/grant-to-signed-in.d.ts.map +1 -1
  554. package/dist/presets/grant-to-signed-in.js +1 -24
  555. package/dist/presets/grant-to-signed-in.js.map +1 -1
  556. package/dist/presets/identity-terms.d.ts.map +1 -1
  557. package/dist/presets/identity-terms.js +4 -0
  558. package/dist/presets/identity-terms.js.map +1 -1
  559. package/dist/presets/lay-out-prisma-models.js +1 -19
  560. package/dist/presets/lay-out-prisma-models.js.map +1 -1
  561. package/dist/presets/organisations-as-tenants.d.ts +2 -2
  562. package/dist/presets/organisations-as-tenants.d.ts.map +1 -1
  563. package/dist/presets/organisations-as-tenants.js +46 -2
  564. package/dist/presets/organisations-as-tenants.js.map +1 -1
  565. package/dist/presets/preset-named.d.ts +2 -0
  566. package/dist/presets/preset-named.d.ts.map +1 -1
  567. package/dist/presets/preset-named.js +1 -1
  568. package/dist/presets/preset-named.js.map +1 -1
  569. package/dist/presets/wrap-authorizer.d.ts +4 -0
  570. package/dist/presets/wrap-authorizer.d.ts.map +1 -0
  571. package/dist/presets/wrap-authorizer.js +25 -0
  572. package/dist/presets/wrap-authorizer.js.map +1 -0
  573. package/dist/prisma-schema/datasource-schemas.d.ts +3 -0
  574. package/dist/prisma-schema/datasource-schemas.d.ts.map +1 -0
  575. package/dist/prisma-schema/datasource-schemas.js +5 -0
  576. package/dist/prisma-schema/datasource-schemas.js.map +1 -0
  577. package/dist/prisma-schema/index.d.ts +4 -0
  578. package/dist/prisma-schema/index.d.ts.map +1 -1
  579. package/dist/prisma-schema/index.js +4 -0
  580. package/dist/prisma-schema/index.js.map +1 -1
  581. package/dist/prisma-schema/preview-features-of.d.ts +3 -0
  582. package/dist/prisma-schema/preview-features-of.d.ts.map +1 -0
  583. package/dist/prisma-schema/preview-features-of.js +7 -0
  584. package/dist/prisma-schema/preview-features-of.js.map +1 -0
  585. package/dist/prisma-schema/with-datasource-schema.d.ts +3 -0
  586. package/dist/prisma-schema/with-datasource-schema.d.ts.map +1 -0
  587. package/dist/prisma-schema/with-datasource-schema.js +9 -0
  588. package/dist/prisma-schema/with-datasource-schema.js.map +1 -0
  589. package/dist/prisma-schema/with-preview-feature.d.ts +3 -0
  590. package/dist/prisma-schema/with-preview-feature.d.ts.map +1 -0
  591. package/dist/prisma-schema/with-preview-feature.js +19 -0
  592. package/dist/prisma-schema/with-preview-feature.js.map +1 -0
  593. package/dist/run.d.ts +2 -0
  594. package/dist/run.d.ts.map +1 -1
  595. package/dist/run.js +11 -2
  596. package/dist/run.js.map +1 -1
  597. package/dist/sdk/render-client.js +1 -1
  598. package/dist/sdk/render-client.js.map +1 -1
  599. package/dist/slice/record-verification.d.ts.map +1 -1
  600. package/dist/slice/record-verification.js +2 -5
  601. package/dist/slice/record-verification.js.map +1 -1
  602. package/dist/stack/stack-vars.js +6 -2
  603. package/dist/stack/stack-vars.js.map +1 -1
  604. package/dist/stories/open-story-scope.d.ts.map +1 -1
  605. package/dist/stories/open-story-scope.js +4 -5
  606. package/dist/stories/open-story-scope.js.map +1 -1
  607. package/dist/stories/origin-of.d.ts.map +1 -1
  608. package/dist/stories/origin-of.js +14 -2
  609. package/dist/stories/origin-of.js.map +1 -1
  610. package/dist/stories/origin-phase.js +4 -4
  611. package/dist/stories/origin-phase.js.map +1 -1
  612. package/dist/stories/read-story-phases.js +8 -4
  613. package/dist/stories/read-story-phases.js.map +1 -1
  614. package/dist/story/change-gated.d.ts +3 -3
  615. package/dist/story/change-gated.d.ts.map +1 -1
  616. package/dist/story/change-gated.js +13 -7
  617. package/dist/story/change-gated.js.map +1 -1
  618. package/dist/version.d.ts +1 -1
  619. package/dist/version.js +1 -1
  620. package/dist/worker/base-of.d.ts.map +1 -1
  621. package/dist/worker/base-of.js +2 -2
  622. package/dist/worker/base-of.js.map +1 -1
  623. package/dist/worker/briefing-of.js +2 -2
  624. package/dist/worker/briefing-of.js.map +1 -1
  625. package/dist/worker/open-worker-scope.d.ts.map +1 -1
  626. package/dist/worker/open-worker-scope.js +3 -4
  627. package/dist/worker/open-worker-scope.js.map +1 -1
  628. package/dist/workspace/workspace.d.ts.map +1 -1
  629. package/dist/workspace/workspace.js +2 -1
  630. package/dist/workspace/workspace.js.map +1 -1
  631. package/dist/workspace/write-inside-project.d.ts +8 -0
  632. package/dist/workspace/write-inside-project.d.ts.map +1 -0
  633. package/dist/workspace/write-inside-project.js +17 -0
  634. package/dist/workspace/write-inside-project.js.map +1 -0
  635. package/package.json +5 -5
  636. package/templates/aggregate/event-sourced.events.mapper.ts.tpl +5 -1
  637. package/templates/command/handler.declared.ts.tpl +4 -12
  638. package/templates/command/handler.ts.tpl +4 -12
  639. package/templates/e2e/e2e.spec.ts.tpl +2 -2
  640. package/templates/init/README.md.tpl +29 -5
  641. package/templates/init/docker/docker-compose.yml.tpl +5 -2
  642. package/templates/init/docker/dockerignore.tpl +1 -0
  643. package/templates/init/docker/env.example.tpl +8 -1
  644. package/templates/init/gitignore.tpl +1 -0
  645. package/templates/init/hooks/change-reference.mjs +96 -17
  646. package/templates/init/hooks/production-gate.mjs +65 -11
  647. package/templates/init/jest.config.js.tpl +4 -1
  648. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +25 -8
  649. package/templates/init/platform/audit/create-audit-trail.ts.tpl +59 -0
  650. package/templates/init/platform/audit/create-audit.ts.tpl +1 -46
  651. package/templates/init/platform/auth/authentication/development-header-authenticator.ts.tpl +7 -3
  652. package/templates/init/platform/auth/relationships/relationship-schema.ts.tpl +5 -0
  653. package/templates/init/platform/composition/compose-application.manual.ts.tpl +22 -7
  654. package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +2 -4
  655. package/templates/init/platform/config/app-config.ts.tpl +9 -0
  656. package/templates/init/platform/config/load-config.ts.tpl +24 -0
  657. package/templates/init/platform/database/data-source.typeorm.ts.tpl +6 -0
  658. package/templates/init/platform/database/gitkeep +0 -0
  659. package/templates/init/platform/database/knexfile.js.tpl +10 -3
  660. package/templates/init/platform/database/open-persistence.prisma.ts.tpl +5 -2
  661. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +11 -3
  662. package/templates/init/platform/database/prisma.config.ts.tpl +6 -0
  663. package/templates/init/platform/database/schema.knex.ts.tpl +4 -3
  664. package/templates/init/platform/http/start-http-server.express.ts.tpl +9 -6
  665. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +5 -2
  666. package/templates/init/platform/http/start-http-server.hono.ts.tpl +5 -2
  667. package/templates/init/platform/jobs/job-settings.ts.tpl +3 -0
  668. package/templates/init/platform/privacy/run-export.manual.ts.tpl +24 -2
  669. package/templates/init/platform/privacy/run-export.tsyringe.ts.tpl +30 -1
  670. package/templates/init/scripts/audit-verify.ts.tpl +35 -0
  671. package/templates/init/scripts/privacy-export.manual.ts.tpl +1 -7
  672. package/templates/init/scripts/privacy-export.tsyringe.ts.tpl +1 -7
  673. package/templates/pipeline/github/dependabot.yml +6 -0
  674. package/templates/pipeline/github/workflows/ci.yml.tpl +26 -1
  675. package/templates/pipeline/github/workflows/claude-review.yml +3 -2
  676. package/templates/pipeline/github/workflows/claude-triage.yml +1 -1
  677. package/templates/pipeline/github/workflows/codeql.yml +2 -0
  678. package/templates/pipeline/github/workflows/copilot-setup-steps.yml +2 -0
  679. package/templates/pipeline/github/workflows/intent-to-spec.yml +12 -4
  680. package/templates/pipeline/github/workflows/pr-title.yml +2 -0
  681. package/templates/pipeline/gitlab/claude-review.gitlab-ci.yml.tpl +1 -1
  682. package/templates/pipeline/knip.json.tpl +1 -4
  683. package/templates/pipeline/package-scripts.json +2 -2
  684. package/templates/pipeline/renovate.json +11 -0
  685. package/templates/pipeline/vitest.config.ts.tpl +3 -2
  686. package/templates/presets/identity/context/__context__.codes.named.ts.tpl +1 -0
  687. package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +1 -1
  688. package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +28 -1
  689. package/templates/presets/identity/context/domain/aggregates/invitation.aggregate.ts.tpl +13 -1
  690. package/templates/presets/identity/context/domain/aggregates/member.aggregate.ts.tpl +6 -1
  691. package/templates/presets/identity/context/domain/errors/invitation-withdrawn.error.named.ts.tpl +13 -0
  692. package/templates/presets/identity/context/domain/errors/invitation.error.factories.ts.tpl +8 -0
  693. package/templates/presets/identity/context/domain/services/role-rights.service.ts.tpl +23 -1
  694. package/templates/presets/identity/context/infrastructure/persistence/__context__.schema.drizzle.ts.tpl +1 -0
  695. package/templates/presets/identity/context/infrastructure/persistence/create-__context__-tables.schema.knex.ts.tpl +1 -0
  696. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +6 -2
  697. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +6 -2
  698. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +6 -2
  699. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +6 -2
  700. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +6 -2
  701. package/templates/presets/identity/context/infrastructure/persistence/invitation-row.schema.knex.ts.tpl +1 -0
  702. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.drizzle.ts.tpl +2 -0
  703. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.knex.ts.tpl +2 -0
  704. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.prisma.ts.tpl +2 -0
  705. package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +8 -5
  706. package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +8 -5
  707. package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +8 -5
  708. package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +8 -5
  709. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +8 -5
  710. package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.kit-routes.ts.tpl +1 -0
  711. package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.nest-routes.ts.tpl +1 -0
  712. package/templates/presets/identity/context/test/builders/invitation.builder.ts.tpl +15 -2
  713. package/templates/presets/identity/context/test/integration/invitation.repository.contract.spec.ts.tpl +10 -0
  714. package/templates/presets/identity/context/test/unit/accept-invitation.handler.spec.ts.tpl +114 -4
  715. package/templates/presets/identity/context/test/worlds/__context__.world.explicit.ts.tpl +1 -1
  716. package/templates/presets/identity/design.md.tpl +3 -1
  717. package/templates/presets/identity/prisma/models.prisma.tpl +1 -0
  718. package/templates/query/reader.fake.ts.tpl +4 -6
  719. package/templates/query/reader.in-memory.ts.tpl +1 -1
  720. package/templates/repository/drizzle/repository.ts.tpl +4 -3
  721. package/templates/repository/knex/table.tpl +1 -1
  722. package/templates/repository/prisma/repository.ts.tpl +24 -18
  723. package/templates/state-machine/state-machine.spec.ts.tpl +5 -0
  724. package/templates/init/platform/database/migration.knex.js.tpl +0 -8
@@ -0,0 +1,14 @@
1
+ import { CliError } from '../cli-error.js';
2
+ import { toName } from '../naming/index.js';
3
+ /**
4
+ * `Order` + `Order Confirmed` would name `OrderOrderConfirmed`: the event is named after its aggregate already.
5
+ * Asked where an event is created; a reference to an event that exists is never refused.
6
+ */
7
+ export function refuseStutteringEvent(scope, { aggregate, fact }) {
8
+ if (scope.flags.allowName || !fact.words.startsWith(`${aggregate.words} `)) {
9
+ return;
10
+ }
11
+ const alone = toName(fact.words.slice(aggregate.words.length + 1));
12
+ throw new CliError(`"${fact.pascal}" starts with the aggregate ${aggregate.pascal}: the event would be named ${aggregate.pascal}${fact.pascal}.`, `Give the fact alone, "${alone.pascal}" (the event is named ${aggregate.pascal}${alone.pascal}), or pass --allow-name if the name is right.`);
13
+ }
14
+ //# sourceMappingURL=refuse-stuttering-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refuse-stuttering-event.js","sourceRoot":"","sources":["../../src/generate/refuse-stuttering-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAc;IACjF,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;QAC3E,OAAO;IACT,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,IAAI,QAAQ,CAChB,IAAI,IAAI,CAAC,MAAM,+BAA+B,SAAS,CAAC,MAAM,8BAA8B,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,EAC7H,yBAAyB,KAAK,CAAC,MAAM,yBAAyB,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,+CAA+C,CAC7I,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAqBD,uJAAuJ;AACvJ,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAsG/D,CAAC"}
1
+ {"version":3,"file":"shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAqBD,uJAAuJ;AACvJ,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAuG/D,CAAC"}
@@ -74,6 +74,7 @@ export const SHARED_WRITES = {
74
74
  'package.json',
75
75
  'ddd-ts-kit.config.json',
76
76
  'docker-compose.yml',
77
+ '.env.example',
77
78
  '<platformDir>/config/load-config.ts',
78
79
  ],
79
80
  },
@@ -1 +1 @@
1
- {"version":3,"file":"shared-writes.js","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,GAAG;IACd,qEAAqE;IACrE,mEAAmE;CACpE,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,+DAA+D;IAC/D,gFAAgF;CACjF,CAAC;AAEF,MAAM,gBAAgB,GAAG,qCAAqC,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E;QACd,KAAK,EAAE,CAAC,gDAAgD,EAAE,eAAe,CAAC;QAC1E,IAAI,EAAE,GAAG,gBAAgB,+CAA+C;QACxE,MAAM,EAAE,oBAAoB;KAC7B;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,mDAAmD;YACnD,iEAAiE;YACjE,eAAe;SAChB;QACD,IAAI,EAAE,GAAG,gBAAgB,+CAA+C;QACxE,MAAM,EAAE,oBAAoB;KAC7B;CACF,CAAC"}
@@ -1,10 +1,19 @@
1
1
  import { type Name } from '../naming/index.js';
2
2
  import type { Scope } from './scope.js';
3
+ /** A name judged with the others the same command writes, each with how a refusal calls it. */
4
+ export interface Together {
5
+ readonly name: Name;
6
+ readonly alongside: readonly {
7
+ readonly name: Name;
8
+ readonly label: string;
9
+ }[];
10
+ }
3
11
  /**
4
12
  * Refuses a name that carries a technical word no term of the glossary holds, or a word the
5
13
  * glossary of the context does not define, the `qualifiers` aside (those of a refusal:
6
14
  * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through. A probe of the
7
- * language hears the name instead, and the generator goes on.
15
+ * language hears the name instead, and the generator goes on. The `alongside` names, written by the
16
+ * same command, are judged for unknown words with it, so that one refusal lists every missing term.
8
17
  */
9
- export declare function spokenInLanguage(scope: Scope, name: Name, qualifiers?: readonly string[]): void;
18
+ export declare function spokenInLanguage(scope: Scope, together: Name | Together, qualifiers?: readonly string[]): void;
10
19
  //# sourceMappingURL=spoken-in-language.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spoken-in-language.d.ts","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI,CAgBnG"}
1
+ {"version":3,"file":"spoken-in-language.d.ts","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,+FAA+F;AAC/F,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChF;AAOD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,UAAU,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI,CAoBlH"}
@@ -7,9 +7,11 @@ import { glossaryOf } from './glossary-of.js';
7
7
  * Refuses a name that carries a technical word no term of the glossary holds, or a word the
8
8
  * glossary of the context does not define, the `qualifiers` aside (those of a refusal:
9
9
  * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through. A probe of the
10
- * language hears the name instead, and the generator goes on.
10
+ * language hears the name instead, and the generator goes on. The `alongside` names, written by the
11
+ * same command, are judged for unknown words with it, so that one refusal lists every missing term.
11
12
  */
12
- export function spokenInLanguage(scope, name, qualifiers = []) {
13
+ export function spokenInLanguage(scope, together, qualifiers = []) {
14
+ const { name, alongside } = 'alongside' in together ? together : { name: together, alongside: [] };
13
15
  if (scope.flags.allowName) {
14
16
  return;
15
17
  }
@@ -19,26 +21,39 @@ export function spokenInLanguage(scope, name, qualifiers = []) {
19
21
  }
20
22
  const glossary = glossaryOf(scope);
21
23
  const file = `${scope.dir}/CONTEXT.md`;
22
- refuseTechnicalWords(name, glossary, file);
23
- refuseUnknownWords(name, { glossary, file, qualifiers });
24
+ const judged = [{ name, label: `"${name.pascal}"` }, ...alongside];
25
+ refuseTechnicalWords(judged, glossary, file);
26
+ refuseUnknownWords(judged, { glossary, file, qualifiers });
24
27
  }
25
- function refuseTechnicalWords(name, glossary, file) {
26
- const technical = technicalWordsOf(name.pascal, glossary);
27
- if (technical.length === 0) {
28
+ function refuseTechnicalWords(judged, glossary, file) {
29
+ const flawed = judged
30
+ .map(({ name, label }) => ({ name, label, technical: technicalWordsOf(name.pascal, glossary) }))
31
+ .filter(({ technical }) => technical.length > 0);
32
+ if (flawed.length === 0) {
28
33
  return;
29
34
  }
30
- throw new CliError(`"${name.pascal}" carries the technical word "${technical.join('", "')}".`, `Use the noun or verb a domain expert uses for it, a term of the ubiquitous language (rule language/no-technical-name). If the business does say "${name.title}", define the term in the glossary of ${file}, in the same command: --term "${name.title}=<what it means for the business>". --allow-name lets the name through without it.`);
35
+ const carries = flawed
36
+ .map(({ label, technical }) => `${label} carries the technical word "${technical.join('", "')}"`)
37
+ .join(' and ');
38
+ const terms = flawed.map(({ name }) => `--term "${name.title}=<what it means for the business>"`).join(' ');
39
+ throw new CliError(`${carries}.`, `Use the noun or verb a domain expert uses for it, a term of the ubiquitous language (rule language/no-technical-name). If the business does say ${flawed.map(({ name }) => `"${name.title}"`).join(' and ')}, define the term in the glossary of ${file}, in the same command: ${terms}. --allow-name lets the name through without it.`);
31
40
  }
32
- function refuseUnknownWords(name, { glossary, file, qualifiers }) {
33
- const unknown = unknownWords(name.pascal, glossary, qualifiers);
34
- if (unknown.length === 0) {
41
+ function refuseUnknownWords(names, { glossary, file, qualifiers }) {
42
+ const judged = names
43
+ .map(({ name, label }) => ({ label, unknown: unknownWords(name.pascal, glossary, qualifiers) }))
44
+ .filter(({ unknown }) => unknown.length > 0);
45
+ if (judged.length === 0) {
35
46
  return;
36
47
  }
37
48
  const terms = glossary.terms.length > 0
38
49
  ? `use an existing term (${glossary.terms.join(', ')})`
39
50
  : 'define the ubiquitous language first';
40
51
  const known = qualifiers.length > 0 ? `${terms} or a qualifier of a refusal (${qualifiers.join(', ')})` : terms;
52
+ const unknown = [...new Set(judged.flatMap((entry) => entry.unknown))];
41
53
  const flags = unknown.map((word) => `--term "${toName(word).pascal}=<what it means for the business>"`).join(' ');
42
- throw new CliError(`"${name.pascal}" uses ${unknown.map((word) => `"${word}"`).join(', ')}, which the glossary of ${file} does not define.`, `Either ${known}, or add the term in the same command: ${flags}. The glossary is written before the code (rule language/glossary-term).`);
54
+ const uses = judged
55
+ .map((entry) => `${entry.label} uses ${entry.unknown.map((word) => `"${word}"`).join(', ')}`)
56
+ .join(' and ');
57
+ throw new CliError(`${uses}, which the glossary of ${file} does not define.`, `Either ${known}, or add the term in the same command: ${flags}. The glossary is written before the code (rule language/glossary-term).`);
43
58
  }
44
59
  //# sourceMappingURL=spoken-in-language.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spoken-in-language.js","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAa,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,IAAU,EAAE,UAAU,GAAsB,EAAE;IAC3F,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACvC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CA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GAAG;QACvD,CAAC,CAAC,sCAAsC,CAAC;IAE7C,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,iCAAiC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAChH,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,oCAAoC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAElH,MAAM,IAAI,GAAG,MAAM;SAChB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC5F,IAAI,CAAC,OAAO,CAAC,CAAC;IAEjB,MAAM,IAAI,QAAQ,CAChB,GAAG,IAAI,2BAA2B,IAAI,mBAAmB,EACzD,UAAU,KAAK,0CAA0C,KAAK,0EAA0E,CACzI,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flag-notes.d.ts","sourceRoot":"","sources":["../../src/help/flag-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,uGAAuG;AACvG,eAAO,MAAM,UAAU,EAAE,SAAS,IAAI,EA6GrC,CAAC"}
1
+ {"version":3,"file":"flag-notes.d.ts","sourceRoot":"","sources":["../../src/help/flag-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,uGAAuG;AACvG,eAAO,MAAM,UAAU,EAAE,SAAS,IAAI,EAiHrC,CAAC"}
@@ -49,7 +49,11 @@ export const FLAG_NOTES = [
49
49
  'written; outside a git repository, every file whose content would change does; commit',
50
50
  'or stash first, then git diff shows what the kit rewrote; init --force keeps README.md,',
51
51
  'AGENTS.md, CLAUDE.md, the entry point and the pipeline definitions once written (listed',
52
- 'as kept) and merges .gitignore and .dockerignore, the lines of the team kept',
52
+ 'as kept) and merges .gitignore and .dockerignore, the lines of the team kept; the files it',
53
+ 'rewrites keep what their ddd-ts-kit:* regions, the roles, the Prisma datasource and the',
54
+ 'services of the compose file hold, and a note names, file by file, what it could not keep:',
55
+ 'a region this version does not hold, a marker without its partner, a roles object it',
56
+ 'cannot read to its end, the repositories left on the ORM a flag changed',
53
57
  ],
54
58
  },
55
59
  {
@@ -1 +1 @@
1
- {"version":3,"file":"flag-notes.js","sourceRoot":"","sources":["../../src/help/flag-notes.ts"],"names":[],"mappings":"AAEA,uGAAuG;AACvG,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE;YACL,wFAAwF;YACxF,oFAAoF;YACpF,sCAAsC;SACvC;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE;YACL,0FAA0F;YAC1F,8FAA8F;YAC9F,4FAA4F;SAC7F;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,8FAA8F;YAC9F,+FAA+F;YAC/F,gEAAgE;SACjE;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,yFAAyF;YACzF,yFAAyF;YACzF,4FAA4F;YAC5F,sFAAsF;YACtF,6FAA6F;YAC7F,uFAAuF;SACxF;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,yFAAyF;YACzF,uFAAuF;YACvF,qFAAqF;YACrF,uFAAuF;YACvF,yFAAyF;YACzF,yFAAyF;YACzF,8EAA8E;SAC/E;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,uFAAuF;YACvF,wFAAwF;YACxF,sFAAsF;YACtF,oFAAoF;SACrF;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,CAAC,6EAA6E,CAAC;KACvF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,6FAA6F;YAC7F,6FAA6F;YAC7F,yFAAyF;YACzF,mFAAmF;SACpF;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,wFAAwF;YACxF,2FAA2F;SAC5F;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,sFAAsF;YACtF,8CAA8C;SAC/C;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,sFAAsF;YACtF,wFAAwF;YACxF,yFAAyF;YACzF,qFAAqF;YACrF,oFAAoF;YACpF,+EAA+E;YAC/E,mFAAmF;YACnF,mFAAmF;YACnF,0DAA0D;SAC3D;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"flag-notes.js","sourceRoot":"","sources":["../../src/help/flag-notes.ts"],"names":[],"mappings":"AAEA,uGAAuG;AACvG,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE;YACL,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UAAU;QACnB,KAAK,EAAE;YACL,sFAAsF;YACtF,8CAA8C;SAC/C;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,sFAAsF;YACtF,wFAAwF;YACxF,yFAAyF;YACzF,qFAAqF;YACrF,oFAAoF;YACpF,+EAA+E;YAC/E,mFAAmF;YACnF,mFAAmF;YACnF,0DAA0D;SAC3D;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-notes.d.ts","sourceRoot":"","sources":["../../src/help/tool-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,yEAAyE;AACzE,eAAO,MAAM,UAAU,EAAE,SAAS,IAAI,EAqJrC,CAAC"}
1
+ {"version":3,"file":"tool-notes.d.ts","sourceRoot":"","sources":["../../src/help/tool-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,yEAAyE;AACzE,eAAO,MAAM,UAAU,EAAE,SAAS,IAAI,EAqKrC,CAAC"}
@@ -29,6 +29,8 @@ export const TOOL_NOTES = [
29
29
  'where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the',
30
30
  'journal it wrote with the Biome or Prettier of the format script, and warns when the',
31
31
  'SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);',
32
+ 'says first, exit code unchanged, when the migration will drop the tables of a declared',
33
+ 'context because the schema index no longer names them;',
32
34
  '--replay, after merging the trunk into a branch when both added migrations: when the',
33
35
  'history forks from --base <ref> (origin/main by default), deletes the migrations of the',
34
36
  'branch the base does not have, with their snapshots and journal entries, then generates',
@@ -39,6 +41,20 @@ export const TOOL_NOTES = [
39
41
  'then put back as it was',
40
42
  ],
41
43
  },
44
+ {
45
+ name: 'knex-generate',
46
+ command: 'knex-generate',
47
+ lines: [
48
+ 'the db:generate of a Knex project, which has no schema diff: compares the compiled',
49
+ 'createTables with the migrations replayed, both on PostgreSQL in process (no server), and',
50
+ 'writes the tables, columns and indexes the migrations lack, as SQL held in the migration,',
51
+ 'which then replays on a fresh database whatever createTables becomes; what it cannot',
52
+ 'write (a column or an object changed under its name, something dropped) and a statement',
53
+ 'that changes rows or removes something are listed in the migration as a TODO(domain);',
54
+ 'nothing differs, nothing is written; --custom writes the empty migration of knex, to fill',
55
+ 'by hand; a word after the name is refused',
56
+ ],
57
+ },
42
58
  {
43
59
  name: 'error-factories',
44
60
  command: 'error-factories',
@@ -1 +1 @@
1
- {"version":3,"file":"tool-notes.js","sourceRoot":"","sources":["../../src/help/tool-notes.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,uFAAuF;YACvF,oFAAoF;YACpF,iFAAiF;YACjF,kFAAkF;YAClF,iFAAiF;YACjF,yDAAyD;SAC1D;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE;YACL,yFAAyF;YACzF,0FAA0F;SAC3F;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE;YACL,6FAA6F;YAC7F,0FAA0F;YAC1F,uFAAuF;YACvF,sFAAsF;YACtF,uFAAuF;YACvF,sFAAsF;YACtF,yFAAyF;YACzF,yFAAyF;YACzF,kFAAkF;YAClF,oFAAoF;YACpF,uFAAuF;YACvF,uFAAuF;YACvF,yBAAyB;SAC1B;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE;YACL,0FAA0F;YAC1F,yFAAyF;YACzF,uFAAuF;YACvF,uFAAuF;YACvF,oFAAoF;YACpF,sFAAsF;YACtF,wFAAwF;YACxF,gFAAgF;SACjF;KAC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F;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,0FAA0F;YAC1F,2FAA2F;YAC3F,8FAA8F;SAC/F;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"tool-notes.js","sourceRoot":"","sources":["../../src/help/tool-notes.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE;YACL,uFAAuF;YACvF,oFAAoF;YACpF,iFAAiF;YACjF,kFAAkF;YAClF,iFAAiF;YACjF,yDAAyD;SAC1D;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE;YACL,yFAAyF;YACzF,0FAA0F;SAC3F;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE;YACL,6FAA6F;YAC7F,0FAA0F;YAC1F,uFAAuF;YACvF,sFAAsF;YACtF,uFAAuF;YACvF,wFAAwF;YACxF,wDAAwD;YACxD,sFAAsF;YACtF,yFAAyF;YACzF,yFAAyF;YACzF,kFAAkF;YAClF,oFAAoF;YACpF,uFAAuF;YACvF,uFAAuF;YACvF,yBAAyB;SAC1B;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE;YACL,oFAAoF;YACpF,2FAA2F;YAC3F,2FAA2F;YAC3F,sFAAsF;YACtF,yFAAyF;YACzF,uFAAuF;YACvF,2FAA2F;YAC3F,2CAA2C;SAC5C;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE;YACL,0FAA0F;YAC1F,yFAAyF;YACzF,uFAAuF;YACvF,uFAAuF;YACvF,oFAAoF;YACpF,sFAAsF;YACtF,wFAAwF;YACxF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,gBAAgB;SACjB;KACF;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,0FAA0F;YAC1F,2FAA2F;YAC3F,8FAA8F;SAC/F;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,eAAO,MAAM,aAAa,wGAC6E,CAAC;AAExG,8GAA8G;AAC9G,eAAO,MAAM,KAAK,QAwEW,CAAC"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,eAAO,MAAM,aAAa,wGAC6E,CAAC;AAExG,8GAA8G;AAC9G,eAAO,MAAM,KAAK,QAyEW,CAAC"}
@@ -53,6 +53,7 @@ export const USAGE = `Usage
53
53
  ddd-ts-kit build-aliases [--project <tsconfig>]
54
54
  ddd-ts-kit drizzle-generate --name <what-it-does> [--custom]
55
55
  ddd-ts-kit drizzle-generate --replay [--base <git-ref>]
56
+ ddd-ts-kit knex-generate --name <what-it-does> [--custom]
56
57
  ddd-ts-kit prisma-generate --name <what-it-does>
57
58
  ddd-ts-kit typeorm-generate <folder>/<what-it-does>
58
59
  ddd-ts-kit error-factories --plan | --apply [--to named|factories] [--dry-run]
@@ -1 +1 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,sFAAsF;AACtF,MAAM,CAAC,MAAM,aAAa,GACxB,qGAAqG,CAAC;AAExG,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;mCAoBc,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpF,aAAa;;6BAEc,CAAC"}
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,sFAAsF;AACtF,MAAM,CAAC,MAAM,aAAa,GACxB,qGAAqG,CAAC;AAExG,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;mCAoBc,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDpF,aAAa;;6BAEc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-permissions.d.ts","sourceRoot":"","sources":["../../src/init/agent-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAE7F,gGAAgG;AAChG,KAAK,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAUvC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB,CAEpE;AAoDD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAK5C,CAAC"}
1
+ {"version":3,"file":"agent-permissions.d.ts","sourceRoot":"","sources":["../../src/init/agent-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAE7F,gGAAgG;AAChG,KAAK,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAUvC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB,CAEpE;AA0DD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAK5C,CAAC"}
@@ -59,6 +59,12 @@ const DENY = [
59
59
  'Read(./.env.production)',
60
60
  'Read(./.env.development)',
61
61
  'Read(./.env.test)',
62
+ 'Read(./.env.staging)',
63
+ 'Read(./.env.stage)',
64
+ 'Read(./.env.prod)',
65
+ 'Read(./.env.preview)',
66
+ 'Read(./.env.ci)',
67
+ 'Read(./.envrc)',
62
68
  ];
63
69
  /**
64
70
  * The generated contracts and the lock of an acceptance, which `docs:generate` and
@@ -75,9 +81,10 @@ export const GENERATED_FILES = [
75
81
  // Then the generated files: an ask rule keeps the Edit tool off them without reaching the sandbox,
76
82
  // which takes the allow and deny rules only, and the guard of the plugin refuses a hand edit of
77
83
  // one outright. Then the files that hold the rules and the pipeline: changing one is a decision of
78
- // the project owner, the same list as the editor hook of the plugin asks about. The review policy
79
- // holds a rule of the project too. Before them, --force, which replaces files of the project with
80
- // the templates of the kit: the person decides, the allow rule of generate notwithstanding.
84
+ // the project owner; `GOVERNED_FILES` of the guard of the plugin names most of the same pipeline and gate
85
+ // files, and not `.github/copilot/settings.json`. The review policy holds a rule of the project too.
86
+ // Before them, --force, which replaces files of the project with the templates of the kit: the person
87
+ // decides, the allow rule of generate notwithstanding.
81
88
  const ASK = [
82
89
  'Bash(git push *)',
83
90
  'Bash(npm publish *)',
@@ -99,7 +106,15 @@ const ASK = [
99
106
  'Edit(./knip.json)',
100
107
  'Edit(./lefthook.yml)',
101
108
  'Edit(./.gitlab-ci.yml)',
109
+ 'Edit(./.gitlab/**)',
102
110
  'Edit(./.github/workflows/**)',
111
+ 'Edit(./.github/actions/**)',
112
+ 'Edit(./.github/scripts/**)',
113
+ 'Edit(./.github/dependabot.yml)',
114
+ 'Edit(./renovate.json)',
115
+ 'Edit(./stryker.config.mjs)',
116
+ 'Edit(./pnpm-workspace.yaml)',
117
+ 'Edit(./.claude/hooks/**)',
103
118
  'Edit(./.claude/settings.json)',
104
119
  'Edit(./.github/copilot/settings.json)',
105
120
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"agent-permissions.js","sourceRoot":"","sources":["../../src/init/agent-permissions.ts"],"names":[],"mappings":"AAOA,kHAAkH;AAClH,MAAM,UAAU,GAAqC;IACnD,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,mBAAmB;CAC5B,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAC5E,CAAC;AAED,MAAM,KAAK,GAAsB;IAC/B,8BAA8B;IAC9B,qCAAqC;IACrC,8BAA8B;IAC9B,mCAAmC;IACnC,8BAA8B;IAC9B,oCAAoC;IACpC,8BAA8B;IAC9B,gCAAgC;IAChC,+BAA+B;IAC/B,iCAAiC;IACjC,mCAAmC;IACnC,qCAAqC;IACrC,oCAAoC;IACpC,kCAAkC;IAClC,oCAAoC;IACpC,6BAA6B;IAC7B,iCAAiC;IACjC,6BAA6B;IAC7B,gCAAgC;IAChC,4BAA4B;IAC5B,sBAAsB;IACtB,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,0BAA0B;IAC1B,0BAA0B;IAC1B,6BAA6B;IAC7B,0BAA0B;IAC1B,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GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,oBAAoB;IACpB,qCAAqC;IACrC,2CAA2C;IAC3C,gDAAgD;CACjD,CAAC;AAEF,mGAAmG;AACnG,gGAAgG;AAChG,mGAAmG;AACnG,0GAA0G;AAC1G,qGAAqG;AACrG,sGAAsG;AACtG,uDAAuD;AACvD,MAAM,GAAG,GAAsB;IAC7B,kBAAkB;IAClB,qBAAqB;IACrB,8CAA8C;IAC9C,8CAA8C;IAC9C,gDAAgD;IAChD,gDAAgD;IAChD,wCAAwC;IACxC,0CAA0C;IAC1C,oCAAoC;IACpC,sCAAsC;IACtC,GAAG,eAAe;IAClB,gCAAgC;IAChC,kCAAkC;IAClC,mBAAmB;IACnB,2BAA2B;IAC3B,oBAAoB;IACpB,iCAAiC;IACjC,mBAAmB;IACnB,sBAAsB;IACtB,wBAAwB;IACxB,oBAAoB;IACpB,8BAA8B;IAC9B,4BAA4B;IAC5B,4BAA4B;IAC5B,gCAAgC;IAChC,uBAAuB;IACvB,4BAA4B;IAC5B,6BAA6B;IAC7B,0BAA0B;IAC1B,+BAA+B;IAC/B,uCAAuC;CACxC,CAAC;AAEF;;;;GAIG;AACH,SAAS,UAAU,CAAC,EAAE,KAAK,EAAa;IACtC,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEzC,OAAO;QACL,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,UAAU,MAAM,CAAC,CAAC;QACjE,oBAAoB;QACpB,4BAA4B;QAC5B,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audit-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/audit-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgB5C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAwBrD"}
1
+ {"version":3,"file":"audit-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/audit-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgB5C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAyBrD"}
@@ -27,6 +27,7 @@ export function auditFiles(config) {
27
27
  const hasModule = family === 'tsyringe' || http !== 'none';
28
28
  return [
29
29
  file('create-audit.ts'),
30
+ file('create-audit-trail.ts'),
30
31
  file('audited-events.ts'),
31
32
  ...when(hasModule, [file('audit.module.ts', family)]),
32
33
  ...when(http !== 'none', [
@@ -1 +1 @@
1
- {"version":3,"file":"audit-files.js","sourceRoot":"","sources":["../../../src/init/files/audit-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,SAAS,GAAG;IAChB,sBAAsB;IACtB,oDAAoD;IACpD,sDAAsD;IACtD,8GAA8G;IAC9G,wCAAwC;IACxC,kDAAkD;IAClD,iDAAiD;IACjD,0CAA0C;IAC1C,6CAA6C;CAC9C,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,OAAgB,EAAY,EAAE,CA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GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,OAAgB,EAAY,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAE1G,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,sGAAsG;IACtG,MAAM,SAAS,GAAG,MAAM,KAAK,UAAU,IAAI,IAAI,KAAK,MAAM,CAAC;IAE3D,OAAO;QACL,IAAI,CAAC,iBAAiB,CAAC;QACvB,IAAI,CAAC,uBAAuB,CAAC;QAC7B,IAAI,CAAC,mBAAmB,CAAC;QACzB,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;QACrD,GAAG,IAAI,CACL,IAAI,KAAK,MAAM,EACf;YACE,GAAG,SAAS;YACZ,6CAA6C,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,KAAK;SAC/G,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC5B;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"persistence-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/persistence-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmE5C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAe3D"}
1
+ {"version":3,"file":"persistence-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/persistence-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAoE5C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAe3D"}
@@ -49,7 +49,8 @@ const TOOLING = {
49
49
  ],
50
50
  knex: [
51
51
  ['knexfile.js', 'init/platform/database/knexfile.js.tpl'],
52
- ['migrations/00000000000000_initial.js', 'init/platform/database/migration.knex.js.tpl'],
52
+ // The folder, with no migration yet: `db:migrate` applies nothing instead of failing on a project that has generated none.
53
+ ['migrations/.gitkeep', 'init/platform/database/gitkeep'],
53
54
  ],
54
55
  prisma: [
55
56
  [PRISMA_MAIN_SCHEMA, 'init/platform/database/schema.prisma.tpl'],
@@ -1 +1 @@
1
- {"version":3,"file":"persistence-files.js","sourceRoot":"","sources":["../../../src/init/files/persistence-files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,MAAM,KAAK,GAAG,sBAAsB,CAAC;AAErC,MAAM,SAAS,GAAa;IAC1B,CAAC,gBAAgB,EAAE,QAAQ,CAAC;IAC5B,CAAC,qBAAqB,EAAE,QAAQ,CAAC;IACjC,CAAC,KAAK,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,2GAA2G;AAC3G,MAAM,WAAW,GAAuC;IACtD,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,mCAAmC,CAAC,CAAC;IAC7D,OAAO,EAAE;QACP,GAAG,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC;QAClC,CAAC,aAAa,EAAE,SAAS,CAAC;QAC1B,CAAC,wBAAwB,EAAE,SAAS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,QAAQ,CAAC,GAAG,CAAC,EAAE;YACnC,CAAC,wCAAwC,EAAE,sDAAsD,CAAC;SACnG,CAAC;QACF,GAAG,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACvD,CAAC,wCAAwC,EAAE,sDAAsD,CAAC;SACnG,CAAC;KACH,CAAC;AACJ,CAAC;AAED,iIAAiI;AACjI,SAAS,yBAAyB,CAAC,MAAc;IAC/C,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,UAAU,CAAC;AACxE,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Config } from '../../config/index.js';
2
2
  import type { InitFile } from './init-file.js';
3
- /** The contracts and, with `--privacy on`, the two requests of a data subject the platform answers from the command line and its purge. */
3
+ /**
4
+ * The contracts; with `--privacy on`, the two requests of a data subject the platform answers from
5
+ * the command line and its purge; with an audit trail in the database, its verification.
6
+ */
4
7
  export declare function scriptFiles(config: Config): InitFile[];
5
8
  //# sourceMappingURL=script-files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/script-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,2IAA2I;AAC3I,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAYtD"}
1
+ {"version":3,"file":"script-files.d.ts","sourceRoot":"","sources":["../../../src/init/files/script-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAatD"}
@@ -1,6 +1,10 @@
1
+ import { auditVars } from '../../stack/audit-vars.js';
1
2
  import { familyOf } from './family-of.js';
2
3
  import { when } from './when.js';
3
- /** The contracts and, with `--privacy on`, the two requests of a data subject the platform answers from the command line and its purge. */
4
+ /**
5
+ * The contracts; with `--privacy on`, the two requests of a data subject the platform answers from
6
+ * the command line and its purge; with an audit trail in the database, its verification.
7
+ */
4
8
  export function scriptFiles(config) {
5
9
  const family = familyOf(config);
6
10
  return [
@@ -11,6 +15,7 @@ export function scriptFiles(config) {
11
15
  ['scripts/privacy-export.ts', `init/scripts/privacy-export.${family}.ts.tpl`],
12
16
  ['scripts/privacy-purge.ts', `init/scripts/privacy-purge.${family}.ts.tpl`],
13
17
  ]),
18
+ ...when(auditVars(config)['sql'] === true, [['scripts/audit-verify.ts', 'init/scripts/audit-verify.ts.tpl']]),
14
19
  ];
15
20
  }
16
21
  //# sourceMappingURL=script-files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-files.js","sourceRoot":"","sources":["../../../src/init/files/script-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,2IAA2I;AAC3I,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO;QACL,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,CAAC,CAAC;QAC9F,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;QACnD,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;YACrC,CAAC,0BAA0B,EAAE,8BAA8B,MAAM,SAAS,CAAC;YAC3E,CAAC,2BAA2B,EAAE,+BAA+B,MAAM,SAAS,CAAC;YAC7E,CAAC,0BAA0B,EAAE,8BAA8B,MAAM,SAAS,CAAC;SAC5E,CAAC;KACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"script-files.js","sourceRoot":"","sources":["../../../src/init/files/script-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO;QACL,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,CAAC,CAAC;QAC9F,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;QACnD,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;YACrC,CAAC,0BAA0B,EAAE,8BAA8B,MAAM,SAAS,CAAC;YAC3E,CAAC,2BAA2B,EAAE,+BAA+B,MAAM,SAAS,CAAC;YAC7E,CAAC,0BAA0B,EAAE,8BAA8B,MAAM,SAAS,CAAC;SAC5E,CAAC;QACF,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,yBAAyB,EAAE,kCAAkC,CAAC,CAAC,CAAC;KAC9G,CAAC;AACJ,CAAC"}
@@ -2,8 +2,8 @@ import type { Config } from '../config/index.js';
2
2
  /**
3
3
  * Whether `init` writes this file once and leaves it to the team from then on, `--force` included:
4
4
  * the README, the guides of the agents, the entry point and the pipeline definitions, which a team
5
- * edits from its first day. The kit cannot tell an edited one from one it wrote, so it never
6
- * rewrites one that exists.
5
+ * edits from its first day, and the journal of the migrations. The kit cannot tell an edited one
6
+ * from one it wrote, so it never rewrites one that exists.
7
7
  */
8
8
  export declare function isTeamFile(config: Pick<Config, 'sourceRoot'>, target: string): boolean;
9
9
  //# sourceMappingURL=is-team-file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-team-file.d.ts","sourceRoot":"","sources":["../../src/init/is-team-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKtF"}
1
+ {"version":3,"file":"is-team-file.d.ts","sourceRoot":"","sources":["../../src/init/is-team-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMxC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKtF"}
@@ -1,12 +1,14 @@
1
1
  import { isPipelineDefinition } from './is-pipeline-definition.js';
2
+ /** The journal of drizzle-kit: written empty, then the list of the migrations of the project. Emptied, the next `db:generate` would create every table again. */
3
+ const DRIZZLE_JOURNAL = 'migrations/meta/_journal.json';
2
4
  /**
3
5
  * Whether `init` writes this file once and leaves it to the team from then on, `--force` included:
4
6
  * the README, the guides of the agents, the entry point and the pipeline definitions, which a team
5
- * edits from its first day. The kit cannot tell an edited one from one it wrote, so it never
6
- * rewrites one that exists.
7
+ * edits from its first day, and the journal of the migrations. The kit cannot tell an edited one
8
+ * from one it wrote, so it never rewrites one that exists.
7
9
  */
8
10
  export function isTeamFile(config, target) {
9
- return (['README.md', 'AGENTS.md', 'CLAUDE.md', `${config.sourceRoot}/main.ts`].includes(target) ||
11
+ return (['README.md', 'AGENTS.md', 'CLAUDE.md', `${config.sourceRoot}/main.ts`, DRIZZLE_JOURNAL].includes(target) ||
10
12
  isPipelineDefinition(target));
11
13
  }
12
14
  //# sourceMappingURL=is-team-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-team-file.js","sourceRoot":"","sources":["../../src/init/is-team-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAkC,EAAE,MAAc;IAC3E,OAAO,CACL,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,UAAU,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;QACxF,oBAAoB,CAAC,MAAM,CAAC,CAC7B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"is-team-file.js","sourceRoot":"","sources":["../../src/init/is-team-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,iKAAiK;AACjK,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAExD;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAkC,EAAE,MAAc;IAC3E,OAAO,CACL,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,UAAU,UAAU,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;QACzG,oBAAoB,CAAC,MAAM,CAAC,CAC7B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ /** What the file before held and the text could not take: the region, its lines when they are known, and why. */
2
+ export interface OrphanedRegion {
3
+ readonly region: string;
4
+ readonly lines: readonly string[];
5
+ readonly why: string;
6
+ }
7
+ /** The file as the template writes it, with what the regions of the file before held, and what no region could take. */
8
+ export interface KeptRegions {
9
+ readonly text: string;
10
+ /** The lines of the file before that the text now holds, which the imports they name go with. */
11
+ readonly kept: readonly string[];
12
+ readonly orphaned: readonly OrphanedRegion[];
13
+ }
14
+ /**
15
+ * A region the template leaves empty belongs to the generators and to the team, the value a
16
+ * gateway was given included: what it holds in the file stays, wherever the template now puts the
17
+ * region and whatever the template now says around it. A region the template fills (`run-jobs`, by
18
+ * the config) is rendered again. Two regions of one name are matched in their order.
19
+ */
20
+ export declare function keepRegions(written: string, existing: string): KeptRegions;
21
+ //# sourceMappingURL=keep-regions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keep-regions.d.ts","sourceRoot":"","sources":["../../src/init/keep-regions.ts"],"names":[],"mappings":"AAEA,iHAAiH;AACjH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,wHAAwH;AACxH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,CA+B1E"}
@@ -0,0 +1,63 @@
1
+ import { regionsOf, REGION_MARKER, unpairedMarkers } from '../markers/index.js';
2
+ /**
3
+ * A region the template leaves empty belongs to the generators and to the team, the value a
4
+ * gateway was given included: what it holds in the file stays, wherever the template now puts the
5
+ * region and whatever the template now says around it. A region the template fills (`run-jobs`, by
6
+ * the config) is rendered again. Two regions of one name are matched in their order.
7
+ */
8
+ export function keepRegions(written, existing) {
9
+ const before = existing.split('\n');
10
+ const after = written.split('\n');
11
+ const regions = regionsOf(before);
12
+ const held = regions.filter((region) => bodyOf(before, region).some(isText));
13
+ const places = regionsOf(after);
14
+ const paired = held.map((region) => ({ region, place: placeOf(region, { regions, places }) }));
15
+ const taken = paired.filter(({ place }) => place !== undefined && !bodyOf(after, place).some(isText));
16
+ for (const { region, place } of taken.toReversed()) {
17
+ if (place !== undefined) {
18
+ after.splice(place.open + 1, place.close - place.open - 1, ...bodyOf(before, region));
19
+ }
20
+ }
21
+ const text = after.join('\n');
22
+ const orphans = paired.filter(({ place }) => place === undefined).map(({ region }) => region);
23
+ return {
24
+ text,
25
+ kept: taken.flatMap(({ region }) => bodyOf(before, region)),
26
+ orphaned: [
27
+ ...orphans.map((region) => ({
28
+ region: region.name,
29
+ lines: bodyOf(before, region).filter(isText),
30
+ why: 'this version has no such region and the tree does not say them',
31
+ })),
32
+ ...withoutTheirRegion({ before, text, regions, places }),
33
+ ...unpairedMarkers(before).map(unpaired),
34
+ ],
35
+ };
36
+ }
37
+ function unpaired(region) {
38
+ return {
39
+ region,
40
+ lines: [],
41
+ why: `the marker ddd-ts-kit:${region} has no partner, so what it marked was not read as a region`,
42
+ };
43
+ }
44
+ /** A region of the template the file does not hold, its markers removed by hand: the lines of the file the text no longer has are those it held, or what this version changed. */
45
+ function withoutTheirRegion({ before, text, regions, places }) {
46
+ const absent = places.find((place) => !regions.some(({ name }) => name === place.name));
47
+ const lost = before.filter((line) => isText(line) && !REGION_MARKER.test(line) && !text.includes(line.trim()));
48
+ return absent === undefined || lost.length === 0
49
+ ? []
50
+ : [{ region: absent.name, lines: lost, why: 'the file has no such region to read them from' }];
51
+ }
52
+ function bodyOf(lines, { open, close }) {
53
+ return lines.slice(open + 1, close);
54
+ }
55
+ function isText(line) {
56
+ return line.trim() !== '';
57
+ }
58
+ /** The region of the template that matches one of the file: the same name, the same rank among those of that name. */
59
+ function placeOf(region, { regions, places }) {
60
+ const named = (candidate) => candidate.name === region.name;
61
+ return places.filter(named)[regions.filter(named).indexOf(region)];
62
+ }
63
+ //# sourceMappingURL=keep-regions.js.map
@@ -0,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@ -1 +1 @@
1
- {"version":3,"file":"kept-combination-notes.d.ts","sourceRoot":"","sources":["../../src/init/kept-combination-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKtE,uHAAuH;AACvH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,CAO/E"}
1
+ {"version":3,"file":"kept-combination-notes.d.ts","sourceRoot":"","sources":["../../src/init/kept-combination-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKtE,uHAAuH;AACvH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,CAQ/E"}