ddd-ts-kit 0.22.0 → 0.23.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 (251) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/README.fr.md +15 -3
  3. package/README.md +13 -2
  4. package/dist/check/commands/changed-files.d.ts +6 -1
  5. package/dist/check/commands/changed-files.d.ts.map +1 -1
  6. package/dist/check/commands/changed-files.js +15 -11
  7. package/dist/check/commands/changed-files.js.map +1 -1
  8. package/dist/check/events/domain-event-names.d.ts +1 -1
  9. package/dist/check/events/domain-event-names.d.ts.map +1 -1
  10. package/dist/check/events/domain-event-names.js +2 -2
  11. package/dist/check/events/domain-event-names.js.map +1 -1
  12. package/dist/check/explain/authz-docs.js +1 -1
  13. package/dist/check/explain/authz-docs.js.map +1 -1
  14. package/dist/check/explain/clean-docs.js +1 -1
  15. package/dist/check/explain/clean-docs.js.map +1 -1
  16. package/dist/check/explain/events-docs.d.ts.map +1 -1
  17. package/dist/check/explain/events-docs.js +2 -5
  18. package/dist/check/explain/events-docs.js.map +1 -1
  19. package/dist/check/explain/language-docs.js +1 -1
  20. package/dist/check/explain/language-docs.js.map +1 -1
  21. package/dist/check/explain/layout-docs.js +1 -1
  22. package/dist/check/explain/layout-docs.js.map +1 -1
  23. package/dist/check/explain/schema-docs.js +1 -1
  24. package/dist/check/explain/schema-docs.js.map +1 -1
  25. package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
  26. package/dist/check/fixtures/authz-policy-fixtures.js +12 -0
  27. package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
  28. package/dist/check/fixtures/clean-fixtures.d.ts.map +1 -1
  29. package/dist/check/fixtures/clean-fixtures.js +18 -1
  30. package/dist/check/fixtures/clean-fixtures.js.map +1 -1
  31. package/dist/check/fixtures/layout-fixtures.d.ts.map +1 -1
  32. package/dist/check/fixtures/layout-fixtures.js +15 -0
  33. package/dist/check/fixtures/layout-fixtures.js.map +1 -1
  34. package/dist/check/fixtures/schema-fixtures.d.ts.map +1 -1
  35. package/dist/check/fixtures/schema-fixtures.js +10 -0
  36. package/dist/check/fixtures/schema-fixtures.js.map +1 -1
  37. package/dist/check/fixtures/vocabulary-fixtures.d.ts.map +1 -1
  38. package/dist/check/fixtures/vocabulary-fixtures.js +23 -0
  39. package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
  40. package/dist/check/rules/authz-policy-asked.js +5 -4
  41. package/dist/check/rules/authz-policy-asked.js.map +1 -1
  42. package/dist/check/rules/clean-file-size.d.ts.map +1 -1
  43. package/dist/check/rules/clean-file-size.js +28 -14
  44. package/dist/check/rules/clean-file-size.js.map +1 -1
  45. package/dist/check/rules/clean-function-size.js +11 -3
  46. package/dist/check/rules/clean-function-size.js.map +1 -1
  47. package/dist/check/rules/events-name-declared-once.d.ts.map +1 -1
  48. package/dist/check/rules/events-name-declared-once.js +6 -6
  49. package/dist/check/rules/events-name-declared-once.js.map +1 -1
  50. package/dist/check/rules/language-declared-vocabulary.d.ts.map +1 -1
  51. package/dist/check/rules/language-declared-vocabulary.js +23 -3
  52. package/dist/check/rules/language-declared-vocabulary.js.map +1 -1
  53. package/dist/check/schemas/still-generated.js +1 -1
  54. package/dist/check/schemas/still-generated.js.map +1 -1
  55. package/dist/commands/doctor.d.ts +4 -0
  56. package/dist/commands/doctor.d.ts.map +1 -0
  57. package/dist/commands/doctor.js +15 -0
  58. package/dist/commands/doctor.js.map +1 -0
  59. package/dist/commands/status.d.ts +4 -1
  60. package/dist/commands/status.d.ts.map +1 -1
  61. package/dist/commands/status.js +12 -2
  62. package/dist/commands/status.js.map +1 -1
  63. package/dist/commands/todo.d.ts +1 -1
  64. package/dist/commands/todo.d.ts.map +1 -1
  65. package/dist/commands/todo.js +2 -1
  66. package/dist/commands/todo.js.map +1 -1
  67. package/dist/commands/verify-slice.d.ts +4 -0
  68. package/dist/commands/verify-slice.d.ts.map +1 -0
  69. package/dist/commands/verify-slice.js +21 -0
  70. package/dist/commands/verify-slice.js.map +1 -0
  71. package/dist/doctor/diagnose.d.ts +9 -0
  72. package/dist/doctor/diagnose.d.ts.map +1 -0
  73. package/dist/doctor/diagnose.js +34 -0
  74. package/dist/doctor/diagnose.js.map +1 -0
  75. package/dist/doctor/doctor-finding.d.ts +11 -0
  76. package/dist/doctor/doctor-finding.d.ts.map +1 -0
  77. package/dist/doctor/doctor-finding.js +2 -0
  78. package/dist/doctor/doctor-finding.js.map +1 -0
  79. package/dist/doctor/format-diagnosis.d.ts +4 -0
  80. package/dist/doctor/format-diagnosis.d.ts.map +1 -0
  81. package/dist/doctor/format-diagnosis.js +25 -0
  82. package/dist/doctor/format-diagnosis.js.map +1 -0
  83. package/dist/doctor/package-findings.d.ts +8 -0
  84. package/dist/doctor/package-findings.d.ts.map +1 -0
  85. package/dist/doctor/package-findings.js +21 -0
  86. package/dist/doctor/package-findings.js.map +1 -0
  87. package/dist/doctor/permission-findings.d.ts +5 -0
  88. package/dist/doctor/permission-findings.d.ts.map +1 -0
  89. package/dist/doctor/permission-findings.js +16 -0
  90. package/dist/doctor/permission-findings.js.map +1 -0
  91. package/dist/doctor/script-findings.d.ts +5 -0
  92. package/dist/doctor/script-findings.d.ts.map +1 -0
  93. package/dist/doctor/script-findings.js +12 -0
  94. package/dist/doctor/script-findings.js.map +1 -0
  95. package/dist/generate/kinds/assert-declares-its-name.js +1 -1
  96. package/dist/generate/kinds/assert-declares-its-name.js.map +1 -1
  97. package/dist/generate/kinds/declares-its-name.d.ts +1 -1
  98. package/dist/generate/kinds/declares-its-name.d.ts.map +1 -1
  99. package/dist/generate/kinds/declares-its-name.js +2 -2
  100. package/dist/generate/kinds/declares-its-name.js.map +1 -1
  101. package/dist/generate/shared-writes.d.ts.map +1 -1
  102. package/dist/generate/shared-writes.js +4 -1
  103. package/dist/generate/shared-writes.js.map +1 -1
  104. package/dist/help/notes.d.ts +1 -1
  105. package/dist/help/notes.d.ts.map +1 -1
  106. package/dist/help/notes.js +12 -1
  107. package/dist/help/notes.js.map +1 -1
  108. package/dist/help/usage.d.ts +1 -1
  109. package/dist/help/usage.d.ts.map +1 -1
  110. package/dist/help/usage.js +3 -1
  111. package/dist/help/usage.js.map +1 -1
  112. package/dist/init/agent-permissions.d.ts +8 -0
  113. package/dist/init/agent-permissions.d.ts.map +1 -0
  114. package/dist/init/agent-permissions.js +55 -0
  115. package/dist/init/agent-permissions.js.map +1 -0
  116. package/dist/init/manifest/versions.js +24 -24
  117. package/dist/init/write-agent-settings.d.ts.map +1 -1
  118. package/dist/init/write-agent-settings.js +1 -53
  119. package/dist/init/write-agent-settings.js.map +1 -1
  120. package/dist/progress/format-progress.js +7 -1
  121. package/dist/progress/format-progress.js.map +1 -1
  122. package/dist/progress/progress.d.ts +4 -0
  123. package/dist/progress/progress.d.ts.map +1 -1
  124. package/dist/progress/read-progress.js +4 -1
  125. package/dist/progress/read-progress.js.map +1 -1
  126. package/dist/progress/read-slice-rules.d.ts.map +1 -1
  127. package/dist/progress/read-slice-rules.js +6 -2
  128. package/dist/progress/read-slice-rules.js.map +1 -1
  129. package/dist/progress/remaining-in.d.ts.map +1 -1
  130. package/dist/progress/remaining-in.js +10 -8
  131. package/dist/progress/remaining-in.js.map +1 -1
  132. package/dist/progress/remaining.d.ts +3 -3
  133. package/dist/progress/remaining.d.ts.map +1 -1
  134. package/dist/run.d.ts.map +1 -1
  135. package/dist/run.js +4 -0
  136. package/dist/run.js.map +1 -1
  137. package/dist/slice/changed-entries.d.ts +7 -0
  138. package/dist/slice/changed-entries.d.ts.map +1 -0
  139. package/dist/slice/changed-entries.js +20 -0
  140. package/dist/slice/changed-entries.js.map +1 -0
  141. package/dist/slice/changed-entry.d.ts +6 -0
  142. package/dist/slice/changed-entry.d.ts.map +1 -0
  143. package/dist/slice/changed-entry.js +2 -0
  144. package/dist/slice/changed-entry.js.map +1 -0
  145. package/dist/slice/format-slice-verification.d.ts +4 -0
  146. package/dist/slice/format-slice-verification.d.ts.map +1 -0
  147. package/dist/slice/format-slice-verification.js +50 -0
  148. package/dist/slice/format-slice-verification.js.map +1 -0
  149. package/dist/slice/near-the-limit.d.ts +7 -0
  150. package/dist/slice/near-the-limit.d.ts.map +1 -0
  151. package/dist/slice/near-the-limit.js +24 -0
  152. package/dist/slice/near-the-limit.js.map +1 -0
  153. package/dist/slice/plan-staging.d.ts +13 -0
  154. package/dist/slice/plan-staging.d.ts.map +1 -0
  155. package/dist/slice/plan-staging.js +52 -0
  156. package/dist/slice/plan-staging.js.map +1 -0
  157. package/dist/slice/run-script.d.ts +9 -0
  158. package/dist/slice/run-script.d.ts.map +1 -0
  159. package/dist/slice/run-script.js +26 -0
  160. package/dist/slice/run-script.js.map +1 -0
  161. package/dist/slice/script-call.d.ts +9 -0
  162. package/dist/slice/script-call.d.ts.map +1 -0
  163. package/dist/slice/script-call.js +2 -0
  164. package/dist/slice/script-call.js.map +1 -0
  165. package/dist/slice/script-run.d.ts +6 -0
  166. package/dist/slice/script-run.d.ts.map +1 -0
  167. package/dist/slice/script-run.js +2 -0
  168. package/dist/slice/script-run.js.map +1 -0
  169. package/dist/slice/sized-file.d.ts +6 -0
  170. package/dist/slice/sized-file.d.ts.map +1 -0
  171. package/dist/slice/sized-file.js +2 -0
  172. package/dist/slice/sized-file.js.map +1 -0
  173. package/dist/slice/slice-to-verify.d.ts +9 -0
  174. package/dist/slice/slice-to-verify.d.ts.map +1 -0
  175. package/dist/slice/slice-to-verify.js +2 -0
  176. package/dist/slice/slice-to-verify.js.map +1 -0
  177. package/dist/slice/slice-verification.d.ts +18 -0
  178. package/dist/slice/slice-verification.d.ts.map +1 -0
  179. package/dist/slice/slice-verification.js +2 -0
  180. package/dist/slice/slice-verification.js.map +1 -0
  181. package/dist/slice/staging-plan.d.ts +6 -0
  182. package/dist/slice/staging-plan.d.ts.map +1 -0
  183. package/dist/slice/staging-plan.js +2 -0
  184. package/dist/slice/staging-plan.js.map +1 -0
  185. package/dist/slice/verify-slice.d.ts +10 -0
  186. package/dist/slice/verify-slice.d.ts.map +1 -0
  187. package/dist/slice/verify-slice.js +48 -0
  188. package/dist/slice/verify-slice.js.map +1 -0
  189. package/dist/version.d.ts +1 -1
  190. package/dist/version.js +1 -1
  191. package/dist/worker/briefing-of.d.ts.map +1 -1
  192. package/dist/worker/briefing-of.js +30 -13
  193. package/dist/worker/briefing-of.js.map +1 -1
  194. package/dist/worker/changed-files.d.ts +7 -0
  195. package/dist/worker/changed-files.d.ts.map +1 -0
  196. package/dist/worker/changed-files.js +20 -0
  197. package/dist/worker/changed-files.js.map +1 -0
  198. package/dist/worker/format-workers.d.ts +4 -0
  199. package/dist/worker/format-workers.d.ts.map +1 -0
  200. package/dist/worker/format-workers.js +47 -0
  201. package/dist/worker/format-workers.js.map +1 -0
  202. package/dist/worker/list-worktrees.d.ts +10 -0
  203. package/dist/worker/list-worktrees.d.ts.map +1 -0
  204. package/dist/worker/list-worktrees.js +18 -0
  205. package/dist/worker/list-worktrees.js.map +1 -0
  206. package/dist/worker/open-worker-scope.d.ts.map +1 -1
  207. package/dist/worker/open-worker-scope.js +6 -7
  208. package/dist/worker/open-worker-scope.js.map +1 -1
  209. package/dist/worker/overlaps-of.d.ts +4 -0
  210. package/dist/worker/overlaps-of.d.ts.map +1 -0
  211. package/dist/worker/overlaps-of.js +17 -0
  212. package/dist/worker/overlaps-of.js.map +1 -0
  213. package/dist/worker/read-worker-file.d.ts +4 -0
  214. package/dist/worker/read-worker-file.d.ts.map +1 -0
  215. package/dist/worker/read-worker-file.js +18 -0
  216. package/dist/worker/read-worker-file.js.map +1 -0
  217. package/dist/worker/read-workers.d.ts +8 -0
  218. package/dist/worker/read-workers.d.ts.map +1 -0
  219. package/dist/worker/read-workers.js +56 -0
  220. package/dist/worker/read-workers.js.map +1 -0
  221. package/dist/worker/report-file.d.ts +3 -0
  222. package/dist/worker/report-file.d.ts.map +1 -0
  223. package/dist/worker/report-file.js +3 -0
  224. package/dist/worker/report-file.js.map +1 -0
  225. package/dist/worker/worker-file.d.ts +14 -0
  226. package/dist/worker/worker-file.d.ts.map +1 -0
  227. package/dist/worker/worker-file.js +2 -0
  228. package/dist/worker/worker-file.js.map +1 -0
  229. package/dist/worker/worker-generators.d.ts +4 -1
  230. package/dist/worker/worker-generators.d.ts.map +1 -1
  231. package/dist/worker/worker-generators.js +5 -2
  232. package/dist/worker/worker-generators.js.map +1 -1
  233. package/dist/worker/workers-status.d.ts +48 -0
  234. package/dist/worker/workers-status.d.ts.map +1 -0
  235. package/dist/worker/workers-status.js +2 -0
  236. package/dist/worker/workers-status.js.map +1 -0
  237. package/package.json +2 -2
  238. package/templates/domain-event/domain-event.ts.tpl +5 -7
  239. package/templates/pipeline/package-scripts.json +1 -1
  240. package/templates/presets/identity/context/domain/events/account-deactivated.event.ts.tpl +5 -7
  241. package/templates/presets/identity/context/domain/events/account-provisioned.event.ts.tpl +5 -7
  242. package/templates/presets/identity/context/domain/events/delegation-granted.event.ts.tpl +5 -7
  243. package/templates/presets/identity/context/domain/events/delegation-revoked.event.ts.tpl +5 -7
  244. package/templates/presets/identity/context/domain/events/invitation-accepted.event.ts.tpl +5 -7
  245. package/templates/presets/identity/context/domain/events/invitation-declined.event.ts.tpl +5 -7
  246. package/templates/presets/identity/context/domain/events/invitation-issued.event.ts.tpl +5 -7
  247. package/templates/presets/identity/context/domain/events/invitation-revoked.event.ts.tpl +5 -7
  248. package/templates/presets/identity/context/domain/events/member-joined.event.ts.tpl +5 -7
  249. package/templates/presets/identity/context/domain/events/member-removed.event.ts.tpl +5 -7
  250. package/templates/presets/identity/context/domain/events/member-role-changed.event.ts.tpl +5 -7
  251. package/templates/presets/identity/context/domain/events/organisation-opened.event.ts.tpl +5 -7
