ddd-ts-kit 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +1273 -0
  2. package/README.fr.md +2 -1
  3. package/README.md +1 -0
  4. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  5. package/dist/check/catalogue/architecture-rules.js +2 -0
  6. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  7. package/dist/check/explain/events-docs.d.ts.map +1 -1
  8. package/dist/check/explain/events-docs.js +13 -2
  9. package/dist/check/explain/events-docs.js.map +1 -1
  10. package/dist/check/fixtures/event-sourcing-fixtures.js +3 -3
  11. package/dist/check/fixtures/event-sourcing-fixtures.js.map +1 -1
  12. package/dist/check/fixtures/events-fixtures.d.ts.map +1 -1
  13. package/dist/check/fixtures/events-fixtures.js +30 -1
  14. package/dist/check/fixtures/events-fixtures.js.map +1 -1
  15. package/dist/check/fixtures/language-fixtures.d.ts.map +1 -1
  16. package/dist/check/fixtures/language-fixtures.js +1 -1
  17. package/dist/check/fixtures/language-fixtures.js.map +1 -1
  18. package/dist/check/rules/events-name-declared-once.d.ts +3 -0
  19. package/dist/check/rules/events-name-declared-once.d.ts.map +1 -0
  20. package/dist/check/rules/events-name-declared-once.js +51 -0
  21. package/dist/check/rules/events-name-declared-once.js.map +1 -0
  22. package/dist/init/manifest/versions.js +24 -24
  23. package/dist/progress/format-progress.js +4 -0
  24. package/dist/progress/format-progress.js.map +1 -1
  25. package/dist/progress/progress.d.ts +2 -0
  26. package/dist/progress/progress.d.ts.map +1 -1
  27. package/dist/progress/read-progress.js +1 -0
  28. package/dist/progress/read-progress.js.map +1 -1
  29. package/dist/progress/read-slices.d.ts +5 -1
  30. package/dist/progress/read-slices.d.ts.map +1 -1
  31. package/dist/progress/read-slices.js +17 -7
  32. package/dist/progress/read-slices.js.map +1 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/version.js +1 -1
  35. package/package.json +5 -3
  36. package/templates/init/rules/domain.md.tpl +1 -1
  37. package/templates/pipeline/package-scripts.json +1 -1
@@ -28,7 +28,7 @@ paths:
28
28
  {{#if valueObjects.result}}
29
29
  - A value object returns its refusals in the `Result` of `create`{{#if refusals.factories}}: `err(PersonError.invalidEmail(raw))`{{/if}}; the caller unwraps it with `unwrap(..)` of the kernel. `npx ddd-ts-kit value-objects` moves the project to factories that throw.
30
30
  {{/if}}
31
- - Domain events are named in the past tense, `<context>.<aggregate>.<fact>` (`events/name-format`), and recorded by the aggregate (`this.record(...)`). They leave with the save: nothing here dispatches them.
31
+ - Domain events are named in the past tense, `<context>.<aggregate>.<fact>` (`events/name-format`), declared once on the class, `static readonly eventName`, which `readonly name` reads (`events/name-declared-once`), and recorded by the aggregate (`this.record(...)`). They leave with the save: nothing here dispatches them.
32
32
  - An aggregate whose history is the business can be event-sourced, chosen per aggregate (`generate aggregate <context> <Name> --event-sourced`): it extends `EventSourcedAggregate`, a command checks the invariants then `this.record(...)`, and only its `apply<Fact>` methods (and `restore`, for a snapshot) change the state (`event-sourcing/state-in-apply`). Its events are named in the past tense (`event-sourcing/past-tense`). The other aggregates keep their state in tables.
33
33
  - A repository here is a port: an abstract class extending the kernel `Repository<Aggregate>`, abstract members only (`ports/abstract-class`). A domain service is stateless.
34
34
  - Time and identifiers come in as parameters (`purity/*`); nothing here knows the acting user or its rights (`authz/in-application`).
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.5.15",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.18.0",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.19.0",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",