ddd-ts-kit 0.94.0 → 0.95.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 (613) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.fr.md +26 -15
  3. package/README.md +26 -16
  4. package/dist/build/rewrite-aliases.js +1 -1
  5. package/dist/build/rewrite-aliases.js.map +1 -1
  6. package/dist/check/canonical/stray-entry.js +7 -1
  7. package/dist/check/canonical/stray-entry.js.map +1 -1
  8. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  9. package/dist/check/configuration/config-inspection.js +2 -0
  10. package/dist/check/configuration/config-inspection.js.map +1 -1
  11. package/dist/check/configuration/context-tenancy.d.ts +10 -0
  12. package/dist/check/configuration/context-tenancy.d.ts.map +1 -0
  13. package/dist/check/configuration/context-tenancy.js +16 -0
  14. package/dist/check/configuration/context-tenancy.js.map +1 -0
  15. package/dist/check/errors/listed-codes.d.ts +1 -1
  16. package/dist/check/errors/listed-codes.d.ts.map +1 -1
  17. package/dist/check/errors/listed-codes.js +15 -3
  18. package/dist/check/errors/listed-codes.js.map +1 -1
  19. package/dist/check/explain/language-docs.js +1 -1
  20. package/dist/check/explain/language-docs.js.map +1 -1
  21. package/dist/check/explain/privacy-docs.js +1 -1
  22. package/dist/check/explain/privacy-docs.js.map +1 -1
  23. package/dist/check/explain/tenancy-docs.js +1 -1
  24. package/dist/check/explain/tenancy-docs.js.map +1 -1
  25. package/dist/check/explain/tree-docs.js +2 -2
  26. package/dist/check/explain/tree-docs.js.map +1 -1
  27. package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
  28. package/dist/check/fixtures/config-fixtures.js +13 -0
  29. package/dist/check/fixtures/config-fixtures.js.map +1 -1
  30. package/dist/check/fixtures/config.js +2 -1
  31. package/dist/check/fixtures/config.js.map +1 -1
  32. package/dist/check/fixtures/control-plane-fixtures.d.ts +4 -0
  33. package/dist/check/fixtures/control-plane-fixtures.d.ts.map +1 -0
  34. package/dist/check/fixtures/control-plane-fixtures.js +41 -0
  35. package/dist/check/fixtures/control-plane-fixtures.js.map +1 -0
  36. package/dist/check/fixtures/files-fixtures.js +2 -2
  37. package/dist/check/fixtures/files-fixtures.js.map +1 -1
  38. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  39. package/dist/check/fixtures/fixtures.js +2 -0
  40. package/dist/check/fixtures/fixtures.js.map +1 -1
  41. package/dist/check/fixtures/governance-fixtures.d.ts.map +1 -1
  42. package/dist/check/fixtures/governance-fixtures.js +15 -0
  43. package/dist/check/fixtures/governance-fixtures.js.map +1 -1
  44. package/dist/check/fixtures/language-fixtures.d.ts.map +1 -1
  45. package/dist/check/fixtures/language-fixtures.js +22 -0
  46. package/dist/check/fixtures/language-fixtures.js.map +1 -1
  47. package/dist/check/fixtures/privacy-fixtures.js +2 -2
  48. package/dist/check/fixtures/privacy-fixtures.js.map +1 -1
  49. package/dist/check/fixtures/shared-kernel-fixtures.d.ts +3 -0
  50. package/dist/check/fixtures/shared-kernel-fixtures.d.ts.map +1 -0
  51. package/dist/check/fixtures/shared-kernel-fixtures.js +60 -0
  52. package/dist/check/fixtures/shared-kernel-fixtures.js.map +1 -0
  53. package/dist/check/fixtures/shared-kernel-glossary.d.ts +7 -0
  54. package/dist/check/fixtures/shared-kernel-glossary.d.ts.map +1 -0
  55. package/dist/check/fixtures/shared-kernel-glossary.js +12 -0
  56. package/dist/check/fixtures/shared-kernel-glossary.js.map +1 -0
  57. package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
  58. package/dist/check/fixtures/standard-fixtures.js +2 -0
  59. package/dist/check/fixtures/standard-fixtures.js.map +1 -1
  60. package/dist/check/fixtures/tenancy-adapters.d.ts +20 -0
  61. package/dist/check/fixtures/tenancy-adapters.d.ts.map +1 -0
  62. package/dist/check/fixtures/tenancy-adapters.js +10 -0
  63. package/dist/check/fixtures/tenancy-adapters.js.map +1 -0
  64. package/dist/check/fixtures/tenancy-bypass.d.ts +2 -21
  65. package/dist/check/fixtures/tenancy-bypass.d.ts.map +1 -1
  66. package/dist/check/fixtures/tenancy-bypass.js +2 -10
  67. package/dist/check/fixtures/tenancy-bypass.js.map +1 -1
  68. package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
  69. package/dist/check/fixtures/tenancy-fixtures.js +2 -0
  70. package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
  71. package/dist/check/fixtures/tree-fixtures.d.ts.map +1 -1
  72. package/dist/check/fixtures/tree-fixtures.js +17 -0
  73. package/dist/check/fixtures/tree-fixtures.js.map +1 -1
  74. package/dist/check/fixtures/value-object-file-fixtures.d.ts.map +1 -1
  75. package/dist/check/fixtures/value-object-file-fixtures.js +2 -0
  76. package/dist/check/fixtures/value-object-file-fixtures.js.map +1 -1
  77. package/dist/check/language/add-glossary-rows.d.ts +1 -0
  78. package/dist/check/language/add-glossary-rows.d.ts.map +1 -1
  79. package/dist/check/language/add-glossary-rows.js +7 -2
  80. package/dist/check/language/add-glossary-rows.js.map +1 -1
  81. package/dist/check/language/glossaries.d.ts +8 -2
  82. package/dist/check/language/glossaries.d.ts.map +1 -1
  83. package/dist/check/language/glossaries.js +28 -18
  84. package/dist/check/language/glossaries.js.map +1 -1
  85. package/dist/check/language/held-by-glossary.d.ts +8 -0
  86. package/dist/check/language/held-by-glossary.d.ts.map +1 -0
  87. package/dist/check/language/held-by-glossary.js +19 -0
  88. package/dist/check/language/held-by-glossary.js.map +1 -0
  89. package/dist/check/language/technical-words-of.d.ts +9 -0
  90. package/dist/check/language/technical-words-of.d.ts.map +1 -0
  91. package/dist/check/language/technical-words-of.js +15 -0
  92. package/dist/check/language/technical-words-of.js.map +1 -0
  93. package/dist/check/privacy/prisma-columns-of.d.ts +5 -5
  94. package/dist/check/privacy/prisma-columns-of.d.ts.map +1 -1
  95. package/dist/check/privacy/prisma-columns-of.js +25 -12
  96. package/dist/check/privacy/prisma-columns-of.js.map +1 -1
  97. package/dist/check/project/beside-the-sources.js +1 -1
  98. package/dist/check/project/beside-the-sources.js.map +1 -1
  99. package/dist/check/project/git-ignored.d.ts +11 -0
  100. package/dist/check/project/git-ignored.d.ts.map +1 -0
  101. package/dist/check/project/git-ignored.js +26 -0
  102. package/dist/check/project/git-ignored.js.map +1 -0
  103. package/dist/check/project/load-loose-project.js +1 -1
  104. package/dist/check/project/load-loose-project.js.map +1 -1
  105. package/dist/check/project/load-project.d.ts.map +1 -1
  106. package/dist/check/project/load-project.js +13 -2
  107. package/dist/check/project/load-project.js.map +1 -1
  108. package/dist/check/project/locate.js +2 -1
  109. package/dist/check/project/locate.js.map +1 -1
  110. package/dist/check/project/walk-directory.d.ts +10 -2
  111. package/dist/check/project/walk-directory.d.ts.map +1 -1
  112. package/dist/check/project/walk-directory.js +9 -4
  113. package/dist/check/project/walk-directory.js.map +1 -1
  114. package/dist/check/rules/governance-recorded-deviation.js +14 -1
  115. package/dist/check/rules/governance-recorded-deviation.js.map +1 -1
  116. package/dist/check/rules/language-glossary-term.js +38 -18
  117. package/dist/check/rules/language-glossary-term.js.map +1 -1
  118. package/dist/check/rules/language-no-technical-name.d.ts.map +1 -1
  119. package/dist/check/rules/language-no-technical-name.js +9 -7
  120. package/dist/check/rules/language-no-technical-name.js.map +1 -1
  121. package/dist/check/rules/privacy-declared-field.d.ts +1 -1
  122. package/dist/check/rules/privacy-declared-field.js +1 -1
  123. package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -1
  124. package/dist/check/rules/tenancy-scoped-statement.js +8 -6
  125. package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
  126. package/dist/commands/acceptance.js +6 -2
  127. package/dist/commands/acceptance.js.map +1 -1
  128. package/dist/commands/context-layout.d.ts.map +1 -1
  129. package/dist/commands/context-layout.js +3 -2
  130. package/dist/commands/context-layout.js.map +1 -1
  131. package/dist/commands/depcruise-config.d.ts.map +1 -1
  132. package/dist/commands/depcruise-config.js +13 -5
  133. package/dist/commands/depcruise-config.js.map +1 -1
  134. package/dist/commands/docs.d.ts.map +1 -1
  135. package/dist/commands/docs.js +2 -4
  136. package/dist/commands/docs.js.map +1 -1
  137. package/dist/commands/generate.d.ts.map +1 -1
  138. package/dist/commands/generate.js +11 -3
  139. package/dist/commands/generate.js.map +1 -1
  140. package/dist/commands/init.d.ts.map +1 -1
  141. package/dist/commands/init.js +10 -2
  142. package/dist/commands/init.js.map +1 -1
  143. package/dist/commands/move-to-module.d.ts.map +1 -1
  144. package/dist/commands/move-to-module.js +3 -2
  145. package/dist/commands/move-to-module.js.map +1 -1
  146. package/dist/commands/print-report.d.ts +3 -3
  147. package/dist/commands/print-report.d.ts.map +1 -1
  148. package/dist/commands/print-report.js +10 -3
  149. package/dist/commands/print-report.js.map +1 -1
  150. package/dist/commands/sdk.js +1 -2
  151. package/dist/commands/sdk.js.map +1 -1
  152. package/dist/config/config.d.ts +7 -0
  153. package/dist/config/config.d.ts.map +1 -1
  154. package/dist/config/context-tenancies.d.ts +7 -0
  155. package/dist/config/context-tenancies.d.ts.map +1 -0
  156. package/dist/config/context-tenancies.js +7 -0
  157. package/dist/config/context-tenancies.js.map +1 -0
  158. package/dist/config/index.d.ts +2 -0
  159. package/dist/config/index.d.ts.map +1 -1
  160. package/dist/config/index.js +2 -0
  161. package/dist/config/index.js.map +1 -1
  162. package/dist/config/is-control-plane.d.ts +4 -0
  163. package/dist/config/is-control-plane.d.ts.map +1 -0
  164. package/dist/config/is-control-plane.js +5 -0
  165. package/dist/config/is-control-plane.js.map +1 -0
  166. package/dist/config/parse-context.d.ts.map +1 -1
  167. package/dist/config/parse-context.js +1 -0
  168. package/dist/config/parse-context.js.map +1 -1
  169. package/dist/config/serialize-config.js +1 -0
  170. package/dist/config/serialize-config.js.map +1 -1
  171. package/dist/dev/refresh-declarations.d.ts.map +1 -1
  172. package/dist/dev/refresh-declarations.js +2 -1
  173. package/dist/dev/refresh-declarations.js.map +1 -1
  174. package/dist/doctor/permission-findings.d.ts.map +1 -1
  175. package/dist/doctor/permission-findings.js +15 -2
  176. package/dist/doctor/permission-findings.js.map +1 -1
  177. package/dist/generate/concept.d.ts +2 -2
  178. package/dist/generate/concept.js +3 -3
  179. package/dist/generate/concept.js.map +1 -1
  180. package/dist/generate/context-vars.d.ts +5 -2
  181. package/dist/generate/context-vars.d.ts.map +1 -1
  182. package/dist/generate/context-vars.js +6 -3
  183. package/dist/generate/context-vars.js.map +1 -1
  184. package/dist/generate/errors/codes-of-context.d.ts +1 -1
  185. package/dist/generate/errors/codes-of-context.d.ts.map +1 -1
  186. package/dist/generate/errors/codes-of-context.js +10 -2
  187. package/dist/generate/errors/codes-of-context.js.map +1 -1
  188. package/dist/generate/errors/refusal-class-name.d.ts +1 -1
  189. package/dist/generate/errors/refusal-class-name.d.ts.map +1 -1
  190. package/dist/generate/errors/refusal-class-name.js +2 -2
  191. package/dist/generate/errors/refusal-class-name.js.map +1 -1
  192. package/dist/generate/glossary-of.d.ts +5 -0
  193. package/dist/generate/glossary-of.d.ts.map +1 -0
  194. package/dist/generate/glossary-of.js +6 -0
  195. package/dist/generate/glossary-of.js.map +1 -0
  196. package/dist/generate/is-shared-kernel.d.ts +4 -0
  197. package/dist/generate/is-shared-kernel.d.ts.map +1 -0
  198. package/dist/generate/is-shared-kernel.js +5 -0
  199. package/dist/generate/is-shared-kernel.js.map +1 -0
  200. package/dist/generate/kind.d.ts +8 -6
  201. package/dist/generate/kind.d.ts.map +1 -1
  202. package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -1
  203. package/dist/generate/kinds/acceptance-kind.js +1 -0
  204. package/dist/generate/kinds/acceptance-kind.js.map +1 -1
  205. package/dist/generate/kinds/acl-kind.d.ts.map +1 -1
  206. package/dist/generate/kinds/acl-kind.js +1 -0
  207. package/dist/generate/kinds/acl-kind.js.map +1 -1
  208. package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
  209. package/dist/generate/kinds/adapter-kind.js +57 -7
  210. package/dist/generate/kinds/adapter-kind.js.map +1 -1
  211. package/dist/generate/kinds/adr-kind.d.ts.map +1 -1
  212. package/dist/generate/kinds/adr-kind.js +1 -0
  213. package/dist/generate/kinds/adr-kind.js.map +1 -1
  214. package/dist/generate/kinds/aggregate-kind.d.ts.map +1 -1
  215. package/dist/generate/kinds/aggregate-kind.js +1 -0
  216. package/dist/generate/kinds/aggregate-kind.js.map +1 -1
  217. package/dist/generate/kinds/background-job-kind.d.ts.map +1 -1
  218. package/dist/generate/kinds/background-job-kind.js +1 -0
  219. package/dist/generate/kinds/background-job-kind.js.map +1 -1
  220. package/dist/generate/kinds/builder-kind.d.ts.map +1 -1
  221. package/dist/generate/kinds/builder-kind.js +1 -0
  222. package/dist/generate/kinds/builder-kind.js.map +1 -1
  223. package/dist/generate/kinds/command-kind.d.ts.map +1 -1
  224. package/dist/generate/kinds/command-kind.js +1 -0
  225. package/dist/generate/kinds/command-kind.js.map +1 -1
  226. package/dist/generate/kinds/context-kind.d.ts.map +1 -1
  227. package/dist/generate/kinds/context-kind.js +3 -1
  228. package/dist/generate/kinds/context-kind.js.map +1 -1
  229. package/dist/generate/kinds/context-request.d.ts +2 -0
  230. package/dist/generate/kinds/context-request.d.ts.map +1 -1
  231. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  232. package/dist/generate/kinds/declare-storage.js +15 -9
  233. package/dist/generate/kinds/declare-storage.js.map +1 -1
  234. package/dist/generate/kinds/domain-error-kind.d.ts.map +1 -1
  235. package/dist/generate/kinds/domain-error-kind.js +7 -4
  236. package/dist/generate/kinds/domain-error-kind.js.map +1 -1
  237. package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
  238. package/dist/generate/kinds/domain-event-kind.js +1 -0
  239. package/dist/generate/kinds/domain-event-kind.js.map +1 -1
  240. package/dist/generate/kinds/domain-service-kind.d.ts.map +1 -1
  241. package/dist/generate/kinds/domain-service-kind.js +1 -0
  242. package/dist/generate/kinds/domain-service-kind.js.map +1 -1
  243. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  244. package/dist/generate/kinds/e2e-kind.js +1 -0
  245. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  246. package/dist/generate/kinds/entity-kind.d.ts.map +1 -1
  247. package/dist/generate/kinds/entity-kind.js +1 -0
  248. package/dist/generate/kinds/entity-kind.js.map +1 -1
  249. package/dist/generate/kinds/erasure-handler-kind.d.ts.map +1 -1
  250. package/dist/generate/kinds/erasure-handler-kind.js +1 -0
  251. package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
  252. package/dist/generate/kinds/error-kind.d.ts.map +1 -1
  253. package/dist/generate/kinds/error-kind.js +6 -5
  254. package/dist/generate/kinds/error-kind.js.map +1 -1
  255. package/dist/generate/kinds/event-handler-kind.d.ts.map +1 -1
  256. package/dist/generate/kinds/event-handler-kind.js +1 -0
  257. package/dist/generate/kinds/event-handler-kind.js.map +1 -1
  258. package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts +4 -2
  259. package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts.map +1 -1
  260. package/dist/generate/kinds/extend-event-sourced-aggregate.js +45 -10
  261. package/dist/generate/kinds/extend-event-sourced-aggregate.js.map +1 -1
  262. package/dist/generate/kinds/file-upload-kind.d.ts.map +1 -1
  263. package/dist/generate/kinds/file-upload-kind.js +1 -0
  264. package/dist/generate/kinds/file-upload-kind.js.map +1 -1
  265. package/dist/generate/kinds/form-kind.d.ts.map +1 -1
  266. package/dist/generate/kinds/form-kind.js +1 -0
  267. package/dist/generate/kinds/form-kind.js.map +1 -1
  268. package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
  269. package/dist/generate/kinds/gateway-kind.js +1 -0
  270. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  271. package/dist/generate/kinds/generate-repository.js +11 -7
  272. package/dist/generate/kinds/generate-repository.js.map +1 -1
  273. package/dist/generate/kinds/guard-kind.d.ts.map +1 -1
  274. package/dist/generate/kinds/guard-kind.js +1 -0
  275. package/dist/generate/kinds/guard-kind.js.map +1 -1
  276. package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
  277. package/dist/generate/kinds/integration-event-kind.js +1 -0
  278. package/dist/generate/kinds/integration-event-kind.js.map +1 -1
  279. package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
  280. package/dist/generate/kinds/integration-handler-kind.js +1 -0
  281. package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
  282. package/dist/generate/kinds/job-kind.d.ts.map +1 -1
  283. package/dist/generate/kinds/job-kind.js +1 -0
  284. package/dist/generate/kinds/job-kind.js.map +1 -1
  285. package/dist/generate/kinds/module-kind.d.ts.map +1 -1
  286. package/dist/generate/kinds/module-kind.js +1 -0
  287. package/dist/generate/kinds/module-kind.js.map +1 -1
  288. package/dist/generate/kinds/plan-vars.d.ts.map +1 -1
  289. package/dist/generate/kinds/plan-vars.js +5 -2
  290. package/dist/generate/kinds/plan-vars.js.map +1 -1
  291. package/dist/generate/kinds/policy-kind.d.ts.map +1 -1
  292. package/dist/generate/kinds/policy-kind.js +1 -0
  293. package/dist/generate/kinds/policy-kind.js.map +1 -1
  294. package/dist/generate/kinds/port-kind.d.ts.map +1 -1
  295. package/dist/generate/kinds/port-kind.js +4 -2
  296. package/dist/generate/kinds/port-kind.js.map +1 -1
  297. package/dist/generate/kinds/process-kind.d.ts.map +1 -1
  298. package/dist/generate/kinds/process-kind.js +1 -0
  299. package/dist/generate/kinds/process-kind.js.map +1 -1
  300. package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
  301. package/dist/generate/kinds/projection-kind.js +4 -5
  302. package/dist/generate/kinds/projection-kind.js.map +1 -1
  303. package/dist/generate/kinds/property-kind.d.ts.map +1 -1
  304. package/dist/generate/kinds/property-kind.js +1 -0
  305. package/dist/generate/kinds/property-kind.js.map +1 -1
  306. package/dist/generate/kinds/query-kind.d.ts.map +1 -1
  307. package/dist/generate/kinds/query-kind.js +1 -0
  308. package/dist/generate/kinds/query-kind.js.map +1 -1
  309. package/dist/generate/kinds/repository-kind.d.ts.map +1 -1
  310. package/dist/generate/kinds/repository-kind.js +1 -0
  311. package/dist/generate/kinds/repository-kind.js.map +1 -1
  312. package/dist/generate/kinds/representation-kind.d.ts.map +1 -1
  313. package/dist/generate/kinds/representation-kind.js +1 -0
  314. package/dist/generate/kinds/representation-kind.js.map +1 -1
  315. package/dist/generate/kinds/route-group-kind.d.ts.map +1 -1
  316. package/dist/generate/kinds/route-group-kind.js +1 -0
  317. package/dist/generate/kinds/route-group-kind.js.map +1 -1
  318. package/dist/generate/kinds/route-kind.d.ts.map +1 -1
  319. package/dist/generate/kinds/route-kind.js +1 -0
  320. package/dist/generate/kinds/route-kind.js.map +1 -1
  321. package/dist/generate/kinds/schema-kind.d.ts.map +1 -1
  322. package/dist/generate/kinds/schema-kind.js +4 -9
  323. package/dist/generate/kinds/schema-kind.js.map +1 -1
  324. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  325. package/dist/generate/kinds/service-kind.js +1 -0
  326. package/dist/generate/kinds/service-kind.js.map +1 -1
  327. package/dist/generate/kinds/state-machine-kind.d.ts.map +1 -1
  328. package/dist/generate/kinds/state-machine-kind.js +1 -0
  329. package/dist/generate/kinds/state-machine-kind.js.map +1 -1
  330. package/dist/generate/kinds/test-world-kind.d.ts.map +1 -1
  331. package/dist/generate/kinds/test-world-kind.js +1 -0
  332. package/dist/generate/kinds/test-world-kind.js.map +1 -1
  333. package/dist/generate/kinds/value-object-kind.d.ts.map +1 -1
  334. package/dist/generate/kinds/value-object-kind.js +5 -4
  335. package/dist/generate/kinds/value-object-kind.js.map +1 -1
  336. package/dist/generate/kinds/vocabulary-kind.d.ts.map +1 -1
  337. package/dist/generate/kinds/vocabulary-kind.js +1 -0
  338. package/dist/generate/kinds/vocabulary-kind.js.map +1 -1
  339. package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
  340. package/dist/generate/kinds/worker-kind.js +1 -0
  341. package/dist/generate/kinds/worker-kind.js.map +1 -1
  342. package/dist/generate/kinds-help.d.ts +2 -0
  343. package/dist/generate/kinds-help.d.ts.map +1 -1
  344. package/dist/generate/kinds-help.js +5 -2
  345. package/dist/generate/kinds-help.js.map +1 -1
  346. package/dist/generate/label.d.ts +4 -1
  347. package/dist/generate/label.d.ts.map +1 -1
  348. package/dist/generate/label.js +24 -3
  349. package/dist/generate/label.js.map +1 -1
  350. package/dist/generate/learn-terms.d.ts.map +1 -1
  351. package/dist/generate/learn-terms.js +7 -1
  352. package/dist/generate/learn-terms.js.map +1 -1
  353. package/dist/generate/open-scope.d.ts +7 -2
  354. package/dist/generate/open-scope.d.ts.map +1 -1
  355. package/dist/generate/open-scope.js +14 -2
  356. package/dist/generate/open-scope.js.map +1 -1
  357. package/dist/generate/parse-terms.d.ts +7 -1
  358. package/dist/generate/parse-terms.d.ts.map +1 -1
  359. package/dist/generate/parse-terms.js +14 -4
  360. package/dist/generate/parse-terms.js.map +1 -1
  361. package/dist/generate/place-generated-files.d.ts +2 -2
  362. package/dist/generate/place-generated-files.d.ts.map +1 -1
  363. package/dist/generate/place-generated-files.js +7 -7
  364. package/dist/generate/place-generated-files.js.map +1 -1
  365. package/dist/generate/refuse-shared-writes.d.ts +2 -2
  366. package/dist/generate/refuse-shared-writes.d.ts.map +1 -1
  367. package/dist/generate/refuse-shared-writes.js +25 -4
  368. package/dist/generate/refuse-shared-writes.js.map +1 -1
  369. package/dist/generate/shared-kernel-placement.d.ts +9 -0
  370. package/dist/generate/shared-kernel-placement.d.ts.map +1 -0
  371. package/dist/generate/shared-kernel-placement.js +20 -0
  372. package/dist/generate/shared-kernel-placement.js.map +1 -0
  373. package/dist/generate/shared-kernel-scope.d.ts +11 -0
  374. package/dist/generate/shared-kernel-scope.d.ts.map +1 -0
  375. package/dist/generate/shared-kernel-scope.js +12 -0
  376. package/dist/generate/shared-kernel-scope.js.map +1 -0
  377. package/dist/generate/shared-writes.d.ts.map +1 -1
  378. package/dist/generate/shared-writes.js +26 -2
  379. package/dist/generate/shared-writes.js.map +1 -1
  380. package/dist/generate/spoken-in-language.d.ts +3 -3
  381. package/dist/generate/spoken-in-language.d.ts.map +1 -1
  382. package/dist/generate/spoken-in-language.js +14 -14
  383. package/dist/generate/spoken-in-language.js.map +1 -1
  384. package/dist/generate/usage-of.d.ts +6 -0
  385. package/dist/generate/usage-of.d.ts.map +1 -0
  386. package/dist/generate/usage-of.js +7 -0
  387. package/dist/generate/usage-of.js.map +1 -0
  388. package/dist/generate/vars.d.ts.map +1 -1
  389. package/dist/generate/vars.js +9 -1
  390. package/dist/generate/vars.js.map +1 -1
  391. package/dist/help/notes.d.ts +1 -1
  392. package/dist/help/notes.d.ts.map +1 -1
  393. package/dist/help/notes.js +20 -5
  394. package/dist/help/notes.js.map +1 -1
  395. package/dist/help/reference-text.d.ts.map +1 -1
  396. package/dist/help/reference-text.js +2 -1
  397. package/dist/help/reference-text.js.map +1 -1
  398. package/dist/help/usage.d.ts +1 -1
  399. package/dist/help/usage.d.ts.map +1 -1
  400. package/dist/help/usage.js +1 -1
  401. package/dist/init/agent-permissions.d.ts +7 -0
  402. package/dist/init/agent-permissions.d.ts.map +1 -1
  403. package/dist/init/agent-permissions.js +19 -8
  404. package/dist/init/agent-permissions.js.map +1 -1
  405. package/dist/init/files/persistence-files.d.ts.map +1 -1
  406. package/dist/init/files/persistence-files.js +2 -1
  407. package/dist/init/files/persistence-files.js.map +1 -1
  408. package/dist/init/first-install-note.d.ts +9 -0
  409. package/dist/init/first-install-note.d.ts.map +1 -0
  410. package/dist/init/first-install-note.js +31 -0
  411. package/dist/init/first-install-note.js.map +1 -0
  412. package/dist/init/manifest/database-scripts.js +2 -2
  413. package/dist/init/manifest/database-scripts.js.map +1 -1
  414. package/dist/init/manifest/versions.js +24 -24
  415. package/dist/init/merge-sandbox.d.ts +3 -1
  416. package/dist/init/merge-sandbox.d.ts.map +1 -1
  417. package/dist/init/merge-sandbox.js +25 -7
  418. package/dist/init/merge-sandbox.js.map +1 -1
  419. package/dist/init/regulated-sandbox.d.ts +6 -4
  420. package/dist/init/regulated-sandbox.d.ts.map +1 -1
  421. package/dist/init/regulated-sandbox.js +11 -5
  422. package/dist/init/regulated-sandbox.js.map +1 -1
  423. package/dist/init/run-init.d.ts +2 -0
  424. package/dist/init/run-init.d.ts.map +1 -1
  425. package/dist/init/run-init.js +27 -4
  426. package/dist/init/run-init.js.map +1 -1
  427. package/dist/init/stack-sandbox.d.ts +9 -0
  428. package/dist/init/stack-sandbox.d.ts.map +1 -0
  429. package/dist/init/stack-sandbox.js +28 -0
  430. package/dist/init/stack-sandbox.js.map +1 -0
  431. package/dist/init/write-agent-settings.d.ts.map +1 -1
  432. package/dist/init/write-agent-settings.js +26 -16
  433. package/dist/init/write-agent-settings.js.map +1 -1
  434. package/dist/merge/abort-merge.d.ts.map +1 -1
  435. package/dist/merge/abort-merge.js +38 -6
  436. package/dist/merge/abort-merge.js.map +1 -1
  437. package/dist/merge/commit-merge.d.ts.map +1 -1
  438. package/dist/merge/commit-merge.js +1 -16
  439. package/dist/merge/commit-merge.js.map +1 -1
  440. package/dist/merge/continue-merge.d.ts.map +1 -1
  441. package/dist/merge/continue-merge.js +2 -0
  442. package/dist/merge/continue-merge.js.map +1 -1
  443. package/dist/merge/is-merge-path.d.ts +4 -0
  444. package/dist/merge/is-merge-path.d.ts.map +1 -0
  445. package/dist/merge/is-merge-path.js +18 -0
  446. package/dist/merge/is-merge-path.js.map +1 -0
  447. package/dist/merge/modified-since-staged.d.ts +4 -0
  448. package/dist/merge/modified-since-staged.d.ts.map +1 -0
  449. package/dist/merge/modified-since-staged.js +8 -0
  450. package/dist/merge/modified-since-staged.js.map +1 -0
  451. package/dist/merge/stage-rewritten.d.ts +8 -0
  452. package/dist/merge/stage-rewritten.d.ts.map +1 -0
  453. package/dist/merge/stage-rewritten.js +15 -0
  454. package/dist/merge/stage-rewritten.js.map +1 -0
  455. package/dist/naming/parse-concept-name.d.ts +5 -3
  456. package/dist/naming/parse-concept-name.d.ts.map +1 -1
  457. package/dist/naming/parse-concept-name.js +6 -10
  458. package/dist/naming/parse-concept-name.js.map +1 -1
  459. package/dist/presets/apply-preset.d.ts.map +1 -1
  460. package/dist/presets/apply-preset.js +6 -4
  461. package/dist/presets/apply-preset.js.map +1 -1
  462. package/dist/presets/identity-preset.d.ts.map +1 -1
  463. package/dist/presets/identity-preset.js +1 -4
  464. package/dist/presets/identity-preset.js.map +1 -1
  465. package/dist/presets/lay-out-prisma-models.d.ts +4 -4
  466. package/dist/presets/lay-out-prisma-models.d.ts.map +1 -1
  467. package/dist/presets/lay-out-prisma-models.js +15 -12
  468. package/dist/presets/lay-out-prisma-models.js.map +1 -1
  469. package/dist/presets/outside-the-tenancy.d.ts +10 -0
  470. package/dist/presets/outside-the-tenancy.d.ts.map +1 -0
  471. package/dist/presets/outside-the-tenancy.js +31 -0
  472. package/dist/presets/outside-the-tenancy.js.map +1 -0
  473. package/dist/presets/preset-decision.d.ts +1 -1
  474. package/dist/presets/preset-decision.js +1 -1
  475. package/dist/presets/preset.d.ts +1 -1
  476. package/dist/prisma-schema/index.d.ts +7 -0
  477. package/dist/prisma-schema/index.d.ts.map +1 -0
  478. package/dist/prisma-schema/index.js +7 -0
  479. package/dist/prisma-schema/index.js.map +1 -0
  480. package/dist/prisma-schema/prisma-blocks.d.ts +9 -0
  481. package/dist/prisma-schema/prisma-blocks.d.ts.map +1 -0
  482. package/dist/prisma-schema/prisma-blocks.js +15 -0
  483. package/dist/prisma-schema/prisma-blocks.js.map +1 -0
  484. package/dist/prisma-schema/prisma-main-schema.d.ts +3 -0
  485. package/dist/prisma-schema/prisma-main-schema.d.ts.map +1 -0
  486. package/dist/prisma-schema/prisma-main-schema.js +4 -0
  487. package/dist/prisma-schema/prisma-main-schema.js.map +1 -0
  488. package/dist/prisma-schema/prisma-schema-folder.d.ts +3 -0
  489. package/dist/prisma-schema/prisma-schema-folder.d.ts.map +1 -0
  490. package/dist/prisma-schema/prisma-schema-folder.js +3 -0
  491. package/dist/prisma-schema/prisma-schema-folder.js.map +1 -0
  492. package/dist/prisma-schema/prisma-schema-of.d.ts +7 -0
  493. package/dist/prisma-schema/prisma-schema-of.d.ts.map +1 -0
  494. package/dist/prisma-schema/prisma-schema-of.js +10 -0
  495. package/dist/prisma-schema/prisma-schema-of.js.map +1 -0
  496. package/dist/prisma-schema/schema-at.d.ts +4 -0
  497. package/dist/prisma-schema/schema-at.d.ts.map +1 -0
  498. package/dist/prisma-schema/schema-at.js +5 -0
  499. package/dist/prisma-schema/schema-at.js.map +1 -0
  500. package/dist/prisma-schema/schema-of-context.d.ts +3 -0
  501. package/dist/prisma-schema/schema-of-context.d.ts.map +1 -0
  502. package/dist/prisma-schema/schema-of-context.js +5 -0
  503. package/dist/prisma-schema/schema-of-context.js.map +1 -0
  504. package/dist/progress/read-remaining.d.ts.map +1 -1
  505. package/dist/progress/read-remaining.js +49 -6
  506. package/dist/progress/read-remaining.js.map +1 -1
  507. package/dist/slice/plan-staging.d.ts +7 -4
  508. package/dist/slice/plan-staging.d.ts.map +1 -1
  509. package/dist/slice/plan-staging.js +23 -5
  510. package/dist/slice/plan-staging.js.map +1 -1
  511. package/dist/slice/staging-scope.d.ts +9 -0
  512. package/dist/slice/staging-scope.d.ts.map +1 -0
  513. package/dist/slice/staging-scope.js +2 -0
  514. package/dist/slice/staging-scope.js.map +1 -0
  515. package/dist/slice/storage-of-slice.d.ts +14 -0
  516. package/dist/slice/storage-of-slice.d.ts.map +1 -0
  517. package/dist/slice/storage-of-slice.js +79 -0
  518. package/dist/slice/storage-of-slice.js.map +1 -0
  519. package/dist/slice/verify-slice.d.ts.map +1 -1
  520. package/dist/slice/verify-slice.js +3 -1
  521. package/dist/slice/verify-slice.js.map +1 -1
  522. package/dist/stack/audit-vars.js +1 -1
  523. package/dist/stack/audit-vars.js.map +1 -1
  524. package/dist/version.d.ts +1 -1
  525. package/dist/version.js +1 -1
  526. package/dist/worker/briefing-of.d.ts.map +1 -1
  527. package/dist/worker/briefing-of.js +7 -0
  528. package/dist/worker/briefing-of.js.map +1 -1
  529. package/dist/worker/progress-of.d.ts.map +1 -1
  530. package/dist/worker/progress-of.js +4 -1
  531. package/dist/worker/progress-of.js.map +1 -1
  532. package/dist/workspace/cannot-write.d.ts +7 -0
  533. package/dist/workspace/cannot-write.d.ts.map +1 -0
  534. package/dist/workspace/cannot-write.js +36 -0
  535. package/dist/workspace/cannot-write.js.map +1 -0
  536. package/dist/workspace/error-code-of.d.ts +3 -0
  537. package/dist/workspace/error-code-of.d.ts.map +1 -0
  538. package/dist/workspace/error-code-of.js +5 -0
  539. package/dist/workspace/error-code-of.js.map +1 -0
  540. package/dist/workspace/exit-code-of.d.ts +6 -0
  541. package/dist/workspace/exit-code-of.d.ts.map +1 -0
  542. package/dist/workspace/exit-code-of.js +7 -0
  543. package/dist/workspace/exit-code-of.js.map +1 -0
  544. package/dist/workspace/index.d.ts +2 -0
  545. package/dist/workspace/index.d.ts.map +1 -1
  546. package/dist/workspace/index.js +2 -0
  547. package/dist/workspace/index.js.map +1 -1
  548. package/dist/workspace/is-file-or-absent.d.ts +3 -0
  549. package/dist/workspace/is-file-or-absent.d.ts.map +1 -0
  550. package/dist/workspace/is-file-or-absent.js +11 -0
  551. package/dist/workspace/is-file-or-absent.js.map +1 -0
  552. package/dist/workspace/prune-emptied.d.ts +3 -0
  553. package/dist/workspace/prune-emptied.d.ts.map +1 -0
  554. package/dist/workspace/prune-emptied.js +12 -0
  555. package/dist/workspace/prune-emptied.js.map +1 -0
  556. package/dist/workspace/tell-unwritable.d.ts +9 -0
  557. package/dist/workspace/tell-unwritable.d.ts.map +1 -0
  558. package/dist/workspace/tell-unwritable.js +10 -0
  559. package/dist/workspace/tell-unwritable.js.map +1 -0
  560. package/dist/workspace/workspace-report.d.ts +3 -0
  561. package/dist/workspace/workspace-report.d.ts.map +1 -1
  562. package/dist/workspace/workspace.d.ts +15 -4
  563. package/dist/workspace/workspace.d.ts.map +1 -1
  564. package/dist/workspace/workspace.js +47 -27
  565. package/dist/workspace/workspace.js.map +1 -1
  566. package/dist/workspace/write-if-allowed.d.ts +3 -0
  567. package/dist/workspace/write-if-allowed.d.ts.map +1 -0
  568. package/dist/workspace/write-if-allowed.js +20 -0
  569. package/dist/workspace/write-if-allowed.js.map +1 -0
  570. package/package.json +4 -4
  571. package/templates/adapter/simulated.declared.ts.tpl +7 -0
  572. package/templates/adapter/simulated.spec.ts.tpl +12 -0
  573. package/templates/adapter/simulated.ts.tpl +5 -0
  574. package/templates/adapter/simulated.wiring.tsyringe.tpl +5 -0
  575. package/templates/context/CONTEXT.md.tpl +1 -1
  576. package/templates/init/README.md.tpl +1 -1
  577. package/templates/init/platform/audit/create-audit.ts.tpl +1 -1
  578. package/templates/init/platform/composition/compose-application.manual.ts.tpl +24 -17
  579. package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
  580. package/templates/init/platform/database/open-test-database.prisma.ts.tpl +1 -1
  581. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
  582. package/templates/init/platform/database/prisma.config.ts.tpl +2 -1
  583. package/templates/init/platform/database/schema.prisma.tpl +3 -4
  584. package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +1 -1
  585. package/templates/init/rules/infrastructure.md.tpl +2 -1
  586. package/templates/pipeline/github/actions/setup/action.yml.tpl +1 -1
  587. package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +1 -1
  588. package/templates/pipeline/package-scripts.json +1 -1
  589. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +0 -3
  590. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +0 -3
  591. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +0 -3
  592. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +0 -3
  593. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation-tenant-directory.reader.drizzle.ts.tpl +0 -3
  594. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +0 -3
  595. package/templates/presets/identity/context/infrastructure/persistence/drizzle-search-members-reader.repository.drizzle.ts.tpl +0 -3
  596. package/templates/presets/identity/context/infrastructure/persistence/knex-account.repository.knex.ts.tpl +0 -3
  597. package/templates/presets/identity/context/infrastructure/persistence/knex-delegation.repository.knex.ts.tpl +0 -3
  598. package/templates/presets/identity/context/infrastructure/persistence/knex-invitation.repository.knex.ts.tpl +0 -3
  599. package/templates/presets/identity/context/infrastructure/persistence/knex-member.repository.knex.ts.tpl +0 -3
  600. package/templates/presets/identity/context/infrastructure/persistence/knex-organisation-tenant-directory.reader.knex.ts.tpl +0 -3
  601. package/templates/presets/identity/context/infrastructure/persistence/knex-organisation.repository.knex.ts.tpl +0 -3
  602. package/templates/presets/identity/context/infrastructure/persistence/knex-search-members-reader.repository.knex.ts.tpl +0 -3
  603. package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +0 -3
  604. package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +0 -3
  605. package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +0 -3
  606. package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +0 -3
  607. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation-tenant-directory.reader.prisma.ts.tpl +0 -3
  608. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +0 -3
  609. package/templates/presets/identity/context/infrastructure/persistence/prisma-search-members-reader.repository.prisma.ts.tpl +0 -3
  610. package/templates/presets/identity/decision.md.tpl +9 -6
  611. package/templates/presets/identity/design.md.tpl +4 -1
  612. package/templates/repository/prisma/schema.prisma.tpl +4 -0
  613. package/templates/shared-kernel/CONTEXT.md.tpl +16 -0
