ddd-ts-kit 0.94.1 → 0.96.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 +76 -0
- package/README.fr.md +83 -21
- package/README.md +78 -22
- package/dist/build/rewrite-aliases.js +1 -1
- package/dist/build/rewrite-aliases.js.map +1 -1
- package/dist/check/canonical/stray-entry.js +7 -1
- package/dist/check/canonical/stray-entry.js.map +1 -1
- package/dist/check/configuration/config-inspection.d.ts.map +1 -1
- package/dist/check/configuration/config-inspection.js +2 -0
- package/dist/check/configuration/config-inspection.js.map +1 -1
- package/dist/check/configuration/context-tenancy.d.ts +10 -0
- package/dist/check/configuration/context-tenancy.d.ts.map +1 -0
- package/dist/check/configuration/context-tenancy.js +16 -0
- package/dist/check/configuration/context-tenancy.js.map +1 -0
- package/dist/check/errors/listed-codes.d.ts +1 -1
- package/dist/check/errors/listed-codes.d.ts.map +1 -1
- package/dist/check/errors/listed-codes.js +15 -3
- package/dist/check/errors/listed-codes.js.map +1 -1
- package/dist/check/explain/language-docs.js +1 -1
- package/dist/check/explain/language-docs.js.map +1 -1
- package/dist/check/explain/privacy-docs.js +1 -1
- package/dist/check/explain/privacy-docs.js.map +1 -1
- package/dist/check/explain/tenancy-docs.js +1 -1
- package/dist/check/explain/tenancy-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.js +2 -2
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/config-fixtures.js +13 -0
- package/dist/check/fixtures/config-fixtures.js.map +1 -1
- package/dist/check/fixtures/config.js +2 -1
- package/dist/check/fixtures/config.js.map +1 -1
- package/dist/check/fixtures/control-plane-fixtures.d.ts +4 -0
- package/dist/check/fixtures/control-plane-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/control-plane-fixtures.js +41 -0
- package/dist/check/fixtures/control-plane-fixtures.js.map +1 -0
- package/dist/check/fixtures/files-fixtures.js +2 -2
- package/dist/check/fixtures/files-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/governance-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/governance-fixtures.js +15 -0
- package/dist/check/fixtures/governance-fixtures.js.map +1 -1
- package/dist/check/fixtures/language-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/language-fixtures.js +22 -0
- package/dist/check/fixtures/language-fixtures.js.map +1 -1
- package/dist/check/fixtures/privacy-fixtures.js +2 -2
- package/dist/check/fixtures/privacy-fixtures.js.map +1 -1
- package/dist/check/fixtures/shared-kernel-fixtures.d.ts +3 -0
- package/dist/check/fixtures/shared-kernel-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/shared-kernel-fixtures.js +60 -0
- package/dist/check/fixtures/shared-kernel-fixtures.js.map +1 -0
- package/dist/check/fixtures/shared-kernel-glossary.d.ts +7 -0
- package/dist/check/fixtures/shared-kernel-glossary.d.ts.map +1 -0
- package/dist/check/fixtures/shared-kernel-glossary.js +12 -0
- package/dist/check/fixtures/shared-kernel-glossary.js.map +1 -0
- package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/standard-fixtures.js +2 -0
- package/dist/check/fixtures/standard-fixtures.js.map +1 -1
- package/dist/check/fixtures/tenancy-adapters.d.ts +20 -0
- package/dist/check/fixtures/tenancy-adapters.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-adapters.js +10 -0
- package/dist/check/fixtures/tenancy-adapters.js.map +1 -0
- package/dist/check/fixtures/tenancy-bypass.d.ts +2 -21
- package/dist/check/fixtures/tenancy-bypass.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-bypass.js +2 -10
- package/dist/check/fixtures/tenancy-bypass.js.map +1 -1
- package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-fixtures.js +2 -0
- package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
- package/dist/check/fixtures/tree-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tree-fixtures.js +17 -0
- package/dist/check/fixtures/tree-fixtures.js.map +1 -1
- package/dist/check/fixtures/value-object-file-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/value-object-file-fixtures.js +2 -0
- package/dist/check/fixtures/value-object-file-fixtures.js.map +1 -1
- package/dist/check/language/add-glossary-rows.d.ts +1 -0
- package/dist/check/language/add-glossary-rows.d.ts.map +1 -1
- package/dist/check/language/add-glossary-rows.js +7 -2
- package/dist/check/language/add-glossary-rows.js.map +1 -1
- package/dist/check/language/glossaries.d.ts +8 -2
- package/dist/check/language/glossaries.d.ts.map +1 -1
- package/dist/check/language/glossaries.js +28 -18
- package/dist/check/language/glossaries.js.map +1 -1
- package/dist/check/language/held-by-glossary.d.ts +8 -0
- package/dist/check/language/held-by-glossary.d.ts.map +1 -0
- package/dist/check/language/held-by-glossary.js +19 -0
- package/dist/check/language/held-by-glossary.js.map +1 -0
- package/dist/check/language/technical-words-of.d.ts +9 -0
- package/dist/check/language/technical-words-of.d.ts.map +1 -0
- package/dist/check/language/technical-words-of.js +15 -0
- package/dist/check/language/technical-words-of.js.map +1 -0
- package/dist/check/privacy/prisma-columns-of.d.ts +5 -5
- package/dist/check/privacy/prisma-columns-of.d.ts.map +1 -1
- package/dist/check/privacy/prisma-columns-of.js +25 -12
- package/dist/check/privacy/prisma-columns-of.js.map +1 -1
- package/dist/check/project/beside-the-sources.js +1 -1
- package/dist/check/project/beside-the-sources.js.map +1 -1
- package/dist/check/project/git-ignored.d.ts +11 -0
- package/dist/check/project/git-ignored.d.ts.map +1 -0
- package/dist/check/project/git-ignored.js +26 -0
- package/dist/check/project/git-ignored.js.map +1 -0
- package/dist/check/project/load-loose-project.js +1 -1
- package/dist/check/project/load-loose-project.js.map +1 -1
- package/dist/check/project/load-project.d.ts.map +1 -1
- package/dist/check/project/load-project.js +13 -2
- package/dist/check/project/load-project.js.map +1 -1
- package/dist/check/project/locate.js +2 -1
- package/dist/check/project/locate.js.map +1 -1
- package/dist/check/project/walk-directory.d.ts +10 -2
- package/dist/check/project/walk-directory.d.ts.map +1 -1
- package/dist/check/project/walk-directory.js +9 -4
- package/dist/check/project/walk-directory.js.map +1 -1
- package/dist/check/rules/governance-recorded-deviation.js +14 -1
- package/dist/check/rules/governance-recorded-deviation.js.map +1 -1
- package/dist/check/rules/language-glossary-term.js +38 -18
- package/dist/check/rules/language-glossary-term.js.map +1 -1
- package/dist/check/rules/language-no-technical-name.d.ts.map +1 -1
- package/dist/check/rules/language-no-technical-name.js +9 -7
- package/dist/check/rules/language-no-technical-name.js.map +1 -1
- package/dist/check/rules/privacy-declared-field.d.ts +1 -1
- package/dist/check/rules/privacy-declared-field.js +1 -1
- package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -1
- package/dist/check/rules/tenancy-scoped-statement.js +8 -6
- package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
- package/dist/cli-error.d.ts +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +4 -3
- package/dist/cli-error.js.map +1 -1
- package/dist/commands/acceptance.js +6 -2
- package/dist/commands/acceptance.js.map +1 -1
- package/dist/commands/context-layout.d.ts.map +1 -1
- package/dist/commands/context-layout.js +3 -2
- package/dist/commands/context-layout.js.map +1 -1
- package/dist/commands/depcruise-config.d.ts.map +1 -1
- package/dist/commands/depcruise-config.js +13 -5
- package/dist/commands/depcruise-config.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +2 -4
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +2 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/generate.d.ts +4 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +16 -6
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +10 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/move-to-module.d.ts.map +1 -1
- package/dist/commands/move-to-module.js +3 -2
- package/dist/commands/move-to-module.js.map +1 -1
- package/dist/commands/plan-waves.d.ts +2 -1
- package/dist/commands/plan-waves.d.ts.map +1 -1
- package/dist/commands/plan-waves.js +28 -2
- package/dist/commands/plan-waves.js.map +1 -1
- package/dist/commands/print-report.d.ts +3 -3
- package/dist/commands/print-report.d.ts.map +1 -1
- package/dist/commands/print-report.js +10 -3
- package/dist/commands/print-report.js.map +1 -1
- package/dist/commands/sdk.js +1 -2
- package/dist/commands/sdk.js.map +1 -1
- package/dist/config/config.d.ts +7 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/context-tenancies.d.ts +7 -0
- package/dist/config/context-tenancies.d.ts.map +1 -0
- package/dist/config/context-tenancies.js +7 -0
- package/dist/config/context-tenancies.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/is-control-plane.d.ts +4 -0
- package/dist/config/is-control-plane.d.ts.map +1 -0
- package/dist/config/is-control-plane.js +5 -0
- package/dist/config/is-control-plane.js.map +1 -0
- package/dist/config/parse-context.d.ts.map +1 -1
- package/dist/config/parse-context.js +1 -0
- package/dist/config/parse-context.js.map +1 -1
- package/dist/config/serialize-config.js +1 -0
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/dev/refresh-declarations.d.ts.map +1 -1
- package/dist/dev/refresh-declarations.js +2 -1
- package/dist/dev/refresh-declarations.js.map +1 -1
- package/dist/doctor/diagnose.d.ts +2 -1
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +4 -1
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +1 -1
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +25 -2
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/install-script-findings.d.ts +11 -0
- package/dist/doctor/install-script-findings.d.ts.map +1 -0
- package/dist/doctor/install-script-findings.js +86 -0
- package/dist/doctor/install-script-findings.js.map +1 -0
- package/dist/doctor/installed-from.d.ts +3 -0
- package/dist/doctor/installed-from.d.ts.map +1 -0
- package/dist/doctor/installed-from.js +15 -0
- package/dist/doctor/installed-from.js.map +1 -0
- package/dist/doctor/override-findings.d.ts.map +1 -1
- package/dist/doctor/override-findings.js +1 -11
- package/dist/doctor/override-findings.js.map +1 -1
- package/dist/doctor/permission-findings.d.ts.map +1 -1
- package/dist/doctor/permission-findings.js +15 -2
- package/dist/doctor/permission-findings.js.map +1 -1
- package/dist/generate/concept.d.ts +2 -2
- package/dist/generate/concept.js +3 -3
- package/dist/generate/concept.js.map +1 -1
- package/dist/generate/context-vars.d.ts +5 -2
- package/dist/generate/context-vars.d.ts.map +1 -1
- package/dist/generate/context-vars.js +6 -3
- package/dist/generate/context-vars.js.map +1 -1
- package/dist/generate/errors/codes-of-context.d.ts +1 -1
- package/dist/generate/errors/codes-of-context.d.ts.map +1 -1
- package/dist/generate/errors/codes-of-context.js +10 -2
- package/dist/generate/errors/codes-of-context.js.map +1 -1
- package/dist/generate/errors/refusal-class-name.d.ts +1 -1
- package/dist/generate/errors/refusal-class-name.d.ts.map +1 -1
- package/dist/generate/errors/refusal-class-name.js +2 -2
- package/dist/generate/errors/refusal-class-name.js.map +1 -1
- package/dist/generate/glossary-of.d.ts +5 -0
- package/dist/generate/glossary-of.d.ts.map +1 -0
- package/dist/generate/glossary-of.js +6 -0
- package/dist/generate/glossary-of.js.map +1 -0
- package/dist/generate/is-shared-kernel.d.ts +4 -0
- package/dist/generate/is-shared-kernel.d.ts.map +1 -0
- package/dist/generate/is-shared-kernel.js +5 -0
- package/dist/generate/is-shared-kernel.js.map +1 -0
- package/dist/generate/kind.d.ts +11 -6
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -1
- package/dist/generate/kinds/acceptance-kind.js +1 -0
- package/dist/generate/kinds/acceptance-kind.js.map +1 -1
- package/dist/generate/kinds/acl-kind.d.ts.map +1 -1
- package/dist/generate/kinds/acl-kind.js +1 -0
- package/dist/generate/kinds/acl-kind.js.map +1 -1
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +57 -7
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/adr-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adr-kind.js +1 -0
- package/dist/generate/kinds/adr-kind.js.map +1 -1
- package/dist/generate/kinds/aggregate-kind.d.ts.map +1 -1
- package/dist/generate/kinds/aggregate-kind.js +1 -0
- package/dist/generate/kinds/aggregate-kind.js.map +1 -1
- package/dist/generate/kinds/background-job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/background-job-kind.js +1 -0
- package/dist/generate/kinds/background-job-kind.js.map +1 -1
- package/dist/generate/kinds/builder-kind.d.ts.map +1 -1
- package/dist/generate/kinds/builder-kind.js +1 -0
- package/dist/generate/kinds/builder-kind.js.map +1 -1
- package/dist/generate/kinds/command-kind.d.ts.map +1 -1
- package/dist/generate/kinds/command-kind.js +1 -0
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/context-kind.d.ts.map +1 -1
- package/dist/generate/kinds/context-kind.js +3 -1
- package/dist/generate/kinds/context-kind.js.map +1 -1
- package/dist/generate/kinds/context-request.d.ts +2 -0
- package/dist/generate/kinds/context-request.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +19 -9
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/domain-error-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-error-kind.js +7 -4
- package/dist/generate/kinds/domain-error-kind.js.map +1 -1
- package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-event-kind.js +1 -0
- package/dist/generate/kinds/domain-event-kind.js.map +1 -1
- package/dist/generate/kinds/domain-service-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-service-kind.js +1 -0
- package/dist/generate/kinds/domain-service-kind.js.map +1 -1
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +1 -0
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/entity-kind.d.ts.map +1 -1
- package/dist/generate/kinds/entity-kind.js +1 -0
- package/dist/generate/kinds/entity-kind.js.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.d.ts.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js +1 -0
- package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
- package/dist/generate/kinds/error-kind.d.ts.map +1 -1
- package/dist/generate/kinds/error-kind.js +6 -5
- package/dist/generate/kinds/error-kind.js.map +1 -1
- package/dist/generate/kinds/event-handler-kind.d.ts.map +1 -1
- package/dist/generate/kinds/event-handler-kind.js +1 -0
- package/dist/generate/kinds/event-handler-kind.js.map +1 -1
- package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts +4 -2
- package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts.map +1 -1
- package/dist/generate/kinds/extend-event-sourced-aggregate.js +45 -10
- package/dist/generate/kinds/extend-event-sourced-aggregate.js.map +1 -1
- package/dist/generate/kinds/file-upload-kind.d.ts.map +1 -1
- package/dist/generate/kinds/file-upload-kind.js +1 -0
- package/dist/generate/kinds/file-upload-kind.js.map +1 -1
- package/dist/generate/kinds/form-kind.d.ts.map +1 -1
- package/dist/generate/kinds/form-kind.js +1 -0
- package/dist/generate/kinds/form-kind.js.map +1 -1
- package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
- package/dist/generate/kinds/gateway-kind.js +1 -0
- package/dist/generate/kinds/gateway-kind.js.map +1 -1
- package/dist/generate/kinds/generate-context.d.ts.map +1 -1
- package/dist/generate/kinds/generate-context.js +14 -0
- package/dist/generate/kinds/generate-context.js.map +1 -1
- package/dist/generate/kinds/generate-repository.js +11 -7
- package/dist/generate/kinds/generate-repository.js.map +1 -1
- package/dist/generate/kinds/guard-kind.d.ts.map +1 -1
- package/dist/generate/kinds/guard-kind.js +1 -0
- package/dist/generate/kinds/guard-kind.js.map +1 -1
- package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-event-kind.js +1 -0
- package/dist/generate/kinds/integration-event-kind.js.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.js +1 -0
- package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
- package/dist/generate/kinds/job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/job-kind.js +1 -0
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/module-kind.d.ts.map +1 -1
- package/dist/generate/kinds/module-kind.js +1 -0
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/plan-vars.d.ts.map +1 -1
- package/dist/generate/kinds/plan-vars.js +5 -2
- package/dist/generate/kinds/plan-vars.js.map +1 -1
- package/dist/generate/kinds/policy-kind.d.ts.map +1 -1
- package/dist/generate/kinds/policy-kind.js +1 -0
- package/dist/generate/kinds/policy-kind.js.map +1 -1
- package/dist/generate/kinds/port-kind.d.ts.map +1 -1
- package/dist/generate/kinds/port-kind.js +4 -2
- package/dist/generate/kinds/port-kind.js.map +1 -1
- package/dist/generate/kinds/process-kind.d.ts.map +1 -1
- package/dist/generate/kinds/process-kind.js +1 -0
- package/dist/generate/kinds/process-kind.js.map +1 -1
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
- package/dist/generate/kinds/projection-kind.js +4 -5
- package/dist/generate/kinds/projection-kind.js.map +1 -1
- package/dist/generate/kinds/property-kind.d.ts.map +1 -1
- package/dist/generate/kinds/property-kind.js +1 -0
- package/dist/generate/kinds/property-kind.js.map +1 -1
- package/dist/generate/kinds/query-kind.d.ts.map +1 -1
- package/dist/generate/kinds/query-kind.js +1 -0
- package/dist/generate/kinds/query-kind.js.map +1 -1
- package/dist/generate/kinds/repository-kind.d.ts.map +1 -1
- package/dist/generate/kinds/repository-kind.js +1 -0
- package/dist/generate/kinds/repository-kind.js.map +1 -1
- package/dist/generate/kinds/representation-kind.d.ts.map +1 -1
- package/dist/generate/kinds/representation-kind.js +1 -0
- package/dist/generate/kinds/representation-kind.js.map +1 -1
- package/dist/generate/kinds/route-group-kind.d.ts.map +1 -1
- package/dist/generate/kinds/route-group-kind.js +1 -0
- package/dist/generate/kinds/route-group-kind.js.map +1 -1
- package/dist/generate/kinds/route-kind.d.ts.map +1 -1
- package/dist/generate/kinds/route-kind.js +1 -0
- package/dist/generate/kinds/route-kind.js.map +1 -1
- package/dist/generate/kinds/schema-kind.d.ts.map +1 -1
- package/dist/generate/kinds/schema-kind.js +4 -9
- package/dist/generate/kinds/schema-kind.js.map +1 -1
- package/dist/generate/kinds/service-kind.d.ts.map +1 -1
- package/dist/generate/kinds/service-kind.js +1 -0
- package/dist/generate/kinds/service-kind.js.map +1 -1
- package/dist/generate/kinds/state-machine-kind.d.ts.map +1 -1
- package/dist/generate/kinds/state-machine-kind.js +1 -0
- package/dist/generate/kinds/state-machine-kind.js.map +1 -1
- package/dist/generate/kinds/test-world-kind.d.ts.map +1 -1
- package/dist/generate/kinds/test-world-kind.js +1 -0
- package/dist/generate/kinds/test-world-kind.js.map +1 -1
- package/dist/generate/kinds/value-object-kind.d.ts.map +1 -1
- package/dist/generate/kinds/value-object-kind.js +5 -4
- package/dist/generate/kinds/value-object-kind.js.map +1 -1
- package/dist/generate/kinds/vocabulary-kind.d.ts.map +1 -1
- package/dist/generate/kinds/vocabulary-kind.js +1 -0
- package/dist/generate/kinds/vocabulary-kind.js.map +1 -1
- package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
- package/dist/generate/kinds/worker-kind.js +1 -0
- package/dist/generate/kinds/worker-kind.js.map +1 -1
- package/dist/generate/kinds-help.d.ts +2 -0
- package/dist/generate/kinds-help.d.ts.map +1 -1
- package/dist/generate/kinds-help.js +5 -2
- package/dist/generate/kinds-help.js.map +1 -1
- package/dist/generate/label.d.ts +4 -1
- package/dist/generate/label.d.ts.map +1 -1
- package/dist/generate/label.js +24 -3
- package/dist/generate/label.js.map +1 -1
- package/dist/generate/language-probe.d.ts +16 -0
- package/dist/generate/language-probe.d.ts.map +1 -0
- package/dist/generate/language-probe.js +2 -0
- package/dist/generate/language-probe.js.map +1 -0
- package/dist/generate/learn-terms.d.ts.map +1 -1
- package/dist/generate/learn-terms.js +7 -1
- package/dist/generate/learn-terms.js.map +1 -1
- package/dist/generate/open-scope.d.ts +7 -2
- package/dist/generate/open-scope.d.ts.map +1 -1
- package/dist/generate/open-scope.js +14 -2
- package/dist/generate/open-scope.js.map +1 -1
- package/dist/generate/parse-terms.d.ts +7 -1
- package/dist/generate/parse-terms.d.ts.map +1 -1
- package/dist/generate/parse-terms.js +14 -4
- package/dist/generate/parse-terms.js.map +1 -1
- package/dist/generate/place-generated-files.d.ts +2 -2
- package/dist/generate/place-generated-files.d.ts.map +1 -1
- package/dist/generate/place-generated-files.js +7 -7
- package/dist/generate/place-generated-files.js.map +1 -1
- package/dist/generate/refuse-shared-writes.d.ts +2 -2
- package/dist/generate/refuse-shared-writes.d.ts.map +1 -1
- package/dist/generate/refuse-shared-writes.js +25 -4
- package/dist/generate/refuse-shared-writes.js.map +1 -1
- package/dist/generate/shared-kernel-placement.d.ts +9 -0
- package/dist/generate/shared-kernel-placement.d.ts.map +1 -0
- package/dist/generate/shared-kernel-placement.js +20 -0
- package/dist/generate/shared-kernel-placement.js.map +1 -0
- package/dist/generate/shared-kernel-scope.d.ts +11 -0
- package/dist/generate/shared-kernel-scope.d.ts.map +1 -0
- package/dist/generate/shared-kernel-scope.js +12 -0
- package/dist/generate/shared-kernel-scope.js.map +1 -0
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +26 -2
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/generate/spoken-in-language.d.ts +4 -3
- package/dist/generate/spoken-in-language.d.ts.map +1 -1
- package/dist/generate/spoken-in-language.js +19 -14
- package/dist/generate/spoken-in-language.js.map +1 -1
- package/dist/generate/usage-of.d.ts +6 -0
- package/dist/generate/usage-of.d.ts.map +1 -0
- package/dist/generate/usage-of.js +7 -0
- package/dist/generate/usage-of.js.map +1 -0
- package/dist/generate/vars.d.ts.map +1 -1
- package/dist/generate/vars.js +9 -1
- package/dist/generate/vars.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +31 -8
- package/dist/help/notes.js.map +1 -1
- package/dist/help/reference-text.d.ts.map +1 -1
- package/dist/help/reference-text.js +2 -1
- package/dist/help/reference-text.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +1 -1
- package/dist/init/agent-permissions.d.ts +7 -0
- package/dist/init/agent-permissions.d.ts.map +1 -1
- package/dist/init/agent-permissions.js +19 -8
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +2 -1
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/first-install-note.d.ts +9 -0
- package/dist/init/first-install-note.d.ts.map +1 -0
- package/dist/init/first-install-note.js +52 -0
- package/dist/init/first-install-note.js.map +1 -0
- package/dist/init/managed-settings-note.d.ts.map +1 -1
- package/dist/init/managed-settings-note.js +1 -0
- package/dist/init/managed-settings-note.js.map +1 -1
- package/dist/init/manifest/allow-builds-block.d.ts +3 -0
- package/dist/init/manifest/allow-builds-block.d.ts.map +1 -0
- package/dist/init/manifest/allow-builds-block.js +5 -0
- package/dist/init/manifest/allow-builds-block.js.map +1 -0
- package/dist/init/manifest/allow-builds-entries.d.ts +8 -0
- package/dist/init/manifest/allow-builds-entries.d.ts.map +1 -0
- package/dist/init/manifest/allow-builds-entries.js +8 -0
- package/dist/init/manifest/allow-builds-entries.js.map +1 -0
- package/dist/init/manifest/database-scripts.d.ts.map +1 -1
- package/dist/init/manifest/database-scripts.js +4 -2
- package/dist/init/manifest/database-scripts.js.map +1 -1
- package/dist/init/manifest/install-scripts-of.d.ts +18 -0
- package/dist/init/manifest/install-scripts-of.d.ts.map +1 -0
- package/dist/init/manifest/install-scripts-of.js +25 -0
- package/dist/init/manifest/install-scripts-of.js.map +1 -0
- package/dist/init/manifest/names-package.d.ts +3 -0
- package/dist/init/manifest/names-package.d.ts.map +1 -0
- package/dist/init/manifest/names-package.js +5 -0
- package/dist/init/manifest/names-package.js.map +1 -0
- package/dist/init/manifest/prisma-client-script.d.ts +3 -0
- package/dist/init/manifest/prisma-client-script.d.ts.map +1 -0
- package/dist/init/manifest/prisma-client-script.js +5 -0
- package/dist/init/manifest/prisma-client-script.js.map +1 -0
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/manifest/write-install-scripts.d.ts +10 -0
- package/dist/init/manifest/write-install-scripts.d.ts.map +1 -0
- package/dist/init/manifest/write-install-scripts.js +78 -0
- package/dist/init/manifest/write-install-scripts.js.map +1 -0
- package/dist/init/manifest/write-manifest.d.ts.map +1 -1
- package/dist/init/manifest/write-manifest.js +9 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/merge-sandbox.d.ts +3 -1
- package/dist/init/merge-sandbox.d.ts.map +1 -1
- package/dist/init/merge-sandbox.js +25 -7
- package/dist/init/merge-sandbox.js.map +1 -1
- package/dist/init/regulated-sandbox.d.ts +6 -4
- package/dist/init/regulated-sandbox.d.ts.map +1 -1
- package/dist/init/regulated-sandbox.js +11 -5
- package/dist/init/regulated-sandbox.js.map +1 -1
- package/dist/init/run-init.d.ts +2 -0
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +47 -7
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack-sandbox.d.ts +9 -0
- package/dist/init/stack-sandbox.d.ts.map +1 -0
- package/dist/init/stack-sandbox.js +28 -0
- package/dist/init/stack-sandbox.js.map +1 -0
- package/dist/init/write-agent-settings.d.ts.map +1 -1
- package/dist/init/write-agent-settings.js +26 -16
- package/dist/init/write-agent-settings.js.map +1 -1
- package/dist/merge/abort-merge.d.ts.map +1 -1
- package/dist/merge/abort-merge.js +38 -6
- package/dist/merge/abort-merge.js.map +1 -1
- package/dist/merge/commit-merge.d.ts.map +1 -1
- package/dist/merge/commit-merge.js +1 -16
- package/dist/merge/commit-merge.js.map +1 -1
- package/dist/merge/continue-merge.d.ts.map +1 -1
- package/dist/merge/continue-merge.js +2 -0
- package/dist/merge/continue-merge.js.map +1 -1
- package/dist/merge/ensure-mergeable.d.ts.map +1 -1
- package/dist/merge/ensure-mergeable.js +15 -0
- package/dist/merge/ensure-mergeable.js.map +1 -1
- package/dist/merge/ensure-writable.d.ts +9 -0
- package/dist/merge/ensure-writable.d.ts.map +1 -0
- package/dist/merge/ensure-writable.js +51 -0
- package/dist/merge/ensure-writable.js.map +1 -0
- package/dist/merge/is-merge-path.d.ts +4 -0
- package/dist/merge/is-merge-path.d.ts.map +1 -0
- package/dist/merge/is-merge-path.js +18 -0
- package/dist/merge/is-merge-path.js.map +1 -0
- package/dist/merge/is-sandbox-mask.d.ts +4 -0
- package/dist/merge/is-sandbox-mask.d.ts.map +1 -0
- package/dist/merge/is-sandbox-mask.js +5 -0
- package/dist/merge/is-sandbox-mask.js.map +1 -0
- package/dist/merge/merge-trunk.d.ts.map +1 -1
- package/dist/merge/merge-trunk.js +4 -0
- package/dist/merge/merge-trunk.js.map +1 -1
- package/dist/merge/modified-since-staged.d.ts +4 -0
- package/dist/merge/modified-since-staged.d.ts.map +1 -0
- package/dist/merge/modified-since-staged.js +8 -0
- package/dist/merge/modified-since-staged.js.map +1 -0
- package/dist/merge/stage-rewritten.d.ts +8 -0
- package/dist/merge/stage-rewritten.d.ts.map +1 -0
- package/dist/merge/stage-rewritten.js +15 -0
- package/dist/merge/stage-rewritten.js.map +1 -0
- package/dist/naming/parse-concept-name.d.ts +5 -3
- package/dist/naming/parse-concept-name.d.ts.map +1 -1
- package/dist/naming/parse-concept-name.js +6 -10
- package/dist/naming/parse-concept-name.js.map +1 -1
- package/dist/plan/format-plan.d.ts +2 -1
- package/dist/plan/format-plan.d.ts.map +1 -1
- package/dist/plan/format-plan.js +20 -2
- package/dist/plan/format-plan.js.map +1 -1
- package/dist/plan/plan-waves.d.ts.map +1 -1
- package/dist/plan/plan-waves.js +2 -1
- package/dist/plan/plan-waves.js.map +1 -1
- package/dist/plan/planned-commands.d.ts +10 -0
- package/dist/plan/planned-commands.d.ts.map +1 -0
- package/dist/plan/planned-commands.js +13 -0
- package/dist/plan/planned-commands.js.map +1 -0
- package/dist/plan/planned-words.d.ts +27 -0
- package/dist/plan/planned-words.d.ts.map +1 -0
- package/dist/plan/planned-words.js +170 -0
- package/dist/plan/planned-words.js.map +1 -0
- package/dist/plan/wave-plan.d.ts +11 -1
- package/dist/plan/wave-plan.d.ts.map +1 -1
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +6 -4
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-preset.d.ts.map +1 -1
- package/dist/presets/identity-preset.js +1 -4
- package/dist/presets/identity-preset.js.map +1 -1
- package/dist/presets/lay-out-prisma-models.d.ts +4 -4
- package/dist/presets/lay-out-prisma-models.d.ts.map +1 -1
- package/dist/presets/lay-out-prisma-models.js +15 -12
- package/dist/presets/lay-out-prisma-models.js.map +1 -1
- package/dist/presets/outside-the-tenancy.d.ts +10 -0
- package/dist/presets/outside-the-tenancy.d.ts.map +1 -0
- package/dist/presets/outside-the-tenancy.js +31 -0
- package/dist/presets/outside-the-tenancy.js.map +1 -0
- package/dist/presets/preset-decision.d.ts +1 -1
- package/dist/presets/preset-decision.js +1 -1
- package/dist/presets/preset.d.ts +1 -1
- package/dist/prisma-schema/index.d.ts +11 -0
- package/dist/prisma-schema/index.d.ts.map +1 -0
- package/dist/prisma-schema/index.js +11 -0
- package/dist/prisma-schema/index.js.map +1 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.d.ts +7 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.d.ts.map +1 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.js +11 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.js.map +1 -0
- package/dist/prisma-schema/prisma-blocks.d.ts +9 -0
- package/dist/prisma-schema/prisma-blocks.d.ts.map +1 -0
- package/dist/prisma-schema/prisma-blocks.js +15 -0
- package/dist/prisma-schema/prisma-blocks.js.map +1 -0
- package/dist/prisma-schema/prisma-main-schema.d.ts +3 -0
- package/dist/prisma-schema/prisma-main-schema.d.ts.map +1 -0
- package/dist/prisma-schema/prisma-main-schema.js +4 -0
- package/dist/prisma-schema/prisma-main-schema.js.map +1 -0
- package/dist/prisma-schema/prisma-schema-folder.d.ts +3 -0
- package/dist/prisma-schema/prisma-schema-folder.d.ts.map +1 -0
- package/dist/prisma-schema/prisma-schema-folder.js +3 -0
- package/dist/prisma-schema/prisma-schema-folder.js.map +1 -0
- package/dist/prisma-schema/prisma-schema-of.d.ts +7 -0
- package/dist/prisma-schema/prisma-schema-of.d.ts.map +1 -0
- package/dist/prisma-schema/prisma-schema-of.js +10 -0
- package/dist/prisma-schema/prisma-schema-of.js.map +1 -0
- package/dist/prisma-schema/schema-at.d.ts +4 -0
- package/dist/prisma-schema/schema-at.d.ts.map +1 -0
- package/dist/prisma-schema/schema-at.js +5 -0
- package/dist/prisma-schema/schema-at.js.map +1 -0
- package/dist/prisma-schema/schema-of-context.d.ts +3 -0
- package/dist/prisma-schema/schema-of-context.d.ts.map +1 -0
- package/dist/prisma-schema/schema-of-context.js +5 -0
- package/dist/prisma-schema/schema-of-context.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-found.d.ts +3 -0
- package/dist/prisma-schema/single-prisma-schema-found.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-found.js +7 -0
- package/dist/prisma-schema/single-prisma-schema-found.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-steps.d.ts +6 -0
- package/dist/prisma-schema/single-prisma-schema-steps.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-steps.js +25 -0
- package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema.d.ts +3 -0
- package/dist/prisma-schema/single-prisma-schema.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema.js +3 -0
- package/dist/prisma-schema/single-prisma-schema.js.map +1 -0
- package/dist/progress/read-remaining.d.ts.map +1 -1
- package/dist/progress/read-remaining.js +49 -6
- package/dist/progress/read-remaining.js.map +1 -1
- package/dist/slice/plan-staging.d.ts +7 -4
- package/dist/slice/plan-staging.d.ts.map +1 -1
- package/dist/slice/plan-staging.js +23 -5
- package/dist/slice/plan-staging.js.map +1 -1
- package/dist/slice/staging-scope.d.ts +9 -0
- package/dist/slice/staging-scope.d.ts.map +1 -0
- package/dist/slice/staging-scope.js +2 -0
- package/dist/slice/staging-scope.js.map +1 -0
- package/dist/slice/storage-of-slice.d.ts +14 -0
- package/dist/slice/storage-of-slice.d.ts.map +1 -0
- package/dist/slice/storage-of-slice.js +79 -0
- package/dist/slice/storage-of-slice.js.map +1 -0
- package/dist/slice/verify-slice.d.ts.map +1 -1
- package/dist/slice/verify-slice.js +3 -1
- package/dist/slice/verify-slice.js.map +1 -1
- package/dist/stack/audit-vars.js +1 -1
- package/dist/stack/audit-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/briefing-of.d.ts.map +1 -1
- package/dist/worker/briefing-of.js +7 -0
- package/dist/worker/briefing-of.js.map +1 -1
- package/dist/worker/progress-of.d.ts.map +1 -1
- package/dist/worker/progress-of.js +4 -1
- package/dist/worker/progress-of.js.map +1 -1
- package/dist/workspace/cannot-write.d.ts +7 -0
- package/dist/workspace/cannot-write.d.ts.map +1 -0
- package/dist/workspace/cannot-write.js +36 -0
- package/dist/workspace/cannot-write.js.map +1 -0
- package/dist/workspace/error-code-of.d.ts +3 -0
- package/dist/workspace/error-code-of.d.ts.map +1 -0
- package/dist/workspace/error-code-of.js +5 -0
- package/dist/workspace/error-code-of.js.map +1 -0
- package/dist/workspace/exit-code-of.d.ts +6 -0
- package/dist/workspace/exit-code-of.d.ts.map +1 -0
- package/dist/workspace/exit-code-of.js +7 -0
- package/dist/workspace/exit-code-of.js.map +1 -0
- package/dist/workspace/index.d.ts +2 -0
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +2 -0
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/is-file-or-absent.d.ts +3 -0
- package/dist/workspace/is-file-or-absent.d.ts.map +1 -0
- package/dist/workspace/is-file-or-absent.js +11 -0
- package/dist/workspace/is-file-or-absent.js.map +1 -0
- package/dist/workspace/prune-emptied.d.ts +3 -0
- package/dist/workspace/prune-emptied.d.ts.map +1 -0
- package/dist/workspace/prune-emptied.js +12 -0
- package/dist/workspace/prune-emptied.js.map +1 -0
- package/dist/workspace/tell-unwritable.d.ts +9 -0
- package/dist/workspace/tell-unwritable.d.ts.map +1 -0
- package/dist/workspace/tell-unwritable.js +10 -0
- package/dist/workspace/tell-unwritable.js.map +1 -0
- package/dist/workspace/workspace-report.d.ts +3 -0
- package/dist/workspace/workspace-report.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +15 -4
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +47 -27
- package/dist/workspace/workspace.js.map +1 -1
- package/dist/workspace/write-if-allowed.d.ts +3 -0
- package/dist/workspace/write-if-allowed.d.ts.map +1 -0
- package/dist/workspace/write-if-allowed.js +20 -0
- package/dist/workspace/write-if-allowed.js.map +1 -0
- package/package.json +4 -4
- package/templates/adapter/simulated.declared.ts.tpl +7 -0
- package/templates/adapter/simulated.spec.ts.tpl +12 -0
- package/templates/adapter/simulated.ts.tpl +5 -0
- package/templates/adapter/simulated.wiring.tsyringe.tpl +5 -0
- package/templates/aggregate/event-sourced.aggregate.spec.ts.tpl +8 -0
- package/templates/context/CONTEXT.md.tpl +1 -1
- package/templates/init/README.md.tpl +1 -1
- package/templates/init/platform/audit/create-audit.ts.tpl +1 -1
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +24 -17
- package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +1 -1
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
- package/templates/init/platform/database/prisma.config.ts.tpl +2 -1
- package/templates/init/platform/database/schema.prisma.tpl +3 -4
- package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +1 -1
- package/templates/init/pnpm-workspace.yaml +2 -5
- package/templates/init/rules/infrastructure.md.tpl +2 -1
- package/templates/pipeline/github/actions/setup/action.yml.tpl +1 -1
- package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation-tenant-directory.reader.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-search-members-reader.repository.drizzle.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-account.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-delegation.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-invitation.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-member.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-organisation-tenant-directory.reader.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-organisation.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/knex-search-members-reader.repository.knex.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation-tenant-directory.reader.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/context/infrastructure/persistence/prisma-search-members-reader.repository.prisma.ts.tpl +0 -3
- package/templates/presets/identity/decision.md.tpl +9 -6
- package/templates/presets/identity/design.md.tpl +4 -1
- package/templates/repository/prisma/schema.prisma.tpl +4 -0
- package/templates/shared-kernel/CONTEXT.md.tpl +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-if-allowed.js","sourceRoot":"","sources":["../../src/workspace/write-if-allowed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,mHAAmH;AACnH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEvF,yGAAyG;AACzG,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAe;IAC9D,IAAI,CAAC;QACH,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEpC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YAC5C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ddd-ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.96.0",
|
|
4
4
|
"description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ddd-ts-kit/audit": "^0.
|
|
56
|
-
"@ddd-ts-kit/events": "^0.
|
|
57
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
55
|
+
"@ddd-ts-kit/audit": "^0.96.0",
|
|
56
|
+
"@ddd-ts-kit/events": "^0.96.0",
|
|
57
|
+
"@ddd-ts-kit/kernel": "^0.96.0",
|
|
58
58
|
"@types/pg": "^8.23.1",
|
|
59
59
|
"pg": "^8.23.1"
|
|
60
60
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Adapter } from '@ddd-ts-kit/kernel/declarations';
|
|
2
|
+
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
3
|
+
|
|
4
|
+
@Adapter({{name.pascal}}, { kind: 'external' })
|
|
5
|
+
export class Simulated{{name.pascal}} implements {{name.pascal}} {
|
|
6
|
+
// TODO(domain): this adapter stands in for the outside system where it is simulated (a sandbox, a demo), and nothing it does leaves the process. Answer each operation of {{name.pascal}} from records kept here, as the outside system would, in the types of {{context.kebab}}, and refuse what it would refuse; declare each one `async`. Keep the records in the shape the outside system sends and answer through its translator of infrastructure/anti-corruption when it has one, so that the simulation runs the same anti-corruption layer as the remote adapter.
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { describe, expect, it } from '{{tests.module}}';
|
|
2
|
+
import { Simulated{{name.pascal}} } from '{{alias.context}}/infrastructure/external/simulated-{{name.kebab}}.adapter{{alias.ext}}';
|
|
3
|
+
|
|
4
|
+
describe('Simulated{{name.pascal}}', () => {
|
|
5
|
+
it('is an adapter of the port, built without argument: it reaches nothing outside the process', () => {
|
|
6
|
+
expect(new Simulated{{name.pascal}}()).toBeInstanceOf(Simulated{{name.pascal}});
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// TODO(domain): replace each entry below by a behaviour of {{name.pascal}}; hold this adapter, the remote one and the fake of test/fakes to the same expectations (a contract suite of the port, once two of them answer).
|
|
10
|
+
it.todo('answers what the outside system would answer, in the types of {{context.kebab}}');
|
|
11
|
+
it.todo('refuses what the outside system would refuse');
|
|
12
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
2
|
+
|
|
3
|
+
export class Simulated{{name.pascal}} implements {{name.pascal}} {
|
|
4
|
+
// TODO(domain): this adapter stands in for the outside system where it is simulated (a sandbox, a demo), and nothing it does leaves the process. Answer each operation of {{name.pascal}} from records kept here, as the outside system would, in the types of {{context.kebab}}, and refuse what it would refuse; declare each one `async`. Keep the records in the shape the outside system sends and answer through its translator of infrastructure/anti-corruption when it has one, so that the simulation runs the same anti-corruption layer as the remote adapter.
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
@@imports
|
|
2
|
+
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
3
|
+
import { Simulated{{name.pascal}} } from '{{alias.context}}/infrastructure/external/simulated-{{name.kebab}}.adapter{{alias.ext}}';
|
|
4
|
+
@@registrations
|
|
5
|
+
builder.bind({{name.pascal}}).toClass(Simulated{{name.pascal}}).as('external');
|
|
@@ -2,6 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { givenEvents } from '@ddd-ts-kit/testing';
|
|
3
3
|
import { {{name.pascal}} } from '{{alias.context}}/domain/aggregates/{{name.kebab}}.aggregate{{alias.ext}}';
|
|
4
4
|
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
5
|
+
import { {{name.article}}{{name.pascal}} } from '{{alias.context}}/test/builders/{{name.kebab}}.builder{{alias.ext}}';
|
|
5
6
|
|
|
6
7
|
const bornAt = new Date('2026-03-01T00:00:00.000Z');
|
|
7
8
|
|
|
@@ -20,6 +21,13 @@ describe('{{name.pascal}}', () => {
|
|
|
20
21
|
.thenState((loaded) => expect(loaded.version).toBe(1));
|
|
21
22
|
});
|
|
22
23
|
|
|
24
|
+
it('is loaded by its builder in the state its birth gives, recording nothing', () => {
|
|
25
|
+
const loaded = {{name.article}}{{name.pascal}}().identifiedBy('{{name.kebab}}-7').bornAt(bornAt).build();
|
|
26
|
+
|
|
27
|
+
expect(loaded.registeredAt).toEqual(bornAt);
|
|
28
|
+
expect(loaded.pullEvents()).toEqual([]);
|
|
29
|
+
});
|
|
30
|
+
|
|
23
31
|
// TODO(domain): replace each entry below by a test named after the business rule it proves: given the events of a history, when one command, then the events it records (`thenEvents`) or the refusal (`thenError`).
|
|
24
32
|
it.todo('refuses to be born when a birth invariant is violated');
|
|
25
33
|
it.todo('records a fact for each business intention, and changes state only through it');
|
|
@@ -20,7 +20,7 @@ npm run db:migrate
|
|
|
20
20
|
npm run db:migrate # builds, then applies migrations/ (the first one creates every table)
|
|
21
21
|
{{/if}}
|
|
22
22
|
{{#if orm.prisma}}
|
|
23
|
-
npm run db:client # the Prisma client and the schema of the tests, from prisma/schema
|
|
23
|
+
npm run db:client # the Prisma client and the schema of the tests, from the files of prisma/schema/
|
|
24
24
|
npm run db:generate initial # prisma/migrations/<timestamp>_initial/, from the schema
|
|
25
25
|
npm run db:migrate
|
|
26
26
|
{{/if}}
|
|
@@ -137,7 +137,7 @@ function createAuditTrail(persistence: Persistence): AuditTrail & AuditReader &
|
|
|
137
137
|
}
|
|
138
138
|
{{/if}}
|
|
139
139
|
{{#if audit.prisma}}
|
|
140
|
-
/** The schema the models of the trail declare in prisma/schema.prisma (`@@schema("audit")`). */
|
|
140
|
+
/** The schema the models of the trail declare in prisma/schema/schema.prisma (`@@schema("audit")`). */
|
|
141
141
|
const AUDIT_SCHEMA = 'audit';
|
|
142
142
|
|
|
143
143
|
function createAuditTrail(persistence: Persistence): AuditTrail & AuditReader & ArchivableAuditTrail {
|
|
@@ -36,7 +36,7 @@ import { auditModule } from '{{alias.platform}}/audit/audit.module{{alias.ext}}'
|
|
|
36
36
|
import { httpBoundary, type HttpBoundary } from '{{alias.platform}}/auth/authentication/http-boundary{{alias.ext}}';
|
|
37
37
|
{{/if}}
|
|
38
38
|
{{#if presentation.any}}
|
|
39
|
-
import { presentationOf } from '{{alias.platform}}/http/presentation-of{{alias.ext}}';
|
|
39
|
+
import { presentationOf, type Presentation } from '{{alias.platform}}/http/presentation-of{{alias.ext}}';
|
|
40
40
|
{{/if}}
|
|
41
41
|
{{#if presentation.forms}}
|
|
42
42
|
import { withForms } from '{{alias.platform}}/http/with-forms{{alias.ext}}';
|
|
@@ -199,22 +199,7 @@ export function composeApplication(
|
|
|
199
199
|
{{#if routes.nest}}
|
|
200
200
|
controllers,
|
|
201
201
|
{{/if}}
|
|
202
|
-
boundary:
|
|
203
|
-
authenticator: options.authenticator,
|
|
204
|
-
executionScope: platform.scope,
|
|
205
|
-
errorMapper: platformErrorMapper(),
|
|
206
|
-
clock,
|
|
207
|
-
logger,
|
|
208
|
-
{{#if audit.on}}
|
|
209
|
-
refusals: platform.audit.refusals,
|
|
210
|
-
{{/if}}
|
|
211
|
-
{{#if errors.sentry}}
|
|
212
|
-
errors: platform.errors,
|
|
213
|
-
{{/if}}
|
|
214
|
-
{{#if presentation.any}}
|
|
215
|
-
presentation,
|
|
216
|
-
{{/if}}
|
|
217
|
-
}),
|
|
202
|
+
boundary: boundaryOf(platform, options{{#if presentation.any}}, presentation{{/if}}),
|
|
218
203
|
{{/if}}
|
|
219
204
|
{{#unless http.any}}
|
|
220
205
|
routes: [],
|
|
@@ -243,6 +228,28 @@ export function composeApplication(
|
|
|
243
228
|
stop: () => stop(platform, options),
|
|
244
229
|
};
|
|
245
230
|
}
|
|
231
|
+
{{#if http.any}}
|
|
232
|
+
|
|
233
|
+
/** Who calls, in which scope, and how a refusal or an error is answered, at the edge of the HTTP server. */
|
|
234
|
+
function boundaryOf(platform: Platform, options: ApplicationOptions{{#if presentation.any}}, presentation: Presentation{{/if}}): HttpBoundary {
|
|
235
|
+
return httpBoundary({
|
|
236
|
+
authenticator: options.authenticator,
|
|
237
|
+
executionScope: platform.scope,
|
|
238
|
+
errorMapper: platformErrorMapper(),
|
|
239
|
+
clock: platform.clock,
|
|
240
|
+
logger: platform.logger,
|
|
241
|
+
{{#if audit.on}}
|
|
242
|
+
refusals: platform.audit.refusals,
|
|
243
|
+
{{/if}}
|
|
244
|
+
{{#if errors.sentry}}
|
|
245
|
+
errors: platform.errors,
|
|
246
|
+
{{/if}}
|
|
247
|
+
{{#if presentation.any}}
|
|
248
|
+
presentation,
|
|
249
|
+
{{/if}}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
{{/if}}
|
|
246
253
|
|
|
247
254
|
/**
|
|
248
255
|
* The consumers first, then the jobs: a job sends commands whose events must find their handlers.
|
|
@@ -6,7 +6,7 @@ export interface ConnectionOptions {
|
|
|
6
6
|
readonly poolSize?: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
/** The client connects on the first query. Run `npm run db:client` after a change of prisma/schema
|
|
9
|
+
/** The client connects on the first query. Run `npm run db:client` after a change of a file of prisma/schema/. */
|
|
10
10
|
export function createClient(url: string, options: ConnectionOptions = {}): PrismaClient {
|
|
11
11
|
const pool = options.poolSize === undefined ? {} : { max: options.poolSize };
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ export interface TestDatabase {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* PostgreSQL in process (PGlite, served over the wire protocol) by default, with the tables of
|
|
27
|
-
* generated/schema.sql, which `npm run db:client` derives from prisma/schema
|
|
27
|
+
* generated/schema.sql, which `npm run db:client` derives from prisma/schema/: adapter
|
|
28
28
|
* and end-to-end specs need no container. With a URL, the tests run on that server instead,
|
|
29
29
|
* which must already be migrated (`npm run db:migrate`).
|
|
30
30
|
*/
|
|
@@ -28,10 +28,10 @@ import { createPrismaUnitOfWork, PrismaOutboxStore, PrismaProcessedEventStore }
|
|
|
28
28
|
import type { PrismaClient } from '{{alias.generated}}/prisma/client{{alias.ext}}';
|
|
29
29
|
import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
|
|
30
30
|
|
|
31
|
-
/** The schema of the messaging tables{{#if queue.processTable}} and of the background work{{/if}}, as prisma/schema.prisma names it. */
|
|
31
|
+
/** The schema of the messaging tables{{#if queue.processTable}} and of the background work{{/if}}, as prisma/schema/schema.prisma names it. */
|
|
32
32
|
const MESSAGING_SCHEMA = 'messaging';
|
|
33
33
|
{{#if eventSourcing.on}}
|
|
34
|
-
/** The schema of the event store, as prisma/schema.prisma names it. */
|
|
34
|
+
/** The schema of the event store, as prisma/schema/schema.prisma names it. */
|
|
35
35
|
const EVENT_STORE_SCHEMA = 'event_store';
|
|
36
36
|
{{/if}}
|
|
37
37
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineConfig } from 'prisma/config';
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
|
|
4
|
+
// Every .prisma file of the folder: schema.prisma (the client, the datasource, the platform) and one file per context.
|
|
5
|
+
schema: './prisma/schema',
|
|
5
6
|
migrations: { path: './prisma/migrations' },
|
|
6
7
|
// `generate` and `migrate diff` never connect: they work without a database.
|
|
7
8
|
datasource: { url: process.env['DATABASE_URL'] ?? 'postgresql://unused:unused@127.0.0.1:1/unused' },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
generator client {
|
|
2
2
|
provider = "prisma-client"
|
|
3
|
-
output = "
|
|
3
|
+
output = "../../generated/prisma"
|
|
4
4
|
moduleFormat = "esm"
|
|
5
5
|
importFileExtension = "js"
|
|
6
6
|
}
|
|
@@ -100,9 +100,8 @@ model ProcessInstance {
|
|
|
100
100
|
}
|
|
101
101
|
{{/if}}
|
|
102
102
|
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
// /ddd-ts-kit:models
|
|
103
|
+
// The models of each bounded context are in a file of their own beside this one,
|
|
104
|
+
// prisma/schema/<context>.prisma, in the database schema of the context: no relation across contexts.
|
|
106
105
|
{{#if eventSourcing.on}}
|
|
107
106
|
|
|
108
107
|
// The event store of @ddd-ts-kit/prisma: the events, the snapshots, the checkpoints and the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if audit.on}}
|
|
2
2
|
import { auditedSubjectKeys, type AuditSource } from '@ddd-ts-kit/audit';
|
|
3
3
|
{{/if}}
|
|
4
|
-
import { PersonalDataCipher, type EventSourcingStores{{#if tenancy.any}}, type ExecutionScope{{/if}} } from '@ddd-ts-kit/kernel';
|
|
4
|
+
import { PersonalDataCipher, type EventSourcingStores{{#if tenancy.any}}{{#unless audit.on}}, type ExecutionScope{{/unless}}{{/if}} } from '@ddd-ts-kit/kernel';
|
|
5
5
|
{{#if audit.on}}
|
|
6
6
|
import type { Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
|
|
7
7
|
{{/if}}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# allowBuilds:
|
|
5
|
-
# '<package>': true
|
|
1
|
+
# pnpm runs the build script of a dependency only when `allowBuilds` names it (`'<package>': true`):
|
|
2
|
+
# init allows those the stack needs, and another one is added the same way, once its script was read.
|
|
6
3
|
#
|
|
7
4
|
# Without this line pnpm refuses to install as long as one script is neither allowed nor refused.
|
|
8
5
|
strictDepBuilds: false
|
|
@@ -8,6 +8,7 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
- An adapter `implements` a port of `application/ports/` or a repository port of `domain/repositories/`, and never `extends` it (`ports/implements-never-extends`). It never imports `presentation/` (`layer/infrastructure-no-presentation`).
|
|
10
10
|
- `persistence/` holds repository adapters, mappers and rows, `external/` the adapters of outside systems, `anti-corruption/` the translators of another model.
|
|
11
|
+
- An outside system the application runs without (a sandbox, a demo, a provider not ready yet) is answered by a simulated adapter of `external/`, `npx ddd-ts-kit generate adapter <context> <Port> --kind simulated`, which answers in memory as the system would, through its translator of `anti-corruption/`; never by a fake of `test/fakes/`, which production code never imports. A port has one adapter: the simulated one or the remote one.
|
|
11
12
|
{{#if literals.named}}
|
|
12
13
|
- A word of the other model stays its word: a translator keys its tables by the type of that model, `Record<TheirRecord['code'], InvoiceStatus>` (an annotation or `satisfies`), and compares with `'code' satisfies TheirRecord['code']`, so that the compiler holds its spelling; the value of the context it produces is read from its vocabulary (`language/declared-vocabulary`).
|
|
13
14
|
{{/if}}
|
|
@@ -19,7 +20,7 @@ paths:
|
|
|
19
20
|
- Own tables, in the schema of the context: no join, foreign key or transaction across contexts (`context/extractable`).
|
|
20
21
|
- Audit columns and the tenant column are stamped from the execution scope with the kernel helpers (`stampCreation`, `stampUpdate`, `tenantScopeOf`), never handed over by a use case.
|
|
21
22
|
{{#if tenancy.any}}
|
|
22
|
-
- Tenant data is reached through the helpers of the ORM package, never straight from the executor: {{#if orm.knex}}`tenantTable` to read, `ownTenantTable` to update or delete{{/if}}{{#if orm.drizzle}}`tenantCondition` in the condition of a read, `ownTenantCondition` in that of an update or a delete{{/if}}{{#if orm.prisma}}`tenantWhere` spread into the where of a read (`findFirst`, never `findUnique`: the tenant is not part of the key), `ownTenantWhere` into that of an update or a delete{{/if}}{{#if orm.typeorm}}`tenantWhere` spread into the where of a read, `ownTenantWhere` into the criteria of an update or a delete, never `save` or `upsert`{{/if}}, the tenant named on every insert, a read model store built with its `tenant` (`tenancy/scoped-statement`). A table of no tenant is a recorded deviation. See `docs/concepts/multitenancy.md` of the kit.
|
|
23
|
+
- Tenant data is reached through the helpers of the ORM package, never straight from the executor: {{#if orm.knex}}`tenantTable` to read, `ownTenantTable` to update or delete{{/if}}{{#if orm.drizzle}}`tenantCondition` in the condition of a read, `ownTenantCondition` in that of an update or a delete{{/if}}{{#if orm.prisma}}`tenantWhere` spread into the where of a read (`findFirst`, never `findUnique`: the tenant is not part of the key), `ownTenantWhere` into that of an update or a delete{{/if}}{{#if orm.typeorm}}`tenantWhere` spread into the where of a read, `ownTenantWhere` into the criteria of an update or a delete, never `save` or `upsert`{{/if}}, the tenant named on every insert, a read model store built with its `tenant` (`tenancy/scoped-statement`). A table of no tenant is a recorded deviation; a context none of whose tables belongs to a tenant, since it decides who belongs to which, is declared `"tenancy": "control-plane"` in its entry of `contexts`, with its deviation, never suppressed statement by statement. See `docs/concepts/multitenancy.md` of the kit.
|
|
23
24
|
{{/if}}
|
|
24
25
|
{{#if style.declared}}
|
|
25
26
|
- An adapter declares itself on its class, one per file (`declarations/role-declared`): `@Repository(InvoiceRepository)`, `@Gateway(Port)` or `@Adapter(Port, { kind })`. What it is given is what its constructor takes, each parameter typed by one class (`{{persistence.tokenOrNone}}`, `ExecutionScope`, `Clock`, a port, an abstract class the platform binds to a value) and nothing listed in the decorator (`declarations/constructor-injection`); an adapter that extends a class of a package writes its own constructor.
|
|
@@ -34,7 +34,7 @@ runs:
|
|
|
34
34
|
shell: bash
|
|
35
35
|
run: npm ci
|
|
36
36
|
{{#if orm.prisma}}
|
|
37
|
-
- name: The Prisma client and the schema of the tests, build products of prisma/schema
|
|
37
|
+
- name: The Prisma client and the schema of the tests, build products of prisma/schema/
|
|
38
38
|
shell: bash
|
|
39
39
|
run: npm run db:client
|
|
40
40
|
{{/if}}
|
|
@@ -80,7 +80,7 @@ default:
|
|
|
80
80
|
{{/if}}
|
|
81
81
|
- test -d node_modules || npm ci
|
|
82
82
|
{{#if orm.prisma}}
|
|
83
|
-
# The Prisma client and the schema of the tests are build products of prisma/schema
|
|
83
|
+
# The Prisma client and the schema of the tests are build products of prisma/schema/.
|
|
84
84
|
- npm run db:client
|
|
85
85
|
{{/if}}
|
|
86
86
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@biomejs/biome": "2.6.2",
|
|
24
24
|
"@commitlint/cli": "^21.2.3",
|
|
25
25
|
"@commitlint/config-conventional": "^21.2.3",
|
|
26
|
-
"@ddd-ts-kit/eslint-plugin": "^0.
|
|
26
|
+
"@ddd-ts-kit/eslint-plugin": "^0.96.0",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
29
|
"@vitest/coverage-v8": "5.0.3",
|
|
@@ -61,8 +61,5 @@ export class DrizzleAccountRepository implements AccountRepository {
|
|
|
61
61
|
|
|
62
62
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
63
63
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
64
|
-
{{#if tenancy.any}}
|
|
65
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
66
|
-
{{/if}}
|
|
67
64
|
return database.executor();
|
|
68
65
|
}
|
|
@@ -79,8 +79,5 @@ function unended(organisationId: string) {
|
|
|
79
79
|
|
|
80
80
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
81
81
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
82
|
-
{{#if tenancy.any}}
|
|
83
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
84
|
-
{{/if}}
|
|
85
82
|
return database.executor();
|
|
86
83
|
}
|
|
@@ -67,8 +67,5 @@ export class DrizzleInvitationRepository implements InvitationRepository {
|
|
|
67
67
|
|
|
68
68
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
69
69
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
70
|
-
{{#if tenancy.any}}
|
|
71
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
72
|
-
{{/if}}
|
|
73
70
|
return database.executor();
|
|
74
71
|
}
|
|
@@ -86,8 +86,5 @@ function current(organisationId: string, accountId: string) {
|
|
|
86
86
|
|
|
87
87
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
88
88
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
89
|
-
{{#if tenancy.any}}
|
|
90
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
91
|
-
{{/if}}
|
|
92
89
|
return database.executor();
|
|
93
90
|
}
|
|
@@ -19,8 +19,5 @@ export class DrizzleOrganisationTenantDirectory implements TenantDirectory {
|
|
|
19
19
|
|
|
20
20
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
21
21
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
22
|
-
{{#if tenancy.any}}
|
|
23
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
24
|
-
{{/if}}
|
|
25
22
|
return database.executor();
|
|
26
23
|
}
|
|
@@ -61,8 +61,5 @@ export class DrizzleOrganisationRepository implements OrganisationRepository {
|
|
|
61
61
|
|
|
62
62
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
63
63
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
64
|
-
{{#if tenancy.any}}
|
|
65
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
66
|
-
{{/if}}
|
|
67
64
|
return database.executor();
|
|
68
65
|
}
|
|
@@ -55,8 +55,5 @@ export class DrizzleSearchMembersReader implements SearchMembersReader {
|
|
|
55
55
|
|
|
56
56
|
/** The executor of the unit of work, which every statement of this file goes through. */
|
|
57
57
|
function executorOf(database: Database): ReturnType<Database['executor']> {
|
|
58
|
-
{{#if tenancy.any}}
|
|
59
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
60
|
-
{{/if}}
|
|
61
58
|
return database.executor();
|
|
62
59
|
}
|
|
@@ -61,9 +61,6 @@ export class KnexAccountRepository implements AccountRepository {
|
|
|
61
61
|
|
|
62
62
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
63
63
|
function tableOf(database: KnexContext): Knex.QueryBuilder<AccountRow, AccountRow[]> {
|
|
64
|
-
{{#if tenancy.any}}
|
|
65
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
66
|
-
{{/if}}
|
|
67
64
|
const table = database.executor()<AccountRow, AccountRow[]>('accounts');
|
|
68
65
|
|
|
69
66
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -80,9 +80,6 @@ export class KnexDelegationRepository implements DelegationRepository {
|
|
|
80
80
|
|
|
81
81
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
82
82
|
function tableOf(database: KnexContext): Knex.QueryBuilder<DelegationRow, DelegationRow[]> {
|
|
83
|
-
{{#if tenancy.any}}
|
|
84
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
85
|
-
{{/if}}
|
|
86
83
|
const table = database.executor()<DelegationRow, DelegationRow[]>('delegations');
|
|
87
84
|
|
|
88
85
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -67,9 +67,6 @@ export class KnexInvitationRepository implements InvitationRepository {
|
|
|
67
67
|
|
|
68
68
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
69
69
|
function tableOf(database: KnexContext): Knex.QueryBuilder<InvitationRow, InvitationRow[]> {
|
|
70
|
-
{{#if tenancy.any}}
|
|
71
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
72
|
-
{{/if}}
|
|
73
70
|
const table = database.executor()<InvitationRow, InvitationRow[]>('invitations');
|
|
74
71
|
|
|
75
72
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -82,9 +82,6 @@ export class KnexMemberRepository implements MemberRepository {
|
|
|
82
82
|
|
|
83
83
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
84
84
|
function tableOf(database: KnexContext): Knex.QueryBuilder<MemberRow, MemberRow[]> {
|
|
85
|
-
{{#if tenancy.any}}
|
|
86
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
87
|
-
{{/if}}
|
|
88
85
|
const table = database.executor()<MemberRow, MemberRow[]>('members');
|
|
89
86
|
|
|
90
87
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -21,9 +21,6 @@ export class KnexOrganisationTenantDirectory implements TenantDirectory {
|
|
|
21
21
|
|
|
22
22
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
23
23
|
function tableOf(database: KnexContext): Knex.QueryBuilder<OrganisationRow, OrganisationRow[]> {
|
|
24
|
-
{{#if tenancy.any}}
|
|
25
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
26
|
-
{{/if}}
|
|
27
24
|
const table = database.executor()<OrganisationRow, OrganisationRow[]>('organisations');
|
|
28
25
|
|
|
29
26
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -61,9 +61,6 @@ export class KnexOrganisationRepository implements OrganisationRepository {
|
|
|
61
61
|
|
|
62
62
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
63
63
|
function tableOf(database: KnexContext): Knex.QueryBuilder<OrganisationRow, OrganisationRow[]> {
|
|
64
|
-
{{#if tenancy.any}}
|
|
65
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
66
|
-
{{/if}}
|
|
67
64
|
const table = database.executor()<OrganisationRow, OrganisationRow[]>('organisations');
|
|
68
65
|
|
|
69
66
|
return table.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -66,9 +66,6 @@ export class KnexSearchMembersReader implements SearchMembersReader {
|
|
|
66
66
|
|
|
67
67
|
/** A function and not a method: a query builder is thenable, and a method that answers one is read as asynchronous by whatever wraps the adapter (tracing), which then answers a promise. */
|
|
68
68
|
function membersOf(database: KnexContext): Knex.QueryBuilder<MemberLine, MemberLine[]> {
|
|
69
|
-
{{#if tenancy.any}}
|
|
70
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
71
|
-
{{/if}}
|
|
72
69
|
const members = database.executor()<MemberLine, MemberLine[]>('members');
|
|
73
70
|
|
|
74
71
|
return members.withSchema({{context.constant}}_SCHEMA);
|
|
@@ -56,8 +56,5 @@ export class PrismaAccountRepository implements AccountRepository {
|
|
|
56
56
|
|
|
57
57
|
/** The accounts on the client of the unit of work, which every statement of this file goes through. */
|
|
58
58
|
function accountsOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Account'] {
|
|
59
|
-
{{#if tenancy.any}}
|
|
60
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
61
|
-
{{/if}}
|
|
62
59
|
return database.client().{{context.camel}}Account;
|
|
63
60
|
}
|
|
@@ -74,8 +74,5 @@ export class PrismaDelegationRepository implements DelegationRepository {
|
|
|
74
74
|
|
|
75
75
|
/** The delegations on the client of the unit of work, which every statement of this file goes through. */
|
|
76
76
|
function delegationsOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Delegation'] {
|
|
77
|
-
{{#if tenancy.any}}
|
|
78
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
79
|
-
{{/if}}
|
|
80
77
|
return database.client().{{context.camel}}Delegation;
|
|
81
78
|
}
|
|
@@ -62,8 +62,5 @@ export class PrismaInvitationRepository implements InvitationRepository {
|
|
|
62
62
|
|
|
63
63
|
/** The invitations on the client of the unit of work, which every statement of this file goes through. */
|
|
64
64
|
function invitationsOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Invitation'] {
|
|
65
|
-
{{#if tenancy.any}}
|
|
66
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
67
|
-
{{/if}}
|
|
68
65
|
return database.client().{{context.camel}}Invitation;
|
|
69
66
|
}
|
|
@@ -73,8 +73,5 @@ export class PrismaMemberRepository implements MemberRepository {
|
|
|
73
73
|
|
|
74
74
|
/** The members on the client of the unit of work, which every statement of this file goes through. */
|
|
75
75
|
function membersOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Member'] {
|
|
76
|
-
{{#if tenancy.any}}
|
|
77
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
78
|
-
{{/if}}
|
|
79
76
|
return database.client().{{context.camel}}Member;
|
|
80
77
|
}
|
|
@@ -18,8 +18,5 @@ export class PrismaOrganisationTenantDirectory implements TenantDirectory {
|
|
|
18
18
|
|
|
19
19
|
/** The organisations on the client of the unit of work, which every statement of this file goes through. */
|
|
20
20
|
function organisationsOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Organisation'] {
|
|
21
|
-
{{#if tenancy.any}}
|
|
22
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
23
|
-
{{/if}}
|
|
24
21
|
return database.client().{{context.camel}}Organisation;
|
|
25
22
|
}
|
|
@@ -56,8 +56,5 @@ export class PrismaOrganisationRepository implements OrganisationRepository {
|
|
|
56
56
|
|
|
57
57
|
/** The organisations on the client of the unit of work, which every statement of this file goes through. */
|
|
58
58
|
function organisationsOf(database: Database): ReturnType<Database['client']>['{{context.camel}}Organisation'] {
|
|
59
|
-
{{#if tenancy.any}}
|
|
60
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
61
|
-
{{/if}}
|
|
62
59
|
return database.client().{{context.camel}}Organisation;
|
|
63
60
|
}
|
|
@@ -75,8 +75,5 @@ function withProfiles(members: readonly MemberRow[], accounts: readonly AccountR
|
|
|
75
75
|
|
|
76
76
|
/** The client of the unit of work, which every statement of this file goes through. */
|
|
77
77
|
function clientOf(database: Database): ReturnType<Database['client']> {
|
|
78
|
-
{{#if tenancy.any}}
|
|
79
|
-
// ddd-ts-kit-disable-next-line tenancy/scoped-statement -- {{preset.adr}}: the {{context.kebab}} context is the control plane of the tenants, and its rows belong to none of them.
|
|
80
|
-
{{/if}}
|
|
81
78
|
return database.client();
|
|
82
79
|
}
|
|
@@ -15,18 +15,21 @@ one the request runs in.
|
|
|
15
15
|
## Decision
|
|
16
16
|
|
|
17
17
|
The tables of `{{context.kebab}}` (accounts, organisations, members, invitations, delegations)
|
|
18
|
-
belong to no tenant: they hold no tenant column, and
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
belong to no tenant: they hold no tenant column, and `ddd-ts-kit.config.json` declares the context
|
|
19
|
+
the control plane of the tenants (`contexts.{{context.kebab}}.tenancy` set to `control-plane`),
|
|
20
|
+
with the entry of `deviations` that names this record. The generators then confine none of its
|
|
21
|
+
repositories, and `tenancy/scoped-statement` does not judge its adapters. What one organisation
|
|
22
|
+
may read of another is decided per use case instead: every use case of an organisation authorizes
|
|
23
|
+
the actor on the rights of their membership in it (the policies of `application/authorization/`),
|
|
24
|
+
and every read names that organisation.
|
|
23
25
|
|
|
24
26
|
## Consequences
|
|
25
27
|
|
|
26
28
|
- Easier: a person, their memberships and their invitations are one model, whatever the tenant
|
|
27
29
|
of the request; the provider is told of every change, so that tokens name the organisations.
|
|
28
30
|
- Harder: isolation between the organisations of this context rests on its policies and on the
|
|
29
|
-
organisation each statement names, not on the storage
|
|
31
|
+
organisation each statement names, not on the storage, and no rule of the kit reads its
|
|
32
|
+
statements for a tenant. A new statement names its organisation.
|
|
30
33
|
- The integration events of an organisation carry it as their tenant, so that the consumers of the
|
|
31
34
|
other contexts run in it.
|
|
32
35
|
|
|
@@ -48,7 +48,10 @@ own model, or the tuples of OpenFGA, from these facts.
|
|
|
48
48
|
|
|
49
49
|
**Tenants.** Each organisation is a tenant: its slug is the tenant id, the integration events of
|
|
50
50
|
an organisation carry it as their tenant, and the consumers of the other contexts run in it. The
|
|
51
|
-
tables of this context belong to no tenant, since it decides who belongs to which ({{preset.adr}})
|
|
51
|
+
tables of this context belong to no tenant, since it decides who belongs to which ({{preset.adr}}):
|
|
52
|
+
`ddd-ts-kit.config.json` declares it the control plane of the tenants
|
|
53
|
+
(`contexts.{{context.kebab}}.tenancy` set to `control-plane`), so its repositories are generated
|
|
54
|
+
unconfined and `tenancy/scoped-statement` does not judge its adapters.
|
|
52
55
|
The token names the organisations of the person: with Keycloak, the `organization` claim, which
|
|
53
56
|
`createAuthenticator` reads (`tenantClaim: 'organization'`). One organisation is the tenant of
|
|
54
57
|
every request; several are the `tenants` of the actor, and a request names the one it works in
|