ddd-ts-kit 0.109.0 → 0.110.1

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 (479) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/README.fr.md +31 -13
  3. package/README.md +26 -13
  4. package/dist/affected/reach-of.d.ts.map +1 -1
  5. package/dist/affected/reach-of.js +4 -1
  6. package/dist/affected/reach-of.js.map +1 -1
  7. package/dist/check/canonical/holds-shared-files.d.ts +3 -0
  8. package/dist/check/canonical/holds-shared-files.d.ts.map +1 -0
  9. package/dist/check/canonical/holds-shared-files.js +7 -0
  10. package/dist/check/canonical/holds-shared-files.js.map +1 -0
  11. package/dist/check/canonical/is-shared-directory.d.ts +7 -0
  12. package/dist/check/canonical/is-shared-directory.d.ts.map +1 -0
  13. package/dist/check/canonical/is-shared-directory.js +13 -0
  14. package/dist/check/canonical/is-shared-directory.js.map +1 -0
  15. package/dist/check/canonical/role.d.ts +2 -0
  16. package/dist/check/canonical/role.d.ts.map +1 -1
  17. package/dist/check/canonical/roles.d.ts.map +1 -1
  18. package/dist/check/canonical/roles.js +10 -5
  19. package/dist/check/canonical/roles.js.map +1 -1
  20. package/dist/check/canonical/shared-directories.d.ts +3 -0
  21. package/dist/check/canonical/shared-directories.d.ts.map +1 -0
  22. package/dist/check/canonical/shared-directories.js +8 -0
  23. package/dist/check/canonical/shared-directories.js.map +1 -0
  24. package/dist/check/canonical/stray-entry.d.ts.map +1 -1
  25. package/dist/check/canonical/stray-entry.js +43 -4
  26. package/dist/check/canonical/stray-entry.js.map +1 -1
  27. package/dist/check/configuration/module-problems.js +20 -16
  28. package/dist/check/configuration/module-problems.js.map +1 -1
  29. package/dist/check/errors/code-reference.d.ts +7 -0
  30. package/dist/check/errors/code-reference.d.ts.map +1 -0
  31. package/dist/check/errors/code-reference.js +2 -0
  32. package/dist/check/errors/code-reference.js.map +1 -0
  33. package/dist/check/errors/code-references.d.ts +7 -0
  34. package/dist/check/errors/code-references.d.ts.map +1 -0
  35. package/dist/check/errors/code-references.js +13 -0
  36. package/dist/check/errors/code-references.js.map +1 -0
  37. package/dist/check/errors/kit-code-keys.d.ts +3 -0
  38. package/dist/check/errors/kit-code-keys.d.ts.map +1 -0
  39. package/dist/check/errors/kit-code-keys.js +5 -0
  40. package/dist/check/errors/kit-code-keys.js.map +1 -0
  41. package/dist/check/errors/kit-codes-list.d.ts +3 -0
  42. package/dist/check/errors/kit-codes-list.d.ts.map +1 -0
  43. package/dist/check/errors/kit-codes-list.js +3 -0
  44. package/dist/check/errors/kit-codes-list.js.map +1 -0
  45. package/dist/check/explain/errors-docs.d.ts.map +1 -1
  46. package/dist/check/explain/errors-docs.js +5 -2
  47. package/dist/check/explain/errors-docs.js.map +1 -1
  48. package/dist/check/explain/module-docs.d.ts.map +1 -1
  49. package/dist/check/explain/module-docs.js +9 -6
  50. package/dist/check/explain/module-docs.js.map +1 -1
  51. package/dist/check/explain/tree-docs.d.ts.map +1 -1
  52. package/dist/check/explain/tree-docs.js +3 -1
  53. package/dist/check/explain/tree-docs.js.map +1 -1
  54. package/dist/check/fixtures/errors-route.d.ts +1 -1
  55. package/dist/check/fixtures/errors-route.d.ts.map +1 -1
  56. package/dist/check/fixtures/errors-route.js +2 -2
  57. package/dist/check/fixtures/errors-route.js.map +1 -1
  58. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  59. package/dist/check/fixtures/fixtures.js +2 -0
  60. package/dist/check/fixtures/fixtures.js.map +1 -1
  61. package/dist/check/fixtures/module-fixtures.d.ts.map +1 -1
  62. package/dist/check/fixtures/module-fixtures.js +27 -31
  63. package/dist/check/fixtures/module-fixtures.js.map +1 -1
  64. package/dist/check/fixtures/named-refusal-fixtures.d.ts.map +1 -1
  65. package/dist/check/fixtures/named-refusal-fixtures.js +40 -0
  66. package/dist/check/fixtures/named-refusal-fixtures.js.map +1 -1
  67. package/dist/check/fixtures/shared-folder-fixtures.d.ts +7 -0
  68. package/dist/check/fixtures/shared-folder-fixtures.d.ts.map +1 -0
  69. package/dist/check/fixtures/shared-folder-fixtures.js +176 -0
  70. package/dist/check/fixtures/shared-folder-fixtures.js.map +1 -0
  71. package/dist/check/fixtures/shared-kernel-fixtures.d.ts.map +1 -1
  72. package/dist/check/fixtures/shared-kernel-fixtures.js +11 -0
  73. package/dist/check/fixtures/shared-kernel-fixtures.js.map +1 -1
  74. package/dist/check/fixtures/with-modules.d.ts +4 -0
  75. package/dist/check/fixtures/with-modules.d.ts.map +1 -0
  76. package/dist/check/fixtures/with-modules.js +22 -0
  77. package/dist/check/fixtures/with-modules.js.map +1 -0
  78. package/dist/check/model/context-location.d.ts +5 -0
  79. package/dist/check/model/context-location.d.ts.map +1 -1
  80. package/dist/check/project/locate.js +12 -5
  81. package/dist/check/project/locate.js.map +1 -1
  82. package/dist/check/rules/errors-known-code.d.ts.map +1 -1
  83. package/dist/check/rules/errors-known-code.js +60 -9
  84. package/dist/check/rules/errors-known-code.js.map +1 -1
  85. package/dist/check/rules/module-complete.d.ts.map +1 -1
  86. package/dist/check/rules/module-complete.js +19 -20
  87. package/dist/check/rules/module-complete.js.map +1 -1
  88. package/dist/check/rules/module-declared.js +5 -1
  89. package/dist/check/rules/module-declared.js.map +1 -1
  90. package/dist/check/rules/test-acceptance-black-box.d.ts.map +1 -1
  91. package/dist/check/rules/test-acceptance-black-box.js +6 -7
  92. package/dist/check/rules/test-acceptance-black-box.js.map +1 -1
  93. package/dist/check/rules/test-builder-required.d.ts.map +1 -1
  94. package/dist/check/rules/test-builder-required.js +15 -12
  95. package/dist/check/rules/test-builder-required.js.map +1 -1
  96. package/dist/check/rules/test-spec-required.d.ts.map +1 -1
  97. package/dist/check/rules/test-spec-required.js +12 -11
  98. package/dist/check/rules/test-spec-required.js.map +1 -1
  99. package/dist/check/rules/tree-closed.js +1 -1
  100. package/dist/check/rules/tree-closed.js.map +1 -1
  101. package/dist/check/support/path-in-context.d.ts +1 -1
  102. package/dist/check/support/path-in-context.d.ts.map +1 -1
  103. package/dist/check/support/path-in-context.js +6 -3
  104. package/dist/check/support/path-in-context.js.map +1 -1
  105. package/dist/check/support/test-folder-of.d.ts +11 -0
  106. package/dist/check/support/test-folder-of.d.ts.map +1 -0
  107. package/dist/check/support/test-folder-of.js +12 -0
  108. package/dist/check/support/test-folder-of.js.map +1 -0
  109. package/dist/commands/drizzle-generate.d.ts.map +1 -1
  110. package/dist/commands/drizzle-generate.js +9 -0
  111. package/dist/commands/drizzle-generate.js.map +1 -1
  112. package/dist/commands/generate.js +9 -1
  113. package/dist/commands/generate.js.map +1 -1
  114. package/dist/commands/lint.d.ts +2 -1
  115. package/dist/commands/lint.d.ts.map +1 -1
  116. package/dist/commands/lint.js +4 -1
  117. package/dist/commands/lint.js.map +1 -1
  118. package/dist/commands/move-to-module.d.ts.map +1 -1
  119. package/dist/commands/move-to-module.js +0 -2
  120. package/dist/commands/move-to-module.js.map +1 -1
  121. package/dist/context-layout/context-layout.d.ts +3 -2
  122. package/dist/context-layout/context-layout.d.ts.map +1 -1
  123. package/dist/context-layout/context-layout.js +18 -8
  124. package/dist/context-layout/context-layout.js.map +1 -1
  125. package/dist/context-layout/imports-of.d.ts +11 -0
  126. package/dist/context-layout/imports-of.d.ts.map +1 -0
  127. package/dist/context-layout/imports-of.js +20 -0
  128. package/dist/context-layout/imports-of.js.map +1 -0
  129. package/dist/context-layout/module-moves.d.ts +10 -7
  130. package/dist/context-layout/module-moves.d.ts.map +1 -1
  131. package/dist/context-layout/module-moves.js +65 -122
  132. package/dist/context-layout/module-moves.js.map +1 -1
  133. package/dist/context-layout/runner-configs-by-hand.d.ts +11 -0
  134. package/dist/context-layout/runner-configs-by-hand.d.ts.map +1 -0
  135. package/dist/context-layout/runner-configs-by-hand.js +23 -0
  136. package/dist/context-layout/runner-configs-by-hand.js.map +1 -0
  137. package/dist/context-layout/settle.d.ts +20 -0
  138. package/dist/context-layout/settle.d.ts.map +1 -0
  139. package/dist/context-layout/settle.js +58 -0
  140. package/dist/context-layout/settle.js.map +1 -0
  141. package/dist/controllers/declared-code.d.ts +3 -0
  142. package/dist/controllers/declared-code.d.ts.map +1 -0
  143. package/dist/controllers/declared-code.js +8 -0
  144. package/dist/controllers/declared-code.js.map +1 -0
  145. package/dist/controllers/finish-migration.d.ts.map +1 -1
  146. package/dist/controllers/finish-migration.js +5 -3
  147. package/dist/controllers/finish-migration.js.map +1 -1
  148. package/dist/controllers/migrate-context.js +3 -2
  149. package/dist/controllers/migrate-context.js.map +1 -1
  150. package/dist/controllers/plan-context.d.ts +1 -1
  151. package/dist/controllers/plan-context.d.ts.map +1 -1
  152. package/dist/controllers/plan-context.js +11 -6
  153. package/dist/controllers/plan-context.js.map +1 -1
  154. package/dist/controllers/render-controller.d.ts.map +1 -1
  155. package/dist/controllers/render-controller.js +20 -4
  156. package/dist/controllers/render-controller.js.map +1 -1
  157. package/dist/depcruise/hygiene-rules.js +2 -2
  158. package/dist/depcruise/hygiene-rules.js.map +1 -1
  159. package/dist/depcruise/test-files.d.ts +4 -1
  160. package/dist/depcruise/test-files.d.ts.map +1 -1
  161. package/dist/depcruise/test-files.js +5 -2
  162. package/dist/depcruise/test-files.js.map +1 -1
  163. package/dist/describe/codes-named-in.d.ts +8 -0
  164. package/dist/describe/codes-named-in.d.ts.map +1 -0
  165. package/dist/describe/codes-named-in.js +33 -0
  166. package/dist/describe/codes-named-in.js.map +1 -0
  167. package/dist/describe/read-controllers.js +2 -2
  168. package/dist/describe/read-controllers.js.map +1 -1
  169. package/dist/describe/read-route-groups.d.ts +6 -2
  170. package/dist/describe/read-route-groups.d.ts.map +1 -1
  171. package/dist/describe/read-route-groups.js +8 -4
  172. package/dist/describe/read-route-groups.js.map +1 -1
  173. package/dist/describe/read-routes.d.ts.map +1 -1
  174. package/dist/describe/read-routes.js +7 -2
  175. package/dist/describe/read-routes.js.map +1 -1
  176. package/dist/docs/spec-heading.d.ts +5 -4
  177. package/dist/docs/spec-heading.d.ts.map +1 -1
  178. package/dist/docs/spec-heading.js +4 -6
  179. package/dist/docs/spec-heading.js.map +1 -1
  180. package/dist/docs/spec-of-page.d.ts +7 -2
  181. package/dist/docs/spec-of-page.d.ts.map +1 -1
  182. package/dist/docs/spec-of-page.js +8 -3
  183. package/dist/docs/spec-of-page.js.map +1 -1
  184. package/dist/docs/specs-by-directory.d.ts +2 -2
  185. package/dist/docs/specs-by-directory.d.ts.map +1 -1
  186. package/dist/docs/specs-by-directory.js +4 -5
  187. package/dist/docs/specs-by-directory.js.map +1 -1
  188. package/dist/docs/write-behaviour.d.ts +1 -1
  189. package/dist/docs/write-behaviour.d.ts.map +1 -1
  190. package/dist/docs/write-behaviour.js +17 -2
  191. package/dist/docs/write-behaviour.js.map +1 -1
  192. package/dist/file-moves/follow-in-migrations.d.ts +10 -0
  193. package/dist/file-moves/follow-in-migrations.d.ts.map +1 -0
  194. package/dist/file-moves/follow-in-migrations.js +30 -0
  195. package/dist/file-moves/follow-in-migrations.js.map +1 -0
  196. package/dist/file-moves/move-files.d.ts +2 -1
  197. package/dist/file-moves/move-files.d.ts.map +1 -1
  198. package/dist/file-moves/move-files.js +4 -2
  199. package/dist/file-moves/move-files.js.map +1 -1
  200. package/dist/generate/errors/write-named-refusal.d.ts.map +1 -1
  201. package/dist/generate/errors/write-named-refusal.js +6 -2
  202. package/dist/generate/errors/write-named-refusal.js.map +1 -1
  203. package/dist/generate/kinds/builder-kind.js +1 -1
  204. package/dist/generate/kinds/builder-kind.js.map +1 -1
  205. package/dist/generate/kinds/declarations-of.js +1 -1
  206. package/dist/generate/kinds/declarations-of.js.map +1 -1
  207. package/dist/generate/kinds/declare-storage.d.ts +2 -1
  208. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  209. package/dist/generate/kinds/declare-storage.js +19 -5
  210. package/dist/generate/kinds/declare-storage.js.map +1 -1
  211. package/dist/generate/kinds/e2e/acting-role.d.ts +15 -0
  212. package/dist/generate/kinds/e2e/acting-role.d.ts.map +1 -0
  213. package/dist/generate/kinds/e2e/acting-role.js +19 -0
  214. package/dist/generate/kinds/e2e/acting-role.js.map +1 -0
  215. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  216. package/dist/generate/kinds/e2e-kind.js +5 -1
  217. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  218. package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
  219. package/dist/generate/kinds/gateway-kind.js +14 -2
  220. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  221. package/dist/generate/kinds/generate-repository.js +1 -1
  222. package/dist/generate/kinds/generate-repository.js.map +1 -1
  223. package/dist/generate/kinds/module-kind.d.ts.map +1 -1
  224. package/dist/generate/kinds/module-kind.js +9 -1
  225. package/dist/generate/kinds/module-kind.js.map +1 -1
  226. package/dist/generate/kinds/route/group-vars.d.ts.map +1 -1
  227. package/dist/generate/kinds/route/group-vars.js +5 -3
  228. package/dist/generate/kinds/route/group-vars.js.map +1 -1
  229. package/dist/generate/kinds/route/route-vars.js +1 -1
  230. package/dist/generate/kinds/route/route-vars.js.map +1 -1
  231. package/dist/generate/kinds/world/context-fakes.d.ts +1 -1
  232. package/dist/generate/kinds/world/context-fakes.d.ts.map +1 -1
  233. package/dist/generate/kinds/world/context-fakes.js +8 -7
  234. package/dist/generate/kinds/world/context-fakes.js.map +1 -1
  235. package/dist/generate/kinds/world/context-world.d.ts +1 -1
  236. package/dist/generate/kinds/world/context-world.d.ts.map +1 -1
  237. package/dist/generate/kinds/world/context-world.js +3 -1
  238. package/dist/generate/kinds/world/context-world.js.map +1 -1
  239. package/dist/generate/place-generated-files.d.ts +2 -0
  240. package/dist/generate/place-generated-files.d.ts.map +1 -1
  241. package/dist/generate/place-generated-files.js +13 -13
  242. package/dist/generate/place-generated-files.js.map +1 -1
  243. package/dist/generate/refresh-docs.d.ts +1 -1
  244. package/dist/generate/refresh-docs.d.ts.map +1 -1
  245. package/dist/generate/refresh-docs.js +3 -1
  246. package/dist/generate/refresh-docs.js.map +1 -1
  247. package/dist/generate/refuse-earlier-layout.d.ts +4 -3
  248. package/dist/generate/refuse-earlier-layout.d.ts.map +1 -1
  249. package/dist/generate/refuse-earlier-layout.js +9 -6
  250. package/dist/generate/refuse-earlier-layout.js.map +1 -1
  251. package/dist/help/flag-notes.d.ts.map +1 -1
  252. package/dist/help/flag-notes.js +8 -7
  253. package/dist/help/flag-notes.js.map +1 -1
  254. package/dist/help/tool-notes.d.ts.map +1 -1
  255. package/dist/help/tool-notes.js +23 -17
  256. package/dist/help/tool-notes.js.map +1 -1
  257. package/dist/help/usage.js +1 -1
  258. package/dist/help/work-notes.d.ts.map +1 -1
  259. package/dist/help/work-notes.js +4 -3
  260. package/dist/help/work-notes.js.map +1 -1
  261. package/dist/init/manifest/versions.js +25 -25
  262. package/dist/init/rewire-personal-data.d.ts.map +1 -1
  263. package/dist/init/rewire-personal-data.js +4 -2
  264. package/dist/init/rewire-personal-data.js.map +1 -1
  265. package/dist/init/rewire-tables.d.ts.map +1 -1
  266. package/dist/init/rewire-tables.js +4 -2
  267. package/dist/init/rewire-tables.js.map +1 -1
  268. package/dist/init/with-held-imports.d.ts +9 -0
  269. package/dist/init/with-held-imports.d.ts.map +1 -0
  270. package/dist/init/with-held-imports.js +15 -0
  271. package/dist/init/with-held-imports.js.map +1 -0
  272. package/dist/knip/enter-module-test-folders.d.ts +10 -0
  273. package/dist/knip/enter-module-test-folders.d.ts.map +1 -0
  274. package/dist/knip/enter-module-test-folders.js +42 -0
  275. package/dist/knip/enter-module-test-folders.js.map +1 -0
  276. package/dist/knip/index.d.ts +1 -0
  277. package/dist/knip/index.d.ts.map +1 -1
  278. package/dist/knip/index.js +1 -0
  279. package/dist/knip/index.js.map +1 -1
  280. package/dist/lint/eslint-in-project.d.ts +1 -1
  281. package/dist/lint/eslint-in-project.d.ts.map +1 -1
  282. package/dist/lint/eslint-in-project.js +3 -2
  283. package/dist/lint/eslint-in-project.js.map +1 -1
  284. package/dist/lint/lint-run.d.ts +2 -0
  285. package/dist/lint/lint-run.d.ts.map +1 -1
  286. package/dist/merge/landed-commit.js +14 -2
  287. package/dist/merge/landed-commit.js.map +1 -1
  288. package/dist/merge/landed-point.js +3 -0
  289. package/dist/merge/landed-point.js.map +1 -1
  290. package/dist/merge/lost/dropped-additions.d.ts +20 -0
  291. package/dist/merge/lost/dropped-additions.d.ts.map +1 -0
  292. package/dist/merge/lost/dropped-additions.js +42 -0
  293. package/dist/merge/lost/dropped-additions.js.map +1 -0
  294. package/dist/merge/lost/expected-over.d.ts +13 -0
  295. package/dist/merge/lost/expected-over.d.ts.map +1 -0
  296. package/dist/merge/lost/expected-over.js +16 -0
  297. package/dist/merge/lost/expected-over.js.map +1 -0
  298. package/dist/merge/lost/kept-rows.d.ts +4 -2
  299. package/dist/merge/lost/kept-rows.d.ts.map +1 -1
  300. package/dist/merge/lost/kept-rows.js +10 -7
  301. package/dist/merge/lost/kept-rows.js.map +1 -1
  302. package/dist/merge/lost/lost-lines.d.ts +2 -2
  303. package/dist/merge/lost/lost-lines.d.ts.map +1 -1
  304. package/dist/merge/lost/lost-lines.js +5 -3
  305. package/dist/merge/lost/lost-lines.js.map +1 -1
  306. package/dist/merge/lost/lost-tests.d.ts +2 -2
  307. package/dist/merge/lost/lost-tests.d.ts.map +1 -1
  308. package/dist/merge/lost/lost-tests.js +5 -3
  309. package/dist/merge/lost/lost-tests.js.map +1 -1
  310. package/dist/merge/lost/verify-merge.d.ts.map +1 -1
  311. package/dist/merge/lost/verify-merge.js +12 -5
  312. package/dist/merge/lost/verify-merge.js.map +1 -1
  313. package/dist/merge/merge-trunk.d.ts.map +1 -1
  314. package/dist/merge/merge-trunk.js +35 -7
  315. package/dist/merge/merge-trunk.js.map +1 -1
  316. package/dist/merge/slices-from-fork.d.ts +20 -0
  317. package/dist/merge/slices-from-fork.d.ts.map +1 -0
  318. package/dist/merge/slices-from-fork.js +27 -0
  319. package/dist/merge/slices-from-fork.js.map +1 -0
  320. package/dist/merge/trunk-of.d.ts +4 -2
  321. package/dist/merge/trunk-of.d.ts.map +1 -1
  322. package/dist/merge/trunk-of.js +4 -2
  323. package/dist/merge/trunk-of.js.map +1 -1
  324. package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -1
  325. package/dist/migration/warn-dropped-context-tables.js +6 -4
  326. package/dist/migration/warn-dropped-context-tables.js.map +1 -1
  327. package/dist/model-modules/context-level-folder-of.d.ts +9 -0
  328. package/dist/model-modules/context-level-folder-of.d.ts.map +1 -0
  329. package/dist/model-modules/context-level-folder-of.js +11 -0
  330. package/dist/model-modules/context-level-folder-of.js.map +1 -0
  331. package/dist/model-modules/earlier-folders.d.ts +10 -0
  332. package/dist/model-modules/earlier-folders.d.ts.map +1 -0
  333. package/dist/model-modules/earlier-folders.js +20 -0
  334. package/dist/model-modules/earlier-folders.js.map +1 -0
  335. package/dist/model-modules/folders-of-context.d.ts +8 -0
  336. package/dist/model-modules/folders-of-context.d.ts.map +1 -0
  337. package/dist/model-modules/folders-of-context.js +11 -0
  338. package/dist/model-modules/folders-of-context.js.map +1 -0
  339. package/dist/model-modules/held-file-of.d.ts +10 -0
  340. package/dist/model-modules/held-file-of.d.ts.map +1 -0
  341. package/dist/model-modules/held-file-of.js +18 -0
  342. package/dist/model-modules/held-file-of.js.map +1 -0
  343. package/dist/model-modules/index.d.ts +8 -1
  344. package/dist/model-modules/index.d.ts.map +1 -1
  345. package/dist/model-modules/index.js +8 -1
  346. package/dist/model-modules/index.js.map +1 -1
  347. package/dist/model-modules/into-module.d.ts +3 -3
  348. package/dist/model-modules/into-module.d.ts.map +1 -1
  349. package/dist/model-modules/into-module.js +9 -12
  350. package/dist/model-modules/into-module.js.map +1 -1
  351. package/dist/model-modules/is-context-level.d.ts +4 -5
  352. package/dist/model-modules/is-context-level.d.ts.map +1 -1
  353. package/dist/model-modules/is-context-level.js +6 -16
  354. package/dist/model-modules/is-context-level.js.map +1 -1
  355. package/dist/model-modules/is-held-by-shared.d.ts +8 -0
  356. package/dist/model-modules/is-held-by-shared.d.ts.map +1 -0
  357. package/dist/model-modules/is-held-by-shared.js +20 -0
  358. package/dist/model-modules/is-held-by-shared.js.map +1 -0
  359. package/dist/model-modules/module-layers.d.ts +9 -2
  360. package/dist/model-modules/module-layers.d.ts.map +1 -1
  361. package/dist/model-modules/module-layers.js +10 -3
  362. package/dist/model-modules/module-layers.js.map +1 -1
  363. package/dist/model-modules/module-name-flaw.d.ts +4 -1
  364. package/dist/model-modules/module-name-flaw.d.ts.map +1 -1
  365. package/dist/model-modules/module-name-flaw.js +6 -2
  366. package/dist/model-modules/module-name-flaw.js.map +1 -1
  367. package/dist/model-modules/module-placement.d.ts +8 -6
  368. package/dist/model-modules/module-placement.d.ts.map +1 -1
  369. package/dist/model-modules/module-placement.js +32 -30
  370. package/dist/model-modules/module-placement.js.map +1 -1
  371. package/dist/model-modules/module-split.d.ts +7 -5
  372. package/dist/model-modules/module-split.d.ts.map +1 -1
  373. package/dist/model-modules/module-split.js +18 -17
  374. package/dist/model-modules/module-split.js.map +1 -1
  375. package/dist/model-modules/module-test-folder-of.d.ts +8 -0
  376. package/dist/model-modules/module-test-folder-of.d.ts.map +1 -0
  377. package/dist/model-modules/module-test-folder-of.js +11 -0
  378. package/dist/model-modules/module-test-folder-of.js.map +1 -0
  379. package/dist/model-modules/role-folders-of.d.ts +5 -3
  380. package/dist/model-modules/role-folders-of.d.ts.map +1 -1
  381. package/dist/model-modules/role-folders-of.js +19 -11
  382. package/dist/model-modules/role-folders-of.js.map +1 -1
  383. package/dist/model-modules/role-folders.d.ts +1 -1
  384. package/dist/model-modules/role-folders.js +1 -1
  385. package/dist/model-modules/subject-module.d.ts +13 -0
  386. package/dist/model-modules/subject-module.d.ts.map +1 -0
  387. package/dist/model-modules/subject-module.js +34 -0
  388. package/dist/model-modules/subject-module.js.map +1 -0
  389. package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
  390. package/dist/move-to-module/moves-into-module.js +29 -16
  391. package/dist/move-to-module/moves-into-module.js.map +1 -1
  392. package/dist/naming/plural.d.ts.map +1 -1
  393. package/dist/naming/plural.js +5 -0
  394. package/dist/naming/plural.js.map +1 -1
  395. package/dist/plan/format-plan.js +1 -1
  396. package/dist/plan/format-plan.js.map +1 -1
  397. package/dist/progress/build-next-of.d.ts.map +1 -1
  398. package/dist/progress/build-next-of.js +8 -3
  399. package/dist/progress/build-next-of.js.map +1 -1
  400. package/dist/refusals/apply-plan.d.ts.map +1 -1
  401. package/dist/refusals/apply-plan.js +8 -4
  402. package/dist/refusals/apply-plan.js.map +1 -1
  403. package/dist/refusals/move-named-specs.d.ts.map +1 -1
  404. package/dist/refusals/move-named-specs.js +7 -4
  405. package/dist/refusals/move-named-specs.js.map +1 -1
  406. package/dist/refusals/unit-folder-of.d.ts +9 -0
  407. package/dist/refusals/unit-folder-of.d.ts.map +1 -0
  408. package/dist/refusals/unit-folder-of.js +15 -0
  409. package/dist/refusals/unit-folder-of.js.map +1 -0
  410. package/dist/slice/plan-staging.d.ts +2 -1
  411. package/dist/slice/plan-staging.d.ts.map +1 -1
  412. package/dist/slice/plan-staging.js +3 -1
  413. package/dist/slice/plan-staging.js.map +1 -1
  414. package/dist/stack/declares-roles.d.ts +8 -0
  415. package/dist/stack/declares-roles.d.ts.map +1 -0
  416. package/dist/stack/declares-roles.js +11 -0
  417. package/dist/stack/declares-roles.js.map +1 -0
  418. package/dist/stack/stack-vars.d.ts.map +1 -1
  419. package/dist/stack/stack-vars.js +2 -1
  420. package/dist/stack/stack-vars.js.map +1 -1
  421. package/dist/version.d.ts +1 -1
  422. package/dist/version.js +1 -1
  423. package/dist/worker/progress-of.js +12 -1
  424. package/dist/worker/progress-of.js.map +1 -1
  425. package/dist/worker/row-commits.js +7 -1
  426. package/dist/worker/row-commits.js.map +1 -1
  427. package/package.json +6 -6
  428. package/templates/command/handler.spec.buses.ts.tpl +4 -1
  429. package/templates/command/handler.spec.container.ts.tpl +6 -1
  430. package/templates/controller/controller.spec.ts.tpl +4 -1
  431. package/templates/controller/guard.spec.ts.tpl +2 -2
  432. package/templates/controller/guard.ts.tpl +2 -1
  433. package/templates/e2e/e2e.spec.ts.tpl +5 -2
  434. package/templates/error/codes-import.ts.tpl +1 -0
  435. package/templates/error/refusal-case.spec.ts.tpl +1 -1
  436. package/templates/error/refusal.spec.ts.tpl +1 -0
  437. package/templates/file-upload/handler.spec.ts.tpl +4 -1
  438. package/templates/init/e2e/create-credentials.jwt.ts.tpl +13 -0
  439. package/templates/init/e2e/create-credentials.keycloak.ts.tpl +13 -0
  440. package/templates/init/e2e/create-credentials.none.ts.tpl +13 -0
  441. package/templates/init/e2e/create-credentials.passport.ts.tpl +13 -0
  442. package/templates/init/platform/audit/search-audit-entries/search-audit-entries.controller.ts.tpl +2 -2
  443. package/templates/init/platform/audit/search-audit-entries/search-audit-entries.route.ts.tpl +2 -2
  444. package/templates/init/platform/composition/create-platform.manual.ts.tpl +14 -4
  445. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +8 -2
  446. package/templates/init/rules/presentation.md.tpl +2 -2
  447. package/templates/init/rules/tests.md.tpl +1 -0
  448. package/templates/nest-controller/controller.spec.ts.tpl +4 -1
  449. package/templates/pipeline/biome.json.tpl +1 -1
  450. package/templates/pipeline/jest.mutation.config.js.tpl +1 -1
  451. package/templates/pipeline/knip.json.tpl +2 -0
  452. package/templates/pipeline/package-scripts.json +2 -2
  453. package/templates/pipeline/vitest.config.ts.tpl +11 -6
  454. package/templates/pipeline/vitest.mutation.config.ts.tpl +1 -1
  455. package/templates/presets/identity/context/presentation/http/accounts.routes.ts.tpl +2 -1
  456. package/templates/presets/identity/context/presentation/http/invitations.routes.ts.tpl +2 -1
  457. package/templates/presets/identity/context/presentation/http/organisations.routes.ts.tpl +2 -1
  458. package/templates/presets/identity/context/test/unit/change-member-role.handler.spec.ts.tpl +2 -1
  459. package/templates/presets/identity/context/test/unit/deactivate-account.handler.spec.ts.tpl +4 -4
  460. package/templates/presets/identity/context/test/unit/grant-delegation.handler.spec.ts.tpl +2 -1
  461. package/templates/presets/identity/context/test/unit/invite-member.handler.spec.ts.tpl +3 -3
  462. package/templates/presets/identity/context/test/unit/provision-account.handler.spec.ts.tpl +2 -1
  463. package/templates/presets/identity/context/test/unit/remove-member.handler.spec.ts.tpl +2 -1
  464. package/templates/presets/identity/context/test/unit/revoke-delegation.handler.spec.ts.tpl +2 -1
  465. package/templates/presets/identity/context/test/unit/revoke-invitation.handler.spec.ts.tpl +2 -1
  466. package/templates/presets/identity/context/test/unit/search-members.handler.spec.ts.tpl +2 -2
  467. package/templates/query/handler.spec.buses.ts.tpl +4 -1
  468. package/templates/query/handler.spec.container.ts.tpl +6 -1
  469. package/templates/query/search.handler.spec.buses.ts.tpl +2 -2
  470. package/templates/query/search.handler.spec.container.ts.tpl +2 -2
  471. package/templates/query/search.reader.spec.ts.tpl +2 -2
  472. package/templates/route/route.class-validator.ts.tpl +5 -0
  473. package/templates/route/route.none.ts.tpl +6 -1
  474. package/templates/route/route.search.ts.tpl +3 -3
  475. package/templates/route/route.spec.ts.tpl +4 -1
  476. package/templates/route/route.standard-schema.ts.tpl +5 -0
  477. package/templates/route/route.typebox.ts.tpl +5 -0
  478. package/templates/route/route.zod.ts.tpl +5 -0
  479. package/templates/value-object/value-object.spec.ts.tpl +6 -3
