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/README.md
CHANGED
|
@@ -616,12 +616,12 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
616
616
|
| `--storage local\|s3` | recorded as `stack.storage`: where the content of files lives, never in the database. `src/platform/config/read-files.ts` and `src/platform/files/open-files.ts`, one per choice: `local`, a directory in development (`FILES_DIRECTORY`, `.data/files`) and the signed links answered by the application under `/files` (`FILES_PUBLIC_URL` and `FILES_SIGNING_SECRET` required in production); `s3`, a bucket of any provider of the S3 protocol through `@ddd-ts-kit/s3` (the `S3_*` variables, MinIO in the compose stack); the memory of the process in the tests and the tools, either way. With `--di tsyringe`: `files/bind-files.ts`, `files/files.module.ts` and `files/staging-uploads.ts`; with hand wiring `files/create-files.ts`; with an HTTP stack `files/file-routes.ts`. They bind `FileStorage`, `FileKeys`, `FileScanner` and `FileStaging`, register the hourly purge of staged files and stage the file a command carries before its transaction; `generate file-upload` needs them. `--storage none` writes none of this ([File storage](../../docs/concepts/file-storage.md)) |
|
|
617
617
|
| `--search opensearch\|none` | recorded as `stack.search`, `none` by default: where the read models a context keeps for search live. `opensearch`: `@ddd-ts-kit/opensearch`, `src/platform/search/search-indexes.ts` (`SearchIndexes`, the abstract class the adapter of a read model port takes: `super(search.options('billing_invoices', criteria))`) and `search/open-search.ts` (`fetchTransport` on `OPENSEARCH_URL`, the user of `OPENSEARCH_USERNAME` and `OPENSEARCH_PASSWORD` both or neither, the tenancy `attribute` under `--tenancy shared-table`, `none` otherwise), bound by `search/search.module.ts` on a container of the kit, `platform.search` wired by hand and under Nest; the index of each store built from it provisioned before a request, under shared tables for the tenant of the work once the tenant directory of the platform lists it (an unlisted tenant creates no index), best effort at the start, which never fails on search, nothing called without a store; the privacy scripts given the node; a compose service `opensearch` (one node, security plugin off). No generator writes a store, and the pipeline starts no node; a context builds its stores from `SearchIndexes` only (`search/store-from-platform`). [Search read models](../../docs/tools/search-read-models.md) |
|
|
618
618
|
| `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, and for `--broker` `create-event-provider.ts`: `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, with `aggregate-key-of.ts` for per-aggregate order), `NatsEventBus` (`NATS_URL`) or `RedisStreamsEventBus` of `@ddd-ts-kit/redis/event-bus` (`REDIS_URL`: Redis, Dragonfly or Valkey), each with one subscriber per consuming context (`forConsumer`), `assertTopology` at start, its address validated and a compose service with a healthcheck; or `custom-event-bus.ts` with its `eventBusContract` spec. `start-outbox-relay.ts` with the outbox. `--broker redis` with `--cache redis` is one server and one compose service, `cache`; alone, the service is `streams` |
|
|
619
|
-
| `src/platform/database/` | `persistence.ts` (`interface Persistence`: unit of work, outbox and processed-event stores of the ORM package, the storage handle), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, the connection (`connect-to-database.ts`, `create-client.ts` or `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, the schema of what the kit stores for the application), `open-test-database.ts` (PostgreSQL in process, or the server named by a URL, each call then on a copy of the migrated database, made and dropped by `test/support/test-database-clone.ts`; with Vitest each spec opens a copy of the cluster `test/support/test-database-template.ts`, the global setup of the run, initialised once, and creates its tables there; with drizzle from `table-statements.ts`, the SQL of the tables of `schema.ts`, since drizzle-kit writes migrations, not tables, its unique indexes included), `persistence.contract.spec.ts` (the outbox, processed-event, job and process stores as the platform wires them, held to the contracts of `@ddd-ts-kit/testing` with what the stack turns on: the tenant under `--tenancy`, the unit of work). The storage class a repository adapter names in its dependency list: `database.ts` with drizzle and prisma (`abstract class Database extends` the context type of the ORM package), `KnexContext` of `@ddd-ts-kit/knex`, `TypeOrmContext` of `@ddd-ts-kit/typeorm` |
|
|
619
|
+
| `src/platform/database/` | `persistence.ts` (`interface Persistence`: unit of work, outbox and processed-event stores of the ORM package, the storage handle), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, the connection (`connect-to-database.ts`, `create-client.ts` or `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, the schema of what the kit stores for the application), `open-test-database.ts` (PostgreSQL in process, or the server named by a URL, each call then on a copy of the migrated database, made and dropped by `test/support/test-database-clone.ts`; with Vitest each spec opens a copy of the cluster `test/support/test-database-template.ts`, the global setup of the run, initialised once, and creates its tables there; with drizzle from `table-statements.ts`, the SQL of the tables of `schema.ts`, since drizzle-kit writes migrations, not tables, its unique indexes included), `persistence.contract.spec.ts` (the outbox, processed-event, job and process stores as the platform wires them, held to the contracts of `@ddd-ts-kit/testing` with what the stack turns on: the tenant under `--tenancy`, the unit of work), `read-model-tables.ts` (the list of the read models kept in a table, between markers `generate read-model` fills, `init` fills from the stores of the tree and `init --force` keeps, each entry the context of a read model and the class of its store; `readModelTables(persistence, contexts)` has each table of those contexts read by its own store, so with the verdict of that store; an application calls it when it starts, for the contexts it hosts (a context run as a service checks its own tables, on its database), and refuses to start on a listed table that cannot hold the trace of a deleted row, named with its migration, or that it could not read, unless `composeApplication` is given `readModelTables: 'reported'`; `scripts/read-model-tables.ts`, `npm run db:read-models`, asks it of the database `DATABASE_URL` names before a deployment, of every context or of those `-- --context <name>` names, needs no other variable, prints the database it read, and exits 1 when a table is not ready, 2 without a database to read, 3 when no table could be read, 4 when `--context` names a context no listed read model belongs to; an entry names a context of `Contexts`, which `generate context` fills, or does not compile, and a store left out on purpose is a comment of the list that holds `<context>: <Store>`). The storage class a repository adapter names in its dependency list: `database.ts` with drizzle and prisma (`abstract class Database extends` the context type of the ORM package), `KnexContext` of `@ddd-ts-kit/knex`, `TypeOrmContext` of `@ddd-ts-kit/typeorm` |
|
|
620
620
|
| migration tooling | `drizzle.config.ts`, `knexfile.js` and the folder `migrations/`, `prisma/schema/schema.prisma` (the client, the datasource and the tables of the platform; `generate repository` adds the file of each context, `prisma/schema/<context>.prisma`) and `prisma.config.ts`, or `data-source.ts`. A project that keeps the one `prisma/schema.prisma` of versions before 0.95 keeps it with its `prisma.config.ts` and its `db:client`, even under `--force`: `init` writes nothing under `prisma/schema/`, its notes give the steps of the move with the contexts of the project named, and `generate repository` refuses until the move |
|
|
621
621
|
| `scripts/openapi.ts`, `scripts/events.ts` | write `openapi/openapi.yaml` (one file per document of `openapi.documents`), `docs/integration/asyncapi.yaml` and `docs/integration/event-catalog.md`, in JSON under `openapi.format: json`; `--check` fails on a difference |
|
|
622
622
|
| `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | with `--privacy on`, the two requests of a data subject, answered from the command line on the sources with the variables of `.env` (`npm run privacy:erase -- <subject-id> [--operator <who-asks>] [--rerun]`, `npm run privacy:export -- <subject-id> > export.json`): the erasure destroys the key of the subject first when the project has an event store (`--event-sourcing on`: its stored events read as erased; audited with `--audit on`), then erases every copy listed in `src/platform/privacy/data-subject-copies.ts`, each leaving its entry with `--audit on`, and what the outbox and the job store keep of the person; an id that reached nothing is refused, exit code 1, and announced to nobody, unless `--rerun` says this person was erased before; `privacy:purge` runs by hand what the job `privacy.purge-expired` runs every night at 03:00 UTC, the purge of what outlived its retention (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` switches the job off); the export gathers every record listed in `data-subject-exports.ts` into one dated JSON document (`format`, `subject`, `exportedAt`, `records`), the export of each context audited with `--audit on`, never the values (every run leaves its entry, a trial included: try it on a test subject). With `--tenancy shared-table`, `TENANTS` names the tenants, comma separated: a write of tenant data is never widened. Neither reaches backups, logs, a copy no context declared, a message already delivered or a job that names no `subject` |
|
|
623
623
|
| `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | the database with a healthcheck and a named volume, `jaegertracing/jaeger:2.22.0` behind the `observability` profile, every port published on 127.0.0.1 only (a wider address is written in the entry on purpose, the README of the project says how), ports from `.env`; a multi-stage, non-root image with production dependencies only |
|
|
624
|
-
| `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (the whole application on a free port, on an in-process database unless `DATABASE_URL` is set, then on a
|
|
624
|
+
| `vitest.e2e.config.ts`, `test/e2e/support/` | `start-application.ts` (the whole application on a free port, on an in-process database unless `DATABASE_URL` is set, then on a database per spec file, the tables of that migrated one, emptied but for those `test/support/test-database-kept.ts` lists, so the files run at the same time on a server too; `test/support/test-database-setup.ts`, a global setup of the run, copies and empties the migrated database once, shares the connections the server has left between the files that run at once and drops what a killed run left (`test/support/test-database-*.ts`); no job run by time; `settled()` resolves once the outbox has relayed what the requests stored; `publish(events)` hands integration events of an upstream to its handlers, as the relay of that upstream would), `create-credentials.ts` (who a test calls as, `application.as({ id, roles })`; under RBAC and ABAC the roles are those of `Role` in `src/platform/auth/authorization/role.ts`, so `roles: [Role.Admin]` is completed by the editor and a misspelled role does not compile), `auth-environment.ts`, `test-environment.ts`, `story-of.ts` (`storyOf(trace)`: a trace without the calls an adapter makes on itself, the form `expectSpanTree` asserts) |
|
|
625
625
|
| `docs/context-map.md`, `docs/integration/README.md` | see `docs` |
|
|
626
626
|
| `test/architecture/extractable.spec.ts` | written with the first context: boots each context alone on the kernel and the platform, its jobs included |
|
|
627
627
|
| `eslint.config.mjs` | the `dddTsKit` preset of `@ddd-ts-kit/eslint-plugin`, typed linting on the project's tsconfig |
|
|
@@ -699,6 +699,14 @@ options; `typeorm-generate` also refuses a folder outside the project. With `--j
|
|
|
699
699
|
`{ code, written, messages }` on one line: the exit code, the files of the migrations folder that are new
|
|
700
700
|
or changed, and what the command said; the output of the ORM tool goes to stderr.
|
|
701
701
|
|
|
702
|
+
On Prisma, `db:client` (`ddd-ts-kit prisma-client --schema prisma/schema`), which `pretest`,
|
|
703
|
+
`pretest:e2e`, `pretypecheck` and `prebuild` run, writes the client (`prisma generate`) and the
|
|
704
|
+
schema of the tests (`prisma migrate diff --from-empty` into `generated/schema.sql`) unless both are
|
|
705
|
+
current: generated from the same files of the schema, `prisma.config.ts`, `prisma` and
|
|
706
|
+
`@prisma/client`, and still there (`generated/prisma-client.sha256` records what they come from;
|
|
707
|
+
removing `generated/` writes them again). Two runs in one project take turns on
|
|
708
|
+
`.ddd-ts-kit/prisma-client`: two test runs started together never write the client at once.
|
|
709
|
+
|
|
702
710
|
`package.json` carries two compilers: `typescript ~6.0.3`, which the tools load as a library,
|
|
703
711
|
and `@typescript/native` (`npm:typescript@~7.0.2`), which `build` and `typecheck` call by path
|
|
704
712
|
(`node node_modules/@typescript/native/bin/tsc`). `npx tsc` would run the older one.
|
|
@@ -804,7 +812,7 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
804
812
|
| `port` | `<context> <Name> [--module <module>]` | `application/ports/<name>.port.ts`, one abstract class, and its fake |
|
|
805
813
|
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer] [--cache public\|private\|no-store] [--module <module>]` | under `"stack.routes": "controllers"`: a controller class in `presentation/http/<resource>/<use-case>/` (the resource is the first segment of the path), depending on `CommandBus` or `QueryBus`, behind the route group of its resource, written with it when it is new (`<resource>.routes.ts`: prefix, tag, `Authenticated`); a public use case stands in no group and says `guards: [Public]`; with class-validator one class per file (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`); `--mapper` and `--serializer` add a request mapper and a serializer the controller is given; a spec; no registration in a declared project, a controller built by hand in `<context>.routes.ts` (the module file with hand wiring) in an explicit one. Under `"functions"`: a `defineRoute` function, its spec, its registration in `<context>.routes.ts`, and `<use-case>-<role>.dto.ts` classes |
|
|
806
814
|
| `controller` | the same arguments as `route` | the controller class, whatever `stack.routes` says: for a project of function routes that writes its next route as a class. `--cache` writes its cache policy: `private` (a `GET` of a caller, `max-age=0`, `must-revalidate`, strong `ETag`), `public` (a `GET` of a public use case, `max-age` 1m, `s-maxage` 5m, tagged with the resources of its path), `no-store`; refused on a write, and `public` behind a route group |
|
|
807
|
-
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>] [--module <module>]` | an upload: a controller that declares the file it receives (its size and media types in the contract, checked as it streams), the command that carries it as a `FileUpload`, staged by the command bus before the transaction, the handler that records it and promotes it with the commit, and their specs. Refused without `stack.storage` or without an HTTP stack, with the `init --force --storage local` to run |
|
|
815
|
+
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>] [--text utf-8\|single-byte] [--module <module>]` | an upload: a controller that declares the file it receives (its size and media types in the contract, checked as it streams; with `--text` a text file such as a CSV under the names browsers give one, `single-byte` when it may be in Windows-1252 as well as UTF-8, and a spec that sends one through the multipart reader), the command that carries it as a `FileUpload`, staged by the command bus before the transaction, the handler that records it and promotes it with the commit, and their specs. Refused without `stack.storage` or without an HTTP stack, with the `init --force --storage local` to run |
|
|
808
816
|
| `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts`: an empty class carrying `@RouteGroup`, behind `Authenticated` unless `--public` or `--role` says otherwise (`HasRole(Role.Admin)`, the role read from the vocabulary of the platform, `<platformDir>/auth/authorization/role.ts`, which gets it when it does not hold it); with `--group` it refines that group and inherits from it |
|
|
809
817
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts`: a declared guard class to fill, and its spec |
|
|
810
818
|
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...] [--module <module>]` | after `generate route` of the use case (a controller under `"stack.routes": "controllers"` or `"nest"`) or `generate controller`: adds `produces` to the `@Controller` of the use case, and `consumes: ['application/xml']` to one that receives a body when XML is asked; says when CSV needs a page or a streamed list, and when `stack.representations` is not `negotiated` |
|
|
@@ -2028,6 +2036,21 @@ two places, a lost line of punctuation or a change of meaning, and a shallow clo
|
|
|
2028
2036
|
commits it reads: in CI it needs `fetch-depth: 0`, which is why the pipelines of `init` do not
|
|
2029
2037
|
run it.
|
|
2030
2038
|
|
|
2039
|
+
**The migrations of the branch against the trunk.** Without a `<commit>`, it then reads the
|
|
2040
|
+
migrations of the working tree against the same trunk, on the four ORM: a migration the branch
|
|
2041
|
+
adds whose name sorts before the last migration of the trunk (knex, Prisma, TypeORM), an entry
|
|
2042
|
+
the branch adds to the journal of drizzle-kit whose `when` is not after the last entry of the
|
|
2043
|
+
trunk's, and a `.sql` file that journal does not list and the trunk does not hold. What is
|
|
2044
|
+
ordered is what the tool takes for a migration, by what it orders it by: every script of the
|
|
2045
|
+
folder of knex and the folders of Prisma that hold a `migration.sql`, by their name; the classes
|
|
2046
|
+
of TypeORM whose name ends with 13 digits, by that number. Each is an error that names the migration,
|
|
2047
|
+
the last one of the trunk and the command that brings the order right (`merge-trunk` under
|
|
2048
|
+
drizzle-kit, or the `meta/` of the trunk then `drizzle-generate --replay` once the trunk is
|
|
2049
|
+
merged; `merge-trunk --to-land` elsewhere), and `--warn` does not soften it: exit 1. A working
|
|
2050
|
+
migration (`working-<what-it-does>`) is left out. In `--json`: `migrations`, each
|
|
2051
|
+
`{ kind, migration, file, trunkLast, text, fix }` with `kind` `before-trunk` or `not-in-journal`,
|
|
2052
|
+
counted in `errorCount`.
|
|
2053
|
+
|
|
2031
2054
|
## merge-trunk
|
|
2032
2055
|
|
|
2033
2056
|
```
|
|
@@ -2110,6 +2133,17 @@ for a base git would not compute; an older git merges with `git merge` itself fr
|
|
|
2110
2133
|
`git merge-base` (`--since <merge base>`), and refuses `--dry-run`. Exit 0 once committed, up to
|
|
2111
2134
|
date or previewed, 1 on a stop, 2 when it cannot start.
|
|
2112
2135
|
|
|
2136
|
+
On a branch that already holds the trunk there is nothing to merge. `--to-land` still lands its
|
|
2137
|
+
migrations when one is a working one, sorts before the last of the trunk or is out of the journal
|
|
2138
|
+
of drizzle-kit: replayed under drizzle-kit, renamed after the last of the trunk under knex, Prisma
|
|
2139
|
+
and TypeORM, only those that do not follow the trunk's already and in their order (a stop, exit
|
|
2140
|
+
1, when one of them and a later migration of the trunk name the same table: the stop says to
|
|
2141
|
+
delete it, then to generate it again). They are left to commit: no merge commit carries them. A
|
|
2142
|
+
stop leaves the migrations folder as it was found, so the same command runs again, and
|
|
2143
|
+
`--dry-run` says which migrations would move. Each rename or replay ends with what to do with a
|
|
2144
|
+
database that already applied the old name: reset it, or correct its migration table (the table
|
|
2145
|
+
of each tool is in `docs/tools/persistence.md`).
|
|
2146
|
+
|
|
2113
2147
|
```text
|
|
2114
2148
|
merge-trunk build/billing-2 <- origin/main (d8d281b)
|
|
2115
2149
|
base 6d8be4b: build/billing-1 landed as d8d281b "feat(billing): issue and cancel (#1)"
|
|
@@ -2193,6 +2227,13 @@ ddd-ts-kit check --commit-size [--staged] [--strict]
|
|
|
2193
2227
|
A path that exists nowhere, or a folder that holds no TypeScript file under the source root, is a
|
|
2194
2228
|
mistake of the caller: `check` refuses it (exit 2) in place of reporting a clean project.
|
|
2195
2229
|
|
|
2230
|
+
With paths, `check` reports the findings that sit on a file given or under a folder given, and
|
|
2231
|
+
those that are repaired in one: a read model store missing from the list, reported on its own
|
|
2232
|
+
file, is reported when the list is the path asked about, and a handler no policy answers for when
|
|
2233
|
+
its module file is. The pre-commit hook, which asks about the staged files, then reports what a
|
|
2234
|
+
staged change breaks in a file that is not staged. `--changed-since` keeps a finding by the same
|
|
2235
|
+
two files.
|
|
2236
|
+
|
|
2196
2237
|
Each violation has a rule id, a severity, a file, a line, a message and a `fix`: one sentence
|
|
2197
2238
|
saying what to do instead. Exit code 1 when there is at least one error. Suppose that the
|
|
2198
2239
|
`Reminder` aggregate of the example application read the system clock in its domain: an `isDue()`
|
|
@@ -2351,9 +2392,9 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
2351
2392
|
| `clean/one-export-per-file` | under the source root, tests apart: more than one exported class, interface or function that the allowances do not explain (the types of the signature of the main export, a type and a value sharing one name, a type with its constructors, the accessors of one private state, `onePerFile.allow`); a file not named after its main export in kebab-case (`invoice.aggregate.ts` for `Invoice`); an `index.ts` or a `<context>.declarations.ts` that holds anything but re-exports |
|
|
2352
2393
|
| `clean/file-size` | a file of more than 350 lines, sources and tests; a path with a segment `generated` and declaration files are exempt |
|
|
2353
2394
|
| `composition/only-in-module` | `new X`, or `bind(..).toClass(X, ..)` and `rebind(..).toClass(X, ..)`, of a class imported from `infrastructure/`, outside the module file, `main.ts`, the platform and tests; in a file importing `@ddd-ts-kit/di`, a call of `contextModule`, `discoverContext` or `.include(` outside those places and `apps/<context>/main.ts` |
|
|
2354
|
-
| `imports/alias-only` | under the source root, `test/` and `scripts/`: an `import`, `export ... from` or `import()` with a relative specifier, the same directory included (the fix names the alias to write; `eslint --fix` writes it); an alias specifier with a `.` or `..` segment |
|
|
2395
|
+
| `imports/alias-only` | under the source root, `test/` and `scripts/`: an `import`, `export ... from` or `import()` with a relative specifier, the same directory included (the fix names the alias to write; `eslint --fix` writes it), but `./<name>` between two files directly under `test/support/`, which a test runner loads before any alias exists; that `./<name>` when the source on disk has another name (a `.ts` source named with an extension under `none`; under `js`, `./x` or `./x.js` for `x.ts`, `./x.mjs` for `x.mts`, `./x.cjs` for `x.cts`), names `.` or `..`, or names a directory; an alias specifier with a `.` or `..` segment |
|
|
2355
2396
|
| `imports/extension` | under the source root, `test/` and `scripts/`: with `importExtension` `none`, an alias specifier that ends with `.js`, `.mjs`, `.cjs`, `.ts`, `.mts` or `.cts`; with `js` (or no key), an alias specifier that does not end with `.js` (the fix names the specifier to write; `eslint --fix` writes it). A package subpath is never judged |
|
|
2356
|
-
| `imports/alias-declared` | an `importAlias` that is not `@/` or `$<name>/`, or that is `$test/`, `$scripts/`, `$generated/`; a `paths` entry of `tsconfig.json` missing or different from what `importAlias` gives (the fix gives the entry); another `paths` entry under an alias; a `baseUrl`; a `tsconfig.build.json` whose `paths` differ; `paths` of `knip.json` mapping an alias; a script that compiles (`tsc` without `--noEmit`) and does not run `ddd-ts-kit build-aliases` afterwards; a script running `tsx --tsconfig` on another file; a `vitest` config at the root without `tsconfigPaths: true`, a `jest` config without the derived `moduleNameMapper` entries, or `.dependency-cruiser.cjs` without `tsConfig`; `module` and `moduleResolution` of `tsconfig.json` (or of a `tsconfig.build.json` that sets its own) that are not what `importExtension` gives: `ESNext`, `Bundler` and `customConditions` holding `node` under `none`, and under `js` a written value that is not a Node resolution; a jest mapping whose pattern does not end as the imports do. A project without `package.json` is not judged |
|
|
2397
|
+
| `imports/alias-declared` | an `importAlias` that is not `@/` or `$<name>/`, or that is `$test/`, `$scripts/`, `$generated/`; a `paths` entry of `tsconfig.json` missing or different from what `importAlias` gives (the fix gives the entry); another `paths` entry under an alias; a `baseUrl`; a `tsconfig.build.json` whose `paths` differ; `paths` of `knip.json` mapping an alias; a script that compiles (`tsc` without `--noEmit`) and does not run `ddd-ts-kit build-aliases` afterwards; a script running `tsx --tsconfig` on another file; a `vitest` config at the root without `tsconfigPaths: true`, a `jest` config without the derived `moduleNameMapper` entries, or `.dependency-cruiser.cjs` without `tsConfig`; `module` and `moduleResolution` of `tsconfig.json` (or of a `tsconfig.build.json` that sets its own) that are not what `importExtension` gives: `ESNext`, `Bundler` and `customConditions` holding `node` under `none`, and under `js` a written value that is not a Node resolution; a jest mapping whose pattern does not end as the imports do; under `js`, a file directly under `test/support/` that imports a neighbour by its `.ts` while `tsconfig.json` sets neither `allowImportingTsExtensions` nor `rewriteRelativeImportExtensions`; whatever the ending, a `tsconfig.build.json`, or a tsconfig a script compiles what ships with, that resolves `noEmit` as `true`, or `allowImportingTsExtensions` as `true` without `rewriteRelativeImportExtensions` or `emitDeclarationOnly`. A project without `package.json` is not judged |
|
|
2357
2398
|
| `config/valid` | unknown upstream, classification, relationship, rule id, `guard` mode or `importExtension`; a directory of the config that leads out of the project; a context missing on disk or in the config; a `commit` limit that is not a positive integer |
|
|
2358
2399
|
| `config/suppression-needs-reason` | a suppression without a rule id or a reason (kept as an alias next to `governance/recorded-deviation`, which judges the reason) |
|
|
2359
2400
|
| `authz/declared` | in a module file, `builder.command(X)` or `builder.query(X)` without `.requires(` or `.public(` in its chain, unless the message class carries `@Requires` or `@Public` of `@ddd-ts-kit/kernel/declarations`; with manual or nest wiring, a command or query class absent from every `requires(X, ...)` and `publicUseCase(X)` of the module file and of `application/authorization/`; a `defineRoute` without `security` (the route type refuses it already, and an empty list too: this is the text-level net for a definition built loosely); in the declared style, the exported class of a `*.command.ts` or `*.query.ts` file carrying neither `@Requires` nor `@Public` |
|
|
@@ -2370,10 +2411,12 @@ const due = handler.isDueNow(new Reminder(new Date('2026-03-01T09:00:00Z'))); //
|
|
|
2370
2411
|
| `authz/actor-explicit` | in `domain/` and `application/`: `ActorContext`, `ExecutionScope` (as a type or as a value: the class is the token of a dependency list), `AsyncLocalStorageExecutionScope`, `ScopedActorContext`, `AsyncLocalStorage`; `.current()` or `.require()` on an actor context or on something named `scope`, `scopes` or `...executionScope`; an import of `stampCreation`, `stampUpdate` or `tenantScopeOf` |
|
|
2371
2412
|
| `authz/fields-by-schema` | under `application/queries/`: `roles.includes(`, `.some(`, `.every(`, `.find(`, `.indexOf(`, a comparison with a `role`, `isAdmin` |
|
|
2372
2413
|
| `aspects/outside-in` | an import of `@ddd-ts-kit/aspects/decorators` outside `infrastructure/` of a context and the platform directory: `presentation/`, the module file, `published-language/`, the shared kernel, `main.ts`, any other source (`domain/` and `application/` are reported by the two `layer/*` rules instead) |
|
|
2414
|
+
| `aspects/timeout-covers-delegate` | an adapter declared with `@Adapter` or `@Gateway`, or bound by `bind(Port).toClass(Adapter)` in a file that imports `@ddd-ts-kit/di`, that runs under the default policy alone and whose constructor has a parameter typed by a port whose adapter states a longer limit. Under the default policy alone: the kind `external` or `gateway` (the literal of `kind:` or of `.as(`; `external` for an `@Adapter` without `kind`, none for a binding without `.as(`), no `ownPolicy(...)` and no `timeout(...)` among the elements of `aspects: [...]` or the arguments of `.with(...)`. The default limit: the `fallback: <number>` written after the string `'OUTBOUND_TIMEOUT_MS'`, the first argument of a call, in one file of the platform directory, else `timeoutMs: <number>` of `<platform>/resilience/default-resilience-settings.ts`. The limit behind the port: the smallest `timeout(<number>)` that is an element of its aspects or an argument of its `ownPolicy(...)`, when it has `ownPolicy(...)` or a kind the default leaves alone. The class of a binding is the one the binding file declares or imports by that name, else the only class of that name. Silent on: 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 |
|
|
2373
2415
|
| `tracing/platform-only` | an import of `@ddd-ts-kit/tracing` or of an `@opentelemetry/*` package outside the platform directory, `main.ts` and `apps/`, tests included |
|
|
2374
2416
|
| `nest/no-parallel-pipeline` | in `presentation/`, `infrastructure/` or the module file of a context, tests apart: an import of a controller Nest serves (its route and parameter decorators, unless the file imports `KitRoute` or `KitRoutes` of `@ddd-ts-kit/http/nest`), the raw request or answer, a guard, a pipe, an exception filter or an `HttpException`, an interceptor or the `Logger` of `@nestjs/common`, a bare import of it, or an import of a package of Nest whose work the kit does (`@nestjs/core`, `@nestjs/swagger`, `@nestjs/cqrs`, `@nestjs/passport`, `@nestjs/config`, `@nestjs/schedule` and the others of section 3 of ARCHITECTURE.md); the message names what the kit does in its place; under the source root outside the contexts, tests apart: a file that imports `Controller` of `@nestjs/common`, neither `KitRoute` nor `KitRoutes`, and names `CommandBus` or `QueryBus` or imports a file of a context |
|
|
2375
2417
|
| `nest/controllers-current` | with `"stack.routes": "nest"`: a `<context>.controllers.ts` that differs from what the Nest controllers of the context and the signatures of their methods give, or is missing; a part of the request taken whole by no DTO class that `request` of `@KitRoute` does not give; a route method that answers no DTO class, `Accepted` or `void` and declares no `response` in `@KitRoute` |
|
|
2376
2418
|
| `tenancy/scoped-statement` | with `stack.tenancy` other than `none`, in `infrastructure/` of a context, tests and a context whose `tenancy` is `control-plane` aside: on Knex the executor used other than as an argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) and any `.raw(`; on Drizzle, statement by statement, a read, update or delete on the executor whose where has no `tenantCondition(` nor `ownTenantCondition(` (inline or in the local it is given), an insert whose row has no `tenantScopeOf(`, a relational query (`executor().query`), a raw `execute(`, or the executor held in a variable; on Prisma, statement by statement on the client, a read (`findFirst(`, `findMany(`, `count(`, `aggregate(`, `groupBy(`) whose where spreads no `tenantWhere(`, an update or a delete whose where spreads no `ownTenantWhere(`, a create whose data spreads no `tenantScopeOf(` (inline or in a local the arguments name), `findUnique(`, `upsert(`, a raw query (`$queryRaw`, `$executeRaw`), or the client held in a variable; on TypeORM the same on the manager (`find*(`, `count*(`, `update(`, `delete(`, `insert(`, the row handed to `insertIgnoringConflict(`, a query builder whose where carries no condition, `save(`, `upsert(`, `query(`); on the four, a read model store built without its `tenant` option, and a tenant condition that is no conjunct of its statement: on Knex `.orWhere*` or `.or` at the top of a statement of `tenantTable`, `ownTenantTable` or `whereTenant`, `clearWhere()` or `clear('where')` on it, on Drizzle the condition under `or`, `not` or a `sql` template, on Prisma the spread under `OR`, `NOT` or a relation, on TypeORM the same, a where array with an entry that does not spread it, an `orWhere` at the top of a query builder, a `where` after the one that carries the condition. A where built by another function is not followed |
|
|
2419
|
+
| `persistence/read-model-listed` | a read model store of a context kept in a table (a class that is not abstract over `DrizzleReadModelStore`, `KnexReadModelStore`, `PrismaReadModelStore` or `TypeOrmReadModelStore`, directly or through classes of the project, read as `init` reads it) that `src/platform/database/read-model-tables.ts` neither lists under its context, itself or through a class that extends it, nor names in `NOT_LISTED`, nor leaves out by a comment between its markers that holds `<context>: <Store>`: nothing checks its table. The fix gives the import and the entry to add, or what stands in the way of a store the list cannot build. Also an entry of the list whose class does not exist or belongs to another context, a line of `NOT_LISTED` whose class is gone or whose store `LISTED` answers for, a `LISTED` it cannot read, and, once, a project on one of the four ORM that holds stores and no list (`ddd-ts-kit init --force`) |
|
|
2377
2420
|
| `standard/no-parallel-interface` | a class, interface or type alias declared as `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (outside `presentation/` and the platform), `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` followed by a standard name (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) or a name of `standardInterfaces`; a class that implements or extends the standard interface is an adapter and is not reported |
|
|
2378
2421
|
| `events/outbox-required` | `stack.events` other than `outbox` with an ORM and no `stack.events` deviation; in `domain/` and `application/`, the import of a broker client or of a bus or relay implementation; a publisher depending on more than `IntegrationEventPublisher`; a platform module that hands out a publisher and never names `OutboxPublisher` |
|
|
2379
2422
|
| `events/consumer-idempotent` | an integration event handler class (`application/integration/handlers/*.integration-handler.ts`) that neither carries `@IntegrationEventHandler` nor is registered in its module file under a consumer name; an `@IntegrationEventHandler` whose `consumer` is not a non-empty string literal; a free `on(` or `consume(` without `processed`; a consumer name used twice, in declarations and registrations alike |
|
package/dist/alias/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { directoryAlias } from './directory-alias.js';
|
|
|
10
10
|
export { FIXED_ALIAS_ROOTS } from './fixed-alias-roots.js';
|
|
11
11
|
export { moduleNameMapper, type MapperTarget } from './module-name-mapper.js';
|
|
12
12
|
export { mapperTargetText } from './mapper-target-text.js';
|
|
13
|
+
export { NEIGHBOUR_SOURCES } from './neighbour-sources.js';
|
|
14
|
+
export { neighbourSuffix } from './neighbour-suffix.js';
|
|
13
15
|
export { specifierOf } from './specifier-of.js';
|
|
14
16
|
export { specifierSuffix } from './specifier-suffix.js';
|
|
15
17
|
export { toAlias } from './to-alias.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,C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EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/alias/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { directoryAlias } from './directory-alias.js';
|
|
|
8
8
|
export { FIXED_ALIAS_ROOTS } from './fixed-alias-roots.js';
|
|
9
9
|
export { moduleNameMapper } from './module-name-mapper.js';
|
|
10
10
|
export { mapperTargetText } from './mapper-target-text.js';
|
|
11
|
+
export { NEIGHBOUR_SOURCES } from './neighbour-sources.js';
|
|
12
|
+
export { neighbourSuffix } from './neighbour-suffix.js';
|
|
11
13
|
export { specifierOf } from './specifier-of.js';
|
|
12
14
|
export { specifierSuffix } from './specifier-suffix.js';
|
|
13
15
|
export { toAlias } from './to-alias.js';
|
package/dist/alias/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What lets the compiler read an import that ends with `.ts`, which the files of `test/support/`
|
|
3
|
+
* write to their neighbours under "importExtension": "js". `allowImportingTsExtensions` is only
|
|
4
|
+
* accepted by a configuration that emits nothing: the type check takes both, and the build sets
|
|
5
|
+
* both back, so that it emits what it emitted without them.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NEIGHBOUR_SOURCES: {
|
|
8
|
+
readonly typeCheck: {
|
|
9
|
+
readonly allowImportingTsExtensions: true;
|
|
10
|
+
readonly noEmit: true;
|
|
11
|
+
};
|
|
12
|
+
readonly build: {
|
|
13
|
+
readonly allowImportingTsExtensions: false;
|
|
14
|
+
readonly noEmit: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=neighbour-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-sources.d.ts","sourceRoot":"","sources":["../../src/alias/neighbour-sources.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;aAC5B,SAAS;iBAAI,0BAA0B;iBAAQ,MAAM;;aACrD,KAAK;iBAAI,0BAA0B;iBAAS,MAAM;;CAC1C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What lets the compiler read an import that ends with `.ts`, which the files of `test/support/`
|
|
3
|
+
* write to their neighbours under "importExtension": "js". `allowImportingTsExtensions` is only
|
|
4
|
+
* accepted by a configuration that emits nothing: the type check takes both, and the build sets
|
|
5
|
+
* both back, so that it emits what it emitted without them.
|
|
6
|
+
*/
|
|
7
|
+
export const NEIGHBOUR_SOURCES = {
|
|
8
|
+
typeCheck: { allowImportingTsExtensions: true, noEmit: true },
|
|
9
|
+
build: { allowImportingTsExtensions: false, noEmit: false },
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=neighbour-sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-sources.js","sourceRoot":"","sources":["../../src/alias/neighbour-sources.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,SAAS,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7D,KAAK,EAAE,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;CACnD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the relative path of a file of `test/support/` to its neighbour ends with under
|
|
3
|
+
* "importExtension": nothing for `none`, the `.ts` of the source otherwise. A test runner loads its
|
|
4
|
+
* global setup, and what that file imports, from the sources and before any alias exists: a `.js`
|
|
5
|
+
* names a file that is not there.
|
|
6
|
+
*/
|
|
7
|
+
export declare function neighbourSuffix(importExtension: string): '' | '.ts';
|
|
8
|
+
//# sourceMappingURL=neighbour-suffix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-suffix.d.ts","sourceRoot":"","sources":["../../src/alias/neighbour-suffix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,EAAE,GAAG,KAAK,CAEnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the relative path of a file of `test/support/` to its neighbour ends with under
|
|
3
|
+
* "importExtension": nothing for `none`, the `.ts` of the source otherwise. A test runner loads its
|
|
4
|
+
* global setup, and what that file imports, from the sources and before any alias exists: a `.js`
|
|
5
|
+
* names a file that is not there.
|
|
6
|
+
*/
|
|
7
|
+
export function neighbourSuffix(importExtension) {
|
|
8
|
+
return importExtension === 'none' ? '' : '.ts';
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=neighbour-suffix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-suffix.js","sourceRoot":"","sources":["../../src/alias/neighbour-suffix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,eAAuB;IACrD,OAAO,eAAe,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite-aliases.d.ts","sourceRoot":"","sources":["../../src/build/rewrite-aliases.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"rewrite-aliases.d.ts","sourceRoot":"","sources":["../../src/build/rewrite-aliases.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAO1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOtD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,GAAG,aAAa,CAuC9F"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { buildLayoutOf } from '../check/alias/build-layout-of.js';
|
|
4
|
+
import { compilerOptionsOf } from '../check/alias/compiler-options-of.js';
|
|
4
5
|
import { walkDirectory } from '../check/project/walk-directory.js';
|
|
5
6
|
import { CliError } from '../cli-error.js';
|
|
6
7
|
import { emittedSpecifier } from './emitted-specifier.js';
|
|
@@ -17,6 +18,7 @@ export function rewriteAliases({ root, roots, suffix, project }) {
|
|
|
17
18
|
if (!fs.existsSync(path.join(root, project))) {
|
|
18
19
|
throw new CliError(`${project} does not exist.`, 'Name the tsconfig of the build with --project <file>.');
|
|
19
20
|
}
|
|
21
|
+
refuseABuildThatEmitsNothing(root, project);
|
|
20
22
|
const layout = buildLayoutOf({ root }, project);
|
|
21
23
|
if (layout === undefined || !isDirectory(path.join(root, layout.outDir))) {
|
|
22
24
|
throw noOutput(project);
|
|
@@ -39,6 +41,15 @@ export function rewriteAliases({ root, roots, suffix, project }) {
|
|
|
39
41
|
specifiers: changed.reduce((sum, { count }) => sum + count, 0),
|
|
40
42
|
};
|
|
41
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* A configuration that resolves `noEmit` made the compiler write nothing, without an error: what its
|
|
46
|
+
* output directory holds, if anything, is an earlier build, and rewriting it would let it ship.
|
|
47
|
+
*/
|
|
48
|
+
function refuseABuildThatEmitsNothing(root, project) {
|
|
49
|
+
if (compilerOptionsOf({ root }, project)?.['noEmit'] === true) {
|
|
50
|
+
throw new CliError(`${project} resolves "noEmit": true: the compiler wrote nothing with it, and what its output directory holds is not this build.`, `Write "noEmit": false under "compilerOptions" in ${project}, and "allowImportingTsExtensions": false when it inherits that one too: a configuration that extends the type check inherits what makes it emit nothing. Or name the tsconfig the build compiled with --project <file>.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
42
53
|
function noOutput(project) {
|
|
43
54
|
return new CliError(`${project} names no output directory that exists.`, 'Compile first (`npm run build` chains the compiler and this command), or name the tsconfig of the build with --project.');
|
|
44
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite-aliases.js","sourceRoot":"","sources":["../../src/build/rewrite-aliases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,Q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OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtF,MAAM,IAAI,QAAQ,CAChB,GAAG,QAAQ,CAAC,MAAM,2FAA2F,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,EAC3J,sOAAsO,CACvO,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,MAAc;IAChD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,aAAa,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE;QACpE,IAAI,CAAC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;AACzE,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;AAC9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-scripts.d.ts","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"build-scripts.d.ts","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,qHAAqH;AACrH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAmB9D"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { lineOf } from '../support/line-of.js';
|
|
2
2
|
import { ALIAS_FILES } from './alias-files.js';
|
|
3
3
|
import { manifestScripts } from './manifest-scripts.js';
|
|
4
|
-
|
|
5
|
-
const COMPILES = /(?:^|[\s/])tsc(?:\.[cm]?js)?(?=\s|$)/;
|
|
6
|
-
const TYPE_CHECK_ONLY = /--noEmit(?:\s|$)/;
|
|
4
|
+
import { scriptSteps } from './script-steps.js';
|
|
7
5
|
const REWRITES = /(?:^|[\s/])(?:ddd-ts-kit|kit\.[cm]?js|bin\.js)\s+build-aliases(?:\s|$)/;
|
|
8
|
-
/** The build of the clients `ddd-ts-kit sdk` generates: their sources import one another by relative paths, no alias. */
|
|
9
|
-
const BUILDS_CLIENTS = /\s-[bp]\s+(?:\.\/)?clients(?:\/|\s|$)/;
|
|
10
6
|
/** A script that compiles and does not rewrite the aliases afterwards: plain `node` could not load what it emits. */
|
|
11
7
|
export function buildScripts(inspected) {
|
|
12
8
|
const read = manifestScripts(inspected);
|
|
13
9
|
return (read?.scripts ?? []).flatMap(([name, command]) => {
|
|
14
|
-
const steps = command
|
|
15
|
-
const compiled = steps.findLastIndex((step) =>
|
|
16
|
-
if (compiled === -1 || steps.slice(compiled + 1).some((step) => REWRITES.test(step))) {
|
|
10
|
+
const steps = scriptSteps(command);
|
|
11
|
+
const compiled = steps.findLastIndex((step) => step.compiles);
|
|
12
|
+
if (compiled === -1 || steps.slice(compiled + 1).some((step) => REWRITES.test(step.text))) {
|
|
17
13
|
return [];
|
|
18
14
|
}
|
|
19
15
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-scripts.js","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"build-scripts.js","sourceRoot":"","sources":["../../../src/check/alias/build-scripts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,QAAQ,GAAG,wEAAwE,CAAC;AAE1F,qHAAqH;AACrH,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAExC,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9D,IAAI,QAAQ,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC1F,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO;YACL,SAAS,CAAC,MAAM,CACd,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,EAAE,IAAI,IAAI,GAAG,CAAC,EAAE,EAC3E,eAAe,IAAI,sEAAsE,EACzF,mMAAmM,CACpM;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Project } from '../model/project.js';
|
|
2
2
|
/**
|
|
3
|
-
* The compiler options of a tsconfig of the project with those it extends from files of the
|
|
4
|
-
* project, the nearest winning; nothing when the file is
|
|
5
|
-
* answered from the project root.
|
|
3
|
+
* The compiler options of a tsconfig of the project with those it extends, from files of the
|
|
4
|
+
* project or from a package installed at its root, the nearest winning; nothing when the file is
|
|
5
|
+
* absent. `rootDir` and `outDir` are answered from the project root.
|
|
6
6
|
*/
|
|
7
7
|
export declare function compilerOptionsOf(project: Pick<Project, 'root'>, file: string, depth?: number): Record<string, unknown> | undefined;
|
|
8
8
|
//# sourceMappingURL=compiler-options-of.d.ts.map
|
|
@@ -4,9 +4,9 @@ import { parseJsonc } from './parse-jsonc.js';
|
|
|
4
4
|
import { readProjectFile } from './read-project-file.js';
|
|
5
5
|
const DEPTH = 8;
|
|
6
6
|
/**
|
|
7
|
-
* The compiler options of a tsconfig of the project with those it extends from files of the
|
|
8
|
-
* project, the nearest winning; nothing when the file is
|
|
9
|
-
* answered from the project root.
|
|
7
|
+
* The compiler options of a tsconfig of the project with those it extends, from files of the
|
|
8
|
+
* project or from a package installed at its root, the nearest winning; nothing when the file is
|
|
9
|
+
* absent. `rootDir` and `outDir` are answered from the project root.
|
|
10
10
|
*/
|
|
11
11
|
export function compilerOptionsOf(project, file, depth = DEPTH) {
|
|
12
12
|
const text = readProjectFile(project, file);
|
|
@@ -14,9 +14,7 @@ export function compilerOptionsOf(project, file, depth = DEPTH) {
|
|
|
14
14
|
if (written === undefined || depth === 0) {
|
|
15
15
|
return undefined;
|
|
16
16
|
}
|
|
17
|
-
const inherited = parentsOf(written['extends'])
|
|
18
|
-
.filter((parent) => parent.startsWith('.'))
|
|
19
|
-
.map((parent) => compilerOptionsOf(project, path.posix.join(path.posix.dirname(file), parent), depth - 1) ?? {});
|
|
17
|
+
const inherited = parentsOf(written['extends']).map((parent) => compilerOptionsOf(project, extended(project, file, parent), depth - 1) ?? {});
|
|
20
18
|
const own = isRecord(written['compilerOptions']) ? written['compilerOptions'] : {};
|
|
21
19
|
return [...inherited, fromRoot(own, path.posix.dirname(file))].reduce((merged, options) => ({ ...merged, ...options }), {});
|
|
22
20
|
}
|
|
@@ -24,6 +22,19 @@ function parentsOf(extended) {
|
|
|
24
22
|
const listed = Array.isArray(extended) ? extended : [extended];
|
|
25
23
|
return listed.filter((parent) => typeof parent === 'string');
|
|
26
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The file an `extends` names, as the compiler finds it: a relative path as written, or completed
|
|
27
|
+
* with `.json`; anything else is a package, read in the `node_modules` of the project root as a
|
|
28
|
+
* file, a file without its `.json`, or a directory that holds a tsconfig.json. A package found
|
|
29
|
+
* through its `exports`, or in a `node_modules` above the root, is not followed.
|
|
30
|
+
*/
|
|
31
|
+
function extended(project, file, parent) {
|
|
32
|
+
const named = parent.startsWith('.')
|
|
33
|
+
? path.posix.join(path.posix.dirname(file), parent)
|
|
34
|
+
: path.posix.join('node_modules', parent);
|
|
35
|
+
const candidates = [named, `${named}.json`, ...(parent.startsWith('.') ? [] : [`${named}/tsconfig.json`])];
|
|
36
|
+
return candidates.find((candidate) => readProjectFile(project, candidate) !== undefined) ?? named;
|
|
37
|
+
}
|
|
27
38
|
function fromRoot(options, directory) {
|
|
28
39
|
const placed = ['rootDir', 'outDir'].flatMap((key) => {
|
|
29
40
|
const value = options[key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-options-of.js","sourceRoot":"","sources":["../../../src/check/alias/compiler-options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AC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACnD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAE3G,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,KAAK,SAAS,CAAC,IAAI,KAAK,CAAC;AACpG,CAAC;AAED,SAAS,QAAQ,CAAC,OAAgC,EAAE,SAAiB;IACnE,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAsB,EAAE;QACvE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAE3B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Violation } from '../model/violation.js';
|
|
2
|
+
import type { Inspected } from './inspected.js';
|
|
3
|
+
/**
|
|
4
|
+
* Under "importExtension": "js" the files of `test/support/` name their neighbours by the `.ts` of
|
|
5
|
+
* their source, which a test runner loads before any alias exists. The compiler refuses that ending
|
|
6
|
+
* unless tsconfig.json lets it read sources, which it accepts only of a configuration that emits
|
|
7
|
+
* nothing; a configuration that extends it and builds then has to emit again. Whatever the ending,
|
|
8
|
+
* a configuration a script compiles what ships with, and tsconfig.build.json, emit: one that
|
|
9
|
+
* resolves `noEmit` writes nothing without an error.
|
|
10
|
+
*/
|
|
11
|
+
export declare function neighbourSources(inspected: Inspected): Violation[];
|
|
12
|
+
//# sourceMappingURL=neighbour-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-sources.d.ts","sourceRoot":"","sources":["../../../src/check/alias/neighbour-sources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiB7C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAiBlE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { neighbourSuffix } from '../../alias/index.js';
|
|
3
|
+
import { loadSourceFile } from '../project/load-source-file.js';
|
|
4
|
+
import { ALIAS_FILES } from './alias-files.js';
|
|
5
|
+
import { compilerOptionsOf } from './compiler-options-of.js';
|
|
6
|
+
import { manifestScripts } from './manifest-scripts.js';
|
|
7
|
+
import { readProjectFile } from './read-project-file.js';
|
|
8
|
+
import { scriptSteps } from './script-steps.js';
|
|
9
|
+
const { build: BUILD, typeCheck: TYPE_CHECK } = ALIAS_FILES;
|
|
10
|
+
const SUPPORT = 'test/support';
|
|
11
|
+
/** A neighbour named by the `.ts` of its source, as `imports/alias-only` asks of a file directly under test/support/; a declaration file is no source. */
|
|
12
|
+
const NEIGHBOUR_SOURCE = /^\.\/[^/]+\.[cm]?ts$/;
|
|
13
|
+
const DECLARATION = /\.d\.[cm]?ts$/;
|
|
14
|
+
/** Either option lets the compiler read an import that ends with `.ts`. */
|
|
15
|
+
const READS_SOURCES = ['allowImportingTsExtensions', 'rewriteRelativeImportExtensions'];
|
|
16
|
+
/** What the compiler accepts `allowImportingTsExtensions` with, in a configuration that emits. */
|
|
17
|
+
const READS_AND_EMITS = ['rewriteRelativeImportExtensions', 'emitDeclarationOnly'];
|
|
18
|
+
/**
|
|
19
|
+
* Under "importExtension": "js" the files of `test/support/` name their neighbours by the `.ts` of
|
|
20
|
+
* their source, which a test runner loads before any alias exists. The compiler refuses that ending
|
|
21
|
+
* unless tsconfig.json lets it read sources, which it accepts only of a configuration that emits
|
|
22
|
+
* nothing; a configuration that extends it and builds then has to emit again. Whatever the ending,
|
|
23
|
+
* a configuration a script compiles what ships with, and tsconfig.build.json, emit: one that
|
|
24
|
+
* resolves `noEmit` writes nothing without an error.
|
|
25
|
+
*/
|
|
26
|
+
export function neighbourSources(inspected) {
|
|
27
|
+
const { project } = inspected;
|
|
28
|
+
const checked = compilerOptionsOf(project, TYPE_CHECK);
|
|
29
|
+
if (checked === undefined) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
const asked = neighbourSuffix(project.config.importExtension) !== '' && namesANeighbourSource(inspected);
|
|
33
|
+
const reads = READS_SOURCES.some((option) => checked[option] === true);
|
|
34
|
+
return [
|
|
35
|
+
...(asked && !reads ? [unread(inspected)] : []),
|
|
36
|
+
...builds(inspected)
|
|
37
|
+
.filter((file) => silent(compilerOptionsOf(project, file)))
|
|
38
|
+
.map((file) => unbuilt(inspected, file)),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
/** The imports of each file are read as the other rules read them: a comment or a string names nothing. */
|
|
42
|
+
function namesANeighbourSource({ project }) {
|
|
43
|
+
return supportFiles(project.root).some((file) => {
|
|
44
|
+
const path = `${SUPPORT}/${file}`;
|
|
45
|
+
const { imports } = loadSourceFile(project.config, path, readProjectFile(project, path) ?? '');
|
|
46
|
+
return imports.some(({ specifier }) => NEIGHBOUR_SOURCE.test(specifier) && !DECLARATION.test(specifier));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function supportFiles(root) {
|
|
50
|
+
try {
|
|
51
|
+
return fs.readdirSync(`${root}/${SUPPORT}`).filter((file) => file.endsWith('.ts'));
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** tsconfig.build.json, and each configuration a script of package.json compiles what ships with. */
|
|
58
|
+
function builds(inspected) {
|
|
59
|
+
const steps = (manifestScripts(inspected)?.scripts ?? []).flatMap(([, command]) => scriptSteps(command));
|
|
60
|
+
return [...new Set([BUILD, ...steps.filter((step) => step.compiles).map((step) => step.project)])];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A build that emits nothing, or that the compiler refuses. `noEmit` wins over every other option;
|
|
64
|
+
* `allowImportingTsExtensions` is accepted of a build that rewrites those endings or emits
|
|
65
|
+
* declarations alone.
|
|
66
|
+
*/
|
|
67
|
+
function silent(built = {}) {
|
|
68
|
+
const refused = built['allowImportingTsExtensions'] === true && !READS_AND_EMITS.some((option) => built[option] === true);
|
|
69
|
+
return built['noEmit'] === true || refused;
|
|
70
|
+
}
|
|
71
|
+
function unread({ report }) {
|
|
72
|
+
return report({ file: TYPE_CHECK, line: 1 }, `${TYPE_CHECK} does not let the compiler read the ".ts" by which a file of ${SUPPORT}/ names its neighbour.`, `Write "allowImportingTsExtensions": true and "noEmit": true under "compilerOptions" in ${TYPE_CHECK}, and both as false in ${BUILD}: a test runner loads its global setup, and what that file imports, from the sources and before any alias exists, so under "importExtension": "js" these files import one another by "./<name>.ts". The compiler accepts that ending only with the first option, and the first option only in a configuration that emits nothing; the build sets both back and emits what it emitted before.`);
|
|
73
|
+
}
|
|
74
|
+
function unbuilt({ report }, file) {
|
|
75
|
+
const remedy = file === TYPE_CHECK
|
|
76
|
+
? `Compile ${BUILD} in that script (\`tsc -p ${BUILD}\`), which extends ${TYPE_CHECK} and sets "noEmit" and "allowImportingTsExtensions" back to false`
|
|
77
|
+
: `Write "allowImportingTsExtensions": false and "noEmit": false under "compilerOptions" in ${file}`;
|
|
78
|
+
return report({ file, line: 1 }, `${file} builds what ships and resolves "noEmit": true, or "allowImportingTsExtensions": true without what the compiler accepts it with: the build would write nothing, or be refused.`, `${remedy}: a configuration that type-checks emits nothing, the one it is extended by to build inherits that, and the compiler then writes no file without an error, so that an earlier output would ship. \`ddd-ts-kit build-aliases\` refuses such a build too.`);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=neighbour-sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neighbour-sources.js","sourceRoot":"","sources":["../../../src/check/alias/neighbour-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC;AAC5D,MAAM,OAAO,GAAG,cAAc,CAAC;AAC/B,0JAA0J;AAC1J,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAChD,MAAM,WAAW,GAAG,eAAe,CAAC;AACpC,2EAA2E;AAC3E,MAAM,aAAa,GAAG,CAAC,4BAA4B,EAAE,iCAAiC,CAAC,CAAC;AACxF,kGAAkG;AAClG,MAAM,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,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;IAE5G,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC;AAC7C,CAAC;AAED,SAAS,MAAM,CAAC,EAAE,MAAM,EAAa;IACnC,OAAO,MAAM,CACX,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,EAC7B,GAAG,UAAU,gEAAgE,OAAO,wBAAwB,EAC5G,0FAA0F,UAAU,0BAA0B,KAAK,8XAA8X,CAClgB,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,MAAM,EAAa,EAAE,IAAY;IAClD,MAAM,MAAM,GACV,IAAI,KAAK,UAAU;QACjB,CAAC,CAAC,WAAW,KAAK,6BAA6B,KAAK,sBAAsB,UAAU,mEAAmE;QACvJ,CAAC,CAAC,4FAA4F,IAAI,EAAE,CAAC;IAEzG,OAAO,MAAM,CACX,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EACjB,GAAG,IAAI,gLAAgL,EACvL,GAAG,MAAM,yPAAyP,CACnQ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** One step of a script of package.json. */
|
|
2
|
+
export interface ScriptStep {
|
|
3
|
+
readonly text: string;
|
|
4
|
+
/** It compiles what ships: not a type check, nor the build of the generated clients. */
|
|
5
|
+
readonly compiles: boolean;
|
|
6
|
+
/** The tsconfig it gives the compiler, from the project root: `tsconfig.json` when it names none. */
|
|
7
|
+
readonly project: string;
|
|
8
|
+
}
|
|
9
|
+
/** The steps of a script, as `&&` chains them, with what each one compiles. */
|
|
10
|
+
export declare function scriptSteps(command: string): ScriptStep[];
|
|
11
|
+
//# sourceMappingURL=script-steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-steps.d.ts","sourceRoot":"","sources":["../../../src/check/alias/script-steps.ts"],"names":[],"mappings":"AAUA,4CAA4C;AAC5C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,qGAAqG;IACrG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE,CAOzD"}
|