ddd-ts-kit 0.100.0 → 0.102.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 +104 -0
- package/README.fr.md +17 -10
- package/README.md +16 -9
- package/dist/build/emitted-place.d.ts +1 -2
- package/dist/build/emitted-place.d.ts.map +1 -1
- package/dist/build/emitted-specifier.d.ts +7 -1
- package/dist/build/emitted-specifier.d.ts.map +1 -1
- package/dist/build/emitted-specifier.js +5 -6
- package/dist/build/emitted-specifier.js.map +1 -1
- package/dist/build/emitted-target.d.ts +6 -5
- package/dist/build/emitted-target.d.ts.map +1 -1
- package/dist/build/emitted-target.js +5 -9
- package/dist/build/emitted-target.js.map +1 -1
- package/dist/build/rewrite-aliases.d.ts.map +1 -1
- package/dist/build/rewrite-aliases.js +4 -5
- package/dist/build/rewrite-aliases.js.map +1 -1
- package/dist/build/rewrite-specifiers.d.ts +7 -6
- package/dist/build/rewrite-specifiers.d.ts.map +1 -1
- package/dist/build/rewrite-specifiers.js +6 -4
- package/dist/build/rewrite-specifiers.js.map +1 -1
- package/dist/build/unresolved-problem.d.ts +2 -1
- package/dist/build/unresolved-problem.d.ts.map +1 -1
- package/dist/build/unresolved-problem.js +2 -2
- package/dist/build/unresolved-problem.js.map +1 -1
- package/dist/check/business-names/parameter-lists.js +1 -3
- package/dist/check/business-names/parameter-lists.js.map +1 -1
- package/dist/check/engine/run-check.d.ts +3 -0
- package/dist/check/engine/run-check.d.ts.map +1 -1
- package/dist/check/engine/run-check.js +1 -1
- package/dist/check/engine/run-check.js.map +1 -1
- package/dist/check/explain/tenancy-docs.d.ts.map +1 -1
- package/dist/check/explain/tenancy-docs.js +13 -3
- package/dist/check/explain/tenancy-docs.js.map +1 -1
- package/dist/check/fixtures/conjunct-cases.d.ts +11 -0
- package/dist/check/fixtures/conjunct-cases.d.ts.map +1 -0
- package/dist/check/fixtures/conjunct-cases.js +19 -0
- package/dist/check/fixtures/conjunct-cases.js.map +1 -0
- package/dist/check/fixtures/privacy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/privacy-fixtures.js +22 -0
- package/dist/check/fixtures/privacy-fixtures.js.map +1 -1
- package/dist/check/fixtures/run-fixture.d.ts +3 -2
- package/dist/check/fixtures/run-fixture.d.ts.map +1 -1
- package/dist/check/fixtures/run-fixture.js +3 -3
- package/dist/check/fixtures/run-fixture.js.map +1 -1
- package/dist/check/fixtures/run-self-check.js +1 -1
- package/dist/check/fixtures/run-self-check.js.map +1 -1
- package/dist/check/fixtures/tenancy-conjunct-drizzle-fixtures.d.ts +3 -0
- package/dist/check/fixtures/tenancy-conjunct-drizzle-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-drizzle-fixtures.js +33 -0
- package/dist/check/fixtures/tenancy-conjunct-drizzle-fixtures.js.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-fixtures.d.ts +4 -0
- package/dist/check/fixtures/tenancy-conjunct-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-fixtures.js +12 -0
- package/dist/check/fixtures/tenancy-conjunct-fixtures.js.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-knex-fixtures.d.ts +3 -0
- package/dist/check/fixtures/tenancy-conjunct-knex-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-knex-fixtures.js +49 -0
- package/dist/check/fixtures/tenancy-conjunct-knex-fixtures.js.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-prisma-fixtures.d.ts +3 -0
- package/dist/check/fixtures/tenancy-conjunct-prisma-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-prisma-fixtures.js +32 -0
- package/dist/check/fixtures/tenancy-conjunct-prisma-fixtures.js.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-typeorm-fixtures.d.ts +3 -0
- package/dist/check/fixtures/tenancy-conjunct-typeorm-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-conjunct-typeorm-fixtures.js +34 -0
- package/dist/check/fixtures/tenancy-conjunct-typeorm-fixtures.js.map +1 -0
- 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/privacy/published-events-of.d.ts.map +1 -1
- package/dist/check/privacy/published-events-of.js +4 -2
- package/dist/check/privacy/published-events-of.js.map +1 -1
- package/dist/check/rules/clean-one-export-per-file.js +1 -0
- package/dist/check/rules/clean-one-export-per-file.js.map +1 -1
- package/dist/check/rules/schema-no-duplicate-shape.js +1 -3
- package/dist/check/rules/schema-no-duplicate-shape.js.map +1 -1
- package/dist/check/rules/tenancy-scoped-statement.js +2 -2
- package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
- package/dist/check/schemas/class-shapes.d.ts.map +1 -1
- package/dist/check/schemas/class-shapes.js +5 -26
- package/dist/check/schemas/class-shapes.js.map +1 -1
- package/dist/check/structure/class-statements.d.ts +13 -0
- package/dist/check/structure/class-statements.d.ts.map +1 -0
- package/dist/check/structure/class-statements.js +34 -0
- package/dist/check/structure/class-statements.js.map +1 -0
- package/dist/check/structure/property-of.d.ts +13 -0
- package/dist/check/structure/property-of.d.ts.map +1 -0
- package/dist/check/structure/property-of.js +23 -0
- package/dist/check/structure/property-of.js.map +1 -0
- package/dist/check/tenancy/arguments-of-call.d.ts +3 -0
- package/dist/check/tenancy/arguments-of-call.d.ts.map +1 -0
- package/dist/check/tenancy/arguments-of-call.js +11 -0
- package/dist/check/tenancy/arguments-of-call.js.map +1 -0
- package/dist/check/tenancy/bare-expression.d.ts +3 -0
- package/dist/check/tenancy/bare-expression.d.ts.map +1 -0
- package/dist/check/tenancy/bare-expression.js +9 -0
- package/dist/check/tenancy/bare-expression.js.map +1 -0
- package/dist/check/tenancy/bracket-depth.d.ts +3 -0
- package/dist/check/tenancy/bracket-depth.d.ts.map +1 -0
- package/dist/check/tenancy/bracket-depth.js +10 -0
- package/dist/check/tenancy/bracket-depth.js.map +1 -0
- package/dist/check/tenancy/chain-links.d.ts +17 -0
- package/dist/check/tenancy/chain-links.d.ts.map +1 -0
- package/dist/check/tenancy/chain-links.js +24 -0
- package/dist/check/tenancy/chain-links.js.map +1 -0
- package/dist/check/tenancy/choice-branches.d.ts +3 -0
- package/dist/check/tenancy/choice-branches.d.ts.map +1 -0
- package/dist/check/tenancy/choice-branches.js +39 -0
- package/dist/check/tenancy/choice-branches.js.map +1 -0
- package/dist/check/tenancy/declaration-before.d.ts +12 -0
- package/dist/check/tenancy/declaration-before.d.ts.map +1 -0
- package/dist/check/tenancy/declaration-before.js +11 -0
- package/dist/check/tenancy/declaration-before.js.map +1 -0
- package/dist/check/tenancy/declaration-of.d.ts +1 -5
- package/dist/check/tenancy/declaration-of.d.ts.map +1 -1
- package/dist/check/tenancy/declaration-of.js +3 -8
- package/dist/check/tenancy/declaration-of.js.map +1 -1
- package/dist/check/tenancy/drizzle-unscoped.d.ts.map +1 -1
- package/dist/check/tenancy/drizzle-unscoped.js +16 -3
- package/dist/check/tenancy/drizzle-unscoped.js.map +1 -1
- package/dist/check/tenancy/enclosed-by.d.ts +3 -0
- package/dist/check/tenancy/enclosed-by.d.ts.map +1 -0
- package/dist/check/tenancy/enclosed-by.js +6 -0
- package/dist/check/tenancy/enclosed-by.js.map +1 -0
- package/dist/check/tenancy/end-of-enclosing.d.ts +7 -0
- package/dist/check/tenancy/end-of-enclosing.d.ts.map +1 -0
- package/dist/check/tenancy/end-of-enclosing.js +18 -0
- package/dist/check/tenancy/end-of-enclosing.js.map +1 -0
- package/dist/check/tenancy/holds-condition.d.ts +14 -0
- package/dist/check/tenancy/holds-condition.d.ts.map +1 -0
- package/dist/check/tenancy/holds-condition.js +26 -0
- package/dist/check/tenancy/holds-condition.js.map +1 -0
- package/dist/check/tenancy/is-conjunct.d.ts +8 -0
- package/dist/check/tenancy/is-conjunct.d.ts.map +1 -0
- package/dist/check/tenancy/is-conjunct.js +17 -0
- package/dist/check/tenancy/is-conjunct.js.map +1 -0
- package/dist/check/tenancy/is-or-link.d.ts +4 -0
- package/dist/check/tenancy/is-or-link.d.ts.map +1 -0
- package/dist/check/tenancy/is-or-link.js +7 -0
- package/dist/check/tenancy/is-or-link.js.map +1 -0
- package/dist/check/tenancy/knex-links-outside-condition.d.ts +11 -0
- package/dist/check/tenancy/knex-links-outside-condition.d.ts.map +1 -0
- package/dist/check/tenancy/knex-links-outside-condition.js +108 -0
- package/dist/check/tenancy/knex-links-outside-condition.js.map +1 -0
- package/dist/check/tenancy/knex-unscoped.d.ts +3 -1
- package/dist/check/tenancy/knex-unscoped.d.ts.map +1 -1
- package/dist/check/tenancy/knex-unscoped.js +12 -2
- package/dist/check/tenancy/knex-unscoped.js.map +1 -1
- package/dist/check/tenancy/prisma-unscoped.d.ts.map +1 -1
- package/dist/check/tenancy/prisma-unscoped.js +15 -10
- package/dist/check/tenancy/prisma-unscoped.js.map +1 -1
- package/dist/check/tenancy/spreads-at-top.d.ts +9 -0
- package/dist/check/tenancy/spreads-at-top.d.ts.map +1 -0
- package/dist/check/tenancy/spreads-at-top.js +49 -0
- package/dist/check/tenancy/spreads-at-top.js.map +1 -0
- package/dist/check/tenancy/top-level-parts.d.ts +3 -0
- package/dist/check/tenancy/top-level-parts.d.ts.map +1 -0
- package/dist/check/tenancy/top-level-parts.js +13 -0
- package/dist/check/tenancy/top-level-parts.js.map +1 -0
- package/dist/check/tenancy/typeorm-unscoped.d.ts.map +1 -1
- package/dist/check/tenancy/typeorm-unscoped.js +30 -16
- package/dist/check/tenancy/typeorm-unscoped.js.map +1 -1
- package/dist/check/tenancy/unconfined-where.d.ts +11 -0
- package/dist/check/tenancy/unconfined-where.d.ts.map +1 -0
- package/dist/check/tenancy/unconfined-where.js +18 -0
- package/dist/check/tenancy/unconfined-where.js.map +1 -0
- package/dist/config/read-config.d.ts.map +1 -1
- package/dist/config/read-config.js +20 -0
- package/dist/config/read-config.js.map +1 -1
- package/dist/declared/render-declarations.js +1 -3
- package/dist/declared/render-declarations.js.map +1 -1
- package/dist/describe/read-controllers.d.ts.map +1 -1
- package/dist/describe/read-controllers.js +18 -2
- package/dist/describe/read-controllers.js.map +1 -1
- package/dist/describe/read-event-definitions.d.ts +2 -0
- package/dist/describe/read-event-definitions.d.ts.map +1 -1
- package/dist/describe/read-event-definitions.js +1 -0
- package/dist/describe/read-event-definitions.js.map +1 -1
- package/dist/describe/schema-class-of.js +8 -1
- package/dist/describe/schema-class-of.js.map +1 -1
- package/dist/digest/tree-at.d.ts.map +1 -1
- package/dist/digest/tree-at.js +2 -0
- package/dist/digest/tree-at.js.map +1 -1
- package/dist/docs/context-sections.js +3 -7
- package/dist/docs/context-sections.js.map +1 -1
- package/dist/docs/personal-event-lines.d.ts +7 -0
- package/dist/docs/personal-event-lines.d.ts.map +1 -0
- package/dist/docs/personal-event-lines.js +34 -0
- package/dist/docs/personal-event-lines.js.map +1 -0
- package/dist/docs/write-docs.d.ts.map +1 -1
- package/dist/docs/write-docs.js +2 -0
- package/dist/docs/write-docs.js.map +1 -1
- package/dist/docs/write-personal-events.d.ts +11 -0
- package/dist/docs/write-personal-events.d.ts.map +1 -0
- package/dist/docs/write-personal-events.js +28 -0
- package/dist/docs/write-personal-events.js.map +1 -0
- package/dist/generate/flags-of.d.ts +4 -0
- package/dist/generate/flags-of.d.ts.map +1 -0
- package/dist/generate/flags-of.js +6 -0
- package/dist/generate/flags-of.js.map +1 -0
- package/dist/generate/held-to-glossary.d.ts +9 -0
- package/dist/generate/held-to-glossary.d.ts.map +1 -0
- package/dist/generate/held-to-glossary.js +11 -0
- package/dist/generate/held-to-glossary.js.map +1 -0
- package/dist/generate/kind-help.d.ts +2 -0
- package/dist/generate/kind-help.d.ts.map +1 -1
- package/dist/generate/kind-help.js +2 -0
- package/dist/generate/kind-help.js.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +1 -1
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/assert-event-store.d.ts +5 -1
- package/dist/generate/kinds/assert-event-store.d.ts.map +1 -1
- package/dist/generate/kinds/assert-event-store.js +11 -5
- package/dist/generate/kinds/assert-event-store.js.map +1 -1
- package/dist/generate/kinds/background/background-job-vars.js +4 -2
- package/dist/generate/kinds/background/background-job-vars.js.map +1 -1
- package/dist/generate/kinds/background/class-payload-schema.js +3 -3
- package/dist/generate/kinds/background/class-payload-schema.js.map +1 -1
- package/dist/generate/kinds/background-job-kind.js +1 -1
- package/dist/generate/kinds/background-job-kind.js.map +1 -1
- package/dist/generate/kinds/builder-kind.js +1 -1
- package/dist/generate/kinds/builder-kind.js.map +1 -1
- package/dist/generate/kinds/command-kind.js +1 -1
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/declarations-of.d.ts +11 -0
- package/dist/generate/kinds/declarations-of.d.ts.map +1 -0
- package/dist/generate/kinds/declarations-of.js +17 -0
- package/dist/generate/kinds/declarations-of.js.map +1 -0
- package/dist/generate/kinds/e2e-kind.js +1 -1
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
- package/dist/generate/kinds/event-type-as-published.d.ts +11 -0
- package/dist/generate/kinds/event-type-as-published.d.ts.map +1 -0
- package/dist/generate/kinds/event-type-as-published.js +17 -0
- package/dist/generate/kinds/event-type-as-published.js.map +1 -0
- package/dist/generate/kinds/form-kind.js +1 -1
- package/dist/generate/kinds/form-kind.js.map +1 -1
- package/dist/generate/kinds/generate-event-sourced-repository.js +8 -1
- package/dist/generate/kinds/generate-event-sourced-repository.js.map +1 -1
- package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-event-kind.js +2 -9
- 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 +30 -14
- package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
- package/dist/generate/kinds/job-kind.js +1 -1
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/module-kind.js +1 -1
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/parse-version.d.ts +3 -0
- package/dist/generate/kinds/parse-version.d.ts.map +1 -0
- package/dist/generate/kinds/parse-version.js +9 -0
- package/dist/generate/kinds/parse-version.js.map +1 -0
- package/dist/generate/kinds/pick-declaration.d.ts +9 -0
- package/dist/generate/kinds/pick-declaration.d.ts.map +1 -0
- package/dist/generate/kinds/pick-declaration.js +14 -0
- package/dist/generate/kinds/pick-declaration.js.map +1 -0
- package/dist/generate/kinds/presentation/controller-of.d.ts.map +1 -1
- package/dist/generate/kinds/presentation/controller-of.js +15 -5
- package/dist/generate/kinds/presentation/controller-of.js.map +1 -1
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
- package/dist/generate/kinds/projection-kind.js +21 -12
- package/dist/generate/kinds/projection-kind.js.map +1 -1
- package/dist/generate/kinds/property-kind.js +1 -1
- package/dist/generate/kinds/property-kind.js.map +1 -1
- package/dist/generate/kinds/refuse-unpublished-version.d.ts +7 -0
- package/dist/generate/kinds/refuse-unpublished-version.d.ts.map +1 -0
- package/dist/generate/kinds/refuse-unpublished-version.js +15 -0
- package/dist/generate/kinds/refuse-unpublished-version.js.map +1 -0
- package/dist/generate/kinds/repository-kind.js +1 -1
- package/dist/generate/kinds/repository-kind.js.map +1 -1
- package/dist/generate/kinds/representation-kind.js +1 -1
- package/dist/generate/kinds/representation-kind.js.map +1 -1
- package/dist/generate/kinds/route/controller-vars.js +1 -1
- package/dist/generate/kinds/route/controller-vars.js.map +1 -1
- package/dist/generate/kinds/route/message-call.d.ts +6 -2
- package/dist/generate/kinds/route/message-call.d.ts.map +1 -1
- package/dist/generate/kinds/route/message-call.js +2 -1
- package/dist/generate/kinds/route/message-call.js.map +1 -1
- package/dist/generate/kinds/route/message-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/message-vars.js +5 -2
- package/dist/generate/kinds/route/message-vars.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +1 -1
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/route/spec-vars.d.ts +2 -1
- package/dist/generate/kinds/route/spec-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/spec-vars.js +26 -7
- package/dist/generate/kinds/route/spec-vars.js.map +1 -1
- package/dist/generate/kinds/route/standard-schema-of.d.ts +2 -1
- package/dist/generate/kinds/route/standard-schema-of.d.ts.map +1 -1
- package/dist/generate/kinds/route/standard-schema-of.js +2 -4
- package/dist/generate/kinds/route/standard-schema-of.js.map +1 -1
- package/dist/generate/kinds/route-group-kind.js +1 -1
- package/dist/generate/kinds/route-group-kind.js.map +1 -1
- package/dist/generate/kinds/route-kind.js +2 -2
- package/dist/generate/kinds/route-kind.js.map +1 -1
- package/dist/generate/kinds/service-kind.js +1 -1
- package/dist/generate/kinds/service-kind.js.map +1 -1
- package/dist/generate/kinds/state-machine-kind.js +1 -1
- package/dist/generate/kinds/state-machine-kind.js.map +1 -1
- package/dist/generate/kinds/wanted-event.d.ts +6 -0
- package/dist/generate/kinds/wanted-event.d.ts.map +1 -0
- package/dist/generate/kinds/wanted-event.js +2 -0
- package/dist/generate/kinds/wanted-event.js.map +1 -0
- package/dist/generate/refuse-undeclared-flags.d.ts.map +1 -1
- package/dist/generate/refuse-undeclared-flags.js +9 -2
- package/dist/generate/refuse-undeclared-flags.js.map +1 -1
- package/dist/generator-lock/unreadable-lock-refusal.d.ts +4 -0
- package/dist/generator-lock/unreadable-lock-refusal.d.ts.map +1 -0
- package/dist/generator-lock/unreadable-lock-refusal.js +7 -0
- package/dist/generator-lock/unreadable-lock-refusal.js.map +1 -0
- package/dist/generator-lock/with-generator-lock.d.ts.map +1 -1
- package/dist/generator-lock/with-generator-lock.js +8 -7
- package/dist/generator-lock/with-generator-lock.js.map +1 -1
- package/dist/help/kind-help-text.d.ts.map +1 -1
- package/dist/help/kind-help-text.js +24 -13
- package/dist/help/kind-help-text.js.map +1 -1
- package/dist/init/files/platform-files.d.ts.map +1 -1
- package/dist/init/files/platform-files.js +14 -0
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/files/privacy-files.d.ts +2 -2
- package/dist/init/files/privacy-files.d.ts.map +1 -1
- package/dist/init/files/privacy-files.js +3 -2
- package/dist/init/files/privacy-files.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/stack/http-cache-misfit.d.ts +4 -0
- package/dist/init/stack/http-cache-misfit.d.ts.map +1 -0
- package/dist/init/stack/http-cache-misfit.js +21 -0
- package/dist/init/stack/http-cache-misfit.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +2 -1
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/measures/timeline-of.js +1 -0
- package/dist/measures/timeline-of.js.map +1 -1
- package/dist/progress/format-progress.js +1 -0
- package/dist/progress/format-progress.js.map +1 -1
- package/dist/sdk/planned-clients.d.ts +2 -2
- package/dist/sdk/planned-clients.d.ts.map +1 -1
- package/dist/sdk/planned-clients.js +2 -6
- package/dist/sdk/planned-clients.js.map +1 -1
- package/dist/sdk/set-up-sdk.d.ts.map +1 -1
- package/dist/sdk/set-up-sdk.js +3 -2
- package/dist/sdk/set-up-sdk.js.map +1 -1
- package/dist/stack/stack-vars.js +12 -3
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/stories/forecast-merge.js +1 -0
- package/dist/stories/forecast-merge.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/format-resume.d.ts.map +1 -1
- package/dist/worker/format-resume.js +5 -0
- package/dist/worker/format-resume.js.map +1 -1
- package/dist/worker/format-workers.js +5 -0
- package/dist/worker/format-workers.js.map +1 -1
- package/dist/worker/progress-of.d.ts +8 -3
- package/dist/worker/progress-of.d.ts.map +1 -1
- package/dist/worker/progress-of.js +2 -16
- package/dist/worker/progress-of.js.map +1 -1
- package/dist/worker/read-agent-record.d.ts.map +1 -1
- package/dist/worker/read-agent-record.js +15 -3
- package/dist/worker/read-agent-record.js.map +1 -1
- package/dist/worker/read-workers.js +2 -2
- package/dist/worker/read-workers.js.map +1 -1
- package/dist/worker/readable-progress.d.ts +5 -0
- package/dist/worker/readable-progress.d.ts.map +1 -0
- package/dist/worker/readable-progress.js +16 -0
- package/dist/worker/readable-progress.js.map +1 -0
- package/dist/worker/resume-worker.d.ts.map +1 -1
- package/dist/worker/resume-worker.js +4 -5
- package/dist/worker/resume-worker.js.map +1 -1
- package/dist/worker/worker-progress.d.ts +2 -1
- package/dist/worker/worker-progress.d.ts.map +1 -1
- package/dist/workspace/real-path-of.d.ts +2 -2
- package/dist/workspace/real-path-of.d.ts.map +1 -1
- package/dist/workspace/real-path-of.js +15 -10
- package/dist/workspace/real-path-of.js.map +1 -1
- package/package.json +5 -5
- package/templates/controller/controller.spec.ts.tpl +19 -0
- package/templates/docs/privacy-register.md.tpl +2 -0
- package/templates/init/README.md.tpl +13 -4
- package/templates/init/docker/env.example.tpl +8 -0
- package/templates/init/main.ts.tpl +3 -0
- package/templates/init/platform/audit/create-audit.ts.tpl +12 -6
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +36 -0
- package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +7 -0
- package/templates/init/platform/composition/lay-foundations.manual.ts.tpl +1 -1
- package/templates/init/platform/composition/lay-foundations.tsyringe.ts.tpl +1 -1
- package/templates/init/platform/composition/platform-options.manual.ts.tpl +7 -0
- package/templates/init/platform/composition/platform.manual.ts.tpl +7 -0
- package/templates/init/platform/composition/platform.module.tsyringe.ts.tpl +7 -0
- package/templates/init/platform/config/app-config.ts.tpl +7 -0
- package/templates/init/platform/config/load-config.ts.tpl +22 -0
- package/templates/init/platform/database/persistence.contract.spec.ts.tpl +14 -3
- package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +5 -1
- package/templates/init/platform/jobs/create-background-work.ts.tpl +12 -0
- package/templates/init/platform/jobs/days-before.ts.tpl +8 -0
- package/templates/init/platform/jobs/housekeeping.module.tsyringe.ts.tpl +46 -0
- package/templates/init/platform/jobs/housekeeping.ts.tpl +24 -0
- package/templates/init/platform/jobs/job-settings.ts.tpl +6 -0
- package/templates/init/platform/privacy/personal-events.ts.tpl +11 -0
- package/templates/init/platform/privacy/run-erasure.manual.ts.tpl +69 -19
- package/templates/init/platform/privacy/run-erasure.tsyringe.ts.tpl +69 -8
- package/templates/init/platform/privacy/run-export.manual.ts.tpl +2 -2
- package/templates/init/platform/privacy/run-export.tsyringe.ts.tpl +4 -2
- package/templates/init/platform/privacy/run-purge.manual.ts.tpl +3 -2
- package/templates/init/platform/privacy/run-purge.tsyringe.ts.tpl +4 -2
- package/templates/init/rules/infrastructure.md.tpl +1 -1
- package/templates/init/scripts/privacy-erase.manual.ts.tpl +52 -7
- package/templates/init/scripts/privacy-erase.tsyringe.ts.tpl +52 -7
- package/templates/init/scripts/privacy-export.manual.ts.tpl +4 -0
- package/templates/init/scripts/privacy-export.tsyringe.ts.tpl +4 -0
- package/templates/init/scripts/privacy-purge.manual.ts.tpl +4 -0
- package/templates/init/scripts/privacy-purge.tsyringe.ts.tpl +4 -0
- package/templates/integration-event/payload.class-validator.ts.tpl +2 -2
- package/templates/nest-controller/controller.spec.ts.tpl +25 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/pipeline/stryker.config.mjs.tpl +4 -0
- package/templates/presets/identity/context/presentation/http/accounts/deactivate-account/deactivate-account.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/accounts/provision-account/provision-account.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/accounts/provision-account/provision-account.body.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.body.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/decline-invitation/decline-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/decline-invitation/decline-invitation.body.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.body.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.body.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.accepted.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.body.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/open-organisation/open-organisation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/open-organisation/open-organisation.body.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/remove-member/remove-member.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/remove-member/remove-member.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/revoke-delegation/revoke-delegation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/revoke-delegation/revoke-delegation.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/revoke-invitation/revoke-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/revoke-invitation/revoke-invitation.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/search-members/search-members.line.class-validator.ts.tpl +6 -6
- package/templates/presets/identity/context/presentation/http/organisations/search-members/search-members.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/shared/invitation-token.schema.class-validator.shared.ts.tpl +1 -1
- package/templates/presets/identity/context/published-language/account-deactivated.v1.payload.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/published-language/delegation-granted.v1.payload.class-validator.ts.tpl +7 -7
- package/templates/presets/identity/context/published-language/delegation-revoked.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-joined.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-removed.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-role-changed.v1.payload.class-validator.ts.tpl +6 -6
- package/templates/presets/identity/context/published-language/organisation-opened.v1.payload.class-validator.ts.tpl +3 -3
- package/templates/route/dto.accepted.ts.tpl +1 -1
- package/templates/route/dto.answer.ts.tpl +1 -1
- package/templates/route/dto.body.ts.tpl +1 -1
- package/templates/route/dto.line.ts.tpl +2 -2
- package/templates/route/route.spec.ts.tpl +19 -0
- package/templates/schema/schema.class-validator.ts.tpl +1 -1
- package/templates/worker/main.ts.tpl +3 -0
- package/dist/generate/kinds/find-event-declaration.d.ts +0 -8
- package/dist/generate/kinds/find-event-declaration.d.ts.map +0 -1
- package/dist/generate/kinds/find-event-declaration.js +0 -27
- package/dist/generate/kinds/find-event-declaration.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { parseArgs } from 'node:util';
|
|
4
|
+
import { UnknownDataSubjectError } from '@ddd-ts-kit/kernel';
|
|
4
5
|
{{#if http.any}}
|
|
5
6
|
import { offlineAuthenticator } from '{{alias.platform}}/auth/authentication/offline-authenticator{{alias.ext}}';
|
|
6
7
|
{{/if}}
|
|
@@ -8,36 +9,55 @@ import { composeApplication } from '{{alias.platform}}/composition/compose-appli
|
|
|
8
9
|
{{#if persistence.needsUrl}}
|
|
9
10
|
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
10
11
|
{{/if}}
|
|
12
|
+
{{#unless persistence.needsUrl}}
|
|
13
|
+
{{#if queue.redis}}
|
|
14
|
+
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{/unless}}
|
|
11
17
|
import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
|
|
12
18
|
{{#if tenancy.any}}
|
|
13
19
|
import { tenantDirectory } from '{{alias.platform}}/composition/tenant-directory{{alias.ext}}';
|
|
14
20
|
{{/if}}
|
|
15
21
|
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
16
22
|
import { runErasure } from '{{alias.platform}}/privacy/run-erasure{{alias.ext}}';
|
|
23
|
+
{{#if queue.redis}}
|
|
24
|
+
import { openRedis } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
25
|
+
{{/if}}
|
|
17
26
|
|
|
18
27
|
// The right to erasure of one data subject (GDPR, article 17), from the command line:
|
|
19
|
-
// npm run privacy:erase -- <subject-id> [--operator <who-asks>]
|
|
28
|
+
// npm run privacy:erase -- <subject-id> [--operator <who-asks>] [--rerun]
|
|
20
29
|
{{#if eventSourcing.on}}
|
|
21
30
|
// The key of the subject is destroyed first, so every personal value of its stored events reads as
|
|
22
|
-
// erased
|
|
23
|
-
//
|
|
31
|
+
// erased; then every copy a context declared in src/platform/privacy/data-subject-copies.ts is
|
|
32
|
+
// erased{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}{{#if audit.on}}. The key and each copy leave a dated
|
|
33
|
+
// entry in the audit trail, with the operator{{/if}}.
|
|
24
34
|
{{/if}}
|
|
25
35
|
{{#unless eventSourcing.on}}
|
|
26
36
|
// Every copy a context declared in src/platform/privacy/data-subject-copies.ts is erased or
|
|
27
37
|
// pseudonymised where it lies{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}: the aggregates of
|
|
28
|
-
// this project are rows, so there is no key to destroy.
|
|
38
|
+
// this project are rows, so there is no key to destroy{{#if audit.on}}. Each copy leaves a dated entry in the audit
|
|
39
|
+
// trail, with the operator{{/if}}.
|
|
29
40
|
{{/unless}}
|
|
30
|
-
|
|
41
|
+
{{#if housekeeping.any}}
|
|
42
|
+
// {{#if events.outbox}}What the outbox keeps of the person, by the fields src/platform/privacy/personal-events.ts lists{{#if queue.stored}}, and{{/if}}{{/if}}{{#unless events.outbox}}{{#if queue.stored}}And{{/if}}{{/unless}}{{#if queue.stored}} the jobs
|
|
43
|
+
// enqueued with the person as `subject`{{/if}} are erased too.
|
|
44
|
+
{{/if}}
|
|
45
|
+
// The report says what was reached. An id that reached nothing is refused, exit code 1, and announced
|
|
46
|
+
// to nobody: a mistyped id{{#if tenancy.any}}, a tenant missing from the directory{{/if}} or an erasure already complete. --rerun says
|
|
47
|
+
// it is expected, and announces the erasure again: running it completes one that failed half way.
|
|
31
48
|
// What this script cannot reach: backups, logs, exports and the copies no context declared.
|
|
32
49
|
const { positionals, values } = parseArgs({
|
|
33
50
|
allowPositionals: true,
|
|
34
|
-
options: {
|
|
51
|
+
options: {
|
|
52
|
+
operator: { type: 'string', default: os.userInfo().username },
|
|
53
|
+
rerun: { type: 'boolean', default: false },
|
|
54
|
+
},
|
|
35
55
|
});
|
|
36
56
|
|
|
37
57
|
const [subject] = positionals;
|
|
38
58
|
|
|
39
59
|
if (subject === undefined || positionals.length > 1) {
|
|
40
|
-
console.error('Usage: npm run privacy:erase -- <subject-id> [--operator <who-asks>]');
|
|
60
|
+
console.error('Usage: npm run privacy:erase -- <subject-id> [--operator <who-asks>] [--rerun]');
|
|
41
61
|
process.exit(2);
|
|
42
62
|
}
|
|
43
63
|
{{#if tenancy.any}}
|
|
@@ -53,11 +73,22 @@ const persistence = {{persistence.await}}openPersistence(loadConfig(process.env)
|
|
|
53
73
|
const persistence = openPersistence();
|
|
54
74
|
{{/unless}}
|
|
55
75
|
|
|
76
|
+
{{#if queue.redis}}
|
|
77
|
+
const redis = openRedis(loadConfig(process.env));
|
|
78
|
+
|
|
79
|
+
{{/if}}
|
|
56
80
|
const application = composeApplication(persistence, {
|
|
57
81
|
events: inProcessEvents(),
|
|
82
|
+
{{#if audit.on}}
|
|
83
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
84
|
+
log: { level: 'error', format: 'json', service: 'privacy-erase', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
85
|
+
{{/if}}
|
|
58
86
|
{{#if http.any}}
|
|
59
87
|
authenticator: offlineAuthenticator,
|
|
60
88
|
{{/if}}
|
|
89
|
+
{{#if queue.redis}}
|
|
90
|
+
redis,
|
|
91
|
+
{{/if}}
|
|
61
92
|
});
|
|
62
93
|
|
|
63
94
|
{{#if tenancy.any}}
|
|
@@ -66,6 +97,9 @@ const tenants = await tenantDirectory(persistence, fixedTenants).tenants();
|
|
|
66
97
|
if (tenants.length === 0) {
|
|
67
98
|
console.error('The tenant directory lists no tenant: a write of tenant data is never widened. Name them in TENANTS, comma separated, or open an organisation first.');
|
|
68
99
|
await application.stop();
|
|
100
|
+
{{#if queue.redis}}
|
|
101
|
+
await redis.close();
|
|
102
|
+
{{/if}}
|
|
69
103
|
await persistence.close();
|
|
70
104
|
process.exit(2);
|
|
71
105
|
}
|
|
@@ -76,13 +110,24 @@ try {
|
|
|
76
110
|
container: application.container,
|
|
77
111
|
operator: values.operator,
|
|
78
112
|
correlationId: randomUUID(),
|
|
113
|
+
rerun: values.rerun,
|
|
79
114
|
{{#if tenancy.any}}
|
|
80
115
|
tenants,
|
|
81
116
|
{{/if}}
|
|
82
117
|
});
|
|
83
118
|
|
|
84
119
|
console.log(JSON.stringify(report, null, 2));
|
|
120
|
+
} catch (error) {
|
|
121
|
+
if (!(error instanceof UnknownDataSubjectError)) {
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
console.error(`${error.message}.{{#if tenancy.any}} Or a tenant the directory does not list.{{/if}} Nothing was announced; --rerun says this person was erased before.`);
|
|
126
|
+
process.exitCode = 1;
|
|
85
127
|
} finally {
|
|
86
128
|
await application.stop();
|
|
129
|
+
{{#if queue.redis}}
|
|
130
|
+
await redis.close();
|
|
131
|
+
{{/if}}
|
|
87
132
|
await persistence.close();
|
|
88
133
|
}
|
|
@@ -56,6 +56,10 @@ const persistence = openPersistence();
|
|
|
56
56
|
|
|
57
57
|
const application = composeApplication(persistence, {
|
|
58
58
|
events: inProcessEvents(),
|
|
59
|
+
{{#if audit.on}}
|
|
60
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
61
|
+
log: { level: 'error', format: 'json', service: 'privacy-export', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
62
|
+
{{/if}}
|
|
59
63
|
{{#if http.any}}
|
|
60
64
|
authenticator: offlineAuthenticator,
|
|
61
65
|
{{/if}}
|
|
@@ -56,6 +56,10 @@ const persistence = openPersistence();
|
|
|
56
56
|
|
|
57
57
|
const application = composeApplication(persistence, {
|
|
58
58
|
events: inProcessEvents(),
|
|
59
|
+
{{#if audit.on}}
|
|
60
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
61
|
+
log: { level: 'error', format: 'json', service: 'privacy-export', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
62
|
+
{{/if}}
|
|
59
63
|
{{#if http.any}}
|
|
60
64
|
authenticator: offlineAuthenticator,
|
|
61
65
|
{{/if}}
|
|
@@ -30,6 +30,10 @@ const persistence = openPersistence();
|
|
|
30
30
|
|
|
31
31
|
const application = composeApplication(persistence, {
|
|
32
32
|
events: inProcessEvents(),
|
|
33
|
+
{{#if audit.on}}
|
|
34
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
35
|
+
log: { level: 'error', format: 'json', service: 'privacy-purge', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
36
|
+
{{/if}}
|
|
33
37
|
{{#if http.any}}
|
|
34
38
|
authenticator: offlineAuthenticator,
|
|
35
39
|
{{/if}}
|
|
@@ -30,6 +30,10 @@ const persistence = openPersistence();
|
|
|
30
30
|
|
|
31
31
|
const application = composeApplication(persistence, {
|
|
32
32
|
events: inProcessEvents(),
|
|
33
|
+
{{#if audit.on}}
|
|
34
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
35
|
+
log: { level: 'error', format: 'json', service: 'privacy-purge', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
36
|
+
{{/if}}
|
|
33
37
|
{{#if http.any}}
|
|
34
38
|
authenticator: offlineAuthenticator,
|
|
35
39
|
{{/if}}
|
|
@@ -2,7 +2,7 @@ import { IsString } from 'class-validator';
|
|
|
2
2
|
|
|
3
3
|
export class {{event.pascal}}V{{event.version}}Payload {
|
|
4
4
|
@IsString()
|
|
5
|
-
{{aggregate.camel}}Id
|
|
5
|
+
declare {{aggregate.camel}}Id: string;
|
|
6
6
|
|
|
7
|
-
// TODO(domain): add what downstream contexts need to know about "{{event.words}}", as decorated primitive fields; this is a public contract: inside version {{event.version}} a field can be added, never renamed or removed.
|
|
7
|
+
// TODO(domain): add what downstream contexts need to know about "{{event.words}}", as decorated primitive fields `declare`d without an initial value, so that a payload without one is refused; this is a public contract: inside version {{event.version}} a field can be added, never renamed or removed.
|
|
8
8
|
}
|
|
@@ -26,6 +26,31 @@ describe('{{route.method}} {{route.path}}', () => {
|
|
|
26
26
|
expect(route.path).toBe('{{route.path}}');
|
|
27
27
|
expect({{context.camel}}Controllers).toContain({{name.pascal}}Controller);
|
|
28
28
|
});
|
|
29
|
+
{{#if route.refusesMissing}}
|
|
30
|
+
|
|
31
|
+
it('refuses a body without `{{route.missingField}}` with 422, naming the field', async () => {
|
|
32
|
+
const {{route.bus}} = new {{route.recordingBus}}();
|
|
33
|
+
|
|
34
|
+
const served = nestControllerRoute({{name.pascal}}Controller, {
|
|
35
|
+
instanceOf: () => new {{name.pascal}}Controller({{route.specArguments}}),
|
|
36
|
+
schemaOfClass: (dto) => classSchema(dto, { validator: { forbidUnknownValues: false } }),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const { send } = routeOf(served);
|
|
40
|
+
|
|
41
|
+
const response = await send({{route.missingRequest}});
|
|
42
|
+
|
|
43
|
+
expect(response).toMatchObject({
|
|
44
|
+
status: 422,
|
|
45
|
+
body: {
|
|
46
|
+
code: 'VALIDATION_FAILED',
|
|
47
|
+
issues: expect.arrayContaining([expect.objectContaining({ path: 'body.{{route.missingField}}' })]),
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
expect({{route.bus}}.executed).toEqual([]);
|
|
52
|
+
});
|
|
53
|
+
{{/if}}
|
|
29
54
|
|
|
30
55
|
// TODO(domain): replace each entry below by a test of the same shape, through the same `routeOf` (`{ caller }` names another one, `anonymousActor()` of the kernel nobody).
|
|
31
56
|
it.todo('refuses an input that does not have the expected shape with 422');
|
|
@@ -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.102.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",
|
|
@@ -3,11 +3,15 @@ import { governedMutation } from '@ddd-ts-kit/testing/mutation';
|
|
|
3
3
|
export default {
|
|
4
4
|
{{#if tests.vitest}}
|
|
5
5
|
testRunner: 'vitest',
|
|
6
|
+
// Named, since Stryker looks for its plugins beside its own real path, where pnpm's strict layout keeps `core` alone; the ignorer of the kit is appended by governedMutation().
|
|
7
|
+
plugins: ['@stryker-mutator/vitest-runner'],
|
|
6
8
|
// The unit specs alone: a mutant of the domain or of the application is noticed by a spec of the domain or of the application, in milliseconds.
|
|
7
9
|
vitest: { configFile: 'vitest.mutation.config.ts' },
|
|
8
10
|
{{/if}}
|
|
9
11
|
{{#if tests.jest}}
|
|
10
12
|
testRunner: 'jest',
|
|
13
|
+
// Named, since Stryker looks for its plugins beside its own real path, where pnpm's strict layout keeps `core` alone; the ignorer of the kit is appended by governedMutation().
|
|
14
|
+
plugins: ['@stryker-mutator/jest-runner'],
|
|
11
15
|
// The specs are ES modules and run under the flag the "test" script passes to Jest: Stryker passes it to the processes it runs Jest in.
|
|
12
16
|
testRunnerNodeArgs: ['--experimental-vm-modules'],
|
|
13
17
|
// The unit specs alone: a mutant of the domain or of the application is noticed by a spec of the domain or of the application, in milliseconds; Jest runs the specs that import the mutated file.
|
|
@@ -3,9 +3,9 @@ import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
3
3
|
export class ChangeMemberRoleParams {
|
|
4
4
|
@IsString()
|
|
5
5
|
@IsNotEmpty()
|
|
6
|
-
organisationId
|
|
6
|
+
declare organisationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
9
|
@IsNotEmpty()
|
|
10
|
-
accountId
|
|
10
|
+
declare accountId: string;
|
|
11
11
|
}
|
|
@@ -4,15 +4,15 @@ import { MemberRight } from '{{alias.context}}/domain/vocabularies/member-right.
|
|
|
4
4
|
export class GrantDelegationBody {
|
|
5
5
|
@IsString()
|
|
6
6
|
@IsNotEmpty()
|
|
7
|
-
delegateId
|
|
7
|
+
declare delegateId: string;
|
|
8
8
|
|
|
9
9
|
@IsArray()
|
|
10
10
|
@IsIn(Object.values(MemberRight), { each: true })
|
|
11
|
-
rights: MemberRight[]
|
|
11
|
+
declare rights: MemberRight[];
|
|
12
12
|
|
|
13
13
|
@IsISO8601()
|
|
14
|
-
startsAt
|
|
14
|
+
declare startsAt: string;
|
|
15
15
|
|
|
16
16
|
@IsISO8601()
|
|
17
|
-
endsAt
|
|
17
|
+
declare endsAt: string;
|
|
18
18
|
}
|
|
@@ -2,9 +2,9 @@ import { IsString } from 'class-validator';
|
|
|
2
2
|
|
|
3
3
|
export class InviteMemberAccepted {
|
|
4
4
|
@IsString()
|
|
5
|
-
id
|
|
5
|
+
declare id: string;
|
|
6
6
|
|
|
7
7
|
/** The token to send to the person, once: only its digest is stored. */
|
|
8
8
|
@IsString()
|
|
9
|
-
token
|
|
9
|
+
declare token: string;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vo
|
|
|
3
3
|
|
|
4
4
|
export class InviteMemberBody {
|
|
5
5
|
@IsEmail()
|
|
6
|
-
email
|
|
6
|
+
declare email: string;
|
|
7
7
|
|
|
8
8
|
@IsIn(Object.values(MemberRole))
|
|
9
|
-
role: MemberRole
|
|
9
|
+
declare role: MemberRole;
|
|
10
10
|
}
|
|
@@ -4,9 +4,9 @@ export class OpenOrganisationBody {
|
|
|
4
4
|
/** Lower-case letters, digits and hyphens: the identifier of the organisation, for good. */
|
|
5
5
|
@IsString()
|
|
6
6
|
@IsNotEmpty()
|
|
7
|
-
slug
|
|
7
|
+
declare slug: string;
|
|
8
8
|
|
|
9
9
|
@IsString()
|
|
10
10
|
@IsNotEmpty()
|
|
11
|
-
name
|
|
11
|
+
declare name: string;
|
|
12
12
|
}
|
|
@@ -3,9 +3,9 @@ import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
3
3
|
export class RemoveMemberParams {
|
|
4
4
|
@IsString()
|
|
5
5
|
@IsNotEmpty()
|
|
6
|
-
organisationId
|
|
6
|
+
declare organisationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
9
|
@IsNotEmpty()
|
|
10
|
-
accountId
|
|
10
|
+
declare accountId: string;
|
|
11
11
|
}
|
|
@@ -3,9 +3,9 @@ import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
3
3
|
export class RevokeDelegationParams {
|
|
4
4
|
@IsString()
|
|
5
5
|
@IsNotEmpty()
|
|
6
|
-
organisationId
|
|
6
|
+
declare organisationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
9
|
@IsNotEmpty()
|
|
10
|
-
delegationId
|
|
10
|
+
declare delegationId: string;
|
|
11
11
|
}
|
|
@@ -3,9 +3,9 @@ import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
3
3
|
export class RevokeInvitationParams {
|
|
4
4
|
@IsString()
|
|
5
5
|
@IsNotEmpty()
|
|
6
|
-
organisationId
|
|
6
|
+
declare organisationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
9
|
@IsNotEmpty()
|
|
10
|
-
invitationId
|
|
10
|
+
declare invitationId: string;
|
|
11
11
|
}
|
|
@@ -3,20 +3,20 @@ import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vo
|
|
|
3
3
|
|
|
4
4
|
export class SearchMembersLine {
|
|
5
5
|
@IsString()
|
|
6
|
-
memberId
|
|
6
|
+
declare memberId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
|
-
accountId
|
|
9
|
+
declare accountId: string;
|
|
10
10
|
|
|
11
11
|
@IsString()
|
|
12
|
-
displayName
|
|
12
|
+
declare displayName: string;
|
|
13
13
|
|
|
14
14
|
@IsEmail()
|
|
15
|
-
email
|
|
15
|
+
declare email: string;
|
|
16
16
|
|
|
17
17
|
@IsIn(Object.values(MemberRole))
|
|
18
|
-
role
|
|
18
|
+
declare role: MemberRole;
|
|
19
19
|
|
|
20
20
|
@IsISO8601()
|
|
21
|
-
joinedAt
|
|
21
|
+
declare joinedAt: string;
|
|
22
22
|
}
|
|
@@ -3,5 +3,5 @@ import { IsString } from 'class-validator';
|
|
|
3
3
|
/** An account was deactivated: its person signs in no more, and every context stops acting for it. Version 1: a field may be added, never renamed nor removed. */
|
|
4
4
|
export class AccountDeactivatedV1Payload {
|
|
5
5
|
@IsString()
|
|
6
|
-
accountId
|
|
6
|
+
declare accountId: string;
|
|
7
7
|
}
|
|
@@ -3,26 +3,26 @@ import { IsArray, IsISO8601, IsString } from 'class-validator';
|
|
|
3
3
|
/** A member lent rights to another member of the organisation, from an instant to another. Version 1: a field may be added, never renamed nor removed. */
|
|
4
4
|
export class DelegationGrantedV1Payload {
|
|
5
5
|
@IsString()
|
|
6
|
-
delegationId
|
|
6
|
+
declare delegationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
|
-
organisationId
|
|
9
|
+
declare organisationId: string;
|
|
10
10
|
|
|
11
11
|
@IsString()
|
|
12
|
-
delegatorId
|
|
12
|
+
declare delegatorId: string;
|
|
13
13
|
|
|
14
14
|
@IsString()
|
|
15
|
-
delegateId
|
|
15
|
+
declare delegateId: string;
|
|
16
16
|
|
|
17
17
|
@IsArray()
|
|
18
18
|
@IsString({ each: true })
|
|
19
|
-
rights: string[]
|
|
19
|
+
declare rights: string[];
|
|
20
20
|
|
|
21
21
|
/** An ISO 8601 instant. */
|
|
22
22
|
@IsISO8601()
|
|
23
|
-
startsAt
|
|
23
|
+
declare startsAt: string;
|
|
24
24
|
|
|
25
25
|
/** An ISO 8601 instant. */
|
|
26
26
|
@IsISO8601()
|
|
27
|
-
endsAt
|
|
27
|
+
declare endsAt: string;
|
|
28
28
|
}
|
|
@@ -3,14 +3,14 @@ import { IsString } from 'class-validator';
|
|
|
3
3
|
/** A delegation ended before its period: what it lent, the delegate holds no more. Version 1: a field may be added, never renamed nor removed. */
|
|
4
4
|
export class DelegationRevokedV1Payload {
|
|
5
5
|
@IsString()
|
|
6
|
-
delegationId
|
|
6
|
+
declare delegationId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
|
-
organisationId
|
|
9
|
+
declare organisationId: string;
|
|
10
10
|
|
|
11
11
|
@IsString()
|
|
12
|
-
delegatorId
|
|
12
|
+
declare delegatorId: string;
|
|
13
13
|
|
|
14
14
|
@IsString()
|
|
15
|
-
delegateId
|
|
15
|
+
declare delegateId: string;
|
|
16
16
|
}
|
|
@@ -3,14 +3,14 @@ import { IsString } from 'class-validator';
|
|
|
3
3
|
/** An account became a member of an organisation, in a role. Version 1: a field may be added, never renamed nor removed. */
|
|
4
4
|
export class MemberJoinedV1Payload {
|
|
5
5
|
@IsString()
|
|
6
|
-
memberId
|
|
6
|
+
declare memberId: string;
|
|
7
7
|
|
|
8
8
|
@IsString()
|
|
9
|
-
organisationId
|
|
9
|
+
declare organisationId: string;
|
|
10
10
|
|
|
11
11
|
@IsString()
|
|
12
|
-
accountId
|
|
12
|
+
declare accountId: string;
|
|
13
13
|
|
|
14
14
|
@IsString()
|
|
15
|
-
role
|
|
15
|
+
declare role: string;
|
|
16
16
|
}
|