package/CHANGELOG.md CHANGED
@@ -4,6 +4,148 @@ What each version changes for someone who uses the kit. The packages of `package
4
4
  together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
5
5
  list the pull requests behind it.
6
6
 
7
+ ## 0.110.1
8
+
9
+ **The guard lets a worker take a lock with `flock` under `$XDG_RUNTIME_DIR`.** Since 0.110.0 the guard reads the lock file of `flock` as a file the command writes, and refused `flock "$XDG_RUNTIME_DIR/heavy.lock" npm run verify` to a context worker: a variable it did not read, in a directory outside the worktree. A worker then ran its heavy command without the lock the checkouts of the machine share. The guard now reads `$XDG_RUNTIME_DIR` by its value when the session started, and a lock of `flock` there is free, as output to the system temp directory is: `flock` creates the file when it is missing and writes nothing in it. Everything else a worker writes there is still refused (a redirection, the report of `time -o`), so is a lock that is a link into a project, and a worker that sets `XDG_RUNTIME_DIR` itself is refused as one that sets `TMPDIR`.
10
+
11
+ ## 0.110.0
12
+
13
+ **A project generated on Fastify compiles again with Fastify 5.12.8.** That version types `app.addresses()` as addresses or pipe paths, and `src/platform/http/start-http-server.ts` read `.port` of the first one, so `tsc` refused a new project (`Property 'port' does not exist on type 'string | AddressInfo'`). The file now reads the port through a function that answers 0 for a server bound to a pipe.
14
+
15
+ To move: in a project already generated on Fastify, replace the last lines of `startHttpServer` in `src/platform/http/start-http-server.ts` with `return { port: boundPort(app.addresses()), close: () => app.close() };` and add below it
16
+
17
+ ```ts
18
+ function boundPort(addresses: readonly unknown[]): number {
19
+ const [address] = addresses;
20
+ const port: unknown = typeof address === 'object' && address !== null && 'port' in address ? address.port : 0;
21
+
22
+ return typeof port === 'number' ? port : 0;
23
+ }
24
+ ```
25
+
26
+ **Under Nest 12.3 over Express, a body too large is still answered with its limit.** Since 12.3 the Express adapter of Nest hands the error of its parser as the `cause` of an `HttpException`, so the 413 of `@ddd-ts-kit/http` said `The body is larger than what the server reads.` where it said `The body is larger than 102400 bytes.` The limit and the type of the error are now read on that cause too: the log line of a body that is not JSON carries `errorType: 'entity.parse.failed'` under Nest over Express, as under Express alone, where it carried `BadRequestException`.
27
+
28
+ To move: a dashboard or an alert that filters the refusals of the edge on `errorType: 'BadRequestException'` filters on `entity.parse.failed`.
29
+
30
+ **`ddd-ts-kit lint` takes the `--ignore-pattern` that `affected` writes, and three defects of the generators are fixed.**
31
+
32
+ - `affected --format github` and `--format gitlab` give the lint of a partial run as `--ignore-pattern <context>/`, one per context left out, and the generated pipeline hands that line to `npm run ci:lint`. `ddd-ts-kit lint` refused it (`Unknown option '--ignore-pattern'`), so the lint step of a partial run failed. `lint` now takes the option, as many times as given, and leaves those folders out on top of what the ESLint config of the project ignores.
33
+ - `generate projection` and the other kinds that name an integration event refused one whose type the formatter had folded, `export type InvoiceIssuedV2 =` on one line and `IntegrationEvent<...>` on the next. The declaration is read whatever its layout.
34
+ - The table of an aggregate whose last word is plural already keeps its name: `ReaderSettings` gives `reader_settings` where it gave `reader_settingses`. The words are `settings`, `preferences`, `news`, `series`, `species`, `data`, `metadata`, `analytics`, `statistics`, `logistics` and `economics`.
35
+ - `npm run db:generate <name>` on Drizzle refuses a name the journal already holds, and names the migration that carries it, before drizzle-kit runs: two migrations of one name read as one in a review.
36
+
37
+ To move: a table already generated as `..._settingses` keeps its name, nothing reads it again. Rename it by a migration if the name matters.
38
+
39
+ **`verify-slice` lists what the end-to-end specs of the context share, and `plan-waves` no longer describes the whole project after each replayed command.**
40
+
41
+ - A slice whose end-to-end spec imports a new file of `test/e2e/support/<context>/` was told to commit the spec and not that file: the spec landed without what it imports, or the file was committed against the list. The folder of the context is now part of its slice, in the paths `verify-slice` prints and in the worktree `merge-trunk --to-land` asks to be clean. `test/e2e/support/` itself, shared by every context, stays the conductor's.
42
+ - `plan-waves` replays every command of every open row in a copy of the project, and each one wrote every generated document again: the lists of each `CONTEXT.md`, the contracts, the pages of what the tests state, read from every spec. On a plan of several hundred rows the command answered after minutes. A replayed command now writes the declarations a later command builds on, and nothing else.
43
+
44
+ **`generate gateway` no longer binds a contract a second time.** A gateway binds the read contract of its upstream to an empty value, which a person replaces by the implementation. A second context asking for a gateway on the same contract wrote that empty binding again below the first: at run time the last one won, and the first context called an empty object. The binding is now left alone where the contract is bound already.
45
+
46
+ **`generate repository` no longer declares a table a second time under the same name.** Run again on an aggregate that has its repository, with other options than the first time (`--personal`, `--tenant-scoped`), the command kept every file it had written and added a second declaration of the table to the schema of the context: every spec that loads that file then failed on a name declared twice. It is now refused, on the four ORM, and the file is left as it was; run again with the same options, it still adds nothing.
47
+
48
+ To move: nothing. To add a personal field to a table that exists, change the table by hand, with its line in the `*.personal-fields.ts` of the aggregate.
49
+
50
+ **Coverage no longer counts what the compiler writes to apply standard decorators, and the e2e client sends bytes as they are.**
51
+
52
+ - `decoratorCoverage()` of `@ddd-ts-kit/testing/vitest` handled the legacy decorator mode alone. Under the standard mode the compiler writes, for every decorated member, two `access` closures that only a decorator reading them calls, mapped to the line of the decorator: a projection with several `@On` lost statements or functions no spec could win back, and a layer fell under its floor with every line covered. The plugin now marks those statements too, and a project generated in the standard mode lists it after `decorators()` in `vitest.config.ts`.
53
+ - `FetchClient` of `@ddd-ts-kit/testing/e2e` turned every body that was not a text into JSON, a `Uint8Array` included, so an upload in another encoding than UTF-8 could not be tested end to end. Bytes, a `Blob` and a `FormData` are now sent as they are, under the content type the call names or the one of the form.
54
+
55
+ To move: in a project on standard decorators, write `plugins: [decorators({ compiler: '@typescript/native' }), decoratorCoverage()]` in `vitest.config.ts`, with `decoratorCoverage` imported from `@ddd-ts-kit/testing/vitest`. A coverage floor lowered for this reason, or a local plugin doing the same, can go.
56
+
57
+ **`status` names the rows in progress before the next one, and `plan-waves` names the command that opens the worktree of the conductor.**
58
+
59
+ - During the build, `Next:` of `ddd-ts-kit status` proposed the first `todo` row ready on the trunk even while rows were in progress, as if they were not there. It now reads `#US1.01 in progress; once landed, the next row ready on the trunk, #US1.02 ...`.
60
+ - A batch of the conductor in `plan-waves` said `on the trunk, by the conductor`, and the guard then refused the code of a context in the main checkout. The line now ends with where that work is done: `in the worktree of the plan (npx ddd-ts-kit worktree <plan>)`.
61
+
62
+ **`ddd-ts-kit merge-trunk` finds where a branch landed when the branch had merged the trunk before its squash.** Between two commits of the branch that carry the same patch, the newer one was taken only when the trunk held every file that differs between them. Across a merge of the trunk those are the files the merge brought: one more change of the trunk to any of them and the base fell back before that merge, so the lines of the trunk read as the branch's own and came back as conflicts. Only the files where that merge differs from the trunk commit it brought in are compared now.
63
+
64
+ **`ddd-ts-kit merge-trunk` without `--trunk` brings in the base of the worker of the worktree.** It read `origin/HEAD`, then `origin/main`, whatever `.ddd-ts-kit/worker.json` named as `base`, the ref `worker-scope` cut the branch from, where `verify-merge` already reads it: a worker cut from another branch than the default one was given the default one. `--trunk` still names any other ref. When the branch is up to date with that base while the default trunk holds commits it lacks, the answer says so and gives the command that brings it in, so that a worker cut from the branch of another one, or scoped again on its own branch, does not read "up to date" as "holds the trunk".
65
+
66
+ To move: a worker stacked on the branch of another worker has that branch as its base. Once that branch landed, name the trunk: `npx ddd-ts-kit merge-trunk --trunk origin/main`.
67
+
68
+ **`ddd-ts-kit merge-trunk` no longer drops the work of a branch when `--since` names a commit the trunk does not hold.** The merge is computed from `--since`: named too new, every file the branch added before it read as deleted by the trunk, the merge removed it without a conflict, and the report said `lost lines: none lost`. `--since` at the head of the branch is now refused (exit 2), since the result would be the trunk alone. `verify-merge`, which `merge-trunk` runs before its commit, reads the files a side added since the two sides parted (`git merge-base`), whatever base the merge was computed from: one the result lacks, while no commit of the other side touched its path, is reported under `files deleted by the merge` and stops the merge. A file the result holds under another path is not reported.
69
+
70
+ **`ddd-ts-kit worker-scope --resume` and `status --workers` no longer show a new row as committed, `(by order)`, by the commit of a row that already landed.** The rows of a worker were read from its base by name. On a branch kept for its next rows, the commits of the rows the trunk took as one squash commit are still ahead of that name, and a commit without a `Slice:` trailer among them took the first new row. The rows are now read from the commit `worker-scope` recorded with the base (`baseCommit`) while the branch holds it, and only from the commits made on top of it.
71
+
72
+ **`ddd-ts-kit merge-trunk` keeps a row of `docs/architecture/slices.md` the branch added before its squash when the trunk took the code without it, and `verify-merge` reports one that is lost.** The base of a branch that landed is found without the slices file, so it may hold a row, or a `done`, the trunk never took: merged from that base, the row read as deleted by the trunk and went, with `lost lines: none lost`. `verify-merge` now reads the row where the two sides parted before it calls a removal or a reopening the decision of the side brought in: a row the trunk never held is reported under `rows gone`, a status it never had under `rows no longer done`. When the base of `merge-trunk` is not that fork and holds another slices file, the rows are merged from the fork, shown under `automatic:`.
73
+
74
+ **`ddd-ts-kit verify-merge` no longer reports as lost the same line, or the same test title, that each side removed from a different file.** Lines and titles are counted over all the files of a merge as one set, so that a line moved to another file is not lost; counted that way, two removals of one text by the two sides counted once. The same generated marker (`// TODO(domain): ...`, an `it.todo`) filled in one file by the branch and in another by the trunk was reported as a loss tagged `(both)`. A line is now expected no more often than its files expect one by one.
75
+
76
+ **A worker that merges an integration branch is no longer stopped by the guard of the plugin.** The guard took what a merge brought in for the trunk's only when the other side was on the branch `origin/HEAD` names, `main` or `master`: with workers cut from an integration branch (`worker-scope --base work/<plan>`), every file of that branch outside the scope of the worker was held as its own change after `merge-trunk`, each command and write was refused, and the refusal named `git checkout <commit> -- <path>` and `git rm`, which would have undone the trunk in the branch. The `base` that `.ddd-ts-kit/worker.json` records is now a trunk too, ahead of the three others, during the work and at the stop of the worker. It is read once, when the worker is pinned, with the base commit and the branch the file records, and a scope file whose base, base commit or branch changes afterwards stops the worker as one whose context changes does, until the conductor restores it. A base is a branch of the repository, local or of a remote, other than the worker's own; and what a merge brings in is the trunk's when the branch holds it as the trunk does, as far as the branch merged the trunk that stood before the command, so a trunk fetched and merged by one command (`git fetch origin && git merge origin/main`) is held: `npx ddd-ts-kit merge-trunk` merges it, or the fetch goes in a command of its own. `merge-trunk --trunk <ref>` asked for another ref than that base is compared as any merge is. A branch that merged its trunk hundreds of times is read by a fixed number of runs of git, and a comparison git cannot make (a commit gone from the repository) holds the call instead of passing it. A merge of a branch that is no trunk is still held, and the refusal then names no command: the worker undoes nothing and reports the merge to the conductor. The refusal of a file changed outside the scope reads "Your commands, or another session, changed files outside your scope", since the guard sees the change, not who made it.
77
+
78
+ **The pin of a worker's scope follows the worker.** The guard of the plugin kept the pin of a `context-builder` (its context and its worktree, recorded at its first call) and the count of its run in the checkout the call started in; they are now kept under the git directory the worktrees of the repository share (`ddd-ts-kit/guard/` there), so a call is judged against the worktree pinned whichever checkout it starts in, and the refusal in the worktree of another worker now says how to go on: `cd <worktree> && ...`. Where several workers have a worktree, a first command that names none no longer pins the worker to the worktree its session happens to stand in: it reads, and what it writes is refused with "Run it as `cd <worktree> && ...`" until a command names its worktree, or an editor tool a file under it; a read under another `HOME`, `PATH`, `GIT_DIR`, `TMPDIR` or `CDPATH` is refused there as it is to a pinned worker, and git that versions is told the same thing as the other commands: the call names no worktree. With one worker, or outside a git repository, nothing changes. The note taken before a command is compared with the checkout of the session it was taken for, wherever the next call starts: a session whose working directory moved is no longer told that packages or files changed in a checkout the note never read.
79
+
80
+ A pin that stands and cannot be read, of this version or of an earlier one, holds every call of its worker, which is told to ask the conductor for a new launch: a worker is never pinned twice.
81
+
82
+ To move: nothing in a project. A worker running while the plugin is updated keeps its pin: the guard finds the one the earlier version took under `.ddd-ts-kit/guard/` and keeps it with the others, for the worktree it names; the old `scope-*.json` and `turns-*.json` files there are removed by the guard a week later.
83
+
84
+ **A file the conductor changes in its own checkout no longer stops its workers.** When a file of the checkout of the session was left changed while the last command of a worker ran, the guard of the plugin refused the next call of that worker once and told it to stop, though the file was written already and the worker may put nothing back there: each edit of the plan by the conductor stopped the workers running. The call now passes, and the worker is told once, as context of the call, to put nothing back there and to name the files in its report for the conductor; the stop of the worker still carries it to the conductor. A change of the packages the guard runs (`node_modules/ddd-ts-kit`, Biome) still refuses the next call once, except after `npx ddd-ts-kit merge-trunk`, which installs them itself when the lockfile changed, and so does a change of what the guard stands on in that checkout: `ddd-ts-kit.config.json`, the settings, hooks and plugins of a coding agent (`.claude/`, `.codex/`, `.agents/`, `.github/hooks/`, `.github/copilot/`) and a scope file under `.ddd-ts-kit/`. A guard switched off in the checkout of the session no longer lifts a pinned worker there: its guard keeps the mode of its first call in every checkout of the repository.
85
+
86
+ **The guard of the plugin no longer refuses three commands a worker may run inside its scope.** A folder of its context is moved, removed and copied into (`git mv <folder>`, `mv`, `rmdir`, `rm -r`, `cp file <folder>/`): the guard took a folder for a file with another name (a hard link), since a folder counts more than one link. The folder of the context itself is inside the scope for a tool given it whole (`eslint src/contexts/<context> --fix`). The schema of a query string, `presentation/http/<resource>/<use-case>/*.query.ts`, is written by hand as `docs/ARCHITECTURE.md` says, in the presentation layer of a context alone (`<context>/presentation/`, `<context>/<module>/presentation/`, `<context>/shared/presentation/`): everywhere else a new `*.query.ts` is still sent to `generate query`. A command given a folder (`cp`, `mv`, `ln`, `install`, `rsync`) is judged by what it brings into it and by the files it lands on there: a link or a whole tree comes from the scope alone, a file named lands where its name leads, and a whole tree, or files whose names the shell computes, land in no folder that holds a file with another name elsewhere, nor in one past 5000 files. `chmod`, `chown`, `chgrp`, `chattr`, `chcon`, `chflags`, `setfacl`, `setfattr`, `git add --chmod` and `git update-index --chmod` are held to the scope as a command that writes the file is. And the words of the command behind a package runner (`npx`, `pnpx`, `bunx`, `npm exec`, `pnpm exec`, `pnpm dlx`, `bun x`) are read as the shell split them, so `npx ddd-ts-kit generate value-object invoicing SupplierName --term "SupplierName=le nom d'un fournisseur"` is no longer refused as a quote that never closes, nor a `>` or a `;` inside a quoted word read as a redirection or a second command. That holds for the one shape the guard reads in full: the runner, its subcommand, the options it knows (`-y`, `-p`, `-w`, `--filter`, `--dir` and their like), then a program named plainly and its arguments. Any other invocation may hand text to a shell (`-c`, `--call`, `--shell-mode`, an option the guard does not know, short options written together, `true` or `false` after an option that takes no value, `npm exe`, a setting such as `npm_config_call` on the line, `yarn`, `bun run`) and every word of it is read as shell text, as before. A runner told where to run (`pnpm -C <dir> exec`, `npm --prefix <dir> exec`, `bun --cwd <dir> x`) has its command judged in that directory, `pnpm <program>` is read as `pnpm exec <program>`, and a worker runs no command in another checkout, where it only reads. A wrapper (`time`, `nice`, `timeout`, `env`, `sudo` and their like) is read through to the command it runs when the guard knows each option it is given; behind any other first word that is no program the guard knows, each later word that may name a program is read as a command too. A wrapper that writes a file of its own (the report of `time -o`, the log of `strace -o` or `script`, the lock of `flock`, `nohup.out` when nothing takes the output) is held to the scope for it as a redirection is, one given an option the guard does not know may write anywhere and is refused, and a wrapper or a program told where to run (`env -C <dir>`, `sudo -D <dir>`, `make -C <dir>`, `npm --prefix <dir> run`, `pnpm -C <dir> install`) is judged there, as a command after `cd <dir>;` is.
87
+
88
+ **The rules, the readers and the tool configuration of the CLI read a module that holds its tests (`<module>/test/`) and `shared/`, wherever they named a path of the context.** Nothing writes that layout yet, and the layout of today is read as before.
89
+
90
+ - `test/spec-required` and `test/builder-required` find a spec in `<module>/test/` and a builder in `<module>/test/builders/` or `shared/test/builders/`, and name the test folder of the module once it holds one; `test/acceptance-black-box` lets an acceptance spec import those builders; `module/complete` names `shared/<layer>/<role>` for a file of a module left in `shared/`.
91
+ - `ddd-ts-kit docs` writes the rules of the specs of `<module>/test/` on the behaviour page of their context, under the same headings as the specs of `test/unit/<module>/`, each named where it is; `describe` reads the route groups of `shared/presentation/http/` and of a module.
92
+ - `generate test-world` reads the fakes of every module and of `shared/`, and the world of `shared/test/worlds/`; `controllers` writes the route groups in `shared/presentation/http/` once the context holds it and moves a spec within `<module>/test/unit/`; `error-factories --apply` finds the spec of an error of a module in `<module>/test/unit/` or `test/unit/<module>/`, where it found it in `test/unit/` alone; `init --force` lists again a tables file of `shared/infrastructure/persistence/` and an erasure adapter of a module; `drizzle-generate` and `typeorm-generate` warn of the tables of `shared/` and of the modules a migration would drop.
93
+ - `ddd-ts-kit affected` reads a change of `<module>/test/` or `shared/test/` as a change of tests alone.
94
+ - The generated `.dependency-cruiser.cjs` holds `<context>/<folder>/test/` as test code, and the fakes and worlds there as files that may have no importer. The templates of a new project follow: `vitest.config.ts` (the integration specs), `vitest.mutation.config.ts`, `jest.mutation.config.js`, `knip.json` and `.claude/rules/tests.md` (with the Copilot instruction written from it) name `src/contexts/*/*/test/` beside `src/contexts/*/test/`.
95
+
96
+ To move: run `npx ddd-ts-kit depcruise-config --write` and commit `.dependency-cruiser.cjs`, which `depcruise-config --check` reports as stale until then. The other files change nothing until a module holds its tests; to follow them now, by hand: in `vitest.config.ts`, `const INTEGRATION_SPECS = ['src/contexts/*/test/integration/**/*.spec.ts', 'src/contexts/*/*/test/integration/**/*.spec.ts'];`, spread in the `exclude` of the unit project (`[...INTEGRATION_SPECS, ...NOT_AFFECTED]`) and given as the `include` of the integration one; in `vitest.mutation.config.ts`, add `'src/contexts/*/*/test/integration/**'` to `exclude`; in `jest.mutation.config.js`, the pattern `'/src/contexts/[^/]+/(?:test|[^/]+/test)/integration/'`; in `knip.json`, the entries `"src/contexts/*/*/test/fakes/*.ts"` and `"src/contexts/*/*/test/worlds/*.ts"`; in `.claude/rules/tests.md`, the path `"src/contexts/*/*/test/**"`.
97
+
98
+ **`ddd-ts-kit check` reads the layout to come of a context divided into modules: each module holding its tests, and `shared/` for what belongs to no module.** In a context that declares modules of its model, `<module>/test/` (`unit/`, `integration/`, `builders/`, `fakes/`) is read as the test folder of that module, and `shared/` as the place of what the context keeps at its own level: `shared/infrastructure/persistence/` (its schema and tables), `shared/presentation/http/` (its route groups, `guards/` and `shared/`) and `shared/test/` (`worlds/`, `fakes/`, `builders/`). A file there has the role it has today at the level of the context, and no module: `tree/closed` holds both, closed (`shared/` has no `domain/` and no `application/`), and the rules that read a location (`naming/suffix`, `test/helper-placed`, `module/complete`, `module/no-cycle`) judge it as the same file at its place of today. Nothing writes this layout yet and the layout of today is read as before: the generators, `move-to-module`, `context-layout`, `test/spec-required` and `test/builder-required` follow in the next versions, with the documentation. `shared` is now the name of that folder and can no longer name a module: `config/valid` and `ddd-ts-kit generate module` refuse it and say why, where `module/declared` refused it as a technical word.
99
+
100
+ **`ddd-ts-kit context-layout` lays a context divided into modules out with its tests in its modules and `shared/` for what belongs to none, and `move-to-module` moves within that layout.** Nothing else writes that layout yet, and the layout of today is read and accepted as before: running the command is a choice.
101
+
102
+ - In a context that declares modules, `context-layout` moves, in one run: the specs of `test/unit/<module>/` and `test/integration/<module>/` to `<module>/test/`; a spec, a fake or a builder left in the test folders of the context to the module of the file it is named after (a builder after an aggregate, a fake after a port or a repository), else of the one module its imports name; what the context keeps at its own level to `shared/`: its schema and tables (`shared/infrastructure/persistence/`), its route groups, guards and shared shapes (`shared/presentation/http/`), its worlds, and the specs, fakes and builders no module is told for (`shared/test/`). A file of a layer whose imports name no module, or two, stays and is listed with the `move-to-module` command to run. A file already at its target is never overwritten, the pair is listed; run again, nothing moves.
103
+ - Every import follows, as before, and now also the compiled path a migration names a moved file by (`../dist/src/contexts/<context>/infrastructure/persistence/<name>.schema.js` in a Knex migration), for `move-to-module` too. The schema index of the platform follows as any import.
104
+ - The entries of `knip.json` that name the fakes and worlds of a context name those of its modules beside them; a `vitest.config.ts`, `vitest.mutation.config.ts` or `jest.mutation.config.js` that still names the integration specs of `<contexts>/*/test/integration/` alone is said, not rewritten.
105
+ - `move-to-module`, in a context laid out that way, writes a spec to `<module>/test/<unit|integration>/`, takes a fake or a builder to `<module>/test/`, moves a file out of `shared/` and from one module to another, and finds the specs named after a moved file where that file came from.
106
+ - `tree/closed` accepts `shared/test/unit/` and `shared/test/integration/`: the spec of a guard of `shared/presentation/http/guards/`, or of several modules, lives there.
107
+
108
+ **`@ddd-ts-kit/eslint-plugin` reads `shared/` and the test folder of a module as the CLI does.** In a context divided into modules, a file of `<module>/test/` is a test of that module, and a file of `shared/infrastructure/`, `shared/presentation/` or `shared/test/` is read in its layer, with no module. The preset counts `<contexts>/*/*/test/**` among the test files. Nothing changes for a project as it is laid out today: this is the layout to come, which the CLI reads since the previous step.
109
+
110
+ **Breaking: a context divided into modules keeps no layer folder and no `test/` folder at its root; each module holds its tests, and `shared/` holds what belongs to none.** A part of the model is one folder, its tests with it; what several modules share has one place. A context without modules is unchanged.
111
+
112
+ - The layout: `<module>/domain/` to `<module>/presentation/` and `<module>/test/` (`unit/`, `integration/`, `builders/`, `fakes/`); `shared/infrastructure/persistence/` (the schema and tables of the context), `shared/presentation/http/` (its route groups, `guards/`, `shared/`) and `shared/test/` (its worlds, and the fakes, builders and specs of no module). A builder follows the aggregate it is named after and a fake the port or the repository it is named after, into their module. `shared/` holds no `domain/` and no `application/`, is never declared in the config, and no module may be named `shared`.
113
+ - `ddd-ts-kit generate` writes that layout and nothing else: a spec, a fake and a builder in `<module>/test/` (`generate builder` now takes `--module`), a schema, a route group, a guard, a shared shape and a world in `shared/`. It refuses a context that still holds `test/` at its own level, and names `context-layout`.
114
+ - `module/complete` reports `test/` at the level of a context that declares modules, and a layer folder there that holds nothing but what `shared/` holds now, as an error whatever its severity, one finding per folder. A file of a layer still at the level of the context, or a file of a module left in `shared/`, stays a warning: a context that gains its first module moves one cluster per commit with `move-to-module`, read as it is meanwhile.
115
+ - `move-to-module` takes a spec, a fake or a builder to `<module>/test/`, from the level of the context, from `shared/` or from another module.
116
+ - `controllers` refuses to turn a function route that sits in `shared/presentation/http/`: a route belongs to a module, and the command names the `move-to-module` to run first.
117
+ - The layout of 0.86 and 0.87, a module under `domain/<module>/` and `application/<module>/`, is no longer read, by the CLI nor by `@ddd-ts-kit/eslint-plugin`: a project still laid out that way runs `context-layout` of 0.109 first.
118
+
119
+ To move: `npx ddd-ts-kit context-layout`, then `npx ddd-ts-kit depcruise-config --write`, the formatter, the checks and the tests. The command moves, in each context that declares modules, the specs of `test/<unit|integration>/<module>/` to `<module>/test/`, each spec, fake and builder left in the test folders of the context to the module of the file it is named after, else of the one module its imports name, else to `shared/test/`, and the schema, the route groups, guards and shared shapes and the worlds to `shared/`, with every import of them and the compiled path a migration names them by. It leaves to a person, and lists: a file of a layer whose imports name two modules, or none (`ddd-ts-kit move-to-module <context> <module> <path>`); a file already at its target, which it never overwrites; and each `vitest.config.ts`, `vitest.mutation.config.ts` or `jest.mutation.config.js` that still names the integration specs of `src/contexts/*/test/integration/` alone, where `src/contexts/*/*/test/integration/` goes beside it. `ddd-ts-kit check --rule module/complete` lists the folders still to move.
120
+
121
+ **The skills and agents of the plugin name the places of a context divided into modules of the model.** A module holds its four layers and its tests (`<module>/test/unit/`, `integration/`, `builders/`, `fakes/`), what belongs to no module sits in one `shared/` folder (`shared/infrastructure/persistence/`, `shared/presentation/http/`, `shared/test/`), `generate builder` takes `--module`, and `move-to-module` and `context-layout` are named where a project moves. The `plan-slices` skill also says that a read taking criteria, a scope or a page is named `Search...`, never `List...`.
122
+
123
+ **The actor of an end-to-end test holds roles of the role vocabulary of the platform, and a misspelled role no longer compiles.** Under `--authz rbac` and `--authz abac`, where `init` writes `Role` in `src/platform/auth/authorization/role.ts`, `test/e2e/support/create-credentials.ts` types the roles of a test actor with it (`readonly roles?: readonly Role[]`), whatever the authenticator (`none`, `jwt`, `keycloak`, `passport`): `application.as({ id: 'ada', roles: ['admn'] })` is refused by the compiler (`Type '"admn"' is not assignable to type 'Role'`) and the editor completes the role. `generate e2e` writes the role by its key, `roles: [Role.Admin]`, with its import: the administrator of the vocabulary, or its first role when it names none. Under relationships and a custom authorizer, which start without that vocabulary, the roles stay strings, as before.
124
+
125
+ `Actor.roles` of `@ddd-ts-kit/kernel` stays `readonly string[]`, and `RoleBasedAuthorizer` of `@ddd-ts-kit/auth` is not typed by the role names: a role may be declared by `inherits` alone, which a single type of the keys of `roles` refuses.
126
+
127
+ To move: in a project already generated under RBAC or ABAC, in `test/e2e/support/create-credentials.ts`, add `import type { Role } from '@/platform/auth/authorization/role';` and replace `readonly roles?: readonly string[];` of `TestActor` by `readonly roles?: readonly Role[];`. The compiler then lists each spec that names a role the vocabulary does not hold: write it `Role.<Key>`, or add the role to `role.ts`.
128
+
129
+ **Generated code names an error code by a constant, which the editor completes and the compiler checks, where it wrote a string.** `@ddd-ts-kit/kernel` exports `KitCodes`, the codes the packages of the kit raise (`KitCodes.Forbidden` is `'FORBIDDEN'`, `KitCodes.ValidationFailed` is `'VALIDATION_FAILED'`, and so on for the twenty-two of them), with the type `KitCode`. The generators write it wherever they named such a code: the `errors` of a function route (`errors: [KitCodes.Unauthorized, KitCodes.Forbidden]`), of a route group (`errors: [KitCodes.Forbidden]`), of a guard and of the audit routes of the platform, the spec of a route or of a controller (`code: KitCodes.ValidationFailed`), the specs of the handlers (`rejects.toMatchObject({ code: KitCodes.Forbidden })`), of a search reader and of a value object, and the route groups and the handler specs of the identity preset. Under `"stack.refusals": "named"`, the spec `generate error` writes for a refusal expects its code by its entry of the code list of the context (`expect(error.code).toBe(BillingCodes.InvoiceAlreadyIssued)`), and a spec written before is given the import of the list when a case is added to it.
130
+
131
+ What reads an `errors` list reads both forms. `errors/known-code` follows a member of a code list to its code: the list of the context of the route (`<context>.codes.ts`), that of the shared kernel, or `KitCodes`; it reports a key the list does not hold, a code of another context named through the list of that context, and a member of anything else, which it cannot read. `ddd-ts-kit describe`, the reference of `CONTEXT.md` and the digest give the code a member names. `ddd-ts-kit controllers` leaves out of a controller the codes of the kit its guard and its group already say, written either way, and writes the group with `KitCodes.Forbidden`.
132
+
133
+ `expectProblem` and `expectRefusal` of `@ddd-ts-kit/testing` take the codes a caller names as a type argument: `expectProblem<SchedulingCode | KitCode>(response, { status: 409, code: 'SLOT_TAKEN' })` and `expectRefusal<SchedulingCode>(() => appointment.cancel(at), 'APPOINTMENT_ENDED')` refuse a code outside them at compile time. Without the type argument they take any string, as before.
134
+
135
+ Left as it was: under `"stack.refusals": "factories"` and `"classes"` a context has no code list, so its own codes stay strings; the identity preset still writes the codes of its context as strings in its controllers and its specs.
136
+
137
+ To move: nothing has to change, a string still names its code. To take the constants in a project already generated, import `KitCodes` from `@ddd-ts-kit/kernel` and replace each code of the kit written as a string in `errors: [...]` and in the specs (`'FORBIDDEN'` becomes `KitCodes.Forbidden`, `'VALIDATION_FAILED'` becomes `KitCodes.ValidationFailed`); under named refusals, replace a code of the context by its member of `<Context>Codes`. A route that already named a code through an object of its own (`errors: [MyCodes.Something]`) is now reported: `ddd-ts-kit check --rule errors/known-code` lists them, and each is written as a member of the code list of its context, of `KitCodes`, or as a string.
138
+
139
+ **The `use-case` skill has a route declare its error codes by the members of the code lists.** It tells the agent to write `errors` of a route with `<Context>Codes.<Refusal>` for a refusal of the context and `KitCodes.<Code>` of `@ddd-ts-kit/kernel` for a code of the kit, never as a string, so that the editor completes the code and a typo does not compile; under `"stack.refusals": "factories"`, where no list holds the codes of the context, they stay strings and only the codes of the kit are named by `KitCodes`.
140
+
141
+ **In the process, the projections of an integration event apply before the handlers that react to it.** `@ddd-ts-kit/di` subscribed the consumers of an event in the order of the modules, so a handler declared in a context listed before the one of a projection ran first and read a read model the event had not reached yet. The projections now subscribe first, whatever the order of the modules: on the in-memory bus, and on what the outbox relay publishes to it, a handler reads the row the same event wrote. On a broker each consumer has its own queue and nothing orders them, as before.
142
+
143
+ To move: nothing. A handler that relied on running before a projection of the same event, which nothing promised, now runs after it.
144
+
145
+ **The handlers of a domain event run in the execution context of the save that recorded it, so an integration event published for a command run inside another one carries the tenant of the inner command.** A command dispatched inside another joins its unit of work, and its domain events are dispatched at the end of the outer one: their handlers ran in the execution context of the outer command, and what they published took its tenant, or none when the outer work had none, so the consumers answered `FORBIDDEN` or worked in the wrong tenant. `dispatchingOnSave` and `announceDomainEvents` of `@ddd-ts-kit/kernel` take the execution scope as an optional last argument and keep, with each event, the context in progress at the save; both phases (`before-commit`, `after-commit`) run in it. `kernelModule` of `@ddd-ts-kit/di` passes the scope it binds, and the platform `init` writes without a container passes its own.
146
+
147
+ To move: under a container, nothing. In a project assembled by hand (`"stack.di": "manual"`), in `src/platform/composition/create-platform.ts`, pass the scope to `adapterOf` and write `dispatchingOnSave(resilient, () => domainEvents, () => scope)`. A handler that relied on running in the context of the outer command reads the execution context of the save instead.
148
+
7
149
  ## 0.109.0
