ddd-ts-kit 0.97.0 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +128 -0
- package/README.fr.md +18 -9
- package/README.md +17 -9
- package/dist/check/canonical/stray-entry.d.ts.map +1 -1
- package/dist/check/canonical/stray-entry.js +14 -2
- package/dist/check/canonical/stray-entry.js.map +1 -1
- package/dist/check/commands/changed-files.d.ts +1 -1
- package/dist/check/commands/changed-files.d.ts.map +1 -1
- package/dist/check/commands/changed-files.js +3 -2
- package/dist/check/commands/changed-files.js.map +1 -1
- package/dist/check/commands/check-command.d.ts.map +1 -1
- package/dist/check/commands/check-command.js +2 -1
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/commands/is-reported-since.d.ts +8 -0
- package/dist/check/commands/is-reported-since.d.ts.map +1 -0
- package/dist/check/commands/is-reported-since.js +9 -0
- package/dist/check/commands/is-reported-since.js.map +1 -0
- package/dist/check/domain-events/event-handlers-of.d.ts.map +1 -1
- package/dist/check/domain-events/event-handlers-of.js +21 -8
- package/dist/check/domain-events/event-handlers-of.js.map +1 -1
- package/dist/check/events/consumer-registrations.d.ts +2 -0
- package/dist/check/events/consumer-registrations.d.ts.map +1 -1
- package/dist/check/events/consumer-registrations.js +44 -2
- package/dist/check/events/consumer-registrations.js.map +1 -1
- package/dist/check/explain/events-docs.js +1 -1
- package/dist/check/explain/events-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +7 -4
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.js +1 -1
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/consumer-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/consumer-fixtures.js +33 -0
- package/dist/check/fixtures/consumer-fixtures.js.map +1 -1
- package/dist/check/model/finding.d.ts +6 -0
- package/dist/check/model/finding.d.ts.map +1 -1
- package/dist/check/model/report.d.ts +2 -0
- package/dist/check/model/report.d.ts.map +1 -1
- package/dist/check/model/violation.d.ts +2 -0
- package/dist/check/model/violation.d.ts.map +1 -1
- package/dist/check/project/locate.js +9 -3
- package/dist/check/project/locate.js.map +1 -1
- package/dist/check/rules/authz-declared.js +17 -7
- package/dist/check/rules/authz-declared.js.map +1 -1
- package/dist/check/rules/authz-policy-asked.d.ts.map +1 -1
- package/dist/check/rules/authz-policy-asked.js +5 -4
- package/dist/check/rules/authz-policy-asked.js.map +1 -1
- package/dist/check/rules/composition-only-in-module.js +2 -2
- package/dist/check/rules/composition-only-in-module.js.map +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.js +12 -3
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
- package/dist/check/rules/events-consumer-idempotent.d.ts.map +1 -1
- package/dist/check/rules/events-consumer-idempotent.js +19 -6
- package/dist/check/rules/events-consumer-idempotent.js.map +1 -1
- package/dist/check/rules/tree-closed.js +1 -1
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/check/support/reporter.d.ts.map +1 -1
- package/dist/check/support/reporter.js +9 -1
- package/dist/check/support/reporter.js.map +1 -1
- package/dist/check/support/to-violations.js +1 -1
- package/dist/check/support/to-violations.js.map +1 -1
- package/dist/commands/generate.js +2 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/describe/context-sources.d.ts +1 -1
- package/dist/describe/context-sources.d.ts.map +1 -1
- package/dist/describe/describe-context.js +2 -2
- package/dist/describe/describe-context.js.map +1 -1
- package/dist/docs/personal-declarations-in.js +6 -1
- package/dist/docs/personal-declarations-in.js.map +1 -1
- package/dist/docs/personal-table-cells.js +7 -1
- package/dist/docs/personal-table-cells.js.map +1 -1
- package/dist/docs/personal-table-facts.d.ts +1 -1
- package/dist/docs/personal-table-facts.d.ts.map +1 -1
- package/dist/docs/read-jobs.d.ts +1 -1
- package/dist/docs/read-jobs.d.ts.map +1 -1
- package/dist/docs/read-jobs.js +3 -3
- package/dist/docs/read-jobs.js.map +1 -1
- package/dist/generate/apply-wiring.js +1 -1
- package/dist/generate/apply-wiring.js.map +1 -1
- package/dist/generate/kind.d.ts +2 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +2 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/ask-policy-in-generated-use-case.d.ts.map +1 -1
- package/dist/generate/kinds/ask-policy-in-generated-use-case.js +10 -4
- package/dist/generate/kinds/ask-policy-in-generated-use-case.js.map +1 -1
- package/dist/generate/kinds/command-context.d.ts +5 -2
- package/dist/generate/kinds/command-context.d.ts.map +1 -1
- package/dist/generate/kinds/command-context.js +11 -3
- package/dist/generate/kinds/command-context.js.map +1 -1
- package/dist/generate/kinds/command-kind.d.ts.map +1 -1
- package/dist/generate/kinds/command-kind.js +9 -4
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/e2e/jobs-sending.d.ts +5 -0
- package/dist/generate/kinds/e2e/jobs-sending.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/jobs-sending.js +11 -0
- package/dist/generate/kinds/e2e/jobs-sending.js.map +1 -0
- package/dist/generate/kinds/e2e/reaction-of.d.ts +9 -2
- package/dist/generate/kinds/e2e/reaction-of.d.ts.map +1 -1
- package/dist/generate/kinds/e2e/reaction-of.js +16 -7
- package/dist/generate/kinds/e2e/reaction-of.js.map +1 -1
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +20 -5
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js +7 -0
- package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
- package/dist/generate/kinds/job/read-sent-command.d.ts.map +1 -1
- package/dist/generate/kinds/job/read-sent-command.js +2 -1
- package/dist/generate/kinds/job/read-sent-command.js.map +1 -1
- package/dist/generate/kinds/module-kind.d.ts.map +1 -1
- package/dist/generate/kinds/module-kind.js +22 -2
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/repository-line.d.ts +4 -0
- package/dist/generate/kinds/repository-line.d.ts.map +1 -0
- package/dist/generate/kinds/repository-line.js +5 -0
- package/dist/generate/kinds/repository-line.js.map +1 -0
- package/dist/generate/kinds/wire-repository-on-first-use.d.ts +3 -2
- package/dist/generate/kinds/wire-repository-on-first-use.d.ts.map +1 -1
- package/dist/generate/kinds/wire-repository-on-first-use.js +8 -3
- package/dist/generate/kinds/wire-repository-on-first-use.js.map +1 -1
- package/dist/generate/registration.d.ts +10 -0
- package/dist/generate/registration.d.ts.map +1 -0
- package/dist/generate/registration.js +2 -0
- package/dist/generate/registration.js.map +1 -0
- package/dist/generate/wire.d.ts +5 -2
- package/dist/generate/wire.d.ts.map +1 -1
- package/dist/generate/wire.js +6 -3
- package/dist/generate/wire.js.map +1 -1
- package/dist/generate/wirings.d.ts +2 -1
- package/dist/generate/wirings.d.ts.map +1 -1
- package/dist/generate/wirings.js +25 -4
- package/dist/generate/wirings.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +5 -2
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/merge/classify-conflict.js +2 -2
- package/dist/merge/classify-conflict.js.map +1 -1
- package/dist/merge/continue-merge.d.ts.map +1 -1
- package/dist/merge/continue-merge.js +26 -1
- package/dist/merge/continue-merge.js.map +1 -1
- package/dist/merge/format-merge-report.js +19 -0
- package/dist/merge/format-merge-report.js.map +1 -1
- package/dist/merge/is-derived-in-merge.d.ts +4 -0
- package/dist/merge/is-derived-in-merge.d.ts.map +1 -0
- package/dist/merge/is-derived-in-merge.js +8 -0
- package/dist/merge/is-derived-in-merge.js.map +1 -0
- package/dist/merge/is-merge-path.js +2 -2
- package/dist/merge/is-merge-path.js.map +1 -1
- package/dist/merge/merge-report.d.ts +7 -0
- package/dist/merge/merge-report.d.ts.map +1 -1
- package/dist/merge/next-steps.d.ts +1 -0
- package/dist/merge/next-steps.d.ts.map +1 -1
- package/dist/merge/next-steps.js +1 -0
- package/dist/merge/next-steps.js.map +1 -1
- package/dist/merge/resume-merge.d.ts.map +1 -1
- package/dist/merge/resume-merge.js +10 -1
- package/dist/merge/resume-merge.js.map +1 -1
- package/dist/model-modules/index.d.ts +4 -0
- package/dist/model-modules/index.d.ts.map +1 -1
- package/dist/model-modules/index.js +4 -0
- package/dist/model-modules/index.js.map +1 -1
- package/dist/model-modules/module-file-of.d.ts +7 -0
- package/dist/model-modules/module-file-of.d.ts.map +1 -0
- package/dist/model-modules/module-file-of.js +9 -0
- package/dist/model-modules/module-file-of.js.map +1 -0
- package/dist/model-modules/module-of-module-file.d.ts +3 -0
- package/dist/model-modules/module-of-module-file.d.ts.map +1 -0
- package/dist/model-modules/module-of-module-file.js +6 -0
- package/dist/model-modules/module-of-module-file.js.map +1 -0
- package/dist/model-modules/wiring-files-of.d.ts +4 -0
- package/dist/model-modules/wiring-files-of.d.ts.map +1 -0
- package/dist/model-modules/wiring-files-of.js +6 -0
- package/dist/model-modules/wiring-files-of.js.map +1 -0
- package/dist/model-modules/wiring-text-of.d.ts +5 -0
- package/dist/model-modules/wiring-text-of.d.ts.map +1 -0
- package/dist/model-modules/wiring-text-of.js +8 -0
- package/dist/model-modules/wiring-text-of.js.map +1 -0
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +5 -0
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-preset.d.ts.map +1 -1
- package/dist/presets/identity-preset.js +1 -0
- package/dist/presets/identity-preset.js.map +1 -1
- package/dist/presets/no-flags.d.ts.map +1 -1
- package/dist/presets/no-flags.js +1 -0
- package/dist/presets/no-flags.js.map +1 -1
- package/dist/presets/preset.d.ts +6 -0
- package/dist/presets/preset.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/asked-worktree.d.ts +7 -0
- package/dist/worker/asked-worktree.d.ts.map +1 -0
- package/dist/worker/asked-worktree.js +15 -0
- package/dist/worker/asked-worktree.js.map +1 -0
- package/dist/worker/find-worker.d.ts.map +1 -1
- package/dist/worker/find-worker.js +2 -1
- package/dist/worker/find-worker.js.map +1 -1
- package/dist/worker/main-project.d.ts +3 -0
- package/dist/worker/main-project.d.ts.map +1 -0
- package/dist/worker/main-project.js +11 -0
- package/dist/worker/main-project.js.map +1 -0
- package/dist/worker/worktree-home.d.ts.map +1 -1
- package/dist/worker/worktree-home.js +2 -6
- package/dist/worker/worktree-home.js.map +1 -1
- package/dist/worker/worktree-of.d.ts +2 -1
- package/dist/worker/worktree-of.d.ts.map +1 -1
- package/dist/worker/worktree-of.js +7 -3
- package/dist/worker/worktree-of.js.map +1 -1
- package/dist/workspace/workspace.d.ts +2 -1
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +6 -5
- package/dist/workspace/workspace.js.map +1 -1
- package/package.json +4 -4
- package/templates/command/handler.declared.ts.tpl +39 -1
- package/templates/command/handler.spec.buses.ts.tpl +4 -4
- package/templates/command/handler.spec.tsyringe.ts.tpl +2 -2
- package/templates/command/handler.ts.tpl +38 -1
- package/templates/command/wiring.manual.tpl +4 -1
- package/templates/command/wiring.tsyringe.tpl +7 -2
- package/templates/e2e/e2e-job-case.ts.tpl +8 -0
- package/templates/e2e/e2e-job.spec.ts.tpl +43 -0
- package/templates/init/e2e/start-application.database.ts.tpl +98 -9
- package/templates/init/e2e/start-application.memory.ts.tpl +80 -9
- package/templates/init/jest.config.js.tpl +11 -2
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +11 -2
- package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +4 -0
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +1 -5
- package/templates/init/platform/database/test-database-teardown.ts.tpl +11 -0
- package/templates/init/platform/database/test-database-template.ts.tpl +16 -1
- package/templates/init/rules/tests.md.tpl +1 -1
- package/templates/module/module-file.manual.ts.tpl +46 -0
- package/templates/module/module-file.tsyringe.ts.tpl +14 -0
- package/templates/module/wiring.manual.tpl +14 -0
- package/templates/module/wiring.tsyringe.tpl +6 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +10 -4
- package/templates/presets/identity/e2e/support.wiring.tpl +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,134 @@ 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.99.0
|
|
8
|
+
|
|
9
|
+
**`merge-trunk` regenerates the Prisma client after a schema merge, `--abort` restores the behaviour pages, and `--continue` says when the trunk moved.** A merge that added or changed `prisma/schema/<context>.prisma` left the git-ignored `generated/schema.sql` of the in-process test database stale until `npm run db:client` ran, so the end-to-end requests answered 500 on missing tables: with the Prisma stack, `merge-trunk` (and `--continue`) now runs `db:client` after `regenerate` when the merge changed a file under `prisma/schema/`, and stops, naming the script, when it fails (Drizzle, Knex and TypeORM derive no such file: their test database reads the tracked sources). The pages of `docs/behaviour/` are now derived files: settled by regenerating when they conflict, staged again after `regenerate` rewrote them, and restored and named by `--abort` instead of refusing with "changed by hand since it was staged". A merge left in progress keeps the trunk commit of its first run, so `--continue` now reports `trunk moved: <ref> was <a> when the merge started, it is <b> now` (`trunkMoved` in `--json`) and tells to run `merge-trunk` again once the merge is committed.
|
|
10
|
+
|
|
11
|
+
**The guard says where the `requires(...)` declarations of a module live.** A worker whose context module file is near the size limit created `application/authorization/declare-<module>-use-cases.policy.ts` by hand. The declarations already go to `<module>/<module>.module.ts` when `generate command|query ... --module <module>` is given (modules of the model, 0.98.0); the guard now answers a new `*.policy.ts` with that, and the wiring and access-control skills and the authorization page say it.
|
|
12
|
+
|
|
13
|
+
**`check --changed-since` reports a finding whose cause is a changed file, not only the findings that sit on a changed file.** A violation may now name `subjects`, the other files it is repaired in (shown in `--json`), and `--changed-since` keeps it when its file or one of its subjects changed. `events/consumer-idempotent` (handler not registered with a consumer name), `declarations/port-adapter-wired`, `authz/declared` (use case missing from the authorization map or declared on its message class) and `authz/policy-asked` now name the module files, composition files, authorization files or policy files that repair them, `<module>/<module>.module.ts` of a module of the model included. So a worker who removes a registration from a module file, or changes a policy, sees the error at once instead of at the full `check`. `events/consumer-idempotent` also reads every module file of a context, so a handler registered in the module file of its module is no longer reported against the first module file found.
|
|
14
|
+
|
|
15
|
+
**`check --changed-since <ref>` (and `verify-slice`) now judge a tracked file modified but not committed.** The list of changed files compared the merge base with `HEAD` only, so an edit not yet committed was skipped, contrary to the comment of the function, and a green run said nothing of it. It is now the union of the files committed since the merge base, the tracked files modified in the index or the working tree, and the untracked files git does not ignore. No more need to commit before checking.
|
|
16
|
+
|
|
17
|
+
**A relative `--worktree .worktrees/<name>` resolves against the main checkout, from any worktree.** `worker-scope`, `story-scope` and `worker-scope --resume` resolved the asked path against the root of the checkout the command ran in, so the line `plan-waves` prints, run from a trunk worktree (`.worktrees/wave7`), nested the new worktree in the trunk's (`.worktrees/wave7/.worktrees/<name>`). A relative path under `.worktrees/` now goes to the main checkout, as the default place does, and a note says so; any other relative path still starts at the project you run from.
|
|
18
|
+
|
|
19
|
+
**A run of a per-tenant job says how many tenants it ran for, and `runJob` of the e2e support fails on a run that reached none.** `JobRun` has a new `tenants` field on a succeeded per-tenant run (absent for a global job), also in the log line of the run: with an empty tenant directory the job is never called and the run is `succeeded` with `tenants: 0`. The generated `runJob(name)` throws on it, telling the spec to open a tenant (an organisation) first.
|
|
20
|
+
|
|
21
|
+
To move: a project generated before keeps its `test/e2e/support/start-application.ts`; add `tenants` to the destructuring of `jobs.runNow(name)` and throw when `tenants === 0` to get the check.
|
|
22
|
+
|
|
23
|
+
## 0.98.0
|
|
24
|
+
|
|
25
|
+
**The test runners page measures Vitest against Jest, and says which settings make each faster.**
|
|
26
|
+
`docs/tools/test-runners.md` (and its French page) said speed was not measured; it now gives the
|
|
27
|
+
wall time, CPU and memory of both runners on three pairs of projects identical but for `--tests` (a
|
|
28
|
+
new project, the identity preset, the scheduling example ported to Jest), cold and warm, with and
|
|
29
|
+
without coverage, unit and integration specs apart, one file, and on four CPUs as on a hosted
|
|
30
|
+
runner. Without coverage Jest is 24 to 29 percent faster on the larger projects; with coverage as
|
|
31
|
+
generated Vitest is 1.6 to 2.4 times faster on the example, the cost of Jest's `v8` provider, while
|
|
32
|
+
Jest with the `babel` provider is the fastest of the three (20.6 s against 29.5 and 48.0). The page
|
|
33
|
+
also measures the coverage providers and what each one reports, the number of workers, the pool
|
|
34
|
+
and isolation of Vitest, the worker threads of Jest, the related specs of a changed file, a
|
|
35
|
+
pipeline without cache, the install and mutation testing, and closes on a table of recommendations
|
|
36
|
+
by case, each with its measured gain and what to watch. It names two limits of the Jest template
|
|
37
|
+
the measures found: coverage through `v8`, and PostgreSQL started in process once per spec file
|
|
38
|
+
where the Vitest template starts it once per run.
|
|
39
|
+
|
|
40
|
+
**A Jest project starts PostgreSQL in process once per run, as a Vitest project does.** On an ORM,
|
|
41
|
+
`init --tests jest` writes `test/support/test-database-template.ts`, a global setup that initialises
|
|
42
|
+
the PGlite cluster once and saves it, and `test/support/test-database-teardown.ts`, which deletes
|
|
43
|
+
it, both named in `jest.config.js`; `open-test-database.ts` opens a copy of that cluster in each
|
|
44
|
+
spec instead of running an initdb of its own, as it already did under Vitest. On the identity
|
|
45
|
+
preset the integration specs under Jest take 26 CPU seconds instead of 45, for the same wall time
|
|
46
|
+
on a workstation (`docs/tools/test-runners.md`), and a busy machine no longer makes the hook that
|
|
47
|
+
opens the database outlast its timeout.
|
|
48
|
+
|
|
49
|
+
To move: in a Jest project on an ORM, copy the two files of `test/support/` from a new project
|
|
50
|
+
(`init --tests jest` with the same `--orm`), name them in `jest.config.js`
|
|
51
|
+
(`globalSetup: '<rootDir>/test/support/test-database-template.ts'`,
|
|
52
|
+
`globalTeardown: '<rootDir>/test/support/test-database-teardown.ts'`), and take
|
|
53
|
+
`inProcessPostgres()` of the new `src/platform/database/open-test-database.ts` in place of
|
|
54
|
+
`PGlite.create()`.
|
|
55
|
+
|
|
56
|
+
**A Jest project measures its coverage through the `babel` provider.** The `jest.config.js` that
|
|
57
|
+
`init --tests jest` writes sets `coverageProvider: 'babel'` instead of `'v8'`: on the scheduling
|
|
58
|
+
example ported to Jest, a run with coverage takes 20.6 s instead of 48.0 s on a workstation, and
|
|
59
|
+
65 s instead of 201 s on four CPUs, faster than the same specs under Vitest (measured in
|
|
60
|
+
`docs/tools/test-runners.md`). The branches it reports are those of the `v8` provider of Vitest;
|
|
61
|
+
the `v8` provider of Jest reported two to three points more. A line left out of the measure carries
|
|
62
|
+
the hint the provider reads, `istanbul ignore`, which `v8` did not read, as `babel` does not read
|
|
63
|
+
`v8 ignore`: the explanation of `test/coverage-governed` (`ddd-ts-kit explain`) gives both, and
|
|
64
|
+
the testing rules of a new project name the one its runner reads.
|
|
65
|
+
|
|
66
|
+
To move: in the `jest.config.js` of an existing Jest project, set `coverageProvider: 'babel'`,
|
|
67
|
+
rewrite each `v8 ignore` comment as `istanbul ignore` with its decision record, and run
|
|
68
|
+
`npm run test:coverage` once: a layer whose branch threshold sat within three points of the old
|
|
69
|
+
figure can fall under it.
|
|
70
|
+
|
|
71
|
+
**The test runners page says how mutation testing fares under each runner.** On the identity
|
|
72
|
+
preset, Stryker completes under Vitest in 1 min 46 s with 19 processes and 1 min 54 s with 8, for
|
|
73
|
+
11.6 GB and 5.4 GB of summed memory; under Jest it did not complete on a workstation of 31 GB, at
|
|
74
|
+
19 or 8 processes nor with each process restarted after 10 runs, each Jest process reaching about
|
|
75
|
+
2.5 GB within the first minute. `docs/tools/test-runners.md` gives the figures, a recommendation
|
|
76
|
+
(`--concurrency 8` under Vitest on a workstation, the mutation job planned on Vitest) and a limit
|
|
77
|
+
of Jest.
|
|
78
|
+
|
|
79
|
+
**`reset()` of the end-to-end support writes the grants of the system actors again.** With `--authz rebac` and a database (any ORM), `startApplication().reset()` emptied the relation tuples with every other table, so the relationships `relateSystemActors` wrote at start were gone from the second test of a spec on, and a reaction that sent a protected command as a system actor was refused with FORBIDDEN. `reset()` now calls `relateSystemActors()` after emptying the database, which leaves the application in the state it had right after start while the specs stay isolated.
|
|
80
|
+
|
|
81
|
+
To move: in a generated project, make `reset` in `test/e2e/support/start-application.ts` call `relateSystemActors()` after `database.reset()`, and drop the calls a spec made to relate its system actors again.
|
|
82
|
+
|
|
83
|
+
**The privacy register no longer says "until erased" for a retention read from configuration.**
|
|
84
|
+
`personalFields` accepts `configuredRetention: 'RETENTION_PERIODS'`, the key of the configuration
|
|
85
|
+
that gives the period when the project reads it at run time and purges by its own job. The generated
|
|
86
|
+
register and the `CONTEXT.md` write ``configured by `RETENTION_PERIODS` `` in the Kept column. The key
|
|
87
|
+
is read from the source text, never the value; the kit's own purge still runs only from a literal
|
|
88
|
+
`retention`, and the two together are refused.
|
|
89
|
+
|
|
90
|
+
**`generate erasure-handler` on an event-sourced context says that the key of the subject erases it, instead of sending to a table.** The context has no table to erase: its personal values are sealed by `personalData(subjectId, value)`, and `privacy:erase` (`eraseDataSubject`) destroys the key, which erases them in every context. The refusal now names `personalData`, `eraseDataSubject` and the guides, and the privacy guide, the persistence and integration-event skills say that a retention date on such a context is a scheduled job that calls the same key destruction.
|
|
91
|
+
|
|
92
|
+
**A file of types only no longer fails the coverage floor of a Jest project on the `v8` provider.**
|
|
93
|
+
A file that declares interfaces and type aliases and is imported with `import type` only, for
|
|
94
|
+
example `application/commands/pay/pay.result.ts`, is never loaded at run time, and the `v8`
|
|
95
|
+
provider of Jest reported all its lines uncovered, so that the floor of the layer failed though
|
|
96
|
+
nothing executable was untested. `governedJestCoverage()` now reads each source file as text and
|
|
97
|
+
leaves out of `collectCoverageFrom` those that declare types only, as it does for the ports; a
|
|
98
|
+
layer that holds nothing else is held to nothing, under Vitest too. Vitest and the `babel`
|
|
99
|
+
provider of Jest already skipped such a file.
|
|
100
|
+
|
|
101
|
+
To move: nothing; a project that moved its types into the command file to get around it can move
|
|
102
|
+
them back.
|
|
103
|
+
|
|
104
|
+
**`generate e2e` writes the spec of a use case only a job starts.** A use case with no route and no integration event handler used to be refused, although a job (`generate job`) is a starter of a use case too. The spec now starts the application, runs the job as the scheduler would with `await application.runJob('<context>.<job>')`, awaits `settled()` and leaves the `then` to fill. The refusal, when nothing starts the use case, names the job as a third starter it looked for. The shared support `test/e2e/support/start-application.ts` gains `runJob(name)`, which rejects when the run did not succeed, and `composeApplication` returns its `jobs` scheduler.
|
|
105
|
+
|
|
106
|
+
To move: in an existing project, add `runJob(name: string): Promise<void>;` to `RunningApplication` in `test/e2e/support/start-application.ts` and implement it with `jobs.runNow(name)` on the composed application (a run whose `outcome` is not `succeeded` throws); add `readonly jobs: JobScheduler` to `Application` in `compose-application.ts`, returned as `platform.jobs` (manual wiring) or `container.resolve(JobScheduler)` (tsyringe). `generate e2e` notes a support without `runJob`.
|
|
107
|
+
|
|
108
|
+
**`events/consumer-idempotent` accepts options spread from a shared object.**
|
|
109
|
+
`consume(definition, { ...options, consumer: 'ctx.name' }, handler)` passes when `options` is a
|
|
110
|
+
`const` of the same file initialised with an object literal that carries `processed`, or a value typed
|
|
111
|
+
`ConsumeOptions`; the consumer name is still read as the literal `consumer` key. A spread whose content
|
|
112
|
+
the file does not show is still refused, and the fix says that `processed` cannot be read.
|
|
113
|
+
|
|
114
|
+
**`generate command --aggregate` writes a handler that changes an aggregate that exists and writes nothing, and `--creates` is the birth.** Until now every command generated with `--aggregate` called `<Aggregate>.create(...)` and saved a new row on each run, so the use case a job sends created a row on every tick until a worker filled it, and the handler did not compile when `create` of the aggregate takes other arguments (TS2554). The handler now receives the repository of the aggregate, answers `void`, and holds a `TODO(domain)` (load, call one intention method, save): it compiles against the aggregate as it is and writes nothing. `--aggregate <Name> --creates` generates the former handler, which gives birth to the aggregate and answers its identifier. `--creates` without `--aggregate` is refused. A policy added later to the permission of a generated command is asked in either form.
|
|
115
|
+
|
|
116
|
+
To move: add `--creates` to the `generate command ... --aggregate` of each slice that is the birth of its aggregate (a `Start with` cell of a story included). A handler already generated is left as it is.
|
|
117
|
+
|
|
118
|
+
**In the explicit style, each module of the model has its module file, `<module>/<module>.module.ts`, composed by `<context>.module.ts`.** A context divided into modules (`contexts.<name>.modules`) registered the handlers, consumers and reactions of every module in its one `<context>.module.ts`, which passed the 350 lines of `clean/file-size` on a large context, and `tree/closed` refused any other file at the root of the context, so a project had to declare an extra directory to split it. Now `generate module <context> <module>` writes `<module>/<module>.module.ts` and composes it from `<context>.module.ts`: on tsyringe the file exports `{ register(builder), onStart({ resolve }) }`, called from `register` and `onStart` of the context; wired by hand (`--di manual` or `nest`) it exports `registerHandlers`, `registerReactions`, `registerJobs`, `useCases()` and `routes(platform)`, called from the functions of the same names. `generate <kind> ... --module <module>` writes its registration there when the file exists; wired by hand, a use case whose repository another module file already creates is registered in that file, so a repository is still created once per context. `tree/closed` accepts the module file at the root of a declared module and reports any other file there; `check` reads it as a module file (`composition/only-in-module`, `declarations/port-adapter-wired`, `authz/declared`, `domain-events/transactional-before-commit`), and so do `describe`, `docs` and the generators that read the registrations. A wiring block written into a module file also merges an import it repeats once the import names the file in its module, which wrote the same import twice in a context with modules. The declared style is unchanged: a module has no module file, its classes declare themselves.
|
|
119
|
+
|
|
120
|
+
To move: in an explicit context with modules, run `npx ddd-ts-kit generate module <context> <module>` again for each module (it adds the module file and its composition, and nothing else), then move the registrations of each module from `<context>.module.ts` to its module file, with their imports; a `composition/` folder declared in `extraDirectories` for this can go.
|
|
121
|
+
|
|
122
|
+
**The end-to-end support binds the fake identity provider admin once the identity preset is written.**
|
|
123
|
+
Opening an organisation queues `identity.organisation.opened` and `identity.member.joined`, whose
|
|
124
|
+
handlers call the identity provider admin; in a test run no provider answers, so the outbox retried
|
|
125
|
+
for ever and `settled()` failed (`outbox: 2 (2 failed, waiting for a retry)`) in every spec that opens
|
|
126
|
+
an organisation. `test/e2e/support/start-application.ts` now composes the contexts through
|
|
127
|
+
`contextsOfTheRun()`, the place where the fake of an outside system is bound, and the identity preset
|
|
128
|
+
(with `init --preset identity` or `generate context identity --preset identity`) binds
|
|
129
|
+
`FakeIdentityProviderAdmin` there. In the explicit style, `identityModule(platform, outside)` takes
|
|
130
|
+
the adapters a test run replaces.
|
|
131
|
+
|
|
132
|
+
To move: in a project written before, bind the fake yourself in `contextsOfTheRun()`; the support
|
|
133
|
+
of an existing project is not rewritten.
|
|
134
|
+
|
|
7
135
|
## 0.97.0
|
|
8
136
|
|
|
9
137
|
**Under the sandbox of the regulated profile, `prisma-generate` and `typeorm-generate` say that the database is out of reach instead of failing with a raw connection error.** A sandboxed command cannot open a TCP connection to the local PostgreSQL (probed on Claude Code 2.1.311 on Linux: `allowedDomains` with the host and the port, `allowLocalBinding` and `allowAllUnixSockets` all end in `ECONNREFUSED`; the sandbox's network leaves through an HTTP proxy only, and `allowLocalBinding` and `allowUnixSockets` are macOS settings), so `init` writes no setting for it. When `DATABASE_URL` is set and its server does not answer, the two commands stop before the ORM tool, exit 3 and say that migrations and database tests run outside the sandbox, by the owner or the CI. `drizzle-kit generate` needs no connection and is unchanged. The sandbox guide (and its French translation), the notes of `init` and the `persistence`, `parallel-work` and `story` skills say it.
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:e5847ce5e5fda748 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -30,7 +30,7 @@ Aucune dépendance d'exécution. Node 22.12 ou ultérieur.
|
|
|
30
30
|
npx ddd-ts-kit init
|
|
31
31
|
npx ddd-ts-kit generate context billing --classification core --term "Invoice=A request for payment"
|
|
32
32
|
npx ddd-ts-kit generate aggregate billing Invoice
|
|
33
|
-
npx ddd-ts-kit generate command billing IssueInvoice --aggregate Invoice --permission invoice.issue --grant accountant --term "Issue=To make an invoice final"
|
|
33
|
+
npx ddd-ts-kit generate command billing IssueInvoice --aggregate Invoice --creates --permission invoice.issue --grant accountant --term "Issue=To make an invoice final"
|
|
34
34
|
npx ddd-ts-kit generate route billing IssueInvoice --method POST --path /invoices
|
|
35
35
|
npx ddd-ts-kit check
|
|
36
36
|
```
|
|
@@ -193,7 +193,7 @@ lui remet, dans l'un ou l'autre assemblage. Une configuration écrite avant l'ex
|
|
|
193
193
|
Le même cas d'usage dans les deux styles. Dans le style déclaré, la commande et son gestionnaire
|
|
194
194
|
(handler) portent leur décorateur, et le constructeur du gestionnaire dit ce dont il a besoin. Le
|
|
195
195
|
corps du gestionnaire est celui qu'écrit
|
|
196
|
-
`generate command billing IssueInvoice --aggregate Invoice --permission invoice.issue`, avant
|
|
196
|
+
`generate command billing IssueInvoice --aggregate Invoice --creates --permission invoice.issue`, avant
|
|
197
197
|
que son `TODO(domain)` soit traité ; l'entrée de la commande est remplie :
|
|
198
198
|
|
|
199
199
|
<!-- checked sample -->
|
|
@@ -761,7 +761,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
761
761
|
| `domain-service` | `<context> <Name>` | service, *spec* |
|
|
762
762
|
| `state-machine` | `<context> <Aggregate> [--value <state>]... [--transition "<intention>:<from>[,<from>]...[><to>]"]...` | le vocabulaire `<Aggregate>Status` (créé depuis `--value`, deux états au moins, ou complété des valeurs qui lui manquent), `domain/state-machines/<aggregate>.state-machine.ts` (`<aggregate>Lifecycle` : chaque valeur un état, la première initiale, les transitions demandées, un `TODO(domain)` pour le refus de l'erreur du concept) et `test/unit/<aggregate>.state-machine.spec.ts` (chaque transition là où elle mène, un refus depuis un état qu'elle ne quitte pas) ; c'est à l'agrégat de l'utiliser |
|
|
763
763
|
| `repository` | `<context> <Aggregate> [--tenant-scoped] [--personal <colonne>,... [--subject <colonne>] [--erasure pseudonymise\|row] [--retention <colonne>:<n><d\|m\|y>]]` | le port `domain/repositories/<name>.repository.ts` (`abstract class <Name>Repository extends Repository<<Name>>`), l'adaptateur de l'ORM du projet (qui `implements` le port) avec son *mapper* et sa table (ou son modèle), un *fake*, une *spec* `repositoryContract` exécutée sur les deux, l'enregistrement. Sur un agrégat *event-sourced* (sa classe étend `EventSourcedAggregate`), ni table ni *mapper* : `event-store-<name>.repository.ts` délègue à `EventSourcedRepository` du kernel au-dessus de l'`EventStore` et du `PersonalDataCipher` que lie la plateforme, avec le codec de `<name>-events.mapper.ts` (la politique de *snapshot* laissée en `TODO(domain)`), le *fake* est cet adaptateur sur les stores en mémoire, et la suite de contrat s'exécute sur les deux (son cas de sauvegarde périmée en attente tant qu'un `mutate` qui enregistre un événement n'est pas ajouté) ; `--personal` y est refusé, les valeurs personnelles étant scellées dans les événements. Avec `--personal`, les colonnes de la table qui tiennent des données personnelles : ajoutées au stockage et au type de ligne en texte nullable (le *mapper* les écrit vides tant que l'agrégat ne les porte pas), déclarées à côté du *mapper* dans `<name>.personal-fields.ts` (`personalFields` du kernel : la colonne du sujet, `id` sauf si `--subject` nomme la colonne qui tient l'id de la personne, les champs, `pseudonymise` sauf `--erasure row`), épelées comme l'effacement de l'ORM les lit (noms SQL sur Knex et Prisma, propriétés sur Drizzle et TypeORM) ; et, une fois par contexte, son effacement : le port `application/ports/<context>-personal-data-erasure.port.ts` (`extends PersonalDataErasure`), l'adaptateur `<orm>-<context>-personal-data-erasure.repository.ts` sur `<Orm>PersonalDataErasure` du paquet d'ORM (confiné au *tenant* du travail avec `--tenant-scoped`), son *fake*, lié là où le contexte lie ses adaptateurs et listé dans `src/platform/privacy/data-subject-copies.ts`, pour que `npm run privacy:erase` l'atteigne ; et son export : le port `<context>-personal-data-export.port.ts` (`extends PersonalDataExport`), l'adaptateur `<orm>-<context>-personal-data-export.repository.ts` sur `<Orm>PersonalDataExport`, son *fake*, lié de même et listé dans `data-subject-exports.ts`, pour que `npm run privacy:export` le remette ; une seule *spec*, `test/integration/<context>-personal-data.spec.ts`, prouve les deux sur la base de test. Avec `--retention <colonne>:<n><d|m|y>`, la déclaration gagne `retention`, comptée depuis une colonne qui date la fin de la relation et rejoint le stockage en horodatage nullable, vide tant qu'elle dure (une colonne que la table garde pour elle, `registered_at` d'abord, est refusée : comptée depuis l'inscription, la purge effacerait des personnes encore clientes) et la *spec* prouve la purge de ce qui l'a dépassée. Une deuxième table du contexte rejoint les déclarations des deux adaptateurs. Refusé sans `stack.privacy` à `on` (`init --force --privacy on`), avec `--orm none` ou `custom`, et avant d'écrire quoi que ce soit pour une colonne qui n'en est pas une, une colonne que la table garde pour elle, un sujet listé comme personnel ou un mode qui n'existe pas |
|
|
764
|
-
| `command` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--aggregate <Name>]` | `<use-case>.command.ts` sur `AuthorizedCommand` (simple `Command` quand elle est publique), `<use-case>.handler.ts` (il construit l'agrégat, le sauvegarde et répond : les événements partent avec la sauvegarde), une *spec* par le bus avec le refus d'un acteur à qui manque la permission, l'enregistrement avec `.requires(...)` ou `.public()` (et le *repository* s'il manque). Une commande générée répond `void` ou l'identifiant de son agrégat, si bien qu'aucun `<use-case>.result.ts` n'est écrit |
|
|
764
|
+
| `command` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--aggregate <Name> [--creates]]` | `<use-case>.command.ts` sur `AuthorizedCommand` (simple `Command` quand elle est publique), `<use-case>.handler.ts` (avec `--aggregate`, il reçoit le *repository* et n'écrit rien tant que son `TODO(domain)` n'est pas traité : une commande change un agrégat qui existe ; avec `--creates`, il construit l'agrégat, le sauvegarde et répond son identifiant : les événements partent avec la sauvegarde), une *spec* par le bus avec le refus d'un acteur à qui manque la permission, l'enregistrement avec `.requires(...)` ou `.public()` (et le *repository* s'il manque). Une commande générée répond `void` ou l'identifiant de son agrégat, si bien qu'aucun `<use-case>.result.ts` n'est écrit |
|
|
765
765
|
| `query` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--search]` | `<use-case>.query.ts` sur `AuthorizedQuery` (simple `Query` quand elle est publique), `<use-case>.result.ts`, `<use-case>.handler.ts`, le port de lecture `application/ports/<use-case>-reader.port.ts` (une classe abstraite), son adaptateur en mémoire, un *fake*, une *spec*, l'enregistrement sur le bus de requêtes. Avec `--search` (demande `--permission`) : une `PageRequest` du kernel dans la requête, l'élément, le tri et `Page<Item>` dans le fichier de résultat, un gestionnaire qui demande `Access.scope` et remet le périmètre au port de lecture, un lecteur en mémoire qui pagine par décalage ou par curseur |
|
|
766
766
|
| `port` | `<context> <Name>` | `application/ports/<name>.port.ts`, une classe abstraite, et son *fake* |
|
|
767
767
|
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer] [--cache public\|private\|no-store]` | sous `"stack.routes": "controllers"` : une classe contrôleur dans `presentation/http/<resource>/<use-case>/` (la ressource est le premier segment du chemin), qui dépend de `CommandBus` ou de `QueryBus`, derrière le groupe de routes de sa ressource, écrit avec elle quand il est nouveau (`<resource>.routes.ts` : préfixe, étiquette, `Authenticated`) ; un cas d'usage public ne se tient dans aucun groupe et dit `guards: [Public]` ; avec class-validator, une classe par fichier (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`) ; `--mapper` et `--serializer` ajoutent un *mapper* de requête HTTP et un sérialiseur que reçoit le contrôleur ; une *spec* ; aucun enregistrement dans un projet déclaré, un contrôleur construit à la main dans `<context>.routes.ts` (le fichier de module en câblage manuel) dans un projet explicite. Sous `"functions"` : une fonction `defineRoute`, sa *spec*, son enregistrement dans `<context>.routes.ts`, et des classes `<use-case>-<role>.dto.ts` |
|
|
@@ -774,7 +774,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
774
774
|
| `schema` | `<context\|shared-kernel> <Name>` | `presentation/http/shared/<name>.schema.ts` du contexte, ou `presentation/<name>.schema.ts` du noyau partagé : une forme du contrat déclarée une fois (un schéma zod avec `.meta({ id })`, une classe class-validator, ou un schéma enveloppé par `sharedSchema`), à remplir ; les routes l'utilisent en entier, imbriquée ou en partie |
|
|
775
775
|
| `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | la déclaration `defineIntegrationEvent` dans le langage publié (sa charge utile dans `<event>.v<n>.payload.ts` avec class-validator ou un schéma à vous), l'export de l'index, le *publisher* `application/integration/publishers/<event>.publisher.ts`, une *spec*, l'enregistrement, une ligne de `platform/audit/audited-events.ts` |
|
|
776
776
|
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>` | `application/integration/handlers/<name>.integration-handler.ts`, une classe `<Name>IntegrationHandler` qui dépend de `CommandBus`, sa *spec*, son abonnement idempotent sous le nom de consommateur `<context>.<name>` ; refusé sauf si l'amont est déclaré |
|
|
777
|
-
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, une classe `DataSubjectErasedIntegrationHandler` qui efface ce que le contexte garde d'une personne par son `<Context>PersonalDataErasure` quand la plateforme annonce `privacy.data-subject.erased` (`dataSubjectErasedV1` du kernel), sa *spec* sur le *fake*, son abonnement idempotent sous le nom de consommateur `<context>.data-subject-erased` (dans une transaction derrière un *broker*) ; pour un contexte qui tourne comme un service à part ou copie des données personnelles depuis des événements. Refusé tant que le contexte n'a pas son effacement (`generate repository --personal`) |
|
|
777
|
+
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, une classe `DataSubjectErasedIntegrationHandler` qui efface ce que le contexte garde d'une personne par son `<Context>PersonalDataErasure` quand la plateforme annonce `privacy.data-subject.erased` (`dataSubjectErasedV1` du kernel), sa *spec* sur le *fake*, son abonnement idempotent sous le nom de consommateur `<context>.data-subject-erased` (dans une transaction derrière un *broker*) ; pour un contexte qui tourne comme un service à part ou copie des données personnelles depuis des événements. Refusé tant que le contexte n'a pas son effacement (`generate repository --personal`), et refusé sur un contexte en *event sourcing*, dont les valeurs personnelles s'effacent en détruisant la clé du sujet (`eraseDataSubject`) |
|
|
778
778
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase before-commit\|after-commit]` | réaction à un événement du domaine du contexte, *spec*, abonnement ; avant la validation (commit) de l'unité de travail par défaut, après elle avec `--phase after-commit` (un effet qu'aucune transaction ne couvre, au plus une fois), et la *spec* exécute la réaction dans cette phase |
|
|
779
779
|
| `projection` (`projector`) | `<context> <Name> <event-type>` | un projecteur dans `application/projections/<name>.projection.ts`, déclaré avec `@Projection('<context>.<name>')` et une méthode `@On(definition)` pour l'événement d'intégration, que publie le contexte lui-même ou un amont déclaré, et sa *spec*. Dans le style explicite sur tsyringe, le fichier de module du contexte l'inclut par `builder.include(<Name>Projection)` ; sur une plateforme câblée à la main, la classe est simple et le module la souscrit sous son nom de consommateur. Il tient un seul modèle de lecture : son port est reçu par le constructeur |
|
|
780
780
|
| `job` | `<context> <Name> (--every <duration> \| --cron "<expression>" [--time-zone <zone>]) --command <UseCaseName>` | `application/scheduling/<name>.job.ts`, une classe `<Name>Job implements ScheduledJob` qui envoie la commande, en tant que `systemActor('<context>.<name>')` quand elle est protégée, avec `execution.scheduledAt` quand la commande le prend ; `test/unit/<name>.job.spec.ts`, qui exécute le *job* (par son nom sur tsyringe, `application.jobs.runNow` ; `job.run(occurrence)` en câblage manuel) et vérifie la commande qu'il a envoyée ; son enregistrement ; son interrupteur dans `platform/jobs/job-settings.ts` ; l'autorisation de son acteur système (ci-dessous) |
|
|
@@ -1988,7 +1988,7 @@ par un *commit*), un tronc inconnu.
|
|
|
1988
1988
|
|
|
1989
1989
|
| Classe | Chemins | Résolution |
|
|
1990
1990
|
|---|---|---|
|
|
1991
|
-
| dérivé | `openapi/`, `clients/`, `docs/integration/`, `.dependency-cruiser.cjs`, les *barrels* et listes de chaque contexte | côté du tronc, réécrit par `regenerate` |
|
|
1991
|
+
| 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` |
|
|
1992
1992
|
| 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 |
|
|
1993
1993
|
| 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 |
|
|
1994
1994
|
| 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 |
|
|
@@ -2013,7 +2013,11 @@ par un *commit*), un tronc inconnu.
|
|
|
2013
2013
|
de la branche dont le tronc a pris le numéro depuis la base reçoit le prochain libre (ses
|
|
2014
2014
|
fichiers, son titre `# ADR-NNNN`, les liens de ses traductions, consignés en lignes
|
|
2015
2015
|
`Lost-Accepted:`).
|
|
2016
|
-
6. **`regenerate`** (sauté sans la configuration du kit ou le script) ; un échec arrête.
|
|
2016
|
+
6. **`regenerate`** (sauté sans la configuration du kit ou le script) ; un échec arrête. Avec
|
|
2017
|
+
Prisma, quand la fusion a changé un fichier de `prisma/schema/`, puis `npm run db:client` : le
|
|
2018
|
+
client et `generated/schema.sql`, ignorés par git et lus par la base de test en processus, en
|
|
2019
|
+
sont dérivés ; un échec arrête. Drizzle, Knex et TypeORM ne dérivent aucun fichier de ce genre
|
|
2020
|
+
(leur base de test lit les sources suivies), donc ils ne lancent rien de plus.
|
|
2017
2021
|
7. **`verify-merge`** sur le résultat non commité, sur la base qu'enregistre le *trailer* : une
|
|
2018
2022
|
erreur arrête (sortie 1), avec `file:line (ours|theirs) <text>`, les lignes du plan qui ne
|
|
2019
2023
|
sont plus terminées, les tests perdus ; `--continue --accept-lost` les consigne dans un
|
|
@@ -2024,7 +2028,7 @@ par un *commit*), un tronc inconnu.
|
|
|
2024
2028
|
de côté et le bloque jusqu'à ce qu'il soit indexé ou mis de côté. Les *hooks* du projet
|
|
2025
2029
|
tournent.
|
|
2026
2030
|
|
|
2027
|
-
`--abort` défait la fusion en cours comme `git merge --abort` et oublie son état. Chaque arrêt
|
|
2031
|
+
`--abort` défait la fusion en cours comme `git merge --abort` et oublie son état ; les fichiers dérivés que le kit a régénérés (`docs/behaviour/`, `CONTEXT.md`, la carte des contextes, ...) et modifiés après leur indexation par la fusion sont restaurés et nommés. `--continue` conclut le *commit* du tronc avec lequel la fusion a commencé : si la référence du tronc en nomme un autre maintenant, le rapport le dit (`trunkMoved: { merged, now }` en `--json`) et dit de relancer `merge-trunk` une fois la fusion validée. Chaque arrêt
|
|
2028
2032
|
dit quoi faire ensuite et garde la fusion en cours pour le `--continue` suivant. git 2.40 est
|
|
2029
2033
|
nécessaire pour une base que git ne calculerait pas ; un git plus ancien fusionne avec
|
|
2030
2034
|
`git merge` lui-même depuis `git merge-base` (`--since <merge base>`), et refuse `--dry-run`.
|
|
@@ -2164,7 +2168,12 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
2164
2168
|
`ddd-ts-kit explain <rule-id>` affiche le même genre de mauvais et de bon exemple pour chaque
|
|
2165
2169
|
règle.
|
|
2166
2170
|
|
|
2167
|
-
- `paths` et `--changed-since` limitent ce qui est signalé, pas ce qui est analysé.
|
|
2171
|
+
- `paths` et `--changed-since` limitent ce qui est signalé, pas ce qui est analysé. `--changed-since`
|
|
2172
|
+
garde une violation quand le fichier où elle se trouve a changé, ou quand un fichier qu'elle nomme
|
|
2173
|
+
dans ses `subjects` (avec `--json`) a changé : un constat signalé sur un handler mais réparé dans le
|
|
2174
|
+
fichier de module (`events/consumer-idempotent`, `declarations/port-adapter-wired`, `authz/declared`,
|
|
2175
|
+
`authz/policy-asked`) apparaît quand seul ce fichier de module a changé. Les fichiers changés sont ceux
|
|
2176
|
+
modifiés depuis la base de fusion, commités ou non.
|
|
2168
2177
|
- `--baseline write` consigne les erreurs qu'un projet a déjà, comptées par fichier et par règle,
|
|
2169
2178
|
dans `ddd-ts-kit-baseline.json` (la forme de `eslint-suppressions.json`), pour un code existant
|
|
2170
2179
|
qui adopte le kit ; commitez-le. Dès lors, `check` et `check-file` (le *hook* de l'agent) taisent
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ No runtime dependency. Node 22.12 or later.
|
|
|
28
28
|
npx ddd-ts-kit init
|
|
29
29
|
npx ddd-ts-kit generate context billing --classification core --term "Invoice=A request for payment"
|
|
30
30
|
npx ddd-ts-kit generate aggregate billing Invoice
|
|
31
|
-
npx ddd-ts-kit generate command billing IssueInvoice --aggregate Invoice --permission invoice.issue --grant accountant --term "Issue=To make an invoice final"
|
|
31
|
+
npx ddd-ts-kit generate command billing IssueInvoice --aggregate Invoice --creates --permission invoice.issue --grant accountant --term "Issue=To make an invoice final"
|
|
32
32
|
npx ddd-ts-kit generate route billing IssueInvoice --method POST --path /invoices
|
|
33
33
|
npx ddd-ts-kit check
|
|
34
34
|
```
|
|
@@ -177,7 +177,7 @@ A config written before `stack.style` existed is explicit.
|
|
|
177
177
|
|
|
178
178
|
The same use case in both styles. In the declared style, the command and its handler carry their
|
|
179
179
|
decorator, and the handler's constructor says what it needs. The body of the handler is the one
|
|
180
|
-
`generate command billing IssueInvoice --aggregate Invoice --permission invoice.issue` writes,
|
|
180
|
+
`generate command billing IssueInvoice --aggregate Invoice --creates --permission invoice.issue` writes,
|
|
181
181
|
before its `TODO(domain)` is answered; the input of the command is filled in:
|
|
182
182
|
|
|
183
183
|
<!-- checked sample -->
|
|
@@ -732,7 +732,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
732
732
|
| `domain-service` | `<context> <Name>` | service, spec |
|
|
733
733
|
| `state-machine` | `<context> <Aggregate> [--value <state>]... [--transition "<intention>:<from>[,<from>]...[><to>]"]...` | the vocabulary `<Aggregate>Status` (created from `--value`, two states at least, or given the values it misses), `domain/state-machines/<aggregate>.state-machine.ts` (`<aggregate>Lifecycle`: every value a state, the first one initial, the transitions asked, a `TODO(domain)` for the refusal of the concept error) and `test/unit/<aggregate>.state-machine.spec.ts` (each transition where it leads, a refusal from a state it does not leave); the aggregate is left to use it |
|
|
734
734
|
| `repository` | `<context> <Aggregate> [--tenant-scoped] [--personal <column>,... [--subject <column>] [--erasure pseudonymise\|row] [--retention <column>:<n><d\|m\|y>]]` | the port `domain/repositories/<name>.repository.ts` (`abstract class <Name>Repository extends Repository<<Name>>`), the adapter of the project's ORM (`implements` the port) with its mapper and table (or model), a fake, one `repositoryContract` spec run on both, registration. On an event-sourced aggregate (its class extends `EventSourcedAggregate`) there is no table nor mapper: `event-store-<name>.repository.ts` delegates to `EventSourcedRepository` of the kernel over the `EventStore` and the `PersonalDataCipher` the platform binds, with the codec of `<name>-events.mapper.ts` (the snapshot policy left as a `TODO(domain)`), the fake is that adapter over the in-memory stores, and the contract suite runs on both (its stale-save case pending until a `mutate` that records an event is added); `--personal` is refused there, the personal values being sealed in the events. With `--personal`, the columns of the table that hold personal data: added to the storage and to the row type as nullable text (the mapper writes them empty until the aggregate carries them), declared next to the mapper in `<name>.personal-fields.ts` (`personalFields` of the kernel: the subject column, `id` unless `--subject` names the column that holds the id of the person, the fields, `pseudonymise` unless `--erasure row`), spelled as the erasure of the ORM reads them (SQL names on Knex and Prisma, properties on Drizzle and TypeORM); and, once per context, its erasure: the port `application/ports/<context>-personal-data-erasure.port.ts` (`extends PersonalDataErasure`), the adapter `<orm>-<context>-personal-data-erasure.repository.ts` over `<Orm>PersonalDataErasure` of the ORM package (confined to the tenant of the work with `--tenant-scoped`), its fake, bound where the context binds its adapters and listed in `src/platform/privacy/data-subject-copies.ts`, so that `npm run privacy:erase` reaches it; and its export: the port `<context>-personal-data-export.port.ts` (`extends PersonalDataExport`), the adapter `<orm>-<context>-personal-data-export.repository.ts` over `<Orm>PersonalDataExport`, its fake, bound the same way and listed in `data-subject-exports.ts`, so that `npm run privacy:export` hands it over; one spec, `test/integration/<context>-personal-data.spec.ts`, proves both on the test database. With `--retention <column>:<n><d|m|y>`, the declaration gains `retention`, counted from a column that dates the end of the relation and joins the storage as a nullable timestamp, empty while it lasts (a column the table keeps for itself, `registered_at` first, is refused: counted from the registration, the purge would erase people who are still customers) and the spec proves the purge of what outlived it. A second table of the context joins the declarations of both adapters. Refused without `stack.privacy` on (`init --force --privacy on`), with `--orm none` or `custom`, and before anything is written for a column that is not one, a column the table keeps for itself, a subject listed as personal or a mode that does not exist |
|
|
735
|
-
| `command` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--aggregate <Name>]` | `<use-case>.command.ts` on `AuthorizedCommand` (plain `Command` when public), `<use-case>.handler.ts` (it builds the aggregate, saves it and answers: the events leave with the save), spec through the bus with the refusal of an actor who lacks the permission, registration with `.requires(...)` or `.public()` (and the repository when missing). A generated command answers `void` or the identifier of its aggregate, so no `<use-case>.result.ts` is written |
|
|
735
|
+
| `command` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--aggregate <Name> [--creates]]` | `<use-case>.command.ts` on `AuthorizedCommand` (plain `Command` when public), `<use-case>.handler.ts` (with `--aggregate` it receives the repository and writes nothing until its `TODO(domain)` is answered: a command changes an aggregate that exists; with `--creates` it builds the aggregate, saves it and answers its identifier: the events leave with the save), spec through the bus with the refusal of an actor who lacks the permission, registration with `.requires(...)` or `.public()` (and the repository when missing). A generated command answers `void` or the identifier of its aggregate, so no `<use-case>.result.ts` is written |
|
|
736
736
|
| `query` | `<context> <UseCaseName> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--search]` | `<use-case>.query.ts` on `AuthorizedQuery` (plain `Query` when public), `<use-case>.result.ts`, `<use-case>.handler.ts`, the read port `application/ports/<use-case>-reader.port.ts` (an abstract class), its in-memory adapter, fake, spec, registration on the query bus. With `--search` (needs `--permission`): a kernel `PageRequest` in the query, the item, the sort and `Page<Item>` in the result file, a handler that asks `Access.scope` and hands the scope to the read port, an in-memory reader paging by offset or cursor |
|
|
737
737
|
| `port` | `<context> <Name>` | `application/ports/<name>.port.ts`, one abstract class, and its fake |
|
|
738
738
|
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer] [--cache public\|private\|no-store]` | under `"stack.routes": "controllers"`: a controller class in `presentation/http/<resource>/<use-case>/` (the resource is the first segment of the path), depending on `CommandBus` or `QueryBus`, behind the route group of its resource, written with it when it is new (`<resource>.routes.ts`: prefix, tag, `Authenticated`); a public use case stands in no group and says `guards: [Public]`; with class-validator one class per file (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`); `--mapper` and `--serializer` add a request mapper and a serializer the controller is given; a spec; no registration in a declared project, a controller built by hand in `<context>.routes.ts` (the module file with hand wiring) in an explicit one. Under `"functions"`: a `defineRoute` function, its spec, its registration in `<context>.routes.ts`, and `<use-case>-<role>.dto.ts` classes |
|
|
@@ -745,7 +745,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
745
745
|
| `schema` | `<context\|shared-kernel> <Name>` | `presentation/http/shared/<name>.schema.ts` of the context, or `presentation/<name>.schema.ts` of the shared kernel: one shape of the contract declared once (a zod schema with `.meta({ id })`, a class-validator class, or a schema wrapped by `sharedSchema`), to fill; the routes use it whole, nested or in part |
|
|
746
746
|
| `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | `defineIntegrationEvent` declaration in the published language (its payload in `<event>.v<n>.payload.ts` with class-validator or a schema of your own), index export, the publisher `application/integration/publishers/<event>.publisher.ts`, spec, registration, a line of `platform/audit/audited-events.ts` |
|
|
747
747
|
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>` | `application/integration/handlers/<name>.integration-handler.ts`, a class `<Name>IntegrationHandler` depending on `CommandBus`, its spec, its idempotent subscription under the consumer name `<context>.<name>`; refused unless the upstream is declared |
|
|
748
|
-
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, a class `DataSubjectErasedIntegrationHandler` that erases what the context keeps of a person through its `<Context>PersonalDataErasure` when the platform announces `privacy.data-subject.erased` (`dataSubjectErasedV1` of the kernel), its spec on the fake, its idempotent subscription under the consumer name `<context>.data-subject-erased` (in a transaction behind a broker); for a context that runs as a service of its own or copies personal data from events. Refused until the context has its erasure (`generate repository --personal`) |
|
|
748
|
+
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, a class `DataSubjectErasedIntegrationHandler` that erases what the context keeps of a person through its `<Context>PersonalDataErasure` when the platform announces `privacy.data-subject.erased` (`dataSubjectErasedV1` of the kernel), its spec on the fake, its idempotent subscription under the consumer name `<context>.data-subject-erased` (in a transaction behind a broker); for a context that runs as a service of its own or copies personal data from events. Refused until the context has its erasure (`generate repository --personal`), and refused on an event-sourced context, whose personal values are erased by destroying the key of the subject (`eraseDataSubject`) |
|
|
749
749
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase before-commit\|after-commit]` | reaction to a domain event of the context, spec, subscription; before the commit of the unit of work by default, after it with `--phase after-commit` (an effect no transaction covers, at most once), and the spec runs the reaction in that phase |
|
|
750
750
|
| `projection` (`projector`) | `<context> <Name> <event-type>` | a projector in `application/projections/<name>.projection.ts`, declared with `@Projection('<context>.<name>')` and one `@On(definition)` method for the integration event, which the context itself or a declared upstream publishes, and its spec. In the explicit style on tsyringe the module file of the context includes it with `builder.include(<Name>Projection)`; on a hand-wired platform the class is plain and the module subscribes it under its consumer name. It keeps one read model: its port is received in the constructor |
|
|
751
751
|
| `job` | `<context> <Name> (--every <duration> \| --cron "<expression>" [--time-zone <zone>]) --command <UseCaseName>` | `application/scheduling/<name>.job.ts`, a class `<Name>Job implements ScheduledJob` that sends the command, as `systemActor('<context>.<name>')` when it is protected, with `execution.scheduledAt` when the command takes it; `test/unit/<name>.job.spec.ts`, which runs the job (by name on tsyringe, `application.jobs.runNow`; `job.run(occurrence)` with hand wiring) and asserts the command it sent; its registration; its switch in `platform/jobs/job-settings.ts`; the grant of its system actor (below) |
|
|
@@ -1869,7 +1869,7 @@ ends with a commit), an unknown trunk.
|
|
|
1869
1869
|
|
|
1870
1870
|
| Class | Paths | Resolution |
|
|
1871
1871
|
|---|---|---|
|
|
1872
|
-
| derived | `openapi/`, `clients/`, `docs/integration/`, `.dependency-cruiser.cjs`, the barrels and lists of each context | trunk side, rewritten by `regenerate` |
|
|
1872
|
+
| derived | `openapi/`, `clients/`, `docs/integration/`, `docs/behaviour/`, `.dependency-cruiser.cjs`, the barrels and lists of each context | trunk side, rewritten by `regenerate` |
|
|
1873
1873
|
| mixed document | `CONTEXT.md`, `docs/context-map.md` | a conflict inside a `<!-- ddd-ts-kit:<region> -->` region: trunk side; outside: for you |
|
|
1874
1874
|
| 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` |
|
|
1875
1875
|
| 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 |
|
|
@@ -1891,7 +1891,11 @@ ends with a commit), an unknown trunk.
|
|
|
1891
1891
|
names a table one of the branch names (generate it again on the trunk); a decision record of
|
|
1892
1892
|
the branch whose number the trunk took since the base gets the next free one (its files, its
|
|
1893
1893
|
`# ADR-NNNN` title, the links of its translations, recorded as `Lost-Accepted:` lines).
|
|
1894
|
-
6. **`regenerate`** (skipped without the config of the kit or the script); a failure stops.
|
|
1894
|
+
6. **`regenerate`** (skipped without the config of the kit or the script); a failure stops. With
|
|
1895
|
+
Prisma, when the merge changed a file under `prisma/schema/`, then `npm run db:client`: the
|
|
1896
|
+
git-ignored client and `generated/schema.sql`, which the in-process test database reads, are
|
|
1897
|
+
derived from it; a failure stops. Drizzle, Knex and TypeORM derive no such file (their test
|
|
1898
|
+
database reads the tracked sources), so they run nothing more.
|
|
1895
1899
|
7. **`verify-merge`** on the uncommitted result, on the base the trailer records: an error stops
|
|
1896
1900
|
(exit 1), with `file:line (ours|theirs) <text>`, the rows no longer done, the tests lost;
|
|
1897
1901
|
`--continue --accept-lost` records them in a `Lost-Accepted:` trailer and goes on.
|
|
@@ -1900,7 +1904,7 @@ ends with a commit), an unknown trunk.
|
|
|
1900
1904
|
stored-events lock). Any other changed path is listed as left out and blocks it until it is
|
|
1901
1905
|
staged or set aside. The hooks of the project run.
|
|
1902
1906
|
|
|
1903
|
-
`--abort` undoes the merge in progress as `git merge --abort` does and forgets its state. Each stop
|
|
1907
|
+
`--abort` undoes the merge in progress as `git merge --abort` does and forgets its state; the derived files the kit regenerated (`docs/behaviour/`, `CONTEXT.md`, the context map, ...) and modified after the merge staged them are restored and named. `--continue` concludes the trunk commit the merge started from: when the trunk ref names another commit now, the report says so (`trunkMoved: { merged, now }` in `--json`) and tells to run `merge-trunk` again once the merge is committed. Each stop
|
|
1904
1908
|
says what to do next and keeps the merge in progress for the next `--continue`. git 2.40 is needed
|
|
1905
1909
|
for a base git would not compute; an older git merges with `git merge` itself from
|
|
1906
1910
|
`git merge-base` (`--since <merge base>`), and refuses `--dry-run`. Exit 0 once committed, up to
|
|
@@ -1922,7 +1926,7 @@ next: resolve each hunk, `git add <file>`, then `npx ddd-ts-kit merge-trunk --co
|
|
|
1922
1926
|
```
|
|
1923
1927
|
|
|
1924
1928
|
`--json` prints the same report:
|
|
1925
|
-
`{ status, branch, trunk: { ref, commit }, base: { commit, evidence, landedAs?, unlanded?, notOnTrunk? }, conflicts: { plainMerge, ownDiff, automatic, forYou }, automatic: [{ file, kind, how }], forYou: [{ file, kind, why, hunks, ours: { branch, rows, change }, theirs: { ref, commits, change }, advice }], migrations, regenerate: { status, output? }, lostLines: { errors, warnings, accepted } | null, leftOut, stop?, commit?, next }`,
|
|
1929
|
+
`{ status, branch, trunk: { ref, commit }, base: { commit, evidence, landedAs?, unlanded?, notOnTrunk? }, conflicts: { plainMerge, ownDiff, automatic, forYou }, automatic: [{ file, kind, how }], forYou: [{ file, kind, why, hunks, ours: { branch, rows, change }, theirs: { ref, commits, change }, advice }], migrations, regenerate: { status, output? }, client?: { status, output? }, trunkMoved?: { merged, now }, lostLines: { errors, warnings, accepted } | null, leftOut, stop?, commit?, next }`,
|
|
1926
1930
|
`status` being `up-to-date`, `dry-run`, `stopped` or `committed` and `evidence` `option`,
|
|
1927
1931
|
`landed`, `recorded` or `merge-base`. The guard of the plugin refuses `--to-land` to a sub-agent:
|
|
1928
1932
|
landing a branch is the conductor's step, just before its squash merge.
|
|
@@ -2039,7 +2043,11 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
2039
2043
|
|
|
2040
2044
|
`ddd-ts-kit explain <rule-id>` prints the same kind of bad and good example for every rule.
|
|
2041
2045
|
|
|
2042
|
-
- `paths` and `--changed-since` limit what is reported, not what is analysed.
|
|
2046
|
+
- `paths` and `--changed-since` limit what is reported, not what is analysed. `--changed-since` keeps a
|
|
2047
|
+
violation when the file it sits on changed, or when a file it names as its `subjects` did (in `--json`):
|
|
2048
|
+
a finding reported on a handler but repaired in the module file (`events/consumer-idempotent`,
|
|
2049
|
+
`declarations/port-adapter-wired`, `authz/declared`, `authz/policy-asked`) shows when only that
|
|
2050
|
+
module file changed. The changed files are those since the merge base, committed or not.
|
|
2043
2051
|
- `--baseline write` records the errors a project already has, counted by file and by rule, in
|
|
2044
2052
|
`ddd-ts-kit-baseline.json` (the shape of `eslint-suppressions.json`), for a codebase that adopts
|
|
2045
2053
|
the kit; commit it. From then on `check` and `check-file` (the hook of the agent) leave quiet the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stray-entry.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/stray-entry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAK3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"stray-entry.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/stray-entry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAK3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAkB1C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAc1E"}
|
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { CONTEXT_FILES } from '../../context-files/index.js';
|
|
3
3
|
import { controllersFile } from '../../nest-controllers/controllers-file.js';
|
|
4
4
|
import { barrelFile, dependenciesFile, isDeclarationsFile } from '../../declared/index.js';
|
|
5
|
-
import { declaredModules, moduleSplit, WITHOUT_MODULE } from '../../model-modules/index.js';
|
|
5
|
+
import { declaredModules, moduleFileOf, moduleOfModuleFile, moduleSplit, WITHOUT_MODULE } from '../../model-modules/index.js';
|
|
6
6
|
import { isCanonicalDirectory } from './is-canonical-directory.js';
|
|
7
7
|
import { OPEN_DIRECTORIES } from './open-directories.js';
|
|
8
8
|
import { roleOf } from './role-of.js';
|
|
@@ -16,6 +16,10 @@ export function strayEntry(entry, config) {
|
|
|
16
16
|
if (placed === undefined || (placed.module !== undefined && placed.inside === '') || inDotDirectory(entry)) {
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
|
+
// At its root, a module of the model holds its module file, which the module file of the context composes.
|
|
20
|
+
if (moduleOfModuleFile(placed.inside, placed.modules) !== undefined) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
19
23
|
return entry.endsWith('/') ? strayDirectory(placed) : straySource(placed);
|
|
20
24
|
}
|
|
21
25
|
/** A dot-directory of a context (the `.claude/` a sandbox leaves) is written by a tool: it is no part of the tree. */
|
|
@@ -33,11 +37,13 @@ function place(entry, config) {
|
|
|
33
37
|
if (rest.length === 0) {
|
|
34
38
|
return undefined;
|
|
35
39
|
}
|
|
36
|
-
const
|
|
40
|
+
const modules = declaredModules(config, context);
|
|
41
|
+
const { module, path: inside } = moduleSplit(rest.join('/'), modules);
|
|
37
42
|
return {
|
|
38
43
|
context,
|
|
39
44
|
declared: stack.style === 'declared',
|
|
40
45
|
inside,
|
|
46
|
+
modules,
|
|
41
47
|
...(module === undefined ? {} : { module }),
|
|
42
48
|
extras: contexts[context]?.extraDirectories ?? [],
|
|
43
49
|
};
|
|
@@ -72,6 +78,12 @@ function straySource(placed) {
|
|
|
72
78
|
if (open || generated || roleOf(directory) !== undefined || coveredByExtra(extras, directory)) {
|
|
73
79
|
return undefined;
|
|
74
80
|
}
|
|
81
|
+
if (placed.modules.includes(directory)) {
|
|
82
|
+
return {
|
|
83
|
+
message: `"${inside}" sits at the root of the module ${directory}.`,
|
|
84
|
+
fix: `Move it into the directory of its role (${directory}/<layer>/<role>/); only ${moduleFileOf(directory)}, its module file in the explicit style, lives at the root of a module.`,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
75
87
|
return {
|
|
76
88
|
message: `"${inside}" is not in a role directory.`,
|
|
77
89
|
fix: `Move it one level down into the directory of its role (for example ${directory.split('/')[0] ?? directory}/<role>/), so that its suffix and its tests can be checked.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stray-entry.js","sourceRoot":"","sources":["../../../src/check/canonical/stray-entry.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;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SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACtC,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,QAAQ;QACtB,CAAC,CAAC,eAAe,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,OAAO,YAAY;QAC5G,CAAC,CAAC,eAAe,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,OAAO,YAAY,CAAC;IAEtE,OAAO;QACL,OAAO,EAAE,IAAI,IAAI,oCAAoC;QACrD,GAAG,EAAE,gDAAgD,OAAO,iCAAiC;KAC9F,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,MAAyB,EAAE,SAAiB;IAClE,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,CACzG,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
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
|
|
3
|
+
* tracked files modified in the index or the working tree (committed or not), and new files git does not track yet, which a generator has just
|
|
4
4
|
* written and nothing has staged. The only place git is invoked, and only to read the user's own
|
|
5
5
|
* history.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAanE"}
|
|
@@ -2,13 +2,14 @@ import { execFileSync } from 'node:child_process';
|
|
|
2
2
|
import { CliError } from '../../cli-error.js';
|
|
3
3
|
/**
|
|
4
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
|
|
5
|
+
* tracked files modified in the index or the working tree (committed or not), and new files git does not track yet, which a generator has just
|
|
6
6
|
* written and nothing has staged. The only place git is invoked, and only to read the user's own
|
|
7
7
|
* history.
|
|
8
8
|
*/
|
|
9
9
|
export function changedFiles(root, ref) {
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
11
|
+
const [base = ref] = gitLines(root, ['merge-base', ref, 'HEAD']);
|
|
12
|
+
const changed = gitLines(root, ['diff', '--name-only', '--relative', base]);
|
|
12
13
|
const untracked = gitLines(root, ['ls-files', '--others', '--exclude-standard']);
|
|
13
14
|
return new Set([...changed, ...untracked]);
|
|
14
15
|
}
|
|
@@ -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,iBAAiB,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,GAAW;IACpD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"changed-files.js","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AA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.d.ts","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"check-command.d.ts","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;AA2BtD,eAAO,MAAM,YAAY,EAAE,OA8B1B,CAAC"}
|
|
@@ -20,6 +20,7 @@ import { loadLooseProject } from '../project/load-loose-project.js';
|
|
|
20
20
|
import { loadProject } from '../project/load-project.js';
|
|
21
21
|
import { toPosix } from '../project/to-posix.js';
|
|
22
22
|
import { changedFiles } from './changed-files.js';
|
|
23
|
+
import { isReportedSince } from './is-reported-since.js';
|
|
23
24
|
import { knownRules } from './known-rules.js';
|
|
24
25
|
import { selfCheck } from './self-check.js';
|
|
25
26
|
const FORMATS = ['text', 'json', 'github', 'gitlab'];
|
|
@@ -68,7 +69,7 @@ function checkProject(args, rules) {
|
|
|
68
69
|
const scopes = args.positionals.map((entry) => toPosix(path.relative(root, path.resolve(cwd, entry))).replace(/\/$/, ''));
|
|
69
70
|
const ref = args.text('changed-since');
|
|
70
71
|
const changed = ref === undefined ? undefined : changedFiles(root, ref);
|
|
71
|
-
const reported = result.violations.filter((violation) => isInScope(violation, scopes) && (
|
|
72
|
+
const reported = result.violations.filter((violation) => isInScope(violation, scopes) && isReportedSince(violation, changed));
|
|
72
73
|
return summarize(reported, result);
|
|
73
74
|
}
|
|
74
75
|
/** The errors the baseline of the project records stay quiet; a count it no longer reaches is judged when every rule ran. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-command.js","sourceRoot":"","sources":["../../../src/check/commands/check-command.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,E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|
|
|
1
|
+
import type { Violation } from '../model/violation.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether `check --changed-since` reports a violation: the file it sits on changed, or one of the
|
|
4
|
+
* files it names as its subjects (where it is repaired) did. Without a set of changed files,
|
|
5
|
+
* every violation is reported.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isReportedSince(violation: Violation, changed: ReadonlySet<string> | undefined): boolean;
|
|
8
|
+
//# sourceMappingURL=is-reported-since.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-reported-since.d.ts","sourceRoot":"","sources":["../../../src/check/commands/is-reported-since.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAIvG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether `check --changed-since` reports a violation: the file it sits on changed, or one of the
|
|
3
|
+
* files it names as its subjects (where it is repaired) did. Without a set of changed files,
|
|
4
|
+
* every violation is reported.
|
|
5
|
+
*/
|
|
6
|
+
export function isReportedSince(violation, changed) {
|
|
7
|
+
return (changed === undefined || changed.has(violation.file) || (violation.subjects ?? []).some((path) => changed.has(path)));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=is-reported-since.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-reported-since.js","sourceRoot":"","sources":["../../../src/check/commands/is-reported-since.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,SAAoB,EAAE,OAAwC;IAC5F,OAAO,CACL,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CACrH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-handlers-of.d.ts","sourceRoot":"","sources":["../../../src/check/domain-events/event-handlers-of.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-handlers-of.d.ts","sourceRoot":"","sources":["../../../src/check/domain-events/event-handlers-of.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAmClF"}
|