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,7 +1,7 @@
|
|
|
1
1
|
import { Module, type DynamicModule } from '@nestjs/common';
|
|
2
2
|
import type { Route } from '@ddd-ts-kit/http';
|
|
3
3
|
import { createRoutesModule } from '@ddd-ts-kit/http/nest';
|
|
4
|
-
import type { HttpBoundary } from '{{alias.platform}}/auth/http-boundary.
|
|
4
|
+
import type { HttpBoundary } from '{{alias.platform}}/auth/http-boundary{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
@Module({})
|
|
7
7
|
class AppModule {}
|
|
@@ -2,13 +2,13 @@ import type { Server } from 'node:http';
|
|
|
2
2
|
import type { AddressInfo } from 'node:net';
|
|
3
3
|
import express from 'express';
|
|
4
4
|
import { mountExpress } from '@ddd-ts-kit/http/express';
|
|
5
|
-
import type { Application } from '{{alias.platform}}/compose-application.
|
|
6
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
5
|
+
import type { Application } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
6
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
7
7
|
{{#if cache.rateLimit}}
|
|
8
|
-
import { refusalFor } from '{{alias.platform}}/http/refusal-for.
|
|
8
|
+
import { refusalFor } from '{{alias.platform}}/http/refusal-for{{alias.ext}}';
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{#if docs.any}}
|
|
11
|
-
import { withDocumentation } from '{{alias.platform}}/http/with-documentation.
|
|
11
|
+
import { withDocumentation } from '{{alias.platform}}/http/with-documentation{{alias.ext}}';
|
|
12
12
|
{{/if}}
|
|
13
13
|
|
|
14
14
|
export interface HttpServer {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Fastify{{#if cache.rateLimit}}, { type FastifyInstance }{{/if}} from 'fastify';
|
|
2
2
|
import { mountFastify } from '@ddd-ts-kit/http/fastify';
|
|
3
|
-
import type { Application } from '{{alias.platform}}/compose-application.
|
|
4
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
3
|
+
import type { Application } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
4
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
5
5
|
{{#if cache.rateLimit}}
|
|
6
|
-
import { refusalFor } from '{{alias.platform}}/http/refusal-for.
|
|
6
|
+
import { refusalFor } from '{{alias.platform}}/http/refusal-for{{alias.ext}}';
|
|
7
7
|
{{/if}}
|
|
8
8
|
{{#if docs.any}}
|
|
9
|
-
import { withDocumentation } from '{{alias.platform}}/http/with-documentation.
|
|
9
|
+
import { withDocumentation } from '{{alias.platform}}/http/with-documentation{{alias.ext}}';
|
|
10
10
|
{{/if}}
|
|
11
11
|
|
|
12
12
|
export interface HttpServer {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { Server } from 'node:http';
|
|
3
3
|
import { NestFactory } from '@nestjs/core';
|
|
4
|
-
import type { Application } from '{{alias.platform}}/compose-application.
|
|
5
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
6
|
-
import { createAppModule } from '{{alias.platform}}/http/create-app-module.
|
|
4
|
+
import type { Application } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
5
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
6
|
+
import { createAppModule } from '{{alias.platform}}/http/create-app-module{{alias.ext}}';
|
|
7
7
|
{{#if cache.rateLimit}}
|
|
8
|
-
import { refusalFor } from '{{alias.platform}}/http/refusal-for.
|
|
8
|
+
import { refusalFor } from '{{alias.platform}}/http/refusal-for{{alias.ext}}';
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{#if docs.any}}
|
|
11
|
-
import { withDocumentation } from '{{alias.platform}}/http/with-documentation.
|
|
11
|
+
import { withDocumentation } from '{{alias.platform}}/http/with-documentation{{alias.ext}}';
|
|
12
12
|
{{/if}}
|
|
13
13
|
|
|
14
14
|
export interface HttpServer {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Route } from '@ddd-ts-kit/http';
|
|
2
2
|
import { openApiDocsRoutes } from '@ddd-ts-kit/http/docs';
|
|
3
3
|
import { generateOpenApi } from '@ddd-ts-kit/http/openapi';
|
|
4
|
-
import { securitySchemes } from '{{alias.platform}}/auth/security-schemes.
|
|
5
|
-
import type { AppConfig } from '{{alias.platform}}/config/app-config.
|
|
4
|
+
import { securitySchemes } from '{{alias.platform}}/auth/security-schemes{{alias.ext}}';
|
|
5
|
+
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
6
6
|
|
|
7
7
|
/** Adds the contract and its interactive page next to the routes, unless documentation is switched off (API_DOCS, off in production by default). */
|
|
8
8
|
export function withDocumentation(routes: readonly Route[], config: AppConfig): readonly Route[] {
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
} from '@ddd-ts-kit/kernel';
|
|
14
14
|
import { traceApplication, type ConsumerTrace, type TracedApplication } from '@ddd-ts-kit/tracing';
|
|
15
15
|
{{#if audit.on}}
|
|
16
|
-
import { createAudit, type Audit } from '{{alias.platform}}/audit/create-audit.
|
|
16
|
+
import { createAudit, type Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
|
|
17
17
|
{{/if}}
|
|
18
18
|
{{#unless audit.on}}
|
|
19
|
-
import { logDecisions } from '{{alias.platform}}/auth/log-decisions.
|
|
19
|
+
import { logDecisions } from '{{alias.platform}}/auth/log-decisions{{alias.ext}}';
|
|
20
20
|
{{/unless}}
|
|
21
|
-
import type { Persistence } from '{{alias.platform}}/database/persistence.
|
|
22
|
-
import { createLogger, type LogSettings } from '{{alias.platform}}/observability/create-logger.
|
|
23
|
-
import { createMetrics } from '{{alias.platform}}/observability/create-metrics.
|
|
21
|
+
import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
|
|
22
|
+
import { createLogger, type LogSettings } from '{{alias.platform}}/observability/create-logger{{alias.ext}}';
|
|
23
|
+
import { createMetrics } from '{{alias.platform}}/observability/create-metrics{{alias.ext}}';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* What exists before any module: built once and handed to the kernel module, so that the buses,
|
|
@@ -3,7 +3,7 @@ import { defineContextModule } from '@ddd-ts-kit/di';
|
|
|
3
3
|
import { {{persistence.token}} } from '{{persistence.tokenPackage}}';
|
|
4
4
|
{{/if}}
|
|
5
5
|
{{#if persistence.ownDatabase}}
|
|
6
|
-
import { Database } from '{{alias.platform}}/database/database.
|
|
6
|
+
import { Database } from '{{alias.platform}}/database/database{{alias.ext}}';
|
|
7
7
|
{{/if}}
|
|
8
8
|
// ddd-ts-kit:imports
|
|
9
9
|
// /ddd-ts-kit:imports
|
|
@@ -22,10 +22,10 @@ import type {
|
|
|
22
22
|
{{/if}}
|
|
23
23
|
} from '@ddd-ts-kit/kernel';
|
|
24
24
|
{{#if audit.on}}
|
|
25
|
-
import type { Audit } from '{{alias.platform}}/audit/create-audit.
|
|
25
|
+
import type { Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
|
|
26
26
|
{{/if}}
|
|
27
|
-
import type { UseCaseProtection } from '{{alias.platform}}/auth/use-case-protection.
|
|
28
|
-
import type { Persistence } from '{{alias.platform}}/database/persistence.
|
|
27
|
+
import type { UseCaseProtection } from '{{alias.platform}}/auth/use-case-protection{{alias.ext}}';
|
|
28
|
+
import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
|
|
29
29
|
|
|
30
30
|
/** Wraps an adapter from outside: a span for its kind and, for what leaves the process, the default policy unless it states its own. */
|
|
31
31
|
type Adapt = <T extends object>(instance: T, info: AspectInfo) => T;
|
|
@@ -52,18 +52,18 @@ import { {{#if broker.external}}EventSubscribers, {{/if}}ProcessedEventStore, Un
|
|
|
52
52
|
import { {{persistence.token}} } from '{{persistence.tokenPackage}}';
|
|
53
53
|
{{/if}}
|
|
54
54
|
{{#if persistence.ownDatabase}}
|
|
55
|
-
import { Database } from '{{alias.platform}}/database/database.
|
|
55
|
+
import { Database } from '{{alias.platform}}/database/database{{alias.ext}}';
|
|
56
56
|
{{/if}}
|
|
57
57
|
import type { ConsumerTrace } from '@ddd-ts-kit/tracing';
|
|
58
|
-
import type { Persistence } from '{{alias.platform}}/database/persistence.
|
|
59
|
-
import type { EventProvider } from '{{alias.platform}}/events/event-provider.
|
|
60
|
-
import type { LogSettings } from '{{alias.platform}}/observability/create-logger.
|
|
58
|
+
import type { Persistence } from '{{alias.platform}}/database/persistence{{alias.ext}}';
|
|
59
|
+
import type { EventProvider } from '{{alias.platform}}/events/event-provider{{alias.ext}}';
|
|
60
|
+
import type { LogSettings } from '{{alias.platform}}/observability/create-logger{{alias.ext}}';
|
|
61
61
|
{{#if cache.redis}}
|
|
62
|
-
import type { RedisServices } from '{{alias.platform}}/redis/open-redis.
|
|
62
|
+
import type { RedisServices } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
63
63
|
{{/if}}
|
|
64
|
-
import { adapterAspects } from '{{alias.platform}}/resilience/adapter-aspects.
|
|
65
|
-
import { defaultResilience } from '{{alias.platform}}/resilience/default-resilience.
|
|
66
|
-
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings.
|
|
64
|
+
import { adapterAspects } from '{{alias.platform}}/resilience/adapter-aspects{{alias.ext}}';
|
|
65
|
+
import { defaultResilience } from '{{alias.platform}}/resilience/default-resilience{{alias.ext}}';
|
|
66
|
+
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings{{alias.ext}}';
|
|
67
67
|
{{#if style.declared}}
|
|
68
68
|
// ddd-ts-kit:imports
|
|
69
69
|
// /ddd-ts-kit:imports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forKinds, retry, timeout, when, type Aspect } from '@ddd-ts-kit/aspects';
|
|
2
|
-
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings.
|
|
3
|
-
import { selfGoverned } from '{{alias.platform}}/resilience/self-governed.
|
|
2
|
+
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings{{alias.ext}}';
|
|
3
|
+
import { selfGoverned } from '{{alias.platform}}/resilience/self-governed{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* What goes around every adapter that leaves the process (`external`, `gateway`) and states no
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings.
|
|
1
|
+
import type { ResilienceSettings } from '{{alias.platform}}/resilience/resilience-settings{{alias.ext}}';
|
|
2
2
|
|
|
3
3
|
/** What the tools and the tests run with; `main.ts` gives the validated values of the configuration. */
|
|
4
4
|
export const defaultResilience: ResilienceSettings = { retryAttempts: 3, retryBaseDelayMs: 100, timeoutMs: 2000 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compose, type Aspect } from '@ddd-ts-kit/aspects';
|
|
2
|
-
import { selfGoverned } from '{{alias.platform}}/resilience/self-governed.
|
|
2
|
+
import { selfGoverned } from '{{alias.platform}}/resilience/self-governed{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The policy one adapter states for itself, in place of the default one:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initTracing } from '@ddd-ts-kit/tracing/node';
|
|
2
|
-
import { ConfigError } from '{{alias.platform}}/config/config-error.
|
|
3
|
-
import { readTracing } from '{{alias.platform}}/config/read-tracing.
|
|
2
|
+
import { ConfigError } from '{{alias.platform}}/config/config-error{{alias.ext}}';
|
|
3
|
+
import { readTracing } from '{{alias.platform}}/config/read-tracing{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// Evaluated before the rest of the application (see main.ts): it validates the variables of its
|
|
6
6
|
// own and reads the two names directly, so that no module an instrumentation patches is loaded
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# No dependency runs a build script at install, as under npm: one whose script the
|
|
2
|
+
# project needs (a native client, for instance) is allowed by name, once its script was read:
|
|
3
|
+
#
|
|
4
|
+
# allowBuilds:
|
|
5
|
+
# '<package>': true
|
|
6
|
+
#
|
|
7
|
+
# Without this line pnpm refuses to install as long as one script is neither allowed nor refused.
|
|
8
|
+
strictDepBuilds: false
|
|
@@ -10,14 +10,20 @@ paths:
|
|
|
10
10
|
- Events leave with the save: never `pullEvents()`, never a `DomainEventDispatcher` here (`domain-events/dispatched-on-save`). A reaction is a class of `event-handlers/` or a publisher of `integration/publishers/`. It runs at the end of the unit of work, before the commit, and depends only on what the transaction covers (`domain-events/transactional-before-commit`): repositories, the integration event publisher, the command bus. An effect outside the database is a handler of the `after-commit` phase (`generate event-handler ... --phase after-commit`: at most once, never saves, sends a command) or, when it must not be lost, the handler of an integration event.
|
|
11
11
|
{{#if style.declared}}
|
|
12
12
|
- Every command and query carries `@Requires(permission)` or `@Public()` (`authz/declared`), and the actor is in the message (`authz/actor-explicit`). Permissions live in `authorization/<context>.permissions.ts`, rules that need loaded state in `authorization/*.policy.ts`.
|
|
13
|
-
- The decorator is the registration (`declarations/role-declared`): `@CommandHandler(Message
|
|
13
|
+
- The decorator is the registration (`declarations/role-declared`): `@CommandHandler(Message)`, `@QueryHandler(Message)`, `@DomainEventHandler(Event, { name })`, `@IntegrationEventHandler(definition, { consumer })`, `@Scheduled('<context>.<job>', schedule)`, `@Projection('<context>.<name>')`, `@Policy(permission, { name })`. Names are string literals.
|
|
14
|
+
- The constructor is the one statement of what a class depends on (`declarations/constructor-injection`): each parameter is typed by one port class, with no `?`, default value, rest or destructuring, and no list repeats it in the decorator. To add a dependency, add the parameter: `npx ddd-ts-kit docs` reads the signature into the generated file of the context (`npm run dev` does it on every change), never edit that file.
|
|
14
15
|
{{/if}}
|
|
15
16
|
{{#if style.explicit}}
|
|
16
17
|
- Every command and query is registered in `<context>.module.ts` with the permission it requires, or as public (`authz/declared`), and the actor is in the message (`authz/actor-explicit`). Permissions live in `authorization/<context>.permissions.ts`, rules that need loaded state in `authorization/*.policy.ts`.
|
|
17
|
-
- A class here carries no registration of its own: `<context>.module.ts` binds it. A job is registered as `@Scheduled('<context>.<job>', schedule
|
|
18
|
+
- A class here carries no registration of its own: `<context>.module.ts` binds it and lists what its constructor receives. A job is registered as `@Scheduled('<context>.<job>', schedule)` would say: one name, one schedule, and the command bus as its only dependency.
|
|
18
19
|
{{/if}}
|
|
19
20
|
- A port is an abstract class in `ports/<name>.port.ts` and its own injection token (`ports/abstract-class`, `ports/no-token-constant`), named for the need (`PaymentGateway`), with a fake in `test/fakes/`.
|
|
21
|
+
{{#if style.declared}}
|
|
22
|
+
- A constructor parameter is typed by a port, never by an adapter or a fake (`ports/no-concrete-dependency`); a port that only types a parameter is imported with `import type`.
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#if style.explicit}}
|
|
20
25
|
- A dependency list names port classes, imported as values, in the order of the constructor: never an adapter or a fake (`ports/value-import`, `ports/no-concrete-dependency`).
|
|
26
|
+
{{/if}}
|
|
21
27
|
- A job (`scheduling/*.job.ts`) and an integration event handler (`integration/handlers/`) only build one command and send it as a system actor; both are safe to repeat (`scheduling/job-triggers-use-case`, `events/consumer-idempotent`).
|
|
22
28
|
- A query never saves, deletes or publishes (`application/command-query-separation`); it hands the access scope of the actor to its read port and never filters after loading.
|
|
23
29
|
- A read that takes criteria, a scope or a page is a search, never a list (`naming/search-not-list`): `Search<Things>Query` in `queries/search-<things>/` (`generate query ... --search`), `search...` on the port, its adapters and its fakes; one element or none stays `findById` or `findBy...`.
|
|
@@ -11,12 +11,12 @@ paths:
|
|
|
11
11
|
- Own tables, in the schema of the context: no join, foreign key or transaction across contexts (`context/extractable`).
|
|
12
12
|
- Audit columns and the tenant column are stamped from the execution scope with the kernel helpers (`stampCreation`, `stampUpdate`, `tenantScopeOf`), never handed over by a use case.
|
|
13
13
|
{{#if style.declared}}
|
|
14
|
-
- An adapter declares itself on its class, one per file (`declarations/role-declared`): `@Repository(InvoiceRepository
|
|
15
|
-
- Retry, timeout and cache go on the declaration (`aspects: [ownPolicy(retry(...), timeout(...))]`) or, when the policy is part of what the adapter is, as decorators of `@ddd-ts-kit/aspects/decorators` (`aspects/outside-in`). Kinds `external` and `gateway` get the default policy of the platform otherwise.
|
|
14
|
+
- An adapter declares itself on its class, one per file (`declarations/role-declared`): `@Repository(InvoiceRepository)`, `@Gateway(Port)` or `@Adapter(Port, { kind })`. What it is given is what its constructor takes, each parameter typed by one class (`{{persistence.tokenOrNone}}`, `ExecutionScope`, `Clock`, a port, an abstract class the platform binds to a value) and nothing listed in the decorator (`declarations/constructor-injection`); an adapter that extends a class of a package writes its own constructor.
|
|
15
|
+
- Retry, timeout and cache go on the declaration (`aspects: [ownPolicy(retry(...), timeout(...))]`) or, when the policy is part of what the adapter is, as decorators of `@ddd-ts-kit/aspects/decorators` (`aspects/outside-in`). Kinds `external` and `gateway` get the default policy of the platform otherwise. `ownPolicy` is the helper of `{{alias.platform}}/resilience/own-policy{{alias.ext}}`, which `generate adapter` writes when the platform does not have it yet.
|
|
16
16
|
{{/if}}
|
|
17
17
|
{{#if style.explicit}}
|
|
18
18
|
- An adapter is bound to its port in `<context>.module.ts` only (`composition/only-in-module`), with its kind (`repository`, `gateway`, `external`).
|
|
19
|
-
- Retry, timeout and cache go on the binding (`ownPolicy(retry(...), timeout(...))`) or, when the policy is part of what the adapter is, as decorators of `@ddd-ts-kit/aspects/decorators` (`aspects/outside-in`). Kinds `external` and `gateway` get the default policy of the platform otherwise.
|
|
19
|
+
- Retry, timeout and cache go on the binding (`ownPolicy(retry(...), timeout(...))`) or, when the policy is part of what the adapter is, as decorators of `@ddd-ts-kit/aspects/decorators` (`aspects/outside-in`). Kinds `external` and `gateway` get the default policy of the platform otherwise. `ownPolicy` is the helper of `{{alias.platform}}/resilience/own-policy{{alias.ext}}`, which `generate adapter` writes when the platform does not have it yet.
|
|
20
20
|
{{/if}}
|
|
21
21
|
- A repository only persists: no `pullEvents()`, no dispatcher (`domain-events/dispatched-on-save`). A removal that announces an event takes the aggregate, not its id.
|
|
22
22
|
- Infrastructure faults are plain errors (a 5xx, reported from outside); business refusals are `DomainError`s raised by the domain.
|
|
@@ -39,7 +39,7 @@ function reportStale(): void {
|
|
|
39
39
|
const committed = fs.existsSync(path.join(target, file)) ? fs.readFileSync(path.join(target, file), 'utf8') : '';
|
|
40
40
|
|
|
41
41
|
if (committed.replaceAll('\r\n', '\n') !== content) {
|
|
42
|
-
console.error('docs/integration/' + file + ' is out of date: run
|
|
42
|
+
console.error('docs/integration/' + file + ' is out of date: run the script `docs:generate` and commit it.');
|
|
43
43
|
process.exitCode = 1;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { checkOpenApiDrift, generateOpenApi, stringifyOpenApi } from '@ddd-ts-kit/http/openapi';
|
|
4
|
-
import { offlineAuthenticator } from '{{alias.platform}}/auth/offline-authenticator.
|
|
5
|
-
import { securitySchemes } from '{{alias.platform}}/auth/security-schemes.
|
|
6
|
-
import { composeApplication } from '{{alias.platform}}/compose-application.
|
|
7
|
-
import { inertPersistence } from '{{alias.platform}}/database/inert-persistence.
|
|
8
|
-
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events.
|
|
4
|
+
import { offlineAuthenticator } from '{{alias.platform}}/auth/offline-authenticator{{alias.ext}}';
|
|
5
|
+
import { securitySchemes } from '{{alias.platform}}/auth/security-schemes{{alias.ext}}';
|
|
6
|
+
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
7
|
+
import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
|
|
8
|
+
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
9
9
|
|
|
10
10
|
// Generates openapi/openapi.json from the route definitions; with --check, fails when the
|
|
11
11
|
// committed file differs. The file is a build product: never edit it by hand.
|
|
@@ -40,7 +40,7 @@ function reportDrift(): void {
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
console.error('openapi/openapi.json is out of date: run
|
|
43
|
+
console.error('openapi/openapi.json is out of date: run the script `docs:generate` and commit it.');
|
|
44
44
|
process.exitCode = 1;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineIntegrationEvent } from '@ddd-ts-kit/events';
|
|
2
2
|
import type { IntegrationEvent } from '@ddd-ts-kit/kernel';
|
|
3
3
|
import { classSchema } from '@ddd-ts-kit/validation/class-validator';
|
|
4
|
-
import { {{event.pascal}}V{{event.version}}Payload } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.payload.
|
|
4
|
+
import { {{event.pascal}}V{{event.version}}Payload } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.payload{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
export const {{event.camel}}V{{event.version}} = defineIntegrationEvent({
|
|
7
7
|
type: '{{event.name}}',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineIntegrationEvent } from '@ddd-ts-kit/events';
|
|
2
2
|
import { err, ok, type IntegrationEvent } from '@ddd-ts-kit/kernel';
|
|
3
3
|
import { customSchema } from '@ddd-ts-kit/validation';
|
|
4
|
-
import type { {{event.pascal}}V{{event.version}}Payload } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.payload.
|
|
4
|
+
import type { {{event.pascal}}V{{event.version}}Payload } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.payload{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
export const {{event.camel}}V{{event.version}} = defineIntegrationEvent({
|
|
7
7
|
type: '{{event.name}}',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IdGenerator, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
|
|
1
|
+
import type { IdGenerator, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
|
|
2
2
|
import { DomainEventHandler } from '@ddd-ts-kit/kernel/declarations';
|
|
3
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
4
|
-
import { {{event.camel}}V{{event.version}} } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.integration-event.
|
|
3
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
4
|
+
import { {{event.camel}}V{{event.version}} } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.integration-event{{alias.ext}}';
|
|
5
5
|
|
|
6
|
-
@DomainEventHandler({{event.pascal}}, { name: '{{event.name}}' }
|
|
6
|
+
@DomainEventHandler({{event.pascal}}, { name: '{{event.name}}' })
|
|
7
7
|
export class {{publisher.pascal}}Publisher implements DomainEventHandler<{{event.pascal}}> {
|
|
8
8
|
constructor(
|
|
9
9
|
private readonly publisher: IntegrationEventPublisher,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { InMemoryEventBus, SequentialIdGenerator } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher.
|
|
4
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
3
|
+
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher{{alias.ext}}';
|
|
4
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
describe('Publishing "{{event.words}}" to other contexts', () => {
|
|
7
7
|
it('publishes version {{event.version}} of {{event.name}}', async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IdGenerator, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
|
|
2
|
-
import type { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
3
|
-
import { {{event.camel}}V{{event.version}} } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.integration-event.
|
|
2
|
+
import type { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
3
|
+
import { {{event.camel}}V{{event.version}} } from '{{alias.context}}/published-language/{{event.kebab}}.v{{event.version}}.integration-event{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
export class {{publisher.pascal}}Publisher {
|
|
6
6
|
constructor(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher.
|
|
3
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
2
|
+
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher{{alias.ext}}';
|
|
3
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
4
4
|
@@registrations
|
|
5
5
|
const {{publisher.camel}}Publisher = platform.adapter(new {{publisher.pascal}}Publisher(platform.publisher, platform.ids), { kind: 'domain-event-handler', context: '{{context.kebab}}' });
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
import { DomainEventDispatcher, IdGenerator, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher.
|
|
4
|
-
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event.
|
|
3
|
+
import { {{publisher.pascal}}Publisher } from '{{alias.context}}/application/integration/publishers/{{publisher.kebab}}.publisher{{alias.ext}}';
|
|
4
|
+
import { {{event.pascal}} } from '{{alias.context}}/domain/events/{{event.kebab}}.event{{alias.ext}}';
|
|
5
5
|
@@registrations
|
|
6
6
|
builder.bind({{publisher.pascal}}Publisher).toClass({{publisher.pascal}}Publisher, [IntegrationEventPublisher, IdGenerator]).as('domain-event-handler');
|
|
7
7
|
@@start
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { systemActor, type CommandBus } from '@ddd-ts-kit/kernel';
|
|
2
2
|
import { IntegrationEventHandler } from '@ddd-ts-kit/kernel/declarations';
|
|
3
|
-
import { {{upstream.definition}}, type {{upstream.eventType}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
3
|
+
import { {{upstream.definition}}, type {{upstream.eventType}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
4
4
|
|
|
5
|
-
@IntegrationEventHandler({{upstream.definition}}, { consumer: '{{context.kebab}}.{{name.kebab}}' }
|
|
5
|
+
@IntegrationEventHandler({{upstream.definition}}, { consumer: '{{context.kebab}}.{{name.kebab}}' })
|
|
6
6
|
export class {{name.pascal}}IntegrationHandler {
|
|
7
7
|
static readonly eventType = '{{upstream.eventName}}';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { InMemoryCommandBus } from '@ddd-ts-kit/kernel';
|
|
3
3
|
{{#if upstream.known}}
|
|
4
|
-
import { {{upstream.definition}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
4
|
+
import { {{upstream.definition}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
5
5
|
{{/if}}
|
|
6
|
-
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler.
|
|
6
|
+
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler{{alias.ext}}';
|
|
7
7
|
|
|
8
8
|
describe('When {{upstream.kebab}} publishes {{upstream.eventName}}', () => {
|
|
9
9
|
it('listens to the type {{upstream.kebab}} publishes', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{{#if upstream.known}}
|
|
2
2
|
import { systemActor, type CommandBus } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import type { {{upstream.eventType}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
3
|
+
import type { {{upstream.eventType}} } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
4
4
|
{{/if}}
|
|
5
5
|
{{#unless upstream.known}}
|
|
6
6
|
import { systemActor, type CommandBus, type IntegrationEvent } from '@ddd-ts-kit/kernel';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
{{#if consumer.declarative}}
|
|
3
3
|
import { on, subscribeAll } from '@ddd-ts-kit/events';
|
|
4
|
-
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
4
|
+
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
5
5
|
{{/if}}
|
|
6
6
|
{{#if consumer.transactional}}
|
|
7
7
|
import { consume, subscribeAll } from '@ddd-ts-kit/events';
|
|
8
|
-
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
8
|
+
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{#if consumer.untyped}}
|
|
11
11
|
import { idempotent, inEventScope } from '@ddd-ts-kit/kernel';
|
|
12
12
|
{{/if}}
|
|
13
|
-
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler.
|
|
13
|
+
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler{{alias.ext}}';
|
|
14
14
|
@@registrations
|
|
15
15
|
const {{name.camel}}IntegrationHandler = new {{name.pascal}}IntegrationHandler(platform.commands);
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
{{#if upstream.known}}
|
|
3
3
|
import { CommandBus } from '@ddd-ts-kit/kernel';
|
|
4
|
-
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index.
|
|
4
|
+
import { {{upstream.definition}} as {{name.camel}}Definition } from '{{alias.contexts}}/{{upstream.kebab}}/published-language/index{{alias.ext}}';
|
|
5
5
|
{{/if}}
|
|
6
6
|
{{#unless upstream.known}}
|
|
7
7
|
import { CommandBus, EventSubscribers, ExecutionScope, ProcessedEventStore, idempotent, inEventScope } from '@ddd-ts-kit/kernel';
|
|
8
8
|
{{/unless}}
|
|
9
|
-
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler.
|
|
9
|
+
import { {{name.pascal}}IntegrationHandler } from '{{alias.context}}/application/integration/handlers/{{name.kebab}}.integration-handler{{alias.ext}}';
|
|
10
10
|
@@registrations
|
|
11
11
|
{{#if upstream.known}}
|
|
12
12
|
builder.on({{name.camel}}Definition, { consumer: '{{context.kebab}}.{{name.kebab}}' }).handledBy({{name.pascal}}IntegrationHandler, [CommandBus]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
{{job.kernelImport}}
|
|
2
2
|
import { Scheduled, type JobExecution, type ScheduledJob } from '@ddd-ts-kit/kernel/declarations';
|
|
3
|
-
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command.
|
|
3
|
+
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command{{alias.ext}}';
|
|
4
4
|
|
|
5
|
-
@Scheduled('{{job.name}}', {{job.schedule}}
|
|
5
|
+
@Scheduled('{{job.name}}', {{job.schedule}})
|
|
6
6
|
export class {{name.pascal}}Job implements ScheduledJob {
|
|
7
7
|
constructor(private readonly commands: CommandBus) {}
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import type { Message } from '@ddd-ts-kit/kernel';
|
|
3
3
|
import { createTestBuses } from '@ddd-ts-kit/testing';
|
|
4
|
-
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command.
|
|
5
|
-
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job.
|
|
4
|
+
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command{{alias.ext}}';
|
|
5
|
+
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job{{alias.ext}}';
|
|
6
6
|
|
|
7
7
|
const occurrence = {
|
|
8
8
|
scheduledAt: new Date('2026-01-01T07:00:00.000Z'),
|
|
@@ -4,9 +4,9 @@ import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
|
4
4
|
{{spec.diPlain}}
|
|
5
5
|
{{spec.contextImports}}
|
|
6
6
|
import type { Message } from '@ddd-ts-kit/kernel';
|
|
7
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module.
|
|
7
|
+
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
8
8
|
{{job.permissionsImport}}
|
|
9
|
-
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command.
|
|
9
|
+
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command{{alias.ext}}';
|
|
10
10
|
|
|
11
11
|
const authorization = authorizationModule({
|
|
12
12
|
authorizer: new RoleBasedAuthorizer({
|
package/templates/job/job.ts.tpl
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { {{job.systemActorValueImport}}type CommandBus, type JobExecution, type ScheduledJob } from '@ddd-ts-kit/kernel';
|
|
2
|
-
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command.
|
|
2
|
+
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
export class {{name.pascal}}Job implements ScheduledJob {
|
|
5
5
|
constructor(private readonly commands: CommandBus) {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@@imports
|
|
2
|
-
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job.
|
|
2
|
+
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job{{alias.ext}}';
|
|
3
3
|
@@registrations
|
|
4
4
|
const {{name.camel}}Job = new {{name.pascal}}Job(platform.commands);
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
import { CommandBus } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job.
|
|
3
|
+
import { {{name.pascal}}Job } from '{{alias.context}}/application/scheduling/{{name.kebab}}.job{{alias.ext}}';
|
|
4
4
|
@@registrations
|
|
5
5
|
builder.job('{{job.name}}', {{job.schedule}}).handledBy({{name.pascal}}Job, [CommandBus]);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Setup
|
|
2
|
+
description: Node, then the dependencies of the lockfile, restored from the cache when a run already installed them.
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
node-version:
|
|
6
|
+
description: The Node.js release line the pipeline runs on.
|
|
7
|
+
default: '24'
|
|
8
|
+
|
|
9
|
+
runs:
|
|
10
|
+
using: composite
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/setup-node@v7
|
|
13
|
+
with:
|
|
14
|
+
node-version: ${{ inputs.node-version }}
|
|
15
|
+
{{#if pm.corepack}}
|
|
16
|
+
- name: The package manager package.json pins
|
|
17
|
+
shell: bash
|
|
18
|
+
run: corepack enable
|
|
19
|
+
{{/if}}
|
|
20
|
+
# One install per lockfile, shared by every job and every run. The key holds the lockfile and
|
|
21
|
+
# package.json: a hit is what a fresh install of that lockfile gives, and a manifest that left
|
|
22
|
+
# its lockfile behind is installed again, which refuses it.
|
|
23
|
+
- name: Dependencies, as a run already installed them for this lockfile
|
|
24
|
+
id: modules
|
|
25
|
+
uses: actions/cache@v6
|
|
26
|
+
with:
|
|
27
|
+
path: node_modules
|
|
28
|
+
key: modules-${{ runner.os }}-${{ runner.arch }}-node${{ inputs.node-version }}-${{ hashFiles('package-lock.json', 'package.json') }}
|
|
29
|
+
- name: Install (no run installed this lockfile yet, or the cache was evicted)
|
|
30
|
+
if: steps.modules.outputs.cache-hit != 'true'
|
|
31
|
+
shell: bash
|
|
32
|
+
run: npm ci
|
|
33
|
+
{{#if orm.prisma}}
|
|
34
|
+
- name: The Prisma client and the schema of the tests, build products of prisma/schema.prisma
|
|
35
|
+
shell: bash
|
|
36
|
+
run: npm run db:client
|
|
37
|
+
{{/if}}
|