8
150
 
9
151
  **`ddd-ts-kit init --search opensearch` wires the read models of OpenSearch in the platform.** The choice is recorded as `stack.search` (`none` by default, and for a config that does not say). `@ddd-ts-kit/opensearch` joins the dependencies; `src/platform/search/` hands every context `SearchIndexes`, whose `options(name, definition)` gives an `OpenSearchReadModelStore` the transport of `OPENSEARCH_URL` and the tenancy of the project (a filtered alias per tenant under `--tenancy shared-table`), and provisions the index of each store before a request: once without tenancy, and under shared tables for the tenant of the work, once the tenant directory of the platform lists it (`TENANTS`, or the organisations of the identity preset), so a tenant created later needs no restart and an unknown one creates no index. The start provisions best effort and never fails on search; a project with no store calls nothing, and the privacy scripts reach the copies kept in OpenSearch. A store name built twice with another definition throws `SearchNameTakenError`. `loadConfig` reads `OPENSEARCH_URL`, and `OPENSEARCH_USERNAME` with `OPENSEARCH_PASSWORD` both or neither, and refuses a `TENANTS` entry that is not lower case; the compose stack runs one node, `.env.example` and the README name the variables. No generator writes a store yet: an adapter extends `OpenSearchReadModelStore` and calls `super(search.options('billing_invoices', criteria))`. The new rule `search/store-from-platform`, an error, refuses a context that names anything of the package but the store and its refusals, names the store outside `extends`, builds it with anything but `super(<search>.options(..))`, or spreads the answer of `.options(` in any of its files. What fits a search read model and what does not, its tests, its tenants and its rights in production: `docs/tools/search-read-models.md`; each choice: `docs/adr/0009-init-wires-opensearch.md`.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:971cf74438344b02 -->
