ddd-ts-kit 0.111.0 → 0.113.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 +154 -0
- package/README.fr.md +52 -6
- package/README.md +48 -5
- package/dist/alias/index.d.ts +2 -0
- package/dist/alias/index.d.ts.map +1 -1
- package/dist/alias/index.js +2 -0
- package/dist/alias/index.js.map +1 -1
- package/dist/alias/neighbour-sources.d.ts +17 -0
- package/dist/alias/neighbour-sources.d.ts.map +1 -0
- package/dist/alias/neighbour-sources.js +11 -0
- package/dist/alias/neighbour-sources.js.map +1 -0
- package/dist/alias/neighbour-suffix.d.ts +8 -0
- package/dist/alias/neighbour-suffix.d.ts.map +1 -0
- package/dist/alias/neighbour-suffix.js +10 -0
- package/dist/alias/neighbour-suffix.js.map +1 -0
- package/dist/build/rewrite-aliases.d.ts.map +1 -1
- package/dist/build/rewrite-aliases.js +11 -0
- package/dist/build/rewrite-aliases.js.map +1 -1
- package/dist/check/alias/build-scripts.d.ts.map +1 -1
- package/dist/check/alias/build-scripts.js +4 -8
- package/dist/check/alias/build-scripts.js.map +1 -1
- package/dist/check/alias/compiler-options-of.d.ts +3 -3
- package/dist/check/alias/compiler-options-of.js +17 -6
- package/dist/check/alias/compiler-options-of.js.map +1 -1
- package/dist/check/alias/neighbour-sources.d.ts +12 -0
- package/dist/check/alias/neighbour-sources.d.ts.map +1 -0
- package/dist/check/alias/neighbour-sources.js +80 -0
- package/dist/check/alias/neighbour-sources.js.map +1 -0
- package/dist/check/alias/script-steps.d.ts +11 -0
- package/dist/check/alias/script-steps.d.ts.map +1 -0
- package/dist/check/alias/script-steps.js +22 -0
- package/dist/check/alias/script-steps.js.map +1 -0
- package/dist/check/aspects/adapter-policies.d.ts +10 -0
- package/dist/check/aspects/adapter-policies.d.ts.map +1 -0
- package/dist/check/aspects/adapter-policies.js +104 -0
- package/dist/check/aspects/adapter-policies.js.map +1 -0
- package/dist/check/aspects/adapter-policy.d.ts +18 -0
- package/dist/check/aspects/adapter-policy.d.ts.map +1 -0
- package/dist/check/aspects/adapter-policy.js +2 -0
- package/dist/check/aspects/adapter-policy.js.map +1 -0
- package/dist/check/aspects/is-under-condition.d.ts +7 -0
- package/dist/check/aspects/is-under-condition.d.ts.map +1 -0
- package/dist/check/aspects/is-under-condition.js +50 -0
- package/dist/check/aspects/is-under-condition.js.map +1 -0
- package/dist/check/aspects/stated-policy.d.ts +18 -0
- package/dist/check/aspects/stated-policy.d.ts.map +1 -0
- package/dist/check/aspects/stated-policy.js +39 -0
- package/dist/check/aspects/stated-policy.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/commands/check-command.js +4 -3
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/explain/imports-docs.d.ts.map +1 -1
- package/dist/check/explain/imports-docs.js +5 -3
- package/dist/check/explain/imports-docs.js.map +1 -1
- package/dist/check/explain/persistence-docs.d.ts.map +1 -1
- package/dist/check/explain/persistence-docs.js +38 -0
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/standard-docs.d.ts.map +1 -1
- package/dist/check/explain/standard-docs.js +16 -0
- package/dist/check/explain/standard-docs.js.map +1 -1
- package/dist/check/files/kit-content-types.d.ts +12 -0
- package/dist/check/files/kit-content-types.d.ts.map +1 -0
- package/dist/check/files/kit-content-types.js +38 -0
- package/dist/check/files/kit-content-types.js.map +1 -0
- package/dist/check/files/upload-content-defect.d.ts +7 -0
- package/dist/check/files/upload-content-defect.d.ts.map +1 -0
- package/dist/check/files/upload-content-defect.js +2 -0
- package/dist/check/files/upload-content-defect.js.map +1 -0
- package/dist/check/files/upload-content-defects.d.ts +9 -0
- package/dist/check/files/upload-content-defects.d.ts.map +1 -0
- package/dist/check/files/upload-content-defects.js +54 -0
- package/dist/check/files/upload-content-defects.js.map +1 -0
- package/dist/check/files/upload-declaration.d.ts +7 -0
- package/dist/check/files/upload-declaration.d.ts.map +1 -0
- package/dist/check/files/upload-declaration.js +2 -0
- package/dist/check/files/upload-declaration.js.map +1 -0
- package/dist/check/files/upload-declarations.d.ts +9 -0
- package/dist/check/files/upload-declarations.d.ts.map +1 -0
- package/dist/check/files/upload-declarations.js +41 -0
- package/dist/check/files/upload-declarations.js.map +1 -0
- package/dist/check/fixtures/alias-declared-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.js +95 -1
- package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +4 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/imports-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/imports-fixtures.js +97 -0
- package/dist/check/fixtures/imports-fixtures.js.map +1 -1
- package/dist/check/fixtures/read-model-list-files.d.ts +7 -0
- package/dist/check/fixtures/read-model-list-files.d.ts.map +1 -0
- package/dist/check/fixtures/read-model-list-files.js +18 -0
- package/dist/check/fixtures/read-model-list-files.js.map +1 -0
- package/dist/check/fixtures/read-model-listed-fixtures.d.ts +3 -0
- package/dist/check/fixtures/read-model-listed-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/read-model-listed-fixtures.js +292 -0
- package/dist/check/fixtures/read-model-listed-fixtures.js.map +1 -0
- package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/standard-fixtures.js +42 -0
- package/dist/check/fixtures/standard-fixtures.js.map +1 -1
- package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-fixtures.js +2 -1
- package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
- package/dist/check/fixtures/tenancy-prisma-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-prisma-fixtures.js +2 -0
- package/dist/check/fixtures/tenancy-prisma-fixtures.js.map +1 -1
- package/dist/check/fixtures/tenancy-typeorm-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-typeorm-fixtures.js +2 -0
- package/dist/check/fixtures/tenancy-typeorm-fixtures.js.map +1 -1
- package/dist/check/fixtures/upload-fixtures.d.ts +3 -0
- package/dist/check/fixtures/upload-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/upload-fixtures.js +94 -0
- package/dist/check/fixtures/upload-fixtures.js.map +1 -0
- package/dist/check/migrations/is-working-migration.d.ts +6 -0
- package/dist/check/migrations/is-working-migration.d.ts.map +1 -0
- package/dist/check/migrations/is-working-migration.js +8 -0
- package/dist/check/migrations/is-working-migration.js.map +1 -0
- package/dist/check/migrations/journal-entries.d.ts +4 -0
- package/dist/check/migrations/journal-entries.d.ts.map +1 -0
- package/dist/check/migrations/journal-entries.js +21 -0
- package/dist/check/migrations/journal-entries.js.map +1 -0
- package/dist/check/migrations/read-drizzle-migrations.d.ts.map +1 -1
- package/dist/check/migrations/read-drizzle-migrations.js +4 -9
- package/dist/check/migrations/read-drizzle-migrations.js.map +1 -1
- package/dist/check/model/finding.d.ts +2 -1
- package/dist/check/model/finding.d.ts.map +1 -1
- package/dist/check/model/violation.d.ts +4 -1
- package/dist/check/model/violation.d.ts.map +1 -1
- package/dist/check/modules/imported-modules.d.ts +4 -0
- package/dist/check/modules/imported-modules.d.ts.map +1 -0
- package/dist/check/modules/imported-modules.js +5 -0
- package/dist/check/modules/imported-modules.js.map +1 -0
- package/dist/check/modules/module-imports.d.ts +17 -0
- package/dist/check/modules/module-imports.d.ts.map +1 -0
- package/dist/check/modules/module-imports.js +23 -0
- package/dist/check/modules/module-imports.js.map +1 -0
- package/dist/check/project/assemble-project.d.ts.map +1 -1
- package/dist/check/project/assemble-project.js +1 -8
- package/dist/check/project/assemble-project.js.map +1 -1
- package/dist/check/project/file-severity.d.ts +4 -0
- package/dist/check/project/file-severity.d.ts.map +1 -0
- package/dist/check/project/file-severity.js +11 -0
- package/dist/check/project/file-severity.js.map +1 -0
- package/dist/check/project/load-project.js +1 -10
- package/dist/check/project/load-project.js.map +1 -1
- package/dist/check/project/not-in-the-tree.d.ts +10 -0
- package/dist/check/project/not-in-the-tree.d.ts.map +1 -0
- package/dist/check/project/not-in-the-tree.js +17 -0
- package/dist/check/project/not-in-the-tree.js.map +1 -0
- package/dist/check/project/skipped-directories.d.ts +3 -0
- package/dist/check/project/skipped-directories.d.ts.map +1 -0
- package/dist/check/project/skipped-directories.js +3 -0
- package/dist/check/project/skipped-directories.js.map +1 -0
- package/dist/check/project/walk-directory.d.ts.map +1 -1
- package/dist/check/project/walk-directory.js +1 -1
- package/dist/check/project/walk-directory.js.map +1 -1
- package/dist/check/read-models/list-findings.d.ts +22 -0
- package/dist/check/read-models/list-findings.d.ts.map +1 -0
- package/dist/check/read-models/list-findings.js +84 -0
- package/dist/check/read-models/list-findings.js.map +1 -0
- package/dist/check/rules/aspects-timeout-covers-delegate.d.ts +3 -0
- package/dist/check/rules/aspects-timeout-covers-delegate.d.ts.map +1 -0
- package/dist/check/rules/aspects-timeout-covers-delegate.js +179 -0
- package/dist/check/rules/aspects-timeout-covers-delegate.js.map +1 -0
- package/dist/check/rules/declarations-port-adapter-wired.js +9 -2
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
- package/dist/check/rules/files-upload-content-rule.d.ts +3 -0
- package/dist/check/rules/files-upload-content-rule.d.ts.map +1 -0
- package/dist/check/rules/files-upload-content-rule.js +25 -0
- package/dist/check/rules/files-upload-content-rule.js.map +1 -0
- package/dist/check/rules/imports-alias-declared.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-declared.js +3 -1
- package/dist/check/rules/imports-alias-declared.js.map +1 -1
- package/dist/check/rules/imports-alias-only.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-only.js +86 -7
- package/dist/check/rules/imports-alias-only.js.map +1 -1
- package/dist/check/rules/module-no-cycle.d.ts.map +1 -1
- package/dist/check/rules/module-no-cycle.js +12 -34
- package/dist/check/rules/module-no-cycle.js.map +1 -1
- package/dist/check/rules/persistence-read-model-listed.d.ts +3 -0
- package/dist/check/rules/persistence-read-model-listed.d.ts.map +1 -0
- package/dist/check/rules/persistence-read-model-listed.js +93 -0
- package/dist/check/rules/persistence-read-model-listed.js.map +1 -0
- package/dist/check/scan/lexer.d.ts +4 -0
- package/dist/check/scan/lexer.d.ts.map +1 -1
- package/dist/check/scan/lexer.js +11 -0
- package/dist/check/scan/lexer.js.map +1 -1
- package/dist/check/scan/scan.d.ts +6 -0
- package/dist/check/scan/scan.d.ts.map +1 -1
- package/dist/check/scan/scan.js +1 -0
- package/dist/check/scan/scan.js.map +1 -1
- package/dist/check/structure/read-structure.js +35 -13
- package/dist/check/structure/read-structure.js.map +1 -1
- package/dist/cli-error.d.ts +7 -2
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +8 -2
- package/dist/cli-error.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +4 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/json-report.js +4 -4
- package/dist/commands/json-report.js.map +1 -1
- package/dist/commands/knex-generate.d.ts.map +1 -1
- package/dist/commands/knex-generate.js +2 -1
- package/dist/commands/knex-generate.js.map +1 -1
- package/dist/commands/move-to-module.d.ts +6 -1
- package/dist/commands/move-to-module.d.ts.map +1 -1
- package/dist/commands/move-to-module.js +28 -3
- package/dist/commands/move-to-module.js.map +1 -1
- package/dist/commands/print-report.js +3 -0
- package/dist/commands/print-report.js.map +1 -1
- package/dist/commands/prisma-client.d.ts +8 -0
- package/dist/commands/prisma-client.d.ts.map +1 -0
- package/dist/commands/prisma-client.js +23 -0
- package/dist/commands/prisma-client.js.map +1 -0
- package/dist/commands/prisma-generate.d.ts.map +1 -1
- package/dist/commands/prisma-generate.js +2 -1
- package/dist/commands/prisma-generate.js.map +1 -1
- package/dist/commands/typeorm-generate.d.ts.map +1 -1
- package/dist/commands/typeorm-generate.js +2 -1
- package/dist/commands/typeorm-generate.js.map +1 -1
- package/dist/commands/verify-merge.d.ts +4 -2
- package/dist/commands/verify-merge.d.ts.map +1 -1
- package/dist/commands/verify-merge.js +8 -5
- package/dist/commands/verify-merge.js.map +1 -1
- package/dist/generate/generate-options.d.ts +3 -0
- package/dist/generate/generate-options.d.ts.map +1 -1
- package/dist/generate/generate-options.js +1 -0
- package/dist/generate/generate-options.js.map +1 -1
- package/dist/generate/kind.d.ts +2 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +6 -1
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/declare-table.d.ts +2 -0
- package/dist/generate/kinds/declare-table.d.ts.map +1 -1
- package/dist/generate/kinds/declare-table.js +65 -1
- package/dist/generate/kinds/declare-table.js.map +1 -1
- package/dist/generate/kinds/file-upload/upload-file-vars.d.ts +9 -0
- package/dist/generate/kinds/file-upload/upload-file-vars.d.ts.map +1 -0
- package/dist/generate/kinds/file-upload/upload-file-vars.js +39 -0
- package/dist/generate/kinds/file-upload/upload-file-vars.js.map +1 -0
- package/dist/generate/kinds/file-upload/write-nest-upload-controller.d.ts.map +1 -1
- package/dist/generate/kinds/file-upload/write-nest-upload-controller.js +2 -1
- package/dist/generate/kinds/file-upload/write-nest-upload-controller.js.map +1 -1
- package/dist/generate/kinds/file-upload/write-upload-controller.d.ts.map +1 -1
- package/dist/generate/kinds/file-upload/write-upload-controller.js +2 -1
- package/dist/generate/kinds/file-upload/write-upload-controller.js.map +1 -1
- package/dist/generate/kinds/file-upload-kind.d.ts.map +1 -1
- package/dist/generate/kinds/file-upload-kind.js +5 -3
- package/dist/generate/kinds/file-upload-kind.js.map +1 -1
- package/dist/generate/kinds/read-model/list-read-model.d.ts +12 -0
- package/dist/generate/kinds/read-model/list-read-model.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/list-read-model.js +24 -0
- package/dist/generate/kinds/read-model/list-read-model.js.map +1 -0
- package/dist/generate/kinds/read-model-kind.d.ts.map +1 -1
- package/dist/generate/kinds/read-model-kind.js +25 -1
- package/dist/generate/kinds/read-model-kind.js.map +1 -1
- package/dist/generate/kinds/same-name/code-from.d.ts +8 -0
- package/dist/generate/kinds/same-name/code-from.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/code-from.js +34 -0
- package/dist/generate/kinds/same-name/code-from.js.map +1 -0
- package/dist/generate/kinds/same-name/context-of-source.d.ts +5 -0
- package/dist/generate/kinds/same-name/context-of-source.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/context-of-source.js +10 -0
- package/dist/generate/kinds/same-name/context-of-source.js.map +1 -0
- package/dist/generate/kinds/same-name/entities-list.d.ts +6 -0
- package/dist/generate/kinds/same-name/entities-list.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/entities-list.js +25 -0
- package/dist/generate/kinds/same-name/entities-list.js.map +1 -0
- package/dist/generate/kinds/same-name/exports-an-alias.d.ts +12 -0
- package/dist/generate/kinds/same-name/exports-an-alias.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/exports-an-alias.js +150 -0
- package/dist/generate/kinds/same-name/exports-an-alias.js.map +1 -0
- package/dist/generate/kinds/same-name/free-name.d.ts +10 -0
- package/dist/generate/kinds/same-name/free-name.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/free-name.js +20 -0
- package/dist/generate/kinds/same-name/free-name.js.map +1 -0
- package/dist/generate/kinds/same-name/hidden-symbols.d.ts +8 -0
- package/dist/generate/kinds/same-name/hidden-symbols.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/hidden-symbols.js +18 -0
- package/dist/generate/kinds/same-name/hidden-symbols.js.map +1 -0
- package/dist/generate/kinds/same-name/imported-twice-notes.d.ts +10 -0
- package/dist/generate/kinds/same-name/imported-twice-notes.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/imported-twice-notes.js +24 -0
- package/dist/generate/kinds/same-name/imported-twice-notes.js.map +1 -0
- package/dist/generate/kinds/same-name/index-exports.d.ts +11 -0
- package/dist/generate/kinds/same-name/index-exports.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/index-exports.js +27 -0
- package/dist/generate/kinds/same-name/index-exports.js.map +1 -0
- package/dist/generate/kinds/same-name/index-picture.d.ts +29 -0
- package/dist/generate/kinds/same-name/index-picture.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/index-picture.js +63 -0
- package/dist/generate/kinds/same-name/index-picture.js.map +1 -0
- package/dist/generate/kinds/same-name/index-reading.d.ts +83 -0
- package/dist/generate/kinds/same-name/index-reading.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/index-reading.js +105 -0
- package/dist/generate/kinds/same-name/index-reading.js.map +1 -0
- package/dist/generate/kinds/same-name/keep-the-picture.d.ts +17 -0
- package/dist/generate/kinds/same-name/keep-the-picture.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/keep-the-picture.js +164 -0
- package/dist/generate/kinds/same-name/keep-the-picture.js.map +1 -0
- package/dist/generate/kinds/same-name/lines-to-settle.d.ts +37 -0
- package/dist/generate/kinds/same-name/lines-to-settle.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/lines-to-settle.js +100 -0
- package/dist/generate/kinds/same-name/lines-to-settle.js.map +1 -0
- package/dist/generate/kinds/same-name/linked.d.ts +14 -0
- package/dist/generate/kinds/same-name/linked.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/linked.js +14 -0
- package/dist/generate/kinds/same-name/linked.js.map +1 -0
- package/dist/generate/kinds/same-name/listed-entity.d.ts +25 -0
- package/dist/generate/kinds/same-name/listed-entity.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/listed-entity.js +25 -0
- package/dist/generate/kinds/same-name/listed-entity.js.map +1 -0
- package/dist/generate/kinds/same-name/may-share.d.ts +22 -0
- package/dist/generate/kinds/same-name/may-share.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/may-share.js +35 -0
- package/dist/generate/kinds/same-name/may-share.js.map +1 -0
- package/dist/generate/kinds/same-name/not-settled.d.ts +16 -0
- package/dist/generate/kinds/same-name/not-settled.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/not-settled.js +12 -0
- package/dist/generate/kinds/same-name/not-settled.js.map +1 -0
- package/dist/generate/kinds/same-name/places-of.d.ts +4 -0
- package/dist/generate/kinds/same-name/places-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/places-of.js +13 -0
- package/dist/generate/kinds/same-name/places-of.js.map +1 -0
- package/dist/generate/kinds/same-name/project-reader.d.ts +13 -0
- package/dist/generate/kinds/same-name/project-reader.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/project-reader.js +55 -0
- package/dist/generate/kinds/same-name/project-reader.js.map +1 -0
- package/dist/generate/kinds/same-name/read-module.d.ts +44 -0
- package/dist/generate/kinds/same-name/read-module.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/read-module.js +189 -0
- package/dist/generate/kinds/same-name/read-module.js.map +1 -0
- package/dist/generate/kinds/same-name/read-tables-file.d.ts +34 -0
- package/dist/generate/kinds/same-name/read-tables-file.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/read-tables-file.js +116 -0
- package/dist/generate/kinds/same-name/read-tables-file.js.map +1 -0
- package/dist/generate/kinds/same-name/region-of.d.ts +3 -0
- package/dist/generate/kinds/same-name/region-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/region-of.js +5 -0
- package/dist/generate/kinds/same-name/region-of.js.map +1 -0
- package/dist/generate/kinds/same-name/settle-same-names.d.ts +30 -0
- package/dist/generate/kinds/same-name/settle-same-names.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/settle-same-names.js +123 -0
- package/dist/generate/kinds/same-name/settle-same-names.js.map +1 -0
- package/dist/generate/kinds/same-name/signature-of.d.ts +4 -0
- package/dist/generate/kinds/same-name/signature-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/signature-of.js +5 -0
- package/dist/generate/kinds/same-name/signature-of.js.map +1 -0
- package/dist/generate/kinds/same-name/sources-of.d.ts +35 -0
- package/dist/generate/kinds/same-name/sources-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/sources-of.js +57 -0
- package/dist/generate/kinds/same-name/sources-of.js.map +1 -0
- package/dist/generate/kinds/same-name/symbol-of.d.ts +9 -0
- package/dist/generate/kinds/same-name/symbol-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/symbol-of.js +8 -0
- package/dist/generate/kinds/same-name/symbol-of.js.map +1 -0
- package/dist/generate/kinds/same-name/tables-constants.d.ts +5 -0
- package/dist/generate/kinds/same-name/tables-constants.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/tables-constants.js +8 -0
- package/dist/generate/kinds/same-name/tables-constants.js.map +1 -0
- package/dist/generate/kinds/same-name/tables-file-of.d.ts +5 -0
- package/dist/generate/kinds/same-name/tables-file-of.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/tables-file-of.js +6 -0
- package/dist/generate/kinds/same-name/tables-file-of.js.map +1 -0
- package/dist/generate/kinds/same-name/tables-files-held.d.ts +9 -0
- package/dist/generate/kinds/same-name/tables-files-held.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/tables-files-held.js +14 -0
- package/dist/generate/kinds/same-name/tables-files-held.js.map +1 -0
- package/dist/generate/kinds/same-name/unread-note.d.ts +22 -0
- package/dist/generate/kinds/same-name/unread-note.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/unread-note.js +76 -0
- package/dist/generate/kinds/same-name/unread-note.js.map +1 -0
- package/dist/generate/kinds/same-name/unseen-shares.d.ts +14 -0
- package/dist/generate/kinds/same-name/unseen-shares.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/unseen-shares.js +23 -0
- package/dist/generate/kinds/same-name/unseen-shares.js.map +1 -0
- package/dist/generate/kinds/same-name/workspace-index.d.ts +6 -0
- package/dist/generate/kinds/same-name/workspace-index.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/workspace-index.js +13 -0
- package/dist/generate/kinds/same-name/workspace-index.js.map +1 -0
- package/dist/generate/kinds/same-name/workspace-sources.d.ts +9 -0
- package/dist/generate/kinds/same-name/workspace-sources.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/workspace-sources.js +10 -0
- package/dist/generate/kinds/same-name/workspace-sources.js.map +1 -0
- package/dist/generate/kinds/same-name/yield-to-the-trunk.d.ts +14 -0
- package/dist/generate/kinds/same-name/yield-to-the-trunk.d.ts.map +1 -0
- package/dist/generate/kinds/same-name/yield-to-the-trunk.js +59 -0
- package/dist/generate/kinds/same-name/yield-to-the-trunk.js.map +1 -0
- package/dist/generate/kinds/service-kind.d.ts.map +1 -1
- package/dist/generate/kinds/service-kind.js +8 -0
- package/dist/generate/kinds/service-kind.js.map +1 -1
- package/dist/generate/kinds/wire-context.d.ts.map +1 -1
- package/dist/generate/kinds/wire-context.js +4 -0
- package/dist/generate/kinds/wire-context.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +3 -2
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/generator-lock/held-lock-refusal.d.ts.map +1 -1
- package/dist/generator-lock/held-lock-refusal.js +1 -7
- package/dist/generator-lock/held-lock-refusal.js.map +1 -1
- package/dist/generator-lock/holder-text.d.ts +4 -0
- package/dist/generator-lock/holder-text.d.ts.map +1 -0
- package/dist/generator-lock/holder-text.js +10 -0
- package/dist/generator-lock/holder-text.js.map +1 -0
- package/dist/generator-lock/index.d.ts +4 -0
- package/dist/generator-lock/index.d.ts.map +1 -1
- package/dist/generator-lock/index.js +2 -0
- package/dist/generator-lock/index.js.map +1 -1
- package/dist/generator-lock/with-folder-lock.d.ts +27 -0
- package/dist/generator-lock/with-folder-lock.d.ts.map +1 -0
- package/dist/generator-lock/with-folder-lock.js +65 -0
- package/dist/generator-lock/with-folder-lock.js.map +1 -0
- package/dist/generator-lock/with-generator-lock.d.ts +1 -5
- package/dist/generator-lock/with-generator-lock.d.ts.map +1 -1
- package/dist/generator-lock/with-generator-lock.js +11 -58
- package/dist/generator-lock/with-generator-lock.js.map +1 -1
- package/dist/help/tool-notes.d.ts.map +1 -1
- package/dist/help/tool-notes.js +17 -1
- package/dist/help/tool-notes.js.map +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +2 -1
- package/dist/help/usage.js.map +1 -1
- package/dist/help/work-notes.d.ts.map +1 -1
- package/dist/help/work-notes.js +15 -5
- package/dist/help/work-notes.js.map +1 -1
- package/dist/init/end-of-the-index.d.ts +9 -0
- package/dist/init/end-of-the-index.d.ts.map +1 -0
- package/dist/init/end-of-the-index.js +13 -0
- package/dist/init/end-of-the-index.js.map +1 -0
- package/dist/init/files/end-to-end-files.d.ts.map +1 -1
- package/dist/init/files/end-to-end-files.js +3 -0
- package/dist/init/files/end-to-end-files.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +8 -2
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/files/script-files.d.ts +2 -1
- package/dist/init/files/script-files.d.ts.map +1 -1
- package/dist/init/files/script-files.js +6 -1
- package/dist/init/files/script-files.js.map +1 -1
- package/dist/init/is-team-file.d.ts +2 -2
- package/dist/init/is-team-file.d.ts.map +1 -1
- package/dist/init/is-team-file.js +5 -4
- package/dist/init/is-team-file.js.map +1 -1
- package/dist/init/laid-out.d.ts +3 -0
- package/dist/init/laid-out.d.ts.map +1 -0
- package/dist/init/laid-out.js +7 -0
- package/dist/init/laid-out.js.map +1 -0
- package/dist/init/list-read-models.d.ts +20 -0
- package/dist/init/list-read-models.d.ts.map +1 -0
- package/dist/init/list-read-models.js +74 -0
- package/dist/init/list-read-models.js.map +1 -0
- package/dist/init/manifest/database-scripts.d.ts.map +1 -1
- package/dist/init/manifest/database-scripts.js +8 -0
- package/dist/init/manifest/database-scripts.js.map +1 -1
- package/dist/init/manifest/prisma-client-script.js +1 -1
- package/dist/init/manifest/prisma-client-script.js.map +1 -1
- package/dist/init/manifest/versions.js +33 -33
- package/dist/init/rewire-contexts.d.ts +4 -2
- package/dist/init/rewire-contexts.d.ts.map +1 -1
- package/dist/init/rewire-contexts.js +12 -2
- package/dist/init/rewire-contexts.js.map +1 -1
- package/dist/init/rewire-tables.d.ts.map +1 -1
- package/dist/init/rewire-tables.js +18 -10
- package/dist/init/rewire-tables.js.map +1 -1
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +4 -8
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/settle-index-names.d.ts +11 -0
- package/dist/init/settle-index-names.d.ts.map +1 -0
- package/dist/init/settle-index-names.js +89 -0
- package/dist/init/settle-index-names.js.map +1 -0
- package/dist/init/wiring-notes.js +1 -1
- package/dist/init/wiring-notes.js.map +1 -1
- package/dist/init/write-type-script-configs.d.ts +3 -1
- package/dist/init/write-type-script-configs.d.ts.map +1 -1
- package/dist/init/write-type-script-configs.js +14 -2
- package/dist/init/write-type-script-configs.js.map +1 -1
- package/dist/merge/accept-in-merge-message.d.ts.map +1 -1
- package/dist/merge/accept-in-merge-message.js +2 -7
- package/dist/merge/accept-in-merge-message.js.map +1 -1
- package/dist/merge/as-settled.d.ts +7 -0
- package/dist/merge/as-settled.d.ts.map +1 -0
- package/dist/merge/as-settled.js +9 -0
- package/dist/merge/as-settled.js.map +1 -0
- package/dist/merge/config-of-the-merge.d.ts +12 -0
- package/dist/merge/config-of-the-merge.d.ts.map +1 -0
- package/dist/merge/config-of-the-merge.js +35 -0
- package/dist/merge/config-of-the-merge.js.map +1 -0
- package/dist/merge/continue-merge.d.ts.map +1 -1
- package/dist/merge/continue-merge.js +32 -1
- package/dist/merge/continue-merge.js.map +1 -1
- package/dist/merge/format-merge-report.js +5 -2
- package/dist/merge/format-merge-report.js.map +1 -1
- package/dist/merge/land-drizzle.d.ts +4 -0
- package/dist/merge/land-drizzle.d.ts.map +1 -1
- package/dist/merge/land-drizzle.js +6 -1
- package/dist/merge/land-drizzle.js.map +1 -1
- package/dist/merge/land-up-to-date.d.ts +15 -0
- package/dist/merge/land-up-to-date.d.ts.map +1 -0
- package/dist/merge/land-up-to-date.js +76 -0
- package/dist/merge/land-up-to-date.js.map +1 -0
- package/dist/merge/lines-at-moved-places.d.ts +10 -0
- package/dist/merge/lines-at-moved-places.d.ts.map +1 -0
- package/dist/merge/lines-at-moved-places.js +38 -0
- package/dist/merge/lines-at-moved-places.js.map +1 -0
- package/dist/merge/lost/format-merge-verification.d.ts +2 -1
- package/dist/merge/lost/format-merge-verification.d.ts.map +1 -1
- package/dist/merge/lost/format-merge-verification.js +13 -2
- package/dist/merge/lost/format-merge-verification.js.map +1 -1
- package/dist/merge/lost/in-progress-merge.d.ts.map +1 -1
- package/dist/merge/lost/in-progress-merge.js +6 -2
- package/dist/merge/lost/in-progress-merge.js.map +1 -1
- package/dist/merge/lost/line-findings.d.ts +3 -2
- package/dist/merge/lost/line-findings.d.ts.map +1 -1
- package/dist/merge/lost/line-findings.js +5 -4
- package/dist/merge/lost/line-findings.js.map +1 -1
- package/dist/merge/lost/line-key.d.ts +7 -0
- package/dist/merge/lost/line-key.d.ts.map +1 -0
- package/dist/merge/lost/line-key.js +11 -0
- package/dist/merge/lost/line-key.js.map +1 -0
- package/dist/merge/lost/lost-lines.d.ts +1 -1
- package/dist/merge/lost/lost-lines.d.ts.map +1 -1
- package/dist/merge/lost/lost-lines.js +3 -2
- package/dist/merge/lost/lost-lines.js.map +1 -1
- package/dist/merge/lost/merge-of-record.d.ts.map +1 -1
- package/dist/merge/lost/merge-of-record.js +1 -0
- package/dist/merge/lost/merge-of-record.js.map +1 -1
- package/dist/merge/lost/merge-records.d.ts +2 -0
- package/dist/merge/lost/merge-records.d.ts.map +1 -1
- package/dist/merge/lost/merge-records.js +3 -2
- package/dist/merge/lost/merge-records.js.map +1 -1
- package/dist/merge/lost/merge-to-verify.d.ts +2 -0
- package/dist/merge/lost/merge-to-verify.d.ts.map +1 -1
- package/dist/merge/lost/merge-verification.d.ts +4 -0
- package/dist/merge/lost/merge-verification.d.ts.map +1 -1
- package/dist/merge/lost/rewritten-in-place.d.ts +5 -2
- package/dist/merge/lost/rewritten-in-place.d.ts.map +1 -1
- package/dist/merge/lost/rewritten-in-place.js +6 -5
- package/dist/merge/lost/rewritten-in-place.js.map +1 -1
- package/dist/merge/lost/verify-merge.d.ts.map +1 -1
- package/dist/merge/lost/verify-merge.js +10 -3
- package/dist/merge/lost/verify-merge.js.map +1 -1
- package/dist/merge/lost/verify-merges.d.ts +2 -1
- package/dist/merge/lost/verify-merges.d.ts.map +1 -1
- package/dist/merge/lost/verify-merges.js +10 -4
- package/dist/merge/lost/verify-merges.js.map +1 -1
- package/dist/merge/merge-state.d.ts +2 -0
- package/dist/merge/merge-state.d.ts.map +1 -1
- package/dist/merge/merge-state.js +3 -2
- package/dist/merge/merge-state.js.map +1 -1
- package/dist/merge/merge-trunk.d.ts +2 -1
- package/dist/merge/merge-trunk.d.ts.map +1 -1
- package/dist/merge/merge-trunk.js +8 -3
- package/dist/merge/merge-trunk.js.map +1 -1
- package/dist/merge/merged-tree-workspace.d.ts +19 -0
- package/dist/merge/merged-tree-workspace.d.ts.map +1 -0
- package/dist/merge/merged-tree-workspace.js +41 -0
- package/dist/merge/merged-tree-workspace.js.map +1 -0
- package/dist/merge/moved-tables-files.d.ts +9 -0
- package/dist/merge/moved-tables-files.d.ts.map +1 -0
- package/dist/merge/moved-tables-files.js +16 -0
- package/dist/merge/moved-tables-files.js.map +1 -0
- package/dist/merge/next-steps.d.ts +3 -0
- package/dist/merge/next-steps.d.ts.map +1 -1
- package/dist/merge/next-steps.js +3 -0
- package/dist/merge/next-steps.js.map +1 -1
- package/dist/merge/order/applied-under-old-name.d.ts +13 -0
- package/dist/merge/order/applied-under-old-name.d.ts.map +1 -0
- package/dist/merge/order/applied-under-old-name.js +14 -0
- package/dist/merge/order/applied-under-old-name.js.map +1 -0
- package/dist/merge/order/comes-after.d.ts +8 -0
- package/dist/merge/order/comes-after.d.ts.map +1 -0
- package/dist/merge/order/comes-after.js +9 -0
- package/dist/merge/order/comes-after.js.map +1 -0
- package/dist/merge/order/drizzle-order.d.ts +11 -0
- package/dist/merge/order/drizzle-order.d.ts.map +1 -0
- package/dist/merge/order/drizzle-order.js +64 -0
- package/dist/merge/order/drizzle-order.js.map +1 -0
- package/dist/merge/order/in-order.d.ts +4 -0
- package/dist/merge/order/in-order.d.ts.map +1 -0
- package/dist/merge/order/in-order.js +6 -0
- package/dist/merge/order/in-order.js.map +1 -0
- package/dist/merge/order/migration-order-finding.d.ts +18 -0
- package/dist/merge/order/migration-order-finding.d.ts.map +1 -0
- package/dist/merge/order/migration-order-finding.js +2 -0
- package/dist/merge/order/migration-order-finding.js.map +1 -0
- package/dist/merge/order/migration-order.d.ts +12 -0
- package/dist/merge/order/migration-order.d.ts.map +1 -0
- package/dist/merge/order/migration-order.js +21 -0
- package/dist/merge/order/migration-order.js.map +1 -0
- package/dist/merge/order/migrations-of-commit.d.ts +7 -0
- package/dist/merge/order/migrations-of-commit.d.ts.map +1 -0
- package/dist/merge/order/migrations-of-commit.js +43 -0
- package/dist/merge/order/migrations-of-commit.js.map +1 -0
- package/dist/merge/order/migrations-of-tree.d.ts +9 -0
- package/dist/merge/order/migrations-of-tree.d.ts.map +1 -0
- package/dist/merge/order/migrations-of-tree.js +25 -0
- package/dist/merge/order/migrations-of-tree.js.map +1 -0
- package/dist/merge/order/named-order.d.ts +11 -0
- package/dist/merge/order/named-order.d.ts.map +1 -0
- package/dist/merge/order/named-order.js +36 -0
- package/dist/merge/order/named-order.js.map +1 -0
- package/dist/merge/order/ordered-migration.d.ts +12 -0
- package/dist/merge/order/ordered-migration.d.ts.map +1 -0
- package/dist/merge/order/ordered-migration.js +2 -0
- package/dist/merge/order/ordered-migration.js.map +1 -0
- package/dist/merge/order/trunk-to-follow.d.ts +9 -0
- package/dist/merge/order/trunk-to-follow.d.ts.map +1 -0
- package/dist/merge/order/trunk-to-follow.js +2 -0
- package/dist/merge/order/trunk-to-follow.js.map +1 -0
- package/dist/merge/preview-table-names.d.ts +21 -0
- package/dist/merge/preview-table-names.d.ts.map +1 -0
- package/dist/merge/preview-table-names.js +85 -0
- package/dist/merge/preview-table-names.js.map +1 -0
- package/dist/merge/renumber-migrations.d.ts +14 -5
- package/dist/merge/renumber-migrations.d.ts.map +1 -1
- package/dist/merge/renumber-migrations.js +141 -60
- package/dist/merge/renumber-migrations.js.map +1 -1
- package/dist/merge/restamp-class.d.ts +9 -0
- package/dist/merge/restamp-class.d.ts.map +1 -0
- package/dist/merge/restamp-class.js +30 -0
- package/dist/merge/restamp-class.js.map +1 -0
- package/dist/merge/settle-table-names.d.ts +21 -0
- package/dist/merge/settle-table-names.d.ts.map +1 -0
- package/dist/merge/settle-table-names.js +60 -0
- package/dist/merge/settle-table-names.js.map +1 -0
- package/dist/merge/side-index.d.ts +13 -0
- package/dist/merge/side-index.d.ts.map +1 -0
- package/dist/merge/side-index.js +43 -0
- package/dist/merge/side-index.js.map +1 -0
- package/dist/merge/side-reader.d.ts +8 -0
- package/dist/merge/side-reader.d.ts.map +1 -0
- package/dist/merge/side-reader.js +13 -0
- package/dist/merge/side-reader.js.map +1 -0
- package/dist/merge/side-tables-file.d.ts +5 -0
- package/dist/merge/side-tables-file.d.ts.map +1 -0
- package/dist/merge/side-tables-file.js +10 -0
- package/dist/merge/side-tables-file.js.map +1 -0
- package/dist/merge/table-names-settled.d.ts +18 -0
- package/dist/merge/table-names-settled.d.ts.map +1 -0
- package/dist/merge/table-names-settled.js +168 -0
- package/dist/merge/table-names-settled.js.map +1 -0
- package/dist/merge/trailer-in-merge-message.d.ts +9 -0
- package/dist/merge/trailer-in-merge-message.d.ts.map +1 -0
- package/dist/merge/trailer-in-merge-message.js +16 -0
- package/dist/merge/trailer-in-merge-message.js.map +1 -0
- package/dist/merge/tree-files.d.ts +21 -0
- package/dist/merge/tree-files.d.ts.map +1 -0
- package/dist/merge/tree-files.js +86 -0
- package/dist/merge/tree-files.js.map +1 -0
- package/dist/merge/trunk-reader.d.ts +5 -0
- package/dist/merge/trunk-reader.d.ts.map +1 -0
- package/dist/merge/trunk-reader.js +9 -0
- package/dist/merge/trunk-reader.js.map +1 -0
- package/dist/merge/two-tables-files.d.ts +19 -0
- package/dist/merge/two-tables-files.d.ts.map +1 -0
- package/dist/merge/two-tables-files.js +67 -0
- package/dist/merge/two-tables-files.js.map +1 -0
- package/dist/migration/file-of-source.d.ts +3 -0
- package/dist/migration/file-of-source.d.ts.map +1 -0
- package/dist/migration/file-of-source.js +5 -0
- package/dist/migration/file-of-source.js.map +1 -0
- package/dist/migration/hidden-in-index.d.ts +15 -0
- package/dist/migration/hidden-in-index.d.ts.map +1 -0
- package/dist/migration/hidden-in-index.js +23 -0
- package/dist/migration/hidden-in-index.js.map +1 -0
- package/dist/migration/index.d.ts +3 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +3 -0
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/is-source-of-context.d.ts +17 -0
- package/dist/migration/is-source-of-context.d.ts.map +1 -0
- package/dist/migration/is-source-of-context.js +13 -0
- package/dist/migration/is-source-of-context.js.map +1 -0
- package/dist/migration/listed-in-index.d.ts +15 -3
- package/dist/migration/listed-in-index.d.ts.map +1 -1
- package/dist/migration/listed-in-index.js +25 -4
- package/dist/migration/listed-in-index.js.map +1 -1
- package/dist/migration/named-bindings-of.d.ts +14 -0
- package/dist/migration/named-bindings-of.d.ts.map +1 -0
- package/dist/migration/named-bindings-of.js +21 -0
- package/dist/migration/named-bindings-of.js.map +1 -0
- package/dist/migration/plan-replay.d.ts.map +1 -1
- package/dist/migration/plan-replay.js +2 -1
- package/dist/migration/plan-replay.js.map +1 -1
- package/dist/migration/refuse-taken-migration-name.d.ts +8 -0
- package/dist/migration/refuse-taken-migration-name.d.ts.map +1 -0
- package/dist/migration/refuse-taken-migration-name.js +22 -0
- package/dist/migration/refuse-taken-migration-name.js.map +1 -0
- package/dist/migration/replay-drizzle-migrations.d.ts +5 -0
- package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -1
- package/dist/migration/replay-drizzle-migrations.js +10 -2
- package/dist/migration/replay-drizzle-migrations.js.map +1 -1
- package/dist/migration/replay-plan.d.ts +2 -2
- package/dist/migration/replay-plan.d.ts.map +1 -1
- package/dist/migration/restore-migration-folder.d.ts +6 -2
- package/dist/migration/restore-migration-folder.d.ts.map +1 -1
- package/dist/migration/restore-migration-folder.js +14 -7
- package/dist/migration/restore-migration-folder.js.map +1 -1
- package/dist/migration/snapshot-migration-folder.d.ts +7 -0
- package/dist/migration/snapshot-migration-folder.d.ts.map +1 -0
- package/dist/migration/snapshot-migration-folder.js +12 -0
- package/dist/migration/snapshot-migration-folder.js.map +1 -0
- package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -1
- package/dist/migration/warn-dropped-context-tables.js +21 -6
- package/dist/migration/warn-dropped-context-tables.js.map +1 -1
- package/dist/move-to-module/before-the-move.d.ts +5 -0
- package/dist/move-to-module/before-the-move.d.ts.map +1 -0
- package/dist/move-to-module/before-the-move.js +13 -0
- package/dist/move-to-module/before-the-move.js.map +1 -0
- package/dist/move-to-module/closed-cycles.d.ts +21 -0
- package/dist/move-to-module/closed-cycles.d.ts.map +1 -0
- package/dist/move-to-module/closed-cycles.js +66 -0
- package/dist/move-to-module/closed-cycles.js.map +1 -0
- package/dist/move-to-module/cycle-lines.d.ts +7 -0
- package/dist/move-to-module/cycle-lines.d.ts.map +1 -0
- package/dist/move-to-module/cycle-lines.js +22 -0
- package/dist/move-to-module/cycle-lines.js.map +1 -0
- package/dist/move-to-module/cycle-refusal.d.ts +17 -0
- package/dist/move-to-module/cycle-refusal.d.ts.map +1 -0
- package/dist/move-to-module/cycle-refusal.js +25 -0
- package/dist/move-to-module/cycle-refusal.js.map +1 -0
- package/dist/move-to-module/index.d.ts +5 -0
- package/dist/move-to-module/index.d.ts.map +1 -1
- package/dist/move-to-module/index.js +4 -0
- package/dist/move-to-module/index.js.map +1 -1
- package/dist/move-to-module/module-imports-in.d.ts +11 -0
- package/dist/move-to-module/module-imports-in.d.ts.map +1 -0
- package/dist/move-to-module/module-imports-in.js +32 -0
- package/dist/move-to-module/module-imports-in.js.map +1 -0
- package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
- package/dist/move-to-module/moves-into-module.js +6 -18
- package/dist/move-to-module/moves-into-module.js.map +1 -1
- package/dist/move-to-module/place-in-module.d.ts +13 -0
- package/dist/move-to-module/place-in-module.d.ts.map +1 -0
- package/dist/move-to-module/place-in-module.js +24 -0
- package/dist/move-to-module/place-in-module.js.map +1 -0
- package/dist/move-to-module/watch-cycles.d.ts +19 -0
- package/dist/move-to-module/watch-cycles.d.ts.map +1 -0
- package/dist/move-to-module/watch-cycles.js +51 -0
- package/dist/move-to-module/watch-cycles.js.map +1 -0
- package/dist/prisma-client/client-outputs.d.ts +3 -0
- package/dist/prisma-client/client-outputs.d.ts.map +1 -0
- package/dist/prisma-client/client-outputs.js +9 -0
- package/dist/prisma-client/client-outputs.js.map +1 -0
- package/dist/prisma-client/index.d.ts +4 -0
- package/dist/prisma-client/index.d.ts.map +1 -0
- package/dist/prisma-client/index.js +4 -0
- package/dist/prisma-client/index.js.map +1 -0
- package/dist/prisma-client/prisma-client-fingerprint.d.ts +7 -0
- package/dist/prisma-client/prisma-client-fingerprint.d.ts.map +1 -0
- package/dist/prisma-client/prisma-client-fingerprint.js +32 -0
- package/dist/prisma-client/prisma-client-fingerprint.js.map +1 -0
- package/dist/prisma-client/prisma-client-in-turn.d.ts +14 -0
- package/dist/prisma-client/prisma-client-in-turn.d.ts.map +1 -0
- package/dist/prisma-client/prisma-client-in-turn.js +15 -0
- package/dist/prisma-client/prisma-client-in-turn.js.map +1 -0
- package/dist/prisma-client/prisma-client-lock-refusal.d.ts +5 -0
- package/dist/prisma-client/prisma-client-lock-refusal.d.ts.map +1 -0
- package/dist/prisma-client/prisma-client-lock-refusal.js +11 -0
- package/dist/prisma-client/prisma-client-lock-refusal.js.map +1 -0
- package/dist/prisma-client/prisma-client-paths.d.ts +7 -0
- package/dist/prisma-client/prisma-client-paths.d.ts.map +1 -0
- package/dist/prisma-client/prisma-client-paths.js +8 -0
- package/dist/prisma-client/prisma-client-paths.js.map +1 -0
- package/dist/prisma-client/refresh-prisma-client.d.ts +16 -0
- package/dist/prisma-client/refresh-prisma-client.d.ts.map +1 -0
- package/dist/prisma-client/refresh-prisma-client.js +53 -0
- package/dist/prisma-client/refresh-prisma-client.js.map +1 -0
- package/dist/prisma-client/schema-files.d.ts +3 -0
- package/dist/prisma-client/schema-files.d.ts.map +1 -0
- package/dist/prisma-client/schema-files.js +18 -0
- package/dist/prisma-client/schema-files.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-steps.js +1 -1
- package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -1
- package/dist/read-models/buildable-constructor.d.ts +3 -0
- package/dist/read-models/buildable-constructor.d.ts.map +1 -0
- package/dist/read-models/buildable-constructor.js +3 -0
- package/dist/read-models/buildable-constructor.js.map +1 -0
- package/dist/read-models/declared-class.d.ts +14 -0
- package/dist/read-models/declared-class.d.ts.map +1 -0
- package/dist/read-models/declared-class.js +2 -0
- package/dist/read-models/declared-class.js.map +1 -0
- package/dist/read-models/declared-classes.d.ts +32 -0
- package/dist/read-models/declared-classes.d.ts.map +1 -0
- package/dist/read-models/declared-classes.js +123 -0
- package/dist/read-models/declared-classes.js.map +1 -0
- package/dist/read-models/list-answers.d.ts +35 -0
- package/dist/read-models/list-answers.d.ts.map +1 -0
- package/dist/read-models/list-answers.js +53 -0
- package/dist/read-models/list-answers.js.map +1 -0
- package/dist/read-models/listing-of.d.ts +25 -0
- package/dist/read-models/listing-of.d.ts.map +1 -0
- package/dist/read-models/listing-of.js +22 -0
- package/dist/read-models/listing-of.js.map +1 -0
- package/dist/read-models/read-model-list-of.d.ts +12 -0
- package/dist/read-models/read-model-list-of.d.ts.map +1 -0
- package/dist/read-models/read-model-list-of.js +94 -0
- package/dist/read-models/read-model-list-of.js.map +1 -0
- package/dist/read-models/read-model-list.d.ts +41 -0
- package/dist/read-models/read-model-list.d.ts.map +1 -0
- package/dist/read-models/read-model-list.js +2 -0
- package/dist/read-models/read-model-list.js.map +1 -0
- package/dist/read-models/read-model-store.d.ts +16 -0
- package/dist/read-models/read-model-store.d.ts.map +1 -0
- package/dist/read-models/read-model-store.js +2 -0
- package/dist/read-models/read-model-store.js.map +1 -0
- package/dist/read-models/read-model-stores-of.d.ts +14 -0
- package/dist/read-models/read-model-stores-of.d.ts.map +1 -0
- package/dist/read-models/read-model-stores-of.js +63 -0
- package/dist/read-models/read-model-stores-of.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +3 -1
- package/dist/run.js.map +1 -1
- package/dist/slice/format-slice-verification.d.ts.map +1 -1
- package/dist/slice/format-slice-verification.js +11 -5
- package/dist/slice/format-slice-verification.js.map +1 -1
- package/dist/slice/storage-of-slice.d.ts +10 -7
- package/dist/slice/storage-of-slice.d.ts.map +1 -1
- package/dist/slice/storage-of-slice.js +145 -22
- package/dist/slice/storage-of-slice.js.map +1 -1
- package/dist/stack/alias-vars.d.ts +3 -1
- package/dist/stack/alias-vars.d.ts.map +1 -1
- package/dist/stack/alias-vars.js +5 -2
- package/dist/stack/alias-vars.js.map +1 -1
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +10 -1
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspace/exit-code-of.d.ts +2 -2
- package/dist/workspace/exit-code-of.d.ts.map +1 -1
- package/dist/workspace/exit-code-of.js +2 -2
- package/dist/workspace/exit-code-of.js.map +1 -1
- package/dist/workspace/located-step.d.ts +5 -0
- package/dist/workspace/located-step.d.ts.map +1 -0
- package/dist/workspace/located-step.js +7 -0
- package/dist/workspace/located-step.js.map +1 -0
- package/dist/workspace/remove-file.d.ts +3 -0
- package/dist/workspace/remove-file.d.ts.map +1 -0
- package/dist/workspace/remove-file.js +11 -0
- package/dist/workspace/remove-file.js.map +1 -0
- package/dist/workspace/workspace-report.d.ts +2 -0
- package/dist/workspace/workspace-report.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +4 -3
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +16 -16
- package/dist/workspace/workspace.js.map +1 -1
- package/package.json +6 -6
- package/templates/file-upload/controller.spec.ts.tpl +66 -2
- package/templates/file-upload/controller.ts.tpl +12 -0
- package/templates/file-upload/handler.spec.ts.tpl +3 -3
- package/templates/init/README.md.tpl +20 -1
- package/templates/init/docker/dockerignore.tpl +2 -0
- package/templates/init/e2e/jest.e2e.config.js.tpl +5 -0
- package/templates/init/e2e/test-database-setup.ts.tpl +120 -0
- package/templates/init/e2e/vitest.e2e.config.ts.tpl +2 -1
- package/templates/init/platform/composition/compose-application.container.ts.tpl +5 -0
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +20 -3
- package/templates/init/platform/composition/create-platform.manual.ts.tpl +6 -0
- package/templates/init/platform/composition/platform-options.manual.ts.tpl +11 -0
- package/templates/init/platform/composition/platform.manual.ts.tpl +7 -0
- package/templates/init/platform/composition/platform.module.container.ts.tpl +34 -0
- package/templates/init/platform/database/connect-to-database.drizzle.ts.tpl +7 -2
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +8 -3
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +8 -3
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +8 -3
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +8 -3
- package/templates/init/platform/database/read-model-tables.ts.tpl +70 -0
- package/templates/init/platform/database/test-database-budget.ts.tpl +108 -0
- package/templates/init/platform/database/test-database-clone.ts.tpl +52 -161
- package/templates/init/platform/database/test-database-copy.ts.tpl +76 -0
- package/templates/init/platform/database/test-database-emptying.ts.tpl +209 -0
- package/templates/init/platform/database/test-database-kept.ts.tpl +32 -0
- package/templates/init/platform/database/test-database-leftovers.ts.tpl +52 -0
- package/templates/init/platform/database/test-database-run.ts.tpl +99 -0
- package/templates/init/platform/database/test-database-server.ts.tpl +140 -0
- package/templates/init/platform/database/test-database-session.ts.tpl +141 -0
- package/templates/init/platform/database/test-database-teardown.ts.tpl +11 -1
- package/templates/init/platform/resilience/default-policy.ts.tpl +8 -1
- package/templates/init/rules/infrastructure.md.tpl +5 -2
- package/templates/init/scripts/read-model-tables.ts.tpl +83 -0
- package/templates/nest-controller/upload.spec.ts.tpl +67 -2
- package/templates/nest-controller/upload.ts.tpl +12 -0
- package/templates/pipeline/biome.json.tpl +1 -1
- package/templates/pipeline/github/workflows/codeql.yml +2 -2
- package/templates/pipeline/package-scripts.json +2 -2
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +5 -9
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +5 -9
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +5 -9
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +5 -9
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +5 -9
- package/templates/repository/drizzle/repository.ts.tpl +6 -9
- package/templates/repository/typeorm/schema-export.tpl +2 -2
- package/templates/read-model/typeorm/schema-export.tpl +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,160 @@ 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.113.0
|
|
8
|
+
|
|
9
|
+
**`ddd-ts-kit check` reports a read model store that the list of the read model tables does not answer for (`persistence/read-model-listed`).** The application checks the tables of its read models when it starts, and `npm run db:read-models` before a deployment, by the stores `src/platform/database/read-model-tables.ts` lists and no other: a store written by hand and never listed was checked by nothing, in silence. The new rule, an error, reads the stores of the tree and reports each one the list neither holds under its context (itself, a class that extends it, or the name a file gives it when it re-exports it, `export { A as B } from` or `export * from`, one level), nor names in `NOT_LISTED`, nor leaves out by a comment between the markers of the file that holds `<context>: <Store>`. Its fix gives the import and the entry to add, the entry alone when the list still imports the class, and for a store the list cannot build, what stands in the way. A store is a class of a context, tests aside, that is not abstract and extends `DrizzleReadModelStore`, `KnexReadModelStore`, `PrismaReadModelStore` or `TypeOrmReadModelStore`, directly or through classes of the project, wherever they are declared. It also reports an entry of the list whose class the file neither imports nor declares, whose import leads to no file, or whose class another context declares; a line of `NOT_LISTED` whose class is gone or whose store `LISTED` answers for; a `LISTED` whose entries it cannot read (spread, or built by a call); and, once, a project on one of the four ORM that holds stores and no list. It does not judge: an abstract class; a store in memory or in a search engine, and a class directly over `TableReadModelStore` of the kernel; a store of the tests; a class declared in a function or in a `namespace` block, and a class expression that has no name of its own (one that has is read under that name); a base that is not the name of the store of the kit or of a class of the project: a namespace (`kit.KnexReadModelStore`), an import alias, a call (`mixin(KnexReadModelStore)`); of two classes of one name in one context, which one an entry names; whether a class that extends a store reads the same table; the reason a comment gives; what a package exports (`ddd-ts-kit explain persistence/read-model-listed`, [docs/concepts/cqrs.md](docs/concepts/cqrs.md#every-table-checked-at-the-start-and-before-a-deployment)).
|
|
10
|
+
|
|
11
|
+
A comment that leaves a store out counts only between the markers `init` writes in the file, those of `LISTED` being its place: `init --force` keeps what those markers hold and nothing else, a pair of markers added by hand included, and a comment written elsewhere was lost at the next one, the store then listed. `ddd-ts-kit check <files>` now reports a finding when a file it is repaired in is among those given, not only the file it sits on: an entry removed from the list is reported by the pre-commit hook with the list alone staged. The other rules whose finding names such a file report it the same way: `authz/declared` and `authz/policy-asked` when the module file or a policy of the handler is given, `events/consumer-idempotent` when a module file of the context is, `declarations/port-adapter-wired` when a file that wires the context is. That last rule named every file of the platform and `main.ts`; it now names the module files of the context of the adapter and the files of the composition root that import a file of that context, so a check of an unrelated file of the platform stays quiet. The checker reads what a class extends past a type parameter whose constraint or default holds an object type (`class Totals<Row extends { id: string }> extends Store<Row>`), which it read as extending nothing: every rule that reads a base class now sees that one.
|
|
12
|
+
|
|
13
|
+
`init` finds the stores by the same reading as the rule, on the sources as the checker reads them and no longer by a regular expression over class declarations. It now reads every source of a context, not its `infrastructure/persistence/` alone, follows a base class declared anywhere under the source root, skips the tests, and no longer takes a class written directly over `TableReadModelStore` for a store kept in a table. It lists a store whose constructor takes `Persistence['database']` or carries `private readonly`, which it named in `NOT_LISTED`; a store its file exports as its default, or does not export, is named there instead of getting an import that does not compile; a list that still imports a class gets its entry back without a second import. Its note says why a store cannot be built, and to write the class that builds it beside the store, in a file of its own, where `init` lists it and `init --force` keeps it: the note of 0.112.0 said to write it in the list file, where `init --force` deletes it.
|
|
14
|
+
|
|
15
|
+
To move: run `npx ddd-ts-kit check --rule persistence/read-model-listed`. For each store it reports, add to `src/platform/database/read-model-tables.ts` the import and the entry its fix gives (`npx ddd-ts-kit init` writes them), or leave the store out with a comment that holds `<context>: <Store>` and the reason, between the markers of `LISTED`; move there a comment of that kind written elsewhere in the file. For a store the list cannot build, the fix names what stands in the way and gives no entry: write beside the store, in a file of its own, `export class Listed<Store> extends <Store>` with a constructor `(database: <Type>)` or `(database: <Type>, scope: ExecutionScope)` that calls `super(..)`, run `npx ddd-ts-kit init`, which lists that class, then remove the line `'<context>: <Store>'` from `NOT_LISTED`. A project on 0.112.0 that declared such a class in the list file itself, as the note of 0.112.0 said: move the class beside its store and import it before any `init --force`, which rewrites the file outside its markers and would delete it. A project generated before 0.112.0, which has no list: commit, then run `npx ddd-ts-kit init --force`.
|
|
16
|
+
|
|
17
|
+
**A generated project is formatted by Biome 2.6.6, scans its code with `github/codeql-action` 4.39.3 and runs on the OpenTelemetry JS SDK 0.301 (3.1 for its stable packages).** `init` pins `@biomejs/biome` 2.6.6, the version the kit and the example run, and the `$schema` of the `biome.json` it writes names it. The workflow of `--ci-extras codeql` pins `github/codeql-action/init` and `github/codeql-action/analyze` to the commit of 4.39.3. `init` writes `@opentelemetry/sdk-node`, `@opentelemetry/exporter-trace-otlp-http` and `@opentelemetry/exporter-metrics-otlp-http` at `^0.301.0`, `@opentelemetry/auto-instrumentations-node` at `^0.83.0`, and `@opentelemetry/sdk-metrics`, `@opentelemetry/resources`, `@opentelemetry/sdk-trace` and `@opentelemetry/context-async-hooks` at `^3.1.0`, the versions `@ddd-ts-kit/tracing` is tested with: a range of `^0.300.0` never reaches 0.301. The peer ranges of `@ddd-ts-kit/tracing` do not change, so a project that stays on 0.300 keeps working.
|
|
18
|
+
|
|
19
|
+
To move: nothing is required, a project that stays on these versions keeps working; to follow, `npm i -D -E @biomejs/biome@2.6.6` and set the `$schema` of `biome.json` to `https://biomejs.dev/schemas/2.6.6/schema.json`, then `npm run format`. A project with `.github/workflows/codeql.yml` replaces `9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1` by `33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3` on both lines. For OpenTelemetry: `npm i @opentelemetry/sdk-node@^0.301.0 @opentelemetry/exporter-trace-otlp-http@^0.301.0 @opentelemetry/exporter-metrics-otlp-http@^0.301.0 @opentelemetry/auto-instrumentations-node@^0.83.0 @opentelemetry/sdk-metrics@^3.1.0 @opentelemetry/resources@^3.1.0`, and `npm i -D @opentelemetry/sdk-trace@^3.1.0 @opentelemetry/context-async-hooks@^3.1.0` when the project has them.
|
|
20
|
+
|
|
21
|
+
**On Prisma, two test runs started together in one project no longer break each other's client (`ddd-ts-kit prisma-client`).** `npm run db:client`, which `pretest`, `pretest:e2e`, `pretypecheck` and `prebuild` run, was `prisma generate && prisma migrate diff ... -o generated/schema.sql`: two runs at once (two `npm run test:e2e`, a type check beside the tests) both removed and wrote `generated/prisma`, and one failed on `EEXIST` or `ENOENT`, or read a client the other was rewriting. `init` now writes `"db:client": "ddd-ts-kit prisma-client --schema prisma/schema"`. The command runs the same two steps, one run of the project at a time (the lock `.ddd-ts-kit/prisma-client`, waited for up to ten minutes, taken over once the run that holds it has ended), and writes nothing when the client and `generated/schema.sql` are current: generated from the same files of the schema, the same `prisma.config.ts` and the same `prisma` and `@prisma/client`, and still there. What they were generated from is kept in `generated/prisma-client.sha256`; removing `generated/` generates them again. The limits: the version of a generator of another package (a `generator` block other than the client of Prisma) is not part of what is compared, so upgrading it alone generates nothing: delete `generated/prisma-client.sha256` then; and of what the generators write, only the existence of their `output` folders is checked, not their content. `init` adds `.ddd-ts-kit` to the `.dockerignore` it writes: a lock that an interrupted run left in the folder would make `prebuild` in the image wait ten minutes for it.
|
|
22
|
+
|
|
23
|
+
To move: in `package.json`, set the `db:client` script to `ddd-ts-kit prisma-client --schema prisma/schema` (`--schema prisma/schema.prisma` for a project that still keeps its schema in one file), and add a line `.ddd-ts-kit` to `.dockerignore`.
|
|
24
|
+
|
|
25
|
+
**Two contexts may hold a table of the same name on Drizzle and on TypeORM.** `ddd-ts-kit generate read-model billing InvoiceSummaries` then `generate read-model shipping InvoiceSummaries`, or two aggregates of one name stored in two contexts, or the identity preset beside a context that holds `accounts`, wrote a schema index (`src/platform/database/schema.ts`) that named the same constant twice: the project did not compile, and on Drizzle the migration `db:generate` wrote, like the test database, left out the tables of the second context without a word. The two tables never met in the database, each being in the schema of its context, and they still do not; Knex and Prisma were not concerned. The index now settles the name: the context that held it first keeps it, and the second is listed under a name that carries its context, `export { invoiceSummaries as shippingInvoiceSummaries } from` on Drizzle beside `export { invoiceSummaries } from` for the first; on TypeORM `generate` imports the second table it creates as `import { invoiceSummaries as shippingInvoiceSummaries }`, and after a merge that leaves one name imported twice a person writes that alias. The tables file of a context, its stores and its repositories keep the name of the table. The same holds for a table that bears the name of one the index declares itself, `jobs`, `outbox`, `processes`: on Drizzle the aggregate `Job` of a context compiled, and its table was never created, the constant of the index hiding it; it is now listed as `billingJobs`. The name the second table takes is one nothing holds: where `shippingOrders` is the table `shipping_orders` of a context, or `shippingSchema` the schema constant of the context, it is `shippingContextOrders`, then `shippingOrders2`.
|
|
26
|
+
|
|
27
|
+
What is settled, on Drizzle. A name two tables files of contexts export, each its own table, or one the index declares itself: each command that writes the index (`generate`, `init --force`, `merge-trunk`) writes the lines by name the whole index lacks, not only those of the context it works for, in the `// ddd-ts-kit:schemas` region, one name a line. What is compared is a symbol, the file that declares it and its name, each file by the path it is read at, a context laid out in modules (its tables file in `shared/`) as a flat one: two tables files that re-export one table of the shared kernel hold one symbol, whether one names the file through the alias of the project and the other by a relative path, which `export *` brings as before, and nothing is written nor said. Where the index gives a shared name to nothing yet, the context it re-exports first keeps it; a generator leaves it to the other context only for the name its command brings, and `merge-trunk` gives it to the table the trunk exports under it when the kit settles it, whatever the order of the index and whatever the layout of a context on either side: each side is read as its commit lays its contexts out, flat or in modules, so a table that moved to `shared/` on one side is the same table on the other, and the merge says nothing of it unless a line still names the old place. A name that has a value in a tables file, a table beside the type of its rows (`export const invoices` and `export type invoices`), an enum and the type of its values, a class and an interface, is exported from it with a plain `export { ... }` line, which carries the type too; `export type { ... }` is written only for a name that is a type and no value in that file. `default` is never settled. After the lines are written the kit reads the index again: every value of every file it re-exports whole must be exported as a value under a name, or the lines are taken back. The sentence `lists the name ... as ...` is printed for each line that was written.
|
|
28
|
+
|
|
29
|
+
What is only said. `generate` and `init --force` compare what the index gave before the command with what it gives after: on Drizzle the names it exports as values and the table each one exports (a name it exports as a type only is not compared), on TypeORM the entities `entities` lists, as far as the kit reads them. A value a file exports by name, which the index exported before under that name or another (`export *`, `export { a } from`, `export { a as b } from`) and would export under it no more, an entity listed no more, or a name that exported one table and would export another, everything the index re-exports read with certainty, leaves the index as it stood before the command: the comparison is made once, when every generator of the command has run, on the state the command ends in. The index is listed under `left` and in `skipped` of the report, never in `updated`, and the command exits 3. One note names every name concerned, with the file that gives it, and says what would have been lost or moved: `` the name `archived`, which 'src/legacy/tables.ts' gives the index, would be exported by no line after it (a table still exported under another name is not seen: the kit compares names) ``, the file being the one the line of the index names, or the package, `` `orders`, which named the `orders` of '<a>', would name the `orders` of '<b>' ``; `generate` gives the lines it wrote, to write by hand, when it wrote some, and ends with what leaving them out costs when the `export *` line of a context is among them (its tables are listed nowhere, no migration will create them); `init --force` gives none: the line that keeps the name, or what keeps several, belongs in the `// ddd-ts-kit:schemas` region, which the rewrite keeps, and until it is moved there every `init --force` leaves the index as it stood. A table `generate --force` drops from a tables file it writes again whole is said in a note, on Drizzle and on TypeORM (where the index, which still imports it, does not compile), and the command exits as it would without it: the index is not left for that. A tables file that is a symbolic link gets no such note: the kit does not read it. A name that did not compile before, two `export *` bringing it, exported nothing: settling it is no such change. `generate` refuses, before it writes anything, a table whose name the tables file of the context already exports from another file. `ddd-ts-kit init --force` writes the index again from its template, which drops what a team wrote outside the `// ddd-ts-kit:` regions; it leaves the index as it stood on disk, with one note, when that would lose a name the index exports, or give it to another table, everything the index re-exports read with certainty, and when the part outside the regions holds something it does not read with certainty (on Drizzle an `export` it does not answer for or a module re-exported whole it does not follow; on TypeORM an entry of `entities` the rewritten list lacks, unless it is a constant the index builds by calling a function imported from a package of the kit: that one is taken for a line of a template and goes with the rewrite, as before) and the rewrite would drop a line written there. Apart from that rewrite, no command removes a line of the Drizzle index: the line of a table that is gone is a compile error to fix by hand. On TypeORM no command removes or renames an import of the index: `generate` only adds the import of the table it creates, under a name of its own when its name is taken.
|
|
30
|
+
|
|
31
|
+
On Drizzle, `ddd-ts-kit merge-trunk` settles the names the two sides share between tables files of contexts, in lines of the shape the kit writes, and says so under `automatic:`, in a dry run too, which reads the files the merge reads, each file the merge writes as it writes it, a file left to a person as the text it is handed; a configuration both sides changed, conflicted in the tree the dry run reads, is read as a resolution keeping the contexts of both sides would read it, the branch's with the contexts of both sides; a dry run that cannot say what the merge would settle, the configuration still unread or the files of the tree not read, says so only when the two sides give one name to two tables, and exits as it would without it. The dry run writes nothing, not even a temporary copy of the tree. On Drizzle, a line or an import of the merged index that names the place a side held a context's tables file at, which the merged tree no longer holds because the other side moved the file (`context-layout` laying the context out in modules), is not written again: the index is left as the merge wrote it, a compile error as before, and the report says each such line, in the dry run too: `` `export { orders } from '...'` names '<old place>', which the merged tree no longer holds: billing's tables file is now '<new place>'; write that path in the line``. While such a line is there, the kit writes no name nor any other line of that merge, and says it once. A file counts as moved only when the merged tree holds no file at its old place. When it holds both, one side having laid the context out in modules while the other stored a table flat, the context has two tables files, and on Drizzle what follows applies; a file counts as a tables file only when it declares a value of its own, so a flat file that only re-exports the one of `shared/`, or an empty one, is none. When the two files declare no name in common, the merge goes on as any merge. When they declare one (the schema of the context first), the kit writes no name, nor any other line of that merge, and says it once: it names the two files and the names both declare, and says what must hold once a person made them one file, the one of `shared/`: every table of the flat file there, on the schema it declares; for a table name both declare, the one of the two files the trunk's index exports it from, under that name or another, keeps it (the sentence names that file and the name the trunk gives it) and the other takes a new name in every file that imports it; a schema constant both declare is kept once, the tables of the flat file built on the one of `shared/`; the flat file and the `export *` line that names it gone, every other import and line of the index pointed at `shared/`; then a commit and `npx ddd-ts-kit init --force`. The report still names each table hidden and each name moved, as in any merge. When the merge stops on a conflict, the sentences about the names come at `--continue`, once; the dry run gives them in advance. A name the trunk exports keeps naming the table of the trunk when the line that gave it to another table on the branch is one the kit wrote, one name a line; any other shape (a line by hand with several names, a module that is no tables file of a context) is not repaired. Whatever it wrote, the report then says, the dry run as the merge: each table a side had within reach, still in the merged tree, that the merged index exports under no name, with its file and the name that hides it; and each name of the trunk or of the branch that names another table after the merge, when the table it named is still re-exported whole (`export *`) by the merged index. When the kit does not read a side or the merged index with certainty, cannot write the index, or would give a name of the trunk to another table, it writes nothing and says why, with the lines to write by hand only when it cannot write the index: a file it does not read gets what must hold and no line, a name of the trunk no line either. An error while it settles the names is said in the report and never leaves the merge in progress. On TypeORM the merge writes no name of the index: it cannot tell by the code whether two imports of one name are two entities or one. The index is left as the merge wrote it, as before, and each name the region of the imports gives more than once is said once, in the dry run as in the merge: `<index>: imports \`orders\` 2 times (from <file>, <file>); the kit writes no name on TypeORM after a merge: if they are distinct entities, import each but one under its own name and list that name in \`entities\`; if they are one entity, take out the extra import.` `init --force` says it the same way, and writes no name either. Nothing is said when no name is imported twice. On Drizzle, each text the settle of a merge writes in the index that the index did not hold before is recorded in a `Kit-Written:` trailer of the merge commit, and the lost-lines check never counts it as a line of the merge's own, so a line a careless resolution lost elsewhere in the index still stops the merge, as on main; every line the settle takes out is recorded in `Lost-Accepted:` by its file, its side and its text (`<file>@<side>#<hash>`), so it never accepts a loss of the other side at the same place. A `Lost-Accepted:` entry written as `file` or `file:line`, by a person or an earlier version, is read as before.
|
|
32
|
+
|
|
33
|
+
What the kit reads, on Drizzle. A module the index re-exports whole is the tables file of a context when it resolves to that file, whatever its name looks like; any other file of the project is read for what it is and keeps the names it exports, and a table of a context that bears one of them is listed under the name of its context. In a file it reads a declaration of one name (`export const orders = ...`, a function, a class, an enum, a type), a list (`export { orders }` of a name the file declares at its top level or imports by name), a name taken by name from any module (`export { held as orders } from './tables'`: from a file of the project it reads, what that file exports under it; from a package or a module it does not find, that name, a value unless written as a type), and the files of the project a file re-exports whole. What a file declares or takes by name wins over what a module it re-exports whole brings under the same name, as in the language. When something is not read with certainty and the index lacks a line for a name shared among what was read, the kit writes nothing and a note says what must hold, with no line to copy, `the kit wrote no name in it: ...`; an index without its region gets every line, the `export *` line of the context first. A command prints at most one such note, or the note of an index left as it stood. Nothing is printed when no name is shared among what was read, except when a name a tables file exports is written, as a word of the code, comments and strings left out, in a file of the project that is not read with certainty or in an `export` of the index that is not read: the note gives the line that names it apart.
|
|
34
|
+
|
|
35
|
+
`ddd-ts-kit init --force` settles a Drizzle index that holds both under one name and says what it settled; on TypeORM it writes no name, and says each name the index imports twice, as the merge does. `drizzle-generate` warns that a migration drops two tables an unsettled index lists under one name, `typeorm-generate` no longer takes the entity of one context for the entity of the same name of another when it warns of dropped tables, an entity imported under an alias through a file of its context or a barrel of it is read as listed, and `verify-slice` stages an index whose only changes are the statements that name the tables file of its context, the entries of what they import, and the line that lets the tables file of another context keep a name it holds and the slice came to share, an import written on several lines included; a line of the platform that only mentions a table of the context leaves the index out.
|
|
36
|
+
|
|
37
|
+
Limits. The kit resolves a module specifier by the aliases of `ddd-ts-kit.config.json` and relative paths, to a `.ts` file or the `index.ts` of a folder; it does not read `paths` of `tsconfig.json` beyond those aliases, `baseUrl`, nor the `package.json` of a folder, and where the compiler could read something else (a file and a folder of one name, a `.tsx`, a `.d.ts`, a `.js`, an `.mts` or a `.cts` beside or in place of the `.ts`, a folder that holds a `package.json`) the specifier resolves to nothing. On Drizzle a file is not read with certainty when it holds one of these, and while one stands the kit writes no name: two names declared in one statement, a pattern (`export const { orders } = tables`), a value exported (by `export const`, or a constant an export list names) that the file does not build itself, a re-export in disguise the kit cannot equate with what it names: it is the file's own only when it is a literal, an object, an array or a function written in place, or a call or a `new` whose arguments are not one binding alone (unless that binding is a constant of the file given a literal, as `pgSchema(MESSAGING_SCHEMA)`), or a binding or a member of one that the file declares, builds itself and does not export (the event store of the template, `eventStore.head`); any other value is not read: `export const kept = archived`, `const kept = tables.archived; export { kept }`, an alias of a table the file exports itself, a cast (`archived as typeof archived`), parentheses, a `!`, a condition, `same(archived)`, a name exported as a string (`export { kept as 'archived' }`), a `declare` of a value, a default export, a module exported as a name, a name with a character outside letters, digits, `_` and `$`, a regular expression literal or a template that does not close (a division is sometimes read as a regular expression), a `namespace` or `declare module` block, two modules re-exported whole that bring different things under one name, a package re-exported whole, or a module re-exported whole that resolves to nothing. What such a module re-exported whole holds is not looked into: a name it shares with another file through `export *` does not compile, as before, and one a line by name of the index already gives to something else stays hidden without a word. A tables file that is a symbolic link, or that a folder of its path that is a link leads to, is not read: the kit writes no name while one stands and gives it no note of a dropped table either; the note of the file not read says what must hold. That note comes when a name of another tables file is written, as a word, in the text the link points at within the project, as that text stands before the command: a name the same command writes through the link is said at the next command. A link that points outside the project, at another link or at nothing, or through a folder that is a link, is not looked into, as its reader tells it, and the note says it may export every name shared; a target written absolute is inside the project only when its path, as written, lies under the real path of the project, as git tells it. When a file the index re-exports is not read with certainty, the kit gives no line to write: it says which names may be shared and who keeps them. The note names what it does not read and why, the names it may export and the files that hold them, and what must hold: each table of that name needs a line by name in the index, the one that held the name before keeps it (in a merge, the one of the trunk, by its file when the trunk reads it, else as the index of the trunk exports it), each other one takes a name of its own; it is the same note in `generate`, `init --force` and `merge-trunk`, dry or real, and a `--continue` says it again only if it still holds. While a file the index re-exports, or the index itself, is not read with certainty, before the command or after it, the comparison of what the index gave before and after a command never leaves the index: the command exits as before, `0`, and writes what it wrote before. What the index exports after the command is said with that doubt while the index still names something not read after it, and plainly when it names none of it any more. It still says a table of a tables file the command writes again (the note of a table `generate --force` dropped). Each name it would have called lost gets one hedged sentence, `` the name `archived`, which 'src/legacy/tables.ts' gives the index, is exported by no line the kit can read after the command; it may still be exported through 'src/legacy/extra.ts' if it exports it`` (`one of them` for several), naming only what the index still names after the command; when it names none of it any more the loss is said plainly, still in a note, `` the name `archived`, which 'src/legacy/tables.ts' gave the index, is exported by no line after the command ('src/legacy/tables.ts', which the kit does not read with certainty, is no more named by the index)``; and each name moved another, `` `orders`, which named the `orders` of 'src/legacy/tables.ts', may name another table after the command (the kit does not read 'src/legacy/extra.ts')``, or plainly, `` `invoices`, which named the `invoices` of '<a>' by the lines the kit read, names the `invoices` of '<b>' after the command ('<gone>', which the kit does not read with certainty, is no more named by the index)``; a name two files read export different tables under, which the settle does not write while the file not read stands, is said by the note of the settle. A name lost or a name moved leaves the index as it stood, exit `3`, only when everything the index re-exports is read with certainty. Beside the names that file may export, the note says the names shared among what was read in a clause of their own (`orders` is shared by '<a>' and '<b>'; the kit writes no name while '<file>' stands), the keeper of each name on the trunk in a merge, and a name the index declares itself, which hides any table of that name. The kit compares the names the index exports as values, not the tables behind them, and no name it exports as a type only (`export type { ArchivedRow } from`), which `init --force` drops without a word when it stands outside the regions, as before, nor a default export the index re-exports (`export { default as archived } from '@/legacy/tables'`, `export { default } from`), dropped the same way, exit `0`: a table that stays exported under another name, through an alias the kit takes for a table of its own, still counts as a name lost, and the command says so and leaves the index. A table already hidden by a line a team wrote by hand, in favour of a file that is no tables file of a context, is not reported. On TypeORM the kit does not decide by the code whether two imports of one name bind one object, which no reading of the syntax settles (a re-export, an alias, a `new` that returns another object): a merge or `init --force` that leaves a name imported twice gets that name said, and the alias is written by hand, as before. On TypeORM the list of the entities is read as the names between the brackets of `entities`, comments left out: an entry is an entity when a name imported in the index bears it, and a spread or a constant built elsewhere is not followed. `init --force` keeps the lines outside the regions only by leaving the whole index as it stood, in the cases above; any other line written there goes with the rewrite, as before. A settle that `generate` refuses leaves the new tables out of the index until the lines of its note are written. On Drizzle, when the merged tree holds two tables files for a context that declare a name in common, no name of that merge is settled and no line rewritten; `init --force` afterwards gives a shared name to the context the index re-exports first, which may not be the trunk's. A table the index declares itself outside the regions (`export const legacyOrders = pgTable(...)`) is not in what `init --force` compares: it goes with the rewrite without a word, as before, and a name it held may then name the table of a context.
|
|
38
|
+
|
|
39
|
+
To move: nothing in a project that compiles and whose tables are all created. A project on Drizzle whose index names one table twice runs `ddd-ts-kit init --force` after a commit, which settles each name and says so, unless the note says the index was left as it stood, which says why, then `npm run db:generate <name>` to write the migration of the tables that were left out. A TypeORM project merged with a shared name gets the sentence and writes the alias by hand, as before (`import { orders as shippingOrders } from '...'`, and `shippingOrders,` in `entities`), then `npm run build && npm run db:generate migrations/<name>`. A project on Drizzle that stores an aggregate whose table bears a name the index declares, `Job` (`jobs`) or `Process` (`processes`), compiled on 0.112.0 and never created that table: it runs the same two commands. A script that reads the `Lost-Accepted:` trailers of merge commits now meets entries of the form `<file>@<side>#<hash>` beside `<file:line>` and `<file>`, and a new `Kit-Written:` trailer: it reads them as entries it does not know, or skips them; both come only from the settle of a Drizzle index.
|
|
40
|
+
|
|
41
|
+
**`ddd-ts-kit verify-slice` stages the list of the read model tables a slice joined.** `generate read-model` adds the store of the read model to `src/platform/database/read-model-tables.ts`, the list the application checks when it starts and `db:read-models` before a deployment. `verify-slice` put that file under "left out, never stage" whatever the ORM, so a worker committed a slice whose read model was absent from the list: its table was never checked, and nothing said so. The file is now staged with the slice when every line changed since `HEAD` belongs to the context, as the schema index is: the import of a store of the context, its entry `['<context>', <Store>]`, read under its alias when another context holds a store of that name, and the name of the context among those an entry may bear. A line is read in the version that holds it, so the list a slice took its own read model away from is staged too, and an import is read by the module it names: the store of the same name of another context, a store of the slice listed under another context, or a package of the kit that bears the name of a context (`@ddd-ts-kit/kernel` beside a context `kernel`) is not of the slice. A list that also holds a change of another context, or of the platform, stays left out: a person decides about it. So does a list that names a context created in the same branch, which `ddd-ts-kit.config.json`, never staged with a slice, does not hold in the last commit: committed alone it would fail `check`, so it waits for the configuration.
|
|
42
|
+
|
|
43
|
+
To move: nothing. A slice committed without its line in the list gets it back with `ddd-ts-kit init`, which lists the read model stores of the tree.
|
|
44
|
+
|
|
45
|
+
**A freshly installed project lints again: `dddTsKit()` turns off `@typescript-eslint/no-unsafe-class-instance-assignment`, which typescript-eslint 8.73.0 added to its strict preset.** The rule reports a value used where an instance of a class is expected and that the constructor of that class did not build. A port of the kit is an abstract class its adapters implement, and a payload, an answer or a line of a read model is a class built from a literal: every place an adapter is bound to its port or handed to a handler, every fake and every such literal was reported, in a project `init` had just written and installed from 2026-11-16, the day 8.73.0 was published. The rule has no option, so it is off as a whole: a plain object passed where `instanceof` or the metadata of a decorator is expected is no longer reported by it. The preset names the rule only where the installed typescript-eslint holds it, so a project on an earlier 8.x keeps working, and `standardRules.kitConventions` carries the same line for a configuration composed by hand.
|
|
46
|
+
|
|
47
|
+
To move: update `@ddd-ts-kit/eslint-plugin` with the kit; nothing to write. A project that cannot update yet and whose `npm install` took typescript-eslint 8.73 adds `'@typescript-eslint/no-unsafe-class-instance-assignment': 'off'` to the rules of its `eslint.config.js` until it does.
|
|
48
|
+
|
|
49
|
+
## 0.112.0
|
|
50
|
+
|
|
51
|
+
**`ddd-ts-kit generate file-upload --text <utf-8|single-byte>` writes the upload of a text file, with a spec that sends one that is not UTF-8.** Without the flag the generated controller still declares a document (PDF, PNG, JPEG). With it, the upload is a CSV under the names browsers give one (`text/csv`, `application/csv`, and `application/vnd.ms-excel` stated as `text` in `contentRules`), held to the text rule asked: `single-byte` when the file may be in Windows-1252 or ISO-8859-1 as well as UTF-8, `utf-8` when it must be UTF-8. The spec of the controller, a controller of the kit or a Nest controller, then sends a multipart form through `multipartUploads()` of `@ddd-ts-kit/http/uploads`: under `single-byte` a Windows-1252 file reaches the command byte for byte, under `utf-8` it is answered 415, and under both a workbook under the name of a CSV is answered 415. The spec of the handler stages a CSV. Another value of `--text` is refused with the two it takes. See `docs/concepts/file-storage.md`.
|
|
52
|
+
|
|
53
|
+
**Breaking: an upload says the text it takes and the content rule of each media type, and a declaration that could receive no file is refused.** Two defects of the content check of `@ddd-ts-kit/kernel` and `@ddd-ts-kit/http`. A text upload passed only as valid UTF-8, so a CSV exported in Windows-1252 or ISO-8859-1 (a bank statement, a spreadsheet) was answered 415: `UploadSpec` and `ContentExpectation` take `text: 'single-byte'`, under which UTF-8 and every single-byte encoding that extends ASCII pass, while a binary file under the name of a CSV is still refused (a signature, a NUL, a control character other than tab, line feed, form feed and carriage return) and so are UTF-16 and UTF-32. The default stays `utf-8`: the bytes cannot say their encoding, and a route that reads UTF-8 must not receive, without a refusal, a file it decodes wrong. The kit never decodes: the handler and the storage get the bytes as sent, and the new `isUtf8(bytes)` of the kernel tells a reader which decoder to take. And `mediaTypes` accepted types the content check then always refused (`application/vnd.ms-excel`, which a browser on Windows sends for a CSV, `application/csv`, `application/octet-stream`): every accepted type now has a content rule, the one of the kit (`contentRuleOf`: a signature for `SIGNED_MEDIA_TYPES`, text for `TEXT_MEDIA_TYPES`, which gain `application/csv` and `text/tab-separated-values`) or the one the upload states in `contentRules`, `text` (text under another name) or `unchecked` (the bytes are taken as they are). A rule stated for a family (`{ 'image/*': 'unchecked' }`) never reaches a type a browser runs when it opens it (`NAMED_ONLY_MEDIA_TYPES`: `image/svg+xml`, `text/html`, `application/xhtml+xml`, `text/javascript`, `application/javascript`): an upload takes one only by naming it. A type with no rule, a family none of whose types has one (`video/*`), an entry that is no media type (`*/*`) and a stated rule that does nothing are refused when the route is declared, by `@Controller`, `defineRoute` and the routes of a Nest controller, with the type and the rules it may state; `FileStaging.uploadUrl` takes `text` and `contentRules`, keeps them in the `PendingUpload` that `confirm` applies, and throws on the same defects (`contentRuleDefects`). The new rule `files/upload-content-rule` of `ddd-ts-kit check` reports them on the line of the type, in a `*.route.ts` or a `*.controller.ts` whose `mediaTypes` and `contentRules` are written as literals. The OpenAPI document says both (`x-text`, `x-content-rules`, and the description of the file). See `docs/concepts/file-storage.md`, "What a route accepts: a content rule for each media type".
|
|
54
|
+
|
|
55
|
+
To move: run `ddd-ts-kit check --rule files/upload-content-rule` to list the uploads that accept a media type with no content rule; they never received a file of it, and now refuse to start. For each, state the rule: `contentRules: { 'application/vnd.ms-excel': 'text' }` for the CSV of a browser on Windows, `{ 'application/octet-stream': 'unchecked' }` for bytes the route takes as they are, or remove the type. A list built in a constant is not read by the rule: the application says it at start. Add `text: 'single-byte'` to an upload that receives text files which are not UTF-8, and decode them where they are read (`new TextDecoder(isUtf8(bytes) ? 'utf-8' : 'windows-1252')`). A part declared `application/csv` or `text/tab-separated-values` on a route that accepts it, or `text/*`, is now held to the text rule and passes, where it was refused.
|
|
56
|
+
|
|
57
|
+
**Breaking: `ddd-ts-kit check` reports an adapter the default policy cuts before the slower adapter it calls, rule `aspects/timeout-covers-delegate`.** A new rule, an error at once. It reports one case, the one nobody chose: an `external` or `gateway` adapter left to the default policy of the platform (no `ownPolicy(...)`, no `timeout(...)` of its own; an `@Adapter` that names no kind is `external`) that is given a port, a constructor parameter typed by it, whose adapter states a longer `timeout(<ms>)` around all its methods. Every call the inner adapter would still answer then fails in the outer one first, at the default limit, as a timeout of the outer one. The default limit is the fallback of `OUTBOUND_TIMEOUT_MS` in the configuration of the platform, else `timeoutMs` of `resilience/default-resilience-settings.ts`. The rule reads `@Adapter`, `@Gateway` and the bindings of the container of the kit (`bind(Port).toClass(Adapter).as(kind).with(...)`). An adapter that states its own limit, even a shorter one, chose it and is never reported. The fix is `ownPolicy(timeout(<ms>))` on the outer adapter, or `ownPolicy()` alone when it only hands the call over. Not judged, because the text does not show it: a platform wired by hand (`platform.adapter(...)`); a duration or a kind that is not a literal; an aspect that is a variable, a spread, a call of another name or under `when(...)`; a `timeout(` nested in the options of another aspect; a `@Timeout` on a method; a port or an adapter bound more than once, bound again by `rebind(`, or bound under a condition; a parameter typed by a name the adapter does not import from a file of the project (a type of a package, a declaration of its own file); two ports of one name unless each file imports its own from the file that declares it; an adapter reached through a middle adapter; a default limit that is not one number, or an environment that sets `OUTBOUND_TIMEOUT_MS`; the retries. See "A delegating adapter" of `docs/concepts/resilience.md`.
|
|
58
|
+
|
|
59
|
+
To move: `npx ddd-ts-kit check --rule aspects/timeout-covers-delegate` lists the adapters to take up; each gets the policy the fix names.
|
|
60
|
+
|
|
61
|
+
**Breaking: `verify-merge` fails on a migration of a branch that sorts before the last migration of the trunk, on the four ORM, and `merge-trunk --to-land` reorders it on a branch that already holds the trunk.** A push that passed the pre-push hook now stops on such a migration. A branch that lives more than a day holds a migration generated before the last one the trunk gained meanwhile. The migrator of Drizzle then skips it without a word on a database that already applied the later one, and a merge that keeps the journal of the trunk loses its entry; knex, Prisma and TypeORM run it late, so a database that follows the trunk and a new one run one history in two orders. Without a `<commit>`, `ddd-ts-kit verify-merge` now reads the migrations of the working tree against the trunk (the base of the worker, else `origin/HEAD`, else `origin/main`) and exits 1, naming the migration, the last one of the trunk and the command that brings the order right: under drizzle-kit an entry of the journal generated before the last entry of the trunk, or a `.sql` file the journal does not list and the trunk does not hold (`ddd-ts-kit merge-trunk`, or the `meta/` of the trunk then `ddd-ts-kit drizzle-generate --replay` once the trunk is merged otherwise); under knex, Prisma and TypeORM a name that sorts before the trunk's last (`ddd-ts-kit merge-trunk --to-land`). `--warn`, which the pre-push hook of a generated project passes, still softens what a merge lost and never this: the push stops. A working migration (`working-<what-it-does>`) is left out, its place being decided when the branch lands, and what is ordered is what the tool itself takes for a migration, by what it orders it by: every script of the folder of knex and the folders of Prisma that hold a `migration.sql`, by their name, and the classes of TypeORM whose name ends with 13 digits, by that number. `merge-trunk --to-land` on a branch that already holds the trunk used to answer that there was nothing to merge: it now lands the migrations all the same and leaves them to commit. Under drizzle-kit they are replayed; elsewhere those that do not follow the trunk's already are renamed after its last, in their order, the others keeping their name, and a TypeORM class and its `name` follow. It stops, the folder left as it was found so that the same command runs again, when the replay fails or when a later migration of the trunk changes the same table (the stop then says to delete the migration and to generate it again), or when the last file of the trunk carries no number a migration can follow. A rename never takes a number a file of the folder carries already. `--dry-run` says which migrations would move. A database of development, of a preview or shared that already applied a migration under its old name no longer matches (knex refuses every migrate, the migrator of Drizzle and TypeORM run the migration again): the command and the fix of `verify-merge` say to reset it or what to correct, for each tool. `verify-slice` says such a migration apart from what a merge lost: the slice does not fail on it, the push is refused on it. `npm run db:generate <name>` refuses a name a migration of the folder already carries on knex, Prisma and TypeORM too, as it did on Drizzle. The JSON of `verify-merge` gains `migrations`, counted in `errorCount`. The order is read from the files and from git, not measured against a database: see "Migrations: names, merges and order" of `docs/tools/persistence.md`.
|
|
62
|
+
|
|
63
|
+
To move: run `git fetch`, then `npx ddd-ts-kit verify-merge` on each open branch; a branch it reports follows the command it names before its next push (`npx ddd-ts-kit merge-trunk` under Drizzle, `npx ddd-ts-kit merge-trunk --to-land` under knex, Prisma and TypeORM, then commit the renamed migrations when the branch already held the trunk). A script that reads the exit code of `verify-merge --warn` as always 0 now gets 1 on such a migration. A migration to generate under a name already taken gets a name of its own.
|
|
64
|
+
|
|
65
|
+
**A call cut by the default time limit of the platform says so: `timeout(ms, { statedBy })`.** The platform of a generated project puts a default policy around every `external` or `gateway` adapter that states none: 2 seconds per attempt. An adapter that only hands its call to another adapter, slow by nature and bound with a longer limit of its own (a remote reader with 120 seconds), failed every call at 2 seconds, and the error named the outer adapter and nothing else. `timeout(ms, { statedBy })` of `@ddd-ts-kit/aspects`, and `@Timeout(ms, { statedBy })` of its decorators, now take who states the limit: the `TimeoutError` keeps it in `statedBy` and ends its message with it, its code `TIMEOUT` and its `timeoutMs` unchanged, and a `timeout` without `statedBy` writes the message it always wrote. The `default-policy.ts` that `init` writes names itself there, so the message reads `RemoteQuoteReader.read did not answer within 2000 ms (the default policy of the external and gateway adapters, OUTBOUND_TIMEOUT_MS: ownPolicy(timeout(<ms>)) on the declaration or the binding of this adapter states another, at least as long as the adapter it calls)`. See "A delegating adapter" of `docs/concepts/resilience.md`.
|
|
66
|
+
|
|
67
|
+
To move: a project generated earlier takes the message by adding `{ statedBy: '<who states it>' }` to the `timeout(settings.timeoutMs)` of its `src/platform/resilience/default-policy.ts`, as the template of this version does; nothing else changes, and a test that compares the whole message of a `TimeoutError` of the default policy reads the new ending.
|
|
68
|
+
|
|
69
|
+
**`ddd-ts-kit move-to-module` writes nothing when the move would close a cycle between modules, and says which.** The command moved the files and rewrote their imports, and `module/no-cycle` reported the cycle afterwards. It now reads the imports between the modules of the context as the rule does, before the move and with the move planned, and refuses a move that makes a module import another that imports it back, directly or through a third: the refusal names the cycle, each step of it with its imports (file and line, the steps the move adds told apart from the ones there now), and the file at the other end of the imports the move adds, to move along in the same command. `--dry-run` refuses with the same words. The new `--allow-cycle` moves all the same and says the cycle with the move, in the text and under `cycles` of `--json`. A cycle that is there before the move is not counted, and the command judges what the rule will: a project that turns `module/no-cycle` off is not judged, nor a cycle whose every import is in a file the config turns the rule off for, and only the files `ddd-ts-kit check` reads are read. Under `--json`, the refusal carries `cycles` and `along` (the files or folders to move along) in its `error`. `context-layout` is unchanged: it already leaves where it is a file that would make a module depend on another.
|
|
70
|
+
|
|
71
|
+
To move: a script that runs `ddd-ts-kit move-to-module` and must keep moving a cluster one file at a time passes `--allow-cycle`; otherwise name in one command the files the refusal lists.
|
|
72
|
+
|
|
73
|
+
**Breaking: on a PostgreSQL server (`DATABASE_URL`), an end-to-end run of a generated project copies the migrated database once, in a global setup, and each spec file copies the tables of that copy, emptied but for those the project lists.** Each spec file used to copy the migrated database itself, in the hook that starts the application. Three things followed on a migrated database that holds rows (measured at 474 MB on PostgreSQL 18): a copy takes 6 seconds alone and 46 to 56 seconds when four files copy at once, more than the 30 seconds of a hook; nothing held the pools of the applications under the connections of the server, so workers times 10 connections ended in `too many clients`; and the copies of a run that was killed, or of a file that failed while it started, stayed on the server for an hour, or for good. Now `test/support/test-database-setup.ts`, a global setup of the end-to-end run, opens the run once, where no timeout of a hook applies (`test/support/test-database-run.ts` and the files it is made of, `test-database-session.ts`, `-leftovers.ts`, `-budget.ts`, `-copy.ts`, `-emptying.ts`, `-server.ts`): it copies the migrated database, one run at a time on the server, and empties the copy. `cloneDatabase(url)` of `test/support/test-database-clone.ts` copies that template for its file, one copy at a time in a run, in a fraction of a second whatever the migrated database holds. **What a file finds.** The run empties every table of its copy but those `KEPT_TABLES` lists in `test/support/test-database-kept.ts`, a file of the project: as generated, what the migration tool writes and, with an audit trail, the `audit` schema, which is left as the migrated database holds it. A name is `<schema>.<table>`, or `<schema>.*`, written as the server stores it and without quotes, so in lower case unless the table was created between quotes (`"Countries"` is listed as `public.Countries`); `<schema>.*` keeps every table of the schema whatever its name holds, and a table whose name holds a dot or a quote is kept through it only; any other shape (`*`, `public`, a quoted name, `public.plans.v2`) refuses the run with the shapes a name takes, and a name that is no table of the database (a misspelling, another case, a view) is said in one line, except the names the generated list holds for a table its tool has not created yet. The tables are emptied in one `truncate` without `cascade`, each one alone (`only`): a kept table that references an emptied one refuses the run with both names, a kept table that inherits from an emptied one keeps its rows, and a kept partition of an emptied table, or a kept table that references such a partition, refuses the run with both names. A table another role owns, or one in a schema the role of the run may not use, is left with its rows and named, a table of an extension is left, the materialized views are refreshed, a sequence no column owns keeps its value. The run names on its error output the tables it emptied that held rows, up to 20 of them, and above 64 MB what the copy took; a run with nothing to say writes nothing. **The connections.** The global setup counts the files that run at once, the workers of the run and no more than the files of this run: under Vitest the list of the runner once the filters of the command line are applied, and the share of a shard; under Jest, which hands no list to a global setup, the spec files under `test/` that the patterns of the command line match as Jest matches them, less those `testPathIgnorePatterns` ignores, and the share of a shard. Where the count cannot be made or finds nothing (a run that watches, an empty list, under Jest no spec file under `test/` among those of the run, a pattern that is no expression, no `test/` directory) the workers alone count, so a run is never given more files than it counted. The setup reads what the server has left (`max_connections`, less what it reserves and what is open, and no more than the connection limit of the role), and gives each application under test a pool of its share less one connection to spare, 10 at most (`DatabaseClone.poolSize`, handed to the connection of the four ORM; `connectToDatabase` of a project on Drizzle takes a `poolSize` like the three others). A run that does not fit is refused before any file starts, with its numbers, the number of files at once that fits and what raises the bound that holds it, for one `8 spec files at once need 24 connections (2 for each application at least and 1 to spare), and the role app has 12 left (connection limit 13, 1 open): run at most 4 at once (npm run test:e2e -- --maxWorkers=4), or raise the limit of the role (alter role app connection limit <more>).` `TEST_DATABASE_CONNECTIONS` states fewer connections than the server leaves; a value that is not a whole number, or above what the server leaves, is refused. **What a killed run leaves.** A database of a run is named `<database>_test_<run>_template` or `<database>_test_<run>_<random>`. The run holds an advisory lock keyed by its name, on a session to the `postgres` database of the server, and writes every 15 seconds the time of the server in the comment of its template; its teardown never throws. The global setup of a run drops a database named after a run only when the lock of that run is free, it has not written for a minute and nobody is connected to the database: a run that lives, in another checkout or on another machine, keeps its databases, and a database with any other name is never dropped. **When the server ends a session.** The run takes another session and its lock again at once, and says so when it could not. With its lock again it looks for its template: when that one is gone (the run had no session for more than a minute and another run dropped what it held dead, or an administrator did), it says that it lost its databases, and each file that then cannot copy the template fails with that sentence instead of the `template database ... does not exist` of the server. The copy of the migrated database has a session of its own: when the server ends it, what is left of the copy is dropped and the copy made once more, and a second end is said as such. A statement of the run that somebody cancels (`pg_cancel_backend`) is no ended session: the run says that its copy was cancelled and does not take it again. **The timeouts of the role.** The sessions of the run itself, the one of its lock and those that copy, empty and drop its databases, set `statement_timeout`, `lock_timeout` and, from PostgreSQL 17, `transaction_timeout` to 0 for themselves: a role is given such a timeout (`alter role <role> set statement_timeout = '30s'`) for the requests of an application, and what the run does lasts as long as the database is large. The pool of the application under test keeps the timeouts of its role. The address is the server itself, not a pooler in transaction mode, and `DATABASE_URL` cannot name the `postgres` database: the run says so. **Outside an end-to-end run** (`openTestDatabase(url)` in a spec of the unit run, a project without an HTTP stack), the call opens a run of its own, which copies and empties the migrated database itself. Nothing counts the files that do so at the same time: each opens a small pool, 4 connections at most, and is refused when the server has no room for it at that moment. **Any way of starting the runner.** The files directly under `test/support/` import one another by a relative path (`./test-database-run`), since a runner loads its global setup before any alias exists: the setup loads however the runner is started, and the scripts are the ones a project on Jest had. The spec files of a project on Jest are ES modules, as before: a bare `npx jest -c jest.e2e.config.js` fails with `Must use import to load ES Module`, and `NODE_OPTIONS=--experimental-vm-modules npx jest -c jest.e2e.config.js`, or the runner of an editor given that variable, starts the run as the scripts do. Under `"importExtension": "js"` that path ends with the `.ts` of the source, which the transform of the runner finds, and `init` writes `"allowImportingTsExtensions": true` and `"noEmit": true` in `tsconfig.json`, which let the type check read it, and both as `false` in `tsconfig.build.json`: the build emits what it emitted before. See [the testing strategy](docs/concepts/testing-strategy.md).
|
|
74
|
+
|
|
75
|
+
To move: these files are written once by `init`, so a project already generated keeps what it has until it takes them. Commit everything first, then run `npx ddd-ts-kit init --force` and read `git diff` before you commit again: it rewrites from the templates of this version every file `init` owns, not the test support alone, and an edit made by hand in one of them is lost. That is all of `src/platform/**`, `test/e2e/support/*`, `test/support/*`, `scripts/*`, the configurations of the runner, of Stryker, of ESLint, of the ORM and of lefthook, `tsconfig.json`, `.github/actions/setup`, the Dependabot configuration, `test/architecture/extractable.spec.ts`, the declarations file of each context, `docs/behaviour/*.md`, and the scripts of `package.json` that `init` generates, whose names are written again: a script you changed under one of those names is replaced, one you added under another name stays. It keeps the workflows, `README.md`, `AGENTS.md`, `CLAUDE.md`, `src/main.ts`, the migrations, the spec files, the API documents, the published language, and a `test/support/test-database-kept.ts` that exists: once written, that file is the project's ([Migrate after a kit upgrade](docs/guides/commands.md)). To take the files one by one instead, generate a project with the same flags in a temporary directory and copy `test/support/test-database-*.ts`, the function `openServer` of `src/platform/database/open-test-database.ts`, `src/platform/database/connect-to-database.ts` on Drizzle, the `globalSetup` line of `vitest.e2e.config.ts` or of `jest.e2e.config.js`, and under `"importExtension": "js"` the `allowImportingTsExtensions` and `noEmit` lines of `tsconfig.json` and of `tsconfig.build.json`; the rule `imports/alias-only` of this version lets those files import one another by a relative path. Then read `test/support/test-database-kept.ts`: add each table whose rows a migration inserts and the application reads at boot or in a request (a spec that read such a row found it until now); write the table of the migration tool under its name when the project gives it one (`tableName`, `migrationsTableName`, `migrations.table`); on Drizzle and TypeORM, a table the ORM does not declare was never emptied by `reset()` and is emptied now, unless listed. The audit trail is not emptied: a migrated database that holds audit rows hands them to every file, as before. Point `DATABASE_URL` at the server itself and at a database other than `postgres`. The copies an earlier version left carry another name (`<database>_test_<ten digits>_<random>`) and are no longer dropped: list them once with `select datname from pg_database where datname ~ '_test_[0-9]{10}_[0-9a-f]{8}$'` and drop each (`drop database "<name>" with (force)`).
|
|
76
|
+
|
|
77
|
+
**`imports/alias-only` lets a file directly under `test/support/` import its neighbour by `./<name>`.** A test runner loads its global setup, and every file that one imports, before any alias of the project exists: Jest applies no `moduleNameMapper` there. A global setup made of several files could therefore import them by alias only when the runner was started under a loader that resolves aliases, and failed with `Cannot find module '$test/support/...'` from `NODE_OPTIONS=--experimental-vm-modules npx jest` or from the runner of an editor. The rule, in `ddd-ts-kit check` and in `@ddd-ts-kit/eslint-plugin`, now leaves that one relative path alone: from a file directly under `test/support/`, a specifier `./<name>` that names a neighbour file. Nothing else changes: from `test/support/`, `../e2e/support/start-application`, `./parts/part`, `./.`, `./..` and a `./parts` that is a directory are reported as before, and a file of any other directory still imports its neighbour by alias. The rule judges the name of that neighbour against the files on disk, and `eslint --fix` rewrites it: a `.ts` source without its extension under `"importExtension": "none"`, the name of the source under `"js"` (`./test-database-run.ts` for `./test-database-run.js`, `./esm.mts` for `./esm.mjs`), since the runner loads the sources and a `./test-database-run.js` there passes the type check, then stops the run on `Cannot find module`. A file that exists as it is named (a JSON file, a JavaScript file) is left alone, and a directory named as a neighbour is fixed to the alias of its index file. `init` writes what lets the type check of such a project read that ending, and `imports/alias-declared` holds it. See [Import aliases](docs/tools/import-aliases.md).
|
|
78
|
+
|
|
79
|
+
**Events of one key applied at once to a read model are no longer refused for another unique value of its table.** A read model table that holds a second value unique (a unique index on a slug, a number) could refuse one of two writes of the same row made at once, on PostgreSQL, with the unique violation of that other index: the insert named the key alone as its conflict target, and two inserts that cross meet on the other index first. No write was lost, since the handler of the event failed and the event is delivered again, but the error named a value no other row held. The stores of `@ddd-ts-kit/drizzle`, `@ddd-ts-kit/knex` and `@ddd-ts-kit/typeorm`, and on `@ddd-ts-kit/prisma` the copy of a rebuild (its model already skipped on any unique value), now insert with a statement that skips on any unique value, and only when it wrote nothing with a second one that names the key: a key that is held is compared with the event and written if the event is newer, and a value another row holds is still refused by the database. `readModelStoreContract` and `readModelRowsContract` of `@ddd-ts-kit/testing` gain the cases, for a storage that says `uniqueTitle`: writers that insert one row at once, in the table and in the copy of a rebuild, and several rows that take one unique value at once, of which one holds it and the others are refused. See [CQRS](docs/concepts/cqrs.md).
|
|
80
|
+
|
|
81
|
+
To move: nothing for a table of the four ORM. A `ReadModelTable` of your own that runs the contract with `uniqueTitle` and holds the value in memory takes it before its write, as an index does, and gives it back when nothing was written: checked after the write, two rows inserted at once both pass.
|
|
82
|
+
|
|
83
|
+
**Two first saves of one aggregate made at once are a lost update on a table with a unique column too, never a unique violation for the value they both write.** On PostgreSQL, the first save of an aggregate inserted with the key alone as its conflict target (`ON CONFLICT (id) DO NOTHING`). Two inserts of the same id made at once (a request delivered twice, a command run again while its first run commits) both pass the check of the key, then meet on the other unique index of the table (an email, a number), and the one that lost was answered `UniqueViolationError` (code `CONFLICT`, 409) for a value no other row held, where `optimisticUpdate` promises `ConcurrencyError` (code `CONCURRENCY_CONFLICT`). `insertIgnoringConflict` of `@ddd-ts-kit/knex` and of `@ddd-ts-kit/typeorm` now inserts with a statement that skips on any unique value, and only when it wrote nothing with a second one that names the key: a key that is held writes no row, and a value another row holds is still refused by the database, with the error of the driver as the cause of the `UniqueViolationError`. `@ddd-ts-kit/drizzle` gains the same helper, `insertIgnoringConflict(() => executor.insert(table).values(row), table)`, which says whether it inserted, and `generate repository` and the identity preset write it on Drizzle in place of `onConflictDoNothing({ target: primaryKeyOf(table) })`. A repository on `@ddd-ts-kit/prisma` was not concerned: `skipDuplicates` names no target and `rowsCreated` tells a taken id from a taken value. `repositoryContract` of `@ddd-ts-kit/testing` gains the case, with the new option `createAggregateAgain`: the same new aggregate saved several times at once, one save that writes it and the others refused with `CONCURRENCY_CONFLICT`. The stores of the kit were not concerned: their tables hold no second unique value two writers of one key could both write. See [Persistence](docs/tools/persistence.md).
|
|
84
|
+
|
|
85
|
+
To move: nothing on Knex and TypeORM, whose repositories call the helper. On Drizzle, `grep -rn "primaryKeyOf(" src` lists the first saves to take up: `insertion.onConflictDoNothing({ target: primaryKeyOf(table) }).returning(...)` becomes `insertIgnoringConflict(() => this.database.executor().insert(table).values(row), table)`, which answers a boolean where the statement answered its rows (`? 1 : 0` under `optimisticUpdate`). Give `createAggregateAgain` to the `repositoryContract` of a repository over a table with a unique column, and run it on a real PostgreSQL: one connection, as PGlite has, never crosses two inserts.
|
|
86
|
+
|
|
87
|
+
**Breaking: under `"importExtension": "js"`, `imports/alias-declared` reports a `tsconfig.json` that does not let the type check read the `.ts` by which a file of `test/support/` names its neighbour; it reports a build configuration that would write nothing, and `ddd-ts-kit build-aliases` refuses one.** The files a test runner loads as its global setup import one another by `./<name>.ts` in such a project. The compiler refuses that ending (`TS5097`) unless `tsconfig.json` sets `"allowImportingTsExtensions": true`, which it accepts only in a configuration that emits nothing (`"noEmit": true`), and a `tsconfig.build.json` that extends it without setting both back to `false` compiles without an error and writes no file: `build-aliases` then finds no output, or rewrites an earlier one. `init --import-extension js` writes those four lines, and `ddd-ts-kit check` now holds them: it reports `tsconfig.json` when a file directly under `test/support/` names a neighbour by its `.ts` and neither `allowImportingTsExtensions` nor `rewriteRelativeImportExtensions` is set there, and, whatever `importExtension` is, `tsconfig.build.json` and each tsconfig a script of `package.json` compiles what ships with (`tsc -p tsconfig.prod.json`, `tsc` alone for `tsconfig.json`) when it resolves `noEmit` as `true`, or `allowImportingTsExtensions` as `true` without `rewriteRelativeImportExtensions` or `emitDeclarationOnly`. Each finding names the lines to write. An `extends` is followed as the compiler follows it: a relative path with or without its `.json`, and a package installed in the `node_modules` of the project root; a package found through its `exports`, or in a `node_modules` above the root, is not. `ddd-ts-kit build-aliases` refuses, exit 2, a tsconfig that resolves `noEmit` as `true`: the compiler wrote nothing with it, and the command used to answer `rewritten 0 alias specifier(s)` over an earlier output, which then shipped. The compiled output is what it was: no option rewrites an import of the sources, so no helper is added to it. A project that writes its imports without an extension (`"importExtension": "none"`, the default) is given none of these options by `init`, and is reported only for a `noEmit` it wrote itself in a configuration its build inherits. See [Import aliases](docs/tools/import-aliases.md).
|
|
88
|
+
|
|
89
|
+
To move: `npx ddd-ts-kit check --rule imports/alias-declared` lists the two files when they are concerned. Write `"allowImportingTsExtensions": true` and `"noEmit": true` under `compilerOptions` in `tsconfig.json`, and `"compilerOptions": { "allowImportingTsExtensions": false, "noEmit": false }` in `tsconfig.build.json`, or let `npx ddd-ts-kit init --force` write both files after a commit. A script of your own that emits with `tsc -p tsconfig.json` now writes nothing: point it at `tsconfig.build.json`.
|
|
90
|
+
|
|
91
|
+
**Breaking: `ReadModelTableNotReadyError` says what is missing and writes the migration in two steps, for the columns its store maps and no other, and is built from a `ReadModelTableState`.** Its message named the table and the columns that refuse NULL, then gave the statement to write with a `<column>` to fill in. It now names the table, each thing that keeps it from holding a trace, and the whole migration as PostgreSQL statements, in its `steps` field (`definition`, then `validation`) and, both in order, in `statements`. The state it reports is the reading of the store (`PostgresTraceColumns` of `@ddd-ts-kit/kernel`, behind the tables of `@ddd-ts-kit/knex`, `@ddd-ts-kit/drizzle`, `@ddd-ts-kit/prisma` and `@ddd-ts-kit/typeorm`), which looks at the columns the store maps as fields of its row and at nothing else: the key, the tenant column whatever its name, the stamp and a column the store does not map are never read, never altered and never emptied. Among the mapped columns it tells those that refuse NULL (`refusing`) from those no migration opens (`unfit`: a part of the primary key, an identity column, a generated column, a column of a domain that refuses NULL, a column that is not there), and says when the table itself is not in the database; a store whose mapped column is unfit refuses, with no statement for that column, where it failed later on the database. The stamp columns carry the names the definition of the store gives them, so a renamed `deleted` column is the one the migration names; on TypeORM, the names the naming strategy of the data source gives the table and its columns.
|
|
92
|
+
|
|
93
|
+
The first step is the change of definition, one statement: NOT NULL dropped on each refusing column and, in the same `alter table`, the constraint `<table>_live_rows_whole` written again, `not valid`. Nothing commits between the two, on any migration tool. Before it changes anything, the statement reads the constraint the database holds under that name and fails on one that is not written as the kit writes it, naming the constraint and its table: a constraint of the project that happens to carry the name is never dropped, on the database that was read or on another. The second step validates the constraint and empties the rows deleted before, with an update that touches only the rows still holding a value. Every identifier is quoted, the dollar quote of the first step is one no name of the statement holds, the statements hold no backslash and no question mark (a string of JavaScript and `knex.raw` carry them as they are; a column whose own name holds a question mark is said under the statements, to write `\?` in `knex.raw`), and the migration can be run twice. The name of the constraint is cut at 63 bytes, as PostgreSQL cuts it, not at 63 characters.
|
|
94
|
+
|
|
95
|
+
The first step takes the lock that stops the readers and the writers of the table, and holds it to the end of its transaction. On a small table both steps go in one migration. On a large one the second step goes in a migration that runs outside the transaction of the first, where the validation and the update stop neither readers nor writers, and each tool needs something for that: knex runs every pending migration in one transaction unless the second ends with `export const config = { transaction: false };`; TypeORM does unless the data source says `migrationsTransactionMode: 'each'`; Drizzle always does, so the second migration is added and applied after the first; Prisma commits each statement of a file except a file with a `do` block, which the first step is, so two migrations. `docs/tools/persistence.md`, "A large read model table: the second step apart", gives each case as it was run, with the locks read in `pg_locks`.
|
|
96
|
+
|
|
97
|
+
The constraint is read exactly: only the form the kit writes, as PostgreSQL prints it back, counts as holding columns; `(deleted or title is not null) and ..` or `deleted or not (..)` under that name is another check. A constraint that is not validated, another check under that name, and any other check constraint that names a column of the row, unless it is written for the live rows only (`deleted or ..`), are read and reported as warnings by `ReadModelTables`, not as refusals: nothing in the columns refuses a trace, and the kit does not decide what an arbitrary check does. A refusal read from a definition alone (Drizzle, TypeORM, a column declared not null there) carries no statement and says to declare the column nullable.
|
|
98
|
+
|
|
99
|
+
To move: code that builds the error itself (a `ReadModelRows` of your own) passes a state, `new ReadModelTableNotReadyError({ table, exists: true, refusing, unfit: [], row, deleted: 'deleted' })` (`schema` and `constraint` when known), where it passed `(table, columns)`; a test that compared the whole message compares `table`, `columns`, `steps` or `statements`. A read model whose store maps a part of its primary key, an identity column, a generated column or a column of a domain that refuses NULL as a field of its row is now refused before its first trace: take that column out of the fields the store maps, or make it an ordinary nullable column. A TypeORM entity without `tableName` is named in a refusal by the table the naming strategy gives it (`strict_row`), not by its entity name.
|
|
100
|
+
|
|
101
|
+
**The read model tables an application lists are checked when it starts and, from the command line, before a deployment, each by its own store and each root for the contexts it hosts.** A table that cannot hold the trace of a deleted row was refused when its store was built (Drizzle, TypeORM) or before its first trace (the four ORM). In an application whose container builds a store at its first use, both came with the first request or the first event that reached the read model, in production, one table at a time, and nothing listed the tables an upgrade left to migrate. A `TableReadModelStore` of `@ddd-ts-kit/kernel` now answers `tableState()`, the reading its table makes before its first trace (`tableState()` of the `ReadModelTable` port, implemented by the table of `@ddd-ts-kit/knex`, `@ddd-ts-kit/drizzle`, `@ddd-ts-kit/prisma` and `@ddd-ts-kit/typeorm`), as a `ReadModelTableState`. `ReadModelTables` of the kernel takes a list of entries, each a name and what builds a store, and asks it of each: `states()`, `notReady()`, `require()` (which refuses with `ReadModelTablesNotReadyError`, one error that names every table with its migration), `atStart(logger, 'required' | 'reported')` for a start and `report()` for a command. The verdict is the one of the store by construction: the same table, schema, columns and stamp names, read by the same code, and a table nobody lists is never read, whatever else the database holds. Every entry is tried: one whose store cannot be built, or whose table the database refuses to read (a role without the right to use the schema), is told under its name with its cause, in `unread` of the same error, the others are still read, and `'reported'` logs it and lets the start go on. The cause is said in a few words, the message of the driver and never the statement an ORM wraps it in. A database that cannot be reached at all (a refused connection, a host that is not found, a timeout, read through the wrapping of each ORM) is not a refusal: the start goes on, `'required'` or `'reported'`, with one warning that gives the short cause, since an application never depended on its database being up to start, and `db:read-models` exits 3. What the check cannot decide is a warning at the start and a line of the command: a check constraint that is not validated or is not written as the kit writes it, another check constraint that names a column of the row, a view, a store the application names as not listed. A store without a table (memory, OpenSearch) has nothing to say. `readModelTablesContract` of `@ddd-ts-kit/testing` holds the four ORM to it on PostgreSQL.
|
|
102
|
+
|
|
103
|
+
A project generated by `ddd-ts-kit init` on one of the four ORM has the list in `src/platform/database/read-model-tables.ts`, between markers: an entry is the context of a read model and the class of its store, `['billing', KnexInvoiceSummaries]`, and the context is one of those the file holds in `Contexts`, which `generate context` fills, so an entry under a misspelt name does not compile. `ddd-ts-kit generate read-model` adds the store it writes, under an alias that carries its context when another context holds a store of that class name. `init`, with or without `--force`, adds the read model stores the tree holds and the list does not, so a project generated before the list existed gets it filled; it reads every class of the persistence of each context, several in one file and a store over a base class of the project included; a store it cannot list with certainty (its own constructor is not `(database)` nor `(database, scope)`, or is inherited; a generic class) is named in a note and in `NOT_LISTED` of the file, and the check says at each start that nothing checks its table. A store left out on purpose is a comment of the list that holds `<context>: <Store>` and the reason: `init` leaves it out and nothing warns of it, where an entry merely deleted comes back at the next `init --force`. An application checks, when it starts and before a consumer is subscribed or a request served, the entries of the contexts it hosts: the whole application and the worker every context but those run as services, a service (`generate service`) its context alone, so each root starts on a database that holds its own tables. A listed table that is not ready stops the start, which in a rolling deployment keeps the old instances serving until the migration ran; a pipeline that starts the application before its migrations passes `readModelTables: 'reported'` to `composeApplication`, and the same message is logged as one error. `npm run db:read-models` (`scripts/read-model-tables.ts`) runs the same check on the database `DATABASE_URL` names, for every context or for those `-- --context <name>` names, and needs no other variable of the application: it prints the database it reads (name and host, never credentials, since a `.env` file may give the address), how many tables it read and their names, then each one that is not ready with its migration, and exits 0 when all are ready, 1 when one is not, 2 when `DATABASE_URL` names no database, 3 when no table could be read, 4 when `--context` names a context no listed read model belongs to, with the contexts the list holds. Since the list is a file every context shares, `generate read-model` on an ORM is a step of the conductor under `--local-only` (`docs/guides/parallel-work.md`). The persistence skill of the plugin says when to run the command and how to write the migration of its refusal, and the parallel-work skill names the new conductor step. On TypeORM, the table and the columns of a refusal, the mark of a deleted row included, are named as the database holds them under the naming strategy of the data source. See `docs/concepts/cqrs.md`, "Every table checked at the start, and before a deployment", which also says what the check does not read (a trigger, a rule, a check of a domain, the table under a view).
|
|
104
|
+
|
|
105
|
+
To move: commit, then `ddd-ts-kit init --force`. It writes `src/platform/database/read-model-tables.ts` with the read model stores of the tree listed under their contexts (and keeps the list of a file that has the markers), `scripts/read-model-tables.ts`, the call of the start and the `db:read-models` script of `package.json`; read its notes for a store it could not list. By hand instead:
|
|
106
|
+
|
|
107
|
+
1. `src/platform/database/read-model-tables.ts`:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
import {
|
|
111
|
+
AsyncLocalStorageExecutionScope,
|
|
112
|
+
ReadModelTables,
|
|
113
|
+
type ExecutionScope,
|
|
114
|
+
type ReadModelInATable,
|
|
115
|
+
} from '@ddd-ts-kit/kernel';
|
|
116
|
+
import type { Persistence } from '@/platform/database/persistence';
|
|
117
|
+
// ddd-ts-kit:imports
|
|
118
|
+
import { KnexAgenda } from '@/contexts/scheduling/infrastructure/persistence/knex-agenda.repository';
|
|
119
|
+
// /ddd-ts-kit:imports
|
|
120
|
+
|
|
121
|
+
type Store = new (database: Persistence['database'], scope: ExecutionScope) => ReadModelInATable;
|
|
122
|
+
|
|
123
|
+
type Contexts = [
|
|
124
|
+
// ddd-ts-kit:contexts
|
|
125
|
+
'scheduling',
|
|
126
|
+
// /ddd-ts-kit:contexts
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
const LISTED: readonly (readonly [context: Contexts[number], store: Store])[] = [
|
|
130
|
+
// ddd-ts-kit:read-model-tables
|
|
131
|
+
['scheduling', KnexAgenda],
|
|
132
|
+
// /ddd-ts-kit:read-model-tables
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
const NOT_LISTED: readonly string[] = [
|
|
136
|
+
// ddd-ts-kit:read-models-not-listed
|
|
137
|
+
// /ddd-ts-kit:read-models-not-listed
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
export function readModelTables(persistence: Persistence, contexts?: readonly string[]): ReadModelTables {
|
|
141
|
+
const scope = new AsyncLocalStorageExecutionScope();
|
|
142
|
+
|
|
143
|
+
const listed = LISTED.map(([context, Store]) => ({
|
|
144
|
+
context,
|
|
145
|
+
name: Store.name,
|
|
146
|
+
build: () => new Store(persistence.database, scope),
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
return new ReadModelTables(listed, NOT_LISTED).hosting(contexts);
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
One line per read model kept in a table: the name of its context, as `ddd-ts-kit.config.json` declares it, and the class of its store. The scope is given to a store of tenant data and never read by the check.
|
|
154
|
+
|
|
155
|
+
2. The start. On a container, `platformModule` takes the hosted contexts as a third parameter, `hosted?: readonly ContextModule[]`, reads their names (`const contexts = hosted?.map(({ name }) => name);`), its module holds `onStart: ({ resolve }) => readModelTables(persistence, contexts).atStart(resolve(Logger), options.readModelTables),`, and `compose-application.ts` calls `platformModule(persistence, options, contexts.modules)`. On a platform wired by hand, `readModelTables(contexts: readonly string[]): ReadModelTables;` in the `Platform` interface, `readModelTables: (contexts) => readModelTables(persistence, contexts),` where the platform is created, `start: () => start(platform, options, contexts),` in `composeApplication`, a third parameter `hosted: readonly ContextWiring[]` of `start`, and `await platform.readModelTables(hosted.map(({ name }) => name)).atStart(platform.logger, options.readModelTables);` there, before `options.events.start()`. In both, `readonly readModelTables?: ReadModelTablesAtStart;` in `PlatformOptions`.
|
|
156
|
+
|
|
157
|
+
3. In `package.json`, `"db:read-models": "tsx --env-file-if-exists=.env scripts/read-model-tables.ts"`, and `scripts/read-model-tables.ts`, which opens the persistence on `process.env['DATABASE_URL']` alone (`openPersistence({ databaseUrl })`), refuses with exit code 4 a `--context` that is not among `readModelTables(persistence).contexts`, prints `(await readModelTables(persistence).hosting(contexts).report()).text`, sets `process.exitCode` from `outcome` (`ready` 0, `not-ready` 1, `unread` 3), and closes the persistence.
|
|
158
|
+
|
|
159
|
+
Before the next deployment, `DATABASE_URL=<its database> npm run db:read-models` lists what is left of the 0.111.0 migration.
|
|
160
|
+
|
|
7
161
|
## 0.111.0
|
|
8
162
|
|
|
9
163
|
**The briefing of a worker says upfront that a branch keeps one working migration.** A worker whose second slice changed the schema generated a second working migration, and learned only from the refusal of `drizzle-generate --replay` at the merge that a branch keeps one and generates it again. `worker-scope` and the context builder agent now say it before the first slice.
|
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:d66d20ef651ad8e6 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -646,12 +646,12 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
646
646
|
| `--storage local\|s3` | enregistré comme `stack.storage` : où vit le contenu des fichiers, jamais dans la base de données. `src/platform/config/read-files.ts` et `src/platform/files/open-files.ts`, un par choix : `local`, un répertoire en développement (`FILES_DIRECTORY`, `.data/files`) et les liens signés servis par l'application sous `/files` (`FILES_PUBLIC_URL` et `FILES_SIGNING_SECRET` requises en production) ; `s3`, un bucket de n'importe quel fournisseur du protocole S3 au moyen de `@ddd-ts-kit/s3` (les variables `S3_*`, MinIO dans la stack compose) ; la mémoire du processus dans les tests et les outils, dans les deux cas. Avec `--di tsyringe` : `files/bind-files.ts`, `files/files.module.ts` et `files/staging-uploads.ts` ; en câblage manuel, `files/create-files.ts` ; avec une *stack* HTTP, `files/file-routes.ts`. Ils lient `FileStorage`, `FileKeys`, `FileScanner` et `FileStaging`, enregistrent la purge horaire des fichiers en attente et mettent en attente le fichier que porte une commande avant sa transaction ; `generate file-upload` en a besoin. `--storage none` n'écrit rien de tout cela ([Stockage de fichiers](../../docs/concepts/file-storage.fr.md)) |
|
|
647
647
|
| `--search opensearch\|none` | enregistré comme `stack.search`, `none` par défaut : où vivent les modèles de lecture qu'un contexte tient pour la recherche. `opensearch` : `@ddd-ts-kit/opensearch`, `src/platform/search/search-indexes.ts` (`SearchIndexes`, la classe abstraite que reçoit l'adaptateur d'un port de modèle de lecture : `super(search.options('billing_invoices', criteria))`) et `search/open-search.ts` (`fetchTransport` sur `OPENSEARCH_URL`, l'utilisateur d'`OPENSEARCH_USERNAME` et `OPENSEARCH_PASSWORD` les deux ou aucune, la stratégie `attribute` sous `--tenancy shared-table`, `none` sinon), lié par `search/search.module.ts` sur un conteneur du kit, `platform.search` câblé à la main et sous Nest ; l'index de chaque store construit à partir de lui provisionné avant une requête, sous tables partagées pour le locataire du travail une fois que l'annuaire des locataires de la plateforme le liste (un locataire non listé ne crée aucun index), au mieux au démarrage, qui n'échoue jamais sur la recherche, rien d'appelé sans store ; les scripts de confidentialité reçoivent le nœud ; un service compose `opensearch` (un nœud, extension de sécurité coupée). Aucun générateur n'écrit de store, et le pipeline ne démarre aucun nœud ; un contexte construit ses stores depuis `SearchIndexes` seulement (`search/store-from-platform`). [Modèles de lecture de recherche](../../docs/tools/search-read-models.fr.md) |
|
|
648
648
|
| `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, et pour `--broker` `create-event-provider.ts` : `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, avec `aggregate-key-of.ts` pour l'ordre par agrégat), `NatsEventBus` (`NATS_URL`) ou `RedisStreamsEventBus` de `@ddd-ts-kit/redis/event-bus` (`REDIS_URL` : Redis, Dragonfly ou Valkey), chacun avec un abonné par contexte consommateur (`forConsumer`), `assertTopology` au démarrage, son adresse validée et un service compose avec un contrôle de santé ; ou `custom-event-bus.ts` avec sa *spec* `eventBusContract`. `start-outbox-relay.ts` avec l'outbox. `--broker redis` avec `--cache redis` fait un seul serveur et un seul service compose, `cache` ; seul, le service s'appelle `streams` |
|
|
649
|
-
| `src/platform/database/` | `persistence.ts` (`interface Persistence` : unité de travail, magasins de l'outbox et des événements traités du *package* de l'ORM, la poignée de stockage), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, la connexion (`connect-to-database.ts`, `create-client.ts` ou `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, le schéma de ce que le kit stocke pour l'application), `open-test-database.ts` (PostgreSQL dans le processus, ou le serveur nommé par une URL, chaque appel alors sur une copie de la base migrée, créée et supprimée par `test/support/test-database-clone.ts` ; avec Vitest chaque *spec* ouvre une copie du cluster que `test/support/test-database-template.ts`, la mise en place globale de l'exécution, initialise une fois, et y crée ses tables ; avec drizzle depuis `table-statements.ts`, le SQL des tables de `schema.ts`, puisque drizzle-kit écrit des migrations, pas des tables, ses index uniques compris), `persistence.contract.spec.ts` (les stores de l'outbox, des événements traités, des *jobs* et des processus tels que la plateforme les branche, tenus aux contrats de `@ddd-ts-kit/testing` avec ce que la pile active : le *tenant* sous `--tenancy`, l'unité de travail). La classe de stockage qu'un adaptateur de *repository* nomme dans sa liste de dépendances : `database.ts` avec drizzle et prisma (`abstract class Database extends` le type de contexte du *package* de l'ORM), `KnexContext` de `@ddd-ts-kit/knex`, `TypeOrmContext` de `@ddd-ts-kit/typeorm` |
|
|
649
|
+
| `src/platform/database/` | `persistence.ts` (`interface Persistence` : unité de travail, magasins de l'outbox et des événements traités du *package* de l'ORM, la poignée de stockage), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, la connexion (`connect-to-database.ts`, `create-client.ts` ou `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, le schéma de ce que le kit stocke pour l'application), `open-test-database.ts` (PostgreSQL dans le processus, ou le serveur nommé par une URL, chaque appel alors sur une copie de la base migrée, créée et supprimée par `test/support/test-database-clone.ts` ; avec Vitest chaque *spec* ouvre une copie du cluster que `test/support/test-database-template.ts`, la mise en place globale de l'exécution, initialise une fois, et y crée ses tables ; avec drizzle depuis `table-statements.ts`, le SQL des tables de `schema.ts`, puisque drizzle-kit écrit des migrations, pas des tables, ses index uniques compris), `persistence.contract.spec.ts` (les stores de l'outbox, des événements traités, des *jobs* et des processus tels que la plateforme les branche, tenus aux contrats de `@ddd-ts-kit/testing` avec ce que la pile active : le *tenant* sous `--tenancy`, l'unité de travail), `read-model-tables.ts` (la liste des modèles de lecture gardés dans une table, entre des marqueurs que `generate read-model` remplit, qu'`init` remplit d'après les stores de l'arbre et que `init --force` garde, chaque entrée étant le contexte d'un modèle de lecture et la classe de son store ; `readModelTables(persistence, contexts)` fait lire chaque table de ces contextes par son propre store, donc avec le verdict de ce store ; une application l'appelle à son démarrage, pour les contextes qu'elle héberge (un contexte exécuté en service vérifie ses propres tables, sur sa base), et refuse de démarrer sur une table listée qui ne peut pas contenir la trace d'une ligne supprimée, nommée avec sa migration, ou qu'elle n'a pas pu lire, sauf si `composeApplication` reçoit `readModelTables: 'reported'` ; `scripts/read-model-tables.ts`, `npm run db:read-models`, la demande à la base que nomme `DATABASE_URL` avant un déploiement, pour tous les contextes ou pour ceux que nomme `-- --context <nom>`, sans autre variable, affiche la base qu'il a lue, et sort avec le code 1 quand une table n'est pas prête, 2 sans base à lire, 3 quand aucune table n'a pu être lue, 4 quand `--context` nomme un contexte auquel aucun modèle de lecture listé n'appartient ; une entrée nomme un contexte de `Contexts`, que `generate context` remplit, ou ne compile pas, et un store laissé de côté exprès est un commentaire de la liste qui porte `<contexte>: <Store>`). La classe de stockage qu'un adaptateur de *repository* nomme dans sa liste de dépendances : `database.ts` avec drizzle et prisma (`abstract class Database extends` le type de contexte du *package* de l'ORM), `KnexContext` de `@ddd-ts-kit/knex`, `TypeOrmContext` de `@ddd-ts-kit/typeorm` |
|
|
650
650
|
| outillage des migrations | `drizzle.config.ts`, `knexfile.js` et le dossier `migrations/`, `prisma/schema/schema.prisma` (le client, la datasource et les tables de la plateforme ; `generate repository` ajoute le fichier de chaque contexte, `prisma/schema/<context>.prisma`) et `prisma.config.ts`, ou `data-source.ts`. Un projet qui garde le seul `prisma/schema.prisma` des versions antérieures à 0.95 le garde avec son `prisma.config.ts` et son `db:client`, même sous `--force` : `init` n'écrit rien sous `prisma/schema/`, ses notes donnent les étapes du déplacement en nommant les contextes du projet, et `generate repository` refuse jusqu'au déplacement |
|
|
651
651
|
| `scripts/openapi.ts`, `scripts/events.ts` | écrivent `openapi/openapi.yaml` (un fichier par document de `openapi.documents`), `docs/integration/asyncapi.yaml` et `docs/integration/event-catalog.md`, en JSON sous `openapi.format: json` ; `--check` échoue sur une différence |
|
|
652
652
|
| `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | avec `--privacy on`, les deux demandes d'une personne concernée, traitées en ligne de commande sur les sources avec les variables de `.env` (`npm run privacy:erase -- <subject-id> [--operator <qui-demande>] [--rerun]`, `npm run privacy:export -- <subject-id> > export.json`) : l'effacement détruit d'abord la clé de la personne quand le projet a un event store (`--event-sourcing on` : ses événements stockés se lisent effacés ; audité avec `--audit on`), puis efface chaque copie listée dans `src/platform/privacy/data-subject-copies.ts`, chacune laissant son entrée avec `--audit on`, et ce que l'outbox et le stockage des *jobs* gardent de la personne ; un id qui n'a rien atteint est refusé, code de sortie 1, et annoncé à personne, sauf si `--rerun` dit que cette personne a déjà été effacée ; `privacy:purge` lance à la main ce que le *job* `privacy.purge-expired` lance chaque nuit à 03:00 UTC, la purge de ce qui a dépassé sa durée de conservation (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` coupe le *job*) ; l'export rassemble chaque enregistrement listé dans `data-subject-exports.ts` en un document JSON daté (`format`, `subject`, `exportedAt`, `records`), l'export de chaque contexte audité avec `--audit on`, jamais les valeurs (chaque exécution laisse son entrée, un essai compris : essayez-le sur une personne de test). Avec `--tenancy shared-table`, `TENANTS` nomme les tenants, séparés par des virgules : une écriture de données de tenant n'est jamais élargie. Ni l'un ni l'autre n'atteint les sauvegardes, les journaux, une copie qu'aucun contexte n'a déclarée, un message déjà livré ou un *job* qui ne nomme aucun `subject` |
|
|
653
653
|
| `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | la base de données avec un contrôle de santé et un volume nommé, `jaegertracing/jaeger:2.22.0` derrière le profil `observability`, chaque port publié sur 127.0.0.1 seulement (une adresse plus large s'écrit dans l'entrée à dessein, le README du projet dit comment), les ports depuis `.env` ; une image multi-étapes, sans root, avec les seules dépendances de production |
|
|
654
|
-
| `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (l'application entière sur un port libre, sur une base de données dans le processus sauf si `DATABASE_URL` est définie, alors sur une
|
|
654
|
+
| `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (l'application entière sur un port libre, sur une base de données dans le processus sauf si `DATABASE_URL` est définie, alors sur une base par fichier de *spec*, les tables de cette base migrée, vidées sauf celles que liste `test/support/test-database-kept.ts`, si bien que les fichiers s'exécutent en même temps sur un serveur aussi ; `test/support/test-database-setup.ts`, une mise en place globale de l'exécution, copie et vide la base migrée une fois, partage entre les fichiers qui s'exécutent en même temps les connexions qu'il reste au serveur et supprime ce qu'une exécution tuée a laissé (`test/support/test-database-*.ts`) ; aucun *job* lancé par le temps ; `settled()` se résout quand l'outbox a relayé ce que les requêtes HTTP ont enregistré ; `publish(events)` remet des événements d'intégration de l'amont à ses gestionnaires, comme le ferait le relais de cet amont), `create-credentials.ts` (au nom de qui un test appelle, `application.as({ id, roles })` ; en RBAC et en ABAC les rôles sont ceux de `Role` dans `src/platform/auth/authorization/role.ts`, si bien que `roles: [Role.Admin]` est complété par l'éditeur et qu'un rôle mal orthographié ne compile pas), `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)` : une trace sans les appels qu'un adaptateur fait sur lui-même, la forme que vérifie `expectSpanTree`) |
|
|
655
655
|
| `docs/context-map.md`, `docs/integration/README.md` | voir `docs` |
|
|
656
656
|
| `test/architecture/extractable.spec.ts` | écrit avec le premier contexte : démarre chaque contexte seul sur le kernel et la plateforme, ses *jobs* compris |
|
|
657
657
|
| `eslint.config.mjs` | le preset `dddTsKit` de `@ddd-ts-kit/eslint-plugin`, lint typé sur le tsconfig du projet |
|
|
@@ -732,6 +732,15 @@ de ses options ; `typeorm-generate` refuse aussi un dossier hors du projet. Avec
|
|
|
732
732
|
`{ code, written, messages }` sur une ligne : le code de sortie, les fichiers du dossier de migrations
|
|
733
733
|
nouveaux ou modifiés, et ce que la commande a dit ; la sortie de l'outil de l'ORM va sur stderr.
|
|
734
734
|
|
|
735
|
+
Sur Prisma, `db:client` (`ddd-ts-kit prisma-client --schema prisma/schema`), que lancent `pretest`,
|
|
736
|
+
`pretest:e2e`, `pretypecheck` et `prebuild`, écrit le client (`prisma generate`) et le schéma des
|
|
737
|
+
tests (`prisma migrate diff --from-empty` dans `generated/schema.sql`) sauf s'ils sont à jour :
|
|
738
|
+
générés des mêmes fichiers du schéma, du même `prisma.config.ts`, des mêmes `prisma` et
|
|
739
|
+
`@prisma/client`, et toujours là (`generated/prisma-client.sha256` garde ce dont ils viennent ;
|
|
740
|
+
supprimer `generated/` les écrit de nouveau). Deux exécutions dans un même projet passent tour à
|
|
741
|
+
tour par `.ddd-ts-kit/prisma-client` : deux exécutions des tests lancées ensemble n'écrivent jamais
|
|
742
|
+
le client en même temps.
|
|
743
|
+
|
|
735
744
|
`package.json` porte deux compilateurs : `typescript ~6.0.3`, que les outils chargent comme une
|
|
736
745
|
bibliothèque, et `@typescript/native` (`npm:typescript@~7.0.2`), que `build` et `typecheck`
|
|
737
746
|
appellent par son chemin (`node node_modules/@typescript/native/bin/tsc`). `npx tsc` lancerait
|
|
@@ -841,7 +850,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
841
850
|
| `port` | `<context> <Name> [--module <module>]` | `application/ports/<name>.port.ts`, une classe abstraite, et son *fake* |
|
|
842
851
|
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer] [--cache public\|private\|no-store] [--module <module>]` | sous `"stack.routes": "controllers"` : une classe contrôleur dans `presentation/http/<resource>/<use-case>/` (la ressource est le premier segment du chemin), qui dépend de `CommandBus` ou de `QueryBus`, derrière le groupe de routes de sa ressource, écrit avec elle quand il est nouveau (`<resource>.routes.ts` : préfixe, étiquette, `Authenticated`) ; un cas d'usage public ne se tient dans aucun groupe et dit `guards: [Public]` ; avec class-validator, une classe par fichier (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`) ; `--mapper` et `--serializer` ajoutent un *mapper* de requête HTTP et un sérialiseur que reçoit le contrôleur ; une *spec* ; aucun enregistrement dans un projet déclaré, un contrôleur construit à la main dans `<context>.routes.ts` (le fichier de module en câblage manuel) dans un projet explicite. Sous `"functions"` : une fonction `defineRoute`, sa *spec*, son enregistrement dans `<context>.routes.ts`, et des classes `<use-case>-<role>.dto.ts` |
|
|
843
852
|
| `controller` | les mêmes arguments que `route` | la classe contrôleur, quoi que dise `stack.routes` : pour un projet de routes en fonctions qui écrit sa prochaine route comme une classe. `--cache` écrit sa politique de cache : `private` (un `GET` d'un appelant, `max-age=0`, `must-revalidate`, `ETag` fort), `public` (un `GET` d'un cas d'usage public, `max-age` 1m, `s-maxage` 5m, étiqueté avec les ressources de son chemin), `no-store` ; refusé sur une écriture, et `public` derrière un groupe de routes |
|
|
844
|
-
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>] [--module <module>]` | un téléversement : un contrôleur qui déclare le fichier qu'il reçoit (sa taille et ses types de média dans le contrat, vérifiés au fil du flux), la commande qui le porte comme un `FileUpload`, mis en attente par le bus de commandes avant la transaction, le gestionnaire qui l'enregistre et le promeut avec la validation (commit), et leurs *specs*. Refusé sans `stack.storage` ou sans *stack* HTTP, avec le `init --force --storage local` à lancer |
|
|
853
|
+
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>] [--text utf-8\|single-byte] [--module <module>]` | un téléversement : un contrôleur qui déclare le fichier qu'il reçoit (sa taille et ses types de média dans le contrat, vérifiés au fil du flux ; avec `--text`, un fichier texte tel qu'un CSV sous les noms que les navigateurs lui donnent, `single-byte` quand il peut être en Windows-1252 aussi bien qu'en UTF-8, et une *spec* qui en envoie un à travers le lecteur multipart), la commande qui le porte comme un `FileUpload`, mis en attente par le bus de commandes avant la transaction, le gestionnaire qui l'enregistre et le promeut avec la validation (commit), et leurs *specs*. Refusé sans `stack.storage` ou sans *stack* HTTP, avec le `init --force --storage local` à lancer |
|
|
845
854
|
| `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts` : une classe vide qui porte `@RouteGroup`, derrière `Authenticated` sauf si `--public` ou `--role` dit autre chose (`HasRole(Role.Admin)`, le rôle lu dans le vocabulaire de la plateforme, `<platformDir>/auth/authorization/role.ts`, qui le reçoit s'il ne le contient pas) ; avec `--group`, il affine ce groupe et en hérite |
|
|
846
855
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts` : une classe de garde déclarée à remplir, et sa *spec* |
|
|
847
856
|
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...] [--module <module>]` | après `generate route` du cas d'usage (un contrôleur sous `"stack.routes": "controllers"` ou `"nest"`) ou `generate controller` : ajoute `produces` au `@Controller` du cas d'usage, et `consumes: ['application/xml']` à celui qui reçoit un corps quand XML est demandé ; dit quand CSV a besoin d'une page ou d'une liste en flux, et quand `stack.representations` n'est pas `negotiated` |
|
|
@@ -2166,6 +2175,22 @@ une ligne de ponctuation perdue, ni un changement de sens, et un clone superfici
|
|
|
2166
2175
|
*commits* qu'elle lit : en CI il lui faut `fetch-depth: 0`, c'est pourquoi les *pipelines*
|
|
2167
2176
|
d'`init` ne la lancent pas.
|
|
2168
2177
|
|
|
2178
|
+
**Les migrations de la branche face au tronc.** Sans `<commit>`, elle lit ensuite les migrations
|
|
2179
|
+
de l'arbre de travail face au même tronc, avec les quatre ORM : une migration que la branche
|
|
2180
|
+
ajoute et dont le nom se trie avant la dernière migration du tronc (knex, Prisma, TypeORM), une
|
|
2181
|
+
entrée que la branche ajoute au journal de drizzle-kit et dont le `when` n'est pas après la
|
|
2182
|
+
dernière entrée de celui du tronc, et un fichier `.sql` que ce journal ne liste pas et que le
|
|
2183
|
+
tronc ne contient pas. Ce qui est ordonné est ce que l'outil prend pour une migration, selon ce
|
|
2184
|
+
par quoi il l'ordonne : chaque script du dossier de knex et les dossiers de Prisma qui
|
|
2185
|
+
contiennent un `migration.sql`, par leur nom ; les classes de TypeORM dont le nom se termine par
|
|
2186
|
+
13 chiffres, par ce nombre. Chacune est
|
|
2187
|
+
une erreur qui nomme la migration, la dernière du tronc et la commande qui remet l'ordre
|
|
2188
|
+
(`merge-trunk` sous drizzle-kit, ou le `meta/` du tronc puis `drizzle-generate --replay` une fois
|
|
2189
|
+
le tronc fusionné ; `merge-trunk --to-land` ailleurs), et `--warn` ne l'adoucit pas : code de
|
|
2190
|
+
sortie 1. Une migration de travail (`working-<what-it-does>`) est laissée de côté. Dans
|
|
2191
|
+
`--json` : `migrations`, chacune `{ kind, migration, file, trunkLast, text, fix }` avec `kind`
|
|
2192
|
+
`before-trunk` ou `not-in-journal`, comptées dans `errorCount`.
|
|
2193
|
+
|
|
2169
2194
|
|
|
2170
2195
|
## merge-trunk
|
|
2171
2196
|
|
|
@@ -2261,6 +2286,18 @@ nécessaire pour une base que git ne calculerait pas ; un git plus ancien fusion
|
|
|
2261
2286
|
`git merge` lui-même depuis `git merge-base` (`--since <merge base>`), et refuse `--dry-run`.
|
|
2262
2287
|
Sortie 0 une fois commité, à jour ou en aperçu, 1 sur un arrêt, 2 quand il ne peut pas démarrer.
|
|
2263
2288
|
|
|
2289
|
+
Sur une branche qui contient déjà le tronc, il n'y a rien à fusionner. `--to-land` fait quand
|
|
2290
|
+
même atterrir ses migrations quand l'une est une migration de travail, se trie avant la dernière
|
|
2291
|
+
du tronc ou manque au journal de drizzle-kit : rejouées sous drizzle-kit, renommées après la
|
|
2292
|
+
dernière du tronc sous knex, Prisma et TypeORM, seulement celles qui ne suivent pas déjà celles du
|
|
2293
|
+
tronc et dans leur ordre (un arrêt, code de sortie 1, quand l'une d'elles et une migration plus
|
|
2294
|
+
récente du tronc nomment la même table : l'arrêt dit de la supprimer, puis de la générer de
|
|
2295
|
+
nouveau). Elles sont laissées à committer : aucun commit de fusion ne les porte. Un arrêt laisse
|
|
2296
|
+
le dossier des migrations comme il a été trouvé, donc la même commande se relance, et `--dry-run`
|
|
2297
|
+
dit quelles migrations bougeraient. Chaque renommage ou rejeu se termine par ce qu'il faut faire
|
|
2298
|
+
d'une base qui a déjà appliqué l'ancien nom : la réinitialiser, ou corriger sa table des
|
|
2299
|
+
migrations (la table de chaque outil est dans `docs/tools/persistence.fr.md`).
|
|
2300
|
+
|
|
2264
2301
|
```text
|
|
2265
2302
|
merge-trunk build/billing-2 <- origin/main (d8d281b)
|
|
2266
2303
|
base 6d8be4b: build/billing-1 landed as d8d281b "feat(billing): issue and cancel (#1)"
|
|
@@ -2346,6 +2383,13 @@ Un chemin qui n'existe nulle part, ou un dossier sans fichier TypeScript sous la
|
|
|
2346
2383
|
sources, est une erreur de l'appelant : `check` le refuse (code 2) au lieu de déclarer le projet
|
|
2347
2384
|
propre.
|
|
2348
2385
|
|
|
2386
|
+
Avec des chemins, `check` signale les constats posés sur un fichier donné ou sous un dossier
|
|
2387
|
+
donné, et ceux qui s'y réparent : un registre de modèle de lecture absent de la liste, signalé
|
|
2388
|
+
sur son propre fichier, est signalé quand la liste est le chemin demandé, et un gestionnaire dont
|
|
2389
|
+
aucune politique ne répond quand son fichier de module l'est. Le crochet de pré-commit, qui
|
|
2390
|
+
interroge sur les fichiers indexés, signale alors ce qu'un changement indexé casse dans un fichier
|
|
2391
|
+
qui ne l'est pas. `--changed-since` garde un constat d'après ces deux mêmes fichiers.
|
|
2392
|
+
|
|
2349
2393
|
Chaque violation a un identifiant de règle, une sévérité, un fichier, une ligne, un message et un
|
|
2350
2394
|
`fix` : une phrase qui dit quoi faire à la place. Code de sortie 1 quand il y a au moins une
|
|
2351
2395
|
erreur. Supposons que l'agrégat `Reminder` de l'application d'exemple lise l'horloge système dans
|
|
@@ -2516,9 +2560,9 @@ règle.
|
|
|
2516
2560
|
| `clean/one-export-per-file` | sous la racine des sources, tests à part : plus d'une classe, interface ou fonction exportée que les tolérances n'expliquent pas (les types de la signature de l'export principal, un type et une valeur qui partagent un nom, un type avec ses constructeurs, les accesseurs d'un même état privé, `onePerFile.allow`) ; un fichier qui ne porte pas le nom de son export principal en kebab-case (`invoice.aggregate.ts` pour `Invoice`) ; un `index.ts` ou un `<context>.declarations.ts` qui contient autre chose que des réexports |
|
|
2517
2561
|
| `clean/file-size` | un fichier de plus de 350 lignes, sources et tests ; un chemin avec un segment `generated` et les fichiers de déclaration sont exemptés |
|
|
2518
2562
|
| `composition/only-in-module` | `new X`, ou `bind(..).toClass(X, ..)` et `rebind(..).toClass(X, ..)`, d'une classe importée de `infrastructure/`, hors du fichier de module, de `main.ts`, de la plateforme et des tests ; dans un fichier qui importe `@ddd-ts-kit/di`, un appel de `contextModule`, `discoverContext` ou `.include(` hors de ces endroits et de `apps/<context>/main.ts` |
|
|
2519
|
-
| `imports/alias-only` | sous la racine des sources, `test/` et `scripts/` : un `import`, `export ... from` ou `import()` avec un spécificateur relatif, même répertoire compris (la correction nomme l'alias à écrire ; `eslint --fix` l'écrit) ; un spécificateur d'alias avec un segment `.` ou `..` |
|
|
2563
|
+
| `imports/alias-only` | sous la racine des sources, `test/` et `scripts/` : un `import`, `export ... from` ou `import()` avec un spécificateur relatif, même répertoire compris (la correction nomme l'alias à écrire ; `eslint --fix` l'écrit), sauf `./<nom>` entre deux fichiers placés directement sous `test/support/`, qu'un lanceur de tests charge avant qu'aucun alias n'existe ; ce `./<nom>` quand la source présente sur le disque porte un autre nom (une source `.ts` nommée avec une extension sous `none` ; sous `js`, `./x` ou `./x.js` pour `x.ts`, `./x.mjs` pour `x.mts`, `./x.cjs` pour `x.cts`), nomme `.` ou `..`, ou nomme un répertoire ; un spécificateur d'alias avec un segment `.` ou `..` |
|
|
2520
2564
|
| `imports/extension` | sous la racine des sources, `test/` et `scripts/` : avec `importExtension` `none`, un spécificateur d'alias qui se termine par `.js`, `.mjs`, `.cjs`, `.ts`, `.mts` ou `.cts` ; avec `js` (ou sans clé), un spécificateur d'alias qui ne se termine pas par `.js` (la correction nomme le spécificateur à écrire ; `eslint --fix` l'écrit). Un sous-chemin de *package* n'est jamais jugé |
|
|
2521
|
-
| `imports/alias-declared` | un `importAlias` qui n'est pas `@/` ou `$<name>/`, ou qui est `$test/`, `$scripts/`, `$generated/` ; une entrée `paths` de `tsconfig.json` manquante ou différente de ce que donne `importAlias` (la correction donne l'entrée) ; une autre entrée `paths` sous un alias ; un `baseUrl` ; un `tsconfig.build.json` dont les `paths` diffèrent ; des `paths` de `knip.json` qui associent un alias ; un script qui compile (`tsc` sans `--noEmit`) et ne lance pas `ddd-ts-kit build-aliases` ensuite ; un script qui lance `tsx --tsconfig` sur un autre fichier ; une configuration `vitest` à la racine sans `tsconfigPaths: true`, une configuration `jest` sans les entrées `moduleNameMapper` dérivées, ou `.dependency-cruiser.cjs` sans `tsConfig` ; un `module` et un `moduleResolution` de `tsconfig.json` (ou d'un `tsconfig.build.json` qui pose les siens) qui ne sont pas ce que donne `importExtension` : `ESNext`, `Bundler` et `customConditions` contenant `node` sous `none`, et sous `js` une valeur écrite qui n'est pas une résolution Node ; une association jest dont le motif ne se termine pas comme les imports. Un projet sans `package.json` n'est pas jugé |
|
|
2565
|
+
| `imports/alias-declared` | un `importAlias` qui n'est pas `@/` ou `$<name>/`, ou qui est `$test/`, `$scripts/`, `$generated/` ; une entrée `paths` de `tsconfig.json` manquante ou différente de ce que donne `importAlias` (la correction donne l'entrée) ; une autre entrée `paths` sous un alias ; un `baseUrl` ; un `tsconfig.build.json` dont les `paths` diffèrent ; des `paths` de `knip.json` qui associent un alias ; un script qui compile (`tsc` sans `--noEmit`) et ne lance pas `ddd-ts-kit build-aliases` ensuite ; un script qui lance `tsx --tsconfig` sur un autre fichier ; une configuration `vitest` à la racine sans `tsconfigPaths: true`, une configuration `jest` sans les entrées `moduleNameMapper` dérivées, ou `.dependency-cruiser.cjs` sans `tsConfig` ; un `module` et un `moduleResolution` de `tsconfig.json` (ou d'un `tsconfig.build.json` qui pose les siens) qui ne sont pas ce que donne `importExtension` : `ESNext`, `Bundler` et `customConditions` contenant `node` sous `none`, et sous `js` une valeur écrite qui n'est pas une résolution Node ; une association jest dont le motif ne se termine pas comme les imports ; sous `js`, un fichier placé directement sous `test/support/` qui importe un voisin par son `.ts` alors que `tsconfig.json` ne fixe ni `allowImportingTsExtensions` ni `rewriteRelativeImportExtensions` ; quelle que soit la terminaison, un `tsconfig.build.json`, ou un tsconfig qu'un script compile pour ce qui est livré, qui résout `noEmit` à `true`, ou `allowImportingTsExtensions` à `true` sans `rewriteRelativeImportExtensions` ni `emitDeclarationOnly`. Un projet sans `package.json` n'est pas jugé |
|
|
2522
2566
|
| `config/valid` | un amont, une classification, une relation, un identifiant de règle, un mode de `guard` ou un `importExtension` inconnu ; un répertoire de la configuration qui sort du projet ; un contexte absent du disque ou de la configuration ; une limite de `commit` qui n'est pas un entier positif |
|
|
2523
2567
|
| `config/suppression-needs-reason` | une désactivation sans identifiant de règle ou sans raison (gardée comme alias à côté de `governance/recorded-deviation`, qui juge la raison) |
|
|
2524
2568
|
| `authz/declared` | dans un fichier de module, `builder.command(X)` ou `builder.query(X)` sans `.requires(` ni `.public(` dans sa chaîne, sauf si la classe du message porte `@Requires` ou `@Public` de `@ddd-ts-kit/kernel/declarations` ; en câblage manuel ou nest, une classe de commande ou de requête absente de tous les `requires(X, ...)` et `publicUseCase(X)` du fichier de module et de `application/authorization/` ; un `defineRoute` sans `security` (le type de la route le refuse déjà, et une liste vide aussi : c'est le filet au niveau du texte pour une définition construite de façon lâche) ; dans le style déclaré, la classe exportée d'un fichier `*.command.ts` ou `*.query.ts` qui ne porte ni `@Requires` ni `@Public` |
|
|
@@ -2535,10 +2579,12 @@ règle.
|
|
|
2535
2579
|
| `authz/actor-explicit` | dans `domain/` et `application/` : `ActorContext`, `ExecutionScope` (comme type ou comme valeur : la classe est le jeton d'une liste de dépendances), `AsyncLocalStorageExecutionScope`, `ScopedActorContext`, `AsyncLocalStorage` ; `.current()` ou `.require()` sur un contexte d'acteur ou sur quelque chose nommé `scope`, `scopes` ou `...executionScope` ; un import de `stampCreation`, `stampUpdate` ou `tenantScopeOf` |
|
|
2536
2580
|
| `authz/fields-by-schema` | sous `application/queries/` : `roles.includes(`, `.some(`, `.every(`, `.find(`, `.indexOf(`, une comparaison avec un `role`, `isAdmin` |
|
|
2537
2581
|
| `aspects/outside-in` | un import de `@ddd-ts-kit/aspects/decorators` hors de `infrastructure/` d'un contexte et du répertoire de la plateforme : `presentation/`, le fichier de module, `published-language/`, le noyau partagé, `main.ts`, toute autre source (`domain/` et `application/` sont signalés par les deux règles `layer/*` à la place) |
|
|
2582
|
+
| `aspects/timeout-covers-delegate` | un adaptateur déclaré avec `@Adapter` ou `@Gateway`, ou lié par `bind(Port).toClass(Adapter)` dans un fichier qui importe `@ddd-ts-kit/di`, qui s'exécute sous la seule politique par défaut et dont le constructeur a un paramètre typé par un port dont l'adaptateur déclare un délai plus long. Sous la seule politique par défaut : le genre `external` ou `gateway` (le littéral de `kind:` ou de `.as(` ; `external` pour un `@Adapter` sans `kind`, aucun pour une liaison sans `.as(`), aucun `ownPolicy(...)` et aucun `timeout(...)` parmi les éléments de `aspects: [...]` ou les arguments de `.with(...)`. Le délai par défaut : le `fallback: <nombre>` écrit après la chaîne `'OUTBOUND_TIMEOUT_MS'`, premier argument d'un appel, dans un seul fichier du répertoire de la plateforme, sinon le `timeoutMs: <nombre>` de `<platform>/resilience/default-resilience-settings.ts`. Le délai derrière le port : le plus petit `timeout(<nombre>)` qui est un élément de ses aspects ou un argument de son `ownPolicy(...)`, quand il a un `ownPolicy(...)` ou un genre que la politique par défaut laisse de côté. La classe d'une liaison est celle que le fichier de la liaison déclare ou importe sous ce nom, sinon la seule classe de ce nom. Muette sur : une plateforme câblée à la main (`platform.adapter(...)`) ; une durée ou un genre qui n'est pas un littéral ; un aspect qui est une variable, une décomposition, un appel d'un autre nom ou sous `when(...)` ; un `timeout(` imbriqué dans les options d'un autre aspect ; un `@Timeout` sur une méthode ; un port ou un adaptateur lié plus d'une fois, lié de nouveau par `rebind(`, ou lié sous une condition ; un paramètre typé par un nom que l'adaptateur n'importe pas d'un fichier du projet (un type d'un paquet, une déclaration de son propre fichier) ; deux ports du même nom, sauf si chaque fichier importe le sien depuis le fichier qui le déclare ; un adaptateur atteint à travers un adaptateur intermédiaire ; un délai par défaut qui n'est pas un seul nombre, ou un environnement qui fixe `OUTBOUND_TIMEOUT_MS` ; les nouvelles tentatives |
|
|
2538
2583
|
| `tracing/platform-only` | un import de `@ddd-ts-kit/tracing` ou d'un *package* `@opentelemetry/*` hors du répertoire de la plateforme, de `main.ts` et de `apps/`, tests compris |
|
|
2539
2584
|
| `nest/no-parallel-pipeline` | dans `presentation/`, `infrastructure/` ou le fichier de module d'un contexte, tests à part : un import d'un contrôleur que Nest sert (ses décorateurs de route et de paramètres, sauf si le fichier importe `KitRoute` ou `KitRoutes` de `@ddd-ts-kit/http/nest`), de la requête ou de la réponse brutes, d'un *guard*, d'un *pipe*, d'un filtre d'exceptions ou d'une `HttpException`, d'un intercepteur ou du `Logger` de `@nestjs/common`, un import sans nom de celui-ci, ou un import d'un *package* de Nest dont le kit fait le travail (`@nestjs/core`, `@nestjs/swagger`, `@nestjs/cqrs`, `@nestjs/passport`, `@nestjs/config`, `@nestjs/schedule` et les autres de la section 3 d'ARCHITECTURE.md) ; le message dit ce que le kit fait à sa place ; sous la racine des sources hors des contextes, tests à part : un fichier qui importe `Controller` de `@nestjs/common`, ni `KitRoute` ni `KitRoutes`, et nomme `CommandBus` ou `QueryBus` ou importe un fichier d'un contexte |
|
|
2540
2585
|
| `nest/controllers-current` | avec `"stack.routes": "nest"` : un `<context>.controllers.ts` qui diffère de ce que donnent les contrôleurs Nest du contexte et les signatures de leurs méthodes, ou absent ; une partie de la requête prise entière par aucune classe DTO et que `request` de `@KitRoute` ne donne pas ; une méthode de route qui ne répond ni une classe DTO, ni `Accepted`, ni `void`, et ne déclare pas de `response` dans `@KitRoute` |
|
|
2541
2586
|
| `tenancy/scoped-statement` | avec `stack.tenancy` autre que `none`, dans `infrastructure/` d'un contexte, tests et contexte dont `tenancy` vaut `control-plane` mis à part : sur Knex, l'exécuteur utilisé autrement que comme argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) et tout `.raw(` ; sur Drizzle, instruction par instruction, une lecture, une mise à jour ou une suppression sur l'exécuteur dont le where n'a ni `tenantCondition(` ni `ownTenantCondition(` (en ligne ou dans la variable locale qu'il reçoit), une insertion dont la ligne n'a pas de `tenantScopeOf(`, une requête relationnelle (`executor().query`), un `execute(` brut, ou l'exécuteur gardé dans une variable ; sur Prisma, instruction par instruction sur le client, une lecture (`findFirst(`, `findMany(`, `count(`, `aggregate(`, `groupBy(`) dont le where ne décompose pas `tenantWhere(`, une mise à jour ou une suppression dont le where ne décompose pas `ownTenantWhere(`, une création dont les données ne décomposent pas `tenantScopeOf(` (en ligne ou dans une variable locale que les arguments nomment), `findUnique(`, `upsert(`, une requête brute (`$queryRaw`, `$executeRaw`), ou le client gardé dans une variable ; sur TypeORM, la même chose sur le *manager* (`find*(`, `count*(`, `update(`, `delete(`, `insert(`, la ligne confiée à `insertIgnoringConflict(`, un *query builder* dont le where ne porte aucune condition, `save(`, `upsert(`, `query(`) ; sur les quatre, un magasin de modèle de lecture construit sans son option `tenant`, et une condition du *tenant* qui ne reste pas en `and` avec son instruction : sur Knex `.orWhere*` ou `.or` au sommet d'une instruction de `tenantTable`, `ownTenantTable` ou `whereTenant`, `clearWhere()` ou `clear('where')` sur elle, sur Drizzle la condition sous `or`, `not` ou un gabarit `sql`, sur Prisma l'étalement sous `OR`, `NOT` ou une relation, sur TypeORM de même, un tableau where dont une entrée ne l'étale pas, un `orWhere` au sommet d'un *query builder*, un `where` après celui qui porte la condition. Un where construit par une autre fonction n'est pas suivi |
|
|
2587
|
+
| `persistence/read-model-listed` | un registre de modèle de lecture d'un contexte tenu dans une table (une classe qui n'est pas abstraite au-dessus de `DrizzleReadModelStore`, `KnexReadModelStore`, `PrismaReadModelStore` ou `TypeOrmReadModelStore`, directement ou par des classes du projet, lu comme `init` le lit) que `src/platform/database/read-model-tables.ts` ne liste pas sous son contexte, lui-même ou par une classe qui l'étend, ne nomme pas dans `NOT_LISTED` et ne laisse pas de côté par un commentaire entre ses marqueurs qui porte `<contexte>: <Registre>` : rien ne vérifie sa table. Le correctif donne l'import et l'entrée à ajouter, ou ce qui s'oppose à un registre que la liste ne peut pas construire. Aussi une entrée de la liste dont la classe n'existe pas ou appartient à un autre contexte, une ligne de `NOT_LISTED` dont la classe a disparu ou dont `LISTED` répond du registre, un `LISTED` qu'elle ne peut pas lire et, une fois, un projet sur l'un des quatre ORM qui contient des registres et aucune liste (`ddd-ts-kit init --force`) |
|
|
2542
2588
|
| `standard/no-parallel-interface` | une classe, une interface ou un alias de type déclaré comme `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (hors de `presentation/` et de la plateforme), `UserSession`, `AuthSession`, `SessionData`, `PaginatedResult`, `PageResult`, `PaginatedResponse`, `Paginated`, `PaginationParams`, `PageParams`, `AuditLog`, `AuditLogEntry`, `AuditRecord`, `IJobScheduler`, `JobSchedulerService`, `CronScheduler`, `TaskScheduler`, `IScheduledJob`, `CronJob`, `ScheduledTask`, `BackgroundJob`, `IErrorReporter`, `ErrorReporterService`, `ErrorTracker`, `ExceptionReporter`, `CrashReporter`, `CacheInvalidator`, `CacheInvalidationService`, `CachePurgeService`, `CdnPurger`, `I` suivi d'un nom standard (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) ou un nom de `standardInterfaces` ; une classe qui implémente ou étend l'interface standard est un adaptateur et n'est pas signalée |
|
|
2543
2589
|
| `events/outbox-required` | `stack.events` autre que `outbox` avec un ORM et sans dérogation `stack.events` ; dans `domain/` et `application/`, l'import d'un client de *broker* ou d'une implémentation de bus ou de relais ; un *publisher* qui dépend de plus que `IntegrationEventPublisher` ; un module de la plateforme qui distribue un *publisher* et ne nomme jamais `OutboxPublisher` |
|
|
2544
2590
|
| `events/consumer-idempotent` | une classe de gestionnaire d'événement d'intégration (`application/integration/handlers/*.integration-handler.ts`) qui ne porte pas `@IntegrationEventHandler` et n'est pas non plus enregistrée dans son fichier de module sous un nom de consommateur ; un `@IntegrationEventHandler` dont le `consumer` n'est pas une chaîne littérale non vide ; un `on(` ou un `consume(` libre sans `processed` ; un nom de consommateur utilisé deux fois, dans les déclarations comme dans les enregistrements |
|