ddd-ts-kit 0.23.1 → 0.25.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 +64 -0
- package/README.fr.md +47 -9
- package/README.md +43 -8
- package/dist/check/canonical/open-directories.d.ts.map +1 -1
- package/dist/check/canonical/open-directories.js +7 -1
- package/dist/check/canonical/open-directories.js.map +1 -1
- package/dist/check/canonical/roles.d.ts.map +1 -1
- package/dist/check/canonical/roles.js +1 -0
- package/dist/check/canonical/roles.js.map +1 -1
- package/dist/check/canonical/stray-entry.d.ts +8 -0
- package/dist/check/canonical/stray-entry.d.ts.map +1 -0
- package/dist/check/canonical/stray-entry.js +75 -0
- package/dist/check/canonical/stray-entry.js.map +1 -0
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +4 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +2 -0
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/explain/persistence-docs.js +1 -1
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +11 -0
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/fixtures/test-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/test-fixtures.js +25 -0
- package/dist/check/fixtures/test-fixtures.js.map +1 -1
- package/dist/check/fixtures/tree-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tree-fixtures.js +24 -0
- package/dist/check/fixtures/tree-fixtures.js.map +1 -1
- package/dist/check/migrations/drizzle-history-findings.js +1 -1
- package/dist/check/migrations/drizzle-history-findings.js.map +1 -1
- package/dist/check/rules/test-helper-placed.d.ts +3 -0
- package/dist/check/rules/test-helper-placed.d.ts.map +1 -0
- package/dist/check/rules/test-helper-placed.js +41 -0
- package/dist/check/rules/test-helper-placed.js.map +1 -0
- package/dist/check/rules/tree-closed.d.ts.map +1 -1
- package/dist/check/rules/tree-closed.js +4 -68
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/check/rules/tree-documented-paths.d.ts +3 -0
- package/dist/check/rules/tree-documented-paths.d.ts.map +1 -0
- package/dist/check/rules/tree-documented-paths.js +54 -0
- package/dist/check/rules/tree-documented-paths.js.map +1 -0
- package/dist/commands/drizzle-generate.d.ts +6 -1
- package/dist/commands/drizzle-generate.d.ts.map +1 -1
- package/dist/commands/drizzle-generate.js +39 -6
- package/dist/commands/drizzle-generate.js.map +1 -1
- package/dist/commands/format-context.d.ts.map +1 -1
- package/dist/commands/format-context.js +5 -1
- package/dist/commands/format-context.js.map +1 -1
- package/dist/commands/generate.js +9 -2
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/plan-waves.d.ts +9 -0
- package/dist/commands/plan-waves.d.ts.map +1 -0
- package/dist/commands/plan-waves.js +36 -0
- package/dist/commands/plan-waves.js.map +1 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +4 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/depcruise/hygiene-rules.js +2 -1
- package/dist/depcruise/hygiene-rules.js.map +1 -1
- package/dist/docs/context-facts.d.ts +2 -0
- package/dist/docs/context-facts.d.ts.map +1 -1
- package/dist/docs/read-context.js +1 -0
- package/dist/docs/read-context.js.map +1 -1
- package/dist/generate/context-imports.d.ts +4 -0
- package/dist/generate/context-imports.d.ts.map +1 -0
- package/dist/generate/context-imports.js +15 -0
- package/dist/generate/context-imports.js.map +1 -0
- package/dist/generate/kind.d.ts +2 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/test-world-kind.d.ts +3 -0
- package/dist/generate/kinds/test-world-kind.d.ts.map +1 -0
- package/dist/generate/kinds/test-world-kind.js +33 -0
- package/dist/generate/kinds/test-world-kind.js.map +1 -0
- package/dist/generate/kinds/world/context-fakes.d.ts +27 -0
- package/dist/generate/kinds/world/context-fakes.d.ts.map +1 -0
- package/dist/generate/kinds/world/context-fakes.js +61 -0
- package/dist/generate/kinds/world/context-fakes.js.map +1 -0
- package/dist/generate/kinds/world/declared-ports.d.ts +12 -0
- package/dist/generate/kinds/world/declared-ports.d.ts.map +1 -0
- package/dist/generate/kinds/world/declared-ports.js +20 -0
- package/dist/generate/kinds/world/declared-ports.js.map +1 -0
- package/dist/generate/kinds/world/fake-class.d.ts +8 -0
- package/dist/generate/kinds/world/fake-class.d.ts.map +1 -0
- package/dist/generate/kinds/world/fake-class.js +30 -0
- package/dist/generate/kinds/world/fake-class.js.map +1 -0
- package/dist/generate/kinds/world/ports-in-use.d.ts +10 -0
- package/dist/generate/kinds/world/ports-in-use.d.ts.map +1 -0
- package/dist/generate/kinds/world/ports-in-use.js +18 -0
- package/dist/generate/kinds/world/ports-in-use.js.map +1 -0
- package/dist/generate/kinds/world/world-vars.d.ts +10 -0
- package/dist/generate/kinds/world/world-vars.d.ts.map +1 -0
- package/dist/generate/kinds/world/world-vars.js +55 -0
- package/dist/generate/kinds/world/world-vars.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +2 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/spec-vars.d.ts.map +1 -1
- package/dist/generate/spec-vars.js +1 -12
- package/dist/generate/spec-vars.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +19 -3
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +2 -0
- package/dist/help/usage.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +7 -1
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/migration/branch-migration.d.ts +9 -0
- package/dist/migration/branch-migration.d.ts.map +1 -0
- package/dist/migration/branch-migration.js +2 -0
- package/dist/migration/branch-migration.js.map +1 -0
- package/dist/migration/branch-migrations.d.ts +16 -0
- package/dist/migration/branch-migrations.d.ts.map +1 -0
- package/dist/migration/branch-migrations.js +48 -0
- package/dist/migration/branch-migrations.js.map +1 -0
- package/dist/migration/delete-branch-migrations.d.ts +9 -0
- package/dist/migration/delete-branch-migrations.d.ts.map +1 -0
- package/dist/migration/delete-branch-migrations.js +23 -0
- package/dist/migration/delete-branch-migrations.js.map +1 -0
- package/dist/migration/drizzle-run.d.ts +7 -0
- package/dist/migration/drizzle-run.d.ts.map +1 -0
- package/dist/migration/drizzle-run.js +2 -0
- package/dist/migration/drizzle-run.js.map +1 -0
- package/dist/migration/drizzle-silent-failures.js +1 -1
- package/dist/migration/drizzle-silent-failures.js.map +1 -1
- package/dist/migration/find-project-formatter.d.ts +8 -0
- package/dist/migration/find-project-formatter.d.ts.map +1 -0
- package/dist/migration/find-project-formatter.js +52 -0
- package/dist/migration/find-project-formatter.js.map +1 -0
- package/dist/migration/format-written-files.d.ts +9 -0
- package/dist/migration/format-written-files.d.ts.map +1 -0
- package/dist/migration/format-written-files.js +32 -0
- package/dist/migration/format-written-files.js.map +1 -0
- package/dist/migration/generate-and-read.d.ts +6 -0
- package/dist/migration/generate-and-read.d.ts.map +1 -0
- package/dist/migration/generate-and-read.js +14 -0
- package/dist/migration/generate-and-read.js.map +1 -0
- package/dist/migration/index.d.ts +4 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +4 -0
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/known-primary-keys.d.ts +3 -0
- package/dist/migration/known-primary-keys.d.ts.map +1 -0
- package/dist/migration/known-primary-keys.js +2 -0
- package/dist/migration/known-primary-keys.js.map +1 -0
- package/dist/migration/migration-files.d.ts +7 -0
- package/dist/migration/migration-files.d.ts.map +1 -0
- package/dist/migration/migration-files.js +29 -0
- package/dist/migration/migration-files.js.map +1 -0
- package/dist/migration/plan-replay.d.ts +9 -0
- package/dist/migration/plan-replay.d.ts.map +1 -0
- package/dist/migration/plan-replay.js +68 -0
- package/dist/migration/plan-replay.js.map +1 -0
- package/dist/migration/previous-primary-keys.d.ts +9 -0
- package/dist/migration/previous-primary-keys.d.ts.map +1 -0
- package/dist/migration/previous-primary-keys.js +55 -0
- package/dist/migration/previous-primary-keys.js.map +1 -0
- package/dist/migration/primary-key-order-finding.d.ts +12 -0
- package/dist/migration/primary-key-order-finding.d.ts.map +1 -0
- package/dist/migration/primary-key-order-finding.js +2 -0
- package/dist/migration/primary-key-order-finding.js.map +1 -0
- package/dist/migration/primary-key-order-findings.d.ts +12 -0
- package/dist/migration/primary-key-order-findings.d.ts.map +1 -0
- package/dist/migration/primary-key-order-findings.js +55 -0
- package/dist/migration/primary-key-order-findings.js.map +1 -0
- package/dist/migration/project-formatter.d.ts +9 -0
- package/dist/migration/project-formatter.d.ts.map +1 -0
- package/dist/migration/project-formatter.js +2 -0
- package/dist/migration/project-formatter.js.map +1 -0
- package/dist/migration/replay-drizzle-migrations.d.ts +15 -0
- package/dist/migration/replay-drizzle-migrations.d.ts.map +1 -0
- package/dist/migration/replay-drizzle-migrations.js +63 -0
- package/dist/migration/replay-drizzle-migrations.js.map +1 -0
- package/dist/migration/replay-plan.d.ts +11 -0
- package/dist/migration/replay-plan.d.ts.map +1 -0
- package/dist/migration/replay-plan.js +2 -0
- package/dist/migration/replay-plan.js.map +1 -0
- package/dist/migration/replayed-name.d.ts +7 -0
- package/dist/migration/replayed-name.d.ts.map +1 -0
- package/dist/migration/replayed-name.js +12 -0
- package/dist/migration/replayed-name.js.map +1 -0
- package/dist/migration/sql-statement.d.ts +6 -0
- package/dist/migration/sql-statement.d.ts.map +1 -0
- package/dist/migration/sql-statement.js +2 -0
- package/dist/migration/sql-statement.js.map +1 -0
- package/dist/migration/sql-statements.d.ts +4 -0
- package/dist/migration/sql-statements.d.ts.map +1 -0
- package/dist/migration/sql-statements.js +36 -0
- package/dist/migration/sql-statements.js.map +1 -0
- package/dist/migration/table-change.d.ts +12 -0
- package/dist/migration/table-change.d.ts.map +1 -0
- package/dist/migration/table-change.js +2 -0
- package/dist/migration/table-change.js.map +1 -0
- package/dist/migration/table-changes.d.ts +9 -0
- package/dist/migration/table-changes.d.ts.map +1 -0
- package/dist/migration/table-changes.js +55 -0
- package/dist/migration/table-changes.js.map +1 -0
- package/dist/migration/tidy-written-migration.d.ts +5 -0
- package/dist/migration/tidy-written-migration.d.ts.map +1 -0
- package/dist/migration/tidy-written-migration.js +8 -0
- package/dist/migration/tidy-written-migration.js.map +1 -0
- package/dist/migration/wait-for-next-second.d.ts +6 -0
- package/dist/migration/wait-for-next-second.d.ts.map +1 -0
- package/dist/migration/wait-for-next-second.js +11 -0
- package/dist/migration/wait-for-next-second.js.map +1 -0
- package/dist/migration/warn-primary-key-order.d.ts +5 -0
- package/dist/migration/warn-primary-key-order.d.ts.map +1 -0
- package/dist/migration/warn-primary-key-order.js +16 -0
- package/dist/migration/warn-primary-key-order.js.map +1 -0
- package/dist/migration/written-migration.d.ts +9 -0
- package/dist/migration/written-migration.d.ts.map +1 -0
- package/dist/migration/written-migration.js +2 -0
- package/dist/migration/written-migration.js.map +1 -0
- package/dist/migration/written-paths.d.ts +3 -0
- package/dist/migration/written-paths.d.ts.map +1 -0
- package/dist/migration/written-paths.js +5 -0
- package/dist/migration/written-paths.js.map +1 -0
- package/dist/plan/aggregates-of.d.ts +6 -0
- package/dist/plan/aggregates-of.d.ts.map +1 -0
- package/dist/plan/aggregates-of.js +13 -0
- package/dist/plan/aggregates-of.js.map +1 -0
- package/dist/plan/batched-waves.d.ts +18 -0
- package/dist/plan/batched-waves.d.ts.map +1 -0
- package/dist/plan/batched-waves.js +73 -0
- package/dist/plan/batched-waves.js.map +1 -0
- package/dist/plan/cycles-of.d.ts +8 -0
- package/dist/plan/cycles-of.d.ts.map +1 -0
- package/dist/plan/cycles-of.js +30 -0
- package/dist/plan/cycles-of.js.map +1 -0
- package/dist/plan/format-plan.d.ts +4 -0
- package/dist/plan/format-plan.d.ts.map +1 -0
- package/dist/plan/format-plan.js +53 -0
- package/dist/plan/format-plan.js.map +1 -0
- package/dist/plan/merge-order.d.ts +8 -0
- package/dist/plan/merge-order.d.ts.map +1 -0
- package/dist/plan/merge-order.js +32 -0
- package/dist/plan/merge-order.js.map +1 -0
- package/dist/plan/plan-problems.d.ts +8 -0
- package/dist/plan/plan-problems.d.ts.map +1 -0
- package/dist/plan/plan-problems.js +57 -0
- package/dist/plan/plan-problems.js.map +1 -0
- package/dist/plan/plan-waves.d.ts +16 -0
- package/dist/plan/plan-waves.d.ts.map +1 -0
- package/dist/plan/plan-waves.js +23 -0
- package/dist/plan/plan-waves.js.map +1 -0
- package/dist/plan/rows-to-plan.d.ts +7 -0
- package/dist/plan/rows-to-plan.d.ts.map +1 -0
- package/dist/plan/rows-to-plan.js +19 -0
- package/dist/plan/rows-to-plan.js.map +1 -0
- package/dist/plan/wave-numbers.d.ts +8 -0
- package/dist/plan/wave-numbers.d.ts.map +1 -0
- package/dist/plan/wave-numbers.js +27 -0
- package/dist/plan/wave-numbers.js.map +1 -0
- package/dist/plan/wave-plan.d.ts +48 -0
- package/dist/plan/wave-plan.d.ts.map +1 -0
- package/dist/plan/wave-plan.js +2 -0
- package/dist/plan/wave-plan.js.map +1 -0
- package/dist/progress/format-progress.d.ts.map +1 -1
- package/dist/progress/format-progress.js +16 -1
- package/dist/progress/format-progress.js.map +1 -1
- package/dist/progress/progress.d.ts +11 -1
- package/dist/progress/progress.d.ts.map +1 -1
- package/dist/progress/read-progress.d.ts +6 -2
- package/dist/progress/read-progress.d.ts.map +1 -1
- package/dist/progress/read-progress.js +10 -5
- package/dist/progress/read-progress.js.map +1 -1
- package/dist/progress/status-row-of.d.ts +16 -0
- package/dist/progress/status-row-of.d.ts.map +1 -0
- package/dist/progress/status-row-of.js +23 -0
- package/dist/progress/status-row-of.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -0
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/rows-on-branches.d.ts +8 -0
- package/dist/worker/rows-on-branches.d.ts.map +1 -0
- package/dist/worker/rows-on-branches.js +9 -0
- package/dist/worker/rows-on-branches.js.map +1 -0
- package/package.json +2 -2
- package/templates/e2e/e2e.spec.ts.tpl +2 -2
- package/templates/init/AGENTS.md.tpl +1 -1
- package/templates/init/e2e/start-application.database.ts.tpl +30 -1
- package/templates/init/e2e/start-application.memory.ts.tpl +30 -1
- package/templates/init/e2e/vitest.e2e.config.ts.tpl +4 -0
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +18 -1
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +18 -1
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +18 -1
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +18 -1
- package/templates/init/platform/database/test-database-template.ts.tpl +23 -0
- package/templates/init/rules/tests.md.tpl +3 -2
- package/templates/pipeline/knip.json.tpl +2 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/pipeline/vitest.config.ts.tpl +6 -0
- package/templates/presets/identity/context/test/unit/accept-invitation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/account-deactivated.integration-handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/change-member-role.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/deactivate-account.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/decline-invitation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/grant-delegation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/invite-member.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/member-joined.integration-handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/member-removed.integration-handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/open-organisation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/organisation-opened.integration-handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/provision-account.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/remove-member.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/revoke-delegation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/revoke-invitation.handler.spec.ts.tpl +1 -1
- package/templates/presets/identity/context/test/unit/search-members.handler.spec.ts.tpl +1 -1
- package/templates/test-world/world.buses.ts.tpl +33 -0
- package/templates/test-world/world.tsyringe.ts.tpl +53 -0
- /package/templates/presets/identity/context/test/{unit/identity-application.ts.tpl → worlds/__context__.world.ts.tpl} +0 -0
|
@@ -3,7 +3,7 @@ import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vo
|
|
|
3
3
|
import { OpenOrganisationCommand } from '{{alias.context}}/application/commands/open-organisation/open-organisation.command{{alias.ext}}';
|
|
4
4
|
import { anAccount } from '{{alias.context}}/test/builders/account.builder{{alias.ext}}';
|
|
5
5
|
import { anOrganisation } from '{{alias.context}}/test/builders/organisation.builder{{alias.ext}}';
|
|
6
|
-
import { arrangeIdentity, startedIdentity } from '{{alias.context}}/test/
|
|
6
|
+
import { arrangeIdentity, startedIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
7
7
|
|
|
8
8
|
const acme = { slug: 'acme', name: 'Acme' };
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { organisationOpenedV1 } from '{{alias.context}}/published-language/organisation-opened.v1.integration-event{{alias.ext}}';
|
|
3
|
-
import { startedIdentity } from '{{alias.context}}/test/
|
|
3
|
+
import { startedIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
const opening = organisationOpenedV1.create(
|
|
6
6
|
{ organisationId: 'acme', name: 'Acme', openedBy: 'subject-ada' },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { ProvisionAccountCommand } from '{{alias.context}}/application/commands/provision-account/provision-account.command{{alias.ext}}';
|
|
3
3
|
import { anAccount } from '{{alias.context}}/test/builders/account.builder{{alias.ext}}';
|
|
4
|
-
import { arrangeIdentity } from '{{alias.context}}/test/
|
|
4
|
+
import { arrangeIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
const profile = { email: 'Ada@Example.test', emailVerified: true, displayName: 'Ada Lovelace' };
|
|
7
7
|
|
|
@@ -5,7 +5,7 @@ import { RemoveMemberCommand } from '{{alias.context}}/application/commands/remo
|
|
|
5
5
|
import { aDelegation } from '{{alias.context}}/test/builders/delegation.builder{{alias.ext}}';
|
|
6
6
|
import { aMember } from '{{alias.context}}/test/builders/member.builder{{alias.ext}}';
|
|
7
7
|
import { anOrganisation } from '{{alias.context}}/test/builders/organisation.builder{{alias.ext}}';
|
|
8
|
-
import { arrangeIdentity } from '{{alias.context}}/test/
|
|
8
|
+
import { arrangeIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
9
9
|
|
|
10
10
|
const DAY = 86_400_000;
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vo
|
|
|
3
3
|
import { RevokeDelegationCommand } from '{{alias.context}}/application/commands/revoke-delegation/revoke-delegation.command{{alias.ext}}';
|
|
4
4
|
import { aDelegation } from '{{alias.context}}/test/builders/delegation.builder{{alias.ext}}';
|
|
5
5
|
import { aMember } from '{{alias.context}}/test/builders/member.builder{{alias.ext}}';
|
|
6
|
-
import { arrangeIdentity } from '{{alias.context}}/test/
|
|
6
|
+
import { arrangeIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
7
7
|
|
|
8
8
|
describe('Revoke delegation', () => {
|
|
9
9
|
it('ends a delegation of the organisation while it holds, and tells the other contexts', async () => {
|
|
@@ -4,7 +4,7 @@ import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vo
|
|
|
4
4
|
import { RevokeInvitationCommand } from '{{alias.context}}/application/commands/revoke-invitation/revoke-invitation.command{{alias.ext}}';
|
|
5
5
|
import { anInvitation } from '{{alias.context}}/test/builders/invitation.builder{{alias.ext}}';
|
|
6
6
|
import { aMember } from '{{alias.context}}/test/builders/member.builder{{alias.ext}}';
|
|
7
|
-
import { arrangeIdentity } from '{{alias.context}}/test/
|
|
7
|
+
import { arrangeIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
8
8
|
|
|
9
9
|
describe('Revoke invitation', () => {
|
|
10
10
|
it('takes back an invitation of the organisation', async () => {
|
|
@@ -3,7 +3,7 @@ import { offsetPage } from '@ddd-ts-kit/kernel';
|
|
|
3
3
|
import { MemberRole } from '{{alias.context}}/domain/vocabularies/member-role.vocabulary{{alias.ext}}';
|
|
4
4
|
import { SearchMembersQuery } from '{{alias.context}}/application/queries/search-members/search-members.query{{alias.ext}}';
|
|
5
5
|
import { aMember } from '{{alias.context}}/test/builders/member.builder{{alias.ext}}';
|
|
6
|
-
import { arrangeIdentity } from '{{alias.context}}/test/
|
|
6
|
+
import { arrangeIdentity } from '{{alias.context}}/test/worlds/{{context.kebab}}.world{{alias.ext}}';
|
|
7
7
|
|
|
8
8
|
const ada = {
|
|
9
9
|
memberId: 'member-1',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createTestBuses } from '@ddd-ts-kit/testing';
|
|
2
|
+
{{#if world.hasFakes}}
|
|
3
|
+
{{world.fakeImports}}
|
|
4
|
+
|
|
5
|
+
export interface {{world.pascal}}WorldFakes {
|
|
6
|
+
{{world.members}}
|
|
7
|
+
}
|
|
8
|
+
{{/if}}
|
|
9
|
+
|
|
10
|
+
export interface {{world.pascal}}WorldOptions {
|
|
11
|
+
readonly now?: Date;
|
|
12
|
+
readonly idPrefix?: string;
|
|
13
|
+
{{#if world.hasFakes}}
|
|
14
|
+
readonly given?: (fakes: {{world.pascal}}WorldFakes) => Promise<void>;
|
|
15
|
+
{{/if}}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
{{#if world.hasFakes}}
|
|
19
|
+
export async function {{world.article}}{{world.pascal}}World({ given, ...settings }: {{world.pascal}}WorldOptions = {}) {
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#unless world.hasFakes}}
|
|
22
|
+
export async function {{world.article}}{{world.pascal}}World(settings: {{world.pascal}}WorldOptions = {}) {
|
|
23
|
+
{{/unless}}
|
|
24
|
+
{{#if world.hasFakes}}
|
|
25
|
+
{{world.built}}
|
|
26
|
+
|
|
27
|
+
await given?.(fakes);
|
|
28
|
+
|
|
29
|
+
{{/if}}
|
|
30
|
+
const buses = createTestBuses(settings);
|
|
31
|
+
|
|
32
|
+
{{world.returnedBuses}}
|
|
33
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RoleBasedAuthorizer } from '@ddd-ts-kit/auth';
|
|
2
|
+
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
3
|
+
{{world.diImport}}
|
|
4
|
+
{{world.contextImport}}
|
|
5
|
+
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
6
|
+
{{#if world.hasFakes}}
|
|
7
|
+
{{world.portImports}}
|
|
8
|
+
{{world.fakeImports}}
|
|
9
|
+
{{/if}}
|
|
10
|
+
|
|
11
|
+
const nobody = authorizationModule({ authorizer: new RoleBasedAuthorizer({ roles: {} }) });
|
|
12
|
+
{{#if world.hasFakes}}
|
|
13
|
+
|
|
14
|
+
export interface {{world.pascal}}WorldFakes {
|
|
15
|
+
{{world.members}}
|
|
16
|
+
}
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
19
|
+
export interface {{world.pascal}}WorldOptions {
|
|
20
|
+
readonly now?: Date;
|
|
21
|
+
readonly idPrefix?: string;
|
|
22
|
+
readonly modules?: readonly ContextModule[];
|
|
23
|
+
{{#if world.hasFakes}}
|
|
24
|
+
readonly given?: (fakes: {{world.pascal}}WorldFakes) => Promise<void>;
|
|
25
|
+
{{/if}}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function {{world.article}}{{world.pascal}}World({ modules = [nobody], {{world.given}}...settings }: {{world.pascal}}WorldOptions = {}) {
|
|
29
|
+
{{#if world.assembles}}
|
|
30
|
+
const context = {{world.context}};
|
|
31
|
+
|
|
32
|
+
{{/if}}
|
|
33
|
+
{{#if world.hasFakes}}
|
|
34
|
+
{{world.built}}
|
|
35
|
+
|
|
36
|
+
await given?.(fakes);
|
|
37
|
+
|
|
38
|
+
{{/if}}
|
|
39
|
+
const application = createTestApplication({
|
|
40
|
+
...settings,
|
|
41
|
+
modules: [platformTestModule, {{world.contextModule}}, ...modules],
|
|
42
|
+
{{#if world.hasFakes}}
|
|
43
|
+
{{world.overrides}}
|
|
44
|
+
{{/if}}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
{{#if world.hasFakes}}
|
|
48
|
+
return { application, ...fakes };
|
|
49
|
+
{{/if}}
|
|
50
|
+
{{#unless world.hasFakes}}
|
|
51
|
+
return { application };
|
|
52
|
+
{{/unless}}
|
|
53
|
+
}
|