2
+ <!-- translation-of: README.md sha256:a81e842cf19ebf21 -->
3
3
 
4
4
  # ddd-ts-kit
5
5
 
@@ -651,7 +651,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
651
651
  | `scripts/openapi.ts`, `scripts/events.ts` | écrivent `openapi/openapi.yaml` (un fichier par document de `openapi.documents`), `docs/integration/asyncapi.yaml` et `docs/integration/event-catalog.md`, en JSON sous `openapi.format: json` ; `--check` échoue sur une différence |
652
652
  | `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | avec `--privacy on`, les deux demandes d'une personne concernée, traitées en ligne de commande sur les sources avec les variables de `.env` (`npm run privacy:erase -- <subject-id> [--operator <qui-demande>] [--rerun]`, `npm run privacy:export -- <subject-id> > export.json`) : l'effacement détruit d'abord la clé de la personne quand le projet a un event store (`--event-sourcing on` : ses événements stockés se lisent effacés ; audité avec `--audit on`), puis efface chaque copie listée dans `src/platform/privacy/data-subject-copies.ts`, chacune laissant son entrée avec `--audit on`, et ce que l'outbox et le stockage des *jobs* gardent de la personne ; un id qui n'a rien atteint est refusé, code de sortie 1, et annoncé à personne, sauf si `--rerun` dit que cette personne a déjà été effacée ; `privacy:purge` lance à la main ce que le *job* `privacy.purge-expired` lance chaque nuit à 03:00 UTC, la purge de ce qui a dépassé sa durée de conservation (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` coupe le *job*) ; l'export rassemble chaque enregistrement listé dans `data-subject-exports.ts` en un document JSON daté (`format`, `subject`, `exportedAt`, `records`), l'export de chaque contexte audité avec `--audit on`, jamais les valeurs (chaque exécution laisse son entrée, un essai compris : essayez-le sur une personne de test). Avec `--tenancy shared-table`, `TENANTS` nomme les tenants, séparés par des virgules : une écriture de données de tenant n'est jamais élargie. Ni l'un ni l'autre n'atteint les sauvegardes, les journaux, une copie qu'aucun contexte n'a déclarée, un message déjà livré ou un *job* qui ne nomme aucun `subject` |
