ddd-ts-kit 0.104.0 → 0.106.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 +122 -6
- package/README.fr.md +33 -25
- package/README.md +30 -23
- package/dist/check/baseline/renamed-files.d.ts.map +1 -1
- package/dist/check/baseline/renamed-files.js +2 -1
- package/dist/check/baseline/renamed-files.js.map +1 -1
- package/dist/check/canonical/earlier-context-file.d.ts +1 -6
- package/dist/check/canonical/earlier-context-file.d.ts.map +1 -1
- package/dist/check/canonical/earlier-context-file.js +4 -10
- package/dist/check/canonical/earlier-context-file.js.map +1 -1
- package/dist/check/commands/changed-files.d.ts.map +1 -1
- package/dist/check/commands/changed-files.js +2 -1
- package/dist/check/commands/changed-files.js.map +1 -1
- package/dist/check/events/domain-event-names.d.ts +1 -1
- package/dist/check/events/domain-event-names.js +1 -1
- package/dist/check/explain/errors-docs.d.ts.map +1 -1
- package/dist/check/explain/errors-docs.js +10 -18
- package/dist/check/explain/errors-docs.js.map +1 -1
- package/dist/check/explain/module-docs.js +1 -1
- package/dist/check/explain/module-docs.js.map +1 -1
- package/dist/check/explain/standard-docs.js +2 -2
- package/dist/check/explain/standard-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/context-file-fixtures.d.ts +1 -1
- package/dist/check/fixtures/context-file-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/context-file-fixtures.js +4 -6
- package/dist/check/fixtures/context-file-fixtures.js.map +1 -1
- package/dist/check/fixtures/earlier-declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/earlier-declarations-fixtures.js +2 -4
- package/dist/check/fixtures/earlier-declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/module-fixtures.js +2 -2
- package/dist/check/fixtures/module-fixtures.js.map +1 -1
- package/dist/check/project/git-ignored.d.ts.map +1 -1
- package/dist/check/project/git-ignored.js +2 -1
- package/dist/check/project/git-ignored.js.map +1 -1
- package/dist/check/rules/authz-declared.d.ts.map +1 -1
- package/dist/check/rules/authz-declared.js +2 -1
- package/dist/check/rules/authz-declared.js.map +1 -1
- package/dist/check/rules/declarations-barrel-current.d.ts.map +1 -1
- package/dist/check/rules/declarations-barrel-current.js +3 -12
- package/dist/check/rules/declarations-barrel-current.js.map +1 -1
- package/dist/check/rules/module-complete.d.ts.map +1 -1
- package/dist/check/rules/module-complete.js +6 -2
- package/dist/check/rules/module-complete.js.map +1 -1
- package/dist/check/rules/tree-closed.d.ts.map +1 -1
- package/dist/check/rules/tree-closed.js +1 -2
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +9 -16
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +6 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/json-report.d.ts +8 -0
- package/dist/commands/json-report.d.ts.map +1 -0
- package/dist/commands/json-report.js +42 -0
- package/dist/commands/json-report.js.map +1 -0
- package/dist/commands/lint.d.ts +2 -3
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +2 -4
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/plan-waves.d.ts +2 -1
- package/dist/commands/plan-waves.d.ts.map +1 -1
- package/dist/commands/plan-waves.js +6 -3
- package/dist/commands/plan-waves.js.map +1 -1
- package/dist/commands/print-report.d.ts.map +1 -1
- package/dist/commands/print-report.js +2 -1
- package/dist/commands/print-report.js.map +1 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +16 -3
- package/dist/commands/status.js.map +1 -1
- package/dist/commit/git-arguments.d.ts +9 -0
- package/dist/commit/git-arguments.d.ts.map +1 -0
- package/dist/commit/git-arguments.js +46 -0
- package/dist/commit/git-arguments.js.map +1 -0
- package/dist/commit/run-git.d.ts.map +1 -1
- package/dist/commit/run-git.js +2 -1
- package/dist/commit/run-git.js.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/kit-container.d.ts +6 -0
- package/dist/config/kit-container.d.ts.map +1 -0
- package/dist/config/kit-container.js +10 -0
- package/dist/config/kit-container.js.map +1 -0
- package/dist/config/stack.d.ts +1 -1
- 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/context-files/context-file.d.ts +1 -1
- package/dist/declared/earlier-layout-notice.d.ts +1 -1
- package/dist/declared/earlier-layout-notice.js +1 -1
- package/dist/declared/earlier-layout-notice.js.map +1 -1
- package/dist/declared/keeps-role-folder-files.d.ts +1 -2
- package/dist/declared/keeps-role-folder-files.d.ts.map +1 -1
- package/dist/declared/keeps-role-folder-files.js +1 -2
- package/dist/declared/keeps-role-folder-files.js.map +1 -1
- package/dist/declared/keeps-single-file.d.ts +2 -3
- package/dist/declared/keeps-single-file.d.ts.map +1 -1
- package/dist/declared/keeps-single-file.js +2 -3
- package/dist/declared/keeps-single-file.js.map +1 -1
- package/dist/docs/spec-heading.d.ts +5 -1
- package/dist/docs/spec-heading.d.ts.map +1 -1
- package/dist/docs/spec-heading.js +8 -2
- package/dist/docs/spec-heading.js.map +1 -1
- package/dist/doctor/format-diagnosis.js +3 -0
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/hook-findings.d.ts +2 -1
- package/dist/doctor/hook-findings.d.ts.map +1 -1
- package/dist/doctor/hook-findings.js +10 -2
- package/dist/doctor/hook-findings.js.map +1 -1
- package/dist/doctor/permission-findings.js +1 -0
- package/dist/doctor/permission-findings.js.map +1 -1
- package/dist/generate/di-entry.d.ts +4 -0
- package/dist/generate/di-entry.d.ts.map +1 -0
- package/dist/generate/di-entry.js +5 -0
- package/dist/generate/di-entry.js.map +1 -0
- package/dist/generate/di-imports.d.ts +4 -0
- package/dist/generate/di-imports.d.ts.map +1 -0
- package/dist/generate/di-imports.js +12 -0
- package/dist/generate/di-imports.js.map +1 -0
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +3 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/background/spec-family.d.ts +1 -1
- package/dist/generate/kinds/background/spec-family.d.ts.map +1 -1
- package/dist/generate/kinds/background/spec-family.js +2 -1
- package/dist/generate/kinds/background/spec-family.js.map +1 -1
- package/dist/generate/kinds/background-job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/background-job-kind.js +8 -1
- package/dist/generate/kinds/background-job-kind.js.map +1 -1
- package/dist/generate/kinds/command-outputs.d.ts.map +1 -1
- package/dist/generate/kinds/command-outputs.js +2 -1
- package/dist/generate/kinds/command-outputs.js.map +1 -1
- package/dist/generate/kinds/extraction/service-selection.d.ts.map +1 -1
- package/dist/generate/kinds/extraction/service-selection.js +2 -1
- package/dist/generate/kinds/extraction/service-selection.js.map +1 -1
- package/dist/generate/kinds/gateway-kind.js +1 -1
- package/dist/generate/kinds/gateway-kind.js.map +1 -1
- package/dist/generate/kinds/import-assembler.d.ts.map +1 -1
- package/dist/generate/kinds/import-assembler.js +11 -2
- package/dist/generate/kinds/import-assembler.js.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.d.ts.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.js +8 -4
- package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
- package/dist/generate/kinds/job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/job-kind.js +2 -1
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/personal-data/declare-personal-data.js +1 -1
- package/dist/generate/kinds/personal-data/declare-personal-data.js.map +1 -1
- package/dist/generate/kinds/process-kind.d.ts.map +1 -1
- package/dist/generate/kinds/process-kind.js +8 -1
- package/dist/generate/kinds/process-kind.js.map +1 -1
- package/dist/generate/kinds/query-outputs.d.ts.map +1 -1
- package/dist/generate/kinds/query-outputs.js +2 -1
- package/dist/generate/kinds/query-outputs.js.map +1 -1
- package/dist/generate/kinds/test-world-kind.d.ts.map +1 -1
- package/dist/generate/kinds/test-world-kind.js +3 -2
- package/dist/generate/kinds/test-world-kind.js.map +1 -1
- package/dist/generate/kinds/world/context-fakes.d.ts.map +1 -1
- package/dist/generate/kinds/world/context-fakes.js +2 -1
- package/dist/generate/kinds/world/context-fakes.js.map +1 -1
- package/dist/generate/kinds/world/world-arrangement.d.ts.map +1 -1
- package/dist/generate/kinds/world/world-arrangement.js +2 -1
- package/dist/generate/kinds/world/world-arrangement.js.map +1 -1
- package/dist/generate/kinds/world/world-vars.d.ts.map +1 -1
- package/dist/generate/kinds/world/world-vars.js +2 -1
- package/dist/generate/kinds/world/world-vars.js.map +1 -1
- package/dist/generate/spec-vars.d.ts.map +1 -1
- package/dist/generate/spec-vars.js +2 -1
- package/dist/generate/spec-vars.js.map +1 -1
- package/dist/generate/wiring-family.d.ts +1 -1
- package/dist/generate/wiring-family.d.ts.map +1 -1
- package/dist/generate/wiring-family.js +2 -1
- package/dist/generate/wiring-family.js.map +1 -1
- package/dist/generate/wirings.js +2 -2
- package/dist/generate/wirings.js.map +1 -1
- package/dist/help/flag-notes.d.ts.map +1 -1
- package/dist/help/flag-notes.js +8 -0
- package/dist/help/flag-notes.js.map +1 -1
- package/dist/help/reading-notes.d.ts.map +1 -1
- package/dist/help/reading-notes.js +4 -2
- package/dist/help/reading-notes.js.map +1 -1
- package/dist/help/tool-notes.d.ts.map +1 -1
- package/dist/help/tool-notes.js +1 -2
- package/dist/help/tool-notes.js.map +1 -1
- package/dist/help/usage.js +4 -4
- package/dist/init/add-presets.d.ts +8 -0
- package/dist/init/add-presets.d.ts.map +1 -0
- package/dist/init/add-presets.js +17 -0
- package/dist/init/add-presets.js.map +1 -0
- package/dist/init/agent-permissions.js +2 -0
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/files/audit-files.js +1 -1
- package/dist/init/files/audit-files.js.map +1 -1
- package/dist/init/files/auth-files.js +2 -2
- package/dist/init/files/auth-files.js.map +1 -1
- package/dist/init/files/event-sourcing-files.js +1 -1
- package/dist/init/files/event-sourcing-files.js.map +1 -1
- package/dist/init/files/family-of.d.ts +1 -1
- package/dist/init/files/family-of.d.ts.map +1 -1
- package/dist/init/files/family-of.js +2 -1
- package/dist/init/files/family-of.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +2 -1
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/files/platform-files.js +2 -2
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/files/privacy-files.js +1 -1
- package/dist/init/files/privacy-files.js.map +1 -1
- package/dist/init/manifest/dependencies-against-stack.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-against-stack.js +5 -1
- package/dist/init/manifest/dependencies-against-stack.js.map +1 -1
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +4 -0
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/versions.d.ts.map +1 -1
- package/dist/init/manifest/versions.js +28 -24
- package/dist/init/manifest/versions.js.map +1 -1
- package/dist/init/manifest/write-manifest.js +1 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/regulated-sandbox.d.ts +5 -3
- package/dist/init/regulated-sandbox.d.ts.map +1 -1
- package/dist/init/regulated-sandbox.js +6 -3
- package/dist/init/regulated-sandbox.js.map +1 -1
- package/dist/init/rewire-personal-data.js +1 -1
- package/dist/init/rewire-personal-data.js.map +1 -1
- package/dist/init/rewire-preset.d.ts +1 -1
- package/dist/init/rewire-preset.d.ts.map +1 -1
- package/dist/init/rewire-preset.js +5 -2
- package/dist/init/rewire-preset.js.map +1 -1
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +7 -7
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/resolve-stack.js +1 -1
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/resolve-style.d.ts +1 -1
- package/dist/init/stack/resolve-style.js +4 -4
- package/dist/init/stack/resolve-style.js.map +1 -1
- package/dist/init/validation-dependencies.d.ts.map +1 -1
- package/dist/init/validation-dependencies.js +3 -1
- package/dist/init/validation-dependencies.js.map +1 -1
- package/dist/layout/fit-statement.js +16 -2
- package/dist/layout/fit-statement.js.map +1 -1
- package/dist/lint/eslint-in-project.d.ts +1 -1
- package/dist/lint/eslint-in-project.d.ts.map +1 -1
- package/dist/lint/eslint-in-project.js +1 -6
- package/dist/lint/eslint-in-project.js.map +1 -1
- package/dist/lint/format-verdict.d.ts +2 -2
- package/dist/lint/format-verdict.d.ts.map +1 -1
- package/dist/lint/format-verdict.js +3 -4
- package/dist/lint/format-verdict.js.map +1 -1
- package/dist/lint/lint-verdict.d.ts +2 -13
- package/dist/lint/lint-verdict.d.ts.map +1 -1
- package/dist/lint/lint-verdict.js +4 -22
- package/dist/lint/lint-verdict.js.map +1 -1
- package/dist/lint/parse-lint-answer.d.ts +1 -3
- package/dist/lint/parse-lint-answer.d.ts.map +1 -1
- package/dist/lint/parse-lint-answer.js +0 -2
- package/dist/lint/parse-lint-answer.js.map +1 -1
- package/dist/merge/git-process.d.ts.map +1 -1
- package/dist/merge/git-process.js +2 -1
- package/dist/merge/git-process.js.map +1 -1
- package/dist/merge/lost/revision-files.d.ts.map +1 -1
- package/dist/merge/lost/revision-files.js +6 -1
- package/dist/merge/lost/revision-files.js.map +1 -1
- package/dist/merge/lost/side-hunks.d.ts.map +1 -1
- package/dist/merge/lost/side-hunks.js +2 -1
- package/dist/merge/lost/side-hunks.js.map +1 -1
- package/dist/merge/merge-in-progress.d.ts +7 -0
- package/dist/merge/merge-in-progress.d.ts.map +1 -0
- package/dist/merge/merge-in-progress.js +22 -0
- package/dist/merge/merge-in-progress.js.map +1 -0
- package/dist/merge/object-bytes.d.ts.map +1 -1
- package/dist/merge/object-bytes.js +2 -1
- package/dist/merge/object-bytes.js.map +1 -1
- package/dist/model-modules/module-layers.d.ts +1 -1
- package/dist/model-modules/module-layers.d.ts.map +1 -1
- package/dist/model-modules/module-layers.js +1 -1
- package/dist/model-modules/module-layers.js.map +1 -1
- package/dist/model-modules/role-folders-of.js +1 -1
- package/dist/model-modules/role-folders-of.js.map +1 -1
- package/dist/package-manager/package-manager-vars.d.ts +1 -1
- package/dist/package-manager/package-manager-vars.js +2 -2
- package/dist/package-manager/package-manager-vars.js.map +1 -1
- package/dist/package-manager/pinned-package-managers.d.ts +2 -2
- package/dist/package-manager/pinned-package-managers.js +2 -2
- package/dist/plan/copy-of-project.d.ts.map +1 -1
- package/dist/plan/copy-of-project.js +2 -1
- package/dist/plan/copy-of-project.js.map +1 -1
- package/dist/plan/format-plan.d.ts.map +1 -1
- package/dist/plan/format-plan.js +12 -2
- package/dist/plan/format-plan.js.map +1 -1
- package/dist/plan/ready-now.d.ts +8 -0
- package/dist/plan/ready-now.d.ts.map +1 -0
- package/dist/plan/ready-now.js +25 -0
- package/dist/plan/ready-now.js.map +1 -0
- package/dist/plan/wave-plan.d.ts +8 -0
- package/dist/plan/wave-plan.d.ts.map +1 -1
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +2 -0
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-refusal.d.ts.map +1 -1
- package/dist/presets/identity-refusal.js +4 -3
- package/dist/presets/identity-refusal.js.map +1 -1
- package/dist/presets/organisations-as-audit-chains.d.ts +10 -0
- package/dist/presets/organisations-as-audit-chains.d.ts.map +1 -0
- package/dist/presets/organisations-as-audit-chains.js +30 -0
- package/dist/presets/organisations-as-audit-chains.js.map +1 -0
- package/dist/progress/format-progress.js +10 -1
- package/dist/progress/format-progress.js.map +1 -1
- package/dist/progress/progress.d.ts +2 -0
- package/dist/progress/progress.d.ts.map +1 -1
- package/dist/progress/ready-rows.d.ts +7 -0
- package/dist/progress/ready-rows.d.ts.map +1 -0
- package/dist/progress/ready-rows.js +14 -0
- package/dist/progress/ready-rows.js.map +1 -0
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +7 -2
- 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 +8 -5
- package/templates/acl/translator.spec.ts.tpl +3 -3
- package/templates/adapter/adapter.spec.ts.tpl +2 -7
- package/templates/adapter/simulated.spec.ts.tpl +1 -1
- package/templates/aggregate/aggregate.spec.ts.tpl +1 -9
- package/templates/architecture/{extractable.tsyringe.spec.ts.tpl → extractable.container.spec.ts.tpl} +2 -1
- package/templates/architecture/extractable.declared.spec.ts.tpl +2 -1
- package/templates/background-job/background-job.spec.buses.ts.tpl +19 -3
- package/templates/background-job/{background-job.spec.tsyringe.ts.tpl → background-job.spec.container.ts.tpl} +42 -12
- package/templates/controller/guard.spec.ts.tpl +22 -17
- package/templates/controller/guard.ts.tpl +3 -5
- package/templates/domain-service/domain-service.spec.ts.tpl +2 -2
- package/templates/init/README.md.tpl +8 -6
- package/templates/init/docker/Dockerfile.tpl +7 -7
- package/templates/init/docker/env.example.tpl +2 -0
- package/templates/init/e2e/start-application.database.ts.tpl +5 -5
- package/templates/init/e2e/start-application.memory.ts.tpl +5 -5
- package/templates/init/main.ts.tpl +1 -0
- package/templates/init/platform/composition/{compose-application.tsyringe.ts.tpl → compose-application.container.ts.tpl} +4 -7
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +2 -0
- package/templates/init/platform/events/start-outbox-relay.ts.tpl +5 -1
- package/templates/init/platform/observability/create-logger.stdout.ts.tpl +2 -2
- package/templates/init/platform/observability/create-metrics.ts.tpl +6 -3
- package/templates/init/platform/resilience/adapters-with-own-policy.ts.tpl +1 -1
- package/templates/init/platform/resilience/default-policy.ts.tpl +1 -1
- package/templates/init/rules/application.md.tpl +2 -0
- package/templates/init/rules/domain.md.tpl +2 -0
- package/templates/init/rules/infrastructure.md.tpl +2 -0
- package/templates/init/rules/platform.md.tpl +3 -3
- package/templates/init/rules/tests.md.tpl +2 -2
- package/templates/pipeline/biome.json.tpl +1 -1
- package/templates/pipeline/github/actions/setup/action.yml.tpl +3 -2
- package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +2 -2
- package/templates/pipeline/lefthook.yml +4 -0
- package/templates/pipeline/package-scripts.json +2 -2
- package/templates/pipeline/vitest.config.ts.tpl +2 -0
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.handler.ts.tpl +6 -4
- package/templates/presets/identity/context/test/integration/organisation-tenant-directory.spec.ts.tpl +7 -6
- package/templates/presets/identity/context/test/worlds/__context__.world.declared.ts.tpl +2 -1
- package/templates/presets/identity/design.md.tpl +4 -2
- package/templates/presets/identity/e2e/support.wiring.tpl +4 -4
- package/templates/presets/identity/platform/organisation-of-command.ts.tpl +36 -0
- package/templates/process/timeout-job.spec.buses.ts.tpl +15 -2
- package/templates/process/{timeout-job.spec.tsyringe.ts.tpl → timeout-job.spec.container.ts.tpl} +21 -2
- package/templates/query/search.reader.spec.ts.tpl +1 -1
- package/templates/repository/knex/mapper.ts.tpl +1 -1
- package/templates/service/main.ts.tpl +1 -0
- package/templates/value-object/value-object.spec.ts.tpl +1 -5
- /package/templates/adapter/{simulated.wiring.tsyringe.tpl → simulated.wiring.container.tpl} +0 -0
- /package/templates/adapter/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/architecture/{hosting.tsyringe.spec.ts.tpl → hosting.container.spec.ts.tpl} +0 -0
- /package/templates/architecture/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/background-job/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/command/{handler.spec.tsyringe.ts.tpl → handler.spec.container.ts.tpl} +0 -0
- /package/templates/command/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/context/{module.tsyringe.ts.tpl → module.container.ts.tpl} +0 -0
- /package/templates/context/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/controller/{routes.tsyringe.tpl → routes.container.tpl} +0 -0
- /package/templates/erasure-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/event-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/file-upload/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/gateway/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/init/platform/audit/{audit.module.tsyringe.ts.tpl → audit.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/auth/authorization/{authorization.tsyringe.ts.tpl → authorization.container.ts.tpl} +0 -0
- /package/templates/init/platform/buses/{create-command-bus.tsyringe.ts.tpl → create-command-bus.container.ts.tpl} +0 -0
- /package/templates/init/platform/buses/{create-query-bus.tsyringe.ts.tpl → create-query-bus.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{context-selection.tsyringe.ts.tpl → context-selection.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{lay-foundations.tsyringe.ts.tpl → lay-foundations.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{platform-test.module.tsyringe.ts.tpl → platform-test.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{platform.module.tsyringe.ts.tpl → platform.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{routes-of.tsyringe.ts.tpl → routes-of.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{bind-files.tsyringe.ts.tpl → bind-files.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{files.module.tsyringe.ts.tpl → files.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{staging-uploads.tsyringe.ts.tpl → staging-uploads.container.ts.tpl} +0 -0
- /package/templates/init/platform/jobs/{housekeeping.module.tsyringe.ts.tpl → housekeeping.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{data-subject-copies.tsyringe.ts.tpl → data-subject-copies.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{data-subject-exports.tsyringe.ts.tpl → data-subject-exports.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{privacy.module.tsyringe.ts.tpl → privacy.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-erasure.tsyringe.ts.tpl → run-erasure.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-export.tsyringe.ts.tpl → run-export.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-purge.tsyringe.ts.tpl → run-purge.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-erase.tsyringe.ts.tpl → privacy-erase.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-export.tsyringe.ts.tpl → privacy-export.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-purge.tsyringe.ts.tpl → privacy-purge.container.ts.tpl} +0 -0
- /package/templates/integration-event/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/integration-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/job/{job.spec.tsyringe.ts.tpl → job.spec.container.ts.tpl} +0 -0
- /package/templates/job/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/module/{module-file.tsyringe.ts.tpl → module-file.container.ts.tpl} +0 -0
- /package/templates/module/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/personal-data/{copies.tsyringe.tpl → copies.container.tpl} +0 -0
- /package/templates/personal-data/{exports.tsyringe.tpl → exports.container.tpl} +0 -0
- /package/templates/personal-data/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/process/{timeout-job.wiring.tsyringe.tpl → timeout-job.wiring.container.tpl} +0 -0
- /package/templates/projection/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/query/{handler.spec.tsyringe.ts.tpl → handler.spec.container.ts.tpl} +0 -0
- /package/templates/query/{search.handler.spec.tsyringe.ts.tpl → search.handler.spec.container.ts.tpl} +0 -0
- /package/templates/query/{search.wiring.tsyringe.tpl → search.wiring.container.tpl} +0 -0
- /package/templates/query/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/repository/{event-sourced.wiring.tsyringe.tpl → event-sourced.wiring.container.tpl} +0 -0
- /package/templates/repository/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/route/{routes.on-tsyringe.tpl → routes.on-container.tpl} +0 -0
- /package/templates/service/{extracted.tsyringe.tpl → extracted.container.tpl} +0 -0
- /package/templates/test-world/{world.tsyringe.ts.tpl → world.container.ts.tpl} +0 -0
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ and the stack trace.
|
|
|
63
63
|
```
|
|
64
64
|
ddd-ts-kit init [--http express|fastify|hono|nest|none]
|
|
65
65
|
[--validation zod|class-validator|typebox|standard-schema|none]
|
|
66
|
-
[--di tsyringe|nest|manual] [--tests vitest|jest]
|
|
66
|
+
[--di tsyringe|inversify|awilix|nest|manual] [--tests vitest|jest]
|
|
67
67
|
[--orm drizzle|knex|prisma|typeorm|custom|none]
|
|
68
68
|
[--database postgres|mysql|sqlite|none]
|
|
69
69
|
[--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]
|
|
@@ -125,7 +125,9 @@ taken on another machine, or whose holder cannot be read, is taken over a minute
|
|
|
125
125
|
the config: the contexts and their upstreams, the rules, the limits, the deviations and every
|
|
126
126
|
other key stay as written, and the stack changes only where a flag names a choice
|
|
127
127
|
(`init --force --logger pino` changes the logger; a combination the recorded stack cannot take
|
|
128
|
-
is refused as for a new project). The
|
|
128
|
+
is refused as for a new project). The flags of the first `init` may be passed again with `--force`:
|
|
129
|
+
a preset is applied once, so `--preset identity` finds its context written, leaves it as the team
|
|
130
|
+
has it, and says so in a note. The composition root, the proof that each context wires alone
|
|
129
131
|
and the registry of permissions are rewritten from their templates, then the declared contexts
|
|
130
132
|
are wired into them again, and the erasure of each context is listed again in the copies of the
|
|
131
133
|
privacy folder; what another generator had added to a file of the platform (the value of a
|
|
@@ -161,11 +163,13 @@ on class-validator, `--routes nest`), `vitest`,
|
|
|
161
163
|
`drizzle` on `postgres`, `outbox` when there is an ORM, `swagger`, `github`, `jwt`, `rbac`, no broker,
|
|
162
164
|
the cache in the process, files in a local directory (`--storage local`), the audit trail `on` when there is an ORM, the requests of a data subject answered (`--privacy on`) when there is an ORM, no event store (`--event-sourcing off`), unexpected failures reported
|
|
163
165
|
nowhere (`--errors none`), JSON lines on the standard output (`--logger stdout`), and the
|
|
164
|
-
`declared` style with a `barrel` wherever the declarations are read: with `--di tsyringe
|
|
166
|
+
`declared` style with a `barrel` wherever the declarations are read: with `--di tsyringe`,
|
|
167
|
+
`inversify` or `awilix`, which generate the same code on another container underneath.
|
|
165
168
|
|
|
166
169
|
**Package manager.** `pnpm` unless `--package-manager npm`: every script, pipeline, hook, the
|
|
167
170
|
Dockerfile, the guidance and the agent permissions are written in the dialect of the one chosen,
|
|
168
|
-
recorded under `stack.packageManager`. pnpm is pinned in `package.json` and
|
|
171
|
+
recorded under `stack.packageManager`. pnpm is pinned in `package.json` and installed by npm at that release (`npm install --global pnpm`,
|
|
172
|
+
then pnpm runs the release the project pins; Node 25 and later ship no corepack);
|
|
169
173
|
`pnpm-workspace.yaml` says that no dependency runs a build script unless allowed by name. Both are
|
|
170
174
|
proven by a real install of a generated project, its build and its `verify`. The kit is installed
|
|
171
175
|
from the registry either way.
|
|
@@ -202,7 +206,7 @@ composition root assembles it in one line. In the `explicit` style every binding
|
|
|
202
206
|
module file of the context: `builder.bind(Port).toClass(Adapter, [Ports])`,
|
|
203
207
|
`builder.command(Message).requires(...).handledBy(Handler, [Ports])`, `builder.job(name, schedule)`.
|
|
204
208
|
`--style declared` is refused with `--di manual` and `--di nest`: the declarations are plain
|
|
205
|
-
metadata, and only `@ddd-ts-kit/di`
|
|
209
|
+
metadata, and only `@ddd-ts-kit/di` turns them into bindings.
|
|
206
210
|
`--assembly` says how a declared context reaches the composition root: `barrel` (the default) is
|
|
207
211
|
generated files, `<context>.declarations.ts` at the root of the context re-exporting the
|
|
208
212
|
declarations of each layer, static, followed by a bundler, by knip and by dependency-cruiser; `discovery` writes `await discoverContext(...)` instead, with the knip entry
|
|
@@ -592,9 +596,9 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
592
596
|
| `package.json` | scripts and dependencies of the stack (below); `build` is the compiler, then `ddd-ts-kit build-aliases` |
|
|
593
597
|
| `tsconfig.json`, `tsconfig.build.json` | strict, NodeNext, `rootDir` `.` and `outDir` `dist`, and `paths`: the one declaration of the import alias (`@/*` to `./src/*`, `$test/*`, `$scripts/*`, and `$generated/*` with Prisma), derived from `importAlias` (`--import-alias '$<name>/'`, `@/` by default; `#<name>/` and `@<name>/` are refused with the reason); the build config extends the other and declares no `paths`; `experimentalDecorators` (and `emitDecoratorMetadata`) only for nest or class-validator, whose decorators are legacy ones: the declarations and the aspects serve both modes |
|
|
594
598
|
| `src/main.ts` | composition root: tracing first (error reporting second with `--errors sentry`), config, persistence, application (`log`, `traceConsumers: config.tracing.consumers`, `resilience`, `jobs: { start: config.runJobs, settings: jobSettings(process.env) }`), outbox relay, HTTP server; on `SIGTERM` or `SIGINT` it closes the server, stops the relay, stops the application, closes the persistence and shuts the tracing down |
|
|
595
|
-
| `src/platform/` | one export per file, each named after it, in one folder per concern, no file at its root (a project generated before the folders keeps them flat until `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` and `lay-foundations.ts` in both families, then `platform.module.ts` and `platform-test.module.ts` on tsyringe, `platform.ts`, `platform-options.ts` and `create-platform.ts` wired by hand); `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`; `environment.ts`, the reader of the variables of the process, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, which keeps every problem by variable name and reports them at once; `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`tracing.ts`, the first import of every entry point; `errors.ts` with `--errors sentry`; `create-logger.ts`, see `--logger`; `create-metrics.ts`:
|
|
599
|
+
| `src/platform/` | one export per file, each named after it, in one folder per concern, no file at its root (a project generated before the folders keeps them flat until `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` and `lay-foundations.ts` in both families, then `platform.module.ts` and `platform-test.module.ts` on tsyringe, `platform.ts`, `platform-options.ts` and `create-platform.ts` wired by hand); `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`; `environment.ts`, the reader of the variables of the process, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, which keeps every problem by variable name and reports them at once; `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`tracing.ts`, the first import of every entry point; `errors.ts` with `--errors sentry`; `create-logger.ts`, see `--logger`; `create-metrics.ts`: `openTelemetryMetrics()` of `@ddd-ts-kit/tracing`, exported by OTLP with the spans); `resilience/` (`resilience-settings.ts`, `default-resilience-settings.ts`, `default-policy.ts`: retry with backoff and a timeout for `external` and `gateway`, `own-policy.ts` for an adapter that states its own, `adapters-with-own-policy.ts`, the set the default policy leaves alone); `events/`, `database/`, `auth/`, `audit/`, `redis/` (below); `event-sourcing/` and `privacy/` (below); `http/` (`start-http-server.ts`, `with-documentation.ts`: `/docs` and `/openapi.json`, or `/openapi/<name>.json` per document of a split contract, off in production unless `API_DOCS=true`; `openapi-documents.ts`, the split written by `ddd-ts-kit docs` from `openapi.documents`). With `--di tsyringe`: `compose-application.ts` (`composeApplication(persistence, options, contexts?)`: `kernelModule({...})`, the platform module, the authorization module, the contexts; installs the aspect runtime), `lay-foundations.ts` (one execution scope, clock, id generator, logger, metrics, instrumentation and audit, built before any module), `platform.module.ts` (what replaces the in-process defaults of the kernel: unit of work, processed-event store, the storage class, `OutboxStore`, `EventSubscribers` behind a broker, `ErrorMapper`, and `builder.around(['external', 'gateway'], ...)`, the resilience of every adapter that leaves the process), `platform-test.module.ts` (what a handler spec lists next to its context: the storage class bound to a factory that throws), `buses/create-command-bus.ts` and `create-query-bus.ts` (outermost first: `errorReportingMiddleware`, `loggingMiddleware`, `metricsMiddleware`, the permission, the span of the use case, the audit entry, then the unit of work of a command). With `--di manual` or `nest`: `compose-application.ts`, `platform.ts` (`interface Platform`, with `jobs: JobScheduler` and `adapter`, which wraps what a module file instantiates), `platform-options.ts`, `lay-foundations.ts` (the same foundations as on tsyringe, the log of the decisions or the audit sources included), `create-platform.ts` (the assembly: the domain events, the guard, the two buses, the event ports, the files and what wraps every adapter), `buses/create-command-bus.ts` and `create-query-bus.ts` (the same chains as on tsyringe, given the guard and the storage), `events/platform-events.ts` (the publisher, the subscribers and, behind Varnish, the purges), `jobs/configured-job-scheduler.ts` (applies `job-settings.ts` to what a module registers) |
|
|
596
600
|
| tracing | wired once, by the platform (`tracing/platform-only`): no `decorate` hook, no `decorate-bindings.ts`. `tracing.ts` starts `initTracing` of `@ddd-ts-kit/tracing/node` before any other module, on what `config/read-tracing.ts` validates: `OTEL_EXPORTER_OTLP_ENDPOINT` (a URL; left out, no span leaves the process), `TRACE_SAMPLE_RATIO` (0 to 1) and `TRACE_CONSUMERS` (`continue`, the default: a consumed event stays in the trace of its publication; `link`: each delivery starts a trace linked to it). With `--di tsyringe`: `lay-foundations.ts` builds `traceApplication({ consumers })`, `compose-application.ts` hands it to `kernelModule({ instrumentation })` (one span per use case, repository call, domain event, publication, consumer and job) and gives the outbox relay `tracedPublisher(bus)`. With hand wiring: `create-platform.ts` applies the members of `traceApplication()` itself (`useCase` on both buses, `domainEvents`, `publisher`, `binding` around every adapter, `job`, `executionScope`, `errorReporter`), with `tracedSubscriber` and `tracedPublisher` around the provider. With an HTTP stack, in both families, `auth/authentication/http-boundary.ts` sets `around: tracedRoutes()`: one `SERVER` span per request, named by its route |
|
|
597
|
-
| `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines
|
|
601
|
+
| `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines; `pino` is `createPinoLogger` of `@ddd-ts-kit/pino` (dependencies `pino` and `pino-pretty`); `winston` is `createWinstonLogger` of `@ddd-ts-kit/winston`; the three redact the credential keys of the kernel, whatever their case. Every entry carries `traceLogFields(scope)`: the correlation id, origin, actor and tenant of the work in progress and the ids of the active trace. `LOG_LEVEL`, `LOG_FORMAT` (`json`, the default, or `pretty`; with `stdout`, which has no pretty format, `pretty` is refused when the configuration is loaded) and `LOG_SCRUB_MESSAGES` (`[message removed]` in place of the message of a logged error that is not a `DomainError`) are validated in `config/load-config.ts`. Stopping the application flushes the error reporter, then the logger, last: `container.stop()` does it on tsyringe, `compose-application.ts` flushes explicitly with hand wiring. The tools and the tests compose the application without `log` and write nothing |
|
|
598
602
|
| `src/platform/auth/` | one folder per question: `authentication/` (who is calling), `authorization/` (what they may do, whatever the model) and the folder of the model `stack.authz` names (`roles/`, `attributes/`, `relationships/` or `custom/`). A project generated before the folders keeps its files flat: the generators read them there, `npx ddd-ts-kit doctor` says so and `npx ddd-ts-kit platform-folders` moves them with every import |
|
|
599
603
|
| `src/platform/auth/authentication/` | `create-authenticator.ts` (`--authn jwt`: `JwtAuthenticator` on `AUTH_ISSUER`, `AUTH_AUDIENCE`, `AUTH_JWKS_URI`; `--authn keycloak`: `keycloakAuthenticator` on `KEYCLOAK_URL`, `KEYCLOAK_REALM`, `KEYCLOAK_AUDIENCE` and the optional `KEYCLOAK_CLIENT_ID`; `--authn passport`: `passportAuthenticator` of `@ddd-ts-kit/auth/passport` over `bearer-strategy.ts`, the strategy of `passport-jwt` on the key set `AUTH_JWKS_URI` publishes (`jwks-rsa`), `AUTH_ISSUER` and `AUTH_AUDIENCE`, which refuses a token without `exp` unless given `requireExpiry: false` and allows RS256, PS256 and ES256, the `DEFAULT_JWT_ALGORITHMS` of `JwtAuthenticator` but EdDSA, which `jsonwebtoken` cannot verify (an issuer that signs with EdDSA needs `--authn jwt`), and `actor-of-token.ts`, which reads its payload with `actorOfClaims`; `--authn none`: `development-header-authenticator.ts` and `development-actor-header.ts`, which read `x-development-actor` and throw in production), `principal-of.ts`, `security-schemes.ts`, `offline-authenticator.ts`, `http-boundary.ts` (`resolvePrincipal` answering a `Session`, `executionScope`, `errorMapper` and `onError`, spread into the mount options: every request runs inside the execution scope, with its correlation id). Without an HTTP stack there is no authenticator and no boundary, and no folder |
|
|
600
604
|
| `src/platform/auth/authorization/` | `create-authorizer.ts`, `authorization.ts` (`authorizationModule` with tsyringe) or `use-case-protection.ts` (the guard of the hand-wired buses), `access-policies.ts`, `role.ts` (the roles a credential carries, with roles or attributes, or once a guard names one), `permissions.ts` (the registry of every permission, with relationships or an authorizer of your own), `signed-in-grants.ts` once a context preset grants every signed-in person, and with `--audit off` `log-decisions.ts` (one log entry per decision, ids and codes only) |
|
|
@@ -631,7 +635,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
631
635
|
| `REVIEW.md` | the review policy of the project: the passes of a review (bugs, security, compliance against the design review of the row, the acceptance of the story, the records of `docs/adr/` and the rules), what Important means, at most five nits (a recurring one becomes a line of `AGENTS.md` under `## Mistakes seen here` or a rule of the config), what is not reported (generated files, what `npm run verify` refuses). Read by the `architecture-reviewer` agent on top of its method, by a human reviewer and by any review bot. Written once, for the team to edit: `--force` leaves it alone, `doctor` says when it is missing |
|
|
632
636
|
| `.github/copilot/settings.json` | the plugin of the kit, declared for GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`): its cloud agent installs it, the Copilot CLI and VS Code recommend it; an existing file keeps what it holds and gains the two entries |
|
|
633
637
|
| `.claude/hooks/production-gate.mjs`, `.claude/hooks/change-reference.mjs` | with `--agent-profile regulated`: the two hooks of the profile, registered under `hooks.PreToolUse` of `.claude/settings.json`, written once for the team to edit (`--force` writes them again). The gate blocks a command that names the production environment with a release action unless `RELEASE_APPROVAL` names an approver and a change; the reference asks before an edit of a migration or of the containers, for the `Change: <id>` trailer of the commit ([Sandboxing coding agents](../../docs/guides/agent-sandbox.md#the-regulated-profile)) |
|
|
634
|
-
| `.claude/settings.json` | permissions (and, with `--agent-profile regulated`, the sandbox block below): the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), `generate` and `init` with `--force`, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) ask first, and so does an edit of the generated contracts and of the lock of an acceptance (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json`: an ask rule, since the sandbox of Claude Code would make a denied path read-only to `docs:generate` and `acceptance --lock` too; the guard of the plugin refuses a hand edit of them) and of what reaches production otherwise than through the code: the migrations of the ORM (`migrations/**` with drizzle, knex and typeorm, `prisma/migrations/**` with prisma, nothing with a custom persistence or none), `Dockerfile`, `docker-compose.yml` and `docker/**`. The compose file reads `.env` at the root, which the deny list already covers; nothing under `docker/` holds a secret |
|
|
638
|
+
| `.claude/settings.json` | permissions (and, with `--agent-profile regulated`, the sandbox block below): the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), `generate` and `init` with `--force`, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) ask first, and so does an edit of the generated contracts and of the lock of an acceptance (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json`: an ask rule, since the sandbox of Claude Code would make a denied path read-only to `docs:generate` and `acceptance --lock` too; the guard of the plugin refuses a hand edit of them) and of what reaches production otherwise than through the code: the migrations of the ORM (`migrations/**` with drizzle, knex and typeorm, `prisma/migrations/**` with prisma, nothing with a custom persistence or none), `Dockerfile`, `docker-compose.yml` and `docker/**`. The compose file reads `.env` at the root, which the deny list already covers; nothing under `docker/` holds a secret. `package.json` has no rule, since it is edited for its dependencies all day: the guard of the plugin asks when an edit changes its `scripts`, which the gates run |
|
|
635
639
|
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env` and every `.env.*` but `.env.example` (the same in `.dockerignore`), `*.tsbuildinfo`, `.ddd-ts-kit/`, where `worker-scope` writes, and `.worktrees/`, where the worktrees live |
|
|
636
640
|
|
|
637
641
|
`--ci both` writes the two pipelines, `--ci none` neither (and no `renovate.json`). The pipeline
|
|
@@ -863,7 +867,9 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
863
867
|
`--authz rbac`, the id of the permission under the role `system` of `platform/auth/roles/roles.ts`,
|
|
864
868
|
the role `createAuthorizer` gives every system actor (`systemRole`) and no other: a user token
|
|
865
869
|
that names `system` among its roles does not hold it; `--authz abac`, a
|
|
866
|
-
`permit('system-<job>', [permission], ({ actor }) => actor.id === 'system:<job>')`
|
|
870
|
+
`permit('system-<job>', [permission], ({ actor }) => isSystem(actor) && actor.id === 'system:<job>')`
|
|
871
|
+
rule, `isSystem` of the kernel imported, so that a token whose subject reads `system:<job>` does
|
|
872
|
+
not stand for the job, in
|
|
867
873
|
`platform/auth/attributes/attribute-policies.ts`; `--authz rebac`, the tuple
|
|
868
874
|
`context:<context>#operator@system:<job>` in `platform/auth/relationships/relate-system-actors.ts`,
|
|
869
875
|
written to the tuple store when the application starts, as long as the schema still lets a
|
|
@@ -986,7 +992,7 @@ Templates are plain files in `templates/<kind>/`, with `{{name.pascal}}`, `{{nam
|
|
|
986
992
|
## docs
|
|
987
993
|
|
|
988
994
|
```
|
|
989
|
-
ddd-ts-kit docs [--check] [--stored-events] [--behaviour]
|
|
995
|
+
ddd-ts-kit docs [--check] [--dry-run] [--stored-events] [--behaviour]
|
|
990
996
|
```
|
|
991
997
|
|
|
992
998
|
Regenerates what is derived from the config and the code, and nothing else:
|
|
@@ -1035,7 +1041,8 @@ event declared in the codecs of `infrastructure/persistence/`, never rewriting a
|
|
|
1035
1041
|
run it once the shape of a version is final.
|
|
1036
1042
|
|
|
1037
1043
|
`--check` writes nothing, names each stale file and each declared stored-event version not
|
|
1038
|
-
recorded in `stored-events.lock.json`, and exits 1.
|
|
1044
|
+
recorded in `stored-events.lock.json`, and exits 1. `--dry-run` writes nothing either: it names
|
|
1045
|
+
each generated file it would create, update or delete, as `docs` would write them. The event catalog and the
|
|
1039
1046
|
AsyncAPI document need the code of the project to run, so they are produced by
|
|
1040
1047
|
`scripts/events.ts` (`npm run events:generate`, part of `npm run docs:generate`).
|
|
1041
1048
|
|
|
@@ -1280,14 +1287,15 @@ each `CONTEXT.md`.
|
|
|
1280
1287
|
## status, todo
|
|
1281
1288
|
|
|
1282
1289
|
```
|
|
1283
|
-
ddd-ts-kit status [--workers]
|
|
1290
|
+
ddd-ts-kit status [--workers | --ready]
|
|
1284
1291
|
ddd-ts-kit todo [<context>] [--brief]
|
|
1285
1292
|
```
|
|
1286
1293
|
|
|
1287
1294
|
`status` prints the `Next:` line of `docs/architecture/plan.md`, the rows of
|
|
1288
1295
|
`docs/architecture/slices.md` by status and by owner, and per context the `TODO(domain)`,
|
|
1289
1296
|
`TODO(platform)` and `it.todo` left, then those outside the contexts. A missing file is not an
|
|
1290
|
-
error
|
|
1297
|
+
error; a missing `ddd-ts-kit.config.json` is one: before `init`, `status` refuses with exit 2 and
|
|
1298
|
+
names `init`, and prints no half answer. When the plan sits at step 7 (the build) the `Next:` line is derived from the rows (the next row ready on the trunk, or `7 build done` once every row is done) and the line of the plan is printed beside it, `planNext` in `--json`. Each row not done says whether it can start: ready on the trunk when every dependency is
|
|
1291
1299
|
done, ready on a branch when each dependency not done is a row briefed to a worker whose worktree
|
|
1292
1300
|
has commits ahead of its base (the `rows` of its `.ddd-ts-kit/worker.json`, as `status --workers`
|
|
1293
1301
|
reads them), and waiting otherwise, with the ids it waits for. A story or a milestone whose rows
|
|
@@ -1295,7 +1303,7 @@ are all done while markers of its own keep it open gets a line of its own (only
|
|
|
1295
1303
|
may keep such a story open are blamed, one git call per file), with the command that lists them:
|
|
1296
1304
|
`story M1: every row done, 3 markers left: npx ddd-ts-kit story-check M1` (see
|
|
1297
1305
|
[story-check](#story-check)). `--json` prints
|
|
1298
|
-
`{ next, slices, remaining }`: `next` and `slices` are `null` when their file is missing,
|
|
1306
|
+
`{ next, planNext, slices, remaining }`: `next` and `slices` are `null` when their file is missing,
|
|
1299
1307
|
`slices` holds `{ file, rows, byStatus, byOwner, duplicates, unscoped, unclosed }`, `unclosed`
|
|
1300
1308
|
being `[{ story, markers, command }]`, a row not done carrying
|
|
1301
1309
|
`ready: 'trunk' | 'branch' | 'waiting'` and `waitingFor` (its dependencies not done), and
|
|
@@ -1339,7 +1347,7 @@ twelve words at most), the file holding the rest, a quarter of the size mid-slic
|
|
|
1339
1347
|
## plan-waves
|
|
1340
1348
|
|
|
1341
1349
|
```
|
|
1342
|
-
ddd-ts-kit plan-waves [<context>]
|
|
1350
|
+
ddd-ts-kit plan-waves [<context>] [--ready]
|
|
1343
1351
|
```
|
|
1344
1352
|
|
|
1345
1353
|
Orders the rows of `docs/architecture/slices.md` that are not `done`, for a build split between
|
|
@@ -1701,7 +1709,8 @@ otherwise (under `agents.profile: "regulated"`, each line of the sandbox block t
|
|
|
1701
1709
|
which makes each checkout and each worktree run its own lefthook and fail a commit, loudly,
|
|
1702
1710
|
when its dependencies are missing; the fix is that line, or `init --force` for the whole file.
|
|
1703
1711
|
The pre-commit hook under `git rev-parse --git-path hooks` must exist and come from lefthook;
|
|
1704
|
-
the fix is `npm run hooks:install`, once per clone.
|
|
1712
|
+
the fix is `npm run hooks:install`, once per clone. Outside a git repository the hooks cannot be read: `doctor` then
|
|
1713
|
+
reports `hook git repository` as missing, which fails `--strict`, and `git init` comes first. Then the guidance written once for the team
|
|
1705
1714
|
to own: `REVIEW.md`, the review policy, and under the regulated profile the two hooks of
|
|
1706
1715
|
`.claude/hooks/`, are reported missing (`guidance`) and `init` writes them again without touching
|
|
1707
1716
|
anything else.
|
|
@@ -2354,7 +2363,7 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
2354
2363
|
| `context/extractable` | a module file importing another context outside its published language; persistence importing another context's infrastructure or naming its schema; a handler importing another context's repository; `export let` or an exported `new Map`, `Set`, `WeakMap` at module level; `deployable: true` without `apps/<context>/main.ts`; in the declared style, a role file importing anything of a port file of another context |
|
|
2355
2364
|
| `governance/recorded-deviation` | a `ddd-ts-kit-disable` or `eslint-disable` comment whose reason names no `ADR-<number>` with a file `docs/adr/<number>-*.md`; a rule set to `off` (or to `warn` below its default), an extra directory, a context whose `tenancy` is `control-plane`, an extra allowed package, a `guard` other than `enforce` or `stack.events` off the outbox, without a `deviations` entry `{ what, adr, reason }` pointing to an existing record |
|
|
2356
2365
|
| `declarations/role-declared` | declared style only: a role file (other than `*.command.ts` and `*.query.ts`, held by `authz/declared`; `*.job.ts` under `application/scheduling/` with `@Scheduled` and `*.publisher.ts` with `@DomainEventHandler` are roles) exporting no class with the decorator of its suffix and folder, or one carrying another declaration; a declared class in a file that is not a role file; a `consumer` or `name` option that is missing, empty, a variable, a concatenation or a template with a substitution; any declaration decorator on a class under `domain/` |
|
|
2357
|
-
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<layer>.declarations.ts` of a layer or one that differs from one `export *` per role file of the layer sorted by path followed by one `injected(Class, [Tokens])` per class of the layer whose constructor takes something (read from the signatures, with their imports), a `<context>.declarations.ts` that is missing or differs from one `export *` per such file sorted by path, and the declarations of a layer that holds no role file any more; with `discovery`, generated declarations that still exist, and a `<context>.dependencies.ts` that differs from those `injected` statements (absent is accepted while it would hold none). The message names the missing role file or the class whose list is stale. A context still declared as an earlier version wrote it, exactly as that version would write it (the single `<context>.declarations.ts` of 0.84, or one `<folder>.declarations.ts` per role folder as 0.85 and 0.86 wrote them), is
|
|
2366
|
+
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<layer>.declarations.ts` of a layer or one that differs from one `export *` per role file of the layer sorted by path followed by one `injected(Class, [Tokens])` per class of the layer whose constructor takes something (read from the signatures, with their imports), a `<context>.declarations.ts` that is missing or differs from one `export *` per such file sorted by path, and the declarations of a layer that holds no role file any more; with `discovery`, generated declarations that still exist, and a `<context>.dependencies.ts` that differs from those `injected` statements (absent is accepted while it would hold none). The message names the missing role file or the class whose list is stale. A context still declared as an earlier version wrote it, exactly as that version would write it (the single `<context>.declarations.ts` of 0.84, or one `<folder>.declarations.ts` per role folder as 0.85 and 0.86 wrote them), is an error, reported once at its summary (`docs` moves it, and `docs --check` names the files that move would write). It needs the tree, so `check-file` does not run it |
|
|
2358
2367
|
| `declarations/constructor-injection` | declared style only, in a role file: on a class whose decorator lists nothing, a constructor parameter that is optional, has a default value, is a rest parameter or is destructured, has no type, or is typed by anything but one class name (type arguments aside): a union, an intersection, an array, a qualified name, a type of the language, an interface, a type alias, an enum or an unexported class of the file or of the file of the project it is imported from; a class that inherits its constructor from a class the project cannot read. Under `stack.dependencies: signature`, a decorator that carries a list although the constructor can be read: one that repeats it, one that differs |
|
|
2359
2368
|
| `declarations/port-adapter-wired` | a class of `infrastructure/` implementing a port that nothing wires: no `@Repository`, `@Gateway` or `@Adapter` in the declared style, and no file of the composition root (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, the platform) importing it, once the file carries no `TODO(domain)` or `TODO(platform)` left; one kept on purpose carries `// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` |
|
|
2360
2369
|
| `ports/abstract-class` | in a port file (`domain/repositories/*.repository.ts`, `application/ports/*.port.ts`): a class that is not `abstract`; a member that is not an abstract method or property (`static readonly tokenKey = '<text>'` apart): a constructor, a body, an initializer, a `private`, `protected` or `#` member; an exported `interface` (a `type` alias, a data shape, is not reported) |
|
|
@@ -2524,13 +2533,11 @@ ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix] [--no-cache]
|
|
|
2524
2533
|
What `lint` and `ci:lint` of a generated project run: the ESLint of the project, through its API,
|
|
2525
2534
|
on the paths given (the project otherwise), its report in the format asked (`--format gitlab`
|
|
2526
2535
|
writes the Code Quality report as `eslint-formatter-gitlab` does), `--fix` as ESLint takes it.
|
|
2527
|
-
It exits 1 on an error, and on a warning as on an error,
|
|
2528
|
-
|
|
2529
|
-
an error. Those are shown in the report and listed after it, one line per rule, without failing:
|
|
2530
|
-
an upgrade of the kit never turns a green lint red. Without ESLint installed it exits 2 and names
|
|
2536
|
+
It exits 1 on an error, and on a warning as on an error, a rule new in this version included.
|
|
2537
|
+
Without ESLint installed it exits 2 and names
|
|
2531
2538
|
the install. See [Quality baseline](../../docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
2532
2539
|
With `--json` ESLint reports in its JSON format and the command answers, on one line,
|
|
2533
|
-
`{ errors, warnings,
|
|
2540
|
+
`{ errors, warnings, report }` (`report` is the JSON report of ESLint), with the same
|
|
2534
2541
|
exit code and nothing on stderr.
|
|
2535
2542
|
|
|
2536
2543
|
The command lints with the cache of ESLint, keyed by the content of each file (`.eslintcache/`,
|
|
@@ -2575,7 +2582,7 @@ the process, without a container:
|
|
|
2575
2582
|
them, pass `check` and `docs --check` as generated.
|
|
2576
2583
|
- `typecheck.spec.ts`: the 36 of them the workspace can compile (jest, prisma and typeorm
|
|
2577
2584
|
apart) type-check against the sources of the workspace packages.
|
|
2578
|
-
- `proven-stacks.spec.ts`: the
|
|
2585
|
+
- `proven-stacks.spec.ts`: the projects of `PROVEN` are installed as a published kit would be and held to
|
|
2579
2586
|
everything their own pipeline runs: `check` with zero violation and zero warning, ESLint with the
|
|
2580
2587
|
preset (the test first reads from `eslint --print-config` that the rules of ports, scheduling,
|
|
2581
2588
|
file shape and layout are on), dependency-cruiser with the generated configuration, knip, their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-files.d.ts","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"renamed-files.d.ts","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAWzD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { BASELINE_FILE } from './read-baseline.js';
|
|
3
|
+
import { gitArguments } from '../../commit/git-arguments.js';
|
|
3
4
|
/**
|
|
4
5
|
* The files git sees renamed since the baseline was last committed, staged and committed renames
|
|
5
6
|
* alike (a `git mv`, or a move git recognises from the content), relative to the project root.
|
|
@@ -18,6 +19,6 @@ export function renamedFiles(root) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
function git(root, args) {
|
|
21
|
-
return execFileSync('git',
|
|
22
|
+
return execFileSync('git', gitArguments(args), { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=renamed-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-files.js","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"renamed-files.js","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC;QAE3F,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;aACrF,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAC/B,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,GAAG,CAAC,IAAY,EAAE,IAAuB;IAChD,OAAO,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AACrH,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import type { Config } from '../../config/index.js';
|
|
2
2
|
import type { Flaw } from '../model/flaw.js';
|
|
3
|
-
/** A file of a context still where 0.86 and 0.87 wrote it: a warning while it is the only one, an error next to the one at the root. */
|
|
4
|
-
export interface EarlierContextFile {
|
|
5
|
-
readonly flaw: Flaw;
|
|
6
|
-
readonly severity: 'warn' | 'error';
|
|
7
|
-
}
|
|
8
3
|
/**
|
|
9
4
|
* What `tree/closed` says of a file of a context that 0.86 and 0.87 wrote in a role folder, the code list
|
|
10
5
|
* (`domain/errors/codes.ts`) or the permission set (`application/authorization/<context>.permissions.ts`),
|
|
11
6
|
* now at the root of the context; undefined for any other entry. `entries` are every entry of the
|
|
12
7
|
* contexts, to tell whether the root holds the file already.
|
|
13
8
|
*/
|
|
14
|
-
export declare function earlierContextFile(entry: string, config: Config, entries: ReadonlySet<string>):
|
|
9
|
+
export declare function earlierContextFile(entry: string, config: Config, entries: ReadonlySet<string>): Flaw | undefined;
|
|
15
10
|
//# sourceMappingURL=earlier-context-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earlier-context-file.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/earlier-context-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"earlier-context-file.d.ts","sourceRoot":"","sources":["../../../src/check/canonical/earlier-context-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAsBhH"}
|
|
@@ -15,19 +15,13 @@ export function earlierContextFile(entry, config, entries) {
|
|
|
15
15
|
const root = file.root(context);
|
|
16
16
|
if (entries.has(`${config.contextsDir}/${context}/${root}`)) {
|
|
17
17
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
message: `"${context}" holds ${relative} next to ${root}: one context has one of each.`,
|
|
21
|
-
fix: `Keep ${root}, move into it what ${relative} holds that it lacks, and delete ${relative}.`,
|
|
22
|
-
},
|
|
18
|
+
message: `"${context}" holds ${relative} next to ${root}: one context has one of each.`,
|
|
19
|
+
fix: `Keep ${root}, move into it what ${relative} holds that it lacks, and delete ${relative}.`,
|
|
23
20
|
};
|
|
24
21
|
}
|
|
25
22
|
return {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
message: `${relative} of "${context}" is where 0.86 and 0.87 kept it: it lives at the root of the context now, ${root}. This version reads it where it is, and a later minor version reports it as an error.`,
|
|
29
|
-
fix: 'Run `npx ddd-ts-kit context-layout`, which moves it to the root of its context and rewrites every import of it, then commit the result.',
|
|
30
|
-
},
|
|
23
|
+
message: `${relative} of "${context}" is where 0.86 and 0.87 kept it: it lives at the root of the context now, ${root}.`,
|
|
24
|
+
fix: 'Run `npx ddd-ts-kit context-layout`, which moves it to the root of its context and rewrites every import of it, then commit the result.',
|
|
31
25
|
};
|
|
32
26
|
}
|
|
33
27
|
//# sourceMappingURL=earlier-context-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earlier-context-file.js","sourceRoot":"","sources":["../../../src/check/canonical/earlier-context-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"earlier-context-file.js","sourceRoot":"","sources":["../../../src/check/canonical/earlier-context-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,MAAc,EAAE,OAA4B;IAC5F,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IAExF,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;QACtE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEhC,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QAC5D,OAAO;YACL,OAAO,EAAE,IAAI,OAAO,WAAW,QAAQ,YAAY,IAAI,gCAAgC;YACvF,GAAG,EAAE,QAAQ,IAAI,uBAAuB,QAAQ,oCAAoC,QAAQ,GAAG;SAChG,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,GAAG,QAAQ,QAAQ,OAAO,8EAA8E,IAAI,GAAG;QACxH,GAAG,EAAE,yIAAyI;KAC/I,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAatE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { CliError } from '../../cli-error.js';
|
|
3
|
+
import { gitArguments } from '../../commit/git-arguments.js';
|
|
3
4
|
/**
|
|
4
5
|
* The files changed since `commit`, the commit a ref the caller checked names, relative to the
|
|
5
6
|
* project root: committed since the merge base, tracked files modified in the index or the
|
|
@@ -18,7 +19,7 @@ export function changedFiles(root, commit) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
function gitLines(root, args) {
|
|
21
|
-
return execFileSync('git',
|
|
22
|
+
return execFileSync('git', gitArguments(args), { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })
|
|
22
23
|
.split('\n')
|
|
23
24
|
.map((line) => line.trim())
|
|
24
25
|
.filter((line) => line !== '');
|
|
@@ -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;
|
|
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;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,MAAc;IACvD,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACvE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;QAC5E,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC;QAEjF,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,QAAQ,CAChB,0CAA0C,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAC/D,4GAA4G,CAC7G,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAuB;IACrD,OAAO,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;SAC/G,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { SourceFile } from '../model/source-file.js';
|
|
|
2
2
|
import type { StringRecord } from '../scan/string-record.js';
|
|
3
3
|
/**
|
|
4
4
|
* The name a domain event class gives itself: `extends NamedDomainEvent('...')` or `static readonly eventName = '...'`, which its
|
|
5
|
-
* `readonly name` and its reactions read, or
|
|
5
|
+
* `readonly name` and its reactions read, or `readonly name = '...'` alone, the member the `DomainEvent` contract of the kernel asks.
|
|
6
6
|
*/
|
|
7
7
|
export declare function domainEventNames(file: SourceFile): StringRecord[];
|
|
8
8
|
//# sourceMappingURL=domain-event-names.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const NAME_PROPERTY = /(?<![\w$.])(?:name|eventName)\s*\??\s*(?:[:=]|:[^=;\n'"]+=)\s*$|(?<![\w$.])NamedDomainEvent\s*\(\s*$/;
|
|
3
3
|
/**
|
|
4
4
|
* The name a domain event class gives itself: `extends NamedDomainEvent('...')` or `static readonly eventName = '...'`, which its
|
|
5
|
-
* `readonly name` and its reactions read, or
|
|
5
|
+
* `readonly name` and its reactions read, or `readonly name = '...'` alone, the member the `DomainEvent` contract of the kernel asks.
|
|
6
6
|
*/
|
|
7
7
|
export function domainEventNames(file) {
|
|
8
8
|
return file.scan.strings.filter((literal) => NAME_PROPERTY.test(file.scan.code.slice(Math.max(0, literal.start - 200), literal.start)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"errors-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgDzD,CAAC"}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
export const ERRORS_DOCS = {
|
|
2
2
|
'errors/code-unique': {
|
|
3
3
|
why: 'The code is the identity of a refusal for everything outside the domain: the HTTP mapper gives it a status, the OpenAPI document lists it, the audit trail and the span record it as the reason, a client branches on it and a test asserts it. Nothing downstream knows the class or the factory. Two refusals of one context under one code are therefore one refusal for every reader, whatever their messages say. The code is checked per context, since each context owns its language: the same code in two contexts is allowed, and the error mapper of the application gives it one status. Every form is read: the first argument of `refusal(..)` in a factory of a concept class, the `readonly code` field of a class per error, and under "stack.refusals": "named" the values of <context>.codes.ts, the code list of the context, where two keys under one value are reported. Judged under "stack.refusals": "factories" and "named": a project whose config does not say was written when an error was a class, and keeps working untouched.',
|
|
4
|
-
bad:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
static slotTaken(calendarId: string) {
|
|
15
|
-
return AppointmentError.refusal('SLOT_TAKEN', 'The slot is already held.', { calendarId });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static outsideAvailability(startsAt: Date) {
|
|
19
|
-
return AppointmentError.refusal('OUTSIDE_AVAILABILITY', 'The calendar takes no appointment then.', { startsAt });
|
|
20
|
-
}
|
|
21
|
-
}`,
|
|
4
|
+
bad: `// appointment.codes.ts
|
|
5
|
+
export const AppointmentCodes = {
|
|
6
|
+
SlotTaken: 'BOOKING_REFUSED',
|
|
7
|
+
OutsideAvailability: 'BOOKING_REFUSED',
|
|
8
|
+
} as const;`,
|
|
9
|
+
good: `// appointment.codes.ts
|
|
10
|
+
export const AppointmentCodes = {
|
|
11
|
+
SlotTaken: 'SLOT_TAKEN',
|
|
12
|
+
OutsideAvailability: 'OUTSIDE_AVAILABILITY',
|
|
13
|
+
} as const;`,
|
|
22
14
|
},
|
|
23
15
|
'errors/code-listed': {
|
|
24
16
|
why: 'Under "stack.refusals": "named" a refusal is a class of its own, `SlotTaken`, and its code is what everything outside the domain knows it by: the error mapper gives it a status, the OpenAPI document and the client list it, a test asserts it. The codes of a context are therefore one closed list, <context>.codes.ts, `export const SchedulingCodes = { SlotTaken: \'SLOT_TAKEN\' } as const`, and each class reads its code from it under its own name, `readonly code = SchedulingCodes.SlotTaken`: the list is the contract of the context in one file, two refusals cannot drift to one code unseen, and the type of each code stays its own literal. Reported: a refusal class (a class of domain/errors/ that extends DomainRefusal, abstract ones aside) without a code, with a code written another way (a string literal, another entry, the list of another context), a context with refusal classes and no codes.ts, a class whose name the list does not hold; in codes.ts, a list missing or not `as const`, a key that names no refusal class of the context (a code nothing raises), and a value that is not a string literal in constant case. The value is usually the name of the class in constant case, but need not be: a migrated project keeps its codes, since the code is the contract. Judged under "stack.refusals": "named" only.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-docs.js","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,ggCAAggC;QACrgC,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"errors-docs.js","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,ggCAAggC;QACrgC,GAAG,EAAE;;;;YAIG;QACR,IAAI,EAAE;;;;YAIE;KACT;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,qyCAAqyC;QAC1yC,GAAG,EAAE;;;;;;;;;EASP;QACE,IAAI,EAAE;;;;;;;;;;;;;;EAcR;KACC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,ktCAAktC;QACvtC,GAAG,EAAE;iIACwH;QAC7H,IAAI,EAAE,0HAA0H;KACjI;CACF,CAAC"}
|
|
@@ -12,7 +12,7 @@ export const MODULE_DOCS = {
|
|
|
12
12
|
| \`waitlist\` | The waitlist of a calendar and the offers made to waiters. |`,
|
|
13
13
|
},
|
|
14
14
|
'module/complete': {
|
|
15
|
-
why: 'A context half divided into modules is read two ways at once: a concept may be in its module or still at the level of the context, and the reader has to look in both. Once a context declares modules, each module is one folder of the context holding its four layers, and every file of a layer belongs to one of them, with its specs in the module folder of its test folder (test/unit/<module>/). The context keeps at its own level what every module shares: the closed list of its error codes (<context>.codes.ts) and its permission set (<context>.permissions.ts) at its root, the schema, tables and migrations of its database (infrastructure/persistence/), its route groups, guards and shared shapes (presentation/http/), the fakes, builders and worlds of its specs, and the generated declarations. A module still where 0.86 and 0.87 put it (domain/<module>/) is reported too: `ddd-ts-kit context-layout` moves it. It is a warning so that a large context moves into its modules one cluster per commit, with `ddd-ts-kit move-to-module`, which rewrites the imports and takes the specs of a moved file with it.',
|
|
15
|
+
why: 'A context half divided into modules is read two ways at once: a concept may be in its module or still at the level of the context, and the reader has to look in both. Once a context declares modules, each module is one folder of the context holding its four layers, and every file of a layer belongs to one of them, with its specs in the module folder of its test folder (test/unit/<module>/). The context keeps at its own level what every module shares: the closed list of its error codes (<context>.codes.ts) and its permission set (<context>.permissions.ts) at its root, the schema, tables and migrations of its database (infrastructure/persistence/), its route groups, guards and shared shapes (presentation/http/), the fakes, builders and worlds of its specs, and the generated declarations. A module still where 0.86 and 0.87 put it (domain/<module>/) is reported too, as an error: `ddd-ts-kit context-layout` moves it. It is a warning so that a large context moves into its modules one cluster per commit, with `ddd-ts-kit move-to-module`, which rewrites the imports and takes the specs of a moved file with it.',
|
|
16
16
|
bad: `contexts/scheduling/calendars/domain/aggregates/calendar.aggregate.ts
|
|
17
17
|
contexts/scheduling/domain/aggregates/waitlist.aggregate.ts // still at the level of the context
|
|
18
18
|
contexts/scheduling/infrastructure/persistence/knex-waitlist.repository.ts // an adapter of the waitlist, outside it`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-docs.js","sourceRoot":"","sources":["../../../src/check/explain/module-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,iBAAiB,EAAE;QACjB,GAAG,EAAE,8rBAA8rB;QACnsB,GAAG,EAAE;0CACiC;QACtC,IAAI,EAAE;;;;;;8EAMoE;KAC3E;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"module-docs.js","sourceRoot":"","sources":["../../../src/check/explain/module-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,iBAAiB,EAAE;QACjB,GAAG,EAAE,8rBAA8rB;QACnsB,GAAG,EAAE;0CACiC;QACtC,IAAI,EAAE;;;;;;8EAMoE;KAC3E;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,gmCAAgmC;QACrmC,GAAG,EAAE;;uHAE8G;QACnH,IAAI,EAAE;;;;;6GAKmG;KAC1G;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE,0jBAA0jB;QAC/jB,GAAG,EAAE;;;oGAG2F;QAChG,IAAI,EAAE;;oFAE0E;KACjF;CACF,CAAC"}
|
|
@@ -35,9 +35,9 @@ export class PinoLogger implements Logger {}`,
|
|
|
35
35
|
'governance/recorded-deviation': {
|
|
36
36
|
why: 'The architecture can be changed deliberately, not case by case. A suppression, a lowered severity or a widened list that points to no decision is indistinguishable from a shortcut, and gets copied. The decision record says why, for what scope and until when, so the exception can be reviewed today and removed later.',
|
|
37
37
|
bad: `// eslint-disable-next-line no-console -- needed for the demo
|
|
38
|
-
"rules": { "test/spec-required": "off" }`,
|
|
38
|
+
"rules": { "test/spec-required": { "severity": "off", "files": ["src/contexts/billing/infrastructure/**"] } }`,
|
|
39
39
|
good: `// eslint-disable-next-line no-console -- ADR-0004: startup banner read by operations
|
|
40
|
-
"rules": { "test/spec-required": "off" },
|
|
40
|
+
"rules": { "test/spec-required": { "severity": "off", "files": ["src/contexts/billing/infrastructure/**"] } },
|
|
41
41
|
"deviations": [{ "what": "rules.test/spec-required", "adr": "0009", "reason": "Generated adapters are covered by the contract suite." }]
|
|
42
42
|
// docs/adr/0004-startup-banner.md, docs/adr/0009-no-spec-for-generated-adapters.md`,
|
|
43
43
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-docs.js","sourceRoot":"","sources":["../../../src/check/explain/standard-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,oBAAoB,EAAE;QACpB,GAAG,EAAE,8cAA8c;QACnd,GAAG,EAAE;wDAC+C;QACpD,IAAI,EAAE;;;wDAG8C;KACrD;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,yiBAAyiB;QAC9iB,GAAG,EAAE;4CACmC;QACxC,IAAI,EAAE;;wDAE8C;KACrD;IACD,gCAAgC,EAAE;QAChC,GAAG,EAAE,qkBAAqkB;QAC1kB,GAAG,EAAE;;;;;gFAKuE;QAC5E,IAAI,EAAE;;;;;;6CAMmC;KAC1C;IACD,+BAA+B,EAAE;QAC/B,GAAG,EAAE,8TAA8T;QACnU,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"standard-docs.js","sourceRoot":"","sources":["../../../src/check/explain/standard-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAsC;IAC9D,oBAAoB,EAAE;QACpB,GAAG,EAAE,8cAA8c;QACnd,GAAG,EAAE;wDAC+C;QACpD,IAAI,EAAE;;;wDAG8C;KACrD;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,yiBAAyiB;QAC9iB,GAAG,EAAE;4CACmC;QACxC,IAAI,EAAE;;wDAE8C;KACrD;IACD,gCAAgC,EAAE;QAChC,GAAG,EAAE,qkBAAqkB;QAC1kB,GAAG,EAAE;;;;;gFAKuE;QAC5E,IAAI,EAAE;;;;;;6CAMmC;KAC1C;IACD,+BAA+B,EAAE;QAC/B,GAAG,EAAE,8TAA8T;QACnU,GAAG,EAAE;8GACqG;QAC1G,IAAI,EAAE;;;oFAG0E;KACjF;CACF,CAAC"}
|
|
@@ -30,7 +30,7 @@ export class IssueInvoiceHandler {}
|
|
|
30
30
|
export class InvoiceIssuedEventHandler {}`,
|
|
31
31
|
},
|
|
32
32
|
'declarations/barrel-current': {
|
|
33
|
-
why: 'With stack.assembly set to barrel, the composition root assembles a context from <context>.declarations.ts and from nothing else. That file only re-exports the generated <layer>.declarations.ts of each layer of the context that holds a role file (application/application.declarations.ts, infrastructure/infrastructure.declarations.ts, presentation/presentation.declarations.ts), in each module of its model. A role file added by hand and missing from the declarations of its layer compiles, passes its unit tests and is never registered. The same file registers what each constructor of its layer is injected, read from its signature: a constructor changed without regenerating would be given the dependencies of the old one. Each file is derived from the tree, one export per role file sorted by path then one injected(Class, [Tokens]) per class that takes something, so it is compared with what the tree says, and the message names the class whose list is stale; the declarations of a layer that holds no role file any more are reported until they are deleted. A context still declared as an earlier version wrote it,
|
|
33
|
+
why: 'With stack.assembly set to barrel, the composition root assembles a context from <context>.declarations.ts and from nothing else. That file only re-exports the generated <layer>.declarations.ts of each layer of the context that holds a role file (application/application.declarations.ts, infrastructure/infrastructure.declarations.ts, presentation/presentation.declarations.ts), in each module of its model. A role file added by hand and missing from the declarations of its layer compiles, passes its unit tests and is never registered. The same file registers what each constructor of its layer is injected, read from its signature: a constructor changed without regenerating would be given the dependencies of the old one. Each file is derived from the tree, one export per role file sorted by path then one injected(Class, [Tokens]) per class that takes something, so it is compared with what the tree says, and the message names the class whose list is stale; the declarations of a layer that holds no role file any more are reported until they are deleted. A context still declared as an earlier version wrote it, the single <context>.declarations.ts of 0.84 or one <folder>.declarations.ts per role folder as 0.85 and 0.86 wrote them (application/commands/commands.declarations.ts), is reported once, at its summary, and ddd-ts-kit docs moves it to the files of its layers. With stack.assembly set to discovery the role files are found at startup, <context>.dependencies.ts holds the lists alone and is compared the same way, and generated declarations left behind are reported.',
|
|
34
34
|
bad: `// application/application.declarations.ts, while IssueInvoiceHandler now also takes a Clock
|
|
35
35
|
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command';
|
|
36
36
|
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.handler';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,2uBAA2uB;QAChvB,GAAG,EAAE;;;sCAG6B;QAClC,IAAI,EAAE;;;;;;+CAMqC;KAC5C;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,irBAAirB;QACtrB,GAAG,EAAE;;;;;;wBAMe;QACpB,IAAI,EAAE;;;;;0CAKgC;KACvC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,2uBAA2uB;QAChvB,GAAG,EAAE;;;sCAG6B;QAClC,IAAI,EAAE;;;;;;+CAMqC;KAC5C;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,irBAAirB;QACtrB,GAAG,EAAE;;;;;;wBAMe;QACpB,IAAI,EAAE;;;;;0CAKgC;KACvC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,mjDAAmjD;QACxjD,GAAG,EAAE;;;;;;;6FAOoF;QACzF,IAAI,EAAE;;;;;;;;;;;;;;+EAcqE;KAC5E;IACD,oCAAoC,EAAE;QACpC,GAAG,EAAE,omCAAomC;QACzmC,GAAG,EAAE;;;;;;;;;iEASwD;QAC7D,IAAI,EAAE;;;;;;;EAOR;KACC;IACD,iCAAiC,EAAE;QACjC,GAAG,EAAE,o8BAAo8B;QACz8B,GAAG,EAAE;+DACsD;QAC3D,IAAI,EAAE;;;;;;;+DAOqD;KAC5D;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+bAA+b;QACpc,GAAG,EAAE;yIACgI;QACrI,IAAI,EAAE;yIAC+H;KACtI;IACD,cAAc,EAAE;QACd,GAAG,EAAE,kXAAkX;QACvX,GAAG,EAAE;;uEAE8D;QACnE,IAAI,EAAE;;2IAEiI;KACxI;IACD,iCAAiC,EAAE;QACjC,GAAG,EAAE,qMAAqM;QAC1M,GAAG,EAAE,qDAAqD;QAC1D,IAAI,EAAE,qGAAqG;KAC5G;CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Fixture } from './fixture.js';
|
|
2
|
-
/** The code list and the permission set of a context: at its root, and
|
|
2
|
+
/** The code list and the permission set of a context: at its root, and where 0.86 and 0.87 kept them, an error. */
|
|
3
3
|
export declare const CONTEXT_FILE_FIXTURES: readonly Fixture[];
|
|
4
4
|
//# sourceMappingURL=context-file-fixtures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-file-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/context-file-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBzC,
|
|
1
|
+
{"version":3,"file":"context-file-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/context-file-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBzC,mHAAmH;AACnH,eAAO,MAAM,qBAAqB,EAAE,SAAS,OAAO,EAyBnD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { source } from './source.js';
|
|
|
4
4
|
const { BILLING } = PATHS;
|
|
5
5
|
const CODES = source("export const BillingCodes = { InvoiceVoid: 'INVOICE_VOID' } as const;");
|
|
6
6
|
const PERMISSIONS = source("import { definePermissions } from '@ddd-ts-kit/auth';", '', "export const billingPermissions = definePermissions('billing', {", " 'invoice.issue': { description: 'Issue invoice' },", '});');
|
|
7
|
-
/** The code list and the permission set of a context: at its root, and
|
|
7
|
+
/** The code list and the permission set of a context: at its root, and where 0.86 and 0.87 kept them, an error. */
|
|
8
8
|
export const CONTEXT_FILE_FIXTURES = [
|
|
9
9
|
{
|
|
10
10
|
ruleId: 'tree/closed',
|
|
@@ -14,21 +14,19 @@ export const CONTEXT_FILE_FIXTURES = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
ruleId: 'tree/closed',
|
|
17
|
-
name: 'the code list where 0.86 and 0.87 kept it:
|
|
17
|
+
name: 'the code list where 0.86 and 0.87 kept it: an error, which context-layout moves',
|
|
18
18
|
expect: { file: `${BILLING}/domain/errors/codes.ts` },
|
|
19
|
-
severity: 'warn',
|
|
20
19
|
files: project({ [`${BILLING}/domain/errors/codes.ts`]: CODES }),
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
ruleId: 'tree/closed',
|
|
24
|
-
name: 'the permission set where 0.86 and 0.87 kept it:
|
|
23
|
+
name: 'the permission set where 0.86 and 0.87 kept it: an error, which context-layout moves',
|
|
25
24
|
expect: { file: `${BILLING}/application/authorization/billing.permissions.ts` },
|
|
26
|
-
severity: 'warn',
|
|
27
25
|
files: project({ [`${BILLING}/application/authorization/billing.permissions.ts`]: PERMISSIONS }),
|
|
28
26
|
},
|
|
29
27
|
{
|
|
30
28
|
ruleId: 'tree/closed',
|
|
31
|
-
name: 'the code list at the root and where 0.86 and 0.87 kept it:
|
|
29
|
+
name: 'the code list at the root and where 0.86 and 0.87 kept it: one of each',
|
|
32
30
|
expect: { file: `${BILLING}/domain/errors/codes.ts` },
|
|
33
31
|
files: project({ [`${BILLING}/billing.codes.ts`]: CODES, [`${BILLING}/domain/errors/codes.ts`]: CODES }),
|
|
34
32
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-file-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/context-file-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE1B,MAAM,KAAK,GAAG,MAAM,CAAC,uEAAuE,CAAC,CAAC;AAE9F,MAAM,WAAW,GAAG,MAAM,CACxB,uDAAuD,EACvD,EAAE,EACF,kEAAkE,EAClE,sDAAsD,EACtD,KAAK,CACN,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"context-file-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/context-file-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE1B,MAAM,KAAK,GAAG,MAAM,CAAC,uEAAuE,CAAC,CAAC;AAE9F,MAAM,WAAW,GAAG,MAAM,CACxB,uDAAuD,EACvD,EAAE,EACF,kEAAkE,EAClE,sDAAsD,EACtD,KAAK,CACN,CAAC;AAEF,mHAAmH;AACnH,MAAM,CAAC,MAAM,qBAAqB,GAAuB;IACvD;QACE,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,mEAAmE;QACzE,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,mBAAmB,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAAE,WAAW,EAAE,CAAC;KAC/G;IACD;QACE,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,iFAAiF;QACvF,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,yBAAyB,EAAE;QACrD,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAAE,KAAK,EAAE,CAAC;KACjE;IACD;QACE,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,sFAAsF;QAC5F,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,mDAAmD,EAAE;QAC/E,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,mDAAmD,CAAC,EAAE,WAAW,EAAE,CAAC;KACjG;IACD;QACE,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,wEAAwE;QAC9E,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,yBAAyB,EAAE;QACrD,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,mBAAmB,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAAE,KAAK,EAAE,CAAC;KACzG;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earlier-declarations-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,sGAAsG;AACtG,eAAO,MAAM,6BAA6B,EAAE,SAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"earlier-declarations-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,sGAAsG;AACtG,eAAO,MAAM,6BAA6B,EAAE,SAAS,OAAO,EA2C3D,CAAC"}
|
|
@@ -20,16 +20,14 @@ export const EARLIER_DECLARATIONS_FIXTURES = [
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
ruleId: 'declarations/barrel-current',
|
|
23
|
-
name: 'the declarations of the role folders of 0.85 and 0.86, current and not moved yet:
|
|
23
|
+
name: 'the declarations of the role folders of 0.85 and 0.86, current and not moved yet: an error, which docs moves',
|
|
24
24
|
expect: { file: BARREL },
|
|
25
|
-
severity: 'warn',
|
|
26
25
|
files: withoutFile(withoutFile(declaredProject(DECLARED_CONTEXT, ROLE_FOLDER_DECLARATIONS), APPLICATION_DECLARATIONS), `${BILLING}/infrastructure/infrastructure.declarations.ts`),
|
|
27
26
|
},
|
|
28
27
|
{
|
|
29
28
|
ruleId: 'declarations/barrel-current',
|
|
30
|
-
name: 'the single declarations file of 0.84, current and not moved yet:
|
|
29
|
+
name: 'the single declarations file of 0.84, current and not moved yet: an error, which docs moves',
|
|
31
30
|
expect: { file: BARREL },
|
|
32
|
-
severity: 'warn',
|
|
33
31
|
files: singleFile(SINGLE_FILE_DECLARATIONS),
|
|
34
32
|
},
|
|
35
33
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earlier-declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE5D,sGAAsG;AACtG,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAgB,EAAE,CACxD,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM,CAClF,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACrG,CACF,CAAC;AAEJ,sGAAsG;AACtG,MAAM,CAAC,MAAM,6BAA6B,GAAuB;IAC/D;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,qGAAqG;QAC3G,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,gDAAgD,EAAE;QAC5E,KAAK,EAAE,eAAe,CAAC,gBAAgB,EAAE;YACvC,GAAG,qBAAqB;YACxB,CAAC,GAAG,OAAO,gDAAgD,CAAC,EAC1D,wBAAwB,CAAC,GAAG,OAAO,gDAAgD,CAAC,IAAI,EAAE;SAC7F,CAAC;KACH;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"earlier-declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE5D,sGAAsG;AACtG,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAgB,EAAE,CACxD,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM,CAClF,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CACrG,CACF,CAAC;AAEJ,sGAAsG;AACtG,MAAM,CAAC,MAAM,6BAA6B,GAAuB;IAC/D;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,qGAAqG;QAC3G,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,gDAAgD,EAAE;QAC5E,KAAK,EAAE,eAAe,CAAC,gBAAgB,EAAE;YACvC,GAAG,qBAAqB;YACxB,CAAC,GAAG,OAAO,gDAAgD,CAAC,EAC1D,wBAAwB,CAAC,GAAG,OAAO,gDAAgD,CAAC,IAAI,EAAE;SAC7F,CAAC;KACH;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,8GAA8G;QACpH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,WAAW,CAChB,WAAW,CAAC,eAAe,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,EAAE,wBAAwB,CAAC,EAClG,GAAG,OAAO,gDAAgD,CAC3D;KACF;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,6FAA6F;QACnG,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,UAAU,CAAC,wBAAwB,CAAC;KAC5C;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,+EAA+E;QACrF,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,UAAU,CACf,wBAAwB,CAAC,OAAO,CAC9B,oFAAoF,EACpF,EAAE,CACH,CACF;KACF;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,6GAA6G;QACnH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,eAAe,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAC;KACjF;CACF,CAAC"}
|