ddd-ts-kit 0.102.0 → 0.103.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 (548) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/README.fr.md +8 -9
  3. package/README.md +7 -8
  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/errors/kit-error-codes.d.ts.map +1 -1
  14. package/dist/check/errors/kit-error-codes.js +1 -0
  15. package/dist/check/errors/kit-error-codes.js.map +1 -1
  16. package/dist/check/explain/authz-docs.js +1 -1
  17. package/dist/check/explain/authz-docs.js.map +1 -1
  18. package/dist/check/explain/errors-docs.js +1 -1
  19. package/dist/check/explain/errors-docs.js.map +1 -1
  20. package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
  21. package/dist/check/fixtures/authz-policy-fixtures.js +13 -1
  22. package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
  23. package/dist/check/rules/authz-policy-asked.d.ts.map +1 -1
  24. package/dist/check/rules/authz-policy-asked.js +45 -6
  25. package/dist/check/rules/authz-policy-asked.js.map +1 -1
  26. package/dist/check/rules/test-spec-required.d.ts.map +1 -1
  27. package/dist/check/rules/test-spec-required.js +3 -1
  28. package/dist/check/rules/test-spec-required.js.map +1 -1
  29. package/dist/check/scan/named-outside-imports.d.ts +3 -0
  30. package/dist/check/scan/named-outside-imports.d.ts.map +1 -0
  31. package/dist/check/scan/named-outside-imports.js +8 -0
  32. package/dist/check/scan/named-outside-imports.js.map +1 -0
  33. package/dist/check/scan/star-exports-of.d.ts +3 -0
  34. package/dist/check/scan/star-exports-of.d.ts.map +1 -0
  35. package/dist/check/scan/star-exports-of.js +8 -0
  36. package/dist/check/scan/star-exports-of.js.map +1 -0
  37. package/dist/check/scan/string-at.d.ts +3 -0
  38. package/dist/check/scan/string-at.d.ts.map +1 -0
  39. package/dist/check/scan/string-at.js +5 -0
  40. package/dist/check/scan/string-at.js.map +1 -0
  41. package/dist/check/text/closing-bracket.d.ts +6 -0
  42. package/dist/check/text/closing-bracket.d.ts.map +1 -0
  43. package/dist/check/text/closing-bracket.js +24 -0
  44. package/dist/check/text/closing-bracket.js.map +1 -0
  45. package/dist/commands/depcruise-config.d.ts.map +1 -1
  46. package/dist/commands/depcruise-config.js +4 -0
  47. package/dist/commands/depcruise-config.js.map +1 -1
  48. package/dist/commands/drizzle-generate.d.ts +3 -2
  49. package/dist/commands/drizzle-generate.d.ts.map +1 -1
  50. package/dist/commands/drizzle-generate.js +14 -6
  51. package/dist/commands/drizzle-generate.js.map +1 -1
  52. package/dist/commands/generate.d.ts.map +1 -1
  53. package/dist/commands/generate.js +3 -2
  54. package/dist/commands/generate.js.map +1 -1
  55. package/dist/commands/knex-generate.d.ts +10 -0
  56. package/dist/commands/knex-generate.d.ts.map +1 -0
  57. package/dist/commands/knex-generate.js +74 -0
  58. package/dist/commands/knex-generate.js.map +1 -0
  59. package/dist/commands/lint.js +15 -0
  60. package/dist/commands/lint.js.map +1 -1
  61. package/dist/commands/move-to-module.d.ts.map +1 -1
  62. package/dist/commands/move-to-module.js +3 -0
  63. package/dist/commands/move-to-module.js.map +1 -1
  64. package/dist/commands/mutation.js +1 -1
  65. package/dist/commands/mutation.js.map +1 -1
  66. package/dist/commands/parse-migration-arguments.d.ts +11 -0
  67. package/dist/commands/parse-migration-arguments.d.ts.map +1 -0
  68. package/dist/commands/parse-migration-arguments.js +17 -0
  69. package/dist/commands/parse-migration-arguments.js.map +1 -0
  70. package/dist/commands/prisma-generate.d.ts.map +1 -1
  71. package/dist/commands/prisma-generate.js +5 -11
  72. package/dist/commands/prisma-generate.js.map +1 -1
  73. package/dist/commands/typeorm-generate.d.ts +2 -1
  74. package/dist/commands/typeorm-generate.d.ts.map +1 -1
  75. package/dist/commands/typeorm-generate.js +5 -2
  76. package/dist/commands/typeorm-generate.js.map +1 -1
  77. package/dist/doctor/permission-findings.d.ts.map +1 -1
  78. package/dist/doctor/permission-findings.js +68 -4
  79. package/dist/doctor/permission-findings.js.map +1 -1
  80. package/dist/generate/concept-role.d.ts +10 -0
  81. package/dist/generate/concept-role.d.ts.map +1 -1
  82. package/dist/generate/concept.d.ts.map +1 -1
  83. package/dist/generate/concept.js +5 -1
  84. package/dist/generate/concept.js.map +1 -1
  85. package/dist/generate/emit.d.ts +5 -2
  86. package/dist/generate/emit.d.ts.map +1 -1
  87. package/dist/generate/emit.js +5 -4
  88. package/dist/generate/emit.js.map +1 -1
  89. package/dist/generate/event-names.d.ts.map +1 -1
  90. package/dist/generate/event-names.js.map +1 -1
  91. package/dist/generate/files-without-modules.d.ts +8 -0
  92. package/dist/generate/files-without-modules.d.ts.map +1 -0
  93. package/dist/generate/files-without-modules.js +12 -0
  94. package/dist/generate/files-without-modules.js.map +1 -0
  95. package/dist/generate/grant-permission.js +2 -2
  96. package/dist/generate/grant-permission.js.map +1 -1
  97. package/dist/generate/kinds/aggregate-kind.js +4 -4
  98. package/dist/generate/kinds/aggregate-kind.js.map +1 -1
  99. package/dist/generate/kinds/command-kind.d.ts.map +1 -1
  100. package/dist/generate/kinds/command-kind.js +6 -1
  101. package/dist/generate/kinds/command-kind.js.map +1 -1
  102. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  103. package/dist/generate/kinds/declare-storage.js +4 -10
  104. package/dist/generate/kinds/declare-storage.js.map +1 -1
  105. package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
  106. package/dist/generate/kinds/domain-event-kind.js +3 -1
  107. package/dist/generate/kinds/domain-event-kind.js.map +1 -1
  108. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  109. package/dist/generate/kinds/e2e-kind.js +8 -1
  110. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  111. package/dist/generate/kinds/ensure-domain-event.d.ts.map +1 -1
  112. package/dist/generate/kinds/ensure-domain-event.js +2 -0
  113. package/dist/generate/kinds/ensure-domain-event.js.map +1 -1
  114. package/dist/generate/kinds/extraction/add-compose-service.js +1 -1
  115. package/dist/generate/kinds/extraction/add-compose-service.js.map +1 -1
  116. package/dist/generate/kinds/extraction/compose-service-of.d.ts +5 -0
  117. package/dist/generate/kinds/extraction/compose-service-of.d.ts.map +1 -0
  118. package/dist/generate/kinds/extraction/compose-service-of.js +8 -0
  119. package/dist/generate/kinds/extraction/compose-service-of.js.map +1 -0
  120. package/dist/generate/kinds/gateway-kind.js +9 -0
  121. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  122. package/dist/generate/kinds/generate-context.d.ts.map +1 -1
  123. package/dist/generate/kinds/generate-context.js +36 -0
  124. package/dist/generate/kinds/generate-context.js.map +1 -1
  125. package/dist/generate/kinds/generate-repository.d.ts.map +1 -1
  126. package/dist/generate/kinds/generate-repository.js +13 -0
  127. package/dist/generate/kinds/generate-repository.js.map +1 -1
  128. package/dist/generate/kinds/query-kind.d.ts.map +1 -1
  129. package/dist/generate/kinds/query-kind.js +24 -2
  130. package/dist/generate/kinds/query-kind.js.map +1 -1
  131. package/dist/generate/kinds/route/find-use-case.js +1 -1
  132. package/dist/generate/kinds/route/find-use-case.js.map +1 -1
  133. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  134. package/dist/generate/kinds/service-kind.js +3 -2
  135. package/dist/generate/kinds/service-kind.js.map +1 -1
  136. package/dist/generate/kinds/tables-files.d.ts +3 -0
  137. package/dist/generate/kinds/tables-files.d.ts.map +1 -0
  138. package/dist/generate/kinds/tables-files.js +7 -0
  139. package/dist/generate/kinds/tables-files.js.map +1 -0
  140. package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
  141. package/dist/generate/kinds/worker-kind.js +12 -0
  142. package/dist/generate/kinds/worker-kind.js.map +1 -1
  143. package/dist/generate/kinds/write-birth.d.ts +8 -0
  144. package/dist/generate/kinds/write-birth.d.ts.map +1 -0
  145. package/dist/generate/kinds/write-birth.js +13 -0
  146. package/dist/generate/kinds/write-birth.js.map +1 -0
  147. package/dist/generate/kinds/write-event-sourced-aggregate.d.ts.map +1 -1
  148. package/dist/generate/kinds/write-event-sourced-aggregate.js +8 -1
  149. package/dist/generate/kinds/write-event-sourced-aggregate.js.map +1 -1
  150. package/dist/generate/mark-policy-questions.js +2 -2
  151. package/dist/generate/mark-policy-questions.js.map +1 -1
  152. package/dist/generate/permission-name.d.ts +3 -0
  153. package/dist/generate/permission-name.d.ts.map +1 -0
  154. package/dist/generate/permission-name.js +3 -0
  155. package/dist/generate/permission-name.js.map +1 -0
  156. package/dist/generate/permission-named.d.ts.map +1 -1
  157. package/dist/generate/permission-named.js +1 -1
  158. package/dist/generate/permission-named.js.map +1 -1
  159. package/dist/generate/permission-words.d.ts +7 -0
  160. package/dist/generate/permission-words.d.ts.map +1 -0
  161. package/dist/generate/permission-words.js +11 -0
  162. package/dist/generate/permission-words.js.map +1 -0
  163. package/dist/generate/refined-by-policy.js +2 -2
  164. package/dist/generate/refined-by-policy.js.map +1 -1
  165. package/dist/generate/refuse-stuttering-event.d.ts +8 -0
  166. package/dist/generate/refuse-stuttering-event.d.ts.map +1 -0
  167. package/dist/generate/refuse-stuttering-event.js +14 -0
  168. package/dist/generate/refuse-stuttering-event.js.map +1 -0
  169. package/dist/generate/shared-writes.d.ts.map +1 -1
  170. package/dist/generate/shared-writes.js +1 -0
  171. package/dist/generate/shared-writes.js.map +1 -1
  172. package/dist/generate/spoken-in-language.d.ts +11 -2
  173. package/dist/generate/spoken-in-language.d.ts.map +1 -1
  174. package/dist/generate/spoken-in-language.js +27 -12
  175. package/dist/generate/spoken-in-language.js.map +1 -1
  176. package/dist/help/flag-notes.d.ts.map +1 -1
  177. package/dist/help/flag-notes.js +5 -1
  178. package/dist/help/flag-notes.js.map +1 -1
  179. package/dist/help/tool-notes.d.ts.map +1 -1
  180. package/dist/help/tool-notes.js +16 -0
  181. package/dist/help/tool-notes.js.map +1 -1
  182. package/dist/help/usage.d.ts.map +1 -1
  183. package/dist/help/usage.js +1 -0
  184. package/dist/help/usage.js.map +1 -1
  185. package/dist/init/agent-permissions.d.ts.map +1 -1
  186. package/dist/init/agent-permissions.js +18 -3
  187. package/dist/init/agent-permissions.js.map +1 -1
  188. package/dist/init/files/audit-files.d.ts.map +1 -1
  189. package/dist/init/files/audit-files.js +1 -0
  190. package/dist/init/files/audit-files.js.map +1 -1
  191. package/dist/init/files/persistence-files.d.ts.map +1 -1
  192. package/dist/init/files/persistence-files.js +2 -1
  193. package/dist/init/files/persistence-files.js.map +1 -1
  194. package/dist/init/files/script-files.d.ts +4 -1
  195. package/dist/init/files/script-files.d.ts.map +1 -1
  196. package/dist/init/files/script-files.js +6 -1
  197. package/dist/init/files/script-files.js.map +1 -1
  198. package/dist/init/is-team-file.d.ts +2 -2
  199. package/dist/init/is-team-file.d.ts.map +1 -1
  200. package/dist/init/is-team-file.js +5 -3
  201. package/dist/init/is-team-file.js.map +1 -1
  202. package/dist/init/keep-regions.d.ts +21 -0
  203. package/dist/init/keep-regions.d.ts.map +1 -0
  204. package/dist/init/keep-regions.js +63 -0
  205. package/dist/init/keep-regions.js.map +1 -0
  206. package/dist/init/kept-combination-notes.d.ts.map +1 -1
  207. package/dist/init/kept-combination-notes.js +6 -2
  208. package/dist/init/kept-combination-notes.js.map +1 -1
  209. package/dist/init/kept-compose-services.d.ts +6 -0
  210. package/dist/init/kept-compose-services.d.ts.map +1 -0
  211. package/dist/init/kept-compose-services.js +42 -0
  212. package/dist/init/kept-compose-services.js.map +1 -0
  213. package/dist/init/kept-role-vocabulary.d.ts +3 -0
  214. package/dist/init/kept-role-vocabulary.d.ts.map +1 -0
  215. package/dist/init/kept-role-vocabulary.js +7 -0
  216. package/dist/init/kept-role-vocabulary.js.map +1 -0
  217. package/dist/init/kept-roles.d.ts +12 -0
  218. package/dist/init/kept-roles.d.ts.map +1 -0
  219. package/dist/init/kept-roles.js +29 -0
  220. package/dist/init/kept-roles.js.map +1 -0
  221. package/dist/init/kept-wiring.d.ts +22 -0
  222. package/dist/init/kept-wiring.d.ts.map +1 -0
  223. package/dist/init/kept-wiring.js +91 -0
  224. package/dist/init/kept-wiring.js.map +1 -0
  225. package/dist/init/knip-vars.d.ts.map +1 -1
  226. package/dist/init/knip-vars.js +5 -1
  227. package/dist/init/knip-vars.js.map +1 -1
  228. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  229. package/dist/init/manifest/database-scripts.js +5 -3
  230. package/dist/init/manifest/database-scripts.js.map +1 -1
  231. package/dist/init/manifest/scripts-for.d.ts.map +1 -1
  232. package/dist/init/manifest/scripts-for.js +8 -0
  233. package/dist/init/manifest/scripts-for.js.map +1 -1
  234. package/dist/init/manifest/versions.js +24 -24
  235. package/dist/init/orphaned-wiring-notes.d.ts +13 -0
  236. package/dist/init/orphaned-wiring-notes.d.ts.map +1 -0
  237. package/dist/init/orphaned-wiring-notes.js +42 -0
  238. package/dist/init/orphaned-wiring-notes.js.map +1 -0
  239. package/dist/init/profile-hooks.js +1 -1
  240. package/dist/init/profile-hooks.js.map +1 -1
  241. package/dist/init/repositories-left-behind.d.ts +12 -0
  242. package/dist/init/repositories-left-behind.d.ts.map +1 -0
  243. package/dist/init/repositories-left-behind.js +26 -0
  244. package/dist/init/repositories-left-behind.js.map +1 -0
  245. package/dist/init/rewire-audited-events.d.ts +10 -0
  246. package/dist/init/rewire-audited-events.d.ts.map +1 -0
  247. package/dist/init/rewire-audited-events.js +32 -0
  248. package/dist/init/rewire-audited-events.js.map +1 -0
  249. package/dist/init/rewire-contexts.d.ts +15 -0
  250. package/dist/init/rewire-contexts.d.ts.map +1 -0
  251. package/dist/init/rewire-contexts.js +41 -0
  252. package/dist/init/rewire-contexts.js.map +1 -0
  253. package/dist/init/rewire-preset.d.ts +9 -0
  254. package/dist/init/rewire-preset.d.ts.map +1 -0
  255. package/dist/init/rewire-preset.js +29 -0
  256. package/dist/init/rewire-preset.js.map +1 -0
  257. package/dist/init/rewire-tables.d.ts +10 -0
  258. package/dist/init/rewire-tables.d.ts.map +1 -0
  259. package/dist/init/rewire-tables.js +54 -0
  260. package/dist/init/rewire-tables.js.map +1 -0
  261. package/dist/init/run-init.d.ts.map +1 -1
  262. package/dist/init/run-init.js +28 -28
  263. package/dist/init/run-init.js.map +1 -1
  264. package/dist/init/stack/kept-flag-notes.d.ts +7 -0
  265. package/dist/init/stack/kept-flag-notes.d.ts.map +1 -0
  266. package/dist/init/stack/kept-flag-notes.js +24 -0
  267. package/dist/init/stack/kept-flag-notes.js.map +1 -0
  268. package/dist/init/stack/refuse-unused-no-outbox.d.ts +4 -0
  269. package/dist/init/stack/refuse-unused-no-outbox.d.ts.map +1 -0
  270. package/dist/init/stack/refuse-unused-no-outbox.js +9 -0
  271. package/dist/init/stack/refuse-unused-no-outbox.js.map +1 -0
  272. package/dist/init/stack/resolve-stack.d.ts.map +1 -1
  273. package/dist/init/stack/resolve-stack.js +10 -0
  274. package/dist/init/stack/resolve-stack.js.map +1 -1
  275. package/dist/init/stack-before.d.ts +4 -0
  276. package/dist/init/stack-before.d.ts.map +1 -0
  277. package/dist/init/stack-before.js +11 -0
  278. package/dist/init/stack-before.js.map +1 -0
  279. package/dist/init/wiring-notes.d.ts +9 -0
  280. package/dist/init/wiring-notes.d.ts.map +1 -0
  281. package/dist/init/wiring-notes.js +22 -0
  282. package/dist/init/wiring-notes.js.map +1 -0
  283. package/dist/init/with-named-imports.d.ts +8 -0
  284. package/dist/init/with-named-imports.d.ts.map +1 -0
  285. package/dist/init/with-named-imports.js +69 -0
  286. package/dist/init/with-named-imports.js.map +1 -0
  287. package/dist/init/with-system-grants.d.ts +7 -0
  288. package/dist/init/with-system-grants.d.ts.map +1 -0
  289. package/dist/init/with-system-grants.js +26 -0
  290. package/dist/init/with-system-grants.js.map +1 -0
  291. package/dist/init/write-local-environment.d.ts +8 -0
  292. package/dist/init/write-local-environment.d.ts.map +1 -0
  293. package/dist/init/write-local-environment.js +18 -0
  294. package/dist/init/write-local-environment.js.map +1 -0
  295. package/dist/lint/eslint-in-project.d.ts +1 -1
  296. package/dist/lint/eslint-in-project.d.ts.map +1 -1
  297. package/dist/lint/eslint-in-project.js +11 -2
  298. package/dist/lint/eslint-in-project.js.map +1 -1
  299. package/dist/markers/index.d.ts +3 -0
  300. package/dist/markers/index.d.ts.map +1 -1
  301. package/dist/markers/index.js +3 -0
  302. package/dist/markers/index.js.map +1 -1
  303. package/dist/markers/region-marker.d.ts +3 -0
  304. package/dist/markers/region-marker.d.ts.map +1 -0
  305. package/dist/markers/region-marker.js +3 -0
  306. package/dist/markers/region-marker.js.map +1 -0
  307. package/dist/markers/regions-of.d.ts +9 -0
  308. package/dist/markers/regions-of.d.ts.map +1 -0
  309. package/dist/markers/regions-of.js +20 -0
  310. package/dist/markers/regions-of.js.map +1 -0
  311. package/dist/markers/unpaired-markers.d.ts +3 -0
  312. package/dist/markers/unpaired-markers.d.ts.map +1 -0
  313. package/dist/markers/unpaired-markers.js +13 -0
  314. package/dist/markers/unpaired-markers.js.map +1 -0
  315. package/dist/merge/apply-resolutions.d.ts.map +1 -1
  316. package/dist/merge/apply-resolutions.js +6 -4
  317. package/dist/merge/apply-resolutions.js.map +1 -1
  318. package/dist/merge/continue-merge.d.ts.map +1 -1
  319. package/dist/merge/continue-merge.js +1 -0
  320. package/dist/merge/continue-merge.js.map +1 -1
  321. package/dist/merge/ensure-mergeable.js +1 -1
  322. package/dist/merge/ensure-mergeable.js.map +1 -1
  323. package/dist/merge/lost/verify-merges.d.ts.map +1 -1
  324. package/dist/merge/lost/verify-merges.js +4 -0
  325. package/dist/merge/lost/verify-merges.js.map +1 -1
  326. package/dist/merge/merge-state.d.ts.map +1 -1
  327. package/dist/merge/merge-state.js +2 -2
  328. package/dist/merge/merge-state.js.map +1 -1
  329. package/dist/merge/merge-trunk.d.ts.map +1 -1
  330. package/dist/merge/merge-trunk.js +4 -0
  331. package/dist/merge/merge-trunk.js.map +1 -1
  332. package/dist/merge/refuse-shallow-history.d.ts +10 -0
  333. package/dist/merge/refuse-shallow-history.d.ts.map +1 -0
  334. package/dist/merge/refuse-shallow-history.js +15 -0
  335. package/dist/merge/refuse-shallow-history.js.map +1 -0
  336. package/dist/merge/resume-merge.js +2 -2
  337. package/dist/merge/resume-merge.js.map +1 -1
  338. package/dist/merge/settle-regions.d.ts.map +1 -1
  339. package/dist/merge/settle-regions.js +3 -4
  340. package/dist/merge/settle-regions.js.map +1 -1
  341. package/dist/migration/audit-guard/append-audit-guard.d.ts +4 -2
  342. package/dist/migration/audit-guard/append-audit-guard.d.ts.map +1 -1
  343. package/dist/migration/audit-guard/append-audit-guard.js +18 -3
  344. package/dist/migration/audit-guard/append-audit-guard.js.map +1 -1
  345. package/dist/migration/declared-tables.d.ts +8 -0
  346. package/dist/migration/declared-tables.d.ts.map +1 -0
  347. package/dist/migration/declared-tables.js +13 -0
  348. package/dist/migration/declared-tables.js.map +1 -0
  349. package/dist/migration/find-project-formatter.d.ts.map +1 -1
  350. package/dist/migration/find-project-formatter.js +2 -1
  351. package/dist/migration/find-project-formatter.js.map +1 -1
  352. package/dist/migration/index.d.ts +8 -0
  353. package/dist/migration/index.d.ts.map +1 -1
  354. package/dist/migration/index.js +8 -0
  355. package/dist/migration/index.js.map +1 -1
  356. package/dist/migration/knex-migration-text.d.ts +4 -0
  357. package/dist/migration/knex-migration-text.d.ts.map +1 -0
  358. package/dist/migration/knex-migration-text.js +24 -0
  359. package/dist/migration/knex-migration-text.js.map +1 -0
  360. package/dist/migration/knex-schema-difference.d.ts +12 -0
  361. package/dist/migration/knex-schema-difference.d.ts.map +1 -0
  362. package/dist/migration/knex-schema-difference.js +165 -0
  363. package/dist/migration/knex-schema-difference.js.map +1 -0
  364. package/dist/migration/listed-in-index.d.ts +6 -0
  365. package/dist/migration/listed-in-index.d.ts.map +1 -0
  366. package/dist/migration/listed-in-index.js +8 -0
  367. package/dist/migration/listed-in-index.js.map +1 -0
  368. package/dist/migration/refuse-other-orm.d.ts +8 -0
  369. package/dist/migration/refuse-other-orm.d.ts.map +1 -0
  370. package/dist/migration/refuse-other-orm.js +34 -0
  371. package/dist/migration/refuse-other-orm.js.map +1 -0
  372. package/dist/migration/required-migration-name.d.ts +3 -0
  373. package/dist/migration/required-migration-name.d.ts.map +1 -0
  374. package/dist/migration/required-migration-name.js +11 -0
  375. package/dist/migration/required-migration-name.js.map +1 -0
  376. package/dist/migration/warn-dropped-context-tables.d.ts +12 -0
  377. package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -0
  378. package/dist/migration/warn-dropped-context-tables.js +88 -0
  379. package/dist/migration/warn-dropped-context-tables.js.map +1 -0
  380. package/dist/package-manager/dialects.js +1 -1
  381. package/dist/package-manager/dialects.js.map +1 -1
  382. package/dist/package-manager/in-project-dialect.d.ts +8 -0
  383. package/dist/package-manager/in-project-dialect.d.ts.map +1 -0
  384. package/dist/package-manager/in-project-dialect.js +22 -0
  385. package/dist/package-manager/in-project-dialect.js.map +1 -0
  386. package/dist/presets/adapter-of.d.ts +5 -0
  387. package/dist/presets/adapter-of.d.ts.map +1 -0
  388. package/dist/presets/adapter-of.js +6 -0
  389. package/dist/presets/adapter-of.js.map +1 -0
  390. package/dist/presets/apply-preset.d.ts.map +1 -1
  391. package/dist/presets/apply-preset.js +1 -5
  392. package/dist/presets/apply-preset.js.map +1 -1
  393. package/dist/presets/grant-to-signed-in.d.ts.map +1 -1
  394. package/dist/presets/grant-to-signed-in.js +1 -24
  395. package/dist/presets/grant-to-signed-in.js.map +1 -1
  396. package/dist/presets/identity-terms.d.ts.map +1 -1
  397. package/dist/presets/identity-terms.js +4 -0
  398. package/dist/presets/identity-terms.js.map +1 -1
  399. package/dist/presets/lay-out-prisma-models.js +1 -19
  400. package/dist/presets/lay-out-prisma-models.js.map +1 -1
  401. package/dist/presets/organisations-as-tenants.d.ts +2 -2
  402. package/dist/presets/organisations-as-tenants.d.ts.map +1 -1
  403. package/dist/presets/organisations-as-tenants.js +46 -2
  404. package/dist/presets/organisations-as-tenants.js.map +1 -1
  405. package/dist/presets/preset-named.d.ts +2 -0
  406. package/dist/presets/preset-named.d.ts.map +1 -1
  407. package/dist/presets/preset-named.js +1 -1
  408. package/dist/presets/preset-named.js.map +1 -1
  409. package/dist/presets/wrap-authorizer.d.ts +4 -0
  410. package/dist/presets/wrap-authorizer.d.ts.map +1 -0
  411. package/dist/presets/wrap-authorizer.js +25 -0
  412. package/dist/presets/wrap-authorizer.js.map +1 -0
  413. package/dist/prisma-schema/datasource-schemas.d.ts +3 -0
  414. package/dist/prisma-schema/datasource-schemas.d.ts.map +1 -0
  415. package/dist/prisma-schema/datasource-schemas.js +5 -0
  416. package/dist/prisma-schema/datasource-schemas.js.map +1 -0
  417. package/dist/prisma-schema/index.d.ts +4 -0
  418. package/dist/prisma-schema/index.d.ts.map +1 -1
  419. package/dist/prisma-schema/index.js +4 -0
  420. package/dist/prisma-schema/index.js.map +1 -1
  421. package/dist/prisma-schema/preview-features-of.d.ts +3 -0
  422. package/dist/prisma-schema/preview-features-of.d.ts.map +1 -0
  423. package/dist/prisma-schema/preview-features-of.js +7 -0
  424. package/dist/prisma-schema/preview-features-of.js.map +1 -0
  425. package/dist/prisma-schema/with-datasource-schema.d.ts +3 -0
  426. package/dist/prisma-schema/with-datasource-schema.d.ts.map +1 -0
  427. package/dist/prisma-schema/with-datasource-schema.js +9 -0
  428. package/dist/prisma-schema/with-datasource-schema.js.map +1 -0
  429. package/dist/prisma-schema/with-preview-feature.d.ts +3 -0
  430. package/dist/prisma-schema/with-preview-feature.d.ts.map +1 -0
  431. package/dist/prisma-schema/with-preview-feature.js +19 -0
  432. package/dist/prisma-schema/with-preview-feature.js.map +1 -0
  433. package/dist/run.d.ts.map +1 -1
  434. package/dist/run.js +10 -1
  435. package/dist/run.js.map +1 -1
  436. package/dist/sdk/render-client.js +1 -1
  437. package/dist/sdk/render-client.js.map +1 -1
  438. package/dist/slice/record-verification.d.ts.map +1 -1
  439. package/dist/slice/record-verification.js +2 -5
  440. package/dist/slice/record-verification.js.map +1 -1
  441. package/dist/stack/stack-vars.js +6 -2
  442. package/dist/stack/stack-vars.js.map +1 -1
  443. package/dist/stories/open-story-scope.d.ts.map +1 -1
  444. package/dist/stories/open-story-scope.js +2 -4
  445. package/dist/stories/open-story-scope.js.map +1 -1
  446. package/dist/story/change-gated.d.ts +3 -3
  447. package/dist/story/change-gated.d.ts.map +1 -1
  448. package/dist/story/change-gated.js +13 -7
  449. package/dist/story/change-gated.js.map +1 -1
  450. package/dist/version.d.ts +1 -1
  451. package/dist/version.js +1 -1
  452. package/dist/worker/open-worker-scope.d.ts.map +1 -1
  453. package/dist/worker/open-worker-scope.js +2 -3
  454. package/dist/worker/open-worker-scope.js.map +1 -1
  455. package/dist/workspace/write-inside-project.d.ts +8 -0
  456. package/dist/workspace/write-inside-project.d.ts.map +1 -0
  457. package/dist/workspace/write-inside-project.js +17 -0
  458. package/dist/workspace/write-inside-project.js.map +1 -0
  459. package/package.json +5 -5
  460. package/templates/aggregate/event-sourced.events.mapper.ts.tpl +5 -1
  461. package/templates/command/handler.declared.ts.tpl +4 -12
  462. package/templates/command/handler.ts.tpl +4 -12
  463. package/templates/e2e/e2e.spec.ts.tpl +2 -2
  464. package/templates/init/README.md.tpl +29 -5
  465. package/templates/init/docker/docker-compose.yml.tpl +5 -2
  466. package/templates/init/docker/dockerignore.tpl +1 -0
  467. package/templates/init/docker/env.example.tpl +8 -1
  468. package/templates/init/gitignore.tpl +1 -0
  469. package/templates/init/hooks/change-reference.mjs +96 -17
  470. package/templates/init/hooks/production-gate.mjs +65 -11
  471. package/templates/init/jest.config.js.tpl +4 -1
  472. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +25 -8
  473. package/templates/init/platform/audit/create-audit-trail.ts.tpl +59 -0
  474. package/templates/init/platform/audit/create-audit.ts.tpl +1 -46
  475. package/templates/init/platform/auth/authentication/development-header-authenticator.ts.tpl +7 -3
  476. package/templates/init/platform/auth/relationships/relationship-schema.ts.tpl +5 -0
  477. package/templates/init/platform/composition/compose-application.manual.ts.tpl +22 -7
  478. package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +2 -4
  479. package/templates/init/platform/config/app-config.ts.tpl +9 -0
  480. package/templates/init/platform/config/load-config.ts.tpl +24 -0
  481. package/templates/init/platform/database/data-source.typeorm.ts.tpl +6 -0
  482. package/templates/init/platform/database/gitkeep +0 -0
  483. package/templates/init/platform/database/knexfile.js.tpl +10 -3
  484. package/templates/init/platform/database/open-persistence.prisma.ts.tpl +5 -2
  485. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +11 -3
  486. package/templates/init/platform/database/prisma.config.ts.tpl +6 -0
  487. package/templates/init/platform/database/schema.knex.ts.tpl +4 -3
  488. package/templates/init/platform/http/start-http-server.express.ts.tpl +9 -6
  489. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +5 -2
  490. package/templates/init/platform/http/start-http-server.hono.ts.tpl +5 -2
  491. package/templates/init/platform/jobs/job-settings.ts.tpl +3 -0
  492. package/templates/init/platform/privacy/run-export.manual.ts.tpl +24 -2
  493. package/templates/init/platform/privacy/run-export.tsyringe.ts.tpl +30 -1
  494. package/templates/init/scripts/audit-verify.ts.tpl +35 -0
  495. package/templates/init/scripts/privacy-export.manual.ts.tpl +1 -7
  496. package/templates/init/scripts/privacy-export.tsyringe.ts.tpl +1 -7
  497. package/templates/pipeline/github/dependabot.yml +6 -0
  498. package/templates/pipeline/github/workflows/ci.yml.tpl +26 -1
  499. package/templates/pipeline/github/workflows/claude-review.yml +3 -2
  500. package/templates/pipeline/github/workflows/claude-triage.yml +1 -1
  501. package/templates/pipeline/github/workflows/codeql.yml +2 -0
  502. package/templates/pipeline/github/workflows/copilot-setup-steps.yml +2 -0
  503. package/templates/pipeline/github/workflows/intent-to-spec.yml +12 -4
  504. package/templates/pipeline/github/workflows/pr-title.yml +2 -0
  505. package/templates/pipeline/gitlab/claude-review.gitlab-ci.yml.tpl +1 -1
  506. package/templates/pipeline/knip.json.tpl +1 -4
  507. package/templates/pipeline/package-scripts.json +2 -2
  508. package/templates/pipeline/renovate.json +11 -0
  509. package/templates/pipeline/vitest.config.ts.tpl +3 -2
  510. package/templates/presets/identity/context/__context__.codes.named.ts.tpl +1 -0
  511. package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +1 -1
  512. package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +28 -1
  513. package/templates/presets/identity/context/domain/aggregates/invitation.aggregate.ts.tpl +13 -1
  514. package/templates/presets/identity/context/domain/aggregates/member.aggregate.ts.tpl +6 -1
  515. package/templates/presets/identity/context/domain/errors/invitation-withdrawn.error.named.ts.tpl +13 -0
  516. package/templates/presets/identity/context/domain/errors/invitation.error.factories.ts.tpl +8 -0
  517. package/templates/presets/identity/context/domain/services/role-rights.service.ts.tpl +23 -1
  518. package/templates/presets/identity/context/infrastructure/persistence/__context__.schema.drizzle.ts.tpl +1 -0
  519. package/templates/presets/identity/context/infrastructure/persistence/create-__context__-tables.schema.knex.ts.tpl +1 -0
  520. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +6 -2
  521. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +6 -2
  522. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +6 -2
  523. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +6 -2
  524. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +6 -2
  525. package/templates/presets/identity/context/infrastructure/persistence/invitation-row.schema.knex.ts.tpl +1 -0
  526. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.drizzle.ts.tpl +2 -0
  527. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.knex.ts.tpl +2 -0
  528. package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.prisma.ts.tpl +2 -0
  529. package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +8 -5
  530. package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +8 -5
  531. package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +8 -5
  532. package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +8 -5
  533. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +8 -5
  534. package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.kit-routes.ts.tpl +1 -0
  535. package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.nest-routes.ts.tpl +1 -0
  536. package/templates/presets/identity/context/test/builders/invitation.builder.ts.tpl +15 -2
  537. package/templates/presets/identity/context/test/integration/invitation.repository.contract.spec.ts.tpl +10 -0
  538. package/templates/presets/identity/context/test/unit/accept-invitation.handler.spec.ts.tpl +114 -4
  539. package/templates/presets/identity/context/test/worlds/__context__.world.explicit.ts.tpl +1 -1
  540. package/templates/presets/identity/design.md.tpl +3 -1
  541. package/templates/presets/identity/prisma/models.prisma.tpl +1 -0
  542. package/templates/query/reader.fake.ts.tpl +4 -6
  543. package/templates/query/reader.in-memory.ts.tpl +1 -1
  544. package/templates/repository/drizzle/repository.ts.tpl +4 -3
  545. package/templates/repository/knex/table.tpl +1 -1
  546. package/templates/repository/prisma/repository.ts.tpl +24 -18
  547. package/templates/state-machine/state-machine.spec.ts.tpl +5 -0
  548. package/templates/init/platform/database/migration.knex.js.tpl +0 -8