653
653
  | `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | la base de données avec un contrôle de santé et un volume nommé, `jaegertracing/jaeger:2.22.0` derrière le profil `observability`, chaque port publié sur 127.0.0.1 seulement (une adresse plus large s'écrit dans l'entrée à dessein, le README du projet dit comment), les ports depuis `.env` ; une image multi-étapes, sans root, avec les seules dépendances de production |
654
- | `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (l'application entière sur un port libre, sur une base de données dans le processus sauf si `DATABASE_URL` est définie, aucun *job* lancé par le temps ; `settled()` se résout quand l'outbox a relayé ce que les requêtes HTTP ont enregistré ; `publish(events)` remet des événements d'intégration de l'amont à ses gestionnaires, comme le ferait le relais de cet amont), `create-credentials.ts`, `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)` : une trace sans les appels qu'un adaptateur fait sur lui-même, la forme que vérifie `expectSpanTree`) |
654
+ | `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (l'application entière sur un port libre, sur une base de données dans le processus sauf si `DATABASE_URL` est définie, aucun *job* lancé par le temps ; `settled()` se résout quand l'outbox a relayé ce que les requêtes HTTP ont enregistré ; `publish(events)` remet des événements d'intégration de l'amont à ses gestionnaires, comme le ferait le relais de cet amont), `create-credentials.ts` (au nom de qui un test appelle, `application.as({ id, roles })` ; en RBAC et en ABAC les rôles sont ceux de `Role` dans `src/platform/auth/authorization/role.ts`, si bien que `roles: [Role.Admin]` est complété par l'éditeur et qu'un rôle mal orthographié ne compile pas), `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)` : une trace sans les appels qu'un adaptateur fait sur lui-même, la forme que vérifie `expectSpanTree`) |
655
655
  | `docs/context-map.md`, `docs/integration/README.md` | voir `docs` |
656
656
  | `test/architecture/extractable.spec.ts` | écrit avec le premier contexte : démarre chaque contexte seul sur le kernel et la plateforme, ses *jobs* compris |
657
657
  | `eslint.config.mjs` | le preset `dddTsKit` de `@ddd-ts-kit/eslint-plugin`, lint typé sur le tsconfig du projet |
@@ -822,9 +822,9 @@ Next, in this order: the language of the context first, then the business decisi
822
822
  | Genre | Arguments | Écrit |
823
823
  |---|---|---|
824
824
  | `context` | `<name> --classification <c> [--purpose "<two sentences>"] [--term ...]... [--upstream <ctx>[:relationship]]... [--preset identity] [--reason "<why>"]` | `CONTEXT.md` avec son glossaire, `published-language/index.ts`, l'entrée de configuration, l'enregistrement dans `platform/composition/compose-application.ts` et dans `test/architecture/extractable.spec.ts` ; sur tsyringe, avec HTTP, `presentation/http/<name>.routes.ts` (une fonction des deux bus, dans les deux styles) ; déclaré : le barrel `<name>.declarations.ts` ; explicite et câblage manuel : `<name>.module.ts`. `<name>.permissions.ts`, à la racine du contexte, naît avec la première permission, ou tout de suite quand `platform/auth/authorization/permissions.ts` liste les ensembles de permissions (rebac, custom). Avec `--preset`, le contexte est ensuite écrit en entier depuis ce *preset*, sa classification et son objet étant ceux du *preset* sauf si les options disent autre chose ([Presets](#presets)) |
825
- | `module` | `<context> <module> [--purpose "<what it holds>"] [--classification <c>] [--term ...]...` | un module du modèle d'un contexte (Evans, Modules) : déclaré dans `contexts.<name>.modules` de la configuration, sa ligne dans le tableau `## Modules` de `CONTEXT.md`, ses termes ajoutés au glossaire et, en style explicite, son fichier de module `<module>/<module>.module.ts` composé par `<context>.module.ts` ; relancée, la commande ajoute ce qui manque. Les autres genres y écrivent avec `--module <module>`, `move-to-module` y déplace des fichiers |
825
+ | `module` | `<context> <module> [--purpose "<what it holds>"] [--classification <c>] [--term ...]...` | un module du modèle d'un contexte (Evans, Modules) : déclaré dans `contexts.<name>.modules` de la configuration, sa ligne dans le tableau `## Modules` de `CONTEXT.md`, ses termes ajoutés au glossaire et, en style explicite, son fichier de module `<module>/<module>.module.ts` composé par `<context>.module.ts` ; relancée, la commande ajoute ce qui manque. Les autres genres y écrivent avec `--module <module>`, `move-to-module` y déplace des fichiers. Les autres générateurs y écrivent une *spec*, un *fake* et un *builder* dans `<module>/test/`, et écrivent dans `shared/` ce qui n'appartient à aucun module (le schéma, les groupes de routes, les gardes, les formes partagées, les mondes) ; `context-layout` dispose un contexte qui tenait ses tests à son propre niveau |
826
826
  | `aggregate` | `<context> <Name> [--birth "<Fact>"] [--event-sourced] [--module <module>]` | agrégat, *builder*, *spec* sur le modèle étant donné / quand / alors. `--birth` nomme le fait avec lequel il naît, dans les mots du métier (`"Invoice Issued"`, `InvoiceIssued` ou `Issued`), jugé par le glossaire et refusé s'il ne se lit pas comme quelque chose qui est arrivé : il écrit cet événement du domaine comme le fait `generate domain-event`, `create` l'enregistre à l'instant qu'on lui donne, le *builder* prend cet instant nommé d'après le fait (`issuedAt(instant)`) et la *spec* prouve la naissance ; sans lui, l'état ne garde aucun instant à lui (les colonnes d'audit de la ligne datent sa création) et un `TODO(domain)` dans `create` dit comment enregistrer la naissance plus tard sans réécrire l'agrégat (`generate domain-event`, la ligne `record`, puis `generate builder`) ; avec `--event-sourced`, un agrégat sur `EventSourcedAggregate` dont l'état est le rejeu de ses événements, né avec son événement du domaine `Created` (ou le fait que nomme `--birth`), son état gardant l'instant de ce fait (`createdAt`), le codec de ses événements stockés dans `infrastructure/persistence/<name>-events.mapper.ts`, un *builder* qui rejoue un historique et une *spec* à partir d'événements donnés, et une note qui nomme le `EventSourcedRepository` auquel délègue son adaptateur de *repository* ; refusé tant que `stack.eventSourcing` est `off`, avec le `init --force --event-sourcing on` à lancer |
827
- | `builder` | `<context> <Aggregate>` | `test/builders/<name>.builder.ts`, une classe qui étend `Builder` ; l'instant de la naissance qu'enregistre `create` est un ingrédient nommé d'après son fait, le *builder* d'un agrégat *event-sourced* rejoue son événement de naissance, et une note nomme les paramètres de `create` qu'il ne peut deviner ; quand `create` manque ou enregistre un événement qui ne s'appelle pas `<Aggregate><Fact>`, aucun *builder* n'est écrit et une note dit pourquoi |
827
+ | `builder` | `<context> <Aggregate> [--module <module>]` | `test/builders/<name>.builder.ts`, une classe qui étend `Builder` ; l'instant de la naissance qu'enregistre `create` est un ingrédient nommé d'après son fait, le *builder* d'un agrégat *event-sourced* rejoue son événement de naissance, et une note nomme les paramètres de `create` qu'il ne peut deviner ; quand `create` manque ou enregistre un événement qui ne s'appelle pas `<Aggregate><Fact>`, aucun *builder* n'est écrit et une note dit pourquoi |
828
828
  | `test-world` | `<context> [Name]` | `test/worlds/<name>.world.ts` (le nom est par défaut celui du contexte) : `a<Name>World({ now, idPrefix, given })`, la mise en place que partagent plusieurs *specs* du contexte. Il lit les *fakes* de `test/fakes/` et le port que chacun implémente, les construit, les passe à `given` pour que la *spec* enregistre ce dont elle part, puis à l'application de test (avec `modules`, l'autorisation de la *spec*) ou, câblé à la main, enveloppe les *repositories* des bus de `createTestBuses` par `dispatching` ; il rend chaque *fake* sous le nom de son port. Un *fake* qui attend des arguments de constructeur, ou, avec un conteneur, celui d'un port que rien ne lie ni n'utilise encore, est laissé de côté avec une note. Avec un conteneur, il prend aussi `fakes`, le *fake* d'un port qu'il ne sait pas construire (un lecteur qui répond ce que la *spec* lui donne), et, avec la multi-location, `tenants`. Le monde nommé d'après le contexte est celui par lequel passent les *specs* de `command`, `query` et `job` générées après lui |
