ddd-ts-kit 0.1.0 → 0.2.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/README.md +124 -24
- package/dist/affected/changed-paths.d.ts +8 -0
- package/dist/affected/changed-paths.d.ts.map +1 -0
- package/dist/affected/changed-paths.js +21 -0
- package/dist/affected/changed-paths.js.map +1 -0
- package/dist/affected/downstreams-of.d.ts +4 -0
- package/dist/affected/downstreams-of.d.ts.map +1 -0
- package/dist/affected/downstreams-of.js +16 -0
- package/dist/affected/downstreams-of.js.map +1 -0
- package/dist/affected/everything.d.ts +5 -0
- package/dist/affected/everything.d.ts.map +1 -0
- package/dist/affected/everything.js +5 -0
- package/dist/affected/everything.js.map +1 -0
- package/dist/affected/format-selection.d.ts +10 -0
- package/dist/affected/format-selection.d.ts.map +1 -0
- package/dist/affected/format-selection.js +45 -0
- package/dist/affected/format-selection.js.map +1 -0
- package/dist/affected/path-reach.d.ts +12 -0
- package/dist/affected/path-reach.d.ts.map +1 -0
- package/dist/affected/path-reach.js +2 -0
- package/dist/affected/path-reach.js.map +1 -0
- package/dist/affected/reach-of.d.ts +10 -0
- package/dist/affected/reach-of.d.ts.map +1 -0
- package/dist/affected/reach-of.js +30 -0
- package/dist/affected/reach-of.js.map +1 -0
- package/dist/affected/select-affected.d.ts +11 -0
- package/dist/affected/select-affected.d.ts.map +1 -0
- package/dist/affected/select-affected.js +39 -0
- package/dist/affected/select-affected.js.map +1 -0
- package/dist/affected/selection.d.ts +14 -0
- package/dist/affected/selection.d.ts.map +1 -0
- package/dist/affected/selection.js +2 -0
- package/dist/affected/selection.js.map +1 -0
- package/dist/alias/compiler-resolution-of.d.ts +10 -0
- package/dist/alias/compiler-resolution-of.d.ts.map +1 -0
- package/dist/alias/compiler-resolution-of.js +13 -0
- package/dist/alias/compiler-resolution-of.js.map +1 -0
- package/dist/alias/compiler-resolution.d.ts +8 -0
- package/dist/alias/compiler-resolution.d.ts.map +1 -0
- package/dist/alias/compiler-resolution.js +2 -0
- package/dist/alias/compiler-resolution.js.map +1 -0
- package/dist/alias/index.d.ts +3 -1
- package/dist/alias/index.d.ts.map +1 -1
- package/dist/alias/index.js +3 -1
- package/dist/alias/index.js.map +1 -1
- package/dist/alias/module-name-mapper.d.ts +4 -3
- package/dist/alias/module-name-mapper.d.ts.map +1 -1
- package/dist/alias/module-name-mapper.js +6 -4
- package/dist/alias/module-name-mapper.js.map +1 -1
- package/dist/alias/specifier-of.d.ts +7 -0
- package/dist/alias/specifier-of.d.ts.map +1 -0
- package/dist/alias/specifier-of.js +17 -0
- package/dist/alias/specifier-of.js.map +1 -0
- package/dist/alias/specifier-suffix.d.ts +6 -0
- package/dist/alias/specifier-suffix.d.ts.map +1 -0
- package/dist/alias/specifier-suffix.js +8 -0
- package/dist/alias/specifier-suffix.js.map +1 -0
- package/dist/alias/to-alias.d.ts +3 -2
- package/dist/alias/to-alias.d.ts.map +1 -1
- package/dist/alias/to-alias.js +4 -3
- package/dist/alias/to-alias.js.map +1 -1
- package/dist/build/emitted-place.d.ts +2 -0
- package/dist/build/emitted-place.d.ts.map +1 -1
- package/dist/build/emitted-specifier.d.ts +3 -2
- package/dist/build/emitted-specifier.d.ts.map +1 -1
- package/dist/build/emitted-specifier.js +6 -12
- package/dist/build/emitted-specifier.js.map +1 -1
- package/dist/build/emitted-target.d.ts +9 -0
- package/dist/build/emitted-target.d.ts.map +1 -0
- package/dist/build/emitted-target.js +18 -0
- package/dist/build/emitted-target.js.map +1 -0
- package/dist/build/rewrite-aliases.d.ts +5 -3
- package/dist/build/rewrite-aliases.d.ts.map +1 -1
- package/dist/build/rewrite-aliases.js +12 -7
- package/dist/build/rewrite-aliases.js.map +1 -1
- package/dist/build/rewrite-specifiers.d.ts +3 -1
- package/dist/build/rewrite-specifiers.d.ts.map +1 -1
- package/dist/build/rewrite-specifiers.js +2 -2
- package/dist/build/rewrite-specifiers.js.map +1 -1
- package/dist/build/unresolved-problem.d.ts +4 -0
- package/dist/build/unresolved-problem.d.ts.map +1 -0
- package/dist/build/unresolved-problem.js +16 -0
- package/dist/build/unresolved-problem.js.map +1 -0
- package/dist/check/alias/compiler-resolution.d.ts +10 -0
- package/dist/check/alias/compiler-resolution.d.ts.map +1 -0
- package/dist/check/alias/compiler-resolution.js +47 -0
- package/dist/check/alias/compiler-resolution.js.map +1 -0
- package/dist/check/alias/test-runners.js +4 -4
- package/dist/check/alias/test-runners.js.map +1 -1
- package/dist/check/canonical/roles.d.ts.map +1 -1
- package/dist/check/canonical/roles.js +6 -0
- package/dist/check/canonical/roles.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/configuration/config-inspection.d.ts +2 -0
- package/dist/check/configuration/config-inspection.d.ts.map +1 -1
- package/dist/check/configuration/config-inspection.js +11 -1
- package/dist/check/configuration/config-inspection.js.map +1 -1
- package/dist/check/declarations/classes-of.js +1 -1
- package/dist/check/declarations/classes-of.js.map +1 -1
- package/dist/check/explain/context-docs.js +7 -7
- package/dist/check/explain/context-docs.js.map +1 -1
- package/dist/check/explain/imports-docs.d.ts.map +1 -1
- package/dist/check/explain/imports-docs.js +24 -9
- package/dist/check/explain/imports-docs.js.map +1 -1
- package/dist/check/explain/layer-docs.js +7 -7
- package/dist/check/explain/layer-docs.js.map +1 -1
- package/dist/check/explain/ports-docs.d.ts.map +1 -1
- package/dist/check/explain/ports-docs.js +15 -7
- package/dist/check/explain/ports-docs.js.map +1 -1
- package/dist/check/explain/scheduling-docs.js +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +35 -10
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.js +32 -1
- package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
- package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/config-fixtures.js +6 -0
- package/dist/check/fixtures/config-fixtures.js.map +1 -1
- package/dist/check/fixtures/constructor-injection-fixtures.d.ts +3 -0
- package/dist/check/fixtures/constructor-injection-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/constructor-injection-fixtures.js +111 -0
- package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -0
- package/dist/check/fixtures/declared-project.d.ts.map +1 -1
- package/dist/check/fixtures/declared-project.js +4 -1
- package/dist/check/fixtures/declared-project.js.map +1 -1
- package/dist/check/fixtures/extension-fixtures.d.ts +3 -0
- package/dist/check/fixtures/extension-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/extension-fixtures.js +77 -0
- package/dist/check/fixtures/extension-fixtures.js.map +1 -0
- 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/signature-project.d.ts +11 -0
- package/dist/check/fixtures/signature-project.d.ts.map +1 -0
- package/dist/check/fixtures/signature-project.js +21 -0
- package/dist/check/fixtures/signature-project.js.map +1 -0
- package/dist/check/fixtures/signature.d.ts +13 -0
- package/dist/check/fixtures/signature.d.ts.map +1 -0
- package/dist/check/fixtures/signature.js +24 -0
- package/dist/check/fixtures/signature.js.map +1 -0
- package/dist/check/project/beside-the-sources.d.ts +5 -0
- package/dist/check/project/beside-the-sources.d.ts.map +1 -0
- package/dist/check/project/beside-the-sources.js +21 -0
- package/dist/check/project/beside-the-sources.js.map +1 -0
- package/dist/check/project/resolve-import.d.ts.map +1 -1
- package/dist/check/project/resolve-import.js +4 -1
- package/dist/check/project/resolve-import.js.map +1 -1
- package/dist/check/rules/clean-one-export-per-file.d.ts.map +1 -1
- package/dist/check/rules/clean-one-export-per-file.js +14 -8
- package/dist/check/rules/clean-one-export-per-file.js.map +1 -1
- package/dist/check/rules/config-valid.d.ts.map +1 -1
- package/dist/check/rules/config-valid.js +2 -1
- package/dist/check/rules/config-valid.js.map +1 -1
- package/dist/check/rules/declarations-barrel-current.d.ts.map +1 -1
- package/dist/check/rules/declarations-barrel-current.js +34 -32
- package/dist/check/rules/declarations-barrel-current.js.map +1 -1
- package/dist/check/rules/declarations-constructor-injection.d.ts +3 -0
- package/dist/check/rules/declarations-constructor-injection.d.ts.map +1 -0
- package/dist/check/rules/declarations-constructor-injection.js +58 -0
- package/dist/check/rules/declarations-constructor-injection.js.map +1 -0
- package/dist/check/rules/imports-alias-declared.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-declared.js +3 -1
- package/dist/check/rules/imports-alias-declared.js.map +1 -1
- package/dist/check/rules/imports-alias-only.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-only.js +16 -29
- package/dist/check/rules/imports-alias-only.js.map +1 -1
- package/dist/check/rules/imports-extension.d.ts +3 -0
- package/dist/check/rules/imports-extension.d.ts.map +1 -0
- package/dist/check/rules/imports-extension.js +65 -0
- package/dist/check/rules/imports-extension.js.map +1 -0
- package/dist/check/rules/ports-no-concrete-dependency.d.ts.map +1 -1
- package/dist/check/rules/ports-no-concrete-dependency.js +43 -15
- package/dist/check/rules/ports-no-concrete-dependency.js.map +1 -1
- package/dist/check/rules/tree-closed.js +6 -4
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/commands/affected.d.ts +8 -0
- package/dist/commands/affected.d.ts.map +1 -0
- package/dist/commands/affected.js +38 -0
- package/dist/commands/affected.js.map +1 -0
- package/dist/commands/build-aliases.d.ts.map +1 -1
- package/dist/commands/build-aliases.js +5 -3
- package/dist/commands/build-aliases.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +19 -2
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +5 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commit/is-derived.d.ts.map +1 -1
- package/dist/commit/is-derived.js +5 -2
- package/dist/commit/is-derived.js.map +1 -1
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/default-import-extension.d.ts +3 -0
- package/dist/config/default-import-extension.d.ts.map +1 -0
- package/dist/config/default-import-extension.js +3 -0
- package/dist/config/default-import-extension.js.map +1 -0
- package/dist/config/import-extensions.d.ts +3 -0
- package/dist/config/import-extensions.d.ts.map +1 -0
- package/dist/config/import-extensions.js +3 -0
- package/dist/config/import-extensions.js.map +1 -0
- package/dist/config/index.d.ts +4 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/parse-config.d.ts.map +1 -1
- package/dist/config/parse-config.js +2 -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 +3 -1
- package/dist/config/parse-stack.js.map +1 -1
- package/dist/config/restack-config-text.d.ts +11 -0
- package/dist/config/restack-config-text.d.ts.map +1 -0
- package/dist/config/restack-config-text.js +31 -0
- package/dist/config/restack-config-text.js.map +1 -0
- package/dist/config/serialize-config.d.ts.map +1 -1
- package/dist/config/serialize-config.js +3 -6
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/stack.d.ts +15 -0
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +2 -0
- package/dist/config/stack.js.map +1 -1
- package/dist/config/unwritten-import-extension.d.ts +3 -0
- package/dist/config/unwritten-import-extension.d.ts.map +1 -0
- package/dist/config/unwritten-import-extension.js +3 -0
- package/dist/config/unwritten-import-extension.js.map +1 -0
- package/dist/config/written-stack.d.ts +8 -0
- package/dist/config/written-stack.d.ts.map +1 -0
- package/dist/config/written-stack.js +10 -0
- package/dist/config/written-stack.js.map +1 -0
- package/dist/declared/declared-role.d.ts.map +1 -1
- package/dist/declared/declared-role.js +1 -0
- package/dist/declared/declared-role.js.map +1 -1
- package/dist/declared/dependencies-file.d.ts +7 -0
- package/dist/declared/dependencies-file.d.ts.map +1 -0
- package/dist/declared/dependencies-file.js +9 -0
- package/dist/declared/dependencies-file.js.map +1 -0
- package/dist/declared/generated-drift.d.ts +7 -0
- package/dist/declared/generated-drift.d.ts.map +1 -0
- package/dist/declared/generated-drift.js +47 -0
- package/dist/declared/generated-drift.js.map +1 -0
- package/dist/declared/index.d.ts +8 -1
- package/dist/declared/index.d.ts.map +1 -1
- package/dist/declared/index.js +6 -1
- package/dist/declared/index.js.map +1 -1
- package/dist/declared/injection/class-injection.d.ts +19 -0
- package/dist/declared/injection/class-injection.d.ts.map +1 -0
- package/dist/declared/injection/class-injection.js +2 -0
- package/dist/declared/injection/class-injection.js.map +1 -0
- package/dist/declared/injection/constructor-of.d.ts +16 -0
- package/dist/declared/injection/constructor-of.d.ts.map +1 -0
- package/dist/declared/injection/constructor-of.js +33 -0
- package/dist/declared/injection/constructor-of.js.map +1 -0
- package/dist/declared/injection/context-injections.d.ts +8 -0
- package/dist/declared/injection/context-injections.d.ts.map +1 -0
- package/dist/declared/injection/context-injections.js +14 -0
- package/dist/declared/injection/context-injections.js.map +1 -0
- package/dist/declared/injection/declared-kind-of.d.ts +8 -0
- package/dist/declared/injection/declared-kind-of.d.ts.map +1 -0
- package/dist/declared/injection/declared-kind-of.js +12 -0
- package/dist/declared/injection/declared-kind-of.js.map +1 -0
- package/dist/declared/injection/exported-name-of.d.ts +4 -0
- package/dist/declared/injection/exported-name-of.d.ts.map +1 -0
- package/dist/declared/injection/exported-name-of.js +17 -0
- package/dist/declared/injection/exported-name-of.js.map +1 -0
- package/dist/declared/injection/language-types.d.ts +3 -0
- package/dist/declared/injection/language-types.d.ts.map +1 -0
- package/dist/declared/injection/language-types.js +32 -0
- package/dist/declared/injection/language-types.js.map +1 -0
- package/dist/declared/injection/local-names.d.ts +17 -0
- package/dist/declared/injection/local-names.d.ts.map +1 -0
- package/dist/declared/injection/local-names.js +41 -0
- package/dist/declared/injection/local-names.js.map +1 -0
- package/dist/declared/injection/parameter-shape.d.ts +11 -0
- package/dist/declared/injection/parameter-shape.d.ts.map +1 -0
- package/dist/declared/injection/parameter-shape.js +58 -0
- package/dist/declared/injection/parameter-shape.js.map +1 -0
- package/dist/declared/injection/raw-class-name.d.ts +7 -0
- package/dist/declared/injection/raw-class-name.d.ts.map +1 -0
- package/dist/declared/injection/raw-class-name.js +28 -0
- package/dist/declared/injection/raw-class-name.js.map +1 -0
- package/dist/declared/injection/read-constructor.d.ts +10 -0
- package/dist/declared/injection/read-constructor.d.ts.map +1 -0
- package/dist/declared/injection/read-constructor.js +2 -0
- package/dist/declared/injection/read-constructor.js.map +1 -0
- package/dist/declared/injection/read-injections.d.ts +6 -0
- package/dist/declared/injection/read-injections.d.ts.map +1 -0
- package/dist/declared/injection/read-injections.js +75 -0
- package/dist/declared/injection/read-injections.js.map +1 -0
- package/dist/declared/injection/render-injections.d.ts +11 -0
- package/dist/declared/injection/render-injections.d.ts.map +1 -0
- package/dist/declared/injection/render-injections.js +51 -0
- package/dist/declared/injection/render-injections.js.map +1 -0
- package/dist/declared/injection/rendered-injections.d.ts +8 -0
- package/dist/declared/injection/rendered-injections.d.ts.map +1 -0
- package/dist/declared/injection/rendered-injections.js +2 -0
- package/dist/declared/injection/rendered-injections.js.map +1 -0
- package/dist/declared/injection/resolve-token.d.ts +18 -0
- package/dist/declared/injection/resolve-token.d.ts.map +1 -0
- package/dist/declared/injection/resolve-token.js +46 -0
- package/dist/declared/injection/resolve-token.js.map +1 -0
- package/dist/declared/injection/resolved-token.d.ts +10 -0
- package/dist/declared/injection/resolved-token.d.ts.map +1 -0
- package/dist/declared/injection/resolved-token.js +2 -0
- package/dist/declared/injection/resolved-token.js.map +1 -0
- package/dist/declared/injection/sources.d.ts +4 -0
- package/dist/declared/injection/sources.d.ts.map +1 -0
- package/dist/declared/injection/sources.js +2 -0
- package/dist/declared/injection/sources.js.map +1 -0
- package/dist/declared/injection/token-reference.d.ts +14 -0
- package/dist/declared/injection/token-reference.d.ts.map +1 -0
- package/dist/declared/injection/token-reference.js +2 -0
- package/dist/declared/injection/token-reference.js.map +1 -0
- package/dist/declared/render-barrel.d.ts +8 -5
- package/dist/declared/render-barrel.d.ts.map +1 -1
- package/dist/declared/render-barrel.js +13 -6
- package/dist/declared/render-barrel.js.map +1 -1
- package/dist/declared/render-dependencies-file.d.ts +8 -0
- package/dist/declared/render-dependencies-file.d.ts.map +1 -0
- package/dist/declared/render-dependencies-file.js +12 -0
- package/dist/declared/render-dependencies-file.js.map +1 -0
- package/dist/depcruise/cruise-configuration.js +3 -1
- package/dist/depcruise/cruise-configuration.js.map +1 -1
- package/dist/depcruise/hygiene-rules.js +2 -1
- package/dist/depcruise/hygiene-rules.js.map +1 -1
- package/dist/describe/context-description.d.ts +10 -0
- package/dist/describe/context-description.d.ts.map +1 -1
- package/dist/describe/describe-context.d.ts.map +1 -1
- package/dist/describe/describe-context.js +2 -0
- package/dist/describe/describe-context.js.map +1 -1
- package/dist/describe/format-description.d.ts.map +1 -1
- package/dist/describe/format-description.js +4 -0
- package/dist/describe/format-description.js.map +1 -1
- package/dist/describe/read-projections.d.ts +5 -0
- package/dist/describe/read-projections.d.ts.map +1 -0
- package/dist/describe/read-projections.js +19 -0
- package/dist/describe/read-projections.js.map +1 -0
- package/dist/describe/reference-lines.js +9 -0
- package/dist/describe/reference-lines.js.map +1 -1
- package/dist/dev/refresh-declarations.d.ts +9 -0
- package/dist/dev/refresh-declarations.d.ts.map +1 -0
- package/dist/dev/refresh-declarations.js +28 -0
- package/dist/dev/refresh-declarations.js.map +1 -0
- package/dist/generate/access-vars.js +3 -3
- package/dist/generate/access-vars.js.map +1 -1
- package/dist/generate/apply-wiring.js +1 -1
- package/dist/generate/apply-wiring.js.map +1 -1
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +5 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/context-plan.d.ts +10 -0
- package/dist/generate/kinds/context-plan.d.ts.map +1 -0
- package/dist/generate/kinds/context-plan.js +2 -0
- package/dist/generate/kinds/context-plan.js.map +1 -0
- package/dist/generate/kinds/declare-context-entries.d.ts +12 -0
- package/dist/generate/kinds/declare-context-entries.d.ts.map +1 -0
- package/dist/generate/kinds/declare-context-entries.js +33 -0
- package/dist/generate/kinds/declare-context-entries.js.map +1 -0
- package/dist/generate/kinds/extraction/service-selection.js +8 -11
- package/dist/generate/kinds/extraction/service-selection.js.map +1 -1
- package/dist/generate/kinds/generate-context.d.ts.map +1 -1
- package/dist/generate/kinds/generate-context.js +2 -0
- package/dist/generate/kinds/generate-context.js.map +1 -1
- package/dist/generate/kinds/import-assembler.d.ts +9 -0
- package/dist/generate/kinds/import-assembler.d.ts.map +1 -0
- package/dist/generate/kinds/import-assembler.js +29 -0
- package/dist/generate/kinds/import-assembler.js.map +1 -0
- package/dist/generate/kinds/job/job-vars.d.ts.map +1 -1
- package/dist/generate/kinds/job/job-vars.js +5 -3
- package/dist/generate/kinds/job/job-vars.js.map +1 -1
- package/dist/generate/kinds/plan-vars.d.ts +5 -0
- package/dist/generate/kinds/plan-vars.d.ts.map +1 -0
- package/dist/generate/kinds/plan-vars.js +24 -0
- package/dist/generate/kinds/plan-vars.js.map +1 -0
- package/dist/generate/kinds/projection-kind.d.ts +3 -0
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -0
- package/dist/generate/kinds/projection-kind.js +72 -0
- package/dist/generate/kinds/projection-kind.js.map +1 -0
- package/dist/generate/kinds/publish-in-index.js +2 -2
- package/dist/generate/kinds/publish-in-index.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +7 -6
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/wire-context.d.ts +10 -0
- package/dist/generate/kinds/wire-context.d.ts.map +1 -0
- package/dist/generate/kinds/wire-context.js +36 -0
- package/dist/generate/kinds/wire-context.js.map +1 -0
- package/dist/generate/kinds/write-context-files.d.ts +1 -8
- package/dist/generate/kinds/write-context-files.d.ts.map +1 -1
- package/dist/generate/kinds/write-context-files.js +3 -32
- package/dist/generate/kinds/write-context-files.js.map +1 -1
- package/dist/generate/kinds/write-own-policy.d.ts +9 -0
- package/dist/generate/kinds/write-own-policy.d.ts.map +1 -0
- package/dist/generate/kinds/write-own-policy.js +13 -0
- package/dist/generate/kinds/write-own-policy.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/refresh-barrels.d.ts +4 -3
- package/dist/generate/refresh-barrels.d.ts.map +1 -1
- package/dist/generate/refresh-barrels.js +41 -16
- package/dist/generate/refresh-barrels.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +6 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/generate/spec-vars.js +4 -4
- package/dist/generate/spec-vars.js.map +1 -1
- package/dist/generate/stop-ignoring-validation.d.ts +9 -0
- package/dist/generate/stop-ignoring-validation.d.ts.map +1 -0
- package/dist/generate/stop-ignoring-validation.js +36 -0
- package/dist/generate/stop-ignoring-validation.js.map +1 -0
- package/dist/generate/storage-vars.d.ts +2 -2
- package/dist/generate/storage-vars.d.ts.map +1 -1
- package/dist/generate/storage-vars.js +6 -10
- package/dist/generate/storage-vars.js.map +1 -1
- package/dist/generate/workspace-sources.d.ts +6 -0
- package/dist/generate/workspace-sources.d.ts.map +1 -0
- package/dist/generate/workspace-sources.js +13 -0
- package/dist/generate/workspace-sources.js.map +1 -0
- package/dist/init/files/architecture-files.d.ts +9 -0
- package/dist/init/files/architecture-files.d.ts.map +1 -0
- package/dist/init/files/architecture-files.js +10 -0
- package/dist/init/files/architecture-files.js.map +1 -0
- package/dist/init/files/init-files.d.ts.map +1 -1
- package/dist/init/files/init-files.js +2 -0
- package/dist/init/files/init-files.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +5 -1
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/files/pipeline-files.d.ts.map +1 -1
- package/dist/init/files/pipeline-files.js +5 -1
- package/dist/init/files/pipeline-files.js.map +1 -1
- package/dist/init/files/platform-files.d.ts.map +1 -1
- package/dist/init/files/platform-files.js +3 -1
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/files/project-files.d.ts.map +1 -1
- package/dist/init/files/project-files.js +3 -1
- package/dist/init/files/project-files.js.map +1 -1
- package/dist/init/knip-vars.d.ts +3 -3
- package/dist/init/knip-vars.d.ts.map +1 -1
- package/dist/init/knip-vars.js +27 -5
- package/dist/init/knip-vars.js.map +1 -1
- package/dist/init/manifest/documentation-scripts.d.ts.map +1 -1
- package/dist/init/manifest/documentation-scripts.js +2 -0
- package/dist/init/manifest/documentation-scripts.js.map +1 -1
- package/dist/init/manifest/scripts-for.d.ts +5 -1
- package/dist/init/manifest/scripts-for.d.ts.map +1 -1
- package/dist/init/manifest/scripts-for.js +16 -2
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.js +23 -23
- package/dist/init/manifest/write-manifest.d.ts.map +1 -1
- package/dist/init/manifest/write-manifest.js +18 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +56 -7
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/recorded-options.d.ts +11 -0
- package/dist/init/stack/recorded-options.d.ts.map +1 -0
- package/dist/init/stack/recorded-options.js +19 -0
- package/dist/init/stack/recorded-options.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts +6 -1
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +48 -9
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/resolve-style.d.ts +3 -5
- package/dist/init/stack/resolve-style.d.ts.map +1 -1
- package/dist/init/stack/resolve-style.js +11 -3
- package/dist/init/stack/resolve-style.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +4 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/init/template-vars.d.ts.map +1 -1
- package/dist/init/template-vars.js +2 -0
- package/dist/init/template-vars.js.map +1 -1
- package/dist/init/validation-dependencies.d.ts +10 -0
- package/dist/init/validation-dependencies.d.ts.map +1 -0
- package/dist/init/validation-dependencies.js +23 -0
- package/dist/init/validation-dependencies.js.map +1 -0
- package/dist/init/write-agent-settings.js +4 -3
- package/dist/init/write-agent-settings.js.map +1 -1
- package/dist/init/write-contracts.d.ts +10 -0
- package/dist/init/write-contracts.d.ts.map +1 -0
- package/dist/init/write-contracts.js +33 -0
- package/dist/init/write-contracts.js.map +1 -0
- package/dist/init/write-type-script-configs.d.ts +2 -1
- package/dist/init/write-type-script-configs.d.ts.map +1 -1
- package/dist/init/write-type-script-configs.js +4 -4
- package/dist/init/write-type-script-configs.js.map +1 -1
- package/dist/package-manager/default-package-manager.d.ts +8 -0
- package/dist/package-manager/default-package-manager.d.ts.map +1 -0
- package/dist/package-manager/default-package-manager.js +7 -0
- package/dist/package-manager/default-package-manager.js.map +1 -0
- package/dist/package-manager/dialect.d.ts +3 -0
- package/dist/package-manager/dialect.d.ts.map +1 -0
- package/dist/package-manager/dialect.js +2 -0
- package/dist/package-manager/dialect.js.map +1 -0
- package/dist/package-manager/dialects.d.ts +5 -0
- package/dist/package-manager/dialects.d.ts.map +1 -0
- package/dist/package-manager/dialects.js +21 -0
- package/dist/package-manager/dialects.js.map +1 -0
- package/dist/package-manager/in-dialect.d.ts +8 -0
- package/dist/package-manager/in-dialect.d.ts.map +1 -0
- package/dist/package-manager/in-dialect.js +10 -0
- package/dist/package-manager/in-dialect.js.map +1 -0
- package/dist/package-manager/lockfiles.d.ts +4 -0
- package/dist/package-manager/lockfiles.d.ts.map +1 -0
- package/dist/package-manager/lockfiles.js +6 -0
- package/dist/package-manager/lockfiles.js.map +1 -0
- package/dist/package-manager/package-manager-of.d.ts +4 -0
- package/dist/package-manager/package-manager-of.d.ts.map +1 -0
- package/dist/package-manager/package-manager-of.js +15 -0
- package/dist/package-manager/package-manager-of.js.map +1 -0
- package/dist/package-manager/package-manager-vars.d.ts +5 -0
- package/dist/package-manager/package-manager-vars.d.ts.map +1 -0
- package/dist/package-manager/package-manager-vars.js +13 -0
- package/dist/package-manager/package-manager-vars.js.map +1 -0
- package/dist/package-manager/pinned-package-managers.d.ts +7 -0
- package/dist/package-manager/pinned-package-managers.d.ts.map +1 -0
- package/dist/package-manager/pinned-package-managers.js +9 -0
- package/dist/package-manager/pinned-package-managers.js.map +1 -0
- package/dist/refresh-declarations.d.ts +3 -0
- package/dist/refresh-declarations.d.ts.map +1 -0
- package/dist/refresh-declarations.js +4 -0
- package/dist/refresh-declarations.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +10 -2
- package/dist/run.js.map +1 -1
- package/dist/stack/alias-vars.d.ts +2 -1
- package/dist/stack/alias-vars.d.ts.map +1 -1
- package/dist/stack/alias-vars.js +6 -3
- package/dist/stack/alias-vars.js.map +1 -1
- package/dist/templating/render.d.ts.map +1 -1
- package/dist/templating/render.js +2 -1
- package/dist/templating/render.js.map +1 -1
- package/dist/templating/rendering.js +1 -1
- package/dist/templating/rendering.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspace/workspace.d.ts +5 -1
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +13 -3
- package/dist/workspace/workspace.js.map +1 -1
- package/package.json +4 -3
- package/templates/acl/translator.spec.ts.tpl +1 -1
- package/templates/adapter/adapter.declared.ts.tpl +3 -3
- package/templates/adapter/adapter.spec.ts.tpl +1 -1
- package/templates/adapter/adapter.ts.tpl +1 -1
- package/templates/adapter/wiring.tsyringe.tpl +3 -3
- package/templates/aggregate/aggregate.spec.ts.tpl +2 -2
- package/templates/architecture/extractable.declared.spec.ts.tpl +7 -7
- package/templates/architecture/extractable.manual.spec.ts.tpl +8 -4
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +7 -1
- package/templates/architecture/wiring.declared.tpl +1 -1
- package/templates/architecture/wiring.manual.tpl +1 -1
- package/templates/architecture/wiring.tsyringe.tpl +1 -1
- package/templates/builder/builder.ts.tpl +1 -1
- package/templates/command/handler.declared.ts.tpl +7 -7
- package/templates/command/handler.spec.buses.ts.tpl +4 -4
- package/templates/command/handler.spec.tsyringe.ts.tpl +5 -5
- package/templates/command/handler.ts.tpl +4 -4
- package/templates/command/wiring.manual.tpl +2 -2
- package/templates/command/wiring.tsyringe.tpl +3 -3
- package/templates/context/module.manual.ts.tpl +1 -1
- package/templates/context/permission-set.tpl +1 -1
- package/templates/context/permissions.spec.ts.tpl +1 -1
- package/templates/context/routes.spec.ts.tpl +1 -1
- package/templates/context/wiring.declared.tpl +2 -2
- package/templates/context/wiring.manual.tpl +1 -1
- package/templates/context/wiring.tsyringe.tpl +2 -2
- package/templates/docs/asyncapi.json.tpl +12 -0
- package/templates/docs/event-catalog.md +3 -0
- package/templates/docs/openapi.json.tpl +354 -0
- package/templates/domain-error/domain-error.spec.ts.tpl +1 -1
- package/templates/domain-event/domain-event.spec.ts.tpl +1 -1
- package/templates/domain-service/domain-service.spec.ts.tpl +1 -1
- package/templates/e2e/e2e.spec.ts.tpl +2 -2
- package/templates/entity/entity.spec.ts.tpl +1 -1
- package/templates/event-handler/event-handler.declared.ts.tpl +3 -3
- package/templates/event-handler/event-handler.spec.ts.tpl +2 -2
- package/templates/event-handler/event-handler.ts.tpl +1 -1
- package/templates/event-handler/wiring.manual.tpl +2 -2
- package/templates/event-handler/wiring.tsyringe.tpl +2 -2
- package/templates/gateway/adapter.declared.ts.tpl +3 -3
- package/templates/gateway/adapter.ts.tpl +2 -2
- package/templates/gateway/contract.spec.ts.tpl +3 -3
- package/templates/gateway/fake.ts.tpl +1 -1
- package/templates/gateway/platform-test.declared.tpl +1 -1
- package/templates/gateway/platform.declared.tpl +1 -1
- package/templates/gateway/wiring.tsyringe.tpl +3 -3
- package/templates/init/CLAUDE.md.tpl +5 -2
- package/templates/init/README.md.tpl +16 -10
- package/templates/init/docker/Dockerfile.tpl +9 -2
- package/templates/init/e2e/create-credentials.jwt.ts.tpl +1 -1
- package/templates/init/e2e/create-credentials.keycloak.ts.tpl +1 -1
- package/templates/init/e2e/create-credentials.none.ts.tpl +2 -2
- package/templates/init/e2e/start-application.database.ts.tpl +16 -16
- package/templates/init/e2e/start-application.memory.ts.tpl +16 -16
- package/templates/init/e2e/test-environment.ts.tpl +1 -1
- package/templates/init/jest.config.js.tpl +3 -1
- package/templates/init/main.ts.tpl +11 -11
- package/templates/init/platform/audit/audit.module.manual.ts.tpl +5 -5
- package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +4 -4
- package/templates/init/platform/audit/create-audit.ts.tpl +5 -5
- package/templates/init/platform/audit/search-audit-entries.handler.ts.tpl +1 -1
- package/templates/init/platform/audit/search-audit-entries.route.ts.tpl +1 -1
- package/templates/init/platform/auth/authorization.tsyringe.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authenticator.jwt.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authenticator.keycloak.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authenticator.none.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authorizer.abac.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authorizer.custom.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authorizer.rbac.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authorizer.rebac.ts.tpl +3 -3
- package/templates/init/platform/auth/create-tuple-store.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/auth/custom-authorizer.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/auth/http-boundary.ts.tpl +1 -1
- package/templates/init/platform/auth/permission-mapping.ts.tpl +1 -1
- package/templates/init/platform/auth/permissions.ts.tpl +1 -1
- package/templates/init/platform/auth/principal-of.none.ts.tpl +1 -1
- package/templates/init/platform/auth/relate-system-actors.ts.tpl +1 -1
- package/templates/init/platform/auth/relation-tuples.ts.tpl +2 -2
- package/templates/init/platform/auth/security-schemes.none.ts.tpl +1 -1
- package/templates/init/platform/buses/create-command-bus.ts.tpl +2 -2
- package/templates/init/platform/buses/create-query-bus.ts.tpl +1 -1
- package/templates/init/platform/compose-application.manual.ts.tpl +6 -6
- package/templates/init/platform/compose-application.tsyringe.ts.tpl +10 -16
- package/templates/init/platform/config/app-config.ts.tpl +2 -2
- package/templates/init/platform/config/load-config.ts.tpl +3 -3
- package/templates/init/platform/create-platform.manual.ts.tpl +16 -16
- package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
- package/templates/init/platform/database/create-data-source.typeorm.ts.tpl +1 -1
- package/templates/init/platform/database/data-source.typeorm.ts.tpl +1 -1
- package/templates/init/platform/database/database.drizzle.ts.tpl +1 -1
- package/templates/init/platform/database/database.prisma.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.memory.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.pooled.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.prisma.ts.tpl +3 -3
- package/templates/init/platform/database/inert-persistence.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/journal.drizzle.json +5 -0
- package/templates/init/platform/database/open-persistence.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/database/open-persistence.memory.ts.tpl +1 -1
- package/templates/init/platform/database/open-persistence.pooled.ts.tpl +3 -3
- package/templates/init/platform/database/open-persistence.prisma.ts.tpl +3 -3
- package/templates/init/platform/database/open-persistence.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +4 -4
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +5 -5
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +4 -4
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.knex.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +2 -2
- package/templates/init/platform/database/persistence.orm.ts.tpl +1 -1
- package/templates/init/platform/errors.ts.tpl +1 -1
- package/templates/init/platform/events/create-event-provider.custom.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.kafka.ts.tpl +3 -3
- package/templates/init/platform/events/create-event-provider.nats.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.rabbitmq.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.redis.ts.tpl +2 -2
- package/templates/init/platform/events/custom-event-bus.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/events/in-process-events.ts.tpl +1 -1
- package/templates/init/platform/events/start-outbox-relay.ts.tpl +1 -1
- package/templates/init/platform/http/create-app-module.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.express.ts.tpl +4 -4
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +4 -4
- package/templates/init/platform/http/start-http-server.nest.ts.tpl +5 -5
- package/templates/init/platform/http/with-documentation.ts.tpl +2 -2
- package/templates/init/platform/lay-foundations.tsyringe.ts.tpl +5 -5
- package/templates/init/platform/platform-test.module.tsyringe.ts.tpl +1 -1
- package/templates/init/platform/platform.manual.ts.tpl +3 -3
- package/templates/init/platform/platform.module.tsyringe.ts.tpl +8 -8
- package/templates/init/platform/resilience/adapter-aspects.ts.tpl +2 -2
- package/templates/init/platform/resilience/default-resilience.ts.tpl +1 -1
- package/templates/init/platform/resilience/own-policy.ts.tpl +1 -1
- package/templates/init/platform/tracing.ts.tpl +2 -2
- package/templates/init/pnpm-workspace.yaml +8 -0
- package/templates/init/rules/application.md.tpl +8 -2
- package/templates/init/rules/infrastructure.md.tpl +3 -3
- package/templates/init/scripts/events.ts.tpl +1 -1
- package/templates/init/scripts/openapi.ts.tpl +6 -6
- package/templates/integration-event/audited.tpl +1 -1
- package/templates/integration-event/integration-event.class-validator.ts.tpl +1 -1
- package/templates/integration-event/integration-event.custom.ts.tpl +1 -1
- package/templates/integration-event/publisher.declared.ts.tpl +4 -4
- package/templates/integration-event/publisher.spec.ts.tpl +2 -2
- package/templates/integration-event/publisher.ts.tpl +2 -2
- package/templates/integration-event/wiring.manual.tpl +2 -2
- package/templates/integration-event/wiring.tsyringe.tpl +2 -2
- package/templates/integration-handler/integration-handler.declared.ts.tpl +3 -3
- package/templates/integration-handler/integration-handler.spec.ts.tpl +2 -2
- package/templates/integration-handler/integration-handler.ts.tpl +1 -1
- package/templates/integration-handler/wiring.manual.tpl +3 -3
- package/templates/integration-handler/wiring.tsyringe.tpl +2 -2
- package/templates/job/job.declared.ts.tpl +3 -3
- package/templates/job/job.spec.buses.ts.tpl +2 -2
- package/templates/job/job.spec.tsyringe.ts.tpl +2 -2
- package/templates/job/job.ts.tpl +1 -1
- package/templates/job/wiring.manual.tpl +1 -1
- package/templates/job/wiring.tsyringe.tpl +1 -1
- package/templates/pipeline/biome.json.tpl +2 -1
- package/templates/pipeline/github/actions/setup/action.yml.tpl +37 -0
- package/templates/pipeline/github/scripts/start-postgres.sh +47 -0
- package/templates/pipeline/github/workflows/ci.yml +68 -110
- package/templates/pipeline/github/workflows/pr-title.yml +1 -5
- package/templates/pipeline/gitlab/{gitlab-ci.yml → gitlab-ci.yml.tpl} +59 -31
- package/templates/pipeline/knip.json.tpl +9 -10
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/pipeline/vitest.config.ts.tpl +7 -3
- package/templates/policy/policy.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.ts.tpl +1 -1
- package/templates/policy/policy.ts.tpl +1 -1
- package/templates/policy/registration.tpl +1 -1
- package/templates/port/fake.ts.tpl +1 -1
- package/templates/projection/projection.spec.ts.tpl +17 -0
- package/templates/projection/projection.ts.tpl +11 -0
- package/templates/query/handler.declared.ts.tpl +4 -4
- package/templates/query/handler.spec.buses.ts.tpl +5 -5
- package/templates/query/handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/handler.ts.tpl +3 -3
- package/templates/query/query.ts.tpl +1 -1
- package/templates/query/reader.fake.ts.tpl +2 -2
- package/templates/query/reader.in-memory.ts.tpl +4 -4
- package/templates/query/reader.port.ts.tpl +2 -2
- package/templates/query/search.handler.declared.ts.tpl +6 -6
- package/templates/query/search.handler.spec.buses.ts.tpl +5 -5
- package/templates/query/search.handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/search.handler.ts.tpl +4 -4
- package/templates/query/search.query.ts.tpl +1 -1
- package/templates/query/search.reader.fake.ts.tpl +2 -2
- package/templates/query/search.reader.in-memory.ts.tpl +3 -3
- package/templates/query/search.reader.port.ts.tpl +1 -1
- package/templates/query/search.reader.spec.ts.tpl +2 -2
- package/templates/query/search.wiring.manual.tpl +3 -3
- package/templates/query/search.wiring.tsyringe.tpl +4 -4
- package/templates/query/wiring.manual.tpl +3 -3
- package/templates/query/wiring.tsyringe.tpl +4 -4
- package/templates/repository/contract.spec.ts.tpl +5 -5
- package/templates/repository/drizzle/mapper.ts.tpl +2 -2
- package/templates/repository/drizzle/repository.ts.tpl +9 -17
- package/templates/repository/drizzle/schema-export.tpl +1 -1
- package/templates/repository/fake.ts.tpl +2 -2
- package/templates/repository/knex/mapper.ts.tpl +2 -2
- package/templates/repository/knex/repository.ts.tpl +10 -30
- package/templates/repository/knex/schema-export.tpl +1 -1
- package/templates/repository/knex/tables.ts.tpl +1 -1
- package/templates/repository/none/repository.ts.tpl +3 -3
- package/templates/repository/prisma/mapper.ts.tpl +2 -2
- package/templates/repository/prisma/repository.ts.tpl +6 -9
- package/templates/repository/repository.ts.tpl +1 -1
- package/templates/repository/typeorm/mapper.ts.tpl +2 -2
- package/templates/repository/typeorm/repository.ts.tpl +9 -12
- package/templates/repository/typeorm/schema-export.tpl +1 -1
- package/templates/repository/typeorm/table.tpl +1 -1
- package/templates/repository/wiring.manual.tpl +1 -1
- package/templates/repository/wiring.tsyringe.tpl +2 -2
- package/templates/route/route.search.ts.tpl +1 -1
- package/templates/route/route.spec.ts.tpl +1 -1
- package/templates/route/routes.on-tsyringe.tpl +1 -1
- package/templates/route/wiring.manual.tpl +1 -1
- package/templates/service/main.ts.tpl +11 -11
- package/templates/value-object/value-object.spec.ts.tpl +1 -1
- package/templates/worker/main.ts.tpl +9 -9
- package/dist/alias/platform-alias.d.ts +0 -4
- package/dist/alias/platform-alias.d.ts.map +0 -1
- package/dist/alias/platform-alias.js +0 -7
- package/dist/alias/platform-alias.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
1
|
+
import type { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
2
2
|
|
|
3
3
|
export class {{event.pascal}}EventHandler {
|
|
4
4
|
async handle(event: {{event.pascal}}): Promise<void> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{event.pascal}}EventHandler } from '{{alias.context}}/application/event-handlers/{{event.kebab}}.event-handler.
|
|
3
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
2
|
+
import { {{event.pascal}}EventHandler } from '{{alias.context}}/application/event-handlers/{{event.kebab}}.event-handler{{alias.ext}}';
|
|
3
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
4
4
|
@@registrations
|
|
5
5
|
const {{event.camel}}EventHandler = platform.adapter(new {{event.pascal}}EventHandler(), { kind: 'domain-event-handler', context: '{{context.kebab}}' });
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
import { DomainEventDispatcher } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { {{event.pascal}}EventHandler } from '{{alias.context}}/application/event-handlers/{{event.kebab}}.event-handler.
|
|
4
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
3
|
+
import { {{event.pascal}}EventHandler } from '{{alias.context}}/application/event-handlers/{{event.kebab}}.event-handler{{alias.ext}}';
|
|
4
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
5
5
|
@@registrations
|
|
6
6
|
builder.bind({{event.pascal}}EventHandler).toClass({{event.pascal}}EventHandler).as('domain-event-handler');
|
|
7
7
|
@@start
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Gateway } from '@ddd-ts-kit/kernel/declarations';
|
|
2
|
-
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
3
|
-
import { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port.
|
|
2
|
+
import type { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
3
|
+
import { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(platform): when {{upstream.kebab}} runs as its own service, turn this class into the remote adapter of {{name.pascal}}Gateway (an HTTP or RPC client with a timeout, retries and a fallback): the declaration stays, nothing else changes.
|
|
6
|
-
@Gateway({{name.pascal}}Gateway
|
|
6
|
+
@Gateway({{name.pascal}}Gateway)
|
|
7
7
|
export class InProcess{{name.pascal}}Gateway implements {{name.pascal}}Gateway {
|
|
8
8
|
constructor(readonly upstream: {{name.pascal}}Contract) {}
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
2
|
-
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port.
|
|
1
|
+
import type { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
2
|
+
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
// TODO(platform): when {{upstream.kebab}} runs as its own service, write the remote adapter of {{name.pascal}}Gateway next to this one (an HTTP or RPC client with a timeout, retries and a fallback) and bind it instead; nothing else changes.
|
|
5
5
|
export class InProcess{{name.pascal}}Gateway implements {{name.pascal}}Gateway {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
|
-
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port.
|
|
3
|
-
import { InProcess{{name.pascal}}Gateway } from '{{alias.context}}/infrastructure/external/in-process-{{name.kebab}}.gateway.
|
|
4
|
-
import { Fake{{name.pascal}}Gateway } from '{{alias.context}}/test/fakes/{{name.kebab}}-gateway.fake.
|
|
2
|
+
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port{{alias.ext}}';
|
|
3
|
+
import { InProcess{{name.pascal}}Gateway } from '{{alias.context}}/infrastructure/external/in-process-{{name.kebab}}.gateway{{alias.ext}}';
|
|
4
|
+
import { Fake{{name.pascal}}Gateway } from '{{alias.context}}/test/fakes/{{name.kebab}}-gateway.fake{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
const ADAPTERS: readonly (readonly [string, () => {{name.pascal}}Gateway])[] = [
|
|
7
7
|
['the fake', () => new Fake{{name.pascal}}Gateway()],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port.
|
|
1
|
+
import type { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port{{alias.ext}}';
|
|
2
2
|
|
|
3
3
|
export class Fake{{name.pascal}}Gateway implements {{name.pascal}}Gateway {
|
|
4
4
|
// TODO(domain): implement each operation of {{name.pascal}}Gateway in memory, with what {{upstream.kebab}} would answer given by the test.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
2
|
+
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
3
3
|
@@test-bindings
|
|
4
4
|
builder.bind({{name.pascal}}Contract).toValue({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
2
|
+
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
3
3
|
@@bindings
|
|
4
4
|
builder.bind({{name.pascal}}Contract).toValue({});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
3
|
-
import { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port.
|
|
4
|
-
import { InProcess{{name.pascal}}Gateway } from '{{alias.context}}/infrastructure/external/in-process-{{name.kebab}}.gateway.
|
|
2
|
+
import { {{name.pascal}}Contract } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
3
|
+
import { {{name.pascal}}Gateway } from '{{alias.context}}/application/ports/{{name.kebab}}-gateway.port{{alias.ext}}';
|
|
4
|
+
import { InProcess{{name.pascal}}Gateway } from '{{alias.context}}/infrastructure/external/in-process-{{name.kebab}}.gateway{{alias.ext}}';
|
|
5
5
|
@@registrations
|
|
6
6
|
builder.bind({{name.pascal}}Contract).toValue({});
|
|
7
7
|
builder.bind({{name.pascal}}Gateway).toClass(InProcess{{name.pascal}}Gateway, [{{name.pascal}}Contract]).as('gateway');
|
|
@@ -24,10 +24,13 @@ Loaded with the files they apply to, from `.claude/rules/`: `domain.md` (`domain
|
|
|
24
24
|
|
|
25
25
|
Create every file of a role with `npx ddd-ts-kit generate <kind> ... --json`, then fill the `TODO(domain)` places it lists; never write one by hand, never restructure what a generator wrote.
|
|
26
26
|
{{#if assembly.barrel}}
|
|
27
|
-
Never edit `<context>.declarations.ts`: `generate` and `
|
|
27
|
+
Never edit `<context>.declarations.ts`: `generate`, `docs` and `npm run dev` rewrite it, from the role files and from the constructor signatures (it registers what each constructor is injected). After changing a constructor by hand, `npx ddd-ts-kit docs`.
|
|
28
|
+
{{/if}}
|
|
29
|
+
{{#if assembly.discovery}}
|
|
30
|
+
Never edit `<context>.dependencies.ts`: `generate`, `docs` and `npm run dev` rewrite it from the constructor signatures (it registers what each constructor is injected). After changing a constructor by hand, `npx ddd-ts-kit docs`.
|
|
28
31
|
{{/if}}
|
|
29
32
|
Never edit `openapi/openapi.json`, `docs/integration/asyncapi.json`, `docs/integration/event-catalog.md`, `.dependency-cruiser.cjs` or the generated sections of a `CONTEXT.md`: change the code or the config, then `npm run docs:generate`, `npx ddd-ts-kit docs` and `npx ddd-ts-kit depcruise-config --write`.
|
|
30
|
-
Imports: a file of the project is imported by its alias from the project root, never by a relative path, the same directory included: `{{alias.source}}/...` for `{{config.sourceRoot}}/`, `{{alias.test}}/...` for `test/`, `{{alias.scripts}}/...` for `scripts/`, always ending in `.js` (`imports/alias-only`; `npm run lint:fix` rewrites a relative import). The alias is declared once, under `paths` in `tsconfig.json`, from `importAlias` of `ddd-ts-kit.config.json`: never add a second entry or mapping, and never compile without `npm run build`, which rewrites the aliases of `dist/` into relative paths for Node (`imports/alias-declared`).
|
|
33
|
+
Imports: a file of the project is imported by its alias from the project root, never by a relative path, the same directory included: `{{alias.source}}/...` for `{{config.sourceRoot}}/`, `{{alias.test}}/...` for `test/`, `{{alias.scripts}}/...` for `scripts/`, {{#if alias.extensionless}}never ending in `.js` or `.ts`, and naming a file, never a directory{{/if}}{{#unless alias.extensionless}}always ending in `.js`{{/unless}} (`imports/alias-only`, `imports/extension`; `npm run lint:fix` rewrites a relative import and a wrong ending). The alias is declared once, under `paths` in `tsconfig.json`, from `importAlias` of `ddd-ts-kit.config.json`, and the ending follows `importExtension`: never add a second entry or mapping, never change `module` or `moduleResolution` in `tsconfig.json`, and never compile without `npm run build`, which rewrites the aliases of `dist/` into relative paths ending in `.js` for Node (`imports/alias-declared`).
|
|
31
34
|
Everywhere: one exported class, interface or function per file, named after it in kebab-case; at most 350 lines a file, 30 lines and 3 parameters a function; `private` members, never `#name`; a blank line before a `return` and around `if`, `for`, `try` (`npm run lint:fix`); braces around the body of every `if`, `else`, `for`, `while` and `do`, on its own lines: a branch is visible at a glance, and a statement added to it later cannot silently fall outside it. `npm run format` (Biome, line width 120) lays out every file: do not spend tokens on line breaks.
|
|
32
35
|
|
|
33
36
|
## TypeScript
|
|
@@ -7,6 +7,7 @@ The rules are in `CLAUDE.md` and `.claude/rules/`; `npx ddd-ts-kit explain <rule
|
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
npm install
|
|
10
|
+
npm run verify # every gate of the pipeline: green before the first line of business code
|
|
10
11
|
cp .env.example .env
|
|
11
12
|
{{#if database.server}}
|
|
12
13
|
npm run infra:up # the database, in Docker; add --profile observability for Jaeger
|
|
@@ -57,9 +58,10 @@ configuration, the storage, and `composeApplication` of `{{config.platformDir}}/
|
|
|
57
58
|
|
|
58
59
|
- **A port is an abstract class, and the class is what is injected.** A repository port lives in
|
|
59
60
|
`domain/repositories/`, any other port in `application/ports/`, one per file; an adapter
|
|
60
|
-
`implements` its port. There is no token constant and no token file anywhere: a
|
|
61
|
-
|
|
62
|
-
`IdGenerator`, `CommandBus`, `UnitOfWork`... of
|
|
61
|
+
`implements` its port. There is no token constant and no token file anywhere: a constructor
|
|
62
|
+
parameter typed by a port class names what is injected (`private readonly clock: Clock`), the
|
|
63
|
+
ports of the kernel included (`Clock`, `IdGenerator`, `CommandBus`, `UnitOfWork`... of
|
|
64
|
+
`@ddd-ts-kit/kernel`).
|
|
63
65
|
{{#if di.tsyringe}}
|
|
64
66
|
- **Three modules, then the contexts.** `kernelModule({...})` binds the ports of the kernel to what
|
|
65
67
|
this platform chose (one execution scope, one clock, the two buses with their middlewares);
|
|
@@ -213,15 +215,19 @@ to it because ESLint and dependency-cruiser read sources through the compiler AP
|
|
|
213
215
|
native version does not ship: do not use `npx tsc`, it would run version 6.
|
|
214
216
|
|
|
215
217
|
Every file of the project is imported by an alias from the project root, never by a relative
|
|
216
|
-
path: `{{alias.platform}}/config/load-config.
|
|
217
|
-
`{{alias.test}}/...` for `test/`, `{{alias.scripts}}/...` for `scripts/`.
|
|
218
|
+
path: `{{alias.platform}}/config/load-config{{alias.ext}}` for `{{config.platformDir}}/config/load-config.ts`,
|
|
219
|
+
`{{alias.test}}/...` for `test/`, `{{alias.scripts}}/...` for `scripts/`.{{#if alias.extensionless}} An import names its
|
|
220
|
+
file without an extension (`"importExtension": "none"` in `ddd-ts-kit.config.json`), and never a
|
|
221
|
+
directory: `.../published-language/index`.{{/if}}{{#unless alias.extensionless}} An import ends with the `.js` of the file the
|
|
222
|
+
compiler emits (`"importExtension": "js"` in `ddd-ts-kit.config.json`).{{/unless}} The alias is declared
|
|
218
223
|
once, under `paths` in `tsconfig.json`, which the compiler, `npm run dev`, the tests, knip and
|
|
219
|
-
the import graph read. Node reads no alias: `npm run build` compiles,
|
|
220
|
-
`ddd-ts-kit build-aliases` rewrites each alias of `dist/` into a relative path
|
|
221
|
-
is plain `node`. `npm run lint:fix` turns a relative import into its alias
|
|
222
|
-
`npm run check:arch` reports a
|
|
224
|
+
the import graph read. Node reads no alias and needs the extension: `npm run build` compiles,
|
|
225
|
+
then `ddd-ts-kit build-aliases` rewrites each alias of `dist/` into a relative path ending in
|
|
226
|
+
`.js`, so `npm start` is plain `node`. `npm run lint:fix` turns a relative import into its alias
|
|
227
|
+
and gives an import the ending the config asks for, and `npm run check:arch` reports a
|
|
228
|
+
declaration that no longer follows `importAlias` and `importExtension` of
|
|
223
229
|
`ddd-ts-kit.config.json`, or a build that skips the rewrite (`imports/alias-only`,
|
|
224
|
-
`imports/alias-declared`).
|
|
230
|
+
`imports/extension`, `imports/alias-declared`).
|
|
225
231
|
|
|
226
232
|
| Gate | Script | Tool |
|
|
227
233
|
|---|---|---|
|
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
FROM node:24-slim AS build
|
|
4
4
|
WORKDIR /app
|
|
5
|
-
|
|
5
|
+
{{#if pm.corepack}}
|
|
6
|
+
# corepack provides the release of the package manager that package.json pins.
|
|
7
|
+
RUN corepack enable
|
|
8
|
+
{{/if}}
|
|
9
|
+
COPY package.json package-lock.json{{#if pm.pnpm}} pnpm-workspace.yaml{{/if}} ./
|
|
6
10
|
RUN npm ci
|
|
7
11
|
COPY . .
|
|
8
12
|
RUN npm run build
|
|
9
13
|
|
|
10
14
|
FROM node:24-slim AS dependencies
|
|
11
15
|
WORKDIR /app
|
|
12
|
-
|
|
16
|
+
{{#if pm.corepack}}
|
|
17
|
+
RUN corepack enable
|
|
18
|
+
{{/if}}
|
|
19
|
+
COPY package.json package-lock.json{{#if pm.pnpm}} pnpm-workspace.yaml{{/if}} ./
|
|
13
20
|
RUN npm ci --omit=dev
|
|
14
21
|
|
|
15
22
|
FROM node:24-slim
|
|
@@ -2,7 +2,7 @@ import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
|
2
2
|
import { JwtAuthenticator } from '@ddd-ts-kit/auth/jwt';
|
|
3
3
|
import type { HttpHeaders } from '@ddd-ts-kit/testing/e2e';
|
|
4
4
|
import { SignJWT, generateKeyPair, type CryptoKey } from 'jose';
|
|
5
|
-
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment.
|
|
5
|
+
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment{{alias.ext}}';
|
|
6
6
|
|
|
7
7
|
const issuer = authEnvironment.AUTH_ISSUER;
|
|
8
8
|
const audience = authEnvironment.AUTH_AUDIENCE;
|
|
@@ -4,7 +4,7 @@ import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
|
4
4
|
import { keycloakAuthenticator } from '@ddd-ts-kit/auth/jwt';
|
|
5
5
|
import type { HttpHeaders } from '@ddd-ts-kit/testing/e2e';
|
|
6
6
|
import { SignJWT, exportJWK, generateKeyPair, type CryptoKey, type JWK } from 'jose';
|
|
7
|
-
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment.
|
|
7
|
+
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment{{alias.ext}}';
|
|
8
8
|
|
|
9
9
|
const realm = authEnvironment.KEYCLOAK_REALM;
|
|
10
10
|
const audience = authEnvironment.KEYCLOAK_AUDIENCE;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import type { HttpHeaders } from '@ddd-ts-kit/testing/e2e';
|
|
3
|
-
import { developmentActorHeader } from '{{alias.platform}}/auth/development-actor-header.
|
|
4
|
-
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator.
|
|
3
|
+
import { developmentActorHeader } from '{{alias.platform}}/auth/development-actor-header{{alias.ext}}';
|
|
4
|
+
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
/** Who a test calls as: the identity, the roles and the tenant the development header carries. */
|
|
7
7
|
export interface TestActor {
|
|
@@ -4,39 +4,39 @@ import type { RelationTuple } from '@ddd-ts-kit/auth/rebac';
|
|
|
4
4
|
import type { IntegrationEventSubscriber } from '@ddd-ts-kit/kernel';
|
|
5
5
|
import { createHttpClient, type HttpClient } from '@ddd-ts-kit/testing/e2e';
|
|
6
6
|
{{#if authz.rebac}}
|
|
7
|
-
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples.
|
|
7
|
+
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples{{alias.ext}}';
|
|
8
8
|
{{/if}}
|
|
9
|
-
import { composeApplication } from '{{alias.platform}}/compose-application.
|
|
10
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
11
|
-
import { loadConfig } from '{{alias.platform}}/config/load-config.
|
|
12
|
-
import { openTestDatabase, type TestDatabase } from '{{alias.platform}}/database/open-test-database.
|
|
9
|
+
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
10
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
11
|
+
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
12
|
+
import { openTestDatabase, type TestDatabase } from '{{alias.platform}}/database/open-test-database{{alias.ext}}';
|
|
13
13
|
{{#if broker.provided}}
|
|
14
|
-
import { createEventProvider } from '{{alias.platform}}/events/create-event-provider.
|
|
15
|
-
import type { EventProvider } from '{{alias.platform}}/events/event-provider.
|
|
14
|
+
import { createEventProvider } from '{{alias.platform}}/events/create-event-provider{{alias.ext}}';
|
|
15
|
+
import type { EventProvider } from '{{alias.platform}}/events/event-provider{{alias.ext}}';
|
|
16
16
|
{{/if}}
|
|
17
|
-
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events.
|
|
17
|
+
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
18
18
|
{{#if events.outbox}}
|
|
19
|
-
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay.
|
|
19
|
+
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay{{alias.ext}}';
|
|
20
20
|
{{/if}}
|
|
21
|
-
import { startHttpServer } from '{{alias.platform}}/http/start-http-server.
|
|
21
|
+
import { startHttpServer } from '{{alias.platform}}/http/start-http-server{{alias.ext}}';
|
|
22
22
|
{{#if cache.redis}}
|
|
23
|
-
import { openRedis } from '{{alias.platform}}/redis/open-redis.
|
|
23
|
+
import { openRedis } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
24
24
|
{{/if}}
|
|
25
|
-
import { createCredentials, type Credentials, type TestActor } from '{{alias.test}}/e2e/support/create-credentials.
|
|
25
|
+
import { createCredentials, type Credentials, type TestActor } from '{{alias.test}}/e2e/support/create-credentials{{alias.ext}}';
|
|
26
26
|
{{#if broker.addressed}}
|
|
27
27
|
{{#if redis.server}}
|
|
28
|
-
import { noBroker, noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
28
|
+
import { noBroker, noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
29
29
|
{{/if}}
|
|
30
30
|
{{#unless redis.server}}
|
|
31
|
-
import { noBroker, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
31
|
+
import { noBroker, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
32
32
|
{{/unless}}
|
|
33
33
|
{{/if}}
|
|
34
34
|
{{#unless broker.addressed}}
|
|
35
35
|
{{#if redis.server}}
|
|
36
|
-
import { noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
36
|
+
import { noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
37
37
|
{{/if}}
|
|
38
38
|
{{#unless redis.server}}
|
|
39
|
-
import { testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
39
|
+
import { testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
40
40
|
{{/unless}}
|
|
41
41
|
{{/unless}}
|
|
42
42
|
|
|
@@ -4,41 +4,41 @@ import type { RelationTuple } from '@ddd-ts-kit/auth/rebac';
|
|
|
4
4
|
import type { IntegrationEventSubscriber } from '@ddd-ts-kit/kernel';
|
|
5
5
|
import { createHttpClient, type HttpClient } from '@ddd-ts-kit/testing/e2e';
|
|
6
6
|
{{#if authz.rebac}}
|
|
7
|
-
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples.
|
|
7
|
+
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples{{alias.ext}}';
|
|
8
8
|
{{/if}}
|
|
9
|
-
import { composeApplication } from '{{alias.platform}}/compose-application.
|
|
9
|
+
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
10
10
|
{{#if broker.provided}}
|
|
11
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
11
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
12
12
|
{{/if}}
|
|
13
|
-
import { loadConfig } from '{{alias.platform}}/config/load-config.
|
|
14
|
-
import { openPersistence } from '{{alias.platform}}/database/open-persistence.
|
|
13
|
+
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
14
|
+
import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
|
|
15
15
|
{{#if broker.provided}}
|
|
16
|
-
import { createEventProvider } from '{{alias.platform}}/events/create-event-provider.
|
|
17
|
-
import type { EventProvider } from '{{alias.platform}}/events/event-provider.
|
|
16
|
+
import { createEventProvider } from '{{alias.platform}}/events/create-event-provider{{alias.ext}}';
|
|
17
|
+
import type { EventProvider } from '{{alias.platform}}/events/event-provider{{alias.ext}}';
|
|
18
18
|
{{/if}}
|
|
19
|
-
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events.
|
|
19
|
+
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
20
20
|
{{#if events.outbox}}
|
|
21
|
-
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay.
|
|
21
|
+
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay{{alias.ext}}';
|
|
22
22
|
{{/if}}
|
|
23
|
-
import { startHttpServer } from '{{alias.platform}}/http/start-http-server.
|
|
23
|
+
import { startHttpServer } from '{{alias.platform}}/http/start-http-server{{alias.ext}}';
|
|
24
24
|
{{#if cache.redis}}
|
|
25
|
-
import { openRedis } from '{{alias.platform}}/redis/open-redis.
|
|
25
|
+
import { openRedis } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
26
26
|
{{/if}}
|
|
27
|
-
import { createCredentials, type Credentials, type TestActor } from '{{alias.test}}/e2e/support/create-credentials.
|
|
27
|
+
import { createCredentials, type Credentials, type TestActor } from '{{alias.test}}/e2e/support/create-credentials{{alias.ext}}';
|
|
28
28
|
{{#if broker.addressed}}
|
|
29
29
|
{{#if redis.server}}
|
|
30
|
-
import { noBroker, noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
30
|
+
import { noBroker, noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
31
31
|
{{/if}}
|
|
32
32
|
{{#unless redis.server}}
|
|
33
|
-
import { noBroker, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
33
|
+
import { noBroker, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
34
34
|
{{/unless}}
|
|
35
35
|
{{/if}}
|
|
36
36
|
{{#unless broker.addressed}}
|
|
37
37
|
{{#if redis.server}}
|
|
38
|
-
import { noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
38
|
+
import { noRedis, testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
39
39
|
{{/if}}
|
|
40
40
|
{{#unless redis.server}}
|
|
41
|
-
import { testEnvironment } from '{{alias.test}}/e2e/support/test-environment.
|
|
41
|
+
import { testEnvironment } from '{{alias.test}}/e2e/support/test-environment{{alias.ext}}';
|
|
42
42
|
{{/unless}}
|
|
43
43
|
{{/unless}}
|
|
44
44
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment.
|
|
1
|
+
import { authEnvironment } from '{{alias.test}}/e2e/support/auth-environment{{alias.ext}}';
|
|
2
2
|
{{#if broker.addressed}}
|
|
3
3
|
|
|
4
4
|
/** Without {{broker.variable}} (`npm run infra:up` gives one) the events stay in the process: the same ports, no broker. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { governedJestCoverage } from '@ddd-ts-kit/testing/coverage';
|
|
1
|
+
import { governedJestCoverage, unaffectedContexts } from '@ddd-ts-kit/testing/coverage';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
testEnvironment: 'node',
|
|
@@ -7,6 +7,8 @@ export default {
|
|
|
7
7
|
{{alias.jestMapper}}
|
|
8
8
|
},
|
|
9
9
|
testMatch: ['<rootDir>/{{config.sourceRoot}}/**/*.spec.ts', '<rootDir>/test/architecture/**/*.spec.ts'],
|
|
10
|
+
// 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.
|
|
11
|
+
testPathIgnorePatterns: ['/node_modules/', ...unaffectedContexts().map((directory) => `/${directory}`)],
|
|
10
12
|
extensionsToTreatAsEsm: ['.ts'],
|
|
11
13
|
transform: {
|
|
12
14
|
'^.+\\.ts$': [
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// Imported first on purpose: instrumentation has to be installed before any module it patches is loaded.
|
|
2
|
-
import { tracing } from '{{alias.platform}}/tracing.
|
|
2
|
+
import { tracing } from '{{alias.platform}}/tracing{{alias.ext}}';
|
|
3
3
|
{{#if errors.sentry}}
|
|
4
4
|
// Imported second on purpose: a failure while the rest of the application loads is already reported.
|
|
5
|
-
import { errors } from '{{alias.platform}}/errors.
|
|
5
|
+
import { errors } from '{{alias.platform}}/errors{{alias.ext}}';
|
|
6
6
|
{{/if}}
|
|
7
7
|
{{#if http.any}}
|
|
8
|
-
import { createAuthenticator } from '{{alias.platform}}/auth/create-authenticator.
|
|
8
|
+
import { createAuthenticator } from '{{alias.platform}}/auth/create-authenticator{{alias.ext}}';
|
|
9
9
|
{{/if}}
|
|
10
|
-
import { composeApplication } from '{{alias.platform}}/compose-application.
|
|
11
|
-
import { loadConfig } from '{{alias.platform}}/config/load-config.
|
|
12
|
-
import { openPersistence } from '{{alias.platform}}/database/open-persistence.
|
|
13
|
-
import { {{events.providerName}} } from '{{alias.platform}}/events/{{events.providerFile}}.
|
|
10
|
+
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
11
|
+
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
12
|
+
import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
|
|
13
|
+
import { {{events.providerName}} } from '{{alias.platform}}/events/{{events.providerFile}}{{alias.ext}}';
|
|
14
14
|
{{#if events.outbox}}
|
|
15
|
-
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay.
|
|
15
|
+
import { startOutboxRelay } from '{{alias.platform}}/events/start-outbox-relay{{alias.ext}}';
|
|
16
16
|
{{/if}}
|
|
17
17
|
{{#if http.any}}
|
|
18
|
-
import { startHttpServer } from '{{alias.platform}}/http/start-http-server.
|
|
18
|
+
import { startHttpServer } from '{{alias.platform}}/http/start-http-server{{alias.ext}}';
|
|
19
19
|
{{/if}}
|
|
20
|
-
import { jobSettings } from '{{alias.platform}}/job-settings.
|
|
20
|
+
import { jobSettings } from '{{alias.platform}}/job-settings{{alias.ext}}';
|
|
21
21
|
{{#if cache.redis}}
|
|
22
|
-
import { openRedis } from '{{alias.platform}}/redis/open-redis.
|
|
22
|
+
import { openRedis } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
23
23
|
{{/if}}
|
|
24
24
|
|
|
25
25
|
const config = loadConfig(process.env);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { requires, type UseCaseDeclaration } from '@ddd-ts-kit/auth';
|
|
2
2
|
import type { Route } from '@ddd-ts-kit/http';
|
|
3
|
-
import type { Platform } from '{{alias.platform}}/platform.
|
|
4
|
-
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions.
|
|
5
|
-
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler.
|
|
6
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query.
|
|
7
|
-
import { searchAuditEntriesRoute } from '{{alias.platform}}/audit/search-audit-entries.route.
|
|
3
|
+
import type { Platform } from '{{alias.platform}}/platform{{alias.ext}}';
|
|
4
|
+
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{alias.ext}}';
|
|
5
|
+
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler{{alias.ext}}';
|
|
6
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
7
|
+
import { searchAuditEntriesRoute } from '{{alias.platform}}/audit/search-audit-entries.route{{alias.ext}}';
|
|
8
8
|
|
|
9
9
|
interface AuditWiring {
|
|
10
10
|
readonly name: string;
|
|
@@ -3,12 +3,12 @@ import { defineContextModule, type ContextModule } from '@ddd-ts-kit/di';
|
|
|
3
3
|
import { subscribeAll } from '@ddd-ts-kit/events';
|
|
4
4
|
import { EventSubscribers } from '@ddd-ts-kit/kernel';
|
|
5
5
|
{{#if audit.route}}
|
|
6
|
-
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions.
|
|
6
|
+
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{alias.ext}}';
|
|
7
7
|
{{/if}}
|
|
8
|
-
import type { Audit } from '{{alias.platform}}/audit/create-audit.
|
|
8
|
+
import type { Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
|
|
9
9
|
{{#if audit.route}}
|
|
10
|
-
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler.
|
|
11
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query.
|
|
10
|
+
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler{{alias.ext}}';
|
|
11
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
12
12
|
{{/if}}
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -28,16 +28,16 @@ import { DrizzleAuditTrail } from '@ddd-ts-kit/audit/drizzle';
|
|
|
28
28
|
import type { OnDecision } from '@ddd-ts-kit/auth';
|
|
29
29
|
import type { EventSubscription } from '@ddd-ts-kit/events';
|
|
30
30
|
import type { BusMiddleware } from '@ddd-ts-kit/kernel';
|
|
31
|
-
import type { Persistence } from '{{alias.platform}}/database/persistence.
|
|
31
|
+
import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
|
|
32
32
|
{{#if audit.sql}}
|
|
33
|
-
import { AUDIT_SCHEMA } from '{{alias.platform}}/database/schema.
|
|
33
|
+
import { AUDIT_SCHEMA } from '{{alias.platform}}/database/schema{{alias.ext}}';
|
|
34
34
|
{{/if}}
|
|
35
35
|
{{#if audit.route}}
|
|
36
|
-
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions.
|
|
36
|
+
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{alias.ext}}';
|
|
37
37
|
{{/if}}
|
|
38
|
-
import { auditedEvents } from '{{alias.platform}}/audit/audited-events.
|
|
38
|
+
import { auditedEvents } from '{{alias.platform}}/audit/audited-events{{alias.ext}}';
|
|
39
39
|
{{#if audit.route}}
|
|
40
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query.
|
|
40
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
41
41
|
{{/if}}
|
|
42
42
|
|
|
43
43
|
/** The name the audit trail consumes integration events under: its idempotency scope, and its queues behind a broker. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AuditEntry, AuditReader } from '@ddd-ts-kit/audit';
|
|
2
2
|
import type { Page, QueryHandler } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import type { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query.
|
|
3
|
+
import type { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
export class SearchAuditEntriesHandler implements QueryHandler<SearchAuditEntriesQuery> {
|
|
6
6
|
constructor(private readonly reader: AuditReader) {}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@ddd-ts-kit/http';
|
|
11
11
|
import { err, ok, type QueryBus } from '@ddd-ts-kit/kernel';
|
|
12
12
|
import { customSchema, type JsonSchema } from '@ddd-ts-kit/validation';
|
|
13
|
-
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries.query.
|
|
13
|
+
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
14
14
|
|
|
15
15
|
/** Newest first unless asked otherwise, by cursor: the trail only grows, an offset would shift under the reader. */
|
|
16
16
|
const pageLimits = { sortable: ['occurredAt', 'sequence'], maxSize: 100, kind: 'cursor' } as const;
|
|
@@ -6,8 +6,8 @@ import type { OnDecision } from '@ddd-ts-kit/auth';
|
|
|
6
6
|
{{/unless}}
|
|
7
7
|
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
8
8
|
import type { ContextModule } from '@ddd-ts-kit/di';
|
|
9
|
-
import { accessPolicies } from '{{alias.platform}}/auth/access-policies.
|
|
10
|
-
import { createAuthorizer } from '{{alias.platform}}/auth/create-authorizer.
|
|
9
|
+
import { accessPolicies } from '{{alias.platform}}/auth/access-policies{{alias.ext}}';
|
|
10
|
+
import { createAuthorizer } from '{{alias.platform}}/auth/create-authorizer{{alias.ext}}';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Binds `Authorizer`, the guard both buses ask before any handler, the `Access` of the policies{{#if http.any}} and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import { JwtAuthenticator } from '@ddd-ts-kit/auth/jwt';
|
|
3
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
3
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
/** Verifies the bearer token against the keys the issuer publishes. The session keeps nothing of the token. */
|
|
6
6
|
export function createAuthenticator(config: AppConfig): Authenticator {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import { keycloakAuthenticator } from '@ddd-ts-kit/auth/jwt';
|
|
3
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
3
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Verifies the access tokens of the Keycloak realm against the keys it publishes. The actor takes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
3
|
-
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator.
|
|
2
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
3
|
+
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(platform): replace the development authenticator by a real adapter of Authenticator (a JWT verifier, your identity provider) before the first deployment.
|
|
6
6
|
export function createAuthenticator(config: AppConfig): Authenticator {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PolicyBasedAuthorizer, type Authorizer } from '@ddd-ts-kit/auth';
|
|
2
2
|
import { SystemClock } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { attributePolicies } from '{{alias.platform}}/auth/attribute-policies.
|
|
3
|
+
import { attributePolicies } from '{{alias.platform}}/auth/attribute-policies{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
/** Attribute policies: do the attributes of the actor, the resource and the moment satisfy a rule? */
|
|
6
6
|
export function createAuthorizer(): Authorizer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Authorizer } from '@ddd-ts-kit/auth';
|
|
2
|
-
import { CustomAuthorizer } from '{{alias.platform}}/auth/custom-authorizer.
|
|
3
|
-
import { permissions } from '{{alias.platform}}/auth/permissions.
|
|
2
|
+
import { CustomAuthorizer } from '{{alias.platform}}/auth/custom-authorizer{{alias.ext}}';
|
|
3
|
+
import { permissions } from '{{alias.platform}}/auth/permissions{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(platform): give the adapter what your model needs (a client of the service that decides, its mapping) instead of this table granting everything to the role "admin".
|
|
6
6
|
export function createAuthorizer(): Authorizer {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RoleBasedAuthorizer, type Authorizer } from '@ddd-ts-kit/auth';
|
|
2
|
-
import { roles } from '{{alias.platform}}/auth/roles.
|
|
2
|
+
import { roles } from '{{alias.platform}}/auth/roles{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
/** Roles: does one of the actor's roles grant this action? Another model is another adapter of the same port. */
|
|
5
5
|
export function createAuthorizer(): Authorizer {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Authorizer } from '@ddd-ts-kit/auth';
|
|
2
2
|
import { RelationBasedAuthorizer } from '@ddd-ts-kit/auth/rebac';
|
|
3
|
-
import { permissionMapping } from '{{alias.platform}}/auth/permission-mapping.
|
|
4
|
-
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples.
|
|
5
|
-
import { relationshipSchema } from '{{alias.platform}}/auth/relationship-schema.
|
|
3
|
+
import { permissionMapping } from '{{alias.platform}}/auth/permission-mapping{{alias.ext}}';
|
|
4
|
+
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples{{alias.ext}}';
|
|
5
|
+
import { relationshipSchema } from '{{alias.platform}}/auth/relationship-schema{{alias.ext}}';
|
|
6
6
|
|
|
7
7
|
/** Relationships: is there a path of stored tuples from this element to the actor? */
|
|
8
8
|
export function createAuthorizer(): Authorizer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { relationTupleStoreContract } from '@ddd-ts-kit/auth/testing';
|
|
3
|
-
import { createTupleStore } from '{{alias.platform}}/auth/create-tuple-store.
|
|
3
|
+
import { createTupleStore } from '{{alias.platform}}/auth/create-tuple-store{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
relationTupleStoreContract(
|
|
6
6
|
{ describe, it, expect, beforeEach },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { definePermissions } from '@ddd-ts-kit/auth';
|
|
3
3
|
import { anActor, authorizerContract } from '@ddd-ts-kit/auth/testing';
|
|
4
|
-
import { CustomAuthorizer } from '{{alias.platform}}/auth/custom-authorizer.
|
|
4
|
+
import { CustomAuthorizer } from '{{alias.platform}}/auth/custom-authorizer{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
const permissions = definePermissions('contract', {
|
|
7
7
|
'element.read': { description: 'Read an element' },
|
|
@@ -8,7 +8,7 @@ import { reportHttpErrors, type ErrorContext, type ErrorMapper, type RouteAround
|
|
|
8
8
|
import type { Clock, ErrorReporter, ExecutionScope, Logger, Session } from '@ddd-ts-kit/kernel';
|
|
9
9
|
{{/if}}
|
|
10
10
|
import { tracedRoutes } from '@ddd-ts-kit/tracing';
|
|
11
|
-
import { principalOf } from '{{alias.platform}}/auth/principal-of.
|
|
11
|
+
import { principalOf } from '{{alias.platform}}/auth/principal-of{{alias.ext}}';
|
|
12
12
|
|
|
13
13
|
/** What the HTTP adapter needs at the edge of the application: spread into its mount options, for every route. */
|
|
14
14
|
export interface HttpBoundary {
|