@@ -4,6 +4,10 @@ import { CONFIG_FILE } from '../config/index.js';
4
4
  import { inDialect } from '../package-manager/in-dialect.js';
5
5
  import { packageManagerOf } from '../package-manager/package-manager-of.js';
6
6
  import { todosIn } from './todos-in.js';
7
+ import { cannotWrite } from './cannot-write.js';
8
+ import { isFileOrAbsent } from './is-file-or-absent.js';
9
+ import { pruneEmptied } from './prune-emptied.js';
10
+ import { writeIfAllowed } from './write-if-allowed.js';
7
11
  /**
8
12
  * Every generator writes through this overlay, so a command either lands as a whole
9
13
  * plan or (with --dry-run) not at all, and later steps see the files of earlier ones.
@@ -16,6 +20,8 @@ export class Workspace {
16
20
  notes = [];
17
21
  pending = new Map();
18
22
  skipped = new Set();
23
+ /** Files where a device stands, such as a path the sandbox of an agent masks: reported unwritable. */
24
+ masked = new Set();
19
25
  /** Files on disk this command removes: no longer derived from anything. */
20
26
  removed = new Set();
21
27
  steps = [];
@@ -42,7 +48,8 @@ export class Workspace {
42
48
  if (pending !== undefined) {
43
49
  return pending.content;
44
50
  }
45
- if (this.removed.has(file)) {
51
+ if (this.removed.has(file) || !isFileOrAbsent(this.absolute(file))) {
52
+ // A device in place of a file (what a sandbox mounts over a path it protects) holds no text of the project.
46
53
  return undefined;
47
54
  }
48
55
  try {
@@ -60,14 +67,20 @@ export class Workspace {
60
67
  const onDisk = this.onDisk(directory, (entry) => entry.isFile()).filter((name) => !this.removed.has(`${directory}/${name}`));
61
68
  return [...new Set([...onDisk, ...planned])].sort();
62
69
  }
63
- /** Names of the directories directly inside `directory`, on disk or planned. */
70
+ /**
71
+ * Names of the directories directly inside `directory`, on disk or planned. A name that starts
72
+ * with a dot is a tool's folder (the Claude Code sandbox leaves `.claude/.cc-writes` where a
73
+ * command wrote), never a context, a module nor a source folder: it is left out.
74
+ */
64
75
  directories(directory) {
65
76
  const prefix = `${directory}/`;
66
77
  const planned = [...this.pending.keys()].flatMap((file) => {
67
78
  const [child, ...rest] = file.startsWith(prefix) ? file.slice(prefix.length).split('/') : [];
68
79
  return child !== undefined && rest.length > 0 ? [child] : [];
69
80
  });
70
- return [...new Set([...this.onDisk(directory, (entry) => entry.isDirectory()), ...planned])].sort();
81
+ return [...new Set([...this.onDisk(directory, (entry) => entry.isDirectory()), ...planned])]
82
+ .filter((name) => !name.startsWith('.'))
83
+ .sort();
71
84
  }
72
85
  /** True when this command already wrote the file, whether it is on disk or not. */
73
86
  planned(file) {
@@ -79,7 +92,7 @@ export class Workspace {
79
92
  const onDisk = fs.existsSync(this.absolute(file));
80
93
  if (this.exists(file) && !this.force) {
81
94
  if (onDisk) {
82
- this.skipped.add(file);
95
+ (isFileOrAbsent(this.absolute(file)) ? this.skipped : this.masked).add(file);
83
96
  }
84
97
  return false;
85
98
  }
@@ -167,33 +180,53 @@ export class Workspace {
167
180
  this.steps.push(step);
168
181
  }
169
182
  }
183
+ /**
184
+ * Writes the plan, or (dry run) only says it. A file it cannot write here (a path the sandbox of an
185
+ * agent protects) is reported as unwritable, in `skipped` too, and every other file is written;
186
+ * then no file is deleted, so that a move loses nothing.
187
+ */
170
188
  commit(dryRun) {
171
- const written = [...this.pending].map(([file, { content, existed }]) => ({ file, content, existed }));
189
+ const unwritten = [];
190
+ const written = this.writtenOf(dryRun, unwritten);
191
+ const unwritable = [...new Set([...this.masked, ...unwritten])].sort();
192
+ const deleted = unwritable.length === 0 ? [...this.removed].sort() : [];
172
193
  const left = written
173
194
  .filter(({ existed }) => !existed || this.force)
174
195
  .flatMap(({ file, content }) => todosIn(file, content));
175
196
  const todos = [...left, ...this.steps.map((step) => this.located(step))];
176
197
  if (!dryRun) {
177
- written.forEach(({ file, content }) => this.write(file, content));
178
- this.removed.forEach((file) => {
179
- fs.rmSync(this.absolute(file), { force: true });
180
- if (this.pruning) {
181
- this.pruneEmptied(path.posix.dirname(file));
182
- }
183
- });
198
+ deleted.forEach((file) => this.remove(file));
184
199
  }
185
200
  // The language comes before the code: its definition is the first thing to do.
186
201
  todos.sort((left, right) => Number(isLanguageStep(right)) - Number(isLanguageStep(left)));
187
202
  return {
188
203
  created: written.filter(({ existed }) => !existed).map(({ file }) => file),
189
204
  updated: written.filter(({ existed }) => existed).map(({ file }) => file),
190
- deleted: [...this.removed].sort(),
191
- skipped: [...this.skipped].sort(),
205
+ deleted,
206
+ skipped: [...new Set([...this.skipped, ...unwritable])].sort(),
207
+ unwritable,
192
208
  next: todos.map((todo) => `${todo.file}:${todo.line}`),
193
209
  todos,
194
210
  notes: this.notes.map((note) => this.spoken(note)),
195
211
  };
196
212
  }
213
+ /** The planned files written, or (dry run) that could be: the others go to `unwritten`. */
214
+ writtenOf(dryRun, unwritten) {
215
+ const planned = [...this.pending].map(([file, { content, existed }]) => ({ file, content, existed }));
216
+ return planned.filter(({ file, content }) => {
217
+ const writable = dryRun ? !cannotWrite(this.absolute(file)) : writeIfAllowed(this.absolute(file), content);
218
+ if (!writable) {
219
+ unwritten.push(file);
220
+ }
221
+ return writable;
222
+ });
223
+ }
224
+ remove(file) {
225
+ fs.rmSync(this.absolute(file), { force: true });
226
+ if (this.pruning) {
227
+ pruneEmptied(this.root, path.posix.dirname(file));
228
+ }
229
+ }
197
230
  located({ file, anchor, text }) {
198
231
  const at = (this.read(file) ?? '').split('\n').findIndex((line) => line.includes(anchor));
199
232
  return { file, line: Math.max(at, 0) + 1, text };
@@ -218,19 +251,6 @@ export class Workspace {
218
251
  }
219
252
  return false;
220
253
  }
221
- /** A folder a removed file leaves empty goes with it, and so does its parent once empty: a moved use case leaves no folder behind. */
222
- pruneEmptied(directory) {
223
- const absolute = this.absolute(directory);
224
- if (directory === '.' || directory === '' || !fs.existsSync(absolute) || fs.readdirSync(absolute).length > 0) {
225
- return;
226
- }
227
- fs.rmdirSync(absolute);
228
- this.pruneEmptied(path.posix.dirname(directory));
229
- }
230
- write(file, content) {
231
- fs.mkdirSync(path.dirname(this.absolute(file)), { recursive: true });
232
- fs.writeFileSync(this.absolute(file), content);
233
- }
234
254
  absolute(file) {
235
255
  return path.join(this.root, file);
236
256
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,C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AAM,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YAC1C,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,EAAE,CAAC;gBACxC,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,QAAQ,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAEO,WAAW,CAAC,IAAY,EAAE,IAAY;QAC5C,OAAO,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC;YAC1E,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IAEO,MAAM,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK;QAC1C,OAAO,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAED,SAAS,cAAc,CAAC,IAAkB;IACxC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sCAAsC,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Writes the file, its folders first; false when the path is protected here, any other error thrown. */
2
+ export declare function writeIfAllowed(absolute: string, content: string): boolean;
3
+ //# sourceMappingURL=write-if-allowed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-if-allowed.d.ts","sourceRoot":"","sources":["../../src/workspace/write-if-allowed.ts"],"names":[],"mappings":"AAOA,yGAAyG;AACzG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAazE"}
@@ -0,0 +1,20 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { errorCodeOf } from './error-code-of.js';
4
+ /** The errors of a path this process may not write: read-only, denied, or a file or device where a folder goes. */
5
+ const PROTECTED = new Set(['EACCES', 'EPERM', 'EROFS', 'EEXIST', 'ENOTDIR', 'EISDIR']);
6
+ /** Writes the file, its folders first; false when the path is protected here, any other error thrown. */
7
+ export function writeIfAllowed(absolute, content) {
8
+ try {
9
+ fs.mkdirSync(path.dirname(absolute), { recursive: true });
10
+ fs.writeFileSync(absolute, content);
11
+ return true;
12
+ }
13
+ catch (error) {
14
+ if (PROTECTED.has(errorCodeOf(error) ?? '')) {
15
+ return false;
16
+ }
17
+ throw error;
18
+ }
19
+ }
20
+ //# sourceMappingURL=write-if-allowed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-if-allowed.js","sourceRoot":"","sources":["../../src/workspace/write-if-allowed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,mHAAmH;AACnH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEvF,yGAAyG;AACzG,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAe;IAC9D,IAAI,CAAC;QACH,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEpC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YAC5C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-ts-kit",
3
- "version": "0.94.0",
3
+ "version": "0.95.0",
4
4
  "description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
5
5
  "keywords": [
6
6
  "ddd",
@@ -52,9 +52,9 @@
52
52
  "clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
53
53
  },
54
54
  "devDependencies": {
55
- "@ddd-ts-kit/audit": "^0.94.0",
56
- "@ddd-ts-kit/events": "^0.94.0",
57
- "@ddd-ts-kit/kernel": "^0.94.0",
55
+ "@ddd-ts-kit/audit": "^0.95.0",
56
+ "@ddd-ts-kit/events": "^0.95.0",
57
+ "@ddd-ts-kit/kernel": "^0.95.0",
58
58
  "@types/pg": "^8.23.1",
59
59
  "pg": "^8.23.1"
60
60
  }
@@ -0,0 +1,7 @@
1
+ import { Adapter } from '@ddd-ts-kit/kernel/declarations';
2
+ import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
3
+
4
+ @Adapter({{name.pascal}}, { kind: 'external' })
5
+ export class Simulated{{name.pascal}} implements {{name.pascal}} {
6
+ // TODO(domain): this adapter stands in for the outside system where it is simulated (a sandbox, a demo), and nothing it does leaves the process. Answer each operation of {{name.pascal}} from records kept here, as the outside system would, in the types of {{context.kebab}}, and refuse what it would refuse; declare each one `async`. Keep the records in the shape the outside system sends and answer through its translator of infrastructure/anti-corruption when it has one, so that the simulation runs the same anti-corruption layer as the remote adapter.
7
+ }
@@ -0,0 +1,12 @@
1
+ import { describe, expect, it } from '{{tests.module}}';
2
+ import { Simulated{{name.pascal}} } from '{{alias.context}}/infrastructure/external/simulated-{{name.kebab}}.adapter{{alias.ext}}';
3
+
4
+ describe('Simulated{{name.pascal}}', () => {
5
+ it('is an adapter of the port, built without argument: it reaches nothing outside the process', () => {
6
+ expect(new Simulated{{name.pascal}}()).toBeInstanceOf(Simulated{{name.pascal}});
7
+ });
8
+
9
+ // TODO(domain): replace each entry below by a behaviour of {{name.pascal}}; hold this adapter, the remote one and the fake of test/fakes to the same expectations (a contract suite of the port, once two of them answer).
10
+ it.todo('answers what the outside system would answer, in the types of {{context.kebab}}');
11
+ it.todo('refuses what the outside system would refuse');
12
+ });
@@ -0,0 +1,5 @@
1
+ import type { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
2
+
3
+ export class Simulated{{name.pascal}} implements {{name.pascal}} {
4
+ // TODO(domain): this adapter stands in for the outside system where it is simulated (a sandbox, a demo), and nothing it does leaves the process. Answer each operation of {{name.pascal}} from records kept here, as the outside system would, in the types of {{context.kebab}}, and refuse what it would refuse; declare each one `async`. Keep the records in the shape the outside system sends and answer through its translator of infrastructure/anti-corruption when it has one, so that the simulation runs the same anti-corruption layer as the remote adapter.
5
+ }
@@ -0,0 +1,5 @@
1
+ @@imports
2
+ import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
3
+ import { Simulated{{name.pascal}} } from '{{alias.context}}/infrastructure/external/simulated-{{name.kebab}}.adapter{{alias.ext}}';
4
+ @@registrations
5
+ builder.bind({{name.pascal}}).toClass(Simulated{{name.pascal}}).as('external');
@@ -8,7 +8,7 @@
8
8
 
9
9
  {{doc.classification}}
10
10
 
11
- TODO(domain): say in one sentence why this context is {{doc.classification}}.
11
+ {{doc.classificationReason}}
12
12
 
13
13
  ## Ubiquitous language
14
14
  {{doc.glossaryHint}}
@@ -20,7 +20,7 @@ npm run db:migrate
20
20
  npm run db:migrate # builds, then applies migrations/ (the first one creates every table)
21
21
  {{/if}}
22
22
  {{#if orm.prisma}}
23
- npm run db:client # the Prisma client and the schema of the tests, from prisma/schema.prisma
23
+ npm run db:client # the Prisma client and the schema of the tests, from the files of prisma/schema/
24
24
  npm run db:generate initial # prisma/migrations/<timestamp>_initial/, from the schema
25
25
  npm run db:migrate
26
26
  {{/if}}
@@ -137,7 +137,7 @@ function createAuditTrail(persistence: Persistence): AuditTrail & AuditReader &
137
137
  }
138
138
  {{/if}}
139
139
  {{#if audit.prisma}}
140
- /** The schema the models of the trail declare in prisma/schema.prisma (`@@schema("audit")`). */
140
+ /** The schema the models of the trail declare in prisma/schema/schema.prisma (`@@schema("audit")`). */
141
141
  const AUDIT_SCHEMA = 'audit';
142
142
 
143
143
  function createAuditTrail(persistence: Persistence): AuditTrail & AuditReader & ArchivableAuditTrail {
@@ -36,7 +36,7 @@ import { auditModule } from '{{alias.platform}}/audit/audit.module{{alias.ext}}'
36
36
  import { httpBoundary, type HttpBoundary } from '{{alias.platform}}/auth/authentication/http-boundary{{alias.ext}}';
37
37
  {{/if}}
38
38
  {{#if presentation.any}}
39
- import { presentationOf } from '{{alias.platform}}/http/presentation-of{{alias.ext}}';
39
+ import { presentationOf, type Presentation } from '{{alias.platform}}/http/presentation-of{{alias.ext}}';
40
40
  {{/if}}
41
41
  {{#if presentation.forms}}
42
42
  import { withForms } from '{{alias.platform}}/http/with-forms{{alias.ext}}';
@@ -199,22 +199,7 @@ export function composeApplication(
199
199
  {{#if routes.nest}}
200
200
  controllers,
201
201
  {{/if}}
202
- boundary: httpBoundary({
203
- authenticator: options.authenticator,
204
- executionScope: platform.scope,
205
- errorMapper: platformErrorMapper(),
206
- clock,
207
- logger,
208
- {{#if audit.on}}
209
- refusals: platform.audit.refusals,
210
- {{/if}}
211
- {{#if errors.sentry}}
212
- errors: platform.errors,
213
- {{/if}}
214
- {{#if presentation.any}}
215
- presentation,
216
- {{/if}}
217
- }),
202
+ boundary: boundaryOf(platform, options{{#if presentation.any}}, presentation{{/if}}),
218
203
  {{/if}}
219
204
  {{#unless http.any}}
220
205
  routes: [],
@@ -243,6 +228,28 @@ export function composeApplication(
243
228
  stop: () => stop(platform, options),
244
229
  };
245
230
  }
231
+ {{#if http.any}}
232
+
233
+ /** Who calls, in which scope, and how a refusal or an error is answered, at the edge of the HTTP server. */
234
+ function boundaryOf(platform: Platform, options: ApplicationOptions{{#if presentation.any}}, presentation: Presentation{{/if}}): HttpBoundary {
235
+ return httpBoundary({
236
+ authenticator: options.authenticator,
237
+ executionScope: platform.scope,
238
+ errorMapper: platformErrorMapper(),
239
+ clock: platform.clock,
240
+ logger: platform.logger,
241
+ {{#if audit.on}}
242
+ refusals: platform.audit.refusals,
243
+ {{/if}}
244
+ {{#if errors.sentry}}
245
+ errors: platform.errors,
246
+ {{/if}}
247
+ {{#if presentation.any}}
248
+ presentation,
249
+ {{/if}}
250
+ });
251
+ }
252
+ {{/if}}
246
253
 
247
254
  /**
248
255
  * The consumers first, then the jobs: a job sends commands whose events must find their handlers.
@@ -6,7 +6,7 @@ export interface ConnectionOptions {
6
6
  readonly poolSize?: number;
7
7
  }
8
8
 
9
- /** The client connects on the first query. Run `npm run db:client` after a change of prisma/schema.prisma. */
9
+ /** The client connects on the first query. Run `npm run db:client` after a change of a file of prisma/schema/. */
10
10
  export function createClient(url: string, options: ConnectionOptions = {}): PrismaClient {
11
11
  const pool = options.poolSize === undefined ? {} : { max: options.poolSize };
12
12
 
@@ -24,7 +24,7 @@ export interface TestDatabase {
24
24
 
25
25
  /**
26
26
  * PostgreSQL in process (PGlite, served over the wire protocol) by default, with the tables of
27
- * generated/schema.sql, which `npm run db:client` derives from prisma/schema.prisma: adapter
27
+ * generated/schema.sql, which `npm run db:client` derives from prisma/schema/: adapter
28
28
  * and end-to-end specs need no container. With a URL, the tests run on that server instead,
29
29
  * which must already be migrated (`npm run db:migrate`).
30
30
  */
@@ -28,10 +28,10 @@ import { createPrismaUnitOfWork, PrismaOutboxStore, PrismaProcessedEventStore }
28
28
  import type { PrismaClient } from '{{alias.generated}}/prisma/client{{alias.ext}}';
29
29
  import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
30
30
 
31
- /** The schema of the messaging tables{{#if queue.processTable}} and of the background work{{/if}}, as prisma/schema.prisma names it. */
31
+ /** The schema of the messaging tables{{#if queue.processTable}} and of the background work{{/if}}, as prisma/schema/schema.prisma names it. */
32
32
  const MESSAGING_SCHEMA = 'messaging';
33
33
  {{#if eventSourcing.on}}
34
- /** The schema of the event store, as prisma/schema.prisma names it. */
34
+ /** The schema of the event store, as prisma/schema/schema.prisma names it. */
35
35
  const EVENT_STORE_SCHEMA = 'event_store';
36
36
  {{/if}}
37
37
 
@@ -1,7 +1,8 @@
1
1
  import { defineConfig } from 'prisma/config';
2
2
 
3
3
  export default defineConfig({
4
- schema: './prisma/schema.prisma',
4
+ // Every .prisma file of the folder: schema.prisma (the client, the datasource, the platform) and one file per context.
5
+ schema: './prisma/schema',
5
6
  migrations: { path: './prisma/migrations' },
6
7
  // `generate` and `migrate diff` never connect: they work without a database.
7
8
  datasource: { url: process.env['DATABASE_URL'] ?? 'postgresql://unused:unused@127.0.0.1:1/unused' },
@@ -1,6 +1,6 @@
1
1
  generator client {
2
2
  provider = "prisma-client"
3
- output = "../generated/prisma"
3
+ output = "../../generated/prisma"
4
4
  moduleFormat = "esm"
5
5
  importFileExtension = "js"
6
6
  }
@@ -100,9 +100,8 @@ model ProcessInstance {
100
100
  }
101
101
  {{/if}}
102
102
 
103
- // One schema per bounded context, no relation across contexts.
104
- // ddd-ts-kit:models
105
- // /ddd-ts-kit:models
103
+ // The models of each bounded context are in a file of their own beside this one,
104
+ // prisma/schema/<context>.prisma, in the database schema of the context: no relation across contexts.
106
105
  {{#if eventSourcing.on}}
107
106
 
108
107
  // The event store of @ddd-ts-kit/prisma: the events, the snapshots, the checkpoints and the
@@ -1,7 +1,7 @@
1
1
  {{#if audit.on}}
2
2
  import { auditedSubjectKeys, type AuditSource } from '@ddd-ts-kit/audit';
3
3
  {{/if}}
4
- import { PersonalDataCipher, type EventSourcingStores{{#if tenancy.any}}, type ExecutionScope{{/if}} } from '@ddd-ts-kit/kernel';
4
+ import { PersonalDataCipher, type EventSourcingStores{{#if tenancy.any}}{{#unless audit.on}}, type ExecutionScope{{/unless}}{{/if}} } from '@ddd-ts-kit/kernel';
5
5
  {{#if audit.on}}
6
6
  import type { Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
7
7
  {{/if}}
@@ -8,6 +8,7 @@ paths:
8
8
 
9
9
  - An adapter `implements` a port of `application/ports/` or a repository port of `domain/repositories/`, and never `extends` it (`ports/implements-never-extends`). It never imports `presentation/` (`layer/infrastructure-no-presentation`).
10
10
  - `persistence/` holds repository adapters, mappers and rows, `external/` the adapters of outside systems, `anti-corruption/` the translators of another model.
11
+ - An outside system the application runs without (a sandbox, a demo, a provider not ready yet) is answered by a simulated adapter of `external/`, `npx ddd-ts-kit generate adapter <context> <Port> --kind simulated`, which answers in memory as the system would, through its translator of `anti-corruption/`; never by a fake of `test/fakes/`, which production code never imports. A port has one adapter: the simulated one or the remote one.
11
12
  {{#if literals.named}}
12
13
  - A word of the other model stays its word: a translator keys its tables by the type of that model, `Record<TheirRecord['code'], InvoiceStatus>` (an annotation or `satisfies`), and compares with `'code' satisfies TheirRecord['code']`, so that the compiler holds its spelling; the value of the context it produces is read from its vocabulary (`language/declared-vocabulary`).
13
14
  {{/if}}
@@ -19,7 +20,7 @@ paths:
19
20
  - Own tables, in the schema of the context: no join, foreign key or transaction across contexts (`context/extractable`).
20
21
  - Audit columns and the tenant column are stamped from the execution scope with the kernel helpers (`stampCreation`, `stampUpdate`, `tenantScopeOf`), never handed over by a use case.
21
22
  {{#if tenancy.any}}
22
- - Tenant data is reached through the helpers of the ORM package, never straight from the executor: {{#if orm.knex}}`tenantTable` to read, `ownTenantTable` to update or delete{{/if}}{{#if orm.drizzle}}`tenantCondition` in the condition of a read, `ownTenantCondition` in that of an update or a delete{{/if}}{{#if orm.prisma}}`tenantWhere` spread into the where of a read (`findFirst`, never `findUnique`: the tenant is not part of the key), `ownTenantWhere` into that of an update or a delete{{/if}}{{#if orm.typeorm}}`tenantWhere` spread into the where of a read, `ownTenantWhere` into the criteria of an update or a delete, never `save` or `upsert`{{/if}}, the tenant named on every insert, a read model store built with its `tenant` (`tenancy/scoped-statement`). A table of no tenant is a recorded deviation. See `docs/concepts/multitenancy.md` of the kit.
23
+ - Tenant data is reached through the helpers of the ORM package, never straight from the executor: {{#if orm.knex}}`tenantTable` to read, `ownTenantTable` to update or delete{{/if}}{{#if orm.drizzle}}`tenantCondition` in the condition of a read, `ownTenantCondition` in that of an update or a delete{{/if}}{{#if orm.prisma}}`tenantWhere` spread into the where of a read (`findFirst`, never `findUnique`: the tenant is not part of the key), `ownTenantWhere` into that of an update or a delete{{/if}}{{#if orm.typeorm}}`tenantWhere` spread into the where of a read, `ownTenantWhere` into the criteria of an update or a delete, never `save` or `upsert`{{/if}}, the tenant named on every insert, a read model store built with its `tenant` (`tenancy/scoped-statement`). A table of no tenant is a recorded deviation; a context none of whose tables belongs to a tenant, since it decides who belongs to which, is declared `"tenancy": "control-plane"` in its entry of `contexts`, with its deviation, never suppressed statement by statement. See `docs/concepts/multitenancy.md` of the kit.
23
24
  {{/if}}
24
25
  {{#if style.declared}}
25
26
  - An adapter declares itself on its class, one per file (`declarations/role-declared`): `@Repository(InvoiceRepository)`, `@Gateway(Port)` or `@Adapter(Port, { kind })`. What it is given is what its constructor takes, each parameter typed by one class (`{{persistence.tokenOrNone}}`, `ExecutionScope`, `Clock`, a port, an abstract class the platform binds to a value) and nothing listed in the decorator (`declarations/constructor-injection`); an adapter that extends a class of a package writes its own constructor.
@@ -34,7 +34,7 @@ runs:
34
34
  shell: bash
35
35
  run: npm ci
36
36
  {{#if orm.prisma}}
37
- - name: The Prisma client and the schema of the tests, build products of prisma/schema.prisma
37
+ - name: The Prisma client and the schema of the tests, build products of prisma/schema/
38
38
  shell: bash
39
39
  run: npm run db:client
40
40
  {{/if}}
@@ -80,7 +80,7 @@ default:
80
80
  {{/if}}
81
81
  - test -d node_modules || npm ci
82
82
  {{#if orm.prisma}}
83
- # The Prisma client and the schema of the tests are build products of prisma/schema.prisma.
83
+ # The Prisma client and the schema of the tests are build products of prisma/schema/.
84
84
  - npm run db:client
85
85
  {{/if}}
86
86
 
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.6.2",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.94.0",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.95.0",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",
@@ -61,8 +61,5 @@ export class DrizzleAccountRepository implements AccountRepository {
61
61
 
62
62
  /** The executor of the unit of work, which every statement of this file goes through. */
63
63
  function executorOf(database: Database): ReturnType<Database['executor']> {
64
- {{#if tenancy.any}}
65
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
66
- {{/if}}
67
64
  return database.executor();
68
65
  }
@@ -79,8 +79,5 @@ function unended(organisationId: string) {
79
79
 
80
80
  /** The executor of the unit of work, which every statement of this file goes through. */
81
81
  function executorOf(database: Database): ReturnType<Database['executor']> {
82
- {{#if tenancy.any}}
83
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
84
- {{/if}}
85
82
  return database.executor();
86
83
  }
@@ -67,8 +67,5 @@ export class DrizzleInvitationRepository implements InvitationRepository {
67
67
 
68
68
  /** The executor of the unit of work, which every statement of this file goes through. */
69
69
  function executorOf(database: Database): ReturnType<Database['executor']> {
70
- {{#if tenancy.any}}
71
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
72
- {{/if}}
73
70
  return database.executor();
74
71
  }
@@ -86,8 +86,5 @@ function current(organisationId: string, accountId: string) {
86
86
 
87
87
  /** The executor of the unit of work, which every statement of this file goes through. */
88
88
  function executorOf(database: Database): ReturnType<Database['executor']> {
89
- {{#if tenancy.any}}
90
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
91
- {{/if}}
92
89
  return database.executor();
93
90
  }
@@ -19,8 +19,5 @@ export class DrizzleOrganisationTenantDirectory implements TenantDirectory {
19
19
 
20
20
  /** The executor of the unit of work, which every statement of this file goes through. */
21
21
  function executorOf(database: Database): ReturnType<Database['executor']> {
22
- {{#if tenancy.any}}
23
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
24
- {{/if}}
25
22
  return database.executor();
26
23
  }
@@ -61,8 +61,5 @@ export class DrizzleOrganisationRepository implements OrganisationRepository {
61
61
 
62
62
  /** The executor of the unit of work, which every statement of this file goes through. */
63
63
  function executorOf(database: Database): ReturnType<Database['executor']> {
64
- {{#if tenancy.any}}
65
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
66
- {{/if}}
67
64
  return database.executor();
68
65
  }
@@ -55,8 +55,5 @@ export class DrizzleSearchMembersReader implements SearchMembersReader {
55
55
 
56
56
  /** The executor of the unit of work, which every statement of this file goes through. */
57
57
  function executorOf(database: Database): ReturnType<Database['executor']> {
58
- {{#if tenancy.any}}
59
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
60
- {{/if}}
61
58
  return database.executor();
62
59
  }
@@ -61,9 +61,6 @@ export class KnexAccountRepository implements AccountRepository {
61
61
 
62
62
  /** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
63
63
  function tableOf(database: KnexContext): Knex.QueryBuilder<AccountRow, AccountRow[]> {
64
- {{#if tenancy.any}}
65
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
66
- {{/if}}
67
64
  const table = database.executor()<AccountRow, AccountRow[]>('accounts');
68
65
 
69
66
  return table.withSchema({{context.constant}}_SCHEMA);
@@ -80,9 +80,6 @@ export class KnexDelegationRepository implements DelegationRepository {
80
80
 
81
81
  /** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
82
82
  function tableOf(database: KnexContext): Knex.QueryBuilder<DelegationRow, DelegationRow[]> {
83
- {{#if tenancy.any}}
84
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
85
- {{/if}}
86
83
  const table = database.executor()<DelegationRow, DelegationRow[]>('delegations');
87
84
 
88
85
  return table.withSchema({{context.constant}}_SCHEMA);
@@ -67,9 +67,6 @@ export class KnexInvitationRepository implements InvitationRepository {
67
67
 
68
68
  /** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
69
69
  function tableOf(database: KnexContext): Knex.QueryBuilder<InvitationRow, InvitationRow[]> {
70
- {{#if tenancy.any}}
71
- // ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
72
- {{/if}}
73
70
  const table = database.executor()<InvitationRow, InvitationRow[]>('invitations');
74
71
 
75
72
  return table.withSchema({{context.constant}}_SCHEMA);