829
829
  | `entity` | `<context> <Name> [--module <module>]` | entité, *spec* |
830
830
  | `value-object` (`vo`) | `<context> <Name> [--module <module>]` | objet-valeur, *spec* |
@@ -1931,7 +1931,9 @@ exacte, avec le *trailer* qui nomme la ligne :
1931
1931
 
1932
1932
  `--resume` lit où en est le *worker* arrêté du contexte, depuis le tronc, et ne crée ni ne réécrit
1933
1933
  rien : ses lignes (commitées d'après leur *trailer* `Slice:`, ou dans l'ordre des *commits*
1934
- `feat(<contexte>)` pour un *commit* plus ancien, affichées `(by order)`), les fichiers de la ligne
1934
+ `feat(<contexte>)` pour un *commit* plus ancien, affichées `(by order)` ; sur une branche gardée
1935
+ pour ses lignes suivantes, les *commits* faits avant qu'elle n'apporte la base enregistrée par
1936
+ `worker-scope` sont ceux des lignes déjà arrivées et ne sont pas lus), les fichiers de la ligne
1935
1937
  en cours, les marqueurs laissés dans le contexte, sa dernière vérification et ce qui a changé
1936
1938
  depuis, si son rapport est à jour, et son agent. Puis l'étape suivante : `SendMessage` à cet agent,
1937
1939
  avec le message à envoyer tel quel, quand il s'est arrêté au milieu d'une ligne après un progrès,
@@ -2107,7 +2109,10 @@ débarrassée de ses espaces de bord et de ses espaces répétés, les lignes de
2107
2109
  les marqueurs de conflit qu'un côté a commités écartés, et chaque import de liaisons nommées éclaté en une entrée par liaison : le résultat doit
2108
2110
  la contenir autant de fois que la base, plus ce que chaque côté a ajouté, moins ce que chaque côté
2109
2111
  a retiré. Les fichiers sont comptés ensemble : une ligne déplacée dans un autre fichier n'est pas
2110
- perdue, une ligne remise en forme sur plusieurs lignes non plus. Les fichiers dérivés, les
2112
+ perdue, une ligne remise en forme sur plusieurs lignes non plus. Une ligne n'est pas attendue
2113
+ plus de fois que ses fichiers ne l'attendent un par un : la même ligne retirée par chaque côté
2114
+ d'un fichier différent (un marqueur généré rempli dans un fichier par la branche, dans un autre
2115
+ par le tronc) n'est pas une perte. Les titres des tests sont comptés de la même façon. Les fichiers dérivés, les
2111
2116
  fichiers dont les premières lignes disent qu'un outil les a écrits (`@generated`,
2112
2117
  `autogenerated`, `DO NOT EDIT`), les migrations, les fichiers de verrouillage (npm, pnpm, yarn,
2113
2118
  bun, uv, poetry, Pipfile, Cargo, Bundler, Composer, Go, NuGet) et `docs/architecture/slices.md`
@@ -2117,6 +2122,7 @@ sont tenus hors des lignes.
2117
2122
  |---|---|
2118
2123
  | une ligne ajoutée par un côté, ou gardée par les deux, absente du résultat | erreur |
2119
2124
  | un fichier qu'aucun côté n'a supprimé, absent du résultat avec des lignes qu'aucun autre fichier n'a (un constat par fichier) | erreur |
2125
+ | un fichier ajouté par un côté depuis la séparation des deux côtés (`git merge-base`), absent du résultat alors qu'aucun *commit* de l'autre côté n'a touché son chemin ; pas signalé quand le résultat le porte sous un autre chemin | erreur |
2120
2126
  | une ligne de `slices.md` terminée d'un côté et non terminée dans le résultat, ou une ligne d'un côté disparue | erreur |
2121
2127
  | le titre d'un `it(` ou d'un `test(` d'un côté disparu, un fichier de *spec* d'un côté supprimé | erreur |
2122
2128
  | une migration d'un côté dont aucune migration du résultat n'a la description (son nom sans numéro ni `working-`) | erreur |
@@ -2129,7 +2135,12 @@ Une ligne insérée entre des lignes de la base que l'autre côté n'a pas touch
2129
2135
  même quand l'autre côté a inséré au même endroit : perdre l'une de deux nouvelles méthodes est la
2130
2136
  perte que le contrôle cherche. De même pour une réécriture qui a perdu plus de lignes que les
2131
2137
  lignes de la base ou que la réécriture de l'autre côté qu'elle concurrençait (une modification
2132
- suivie d'une nouvelle méthode). Ce qu'un côté a supprimé, ou rouvert, n'est jamais signalé. Une ligne de la branche dans un fichier
2138
+ suivie d'une nouvelle méthode). Ce qu'un côté a supprimé, ou rouvert, n'est jamais signalé. Pour
2139
+ le côté apporté, une ligne de `slices.md` est lue aussi là où les côtés se sont séparés : une base
2140
+ trouvée sur la branche après un *squash* peut porter une ligne, ou un `done`, que le tronc n'a
2141
+ jamais pris, et une ligne que le tronc n'a jamais portée n'est pas une ligne qu'il a supprimée ou
2142
+ rouverte. Le fichier ajouté ci-dessus est lu de là aussi : une base nommée trop récente
2143
+ (`--since`, `--base`, un *trailer* `Merge-Base:`) ne le cache pas. Une ligne de la branche dans un fichier
2133
2144
  que la branche n'a pas touché depuis sa bifurcation de la branche principale (le fichier est le même sur
2134
2145
  la branche et à `git merge-base`) ne l'est pas non plus : ce que la branche principale y a supprimé ou
