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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Name } from '../../../naming/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The name a table bears in the schema index when another holds its own: the one of its context
|
|
4
|
+
* first, `shippingOrders`. That name may be held too, by the table `shipping_orders` of any context
|
|
5
|
+
* or by the schema constant of the context (`shippingSchema`): a name that hides another would
|
|
6
|
+
* compile, and the table it hides would never be created. The first free one is taken, of
|
|
7
|
+
* `shippingOrders`, `shippingContextOrders`, then `shippingOrders2` and on.
|
|
8
|
+
*/
|
|
9
|
+
export declare function freeName(context: Name, constant: string, isTaken: (name: string) => boolean): string;
|
|
10
|
+
//# sourceMappingURL=free-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free-name.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/free-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAM5C;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAUpG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { capitalize } from '../../../naming/capitalize.js';
|
|
2
|
+
/** The numbers tried after the two names that read well: a schema index never holds that many tables of one name. */
|
|
3
|
+
const SUFFIXES = Array.from({ length: 98 }, (_, index) => index + 2);
|
|
4
|
+
/**
|
|
5
|
+
* The name a table bears in the schema index when another holds its own: the one of its context
|
|
6
|
+
* first, `shippingOrders`. That name may be held too, by the table `shipping_orders` of any context
|
|
7
|
+
* or by the schema constant of the context (`shippingSchema`): a name that hides another would
|
|
8
|
+
* compile, and the table it hides would never be created. The first free one is taken, of
|
|
9
|
+
* `shippingOrders`, `shippingContextOrders`, then `shippingOrders2` and on.
|
|
10
|
+
*/
|
|
11
|
+
export function freeName(context, constant, isTaken) {
|
|
12
|
+
const qualified = `${context.camel}${capitalize(constant)}`;
|
|
13
|
+
const candidates = [
|
|
14
|
+
qualified,
|
|
15
|
+
`${context.camel}Context${capitalize(constant)}`,
|
|
16
|
+
...SUFFIXES.map((suffix) => `${qualified}${suffix}`),
|
|
17
|
+
];
|
|
18
|
+
return candidates.find((candidate) => !isTaken(candidate)) ?? qualified;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=free-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free-name.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/free-name.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,qHAAqH;AACrH,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAa,EAAE,QAAgB,EAAE,OAAkC;IAC1F,MAAM,SAAS,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;IAE5D,MAAM,UAAU,GAAG;QACjB,SAAS;QACT,GAAG,OAAO,CAAC,KAAK,UAAU,UAAU,CAAC,QAAQ,CAAC,EAAE;QAChD,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC;KACrD,CAAC;IAEF,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,SAAS,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IndexReading } from './index-reading.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the files the index re-exports whole export that the index exports under no name, each `<origin>` with the
|
|
4
|
+
* kind it is: a value the index does not export as a value, a line written `export type` never
|
|
5
|
+
* counting for one, and a type it exports neither as a type nor with its value.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hiddenSymbols(reading: IndexReading): string[];
|
|
8
|
+
//# sourceMappingURL=hidden-symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-symbols.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/hidden-symbols.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CAa7D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { indexExports } from './index-exports.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the files the index re-exports whole export that the index exports under no name, each `<origin>` with the
|
|
4
|
+
* kind it is: a value the index does not export as a value, a line written `export type` never
|
|
5
|
+
* counting for one, and a type it exports neither as a type nor with its value.
|
|
6
|
+
*/
|
|
7
|
+
export function hiddenSymbols(reading) {
|
|
8
|
+
const exported = [...indexExports(reading).values()];
|
|
9
|
+
const values = new Set(exported.flatMap(({ value }) => (value === undefined ? [] : [value])));
|
|
10
|
+
const types = new Set(exported.flatMap(({ type }) => (type === undefined ? [] : [type])));
|
|
11
|
+
const symbols = reading.stars.flatMap(({ symbols: held }) => held);
|
|
12
|
+
return [
|
|
13
|
+
...new Set(symbols
|
|
14
|
+
.filter(({ kind, origin }) => !(kind === 'value' ? values : types).has(origin))
|
|
15
|
+
.map(({ kind, origin }) => `${origin}${kind === 'type' ? ' (a type)' : ''}`)),
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=hidden-symbols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-symbols.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/hidden-symbols.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAqB;IACjD,MAAM,QAAQ,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9F,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAEnE,OAAO;QACL,GAAG,IAAI,GAAG,CACR,OAAO;aACJ,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;aAC9E,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAC/E;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config } from '../../../config/index.js';
|
|
2
|
+
import type { Workspace } from '../../../workspace/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* On TypeORM the kit writes no name of the schema index after a merge, in `merge-trunk` or
|
|
5
|
+
* `init --force`: it cannot tell by the code whether two imports of one name are two entities or
|
|
6
|
+
* one. Each name the region of the imports gives more than once is said, once, with the files it
|
|
7
|
+
* comes from, and what to write by hand either way. Answers nothing when no name is given twice.
|
|
8
|
+
*/
|
|
9
|
+
export declare function importedTwiceNotes(ws: Workspace, config: Config): string[];
|
|
10
|
+
//# sourceMappingURL=imported-twice-notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imported-twice-notes.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/imported-twice-notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAoB1E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { namedBindingsOf } from '../../../migration/index.js';
|
|
2
|
+
import { regionOf } from './region-of.js';
|
|
3
|
+
import { workspaceSources } from './workspace-sources.js';
|
|
4
|
+
/**
|
|
5
|
+
* On TypeORM the kit writes no name of the schema index after a merge, in `merge-trunk` or
|
|
6
|
+
* `init --force`: it cannot tell by the code whether two imports of one name are two entities or
|
|
7
|
+
* one. Each name the region of the imports gives more than once is said, once, with the files it
|
|
8
|
+
* comes from, and what to write by hand either way. Answers nothing when no name is given twice.
|
|
9
|
+
*/
|
|
10
|
+
export function importedTwiceNotes(ws, config) {
|
|
11
|
+
const index = `${config.platformDir}/database/schema.ts`;
|
|
12
|
+
const sources = workspaceSources(ws, config);
|
|
13
|
+
const imports = namedBindingsOf(regionOf(ws.read(index) ?? '', 'imports'), 'import').flatMap(({ source, names }) => {
|
|
14
|
+
const resolved = sources.resolve(index, source);
|
|
15
|
+
const file = resolved.kind === 'file' ? resolved.path : source;
|
|
16
|
+
return names.map(({ local }) => ({ local, file }));
|
|
17
|
+
});
|
|
18
|
+
const twice = [...new Set(imports.map(({ local }) => local))].filter((local) => imports.filter((held) => held.local === local).length > 1);
|
|
19
|
+
return twice.map((local) => {
|
|
20
|
+
const files = imports.filter((held) => held.local === local).map(({ file }) => file);
|
|
21
|
+
return `${index}: imports \`${local}\` ${files.length} times (from ${files.join(', ')}); the kit writes no name on TypeORM after a merge: if they are distinct entities, import each but one under its own name and list that name in \`entities\`; if they are one entity, take out the extra import.`;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=imported-twice-notes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imported-twice-notes.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/imported-twice-notes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAa,EAAE,MAAc;IAC9D,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,WAAW,qBAAqB,CAAC;IACzD,MAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QACjH,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QAE/D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAClE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CACrE,CAAC;IAEF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAErF,OAAO,GAAG,KAAK,eAAe,KAAK,MAAM,KAAK,CAAC,MAAM,gBAAgB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,kNAAkN,CAAC;IAC1S,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IndexReading } from './index-reading.js';
|
|
2
|
+
import { type Bound } from './symbol-of.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a schema index exports under each name, as the compiler resolves it, each by the place that
|
|
5
|
+
* declares it. A name the index declares or exports by name is that and nothing else: it shadows
|
|
6
|
+
* what the `export *` lines bring under it, a line written `export type` giving it no value at
|
|
7
|
+
* all. A name the `export *` lines alone bring is exported when every file that holds it holds the
|
|
8
|
+
* same symbol; several symbols under one name are exported by none.
|
|
9
|
+
*/
|
|
10
|
+
export declare function indexExports(reading: IndexReading): Map<string, Bound>;
|
|
11
|
+
//# sourceMappingURL=index-exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-exports.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/index-exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAsBtE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { signatureOf } from './signature-of.js';
|
|
2
|
+
import { symbolOf } from './symbol-of.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a schema index exports under each name, as the compiler resolves it, each by the place that
|
|
5
|
+
* declares it. A name the index declares or exports by name is that and nothing else: it shadows
|
|
6
|
+
* what the `export *` lines bring under it, a line written `export type` giving it no value at
|
|
7
|
+
* all. A name the `export *` lines alone bring is exported when every file that holds it holds the
|
|
8
|
+
* same symbol; several symbols under one name are exported by none.
|
|
9
|
+
*/
|
|
10
|
+
export function indexExports(reading) {
|
|
11
|
+
const exported = new Map();
|
|
12
|
+
const join = (name, bound) => void exported.set(name, { ...exported.get(name), ...bound });
|
|
13
|
+
reading.values.forEach((name) => join(name, { value: `${reading.index}#${name}` }));
|
|
14
|
+
reading.types.forEach((name) => join(name, { type: `${reading.index}#${name}` }));
|
|
15
|
+
for (const { local, value, type } of reading.given) {
|
|
16
|
+
join(local, { ...(value === undefined ? {} : { value }), ...(type === undefined ? {} : { type }) });
|
|
17
|
+
}
|
|
18
|
+
const explicit = new Set(exported.keys());
|
|
19
|
+
for (const name of new Set(reading.stars.flatMap(({ symbols }) => symbols.map((symbol) => symbol.name)))) {
|
|
20
|
+
const held = reading.stars.map((star) => symbolOf(star, name)).filter((bound) => signatureOf(bound) !== '|');
|
|
21
|
+
if (!explicit.has(name) && new Set(held.map(signatureOf)).size === 1) {
|
|
22
|
+
exported.set(name, held[0] ?? {});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return exported;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-exports.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/index-exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAc,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,OAAqB;IAChD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiB,CAAC;IAC1C,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,KAAY,EAAQ,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;IAEhH,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAElF,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACnD,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IACtG,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAE1C,KAAK,MAAM,IAAI,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACzG,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;QAE7G,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACrE,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Config } from '../../../config/index.js';
|
|
2
|
+
import type { Workspace } from '../../../workspace/index.js';
|
|
3
|
+
/** What a schema index gives the migration tooling at one moment: taken before a command writes it, and after. */
|
|
4
|
+
export interface IndexPicture {
|
|
5
|
+
/** The index as it stood. */
|
|
6
|
+
readonly text: string | undefined;
|
|
7
|
+
/** On Drizzle, the value each name exports, by the place that declares it; a name that does not compile exports none. */
|
|
8
|
+
readonly names: ReadonlyMap<string, string>;
|
|
9
|
+
/** Every table within reach: on Drizzle a value exported under a name, on TypeORM an entity listed in `entities`. */
|
|
10
|
+
readonly reachable: ReadonlySet<string>;
|
|
11
|
+
/** What the index re-exports, or itself holds, that is not read with certainty: what it exports is out of the picture. */
|
|
12
|
+
readonly unread: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* While something is not read with certainty, the names files read with certainty export
|
|
15
|
+
* different values under, which only a line by name settles: the settle wrote none, and its
|
|
16
|
+
* note says so and who keeps each.
|
|
17
|
+
*/
|
|
18
|
+
readonly toTheSettle: ReadonlySet<string>;
|
|
19
|
+
/** On Drizzle, the file or the package the index takes each name from, as its line names it: not the place that declares the value. */
|
|
20
|
+
readonly givers: ReadonlyMap<string, string>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The picture of the schema index a workspace holds. On Drizzle, what each name exports as a
|
|
24
|
+
* value, read as the compiler resolves it. On TypeORM, the entities its `entities` lists, each by
|
|
25
|
+
* the file it is imported from, resolved, and its name there: the names of the imports are local
|
|
26
|
+
* to the index. On another ORM, nothing.
|
|
27
|
+
*/
|
|
28
|
+
export declare function indexPicture(ws: Workspace, config: Config): IndexPicture;
|
|
29
|
+
//# sourceMappingURL=index-picture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-picture.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/index-picture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQpD,kHAAkH;AAClH,MAAM,WAAW,YAAY;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,yHAAyH;IACzH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,qHAAqH;IACrH,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,0HAA0H;IAC1H,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,uIAAuI;IACvI,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAiCxE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { workspaceSources } from './workspace-sources.js';
|
|
2
|
+
import { namedBindingsOf } from '../../../migration/index.js';
|
|
3
|
+
import { entitiesList } from './entities-list.js';
|
|
4
|
+
import { readTablesFile } from './read-tables-file.js';
|
|
5
|
+
import { indexExports } from './index-exports.js';
|
|
6
|
+
import { linesToSettle } from './lines-to-settle.js';
|
|
7
|
+
import { workspaceIndex } from './workspace-index.js';
|
|
8
|
+
/**
|
|
9
|
+
* The picture of the schema index a workspace holds. On Drizzle, what each name exports as a
|
|
10
|
+
* value, read as the compiler resolves it. On TypeORM, the entities its `entities` lists, each by
|
|
11
|
+
* the file it is imported from, resolved, and its name there: the names of the imports are local
|
|
12
|
+
* to the index. On another ORM, nothing.
|
|
13
|
+
*/
|
|
14
|
+
export function indexPicture(ws, config) {
|
|
15
|
+
const index = `${config.platformDir}/database/schema.ts`;
|
|
16
|
+
const text = ws.read(index);
|
|
17
|
+
const none = emptyPicture(text);
|
|
18
|
+
if (text === undefined || !['drizzle', 'typeorm'].includes(config.stack.orm)) {
|
|
19
|
+
return none;
|
|
20
|
+
}
|
|
21
|
+
if (config.stack.orm === 'typeorm') {
|
|
22
|
+
return { ...none, reachable: entitiesListed(ws, config, { index, text }) };
|
|
23
|
+
}
|
|
24
|
+
const reading = workspaceIndex(ws, config);
|
|
25
|
+
const isCertain = reading.unread.length === 0;
|
|
26
|
+
const exported = [...indexExports(reading)];
|
|
27
|
+
// What the index declares itself is the template's: a table is what a file it re-exports or names holds.
|
|
28
|
+
const names = new Map(exported.flatMap(([name, { value }]) => value === undefined || value.startsWith(`${index}#`) ? [] : [[name, value]]));
|
|
29
|
+
return {
|
|
30
|
+
text,
|
|
31
|
+
names,
|
|
32
|
+
reachable: new Set(names.values()),
|
|
33
|
+
unread: reading.unreadFiles,
|
|
34
|
+
toTheSettle: new Set(isCertain ? [] : linesToSettle(reading, {}).map(({ constant }) => constant)),
|
|
35
|
+
givers: new Map([...names.keys()].flatMap((name) => giverOf(reading, name))),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** A picture that holds nothing but the text of the index. */
|
|
39
|
+
function emptyPicture(text) {
|
|
40
|
+
return { text, names: new Map(), reachable: new Set(), unread: [], toTheSettle: new Set(), givers: new Map() };
|
|
41
|
+
}
|
|
42
|
+
/** The module the index takes a name from: the one a line by name names, else the file re-exported whole that holds it as a value. */
|
|
43
|
+
function giverOf(reading, name) {
|
|
44
|
+
const given = reading.given.find(({ local }) => local === name);
|
|
45
|
+
const from = given === undefined
|
|
46
|
+
? reading.stars.find(({ symbols }) => symbols.some((symbol) => symbol.name === name && symbol.kind === 'value'))
|
|
47
|
+
?.file
|
|
48
|
+
: (given.file ?? given.source);
|
|
49
|
+
return from === undefined ? [] : [[name, from]];
|
|
50
|
+
}
|
|
51
|
+
function entitiesListed(ws, config, { index, text }) {
|
|
52
|
+
const sources = workspaceSources(ws, config);
|
|
53
|
+
const listed = new Set(entitiesList(text));
|
|
54
|
+
return new Set(namedBindingsOf(text, 'import').flatMap(({ source, names }) => {
|
|
55
|
+
const resolved = sources.resolve(index, source);
|
|
56
|
+
const from = resolved.kind === 'file' ? resolved.path : source;
|
|
57
|
+
const read = resolved.kind === 'file' ? readTablesFile(sources, resolved.path) : undefined;
|
|
58
|
+
// An entity its file, read with certainty, no longer exports is listed in name only: the index does not compile.
|
|
59
|
+
const isThere = (name) => read === undefined || read.unread.length > 0 || read.symbols.some((symbol) => symbol.name === name);
|
|
60
|
+
return names.filter(({ local, name }) => listed.has(local) && isThere(name)).map(({ name }) => `${from}#${name}`);
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=index-picture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-picture.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/index-picture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAsBnD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,EAAa,EAAE,MAAc;IACxD,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,WAAW,qBAAqB,CAAC;IACzD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE5B,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,EA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,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QAC/D,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3F,iHAAiH;QACjH,MAAM,OAAO,GAAG,CAAC,IAAY,EAAW,EAAE,CACxC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAEtG,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IACpH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Config } from '../../../config/index.js';
|
|
2
|
+
import { type ExportedSymbol } from './read-tables-file.js';
|
|
3
|
+
import { type FileReader } from './sources-of.js';
|
|
4
|
+
/** A file of the project the index re-exports whole: the tables file of a context, or another module, read for what it is. */
|
|
5
|
+
export interface StarModule {
|
|
6
|
+
/** The context whose tables file it is; undefined for any other file of the project. */
|
|
7
|
+
readonly context: string | undefined;
|
|
8
|
+
/** The module as the index names it. */
|
|
9
|
+
readonly source: string;
|
|
10
|
+
/** The file, from the project root. */
|
|
11
|
+
readonly file: string;
|
|
12
|
+
/** What it exports, each with the place that declares it. */
|
|
13
|
+
readonly symbols: readonly ExportedSymbol[];
|
|
14
|
+
/** Why the file is not read with certainty; empty when it is. */
|
|
15
|
+
readonly unread: readonly string[];
|
|
16
|
+
/** Whether it, or a module it re-exports whole, is not looked into: it may export any name. */
|
|
17
|
+
readonly isBlind?: true;
|
|
18
|
+
}
|
|
19
|
+
/** The tables file of a context the index re-exports whole. */
|
|
20
|
+
interface TablesOfContext extends StarModule {
|
|
21
|
+
readonly context: string;
|
|
22
|
+
}
|
|
23
|
+
/** A name the index exports by name from a module, with what it is there. */
|
|
24
|
+
interface GivenName {
|
|
25
|
+
/** The name the index exports. */
|
|
26
|
+
readonly local: string;
|
|
27
|
+
/** The name the module calls it. */
|
|
28
|
+
readonly name: string;
|
|
29
|
+
/** The module, as the index names it. */
|
|
30
|
+
readonly source: string;
|
|
31
|
+
/** The file of the project it comes from; undefined for a package. */
|
|
32
|
+
readonly file: string | undefined;
|
|
33
|
+
/** The origin of its value, when the line exports one. */
|
|
34
|
+
readonly value?: string;
|
|
35
|
+
/** The origin of its type. */
|
|
36
|
+
readonly type?: string;
|
|
37
|
+
}
|
|
38
|
+
/** The schema index of a Drizzle project and the files it re-exports, as far as they are read with certainty. */
|
|
39
|
+
export interface IndexReading {
|
|
40
|
+
/** The index, from the project root. */
|
|
41
|
+
readonly index: string;
|
|
42
|
+
readonly text: string;
|
|
43
|
+
/** The names the index declares itself, as values. */
|
|
44
|
+
readonly values: readonly string[];
|
|
45
|
+
/** The names it declares itself, as types. */
|
|
46
|
+
readonly types: readonly string[];
|
|
47
|
+
/** The names it exports from a module by name. */
|
|
48
|
+
readonly given: readonly GivenName[];
|
|
49
|
+
/** The files of the project it re-exports whole, in its order, each once. */
|
|
50
|
+
readonly stars: readonly StarModule[];
|
|
51
|
+
/** Those of `stars` that are the tables file of a context. */
|
|
52
|
+
readonly tables: readonly TablesOfContext[];
|
|
53
|
+
/** The code of each `export` of the index that is not read. */
|
|
54
|
+
readonly doubts: readonly string[];
|
|
55
|
+
/** Why the index, or a file it re-exports, is not read with certainty; empty when all of it is. */
|
|
56
|
+
readonly unread: readonly string[];
|
|
57
|
+
/** What the index re-exports whole and the kit does not look into, each file or module once: it may export any name. */
|
|
58
|
+
readonly blind: readonly string[];
|
|
59
|
+
/** What is not read with certainty, each once: the index itself, a file of the project, or a module as the index names it. */
|
|
60
|
+
readonly unreadFiles: readonly string[];
|
|
61
|
+
}
|
|
62
|
+
/** Where the index and the tables files are read. */
|
|
63
|
+
export interface IndexSource {
|
|
64
|
+
/** The index, from the project root. */
|
|
65
|
+
readonly index: string;
|
|
66
|
+
readonly read: FileReader;
|
|
67
|
+
/** The tables file of a context, from the project root. */
|
|
68
|
+
readonly tablesFile: (context: string) => string;
|
|
69
|
+
/** The path a file is read at, in the module of the model that holds it. */
|
|
70
|
+
readonly place?: (file: string) => string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Reads the schema index and every file of the project it re-exports whole or takes names from,
|
|
74
|
+
* each specifier resolved the one way (`sourcesOf`). A module it re-exports whole is the tables
|
|
75
|
+
* file of a context when it resolves to that file, whatever it is called and however it is named;
|
|
76
|
+
* any other file of the project is read for what it is, and its exports take part under their own
|
|
77
|
+
* origin. A package re-exported whole, a specifier that resolves to nothing, and any export the
|
|
78
|
+
* reader does not answer for, in the index or in a file it reads, make the reading uncertain. A
|
|
79
|
+
* file the index re-exports twice is read once.
|
|
80
|
+
*/
|
|
81
|
+
export declare function readIndex(config: Config, { index, read, tablesFile, place }: IndexSource): IndexReading;
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=index-reading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-reading.d.ts","sourceRoot":"","sources":["../../../../src/generate/k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Module } from './read-module.js';
|
|
2
|
+
import { readTablesFile } from './read-tables-file.js';
|
|
3
|
+
import { sourcesOf } from './sources-of.js';
|
|
4
|
+
/**
|
|
5
|
+
* Reads the schema index and every file of the project it re-exports whole or takes names from,
|
|
6
|
+
* each specifier resolved the one way (`sourcesOf`). A module it re-exports whole is the tables
|
|
7
|
+
* file of a context when it resolves to that file, whatever it is called and however it is named;
|
|
8
|
+
* any other file of the project is read for what it is, and its exports take part under their own
|
|
9
|
+
* origin. A package re-exported whole, a specifier that resolves to nothing, and any export the
|
|
10
|
+
* reader does not answer for, in the index or in a file it reads, make the reading uncertain. A
|
|
11
|
+
* file the index re-exports twice is read once.
|
|
12
|
+
*/
|
|
13
|
+
export function readIndex(config, { index, read, tablesFile, place }) {
|
|
14
|
+
const sources = sourcesOf(config, read, place);
|
|
15
|
+
const text = read(index) ?? '';
|
|
16
|
+
const own = readModule(text);
|
|
17
|
+
const contexts = new Map(Object.keys(config.contexts).map((context) => [tablesFile(context), context]));
|
|
18
|
+
const whole = [...new Set(own.whole)].map((source) => starOf(sources, { index, source, contexts }));
|
|
19
|
+
const files = byFile(whole);
|
|
20
|
+
const given = own.named.flatMap(({ source, names }) => names.map((taken) => givenBy(sources, { index, source, ...taken })));
|
|
21
|
+
return {
|
|
22
|
+
index,
|
|
23
|
+
text,
|
|
24
|
+
values: own.values,
|
|
25
|
+
types: own.types,
|
|
26
|
+
given,
|
|
27
|
+
stars: [...files.values()],
|
|
28
|
+
tables: [...files.values()].filter((star) => star.context !== undefined),
|
|
29
|
+
doubts: own.doubts,
|
|
30
|
+
blind: blindOf(whole),
|
|
31
|
+
unreadFiles: unreadFilesOf(index, { own: own.unread, whole, given }),
|
|
32
|
+
unread: [
|
|
33
|
+
...new Set([
|
|
34
|
+
...own.unread.map((what) => `${index}, ${what}`),
|
|
35
|
+
...whole.flatMap(({ unread }) => unread),
|
|
36
|
+
...given.flatMap((one) => one.unread ?? []),
|
|
37
|
+
]),
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** The files the index re-exports whole, each once: a file two specifiers of the index name, an alias and a relative path, is one file. */
|
|
42
|
+
function byFile(whole) {
|
|
43
|
+
const files = new Map();
|
|
44
|
+
for (const star of whole.flatMap((one) => ('file' in one ? [one] : []))) {
|
|
45
|
+
files.set(star.file, files.get(star.file) ?? star);
|
|
46
|
+
}
|
|
47
|
+
return files;
|
|
48
|
+
}
|
|
49
|
+
/** What the index re-exports whole and the kit does not look into: a file by its path, a module it does not follow as the index names it. */
|
|
50
|
+
function blindOf(whole) {
|
|
51
|
+
return [
|
|
52
|
+
...new Set(whole.flatMap((star) => ('file' in star ? (star.isBlind === true ? [star.file] : []) : [star.source]))),
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
/** What is not read with certainty: the index, what it re-exports whole, what it takes names from. */
|
|
56
|
+
function unreadFilesOf(index, { own, whole, given, }) {
|
|
57
|
+
return [
|
|
58
|
+
...new Set([
|
|
59
|
+
...(own.length > 0 ? [index] : []),
|
|
60
|
+
...whole.flatMap((star) => (star.unread.length === 0 ? [] : ['file' in star ? star.file : star.source])),
|
|
61
|
+
...given.flatMap((one) => (one.unread === undefined ? [] : [one.file ?? one.source])),
|
|
62
|
+
]),
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
function starOf(sources, { index, source, contexts }) {
|
|
66
|
+
const resolved = sources.resolve(index, source);
|
|
67
|
+
if (resolved.kind !== 'file') {
|
|
68
|
+
return { source, unread: [`${index}, which re-exports '${source}', a module the kit does not follow`] };
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
context: contexts.get(resolved.path),
|
|
72
|
+
source,
|
|
73
|
+
file: resolved.path,
|
|
74
|
+
...readTablesFile(sources, resolved.path),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** What a name the index exports by name is: read in the file it comes from, or that name of a package. */
|
|
78
|
+
function givenBy(sources, { index, source, name, local, isType }) {
|
|
79
|
+
const resolved = sources.resolve(index, source);
|
|
80
|
+
// A module the kit does not read: the name and its kind are written here, and the module is the place of what it names.
|
|
81
|
+
if (resolved.kind !== 'file') {
|
|
82
|
+
const origin = `${resolved.kind === 'package' ? resolved.name : source}#${name}`;
|
|
83
|
+
return { local, name, source, file: undefined, type: origin, ...(isType ? {} : { value: origin }) };
|
|
84
|
+
}
|
|
85
|
+
return givenByFile(sources, { index, source, name, local, isType }, resolved.path);
|
|
86
|
+
}
|
|
87
|
+
/** A name the index takes from a file of the project: what that file exports under it, or why it is not read. */
|
|
88
|
+
function givenByFile(sources, { index, source, name, local, isType }, file) {
|
|
89
|
+
const { symbols, unread } = readTablesFile(sources, file);
|
|
90
|
+
const origin = (kind) => symbols.find((symbol) => symbol.name === name && symbol.kind === kind)?.origin;
|
|
91
|
+
const value = origin('value');
|
|
92
|
+
const type = origin('type') ?? value;
|
|
93
|
+
const unknown = `${index}, which exports \`${name}\` from '${source}', where the kit does not read what it is`;
|
|
94
|
+
const why = unread.length > 0 ? [...unread] : type === undefined ? [unknown] : [];
|
|
95
|
+
return {
|
|
96
|
+
local,
|
|
97
|
+
name,
|
|
98
|
+
source,
|
|
99
|
+
file,
|
|
100
|
+
...(isType || value === undefined ? {} : { value }),
|
|
101
|
+
...(type === undefined ? {} : { type }),
|
|
102
|
+
...(why.length > 0 ? { unread: why } : {}),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index-reading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-reading.js","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/index-reading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAuB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAiC,SAAS,EAAE,MAAM,cAAc,CAAC;AA2ExE;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc,EAAE,EAAE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';
|
|
2
|
+
import { Workspace } from '../../../workspace/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The last word of a command on the schema index, said once, on the state the command ends in:
|
|
5
|
+
* what the index gave on disk before the command is compared with what the workspace holds when
|
|
6
|
+
* every generator has run. A name the index exported before and exports no more, an entry of
|
|
7
|
+
* `entities` on TypeORM listed no more, or a name that exported one value and exports another: the
|
|
8
|
+
* index is left as it stood on disk, reported as left, the sentences the command noted about its
|
|
9
|
+
* names are taken back, and one note names every name concerned and says what to do. Nothing is done when the picture is
|
|
10
|
+
* kept, nor when an earlier step of the command already left the index. While a file the index
|
|
11
|
+
* re-exports is not read with certainty, before the command or after it, the index is never left:
|
|
12
|
+
* each name lost and each name moved is said hedged, and the command goes on as before; a name
|
|
13
|
+
* files read share is the settle's, whose note says it. Names are compared, not the tables behind
|
|
14
|
+
* them: a table still exported under another name is a name lost.
|
|
15
|
+
*/
|
|
16
|
+
export declare function keepThePicture(ws: Workspace, config: Config, command: 'generate' | 'init'): void;
|
|
17
|
+
//# sourceMappingURL=keep-the-picture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keep-the-picture.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/same-name/keep-the-picture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgB/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAsChG"}
|