ddd-ts-kit 0.101.0 → 0.103.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 +320 -0
- package/README.fr.md +11 -12
- package/README.md +10 -11
- package/dist/acceptance/check-locked-files.d.ts.map +1 -1
- package/dist/acceptance/check-locked-files.js +6 -3
- package/dist/acceptance/check-locked-files.js.map +1 -1
- 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 +7 -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/baseline/write-baseline.d.ts.map +1 -1
- package/dist/check/baseline/write-baseline.js +2 -3
- package/dist/check/baseline/write-baseline.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/errors/kit-error-codes.d.ts.map +1 -1
- package/dist/check/errors/kit-error-codes.js +1 -0
- package/dist/check/errors/kit-error-codes.js.map +1 -1
- package/dist/check/explain/authz-docs.js +1 -1
- package/dist/check/explain/authz-docs.js.map +1 -1
- package/dist/check/explain/errors-docs.js +1 -1
- package/dist/check/explain/errors-docs.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/authz-policy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.js +13 -1
- package/dist/check/fixtures/authz-policy-fixtures.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/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/rules/authz-policy-asked.d.ts.map +1 -1
- package/dist/check/rules/authz-policy-asked.js +45 -6
- package/dist/check/rules/authz-policy-asked.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/rules/test-spec-required.d.ts.map +1 -1
- package/dist/check/rules/test-spec-required.js +3 -1
- package/dist/check/rules/test-spec-required.js.map +1 -1
- package/dist/check/scan/named-outside-imports.d.ts +3 -0
- package/dist/check/scan/named-outside-imports.d.ts.map +1 -0
- package/dist/check/scan/named-outside-imports.js +8 -0
- package/dist/check/scan/named-outside-imports.js.map +1 -0
- package/dist/check/scan/star-exports-of.d.ts +3 -0
- package/dist/check/scan/star-exports-of.d.ts.map +1 -0
- package/dist/check/scan/star-exports-of.js +8 -0
- package/dist/check/scan/star-exports-of.js.map +1 -0
- package/dist/check/scan/string-at.d.ts +3 -0
- package/dist/check/scan/string-at.d.ts.map +1 -0
- package/dist/check/scan/string-at.js +5 -0
- package/dist/check/scan/string-at.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/check/text/closing-bracket.d.ts +6 -0
- package/dist/check/text/closing-bracket.d.ts.map +1 -0
- package/dist/check/text/closing-bracket.js +24 -0
- package/dist/check/text/closing-bracket.js.map +1 -0
- package/dist/commands/depcruise-config.d.ts.map +1 -1
- package/dist/commands/depcruise-config.js +4 -0
- package/dist/commands/depcruise-config.js.map +1 -1
- package/dist/commands/drizzle-generate.d.ts +3 -2
- package/dist/commands/drizzle-generate.d.ts.map +1 -1
- package/dist/commands/drizzle-generate.js +14 -6
- package/dist/commands/drizzle-generate.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +3 -2
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/knex-generate.d.ts +10 -0
- package/dist/commands/knex-generate.d.ts.map +1 -0
- package/dist/commands/knex-generate.js +74 -0
- package/dist/commands/knex-generate.js.map +1 -0
- package/dist/commands/lint.js +15 -0
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/move-to-module.d.ts.map +1 -1
- package/dist/commands/move-to-module.js +3 -0
- package/dist/commands/move-to-module.js.map +1 -1
- package/dist/commands/mutation.js +1 -1
- package/dist/commands/mutation.js.map +1 -1
- package/dist/commands/parse-migration-arguments.d.ts +11 -0
- package/dist/commands/parse-migration-arguments.d.ts.map +1 -0
- package/dist/commands/parse-migration-arguments.js +17 -0
- package/dist/commands/parse-migration-arguments.js.map +1 -0
- package/dist/commands/prisma-generate.d.ts.map +1 -1
- package/dist/commands/prisma-generate.js +5 -11
- package/dist/commands/prisma-generate.js.map +1 -1
- package/dist/commands/typeorm-generate.d.ts +2 -1
- package/dist/commands/typeorm-generate.d.ts.map +1 -1
- package/dist/commands/typeorm-generate.js +5 -2
- package/dist/commands/typeorm-generate.js.map +1 -1
- 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/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/doctor/permission-findings.d.ts.map +1 -1
- package/dist/doctor/permission-findings.js +68 -4
- package/dist/doctor/permission-findings.js.map +1 -1
- package/dist/generate/concept-role.d.ts +10 -0
- package/dist/generate/concept-role.d.ts.map +1 -1
- package/dist/generate/concept.d.ts.map +1 -1
- package/dist/generate/concept.js +5 -1
- package/dist/generate/concept.js.map +1 -1
- package/dist/generate/emit.d.ts +5 -2
- package/dist/generate/emit.d.ts.map +1 -1
- package/dist/generate/emit.js +5 -4
- package/dist/generate/emit.js.map +1 -1
- package/dist/generate/event-names.d.ts.map +1 -1
- package/dist/generate/event-names.js.map +1 -1
- package/dist/generate/files-without-modules.d.ts +8 -0
- package/dist/generate/files-without-modules.d.ts.map +1 -0
- package/dist/generate/files-without-modules.js +12 -0
- package/dist/generate/files-without-modules.js.map +1 -0
- package/dist/generate/grant-permission.js +2 -2
- package/dist/generate/grant-permission.js.map +1 -1
- package/dist/generate/kinds/aggregate-kind.js +4 -4
- package/dist/generate/kinds/aggregate-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/command-kind.d.ts.map +1 -1
- package/dist/generate/kinds/command-kind.js +6 -1
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +4 -10
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-event-kind.js +3 -1
- package/dist/generate/kinds/domain-event-kind.js.map +1 -1
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +8 -1
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/ensure-domain-event.d.ts.map +1 -1
- package/dist/generate/kinds/ensure-domain-event.js +2 -0
- package/dist/generate/kinds/ensure-domain-event.js.map +1 -1
- package/dist/generate/kinds/extraction/add-compose-service.js +1 -1
- package/dist/generate/kinds/extraction/add-compose-service.js.map +1 -1
- package/dist/generate/kinds/extraction/compose-service-of.d.ts +5 -0
- package/dist/generate/kinds/extraction/compose-service-of.d.ts.map +1 -0
- package/dist/generate/kinds/extraction/compose-service-of.js +8 -0
- package/dist/generate/kinds/extraction/compose-service-of.js.map +1 -0
- package/dist/generate/kinds/gateway-kind.js +9 -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 +36 -0
- package/dist/generate/kinds/generate-context.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/generate-repository.d.ts.map +1 -1
- package/dist/generate/kinds/generate-repository.js +13 -0
- package/dist/generate/kinds/generate-repository.js.map +1 -1
- package/dist/generate/kinds/query-kind.d.ts.map +1 -1
- package/dist/generate/kinds/query-kind.js +24 -2
- package/dist/generate/kinds/query-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/find-use-case.js +1 -1
- package/dist/generate/kinds/route/find-use-case.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/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/service-kind.d.ts.map +1 -1
- package/dist/generate/kinds/service-kind.js +4 -3
- package/dist/generate/kinds/service-kind.js.map +1 -1
- package/dist/generate/kinds/tables-files.d.ts +3 -0
- package/dist/generate/kinds/tables-files.d.ts.map +1 -0
- package/dist/generate/kinds/tables-files.js +7 -0
- package/dist/generate/kinds/tables-files.js.map +1 -0
- package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
- package/dist/generate/kinds/worker-kind.js +12 -0
- package/dist/generate/kinds/worker-kind.js.map +1 -1
- package/dist/generate/kinds/write-birth.d.ts +8 -0
- package/dist/generate/kinds/write-birth.d.ts.map +1 -0
- package/dist/generate/kinds/write-birth.js +13 -0
- package/dist/generate/kinds/write-birth.js.map +1 -0
- package/dist/generate/kinds/write-event-sourced-aggregate.d.ts.map +1 -1
- package/dist/generate/kinds/write-event-sourced-aggregate.js +8 -1
- package/dist/generate/kinds/write-event-sourced-aggregate.js.map +1 -1
- package/dist/generate/mark-policy-questions.js +2 -2
- package/dist/generate/mark-policy-questions.js.map +1 -1
- package/dist/generate/permission-name.d.ts +3 -0
- package/dist/generate/permission-name.d.ts.map +1 -0
- package/dist/generate/permission-name.js +3 -0
- package/dist/generate/permission-name.js.map +1 -0
- package/dist/generate/permission-named.d.ts.map +1 -1
- package/dist/generate/permission-named.js +1 -1
- package/dist/generate/permission-named.js.map +1 -1
- package/dist/generate/permission-words.d.ts +7 -0
- package/dist/generate/permission-words.d.ts.map +1 -0
- package/dist/generate/permission-words.js +11 -0
- package/dist/generate/permission-words.js.map +1 -0
- package/dist/generate/refined-by-policy.js +2 -2
- package/dist/generate/refined-by-policy.js.map +1 -1
- package/dist/generate/refuse-stuttering-event.d.ts +8 -0
- package/dist/generate/refuse-stuttering-event.d.ts.map +1 -0
- package/dist/generate/refuse-stuttering-event.js +14 -0
- package/dist/generate/refuse-stuttering-event.js.map +1 -0
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +1 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/generate/spoken-in-language.d.ts +11 -2
- package/dist/generate/spoken-in-language.d.ts.map +1 -1
- package/dist/generate/spoken-in-language.js +27 -12
- package/dist/generate/spoken-in-language.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/flag-notes.d.ts.map +1 -1
- package/dist/help/flag-notes.js +5 -1
- package/dist/help/flag-notes.js.map +1 -1
- package/dist/help/tool-notes.d.ts.map +1 -1
- package/dist/help/tool-notes.js +16 -0
- package/dist/help/tool-notes.js.map +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +1 -0
- package/dist/help/usage.js.map +1 -1
- package/dist/init/agent-permissions.d.ts.map +1 -1
- package/dist/init/agent-permissions.js +18 -3
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/files/audit-files.d.ts.map +1 -1
- package/dist/init/files/audit-files.js +1 -0
- package/dist/init/files/audit-files.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/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/files/script-files.d.ts +4 -1
- package/dist/init/files/script-files.d.ts.map +1 -1
- package/dist/init/files/script-files.js +6 -1
- package/dist/init/files/script-files.js.map +1 -1
- package/dist/init/is-team-file.d.ts +2 -2
- package/dist/init/is-team-file.d.ts.map +1 -1
- package/dist/init/is-team-file.js +5 -3
- package/dist/init/is-team-file.js.map +1 -1
- package/dist/init/keep-regions.d.ts +21 -0
- package/dist/init/keep-regions.d.ts.map +1 -0
- package/dist/init/keep-regions.js +63 -0
- package/dist/init/keep-regions.js.map +1 -0
- package/dist/init/kept-combination-notes.d.ts.map +1 -1
- package/dist/init/kept-combination-notes.js +6 -2
- package/dist/init/kept-combination-notes.js.map +1 -1
- package/dist/init/kept-compose-services.d.ts +6 -0
- package/dist/init/kept-compose-services.d.ts.map +1 -0
- package/dist/init/kept-compose-services.js +42 -0
- package/dist/init/kept-compose-services.js.map +1 -0
- package/dist/init/kept-role-vocabulary.d.ts +3 -0
- package/dist/init/kept-role-vocabulary.d.ts.map +1 -0
- package/dist/init/kept-role-vocabulary.js +7 -0
- package/dist/init/kept-role-vocabulary.js.map +1 -0
- package/dist/init/kept-roles.d.ts +12 -0
- package/dist/init/kept-roles.d.ts.map +1 -0
- package/dist/init/kept-roles.js +29 -0
- package/dist/init/kept-roles.js.map +1 -0
- package/dist/init/kept-wiring.d.ts +22 -0
- package/dist/init/kept-wiring.d.ts.map +1 -0
- package/dist/init/kept-wiring.js +91 -0
- package/dist/init/kept-wiring.js.map +1 -0
- package/dist/init/knip-vars.d.ts.map +1 -1
- package/dist/init/knip-vars.js +5 -1
- package/dist/init/knip-vars.js.map +1 -1
- package/dist/init/manifest/database-scripts.d.ts.map +1 -1
- package/dist/init/manifest/database-scripts.js +5 -3
- package/dist/init/manifest/database-scripts.js.map +1 -1
- package/dist/init/manifest/scripts-for.d.ts.map +1 -1
- package/dist/init/manifest/scripts-for.js +8 -0
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/orphaned-wiring-notes.d.ts +13 -0
- package/dist/init/orphaned-wiring-notes.d.ts.map +1 -0
- package/dist/init/orphaned-wiring-notes.js +42 -0
- package/dist/init/orphaned-wiring-notes.js.map +1 -0
- package/dist/init/profile-hooks.js +1 -1
- package/dist/init/profile-hooks.js.map +1 -1
- package/dist/init/repositories-left-behind.d.ts +12 -0
- package/dist/init/repositories-left-behind.d.ts.map +1 -0
- package/dist/init/repositories-left-behind.js +26 -0
- package/dist/init/repositories-left-behind.js.map +1 -0
- package/dist/init/rewire-audited-events.d.ts +10 -0
- package/dist/init/rewire-audited-events.d.ts.map +1 -0
- package/dist/init/rewire-audited-events.js +32 -0
- package/dist/init/rewire-audited-events.js.map +1 -0
- package/dist/init/rewire-contexts.d.ts +15 -0
- package/dist/init/rewire-contexts.d.ts.map +1 -0
- package/dist/init/rewire-contexts.js +41 -0
- package/dist/init/rewire-contexts.js.map +1 -0
- package/dist/init/rewire-preset.d.ts +9 -0
- package/dist/init/rewire-preset.d.ts.map +1 -0
- package/dist/init/rewire-preset.js +29 -0
- package/dist/init/rewire-preset.js.map +1 -0
- package/dist/init/rewire-tables.d.ts +10 -0
- package/dist/init/rewire-tables.d.ts.map +1 -0
- package/dist/init/rewire-tables.js +54 -0
- package/dist/init/rewire-tables.js.map +1 -0
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +28 -28
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/kept-flag-notes.d.ts +7 -0
- package/dist/init/stack/kept-flag-notes.d.ts.map +1 -0
- package/dist/init/stack/kept-flag-notes.js +24 -0
- package/dist/init/stack/kept-flag-notes.js.map +1 -0
- package/dist/init/stack/refuse-unused-no-outbox.d.ts +4 -0
- package/dist/init/stack/refuse-unused-no-outbox.d.ts.map +1 -0
- package/dist/init/stack/refuse-unused-no-outbox.js +9 -0
- package/dist/init/stack/refuse-unused-no-outbox.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +10 -0
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack-before.d.ts +4 -0
- package/dist/init/stack-before.d.ts.map +1 -0
- package/dist/init/stack-before.js +11 -0
- package/dist/init/stack-before.js.map +1 -0
- package/dist/init/wiring-notes.d.ts +9 -0
- package/dist/init/wiring-notes.d.ts.map +1 -0
- package/dist/init/wiring-notes.js +22 -0
- package/dist/init/wiring-notes.js.map +1 -0
- package/dist/init/with-named-imports.d.ts +8 -0
- package/dist/init/with-named-imports.d.ts.map +1 -0
- package/dist/init/with-named-imports.js +69 -0
- package/dist/init/with-named-imports.js.map +1 -0
- package/dist/init/with-system-grants.d.ts +7 -0
- package/dist/init/with-system-grants.d.ts.map +1 -0
- package/dist/init/with-system-grants.js +26 -0
- package/dist/init/with-system-grants.js.map +1 -0
- package/dist/init/write-local-environment.d.ts +8 -0
- package/dist/init/write-local-environment.d.ts.map +1 -0
- package/dist/init/write-local-environment.js +18 -0
- package/dist/init/write-local-environment.js.map +1 -0
- package/dist/lint/eslint-in-project.d.ts +1 -1
- package/dist/lint/eslint-in-project.d.ts.map +1 -1
- package/dist/lint/eslint-in-project.js +11 -2
- package/dist/lint/eslint-in-project.js.map +1 -1
- package/dist/markers/index.d.ts +3 -0
- package/dist/markers/index.d.ts.map +1 -1
- package/dist/markers/index.js +3 -0
- package/dist/markers/index.js.map +1 -1
- package/dist/markers/region-marker.d.ts +3 -0
- package/dist/markers/region-marker.d.ts.map +1 -0
- package/dist/markers/region-marker.js +3 -0
- package/dist/markers/region-marker.js.map +1 -0
- package/dist/markers/regions-of.d.ts +9 -0
- package/dist/markers/regions-of.d.ts.map +1 -0
- package/dist/markers/regions-of.js +20 -0
- package/dist/markers/regions-of.js.map +1 -0
- package/dist/markers/unpaired-markers.d.ts +3 -0
- package/dist/markers/unpaired-markers.d.ts.map +1 -0
- package/dist/markers/unpaired-markers.js +13 -0
- package/dist/markers/unpaired-markers.js.map +1 -0
- package/dist/measures/timeline-of.js +1 -0
- package/dist/measures/timeline-of.js.map +1 -1
- package/dist/merge/apply-resolutions.d.ts.map +1 -1
- package/dist/merge/apply-resolutions.js +6 -4
- package/dist/merge/apply-resolutions.js.map +1 -1
- package/dist/merge/continue-merge.d.ts.map +1 -1
- package/dist/merge/continue-merge.js +1 -0
- package/dist/merge/continue-merge.js.map +1 -1
- package/dist/merge/ensure-mergeable.js +1 -1
- package/dist/merge/ensure-mergeable.js.map +1 -1
- package/dist/merge/lost/verify-merges.d.ts.map +1 -1
- package/dist/merge/lost/verify-merges.js +4 -0
- package/dist/merge/lost/verify-merges.js.map +1 -1
- package/dist/merge/merge-state.d.ts.map +1 -1
- package/dist/merge/merge-state.js +2 -2
- package/dist/merge/merge-state.js.map +1 -1
- 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/refuse-shallow-history.d.ts +10 -0
- package/dist/merge/refuse-shallow-history.d.ts.map +1 -0
- package/dist/merge/refuse-shallow-history.js +15 -0
- package/dist/merge/refuse-shallow-history.js.map +1 -0
- package/dist/merge/resume-merge.js +2 -2
- package/dist/merge/resume-merge.js.map +1 -1
- package/dist/merge/settle-regions.d.ts.map +1 -1
- package/dist/merge/settle-regions.js +3 -4
- package/dist/merge/settle-regions.js.map +1 -1
- package/dist/migration/audit-guard/append-audit-guard.d.ts +4 -2
- package/dist/migration/audit-guard/append-audit-guard.d.ts.map +1 -1
- package/dist/migration/audit-guard/append-audit-guard.js +18 -3
- package/dist/migration/audit-guard/append-audit-guard.js.map +1 -1
- package/dist/migration/declared-tables.d.ts +8 -0
- package/dist/migration/declared-tables.d.ts.map +1 -0
- package/dist/migration/declared-tables.js +13 -0
- package/dist/migration/declared-tables.js.map +1 -0
- package/dist/migration/find-project-formatter.d.ts.map +1 -1
- package/dist/migration/find-project-formatter.js +2 -1
- package/dist/migration/find-project-formatter.js.map +1 -1
- package/dist/migration/index.d.ts +8 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +8 -0
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/knex-migration-text.d.ts +4 -0
- package/dist/migration/knex-migration-text.d.ts.map +1 -0
- package/dist/migration/knex-migration-text.js +24 -0
- package/dist/migration/knex-migration-text.js.map +1 -0
- package/dist/migration/knex-schema-difference.d.ts +12 -0
- package/dist/migration/knex-schema-difference.d.ts.map +1 -0
- package/dist/migration/knex-schema-difference.js +165 -0
- package/dist/migration/knex-schema-difference.js.map +1 -0
- package/dist/migration/listed-in-index.d.ts +6 -0
- package/dist/migration/listed-in-index.d.ts.map +1 -0
- package/dist/migration/listed-in-index.js +8 -0
- package/dist/migration/listed-in-index.js.map +1 -0
- package/dist/migration/refuse-other-orm.d.ts +8 -0
- package/dist/migration/refuse-other-orm.d.ts.map +1 -0
- package/dist/migration/refuse-other-orm.js +34 -0
- package/dist/migration/refuse-other-orm.js.map +1 -0
- package/dist/migration/required-migration-name.d.ts +3 -0
- package/dist/migration/required-migration-name.d.ts.map +1 -0
- package/dist/migration/required-migration-name.js +11 -0
- package/dist/migration/required-migration-name.js.map +1 -0
- package/dist/migration/warn-dropped-context-tables.d.ts +12 -0
- package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -0
- package/dist/migration/warn-dropped-context-tables.js +88 -0
- package/dist/migration/warn-dropped-context-tables.js.map +1 -0
- package/dist/package-manager/dialects.js +1 -1
- package/dist/package-manager/dialects.js.map +1 -1
- package/dist/package-manager/in-project-dialect.d.ts +8 -0
- package/dist/package-manager/in-project-dialect.d.ts.map +1 -0
- package/dist/package-manager/in-project-dialect.js +22 -0
- package/dist/package-manager/in-project-dialect.js.map +1 -0
- package/dist/presets/adapter-of.d.ts +5 -0
- package/dist/presets/adapter-of.d.ts.map +1 -0
- package/dist/presets/adapter-of.js +6 -0
- package/dist/presets/adapter-of.js.map +1 -0
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +1 -5
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/grant-to-signed-in.d.ts.map +1 -1
- package/dist/presets/grant-to-signed-in.js +1 -24
- package/dist/presets/grant-to-signed-in.js.map +1 -1
- package/dist/presets/identity-terms.d.ts.map +1 -1
- package/dist/presets/identity-terms.js +4 -0
- package/dist/presets/identity-terms.js.map +1 -1
- package/dist/presets/lay-out-prisma-models.js +1 -19
- package/dist/presets/lay-out-prisma-models.js.map +1 -1
- package/dist/presets/organisations-as-tenants.d.ts +2 -2
- package/dist/presets/organisations-as-tenants.d.ts.map +1 -1
- package/dist/presets/organisations-as-tenants.js +46 -2
- package/dist/presets/organisations-as-tenants.js.map +1 -1
- package/dist/presets/preset-named.d.ts +2 -0
- package/dist/presets/preset-named.d.ts.map +1 -1
- package/dist/presets/preset-named.js +1 -1
- package/dist/presets/preset-named.js.map +1 -1
- package/dist/presets/wrap-authorizer.d.ts +4 -0
- package/dist/presets/wrap-authorizer.d.ts.map +1 -0
- package/dist/presets/wrap-authorizer.js +25 -0
- package/dist/presets/wrap-authorizer.js.map +1 -0
- package/dist/prisma-schema/datasource-schemas.d.ts +3 -0
- package/dist/prisma-schema/datasource-schemas.d.ts.map +1 -0
- package/dist/prisma-schema/datasource-schemas.js +5 -0
- package/dist/prisma-schema/datasource-schemas.js.map +1 -0
- package/dist/prisma-schema/index.d.ts +4 -0
- package/dist/prisma-schema/index.d.ts.map +1 -1
- package/dist/prisma-schema/index.js +4 -0
- package/dist/prisma-schema/index.js.map +1 -1
- package/dist/prisma-schema/preview-features-of.d.ts +3 -0
- package/dist/prisma-schema/preview-features-of.d.ts.map +1 -0
- package/dist/prisma-schema/preview-features-of.js +7 -0
- package/dist/prisma-schema/preview-features-of.js.map +1 -0
- package/dist/prisma-schema/with-datasource-schema.d.ts +3 -0
- package/dist/prisma-schema/with-datasource-schema.d.ts.map +1 -0
- package/dist/prisma-schema/with-datasource-schema.js +9 -0
- package/dist/prisma-schema/with-datasource-schema.js.map +1 -0
- package/dist/prisma-schema/with-preview-feature.d.ts +3 -0
- package/dist/prisma-schema/with-preview-feature.d.ts.map +1 -0
- package/dist/prisma-schema/with-preview-feature.js +19 -0
- package/dist/prisma-schema/with-preview-feature.js.map +1 -0
- package/dist/progress/format-progress.js +1 -0
- package/dist/progress/format-progress.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +10 -1
- package/dist/run.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/render-client.js +1 -1
- package/dist/sdk/render-client.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/slice/record-verification.d.ts.map +1 -1
- package/dist/slice/record-verification.js +2 -5
- package/dist/slice/record-verification.js.map +1 -1
- package/dist/stack/stack-vars.js +16 -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/stories/open-story-scope.d.ts.map +1 -1
- package/dist/stories/open-story-scope.js +2 -4
- package/dist/stories/open-story-scope.js.map +1 -1
- package/dist/story/change-gated.d.ts +3 -3
- package/dist/story/change-gated.d.ts.map +1 -1
- package/dist/story/change-gated.js +13 -7
- package/dist/story/change-gated.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/open-worker-scope.d.ts.map +1 -1
- package/dist/worker/open-worker-scope.js +2 -3
- package/dist/worker/open-worker-scope.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/dist/workspace/write-inside-project.d.ts +8 -0
- package/dist/workspace/write-inside-project.d.ts.map +1 -0
- package/dist/workspace/write-inside-project.js +17 -0
- package/dist/workspace/write-inside-project.js.map +1 -0
- package/package.json +5 -5
- package/templates/aggregate/event-sourced.events.mapper.ts.tpl +5 -1
- package/templates/command/handler.declared.ts.tpl +4 -12
- package/templates/command/handler.ts.tpl +4 -12
- package/templates/docs/privacy-register.md.tpl +2 -0
- package/templates/e2e/e2e.spec.ts.tpl +2 -2
- package/templates/init/README.md.tpl +42 -9
- package/templates/init/docker/docker-compose.yml.tpl +5 -2
- package/templates/init/docker/dockerignore.tpl +1 -0
- package/templates/init/docker/env.example.tpl +16 -1
- package/templates/init/gitignore.tpl +1 -0
- package/templates/init/hooks/change-reference.mjs +96 -17
- package/templates/init/hooks/production-gate.mjs +65 -11
- package/templates/init/jest.config.js.tpl +4 -1
- package/templates/init/main.ts.tpl +3 -0
- package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +25 -8
- package/templates/init/platform/audit/create-audit-trail.ts.tpl +59 -0
- package/templates/init/platform/audit/create-audit.ts.tpl +13 -52
- package/templates/init/platform/auth/authentication/development-header-authenticator.ts.tpl +7 -3
- package/templates/init/platform/auth/relationships/relationship-schema.ts.tpl +5 -0
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +58 -7
- package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +9 -4
- 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 +16 -0
- package/templates/init/platform/config/load-config.ts.tpl +46 -0
- package/templates/init/platform/database/data-source.typeorm.ts.tpl +6 -0
- package/templates/init/platform/database/gitkeep +0 -0
- package/templates/init/platform/database/knexfile.js.tpl +10 -3
- package/templates/init/platform/database/open-persistence.prisma.ts.tpl +5 -2
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +11 -3
- package/templates/init/platform/database/persistence.contract.spec.ts.tpl +14 -3
- package/templates/init/platform/database/prisma.config.ts.tpl +6 -0
- package/templates/init/platform/database/schema.knex.ts.tpl +4 -3
- package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +5 -1
- package/templates/init/platform/http/start-http-server.express.ts.tpl +9 -6
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +5 -2
- package/templates/init/platform/http/start-http-server.hono.ts.tpl +5 -2
- 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 +9 -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 +26 -4
- package/templates/init/platform/privacy/run-export.tsyringe.ts.tpl +34 -3
- 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/audit-verify.ts.tpl +35 -0
- 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 +5 -7
- package/templates/init/scripts/privacy-export.tsyringe.ts.tpl +5 -7
- package/templates/init/scripts/privacy-purge.manual.ts.tpl +4 -0
- package/templates/init/scripts/privacy-purge.tsyringe.ts.tpl +4 -0
- package/templates/pipeline/github/dependabot.yml +6 -0
- package/templates/pipeline/github/workflows/ci.yml.tpl +26 -1
- package/templates/pipeline/github/workflows/claude-review.yml +3 -2
- package/templates/pipeline/github/workflows/claude-triage.yml +1 -1
- package/templates/pipeline/github/workflows/codeql.yml +2 -0
- package/templates/pipeline/github/workflows/copilot-setup-steps.yml +2 -0
- package/templates/pipeline/github/workflows/intent-to-spec.yml +12 -4
- package/templates/pipeline/github/workflows/pr-title.yml +2 -0
- package/templates/pipeline/gitlab/claude-review.gitlab-ci.yml.tpl +1 -1
- package/templates/pipeline/knip.json.tpl +1 -4
- package/templates/pipeline/package-scripts.json +2 -2
- package/templates/pipeline/renovate.json +11 -0
- package/templates/pipeline/stryker.config.mjs.tpl +4 -0
- package/templates/pipeline/vitest.config.ts.tpl +3 -2
- package/templates/presets/identity/context/__context__.codes.named.ts.tpl +1 -0
- package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +28 -1
- package/templates/presets/identity/context/domain/aggregates/invitation.aggregate.ts.tpl +13 -1
- package/templates/presets/identity/context/domain/aggregates/member.aggregate.ts.tpl +6 -1
- package/templates/presets/identity/context/domain/errors/invitation-withdrawn.error.named.ts.tpl +13 -0
- package/templates/presets/identity/context/domain/errors/invitation.error.factories.ts.tpl +8 -0
- package/templates/presets/identity/context/domain/services/role-rights.service.ts.tpl +23 -1
- package/templates/presets/identity/context/infrastructure/persistence/__context__.schema.drizzle.ts.tpl +1 -0
- package/templates/presets/identity/context/infrastructure/persistence/create-__context__-tables.schema.knex.ts.tpl +1 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +6 -2
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +6 -2
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +6 -2
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +6 -2
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +6 -2
- package/templates/presets/identity/context/infrastructure/persistence/invitation-row.schema.knex.ts.tpl +1 -0
- package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.drizzle.ts.tpl +2 -0
- package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.knex.ts.tpl +2 -0
- package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.prisma.ts.tpl +2 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +8 -5
- package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +8 -5
- package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +8 -5
- package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +8 -5
- package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +8 -5
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.kit-routes.ts.tpl +1 -0
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.controller.nest-routes.ts.tpl +1 -0
- package/templates/presets/identity/context/test/builders/invitation.builder.ts.tpl +15 -2
- package/templates/presets/identity/context/test/integration/invitation.repository.contract.spec.ts.tpl +10 -0
- package/templates/presets/identity/context/test/unit/accept-invitation.handler.spec.ts.tpl +114 -4
- package/templates/presets/identity/context/test/worlds/__context__.world.explicit.ts.tpl +1 -1
- package/templates/presets/identity/design.md.tpl +3 -1
- package/templates/presets/identity/prisma/models.prisma.tpl +1 -0
- package/templates/query/reader.fake.ts.tpl +4 -6
- package/templates/query/reader.in-memory.ts.tpl +1 -1
- package/templates/repository/drizzle/repository.ts.tpl +4 -3
- package/templates/repository/knex/table.tpl +1 -1
- package/templates/repository/prisma/repository.ts.tpl +24 -18
- package/templates/state-machine/state-machine.spec.ts.tpl +5 -0
- package/templates/worker/main.ts.tpl +3 -0
- package/templates/init/platform/database/migration.knex.js.tpl +0 -8
|
@@ -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
|
platform: application.platform,
|
|
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
|
}
|
|
@@ -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
|
}
|
|
@@ -20,16 +20,10 @@ import { runExport } from '{{alias.platform}}/privacy/run-export{{alias.ext}}';
|
|
|
20
20
|
// npm run privacy:export -- <subject-id> [--operator <who-asks>] > export.json
|
|
21
21
|
// One JSON document on the standard output (`format`, `subject`, `exportedAt`, `records`): every
|
|
22
22
|
// record each context declared in src/platform/privacy/data-subject-exports.ts keeps of the
|
|
23
|
-
// person{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}, as plain data. Hand it over to the person, then delete
|
|
23
|
+
// person{{#if eventSourcing.on}}, and every value the event store keeps sealed with the key of the person (`platform.event-store.<event type>`){{/if}}{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}, as plain data. Hand it over to the person, then delete
|
|
24
24
|
// the file{{#if audit.on}}; the audit trail keeps the entry of each export, never the values. Every run is a
|
|
25
25
|
// handover and leaves its entry, a trial included: try it on a test subject, never on a real person{{/if}}.
|
|
26
|
-
{{#if eventSourcing.on}}
|
|
27
|
-
// What this script cannot reach: the stored events (read them through the aggregate), backups,
|
|
28
|
-
// logs and the copies no context declared.
|
|
29
|
-
{{/if}}
|
|
30
|
-
{{#unless eventSourcing.on}}
|
|
31
26
|
// What this script cannot reach: backups, logs and the copies no context declared.
|
|
32
|
-
{{/unless}}
|
|
33
27
|
const { positionals, values } = parseArgs({
|
|
34
28
|
allowPositionals: true,
|
|
35
29
|
options: { operator: { type: 'string', default: os.userInfo().username } },
|
|
@@ -56,6 +50,10 @@ const persistence = openPersistence();
|
|
|
56
50
|
|
|
57
51
|
const application = composeApplication(persistence, {
|
|
58
52
|
events: inProcessEvents(),
|
|
53
|
+
{{#if audit.on}}
|
|
54
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
55
|
+
log: { level: 'error', format: 'json', service: 'privacy-export', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
56
|
+
{{/if}}
|
|
59
57
|
{{#if http.any}}
|
|
60
58
|
authenticator: offlineAuthenticator,
|
|
61
59
|
{{/if}}
|
|
@@ -20,16 +20,10 @@ import { runExport } from '{{alias.platform}}/privacy/run-export{{alias.ext}}';
|
|
|
20
20
|
// npm run privacy:export -- <subject-id> [--operator <who-asks>] > export.json
|
|
21
21
|
// One JSON document on the standard output (`format`, `subject`, `exportedAt`, `records`): every
|
|
22
22
|
// record each context declared in src/platform/privacy/data-subject-exports.ts keeps of the
|
|
23
|
-
// person{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}, as plain data. Hand it over to the person, then delete
|
|
23
|
+
// person{{#if eventSourcing.on}}, and every value the event store keeps sealed with the key of the person (`platform.event-store.<event type>`){{/if}}{{#if tenancy.any}}, in each tenant the tenant directory lists (TENANTS, or the organisations of the identity context){{/if}}, as plain data. Hand it over to the person, then delete
|
|
24
24
|
// the file{{#if audit.on}}; the audit trail keeps the entry of each export, never the values. Every run is a
|
|
25
25
|
// handover and leaves its entry, a trial included: try it on a test subject, never on a real person{{/if}}.
|
|
26
|
-
{{#if eventSourcing.on}}
|
|
27
|
-
// What this script cannot reach: the stored events (read them through the aggregate), backups,
|
|
28
|
-
// logs and the copies no context declared.
|
|
29
|
-
{{/if}}
|
|
30
|
-
{{#unless eventSourcing.on}}
|
|
31
26
|
// What this script cannot reach: backups, logs and the copies no context declared.
|
|
32
|
-
{{/unless}}
|
|
33
27
|
const { positionals, values } = parseArgs({
|
|
34
28
|
allowPositionals: true,
|
|
35
29
|
options: { operator: { type: 'string', default: os.userInfo().username } },
|
|
@@ -56,6 +50,10 @@ const persistence = openPersistence();
|
|
|
56
50
|
|
|
57
51
|
const application = composeApplication(persistence, {
|
|
58
52
|
events: inProcessEvents(),
|
|
53
|
+
{{#if audit.on}}
|
|
54
|
+
// Errors alone are logged: a failure whose audit entry could not be written says so, and what the script prints stays clean.
|
|
55
|
+
log: { level: 'error', format: 'json', service: 'privacy-export', environment: process.env['NODE_ENV'] ?? 'development', scrubMessages: true },
|
|
56
|
+
{{/if}}
|
|
59
57
|
{{#if http.any}}
|
|
60
58
|
authenticator: offlineAuthenticator,
|
|
61
59
|
{{/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}}
|
|
@@ -5,6 +5,8 @@ updates:
|
|
|
5
5
|
schedule:
|
|
6
6
|
interval: weekly
|
|
7
7
|
day: monday
|
|
8
|
+
cooldown:
|
|
9
|
+
default-days: 7
|
|
8
10
|
open-pull-requests-limit: 5
|
|
9
11
|
ignore:
|
|
10
12
|
# typescript-eslint and dependency-cruiser need the TypeScript 6 API; the native
|
|
@@ -49,6 +51,8 @@ updates:
|
|
|
49
51
|
schedule:
|
|
50
52
|
interval: weekly
|
|
51
53
|
day: monday
|
|
54
|
+
cooldown:
|
|
55
|
+
default-days: 7
|
|
52
56
|
commit-message:
|
|
53
57
|
prefix: ci
|
|
54
58
|
groups:
|
|
@@ -59,6 +63,8 @@ updates:
|
|
|
59
63
|
schedule:
|
|
60
64
|
interval: weekly
|
|
61
65
|
day: monday
|
|
66
|
+
cooldown:
|
|
67
|
+
default-days: 7
|
|
62
68
|
commit-message:
|
|
63
69
|
prefix: chore
|
|
64
70
|
include: scope
|
|
@@ -29,6 +29,7 @@ jobs:
|
|
|
29
29
|
steps:
|
|
30
30
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
31
31
|
with:
|
|
32
|
+
persist-credentials: false
|
|
32
33
|
# A pull request is checked out as its merge commit, whose first parent is the base it is compared with.
|
|
33
34
|
fetch-depth: 2
|
|
34
35
|
- uses: ./.github/actions/setup
|
|
@@ -45,6 +46,8 @@ jobs:
|
|
|
45
46
|
timeout-minutes: 10
|
|
46
47
|
steps:
|
|
47
48
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
49
|
+
with:
|
|
50
|
+
persist-credentials: false
|
|
48
51
|
- uses: ./.github/actions/setup
|
|
49
52
|
- run: npm run ci:typecheck
|
|
50
53
|
|
|
@@ -55,6 +58,8 @@ jobs:
|
|
|
55
58
|
timeout-minutes: 10
|
|
56
59
|
steps:
|
|
57
60
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
61
|
+
with:
|
|
62
|
+
persist-credentials: false
|
|
58
63
|
- uses: ./.github/actions/setup
|
|
59
64
|
# The cache of ESLint (`ddd-ts-kit lint` keys it by the content of each file): a pull request restores the one the
|
|
60
65
|
# default branch wrote last for this lockfile and this config, and lints the files that changed since; the default
|
|
@@ -85,6 +90,8 @@ jobs:
|
|
|
85
90
|
timeout-minutes: 10
|
|
86
91
|
steps:
|
|
87
92
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
93
|
+
with:
|
|
94
|
+
persist-credentials: false
|
|
88
95
|
- uses: ./.github/actions/setup
|
|
89
96
|
- name: Architecture rules
|
|
90
97
|
run: npm run ci:arch:check -- --format github
|
|
@@ -98,6 +105,8 @@ jobs:
|
|
|
98
105
|
timeout-minutes: 10
|
|
99
106
|
steps:
|
|
100
107
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
108
|
+
with:
|
|
109
|
+
persist-credentials: false
|
|
101
110
|
- uses: ./.github/actions/setup
|
|
102
111
|
- run: npm run ci:deadcode
|
|
103
112
|
|
|
@@ -108,6 +117,8 @@ jobs:
|
|
|
108
117
|
timeout-minutes: 15
|
|
109
118
|
steps:
|
|
110
119
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
120
|
+
with:
|
|
121
|
+
persist-credentials: false
|
|
111
122
|
- uses: ./.github/actions/setup
|
|
112
123
|
- name: Unit specs, each context held to its coverage thresholds
|
|
113
124
|
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
@@ -132,6 +143,8 @@ jobs:
|
|
|
132
143
|
DATABASE_URL: postgres://app:app@localhost:5432/app
|
|
133
144
|
steps:
|
|
134
145
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
146
|
+
with:
|
|
147
|
+
persist-credentials: false
|
|
135
148
|
- uses: ./.github/actions/setup
|
|
136
149
|
- name: PostgreSQL
|
|
137
150
|
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
@@ -154,6 +167,8 @@ jobs:
|
|
|
154
167
|
DATABASE_URL: postgres://app:app@localhost:5432/app
|
|
155
168
|
steps:
|
|
156
169
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
170
|
+
with:
|
|
171
|
+
persist-credentials: false
|
|
157
172
|
- uses: ./.github/actions/setup
|
|
158
173
|
- name: PostgreSQL
|
|
159
174
|
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
@@ -171,6 +186,8 @@ jobs:
|
|
|
171
186
|
timeout-minutes: 10
|
|
172
187
|
steps:
|
|
173
188
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
189
|
+
with:
|
|
190
|
+
persist-credentials: false
|
|
174
191
|
- uses: ./.github/actions/setup
|
|
175
192
|
- name: The production build
|
|
176
193
|
run: npm run ci:build
|
|
@@ -185,6 +202,7 @@ jobs:
|
|
|
185
202
|
steps:
|
|
186
203
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
187
204
|
with:
|
|
205
|
+
persist-credentials: false
|
|
188
206
|
fetch-depth: 0
|
|
189
207
|
- uses: ./.github/actions/setup
|
|
190
208
|
- name: Production dependencies audit
|
|
@@ -208,6 +226,8 @@ jobs:
|
|
|
208
226
|
timeout-minutes: 20
|
|
209
227
|
steps:
|
|
210
228
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
229
|
+
with:
|
|
230
|
+
persist-credentials: false
|
|
211
231
|
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
212
232
|
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
213
233
|
with:
|
|
@@ -226,6 +246,8 @@ jobs:
|
|
|
226
246
|
timeout-minutes: 60
|
|
227
247
|
steps:
|
|
228
248
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
249
|
+
with:
|
|
250
|
+
persist-credentials: false
|
|
229
251
|
- uses: ./.github/actions/setup
|
|
230
252
|
- name: Stryker on the domain and application layers of every context, each layer held to its "mutation" floor of ddd-ts-kit.config.json
|
|
231
253
|
run: npm run test:mutation
|
|
@@ -247,6 +269,7 @@ jobs:
|
|
|
247
269
|
steps:
|
|
248
270
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
249
271
|
with:
|
|
272
|
+
persist-credentials: false
|
|
250
273
|
# The whole history: the files of the change are those since its merge base with the base branch.
|
|
251
274
|
fetch-depth: 0
|
|
252
275
|
- uses: ./.github/actions/setup
|
|
@@ -259,9 +282,11 @@ jobs:
|
|
|
259
282
|
# The night runs without a base and writes no incremental file: its json report is the same object, which Stryker reads back.
|
|
260
283
|
if [ -f reports/mutation/mutation.json ]; then cp reports/mutation/mutation.json reports/mutation/incremental.json; fi
|
|
261
284
|
- name: Stryker on what the change touches, then the survivors of its files
|
|
285
|
+
env:
|
|
286
|
+
BASE_REF: ${{ github.base_ref }}
|
|
262
287
|
run: |
|
|
263
288
|
mkdir -p reports/mutation
|
|
264
|
-
base=$(git merge-base "origin/$
|
|
289
|
+
base=$(git merge-base "origin/$BASE_REF" HEAD)
|
|
265
290
|
DDD_TS_KIT_MUTATION_SINCE="$base" npm run --silent test:mutation | tee reports/mutation/changed.txt
|
|
266
291
|
{ echo '```'; cat reports/mutation/changed.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
|
|
267
292
|
|
|
@@ -6,7 +6,8 @@ name: Claude review
|
|
|
6
6
|
# API tokens on every run. The model is reached with ANTHROPIC_API_KEY, a secret of the repository,
|
|
7
7
|
# or through Amazon Bedrock, Google Vertex AI or Microsoft Foundry: uncomment the matching input
|
|
8
8
|
# below and add the credential step of the provider before the action, as its documentation
|
|
9
|
-
# (docs/cloud-providers.md of anthropics/claude-code-action) shows
|
|
9
|
+
# (docs/cloud-providers.md of anthropics/claude-code-action) shows; a provider reached with an
|
|
10
|
+
# identity token needs `id-token: write` in the permissions of the job, which holds none otherwise.
|
|
10
11
|
on:
|
|
11
12
|
pull_request:
|
|
12
13
|
types: [opened, ready_for_review, synchronize]
|
|
@@ -31,10 +32,10 @@ jobs:
|
|
|
31
32
|
contents: read
|
|
32
33
|
pull-requests: write
|
|
33
34
|
issues: write
|
|
34
|
-
id-token: write
|
|
35
35
|
steps:
|
|
36
36
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
37
37
|
with:
|
|
38
|
+
persist-credentials: false
|
|
38
39
|
# The whole history: the diff with the base and the story the branch names.
|
|
39
40
|
fetch-depth: 0
|
|
40
41
|
- name: The review policy and the story the branch names, when they exist
|
|
@@ -29,10 +29,10 @@ jobs:
|
|
|
29
29
|
actions: read
|
|
30
30
|
pull-requests: write
|
|
31
31
|
issues: write
|
|
32
|
-
id-token: write
|
|
33
32
|
steps:
|
|
34
33
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
35
34
|
with:
|
|
35
|
+
persist-credentials: false
|
|
36
36
|
ref: ${{ github.event.workflow_run.head_sha }}
|
|
37
37
|
- name: The names and the logs of the failed jobs, bounded
|
|
38
38
|
env:
|
|
@@ -25,6 +25,8 @@ jobs:
|
|
|
25
25
|
security-events: write
|
|
26
26
|
steps:
|
|
27
27
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
persist-credentials: false
|
|
28
30
|
- uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
29
31
|
with:
|
|
30
32
|
languages: javascript-typescript
|
|
@@ -33,6 +33,7 @@ jobs:
|
|
|
33
33
|
steps:
|
|
34
34
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
35
35
|
with:
|
|
36
|
+
# The credentials stay in the checkout: the story pushes its branch from it.
|
|
36
37
|
# The merge commit and its first parent: the diff of the pull request on the trunk.
|
|
37
38
|
fetch-depth: 2
|
|
38
39
|
ref: ${{ github.event.pull_request.base.ref }}
|
|
@@ -46,12 +47,17 @@ jobs:
|
|
|
46
47
|
echo "$accepted" >> "$GITHUB_OUTPUT"
|
|
47
48
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
48
49
|
echo "count=$(printf '%s\n' "$accepted" | grep -c '^docs/' || true)" >> "$GITHUB_OUTPUT"
|
|
50
|
+
# The agent at a version of this file, and the plugin at the tag of the kit version the project
|
|
51
|
+
# depends on: nothing moves under a run that can push. npm carries the agent whatever the
|
|
52
|
+
# package manager of the project is.
|
|
49
53
|
- name: Claude Code and the plugin
|
|
50
54
|
if: steps.accepted.outputs.count != '0'
|
|
51
55
|
run: |
|
|
52
|
-
npm install --global @anthropic-ai/claude-code
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
npm install --global --no-audit --no-fund @anthropic-ai/claude-code@2.1.309
|
|
57
|
+
kit=$(node -p "JSON.parse(require('node:fs').readFileSync('node_modules/ddd-ts-kit/package.json', 'utf8')).version") \
|
|
58
|
+
|| { echo "::error::ddd-ts-kit is not installed in node_modules: the plugin is loaded at the tag of the kit version the project depends on."; exit 1; }
|
|
59
|
+
git clone --quiet --depth 1 --branch "v$kit" https://github.com/gbourgeat/ddd-ts-kit.git "$RUNNER_TEMP/ddd-ts-kit" \
|
|
60
|
+
|| { echo "::error::The kit has no tag v$kit to load the plugin from: depend on a released version of ddd-ts-kit."; exit 1; }
|
|
55
61
|
- name: One story per accepted intent, headless, to its pull request
|
|
56
62
|
if: steps.accepted.outputs.count != '0'
|
|
57
63
|
env:
|
|
@@ -60,13 +66,15 @@ jobs:
|
|
|
60
66
|
# token of an app or a person for the checks of the story to run on it.
|
|
61
67
|
GH_TOKEN: ${{ secrets.INTENT_TO_SPEC_TOKEN || secrets.GITHUB_TOKEN }}
|
|
62
68
|
ACCEPTED: ${{ steps.accepted.outputs.files }}
|
|
69
|
+
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
63
70
|
run: |
|
|
64
71
|
git config user.name 'intent-to-spec'
|
|
65
72
|
git config user.email 'intent-to-spec@users.noreply.github.com'
|
|
66
|
-
git fetch --no-tags origin "$
|
|
73
|
+
git fetch --no-tags origin "$BASE_REF"
|
|
67
74
|
printf '%s\n' "$ACCEPTED" | grep '^docs/' | while read -r intent; do
|
|
68
75
|
code=$(basename "$intent" .md | tr '[:lower:]' '[:upper:]' | tr -c 'A-Z0-9-\n' '-')
|
|
69
76
|
claude -p "/ddd-ts-kit:story $code --headless $intent" \
|
|
77
|
+
--plugin-dir "$RUNNER_TEMP/ddd-ts-kit/plugin" \
|
|
70
78
|
--permission-mode acceptEdits \
|
|
71
79
|
--output-format text
|
|
72
80
|
done
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
variables:
|
|
16
16
|
GIT_DEPTH: '0'
|
|
17
17
|
before_script:
|
|
18
|
-
- npm install --global --no-audit --no-fund @anthropic-ai/claude-code
|
|
18
|
+
- npm install --global --no-audit --no-fund @anthropic-ai/claude-code@2.1.309
|
|
19
19
|
- |
|
|
20
20
|
post_note() {
|
|
21
21
|
if [ -z "${CI_MERGE_REQUEST_IID:-}" ]; then echo "No merge request: the text stays in this log."; return 0; fi
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://unpkg.com/knip@6/schema.json",
|
|
3
3
|
"entry": [
|
|
4
|
-
{{
|
|
5
|
-
"{{config.sourceRoot}}/apps/*/main.ts",
|
|
6
|
-
{{/if}}
|
|
7
|
-
"scripts/*.ts"{{knip.e2eEntry}}{{knip.toolEntry}}
|
|
4
|
+
"scripts/*.ts"{{knip.e2eEntry}}{{knip.toolEntry}}{{knip.appsEntry}}
|
|
8
5
|
],
|
|
9
6
|
"project": ["{{config.sourceRoot}}/**/*.ts", "scripts/**/*.ts"{{knip.e2eProject}}{{#if orm.prisma}}, "prisma/**/*.prisma"{{/if}}],
|
|
10
7
|
{{#if knip.ignores}}
|
|
@@ -23,10 +23,10 @@
|
|
|
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.103.0",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
|
-
"@vitest/coverage-v8": "5.0.3",
|
|
29
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
30
30
|
"dependency-cruiser": "^18.5.0",
|
|
31
31
|
"eslint": "^10.12.0",
|
|
32
32
|
"eslint-formatter-gitlab": "^7.2.0",
|