2135
2146
  remplacé depuis est son propre changement, quelle que soit la base du calcul de la fusion. Une
@@ -2163,13 +2174,17 @@ ddd-ts-kit merge-trunk --continue [--accept-lost] | --abort
2163
2174
 
2164
2175
  Apporte le tronc dans la branche en un seul *commit* de fusion calculé à partir du *diff* propre
2165
2176
  de la branche. Ne rebase jamais, ne récupère jamais rien (le *commit* que nomme `--trunk` est
2166
- affiché ; par défaut `origin/HEAD`, puis `origin/main`). Refusé, sortie 2 : un arbre de travail
2177
+ affiché ; par défaut la `base` de `.ddd-ts-kit/worker.json` dans le *worktree* d'un *worker*, la
2178
+ référence d'où sa branche a été coupée, puis `origin/HEAD`, puis `origin/main` ; un *worker*
2179
+ empilé sur la branche d'un autre nomme lui-même le tronc, `--trunk origin/main`, une fois cette
2180
+ branche arrivée). Refusé, sortie 2 : un arbre de travail
2167
2181
  qui n'est pas propre (hors `.ddd-ts-kit/`), une fusion, un *rebase*, un *cherry-pick* ou un
2168
2182
  *revert* en cours, un dépôt où git ne connaît aucun auteur de *commit* (la fusion se termine
2169
2183
  par un *commit*), un tronc inconnu.
2170
2184
 
2171
2185
  1. **La base** : le *commit* le plus récent de la branche que le tronc porte déjà. `--since
2172
- <commit>` (un *commit* de la branche) ; sinon le point d'arrivée : le *commit* le plus récent
2186
+ <commit>` (un *commit* de la branche, refusé quand c'est sa tête : le résultat serait le tronc
2187
+ seul) ; sinon le point d'arrivée : le *commit* le plus récent
2173
2188
  dont le changement entier depuis le tronc est un *commit* du tronc, comparé par *patch id*
2174
2189
  stable sans lignes de contexte, sans les fichiers dérivés, les migrations, `slices.md`,
2175
2190
  `plan.md` ni les fichiers de verrouillage, cherché sur cette branche, sur la branche que
@@ -2177,11 +2192,14 @@ par un *commit*), un tronc inconnu.
2177
2192
  des *commits* avec elle (une branche empilée dont le parent a été fusionné en *squash*, une
2178
2193
  branche réutilisée après l'arrivée de sa première ligne) ; parmi des *commits* qui partagent un
2179
2194
  même *patch*, le plus ancien est pris, un plus récent seulement quand le tronc porte ce qu'il a
2180
- changé ; sinon le `baseCommit` enregistré par worker-scope, quand c'est un *commit* de la
2195
+ changé (à travers une fusion du tronc faite par la branche, ce que cette fusion a changé en
2196
+ propre : les fichiers qu'elle a apportés sont ceux du tronc) ; sinon le `baseCommit` enregistré par worker-scope, quand c'est un *commit* de la
2181
2197
  branche et que ses propres lignes sont toutes sur le tronc (sinon il s'arrête, rien de changé,
2182
2198
  et les liste pour qu'une personne confirme par `--since`) ; sinon `git merge-base`, et le
2183
2199
  rapport nomme chaque branche qui partage des *commits* sans être trouvée sur le tronc, avec son
2184
- `--since`. Trop ancienne, la base se voit en conflits de plus, jamais en perte silencieuse.
2200
+ `--since`. Trop ancienne, la base se voit en conflits de plus, jamais en perte silencieuse ;
2201
+ trop récente, ce que seul `--since` peut nommer, elle fait perdre ce que la branche a ajouté
2202
+ avant elle, et `verify-merge` s'arrête sur chaque fichier disparu ainsi.
2185
2203
  2. **L'aperçu** : `git merge-tree --write-tree --merge-base=<base> HEAD <trunk>`, marqueurs diff3 ;
2186
2204
  le même sans la base donne ce sur quoi un simple `git merge` entrerait en conflit. `--dry-run`
2187
2205
  s'arrête ici et ne change rien.
@@ -2198,7 +2216,7 @@ par un *commit*), un tronc inconnu.
2198
2216
  | dérivé | `openapi/`, `clients/`, `docs/integration/`, `docs/behaviour/`, `.dependency-cruiser.cjs`, les *barrels* et listes de chaque contexte | côté du tronc, réécrit par `regenerate` |
2199
2217
  | document mixte | `CONTEXT.md`, `docs/context-map.md` | un conflit dans une région `<!-- ddd-ts-kit:<region> -->` : côté du tronc ; hors région : pour vous |
2200
2218
  | registre | un conflit entre des marqueurs `// ddd-ts-kit:<region>` de n'importe quel fichier | la base sans ce que l'un ou l'autre côté a retiré, plus ce que chacun a ajouté, le nôtre d'abord, une fois chacun ; dans `imports`, les noms importés d'un même module joints en une instruction |
2201
- | tranches | `docs/architecture/slices.md` | ligne par ligne par `#` : le statut le plus avancé (done, in progress, todo), chaque autre cellule du côté qui l'a changée ; une cellule changée autrement par les deux : pour vous |
2219
+ | tranches | `docs/architecture/slices.md` | ligne par ligne par `#` : le statut le plus avancé (done, in progress, todo), chaque autre cellule du côté qui l'a changée ; une cellule changée autrement par les deux : pour vous. Quand la base n'est pas l'endroit où la branche a quitté le tronc et porte un autre `slices.md`, les lignes sont fusionnées à partir de cette séparation, en conflit ou non : la base peut porter une ligne que le tronc n'a jamais prise |
2202
2220
  | méta de drizzle | `<out>/meta/_journal.json`, *snapshots* | côté du tronc, puis le *replay* |
2203
2221
  | verrouillage | `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock` | côté du tronc ; `<manager> install` quand la branche a changé `package.json` depuis la base |
2204
2222
  | événements stockés | `stored-events.lock.json` | chaque version des deux côtés ; une enregistrée sous deux formes : pour vous |
@@ -2715,7 +2733,7 @@ restreint les règles ; la *baseline* du projet s'applique comme pour un fichier
2715
2733
  ## lint
2716
2734
 
2717
2735
  ```
2718
- ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix] [--no-cache]
2736
+ ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix] [--no-cache] [--ignore-pattern <pattern>]...
2719
2737
  ```
2720
2738
 
2721
2739
  Ce que lancent `lint` et `ci:lint` d'un projet généré : l'ESLint du projet, par son API, sur les
package/README.md CHANGED
@@ -621,7 +621,7 @@ config, `docsUi`, `ci` and `logger` included.
621
621
  | `scripts/openapi.ts`, `scripts/events.ts` | write `openapi/openapi.yaml` (one file per document of `openapi.documents`), `docs/integration/asyncapi.yaml` and `docs/integration/event-catalog.md`, in JSON under `openapi.format: json`; `--check` fails on a difference |
622
622
  | `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | with `--privacy on`, the two requests of a data subject, answered from the command line on the sources with the variables of `.env` (`npm run privacy:erase -- <subject-id> [--operator <who-asks>] [--rerun]`, `npm run privacy:export -- <subject-id> > export.json`): the erasure destroys the key of the subject first when the project has an event store (`--event-sourcing on`: its stored events read as erased; audited with `--audit on`), then erases every copy listed in `src/platform/privacy/data-subject-copies.ts`, each leaving its entry with `--audit on`, and what the outbox and the job store keep of the person; an id that reached nothing is refused, exit code 1, and announced to nobody, unless `--rerun` says this person was erased before; `privacy:purge` runs by hand what the job `privacy.purge-expired` runs every night at 03:00 UTC, the purge of what outlived its retention (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` switches the job off); the export gathers every record listed in `data-subject-exports.ts` into one dated JSON document (`format`, `subject`, `exportedAt`, `records`), the export of each context audited with `--audit on`, never the values (every run leaves its entry, a trial included: try it on a test subject). With `--tenancy shared-table`, `TENANTS` names the tenants, comma separated: a write of tenant data is never widened. Neither reaches backups, logs, a copy no context declared, a message already delivered or a job that names no `subject` |
623
623
  | `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | the database with a healthcheck and a named volume, `jaegertracing/jaeger:2.22.0` behind the `observability` profile, every port published on 127.0.0.1 only (a wider address is written in the entry on purpose, the README of the project says how), ports from `.env`; a multi-stage, non-root image with production dependencies only |
624
- | `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (the whole application on a free port, on an in-process database unless `DATABASE_URL` is set, no job run by time; `settled()` resolves once the outbox has relayed what the requests stored; `publish(events)` hands integration events of an upstream to its handlers, as the relay of that upstream would), `create-credentials.ts`, `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)`: a trace without the calls an adapter makes on itself, the form `expectSpanTree` asserts) |
624
+ | `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (the whole application on a free port, on an in-process database unless `DATABASE_URL` is set, no job run by time; `settled()` resolves once the outbox has relayed what the requests stored; `publish(events)` hands integration events of an upstream to its handlers, as the relay of that upstream would), `create-credentials.ts` (who a test calls as, `application.as({ id, roles })`; under RBAC and ABAC the roles are those of `Role` in `src/platform/auth/authorization/role.ts`, so `roles: [Role.Admin]` is completed by the editor and a misspelled role does not compile), `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)`: a trace without the calls an adapter makes on itself, the form `expectSpanTree` asserts) |
625
625
  | `docs/context-map.md`, `docs/integration/README.md` | see `docs` |
626
626
  | `test/architecture/extractable.spec.ts` | written with the first context: boots each context alone on the kernel and the platform, its jobs included |
627
627
  | `eslint.config.mjs` | the `dddTsKit` preset of `@ddd-ts-kit/eslint-plugin`, typed linting on the project's tsconfig |
@@ -785,9 +785,9 @@ Next, in this order: the language of the context first, then the business decisi
785
785
  | Kind | Arguments | Writes |
786
786
  |---|---|---|
787
787
  | `context` | `<name> --classification <c> [--purpose "<two sentences>"] [--term ...]... [--upstream <ctx>[:relationship]]... [--preset identity] [--reason "<why>"]` | `CONTEXT.md` with its glossary, `published-language/index.ts`, config entry, registration in `platform/composition/compose-application.ts` and in `test/architecture/extractable.spec.ts`; on tsyringe, with HTTP, `presentation/http/<name>.routes.ts` (a function of the two buses, in both styles); declared: the barrel `<name>.declarations.ts`; explicit and hand wiring: `<name>.module.ts`. `<name>.permissions.ts`, at the root of the context, is born with the first permission, or at once when `platform/auth/authorization/permissions.ts` lists the permission sets (rebac, custom). With `--preset`, the context is then written whole from that preset, its classification and purpose those of the preset unless the flags say otherwise ([Presets](#presets)) |
788
- | `module` | `<context> <module> [--purpose "<what it holds>"] [--classification <c>] [--term ...]...` | a module of the model of a context (Evans, Modules): declared in `contexts.<name>.modules` of the config, its row in the `## Modules` table of `CONTEXT.md`, its terms added to the glossary and, in the explicit style, its module file `<module>/<module>.module.ts` composed by `<context>.module.ts`; run again, it adds what is missing. The other kinds write into it with `--module <module>`, `move-to-module` moves files into it |
788
+ | `module` | `<context> <module> [--purpose "<what it holds>"] [--classification <c>] [--term ...]...` | a module of the model of a context (Evans, Modules): declared in `contexts.<name>.modules` of the config, its row in the `## Modules` table of `CONTEXT.md`, its terms added to the glossary and, in the explicit style, its module file `<module>/<module>.module.ts` composed by `<context>.module.ts`; run again, it adds what is missing. The other kinds write into it with `--module <module>`, a spec, a fake and a builder in `<module>/test/`, and write what belongs to no module (the schema, the route groups, the guards, the shared shapes, the worlds) in `shared/`; `move-to-module` moves files into it, and `context-layout` lays out a context that held its tests at its own level |
789
789
  | `aggregate` | `<context> <Name> [--birth "<Fact>"] [--event-sourced] [--module <module>]` | aggregate, builder, spec in given / when / then. `--birth` names the fact it is born with in business words (`"Invoice Issued"`, `InvoiceIssued` or `Issued`), judged by the glossary and refused when it does not read as something that happened: it writes that domain event as `generate domain-event` does, `create` records it at the instant it is given, the builder takes that instant named after the fact (`issuedAt(instant)`) and the spec proves the birth; without it, the state holds no instant of its own (the audit columns of the row date its creation) and a `TODO(domain)` in `create` says how to record the birth later without rewriting the aggregate (`generate domain-event`, the `record` line, then `generate builder`); with `--event-sourced`, an aggregate on `EventSourcedAggregate` whose state is the replay of its events, born with its `Created` domain event (or the fact `--birth` names), its state holding the instant of that fact (`createdAt`), the codec of its stored events in `infrastructure/persistence/<name>-events.mapper.ts`, a builder that replays a history and a spec given events, and a note naming the `EventSourcedRepository` its repository adapter delegates to; refused while `stack.eventSourcing` is `off`, with the `init --force --event-sourcing on` to run |
790
- | `builder` | `<context> <Aggregate>` | `test/builders/<name>.builder.ts`, a class extending `Builder`; the instant of the birth `create` records is an ingredient named after its fact, the builder of an event-sourced aggregate replays its birth event, and a note names the parameters of `create` it cannot guess; when `create` is missing or records an event not named `<Aggregate><Fact>`, no builder is written and a note says why |
790
+ | `builder` | `<context> <Aggregate> [--module <module>]` | `test/builders/<name>.builder.ts`, a class extending `Builder`; the instant of the birth `create` records is an ingredient named after its fact, the builder of an event-sourced aggregate replays its birth event, and a note names the parameters of `create` it cannot guess; when `create` is missing or records an event not named `<Aggregate><Fact>`, no builder is written and a note says why |
791
791
  | `test-world` | `<context> [Name]` | `test/worlds/<name>.world.ts` (the name defaults to the context): `a<Name>World({ now, idPrefix, given })`, the arrangement several specs of the context share. It reads the fakes of `test/fakes/` and the port each one implements, builds them, hands them to `given` so that the spec stores what it starts from, then to the test application (with `modules`, the authorization of the spec) or, wired by hand, wraps the repositories of the buses of `createTestBuses` with `dispatching`; it returns every fake under the name of its port. A fake that needs constructor arguments, or, under a container, stands for a port nothing binds or depends on yet, is left out with a note. Under a container it also takes `fakes`, the fake of a port it cannot build (a reader that answers what the spec gives it), and, under tenancy, `tenants`. The world named after the context is the one the specs of `command`, `query` and `job` generated after it arrange through |
