ddd-ts-kit 0.26.0 → 0.82.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 +225 -0
- package/README.fr.md +62 -15
- package/README.md +56 -14
- package/dist/acceptance/acceptance-file-of.d.ts +5 -0
- package/dist/acceptance/acceptance-file-of.d.ts.map +1 -0
- package/dist/acceptance/acceptance-file-of.js +7 -0
- package/dist/acceptance/acceptance-file-of.js.map +1 -0
- package/dist/acceptance/acceptance-gate.d.ts +8 -0
- package/dist/acceptance/acceptance-gate.d.ts.map +1 -0
- package/dist/acceptance/acceptance-gate.js +2 -0
- package/dist/acceptance/acceptance-gate.js.map +1 -0
- package/dist/acceptance/acceptance-lock.d.ts +32 -0
- package/dist/acceptance/acceptance-lock.d.ts.map +1 -0
- package/dist/acceptance/acceptance-lock.js +2 -0
- package/dist/acceptance/acceptance-lock.js.map +1 -0
- package/dist/acceptance/acceptance-problem.d.ts +15 -0
- package/dist/acceptance/acceptance-problem.d.ts.map +1 -0
- package/dist/acceptance/acceptance-problem.js +2 -0
- package/dist/acceptance/acceptance-problem.js.map +1 -0
- package/dist/acceptance/commentless.d.ts +4 -0
- package/dist/acceptance/commentless.d.ts.map +1 -0
- package/dist/acceptance/commentless.js +31 -0
- package/dist/acceptance/commentless.js.map +1 -0
- package/dist/acceptance/counts-for.d.ts +5 -0
- package/dist/acceptance/counts-for.d.ts.map +1 -0
- package/dist/acceptance/counts-for.js +8 -0
- package/dist/acceptance/counts-for.js.map +1 -0
- package/dist/acceptance/criteria-in.d.ts +14 -0
- package/dist/acceptance/criteria-in.d.ts.map +1 -0
- package/dist/acceptance/criteria-in.js +34 -0
- package/dist/acceptance/criteria-in.js.map +1 -0
- package/dist/acceptance/drift.d.ts +30 -0
- package/dist/acceptance/drift.d.ts.map +1 -0
- package/dist/acceptance/drift.js +44 -0
- package/dist/acceptance/drift.js.map +1 -0
- package/dist/acceptance/format-acceptance.d.ts +5 -0
- package/dist/acceptance/format-acceptance.d.ts.map +1 -0
- package/dist/acceptance/format-acceptance.js +40 -0
- package/dist/acceptance/format-acceptance.js.map +1 -0
- package/dist/acceptance/lock-acceptance.d.ts +24 -0
- package/dist/acceptance/lock-acceptance.d.ts.map +1 -0
- package/dist/acceptance/lock-acceptance.js +58 -0
- package/dist/acceptance/lock-acceptance.js.map +1 -0
- package/dist/acceptance/lock-file-of.d.ts +3 -0
- package/dist/acceptance/lock-file-of.d.ts.map +1 -0
- package/dist/acceptance/lock-file-of.js +6 -0
- package/dist/acceptance/lock-file-of.js.map +1 -0
- package/dist/acceptance/lock-problems.d.ts +21 -0
- package/dist/acceptance/lock-problems.d.ts.map +1 -0
- package/dist/acceptance/lock-problems.js +58 -0
- package/dist/acceptance/lock-problems.js.map +1 -0
- package/dist/acceptance/read-acceptance.d.ts +9 -0
- package/dist/acceptance/read-acceptance.d.ts.map +1 -0
- package/dist/acceptance/read-acceptance.js +76 -0
- package/dist/acceptance/read-acceptance.js.map +1 -0
- package/dist/acceptance/read-lock.d.ts +5 -0
- package/dist/acceptance/read-lock.d.ts.map +1 -0
- package/dist/acceptance/read-lock.js +45 -0
- package/dist/acceptance/read-lock.js.map +1 -0
- package/dist/acceptance/read-verdicts.d.ts +9 -0
- package/dist/acceptance/read-verdicts.d.ts.map +1 -0
- package/dist/acceptance/read-verdicts.js +35 -0
- package/dist/acceptance/read-verdicts.js.map +1 -0
- package/dist/acceptance/scenario-problems.d.ts +12 -0
- package/dist/acceptance/scenario-problems.d.ts.map +1 -0
- package/dist/acceptance/scenario-problems.js +74 -0
- package/dist/acceptance/scenario-problems.js.map +1 -0
- package/dist/acceptance/scenario.d.ts +23 -0
- package/dist/acceptance/scenario.d.ts.map +1 -0
- package/dist/acceptance/scenario.js +2 -0
- package/dist/acceptance/scenario.js.map +1 -0
- package/dist/acceptance/scenarios-in.d.ts +4 -0
- package/dist/acceptance/scenarios-in.d.ts.map +1 -0
- package/dist/acceptance/scenarios-in.js +68 -0
- package/dist/acceptance/scenarios-in.js.map +1 -0
- package/dist/acceptance/story-acceptance.d.ts +29 -0
- package/dist/acceptance/story-acceptance.d.ts.map +1 -0
- package/dist/acceptance/story-acceptance.js +2 -0
- package/dist/acceptance/story-acceptance.js.map +1 -0
- package/dist/acceptance/story-file-of.d.ts +4 -0
- package/dist/acceptance/story-file-of.d.ts.map +1 -0
- package/dist/acceptance/story-file-of.js +8 -0
- package/dist/acceptance/story-file-of.js.map +1 -0
- package/dist/acceptance/story-of-file.d.ts +3 -0
- package/dist/acceptance/story-of-file.d.ts.map +1 -0
- package/dist/acceptance/story-of-file.js +6 -0
- package/dist/acceptance/story-of-file.js.map +1 -0
- package/dist/acceptance/story-of-row.d.ts +3 -0
- package/dist/acceptance/story-of-row.d.ts.map +1 -0
- package/dist/acceptance/story-of-row.js +6 -0
- package/dist/acceptance/story-of-row.js.map +1 -0
- package/dist/acceptance/story-problems.d.ts +16 -0
- package/dist/acceptance/story-problems.d.ts.map +1 -0
- package/dist/acceptance/story-problems.js +48 -0
- package/dist/acceptance/story-problems.js.map +1 -0
- package/dist/acceptance/verdict-on.d.ts +8 -0
- package/dist/acceptance/verdict-on.d.ts.map +1 -0
- package/dist/acceptance/verdict-on.js +9 -0
- package/dist/acceptance/verdict-on.js.map +1 -0
- package/dist/acceptance/verdict.d.ts +14 -0
- package/dist/acceptance/verdict.d.ts.map +1 -0
- package/dist/acceptance/verdict.js +2 -0
- package/dist/acceptance/verdict.js.map +1 -0
- package/dist/acceptance/verdicts-dir.d.ts +3 -0
- package/dist/acceptance/verdicts-dir.d.ts.map +1 -0
- package/dist/acceptance/verdicts-dir.js +3 -0
- package/dist/acceptance/verdicts-dir.js.map +1 -0
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +6 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +3 -0
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/commands/check-command.d.ts.map +1 -1
- package/dist/check/commands/check-command.js +4 -1
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/commands/explain-command.d.ts.map +1 -1
- package/dist/check/commands/explain-command.js +2 -9
- package/dist/check/commands/explain-command.js.map +1 -1
- package/dist/check/configuration/config-inspection.d.ts +1 -0
- package/dist/check/configuration/config-inspection.d.ts.map +1 -1
- package/dist/check/configuration/config-inspection.js +9 -1
- package/dist/check/configuration/config-inspection.js.map +1 -1
- package/dist/check/engine/format-check.d.ts +6 -1
- package/dist/check/engine/format-check.d.ts.map +1 -1
- package/dist/check/engine/format-check.js +33 -11
- package/dist/check/engine/format-check.js.map +1 -1
- package/dist/check/explain/documented-rule.d.ts +8 -0
- package/dist/check/explain/documented-rule.d.ts.map +1 -0
- package/dist/check/explain/documented-rule.js +14 -0
- package/dist/check/explain/documented-rule.js.map +1 -0
- package/dist/check/explain/explanations-of.d.ts +5 -0
- package/dist/check/explain/explanations-of.d.ts.map +1 -0
- package/dist/check/explain/explanations-of.js +16 -0
- package/dist/check/explain/explanations-of.js.map +1 -0
- package/dist/check/explain/persistence-docs.d.ts.map +1 -1
- package/dist/check/explain/persistence-docs.js +7 -0
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +9 -0
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +13 -0
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.js +78 -1
- package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/persistence-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/persistence-fixtures.js +25 -0
- package/dist/check/fixtures/persistence-fixtures.js.map +1 -1
- package/dist/check/fixtures/test-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/test-fixtures.js +35 -0
- package/dist/check/fixtures/test-fixtures.js.map +1 -1
- package/dist/check/model/rule-explanation.d.ts +10 -0
- package/dist/check/model/rule-explanation.d.ts.map +1 -0
- package/dist/check/model/rule-explanation.js +2 -0
- package/dist/check/model/rule-explanation.js.map +1 -0
- package/dist/check/project/walk-directory.js +1 -1
- package/dist/check/project/walk-directory.js.map +1 -1
- package/dist/check/rules/config-valid.d.ts.map +1 -1
- package/dist/check/rules/config-valid.js +1 -0
- package/dist/check/rules/config-valid.js.map +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.d.ts +3 -0
- package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -0
- package/dist/check/rules/declarations-port-adapter-wired.js +104 -0
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -0
- package/dist/check/rules/persistence-primary-key-order.d.ts +3 -0
- package/dist/check/rules/persistence-primary-key-order.d.ts.map +1 -0
- package/dist/check/rules/persistence-primary-key-order.js +31 -0
- package/dist/check/rules/persistence-primary-key-order.js.map +1 -0
- package/dist/check/rules/test-acceptance-black-box.d.ts +3 -0
- package/dist/check/rules/test-acceptance-black-box.d.ts.map +1 -0
- package/dist/check/rules/test-acceptance-black-box.js +38 -0
- package/dist/check/rules/test-acceptance-black-box.js.map +1 -0
- package/dist/commands/acceptance.d.ts +11 -0
- package/dist/commands/acceptance.d.ts.map +1 -0
- package/dist/commands/acceptance.js +63 -0
- package/dist/commands/acceptance.js.map +1 -0
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +20 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/lint.d.ts +7 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +55 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/plan-waves.d.ts.map +1 -1
- package/dist/commands/plan-waves.js +1 -2
- package/dist/commands/plan-waves.js.map +1 -1
- package/dist/commands/stories.d.ts +9 -0
- package/dist/commands/stories.d.ts.map +1 -0
- package/dist/commands/stories.js +16 -0
- package/dist/commands/stories.js.map +1 -0
- package/dist/commands/story-scope.d.ts +4 -0
- package/dist/commands/story-scope.d.ts.map +1 -0
- package/dist/commands/story-scope.js +34 -0
- package/dist/commands/story-scope.js.map +1 -0
- package/dist/commands/story.d.ts +9 -0
- package/dist/commands/story.d.ts.map +1 -0
- package/dist/commands/story.js +45 -0
- package/dist/commands/story.js.map +1 -0
- package/dist/commands/worker-scope.d.ts.map +1 -1
- package/dist/commands/worker-scope.js +2 -0
- package/dist/commands/worker-scope.js.map +1 -1
- package/dist/commands/worktree.d.ts +7 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +34 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/config/config.d.ts +9 -0
- package/dist/config/config.d.ts.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/parse-config.d.ts.map +1 -1
- package/dist/config/parse-config.js +3 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/restack-config-text.d.ts +3 -2
- package/dist/config/restack-config-text.d.ts.map +1 -1
- package/dist/config/restack-config-text.js +5 -3
- package/dist/config/restack-config-text.js.map +1 -1
- package/dist/config/serialize-config.d.ts.map +1 -1
- package/dist/config/serialize-config.js +3 -1
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/worktree-modes.d.ts +3 -0
- package/dist/config/worktree-modes.d.ts.map +1 -0
- package/dist/config/worktree-modes.js +3 -0
- package/dist/config/worktree-modes.js.map +1 -0
- package/dist/doctor/diagnose.d.ts +2 -0
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +22 -3
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +13 -5
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.d.ts +4 -1
- package/dist/doctor/format-diagnosis.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +49 -3
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/in-range.d.ts +7 -0
- package/dist/doctor/in-range.d.ts.map +1 -0
- package/dist/doctor/in-range.js +90 -0
- package/dist/doctor/in-range.js.map +1 -0
- package/dist/doctor/install-findings.d.ts +11 -0
- package/dist/doctor/install-findings.d.ts.map +1 -0
- package/dist/doctor/install-findings.js +119 -0
- package/dist/doctor/install-findings.js.map +1 -0
- package/dist/doctor/node-findings.d.ts +7 -0
- package/dist/doctor/node-findings.d.ts.map +1 -0
- package/dist/doctor/node-findings.js +19 -0
- package/dist/doctor/node-findings.js.map +1 -0
- package/dist/doctor/package-findings.d.ts +2 -0
- package/dist/doctor/package-findings.d.ts.map +1 -1
- package/dist/doctor/package-findings.js +1 -1
- package/dist/doctor/package-findings.js.map +1 -1
- package/dist/doctor/submodule-findings.d.ts +7 -0
- package/dist/doctor/submodule-findings.d.ts.map +1 -0
- package/dist/doctor/submodule-findings.js +22 -0
- package/dist/doctor/submodule-findings.js.map +1 -0
- package/dist/generate/kinds/acceptance-kind.d.ts +3 -0
- package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -0
- package/dist/generate/kinds/acceptance-kind.js +69 -0
- package/dist/generate/kinds/acceptance-kind.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +2 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/schedule/cron-problem.d.ts.map +1 -1
- package/dist/generate/schedule/cron-problem.js +16 -1
- package/dist/generate/schedule/cron-problem.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +3 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +71 -10
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +8 -1
- package/dist/help/usage.js.map +1 -1
- package/dist/init/agent-permissions.d.ts.map +1 -1
- package/dist/init/agent-permissions.js +9 -1
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/ignore-worktrees.d.ts +7 -0
- package/dist/init/ignore-worktrees.d.ts.map +1 -0
- package/dist/init/ignore-worktrees.js +15 -0
- package/dist/init/ignore-worktrees.js.map +1 -0
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +12 -4
- package/dist/init/run-init.js.map +1 -1
- package/dist/lint/eslint-in-project.d.ts +8 -0
- package/dist/lint/eslint-in-project.d.ts.map +1 -0
- package/dist/lint/eslint-in-project.js +33 -0
- package/dist/lint/eslint-in-project.js.map +1 -0
- package/dist/lint/format-verdict.d.ts +4 -0
- package/dist/lint/format-verdict.d.ts.map +1 -0
- package/dist/lint/format-verdict.js +11 -0
- package/dist/lint/format-verdict.js.map +1 -0
- package/dist/lint/lint-run.d.ts +8 -0
- package/dist/lint/lint-run.d.ts.map +1 -0
- package/dist/lint/lint-run.js +2 -0
- package/dist/lint/lint-run.js.map +1 -0
- package/dist/lint/lint-verdict.d.ts +19 -0
- package/dist/lint/lint-verdict.d.ts.map +1 -0
- package/dist/lint/lint-verdict.js +25 -0
- package/dist/lint/lint-verdict.js.map +1 -0
- package/dist/lint/parse-lint-answer.d.ts +13 -0
- package/dist/lint/parse-lint-answer.d.ts.map +1 -0
- package/dist/lint/parse-lint-answer.js +18 -0
- package/dist/lint/parse-lint-answer.js.map +1 -0
- package/dist/migration/plan-replay.d.ts +4 -3
- package/dist/migration/plan-replay.d.ts.map +1 -1
- package/dist/migration/plan-replay.js +21 -6
- package/dist/migration/plan-replay.js.map +1 -1
- package/dist/migration/rename-branch-migrations.d.ts +13 -0
- package/dist/migration/rename-branch-migrations.d.ts.map +1 -0
- package/dist/migration/rename-branch-migrations.js +25 -0
- package/dist/migration/rename-branch-migrations.js.map +1 -0
- package/dist/migration/replay-drizzle-migrations.d.ts +6 -3
- package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -1
- package/dist/migration/replay-drizzle-migrations.js +48 -4
- package/dist/migration/replay-drizzle-migrations.js.map +1 -1
- package/dist/migration/replay-plan.d.ts +8 -0
- package/dist/migration/replay-plan.d.ts.map +1 -1
- package/dist/migration/restore-migration-folder.d.ts +4 -0
- package/dist/migration/restore-migration-folder.d.ts.map +1 -0
- package/dist/migration/restore-migration-folder.js +15 -0
- package/dist/migration/restore-migration-folder.js.map +1 -0
- package/dist/package-manager/lockfiles.d.ts +2 -0
- package/dist/package-manager/lockfiles.d.ts.map +1 -1
- package/dist/package-manager/lockfiles.js +5 -0
- package/dist/package-manager/lockfiles.js.map +1 -1
- package/dist/plan/batched-waves.d.ts +0 -2
- package/dist/plan/batched-waves.d.ts.map +1 -1
- package/dist/plan/batched-waves.js +4 -4
- package/dist/plan/batched-waves.js.map +1 -1
- package/dist/plan/plan-waves.d.ts +0 -2
- package/dist/plan/plan-waves.d.ts.map +1 -1
- package/dist/plan/plan-waves.js +2 -2
- package/dist/plan/plan-waves.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +12 -0
- package/dist/run.js.map +1 -1
- package/dist/slice/plan-staging.d.ts +1 -1
- package/dist/slice/plan-staging.d.ts.map +1 -1
- package/dist/slice/plan-staging.js +5 -2
- package/dist/slice/plan-staging.js.map +1 -1
- package/dist/stories/forecast-merge.d.ts +14 -0
- package/dist/stories/forecast-merge.d.ts.map +1 -0
- package/dist/stories/forecast-merge.js +44 -0
- package/dist/stories/forecast-merge.js.map +1 -0
- package/dist/stories/format-stories.d.ts +4 -0
- package/dist/stories/format-stories.d.ts.map +1 -0
- package/dist/stories/format-stories.js +66 -0
- package/dist/stories/format-stories.js.map +1 -0
- package/dist/stories/format-story-phases.d.ts +5 -0
- package/dist/stories/format-story-phases.d.ts.map +1 -0
- package/dist/stories/format-story-phases.js +14 -0
- package/dist/stories/format-story-phases.js.map +1 -0
- package/dist/stories/merge-forecast.d.ts +18 -0
- package/dist/stories/merge-forecast.d.ts.map +1 -0
- package/dist/stories/merge-forecast.js +2 -0
- package/dist/stories/merge-forecast.js.map +1 -0
- package/dist/stories/open-stories.d.ts +8 -0
- package/dist/stories/open-stories.d.ts.map +1 -0
- package/dist/stories/open-stories.js +31 -0
- package/dist/stories/open-stories.js.map +1 -0
- package/dist/stories/open-story-scope.d.ts +23 -0
- package/dist/stories/open-story-scope.d.ts.map +1 -0
- package/dist/stories/open-story-scope.js +86 -0
- package/dist/stories/open-story-scope.js.map +1 -0
- package/dist/stories/open-story.d.ts +11 -0
- package/dist/stories/open-story.d.ts.map +1 -0
- package/dist/stories/open-story.js +2 -0
- package/dist/stories/open-story.js.map +1 -0
- package/dist/stories/read-stories.d.ts +9 -0
- package/dist/stories/read-stories.d.ts.map +1 -0
- package/dist/stories/read-stories.js +60 -0
- package/dist/stories/read-stories.js.map +1 -0
- package/dist/stories/read-story-phases.d.ts +10 -0
- package/dist/stories/read-story-phases.d.ts.map +1 -0
- package/dist/stories/read-story-phases.js +144 -0
- package/dist/stories/read-story-phases.js.map +1 -0
- package/dist/stories/read-story-place.d.ts +4 -0
- package/dist/stories/read-story-place.d.ts.map +1 -0
- package/dist/stories/read-story-place.js +23 -0
- package/dist/stories/read-story-place.js.map +1 -0
- package/dist/stories/review-file-of.d.ts +4 -0
- package/dist/stories/review-file-of.d.ts.map +1 -0
- package/dist/stories/review-file-of.js +7 -0
- package/dist/stories/review-file-of.js.map +1 -0
- package/dist/stories/section-of.d.ts +3 -0
- package/dist/stories/section-of.d.ts.map +1 -0
- package/dist/stories/section-of.js +11 -0
- package/dist/stories/section-of.js.map +1 -0
- package/dist/stories/stories-view.d.ts +13 -0
- package/dist/stories/stories-view.d.ts.map +1 -0
- package/dist/stories/stories-view.js +2 -0
- package/dist/stories/stories-view.js.map +1 -0
- package/dist/stories/story-crossing.d.ts +16 -0
- package/dist/stories/story-crossing.d.ts.map +1 -0
- package/dist/stories/story-crossing.js +2 -0
- package/dist/stories/story-crossing.js.map +1 -0
- package/dist/stories/story-gate.d.ts +4 -0
- package/dist/stories/story-gate.d.ts.map +1 -0
- package/dist/stories/story-gate.js +2 -0
- package/dist/stories/story-gate.js.map +1 -0
- package/dist/stories/story-phase.d.ts +13 -0
- package/dist/stories/story-phase.d.ts.map +1 -0
- package/dist/stories/story-phase.js +2 -0
- package/dist/stories/story-phase.js.map +1 -0
- package/dist/stories/story-place.d.ts +14 -0
- package/dist/stories/story-place.d.ts.map +1 -0
- package/dist/stories/story-place.js +2 -0
- package/dist/stories/story-place.js.map +1 -0
- package/dist/stories/story-scope-file.d.ts +3 -0
- package/dist/stories/story-scope-file.d.ts.map +1 -0
- package/dist/stories/story-scope-file.js +3 -0
- package/dist/stories/story-scope-file.js.map +1 -0
- package/dist/stories/story-scope.d.ts +17 -0
- package/dist/stories/story-scope.d.ts.map +1 -0
- package/dist/stories/story-scope.js +2 -0
- package/dist/stories/story-scope.js.map +1 -0
- package/dist/stories/story-state.d.ts +13 -0
- package/dist/stories/story-state.d.ts.map +1 -0
- package/dist/stories/story-state.js +2 -0
- package/dist/stories/story-state.js.map +1 -0
- package/dist/stories/trunk-phase.d.ts +8 -0
- package/dist/stories/trunk-phase.d.ts.map +1 -0
- package/dist/stories/trunk-phase.js +27 -0
- package/dist/stories/trunk-phase.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/add-worktree.d.ts +7 -0
- package/dist/worker/add-worktree.d.ts.map +1 -0
- package/dist/worker/add-worktree.js +13 -0
- package/dist/worker/add-worktree.js.map +1 -0
- package/dist/worker/branch-exists.d.ts +3 -0
- package/dist/worker/branch-exists.d.ts.map +1 -0
- package/dist/worker/branch-exists.js +6 -0
- package/dist/worker/branch-exists.js.map +1 -0
- package/dist/worker/briefed-rows.js +1 -1
- package/dist/worker/briefed-rows.js.map +1 -1
- package/dist/worker/ensure-ignored.d.ts +7 -0
- package/dist/worker/ensure-ignored.d.ts.map +1 -0
- package/dist/worker/ensure-ignored.js +17 -0
- package/dist/worker/ensure-ignored.js.map +1 -0
- package/dist/worker/install-notes.d.ts +9 -0
- package/dist/worker/install-notes.d.ts.map +1 -0
- package/dist/worker/install-notes.js +25 -0
- package/dist/worker/install-notes.js.map +1 -0
- package/dist/worker/is-worktree.d.ts +3 -0
- package/dist/worker/is-worktree.d.ts.map +1 -0
- package/dist/worker/is-worktree.js +15 -0
- package/dist/worker/is-worktree.js.map +1 -0
- package/dist/worker/open-worker-scope.d.ts +6 -1
- package/dist/worker/open-worker-scope.d.ts.map +1 -1
- package/dist/worker/open-worker-scope.js +29 -36
- package/dist/worker/open-worker-scope.js.map +1 -1
- package/dist/worker/repository-prefix.d.ts +3 -0
- package/dist/worker/repository-prefix.d.ts.map +1 -0
- package/dist/worker/repository-prefix.js +14 -0
- package/dist/worker/repository-prefix.js.map +1 -0
- package/dist/worker/upstream-of.d.ts +8 -0
- package/dist/worker/upstream-of.d.ts.map +1 -0
- package/dist/worker/upstream-of.js +18 -0
- package/dist/worker/upstream-of.js.map +1 -0
- package/dist/worker/worktree-home.d.ts +9 -0
- package/dist/worker/worktree-home.d.ts.map +1 -0
- package/dist/worker/worktree-home.js +17 -0
- package/dist/worker/worktree-home.js.map +1 -0
- package/dist/worker/worktree-of.d.ts +13 -0
- package/dist/worker/worktree-of.d.ts.map +1 -0
- package/dist/worker/worktree-of.js +30 -0
- package/dist/worker/worktree-of.js.map +1 -0
- package/dist/worktree/open-worktree.d.ts +20 -0
- package/dist/worktree/open-worktree.d.ts.map +1 -0
- package/dist/worktree/open-worktree.js +57 -0
- package/dist/worktree/open-worktree.js.map +1 -0
- package/dist/worktree/worktree-scope.d.ts +15 -0
- package/dist/worktree/worktree-scope.d.ts.map +1 -0
- package/dist/worktree/worktree-scope.js +2 -0
- package/dist/worktree/worktree-scope.js.map +1 -0
- package/package.json +2 -2
- package/templates/acceptance/acceptance.spec.ts.tpl +35 -0
- package/templates/init/docker/dockerignore.tpl +1 -0
- package/templates/init/e2e/jest.e2e.config.js.tpl +1 -1
- package/templates/init/e2e/vitest.e2e.config.ts.tpl +1 -1
- package/templates/init/gitignore.tpl +1 -0
- package/templates/pipeline/biome.json.tpl +1 -0
- package/templates/pipeline/package-scripts.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,231 @@ What each version changes for someone who uses the kit. The packages of `package
|
|
|
4
4
|
together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
|
|
5
5
|
list the pull requests behind it.
|
|
6
6
|
|
|
7
|
+
## 0.82.0
|
|
8
|
+
|
|
9
|
+
**`drizzle-generate --replay` replays only what forks, and refuses to lose a migration edited by
|
|
10
|
+
hand.** The replay first reads the history on disk: when the journal lists every migration in
|
|
11
|
+
order, each snapshot from the one before, the branch's already follow the trunk, and nothing is
|
|
12
|
+
generated again (a name that changes, `working-` dropped, is renamed in place). Otherwise it
|
|
13
|
+
deletes the branch's migrations and generates them again on top as before, then compares each
|
|
14
|
+
generated one with what the branch had: when drizzle-kit now writes other statements (its SQL was
|
|
15
|
+
edited by hand, or the trunk changed what it changes), it puts the migrations folder back as it
|
|
16
|
+
found it and refuses, naming the statement that differs; the fix is to generate that migration on
|
|
17
|
+
top by hand and write the edit again, after which a replay, or `merge-trunk --continue`, finds
|
|
18
|
+
nothing forked. Several migrations of a branch that change the schema and fork are still
|
|
19
|
+
refused rather than joined: drizzle-kit diffs the final schema and cannot split them again, and
|
|
20
|
+
one migration in their place would join steps planned apart (a table, then a constraint once it
|
|
21
|
+
is filled, fails on a database that holds rows). Its fix said to generate them as one; it now
|
|
22
|
+
says to generate them again one at a time, in their order. Measured with the real drizzle-kit
|
|
23
|
+
0.31.11: the replayed history is applied by `drizzle-kit migrate`.
|
|
24
|
+
|
|
25
|
+
**`persistence/primary-key-order` (a warning).** Under drizzle-kit, a migration that adds the new
|
|
26
|
+
primary key of a table before its old one is dropped, or drops a column before the key that holds
|
|
27
|
+
it, is reported on the line of the statement that runs too early: PostgreSQL refuses it when it
|
|
28
|
+
runs. `drizzle-generate` already warned once when it wrote one; the rule keeps reporting it. Fix:
|
|
29
|
+
drop the old key first, in that migration while it is still unapplied, or write it with
|
|
30
|
+
`--custom`. `ddd-ts-kit check --rule persistence/primary-key-order` lists the migrations to take
|
|
31
|
+
up; the rule stays a warning in this version.
|
|
32
|
+
|
|
33
|
+
**Two migrations kept apart.** The `persistence` skill and the persistence page say how: change
|
|
34
|
+
the schema in two steps, with a `db:generate` after each, since one `db:generate` writes every
|
|
35
|
+
change since the last migration as one.
|
|
36
|
+
|
|
37
|
+
**A cron accepts the shorthands `@hourly`, `@daily`, `@weekly`, `@monthly` and `@yearly`.**
|
|
38
|
+
`@Scheduled` and `ddd-ts-kit generate job --cron` read `@yearly` and `@annually` as `0 0 1 1 *`,
|
|
39
|
+
`@monthly` as `0 0 1 * *`, `@weekly` as `0 0 * * 0`, `@daily` and `@midnight` as `0 0 * * *` and
|
|
40
|
+
`@hourly` as `0 * * * *`, in any case, and fire on the occurrences of those five fields (`@hourly`
|
|
41
|
+
keeps its rhythm when clocks change, as `0 * * * *` does). A diagnostic and `ddd-ts-kit docs` show
|
|
42
|
+
the shorthand as written. `@reboot` and any other `@word` are refused by both with the same
|
|
43
|
+
message, which lists the shorthands accepted: a scheduled job has no occurrence at start.
|
|
44
|
+
|
|
45
|
+
**A lint warning fails the lint of a generated project.** `lint` and `ci:lint` ran `eslint .`,
|
|
46
|
+
which exits 0 on warnings: `verify` and the pipeline passed them, a new one as well, and they
|
|
47
|
+
piled up. `init` now writes `ddd-ts-kit lint` for both, and the example application runs the
|
|
48
|
+
same: the ESLint of the project, through its API (its paths, `--format` and `--fix` as ESLint
|
|
49
|
+
takes them), failing on an error and on a warning alike, but on a warning of a rule of the kit in
|
|
50
|
+
transition. A rule a version adds, or what a rule judges more, is a warning for one minor version
|
|
51
|
+
and an error at the next; its documentation names that version (`transition`), and `ddd-ts-kit
|
|
52
|
+
lint` shows its warnings and lists them after the report, one line per rule with the version that
|
|
53
|
+
makes it an error, without failing on them. An upgrade of the kit therefore never turns a green
|
|
54
|
+
lint red, which a plain `eslint . --max-warnings 0` would. The preset keeps its warnings as warnings (`complexity`, `max-depth`,
|
|
55
|
+
`clean/function-size`, `clean/no-flag-argument`, ...) and `init` writes no suppressions file: a
|
|
56
|
+
new project has no warning, so the first one fails `npm run lint`, `verify` and the lint job on
|
|
57
|
+
GitHub and GitLab. The hook before a commit is unchanged: it shows a warning without stopping the
|
|
58
|
+
commit. The quality-gate skill says so; the workflow is in
|
|
59
|
+
[Quality baseline](docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
60
|
+
|
|
61
|
+
To move: nothing changes until the project acts. `npx ddd-ts-kit init` keeps an existing `lint`
|
|
62
|
+
and `ci:lint` and notes what the kit expects; `doctor` lists them as written otherwise, which
|
|
63
|
+
`doctor --strict` does not fail on. To take the limit, run `npx eslint .` and settle each
|
|
64
|
+
warning: fix it, or raise its rule to `error` (its id in the `rules` key of
|
|
65
|
+
`ddd-ts-kit.config.json` for a rule of the kit, a block after the preset in `eslint.config.mjs`
|
|
66
|
+
for `complexity` or `max-depth`) and record the existing findings with
|
|
67
|
+
`npx eslint . --suppress-rule <rule>` (or `--suppress-all`) in `eslint-suppressions.json`,
|
|
68
|
+
committed; once one is fixed, `npx eslint . --prune-suppressions` removes its entry, and the lint
|
|
69
|
+
fails until it does. Then set the two scripts to `ddd-ts-kit lint`, or run
|
|
70
|
+
`npx ddd-ts-kit init --force`, which also writes every other file and script of the kit over the
|
|
71
|
+
project's. Update the plugin.
|
|
72
|
+
|
|
73
|
+
**`check --explain` follows the violations with the reason of each rule they report.** A reviewer
|
|
74
|
+
of a pull request ran `ddd-ts-kit explain <rule-id>` for each rule `check --changed-since` named.
|
|
75
|
+
`--explain` prints, after the violations, one block per rule reported, however many times: its
|
|
76
|
+
id, its description and why it exists, as `explain` gives it without the examples; for a rule
|
|
77
|
+
another tool decides, where it is checked. `--format json` adds an `explanations` array.
|
|
78
|
+
`--format github` and `--format gitlab` keep one annotation per violation and end the message of
|
|
79
|
+
each with `Why: <reason>`, since a pull request shows an annotation alone on its line and a Code
|
|
80
|
+
Quality report has no place for text beside its issues; the fingerprints do not change. It
|
|
81
|
+
combines with paths, `--rule`, `--changed-since` and `--clean-only`. Without it, the output is
|
|
82
|
+
the same as before.
|
|
83
|
+
|
|
84
|
+
**`doctor` checks the environment of a checkout.** A new worktree starts from nothing, and what
|
|
85
|
+
goes wrong there is its environment: `verify` failed late, on a symptom. After what an upgrade
|
|
86
|
+
left to do, `npx ddd-ts-kit doctor` now says what this checkout lacks to run the project, read
|
|
87
|
+
from its files without network: the running Node against `engines.node` (`node engines.node:
|
|
88
|
+
unsupported`) and the version `.nvmrc` names; `node_modules` missing or installed before the
|
|
89
|
+
lockfile last changed (`install node_modules: missing`, `outdated`); `ddd-ts-kit` and every
|
|
90
|
+
`@ddd-ts-kit/*` package installed at the version of the running CLI (`install <package>: not
|
|
91
|
+
installed`, `other version`), where the package findings read the ranges of `package.json`, in
|
|
92
|
+
the install of its workspace for a project inside one; and,
|
|
93
|
+
with a `.gitmodules`, every submodule initialised (`submodule <path>: not initialised`). Each comes
|
|
94
|
+
with its fix (`nvm use`, `npm ci` in the dialect of the project, `git submodule update --init
|
|
95
|
+
--recursive`). `--strict` now also exits 1 while the checkout cannot run the project: a Node
|
|
96
|
+
outside `engines.node`, no `node_modules`, a package of the kit not installed or at another
|
|
97
|
+
version, a submodule not initialised. A Node `.nvmrc` does not name and a lockfile changed since
|
|
98
|
+
the install are said without failing it. A project or a pipeline that runs `doctor --strict` where
|
|
99
|
+
no dependencies are installed fails from this version: install first. `--json` gains the areas
|
|
100
|
+
`node`, `install` and `submodule`. The `parallel-work` skill runs it in a worktree made otherwise.
|
|
101
|
+
|
|
102
|
+
**`init` records the version that wrote the files of the platform.** `ddd-ts-kit.config.json`
|
|
103
|
+
now starts with `"initVersion"`, the version of the CLI whose `init` wrote the files it owns;
|
|
104
|
+
`init --force` rewrites it, and `init` run again to add a context leaves it. Nothing reads it yet:
|
|
105
|
+
it is the first step of an `init` that tells, after an upgrade, a change of its templates from an
|
|
106
|
+
adaptation of the team. A config without the key stays valid.
|
|
107
|
+
|
|
108
|
+
To move: nothing; `init --force` adds the key to a project initialised before it existed.
|
|
109
|
+
|
|
110
|
+
**An adapter that nothing wires is reported.** `declarations/port-adapter-wired`
|
|
111
|
+
(`ddd-ts-kit check`, a warning) reports a class of `infrastructure/` that implements a port of
|
|
112
|
+
`domain/repositories/` or `application/ports/` and that nothing wires: in the declared style it
|
|
113
|
+
carries no `@Repository`, `@Gateway` or `@Adapter`, and in both styles no file of the composition
|
|
114
|
+
root (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, the platform directory) imports
|
|
115
|
+
it. `declarations/role-declared` reads a role file by its suffix, so such a class in a file without
|
|
116
|
+
one was reported by no rule and only showed at run time as a missing binding. A file that still
|
|
117
|
+
carries a `TODO(domain)` or `TODO(platform)` is not judged yet: an adapter the generator wrote
|
|
118
|
+
before the outside system is ready is listed by `ddd-ts-kit todo` until it is wired. To move, run
|
|
119
|
+
`ddd-ts-kit check --rule declarations/port-adapter-wired`, then declare each reported class
|
|
120
|
+
(`@Gateway(Port)` in a `*.gateway.ts`, for example) or bind it in the module file; one kept
|
|
121
|
+
unwired on purpose gets its decision record in `docs/adr/` and
|
|
122
|
+
`// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` above the class.
|
|
123
|
+
It becomes an error in the next minor version.
|
|
124
|
+
|
|
125
|
+
**The plugin and the packages share one version: 0.82.0.** The plugin numbered itself apart
|
|
126
|
+
(0.81.0 while the packages were at 0.27.0), so one agent showed a version and another the other.
|
|
127
|
+
From this release on, the release sets the version of the plugin with the version of the
|
|
128
|
+
packages; the version its skills describe already was that of the packages. The packages jump
|
|
129
|
+
from 0.27.0 to 0.82.0, above the last version of the plugin, so that an installed plugin is still
|
|
130
|
+
updated; no version between them was published. The plugin now changes with each release of the
|
|
131
|
+
kit, and an urgent fix of it is a patch release of the kit.
|
|
132
|
+
|
|
133
|
+
To move: upgrade the packages of the kit to 0.82.0 together, as at every release, and update the
|
|
134
|
+
plugin; from now on its version is the version of the kit.
|
|
135
|
+
|
|
136
|
+
## 0.27.0
|
|
137
|
+
|
|
138
|
+
**The worktrees of a project live inside it, and a new project writes its code in a worktree.**
|
|
139
|
+
`worker-scope`, `story-scope` and the new `ddd-ts-kit worktree <name>` (any other piece of work,
|
|
140
|
+
on `work/<name>`, cut from `origin/main` when run from the trunk, installed) open their worktree
|
|
141
|
+
in `.worktrees/` of the main checkout, whichever worktree they run from, instead of a sibling
|
|
142
|
+
folder `../<project>-<name>`; `plan-waves` names `.worktrees/<context>-<batch>`. `init` lists
|
|
143
|
+
`.worktrees/` in `.gitignore`, the formatter, ESLint, the checker and the Docker context leave it
|
|
144
|
+
out. A new project gets `"worktrees": "required"`: the guard of the plugin refuses the code of a
|
|
145
|
+
context and the generators that write it (`context`, `adr` and `acceptance` aside) in the main
|
|
146
|
+
checkout of the trunk, and says so at session start with the command that opens a worktree; the
|
|
147
|
+
conductor of a parallel build writes its contracts and skeletons in a worktree of its own and
|
|
148
|
+
lands them as a pull request. In a worktree of `.worktrees/` without its own `node_modules`,
|
|
149
|
+
whose Node would resolve the packages of the main checkout above it, the guard refuses that code
|
|
150
|
+
until it is installed. `story-scope` and `worktree` take the remote branch of the trunk as their
|
|
151
|
+
base only from the trunk itself: any other branch is its own base.
|
|
152
|
+
|
|
153
|
+
To move: nothing is required. A project started before has no `worktrees` key, read as
|
|
154
|
+
`"advised"`: the guard only says where the code goes. Run `npx ddd-ts-kit init` once to add
|
|
155
|
+
`.worktrees/` to `.gitignore` (until then the commands open their worktrees next to the project,
|
|
156
|
+
as before, with a note), commit it, and set `"worktrees": "required"` when the team works in
|
|
157
|
+
worktrees. Update the plugin, and `@ddd-ts-kit/eslint-plugin` for its ignore of `.worktrees/`;
|
|
158
|
+
add `"!**/.worktrees"` to the `files.includes` of `biome.json`. A worktree opened before keeps its
|
|
159
|
+
place: `git worktree move <path> .worktrees/<name>` moves it.
|
|
160
|
+
|
|
161
|
+
**Where the open stories meet, while they are built.** The new command `ddd-ts-kit stories`
|
|
162
|
+
lists the stories open in the worktrees of the repository and, for each pair that meets, the
|
|
163
|
+
contexts the rows of both name, the files both worktrees change (committed or not, those
|
|
164
|
+
`merge-trunk` settles by their kind aside), and what merging the branch of one into the other
|
|
165
|
+
would leave to settle by hand and what `merge-trunk` settles alone, computed with
|
|
166
|
+
`git merge-tree` without writing anything; for each story, how far it is behind its trunk and
|
|
167
|
+
what bringing the trunk in would leave to a person. From the worktree of a story it names the
|
|
168
|
+
stories that one meets. The guard of the plugin says it at session start in the worktree of a
|
|
169
|
+
story, with the trunk that moved and a last fetch more than an hour old, and says once per file
|
|
170
|
+
when the session writes a file another open story changes. `story --gate close` now also waits
|
|
171
|
+
for the trunk merged in (the phase `trunk`), and `story-scope` cuts a story from the branch the
|
|
172
|
+
current one follows (`origin/main` for `main`) when it has one, so that a `git fetch` is enough
|
|
173
|
+
to see the trunk move: nothing of the kit goes to the network. The skill `story` reads
|
|
174
|
+
`stories` before cutting the rows and before each row, and fetches before closing.
|
|
175
|
+
|
|
176
|
+
To move: `npx ddd-ts-kit init` adds the permission of `npx ddd-ts-kit stories`; update the
|
|
177
|
+
plugin. A story opened before this version keeps its base: `story-scope` resumes it as it was.
|
|
178
|
+
|
|
179
|
+
**One session takes one user story to its pull request, one story per terminal.** The new skill
|
|
180
|
+
`/ddd-ts-kit:story <code>` (run by the owner) works in the worktree of the story: it asks every
|
|
181
|
+
question at once, then without stopping writes `docs/architecture/stories/<code>.md` (statement,
|
|
182
|
+
questions and answers, acceptance criteria, decisions), the rows of the story, a design review
|
|
183
|
+
section per row in `docs/architecture/reviews/<code>.md` read by `architecture-reviewer`, the
|
|
184
|
+
acceptance written and locked; it builds row by row with one `context-builder` agent confined to
|
|
185
|
+
one context, merges the trunk in, reviews, verifies, writes `## Report` (each provisional
|
|
186
|
+
decision, compromise and amendment) and opens the pull request. New commands:
|
|
187
|
+
`ddd-ts-kit story-scope <code>` opens the worktree of a story on `story/<code>` (or finds it
|
|
188
|
+
again), refuses a story open in another worktree and names the other open stories with the
|
|
189
|
+
contexts they change; `ddd-ts-kit story [<code>] [--gate build|close]` says where a story stands,
|
|
190
|
+
phase by phase, and its next step; `worker-scope <context> --here` briefs the next agent inside
|
|
191
|
+
the worktree of a story, without a worktree of its own. In the worktree of a story, the guard of
|
|
192
|
+
the plugin refuses any code of a context until `story --gate build` passes, says the phase at
|
|
193
|
+
session start, and refuses once to end the session before the report. New guide:
|
|
194
|
+
[story workflow](docs/guides/story-workflow.md).
|
|
195
|
+
|
|
196
|
+
To move: update the plugin; `npx ddd-ts-kit init` adds the permissions of `story` and
|
|
197
|
+
`story-scope`.
|
|
198
|
+
|
|
199
|
+
**A story's acceptance tests are written, locked and run before its code, and a locked scenario
|
|
200
|
+
changes only with its criterion.** A story states its acceptance criteria in
|
|
201
|
+
`docs/architecture/stories/<story>.md` (`- AC1: ...` under `## Acceptance criteria`).
|
|
202
|
+
`ddd-ts-kit generate acceptance <story>` writes `test/acceptance/<story>.acceptance.spec.ts`, an
|
|
203
|
+
`it.todo` per criterion (per slice row when the story states none), on the support of
|
|
204
|
+
`test/e2e/`. Each scenario names the rows that make it pass and the criterion it proves
|
|
205
|
+
(`'#US5.02 AC1 ...'`) and runs wrapped in the new `pending(...)` of `@ddd-ts-kit/testing/e2e`:
|
|
206
|
+
it passes while an assertion fails, and fails once the scenario passes (the slice removes the
|
|
207
|
+
wrapper) or stops on anything but an assertion (the scenario is broken). The new command
|
|
208
|
+
`ddd-ts-kit acceptance [<story>]` reads the scenarios against the rows of `slices.md` and the
|
|
209
|
+
criteria: `--gate written` before the code (every slice row and criterion covered, nothing left
|
|
210
|
+
to write, the acceptance locked), `--gate passing` before the story closes. `--lock` writes
|
|
211
|
+
`test/acceptance/<story>.acceptance.lock.json`, the fingerprint of each criterion and scenario
|
|
212
|
+
(the wrapper, the layout and the comments aside). Afterwards a criterion changed, or a scenario
|
|
213
|
+
changed or removed while its criteria were not, is reported whatever the gate, and locking again
|
|
214
|
+
takes a verdict `amend` on that very version from the new `acceptance-judge` agent, which compares
|
|
215
|
+
the locked version, the new one, the criterion and the owner's answers
|
|
216
|
+
(`test/acceptance/verdicts/*.md`); a refusal wins, and the verdicts become amendments the command
|
|
217
|
+
lists for the owner to validate. The guard of the plugin lets a sub-agent only remove
|
|
218
|
+
`pending(...)` in an acceptance spec, refuses it `acceptance --lock`, lets the judge alone write a
|
|
219
|
+
verdict and nothing else, refuses the lock and the verdicts to any hand edit or shell write, and
|
|
220
|
+
refuses an acceptance spec written by hand instead of generated. `verify-slice` stages the
|
|
221
|
+
acceptance spec with the slice. The new rule `test/acceptance-black-box` (a warning) refuses an
|
|
222
|
+
acceptance spec that imports from the source root anything but the builders and the published
|
|
223
|
+
language of a context. The skills `testing`, `use-case`, `plan-slices`, `quality-gate`,
|
|
224
|
+
`parallel-work` and the `context-builder` agent follow.
|
|
225
|
+
|
|
226
|
+
To move: a new project runs its acceptance specs with `npm run test:e2e`; in an existing one, add
|
|
227
|
+
`'test/acceptance/**/*.acceptance.spec.ts'` to the `include` of `vitest.e2e.config.ts` (the
|
|
228
|
+
`testMatch` of `jest.e2e.config.js`). `npx ddd-ts-kit init` adds the permission of
|
|
229
|
+
`npx ddd-ts-kit acceptance *` and the refusal to edit a lock; update the plugin.
|
|
230
|
+
`ddd-ts-kit check --rule test/acceptance-black-box` lists the acceptance specs to take up.
|
|
231
|
+
|
|
7
232
|
## 0.26.0
|
|
8
233
|
|
|
9
234
|
**The guard recognises the CLI of the kit however it is launched.** The refusal of
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:d716322ee73d723e -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -525,7 +525,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
525
525
|
| `README.md`, `AGENTS.md`, `CLAUDE.md`, `.claude/rules/*.md`, `.github/instructions/*.instructions.md` | comment le lancer ; un guide léger dans `AGENTS.md`, que lisent Codex, Copilot et la plupart des agents de code et qu'importe `CLAUDE.md` (commandes, comment lire moins, la carte des règles, fichiers générés, note sur le compilateur, les *skills* du *plugin* : `/ddd-ts-kit:start`, `glossary`, `use-case`, `document`, `quality-gate`) et les invariants dans sept fichiers de règles, `domain.md`, `application.md`, `published-language.md`, `infrastructure.md`, `presentation.md`, `platform.md` et `tests.md`, chacun délimité par un frontmatter `paths`, et les mêmes sept pour GitHub Copilot, chacun délimité par `applyTo` |
|
|
526
526
|
| `.github/copilot/settings.json` | le *plugin* du kit, déclaré pour GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`) : son agent cloud l'installe, la CLI Copilot et VS Code le recommandent ; un fichier existant garde ce qu'il contient et reçoit les deux entrées |
|
|
527
527
|
| `.claude/settings.json` | des permissions seulement : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), les trois documents générés ne sont pas modifiés à la main, `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord |
|
|
528
|
-
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo
|
|
528
|
+
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo`, `.ddd-ts-kit/`, où écrit `worker-scope`, et `.worktrees/`, où vivent les *worktrees* |
|
|
529
529
|
|
|
530
530
|
`--ci both` écrit les deux *pipelines*, `--ci none` aucun (et pas de `renovate.json`). Les
|
|
531
531
|
fichiers de *pipeline* sont des copies des fichiers du répertoire `pipeline/` du dépôt, livrées
|
|
@@ -705,12 +705,12 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
705
705
|
`platform.jobs.register({ name, schedule, run })`.
|
|
706
706
|
- **Les *jobs*.** Le planning est validé quand le *job* est généré, par les règles du planificateur
|
|
707
707
|
(`parseJobSchedule` du kernel, fixé par un test) : une durée (`15m`, `2s`, des chiffres seuls
|
|
708
|
-
sont des millisecondes) ou une expression cron à cinq champs
|
|
709
|
-
`--time-zone` sans `--cron` est refusé, de même qu'un *job* sans
|
|
710
|
-
n'existe pas (avec la commande qui la crée) et une commande dont le
|
|
711
|
-
que l'acteur et l'instant pour lequel le travail est fait : un *job* dit
|
|
712
|
-
est venu, le gestionnaire trouve sur quoi agir. Les paramètres optionnels
|
|
713
|
-
par défaut sont laissés hors de l'appel.
|
|
708
|
+
sont des millisecondes) ou une expression cron à cinq champs ou un raccourci (`@daily`), avec un
|
|
709
|
+
fuseau horaire IANA ; `--time-zone` sans `--cron` est refusé, de même qu'un *job* sans
|
|
710
|
+
`--command`, une commande qui n'existe pas (avec la commande qui la crée) et une commande dont le
|
|
711
|
+
constructeur demande plus que l'acteur et l'instant pour lequel le travail est fait : un *job* dit
|
|
712
|
+
seulement que le moment est venu, le gestionnaire trouve sur quoi agir. Les paramètres optionnels
|
|
713
|
+
ou qui ont une valeur par défaut sont laissés hors de l'appel.
|
|
714
714
|
- **L'autorisation d'un *job*.** Un *job* dont la commande est protégée l'envoie en tant que
|
|
715
715
|
`system:<context>.<name>`, qui n'a aucun droit tant que le modèle ne lui en donne pas.
|
|
716
716
|
`generate job` écrit l'autorisation là où le modèle en fait une ligne, dans une région marquée
|
|
@@ -1251,10 +1251,32 @@ cette version) et les permissions des agents que cette version écrit et que le
|
|
|
1251
1251
|
*worktree* son propre lefthook, et fait échouer un *commit*, bruyamment, quand ses dépendances
|
|
1252
1252
|
manquent ; le correctif est cette ligne, ou `init --force` pour le fichier entier. Le *hook*
|
|
1253
1253
|
pre-commit sous `git rev-parse --git-path hooks` doit exister et venir de lefthook ; le correctif
|
|
1254
|
-
est `npm run hooks:install`, une fois par clone.
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1254
|
+
est `npm run hooks:install`, une fois par clone.
|
|
1255
|
+
|
|
1256
|
+
Puis ce qui manque à ce *checkout* pour faire tourner le projet, l'état d'un clone ou d'un
|
|
1257
|
+
nouveau *worktree* plutôt que du projet, lu dans ses fichiers sans réseau : le Node qui tourne
|
|
1258
|
+
face à `engines.node` de `package.json` (`unsupported`) et à la version que nomme `.nvmrc`
|
|
1259
|
+
(`other version` ; un alias comme `lts/*` n'est pas jugé) ; `node_modules` présent (`missing`)
|
|
1260
|
+
et installé depuis la dernière modification du *lockfile* (`outdated`, d'après la copie du
|
|
1261
|
+
*lockfile* que le gestionnaire de paquets écrit sous `node_modules`) ; `ddd-ts-kit` et chaque
|
|
1262
|
+
paquet `@ddd-ts-kit/*` que `package.json` déclare ou que `node_modules` contient, installé
|
|
1263
|
+
(`not installed`) à la version de la CLI qui tourne (`other version`). Un projet sans *lockfile*
|
|
1264
|
+
à lui dans un *workspace* (un `package.json` au-dessus qui déclare `workspaces`, ou un
|
|
1265
|
+
`pnpm-workspace.yaml`, avec le *lockfile*) est lu là où le *workspace* installe, ses paquets
|
|
1266
|
+
résolus comme le fait Node, du projet vers le haut ; et, quand le dépôt a un
|
|
1267
|
+
`.gitmodules`, chaque sous-module initialisé (`not initialised`, d'après `git submodule status`).
|
|
1268
|
+
Chacun vient avec son correctif : un Node qu'`engines.node` accepte (`nvm use`), `npm ci`, les
|
|
1269
|
+
paquets du kit montés ensemble, `git submodule update --init --recursive`.
|
|
1270
|
+
|
|
1271
|
+
`--strict` sort avec 1 tant que quelque chose manque ou est à une autre plage, ou tant que le
|
|
1272
|
+
*checkout* ne peut pas faire tourner le projet : un Node hors d'`engines.node`, pas de
|
|
1273
|
+
`node_modules`, un paquet du kit non installé ou à une autre version, un sous-module non
|
|
1274
|
+
initialisé. Un script écrit autrement, un *hook* que ce clone n'a pas installé, un Node que
|
|
1275
|
+
`.nvmrc` ne nomme pas quand `engines.node` l'accepte, et un *lockfile* modifié depuis
|
|
1276
|
+
l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà) sont
|
|
1277
|
+
signalés sans le faire échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
|
|
1278
|
+
expected, found }] }`, `area` valant `script`, `package`, `permission`, `hook`, `node`,
|
|
1279
|
+
`install` ou `submodule`.
|
|
1258
1280
|
|
|
1259
1281
|
## worker-scope
|
|
1260
1282
|
|
|
@@ -1264,7 +1286,8 @@ ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>]
|
|
|
1264
1286
|
```
|
|
1265
1287
|
|
|
1266
1288
|
Prépare la place d'un *worker* d'un build réparti par contexte : crée un *worktree* git du projet
|
|
1267
|
-
(
|
|
1289
|
+
(`.worktrees/<context>` du *checkout* principal par défaut, à côté du projet tant que son
|
|
1290
|
+
`.gitignore` ne contient pas `.worktrees/`) sur la branche `build/<context>`, à partir de `--base` (une
|
|
1268
1291
|
branche, une étiquette ou un *commit* : `origin/main` ; par défaut la branche courante), y écrit
|
|
1269
1292
|
`.ddd-ts-kit/worker.json` (`{ context, rows, base, baseCommit, branch }`, `baseCommit` étant le
|
|
1270
1293
|
*commit* que nomme la base à ce moment ; `init` ignore `.ddd-ts-kit/`), et
|
|
@@ -1594,7 +1617,7 @@ ajoute, `lint` ce qu'elle ajoute à ESLint ; les *pipelines* générés câblent
|
|
|
1594
1617
|
|
|
1595
1618
|
```
|
|
1596
1619
|
ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab]
|
|
1597
|
-
[--changed-since <git-ref>] [--self]
|
|
1620
|
+
[--changed-since <git-ref>] [--explain] [--self]
|
|
1598
1621
|
ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]
|
|
1599
1622
|
ddd-ts-kit check --commit-size [--staged] [--strict]
|
|
1600
1623
|
```
|
|
@@ -1657,12 +1680,19 @@ règle.
|
|
|
1657
1680
|
- `paths` et `--changed-since` limitent ce qui est signalé, pas ce qui est analysé.
|
|
1658
1681
|
`--changed-since` lance `git diff --name-only --relative <ref>...` dans le projet.
|
|
1659
1682
|
- `--format github` affiche des annotations `::error file=...,line=...::`.
|
|
1683
|
+
- `--explain` fait suivre les violations de chaque règle qu'elles signalent, une fois, avec sa
|
|
1684
|
+
description et la raison de son existence (comme `explain` l'affiche, sans les exemples), et
|
|
1685
|
+
ajoute en JSON un tableau `explanations`. Avec `--format github` ou `gitlab`, la raison va à la
|
|
1686
|
+
place à la fin du message de chaque annotation : une *pull request* montre une annotation seule
|
|
1687
|
+
sur sa ligne, et un rapport Code Quality n'a pas de place pour du texte à côté de ses problèmes.
|
|
1688
|
+
Les empreintes restent les mêmes.
|
|
1660
1689
|
- `--format gitlab` affiche un rapport Code Quality de GitLab : un problème par violation,
|
|
1661
1690
|
`major` pour une erreur et `minor` pour un avertissement, avec une empreinte qui ne dépend pas
|
|
1662
1691
|
de la ligne.
|
|
1663
1692
|
- Les sévérités viennent de `rules` dans la configuration (`error`, `warn`, `off`). Par défaut
|
|
1664
1693
|
`error`, sauf `test/no-mocks`, `test/builder-required`, `clean/function-size`,
|
|
1665
|
-
`clean/no-noise-comment`, `clean/no-flag-argument`, `standard/no-parallel-interface
|
|
1694
|
+
`clean/no-noise-comment`, `clean/no-flag-argument`, `standard/no-parallel-interface`,
|
|
1695
|
+
`declarations/port-adapter-wired` et, tenue
|
|
1666
1696
|
par ESLint, `application/command-query-separation` (`warn`). `any` dans un fichier de test est
|
|
1667
1697
|
toujours un avertissement.
|
|
1668
1698
|
- `limits: { "maxParameters": 3, "maxFunctionLines": 30 }` dans la configuration règle
|
|
@@ -1762,6 +1792,7 @@ règle.
|
|
|
1762
1792
|
| `declarations/role-declared` | style déclaré seulement : un fichier de rôle (autre que `*.command.ts` et `*.query.ts`, tenus par `authz/declared` ; `*.job.ts` sous `application/scheduling/` avec `@Scheduled` et `*.publisher.ts` avec `@DomainEventHandler` sont des rôles) qui n'exporte aucune classe portant le décorateur de son suffixe et de son dossier, ou une classe qui en porte une autre ; une classe déclarée dans un fichier qui n'est pas un fichier de rôle ; une option `consumer` ou `name` manquante, vide, une variable, une concaténation ou un template literal avec une substitution ; tout décorateur de déclaration sur une classe sous `domain/` |
|
|
1763
1793
|
| `declarations/barrel-current` | style déclaré seulement : avec `stack.assembly: barrel`, un `<context>.declarations.ts` manquant ou qui diffère d'un `export *` par fichier de rôle trié par chemin, suivi d'un `injected(Class, [Tokens])` par classe dont le constructeur reçoit quelque chose (lu depuis les signatures, avec leurs imports) ; avec `discovery`, un barrel qui existe encore, et un `<context>.dependencies.ts` qui diffère de ces instructions `injected` (son absence est acceptée tant qu'il n'en contiendrait aucune). Le message nomme le fichier de rôle manquant ou la classe dont la liste est périmée. Elle a besoin de l'arbre, c'est pourquoi `check-file` ne l'exécute pas |
|
|
1764
1794
|
| `declarations/constructor-injection` | style déclaré seulement, dans un fichier de rôle : sur une classe dont le décorateur ne liste rien, un paramètre de constructeur optionnel, qui a une valeur par défaut, est un paramètre du reste ou est déstructuré, n'a pas de type, ou est typé par autre chose qu'un nom de classe (arguments de type mis à part) : une union, une intersection, un tableau, un nom qualifié, un type du langage, une interface, un alias de type, une enum ou une classe non exportée du fichier ou du fichier du projet d'où elle est importée ; une classe qui hérite son constructeur d'une classe que le projet ne sait pas lire. Sous `stack.dependencies: signature`, un décorateur qui porte une liste alors que le constructeur peut être lu : une liste qui le répète, une qui en diffère |
|
|
1795
|
+
| `declarations/port-adapter-wired` | une classe de `infrastructure/` qui implémente un port et que rien ne câble : ni `@Repository`, `@Gateway` ou `@Adapter` dans le style déclaré, ni fichier de la racine de composition (`<context>.module.ts`, `main.ts`, `apps/<context>/main.ts`, la plateforme) qui l'importe, une fois que le fichier ne porte plus de `TODO(domain)` ni de `TODO(platform)` ; celle gardée à dessein porte `// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-NNNN: <why>` |
|
|
1765
1796
|
| `ports/abstract-class` | dans un fichier de port (`domain/repositories/*.repository.ts`, `application/ports/*.port.ts`) : une classe qui n'est pas `abstract` ; un membre qui n'est pas une méthode ou une propriété abstraite (`static readonly tokenKey = '<text>'` mis à part) : un constructeur, un corps, un initialiseur, un membre `private`, `protected` ou `#` ; une `interface` exportée (un alias `type`, une forme de données, n'est pas signalé) |
|
|
1766
1797
|
| `ports/implements-never-extends` | une classe portant `@Repository(P)`, `@Gateway(P)` ou `@Adapter(P)`, ou donnée à `bind(P).toClass(C)` ou `rebind(P).toClass(C)`, sans `implements P` ou avec `extends P` ; sous `infrastructure/`, une classe qui étend une classe importée d'un fichier de port |
|
|
1767
1798
|
| `ports/no-token-constant` | un appel de `token` importé d'un *package* `@ddd-ts-kit/*` ; `Symbol(..)`, `Symbol.for(..)` ou une chaîne littérale comme premier argument de `bind`, `rebind`, `resolve`, `fake` ou `override` dans un fichier qui importe `@ddd-ts-kit/di` ; un nom en UPPER_SNAKE_CASE dans une liste de dépendances ; un fichier nommé `*.ports.ts` ou `tokens.ts` |
|
|
@@ -1933,6 +1964,22 @@ propre, *mocks*, composition, désactivations) sur un fichier sans parcourir le
|
|
|
1933
1964
|
un *hook* d'éditeur ou d'agent après chaque écriture. Un fichier qui n'est pas une source du
|
|
1934
1965
|
projet est ignoré.
|
|
1935
1966
|
|
|
1967
|
+
## lint
|
|
1968
|
+
|
|
1969
|
+
```
|
|
1970
|
+
ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]
|
|
1971
|
+
```
|
|
1972
|
+
|
|
1973
|
+
Ce que lancent `lint` et `ci:lint` d'un projet généré : l'ESLint du projet, par son API, sur les
|
|
1974
|
+
chemins donnés (le projet sinon), son rapport dans le format demandé (`--format gitlab` écrit le
|
|
1975
|
+
rapport Code Quality comme le fait `eslint-formatter-gitlab`), `--fix` comme ESLint le prend. Il
|
|
1976
|
+
sort en 1 sur une erreur, et sur un avertissement comme sur une erreur, sauf sur un avertissement
|
|
1977
|
+
d'une règle du kit en transition : une règle nouvelle dans cette version, dont la documentation
|
|
1978
|
+
nomme la version où elle devient une erreur. Ceux-là sont affichés dans le rapport et listés
|
|
1979
|
+
après lui, une ligne par règle, sans échouer : une mise à jour du kit ne fait jamais passer au
|
|
1980
|
+
rouge un lint vert. Sans ESLint installé, il sort en 2 et nomme l'installation. Voir
|
|
1981
|
+
[Base de qualité](../../docs/tools/quality-baseline.fr.md#un-avertissement-fait-échouer-le-lint).
|
|
1982
|
+
|
|
1936
1983
|
## rules, explain
|
|
1937
1984
|
|
|
1938
1985
|
```
|
package/README.md
CHANGED
|
@@ -509,7 +509,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
509
509
|
| `README.md`, `AGENTS.md`, `CLAUDE.md`, `.claude/rules/*.md`, `.github/instructions/*.instructions.md` | how to run it; a slim guide in `AGENTS.md`, which Codex, Copilot and most coding agents read and `CLAUDE.md` imports (commands, how to read less, the map of the rules, generated files, compiler note, the skills of the plugin: `/ddd-ts-kit:start`, `glossary`, `use-case`, `document`, `quality-gate`) and the invariants in seven rule files, `domain.md`, `application.md`, `published-language.md`, `infrastructure.md`, `presentation.md`, `platform.md` and `tests.md`, each scoped by a `paths` frontmatter, and the same seven for GitHub Copilot, each scoped by `applyTo` |
|
|
510
510
|
| `.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 |
|
|
511
511
|
| `.claude/settings.json` | permissions only: the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), the three generated documents are not edited by hand, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `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 |
|
|
512
|
-
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo
|
|
512
|
+
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo`, `.ddd-ts-kit/`, where `worker-scope` writes, and `.worktrees/`, where the worktrees live |
|
|
513
513
|
|
|
514
514
|
`--ci both` writes the two pipelines, `--ci none` neither (and no `renovate.json`). The pipeline
|
|
515
515
|
files are copies of the assets of the repository's `pipeline/` directory, shipped in
|
|
@@ -683,11 +683,11 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
683
683
|
`platform.jobs.register({ name, schedule, run })`.
|
|
684
684
|
- **Jobs.** The schedule is validated when the job is generated, by the rules of the scheduler
|
|
685
685
|
(`parseJobSchedule` of the kernel, pinned by a test): a duration (`15m`, `2s`, digits alone are
|
|
686
|
-
milliseconds) or a five
|
|
687
|
-
`--cron` is refused, and so is a job without `--command`, a command
|
|
688
|
-
command that creates it) and a command whose constructor needs more
|
|
689
|
-
instant the work is for: a job only says that the time has come, the
|
|
690
|
-
on. Parameters that are optional or have a default are left out of the call.
|
|
686
|
+
milliseconds) or a cron expression of five fields or a shorthand (`@daily`), with an IANA time
|
|
687
|
+
zone; `--time-zone` without `--cron` is refused, and so is a job without `--command`, a command
|
|
688
|
+
that does not exist (with the command that creates it) and a command whose constructor needs more
|
|
689
|
+
than the actor and the instant the work is for: a job only says that the time has come, the
|
|
690
|
+
handler finds what to act on. Parameters that are optional or have a default are left out of the call.
|
|
691
691
|
- **The grant of a job.** A job whose command is protected sends it as `system:<context>.<name>`,
|
|
692
692
|
which has no right unless the model gives it one. `generate job` writes the grant where the model
|
|
693
693
|
makes it one line, in a `system-grants` marker region, and `next` points at that line:
|
|
@@ -1187,10 +1187,30 @@ otherwise, then the git hooks. `lefthook.yml` must hold `lefthook: node_modules/
|
|
|
1187
1187
|
which makes each checkout and each worktree run its own lefthook and fail a commit, loudly,
|
|
1188
1188
|
when its dependencies are missing; the fix is that line, or `init --force` for the whole file.
|
|
1189
1189
|
The pre-commit hook under `git rev-parse --git-path hooks` must exist and come from lefthook;
|
|
1190
|
-
the fix is `npm run hooks:install`, once per clone.
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1190
|
+
the fix is `npm run hooks:install`, once per clone.
|
|
1191
|
+
|
|
1192
|
+
Then what this checkout lacks to run the project, the state of a clone or a new worktree rather
|
|
1193
|
+
than of the project, read from its files without network: the running Node against
|
|
1194
|
+
`engines.node` of `package.json` (`unsupported`) and the version `.nvmrc` names (`other version`;
|
|
1195
|
+
an alias such as `lts/*` is not judged); `node_modules` present (`missing`) and installed since
|
|
1196
|
+
the lockfile last changed (`outdated`, from the copy of the lockfile the package manager writes
|
|
1197
|
+
under `node_modules`); `ddd-ts-kit` and every `@ddd-ts-kit/*` package that `package.json`
|
|
1198
|
+
declares or `node_modules` holds, installed (`not installed`) at the version of the running CLI
|
|
1199
|
+
(`other version`). A project without a lockfile of its own inside a workspace (a `package.json`
|
|
1200
|
+
above it that declares `workspaces`, or a `pnpm-workspace.yaml`, with the lockfile) is read where
|
|
1201
|
+
the workspace installs, its packages resolved as Node does, from the project up; and, when the repository has a `.gitmodules`, every submodule initialised
|
|
1202
|
+
(`not initialised`, from `git submodule status`). Each comes with its fix: a Node that
|
|
1203
|
+
`engines.node` accepts (`nvm use`), `npm ci`, the packages of the kit upgraded together,
|
|
1204
|
+
`git submodule update --init --recursive`.
|
|
1205
|
+
|
|
1206
|
+
`--strict` exits 1 while something is missing or at another range, or while the checkout cannot
|
|
1207
|
+
run the project: a Node outside `engines.node`, no `node_modules`, a package of the kit not
|
|
1208
|
+
installed or at another version, a submodule not initialised. A script written otherwise, a hook
|
|
1209
|
+
this clone has not installed, a Node `.nvmrc` does not name while `engines.node` accepts it, and a
|
|
1210
|
+
lockfile changed since the install (a checkout may rewrite it with what `node_modules` already
|
|
1211
|
+
holds) are said without failing it. `--json` prints `{ version, findings: [{ area, name, problem,
|
|
1212
|
+
expected, found }] }`, `area` being `script`, `package`, `permission`, `hook`, `node`, `install`
|
|
1213
|
+
or `submodule`.
|
|
1194
1214
|
|
|
1195
1215
|
## worker-scope
|
|
1196
1216
|
|
|
@@ -1200,7 +1220,8 @@ ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>]
|
|
|
1200
1220
|
```
|
|
1201
1221
|
|
|
1202
1222
|
Prepares the place of one worker of a build split by context: creates a git worktree of the
|
|
1203
|
-
project (
|
|
1223
|
+
project (`.worktrees/<context>` of the main checkout by default, next to the project while its
|
|
1224
|
+
`.gitignore` does not hold `.worktrees/`) on the branch `build/<context>`, cut from
|
|
1204
1225
|
`--base` (a branch, a tag or a commit: `origin/main`; by default the current branch), writes
|
|
1205
1226
|
`.ddd-ts-kit/worker.json` in it (`{ context, rows, base, baseCommit, branch }`, `baseCommit` being
|
|
1206
1227
|
the commit the base names at that moment; `init` ignores `.ddd-ts-kit/`), and
|
|
@@ -1505,7 +1526,7 @@ generated pipelines wire all three.
|
|
|
1505
1526
|
|
|
1506
1527
|
```
|
|
1507
1528
|
ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab]
|
|
1508
|
-
[--changed-since <git-ref>] [--self]
|
|
1529
|
+
[--changed-since <git-ref>] [--explain] [--self]
|
|
1509
1530
|
ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]
|
|
1510
1531
|
ddd-ts-kit check --commit-size [--staged] [--strict]
|
|
1511
1532
|
```
|
|
@@ -1567,12 +1588,17 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
1567
1588
|
- `paths` and `--changed-since` limit what is reported, not what is analysed.
|
|
1568
1589
|
`--changed-since` runs `git diff --name-only --relative <ref>...` in the project.
|
|
1569
1590
|
- `--format github` prints `::error file=...,line=...::` annotations.
|
|
1591
|
+
- `--explain` follows the violations with each rule they report, once, with its description and
|
|
1592
|
+
the reason it exists (as `explain` prints it, without the examples), and in JSON adds an
|
|
1593
|
+
`explanations` array. With `--format github` or `gitlab`, the reason goes at the end of the
|
|
1594
|
+
message of each annotation instead: a pull request shows an annotation alone on its line, and
|
|
1595
|
+
a Code Quality report has no place for text beside its issues. The fingerprints stay the same.
|
|
1570
1596
|
- `--format gitlab` prints a GitLab Code Quality report: one issue per violation, `major` for
|
|
1571
1597
|
an error and `minor` for a warning, with a fingerprint that does not depend on the line.
|
|
1572
1598
|
- Severities come from `rules` in the config (`error`, `warn`, `off`). Default `error`, except
|
|
1573
1599
|
`test/no-mocks`, `test/builder-required`, `clean/function-size`, `clean/no-noise-comment`,
|
|
1574
|
-
`clean/no-flag-argument`, `standard/no-parallel-interface`
|
|
1575
|
-
`application/command-query-separation` (`warn`). `any` in a test file is
|
|
1600
|
+
`clean/no-flag-argument`, `standard/no-parallel-interface`, `declarations/port-adapter-wired`
|
|
1601
|
+
and, held by ESLint, `application/command-query-separation` (`warn`). `any` in a test file is
|
|
1576
1602
|
always a warning.
|
|
1577
1603
|
- `limits: { "maxParameters": 3, "maxFunctionLines": 30 }` in the config sets
|
|
1578
1604
|
`clean/function-size`. `maxFunctionLines` goes from 1 to 100: a value above is read as 100 and
|
|
@@ -1667,6 +1693,7 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
1667
1693
|
| `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/` |
|
|
1668
1694
|
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<context>.declarations.ts` or one that differs from one `export *` per role file sorted by path followed by one `injected(Class, [Tokens])` per class whose constructor takes something (read from the signatures, with their imports); with `discovery`, a barrel that still exists, 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. It needs the tree, so `check-file` does not run it |
|
|
1669
1695
|
| `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 |
|
|
1696
|
+
| `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>` |
|
|
1670
1697
|
| `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) |
|
|
1671
1698
|
| `ports/implements-never-extends` | a class carrying `@Repository(P)`, `@Gateway(P)` or `@Adapter(P)`, or given to `bind(P).toClass(C)` or `rebind(P).toClass(C)`, without `implements P` or with `extends P`; under `infrastructure/`, a class extending a class imported from a port file |
|
|
1672
1699
|
| `ports/no-token-constant` | a call of `token` imported from a `@ddd-ts-kit/*` package; `Symbol(..)`, `Symbol.for(..)` or a string literal as the first argument of `bind`, `rebind`, `resolve`, `fake` or `override` in a file importing `@ddd-ts-kit/di`; an UPPER_SNAKE_CASE name in a dependency list; a file named `*.ports.ts` or `tokens.ts` |
|
|
@@ -1817,6 +1844,21 @@ Runs the per-file rules (layers, contexts, naming, events, language, purity, cle
|
|
|
1817
1844
|
composition, suppressions) on one file without walking the project: meant for an editor or
|
|
1818
1845
|
agent hook after each write. A file that is not a source of the project is ignored.
|
|
1819
1846
|
|
|
1847
|
+
## lint
|
|
1848
|
+
|
|
1849
|
+
```
|
|
1850
|
+
ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]
|
|
1851
|
+
```
|
|
1852
|
+
|
|
1853
|
+
What `lint` and `ci:lint` of a generated project run: the ESLint of the project, through its API,
|
|
1854
|
+
on the paths given (the project otherwise), its report in the format asked (`--format gitlab`
|
|
1855
|
+
writes the Code Quality report as `eslint-formatter-gitlab` does), `--fix` as ESLint takes it.
|
|
1856
|
+
It exits 1 on an error, and on a warning as on an error, but on a warning of a rule of the kit in
|
|
1857
|
+
transition: a rule new in this version, whose documentation names the version in which it becomes
|
|
1858
|
+
an error. Those are shown in the report and listed after it, one line per rule, without failing:
|
|
1859
|
+
an upgrade of the kit never turns a green lint red. Without ESLint installed it exits 2 and names
|
|
1860
|
+
the install. See [Quality baseline](../../docs/tools/quality-baseline.md#warnings-fail-the-lint).
|
|
1861
|
+
|
|
1820
1862
|
## rules, explain
|
|
1821
1863
|
|
|
1822
1864
|
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Where the acceptance scenarios of the stories live, at the project root next to `test/e2e/`. */
|
|
2
|
+
export declare const ACCEPTANCE_DIR = "test/acceptance";
|
|
3
|
+
/** The acceptance spec of a story: `US5` is `test/acceptance/us5.acceptance.spec.ts`. */
|
|
4
|
+
export declare function acceptanceFileOf(story: string): string;
|
|
5
|
+
//# sourceMappingURL=acceptance-file-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-file-of.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-file-of.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Where the acceptance scenarios of the stories live, at the project root next to `test/e2e/`. */
|
|
2
|
+
export const ACCEPTANCE_DIR = 'test/acceptance';
|
|
3
|
+
/** The acceptance spec of a story: `US5` is `test/acceptance/us5.acceptance.spec.ts`. */
|
|
4
|
+
export function acceptanceFileOf(story) {
|
|
5
|
+
return `${ACCEPTANCE_DIR}/${story.toLowerCase()}.acceptance.spec.ts`;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=acceptance-file-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-file-of.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-file-of.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEhD,yFAAyF;AACzF,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,GAAG,cAAc,IAAI,KAAK,CAAC,WAAW,EAAE,qBAAqB,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story is held to: `written`, before the code of its rows, every slice covered by a
|
|
3
|
+
* scenario written and none left to write; `passing`, before the story closes, none pending
|
|
4
|
+
* either.
|
|
5
|
+
*/
|
|
6
|
+
export type AcceptanceGate = 'written' | 'passing';
|
|
7
|
+
export declare const ACCEPTANCE_GATES: readonly AcceptanceGate[];
|
|
8
|
+
//# sourceMappingURL=acceptance-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-gate.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-gate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnD,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-gate.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-gate.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** A scenario as the lock recorded it. */
|
|
2
|
+
export interface LockedScenario {
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly criteria: readonly string[];
|
|
5
|
+
readonly fingerprint: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A change since the previous lock that the acceptance-judge agent let through: a scenario changed
|
|
9
|
+
* while its criteria were not, or a criterion changed; with the verdict, for the owner to validate.
|
|
10
|
+
*/
|
|
11
|
+
export interface Amendment {
|
|
12
|
+
/** `scenario "<title>"` or `criterion AC1`. */
|
|
13
|
+
readonly subject: string;
|
|
14
|
+
readonly criteria: readonly string[];
|
|
15
|
+
readonly reason: string;
|
|
16
|
+
/** The file of the verdict. */
|
|
17
|
+
readonly verdict: string;
|
|
18
|
+
readonly on: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The acceptance of a story once agreed, `test/acceptance/<story>.acceptance.lock.json`, written by
|
|
22
|
+
* `ddd-ts-kit acceptance <story> --lock` only: the fingerprint of each criterion and of each
|
|
23
|
+
* scenario. A scenario may then change only with its criterion; a criterion, or a scenario whose
|
|
24
|
+
* criteria stayed, only with a verdict of the acceptance-judge agent, which the lock keeps.
|
|
25
|
+
*/
|
|
26
|
+
export interface AcceptanceLock {
|
|
27
|
+
readonly story: string;
|
|
28
|
+
readonly criteria: Readonly<Record<string, string>>;
|
|
29
|
+
readonly scenarios: readonly LockedScenario[];
|
|
30
|
+
readonly amendments: readonly Amendment[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=acceptance-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-lock.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-lock.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-lock.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-lock.ts"],"names":[],"mappings":""}
|