@@ -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,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,8F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ACnF,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;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE;YACL,0FAA0F;YAC1F,wFAAwF;YACxF,wFAAwF;SACzF;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE;YACL,4EAA4E;YAC5E,sFAAsF;YACtF,qFAAqF;YACrF,mEAAmE;YACnE,oFAAoF;YACpF,oFAAoF;YACpF,+EAA+E;YAC/E,kFAAkF;YAClF,uEAAuE;SACxE;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE;YACL,2FAA2F;YAC3F,2FAA2F;YAC3F,oEAAoE;YACpE,+EAA+E;YAC/E,wFAAwF;YACxF,yFAAyF;YACzF,yFAAyF;YACzF,qFAAqF;YACrF,sFAAsF;SACvF;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE;YACL,6FAA6F;YAC7F,wEAAwE;YACxE,wFAAwF;YACxF,6EAA6E;YAC7E,yFAAyF;YACzF,yFAAyF;YACzF,qFAAqF;YACrF,+EAA+E;YAC/E,2FAA2F;YAC3F,uFAAuF;SACxF;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE;YACL,wFAAwF;YACxF,0FAA0F;YAC1F,6FAA6F;SAC9F;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE;YACL,yFAAyF;YACzF,yFAAyF;YACzF,0FAA0F;YAC1F,uFAAuF;YACvF,wFAAwF;YACxF,uFAAuF;YACvF,sFAAsF;YACtF,gFAAgF;YAChF,qFAAqF;YACrF,+EAA+E;YAC/E,uFAAuF;YACvF,uEAAuE;YACvE,uFAAuF;YACvF,wFAAwF;YACxF,sFAAsF;YACtF,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
+ {"version":3,"file":"tool-notes.js","sourceRoot":"","sources":["../../src/help/tool-notes.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,CAAC,MA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ACtF,qFAAqF;YACrF,mEAAmE;YACnE,oFAAoF;YACpF,oFAAoF;YACpF,+EAA+E;YAC/E,kFAAkF;YAClF,uEAAuE;SACxE;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE;YACL,2FAA2F;YAC3F,2FAA2F;YAC3F,oEAAoE;YACpE,+EAA+E;YAC/E,wFAAwF;YACxF,yFAAyF;YACzF,yFAAyF;YACzF,qFAAqF;YACrF,sFAAsF;SACvF;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE;YACL,6FAA6F;YAC7F,wEAAwE;YACxE,wFAAwF;YACxF,6EAA6E;YAC7E,yFAAyF;YACzF,yFAAyF;YACzF,qFAAqF;YACrF,+EAA+E;YAC/E,2FAA2F;YAC3F,uFAAuF;SACxF;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE;YACL,wFAAwF;YACxF,0FAA0F;YAC1F,6FAA6F;SAC9F;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE;YACL,yFAAyF;YACzF,yFAAyF;YACzF,0FAA0F;YAC1F,uFAAuF;YACvF,wFAAwF;YACxF,uFAAuF;YACvF,sFAAsF;YACtF,gFAAgF;YAChF,qFAAqF;YACrF,+EAA+E;YAC/E,uFAAuF;YACvF,uEAAuE;YACvE,uFAAuF;YACvF,wFAAwF;YACxF,sFAAsF;YACtF,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,gCAAgC;IAChC,6BAA6B;IAC7B,+BAA+B;IAC/B,4BAA4B;CAC7B,CAAC;AAEF,8FAA8F;AAC9F,gGAAgG;AAChG,+FAA+F;AAC/F,mGAAmG;AACnG,iGAAiG;AACjG,sFAAsF;AACtF,MAAM,IAAI,GAAsB;IAC9B,cAAc;IACd,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,0BAA0B;IAC1B,mBAAmB;CACpB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,oBAAoB;IACpB,qCAAqC;IACrC,2CAA2C;IAC3C,gDAAgD;CACjD,CAAC;AAEF,mGAAmG;AACnG,gGAAgG;AAChG,mGAAmG;AACnG,kGAAkG;AAClG,kGAAkG;AAClG,4FAA4F;AAC5F,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,8BAA8B;IAC9B,+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
+ {"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,OA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AAkB;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,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;QAC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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,CAAC;QACrC,CAAC,WAAW,EAAE,SAAS,CAAC;QACxB,8HAA8H;QAC9H,CAAC,qBAAqB,EAAE,SAAS,CAAC;KACnC;IACD,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;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;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,0 +1 @@
1
+ {"version":3,"file":"keep-regions.js","sourceRoot":"","sources":["../../src/init/keep-regions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAe,MAAM,YAAY,CAAC;AAiBpF;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,QAAgB;IAC3D,MAAM,MAAM,GAAG,Q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C,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"}
@@ -1,9 +1,10 @@
1
1
  const FORMS_WITHOUT_HTTP = 'Kept `forms: on` with `http: none`: no route serves a form until an HTTP framework is chosen (`npx ddd-ts-kit init --force --http <framework>`); `npx ddd-ts-kit init --force --forms off` records the choice.';
2
2
  /** What init kept on a combination its defaults would not choose, said in a note so that exit code 0 hides nothing. */
3
3
  export function keptCombinationNotes(config, flat) {
4
- const { audit, orm, forms, http } = config.stack;
4
+ const { audit, orm, forms, http, eventSourcing } = config.stack;
5
5
  return [
6
6
  ...(audit === 'on' && orm === 'none' ? [auditWithoutOrm(auditFile(config, flat))] : []),
7
+ ...(eventSourcing === 'on' && orm === 'none' ? [eventSourcingWithoutOrm(config.platformDir)] : []),
7
8
  ...(forms === 'on' && http === 'none' ? [FORMS_WITHOUT_HTTP] : []),
8
9
  ];
9
10
  }
@@ -12,7 +13,10 @@ function auditWithoutOrm(file) {
12
13
  }
13
14
  /** Where the file is written: in its folder, or flat where a version before the folders put it and --force keeps it. */
14
15
  function auditFile(config, flat) {
15
- const inFolder = `${config.platformDir}/audit/create-audit`;
16
+ const inFolder = `${config.platformDir}/audit/create-audit-trail`;
16
17
  return `${flat.moved.get(inFolder) ?? inFolder}.ts`;
17
18
  }
19
+ function eventSourcingWithoutOrm(platformDir) {
20
+ return `Kept \`eventSourcing: on\` with \`orm: none\`: the event store is \`InMemoryEventStore\`, so the events of an event-sourced aggregate, their only record, are lost when the process stops, until ${platformDir}/database/open-persistence.ts binds a store of your storage; \`npx ddd-ts-kit init --force --orm <orm>\` keeps them in PostgreSQL.`;
21
+ }
18
22
  //# sourceMappingURL=kept-combination-notes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kept-combination-notes.js","sourceRoot":"","sources":["../../src/init/kept-combination-notes.ts"],"names":[],"mappings":"AAGA,MAAM,kBAAkB,GACtB,gNAAgN,CAAC;AAEnN,uHAAuH;AACvH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAgB;IACnE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAEjD,OAAO;QACL,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,6IAA6I,IAAI,gIAAgI,CAAC;AAC3R,CAAC;AAED,wHAAwH;AACxH,SAAS,SAAS,CAAC,MAAc,EAAE,IAAgB;IACjD,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,WAAW,qBAAqB,CAAC;IAE5D,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,CAAC;AACtD,CAAC"}
1
+ {"version":3,"file":"kept-combination-notes.js","sourceRoot":"","sources":["../../src/init/kept-combination-notes.ts"],"names":[],"mappings":"AAGA,MAAM,kBAAkB,GACtB,gNAAgN,CAAC;AAEnN,uHAAuH;AACvH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAgB;IACnE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAEhE,OAAO;QACL,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,GAAG,CAAC,aAAa,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClG,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,6IAA6I,IAAI,gIAAgI,CAAC;AAC3R,CAAC;AAED,wHAAwH;AACxH,SAAS,SAAS,CAAC,MAAc,EAAE,IAAgB;IACjD,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,WAAW,2BAA2B,CAAC;IAElE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,CAAC;AACtD,CAAC;AAED,SAAS,uBAAuB,CAAC,WAAmB;IAClD,OAAO,oMAAoM,WAAW,oIAAoI,CAAC;AAC7V,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The services of the compose file that the template does not write (`generate service`, those of
3
+ * the team) stay, as they stand and where they stood among the others.
4
+ */
5
+ export declare function keptComposeServices(written: string, existing: string): string;
6
+ //# sourceMappingURL=kept-compose-services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-compose-services.d.ts","sourceRoot":"","sources":["../../src/init/kept-compose-services.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAc7E"}
@@ -0,0 +1,42 @@
1
+ const SERVICE = /^ {2}([\w.-]+):\s*$/;
2
+ /**
3
+ * The services of the compose file that the template does not write (`generate service`, those of
4
+ * the team) stay, as they stand and where they stood among the others.
5
+ */
6
+ export function keptComposeServices(written, existing) {
7
+ const before = existing.split('\n');
8
+ const known = servicesOf(before);
9
+ const after = written.split('\n');
10
+ known.forEach((service, index) => {
11
+ const here = servicesOf(after);
12
+ if (!here.some(({ name }) => name === service.name)) {
13
+ after.splice(placeOf(known.slice(index + 1), here), 0, ...before.slice(service.from, service.to));
14
+ }
15
+ });
16
+ return after.join('\n');
17
+ }
18
+ /** Where a service goes: before the first of those that followed it and that the text still holds, or after the last service. */
19
+ function placeOf(following, here) {
20
+ const next = following.flatMap(({ name }) => here.filter((service) => service.name === name)).at(0);
21
+ return next?.from ?? here.at(-1)?.to ?? 0;
22
+ }
23
+ function servicesOf(lines) {
24
+ const first = lines.indexOf('services:') + 1;
25
+ const end = lines.findIndex((line, index) => index >= first && /^\S/.test(line));
26
+ const last = end === -1 ? lines.length : end;
27
+ const heads = lines.flatMap((line, at) => (at >= first && at < last && SERVICE.test(line) ? [at] : []));
28
+ return heads.map((head, index) => ({
29
+ name: SERVICE.exec(lines[head] ?? '')?.[1] ?? '',
30
+ from: startOf(lines, head),
31
+ to: startOf(lines, heads[index + 1] ?? last),
32
+ }));
33
+ }
34
+ /** The first line of the block of a service: the comment and the blank lines above its name are its own. */
35
+ function startOf(lines, head) {
36
+ let start = head;
37
+ while (/^\s*(?:#.*)?$/.test(lines[start - 1] ?? 'end')) {
38
+ start -= 1;
39
+ }
40
+ return start;
41
+ }
42
+ //# sourceMappingURL=kept-compose-services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-compose-services.js","sourceRoot":"","sources":["../../src/init/kept-compose-services.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,QAAgB;IACnE,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACpD,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpG,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,iIAAiI;AACjI,SAAS,OAAO,CAAC,SAA6B,EAAE,IAAwB;IACtE,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,C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AAE,IAAY;IACrD,IAAI,KAAK,GAAG,IAAI,CAAC;IAEjB,OAAO,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACvD,KAAK,IAAI,CAAC,CAAC;IACb,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The role vocabulary of the template with every role the file before holds: what a guard or a grant named stays named. */
2
+ export declare function keptRoleVocabulary(written: string, existing: string): string;
3
+ //# sourceMappingURL=kept-role-vocabulary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-role-vocabulary.d.ts","sourceRoot":"","sources":["../../src/init/kept-role-vocabulary.ts"],"names":[],"mappings":"AAGA,4HAA4H;AAC5H,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5E"}
@@ -0,0 +1,7 @@
1
+ import { heldEntries } from '../generate/vocabulary/held-entries.js';
2
+ import { vocabularyText } from '../generate/vocabulary/vocabulary-text.js';
3
+ /** The role vocabulary of the template with every role the file before holds: what a guard or a grant named stays named. */
4
+ export function keptRoleVocabulary(written, existing) {
5
+ return vocabularyText('Role', heldEntries(existing), written);
6
+ }
7
+ //# sourceMappingURL=kept-role-vocabulary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-role-vocabulary.js","sourceRoot":"","sources":["../../src/init/kept-role-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,4HAA4H;AAC5H,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,QAAgB;IAClE,OAAO,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** The file with the object of the roles of the file before, and that object. */
2
+ export interface KeptRoles {
3
+ readonly text: string;
4
+ readonly grants: string;
5
+ }
6
+ /**
7
+ * The grants of the roles, written in the object of `roles.ts` and not in a region: it is the
8
+ * object of the file before, in the place the template gives it. Undefined when that file holds
9
+ * none the kit reads to its end: half an object is never written.
10
+ */
11
+ export declare function keptRoles(written: string, existing: string): KeptRoles | undefined;
12
+ //# sourceMappingURL=kept-roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-roles.d.ts","sourceRoot":"","sources":["../../src/init/kept-roles.ts"],"names":[],"mappings":"AAOA,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAOlF"}
@@ -0,0 +1,29 @@
1
+ import { scan } from '../check/scan/scan.js';
2
+ import { closingBracket } from '../check/text/closing-bracket.js';
3
+ const ROLES = /export\s+const\s+roles\b[^=]*=\s*\{/;
4
+ /** What may follow the object of the roles in a statement that the kit can trust it read to its end. */
5
+ const ENDS_THE_STATEMENT = /^\s*(?:;|as\b|satisfies\b)/;
6
+ /**
7
+ * The grants of the roles, written in the object of `roles.ts` and not in a region: it is the
8
+ * object of the file before, in the place the template gives it. Undefined when that file holds
9
+ * none the kit reads to its end: half an object is never written.
10
+ */
11
+ export function keptRoles(written, existing) {
12
+ const kept = rolesObject(existing);
13
+ const place = rolesObject(written);
14
+ return kept === undefined || place === undefined
15
+ ? undefined
16
+ : { text: `${written.slice(0, place.from)}${kept.text}${written.slice(place.to)}`, grants: kept.text };
17
+ }
18
+ /** Read on the code alone: a bracket in a comment or a string closes nothing. */
19
+ function rolesObject(source) {
20
+ const { code } = scan(source);
21
+ const found = ROLES.exec(code);
22
+ const from = found === null ? undefined : found.index + found[0].length - 1;
23
+ const close = from === undefined ? undefined : closingBracket(code, from);
24
+ if (from === undefined || close === undefined || !ENDS_THE_STATEMENT.test(code.slice(close + 1))) {
25
+ return undefined;
26
+ }
27
+ return { from, to: close + 1, text: source.slice(from, close + 1) };
28
+ }
29
+ //# sourceMappingURL=kept-roles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-roles.js","sourceRoot":"","sources":["../../src/init/kept-roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,KAAK,GAAG,qCAAqC,CAAC;AACpD,wGAAwG;AACxG,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAQxD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe,EAAE,QAAgB;IACzD,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAEnC,OAAO,IAAI,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAC9C,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;AAC3G,CAAC;AAQD,iFAAiF;AACjF,SAAS,WAAW,CAAC,MAAc;IACjC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,KAAK,KAAK,I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