792
792
  | `entity` | `<context> <Name> [--module <module>]` | entity, spec |
793
793
  | `value-object` (`vo`) | `<context> <Name> [--module <module>]` | value object, spec |
@@ -1813,7 +1813,9 @@ guard of the plugin keeps the runs of the `context-builder` agent in `.ddd-ts-ki
1813
1813
 
1814
1814
  `--resume` reads where the stopped worker of the context stands, from the trunk, and creates and
1815
1815
  rewrites nothing: its rows (committed by their `Slice:` trailer, or in order with the
1816
- `feat(<context>)` commits for an older commit, shown `(by order)`), the files of the row under
1816
+ `feat(<context>)` commits for an older commit, shown `(by order)`; on a branch kept for its next
1817
+ rows, the commits made before it brought in the base `worker-scope` recorded belong to the rows
1818
+ that landed and are not read), the files of the row under
1817
1819
  way, the markers left in the context, its last verification and what changed since, whether its
1818
1820
  report is current, and its agent. Then the next step: `SendMessage` to that agent, with the
1819
1821
  message to send as it is, when it stopped mid-row after progress in a run that is not its third;
@@ -1976,7 +1978,9 @@ its whitespace collapsed, lines of punctuation only and conflict markers a side
1976
1978
  out, and each import of named bindings split into one entry per binding: the result must hold it
1977
1979
  as many times as the base, plus what either side added, minus what either removed. The files are
1978
1980
  counted together, so a line moved to another file is not lost; a line laid out again on several
1979
- lines is not either. The derived files, the files whose first lines say a tool wrote them
1981
+ lines is not either. A line is expected no more often than its files expect one by one: the same
1982
+ line each side removed from a different file (a generated marker filled in one file by the
1983
+ branch, in another by the trunk) is not a loss. The titles of the tests are counted the same way. The derived files, the files whose first lines say a tool wrote them
1980
1984
  (`@generated`, `autogenerated`, `DO NOT EDIT`), the migrations, the lockfiles (npm, pnpm, yarn,
1981
1985
  bun, uv, poetry, Pipfile, Cargo, Bundler, Composer, Go, NuGet) and `docs/architecture/slices.md`
1982
1986
  are left out of the lines.
@@ -1985,6 +1989,7 @@ are left out of the lines.
1985
1989
  |---|---|
1986
1990
  | a line one side added, or both kept, missing from the result | error |
1987
1991
  | a file neither side deleted, gone from the result with lines no other file has (one finding per file) | error |
1992
+ | a file one side added since the two sides parted (`git merge-base`), gone from the result while no commit of the other side touched its path; not reported when the result holds it under another path | error |
1988
1993
  | a row of `slices.md` done on one side and not done in the result, or a row of one side gone | error |
1989
1994
  | the title of an `it(` or a `test(` of one side gone, a spec file of one side deleted | error |
1990
1995
  | a migration of one side whose description (its name without number and `working-`) no migration of the result has | error |
@@ -1997,7 +2002,11 @@ A line inserted between base lines the other side left alone stays an error even
1997
2002
  side inserted at the same place: dropping one of two new methods is the loss the check exists
1998
2003
  for. So does a rewrite that lost more lines than the base lines or the other side's rewrite it
1999
2004
  competed with (an edit with a new method under it). What one side deleted, or reopened, is never
2000
- reported. Nor is a line of the branch in a file the branch did not touch since its fork from the trunk
2005
+ reported. For the side brought in, a row of `slices.md` is read where the sides parted too: a base
2006
+ found on the branch after a squash may hold a row, or a `done`, the trunk never took, and a row
2007
+ the trunk never held is not a row the trunk deleted or reopened. The added file above is read
2008
+ from there as well, so a base named too new (`--since`, `--base`, a `Merge-Base:` trailer) does
2009
+ not hide it. Nor is a line of the branch in a file the branch did not touch since its fork from the trunk
2001
2010
  (the file is the same on the branch and at `git merge-base`): what the trunk removed or replaced
2002
2011
  there since is the trunk's change, whatever base the merge is computed from. A removal decided on purpose is recorded in the merge commit as a trailer
2003
2012
  `Lost-Accepted: <file:line>,...` (a file alone accepts all of its lines): those findings are
@@ -2025,23 +2034,27 @@ ddd-ts-kit merge-trunk --continue [--accept-lost] | --abort
2025
2034
  ```
2026
2035
 
2027
2036
  Brings the trunk into the branch as one merge commit computed from the branch's own diff. Never
2028
- rebases, never fetches (the commit `--trunk` names is printed; by default `origin/HEAD`, then
2029
- `origin/main`). Refused, exit 2: a working tree that is not clean (`.ddd-ts-kit/` aside), a merge,
2037
+ rebases, never fetches (the commit `--trunk` names is printed; by default the `base` of
2038
+ `.ddd-ts-kit/worker.json` in the worktree of a worker, the ref its branch was cut from, then
2039
+ `origin/HEAD`, then `origin/main`; a worker stacked on the branch of another names the trunk
2040
+ itself, `--trunk origin/main`, once that branch landed). Refused, exit 2: a working tree that is not clean (`.ddd-ts-kit/` aside), a merge,
2030
2041
  rebase, cherry-pick or revert in progress, a repository where git knows no committer (the merge
2031
2042
  ends with a commit), an unknown trunk.
2032
2043
 
2033
2044
  1. **The base**: the newest commit of the branch the trunk already holds. `--since <commit>` (a
2034
- commit of the branch); else the landed point: the newest commit whose whole change since the
2045
+ commit of the branch, refused when it is its head: the result would be the trunk alone); else the landed point: the newest commit whose whole change since the
2035
2046
  trunk is one commit of the trunk, compared by stable patch id without context lines, the
2036
2047
  derived files, migrations, `slices.md`, `plan.md` and lockfiles left out, looked for on this
2037
2048
  branch, on the branch `.ddd-ts-kit/worker.json` records as its base, and on the local branches
2038
2049
  sharing commits with it (a stacked branch whose parent was squash-merged, a branch reused after
2039
2050
  its first row landed); of commits sharing one patch the oldest is taken, a newer one only when
2040
- the trunk holds what it changed; else the `baseCommit` worker-scope recorded, when it is a
2051
+ the trunk holds what it changed (across a merge of the trunk the branch made, what that merge
2052
+ changed of its own: the files it brought are the trunk's); else the `baseCommit` worker-scope recorded, when it is a
2041
2053
  commit of the branch and its own lines are all on the trunk (otherwise it stops, nothing
2042
2054
  changed, and lists them for a person to confirm with `--since`); else `git merge-base`, and
2043
2055
  the report names each branch sharing commits not found on the trunk, with its `--since`. Too
2044
- old shows as more conflicts, never as a silent loss.
2056
+ old shows as more conflicts, never as a silent loss; too new, which only `--since` can name,
2057
+ drops what the branch added before it, and `verify-merge` stops on each file gone that way.
2045
2058
  2. **The preview**: `git merge-tree --write-tree --merge-base=<base> HEAD <trunk>`, diff3 markers;
2046
2059
  the same without the base gives what a plain `git merge` would conflict on. `--dry-run` stops
2047
2060
  here and changes nothing.
@@ -2057,7 +2070,7 @@ ends with a commit), an unknown trunk.
2057
2070
  | derived | `openapi/`, `clients/`, `docs/integration/`, `docs/behaviour/`, `.dependency-cruiser.cjs`, the barrels and lists of each context | trunk side, rewritten by `regenerate` |
2058
2071
  | mixed document | `CONTEXT.md`, `docs/context-map.md` | a conflict inside a `<!-- ddd-ts-kit:<region> -->` region: trunk side; outside: for you |
2059
2072
  | registry | a conflict inside `// ddd-ts-kit:<region>` markers of any file | the base without what either side removed, plus what each added, ours first, once each; names imported from one module joined in one statement in `imports` |
2060
- | slices | `docs/architecture/slices.md` | row by row by `#`: the furthest status (done, in progress, todo), each other cell from the side that changed it; a cell both changed differently: for you |
2073
+ | slices | `docs/architecture/slices.md` | row by row by `#`: the furthest status (done, in progress, todo), each other cell from the side that changed it; a cell both changed differently: for you. When the base is not where the branch left the trunk and holds another `slices.md`, the rows are merged from that fork, conflicted or not: the base may hold a row the trunk never took |
2061
2074
  | drizzle meta | `<out>/meta/_journal.json`, snapshots | trunk side, then the replay |
2062
2075
  | lockfile | `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock` | trunk side; `<manager> install` when the branch changed `package.json` since the base |
2063
2076
  | stored events | `stored-events.lock.json` | every version of both sides; one recorded with two shapes: for you |
@@ -2536,7 +2549,7 @@ applies as for a file on disk.
2536
2549
  ## lint
2537
2550
 
2538
2551
  ```
2539
- ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix] [--no-cache]
2552
+ ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix] [--no-cache] [--ignore-pattern <pattern>]...
2540
2553
  ```
2541
2554
 
2542
2555
  What `lint` and `ci:lint` of a generated project run: the ESLint of the project, through its API,
@@ -1 +1 @@
1
- {"version":3,"file":"reach-of.d.ts","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAY/D"}
1
+ {"version":3,"file":"reach-of.d.ts","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAY/D"}
@@ -1,3 +1,4 @@
1
+ import { declaredModules, foldersOfContext, TEST_FOLDER } from '../model-modules/index.js';
1
2
  import { ownEntry } from '../config/values/own-entry.js';
2
3
  /** Written for people and agents, never loaded by a spec, a build or a tool of the pipeline other than the documents gate, which always runs. */
3
4
  const DOCUMENT_DIRECTORIES = ['docs/', 'openapi/', '.claude/', '.github/instructions/', '.github/copilot/'];
@@ -22,7 +23,9 @@ function contextReach(config, inside) {
22
23
  if (rest.length === 0 || ownEntry(config.contexts, context) === undefined) {
23
24
  return { kind: 'everything', reason: `${config.contextsDir}/${inside} belongs to no declared context` };
24
25
  }
25
- return { kind: 'context', context, testsOnly: rest[0] === 'test' };
26
+ // The tests of the context, of a module of its model or of its shared folder.
27
+ const held = foldersOfContext(declaredModules(config, context)).includes(rest[0] ?? '') ? rest[1] : rest[0];
28
+ return { kind: 'context', context, testsOnly: held === TEST_FOLDER };
26
29
  }
27
30
  function isDocument(file) {
28
31
  const atRoot = !file.includes('/');
@@ -1 +1 @@
1
- {"version":3,"file":"reach-of.js","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,iJAAiJ;AACjJ,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;AAE5G;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,MAAc,EAAE,IAAY;IAClD,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC;IAE1C,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,6BAA6B,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,MAAc;IAClD,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QAC1E,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,iCAAiC,EAAE,CAAC;IAC1G,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEnC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAClH,CAAC"}
1
+ {"version":3,"file":"reach-of.js","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,iJAAiJ;AACjJ,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;AAE5G;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,MAAc,EAAE,IAAY;IAClD,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC;IAE1C,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,6BAA6B,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,MAAc;IAClD,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QAC1E,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,iCAAiC,EAAE,CAAC;IAC1G,CAAC;IAED,8EAA8E;IAC9E,MAAM,IAAI,GAAG,gBAAgB,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE5G,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,KAAK,WAAW,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEnC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAClH,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** True when a source may sit directly in a directory given relative to `shared/` of a context divided into modules. */
2
+ export declare function holdsSharedFiles(directory: string): boolean;
3
+ //# sourceMappingURL=holds-shared-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holds-shared-files.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/holds-shared-files.ts"],"names":[],"mappings":"AAGA,wHAAwH;AACxH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D"}
@@ -0,0 +1,7 @@
1
+ import { OPEN_DIRECTORIES } from './open-directories.js';
2
+ import { SHARED_DIRECTORIES } from './shared-directories.js';
3
+ /** True when a source may sit directly in a directory given relative to `shared/` of a context divided into modules. */
4
+ export function holdsSharedFiles(directory) {
5
+ return SHARED_DIRECTORIES.includes(directory) || OPEN_DIRECTORIES.some((open) => directory.startsWith(`${open}/`));
6
+ }
7
+ //# sourceMappingURL=holds-shared-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holds-shared-files.js","sourceRoot":"","sources":["../../../src/check/canonical/holds-shared-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,wHAAwH;AACxH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;AACrH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * True when a directory, given relative to `shared/` of a context divided into modules, is one of
3
+ * its closed tree: `shared/` itself, a directory that holds its files, an ancestor of one
4
+ * (`infrastructure`, `test`) or anything below an open one.
5
+ */
6
+ export declare function isSharedDirectory(directory: string): boolean;
7
+ //# sourceMappingURL=is-shared-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-shared-directory.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/is-shared-directory.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAM5D"}
@@ -0,0 +1,13 @@
1
+ import { holdsSharedFiles } from './holds-shared-files.js';
2
+ import { SHARED_DIRECTORIES } from './shared-directories.js';
3
+ /**
4
+ * True when a directory, given relative to `shared/` of a context divided into modules, is one of
5
+ * its closed tree: `shared/` itself, a directory that holds its files, an ancestor of one
6
+ * (`infrastructure`, `test`) or anything below an open one.
7
+ */
8
+ export function isSharedDirectory(directory) {
9
+ return (directory === '' ||
10
+ holdsSharedFiles(directory) ||
11
+ SHARED_DIRECTORIES.some((holding) => holding.startsWith(`${directory}/`)));
12
+ }
13
+ //# sourceMappingURL=is-shared-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-shared-directory.js","sourceRoot":"","sources":["../../../src/check/canonical/is-shared-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,OAAO,CACL,SAAS,KAAK,EAAE;QAChB,gBAAgB,CAAC,SAAS,CAAC;QAC3B,kBAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAC1E,CAAC;AACJ,CAAC"}