package/CHANGELOG.md CHANGED
@@ -4,6 +4,90 @@ 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.23.1
8
+
9
+ **`verify-slice` proposes to stage the paths of the slice only.** In 0.23.0 it listed every path
10
+ `git status` reported in the repository as the paths to commit: a file of another context or of
11
+ the platform, an editor's folder, notes or a document left at the root of a shared checkout. The
12
+ list is now closed: the files of the context, an end-to-end spec of `test/e2e/`, a working
13
+ migration with its snapshot and the journal, and the derived files `regenerate` rewrites when git
14
+ already tracks them. Every other changed path is listed as left out, never to stage with the
15
+ slice; `--json` gives `toStage` and `leftOut`. The briefing and the `context-builder` agent say
16
+ that a path left out is never staged nor deleted. Upgrade from 0.23.0 now.
17
+
18
+ **`doctor` lists what an upgrade left to do.** `npx ddd-ts-kit doctor` compares the project with
19
+ what the installed version writes: the scripts of `package.json` (missing, or written otherwise),
20
+ the packages of the kit (missing, or at another range) and the permissions of
21
+ `.claude/settings.json` (missing). `npx ddd-ts-kit init` adds what is missing and leaves what the
22
+ project wrote. `--strict` exits 1 while something is missing. The version gap the plugin says at
23
+ session start points to it.
24
+
25
+ **`clean/function-size` does not count one parameter typed `Actor` or `Date`.** Who acts and when
26
+ are the context of an intention rather than its input: `invoice.issue(lines, customer, actor,
27
+ now)` counts three. The rule reports less, never more.
28
+
29
+ ## 0.23.0
30
+
31
+ **A domain event declares its name once, with `NamedDomainEvent`.** `export class InvoiceIssued
32
+ extends NamedDomainEvent('billing.invoice.issued') { .. }` gives the class `eventName` and each
33
+ instance `name`, both typed with the literal, in place of the two lines `static readonly eventName`
34
+ and `readonly name = X.eventName`. The generators and the identity preset write it; the rules and
35
+ generators that read an event's name recognise it. The former form stays accepted.
36
+
37
+ **`verify-slice` closes a slice in one run.** `npx ddd-ts-kit verify-slice <context> --since
38
+ <trunk>` runs the `regenerate` script, the architecture rules on the files changed since the trunk
39
+ (new files included) and the `test` script for the context, then names the changed files past 300
40
+ of the 350 lines and the paths to stage, one by one. Every step runs, so one answer says all that is
41
+ left; it exits 1 while a step fails. The briefing of `worker-scope` and the `context-builder` agent
42
+ use it in place of three commands. It needs the `regenerate` script of 0.21: run
43
+ `npx ddd-ts-kit init --force` if it is missing.
44
+
45
+ **`status --workers` shows who builds what.** For each git worktree that `worker-scope` prepared:
46
+ its branch, context, rows, base, commits ahead, the files it changed and its report; then the files
47
+ more than one worker changed, where the second merge will conflict. `worker-scope` now writes the
48
+ rows, the base and the branch in `.ddd-ts-kit/worker.json`. `parallel-work` has the conductor run
49
+ it before briefing a second worker in a context and before each merge, and says how a stacked
50
+ branch moves its own commits onto the trunk after a squash merge.
51
+
52
+ **A non-blocking review remark is a `TODO(review)` marker.** `architecture-reviewer` sorts its
53
+ findings into blocking and non-blocking, and gives each non-blocking one its `file:line` and the
54
+ marker line to write there. `todo` lists `TODO(review)`, `status` counts it per context. A slice
55
+ may merge with such markers; a story or a milestone is closed when none is left, each handled or
56
+ dismissed by a decision record.
57
+
58
+ **Slices are numbered within their story.** `plan-slices` gives each row the code of its story or
59
+ milestone and a number within it (`US5.03`, `M2.07`), never one sequence across stories, and an id
60
+ is never renumbered. `status` names a bare number. A rule line under the slices tables may omit the
61
+ `#` (`- 5.01: ..`): `worker-scope` reads it. A slice that changes a behaviour already delivered
62
+ adapts its tests in the same row. The example application numbers its rows `M1.01` to `M1.39`.
63
+
64
+ **The briefing of a worker says what blocks.** A worker marks each need of its report blocking (a
65
+ migration, a contract field, a shared file, a dependency) or a note for the merge, and the run goes
66
+ on for a note. It records a decision of its own slices with `generate adr` (without `--deviation`,
67
+ which stays the conductor's), formats with `npm run format` only, and is done when `npm run verify`
68
+ passes on the whole tree. The conductor merges the trunk into a branch before its review and
69
+ `verify`. Only the conductor prepares a worktree: the guard refuses `worker-scope` without
70
+ `--dry-run` to a sub-agent.
71
+
72
+ **`check --changed-since` judges the new files.** A file git does not track yet, as a generator
73
+ just wrote it, was left out until it was staged; it is judged now.
74
+
75
+ **`clean/file-size` judges `test/` and `scripts/`, and tells an aggregate how to shrink.**
76
+ `ddd-ts-kit check` now holds the end-to-end specs and the scripts to the 350 lines, as the ESLint
77
+ rule already did in the lint gate. For an aggregate past the limit, the fix names a domain service
78
+ that returns the new state and its events, which the aggregate applies, or a value object; never a
79
+ public setter.
80
+
81
+ **`language/declared-vocabulary` leaves the storage names alone.** In `infrastructure/persistence/`,
82
+ the name of a column, a table or a schema (the first argument of a call, `name`, `tableName`,
83
+ `schema`) is no longer taken for a value of a vocabulary; a stored value (`.default(..)`, a value
84
+ compared in a query) still is.
85
+
86
+ To move: run `npx ddd-ts-kit init --force`, which adds the `regenerate` script when it is missing
87
+ and allows `verify-slice` to agents in `.claude/settings.json`; run
88
+ `npx ddd-ts-kit check` once and split each file of `test/` or `scripts/` it reports past 350 lines
89
+ (the lint gate already refused them).
90
+
7
91
  ## 0.22.0
8
92
 
9
93
  **A context builder keeps its report current and regenerates with each slice.** The
@@ -22,7 +106,7 @@ integration handler to its consumer name and its system actor. The name passes t
22
106
  as any concept of the context (`--term`, `--allow-name`). Without it, nothing changes.
23
107
 
24
108
  **`clean/function-size` names the fix.** More than three parameters: group them in a typed props
25
- object or a value object (`Contestation.create({ ... })`), never a fourth parameter. A `describe`
109
+ object or a value object (`Invoice.draft({ ... })`), never a fourth parameter. A `describe`
26
110
  past the 100-line ceiling: one top-level `describe` per behaviour, in the same file. The ESLint
27
111
  rule no longer takes production code such as `context.run(callback)` for a group of tests: such a
28
112
  callback is now held to the limit of a function, and may be reported where it was not.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:91cb20f36ff1d090 -->
2
+ <!-- translation-of: README.md sha256:f6e0fcc61902b03c -->
3
3
 
4
4
  # ddd-ts-kit
5
5
 
@@ -1067,7 +1067,7 @@ dans chaque `CONTEXT.md`.
1067
1067
  ## status, todo
1068
1068
 
1069
1069
  ```
1070
- ddd-ts-kit status
1070
+ ddd-ts-kit status [--workers]
1071
1071
  ddd-ts-kit todo [<context>]
1072
1072
  ```
1073
1073
 
@@ -1079,6 +1079,18 @@ quand leur fichier manque, `slices` contient `{ file, rows, byStatus, byOwner }`
1079
1079
  `{ context, domain, platform, test }` par contexte, et un avec un `context` vide pour ce qui reste
1080
1080
  hors d'eux.
1081
1081
 
1082
+ `status --workers` affiche à la place les *workers* d'une construction en parallèle : chaque
1083
+ *worktree* du dépôt dont la copie du projet porte `.ddd-ts-kit/worker.json`, avec sa branche,
1084
+ son contexte, ses lignes, sa base, les *commits* qu'il a d'avance sur la base, les fichiers qu'il
1085
+ a changés (commités depuis la base de fusion, modifiés, et non suivis mais non ignorés, relatifs
1086
+ au sommet du dépôt) et son `.ddd-ts-kit/report.md` avec sa date d'écriture ; puis les contextes
1087
+ construits par plus d'un *worker* et les fichiers changés par plus d'un *worker*, chacun avec
1088
+ leurs *worktrees*. Un fichier de périmètre qui ne porte que le contexte est lu aussi : le
1089
+ *worker* vient sans ses lignes, sa base ni son avance, et ses fichiers sont les fichiers non
1090
+ commités. `--json` affiche
1091
+ `{ workers: [{ worktree, branch, context, rows, base, ahead, files, report }], overlaps: { contexts: [{ context, worktrees }], files: [{ file, worktrees }] } }`,
1092
+ `report` valant `{ file, modified }` ou `null`. Sans *worker*, elle le dit en une ligne.
1093
+
1082
1094
  `todo` liste ces marqueurs en `file:line` avec leur genre et leur texte, dans le projet ou dans
1083
1095
  un contexte ; `--json` affiche `{ count, remaining: [{ kind, context, file, line, text }] }`.
1084
1096
 
@@ -1091,7 +1103,7 @@ ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <
1091
1103
  Prépare la place d'un *worker* d'un build réparti par contexte : crée un *worktree* git du projet
1092
1104
  (`../<project>-<context>` par défaut) sur la branche `build/<context>`, à partir de `--base` (une
1093
1105
  branche, une étiquette ou un *commit* : `origin/main` ; par défaut la branche courante), y écrit
1094
- `.ddd-ts-kit/worker.json` (`{ "context": "<context>" }` ; `init` ignore `.ddd-ts-kit/`), et
1106
+ `.ddd-ts-kit/worker.json` (`{ context, rows, base, branch }` ; `init` ignore `.ddd-ts-kit/`), et
1095
1107
  affiche la consigne du *worker* : son périmètre, les générateurs qu'il peut lancer, ses tranches
1096
1108
  encore à faire d'après `docs/architecture/slices.md`, les langages publiés qu'il consomme, et la
1097
1109
  base comme tronc de ses vérifications (`check --changed-since <base>`). `--rows 4.15,4.16` ne
package/README.md CHANGED
@@ -1016,7 +1016,7 @@ each `CONTEXT.md`.
1016
1016
  ## status, todo
1017
1017
 
1018
1018
  ```
1019
- ddd-ts-kit status
1019
+ ddd-ts-kit status [--workers]
1020
1020
  ddd-ts-kit todo [<context>]
1021
1021
  ```
1022
1022
 
@@ -1028,6 +1028,17 @@ file is missing, `slices` holds `{ file, rows, byStatus, byOwner }`, `remaining`
1028
1028
  `{ context, domain, platform, test }` per context, and one with an empty `context` for what is
1029
1029
  left outside them.
1030
1030
 
1031
+ `status --workers` prints the workers of a parallel build instead: each worktree of the
1032
+ repository whose copy of the project holds `.ddd-ts-kit/worker.json`, with its branch, its
1033
+ context, its rows, its base, the commits it is ahead of the base, the files it changed (committed
1034
+ since the merge base, modified, and untracked but not ignored, relative to the top of the
1035
+ repository) and its `.ddd-ts-kit/report.md` with when it was written; then the contexts built by
1036
+ more than one worker and the files changed by more than one worker, each with their worktrees.
1037
+ A scope file that holds the context only is read too: the worker comes without its rows, its
1038
+ base and its commits ahead, and its files are the uncommitted ones. `--json` prints
1039
+ `{ workers: [{ worktree, branch, context, rows, base, ahead, files, report }], overlaps: { contexts: [{ context, worktrees }], files: [{ file, worktrees }] } }`,
1040
+ `report` being `{ file, modified }` or `null`. Without a worker it says so in one line.
1041
+
1031
1042
  `todo` lists those markers as `file:line` with their kind and their text, in the project or in one
1032
1043
  context; `--json` prints `{ count, remaining: [{ kind, context, file, line, text }] }`.
1033
1044
 
@@ -1040,7 +1051,7 @@ ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <
1040
1051
  Prepares the place of one worker of a build split by context: creates a git worktree of the
1041
1052
  project (`../<project>-<context>` by default) on the branch `build/<context>`, cut from
1042
1053
  `--base` (a branch, a tag or a commit: `origin/main`; by default the current branch), writes
1043
- `.ddd-ts-kit/worker.json` in it (`{ "context": "<context>" }`; `init` ignores `.ddd-ts-kit/`), and
1054
+ `.ddd-ts-kit/worker.json` in it (`{ context, rows, base, branch }`; `init` ignores `.ddd-ts-kit/`), and
1044
1055
  prints the briefing of the worker: its scope, the generators it may run, its slices still to do
1045
1056
  from `docs/architecture/slices.md`, the published languages it consumes, and the base as the
1046
1057
  trunk of its checks (`check --changed-since <base>`). `--rows 4.15,4.16` briefs those rows only,
@@ -1,3 +1,8 @@
1
- /** The files changed since `ref`, relative to the project root: the only place git is invoked, and only to read the user's own history. */
1
+ /**
2
+ * The files changed since `ref`, relative to the project root: committed since the merge base,
3
+ * modified in the working tree, and new files git does not track yet, which a generator has just
4
+ * written and nothing has staged. The only place git is invoked, and only to read the user's own
5
+ * history.
6
+ */
2
7
  export declare function changedFiles(root: string, ref: string): Set<string>;
3
8
  //# sourceMappingURL=changed-files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAGA,2IAA2I;AAC3I,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAoBnE"}
1
+ {"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYnE"}
@@ -1,21 +1,25 @@
1
1
  import { execFileSync } from 'node:child_process';
2
2
  import { CliError } from '../../cli-error.js';
3
- /** The files changed since `ref`, relative to the project root: the only place git is invoked, and only to read the user's own history. */
3
+ /**
4
+ * The files changed since `ref`, relative to the project root: committed since the merge base,
5
+ * modified in the working tree, and new files git does not track yet, which a generator has just
6
+ * written and nothing has staged. The only place git is invoked, and only to read the user's own
7
+ * history.
8
+ */
4
9
  export function changedFiles(root, ref) {
5
10
  try {
6
- const output = execFileSync('git', ['diff', '--name-only', '--relative', `${ref}...`], {
7
- cwd: root,
8
- encoding: 'utf8',
9
- stdio: ['ignore', 'pipe', 'pipe'],
10
- });
11
- const files = output
12
- .split('\n')
13
- .map((line) => line.trim())
14
- .filter((line) => line !== '');
15
- return new Set(files);
11
+ const changed = gitLines(root, ['diff', '--name-only', '--relative', `${ref}...`]);
12
+ const untracked = gitLines(root, ['ls-files', '--others', '--exclude-standard']);
13
+ return new Set([...changed, ...untracked]);
16
14
  }
17
15
  catch {
18
16
  throw new CliError(`Could not list the files changed since "${ref}".`, 'Check that the directory is a git repository and that the ref exists (fetch it in CI with enough history).');
19
17
  }
20
18
  }
19
+ function gitLines(root, args) {
20
+ return execFileSync('git', [...args], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })
21
+ .split('\n')
22
+ .map((line) => line.trim())
23
+ .filter((line) => line !== '');
24
+ }
21
25
  //# sourceMappingURL=changed-files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"changed-files.js","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,2IAA2I;AAC3I,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,GAAW;IACpD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,GAAG,KAAK,CAAC,EAAE;YACrF,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,MAAM;aACjB,KAAK,CAAC,IAAI,CAAC;aACX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AAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;SACtG,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACnC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { SourceFile } from '../model/source-file.js';
