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
|
@@ -8,9 +8,16 @@ import { handler } from './handler.js';
|
|
|
8
8
|
import { PATHS } from './paths.js';
|
|
9
9
|
import { project } from './project.js';
|
|
10
10
|
import { SAMPLES } from './samples.js';
|
|
11
|
+
import { source } from './source.js';
|
|
11
12
|
import { withoutFile } from './without-file.js';
|
|
12
|
-
const { ADAPTER, AGGREGATE, BARREL, BILLING, COMMAND, EVENT, EVENT_HANDLER, EVENT_HANDLER_SPEC, HANDLER, INTEGRATION_HANDLER, INTEGRATION_HANDLER_SPEC, JOB, JOB_SPEC, MODULE, POLICY, } = PATHS;
|
|
13
|
+
const { ADAPTER, AGGREGATE, BARREL, BILLING, COMMAND, EVENT, EVENT_HANDLER, EVENT_HANDLER_SPEC, HANDLER, INTEGRATION_HANDLER, INTEGRATION_HANDLER_SPEC, JOB, JOB_SPEC, MODULE, PLATFORM_MODULE, POLICY, PORT, } = PATHS;
|
|
13
14
|
const { SPEC } = SAMPLES;
|
|
15
|
+
/** A class of infrastructure/ that implements a port, in a file without a role suffix, declared by nothing. */
|
|
16
|
+
const STRIPE = `${BILLING}/infrastructure/external/stripe-payment-gateway.ts`;
|
|
17
|
+
const STRIPE_IMPORT = "import { StripePaymentGateway } from '@/contexts/billing/infrastructure/external/stripe-payment-gateway.js';";
|
|
18
|
+
const PORT_IMPORT = "import { PaymentGateway } from '@/contexts/billing/application/ports/payment-gateway.port.js';";
|
|
19
|
+
const stripeGateway = (...before) => source(PORT_IMPORT, '', ...before, 'export class StripePaymentGateway implements PaymentGateway {}');
|
|
20
|
+
const explicitModule = (...statements) => source("import type { ModuleBuilder } from '@ddd-ts-kit/di';", PORT_IMPORT, ...statements);
|
|
14
21
|
export const DECLARATIONS_FIXTURES = [
|
|
15
22
|
{
|
|
16
23
|
ruleId: 'declarations/role-declared',
|
|
@@ -136,5 +143,75 @@ export const DECLARATIONS_FIXTURES = [
|
|
|
136
143
|
[JOB_SPEC]: SPEC,
|
|
137
144
|
}),
|
|
138
145
|
},
|
|
146
|
+
{
|
|
147
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
148
|
+
name: 'declared style: every adapter carries its declaration in its role file',
|
|
149
|
+
expect: 'pass',
|
|
150
|
+
files: declaredProject(DECLARED_CONTEXT),
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
154
|
+
name: 'explicit style: an adapter bound to its port in the module file',
|
|
155
|
+
expect: 'pass',
|
|
156
|
+
files: project({
|
|
157
|
+
[PORT]: DECLARED.port,
|
|
158
|
+
[STRIPE]: stripeGateway(),
|
|
159
|
+
[MODULE]: explicitModule(STRIPE_IMPORT, '', 'export function billingModule(builder: ModuleBuilder): void {', ' builder.bind(PaymentGateway).toClass(StripePaymentGateway, []);', '}'),
|
|
160
|
+
}),
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
164
|
+
name: 'declared style: an adapter without a declaration, bound by the platform',
|
|
165
|
+
expect: 'pass',
|
|
166
|
+
files: declaredProject({
|
|
167
|
+
[PORT]: DECLARED.port,
|
|
168
|
+
[STRIPE]: stripeGateway(),
|
|
169
|
+
[PLATFORM_MODULE]: source("import { defineModule } from '@ddd-ts-kit/di';", PORT_IMPORT, STRIPE_IMPORT, '', "export const platformModule = defineModule('platform', (builder) => {", ' builder.bind(PaymentGateway).toFactory(() => new StripePaymentGateway());', '});'),
|
|
170
|
+
}),
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
174
|
+
name: 'an adapter kept unwired on purpose, with a suppression that points to a decision record',
|
|
175
|
+
expect: 'pass',
|
|
176
|
+
files: declaredProject({
|
|
177
|
+
[PORT]: DECLARED.port,
|
|
178
|
+
[STRIPE]: stripeGateway('// ddd-ts-kit-disable-next-line declarations/port-adapter-wired -- ADR-0001: kept for the switch back to Stripe'),
|
|
179
|
+
}),
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
183
|
+
name: 'explicit style: an adapter the generator wrote, its outside system not ready, left to do',
|
|
184
|
+
expect: 'pass',
|
|
185
|
+
files: project({
|
|
186
|
+
[PORT]: DECLARED.port,
|
|
187
|
+
[STRIPE]: stripeGateway('// TODO(platform): replace the body by the real client of the outside system, built in billing.module.ts.'),
|
|
188
|
+
}),
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
192
|
+
name: 'declared style: an adapter that carries no declaration and that nothing binds',
|
|
193
|
+
expect: { file: STRIPE },
|
|
194
|
+
files: declaredProject({ [PORT]: DECLARED.port, [STRIPE]: stripeGateway() }),
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
198
|
+
name: 'explicit style: an adapter the module file does not bind',
|
|
199
|
+
expect: { file: STRIPE },
|
|
200
|
+
files: project({
|
|
201
|
+
[PORT]: DECLARED.port,
|
|
202
|
+
[STRIPE]: stripeGateway(),
|
|
203
|
+
[MODULE]: explicitModule('', 'export function billingModule(builder: ModuleBuilder): void {', ' builder.bind(PaymentGateway).toValue(null);', '}'),
|
|
204
|
+
}),
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
ruleId: 'declarations/port-adapter-wired',
|
|
208
|
+
name: 'explicit style: an adapter only a test binds',
|
|
209
|
+
expect: { file: STRIPE },
|
|
210
|
+
files: project({
|
|
211
|
+
[PORT]: DECLARED.port,
|
|
212
|
+
[STRIPE]: stripeGateway(),
|
|
213
|
+
[`${BILLING}/test/integration/stripe-payment-gateway.spec.ts`]: source("import { it } from 'vitest';", STRIPE_IMPORT, '', "it.todo('charges through Stripe', () => new StripePaymentGateway());"),
|
|
214
|
+
}),
|
|
215
|
+
},
|
|
139
216
|
];
|
|
140
217
|
//# sourceMappingURL=declarations-fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,EACJ,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,GAAG,EACH,QAAQ,EACR,MAAM,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC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AC,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,CAAC;KAC7E;IACD;QACE,MAAM,EAAE,iCAAiC;QACzC,IAAI,EAAE,0DAA0D;QAChE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI;YACrB,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE;YACzB,CAAC,MAAM,CAAC,EAAE,cAAc,CACtB,EAAE,EACF,+DAA+D,EAC/D,+CAA+C,EAC/C,GAAG,CACJ;SACF,CAAC;KACH;IACD;QACE,MAAM,EAAE,iCAAiC;QACzC,IAAI,EAAE,8CAA8C;QACpD,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI;YACrB,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE;YACzB,CAAC,GAAG,OAAO,kDAAkD,CAAC,EAAE,MAAM,CACpE,8BAA8B,EAC9B,aAAa,EACb,EAAE,EACF,sEAAsE,CACvE;SACF,CAAC;KACH;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"persistence-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAY5C,eAAO,MAAM,oBAAoB,EAAE,SAAS,OAAO,EAgElD,CAAC"}
|
|
@@ -7,6 +7,9 @@ const INITIAL = '20261010120000_initial';
|
|
|
7
7
|
const INVOICES = '20261011120000_add-invoices';
|
|
8
8
|
const PAYMENTS = '20261012120000_add-payments';
|
|
9
9
|
const ORIGIN = '00000000-0000-0000-0000-000000000000';
|
|
10
|
+
const KEY_CHANGE = '20261013120000_change-invoice-key';
|
|
11
|
+
const ADD_KEY = 'ALTER TABLE "invoices" ADD CONSTRAINT "invoices_id_issuer_pk" PRIMARY KEY("id","issuer");';
|
|
12
|
+
const DROP_KEY = 'ALTER TABLE "invoices" DROP CONSTRAINT "invoices_pkey";';
|
|
10
13
|
export const PERSISTENCE_FIXTURES = [
|
|
11
14
|
{
|
|
12
15
|
ruleId: 'persistence/migration-history',
|
|
@@ -59,7 +62,29 @@ export const PERSISTENCE_FIXTURES = [
|
|
|
59
62
|
expect: { file: 'migrations/20261015101500_working-add-claims.js' },
|
|
60
63
|
files: knex(['20261012093000_initial', '20261015101500_working-add-claims']),
|
|
61
64
|
},
|
|
65
|
+
{
|
|
66
|
+
ruleId: 'persistence/primary-key-order',
|
|
67
|
+
name: 'a drizzle migration that drops the old primary key of a table before adding the new one',
|
|
68
|
+
expect: 'pass',
|
|
69
|
+
files: drizzleKeyChange([DROP_KEY, ADD_KEY]),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
ruleId: 'persistence/primary-key-order',
|
|
73
|
+
name: 'a drizzle migration that adds the new primary key of a table before dropping the old one',
|
|
74
|
+
expect: { file: `migrations/${KEY_CHANGE}.sql` },
|
|
75
|
+
files: drizzleKeyChange([ADD_KEY, DROP_KEY]),
|
|
76
|
+
},
|
|
62
77
|
];
|
|
78
|
+
/** The drizzle-kit project of three migrations, then a fourth one that changes the primary key of the invoices with `statements`. */
|
|
79
|
+
function drizzleKeyChange(statements) {
|
|
80
|
+
const tags = [INITIAL, INVOICES, PAYMENTS, KEY_CHANGE];
|
|
81
|
+
return {
|
|
82
|
+
...drizzle('b'),
|
|
83
|
+
[`migrations/${KEY_CHANGE}.sql`]: `${statements.join('--> statement-breakpoint\n')}\n`,
|
|
84
|
+
'migrations/meta/20261013120000_snapshot.json': snapshot('d', 'c'),
|
|
85
|
+
[JOURNAL]: journal(tags.map((tag) => [tag, Number(tag.slice(0, 14))])),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
63
88
|
/** A drizzle-kit project with three migrations; `payments` names the snapshot the third one was generated from. */
|
|
64
89
|
function drizzle(payments, order = [INITIAL, INVOICES, PAYMENTS]) {
|
|
65
90
|
return project({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAChD,MAAM,OAAO,GAAG,wBAAwB,CAAC;AACzC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,MAAM,GAAG,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"persistence-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/persistence-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAChD,MAAM,OAAO,GAAG,wBAAwB,CAAC;AACzC,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,QAAQ,GAAG,6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EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAEtG,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,IAAI,CAAC,KAAwB;IACpC,MAAM,SAAS,GAAG,4EAA4E,CAAC;IAE/F,OAAO,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,IAAI,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE;QAC5F,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/test-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"test-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/test-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAY5C,eAAO,MAAM,aAAa,EAAE,SAAS,OAAO,EAsK3C,CAAC"}
|
|
@@ -8,6 +8,8 @@ const { AGGREGATE, AGGREGATE_SPEC, BILLING, BUILDER, CATALOG, HANDLER, HANDLER_S
|
|
|
8
8
|
const WORLD = `${BILLING}/test/worlds/billing.world.ts`;
|
|
9
9
|
const { SPEC } = SAMPLES;
|
|
10
10
|
const REMINDER_SERVICE = `${BILLING}/domain/services/reminder.service.ts`;
|
|
11
|
+
const ACCEPTANCE_SPEC = 'test/acceptance/us5.acceptance.spec.ts';
|
|
12
|
+
const START = 'test/e2e/support/start-application.ts';
|
|
11
13
|
export const TEST_FIXTURES = [
|
|
12
14
|
{
|
|
13
15
|
ruleId: 'test/spec-required',
|
|
@@ -108,6 +110,39 @@ export const TEST_FIXTURES = [
|
|
|
108
110
|
expect: { file: AGGREGATE },
|
|
109
111
|
files: project({ [AGGREGATE]: 'export class Invoice {}\n', [AGGREGATE_SPEC]: SPEC }),
|
|
110
112
|
},
|
|
113
|
+
{
|
|
114
|
+
ruleId: 'test/acceptance-black-box',
|
|
115
|
+
name: 'an acceptance spec that drives the application, its data from the builder of a context',
|
|
116
|
+
expect: 'pass',
|
|
117
|
+
files: project({
|
|
118
|
+
...aggregate('export class Invoice {}\n'),
|
|
119
|
+
[START]: 'export const startApplication = (): number => 1;\n',
|
|
120
|
+
[ACCEPTANCE_SPEC]: [
|
|
121
|
+
"import { it } from 'vitest';",
|
|
122
|
+
"import { pending } from '@ddd-ts-kit/testing/e2e';",
|
|
123
|
+
"import { startApplication } from '$test/e2e/support/start-application.js';",
|
|
124
|
+
"import { anInvoice } from '@/contexts/billing/test/builders/invoice.builder.js';",
|
|
125
|
+
'',
|
|
126
|
+
"it('#US5.02 AC1 an invoice is issued', pending(async () => startApplication() + anInvoice));",
|
|
127
|
+
'',
|
|
128
|
+
].join('\n'),
|
|
129
|
+
}),
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
ruleId: 'test/acceptance-black-box',
|
|
133
|
+
name: 'an acceptance spec that imports an aggregate',
|
|
134
|
+
expect: { file: ACCEPTANCE_SPEC },
|
|
135
|
+
files: project({
|
|
136
|
+
...aggregate('export class Invoice {}\n'),
|
|
137
|
+
[ACCEPTANCE_SPEC]: [
|
|
138
|
+
"import { it } from 'vitest';",
|
|
139
|
+
"import { Invoice } from '@/contexts/billing/domain/aggregates/invoice.aggregate.js';",
|
|
140
|
+
'',
|
|
141
|
+
"it('#US5.02 AC1 an invoice is issued', () => new Invoice());",
|
|
142
|
+
'',
|
|
143
|
+
].join('\n'),
|
|
144
|
+
}),
|
|
145
|
+
},
|
|
111
146
|
{
|
|
112
147
|
ruleId: 'test/helper-placed',
|
|
113
148
|
name: 'specs, a declaration file, and a world, a builder and a fake in their places',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;AAC9F,MAAM,KAAK,GAAG,GAAG,OAAO,+BAA+B,CAAC;AACxD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AACzB,MAAM,gBAAgB,GAAG,GAAG,OAAO,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"test-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,E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A2B;QACnC,IAAI,EAAE,8CAA8C;QACpD,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;QACjC,KAAK,EAAE,OAAO,CAAC;YACb,GAAG,SAAS,CAAC,2BAA2B,CAAC;YACzC,CAAC,eAAe,CAAC,EAAE;gBACjB,8BAA8B;gBAC9B,sFAAsF;gBACtF,EAAE;gBACF,8DAA8D;gBAC9D,EAAE;aACH,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,IAAI,EAAE,8EAA8E;QACpF,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,OAAO,CAAC,EAAE,uCAAuC;YAClD,CAAC,YAAY,CAAC,EAAE,IAAI;YACpB,CAAC,GAAG,OAAO,mDAAmD,CAAC,EAAE,IAAI;YACrE,CAAC,GAAG,OAAO,yBAAyB,CAAC,EAAE,cAAc;YACrD,CAAC,KAAK,CAAC,EAAE,mCAAmC;YAC5C,CAAC,OAAO,CAAC,EAAE,+BAA+B;YAC1C,CAAC,GAAG,OAAO,qCAAqC,CAAC,EAAE,sCAAsC;SAC1F,CAAC;KACH;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,IAAI,EAAE,yDAAyD;QAC/D,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,mCAAmC,EAAE;QAC/D,KAAK,EAAE,OAAO,CAAC;YACb,CAAC,OAAO,CAAC,EAAE,uCAAuC;YAClD,CAAC,YAAY,CAAC,EAAE,IAAI;YACpB,CAAC,GAAG,OAAO,mCAAmC,CAAC,EAAE,oCAAoC;SACtF,CAAC;KACH;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** What `check --explain` prints once for each rule it reports. */
|
|
2
|
+
export interface RuleExplanation {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
/** The reason behind the rule; for a rule another tool decides, where it is checked and how it is settled. */
|
|
6
|
+
readonly why: string;
|
|
7
|
+
/** The tool that decides a delegated rule, as `ddd-ts-kit rules --json` names it. */
|
|
8
|
+
readonly checkedBy?: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=rule-explanation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-explanation.d.ts","sourceRoot":"","sources":["../../../src/check/model/rule-explanation.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,8GAA8G;IAC9G,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-explanation.js","sourceRoot":"","sources":["../../../src/check/model/rule-explanation.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
const SKIPPED_DIRECTORIES = new Set(['node_modules', 'dist', '.git']);
|
|
3
|
+
const SKIPPED_DIRECTORIES = new Set(['node_modules', 'dist', '.git', '.worktrees']);
|
|
4
4
|
/** Visits every entry below `directory`, sorted by name, directories before what they hold. */
|
|
5
5
|
export function walkDirectory(root, directory, visit) {
|
|
6
6
|
for (const entry of entriesOf(root, directory)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walk-directory.js","sourceRoot":"","sources":["../../../src/check/project/walk-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,MA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CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-valid.d.ts","sourceRoot":"","sources":["../../../src/check/rules/config-valid.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"config-valid.d.ts","sourceRoot":"","sources":["../../../src/check/rules/config-valid.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,IA0BzB,CAAC"}
|
|
@@ -12,6 +12,7 @@ export const configValid = {
|
|
|
12
12
|
...inspection.undeclaredDirectories(),
|
|
13
13
|
...inspection.ruleSettings(KNOWN_RULE_IDS),
|
|
14
14
|
...inspection.guardMode(),
|
|
15
|
+
...inspection.worktreeMode(),
|
|
15
16
|
...inspection.importExtension(),
|
|
16
17
|
...inspection.functionLinesLimit(),
|
|
17
18
|
...inspection.onePerFileAllowances(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-valid.js","sourceRoot":"","sources":["../../../src/check/rules/config-valid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,WAAW,EACT,qXAAqX;IACvX,KAAK,EAAE,SAAS;IAChB,GAAG,CAAC,OAAO;QACT,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7E,OAAO;YACL,GAAG,MAAM,CAAC,O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,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CACrE,UAAU,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAC1C;YACD,GAAG,UAAU,CAAC,qBAAqB,EAAE;YACrC,GAAG,UAAU,CAAC,YAAY,CAAC,cAAc,CAAC;YAC1C,GAAG,UAAU,CAAC,SAAS,EAAE;YACzB,GAAG,UAAU,CAAC,YAAY,EAAE;YAC5B,GAAG,UAAU,CAAC,eAAe,EAAE;YAC/B,GAAG,UAAU,CAAC,kBAAkB,EAAE;YAClC,GAAG,UAAU,CAAC,oBAAoB,EAAE;YACpC,GAAG,UAAU,CAAC,YAAY,EAAE;YAC5B,GAAG,UAAU,CAAC,kBAAkB,EAAE;YAClC,GAAG,UAAU,CAAC,QAAQ,EAAE;YACxB,GAAG,UAAU,CAAC,eAAe,EAAE;YAC/B,GAAG,UAAU,CAAC,WAAW,EAAE;SAC5B,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations-port-adapter-wired.d.ts","sourceRoot":"","sources":["../../../src/check/rules/declarations-port-adapter-wired.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA8B7C,eAAO,MAAM,4BAA4B,EAAE,IAoB1C,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { DECLARED_ROLES, declaredRoleOf } from '../../declared/index.js';
|
|
2
|
+
import { classesOf } from '../declarations/classes-of.js';
|
|
3
|
+
import { DECLARATIONS_ENTRY } from '../declarations/declarations-entry.js';
|
|
4
|
+
import { importedFrom } from '../support/imported-from.js';
|
|
5
|
+
import { inLayer } from '../support/in-layer.js';
|
|
6
|
+
import { isDeclaredStyle } from '../support/is-declared-style.js';
|
|
7
|
+
import { isPortFile } from '../support/is-port-file.js';
|
|
8
|
+
import { pathInContext } from '../support/path-in-context.js';
|
|
9
|
+
import { perFile } from '../support/per-file.js';
|
|
10
|
+
/** The decorators that declare a class of infrastructure/: `@Repository`, `@Gateway`, `@Adapter`. */
|
|
11
|
+
const ADAPTER_DECORATORS = [
|
|
12
|
+
...new Set(DECLARED_ROLES.filter((role) => role.folders.some((folder) => folder.startsWith('infrastructure'))).flatMap((role) => role.decorators)),
|
|
13
|
+
];
|
|
14
|
+
const RULE_ID = 'declarations/port-adapter-wired';
|
|
15
|
+
/** A marker the generator leaves in an adapter it writes before the outside system is ready, which `ddd-ts-kit todo` lists. */
|
|
16
|
+
const LEFT_TO_DO = /\bTODO\((?:domain|platform)\)/;
|
|
17
|
+
export const declarationsPortAdapterWired = {
|
|
18
|
+
id: RULE_ID,
|
|
19
|
+
description: 'A class of infrastructure/ that implements a port is wired: declared with @Repository, @Gateway or @Adapter in the declared style, or imported by the composition root (<context>.module.ts, main.ts, apps/, the platform directory). One kept unwired on purpose says so with a suppression that points to a decision record. A file that still carries a TODO(domain) or TODO(platform) of the generator is not judged yet.',
|
|
20
|
+
scope: 'project',
|
|
21
|
+
run(project) {
|
|
22
|
+
const composed = composedClasses(project);
|
|
23
|
+
return perFile(project, this.id, (file) => {
|
|
24
|
+
const place = inLayer(file, 'infrastructure');
|
|
25
|
+
if (place === undefined || isLeftToDo(file)) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
return implementations(file)
|
|
29
|
+
.filter(({ shape }) => !composed.has(`${file.path}#${shape.name}`) && !isDeclared(file, project, shape))
|
|
30
|
+
.map((implementation) => unwired(implementation, project, place.context));
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* An adapter the generator wrote is wired once the outside system is ready, a step its markers
|
|
36
|
+
* name: until they are done, the file is listed by `ddd-ts-kit todo`, not reported here.
|
|
37
|
+
*/
|
|
38
|
+
function isLeftToDo({ scan }) {
|
|
39
|
+
return scan.comments.some(({ text }) => LEFT_TO_DO.test(text));
|
|
40
|
+
}
|
|
41
|
+
/** `<file>#<class>` for each class a file of the composition root imports as a value. */
|
|
42
|
+
function composedClasses(project) {
|
|
43
|
+
const composing = project.files.filter((file) => isCompositionRoot(file, project));
|
|
44
|
+
return new Set(composing.flatMap(({ imports }) => imports.flatMap(({ target, names, typeNames }) => target.kind === 'file'
|
|
45
|
+
? names.filter((name) => !typeNames.includes(name)).map((name) => `${target.path}#${name}`)
|
|
46
|
+
: [])));
|
|
47
|
+
}
|
|
48
|
+
function isCompositionRoot({ isTest, location, path }, project) {
|
|
49
|
+
if (isTest) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (location.area === 'main' || location.area === 'platform') {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
return ((location.area === 'context' && location.layer === 'module') ||
|
|
56
|
+
new RegExp(`^${project.config.sourceRoot}/apps/[^/]+/main\\.ts$`).test(path));
|
|
57
|
+
}
|
|
58
|
+
/** The concrete classes of the module that implement a class imported from a port file, each with its first port. */
|
|
59
|
+
function implementations(file) {
|
|
60
|
+
return file.structure.classes.flatMap((shape) => {
|
|
61
|
+
const ports = shape.depth === 0 && !shape.isAbstract ? shape.implemented.flatMap((name) => portOf(file, name)) : [];
|
|
62
|
+
const [port] = ports;
|
|
63
|
+
return port === undefined ? [] : [{ shape, ...port }];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function portOf(file, name) {
|
|
67
|
+
const target = importedFrom(file, name)?.target;
|
|
68
|
+
if (target?.kind !== 'file' || !isPortFile(target.path, target.location)) {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
return [{ port: name, repository: target.location.area === 'context' && target.location.layer === 'domain' }];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* In the declared style a class is wired by its decorator. The exported class of a role file is
|
|
75
|
+
* judged by `declarations/role-declared`, which already reports it when it declares nothing.
|
|
76
|
+
*/
|
|
77
|
+
function isDeclared(file, project, shape) {
|
|
78
|
+
if (!isDeclaredStyle(project)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
const declared = classesOf(file.scan).find((candidate) => candidate.name === shape.name);
|
|
82
|
+
if (declared?.decorations.some(({ name }) => ADAPTER_DECORATORS.includes(name)) === true) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
return shape.isExported && declaredRoleOf(pathInContext(project, file) ?? '') !== undefined;
|
|
86
|
+
}
|
|
87
|
+
function unwired({ shape, port, repository }, project, context) {
|
|
88
|
+
const marker = `if it is kept unwired on purpose, write docs/adr/NNNN-<slug>.md and put \`// ddd-ts-kit-disable-next-line ${RULE_ID} -- ADR-NNNN: <why>\` above the class`;
|
|
89
|
+
if (isDeclaredStyle(project)) {
|
|
90
|
+
const decorator = repository ? `@Repository(${port})` : `@Gateway(${port}) or @Adapter(${port}, { kind })`;
|
|
91
|
+
const files = repository ? 'infrastructure/persistence/*.repository.ts' : '*.gateway.ts or *.adapter.ts';
|
|
92
|
+
return {
|
|
93
|
+
line: shape.line,
|
|
94
|
+
message: `${shape.name} implements the port ${port}, but carries no declaration and no file of the composition root imports it: nothing binds it, and the port is missing at run time.`,
|
|
95
|
+
fix: `Put ${decorator} from ${DECLARATIONS_ENTRY} above the class, in a role file (${files}), or bind it in the platform; ${marker}.`,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
line: shape.line,
|
|
100
|
+
message: `${shape.name} implements the port ${port}, but no file of the composition root imports it: nothing binds it, and the port is missing at run time.`,
|
|
101
|
+
fix: `Bind it in ${context}.module.ts, \`builder.bind(${port}).toClass(${shape.name}, [..])\`, or in src/main.ts; ${marker}.`,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=declarations-port-adapter-wired.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations-port-adapter-wired.js","sourceRoot":"","sources":["../../../src/check/rules/declarations-port-adapter-wired.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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B,EAAE,OAAe;IAC7F,MAAM,MAAM,GAAG,6GAA6G,OAAO,uCAAuC,CAAC;IAE3K,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,IAAI,GAAG,CAAC,CAAC,CAAC,YAAY,IAAI,iBAAiB,IAAI,aAAa,CAAC;QAC3G,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,4CAA4C,CAAC,CAAC,CAAC,8BAA8B,CAAC;QAEzG,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,wBAAwB,IAAI,qIAAqI;YACvL,GAAG,EAAE,OAAO,SAAS,SAAS,kBAAkB,qCAAqC,KAAK,kCAAkC,MAAM,GAAG;SACtI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,wBAAwB,IAAI,0GAA0G;QAC5J,GAAG,EAAE,cAAc,OAAO,8BAA8B,IAAI,aAAa,KAAK,CAAC,IAAI,iCAAiC,MAAM,GAAG;KAC9H,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence-primary-key-order.d.ts","sourceRoot":"","sources":["../../../src/check/rules/persistence-primary-key-order.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,eAAO,MAAM,0BAA0B,EAAE,IAkBxC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { migrationFiles } from '../../migration/migration-files.js';
|
|
3
|
+
import { previousPrimaryKeys } from '../../migration/previous-primary-keys.js';
|
|
4
|
+
import { primaryKeyOrderFindings } from '../../migration/primary-key-order-findings.js';
|
|
5
|
+
import { drizzleOutFolder } from '../migrations/drizzle-out-folder.js';
|
|
6
|
+
import { reporter } from '../support/reporter.js';
|
|
7
|
+
import { toViolations } from '../support/to-violations.js';
|
|
8
|
+
export const persistencePrimaryKeyOrder = {
|
|
9
|
+
id: 'persistence/primary-key-order',
|
|
10
|
+
description: 'Under drizzle-kit, no migration adds the new primary key of a table before its old one is dropped, nor drops a column before the primary key that holds it: PostgreSQL refuses the migration when it runs.',
|
|
11
|
+
scope: 'project',
|
|
12
|
+
run(project) {
|
|
13
|
+
if (project.config.stack.orm !== 'drizzle') {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const report = reporter(project, this.id);
|
|
17
|
+
const folder = drizzleOutFolder(project.root);
|
|
18
|
+
const files = migrationFiles(project.root, folder);
|
|
19
|
+
return [...files]
|
|
20
|
+
.filter(([file]) => file.endsWith('.sql') && path.posix.dirname(file) === folder)
|
|
21
|
+
.flatMap(([file, sql]) => toViolations(report, file, keyOrderFindings(files, file, sql)));
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
function keyOrderFindings(files, file, sql) {
|
|
25
|
+
return primaryKeyOrderFindings(sql, previousPrimaryKeys(files, file)).map(({ early, message, fix }) => ({
|
|
26
|
+
line: early.line,
|
|
27
|
+
message,
|
|
28
|
+
fix,
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=persistence-primary-key-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence-primary-key-order.js","sourceRoot":"","sources":["../../../src/check/rules/persistence-primary-key-order.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,C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tG,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO;QACP,GAAG;KACJ,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-acceptance-black-box.d.ts","sourceRoot":"","sources":["../../../src/check/rules/test-acceptance-black-box.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAQ7C,eAAO,MAAM,sBAAsB,EAAE,IAYpC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { besideTheSources } from '../project/beside-the-sources.js';
|
|
2
|
+
import { reporter } from '../support/reporter.js';
|
|
3
|
+
import { toViolations } from '../support/to-violations.js';
|
|
4
|
+
const ACCEPTANCE_SPEC = /^test\/acceptance\/[^/]+\.acceptance\.spec\.ts$/;
|
|
5
|
+
export const testAcceptanceBlackBox = {
|
|
6
|
+
id: 'test/acceptance-black-box',
|
|
7
|
+
description: 'An acceptance spec of `test/acceptance/` drives the application as a client does: it imports nothing from the source root but the builders of a context and its published language.',
|
|
8
|
+
scope: 'project',
|
|
9
|
+
run(project) {
|
|
10
|
+
const report = reporter(project, this.id);
|
|
11
|
+
return besideTheSources(project)
|
|
12
|
+
.filter((file) => ACCEPTANCE_SPEC.test(file.path))
|
|
13
|
+
.flatMap((file) => toViolations(report, file.path, findingsIn(project, file)));
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
function findingsIn({ config }, file) {
|
|
17
|
+
const sourceRoot = `${config.sourceRoot}/`;
|
|
18
|
+
return file.imports.flatMap(({ specifier, line, target }) => {
|
|
19
|
+
if (target.kind !== 'file' || !target.path.startsWith(sourceRoot) || isPublic(target.path, config.contextsDir)) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
line,
|
|
25
|
+
message: `The acceptance spec imports "${specifier}", a file of the application.`,
|
|
26
|
+
fix: 'Drive the application through its routes and assert what a client observes (the answer, the problem document, the integration events); arrange through the API too, with the builders of the context for the data. A scenario written before its code cannot import a class that does not exist yet, and one that does is no longer a client of the application.',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** What a client of a context may know of it: the test data of its builders and its published language. */
|
|
32
|
+
function isPublic(path, contextsDir) {
|
|
33
|
+
const [context, top, folder] = path.slice(contextsDir.length + 1).split('/');
|
|
34
|
+
return (path.startsWith(`${contextsDir}/`) &&
|
|
35
|
+
context !== undefined &&
|
|
36
|
+
(top === 'published-language' || (top === 'test' && folder === 'builders')));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=test-acceptance-black-box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-acceptance-black-box.js","sourceRoot":"","sources":["../../../src/check/rules/test-acceptance-black-box.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,eAAe,GAAG,iDAAiD,CAAC;AAE1E,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,EAAE,EAAE,2BAA2B;IAC/B,WAAW,EACT,qLAAqL;IACvL,KAAK,EAAE,SAAS;IAChB,GAAG,CAAC,OAAO;QACT,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAE1C,OAAO,gBAAgB,CAAC,OAAO,CAAC;aAC7B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjD,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;CACF,CAAC;AAEF,SAAS,UAAU,CAAC,EAAE,MAAM,EAAW,EAAE,IAAgB;IACvD,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,UAAU,GAAG,CAAC;IAE3C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1D,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/G,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO;YACL;gBACE,IAAI;gBACJ,OAAO,EAAE,gCAAgC,SAAS,+BAA+B;gBACjF,GAAG,EAAE,kWAAkW;aACxW;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,2GAA2G;AAC3G,SAAS,QAAQ,CAAC,IAAY,EAAE,WAAmB;IACjD,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE7E,OAAO,CACL,IAAI,CAAC,UAAU,CAAC,GAAG,WAAW,GAAG,CAAC;QAClC,OAAO,KAAK,SAAS;QACrB,CAAC,GAAG,KAAK,oBAAoB,IAAI,CAAC,GAAG,KAAK,MAAM,IAAI,MAAM,KAAK,UAAU,CAAC,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command } from './command.js';
|
|
2
|
+
/**
|
|
3
|
+
* The acceptance scenarios of each story against its rows in slices.md and the criteria of its
|
|
4
|
+
* specification: which rows and criteria a scenario covers, which scenarios are left to write or
|
|
5
|
+
* wait for their code, which changed since the lock, and what is inconsistent. `--gate written` is
|
|
6
|
+
* what a story needs before the code of its rows, `--gate passing` before it closes; `--lock`
|
|
7
|
+
* records the scenarios as agreed. Never runs a test; exits 1 while something keeps a story from
|
|
8
|
+
* the gate asked, or, without one, while a scenario is inconsistent or drifted from its lock.
|
|
9
|
+
*/
|
|
10
|
+
export declare const acceptanceCommand: Command;
|
|
11
|
+
//# sourceMappingURL=acceptance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance.d.ts","sourceRoot":"","sources":["../../src/commands/acceptance.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,OA+B/B,CAAC"}
|