ddd-ts-kit 0.27.0 → 0.83.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.
- package/CHANGELOG.md +232 -0
- package/README.fr.md +186 -72
- package/README.md +177 -71
- package/dist/check/canonical/role.d.ts +2 -0
- package/dist/check/canonical/role.d.ts.map +1 -1
- package/dist/check/canonical/roles.js +1 -1
- package/dist/check/canonical/roles.js.map +1 -1
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +6 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +2 -0
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/catalogue/eslint-only-rules.js +3 -3
- package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
- package/dist/check/commands/check-command.d.ts.map +1 -1
- package/dist/check/commands/check-command.js +4 -1
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/commands/explain-command.d.ts.map +1 -1
- package/dist/check/commands/explain-command.js +2 -9
- package/dist/check/commands/explain-command.js.map +1 -1
- package/dist/check/engine/format-check.d.ts +6 -1
- package/dist/check/engine/format-check.d.ts.map +1 -1
- package/dist/check/engine/format-check.js +33 -11
- package/dist/check/engine/format-check.js.map +1 -1
- package/dist/check/errors/builds-through-factories.d.ts +4 -1
- package/dist/check/errors/builds-through-factories.d.ts.map +1 -1
- package/dist/check/errors/builds-through-factories.js +6 -2
- package/dist/check/errors/builds-through-factories.js.map +1 -1
- package/dist/check/errors/code-entry.d.ts +8 -0
- package/dist/check/errors/code-entry.d.ts.map +1 -0
- package/dist/check/errors/code-entry.js +2 -0
- package/dist/check/errors/code-entry.js.map +1 -0
- package/dist/check/errors/code-list-name.d.ts +3 -0
- package/dist/check/errors/code-list-name.d.ts.map +1 -0
- package/dist/check/errors/code-list-name.js +6 -0
- package/dist/check/errors/code-list-name.js.map +1 -0
- package/dist/check/errors/code-list.d.ts +10 -0
- package/dist/check/errors/code-list.d.ts.map +1 -0
- package/dist/check/errors/code-list.js +2 -0
- package/dist/check/errors/code-list.js.map +1 -0
- package/dist/check/errors/codes-set-in.d.ts +9 -0
- package/dist/check/errors/codes-set-in.d.ts.map +1 -0
- package/dist/check/errors/codes-set-in.js +15 -0
- package/dist/check/errors/codes-set-in.js.map +1 -0
- package/dist/check/errors/error-codes.d.ts +2 -0
- package/dist/check/errors/error-codes.d.ts.map +1 -1
- package/dist/check/errors/error-codes.js +8 -0
- package/dist/check/errors/error-codes.js.map +1 -1
- package/dist/check/errors/is-codes-file.d.ts +4 -0
- package/dist/check/errors/is-codes-file.d.ts.map +1 -0
- package/dist/check/errors/is-codes-file.js +11 -0
- package/dist/check/errors/is-codes-file.js.map +1 -0
- package/dist/check/errors/is-error-file.d.ts +4 -0
- package/dist/check/errors/is-error-file.d.ts.map +1 -0
- package/dist/check/errors/is-error-file.js +6 -0
- package/dist/check/errors/is-error-file.js.map +1 -0
- package/dist/check/errors/listed-codes.d.ts +5 -0
- package/dist/check/errors/listed-codes.d.ts.map +1 -0
- package/dist/check/errors/listed-codes.js +12 -0
- package/dist/check/errors/listed-codes.js.map +1 -0
- package/dist/check/errors/names-refusals.d.ts +4 -0
- package/dist/check/errors/names-refusals.d.ts.map +1 -0
- package/dist/check/errors/names-refusals.js +5 -0
- package/dist/check/errors/names-refusals.js.map +1 -0
- package/dist/check/errors/read-code-list.d.ts +5 -0
- package/dist/check/errors/read-code-list.d.ts.map +1 -0
- package/dist/check/errors/read-code-list.js +32 -0
- package/dist/check/errors/read-code-list.js.map +1 -0
- package/dist/check/errors/refusal-classes.d.ts +8 -0
- package/dist/check/errors/refusal-classes.d.ts.map +1 -0
- package/dist/check/errors/refusal-classes.js +9 -0
- package/dist/check/errors/refusal-classes.js.map +1 -0
- package/dist/check/event-sourcing/declared-shape.d.ts +7 -1
- package/dist/check/event-sourcing/declared-shape.d.ts.map +1 -1
- package/dist/check/event-sourcing/declared-shape.js +12 -4
- package/dist/check/event-sourcing/declared-shape.js.map +1 -1
- package/dist/check/event-sourcing/read-stored-shape.d.ts.map +1 -1
- package/dist/check/event-sourcing/read-stored-shape.js +10 -2
- package/dist/check/event-sourcing/read-stored-shape.js.map +1 -1
- package/dist/check/event-sourcing/stored-event-declaration.d.ts +2 -0
- package/dist/check/event-sourcing/stored-event-declaration.d.ts.map +1 -1
- package/dist/check/event-sourcing/stored-event-declarations.js +1 -0
- package/dist/check/event-sourcing/stored-event-declarations.js.map +1 -1
- package/dist/check/event-sourcing/stored-shape.d.ts +2 -0
- package/dist/check/event-sourcing/stored-shape.d.ts.map +1 -1
- package/dist/check/explain/documented-rule.d.ts +8 -0
- package/dist/check/explain/documented-rule.d.ts.map +1 -0
- package/dist/check/explain/documented-rule.js +14 -0
- package/dist/check/explain/documented-rule.js.map +1 -0
- package/dist/check/explain/errors-docs.d.ts.map +1 -1
- package/dist/check/explain/errors-docs.js +30 -2
- package/dist/check/explain/errors-docs.js.map +1 -1
- package/dist/check/explain/explanations-of.d.ts +5 -0
- package/dist/check/explain/explanations-of.d.ts.map +1 -0
- package/dist/check/explain/explanations-of.js +16 -0
- package/dist/check/explain/explanations-of.js.map +1 -0
- package/dist/check/explain/language-docs.js +1 -1
- package/dist/check/explain/language-docs.js.map +1 -1
- package/dist/check/explain/persistence-docs.d.ts.map +1 -1
- package/dist/check/explain/persistence-docs.js +7 -0
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +13 -0
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.js +11 -0
- package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.js +78 -1
- package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/errors-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/errors-fixtures.js +1 -1
- package/dist/check/fixtures/errors-fixtures.js.map +1 -1
- package/dist/check/fixtures/errors-route.d.ts +3 -0
- package/dist/check/fixtures/errors-route.d.ts.map +1 -0
- package/dist/check/fixtures/errors-route.js +6 -0
- package/dist/check/fixtures/errors-route.js.map +1 -0
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/named-refusal-fixtures.d.ts +4 -0
- package/dist/check/fixtures/named-refusal-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/named-refusal-fixtures.js +210 -0
- package/dist/check/fixtures/named-refusal-fixtures.js.map +1 -0
- package/dist/check/fixtures/persistence-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/persistence-fixtures.js +25 -0
- package/dist/check/fixtures/persistence-fixtures.js.map +1 -1
- package/dist/check/language/refusal-qualifiers.d.ts +8 -0
- package/dist/check/language/refusal-qualifiers.d.ts.map +1 -0
- package/dist/check/language/refusal-qualifiers.js +16 -0
- package/dist/check/language/refusal-qualifiers.js.map +1 -0
- package/dist/check/language/unknown-words.d.ts +2 -2
- package/dist/check/language/unknown-words.d.ts.map +1 -1
- package/dist/check/language/unknown-words.js +3 -2
- package/dist/check/language/unknown-words.js.map +1 -1
- package/dist/check/model/rule-explanation.d.ts +10 -0
- package/dist/check/model/rule-explanation.d.ts.map +1 -0
- package/dist/check/model/rule-explanation.js +2 -0
- package/dist/check/model/rule-explanation.js.map +1 -0
- package/dist/check/rules/authz-policy-asked.js +5 -2
- package/dist/check/rules/authz-policy-asked.js.map +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.d.ts +3 -0
- package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -0
- package/dist/check/rules/declarations-port-adapter-wired.js +104 -0
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -0
- package/dist/check/rules/errors-code-listed.d.ts +3 -0
- package/dist/check/rules/errors-code-listed.d.ts.map +1 -0
- package/dist/check/rules/errors-code-listed.js +160 -0
- package/dist/check/rules/errors-code-listed.js.map +1 -0
- package/dist/check/rules/errors-code-unique.d.ts.map +1 -1
- package/dist/check/rules/errors-code-unique.js +13 -8
- package/dist/check/rules/errors-code-unique.js.map +1 -1
- package/dist/check/rules/errors-known-code.d.ts.map +1 -1
- package/dist/check/rules/errors-known-code.js +17 -7
- package/dist/check/rules/errors-known-code.js.map +1 -1
- package/dist/check/rules/event-sourcing-upcaster-required.js +14 -4
- package/dist/check/rules/event-sourcing-upcaster-required.js.map +1 -1
- package/dist/check/rules/language-glossary-term.d.ts.map +1 -1
- package/dist/check/rules/language-glossary-term.js +10 -3
- package/dist/check/rules/language-glossary-term.js.map +1 -1
- package/dist/check/rules/naming-suffix.js +1 -1
- package/dist/check/rules/naming-suffix.js.map +1 -1
- package/dist/check/rules/persistence-primary-key-order.d.ts +3 -0
- package/dist/check/rules/persistence-primary-key-order.d.ts.map +1 -0
- package/dist/check/rules/persistence-primary-key-order.js +31 -0
- package/dist/check/rules/persistence-primary-key-order.js.map +1 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +16 -7
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +20 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/error-factories.d.ts +4 -2
- package/dist/commands/error-factories.d.ts.map +1 -1
- package/dist/commands/error-factories.js +74 -17
- package/dist/commands/error-factories.js.map +1 -1
- package/dist/commands/lint.d.ts +7 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +55 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/open-api-problems.js +7 -6
- package/dist/config/open-api-problems.js.map +1 -1
- package/dist/config/parse-config.d.ts.map +1 -1
- package/dist/config/parse-config.js +2 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/restack-config-text.d.ts +3 -2
- package/dist/config/restack-config-text.d.ts.map +1 -1
- package/dist/config/restack-config-text.js +5 -3
- package/dist/config/restack-config-text.js.map +1 -1
- package/dist/config/serialize-config.d.ts.map +1 -1
- package/dist/config/serialize-config.js +2 -1
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/stack.d.ts +9 -6
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +1 -1
- package/dist/config/stack.js.map +1 -1
- package/dist/describe/context-description.d.ts +7 -2
- package/dist/describe/context-description.d.ts.map +1 -1
- package/dist/describe/exposed-by.d.ts +7 -0
- package/dist/describe/exposed-by.d.ts.map +1 -0
- package/dist/describe/exposed-by.js +11 -0
- package/dist/describe/exposed-by.js.map +1 -0
- package/dist/describe/read-errors.d.ts +3 -1
- package/dist/describe/read-errors.d.ts.map +1 -1
- package/dist/describe/read-errors.js +18 -11
- package/dist/describe/read-errors.js.map +1 -1
- package/dist/describe/read-refusals.d.ts +11 -0
- package/dist/describe/read-refusals.d.ts.map +1 -0
- package/dist/describe/read-refusals.js +41 -0
- package/dist/describe/read-refusals.js.map +1 -0
- package/dist/describe/reference-lines.d.ts.map +1 -1
- package/dist/describe/reference-lines.js +18 -2
- package/dist/describe/reference-lines.js.map +1 -1
- package/dist/docs/formerly-recorded-stored-events.d.ts +9 -0
- package/dist/docs/formerly-recorded-stored-events.d.ts.map +1 -0
- package/dist/docs/formerly-recorded-stored-events.js +17 -0
- package/dist/docs/formerly-recorded-stored-events.js.map +1 -0
- package/dist/docs/write-stored-events-lock.d.ts +3 -2
- package/dist/docs/write-stored-events-lock.d.ts.map +1 -1
- package/dist/docs/write-stored-events-lock.js +10 -4
- package/dist/docs/write-stored-events-lock.js.map +1 -1
- package/dist/doctor/diagnose.d.ts +2 -0
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +22 -3
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +13 -5
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.d.ts +4 -1
- package/dist/doctor/format-diagnosis.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +49 -3
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/in-range.d.ts +7 -0
- package/dist/doctor/in-range.d.ts.map +1 -0
- package/dist/doctor/in-range.js +90 -0
- package/dist/doctor/in-range.js.map +1 -0
- package/dist/doctor/install-findings.d.ts +11 -0
- package/dist/doctor/install-findings.d.ts.map +1 -0
- package/dist/doctor/install-findings.js +119 -0
- package/dist/doctor/install-findings.js.map +1 -0
- package/dist/doctor/node-findings.d.ts +7 -0
- package/dist/doctor/node-findings.d.ts.map +1 -0
- package/dist/doctor/node-findings.js +19 -0
- package/dist/doctor/node-findings.js.map +1 -0
- package/dist/doctor/package-findings.d.ts +2 -0
- package/dist/doctor/package-findings.d.ts.map +1 -1
- package/dist/doctor/package-findings.js +1 -1
- package/dist/doctor/package-findings.js.map +1 -1
- package/dist/doctor/submodule-findings.d.ts +7 -0
- package/dist/doctor/submodule-findings.d.ts.map +1 -0
- package/dist/doctor/submodule-findings.js +22 -0
- package/dist/doctor/submodule-findings.js.map +1 -0
- package/dist/generate/concept.d.ts.map +1 -1
- package/dist/generate/concept.js +3 -29
- package/dist/generate/concept.js.map +1 -1
- package/dist/generate/errors/add-code.d.ts +13 -0
- package/dist/generate/errors/add-code.d.ts.map +1 -0
- package/dist/generate/errors/add-code.js +18 -0
- package/dist/generate/errors/add-code.js.map +1 -0
- package/dist/generate/errors/codes-list.d.ts +10 -0
- package/dist/generate/errors/codes-list.d.ts.map +1 -0
- package/dist/generate/errors/codes-list.js +25 -0
- package/dist/generate/errors/codes-list.js.map +1 -0
- package/dist/generate/errors/error-code-pattern.d.ts +3 -0
- package/dist/generate/errors/error-code-pattern.d.ts.map +1 -0
- package/dist/generate/errors/error-code-pattern.js +3 -0
- package/dist/generate/errors/error-code-pattern.js.map +1 -0
- package/dist/generate/errors/factory-prefix.d.ts +3 -0
- package/dist/generate/errors/factory-prefix.d.ts.map +1 -0
- package/dist/generate/errors/factory-prefix.js +3 -0
- package/dist/generate/errors/factory-prefix.js.map +1 -0
- package/dist/generate/errors/named-refusal-code.d.ts +17 -0
- package/dist/generate/errors/named-refusal-code.d.ts.map +1 -0
- package/dist/generate/errors/named-refusal-code.js +42 -0
- package/dist/generate/errors/named-refusal-code.js.map +1 -0
- package/dist/generate/errors/refusal-class-name.d.ts +8 -0
- package/dist/generate/errors/refusal-class-name.d.ts.map +1 -0
- package/dist/generate/errors/refusal-class-name.js +16 -0
- package/dist/generate/errors/refusal-class-name.js.map +1 -0
- package/dist/generate/errors/refusal-factory-name.d.ts +4 -0
- package/dist/generate/errors/refusal-factory-name.d.ts.map +1 -0
- package/dist/generate/errors/refusal-factory-name.js +15 -0
- package/dist/generate/errors/refusal-factory-name.js.map +1 -0
- package/dist/generate/errors/write-named-refusal.d.ts +18 -0
- package/dist/generate/errors/write-named-refusal.d.ts.map +1 -0
- package/dist/generate/errors/write-named-refusal.js +89 -0
- package/dist/generate/errors/write-named-refusal.js.map +1 -0
- package/dist/generate/kinds/domain-error-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-error-kind.js +12 -5
- package/dist/generate/kinds/domain-error-kind.js.map +1 -1
- package/dist/generate/kinds/error-kind.d.ts.map +1 -1
- package/dist/generate/kinds/error-kind.js +27 -12
- package/dist/generate/kinds/error-kind.js.map +1 -1
- package/dist/generate/schedule/cron-problem.d.ts.map +1 -1
- package/dist/generate/schedule/cron-problem.js +16 -1
- package/dist/generate/schedule/cron-problem.js.map +1 -1
- package/dist/generate/spoken-in-language.d.ts +9 -0
- package/dist/generate/spoken-in-language.d.ts.map +1 -0
- package/dist/generate/spoken-in-language.js +39 -0
- package/dist/generate/spoken-in-language.js.map +1 -0
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +32 -13
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +4 -3
- package/dist/help/usage.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +4 -2
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/resolve-stack.js +2 -2
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/lint/eslint-in-project.d.ts +8 -0
- package/dist/lint/eslint-in-project.d.ts.map +1 -0
- package/dist/lint/eslint-in-project.js +33 -0
- package/dist/lint/eslint-in-project.js.map +1 -0
- package/dist/lint/format-verdict.d.ts +4 -0
- package/dist/lint/format-verdict.d.ts.map +1 -0
- package/dist/lint/format-verdict.js +11 -0
- package/dist/lint/format-verdict.js.map +1 -0
- package/dist/lint/lint-run.d.ts +8 -0
- package/dist/lint/lint-run.d.ts.map +1 -0
- package/dist/lint/lint-run.js +2 -0
- package/dist/lint/lint-run.js.map +1 -0
- package/dist/lint/lint-verdict.d.ts +19 -0
- package/dist/lint/lint-verdict.d.ts.map +1 -0
- package/dist/lint/lint-verdict.js +25 -0
- package/dist/lint/lint-verdict.js.map +1 -0
- package/dist/lint/parse-lint-answer.d.ts +13 -0
- package/dist/lint/parse-lint-answer.d.ts.map +1 -0
- package/dist/lint/parse-lint-answer.js +18 -0
- package/dist/lint/parse-lint-answer.js.map +1 -0
- package/dist/migration/plan-replay.d.ts +4 -3
- package/dist/migration/plan-replay.d.ts.map +1 -1
- package/dist/migration/plan-replay.js +21 -6
- package/dist/migration/plan-replay.js.map +1 -1
- package/dist/migration/rename-branch-migrations.d.ts +13 -0
- package/dist/migration/rename-branch-migrations.d.ts.map +1 -0
- package/dist/migration/rename-branch-migrations.js +25 -0
- package/dist/migration/rename-branch-migrations.js.map +1 -0
- package/dist/migration/replay-drizzle-migrations.d.ts +6 -3
- package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -1
- package/dist/migration/replay-drizzle-migrations.js +48 -4
- package/dist/migration/replay-drizzle-migrations.js.map +1 -1
- package/dist/migration/replay-plan.d.ts +8 -0
- package/dist/migration/replay-plan.d.ts.map +1 -1
- package/dist/migration/restore-migration-folder.d.ts +4 -0
- package/dist/migration/restore-migration-folder.d.ts.map +1 -0
- package/dist/migration/restore-migration-folder.js +15 -0
- package/dist/migration/restore-migration-folder.js.map +1 -0
- package/dist/package-manager/lockfiles.d.ts +2 -0
- package/dist/package-manager/lockfiles.d.ts.map +1 -1
- package/dist/package-manager/lockfiles.js +5 -0
- package/dist/package-manager/lockfiles.js.map +1 -1
- package/dist/presets/identity-refusal.js +1 -1
- package/dist/presets/identity-refusal.js.map +1 -1
- package/dist/presets/identity-terms.d.ts.map +1 -1
- package/dist/presets/identity-terms.js +30 -0
- package/dist/presets/identity-terms.js.map +1 -1
- package/dist/presets/preset-files.d.ts.map +1 -1
- package/dist/presets/preset-files.js +4 -1
- package/dist/presets/preset-files.js.map +1 -1
- package/dist/refusals/aggregates-of.d.ts +10 -0
- package/dist/refusals/aggregates-of.d.ts.map +1 -0
- package/dist/refusals/aggregates-of.js +9 -0
- package/dist/refusals/aggregates-of.js.map +1 -0
- package/dist/refusals/applied-moves.d.ts +7 -0
- package/dist/refusals/applied-moves.d.ts.map +1 -0
- package/dist/refusals/applied-moves.js +2 -0
- package/dist/refusals/applied-moves.js.map +1 -0
- package/dist/refusals/apply-named-plan.d.ts +19 -0
- package/dist/refusals/apply-named-plan.d.ts.map +1 -0
- package/dist/refusals/apply-named-plan.js +46 -0
- package/dist/refusals/apply-named-plan.js.map +1 -0
- package/dist/refusals/apply-plan.d.ts.map +1 -1
- package/dist/refusals/apply-plan.js +21 -25
- package/dist/refusals/apply-plan.js.map +1 -1
- package/dist/refusals/code-without-imports.d.ts +3 -0
- package/dist/refusals/code-without-imports.d.ts.map +1 -0
- package/dist/refusals/code-without-imports.js +9 -0
- package/dist/refusals/code-without-imports.js.map +1 -0
- package/dist/refusals/concept-error-class.d.ts +26 -0
- package/dist/refusals/concept-error-class.d.ts.map +1 -0
- package/dist/refusals/concept-error-class.js +2 -0
- package/dist/refusals/concept-error-class.js.map +1 -0
- package/dist/refusals/concept-errors.d.ts +6 -0
- package/dist/refusals/concept-errors.d.ts.map +1 -0
- package/dist/refusals/concept-errors.js +16 -0
- package/dist/refusals/concept-errors.js.map +1 -0
- package/dist/refusals/concept-imports.d.ts +8 -0
- package/dist/refusals/concept-imports.d.ts.map +1 -0
- package/dist/refusals/concept-imports.js +33 -0
- package/dist/refusals/concept-imports.js.map +1 -0
- package/dist/refusals/concept-leftovers.d.ts +5 -0
- package/dist/refusals/concept-leftovers.d.ts.map +1 -0
- package/dist/refusals/concept-leftovers.js +26 -0
- package/dist/refusals/concept-leftovers.js.map +1 -0
- package/dist/refusals/concept-named.d.ts +3 -0
- package/dist/refusals/concept-named.d.ts.map +1 -0
- package/dist/refusals/concept-named.js +13 -0
- package/dist/refusals/concept-named.js.map +1 -0
- package/dist/refusals/concerns.d.ts +16 -0
- package/dist/refusals/concerns.d.ts.map +1 -0
- package/dist/refusals/concerns.js +9 -0
- package/dist/refusals/concerns.js.map +1 -0
- package/dist/refusals/cut-factories.d.ts +7 -0
- package/dist/refusals/cut-factories.d.ts.map +1 -0
- package/dist/refusals/cut-factories.js +30 -0
- package/dist/refusals/cut-factories.js.map +1 -0
- package/dist/refusals/earlier-guidance.d.ts +8 -0
- package/dist/refusals/earlier-guidance.d.ts.map +1 -0
- package/dist/refusals/earlier-guidance.js +21 -0
- package/dist/refusals/earlier-guidance.js.map +1 -0
- package/dist/refusals/factory-for-parameter.d.ts +7 -0
- package/dist/refusals/factory-for-parameter.d.ts.map +1 -0
- package/dist/refusals/factory-for-parameter.js +17 -0
- package/dist/refusals/factory-for-parameter.js.map +1 -0
- package/dist/refusals/first-parameter.d.ts +6 -0
- package/dist/refusals/first-parameter.d.ts.map +1 -0
- package/dist/refusals/first-parameter.js +12 -0
- package/dist/refusals/first-parameter.js.map +1 -0
- package/dist/refusals/ignore-code-types.d.ts +10 -0
- package/dist/refusals/ignore-code-types.d.ts.map +1 -0
- package/dist/refusals/ignore-code-types.js +53 -0
- package/dist/refusals/ignore-code-types.js.map +1 -0
- package/dist/refusals/imports-used-by.d.ts +6 -0
- package/dist/refusals/imports-used-by.d.ts.map +1 -0
- package/dist/refusals/imports-used-by.js +32 -0
- package/dist/refusals/imports-used-by.js.map +1 -0
- package/dist/refusals/leave-origins.d.ts +10 -0
- package/dist/refusals/leave-origins.d.ts.map +1 -0
- package/dist/refusals/leave-origins.js +35 -0
- package/dist/refusals/leave-origins.js.map +1 -0
- package/dist/refusals/legacy-move.d.ts +5 -0
- package/dist/refusals/legacy-move.d.ts.map +1 -0
- package/dist/refusals/legacy-move.js +14 -0
- package/dist/refusals/legacy-move.js.map +1 -0
- package/dist/refusals/markdown-files.d.ts +4 -0
- package/dist/refusals/markdown-files.d.ts.map +1 -0
- package/dist/refusals/markdown-files.js +13 -0
- package/dist/refusals/markdown-files.js.map +1 -0
- package/dist/refusals/member-start.d.ts +3 -0
- package/dist/refusals/member-start.d.ts.map +1 -0
- package/dist/refusals/member-start.js +14 -0
- package/dist/refusals/member-start.js.map +1 -0
- package/dist/refusals/migration-targets.d.ts +3 -0
- package/dist/refusals/migration-targets.d.ts.map +1 -0
- package/dist/refusals/migration-targets.js +3 -0
- package/dist/refusals/migration-targets.js.map +1 -0
- package/dist/refusals/move-named-specs.d.ts +16 -0
- package/dist/refusals/move-named-specs.d.ts.map +1 -0
- package/dist/refusals/move-named-specs.js +119 -0
- package/dist/refusals/move-named-specs.js.map +1 -0
- package/dist/refusals/move.d.ts +6 -1
- package/dist/refusals/move.d.ts.map +1 -1
- package/dist/refusals/named-move.d.ts +23 -0
- package/dist/refusals/named-move.d.ts.map +1 -0
- package/dist/refusals/named-move.js +2 -0
- package/dist/refusals/named-move.js.map +1 -0
- package/dist/refusals/named-moves.d.ts +10 -0
- package/dist/refusals/named-moves.d.ts.map +1 -0
- package/dist/refusals/named-moves.js +64 -0
- package/dist/refusals/named-moves.js.map +1 -0
- package/dist/refusals/named-plan.d.ts +7 -0
- package/dist/refusals/named-plan.d.ts.map +1 -0
- package/dist/refusals/named-plan.js +2 -0
- package/dist/refusals/named-plan.js.map +1 -0
- package/dist/refusals/own-factory.d.ts +14 -0
- package/dist/refusals/own-factory.d.ts.map +1 -0
- package/dist/refusals/own-factory.js +38 -0
- package/dist/refusals/own-factory.js.map +1 -0
- package/dist/refusals/plan-target.d.ts +7 -0
- package/dist/refusals/plan-target.d.ts.map +1 -0
- package/dist/refusals/plan-target.js +13 -0
- package/dist/refusals/plan-target.js.map +1 -0
- package/dist/refusals/planned-refusal.d.ts +13 -0
- package/dist/refusals/planned-refusal.d.ts.map +1 -0
- package/dist/refusals/planned-refusal.js +2 -0
- package/dist/refusals/planned-refusal.js.map +1 -0
- package/dist/refusals/propose-named-plan.d.ts +25 -0
- package/dist/refusals/propose-named-plan.d.ts.map +1 -0
- package/dist/refusals/propose-named-plan.js +67 -0
- package/dist/refusals/propose-named-plan.js.map +1 -0
- package/dist/refusals/propose-plan.d.ts.map +1 -1
- package/dist/refusals/propose-plan.js +3 -19
- package/dist/refusals/propose-plan.js.map +1 -1
- package/dist/refusals/read-concept-error.d.ts +9 -0
- package/dist/refusals/read-concept-error.d.ts.map +1 -0
- package/dist/refusals/read-concept-error.js +51 -0
- package/dist/refusals/read-concept-error.js.map +1 -0
- package/dist/refusals/read-named-plan.d.ts +4 -0
- package/dist/refusals/read-named-plan.d.ts.map +1 -0
- package/dist/refusals/read-named-plan.js +57 -0
- package/dist/refusals/read-named-plan.js.map +1 -0
- package/dist/refusals/refusal-class-file.d.ts +15 -0
- package/dist/refusals/refusal-class-file.d.ts.map +1 -0
- package/dist/refusals/refusal-class-file.js +38 -0
- package/dist/refusals/refusal-class-file.js.map +1 -0
- package/dist/refusals/rename-concept.d.ts +7 -0
- package/dist/refusals/rename-concept.d.ts.map +1 -0
- package/dist/refusals/rename-concept.js +15 -0
- package/dist/refusals/rename-concept.js.map +1 -0
- package/dist/refusals/render-factory.d.ts +1 -1
- package/dist/refusals/render-factory.d.ts.map +1 -1
- package/dist/refusals/render-factory.js +3 -2
- package/dist/refusals/render-factory.js.map +1 -1
- package/dist/refusals/rewrite-concept-usages.d.ts +11 -0
- package/dist/refusals/rewrite-concept-usages.d.ts.map +1 -0
- package/dist/refusals/rewrite-concept-usages.js +61 -0
- package/dist/refusals/rewrite-concept-usages.js.map +1 -0
- package/dist/refusals/rewrite-named-usages.d.ts +9 -0
- package/dist/refusals/rewrite-named-usages.d.ts.map +1 -0
- package/dist/refusals/rewrite-named-usages.js +14 -0
- package/dist/refusals/rewrite-named-usages.js.map +1 -0
- package/dist/refusals/rewrite-usages.d.ts.map +1 -1
- package/dist/refusals/rewrite-usages.js +10 -6
- package/dist/refusals/rewrite-usages.js.map +1 -1
- package/dist/refusals/say-refusals.d.ts +3 -0
- package/dist/refusals/say-refusals.d.ts.map +1 -0
- package/dist/refusals/say-refusals.js +8 -0
- package/dist/refusals/say-refusals.js.map +1 -0
- package/dist/refusals/split-concept-spec.d.ts +19 -0
- package/dist/refusals/split-concept-spec.d.ts.map +1 -0
- package/dist/refusals/split-concept-spec.js +74 -0
- package/dist/refusals/split-concept-spec.js.map +1 -0
- package/dist/refusals/stale-mentions.d.ts +10 -0
- package/dist/refusals/stale-mentions.d.ts.map +1 -0
- package/dist/refusals/stale-mentions.js +41 -0
- package/dist/refusals/stale-mentions.js.map +1 -0
- package/dist/refusals/undefined-words.d.ts +15 -0
- package/dist/refusals/undefined-words.d.ts.map +1 -0
- package/dist/refusals/undefined-words.js +26 -0
- package/dist/refusals/undefined-words.js.map +1 -0
- package/dist/refusals/with-codes.d.ts +11 -0
- package/dist/refusals/with-codes.d.ts.map +1 -0
- package/dist/refusals/with-codes.js +46 -0
- package/dist/refusals/with-codes.js.map +1 -0
- package/dist/refusals/with-imports.d.ts +3 -0
- package/dist/refusals/with-imports.d.ts.map +1 -0
- package/dist/refusals/with-imports.js +8 -0
- package/dist/refusals/with-imports.js.map +1 -0
- package/dist/refusals/write-refusal-classes.d.ts +9 -0
- package/dist/refusals/write-refusal-classes.d.ts.map +1 -0
- package/dist/refusals/write-refusal-classes.js +23 -0
- package/dist/refusals/write-refusal-classes.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -0
- package/dist/run.js.map +1 -1
- package/dist/stack/stack-vars.js +1 -1
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/templates/aggregate/aggregate.ts.tpl +3 -0
- package/templates/aggregate/event-sourced.aggregate.ts.tpl +3 -0
- package/templates/command/handler.declared.ts.tpl +3 -0
- package/templates/command/handler.ts.tpl +3 -0
- package/templates/entity/entity.ts.tpl +3 -0
- package/templates/error/codes.ts.tpl +5 -0
- package/templates/error/refusal-case.spec.ts.tpl +8 -0
- package/templates/error/refusal-factory.ts.tpl +4 -0
- package/templates/error/refusal.spec.ts.tpl +7 -0
- package/templates/error/refusal.ts.tpl +8 -0
- package/templates/init/rules/domain.md.tpl +9 -2
- package/templates/init/rules/presentation.md.tpl +3 -0
- package/templates/pipeline/knip.json.tpl +5 -0
- package/templates/pipeline/package-scripts.json +3 -3
- package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +22 -0
- package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.handler.ts.tpl +16 -0
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.handler.ts.tpl +16 -0
- package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.handler.ts.tpl +16 -0
- package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.handler.ts.tpl +10 -0
- package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.handler.ts.tpl +16 -0
- package/templates/presets/identity/context/application/commands/provision-account/provision-account.handler.ts.tpl +10 -0
- package/templates/presets/identity/context/application/commands/remove-member/remove-member.handler.ts.tpl +16 -0
- package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.handler.ts.tpl +10 -0
- package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.handler.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/aggregates/account.aggregate.ts.tpl +16 -0
- package/templates/presets/identity/context/domain/aggregates/delegation.aggregate.ts.tpl +28 -0
- package/templates/presets/identity/context/domain/aggregates/invitation.aggregate.ts.tpl +27 -0
- package/templates/presets/identity/context/domain/aggregates/member.aggregate.ts.tpl +31 -0
- package/templates/presets/identity/context/domain/errors/above-own-role.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/account-already-deactivated.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/already-member.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/codes.named.ts.tpl +33 -0
- package/templates/presets/identity/context/domain/errors/deactivated-account.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/delegation-not-active.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/delegation-period-inverted.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/delegation-to-oneself.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/delegation-too-long.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/errors/delegation-with-no-right.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/email-not-verified.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/invalid-display-name.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/invalid-email-address.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/invalid-organisation-name.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/invalid-organisation-slug.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/invitation-expired.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/invitation-not-addressed-to-account.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/invitation-not-pending.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/last-owner.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/errors/not-an-owner.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/organisation-slug-taken.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/own-role.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/errors/right-not-in-role.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/errors/unknown-account.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/errors/unknown-delegation.error.named.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/errors/unknown-invitation.error.named.ts.tpl +11 -0
- package/templates/presets/identity/context/domain/errors/unknown-member.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/unknown-organisation.error.named.ts.tpl +12 -0
- package/templates/presets/identity/context/domain/value-objects/delegation-period.vo.ts.tpl +16 -0
- package/templates/presets/identity/context/domain/value-objects/display-name.vo.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/value-objects/email-address.vo.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/value-objects/organisation-name.vo.ts.tpl +10 -0
- package/templates/presets/identity/context/domain/value-objects/organisation-slug.vo.ts.tpl +10 -0
- package/templates/state-machine/state-machine.ts.tpl +5 -0
- package/templates/value-object/value-object.ts.tpl +6 -0
- /package/templates/presets/identity/context/domain/errors/{account.error.ts.tpl → account.error.factories.ts.tpl} +0 -0
- /package/templates/presets/identity/context/domain/errors/{delegation.error.ts.tpl → delegation.error.factories.ts.tpl} +0 -0
- /package/templates/presets/identity/context/domain/errors/{invitation.error.ts.tpl → invitation.error.factories.ts.tpl} +0 -0
- /package/templates/presets/identity/context/domain/errors/{member.error.ts.tpl → member.error.factories.ts.tpl} +0 -0
- /package/templates/presets/identity/context/domain/errors/{organisation.error.ts.tpl → organisation.error.factories.ts.tpl} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,238 @@ 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.83.1
|
|
8
|
+
|
|
9
|
+
0.83.0 was set but never published: four fixes reached `main` before its version did, and 0.83.1 holds them with the rest. No version 0.83.0 is on the registry.
|
|
10
|
+
|
|
11
|
+
**`DomainRefusal` in the kernel: one class per refusal, named after it, built by static factories named after what it is about.**
|
|
12
|
+
`class InsufficientFunds extends DomainRefusal { readonly code = BankingCodes.InsufficientFunds; static forAccountId(..) { return InsufficientFunds.refusal(message, facts) } }`,
|
|
13
|
+
thrown as `InsufficientFunds.forAccountId(account.id, missing)`. The class sets the code, read from a
|
|
14
|
+
closed list of the codes of the context; `refusal(message, facts?)` types the facts of each factory,
|
|
15
|
+
`.exposing(..)` and `.causedBy(..)` work as on `ConceptError`, and `InsufficientFunds.is(error)` narrows
|
|
16
|
+
with those facts. `ConceptError` and `DomainRefusal` now share `FactualRefusal`, which `@ddd-ts-kit/http`
|
|
17
|
+
reads to write the exposed facts of either form in the problem document. `isRefusal(error, SchedulingCodes)`
|
|
18
|
+
takes the closed list of the codes of a context and narrows to one of them, so that a `switch` on the code
|
|
19
|
+
is exhaustive. Nothing changes for a project that writes `ConceptError`.
|
|
20
|
+
|
|
21
|
+
**`init` writes `"stack.refusals": "named"`: a refusal is a class of its own, named after what is refused, built by static factories named after what it is about, its code read from the closed list of its context.**
|
|
22
|
+
`throw SlotTaken.forCalendar(calendar.id, slot.startsAt)`, where `SlotTaken` extends `DomainRefusal` in
|
|
23
|
+
`domain/errors/slot-taken.error.ts` and reads `readonly code = SchedulingCodes.SlotTaken` from
|
|
24
|
+
`domain/errors/codes.ts`, the list `SchedulingCodes` of every code of the context and its union type
|
|
25
|
+
`SchedulingCode`. `ddd-ts-kit generate error <context> <Refusal> <factory> [--code CODE]`
|
|
26
|
+
(`generate error banking InsufficientFunds forAccountId`) writes the class, its entry in `codes.ts`, the
|
|
27
|
+
factory and its spec case, each when absent; run again, it changes nothing. A factory starts with `for`,
|
|
28
|
+
`with`, `because`, `on` or `at` (`forCalendar`, `withNotice`, `becauseOf`); the code defaults to the refusal
|
|
29
|
+
in constant case and is unique in the context. Under `named`, `errors/through-factory`,
|
|
30
|
+
`errors/constructor-not-public`, `errors/code-unique` and `errors/known-code` judge the classes of
|
|
31
|
+
`DomainRefusal` and the values of `codes.ts`; `errors/factory-name` refuses a class named `...Error` and a
|
|
32
|
+
factory without one of the five prefixes; the new `errors/code-listed` of `ddd-ts-kit check` holds the list
|
|
33
|
+
(each refusal class reads its code under its own name, `codes.ts` exists as soon as one does, every key is a
|
|
34
|
+
refusal class of the context, every value a string literal in constant case, the list is `as const`);
|
|
35
|
+
`language/glossary-term` judges every class of `domain/errors/` under `named` as it judges an aggregate,
|
|
36
|
+
each word of its name a term of the glossary of its context, a refusal class allowed the qualifiers
|
|
37
|
+
`invalid`, `unknown`, `already`, `too`, `no`, `missing` and `required` besides (`SlotTaken`, `BookingTooLate`
|
|
38
|
+
and `InvalidAppointment` pass with `Slot`, `Take`, `Booking`, `Late` and `Appointment` in the glossary);
|
|
39
|
+
`codes.ts` is not judged. `generate error` refuses a refusal named with a word the glossary does not define,
|
|
40
|
+
and `--term "<Term>=<meaning>"` adds it in the same command. `generate domain-error` is refused under
|
|
41
|
+
`named`, pointing to `generate error`. The two earlier
|
|
42
|
+
forms keep working as they are: a project that says `"factories"` (one `ConceptError` class per concept)
|
|
43
|
+
is judged by the rules of that form, and a config without the key is still `classes`.
|
|
44
|
+
`ddd-ts-kit error-factories` now moves a project to `named` (`--to named`, the default), from either form: `--plan`
|
|
45
|
+
proposes, per refusal, a class (the PascalCase of its code, which it keeps) and a factory (`for<Concept>`),
|
|
46
|
+
both editable; `--apply` writes `codes.ts` in each context, one class file per refusal and its spec,
|
|
47
|
+
rewrites every usage (`AppointmentError.ended(a, b)` becomes `AppointmentEnded.forAppointment(a, b)`,
|
|
48
|
+
`AppointmentError.is(error, 'APPOINTMENT_ENDED')` becomes `AppointmentEnded.is(error)`, imports included),
|
|
49
|
+
removes the concept classes left empty, sets the key, and lists what it cannot rewrite (a bare
|
|
50
|
+
`AppointmentError.is(error)`, `CodeOf<typeof AppointmentError>`); `--plan` and `--apply` both list each class
|
|
51
|
+
whose name uses words the glossary of its context does not define. `--to factories` keeps the earlier move
|
|
52
|
+
from one class per error to concept classes.
|
|
53
|
+
|
|
54
|
+
To move: nothing is required, a project keeps its form. To adopt named refusals, run
|
|
55
|
+
`npx ddd-ts-kit error-factories --plan`, edit the class and factory names in `error-factories.plan.json`,
|
|
56
|
+
then `npx ddd-ts-kit error-factories --apply`, run the formatter and `npx ddd-ts-kit check`, and settle
|
|
57
|
+
the lines it lists as left to you.
|
|
58
|
+
|
|
59
|
+
**`event-sourcing/upcaster-required` sees a change inside the type arguments of a stored shape.** The fingerprint of a stored event read a member such as `totals: Record<string, number>` as two pieces split at its comma, and sorted them with the other members: `{ a: Record<string, number>; b: Record<number, string> }` and `{ a: Record<string, string>; b: Record<number, number> }` had one fingerprint, so a stored event could change in place unseen. A member is now read whole, an arrow `=>` inside its type arguments included. A version recorded by 0.82.0 or earlier for such a type is still taken for the same shape, `docs --stored-events` records it again as the kit reads it now, and `docs --check` reports it (`formerly recorded <event> version <n> in stored-events.lock.json`, `formerlyRecorded` in JSON) until it is.
|
|
60
|
+
|
|
61
|
+
To move: in a project whose stored events hold a type argument list with a comma, a semicolon or a line break (`Record<string, number>`, `Map<K, V>`), `docs --check` fails right after the upgrade, and with it the generated pipeline (`npm run docs:check`), until the lock is recorded again: run `npx ddd-ts-kit docs --stored-events` once, with the codecs as they are, and commit `stored-events.lock.json` in the same pull request as the upgrade. It rewrites only the versions `docs --check` lists as formerly recorded. Any other shape keeps its fingerprint, and its project sees no change.
|
|
62
|
+
|
|
63
|
+
**`signedDownloadUrl` and `signedUploadUrl` of `LocalFileStorage` and `InMemoryFileStorage` reject the promise they return for a key or an expiry they refuse.** They threw at the call, before any promise, so a `.catch(...)` chained on the call missed the `FileError` (`INVALID_FILE_KEY`, `INVALID_FILE_URL_EXPIRY`). They now behave as `S3FileStorage` always did; code that awaits the call sees no difference.
|
|
64
|
+
|
|
65
|
+
**`authz/policy-asked` reads the permission of `definePolicy` from the object written as its first argument only.** It took the first `{` anywhere after `definePolicy(`: in a file holding `definePolicy(options)` and, further on, any object with a `permission` entry, that permission counted as refined by a policy, and every handler of a use case requiring it was reported as never asking it. A policy whose options are not written in the call refines no permission the rule can see, as before.
|
|
66
|
+
|
|
67
|
+
**The `decorators()` plugin of `@ddd-ts-kit/testing/vitest` compiles again a cache entry that lost its output or its map, and replaces it.** An entry whose directory was left without its emitted file or its source map failed every compile of its file with `ENOENT` until the cache directory was removed by hand.
|
|
68
|
+
|
|
69
|
+
**`config/valid` no longer says the contracts are written in YAML only.** An unknown `openapi.format` was reported with "the contracts are written in YAML" although `json` is accepted too; it now reads "a format the contracts are not written in", its fix listing `yaml` and `json`. A document of `openapi.documents` with a wrong name is told its file is `openapi/<name>.json` when the contracts are written in JSON, instead of `.yaml` whatever the format.
|
|
70
|
+
|
|
71
|
+
**`InMemoryReadModelTable` refuses to insert an entry without a `row`, as the Knex, Prisma, Drizzle and TypeORM tables do.** Its `insert` stored such an entry as the trace of a deleted row and answered `true`, where every ORM adapter answers `false` and writes nothing, so a test over the fake could pass where the real table did not. `TableReadModelStore` never inserts such an entry, so a read model written through it sees no difference. `readModelStoreContract` of `@ddd-ts-kit/testing` now holds every adapter of `ReadModelTable` to it.
|
|
72
|
+
|
|
73
|
+
**`@ddd-ts-kit/audit`: inside a unit of work, `KnexAuditTrail` and `DrizzleAuditTrail` write the entries at its commit, so an append no longer ends in a PostgreSQL deadlock (`40P01`).**
|
|
74
|
+
An append used to lock the head of its chain at the call to `record` and hold it until the commit. A
|
|
75
|
+
unit of work that recorded (an authorization decision, an entry by hand) and then locked a row could
|
|
76
|
+
deadlock with another unit of work of the same tenant that held the row and appended to the same chain,
|
|
77
|
+
the head being created or not: PostgreSQL killed one of them with `40P01`, which reached the caller as an
|
|
78
|
+
error 500. The same happened between two units of work that appended to two chains in opposite orders.
|
|
79
|
+
The records of a unit of work now wait for its commit (`atCommit` of the kernel): they are written last,
|
|
80
|
+
after the work and its `before-commit` handlers, each chain once, the chains in the order of their names.
|
|
81
|
+
The head is the last lock a transaction takes, every transaction takes the heads in one order, and a unit
|
|
82
|
+
of work still at its work no longer makes the other writers of its tenant wait. Outside a unit of work an
|
|
83
|
+
entry is written at once, as before. Nothing changes in the tables, the hashes or the chains already
|
|
84
|
+
written.
|
|
85
|
+
|
|
86
|
+
To move: nothing for most projects. An entry recorded inside a unit of work is no longer visible inside it
|
|
87
|
+
before the commit, and a refusal of the store (an `id` written twice) now fails the commit instead of the
|
|
88
|
+
call to `record`: a test or a handler that read the trail back inside the same unit of work reads it after
|
|
89
|
+
the commit.
|
|
90
|
+
|
|
91
|
+
**A deadlock or a serialization failure anywhere in the transaction of a unit of work rejects it with `TransactionConflictError`, a `ConcurrencyError`, instead of the raw error of the driver, and `@ddd-ts-kit/http` answers `CONCURRENCY_CONFLICT` with 409.**
|
|
92
|
+
When two transactions take the same locks in opposite orders, PostgreSQL gives up one statement of the
|
|
93
|
+
cycle with `40P01`, the one it chooses: an append of the event store or of the audit trail, which the
|
|
94
|
+
store already turned into a `ConcurrencyError`, but just as well the update of a row of the other
|
|
95
|
+
transaction, which reached the caller as an unexpected error (a 500 through `@ddd-ts-kit/http`). The same
|
|
96
|
+
went for a serialization failure (`40001`) under REPEATABLE READ or SERIALIZABLE. `withinUnitOfWork`, which
|
|
97
|
+
the units of work of `@ddd-ts-kit/knex`, `@ddd-ts-kit/drizzle`, `@ddd-ts-kit/prisma` and
|
|
98
|
+
`@ddd-ts-kit/typeorm` are built on, now rejects the outermost unit of work with `TransactionConflictError`
|
|
99
|
+
(code `CONCURRENCY_CONFLICT`, the error of the driver as `cause`) for `40P01` and `40001` of PostgreSQL,
|
|
100
|
+
the `40001` of a MySQL deadlock and `P2034` of Prisma, whatever wraps them. Nothing of the transaction
|
|
101
|
+
committed, so the command can run again. `ConcurrencyError` takes an optional `cause`. `DEFAULT_ERROR_MAPPING`
|
|
102
|
+
of `@ddd-ts-kit/http` now maps `CONCURRENCY_CONFLICT`, a lost update included, to 409 Conflict: it fell
|
|
103
|
+
back on 422, which a client reads as a request to correct, not to send again.
|
|
104
|
+
|
|
105
|
+
To move: a project that recognised `40P01` or `40001` itself, around a command or in its error mapping,
|
|
106
|
+
reads `ConcurrencyError` (or the code `CONCURRENCY_CONFLICT`) instead. A client or a test that expected 422
|
|
107
|
+
for `CONCURRENCY_CONFLICT` expects 409; a project that wants 422 back passes `{ CONCURRENCY_CONFLICT: 422 }`
|
|
108
|
+
to `createErrorMapper`.
|
|
109
|
+
|
|
110
|
+
## 0.82.0
|
|
111
|
+
|
|
112
|
+
**`drizzle-generate --replay` replays only what forks, and refuses to lose a migration edited by
|
|
113
|
+
hand.** The replay first reads the history on disk: when the journal lists every migration in
|
|
114
|
+
order, each snapshot from the one before, the branch's already follow the trunk, and nothing is
|
|
115
|
+
generated again (a name that changes, `working-` dropped, is renamed in place). Otherwise it
|
|
116
|
+
deletes the branch's migrations and generates them again on top as before, then compares each
|
|
117
|
+
generated one with what the branch had: when drizzle-kit now writes other statements (its SQL was
|
|
118
|
+
edited by hand, or the trunk changed what it changes), it puts the migrations folder back as it
|
|
119
|
+
found it and refuses, naming the statement that differs; the fix is to generate that migration on
|
|
120
|
+
top by hand and write the edit again, after which a replay, or `merge-trunk --continue`, finds
|
|
121
|
+
nothing forked. Several migrations of a branch that change the schema and fork are still
|
|
122
|
+
refused rather than joined: drizzle-kit diffs the final schema and cannot split them again, and
|
|
123
|
+
one migration in their place would join steps planned apart (a table, then a constraint once it
|
|
124
|
+
is filled, fails on a database that holds rows). Its fix said to generate them as one; it now
|
|
125
|
+
says to generate them again one at a time, in their order. Measured with the real drizzle-kit
|
|
126
|
+
0.31.11: the replayed history is applied by `drizzle-kit migrate`.
|
|
127
|
+
|
|
128
|
+
**`persistence/primary-key-order` (a warning).** Under drizzle-kit, a migration that adds the new
|
|
129
|
+
primary key of a table before its old one is dropped, or drops a column before the key that holds
|
|
130
|
+
it, is reported on the line of the statement that runs too early: PostgreSQL refuses it when it
|
|
131
|
+
runs. `drizzle-generate` already warned once when it wrote one; the rule keeps reporting it. Fix:
|
|
132
|
+
drop the old key first, in that migration while it is still unapplied, or write it with
|
|
133
|
+
`--custom`. `ddd-ts-kit check --rule persistence/primary-key-order` lists the migrations to take
|
|
134
|
+
up; the rule stays a warning in this version.
|
|
135
|
+
|
|
136
|
+
**Two migrations kept apart.** The `persistence` skill and the persistence page say how: change
|
|
137
|
+
the schema in two steps, with a `db:generate` after each, since one `db:generate` writes every
|
|
138
|
+
change since the last migration as one.
|
|
139
|
+
|
|
140
|
+
**A cron accepts the shorthands `@hourly`, `@daily`, `@weekly`, `@monthly` and `@yearly`.**
|
|
141
|
+
`@Scheduled` and `ddd-ts-kit generate job --cron` read `@yearly` and `@annually` as `0 0 1 1 *`,
|
|
142
|
+
`@monthly` as `0 0 1 * *`, `@weekly` as `0 0 * * 0`, `@daily` and `@midnight` as `0 0 * * *` and
|
|
143
|
+
`@hourly` as `0 * * * *`, in any case, and fire on the occurrences of those five fields (`@hourly`
|
|
144
|
+
keeps its rhythm when clocks change, as `0 * * * *` does). A diagnostic and `ddd-ts-kit docs` show
|
|
145
|
+
the shorthand as written. `@reboot` and any other `@word` are refused by both with the same
|
|
146
|
+
message, which lists the shorthands accepted: a scheduled job has no occurrence at start.
|
|
147
|
+
|
|
148
|
+
**A lint warning fails the lint of a generated project.** `lint` and `ci:lint` ran `eslint .`,
|
|
149
|
+
which exits 0 on warnings: `verify` and the pipeline passed them, a new one as well, and they
|
|
150
|
+
piled up. `init` now writes `ddd-ts-kit lint` for both, and the example application runs the
|
|
151
|
+
same: the ESLint of the project, through its API (its paths, `--format` and `--fix` as ESLint
|
|
152
|
+
takes them), failing on an error and on a warning alike, but on a warning of a rule of the kit in
|
|
153
|
+
transition. A rule a version adds, or what a rule judges more, is a warning for one minor version
|
|
154
|
+
and an error at the next; its documentation names that version (`transition`), and `ddd-ts-kit
|
|
155
|
+
lint` shows its warnings and lists them after the report, one line per rule with the version that
|
|
156
|
+
makes it an error, without failing on them. An upgrade of the kit therefore never turns a green
|
|
157
|
+
lint red, which a plain `eslint . --max-warnings 0` would. The preset keeps its warnings as warnings (`complexity`, `max-depth`,
|
|
158
|
+
`clean/function-size`, `clean/no-flag-argument`, ...) and `init` writes no suppressions file: a
|
|
159
|
+
new project has no warning, so the first one fails `npm run lint`, `verify` and the lint job on
|
|
160
|
+
GitHub and GitLab. The hook before a commit is unchanged: it shows a warning without stopping the
|
|
161
|
+
commit. The quality-gate skill says so; the workflow is in
|
|
162
|
+
[Quality baseline](docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
163
|
+
|
|
164
|
+
To move: nothing changes until the project acts. `npx ddd-ts-kit init` keeps an existing `lint`
|
|
165
|
+
and `ci:lint` and notes what the kit expects; `doctor` lists them as written otherwise, which
|
|
166
|
+
`doctor --strict` does not fail on. To take the limit, run `npx eslint .` and settle each
|
|
167
|
+
warning: fix it, or raise its rule to `error` (its id in the `rules` key of
|
|
168
|
+
`ddd-ts-kit.config.json` for a rule of the kit, a block after the preset in `eslint.config.mjs`
|
|
169
|
+
for `complexity` or `max-depth`) and record the existing findings with
|
|
170
|
+
`npx eslint . --suppress-rule <rule>` (or `--suppress-all`) in `eslint-suppressions.json`,
|
|
171
|
+
committed; once one is fixed, `npx eslint . --prune-suppressions` removes its entry, and the lint
|
|
172
|
+
fails until it does. Then set the two scripts to `ddd-ts-kit lint`, or run
|
|
173
|
+
`npx ddd-ts-kit init --force`, which also writes every other file and script of the kit over the
|
|
174
|
+
project's. Update the plugin.
|
|
175
|
+
|
|
176
|
+
**`check --explain` follows the violations with the reason of each rule they report.** A reviewer
|
|
177
|
+
of a pull request ran `ddd-ts-kit explain <rule-id>` for each rule `check --changed-since` named.
|
|
178
|
+
`--explain` prints, after the violations, one block per rule reported, however many times: its
|
|
179
|
+
id, its description and why it exists, as `explain` gives it without the examples; for a rule
|
|
180
|
+
another tool decides, where it is checked. `--format json` adds an `explanations` array.
|
|
181
|
+
`--format github` and `--format gitlab` keep one annotation per violation and end the message of
|
|
182
|
+
each with `Why: <reason>`, since a pull request shows an annotation alone on its line and a Code
|
|
183
|
+
Quality report has no place for text beside its issues; the fingerprints do not change. It
|
|
184
|
+
combines with paths, `--rule`, `--changed-since` and `--clean-only`. Without it, the output is
|
|
185
|
+
the same as before.
|
|
186
|
+
|
|
187
|
+
**`doctor` checks the environment of a checkout.** A new worktree starts from nothing, and what
|
|
188
|
+
goes wrong there is its environment: `verify` failed late, on a symptom. After what an upgrade
|
|
189
|
+
left to do, `npx ddd-ts-kit doctor` now says what this checkout lacks to run the project, read
|
|
190
|
+
from its files without network: the running Node against `engines.node` (`node engines.node:
|
|
191
|
+
unsupported`) and the version `.nvmrc` names; `node_modules` missing or installed before the
|
|
192
|
+
lockfile last changed (`install node_modules: missing`, `outdated`); `ddd-ts-kit` and every
|
|
193
|
+
`@ddd-ts-kit/*` package installed at the version of the running CLI (`install <package>: not
|
|
194
|
+
installed`, `other version`), where the package findings read the ranges of `package.json`, in
|
|
195
|
+
the install of its workspace for a project inside one; and,
|
|
196
|
+
with a `.gitmodules`, every submodule initialised (`submodule <path>: not initialised`). Each comes
|
|
197
|
+
with its fix (`nvm use`, `npm ci` in the dialect of the project, `git submodule update --init
|
|
198
|
+
--recursive`). `--strict` now also exits 1 while the checkout cannot run the project: a Node
|
|
199
|
+
outside `engines.node`, no `node_modules`, a package of the kit not installed or at another
|
|
200
|
+
version, a submodule not initialised. A Node `.nvmrc` does not name and a lockfile changed since
|
|
201
|
+
the install are said without failing it. A project or a pipeline that runs `doctor --strict` where
|
|
202
|
+
no dependencies are installed fails from this version: install first. `--json` gains the areas
|
|
203
|
+
`node`, `install` and `submodule`. The `parallel-work` skill runs it in a worktree made otherwise.
|
|
204
|
+
|
|
205
|
+
**`init` records the version that wrote the files of the platform.** `ddd-ts-kit.config.json`
|
|
206
|
+
now starts with `"initVersion"`, the version of the CLI whose `init` wrote the files it owns;
|
|
207
|
+
`init --force` rewrites it, and `init` run again to add a context leaves it. Nothing reads it yet:
|
|
208
|
+
it is the first step of an `init` that tells, after an upgrade, a change of its templates from an
|
|
209
|
+
adaptation of the team. A config without the key stays valid.
|
|
210
|
+
|
|
211
|
+
To move: nothing; `init --force` adds the key to a project initialised before it existed.
|
|
212
|
+
|
|
213
|
+
**An adapter that nothing wires is reported.** `declarations/port-adapter-wired`
|
|
214
|
+
(`ddd-ts-kit check`, a warning) reports a class of `infrastructure/` that implements a port of
|
|
215
|
+
`domain/repositories/` or `application/ports/` and that nothing wires: in the declared style it
|
|
216
|
+
carries no `@Repository`, `@Gateway` or `@Adapter`, and in both styles no file of the composition
|
|
217
|
+
root (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, the platform directory) imports
|
|
218
|
+
it. `declarations/role-declared` reads a role file by its suffix, so such a class in a file without
|
|
219
|
+
one was reported by no rule and only showed at run time as a missing binding. A file that still
|
|
220
|
+
carries a `TODO(domain)` or `TODO(platform)` is not judged yet: an adapter the generator wrote
|
|
221
|
+
before the outside system is ready is listed by `ddd-ts-kit todo` until it is wired. To move, run
|
|
222
|
+
`ddd-ts-kit check --rule declarations/port-adapter-wired`, then declare each reported class
|
|
223
|
+
(`@Gateway(Port)` in a `*.gateway.ts`, for example) or bind it in the module file; one kept
|
|
224
|
+
unwired on purpose gets its decision record in `docs/adr/` and
|
|
225
|
+
`// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` above the class.
|
|
226
|
+
It becomes an error in the next minor version.
|
|
227
|
+
|
|
228
|
+
**The plugin and the packages share one version: 0.82.0.** The plugin numbered itself apart
|
|
229
|
+
(0.81.0 while the packages were at 0.27.0), so one agent showed a version and another the other.
|
|
230
|
+
From this release on, the release sets the version of the plugin with the version of the
|
|
231
|
+
packages; the version its skills describe already was that of the packages. The packages jump
|
|
232
|
+
from 0.27.0 to 0.82.0, above the last version of the plugin, so that an installed plugin is still
|
|
233
|
+
updated; no version between them was published. The plugin now changes with each release of the
|
|
234
|
+
kit, and an urgent fix of it is a patch release of the kit.
|
|
235
|
+
|
|
236
|
+
To move: upgrade the packages of the kit to 0.82.0 together, as at every release, and update the
|
|
237
|
+
plugin; from now on its version is the version of the kit.
|
|
238
|
+
|
|
7
239
|
## 0.27.0
|
|
8
240
|
|
|
9
241
|
**The worktrees of a project live inside it, and a new project writes its code in a worktree.**
|