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
|
@@ -9,7 +9,7 @@ builder.include(billingDeclarations);`,
|
|
|
9
9
|
const invoiceRepository = new PgInvoiceRepository();
|
|
10
10
|
const issueInvoiceHandler = new IssueInvoiceHandler(invoiceRepository);
|
|
11
11
|
// declared style: infrastructure/persistence/pg-invoice.repository.ts and src/main.ts
|
|
12
|
-
@Repository(InvoiceRepository
|
|
12
|
+
@Repository(InvoiceRepository)
|
|
13
13
|
export class PgInvoiceRepository implements InvoiceRepository {}
|
|
14
14
|
contextModule('billing', billingDeclarations);`,
|
|
15
15
|
},
|
|
@@ -23,21 +23,46 @@ export class IssueInvoiceHandler {}
|
|
|
23
23
|
@Repository(InvoiceRepository)
|
|
24
24
|
export class Invoice {}`,
|
|
25
25
|
good: `// application/commands/issue-invoice/issue-invoice.handler.ts
|
|
26
|
-
@CommandHandler(IssueInvoiceCommand
|
|
26
|
+
@CommandHandler(IssueInvoiceCommand)
|
|
27
27
|
export class IssueInvoiceHandler {}
|
|
28
28
|
// application/event-handlers/invoice-issued.event-handler.ts
|
|
29
29
|
@DomainEventHandler(InvoiceIssued, { name: 'billing.invoice.issued' })
|
|
30
30
|
export class InvoiceIssuedEventHandler {}`,
|
|
31
31
|
},
|
|
32
32
|
'declarations/barrel-current': {
|
|
33
|
-
why: 'With stack.assembly set to barrel, the composition root assembles a context from <context>.declarations.ts and from nothing else. A role file added by hand and missing from the barrel compiles, passes its unit tests and is never registered. The
|
|
34
|
-
bad: `// billing.declarations.ts, while
|
|
35
|
-
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command
|
|
36
|
-
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.handler
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export * from '@/contexts/billing/application/
|
|
33
|
+
why: 'With stack.assembly set to barrel, the composition root assembles a context from <context>.declarations.ts and from nothing else. A role file added by hand and missing from the barrel compiles, passes its unit tests and is never registered. The same file registers what each constructor is injected, read from its signature: a constructor changed without regenerating would be given the dependencies of the old one. The file is derived from the tree, one export per role file sorted by path then one injected(Class, [Tokens]) per class that takes something, so it is compared with what the tree says, and the message names the class whose list is stale. With stack.assembly set to discovery the role files are found at startup, <context>.dependencies.ts holds the lists alone and is compared the same way, and a barrel left behind is reported.',
|
|
34
|
+
bad: `// billing.declarations.ts, while only-issuer-voids.policy.ts exists and IssueInvoiceHandler now also takes a Clock
|
|
35
|
+
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command';
|
|
36
|
+
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.handler';
|
|
37
|
+
|
|
38
|
+
injected(IssueInvoiceHandler, [InvoiceRepository]);`,
|
|
39
|
+
good: `// billing.declarations.ts, rewritten by \`ddd-ts-kit generate\`, \`ddd-ts-kit docs\` and \`npm run dev\`
|
|
40
|
+
export * from '@/contexts/billing/application/authorization/only-issuer-voids.policy';
|
|
41
|
+
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command';
|
|
42
|
+
export * from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.handler';
|
|
43
|
+
|
|
44
|
+
injected(IssueInvoiceHandler, [InvoiceRepository, Clock]);`,
|
|
45
|
+
},
|
|
46
|
+
'declarations/constructor-injection': {
|
|
47
|
+
why: 'The constructor signature is the one statement of what a declared class depends on: `ddd-ts-kit docs` reads it and writes the list the composition root injects, so nothing is repeated in the decorator and nothing can disagree with the constructor. That only works when each parameter names exactly one injection token, and a token is a class: an interface, a type alias or a primitive is erased by the compiler, a union names two things, an optional or defaulted parameter says the container might not give a value, which it always does. A constructor inherited from a class of a package cannot be read at all. The compiler is not asked for the types at run time: `emitDecoratorMetadata` exists only with legacy decorators compiled by tsc or swc, not with standard decorators nor under tsx or esbuild. Under "stack.dependencies": "signature" a list left in a decorator is a second statement: it wins at run time, so it is removed when it repeats the constructor (ESLint fixes it) and reported when it differs. A project whose config does not say lists its dependencies in its decorators, as 0.1 did, and may keep doing so.',
|
|
48
|
+
bad: `@CommandHandler(IssueInvoiceCommand)
|
|
49
|
+
export class IssueInvoiceHandler {
|
|
50
|
+
constructor(
|
|
51
|
+
private readonly invoices: InvoiceRepository | undefined,
|
|
52
|
+
private readonly settings: InvoiceSettings, // an interface
|
|
53
|
+
private readonly retries = 3,
|
|
54
|
+
) {}
|
|
55
|
+
}
|
|
56
|
+
// "stack.dependencies": "signature"
|
|
57
|
+
@CommandHandler(IssueInvoiceCommand, [InvoiceRepository, Clock])`,
|
|
58
|
+
good: `@CommandHandler(IssueInvoiceCommand)
|
|
59
|
+
export class IssueInvoiceHandler {
|
|
60
|
+
constructor(
|
|
61
|
+
private readonly invoices: InvoiceRepository,
|
|
62
|
+
private readonly settings: InvoiceSettings, // an abstract class of application/ports, bound to a value in the platform
|
|
63
|
+
private readonly clock: Clock,
|
|
64
|
+
) {}
|
|
65
|
+
}`,
|
|
41
66
|
},
|
|
42
67
|
'config/valid': {
|
|
43
68
|
why: 'Every other rule reads the config: a misspelled upstream or rule id silently disables a check. The contexts on disk and in the config have to be the same set, or part of the code is not checked at all. A function limit above the ceiling of 100 lines and an allowance without a file or a reason are read as something else than what is written, so they are reported too.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,qnBAAqnB;QAC1nB,GAAG,EAAE;;;sCAG6B;QAClC,IAAI,EAAE;;;;;;+CAMqC;KAC5C;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,0oBAA0oB;QAC/oB,GAAG,EAAE;;;;;;wBAMe;QACpB,IAAI,EAAE;;;;;0CAKgC;KACvC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,qnBAAqnB;QAC1nB,GAAG,EAAE;;;sCAG6B;QAClC,IAAI,EAAE;;;;;;+CAMqC;KAC5C;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,0oBAA0oB;QAC/oB,GAAG,EAAE;;;;;;wBAMe;QACpB,IAAI,EAAE;;;;;0CAKgC;KACvC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,60BAA60B;QACl1B,GAAG,EAAE;;;;oDAI2C;QAChD,IAAI,EAAE;;;;;2DAKiD;KACxD;IACD,oCAAoC,EAAE;QACpC,GAAG,EAAE,omCAAomC;QACzmC,GAAG,EAAE;;;;;;;;;iEASwD;QAC7D,IAAI,EAAE;;;;;;;EAOR;KACC;IACD,cAAc,EAAE;QACd,GAAG,EAAE,kXAAkX;QACvX,GAAG,EAAE;;uEAE8D;QACnE,IAAI,EAAE;;2IAEiI;KACxI;IACD,iCAAiC,EAAE;QACjC,GAAG,EAAE,qMAAqM;QAC1M,GAAG,EAAE,qDAAqD;QAC1D,IAAI,EAAE,qGAAqG;KAC5G;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-declared-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/alias-declared-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"alias-declared-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/alias-declared-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAW5C,eAAO,MAAM,uBAAuB,EAAE,SAAS,OAAO,EAmHrD,CAAC"}
|
|
@@ -6,6 +6,8 @@ const PATHS = { '@/*': ['./src/*'], '$test/*': ['./test/*'], '$scripts/*': ['./s
|
|
|
6
6
|
const COMPILE = 'node node_modules/@typescript/native/bin/tsc -p tsconfig.build.json';
|
|
7
7
|
const BUILD = `${COMPILE} && ddd-ts-kit build-aliases`;
|
|
8
8
|
const JEST_MAPPER = String.raw `moduleNameMapper: { '^\\$app/(.*)\\.js$': '<rootDir>/src/$1.ts', '^\\$test/(.*)\\.js$': '<rootDir>/test/$1.ts', '^\\$scripts/(.*)\\.js$': '<rootDir>/scripts/$1.ts' }`;
|
|
9
|
+
const BARE_JEST_MAPPER = String.raw `moduleNameMapper: { '^@/(.*)$': '<rootDir>/src/$1.ts', '^\\$test/(.*)$': '<rootDir>/test/$1.ts', '^\\$scripts/(.*)$': '<rootDir>/scripts/$1.ts' }`;
|
|
10
|
+
const BUNDLER = { module: 'ESNext', moduleResolution: 'Bundler', customConditions: ['node'] };
|
|
9
11
|
export const ALIAS_DECLARED_FIXTURES = [
|
|
10
12
|
{ ruleId: RULE, name: 'one declaration, and every tool pointed at it', expect: 'pass', files: aliasDeclarations() },
|
|
11
13
|
{
|
|
@@ -19,6 +21,16 @@ export const ALIAS_DECLARED_FIXTURES = [
|
|
|
19
21
|
'jest.e2e.config.js': "import base from './jest.config.js';\nexport default { ...base };\n",
|
|
20
22
|
}),
|
|
21
23
|
},
|
|
24
|
+
{
|
|
25
|
+
ruleId: RULE,
|
|
26
|
+
name: 'imports written without an extension: the compiler resolves as a bundler, jest maps the specifier as written',
|
|
27
|
+
expect: 'pass',
|
|
28
|
+
files: aliasDeclarations({
|
|
29
|
+
[CONFIG_FILE]: config({ importAlias: '@/', importExtension: 'none' }),
|
|
30
|
+
'tsconfig.json': tsconfig(PATHS, BUNDLER),
|
|
31
|
+
'jest.config.js': `export default { ${BARE_JEST_MAPPER}, ...governedJestCoverage() };\n`,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
22
34
|
failing('a Node subpath import as the alias', CONFIG_FILE, config({ importAlias: '#app/' })),
|
|
23
35
|
failing('an alias that could be any package', CONFIG_FILE, config({ importAlias: 'app/' })),
|
|
24
36
|
failing('an alias that is the name of a scope', CONFIG_FILE, config({ importAlias: '@app/' })),
|
|
@@ -38,9 +50,28 @@ export const ALIAS_DECLARED_FIXTURES = [
|
|
|
38
50
|
'\n'),
|
|
39
51
|
failing('a dependency-cruiser config that does not read tsconfig', '.dependency-cruiser.cjs', "module.exports = { options: { enhancedResolveOptions: { conditionNames: ['import'] } } };\n"),
|
|
40
52
|
failing('a knip config that maps the alias', 'knip.json', json({ paths: { '@/*': ['./src/*'] } })),
|
|
53
|
+
failing('imports written with ".js" and a compiler that resolves as a bundler', 'tsconfig.json', tsconfig(PATHS, BUNDLER)),
|
|
54
|
+
failing('imports written with ".js" and a module resolution that does not require it', 'tsconfig.json', tsconfig(PATHS, { moduleResolution: 'Bundler' })),
|
|
55
|
+
bare('a compiler that resolves as Node does', 'tsconfig.json', tsconfig(PATHS)),
|
|
56
|
+
bare('a module resolution that requires the extension', 'tsconfig.json', tsconfig(PATHS, { ...BUNDLER, moduleResolution: 'NodeNext' })),
|
|
57
|
+
bare('a bundler resolution that no longer reads the entry a package has for Node', 'tsconfig.json', tsconfig(PATHS, { ...BUNDLER, customConditions: [] })),
|
|
58
|
+
bare('a module format that is not the one the build completes', 'tsconfig.json', tsconfig(PATHS, { ...BUNDLER, module: 'CommonJS' })),
|
|
59
|
+
bare('a build config that resolves another way than the type check', 'tsconfig.build.json', json({ extends: './tsconfig.json', compilerOptions: { module: 'NodeNext', moduleResolution: 'NodeNext' } })),
|
|
60
|
+
bare('a jest config that still maps the specifier with ".js"', 'jest.config.js', `export default { ${JEST_MAPPER.replace(String.raw `\\$app`, '@')}, ...governedJestCoverage() };\n`),
|
|
61
|
+
bare('a build that compiles and does not rewrite the aliases', 'package.json', manifest({ build: COMPILE })),
|
|
41
62
|
];
|
|
42
63
|
function tsconfig(paths, more = {}) {
|
|
43
|
-
return json({ compilerOptions: { rootDir: '.', outDir: 'dist', paths, ...more } });
|
|
64
|
+
return json({ compilerOptions: { module: 'NodeNext', rootDir: '.', outDir: 'dist', paths, ...more } });
|
|
65
|
+
}
|
|
66
|
+
/** A failing fixture of a project that writes its imports without an extension, everything else as `init` writes it. */
|
|
67
|
+
function bare(name, file, content) {
|
|
68
|
+
const files = aliasDeclarations({
|
|
69
|
+
[CONFIG_FILE]: config({ importAlias: '@/', importExtension: 'none' }),
|
|
70
|
+
'tsconfig.json': tsconfig(PATHS, BUNDLER),
|
|
71
|
+
'jest.config.js': `export default { ${BARE_JEST_MAPPER}, ...governedJestCoverage() };\n`,
|
|
72
|
+
[file]: content,
|
|
73
|
+
});
|
|
74
|
+
return { ruleId: RULE, name: `without an extension: ${name}`, expect: { file }, files };
|
|
44
75
|
}
|
|
45
76
|
function manifest(scripts) {
|
|
46
77
|
return json({ name: 'fixture', type: 'module', scripts });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-declared-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/alias-declared-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,MAAM,IAAI,GAAG,wBAAwB,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AAO,CAAC,IAAY,EAAE,IAAY,EAAE,OAAe;IAC1D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AACjG,CAAC;AAED,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/config-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"config-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/config-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EA8G7C,CAAC"}
|
|
@@ -54,6 +54,12 @@ export const CONFIG_FIXTURES = [
|
|
|
54
54
|
expect: { file: CONFIG_FILE },
|
|
55
55
|
files: project({}, { [CONFIG_FILE]: config({ guard: 'strict' }) }),
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
ruleId: 'config/valid',
|
|
59
|
+
name: 'an unknown import extension',
|
|
60
|
+
expect: { file: CONFIG_FILE },
|
|
61
|
+
files: project({}, { [CONFIG_FILE]: config({ importExtension: 'ts' }) }),
|
|
62
|
+
},
|
|
57
63
|
{
|
|
58
64
|
ruleId: 'config/valid',
|
|
59
65
|
name: 'an unknown rule id',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config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M,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC3B,IAAI,EAAE,CAAC,qBAAqB,CAAC;QAC7B,KAAK,EAAE,OAAO,CACZ,SAAS,CACP,4IAA4I,CAC7I,CACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructor-injection-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/constructor-injection-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwB5C,eAAO,MAAM,8BAA8B,EAAE,SAAS,OAAO,EA6H5D,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { PATHS } from './paths.js';
|
|
2
|
+
import { SIGNATURE } from './signature.js';
|
|
3
|
+
import { signatureProject } from './signature-project.js';
|
|
4
|
+
import { source } from './source.js';
|
|
5
|
+
const { BARREL, BILLING, HANDLER } = PATHS;
|
|
6
|
+
const RULE = 'declarations/constructor-injection';
|
|
7
|
+
const BARE = '@CommandHandler(IssueInvoiceCommand)';
|
|
8
|
+
const SETTINGS = `${BILLING}/application/ports/invoice-settings.port.ts`;
|
|
9
|
+
const DEPENDENCIES = `${BILLING}/billing.dependencies.ts`;
|
|
10
|
+
const takingInstead = (parameter, imports = SIGNATURE.ports) => SIGNATURE.handlerOf(BARE, imports, [SIGNATURE.taken[0] ?? '', parameter]);
|
|
11
|
+
const REFUSED_PARAMETERS = [
|
|
12
|
+
['a union of two classes', 'private readonly clock: Clock | InvoiceRepository'],
|
|
13
|
+
['an optional parameter', 'private readonly clock?: Clock'],
|
|
14
|
+
['a default value', 'private readonly clock: Clock = fallbackClock'],
|
|
15
|
+
['a type of the language', 'private readonly retries: number'],
|
|
16
|
+
['a rest parameter', '...clocks: Clock[]'],
|
|
17
|
+
['a destructured parameter', '{ now }: Clock'],
|
|
18
|
+
];
|
|
19
|
+
export const CONSTRUCTOR_INJECTION_FIXTURES = [
|
|
20
|
+
{
|
|
21
|
+
ruleId: RULE,
|
|
22
|
+
name: 'a handler that lists nothing and types each constructor parameter by a port, its barrel registering what was read',
|
|
23
|
+
expect: 'pass',
|
|
24
|
+
files: signatureProject(SIGNATURE.handler, { [BARREL]: SIGNATURE.barrel }),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
ruleId: RULE,
|
|
28
|
+
name: 'a parameter typed by a generic class, whose raw class is the token',
|
|
29
|
+
expect: 'pass',
|
|
30
|
+
files: signatureProject(takingInstead('private readonly clock: Clock<Date>'), { [BARREL]: SIGNATURE.barrel }),
|
|
31
|
+
},
|
|
32
|
+
...REFUSED_PARAMETERS.map(([name, parameter]) => ({
|
|
33
|
+
ruleId: RULE,
|
|
34
|
+
name: `a constructor parameter that names no single class: ${name}`,
|
|
35
|
+
expect: { file: HANDLER },
|
|
36
|
+
files: signatureProject(takingInstead(parameter)),
|
|
37
|
+
})),
|
|
38
|
+
{
|
|
39
|
+
ruleId: RULE,
|
|
40
|
+
name: 'a parameter typed by an interface the file declares',
|
|
41
|
+
expect: { file: HANDLER },
|
|
42
|
+
files: signatureProject(`${takingInstead('private readonly settings: InvoiceSettings')}\ninterface InvoiceSettings {\n readonly currency: string;\n}\n`),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
ruleId: RULE,
|
|
46
|
+
name: 'a parameter typed by an interface of another file of the project',
|
|
47
|
+
expect: { file: HANDLER },
|
|
48
|
+
also: ['ports/abstract-class'],
|
|
49
|
+
files: signatureProject(takingInstead('private readonly settings: InvoiceSettings', [
|
|
50
|
+
...SIGNATURE.ports,
|
|
51
|
+
"import type { InvoiceSettings } from '@/contexts/billing/application/ports/invoice-settings.port.js';",
|
|
52
|
+
]), { [SETTINGS]: source('export interface InvoiceSettings {', ' readonly currency: string;', '}') }),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
ruleId: RULE,
|
|
56
|
+
name: 'a class that inherits its constructor from a class of a package',
|
|
57
|
+
expect: { file: HANDLER },
|
|
58
|
+
files: signatureProject(source("import { RecordedHandler } from '@ddd-ts-kit/kernel';", "import { CommandHandler } from '@ddd-ts-kit/kernel/declarations';", "import { IssueInvoiceCommand } from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command.js';", '', BARE, 'export class IssueInvoiceHandler extends RecordedHandler {}')),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
ruleId: RULE,
|
|
62
|
+
name: 'a signature project whose decorator repeats what the constructor states',
|
|
63
|
+
expect: { file: HANDLER },
|
|
64
|
+
files: signatureProject(SIGNATURE.handlerOf('@CommandHandler(IssueInvoiceCommand, [InvoiceRepository, Clock])', SIGNATURE.ports.map((line) => line.replace('import type', 'import')), SIGNATURE.taken)),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
ruleId: RULE,
|
|
68
|
+
name: 'a signature project whose decorator lists another class than the constructor is typed by',
|
|
69
|
+
expect: { file: HANDLER },
|
|
70
|
+
files: signatureProject(SIGNATURE.handlerOf('@CommandHandler(IssueInvoiceCommand, [InvoiceRepository, IdGenerator])', [
|
|
71
|
+
"import { IdGenerator, type Clock } from '@ddd-ts-kit/kernel';",
|
|
72
|
+
(SIGNATURE.ports[1] ?? '').replace('import type', 'import'),
|
|
73
|
+
], SIGNATURE.taken)),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
ruleId: 'ports/no-concrete-dependency',
|
|
77
|
+
name: 'a constructor parameter typed by the adapter instead of its port',
|
|
78
|
+
expect: { file: HANDLER },
|
|
79
|
+
also: ['layer/application-inward', 'declarations/barrel-current'],
|
|
80
|
+
files: signatureProject(SIGNATURE.handlerOf(BARE, [
|
|
81
|
+
"import type { InMemoryInvoiceRepository } from '@/contexts/billing/infrastructure/persistence/in-memory-invoice.repository.js';",
|
|
82
|
+
], ['private readonly invoiceRepository: InMemoryInvoiceRepository'])),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
ruleId: 'declarations/barrel-current',
|
|
86
|
+
name: 'a barrel whose dependency list was read from a constructor that has changed since',
|
|
87
|
+
expect: { file: BARREL },
|
|
88
|
+
files: signatureProject(SIGNATURE.handler, {
|
|
89
|
+
[BARREL]: SIGNATURE.barrel.replace('[InvoiceRepository, Clock]', '[InvoiceRepository]'),
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
ruleId: 'declarations/barrel-current',
|
|
94
|
+
name: 'a barrel that registers no dependency list for a constructor that takes something',
|
|
95
|
+
expect: { file: BARREL },
|
|
96
|
+
files: signatureProject(SIGNATURE.handler),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
ruleId: 'declarations/barrel-current',
|
|
100
|
+
name: 'assembly by discovery: the dependencies file registers what each constructor takes',
|
|
101
|
+
expect: 'pass',
|
|
102
|
+
files: signatureProject(SIGNATURE.handler, { [DEPENDENCIES]: SIGNATURE.dependencies }, 'discovery'),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
ruleId: 'declarations/barrel-current',
|
|
106
|
+
name: 'assembly by discovery: a constructor takes something and no dependencies file registers it',
|
|
107
|
+
expect: { file: DEPENDENCIES },
|
|
108
|
+
files: signatureProject(SIGNATURE.handler, {}, 'discovery'),
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
//# sourceMappingURL=constructor-injection-fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructor-injection-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/constructor-injection-fixtures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC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,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,YAAY,EAAE,EAAE,WAAW,CAAC;KACpG;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,4FAA4F;QAClG,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QAC9B,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,EAAE,WAAW,CAAC;KAC5D;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-project.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/declared-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,uGAAuG;AACvG,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,GAAE,YAAiB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"declared-project.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/declared-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,uGAAuG;AACvG,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,GAAE,YAAiB,GAAG,YAAY,CAiB/F"}
|
|
@@ -8,7 +8,10 @@ export function declaredProject(files, overrides = {}) {
|
|
|
8
8
|
const barrels = ['billing', 'catalog'].map((context) => {
|
|
9
9
|
const directory = `src/contexts/${context}/`;
|
|
10
10
|
const inside = Object.keys(written).flatMap((file) => file.startsWith(directory) ? [file.slice(directory.length)] : []);
|
|
11
|
-
return [
|
|
11
|
+
return [
|
|
12
|
+
`${directory}${barrelFile(context)}`,
|
|
13
|
+
renderBarrel(inside, (entry) => `@/contexts/${context}/${entry.replace(/\.ts$/, '.js')}`),
|
|
14
|
+
];
|
|
12
15
|
});
|
|
13
16
|
return { ...written, ...Object.fromEntries(barrels), ...overrides };
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-project.js","sourceRoot":"","sources":["../../../src/check/fixtures/declared-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,uGAAuG;AACvG,MAAM,UAAU,eAAe,CAAC,KAAmB,EAAE,SAAS,GAAiB,EAAE;IAC/E,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAE5F,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAoB,EAAE;QACvE,MAAM,SAAS,GAAG,gBAAgB,OAAO,GAAG,CAAC;QAE7C,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACnD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CACjE,CAAC;QAEF,OAAO,
|
|
1
|
+
{"version":3,"file":"declared-project.js","sourceRoot":"","sources":["../../../src/check/fixtures/declared-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,YAAY,EA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ures/extension-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAc5C,eAAO,MAAM,kBAAkB,EAAE,SAAS,OAAO,EA+DhD,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { CONFIG_FILE } from '../../config/index.js';
|
|
2
|
+
import { config } from './config.js';
|
|
3
|
+
import { project } from './project.js';
|
|
4
|
+
const RULE = 'imports/extension';
|
|
5
|
+
const LOAD_CONFIG = 'src/platform/config/load-config.ts';
|
|
6
|
+
const APP_CONFIG = 'src/platform/config/app-config.ts';
|
|
7
|
+
const SUPPORT = 'test/e2e/support/start-application.ts';
|
|
8
|
+
const JOURNEY = 'test/e2e/journey.e2e.spec.ts';
|
|
9
|
+
const SCRIPT = 'scripts/openapi.ts';
|
|
10
|
+
const INDEX = 'src/platform/config/index.ts';
|
|
11
|
+
const SETTINGS = 'export const appConfig = { port: 3000 };\n';
|
|
12
|
+
const NONE = { [CONFIG_FILE]: config({ importExtension: 'none' }) };
|
|
13
|
+
const JS = { [CONFIG_FILE]: config({ importExtension: 'js' }) };
|
|
14
|
+
export const EXTENSION_FIXTURES = [
|
|
15
|
+
{
|
|
16
|
+
ruleId: RULE,
|
|
17
|
+
name: 'no extension under "none": a static import, a re-export, a dynamic import, a test and a script; a package subpath that ends like a file is not a project file',
|
|
18
|
+
expect: 'pass',
|
|
19
|
+
files: project({
|
|
20
|
+
[APP_CONFIG]: SETTINGS,
|
|
21
|
+
[INDEX]: "export { appConfig } from '@/platform/config/app-config';\n",
|
|
22
|
+
[LOAD_CONFIG]: [
|
|
23
|
+
"import { core } from 'zod/v4/core.js';",
|
|
24
|
+
"import { appConfig } from '@/platform/config/app-config';",
|
|
25
|
+
"export type { appConfig as Settings } from '@/platform/config/index';",
|
|
26
|
+
"export const later = (): Promise<unknown> => import('@/platform/config/app-config');",
|
|
27
|
+
'export const loaded = [core, appConfig];\n',
|
|
28
|
+
].join('\n'),
|
|
29
|
+
[SUPPORT]: "import { loaded } from '@/platform/config/load-config';\nexport const start = loaded;\n",
|
|
30
|
+
[JOURNEY]: "import { start } from '$test/e2e/support/start-application';\nexport { start };\n",
|
|
31
|
+
[SCRIPT]: "import { loaded } from '@/platform/config/load-config';\nexport { loaded };\n",
|
|
32
|
+
}, NONE),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
ruleId: RULE,
|
|
36
|
+
name: '".js" under "js", and in a project whose config does not say: it was written before the key existed',
|
|
37
|
+
expect: 'pass',
|
|
38
|
+
files: project({
|
|
39
|
+
[APP_CONFIG]: SETTINGS,
|
|
40
|
+
[LOAD_CONFIG]: "export { appConfig } from '@/platform/config/app-config.js';\n",
|
|
41
|
+
[JOURNEY]: "export { appConfig } from '@/platform/config/app-config.js';\n",
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
failing('".js" under "none"', NONE, [LOAD_CONFIG, "export { appConfig } from '@/platform/config/app-config.js';\n"]),
|
|
45
|
+
failing('".ts" under "none"', NONE, [LOAD_CONFIG, "export { appConfig } from '@/platform/config/app-config.ts';\n"]),
|
|
46
|
+
failing('".mjs" in a dynamic import under "none"', NONE, [
|
|
47
|
+
LOAD_CONFIG,
|
|
48
|
+
"export const later = (): Promise<unknown> => import('@/platform/config/app-config.mjs');\n",
|
|
49
|
+
]),
|
|
50
|
+
failing('".js" in a test under "none"', NONE, [JOURNEY, "export { start } from '$test/e2e/support/start.js';\n"]),
|
|
51
|
+
failing('".js" in a script under "none"', NONE, [
|
|
52
|
+
SCRIPT,
|
|
53
|
+
"export { appConfig } from '@/platform/config/app-config.js';\n",
|
|
54
|
+
]),
|
|
55
|
+
{
|
|
56
|
+
ruleId: RULE,
|
|
57
|
+
name: 'a directory under "none": the compiler would complete it with its index',
|
|
58
|
+
expect: { file: LOAD_CONFIG },
|
|
59
|
+
files: project({
|
|
60
|
+
[APP_CONFIG]: SETTINGS,
|
|
61
|
+
[INDEX]: "export { appConfig } from '@/platform/config/app-config';\n",
|
|
62
|
+
[LOAD_CONFIG]: "export { appConfig } from '@/platform/config';\n",
|
|
63
|
+
}, NONE),
|
|
64
|
+
},
|
|
65
|
+
failing('no extension under "js"', JS, [LOAD_CONFIG, "export { appConfig } from '@/platform/config/app-config';\n"]),
|
|
66
|
+
failing('".ts" under "js"', JS, [LOAD_CONFIG, "export { appConfig } from '@/platform/config/app-config.ts';\n"]),
|
|
67
|
+
failing('no extension in a project whose config does not say', {}, [
|
|
68
|
+
JOURNEY,
|
|
69
|
+
"export { appConfig } from '@/platform/config/app-config';\n",
|
|
70
|
+
]),
|
|
71
|
+
];
|
|
72
|
+
/** One file that writes an import the config does not allow, in a project whose config is `overrides`. */
|
|
73
|
+
function failing(name, overrides, [file, content]) {
|
|
74
|
+
const files = project({ [APP_CONFIG]: SETTINGS, [file]: content }, overrides);
|
|
75
|
+
return { ruleId: RULE, name, expect: { file }, files };
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=extension-fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/extension-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,IAAI,GAAG,mBAAmB,CAAC;AACjC,MAAM,WAAW,GAAG,oCAAoC,CAAC;AACzD,MAAM,UAAU,GAAG,mCAAmC,CAAC;AACvD,MAAM,OAAO,GAAG,uCAAuC,CAAC;AACxD,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAC/C,MAAM,MAAM,GAAG,oBAAoB,CAAC;AACpC,MAAM,KAAK,GAAG,8BAA8B,CAAC;AAC7C,MAAM,QAAQ,GAAG,4CAA4C,CAAC;AAC9D,MAAM,IAAI,GAAG,EAAE,CAAC,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EAAE,CAAC,OAAO,EAAE,uDAAuD,CAAC,CAAC;IACjH,OAAO,CAAC,gCAAgC,EAAE,IAAI,EAAE;QAC9C,MAAM;QACN,gEAAgE;KACjE,CAAC;IACF;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,yEAAyE;QAC/E,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC7B,KAAK,EAAE,OAAO,CACZ;YACE,CAAC,UAAU,CAAC,EAAE,QAAQ;YACtB,CAAC,KAAK,CAAC,EAAE,6DAA6D;YACtE,CAAC,WAAW,CAAC,EAAE,kDAAkD;SAClE,EACD,IAAI,CACL;KACF;IACD,OAAO,CAAC,yBAAyB,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,6DAA6D,CAAC,CAAC;IACpH,OAAO,CAAC,kBAAkB,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,gEAAgE,CAAC,CAAC;IAChH,OAAO,CAAC,qDAAqD,EAAE,EAAE,EAAE;QACjE,OAAO;QACP,6DAA6D;KAC9D,CAAC;CACH,CAAC;AAEF,0GAA0G;AAC1G,SAAS,OAAO,CAAC,IAAY,EAAE,SAA2B,EAAE,CAAC,IAAI,EAAE,OAAO,CAA4B;IACpG,MAAM,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IAE9E,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA8BtC,CAAC"}
|
|
@@ -4,12 +4,14 @@ import { AUTHZ_FIXTURES } from './authz-fixtures.js';
|
|
|
4
4
|
import { CLEAN_FIXTURES } from './clean-fixtures.js';
|
|
5
5
|
import { COMPOSITION_FIXTURES } from './composition-fixtures.js';
|
|
6
6
|
import { CONFIG_FIXTURES } from './config-fixtures.js';
|
|
7
|
+
import { CONSTRUCTOR_INJECTION_FIXTURES } from './constructor-injection-fixtures.js';
|
|
7
8
|
import { CONSUMER_FIXTURES } from './consumer-fixtures.js';
|
|
8
9
|
import { CONTEXT_FIXTURES } from './context-fixtures.js';
|
|
9
10
|
import { COVERAGE_FIXTURES } from './coverage-fixtures.js';
|
|
10
11
|
import { DECLARATIONS_FIXTURES } from './declarations-fixtures.js';
|
|
11
12
|
import { DOMAIN_EVENTS_FIXTURES } from './domain-events-fixtures.js';
|
|
12
13
|
import { EVENTS_FIXTURES } from './events-fixtures.js';
|
|
14
|
+
import { EXTENSION_FIXTURES } from './extension-fixtures.js';
|
|
13
15
|
import { EXTRACTABLE_FIXTURES } from './extractable-fixtures.js';
|
|
14
16
|
import { GOVERNANCE_FIXTURES } from './governance-fixtures.js';
|
|
15
17
|
import { IMPORTS_FIXTURES } from './imports-fixtures.js';
|
|
@@ -37,12 +39,14 @@ export const FIXTURES = [
|
|
|
37
39
|
...CLEAN_FIXTURES,
|
|
38
40
|
...COMPOSITION_FIXTURES,
|
|
39
41
|
...CONFIG_FIXTURES,
|
|
42
|
+
...CONSTRUCTOR_INJECTION_FIXTURES,
|
|
40
43
|
...CONSUMER_FIXTURES,
|
|
41
44
|
...CONTEXT_FIXTURES,
|
|
42
45
|
...COVERAGE_FIXTURES,
|
|
43
46
|
...DECLARATIONS_FIXTURES,
|
|
44
47
|
...DOMAIN_EVENTS_FIXTURES,
|
|
45
48
|
...EVENTS_FIXTURES,
|
|
49
|
+
...EXTENSION_FIXTURES,
|
|
46
50
|
...EXTRACTABLE_FIXTURES,
|
|
47
51
|
...GOVERNANCE_FIXTURES,
|
|
48
52
|
...IMPORTS_FIXTURES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM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,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAuB;IAC1C,GAAG,uBAAuB;IAC1B,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;CACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FixtureFiles } from './fixture-files.js';
|
|
2
|
+
type Assembly = 'barrel' | 'discovery';
|
|
3
|
+
/**
|
|
4
|
+
* A declared project that states dependencies in constructor signatures, holding the
|
|
5
|
+
* issue-invoice use case with the handler it is given. Its barrel is the one the generator
|
|
6
|
+
* derives from the role files alone: a fixture whose handler is injected something writes the
|
|
7
|
+
* generated file out, so that it does not prove the rule with its own code.
|
|
8
|
+
*/
|
|
9
|
+
export declare function signatureProject(body: string, overrides?: FixtureFiles, assembly?: Assembly): FixtureFiles;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=signature-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature-project.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/signature-project.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,KAAK,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,YAAiB,EAC5B,QAAQ,GAAE,QAAmB,GAC5B,YAAY,CASd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CONFIG_FILE } from '../../config/index.js';
|
|
2
|
+
import { config } from './config.js';
|
|
3
|
+
import { DECLARED } from './declared.js';
|
|
4
|
+
import { declaredProject } from './declared-project.js';
|
|
5
|
+
import { handler } from './handler.js';
|
|
6
|
+
import { PATHS } from './paths.js';
|
|
7
|
+
/**
|
|
8
|
+
* A declared project that states dependencies in constructor signatures, holding the
|
|
9
|
+
* issue-invoice use case with the handler it is given. Its barrel is the one the generator
|
|
10
|
+
* derives from the role files alone: a fixture whose handler is injected something writes the
|
|
11
|
+
* generated file out, so that it does not prove the rule with its own code.
|
|
12
|
+
*/
|
|
13
|
+
export function signatureProject(body, overrides = {}, assembly = 'barrel') {
|
|
14
|
+
const stack = { style: 'declared', dependencies: 'signature', assembly };
|
|
15
|
+
const files = declaredProject({ [PATHS.REPOSITORY_PORT]: DECLARED.repositoryPort, [PATHS.COMMAND]: DECLARED.command, ...handler(body) }, { [CONFIG_FILE]: config({ stack }), ...overrides });
|
|
16
|
+
return assembly === 'barrel' ? files : withoutBarrels(files);
|
|
17
|
+
}
|
|
18
|
+
function withoutBarrels(files) {
|
|
19
|
+
return Object.fromEntries(Object.entries(files).filter(([file]) => !file.endsWith('.declarations.ts')));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=signature-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A handler whose constructor states its dependencies, and what the generated files of its context then hold. */
|
|
2
|
+
export declare const SIGNATURE: {
|
|
3
|
+
readonly handler: string;
|
|
4
|
+
readonly handlerOf: typeof handler;
|
|
5
|
+
readonly ports: string[];
|
|
6
|
+
readonly taken: string[];
|
|
7
|
+
readonly barrel: string;
|
|
8
|
+
readonly dependencies: string;
|
|
9
|
+
};
|
|
10
|
+
/** The issue-invoice handler, declared with `decorator`, importing `imports` and taking `parameters`. */
|
|
11
|
+
declare function handler(decorator: string, imports: readonly string[], parameters: readonly string[]): string;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=signature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/signature.ts"],"names":[],"mappings":"AAcA,kHAAkH;AAClH,eAAO,MAAM,SAAS;aACpB,OAAO;aACP,SAAS;aACT,KAAK;aACL,KAAK;aACL,MAAM;aAWN,YAAY;CAQJ,CAAC;AAEX,yGAAyG;AACzG,iBAAS,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAarG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { source } from './source.js';
|
|
2
|
+
const DECLARATIONS = "'@ddd-ts-kit/kernel/declarations'";
|
|
3
|
+
const COMMAND = "'@/contexts/billing/application/commands/issue-invoice/issue-invoice.command.js'";
|
|
4
|
+
const HANDLER = "'@/contexts/billing/application/commands/issue-invoice/issue-invoice.handler.js'";
|
|
5
|
+
const REPOSITORY = "'@/contexts/billing/domain/repositories/invoice.repository.js'";
|
|
6
|
+
const PORTS = [
|
|
7
|
+
"import type { Clock } from '@ddd-ts-kit/kernel';",
|
|
8
|
+
`import type { InvoiceRepository } from ${REPOSITORY};`,
|
|
9
|
+
];
|
|
10
|
+
const TAKEN = ['private readonly invoiceRepository: InvoiceRepository', 'private readonly clock: Clock'];
|
|
11
|
+
/** A handler whose constructor states its dependencies, and what the generated files of its context then hold. */
|
|
12
|
+
export const SIGNATURE = {
|
|
13
|
+
handler: handler('@CommandHandler(IssueInvoiceCommand)', PORTS, TAKEN),
|
|
14
|
+
handlerOf: handler,
|
|
15
|
+
ports: PORTS,
|
|
16
|
+
taken: TAKEN,
|
|
17
|
+
barrel: source(`import { injected } from ${DECLARATIONS};`, `import { IssueInvoiceHandler } from ${HANDLER};`, `import { InvoiceRepository } from ${REPOSITORY};`, "import { Clock } from '@ddd-ts-kit/kernel';", '', `export * from ${COMMAND};`, `export * from ${HANDLER};`, '', 'injected(IssueInvoiceHandler, [InvoiceRepository, Clock]);'),
|
|
18
|
+
dependencies: source(`import { injected } from ${DECLARATIONS};`, `import { IssueInvoiceHandler } from ${HANDLER};`, `import { InvoiceRepository } from ${REPOSITORY};`, "import { Clock } from '@ddd-ts-kit/kernel';", '', 'injected(IssueInvoiceHandler, [InvoiceRepository, Clock]);'),
|
|
19
|
+
};
|
|
20
|
+
/** The issue-invoice handler, declared with `decorator`, importing `imports` and taking `parameters`. */
|
|
21
|
+
function handler(decorator, imports, parameters) {
|
|
22
|
+
return source(...imports, `import { CommandHandler } from ${DECLARATIONS};`, `import { IssueInvoiceCommand } from ${COMMAND};`, '', decorator, 'export class IssueInvoiceHandler implements CommandHandler<IssueInvoiceCommand> {', ' constructor(', ...parameters.map((parameter) => ` ${parameter},`), ' ) {}', '}');
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=signature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../src/check/fixtures/signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,YAAY,GAAG,mCAAmC,CAAC;AACzD,MAAM,OAAO,GAAG,k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SourceFile } from '../model/source-file.js';
|
|
3
|
+
/** The TypeScript sources of the tests and of the scripts, which live next to the source root. */
|
|
4
|
+
export declare function besideTheSources(project: Pick<Project, 'root' | 'config'>): SourceFile[];
|
|
5
|
+
//# sourceMappingURL=beside-the-sources.d.ts.map
|