ddd-ts-kit 0.89.0 → 0.91.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 +318 -0
- package/README.fr.md +58 -12
- package/README.md +54 -11
- package/dist/alias/index.d.ts +2 -1
- package/dist/alias/index.d.ts.map +1 -1
- package/dist/alias/index.js +1 -0
- package/dist/alias/index.js.map +1 -1
- package/dist/alias/mapper-target-text.d.ts +4 -0
- package/dist/alias/mapper-target-text.d.ts.map +1 -0
- package/dist/alias/mapper-target-text.js +5 -0
- package/dist/alias/mapper-target-text.js.map +1 -0
- package/dist/alias/module-name-mapper.d.ts +5 -2
- package/dist/alias/module-name-mapper.d.ts.map +1 -1
- package/dist/alias/module-name-mapper.js +5 -2
- package/dist/alias/module-name-mapper.js.map +1 -1
- package/dist/check/alias/test-runners.js +8 -3
- package/dist/check/alias/test-runners.js.map +1 -1
- package/dist/check/baseline/apply-baseline.d.ts +14 -0
- package/dist/check/baseline/apply-baseline.d.ts.map +1 -0
- package/dist/check/baseline/apply-baseline.js +30 -0
- package/dist/check/baseline/apply-baseline.js.map +1 -0
- package/dist/check/baseline/baseline-following-moves.d.ts +9 -0
- package/dist/check/baseline/baseline-following-moves.d.ts.map +1 -0
- package/dist/check/baseline/baseline-following-moves.js +10 -0
- package/dist/check/baseline/baseline-following-moves.js.map +1 -0
- package/dist/check/baseline/baseline-move.d.ts +6 -0
- package/dist/check/baseline/baseline-move.d.ts.map +1 -0
- package/dist/check/baseline/baseline-move.js +2 -0
- package/dist/check/baseline/baseline-move.js.map +1 -0
- package/dist/check/baseline/baseline-text.d.ts +4 -0
- package/dist/check/baseline/baseline-text.d.ts.map +1 -0
- package/dist/check/baseline/baseline-text.js +12 -0
- package/dist/check/baseline/baseline-text.js.map +1 -0
- package/dist/check/baseline/baseline.d.ts +6 -0
- package/dist/check/baseline/baseline.d.ts.map +1 -0
- package/dist/check/baseline/baseline.js +2 -0
- package/dist/check/baseline/baseline.js.map +1 -0
- package/dist/check/baseline/moved-baseline-text.d.ts +4 -0
- package/dist/check/baseline/moved-baseline-text.d.ts.map +1 -0
- package/dist/check/baseline/moved-baseline-text.js +13 -0
- package/dist/check/baseline/moved-baseline-text.js.map +1 -0
- package/dist/check/baseline/parse-baseline.d.ts +4 -0
- package/dist/check/baseline/parse-baseline.d.ts.map +1 -0
- package/dist/check/baseline/parse-baseline.js +19 -0
- package/dist/check/baseline/parse-baseline.js.map +1 -0
- package/dist/check/baseline/pruned-baseline.d.ts +5 -0
- package/dist/check/baseline/pruned-baseline.d.ts.map +1 -0
- package/dist/check/baseline/pruned-baseline.js +14 -0
- package/dist/check/baseline/pruned-baseline.js.map +1 -0
- package/dist/check/baseline/read-baseline.d.ts +6 -0
- package/dist/check/baseline/read-baseline.d.ts.map +1 -0
- package/dist/check/baseline/read-baseline.js +11 -0
- package/dist/check/baseline/read-baseline.js.map +1 -0
- package/dist/check/baseline/recorded-baseline.d.ts +5 -0
- package/dist/check/baseline/recorded-baseline.d.ts.map +1 -0
- package/dist/check/baseline/recorded-baseline.js +11 -0
- package/dist/check/baseline/recorded-baseline.js.map +1 -0
- package/dist/check/baseline/renamed-files.d.ts +8 -0
- package/dist/check/baseline/renamed-files.d.ts.map +1 -0
- package/dist/check/baseline/renamed-files.js +23 -0
- package/dist/check/baseline/renamed-files.js.map +1 -0
- package/dist/check/baseline/write-baseline.d.ts +4 -0
- package/dist/check/baseline/write-baseline.d.ts.map +1 -0
- package/dist/check/baseline/write-baseline.js +9 -0
- package/dist/check/baseline/write-baseline.js.map +1 -0
- package/dist/check/canonical/stray-entry.d.ts.map +1 -1
- package/dist/check/canonical/stray-entry.js +5 -1
- package/dist/check/canonical/stray-entry.js.map +1 -1
- 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 +0 -4
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/commands/check-command.d.ts.map +1 -1
- package/dist/check/commands/check-command.js +46 -1
- package/dist/check/commands/check-command.js.map +1 -1
- package/dist/check/commands/check-file-command.d.ts +5 -0
- package/dist/check/commands/check-file-command.d.ts.map +1 -1
- package/dist/check/commands/check-file-command.js +27 -6
- package/dist/check/commands/check-file-command.js.map +1 -1
- package/dist/check/explain/nest-docs.d.ts +3 -0
- package/dist/check/explain/nest-docs.d.ts.map +1 -0
- package/dist/check/explain/nest-docs.js +31 -0
- package/dist/check/explain/nest-docs.js.map +1 -0
- package/dist/check/explain/rule-docs.d.ts.map +1 -1
- package/dist/check/explain/rule-docs.js +2 -0
- package/dist/check/explain/rule-docs.js.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.js +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-declared-fixtures.js +1 -1
- package/dist/check/fixtures/authz-declared-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +4 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/nest-controllers-fixtures.d.ts +3 -0
- package/dist/check/fixtures/nest-controllers-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/nest-controllers-fixtures.js +86 -0
- package/dist/check/fixtures/nest-controllers-fixtures.js.map +1 -0
- package/dist/check/fixtures/nest-fixtures.d.ts +3 -0
- package/dist/check/fixtures/nest-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/nest-fixtures.js +59 -0
- package/dist/check/fixtures/nest-fixtures.js.map +1 -0
- package/dist/check/nest/nest-equivalents-of.d.ts +14 -0
- package/dist/check/nest/nest-equivalents-of.d.ts.map +1 -0
- package/dist/check/nest/nest-equivalents-of.js +119 -0
- package/dist/check/nest/nest-equivalents-of.js.map +1 -0
- package/dist/check/project/load-project.d.ts +2 -0
- package/dist/check/project/load-project.d.ts.map +1 -1
- package/dist/check/project/load-project.js +7 -3
- package/dist/check/project/load-project.js.map +1 -1
- package/dist/check/rules/nest-controllers-current.d.ts +3 -0
- package/dist/check/rules/nest-controllers-current.d.ts.map +1 -0
- package/dist/check/rules/nest-controllers-current.js +43 -0
- package/dist/check/rules/nest-controllers-current.js.map +1 -0
- package/dist/check/rules/nest-no-parallel-pipeline.d.ts +3 -0
- package/dist/check/rules/nest-no-parallel-pipeline.d.ts.map +1 -0
- package/dist/check/rules/nest-no-parallel-pipeline.js +70 -0
- package/dist/check/rules/nest-no-parallel-pipeline.js.map +1 -0
- package/dist/check/support/is-generated-context-file.d.ts.map +1 -1
- package/dist/check/support/is-generated-context-file.js +4 -1
- package/dist/check/support/is-generated-context-file.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +4 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/config/config.d.ts +6 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/parse-config.js +1 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/parse-stack.d.ts.map +1 -1
- package/dist/config/parse-stack.js +2 -1
- package/dist/config/parse-stack.js.map +1 -1
- package/dist/config/serialize-config.js +9 -2
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/stack.d.ts +17 -4
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +4 -1
- package/dist/config/stack.js.map +1 -1
- package/dist/dev/refresh-declarations.d.ts.map +1 -1
- package/dist/dev/refresh-declarations.js +4 -1
- package/dist/dev/refresh-declarations.js.map +1 -1
- 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/doctor/diagnose.d.ts +2 -1
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +4 -1
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +3 -2
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +4 -1
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/override-findings.d.ts +10 -0
- package/dist/doctor/override-findings.d.ts.map +1 -0
- package/dist/doctor/override-findings.js +87 -0
- package/dist/doctor/override-findings.js.map +1 -0
- package/dist/file-moves/move-files.d.ts.map +1 -1
- package/dist/file-moves/move-files.js +10 -0
- package/dist/file-moves/move-files.js.map +1 -1
- package/dist/generate/kinds/property-kind.d.ts +3 -0
- package/dist/generate/kinds/property-kind.d.ts.map +1 -0
- package/dist/generate/kinds/property-kind.js +51 -0
- package/dist/generate/kinds/property-kind.js.map +1 -0
- package/dist/generate/kinds/route/nest-controller-vars.d.ts +11 -0
- package/dist/generate/kinds/route/nest-controller-vars.d.ts.map +1 -0
- package/dist/generate/kinds/route/nest-controller-vars.js +97 -0
- package/dist/generate/kinds/route/nest-controller-vars.js.map +1 -0
- package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +1 -9
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/route/success-status.d.ts +5 -0
- package/dist/generate/kinds/route/success-status.d.ts.map +1 -0
- package/dist/generate/kinds/route/success-status.js +11 -0
- package/dist/generate/kinds/route/success-status.js.map +1 -0
- package/dist/generate/kinds/route/write-nest-controller.d.ts +8 -0
- package/dist/generate/kinds/route/write-nest-controller.d.ts.map +1 -0
- package/dist/generate/kinds/route/write-nest-controller.js +52 -0
- package/dist/generate/kinds/route/write-nest-controller.js.map +1 -0
- package/dist/generate/kinds/route-kind.d.ts.map +1 -1
- package/dist/generate/kinds/route-kind.js +6 -1
- package/dist/generate/kinds/route-kind.js.map +1 -1
- 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/refresh-docs.d.ts.map +1 -1
- package/dist/generate/refresh-docs.js +2 -0
- package/dist/generate/refresh-docs.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +5 -0
- package/dist/generate/shared-writes.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 +3 -1
- 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 +4 -2
- package/dist/help/usage.js.map +1 -1
- package/dist/init/agent-permissions.js +2 -0
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/files/audit-files.js +1 -1
- 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 -0
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/knip-vars.d.ts.map +1 -1
- package/dist/init/knip-vars.js +10 -2
- package/dist/init/knip-vars.js.map +1 -1
- package/dist/init/manifest/dependencies-against-stack.d.ts +18 -0
- package/dist/init/manifest/dependencies-against-stack.d.ts.map +1 -0
- package/dist/init/manifest/dependencies-against-stack.js +95 -0
- package/dist/init/manifest/dependencies-against-stack.js.map +1 -0
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +12 -2
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/overrides-for.d.ts +7 -0
- package/dist/init/manifest/overrides-for.d.ts.map +1 -0
- package/dist/init/manifest/overrides-for.js +9 -0
- package/dist/init/manifest/overrides-for.js.map +1 -0
- package/dist/init/manifest/pinned-below-a-fix.d.ts +14 -0
- package/dist/init/manifest/pinned-below-a-fix.d.ts.map +1 -0
- package/dist/init/manifest/pinned-below-a-fix.js +20 -0
- package/dist/init/manifest/pinned-below-a-fix.js.map +1 -0
- package/dist/init/manifest/scripts-for.js +5 -2
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.d.ts.map +1 -1
- package/dist/init/manifest/versions.js +31 -25
- package/dist/init/manifest/versions.js.map +1 -1
- package/dist/init/manifest/write-overrides.d.ts +9 -0
- package/dist/init/manifest/write-overrides.d.ts.map +1 -0
- package/dist/init/manifest/write-overrides.js +56 -0
- package/dist/init/manifest/write-overrides.js.map +1 -0
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +19 -3
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/resolve-queue.d.ts +4 -10
- package/dist/init/stack/resolve-queue.d.ts.map +1 -1
- package/dist/init/stack/resolve-queue.js +7 -11
- package/dist/init/stack/resolve-queue.js.map +1 -1
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +23 -4
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +2 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/nest-controllers/controllers-file.d.ts +3 -0
- package/dist/nest-controllers/controllers-file.d.ts.map +1 -0
- package/dist/nest-controllers/controllers-file.js +5 -0
- package/dist/nest-controllers/controllers-file.js.map +1 -0
- package/dist/nest-controllers/nest-answer.d.ts +16 -0
- package/dist/nest-controllers/nest-answer.d.ts.map +1 -0
- package/dist/nest-controllers/nest-answer.js +2 -0
- package/dist/nest-controllers/nest-answer.js.map +1 -0
- package/dist/nest-controllers/nest-controller-entry.d.ts +16 -0
- package/dist/nest-controllers/nest-controller-entry.d.ts.map +1 -0
- package/dist/nest-controllers/nest-controller-entry.js +2 -0
- package/dist/nest-controllers/nest-controller-entry.js.map +1 -0
- package/dist/nest-controllers/read-nest-controllers.d.ts +15 -0
- package/dist/nest-controllers/read-nest-controllers.d.ts.map +1 -0
- package/dist/nest-controllers/read-nest-controllers.js +89 -0
- package/dist/nest-controllers/read-nest-controllers.js.map +1 -0
- package/dist/nest-controllers/refresh-nest-controllers.d.ts +9 -0
- package/dist/nest-controllers/refresh-nest-controllers.d.ts.map +1 -0
- package/dist/nest-controllers/refresh-nest-controllers.js +32 -0
- package/dist/nest-controllers/refresh-nest-controllers.js.map +1 -0
- package/dist/nest-controllers/render-controllers-file.d.ts +8 -0
- package/dist/nest-controllers/render-controllers-file.d.ts.map +1 -0
- package/dist/nest-controllers/render-controllers-file.js +56 -0
- package/dist/nest-controllers/render-controllers-file.js.map +1 -0
- package/dist/platform-folders/platform-folders.d.ts.map +1 -1
- package/dist/platform-folders/platform-folders.js +10 -0
- package/dist/platform-folders/platform-folders.js.map +1 -1
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +22 -2
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-preset.d.ts.map +1 -1
- package/dist/presets/identity-preset.js +4 -1
- package/dist/presets/identity-preset.js.map +1 -1
- package/dist/presets/identity-refusal.d.ts.map +1 -1
- package/dist/presets/identity-refusal.js +11 -5
- package/dist/presets/identity-refusal.js.map +1 -1
- package/dist/presets/lay-out-prisma-models.d.ts +8 -0
- package/dist/presets/lay-out-prisma-models.d.ts.map +1 -0
- package/dist/presets/lay-out-prisma-models.js +51 -0
- package/dist/presets/lay-out-prisma-models.js.map +1 -0
- package/dist/presets/preset-files.d.ts.map +1 -1
- package/dist/presets/preset-files.js +3 -0
- package/dist/presets/preset-files.js.map +1 -1
- package/dist/presets/preset.d.ts +11 -0
- package/dist/presets/preset.d.ts.map +1 -1
- package/dist/sdk/client-files.d.ts +5 -3
- package/dist/sdk/client-files.d.ts.map +1 -1
- package/dist/sdk/client-files.js +8 -3
- package/dist/sdk/client-files.js.map +1 -1
- package/dist/sdk/client-manifest.d.ts +3 -0
- package/dist/sdk/client-manifest.d.ts.map +1 -1
- package/dist/sdk/client-manifest.js +15 -2
- package/dist/sdk/client-manifest.js.map +1 -1
- package/dist/sdk/client-operation.d.ts +6 -0
- package/dist/sdk/client-operation.d.ts.map +1 -1
- package/dist/sdk/read-operation.d.ts.map +1 -1
- package/dist/sdk/read-operation.js +6 -0
- package/dist/sdk/read-operation.js.map +1 -1
- package/dist/sdk/render-orpc.d.ts +8 -0
- package/dist/sdk/render-orpc.d.ts.map +1 -0
- package/dist/sdk/render-orpc.js +42 -0
- package/dist/sdk/render-orpc.js.map +1 -0
- package/dist/sdk/render-readme.d.ts +3 -0
- package/dist/sdk/render-readme.d.ts.map +1 -1
- package/dist/sdk/render-readme.js +46 -0
- package/dist/sdk/render-readme.js.map +1 -1
- package/dist/sdk/render-trpc.d.ts +9 -0
- package/dist/sdk/render-trpc.d.ts.map +1 -0
- package/dist/sdk/render-trpc.js +36 -0
- package/dist/sdk/render-trpc.js.map +1 -0
- package/dist/sdk/rpc-packages.d.ts +7 -0
- package/dist/sdk/rpc-packages.d.ts.map +1 -0
- package/dist/sdk/rpc-packages.js +9 -0
- package/dist/sdk/rpc-packages.js.map +1 -0
- package/dist/sdk/rpc.d.ts +4 -0
- package/dist/sdk/rpc.d.ts.map +1 -0
- package/dist/sdk/rpc.js +2 -0
- package/dist/sdk/rpc.js.map +1 -0
- package/dist/sdk/write-clients.d.ts.map +1 -1
- package/dist/sdk/write-clients.js +18 -3
- package/dist/sdk/write-clients.js.map +1 -1
- package/dist/stack/alias-vars.d.ts.map +1 -1
- package/dist/stack/alias-vars.js +2 -2
- package/dist/stack/alias-vars.js.map +1 -1
- package/dist/stack/audit-vars.js +1 -1
- package/dist/stack/audit-vars.js.map +1 -1
- package/dist/stack/cache-vars.d.ts +5 -1
- package/dist/stack/cache-vars.d.ts.map +1 -1
- package/dist/stack/cache-vars.js +9 -3
- package/dist/stack/cache-vars.js.map +1 -1
- package/dist/stack/stack-vars.d.ts +1 -1
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +11 -6
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/templates/architecture/extractable.declared.spec.ts.tpl +22 -17
- package/templates/architecture/extractable.manual.spec.ts.tpl +14 -9
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +19 -14
- package/templates/context/module.manual.ts.tpl +11 -0
- package/templates/init/jest.config.js.tpl +6 -0
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +50 -0
- package/templates/init/platform/composition/platform.module.tsyringe.ts.tpl +9 -3
- package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +1 -1
- package/templates/init/platform/database/persistence-over.knex.ts.tpl +1 -1
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +30 -1
- package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +23 -1
- package/templates/init/platform/database/persistence.contract.spec.ts.tpl +113 -0
- package/templates/init/platform/database/persistence.orm.ts.tpl +8 -3
- package/templates/init/platform/database/schema.prisma.tpl +53 -0
- package/templates/init/platform/database/schema.typeorm.ts.tpl +17 -3
- package/templates/init/platform/database/table-statements.drizzle.ts.tpl +36 -0
- package/templates/init/platform/files/bind-files.tsyringe.ts.tpl +1 -1
- package/templates/init/platform/files/create-files.ts.tpl +1 -1
- package/templates/init/platform/http/create-app-module.ts.tpl +20 -0
- package/templates/init/platform/http/start-http-server.express.ts.tpl +48 -1
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +50 -2
- package/templates/init/platform/http/start-http-server.hono.ts.tpl +60 -1
- package/templates/init/platform/http/start-http-server.nest.ts.tpl +61 -3
- package/templates/init/platform/jobs/create-background-work.ts.tpl +2 -2
- package/templates/init/rules/infrastructure.md.tpl +3 -0
- package/templates/init/rules/presentation.md.tpl +7 -0
- package/templates/nest-controller/controller.spec.ts.tpl +57 -0
- package/templates/nest-controller/controller.ts.tpl +65 -0
- package/templates/pipeline/knip.json.tpl +4 -8
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +254 -0
- package/templates/presets/identity/context/application/authorization/change-member-roles.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/grant-delegations.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/invite-members.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/read-members.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/remove-members.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/revoke-delegations.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/authorization/revoke-invitations.policy.ts.tpl +10 -0
- package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/invite-member/invite-member.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/invite-member/invite-member.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/provision-account/provision-account.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/provision-account/provision-account.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/remove-member/remove-member.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/remove-member/remove-member.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.command.ts.tpl +6 -0
- package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/integration/handlers/account-deactivated.integration-handler.ts.tpl +4 -0
- package/templates/presets/identity/context/application/integration/handlers/member-joined.integration-handler.ts.tpl +4 -0
- package/templates/presets/identity/context/application/integration/handlers/member-removed.integration-handler.ts.tpl +4 -0
- package/templates/presets/identity/context/application/integration/handlers/organisation-opened.integration-handler.ts.tpl +4 -0
- package/templates/presets/identity/context/application/integration/publishers/account-deactivated.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/delegation-granted.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/delegation-revoked.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/member-joined.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/member-removed.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/member-role-changed.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/integration/publishers/organisation-opened.publisher.ts.tpl +10 -1
- package/templates/presets/identity/context/application/queries/search-members/search-members.handler.ts.tpl +12 -0
- package/templates/presets/identity/context/application/queries/search-members/search-members.query.ts.tpl +6 -0
- package/templates/presets/identity/context/infrastructure/external/crypto-invitation-tokens.adapter.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/external/environment-identity-provider-connection.adapter.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/external/keycloak-identity-provider-admin.adapter.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/account.mapper.prisma.ts.tpl +36 -0
- package/templates/presets/identity/context/infrastructure/persistence/account.personal-fields.privacy.prisma.ts.tpl +19 -0
- package/templates/presets/identity/context/infrastructure/persistence/delegation.mapper.prisma.ts.tpl +48 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/drizzle-search-members-reader.repository.drizzle.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/invitation.mapper.prisma.ts.tpl +43 -0
- package/templates/presets/identity/context/infrastructure/persistence/invitation.personal-fields.privacy.prisma.ts.tpl +20 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-account.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-delegation.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-invitation.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-member.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-organisation.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/knex-search-members-reader.repository.knex.ts.tpl +9 -0
- package/templates/presets/identity/context/infrastructure/persistence/member.mapper.prisma.ts.tpl +34 -0
- package/templates/presets/identity/context/infrastructure/persistence/organisation.mapper.prisma.ts.tpl +26 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +63 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +81 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +69 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +80 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +63 -0
- package/templates/presets/identity/context/infrastructure/persistence/prisma-search-members-reader.repository.prisma.ts.tpl +82 -0
- package/templates/presets/identity/context/test/integration/account.repository.contract.spec.ts.tpl +3 -3
- package/templates/presets/identity/context/test/integration/delegation.repository.contract.spec.ts.tpl +5 -5
- package/templates/presets/identity/context/test/integration/invitation.repository.contract.spec.ts.tpl +5 -5
- package/templates/presets/identity/context/test/integration/member.repository.contract.spec.ts.tpl +5 -5
- package/templates/presets/identity/context/test/integration/organisation.repository.contract.spec.ts.tpl +3 -3
- package/templates/presets/identity/context/test/integration/search-members-reader.spec.ts.tpl +8 -8
- package/templates/presets/identity/context/test/unit/__context__.module.spec.explicit.ts.tpl +95 -0
- package/templates/presets/identity/context/test/worlds/__context__.world.explicit.ts.tpl +332 -0
- package/templates/presets/identity/explicit/access-policies.wiring.tpl +16 -0
- package/templates/presets/identity/prisma/models.prisma.tpl +128 -0
- package/templates/property/value-object.properties.spec.ts.tpl +38 -0
- package/templates/sdk/orpc.ts.tpl +46 -0
- package/templates/sdk/trpc.ts.tpl +86 -0
- /package/templates/presets/identity/context/test/worlds/{__context__.world.ts.tpl → __context__.world.declared.ts.tpl} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { renderTemplate } from '../templating/index.js';
|
|
2
|
+
import { docComment } from './doc-comment.js';
|
|
3
|
+
import { generatedHeader } from './generated-header.js';
|
|
4
|
+
import { isInputOptional } from './is-input-optional.js';
|
|
5
|
+
import { operationDescription } from './operation-description.js';
|
|
6
|
+
import { propertyKey } from './property-key.js';
|
|
7
|
+
import { schemaTypeName } from './schema-type-name.js';
|
|
8
|
+
import { typeName } from './type-name.js';
|
|
9
|
+
const PROBLEM = 'Problem';
|
|
10
|
+
/**
|
|
11
|
+
* `trpc.ts`: the type of the router the API serves under /trpc, one procedure per operation that
|
|
12
|
+
* receives JSON, named by its `operationId`, a query for a `GET` and a mutation for the others;
|
|
13
|
+
* its input and its body are the types of the HTTP client. tRPC types no refusal per procedure:
|
|
14
|
+
* the problem document of each is in `data.problem`.
|
|
15
|
+
*/
|
|
16
|
+
export function renderTrpc(document) {
|
|
17
|
+
const procedures = document.operations.filter((operation) => operation.procedure !== undefined);
|
|
18
|
+
const schemas = document.schemas.some(([name]) => name === PROBLEM);
|
|
19
|
+
return renderTemplate('sdk/trpc.ts.tpl', {
|
|
20
|
+
header: generatedHeader(document),
|
|
21
|
+
schemas,
|
|
22
|
+
problem: schemas ? `Schemas.${schemaTypeName(PROBLEM)}` : 'unknown',
|
|
23
|
+
api: `${document.title} ${document.version}`,
|
|
24
|
+
procedures: procedures.map(procedure).join('\n'),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function procedure(operation) {
|
|
28
|
+
const prefix = `Operations.${typeName(operation.name)}`;
|
|
29
|
+
const input = isInputOptional(operation) ? `${prefix}Input | undefined` : `${prefix}Input`;
|
|
30
|
+
const kind = operation.method === 'GET' ? 'TRPCQueryProcedure' : 'TRPCMutationProcedure';
|
|
31
|
+
return [
|
|
32
|
+
...docComment(operationDescription(operation), ' '),
|
|
33
|
+
` ${propertyKey(operation.procedure ?? operation.name)}: ${kind}<Procedure<${input}, DataOf<${prefix}Result>>>;`,
|
|
34
|
+
].join('\n');
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=render-trpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-trpc.js","sourceRoot":"","sources":["../../src/sdk/render-trpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC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AAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,OAAO,CAAC;IAC3F,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAEzF,OAAO;QACL,GAAG,UAAU,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QACtD,OAAO,WAAW,CAAC,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,cAAc,KAAK,YAAY,MAAM,YAAY;KACpH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Rpc } from './rpc.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the entry of the procedures imports, by `stack.rpc`: the entry is named after it, `./orpc`
|
|
4
|
+
* or `./trpc`, and these are the only dependencies of a client.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RPC_PACKAGES: Readonly<Record<Exclude<Rpc, 'none'>, readonly string[]>>;
|
|
7
|
+
//# sourceMappingURL=rpc-packages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-packages.d.ts","sourceRoot":"","sources":["../../src/sdk/rpc-packages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,CAGlF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the entry of the procedures imports, by `stack.rpc`: the entry is named after it, `./orpc`
|
|
3
|
+
* or `./trpc`, and these are the only dependencies of a client.
|
|
4
|
+
*/
|
|
5
|
+
export const RPC_PACKAGES = {
|
|
6
|
+
orpc: ['@orpc/client', '@orpc/contract'],
|
|
7
|
+
trpc: ['@trpc/client', '@trpc/server'],
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=rpc-packages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-packages.js","sourceRoot":"","sources":["../../src/sdk/rpc-packages.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAA8D;IACrF,IAAI,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;IACxC,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/sdk/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,+DAA+D;AAC/D,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/sdk/rpc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../src/sdk/rpc.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-clients.d.ts","sourceRoot":"","sources":["../../src/sdk/write-clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"write-clients.d.ts","sourceRoot":"","sources":["../../src/sdk/write-clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,EAAE,CAmBvG"}
|
|
@@ -3,6 +3,7 @@ import { clientFiles } from './client-files.js';
|
|
|
3
3
|
import { clientManifest } from './client-manifest.js';
|
|
4
4
|
import { CLIENTS_DIRECTORY } from './clients-directory.js';
|
|
5
5
|
import { putFile } from './put-file.js';
|
|
6
|
+
import { RPC_PACKAGES } from './rpc-packages.js';
|
|
6
7
|
/**
|
|
7
8
|
* Writes the client of every document of the contract, and the build config that compiles them
|
|
8
9
|
* all (`tsc -b clients`). A client whose document is gone is not deleted: it is answered, with
|
|
@@ -21,12 +22,26 @@ export function writeClients(ws, config, clients) {
|
|
|
21
22
|
.filter((name) => !names.has(name) && ws.exists(`${CLIENTS_DIRECTORY}/${name}/src/runtime.ts`))
|
|
22
23
|
.map((name) => `${CLIENTS_DIRECTORY}/${name}`);
|
|
23
24
|
}
|
|
24
|
-
function writeClient(ws, config,
|
|
25
|
-
|
|
25
|
+
function writeClient(ws, config, client) {
|
|
26
|
+
const { document, packageName, directory } = client;
|
|
27
|
+
const { rpc } = config.stack;
|
|
28
|
+
for (const [file, content] of clientFiles(client, rpc)) {
|
|
26
29
|
putFile(ws, `${directory}/${file}`, content);
|
|
27
30
|
}
|
|
31
|
+
// The procedures the API no longer serves would compile against packages the manifest no longer lists.
|
|
32
|
+
for (const stale of Object.keys(RPC_PACKAGES).filter((kind) => kind !== rpc)) {
|
|
33
|
+
if (ws.exists(`${directory}/src/${stale}.ts`)) {
|
|
34
|
+
ws.delete(`${directory}/src/${stale}.ts`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
28
37
|
const manifest = `${directory}/package.json`;
|
|
29
|
-
const facts = {
|
|
38
|
+
const facts = {
|
|
39
|
+
name: packageName,
|
|
40
|
+
version: document.version,
|
|
41
|
+
title: document.title,
|
|
42
|
+
access: config.sdk?.access,
|
|
43
|
+
rpc,
|
|
44
|
+
};
|
|
30
45
|
putFile(ws, manifest, clientManifest(facts, ws.read(manifest)));
|
|
31
46
|
}
|
|
32
47
|
//# sourceMappingURL=write-clients.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-clients.js","sourceRoot":"","sources":["../../src/sdk/write-clients.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"write-clients.js","sourceRoot":"","sources":["../../src/sdk/write-clients.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,EAAa,EAAE,MAAc,EAAE,OAAiC;IAC3F,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,OAAO,CAAC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AI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC7E,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,SAAS,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC;YAC9C,EAAE,CAAC,MAAM,CAAC,GAAG,SAAS,QAAQ,KAAK,KAAK,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,GAAG,SAAS,eAAe,CAAC;IAE7C,MAAM,KAAK,GAAG;QACZ,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM;QAC1B,GAAG;KACJ,CAAC;IAEF,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-vars.d.ts","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alias-vars.d.ts","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAiBvD"}
|
package/dist/stack/alias-vars.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aliasRoots, directoryAlias, FIXED_ALIAS_ROOTS, moduleNameMapper, specifierSuffix } from '../alias/index.js';
|
|
1
|
+
import { aliasRoots, directoryAlias, FIXED_ALIAS_ROOTS, mapperTargetText, moduleNameMapper, specifierSuffix, } from '../alias/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* The alias of each tree and of each directory of the config, without a final slash: a template
|
|
4
4
|
* writes the rest of the path after it, then `ext`: what a specifier ends with under
|
|
@@ -24,7 +24,7 @@ export function aliasVars(config) {
|
|
|
24
24
|
}
|
|
25
25
|
function jestMapperLines(config) {
|
|
26
26
|
return Object.entries(moduleNameMapper(aliasRoots(config), specifierSuffix(config.importExtension)))
|
|
27
|
-
.map(([pattern, target]) => `'${pattern.replaceAll('\\', '\\\\')}':
|
|
27
|
+
.map(([pattern, target]) => `'${pattern.replaceAll('\\', '\\\\')}': ${mapperTargetText(target)},`)
|
|
28
28
|
.join('\n ');
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=alias-vars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-vars.js","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"alias-vars.js","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,UAAU,CAAC;AAIlB;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,iBAAiB,CAAC;IAEvD,OAAO;QACL,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAChD,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC;QACnD,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC;QACnD,YAAY,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;QAC3D,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9B,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACxC,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC;QAC5C,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;QACxE,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE;QAC7D,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;SACjG,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC;SACjG,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC"}
|
package/dist/stack/audit-vars.js
CHANGED
|
@@ -28,7 +28,7 @@ function archiveOf(sql, storage) {
|
|
|
28
28
|
}
|
|
29
29
|
/** The route that searches the trail, written as a function or a controller; none without HTTP. */
|
|
30
30
|
function readSideOf(route, routes) {
|
|
31
|
-
return { route, functionRoute: route && routes === 'functions', controller: route && routes
|
|
31
|
+
return { route, functionRoute: route && routes === 'functions', controller: route && routes !== 'functions' };
|
|
32
32
|
}
|
|
33
33
|
/** The store of the trail, by the ORM of the project; none of them with the trail off. */
|
|
34
34
|
function storeOf(orm) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-vars.js","sourceRoot":"","sources":["../../src/stack/audit-vars.ts"],"names":[],"mappings":"AAGA,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAElE,qHAAqH;AACrH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3D,MAAM,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;IAC1B,MAAM,GAAG,GAAG,EAAE,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEjD,OAAO;QACL,EAAE;QACF,GAAG,EAAE,CAAC,EAAE;QACR,GAAG;QACH,MAAM,EAAE,EAAE,IAAI,CAAC,GAAG;QAClB,GAAG,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;QAC1B,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7B,sIAAsI;QACtI,UAAU,EAAE,GAAG,IAAI,GAAG,KAAK,QAAQ;QACnC,GAAG,UAAU,CAAC,EAAE,IAAI,IAAI,KAAK,MAAM,EAAE,MAAM,CAAC;KAC7C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAS,SAAS,CAAC,GAAY,EAAE,OAAe;IAC9C,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,KAAK,MAAM,CAAC;IAE1C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE,gBAAgB,EAAE,OAAO,IAAI,OAAO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E,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE,gBAAgB,EAAE,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;AACnH,CAAC;AAED,mGAAmG;AACnG,SAAS,UAAU,CAAC,KAAc,EAAE,MAAc;IAChD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,IAAI,MAAM,KAAK,WAAW,EAAE,UAAU,EAAE,KAAK,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;AAChH,CAAC;AAED,0FAA0F;AAC1F,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;AACpH,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Config } from '../config/index.js';
|
|
2
2
|
import type { RenderContext } from '../templating/index.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* What a Redis protocol server brings: the cache, the lock between processes, the limiter in front
|
|
5
|
+
* of HTTP, and the wake-up of the outbox relay of another process. An outbox kept in the memory of
|
|
6
|
+
* the process (no database) is relayed by that process alone, which its own store wakes.
|
|
7
|
+
*/
|
|
4
8
|
export declare function cacheVars(config: Config): RenderContext;
|
|
5
9
|
//# sourceMappingURL=cache-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-vars.d.ts","sourceRoot":"","sources":["../../src/stack/cache-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"cache-vars.d.ts","sourceRoot":"","sources":["../../src/stack/cache-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAMvD"}
|
package/dist/stack/cache-vars.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { WITH_DATABASE } from './with-database.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a Redis protocol server brings: the cache, the lock between processes, the limiter in front
|
|
4
|
+
* of HTTP, and the wake-up of the outbox relay of another process. An outbox kept in the memory of
|
|
5
|
+
* the process (no database) is relayed by that process alone, which its own store wakes.
|
|
6
|
+
*/
|
|
2
7
|
export function cacheVars(config) {
|
|
3
8
|
const redis = config.stack.cache === 'redis';
|
|
4
|
-
const { http, events } = config.stack;
|
|
5
|
-
|
|
9
|
+
const { http, events, orm } = config.stack;
|
|
10
|
+
const relaySignal = redis && events === 'outbox' && WITH_DATABASE.includes(orm);
|
|
11
|
+
return { redis, none: !redis, rateLimit: redis && http !== 'none', relaySignal };
|
|
6
12
|
}
|
|
7
13
|
//# sourceMappingURL=cache-vars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-vars.js","sourceRoot":"","sources":["../../src/stack/cache-vars.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache-vars.js","sourceRoot":"","sources":["../../src/stack/cache-vars.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC;IAC7C,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3C,MAAM,WAAW,GAAG,KAAK,IAAI,MAAM,KAAK,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,IAAI,KAAK,MAAM,EAAE,WAAW,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Config } from '../config/index.js';
|
|
2
2
|
import type { RenderContext } from '../templating/index.js';
|
|
3
3
|
/** The choices of the stack as template variables: what every template of `init` and of `generate` reads. */
|
|
4
4
|
export declare function stackVars(config: Config): RenderContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-vars.d.ts","sourceRoot":"","sources":["../../src/stack/stack-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"stack-vars.d.ts","sourceRoot":"","sources":["../../src/stack/stack-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAiBnD,6GAA6G;AAC7G,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAgCvD"}
|
package/dist/stack/stack-vars.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QUEUE_ORMS } from '../config/index.js';
|
|
1
2
|
import { aliasVars } from './alias-vars.js';
|
|
2
3
|
import { auditVars } from './audit-vars.js';
|
|
3
4
|
import { authenticationVars } from './authentication-vars.js';
|
|
@@ -98,7 +99,7 @@ function queueVars(config) {
|
|
|
98
99
|
return {
|
|
99
100
|
...one(queue, ['memory', 'database', 'redis']),
|
|
100
101
|
stored: queue !== 'memory',
|
|
101
|
-
processTable: queue !== 'memory' && (orm
|
|
102
|
+
processTable: queue !== 'memory' && QUEUE_ORMS.includes(orm),
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
/** How the code is written: its refusals, its shared schemas, its value objects, its closed values. */
|
|
@@ -121,10 +122,10 @@ function routeVars(config) {
|
|
|
121
122
|
const { routes, style, http, audit } = config.stack;
|
|
122
123
|
const declaredControllers = http !== 'none' && style === 'declared';
|
|
123
124
|
return {
|
|
124
|
-
...one(routes, ['controllers', 'functions']),
|
|
125
|
+
...one(routes, ['controllers', 'functions', 'nest']),
|
|
125
126
|
listed: http !== 'none' && !(style === 'declared' && routes === 'controllers'),
|
|
126
127
|
declaredControllers,
|
|
127
|
-
mountsControllers: declaredControllers || (http !== 'none' && audit === 'on' && routes
|
|
128
|
+
mountsControllers: declaredControllers || (http !== 'none' && audit === 'on' && routes !== 'functions'),
|
|
128
129
|
};
|
|
129
130
|
}
|
|
130
131
|
/**
|
|
@@ -147,12 +148,16 @@ function assemblyVars(config) {
|
|
|
147
148
|
discovery: style === 'declared' && assembly === 'discovery',
|
|
148
149
|
};
|
|
149
150
|
}
|
|
150
|
-
/** The HTTP framework,
|
|
151
|
+
/** The HTTP framework, the shared cache in front of it, and the procedures served next to it. */
|
|
151
152
|
function edgeVars(config) {
|
|
152
|
-
const { httpCache, tenancy } = config.stack;
|
|
153
|
+
const { httpCache, tenancy, rpc } = config.stack;
|
|
153
154
|
// A multi-tenant application files its tags under the tenant, on the answers and on the purges alike.
|
|
154
155
|
const perTenant = httpCache !== 'none' && tenancy !== 'none';
|
|
155
|
-
return {
|
|
156
|
+
return {
|
|
157
|
+
http: httpVars(config),
|
|
158
|
+
httpCache: { ...one(httpCache, ['none', 'varnish']), perTenant },
|
|
159
|
+
rpc: one(rpc, ['none', 'orpc', 'trpc']),
|
|
160
|
+
};
|
|
156
161
|
}
|
|
157
162
|
function httpVars(config) {
|
|
158
163
|
const { http } = config.stack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-vars.js","sourceRoot":"","sources":["../../src/stack/stack-vars.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":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AK,CAAC;IACjD,sGAAsG;IACtG,MAAM,SAAS,GAAG,SAAS,KAAK,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC;IAE7D,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;QACtB,SAAS,EAAE,EAAE,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE;QAChE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KACxC,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,MAAc;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAE9B,OAAO;QACL,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5D,GAAG,EAAE,IAAI,KAAK,MAAM;QACpB,KAAK,EAAE,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,MAAM;KACnE,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,MAAc;IACnC,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC;AACJ,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.91.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.91.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ddd-ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.0",
|
|
4
4
|
"description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ddd-ts-kit/audit": "^0.
|
|
56
|
-
"@ddd-ts-kit/events": "^0.
|
|
57
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
55
|
+
"@ddd-ts-kit/audit": "^0.91.0",
|
|
56
|
+
"@ddd-ts-kit/events": "^0.91.0",
|
|
57
|
+
"@ddd-ts-kit/kernel": "^0.91.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -21,24 +21,29 @@ describe('A bounded context is a deployable unit in waiting', () => {
|
|
|
21
21
|
).not.toThrow();
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
// Jest refuses a table without rows: until the first context joins the project, its cases wait.
|
|
25
|
+
if (contexts.length === 0) {
|
|
26
|
+
it.todo('wires each context alone, with its scheduled jobs, once the project has one');
|
|
27
|
+
} else {
|
|
28
|
+
it.each(contexts)(
|
|
29
|
+
'%s wires alone from its declarations, on the kernel and the platform, with no other context',
|
|
30
|
+
(_name, module) => {
|
|
31
|
+
expect(() =>
|
|
32
|
+
createTestApplication({ modules: [platformTestModule, authorization, module], authorization: 'optional' }),
|
|
33
|
+
).not.toThrow();
|
|
34
|
+
},
|
|
35
|
+
);
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
it.each(contexts)('%s takes its scheduled jobs with it, and no job of another context', (name, module) => {
|
|
38
|
+
const application = createTestApplication({
|
|
39
|
+
modules: [platformTestModule, authorization, module],
|
|
40
|
+
authorization: 'optional',
|
|
41
|
+
});
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
const jobs = application.describe().jobs.map((job) => job.name);
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
expect(jobs.filter((job) => !job.startsWith(name + '.'))).toEqual([]);
|
|
46
|
+
expect(application.jobs.scheduler.describe().map((job) => job.name)).toEqual(jobs);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
44
49
|
});
|
|
@@ -16,17 +16,22 @@ describe('A bounded context is a deployable unit in waiting', () => {
|
|
|
16
16
|
expect(() => createPlatform(inertPersistence(), { events: inProcessEvents() })).not.toThrow();
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// Jest refuses a table without rows: until the first context joins the project, its cases wait.
|
|
20
|
+
if (contexts.length === 0) {
|
|
21
|
+
it.todo('wires each context alone, with its scheduled jobs, once the project has one');
|
|
22
|
+
} else {
|
|
23
|
+
it.each(contexts)('%s wires alone, on the platform, with no other context', (name, module) => {
|
|
24
|
+
const platform = createPlatform(inertPersistence(), { events: inProcessEvents() });
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
expect(module(platform).name).toBe(name);
|
|
27
|
+
});
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
it.each(contexts)('%s takes its scheduled jobs with it, and no job of another context', (name, module) => {
|
|
30
|
+
const platform = createPlatform(inertPersistence(), { events: inProcessEvents() });
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
module(platform);
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
expect(platform.jobs.describe().filter((job) => !job.name.startsWith(name + '.'))).toEqual([]);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
32
37
|
});
|
|
@@ -21,21 +21,26 @@ describe('A bounded context is a deployable unit in waiting', () => {
|
|
|
21
21
|
).not.toThrow();
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
modules: [platformTestModule, authorization, module],
|
|
33
|
-
authorization: 'optional',
|
|
24
|
+
// Jest refuses a table without rows: until the first context joins the project, its cases wait.
|
|
25
|
+
if (contexts.length === 0) {
|
|
26
|
+
it.todo('wires each context alone, with its scheduled jobs, once the project has one');
|
|
27
|
+
} else {
|
|
28
|
+
it.each(contexts)('%s wires alone, on the kernel and the platform, with no other context', (_name, module) => {
|
|
29
|
+
expect(() =>
|
|
30
|
+
createTestApplication({ modules: [platformTestModule, authorization, module], authorization: 'optional' }),
|
|
31
|
+
).not.toThrow();
|
|
34
32
|
});
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
it.each(contexts)('%s takes its scheduled jobs with it, and no job of another context', (name, module) => {
|
|
35
|
+
const application = createTestApplication({
|
|
36
|
+
modules: [platformTestModule, authorization, module],
|
|
37
|
+
authorization: 'optional',
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
const jobs = application.describe().jobs.map((job) => job.name);
|
|
41
|
+
|
|
42
|
+
expect(jobs.filter((job) => !job.startsWith(name + '.'))).toEqual([]);
|
|
43
|
+
expect(application.jobs.scheduler.describe().map((job) => job.name)).toEqual(jobs);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
41
46
|
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { UseCaseDeclaration } from '@ddd-ts-kit/auth';
|
|
2
|
+
{{#if routes.nest}}
|
|
3
|
+
import type { Type } from '@nestjs/common';
|
|
4
|
+
import { {{context.camel}}Controllers } from '{{alias.context}}/{{context.kebab}}.controllers{{alias.ext}}';
|
|
5
|
+
{{/if}}
|
|
2
6
|
{{#if http.any}}
|
|
3
7
|
import type { Route } from '@ddd-ts-kit/http';
|
|
4
8
|
{{/if}}
|
|
@@ -12,6 +16,10 @@ export interface {{context.pascal}}Wiring {
|
|
|
12
16
|
{{#if http.any}}
|
|
13
17
|
readonly routes: readonly Route[];
|
|
14
18
|
{{/if}}
|
|
19
|
+
{{#if routes.nest}}
|
|
20
|
+
/** Its Nest controllers, listed by the generated `{{context.kebab}}.controllers.ts`: Nest builds them, the kit serves their methods. */
|
|
21
|
+
readonly controllers: readonly Type<unknown>[];
|
|
22
|
+
{{/if}}
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export function {{context.camel}}Module(platform: Platform): {{context.pascal}}Wiring {
|
|
@@ -30,5 +38,8 @@ export function {{context.camel}}Module(platform: Platform): {{context.pascal}}W
|
|
|
30
38
|
// /ddd-ts-kit:routes
|
|
31
39
|
],
|
|
32
40
|
{{/if}}
|
|
41
|
+
{{#if routes.nest}}
|
|
42
|
+
controllers: {{context.camel}}Controllers,
|
|
43
|
+
{{/if}}
|
|
33
44
|
};
|
|
34
45
|
}
|
|
@@ -6,8 +6,14 @@ export default {
|
|
|
6
6
|
// Jest does not read tsconfig: the import aliases of its "paths", repeated here, and held equal by `ddd-ts-kit check` (imports/alias-declared).
|
|
7
7
|
moduleNameMapper: {
|
|
8
8
|
{{alias.jestMapper}}
|
|
9
|
+
{{#if orm.prisma}}
|
|
10
|
+
// The client `prisma generate` writes names its own modules with `.js`: they are TypeScript sources, which Jest transforms.
|
|
11
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
12
|
+
{{/if}}
|
|
9
13
|
},
|
|
10
14
|
testMatch: ['<rootDir>/{{config.sourceRoot}}/**/*.spec.ts', '<rootDir>/test/architecture/**/*.spec.ts'],
|
|
15
|
+
// A hook opens the test database (PGlite started and its tables created, or a server reached): on a busy machine it outlasts the 5 seconds Jest gives a test and its hooks, as Vitest is given 60.
|
|
16
|
+
testTimeout: 60_000,
|
|
11
17
|
// Each spec file is held to the time budget of its level ("budget" in ddd-ts-kit.config.json, the reference when it is absent): the slowest named at the end of the run, a file over its budget fails it.
|
|
12
18
|
reporters: ['default', '@ddd-ts-kit/testing/budget/jest'],
|
|
13
19
|
// A pull request names the contexts its change reaches (DDD_TS_KIT_AFFECTED, from `ddd-ts-kit affected`): the specs of the others are left to the default branch.
|