2
2
  import type { StringRecord } from '../scan/string-record.js';
3
3
  /**
4
- * The name a domain event class gives itself: `static readonly eventName = '...'`, which its
4
+ * The name a domain event class gives itself: `extends NamedDomainEvent('...')` or `static readonly eventName = '...'`, which its
5
5
  * `readonly name` and its reactions read, or as 0.5 wrote it, `readonly name = '...'`.
6
6
  */
7
7
  export declare function domainEventNames(file: SourceFile): StringRecord[];
@@ -1 +1 @@
1
- {"version":3,"file":"domain-event-names.d.ts","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAIjE"}
1
+ {"version":3,"file":"domain-event-names.d.ts","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAM7D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAIjE"}
@@ -1,7 +1,7 @@
1
1
  /** `name = '...'`, `name: '...'`, `name: string = '...'`, and the same of `eventName`. */
2
- const NAME_PROPERTY = /(?<![\w$.])(?:name|eventName)\s*\??\s*(?:[:=]|:[^=;\n'"]+=)\s*$/;
2
+ const NAME_PROPERTY = /(?<![\w$.])(?:name|eventName)\s*\??\s*(?:[:=]|:[^=;\n'"]+=)\s*$|(?<![\w$.])NamedDomainEvent\s*\(\s*$/;
3
3
  /**
4
- * The name a domain event class gives itself: `static readonly eventName = '...'`, which its
4
+ * The name a domain event class gives itself: `extends NamedDomainEvent('...')` or `static readonly eventName = '...'`, which its
5
5
  * `readonly name` and its reactions read, or as 0.5 wrote it, `readonly name = '...'`.
6
6
  */
7
7
  export function domainEventNames(file) {
@@ -1 +1 @@
1
- {"version":3,"file":"domain-event-names.js","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,MAAM,aAAa,GAAG,iEAAiE,CAAC;AAExF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC1F,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"domain-event-names.js","sourceRoot":"","sources":["../../../src/check/events/domain-event-names.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,MAAM,aAAa,GACjB,sGAAsG,CAAC;AAEzG;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC1F,CAAC;AACJ,CAAC"}
@@ -44,7 +44,7 @@ export const roles = {
44
44
  // or, when generating the use case: --permission invoice.void --grant accountant`,
45
45
  },
46
46
  'authz/policy-asked': {
47
- why: 'The bus checks the permission of a use case before its handler runs, with the identifier of the element at most: it cannot read the element. A policy is the part of the right that needs the element (only the issuer, not after closing), and it is evaluated only when the handler asks Access once the element is loaded. A handler that forgets to ask leaves the policy declared, tested and never applied, and nothing at run time says so. Judged: for every permission refined by a policy (@Policy or definePolicy in application/authorization/), the handlers in the folder of each command or query that requires it (@Requires, .requires(...) or requires(X, ...)) call authorize, decide or decideOn and name that permission in their code. The TODO(domain) the generator leaves in such a handler, naming the permission, is accepted: `ddd-ts-kit todo` lists it, and until it is done the authorization module refuses the result of the handler at run time (PolicyNotAskedError).',
47
+ why: 'The bus checks the permission of a use case before its handler runs, with the identifier of the element at most: it cannot read the element. A policy is the part of the right that needs the element (only the issuer, not after closing), and it is evaluated only when the handler asks Access once the element is loaded. A handler that forgets to ask leaves the policy declared, tested and never applied, and nothing at run time says so. Judged: for every permission refined by a policy (@Policy or definePolicy in application/authorization/), the handlers in the folder of each command or query that requires it (@Requires, .requires(...) or requires(X, ...)) call authorize, decide or decideOn and name that permission in their code. The TODO(domain) the generator leaves in such a handler, naming the permission, is accepted, and so is a TODO(review) that names it: `ddd-ts-kit todo` lists both, and until it is done the authorization module refuses the result of the handler at run time (PolicyNotAskedError).',
48
48
  bad: `// application/authorization/only-issuer-voids.policy.ts
49
49
  @Policy(billingPermissions['invoice.void'], { name: 'billing.only-issuer-voids' })
50
50
  export class OnlyIssuerVoidsPolicy {}
@@ -1 +1 @@
1
- {"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,eAAe,EAAE;QACf,GAAG,EAAE,4nCAA4nC;QACjoC,GAAG,EAAE;;;;;8CAKqC;QAC1C,IAAI,EAAE;;;;;kFAKwE;KAC/E;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,08BAA08B;QAC/8B,GAAG,EAAE;;;;;gCAKuB;QAC5B,IAAI,EAAE;;;gCAGsB;KAC7B;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,ykBAAykB;QAC9kB,GAAG,EAAE;;;;qDAI4C;QACjD,IAAI,EAAE;;;;;2GAKiG;KACxG;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,i1BAAi1B;QACt1B,GAAG,EAAE;;+FAEsF;QAC3F,IAAI,EAAE;;;;;IAKN;KACD;CACF,CAAC"}
1
+ {"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,eAAe,EAAE;QACf,GAAG,EAAE,4nCAA4nC;QACjoC,GAAG,EAAE;;;;;8CAKqC;QAC1C,IAAI,EAAE;;;;;kFAKwE;KAC/E;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,o/BAAo/B;QACz/B,GAAG,EAAE;;;;;gCAKuB;QAC5B,IAAI,EAAE;;;gCAGsB;KAC7B;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,ykBAAykB;QAC9kB,GAAG,EAAE;;;;qDAI4C;QACjD,IAAI,EAAE;;;;;2GAKiG;KACxG;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,i1BAAi1B;QACt1B,GAAG,EAAE;;+FAEsF;QAC3F,IAAI,EAAE;;;;;IAKN;KACD;CACF,CAAC"}
@@ -7,7 +7,7 @@ export function parseFile(text: string) { return text.split('\\n').map(parseLine
7
7
  function parseLine(line: string) {}`,
8
8
  },
9
9
  'clean/function-size': {
10
- why: 'A long function mixes several levels of abstraction, and its parts can be neither named nor tested alone. More than three parameters usually travel together because they are one concept without a type: name it, as a typed props object or a value object (`Contestation.create({ claim, reason, raisedBy, raisedAt })`), rather than adding a fourth parameter. Small functions with few arguments are what makes the stepdown order readable. The limits are configurable under `limits`, up to a ceiling: no function is longer than 100 lines, describe callbacks, module files and tests included, and that ceiling is an error whatever the severity of the rule. A `describe` longer than that covers several behaviours: the spec file holds one top-level `describe` per behaviour (a nested one counts in its parent), and a second spec file is needed only past the 350 lines of `clean/file-size`.',
10
+ why: 'A long function mixes several levels of abstraction, and its parts can be neither named nor tested alone. More than three parameters usually travel together because they are one concept without a type: name it, as a typed props object or a value object (`Invoice.draft({ customer, lines, currency, draftedAt })`), rather than adding a fourth parameter. One parameter typed `Actor` or `Date`, who acts and when, is the context of an intention and is not counted. Small functions with few arguments are what makes the stepdown order readable. The limits are configurable under `limits`, up to a ceiling: no function is longer than 100 lines, describe callbacks, module files and tests included, and that ceiling is an error whatever the severity of the rule. A `describe` longer than that covers several behaviours: the spec file holds one top-level `describe` per behaviour (a nested one counts in its parent), and a second spec file is needed only past the 350 lines of `clean/file-size`.',
11
11
  bad: `function issue(id: string, customer: string, amount: number, currency: string, dueOn: Date) {}`,
12
12
  good: `function issue(id: string, customer: CustomerId, total: Money) {}`,
13
13
  },
@@ -1 +1 @@
1
- {"version":3,"file":"clean-docs.js","sourceRoot":"","sources":["../../../src/check/explain/clean-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,4RAA4R;QACjS,GAAG,EAAE;qFAC4E;QACjF,IAAI,EAAE;oCAC0B;KACjC;IACD,qBAAqB,EAAE;QACrB,GAAG,EAAE,o3BAAo3B;QACz3B,GAAG,EAAE,gGAAgG;QACrG,IAAI,EAAE,mEAAmE;KAC1E;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,yOAAyO;QAC9O,GAAG,EAAE,qEAAqE;QAC1E,IAAI,EAAE,8CAA8C;KACrD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,kPAAkP;QACvP,GAAG,EAAE;;iCAEwB;QAC7B,IAAI,EAAE;+BACqB;KAC5B;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,6PAA6P;QAClQ,GAAG,EAAE,2DAA2D;QAChE,IAAI,EAAE,uEAAuE;KAC9E;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,+NAA+N;QACpO,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE;2BACiB;KACxB;CACF,CAAC"}
1
+ {"version":3,"file":"clean-docs.js","sourceRoot":"","sources":["../../../src/check/explain/clean-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,4RAA4R;QACjS,GAAG,EAAE;qFAC4E;QACjF,IAAI,EAAE;oCAC0B;KACjC;IACD,qBAAqB,EAAE;QACrB,GAAG,EAAE,89BAA89B;QACn+B,GAAG,EAAE,gGAAgG;QACrG,IAAI,EAAE,mEAAmE;KAC1E;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,yOAAyO;QAC9O,GAAG,EAAE,qEAAqE;QAC1E,IAAI,EAAE,8CAA8C;KACrD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,kPAAkP;QACvP,GAAG,EAAE;;iCAEwB;QAC7B,IAAI,EAAE;+BACqB;KAC5B;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,6PAA6P;QAClQ,GAAG,EAAE,2DAA2D;QAChE,IAAI,EAAE,uEAAuE;KAC9E;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,+NAA+N;QACpO,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE;2BACiB;KACxB;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"events-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwGzD,CAAC"}
1
+ {"version":3,"file":"events-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqGzD,CAAC"}
@@ -5,14 +5,11 @@ export const EVENTS_DOCS = {
5
5
  good: `static readonly eventName = 'billing.invoice.issued';`,
6
6
  },
7
7
  'events/name-declared-once': {
8
- why: 'A domain event handler and a projection are attached under the name the event class declares, static readonly eventName: the compiler refuses a reaction to an event class without it. Checked on every domain event, a missing name is found when the event is written, not later when someone first reacts to it. A name written a second time, as a literal in readonly name, drifts from the one the reactions read.',
8
+ why: 'A domain event handler and a projection are attached under the name the event class declares, static readonly eventName: the compiler refuses a reaction to an event class without it. Checked on every domain event, a missing name is found when the event is written, not later when someone first reacts to it. A name written a second time, as a literal in readonly name, drifts from the one the reactions read: extend NamedDomainEvent and the instance name reads the static one.',
9
9
  bad: `export class InvoiceIssued implements DomainEvent {
10
10
  readonly name = 'billing.invoice.issued';
11
11
  }`,
12
- good: `export class InvoiceIssued implements DomainEvent {
13
- static readonly eventName = 'billing.invoice.issued';
14
-
15
- readonly name = InvoiceIssued.eventName;
12
+ good: `export class InvoiceIssued extends NamedDomainEvent('billing.invoice.issued') {
16
13
  }`,
17
14
  },
18
15
  'events/defined-in-published-language': {
@@ -1 +1 @@
1
- {"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,8CAA8C;QACnD,IAAI,EAAE,uDAAuD;KAC9D;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,0ZAA0Z;QAC/Z,GAAG,EAAE;;EAEP;QACE,IAAI,EAAE;;;;EAIR;KACC;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,mlBAAmlB;QACxlB,GAAG,EAAE;;;uEAG8D;QACnE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,kCAAkC,EAAE;QAClC,GAAG,EAAE,svBAAsvB;QAC3vB,GAAG,EAAE;;;;sDAI6C;QAClD,IAAI,EAAE;;;;;qCAK2B;KAClC;IACD,2CAA2C,EAAE;QAC3C,GAAG,EAAE,uxDAAuxD;QAC5xD,GAAG,EAAE;;;;;;;;;;sFAU6E;QAClF,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBR;KACC;CACF,CAAC"}
1
+ {"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,8CAA8C;QACnD,IAAI,EAAE,uDAAuD;KAC9D;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,8dAA8d;QACne,GAAG,EAAE;;EAEP;QACE,IAAI,EAAE;EACR;KACC;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,mlBAAmlB;QACxlB,GAAG,EAAE;;;uEAG8D;QACnE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,kCAAkC,EAAE;QAClC,GAAG,EAAE,svBAAsvB;QAC3vB,GAAG,EAAE;;;;sDAI6C;QAClD,IAAI,EAAE;;;;;qCAK2B;KAClC;IACD,2CAA2C,EAAE;QAC3C,GAAG,EAAE,uxDAAuxD;QAC5xD,GAAG,EAAE;;;;;;;;;;sFAU6E;QAClF,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBR;KACC;CACF,CAAC"}
@@ -12,7 +12,7 @@ export class IssueInvoiceCommand {}`,
12
12
  good: `export class InvoiceNumbering {}`,
13
13
  },
14
14
  'language/declared-vocabulary': {
15
- why: 'A status, a kind, a role or a permission is a word of the language whose values are a closed list. Spelled again as a string wherever it is compared, granted or stored, each copy can drift: a typo compiles, a renamed value leaves its old spelling behind, and nothing completes it in the editor. Declared once, as an object `as const` and the union type of its name (a permission set for permissions), it is read by its key, completed by the editor, and a parameter typed with it accepts nothing else. The value stays the same string on the wire and in the database. A quoted key counts, and is written as a computed key, `[AppointmentStatus.NoShow]: ..`. Tests and published languages are not judged: a test sends the values a client sends, and a published language names the values of its contract itself; nor is the relationship schema of the access model, which declares its relations. Where: the vocabulary of a context in that context only (the same word may mean something else next door), one of the platform (the roles) in the platform and in the route groups `*.routes.ts`, a permission id and a vocabulary of the shared kernel everywhere. What is read as a vocabulary: every entry a key and a string literal, comments, either quote and `as const satisfies ..` allowed; a number, a spread or a computed entry leaves the object unread, and so does a union type written otherwise than `(typeof X)[keyof typeof X]`. The rule holds under "stack.literals": "named", which `init` writes; a config that does not say keeps the free literals of 0.5.',
15
+ why: 'A status, a kind, a role or a permission is a word of the language whose values are a closed list. Spelled again as a string wherever it is compared, granted or stored, each copy can drift: a typo compiles, a renamed value leaves its old spelling behind, and nothing completes it in the editor. Declared once, as an object `as const` and the union type of its name (a permission set for permissions), it is read by its key, completed by the editor, and a parameter typed with it accepts nothing else. The value stays the same string on the wire and in the database. A quoted key counts, and is written as a computed key, `[AppointmentStatus.NoShow]: ..`. Tests and published languages are not judged: a test sends the values a client sends, and a published language names the values of its contract itself; nor is the relationship schema of the access model, which declares its relations. In the persistence of a context, the name of a column, a table or a schema is a word of the storage that may spell a value by chance: the first argument of a call (`text("note")`) and the value of `name`, `tableName` or `schema` are not judged; a stored value, the argument of `.default(..)` or a value compared in a query, is. Where: the vocabulary of a context in that context only (the same word may mean something else next door), one of the platform (the roles) in the platform and in the route groups `*.routes.ts`, a permission id and a vocabulary of the shared kernel everywhere. What is read as a vocabulary: every entry a key and a string literal, comments, either quote and `as const satisfies ..` allowed; a number, a spread or a computed entry leaves the object unread, and so does a union type written otherwise than `(typeof X)[keyof typeof X]`. The rule holds under "stack.literals": "named", which `init` writes; a config that does not say keeps the free literals of 0.5.',
16
16
  bad: `// domain/vocabularies/appointment-status.vocabulary.ts declares AppointmentStatus
17
17
  if (appointment.status === 'no-show') {
18
18
  grants.push('billing:invoice.issue');
@@ -1 +1 @@
1
- {"version":3,"file":"language-docs.js","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,wBAAwB,EAAE;QACxB,GAAG,EAAE,gTAAgT;QACrT,GAAG,EAAE;+BACsB;QAC3B,IAAI,EAAE;oCAC0B;KACjC;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+OAA+O;QACpP,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,kCAAkC;KACzC;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,+gDAA+gD;QACphD,GAAG,EAAE;;;EAGP;QACE,IAAI,EAAE;;EAER;KACC;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,iQAAiQ;QACtQ,GAAG,EAAE,4DAA4D;QACjE,IAAI,EAAE,8DAA8D;KACrE;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,4QAA4Q;QACjR,GAAG,EAAE,uEAAuE;QAC5E,IAAI,EAAE,gEAAgE;KACvE;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,2QAA2Q;QAChR,GAAG,EAAE,6DAA6D;QAClE,IAAI,EAAE,yDAAyD;KAChE;CACF,CAAC"}
1
+ {"version":3,"file":"language-docs.js","sourceRoot":"","sources":["../../../src/check/explain/language-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,wBAAwB,EAAE;QACxB,GAAG,EAAE,gTAAgT;QACrT,GAAG,EAAE;+BACsB;QAC3B,IAAI,EAAE;oCAC0B;KACjC;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+OAA+O;QACpP,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,kCAAkC;KACzC;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,u1DAAu1D;QAC51D,GAAG,EAAE;;;EAGP;QACE,IAAI,EAAE;;EAER;KACC;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,iQAAiQ;QACtQ,GAAG,EAAE,4DAA4D;QACjE,IAAI,EAAE,8DAA8D;KACrE;IACD,8BAA8B,EAAE;QAC9B,GAAG,EAAE,4QAA4Q;QACjR,GAAG,EAAE,uEAAuE;QAC5E,IAAI,EAAE,gEAAgE;KACvE;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,2QAA2Q;QAChR,GAAG,EAAE,6DAA6D;QAClE,IAAI,EAAE,yDAAyD;KAChE;CACF,CAAC"}
@@ -63,7 +63,7 @@ export abstract class TaxGateway {}
63
63
  export interface IssueInvoiceResult { readonly invoiceId: string }`,
64
64
  },
65
65
  'clean/file-size': {
66
- why: 'Past a few hundred lines a file holds more than one responsibility: nobody reads it whole, and every change touches something unrelated. The limit is 350 physical lines, for sources and tests alike, and is not configurable. A long test file is split by behaviour, a long source by concept. Generated files (a path segment named generated, the <context>.declarations.ts and <context>.dependencies.ts at the root of a context) and declaration files are not judged.',
66
+ why: 'Past a few hundred lines a file holds more than one responsibility: nobody reads it whole, and every change touches something unrelated. The limit is 350 physical lines, for sources and tests alike, and is not configurable. A long test file is split by behaviour, a long source by concept. An aggregate keeps its intention methods and moves a decision out: a domain service that takes the state and returns the new state and its events, which the aggregate applies, or a value object for fields that travel together; never a public method that sets its state from outside. Generated files (a path segment named generated, the <context>.declarations.ts and <context>.dependencies.ts at the root of a context) and declaration files are not judged.',
67
67
  bad: `// application/commands/issue-invoice/issue-invoice.handler.ts, 600 lines:
68
68
  // the handler, its validation, its mapping and three helpers`,
69
69
  good: `// issue-invoice.handler.ts orchestrates, in 40 lines;
@@ -1 +1 @@
1
- {"version":3,"file":"layout-docs.js","sourceRoot":"","sources":["../../../src/check/explain/layout-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,uBAAuB,EAAE;QACvB,GAAG,EAAE,qXAAqX;QAC1X,GAAG,EAAE;;;;;;EAMP;QACE,IAAI,EAAE;;;;;;EAMR;KACC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,qgBAAqgB;QAC1gB,GAAG,EAAE;;;;EAIP;QACE,IAAI,EAAE;;;;EAIR;KACC;IACD,cAAc,EAAE;QACd,GAAG,EAAE,ieAAie;QACte,GAAG,EAAE;;;;0CAIiC;QACtC,IAAI,EAAE;;;;;;;;;;EAUR;KACC;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,yrBAAyrB;QAC9rB,GAAG,EAAE;;;;iCAIwB;QAC7B,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,gdAAgd;QACrd,GAAG,EAAE;8DACqD;QAC1D,IAAI,EAAE;wFAC8E;KACrF;CACF,CAAC"}
1
+ {"version":3,"file":"layout-docs.js","sourceRoot":"","sources":["../../../src/check/explain/layout-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,uBAAuB,EAAE;QACvB,GAAG,EAAE,qXAAqX;QAC1X,GAAG,EAAE;;;;;;EAMP;QACE,IAAI,EAAE;;;;;;EAMR;KACC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,qgBAAqgB;QAC1gB,GAAG,EAAE;;;;EAIP;QACE,IAAI,EAAE;;;;EAIR;KACC;IACD,cAAc,EAAE;QACd,GAAG,EAAE,ieAAie;QACte,GAAG,EAAE;;;;0CAIiC;QACtC,IAAI,EAAE;;;;;;;;;;EAUR;KACC;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,yrBAAyrB;QAC9rB,GAAG,EAAE;;;;iCAIwB;QAC7B,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,2uBAA2uB;QAChvB,GAAG,EAAE;8DACqD;QAC1D,IAAI,EAAE;wFAC8E;KACrF;CACF,CAAC"}
@@ -13,7 +13,7 @@ import type { Money } from '@/shared-kernel/presentation/money.schema';
13
13
  // maps Money to the command, which carries plain values`,
14
14
  },
15
15
  'schema/no-duplicate-shape': {
16
- why: 'Two routes that declare the same shape by hand document it twice, as two unrelated schemas: the contract grows a copy per route, a client SDK generates two types for one thing, and the day the shape changes one copy is forgotten. Declared once and shared, it lands once in components.schemas and every route points at it with $ref; a route that needs a part of it derives that part (pick, omit, partial, extend) from the one declaration. Judged within one context, and between a context and presentation/ of the shared kernel: two contexts may declare the same structure, because an equal shape with two meanings is two concepts and sharing it would couple contexts that stay extractable. Compared: a DTO class (a class of the module that extends nothing, has no method and decorates each property), compared by its property names, their decorators with their arguments and whether each is optional; and the object of a schema builder (`z.object({...})`, `v.object({...})`, `Type.Object({...})`), compared by its entries whatever their order and layout. Empty shapes, shapes that still carry a TODO(domain) of the generator (every search line starts as `{ id }`), *.params.ts, *.query.ts and *.headers.ts files and the objects assigned to params, query or headers are not judged: a request parameter is documented per operation, never as a component. The original is the declaration of the shared kernel, then the one under presentation/http/shared/ of the context, then the first in path order; each copy is reported with the place of the original. Judged under "stack.schemas": "shared" only.',
16
+ why: 'Two routes that declare the same shape by hand document it twice, as two unrelated schemas: the contract grows a copy per route, a client SDK generates two types for one thing, and the day the shape changes one copy is forgotten. Declared once and shared, it lands once in components.schemas and every route points at it with $ref; a route that needs a part of it derives that part (pick, omit, partial, extend) from the one declaration. Judged within one context, and between a context and presentation/ of the shared kernel: two contexts may declare the same structure, because an equal shape with two meanings is two concepts and sharing it would couple contexts that stay extractable. Compared: a DTO class (a class of the module that extends nothing, has no method and decorates each property), compared by its property names, their decorators with their arguments and whether each is optional; and the object of a schema builder (`z.object({...})`, `v.object({...})`, `Type.Object({...})`), compared by its entries whatever their order and layout. Empty shapes, shapes that still carry a TODO(domain) of the generator (every search line starts as `{ id }`) or a TODO(review), *.params.ts, *.query.ts and *.headers.ts files and the objects assigned to params, query or headers are not judged: a request parameter is documented per operation, never as a component. The original is the declaration of the shared kernel, then the one under presentation/http/shared/ of the context, then the first in path order; each copy is reported with the place of the original. Judged under "stack.schemas": "shared" only.',
17
17
  bad: `// appointments/cancel-appointment/cancel-appointment.accepted.ts
18
18
  export class CancelAppointmentAccepted { @IsString() id = ''; }
19
19
  // appointments/confirm-appointment/confirm-appointment.accepted.ts
@@ -1 +1 @@
1
- {"version":3,"file":"schema-docs.js","sourceRoot":"","sources":["../../../src/check/explain/schema-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,0BAA0B,EAAE;QAC1B,GAAG,EAAE,mhCAAmhC;QACxhC,GAAG,EAAE;;;;sEAI6D;QAClE,IAAI,EAAE;;;;yDAI+C;KACtD;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,4jDAA4jD;QACjkD,GAAG,EAAE;;;iEAGwD;QAC7D,IAAI,EAAE;;;;mHAIyG;KAChH;CACF,CAAC"}
1
+ {"version":3,"file":"schema-docs.js","sourceRoot":"","sources":["../../../src/check/explain/schema-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,0BAA0B,EAAE;QAC1B,GAAG,EAAE,mhCAAmhC;QACxhC,GAAG,EAAE;;;;sEAI6D;QAClE,IAAI,EAAE;;;;yDAI+C;KACtD;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,8kDAA8kD;QACnlD,GAAG,EAAE;;;iEAGwD;QAC7D,IAAI,EAAE;;;;mHAIyG;KAChH;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"authz-policy-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-policy-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0C5C,eAAO,MAAM,qBAAqB,EAAE,SAAS,OAAO,EA6DnD,CAAC"}
1
+ {"version":3,"file":"authz-policy-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-policy-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0C5C,eAAO,MAAM,qBAAqB,EAAE,SAAS,OAAO,EAiFnD,CAAC"}
@@ -39,6 +39,18 @@ export const AUTHZ_POLICY_FIXTURES = [
39
39
  expect: 'pass',
40
40
  files: withPolicy(declaredHandler(" // TODO(domain): a policy refines billingPermissions['invoice.issue']: load the element this command acts on, then ask it.\n await this.invoices.save(command);")),
41
41
  },
42
+ {
43
+ ruleId: 'authz/policy-asked',
44
+ name: 'a handler carrying a TODO(review) that names the permission',
45
+ expect: 'pass',
46
+ files: withPolicy(declaredHandler(" // TODO(review): ask billingPermissions['invoice.issue'] once the invoice is loaded, not before.\n await this.invoices.save(command);")),
47
+ },
48
+ {
49
+ ruleId: 'authz/policy-asked',
50
+ name: 'a handler carrying a TODO of another owner that names the permission',
51
+ expect: { file: HANDLER },
52
+ files: withPolicy(declaredHandler(" // TODO(billing-team): ask billingPermissions['invoice.issue'] here.\n await this.invoices.save(command);")),
53
+ },
42
54
  {
43
55
  ruleId: 'authz/policy-asked',
44
56
  name: 'a handler naming the permission in a comment only',
@@ -1 +1 @@
1
- {"version":3,"file":"authz-policy-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-policy-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;AAE3D,8GAA8G;AAC9G,MAAM,oBAAoB,GAAG,MAAM,CACjC,6DAA6D,EAC7D,uHAAuH,EACvH,mGAAmG,EACnG,4CAA4C,EAC5C,EAAE,EACF,2FAA2F,EAC3F,iGAAiG,EACjG,iGAAiG,EACjG,EAAE,EACF,6DAA6D,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CAC3M;SACF,CAAC;KACH;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,IAAI,EAAE,mEAAmE;QACzE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,MAAM,CAAC,EAAE,eAAe;YACzB,CAAC,OAAO,CAAC,EAAE,uCAAuC;YAClD,CAAC,MAAM,CAAC,EAAE,cAAc;YACxB,GAAG,OAAO,CACR,sJAAsJ,CACvJ;SACF,CAAC;KACH;CACF,CAAC;AAEF,uEAAuE;AACvE,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO;QACL,iDAAiD;QACjD,mEAAmE;QACnE,wGAAwG;QACxG,uHAAuH;QACvH,EAAE;QACF,sCAAsC;QACtC,oCAAoC;QACpC,gBAAgB;QAChB,sCAAsC;QACtC,mDAAmD;QACnD,QAAQ;QACR,EAAE;QACF,gEAAgE;QAChE,IAAI;QACJ,KAAK;QACL,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,8GAA8G;AAC9G,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAC5F,CAAC"}
1
+ {"version":3,"file":"authz-policy-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-policy-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,EAAE,MAAM,EAAE,OAA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C;AAED,8GAA8G;AAC9G,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAC5F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"clean-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/clean-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAY5C,eAAO,MAAM,cAAc,EAAE,SAAS,OAAO,EAoQ5C,CAAC"}
1
+ {"version":3,"file":"clean-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/clean-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAY5C,eAAO,MAAM,cAAc,EAAE,SAAS,OAAO,EAuR5C,CAAC"}
@@ -78,6 +78,22 @@ export const CLEAN_FIXTURES = [
78
78
  [ADAPTER]: 'export class InMemoryInvoiceRepository {\n constructor(\n readonly a: string,\n readonly b: string,\n readonly c: string,\n readonly d: string,\n ) {}\n\n find(id: string, options: { limit: number; offset: number }, fallback = id): string {\n return id + options.limit + fallback;\n }\n}\n',
79
79
  }),
80
80
  },
81
+ {
82
+ ruleId: 'clean/function-size',
83
+ name: 'three parameters and the instant of the intention, which is not counted',
84
+ expect: 'pass',
85
+ files: project({
86
+ [ISSUE]: 'export function issue(id: string, customer: string, amount: number, now: Date): string {\n return id + customer + amount + now.toISOString();\n}\n',
87
+ }),
88
+ },
89
+ {
90
+ ruleId: 'clean/function-size',
91
+ name: 'four parameters besides the actor',
92
+ expect: { file: ISSUE },
93
+ files: project({
94
+ [ISSUE]: 'export function issue(id: string, customer: string, amount: number, currency: string, actor: Actor): string {\n return id + customer + amount + currency + String(actor);\n}\n',
95
+ }),
96
+ },
81
97
  {
82
98
  ruleId: 'clean/function-size',
83
99
  name: 'a function with four parameters',
@@ -142,7 +158,7 @@ export const CLEAN_FIXTURES = [
142
158
  },
143
159
  {
144
160
  ruleId: 'clean/no-noise-comment',
145
- name: 'comments that say why, a described parameter, an owned TODO',
161
+ name: 'comments that say why, a described parameter, an owned TODO, a TODO(review)',
146
162
  expect: 'pass',
147
163
  files: project({
148
164
  [FIND]: [
@@ -153,6 +169,7 @@ export const CLEAN_FIXTURES = [
153
169
  ' */',
154
170
  'export function find(id: string): string {',
155
171
  ' // TODO(billing-team): replace by the archive lookup, see #142.',
172
+ ' // TODO(review): name the archive after its term in the glossary.',
156
173
  ' return id;',
157
174
  '}',
158
175
  '',
@@ -1 +1 @@
1
- {"version":3,"file":"clean-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/clean-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,MAAM,KAAK,GAAG,uBAAuB,CAAC;AACtC,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,KAAK,GAAG,uBAAuB,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAuB;IAChD;QACE,MAAM,EAAE,gBAAgB;QACxB,IAAI,EAAE,sEAAsE;QAC5E,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC;YACb,sBAAsB,EACp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","sources":["../../../src/check/fixtures/layout-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA2T5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAM7C,CAAC"}
1
+ {"version":3,"file":"layout-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/layout-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0U5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAM7C,CAAC"}
@@ -156,6 +156,21 @@ const FILE_SIZE = [
156
156
  expect: { file: 'src/platform/billing.declarations.ts' },
157
157
  files: project({ 'src/platform/billing.declarations.ts': listOfLines(400) }),
158
158
  },
159
+ {
160
+ ruleId: 'clean/file-size',
161
+ name: 'an end-to-end spec of 351 lines, beside the source root',
162
+ expect: { file: 'test/e2e/issue-invoice.e2e.spec.ts' },
163
+ files: project({ 'test/e2e/issue-invoice.e2e.spec.ts': listOfLines(351) }),
164
+ },
165
+ {
166
+ ruleId: 'clean/file-size',
167
+ name: 'an end-to-end spec and a script of exactly 350 lines',
168
+ expect: 'pass',
169
+ files: project({
170
+ 'test/e2e/issue-invoice.e2e.spec.ts': listOfLines(350),
171
+ 'scripts/seed-demo.ts': listOfLines(350),
172
+ }),
173
+ },
159
174
  ];
160
175
  export const LAYOUT_FIXTURES = [
161
176
  ...HASH_PRIVATE,
@@ -1 +1 @@
1
- {"version":3,"file":"layout-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/layout-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EA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