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
package/README.md
CHANGED
|
@@ -22,6 +22,12 @@ npx ddd-ts-kit generate route billing IssueInvoice --method POST --path /invoice
|
|
|
22
22
|
npx ddd-ts-kit check
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
`init` ends by saying what to run next: `pnpm install`, then `pnpm run verify` (`npm install`,
|
|
26
|
+
then `npm run verify` with `--package-manager npm`). A new project passes that whole gate before
|
|
27
|
+
anything is generated, with no context, with one and with several: the end-to-end suite installs
|
|
28
|
+
it for real and runs it, on both package managers and on every proven stack. After the install the
|
|
29
|
+
CLI is the one the project pins: `pnpm exec ddd-ts-kit <command>`, or `npx ddd-ts-kit <command>`.
|
|
30
|
+
|
|
25
31
|
Every command accepts `--json` (machine-readable output, errors included) and `--cwd <dir>`.
|
|
26
32
|
Commands other than `init` look for `ddd-ts-kit.config.json` in the directory and its parents.
|
|
27
33
|
Exit codes: `0` success, `1` violations, stale documentation or, under `--strict`, a commit over
|
|
@@ -41,22 +47,56 @@ ddd-ts-kit init [--http express|fastify|nest|none]
|
|
|
41
47
|
[--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--audit on|off]
|
|
42
48
|
[--errors none|sentry] [--logger stdout|pino|winston]
|
|
43
49
|
[--style declared|explicit] [--assembly barrel|discovery]
|
|
50
|
+
[--package-manager npm|pnpm]
|
|
44
51
|
[--allow-no-outbox "<reason>"] [--import-alias '$<name>/']
|
|
52
|
+
[--import-extension none|js]
|
|
45
53
|
[--context <name>:<core|supporting|generic>]...
|
|
46
54
|
[--dry-run] [--force]
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
Works in an empty directory or an existing project. An existing file is never replaced without
|
|
50
|
-
`--force`; it is reported as skipped.
|
|
58
|
+
`--force`; it is reported as skipped. `init` also writes the generated contracts as the scripts
|
|
59
|
+
of the project write them for a project without a route or an integration event of its own
|
|
60
|
+
(`openapi/openapi.json`, `docs/integration/asyncapi.json` and `event-catalog.md`), so that the
|
|
61
|
+
first commit holds them and `docs:check` passes at once; a contract that is already there is
|
|
62
|
+
left alone, `--force` included. An existing `package.json` is merged: missing scripts and
|
|
51
63
|
dependencies are added, yours are kept and mentioned in the notes. Run again later, `init` keeps
|
|
52
64
|
the stack recorded in the config.
|
|
53
65
|
|
|
66
|
+
`init --force` on a project that is already initialised rewrites the files `init` owns and keeps
|
|
67
|
+
the config: the contexts and their upstreams, the rules, the limits, the deviations and every
|
|
68
|
+
other key stay as written, and the stack changes only where a flag names a choice
|
|
69
|
+
(`init --force --logger pino` changes the logger; a combination the recorded stack cannot take
|
|
70
|
+
is refused as for a new project). The composition root, the proof that each context wires alone
|
|
71
|
+
and the registry of permissions are rewritten from their templates, then the declared contexts
|
|
72
|
+
are wired into them again; what another generator had added to a file of the platform (the
|
|
73
|
+
value of a gateway, the settings of a job) is not, and a note says so. A config that cannot be
|
|
74
|
+
read is replaced.
|
|
75
|
+
|
|
76
|
+
An import of a file of the project is written without an extension
|
|
77
|
+
(`@/contexts/billing/domain/aggregates/invoice.aggregate`): `init` records
|
|
78
|
+
`"importExtension": "none"`, and `--import-extension js` asks for the `.js` of the emitted file
|
|
79
|
+
instead. A config without the key is read as `js`, so a project generated before the key
|
|
80
|
+
existed keeps its spelling. See [docs/CONFIG.md](../../docs/CONFIG.md).
|
|
81
|
+
|
|
54
82
|
Defaults: `express`, `zod`, `tsyringe` (`nest` with `--http nest`, and only then), `vitest`,
|
|
55
83
|
`drizzle` on `postgres`, `outbox` when there is an ORM, `swagger`, `github`, `jwt`, `rbac`, no broker,
|
|
56
84
|
the cache in the process, the audit trail `on` when there is an ORM, unexpected failures reported
|
|
57
85
|
nowhere (`--errors none`), JSON lines on the standard output (`--logger stdout`), and the
|
|
58
86
|
`declared` style with a `barrel` wherever the declarations are read: with `--di tsyringe`.
|
|
59
87
|
|
|
88
|
+
**Package manager.** `pnpm` unless `--package-manager npm`: every script, pipeline, hook, the
|
|
89
|
+
Dockerfile, the guidance and the agent permissions are written in the dialect of the one chosen,
|
|
90
|
+
recorded under `stack.packageManager`. pnpm is pinned in `package.json` and provided by corepack;
|
|
91
|
+
`pnpm-workspace.yaml` says that no dependency runs a build script unless allowed by name. Both are
|
|
92
|
+
proven by a real install of a generated project, its build and its `verify`. The kit is installed
|
|
93
|
+
from the registry either way.
|
|
94
|
+
|
|
95
|
+
**Pipelines.** A pull or merge request runs the unit specs, the integration specs and the lint of
|
|
96
|
+
the contexts its change reaches through the context map (`ddd-ts-kit affected`); types,
|
|
97
|
+
architecture, import graph, dead code, end to end, build and documents always run on the whole
|
|
98
|
+
project, and the default branch and the nightly schedule run everything.
|
|
99
|
+
|
|
60
100
|
**Two styles.** In the `declared` style each class says what it is with a decorator of
|
|
61
101
|
`@ddd-ts-kit/kernel/declarations` (`@Requires` or `@Public` on a command or a query,
|
|
62
102
|
`@CommandHandler`, `@QueryHandler`, `@IntegrationEventHandler`, `@DomainEventHandler`, `@Scheduled`,
|
|
@@ -78,9 +118,23 @@ A config written before `stack.style` existed is explicit.
|
|
|
78
118
|
**A port is an abstract class and its own injection token.** `application/ports/<name>.port.ts`
|
|
79
119
|
and `domain/repositories/<name>.repository.ts` hold one abstract class each. Generated code holds
|
|
80
120
|
no `token()`, no UPPER_SNAKE injection constant, no `<context>.ports.ts` and no
|
|
81
|
-
`platform/tokens.ts`: a
|
|
82
|
-
kernel ports are value imports wherever they are named in a
|
|
83
|
-
|
|
121
|
+
`platform/tokens.ts`: a constructor parameter typed by a port class names what is injected
|
|
122
|
+
(`private readonly clock: Clock`), kernel ports are value imports wherever they are named in a
|
|
123
|
+
list or a binding and type imports where they only type a parameter, an adapter `implements`
|
|
124
|
+
its port.
|
|
125
|
+
|
|
126
|
+
**The constructor states the dependencies.** In the declared style a generated class lists
|
|
127
|
+
nothing in its decorator (`@CommandHandler(IssueInvoiceCommand)`): each constructor parameter
|
|
128
|
+
is typed by one class, its token (`declarations/constructor-injection`). `generate`, `docs` and
|
|
129
|
+
the `dev` script read the signatures, with the zero-dependency scanner of the checker and no
|
|
130
|
+
compiler, and write `injected(Class, [Tokens])` statements in the generated file of each
|
|
131
|
+
context: the barrel `<context>.declarations.ts`, or `<context>.dependencies.ts` under
|
|
132
|
+
discovery. `@ddd-ts-kit/di` injects from there. `emitDecoratorMetadata` is never relied on: it
|
|
133
|
+
is absent with standard decorators and under `tsx`. `init` writes
|
|
134
|
+
`"stack.dependencies": "signature"`; a config without the key is `listed`, the 0.1 form
|
|
135
|
+
(`@CommandHandler(M, [Ports])`), which keeps working untouched, and
|
|
136
|
+
`--dependencies listed` asks for it. The explicit style stays explicit: its module file lists
|
|
137
|
+
what each class is given. Every generated file exports one class, interface or function and is named
|
|
84
138
|
after it.
|
|
85
139
|
|
|
86
140
|
**Domain events leave with the save.** A generated command handler builds or loads its aggregate,
|
|
@@ -141,7 +195,7 @@ to its lists, everything else is kept, and the notes of the command list what wa
|
|
|
141
195
|
denied and `Read(!./.env.example)`, a negation placed after it in the same list, takes the
|
|
142
196
|
example file back out.
|
|
143
197
|
|
|
144
|
-
Every `.ts` file `init` and `generate` write imports by the alias (`@/platform/errors
|
|
198
|
+
Every `.ts` file `init` and `generate` write imports by the alias (`@/platform/errors`),
|
|
145
199
|
never by a relative path; the barrel and a published-language index re-export by it too.
|
|
146
200
|
|
|
147
201
|
Scripts: `dev` (`tsx watch`, which resolves an alias from the `paths` of `tsconfig.json`,
|
|
@@ -187,6 +241,7 @@ ddd-ts-kit generate --help --json
|
|
|
187
241
|
| `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | `defineIntegrationEvent` declaration in the published language (its payload in `<event>.v<n>.payload.ts` with class-validator or a schema of your own), index export, the publisher `application/integration/publishers/<event>.publisher.ts`, spec, registration, a line of `platform/audit/audited-events.ts` |
|
|
188
242
|
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>` | `application/integration/handlers/<name>.integration-handler.ts`, a class `<Name>IntegrationHandler` depending on `CommandBus`, its spec, its idempotent subscription under the consumer name `<context>.<name>`; refused unless the upstream is declared |
|
|
189
243
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase after-commit]` | reaction to a domain event of the context, spec, subscription; before the commit of the unit of work by default, after it with `--phase after-commit` (an effect no transaction covers, at most once), and the spec runs the reaction in that phase |
|
|
244
|
+
| `projection` (`projector`) | `<context> <Name> <event-type>` | a projector in `application/projections/<name>.projection.ts`, declared with `@Projection('<context>.<name>')` and one `@On(definition)` method for the integration event, which the context itself or a declared upstream publishes, and its spec; declared style only. It keeps one read model: its port is received in the constructor |
|
|
190
245
|
| `job` | `<context> <Name> (--every <duration> \| --cron "<expression>" [--time-zone <zone>]) --command <UseCaseName>` | `application/scheduling/<name>.job.ts`, a class `<Name>Job implements ScheduledJob` that sends the command, as `systemActor('<context>.<name>')` when it is protected, with `execution.scheduledAt` when the command takes it; `test/unit/<name>.job.spec.ts`, which runs the job (by name on tsyringe, `application.jobs.runNow`; `job.run(occurrence)` with hand wiring) and asserts the command it sent; its registration; its switch in `platform/job-settings.ts`; the grant of its system actor (below) |
|
|
191
246
|
| `acl` | `<context> <upstreamOrSystemName>` | translator in `infrastructure/anti-corruption/`, spec |
|
|
192
247
|
| `e2e` | `<context> <UseCaseName>` | `test/e2e/<use-case>.e2e.spec.ts` driving the route of the use case: 401 without a credential, 403 without the permission, the documented status with it; for a command, one more test asserts the trace of the request, exact on names and structure, with `installTestTracing()` and `expectSpanTree(storyOf(trace), [...])` of `@ddd-ts-kit/tracing/testing` (`POST /invoices`, then `command IssueInvoiceCommand`, then `repository InvoiceRepository.save`); needs the route |
|
|
@@ -199,17 +254,17 @@ ddd-ts-kit generate --help --json
|
|
|
199
254
|
|
|
200
255
|
- **The declared style, kind by kind.** No token anywhere: a list names port classes. `command`
|
|
201
256
|
and `query` put `@Requires(<permissions>[...])` or `@Public()` on the message and
|
|
202
|
-
`@CommandHandler(Message
|
|
257
|
+
`@CommandHandler(Message)` or
|
|
203
258
|
`@QueryHandler(Message, [<UseCase>Reader])` on the handler; `repository` writes
|
|
204
259
|
`@Repository(InvoiceRepository, [<storage>, ExecutionScope, Clock])`, the storage being
|
|
205
260
|
`Database` of the platform (drizzle, prisma), `KnexContext` or `TypeOrmContext`; the in-memory
|
|
206
261
|
adapter of a read port is `in-memory-<name>-reader.repository.ts`, a role file with
|
|
207
262
|
`@Repository(<UseCase>Reader)`; `integration-handler` writes
|
|
208
|
-
`@IntegrationEventHandler(definition, { consumer }
|
|
263
|
+
`@IntegrationEventHandler(definition, { consumer })` and is refused when the
|
|
209
264
|
upstream does not declare the event; `event-handler` and the publisher of `integration-event`
|
|
210
265
|
write `@DomainEventHandler(Event, { name })` (the publisher with
|
|
211
266
|
`[IntegrationEventPublisher, IdGenerator]`), and both are found like any role file: the
|
|
212
|
-
composition root lists no publisher; `job` writes `@Scheduled('<context>.<name>', schedule
|
|
267
|
+
composition root lists no publisher; `job` writes `@Scheduled('<context>.<name>', schedule)`;
|
|
213
268
|
`policy` writes a class with `@Policy(permission, { name })` and registers nothing; `gateway`
|
|
214
269
|
writes `@Gateway(<Name>Gateway, [<Name>Contract])` and binds the upstream value in the marker
|
|
215
270
|
regions of `platform/platform.module.ts` and `platform/platform-test.module.ts`: a value or a
|
|
@@ -248,8 +303,16 @@ ddd-ts-kit generate --help --json
|
|
|
248
303
|
relationship schema or a permission the generator cannot read, nothing is written and the job
|
|
249
304
|
file carries the `TODO(domain)` naming the actor and the permission.
|
|
250
305
|
- **The barrel is derived.** `<context>.declarations.ts` holds one `export *` per role file, sorted
|
|
251
|
-
by path
|
|
252
|
-
|
|
306
|
+
by path, then one `injected(Class, [Tokens])` per class whose constructor takes something,
|
|
307
|
+
read from its signature, with the imports they need. Every `generate`, and `docs`, rewrite it;
|
|
308
|
+
`docs --check` and `check` (`declarations/barrel-current`) report one that a role file written
|
|
309
|
+
by hand left behind or whose constructor changed since, naming the class
|
|
310
|
+
(`stale src/contexts/billing/billing.declarations.ts: the dependency list of IssueInvoiceHandler is stale: ...`).
|
|
311
|
+
The `dev` script loads `ddd-ts-kit/dist/refresh-declarations.js` before the application, on
|
|
312
|
+
every start and reload of `tsx watch`: a port added to a constructor is injected on the
|
|
313
|
+
reload that follows the save. The same module is the binary `ddd-ts-kit-refresh-declarations`.
|
|
314
|
+
It is laid out as Biome lays it out at a line width of 120; a project that formats at another
|
|
315
|
+
width leaves `**/*.declarations.ts` and `**/*.dependencies.ts` out of its formatter.
|
|
253
316
|
- **Deny by default.** `command` and `query` are refused without `--permission` or `--public`. A new
|
|
254
317
|
permission joins `<context>.permissions.ts`; its words are checked against the glossary like any
|
|
255
318
|
other name. With `--authz rebac` the requirement names the context as its resource, a starting
|
|
@@ -326,7 +389,9 @@ Regenerates what is derived from the config and the code, and nothing else:
|
|
|
326
389
|
kept; on first creation the four written sections are laid out with hints.
|
|
327
390
|
- the generated lists of every `CONTEXT.md` (aggregates, published events, permissions, scheduled
|
|
328
391
|
jobs as a table of name, schedule and command, relationships);
|
|
329
|
-
- the
|
|
392
|
+
- the generated file of every declared context: the barrel `<context>.declarations.ts`, with
|
|
393
|
+
what each constructor is injected, read from its signature, or under discovery
|
|
394
|
+
`<context>.dependencies.ts`, which holds that alone;
|
|
330
395
|
- the reference of every `CONTEXT.md`: the facts of `describe`, as tables under `## Reference`,
|
|
331
396
|
between `ddd-ts-kit:reference` markers; a `CONTEXT.md` that has no such section gets it after its
|
|
332
397
|
last generated list;
|
|
@@ -355,10 +420,14 @@ ddd-ts-kit build-aliases [--project <tsconfig>]
|
|
|
355
420
|
```
|
|
356
421
|
|
|
357
422
|
The second step of `npm run build`, after the compiler. The compiler emits an import alias as
|
|
358
|
-
it was written (`@/platform/errors
|
|
359
|
-
every `.js`, `.mjs`, `.cjs`, `.d.ts`, `.d.mts` and `.d.cts` under the
|
|
360
|
-
tsconfig (`tsconfig.build.json` by default), each alias specifier into
|
|
361
|
-
emitted file it names,
|
|
423
|
+
it was written (`@/platform/errors`), and Node resolves no alias and completes no extension:
|
|
424
|
+
this command rewrites, in every `.js`, `.mjs`, `.cjs`, `.d.ts`, `.d.mts` and `.d.cts` under the
|
|
425
|
+
output directory of the tsconfig (`tsconfig.build.json` by default), each alias specifier into
|
|
426
|
+
the relative path of the emitted file it names, with its `.js` extension
|
|
427
|
+
(`../../platform/errors.js`), so that `node dist/src/main.js` runs with no loader and no flag.
|
|
428
|
+
It reads `importAlias` and `importExtension` of the config: `@/platform/errors` names
|
|
429
|
+
`platform/errors.js` under `none`, `@/platform/errors.js` names it under `js`, and no other
|
|
430
|
+
spelling is guessed.
|
|
362
431
|
|
|
363
432
|
- Rewritten: the specifier of `import ... from`, `export ... from`, a bare `import`,
|
|
364
433
|
`import('...')` and `require('...')` with a string literal, `import.meta.resolve('...')`, and
|
|
@@ -367,9 +436,13 @@ emitted file it names, so that `node dist/src/main.js` runs with no loader and n
|
|
|
367
436
|
code, a comment, a template or a regular expression, is left alone. Lines never move and the
|
|
368
437
|
source maps are not touched.
|
|
369
438
|
- Idempotent: a second run rewrites nothing.
|
|
370
|
-
- It exits 2 and writes nothing when an alias names no emitted file, when
|
|
371
|
-
an alias
|
|
372
|
-
the
|
|
439
|
+
- It exits 2 and writes nothing when an alias names no emitted file, when it names a directory
|
|
440
|
+
(an alias names one file: `.../published-language/index`), when it is written in the spelling
|
|
441
|
+
the config does not ask for, when `import()` is given an alias completed at run time (a
|
|
442
|
+
template with an interpolation, a concatenation), or when the output directory does not
|
|
443
|
+
exist. Each refusal says the file, the line and what to write instead.
|
|
444
|
+
- A package is never touched, whatever its subpath ends with (`zod/v4/core.js`,
|
|
445
|
+
`@scope/package/file.js`, `node:fs`).
|
|
373
446
|
|
|
374
447
|
`--json` answers `{ outDir, files, changed, specifiers }`. `ddd-ts-kit check` reports a script
|
|
375
448
|
that compiles without this step (`imports/alias-declared`). The whole mechanism:
|
|
@@ -536,8 +609,9 @@ saying what to do instead. Exit code 1 when there is at least one error.
|
|
|
536
609
|
| `clean/file-size` | a file of more than 350 lines, sources and tests; a path with a segment `generated` and declaration files are exempt |
|
|
537
610
|
| `composition/only-in-module` | `new X`, or `bind(..).toClass(X, ..)` and `rebind(..).toClass(X, ..)`, of a class imported from `infrastructure/`, outside the module file, `main.ts`, the platform and tests; in a file importing `@ddd-ts-kit/di`, a call of `contextModule`, `discoverContext` or `.include(` outside those places and `apps/<context>/main.ts` |
|
|
538
611
|
| `imports/alias-only` | under the source root, `test/` and `scripts/`: an `import`, `export ... from` or `import()` with a relative specifier, the same directory included (the fix names the alias to write; `eslint --fix` writes it); an alias specifier with a `.` or `..` segment |
|
|
539
|
-
| `imports/
|
|
540
|
-
| `
|
|
612
|
+
| `imports/extension` | under the source root, `test/` and `scripts/`: with `importExtension` `none`, an alias specifier that ends with `.js`, `.mjs`, `.cjs`, `.ts`, `.mts` or `.cts`, or that names a directory holding an `index.ts`; with `js` (or no key), an alias specifier that does not end with `.js` (the fix names the specifier to write; `eslint --fix` writes it). A package subpath is never judged |
|
|
613
|
+
| `imports/alias-declared` | an `importAlias` that is not `@/` or `$<name>/`, or that is `$test/`, `$scripts/`, `$generated/`; a `paths` entry of `tsconfig.json` missing or different from what `importAlias` gives (the fix gives the entry); another `paths` entry under an alias; a `baseUrl`; a `tsconfig.build.json` whose `paths` differ; `paths` of `knip.json` mapping an alias; a script that compiles (`tsc` without `--noEmit`) and does not run `ddd-ts-kit build-aliases` afterwards; a script running `tsx --tsconfig` on another file; a `vitest` config at the root without `tsconfigPaths: true`, a `jest` config without the derived `moduleNameMapper` entries, or `.dependency-cruiser.cjs` without `tsConfig`; `module` and `moduleResolution` of `tsconfig.json` (or of a `tsconfig.build.json` that sets its own) that are not what `importExtension` gives: `ESNext`, `Bundler` and `customConditions` holding `node` under `none`, and under `js` a written value that is not a Node resolution; a jest mapping whose pattern does not end as the imports do. A project without `package.json` is not judged |
|
|
614
|
+
| `config/valid` | unknown upstream, classification, relationship, rule id, `guard` mode or `importExtension`; a context missing on disk or in the config; a `commit` limit that is not a positive integer |
|
|
541
615
|
| `config/suppression-needs-reason` | a suppression without a rule id or a reason (kept as an alias next to `governance/recorded-deviation`, which judges the reason) |
|
|
542
616
|
| `authz/declared` | in a module file, `builder.command(X)` or `builder.query(X)` without `.requires(` or `.public(` in its chain, unless the message class carries `@Requires` or `@Public` of `@ddd-ts-kit/kernel/declarations`; with manual or nest wiring, a command or query class absent from every `requires(X, ...)` and `publicUseCase(X)` of the module file and of `application/authorization/`; a `defineRoute` without `security` (the route type refuses it already, and an empty list too: this is the text-level net for a definition built loosely); in the declared style, the exported class of a `*.command.ts` or `*.query.ts` file carrying neither `@Requires` nor `@Public` |
|
|
543
617
|
| `authz/in-application` | `presentation/`: a test on roles, `isAdmin`, the import of an authorizer or of `Access`; `infrastructure/`: `authorize(` or `check(` on an authorizer or access, `ForbiddenError`; `domain/`: any import of `@ddd-ts-kit/auth`, of the actor types of the kernel (`Actor`, `ActorContext`, `Session`, `ExecutionContext`, the authorized messages), a read of `.roles` or `.permissions` on an actor. The request glue of `@ddd-ts-kit/auth` (`actorOf`, `sessionOf`, `resolveSession`, `SessionAuthenticator`) is free in `presentation/`. `presentation/` and `infrastructure/`: the import of `Requires`, `Public` or `Policy` from `@ddd-ts-kit/kernel/declarations`, or of the ports `Access` and `PolicyAccess` from `@ddd-ts-kit/auth`; they are free in `application/` |
|
|
@@ -552,11 +626,12 @@ saying what to do instead. Exit code 1 when there is at least one error.
|
|
|
552
626
|
| `context/extractable` | a module file importing another context outside its published language; persistence importing another context's infrastructure or naming its schema; a handler importing another context's repository; `export let` or an exported `new Map`, `Set`, `WeakMap` at module level; `deployable: true` without `apps/<context>/main.ts`; in the declared style, a role file importing anything of a port file of another context |
|
|
553
627
|
| `governance/recorded-deviation` | a `ddd-ts-kit-disable` or `eslint-disable` comment whose reason names no `ADR-<number>` with a file `docs/adr/<number>-*.md`; a rule set to `off` (or to `warn` below its default), an extra directory, an extra allowed package, a `guard` other than `enforce` or `stack.events` off the outbox, without a `deviations` entry `{ what, adr, reason }` pointing to an existing record |
|
|
554
628
|
| `declarations/role-declared` | declared style only: a role file (other than `*.command.ts` and `*.query.ts`, held by `authz/declared`; `*.job.ts` under `application/scheduling/` with `@Scheduled` and `*.publisher.ts` with `@DomainEventHandler` are roles) exporting no class with the decorator of its suffix and folder, or one carrying another declaration; a declared class in a file that is not a role file; a `consumer` or `name` option that is missing, empty, a variable, a concatenation or a template with a substitution; a `@DomainEventHandler` name that differs from the `name` literal of the imported event class; any declaration decorator on a class under `domain/` |
|
|
555
|
-
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<context>.declarations.ts` or one that differs from one `export *` per role file sorted by path; with `discovery`, a barrel that still exists. It needs the tree, so `check-file` does not run it |
|
|
629
|
+
| `declarations/barrel-current` | declared style only: with `stack.assembly: barrel`, a missing `<context>.declarations.ts` or one that differs from one `export *` per role file sorted by path followed by one `injected(Class, [Tokens])` per class whose constructor takes something (read from the signatures, with their imports); with `discovery`, a barrel that still exists, and a `<context>.dependencies.ts` that differs from those `injected` statements (absent is accepted while it would hold none). The message names the missing role file or the class whose list is stale. It needs the tree, so `check-file` does not run it |
|
|
630
|
+
| `declarations/constructor-injection` | declared style only, in a role file: on a class whose decorator lists nothing, a constructor parameter that is optional, has a default value, is a rest parameter or is destructured, has no type, or is typed by anything but one class name (type arguments aside): a union, an intersection, an array, a qualified name, a type of the language, an interface, a type alias, an enum or an unexported class of the file or of the file of the project it is imported from; a class that inherits its constructor from a class the project cannot read. Under `stack.dependencies: signature`, a decorator that carries a list although the constructor can be read: one that repeats it, one that differs |
|
|
556
631
|
| `ports/abstract-class` | in a port file (`domain/repositories/*.repository.ts`, `application/ports/*.port.ts`): a class that is not `abstract`; a member that is not an abstract method or property (`static readonly tokenKey = '<text>'` apart): a constructor, a body, an initializer, a `private`, `protected` or `#` member; an exported `interface` (a `type` alias, a data shape, is not reported) |
|
|
557
632
|
| `ports/implements-never-extends` | a class carrying `@Repository(P)`, `@Gateway(P)` or `@Adapter(P)`, or given to `bind(P).toClass(C)` or `rebind(P).toClass(C)`, without `implements P` or with `extends P`; under `infrastructure/`, a class extending a class imported from a port file |
|
|
558
633
|
| `ports/no-token-constant` | a call of `token` imported from a `@ddd-ts-kit/*` package; `Symbol(..)`, `Symbol.for(..)` or a string literal as the first argument of `bind`, `rebind`, `resolve`, `fake` or `override` in a file importing `@ddd-ts-kit/di`; an UPPER_SNAKE_CASE name in a dependency list; a file named `*.ports.ts` or `tokens.ts` |
|
|
559
|
-
| `ports/no-concrete-dependency` | a dependency list naming a class imported from `infrastructure/` or from `test/fakes/` of a context |
|
|
634
|
+
| `ports/no-concrete-dependency` | a dependency list naming a class imported from `infrastructure/` or from `test/fakes/` of a context; in the declared style, a constructor parameter of a declared class that lists nothing, typed by such a class |
|
|
560
635
|
| `ports/value-import` | a class named in a dependency list, or given to `bind` or `rebind`, imported with `import type` or `import { type X }` |
|
|
561
636
|
| `scheduling/job-triggers-use-case` | in `application/scheduling/*.job.ts`: an exported class that does not implement `ScheduledJob`; a `run` that sends no command (no `.execute(` call); a repository in the dependency list or the constructor; an import from `domain/aggregates/`, `domain/entities/`, `domain/services/` or `infrastructure/`. A `builder.job(..)` registration of a class that lives elsewhere |
|
|
562
637
|
| `scheduling/job-name` | the first argument of `@Scheduled(..)` or `.job(..)` that is not a string literal `<context>.<job-name>` in lower-case kebab-case with the context of its file; a `systemActor(..)` of a job file passing another name; one job name used twice in the project |
|
|
@@ -669,6 +744,14 @@ import is judged by every boundary rule exactly as the relative path to the same
|
|
|
669
744
|
`override` are binding calls only in a file that imports `@ddd-ts-kit/di`.
|
|
670
745
|
`ports/implements-never-extends` reads the bound class through one direct relative or alias
|
|
671
746
|
import; a class of a package or behind a barrel is not judged.
|
|
747
|
+
- The constructor of a declared class is read as text, by the scanner of the checker: the
|
|
748
|
+
constructor of the exported class that carries the decorator of its role file, its own or
|
|
749
|
+
the nearest one it inherits through imports of the project. A type imported from a package
|
|
750
|
+
is trusted to be a class (the compiler judges the generated file, which imports it as a
|
|
751
|
+
value); a type reached through a barrel is trusted too. A constructor overloaded by
|
|
752
|
+
signatures without a body, or built by a mixin, is not read: write one plain constructor.
|
|
753
|
+
`declarations/barrel-current` compares text exactly, so the generated file is never
|
|
754
|
+
reformatted by hand.
|
|
672
755
|
- `scheduling/job-triggers-use-case` takes any `.execute(` call in `run` for a command sent; a job
|
|
673
756
|
that executes something else, or sends its command from a helper, is misjudged.
|
|
674
757
|
`scheduling/job-name` compares literal names: a job registered under a computed name is reported
|
|
@@ -713,8 +796,8 @@ npm run clean:self --workspace ddd-ts-kit # the clean/* rules on this pack
|
|
|
713
796
|
npm run clean:packages --workspace ddd-ts-kit # the same rules on the sources of every other package
|
|
714
797
|
```
|
|
715
798
|
|
|
716
|
-
The slow suite lives in `test/e2e/`, in
|
|
717
|
-
generates every project with every kind, a job on an interval and one on a cron expression with a
|
|
799
|
+
The slow suite lives in `test/e2e/`, in its spec files and their support files; but for the
|
|
800
|
+
`first-minute` specs it generates every project with every kind, a job on an interval and one on a cron expression with a
|
|
718
801
|
time zone, `adapter --decorators`, `generate service` and `generate worker` included. It runs in
|
|
719
802
|
the process, without a container:
|
|
720
803
|
|
|
@@ -738,6 +821,23 @@ the process, without a container:
|
|
|
738
821
|
`--authz rebac --broker rabbitmq --ci gitlab`; and hand wiring (`--di manual`) on
|
|
739
822
|
`--authz abac --orm knex` and on
|
|
740
823
|
`--http fastify --orm knex --broker rabbitmq --cache redis --errors sentry --logger winston`.
|
|
824
|
+
- `first-minute.spec.ts`, `first-minute-proven.spec.ts`, `first-minute-no-context.spec.ts` and
|
|
825
|
+
`first-minute-two-contexts.spec.ts`: a
|
|
826
|
+
project is green from its first minute, before anything is generated. The first runs the quick
|
|
827
|
+
start of the root README line by line as it is written, on pnpm and, in the words the README
|
|
828
|
+
gives for it, on npm: `init` alone, the install and the `verify` the note of `init` names (also
|
|
829
|
+
held to the README and the `CLAUDE.md` of the project), then a context, a second one downstream
|
|
830
|
+
of it, a use case with its route, `docs:generate`, with a `verify` at each step; and the
|
|
831
|
+
sequence the defect of 0.1.0 was reported with, contexts asked of `init`. The second does the
|
|
832
|
+
same on the seven other proven stacks, one package manager each in turn: no context, one, two
|
|
833
|
+
with an upstream, a first use case. Both install for real from the packed kit and run in the
|
|
834
|
+
package manager jobs of the pipeline (`ci:test:managers`). The last two take every stack the
|
|
835
|
+
workspace can run, installed as a published kit would be, with no context and with two: no
|
|
836
|
+
finding of the four analyzers, specs that pass, a build, and the contracts `init` wrote equal to
|
|
837
|
+
what the scripts of the project generate.
|
|
838
|
+
- `package-managers.spec.ts`: one project per package manager on the default stack and on NestJS
|
|
839
|
+
with Prisma, every kind generated, installed for real from the packed kit: the frozen install of
|
|
840
|
+
a pipeline, the build, `verify`, and `affected` from the installed CLI.
|
|
741
841
|
- `first-class.spec.ts`: the first-class stack, `--validation class-validator --orm knex --authn
|
|
742
842
|
keycloak --authz rebac --cache redis --audit on --errors sentry --logger pino --style declared`
|
|
743
843
|
(legacy decorator mode), three times, with `--broker redis` (one server for the cache and the
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paths that differ between `base` and `head`, relative to the project at `root`; a path of
|
|
3
|
+
* the repository outside the project keeps a leading `../`. A rename is its old path and its new
|
|
4
|
+
* one. Undefined when git cannot tell (not a repository, an unknown ref, a shallow clone without
|
|
5
|
+
* the base): the caller then selects everything.
|
|
6
|
+
*/
|
|
7
|
+
export declare function changedPaths(root: string, base: string, head: string): string[] | undefined;
|
|
8
|
+
//# sourceMappingURL=changed-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed-paths.d.ts","sourceRoot":"","sources":["../../src/affected/changed-paths.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAc3F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { runGit } from '../commit/run-git.js';
|
|
2
|
+
/**
|
|
3
|
+
* The paths that differ between `base` and `head`, relative to the project at `root`; a path of
|
|
4
|
+
* the repository outside the project keeps a leading `../`. A rename is its old path and its new
|
|
5
|
+
* one. Undefined when git cannot tell (not a repository, an unknown ref, a shallow clone without
|
|
6
|
+
* the base): the caller then selects everything.
|
|
7
|
+
*/
|
|
8
|
+
export function changedPaths(root, base, head) {
|
|
9
|
+
const prefix = runGit(root, ['rev-parse', '--show-prefix'])?.trim();
|
|
10
|
+
// Three dots would need the history between the two; the merge base is asked for and used when the clone has it.
|
|
11
|
+
const from = runGit(root, ['merge-base', base, head])?.trim() || base;
|
|
12
|
+
const diff = runGit(root, ['diff', '--name-only', '--no-renames', '-z', from, head]);
|
|
13
|
+
if (prefix === undefined || diff === undefined) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return diff
|
|
17
|
+
.split('\0')
|
|
18
|
+
.filter((file) => file !== '')
|
|
19
|
+
.map((file) => (file.startsWith(prefix) ? file.slice(prefix.length) : `../${file}`));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=changed-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed-paths.js","sourceRoot":"","sources":["../../src/affected/changed-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,IAAY;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACpE,iHAAiH;IACjH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;IACtE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAErF,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,IAAI;SACR,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC;SAC7B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Config } from '../config/index.js';
|
|
2
|
+
/** Every context that declares `context` as an upstream, directly or through another: the context map read as a dependency graph. */
|
|
3
|
+
export declare function downstreamsOf(config: Config, context: string): string[];
|
|
4
|
+
//# sourceMappingURL=downstreams-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downstreams-of.d.ts","sourceRoot":"","sources":["../../src/affected/downstreams-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qIAAqI;AACrI,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAgBvE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Every context that declares `context` as an upstream, directly or through another: the context map read as a dependency graph. */
|
|
2
|
+
export function downstreamsOf(config, context) {
|
|
3
|
+
const reached = new Set();
|
|
4
|
+
const pending = [context];
|
|
5
|
+
for (let current = pending.pop(); current !== undefined; current = pending.pop()) {
|
|
6
|
+
for (const [name, { upstreams }] of Object.entries(config.contexts)) {
|
|
7
|
+
if (!reached.has(name) && upstreams.some((upstream) => upstream.context === current)) {
|
|
8
|
+
reached.add(name);
|
|
9
|
+
pending.push(name);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
reached.delete(context);
|
|
14
|
+
return [...reached];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=downstreams-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downstreams-of.js","sourceRoot":"","sources":["../../src/affected/downstreams-of.ts"],"names":[],"mappings":"AAEA,qIAAqI;AACrI,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,OAAe;IAC3D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1B,KAAK,IAAI,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,KAAK,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACjF,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,OAAO,CAAC,EAAE,CAAC;gBACrF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAClB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAExB,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Config } from '../config/index.js';
|
|
2
|
+
import type { Selection } from './selection.js';
|
|
3
|
+
/** The whole project: no context left out, which is what the default branch and the nightly run always get. */
|
|
4
|
+
export declare function everything(config: Config, reason: string): Selection;
|
|
5
|
+
//# sourceMappingURL=everything.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"everything.d.ts","sourceRoot":"","sources":["../../src/affected/everything.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,+GAA+G;AAC/G,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAEpE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The whole project: no context left out, which is what the default branch and the nightly run always get. */
|
|
2
|
+
export function everything(config, reason) {
|
|
3
|
+
return { scope: 'all', reason, contexts: Object.keys(config.contexts), specs: ['**/*.spec.ts'], leftOut: [] };
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=everything.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"everything.js","sourceRoot":"","sources":["../../src/affected/everything.ts"],"names":[],"mappings":"AAGA,+GAA+G;AAC/G,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,MAAc;IACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAChH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Selection } from './selection.js';
|
|
2
|
+
/**
|
|
3
|
+
* The selection for a reader (`text`), as data (`json`), or as `key=value` lines: `github` for
|
|
4
|
+
* `$GITHUB_OUTPUT`, `env` (keys in upper case behind `AFFECTED_`) for a GitLab `dotenv` report.
|
|
5
|
+
* The keys: `scope` (`all`, `contexts` or `none`); `contexts`, comma separated, which the test
|
|
6
|
+
* runner reads as `DDD_TS_KIT_AFFECTED` (empty for `all`: nothing is left out); `args`, the
|
|
7
|
+
* arguments a partial run adds to the test runner; `lint`, the ones it adds to the linter.
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatSelection(selection: Selection, format: string): string;
|
|
10
|
+
//# sourceMappingURL=format-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-selection.d.ts","sourceRoot":"","sources":["../../src/affected/format-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMhD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAc5E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Lets a partial run pass when a selected context has no spec of one kind. */
|
|
2
|
+
const PARTIAL_RUN = '--passWithNoTests';
|
|
3
|
+
const ENV_PREFIX = 'AFFECTED_';
|
|
4
|
+
/**
|
|
5
|
+
* The selection for a reader (`text`), as data (`json`), or as `key=value` lines: `github` for
|
|
6
|
+
* `$GITHUB_OUTPUT`, `env` (keys in upper case behind `AFFECTED_`) for a GitLab `dotenv` report.
|
|
7
|
+
* The keys: `scope` (`all`, `contexts` or `none`); `contexts`, comma separated, which the test
|
|
8
|
+
* runner reads as `DDD_TS_KIT_AFFECTED` (empty for `all`: nothing is left out); `args`, the
|
|
9
|
+
* arguments a partial run adds to the test runner; `lint`, the ones it adds to the linter.
|
|
10
|
+
*/
|
|
11
|
+
export function formatSelection(selection, format) {
|
|
12
|
+
if (format === 'json') {
|
|
13
|
+
return JSON.stringify(selection, null, 2);
|
|
14
|
+
}
|
|
15
|
+
if (format === 'text') {
|
|
16
|
+
return text(selection);
|
|
17
|
+
}
|
|
18
|
+
const key = (name) => (format === 'env' ? `${ENV_PREFIX}${name.toUpperCase()}` : name);
|
|
19
|
+
return Object.entries(values(selection))
|
|
20
|
+
.map(([name, value]) => `${key(name)}=${value}`)
|
|
21
|
+
.join('\n');
|
|
22
|
+
}
|
|
23
|
+
function values(selection) {
|
|
24
|
+
const partial = selection.scope === 'contexts';
|
|
25
|
+
return {
|
|
26
|
+
scope: selection.scope,
|
|
27
|
+
contexts: partial ? selection.contexts.join(',') : '',
|
|
28
|
+
args: partial ? PARTIAL_RUN : '',
|
|
29
|
+
lint: selection.leftOut.map((directory) => `--ignore-pattern ${directory}`).join(' '),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function text(selection) {
|
|
33
|
+
if (selection.scope === 'all') {
|
|
34
|
+
return `Everything is affected: ${selection.reason}.`;
|
|
35
|
+
}
|
|
36
|
+
if (selection.scope === 'none') {
|
|
37
|
+
return `Nothing that runs is affected: ${selection.reason}.`;
|
|
38
|
+
}
|
|
39
|
+
return [
|
|
40
|
+
`Affected contexts: ${selection.contexts.join(', ')} (${selection.reason}).`,
|
|
41
|
+
`Specs: ${selection.specs.join(' ')}`,
|
|
42
|
+
`Left to the default branch: ${selection.leftOut.join(' ')}`,
|
|
43
|
+
].join('\n');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=format-selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-selection.js","sourceRoot":"","sources":["../../src/affected/format-selection.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,MAAM,WAAW,GAAG,mBAAmB,CAAC;AACxC,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,SAAoB,EAAE,MAAc;IAClE,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,GAAG,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEvG,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SACrC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;SAC/C,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,MAAM,CAAC,SAAoB;IAClC,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,KAAK,UAAU,CAAC;IAE/C,OAAO;QACL,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QACrD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;QAChC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAoB;IAChC,IAAI,SAAS,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QAC9B,OAAO,2BAA2B,SAAS,CAAC,MAAM,GAAG,CAAC;IACxD,CAAC;IAED,IAAI,SAAS,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;QAC/B,OAAO,kCAAkC,SAAS,CAAC,MAAM,GAAG,CAAC;IAC/D,CAAC;IAED,OAAO;QACL,sBAAsB,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,MAAM,IAAI;QAC5E,UAAU,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACrC,+BAA+B,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;KAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** What one changed path reaches: one context (its specs alone when only its tests changed), everything, or nothing that runs. */
|
|
2
|
+
export type PathReach = {
|
|
3
|
+
readonly kind: 'context';
|
|
4
|
+
readonly context: string;
|
|
5
|
+
readonly testsOnly: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'everything';
|
|
8
|
+
readonly reason: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'nothing';
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=path-reach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-reach.d.ts","sourceRoot":"","sources":["../../src/affected/path-reach.ts"],"names":[],"mappings":"AAAA,kIAAkI;AAClI,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GACnF;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-reach.js","sourceRoot":"","sources":["../../src/affected/path-reach.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config } from '../config/index.js';
|
|
2
|
+
import type { PathReach } from './path-reach.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a changed path, relative to the project root, reaches. A path under a declared context
|
|
5
|
+
* reaches that context; a document reaches nothing; anything else (the shared kernel, the
|
|
6
|
+
* platform, the composition root, the configuration, the lockfile, the tooling, the pipeline, a
|
|
7
|
+
* context the config does not declare, a path nobody listed) reaches everything.
|
|
8
|
+
*/
|
|
9
|
+
export declare function reachOf(config: Config, file: string): PathReach;
|
|
10
|
+
//# sourceMappingURL=reach-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reach-of.d.ts","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAY/D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Written for people and agents, never loaded by a spec, a build or a tool of the pipeline other than the documents gate, which always runs. */
|
|
2
|
+
const DOCUMENT_DIRECTORIES = ['docs/', 'openapi/', '.claude/'];
|
|
3
|
+
/**
|
|
4
|
+
* What a changed path, relative to the project root, reaches. A path under a declared context
|
|
5
|
+
* reaches that context; a document reaches nothing; anything else (the shared kernel, the
|
|
6
|
+
* platform, the composition root, the configuration, the lockfile, the tooling, the pipeline, a
|
|
7
|
+
* context the config does not declare, a path nobody listed) reaches everything.
|
|
8
|
+
*/
|
|
9
|
+
export function reachOf(config, file) {
|
|
10
|
+
const contexts = `${config.contextsDir}/`;
|
|
11
|
+
if (file.startsWith(contexts)) {
|
|
12
|
+
return contextReach(config, file.slice(contexts.length));
|
|
13
|
+
}
|
|
14
|
+
if (isDocument(file)) {
|
|
15
|
+
return { kind: 'nothing' };
|
|
16
|
+
}
|
|
17
|
+
return { kind: 'everything', reason: `${file} is shared by every context` };
|
|
18
|
+
}
|
|
19
|
+
function contextReach(config, inside) {
|
|
20
|
+
const [context = '', ...rest] = inside.split('/');
|
|
21
|
+
if (rest.length === 0 || config.contexts[context] === undefined) {
|
|
22
|
+
return { kind: 'everything', reason: `${config.contextsDir}/${inside} belongs to no declared context` };
|
|
23
|
+
}
|
|
24
|
+
return { kind: 'context', context, testsOnly: rest[0] === 'test' };
|
|
25
|
+
}
|
|
26
|
+
function isDocument(file) {
|
|
27
|
+
const atRoot = !file.includes('/');
|
|
28
|
+
return (atRoot && file.endsWith('.md')) || DOCUMENT_DIRECTORIES.some((directory) => file.startsWith(directory));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=reach-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reach-of.js","sourceRoot":"","sources":["../../src/affected/reach-of.ts"],"names":[],"mappings":"AAGA,iJAAiJ;AACjJ,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,MAAc,EAAE,IAAY;IAClD,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC;IAE1C,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,6BAA6B,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,MAAc;IAClD,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QAChE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,iCAAiC,EAAE,CAAC;IAC1G,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEnC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Config } from '../config/index.js';
|
|
2
|
+
import type { Selection } from './selection.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a change set has to run. A context whose sources changed is selected with every context
|
|
5
|
+
* downstream of it; a context whose tests alone changed is selected alone (no other context may
|
|
6
|
+
* import them); one path that is shared, or that nobody listed, selects everything. The
|
|
7
|
+
* selection is never narrower than the declared dependencies: `context/declared-relationship`
|
|
8
|
+
* keeps the imports inside them, and that rule runs on the whole project in every pipeline.
|
|
9
|
+
*/
|
|
10
|
+
export declare function selectAffected(config: Config, changed: readonly string[]): Selection;
|
|
11
|
+
//# sourceMappingURL=select-affected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-affected.d.ts","sourceRoot":"","sources":["../../src/affected/select-affected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAKjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CA2BpF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { downstreamsOf } from './downstreams-of.js';
|
|
2
|
+
import { everything } from './everything.js';
|
|
3
|
+
import { reachOf } from './reach-of.js';
|
|
4
|
+
/**
|
|
5
|
+
* What a change set has to run. A context whose sources changed is selected with every context
|
|
6
|
+
* downstream of it; a context whose tests alone changed is selected alone (no other context may
|
|
7
|
+
* import them); one path that is shared, or that nobody listed, selects everything. The
|
|
8
|
+
* selection is never narrower than the declared dependencies: `context/declared-relationship`
|
|
9
|
+
* keeps the imports inside them, and that rule runs on the whole project in every pipeline.
|
|
10
|
+
*/
|
|
11
|
+
export function selectAffected(config, changed) {
|
|
12
|
+
const reaches = changed.map((file) => reachOf(config, file));
|
|
13
|
+
const shared = reaches.find((reach) => reach.kind === 'everything');
|
|
14
|
+
if (shared !== undefined) {
|
|
15
|
+
return everything(config, shared.reason);
|
|
16
|
+
}
|
|
17
|
+
const selected = new Set(reaches.flatMap((reach) => contextsOf(config, reach)));
|
|
18
|
+
const declared = Object.keys(config.contexts);
|
|
19
|
+
const contexts = declared.filter((context) => selected.has(context));
|
|
20
|
+
if (contexts.length === 0) {
|
|
21
|
+
const reason = changed.length === 0 ? 'no file changed' : 'only documents changed';
|
|
22
|
+
return { scope: 'none', reason, contexts: [], specs: [], leftOut: [] };
|
|
23
|
+
}
|
|
24
|
+
const directory = (context) => `${config.contextsDir}/${context}/`;
|
|
25
|
+
return {
|
|
26
|
+
scope: contexts.length === declared.length ? 'all' : 'contexts',
|
|
27
|
+
reason: 'the changed contexts and the contexts downstream of them in the context map',
|
|
28
|
+
contexts,
|
|
29
|
+
specs: [...contexts.map((context) => `${directory(context)}**/*.spec.ts`), `!${config.contextsDir}/**`],
|
|
30
|
+
leftOut: declared.filter((context) => !selected.has(context)).map(directory),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function contextsOf(config, reach) {
|
|
34
|
+
if (reach.kind !== 'context') {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
return reach.testsOnly ? [reach.context] : [reach.context, ...downstreamsOf(config, reach.context)];
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=select-affected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-affected.js","sourceRoot":"","sources":["../../src/affected/select-affected.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,OAA0B;IACvE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;IAEpE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IAErE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,wBAAwB,CAAC;QAEnF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzE,CAAC;IAED,MAAM,SAAS,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,OAAO,GAAG,CAAC;IAEnF,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;QAC/D,MAAM,EAAE,6EAA6E;QACrF,QAAQ;QACR,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,MAAM,CAAC,WAAW,KAAK,CAAC;QACvG,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;KAC7E,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,MAAc,EAAE,KAAgB;IAClD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACtG,CAAC"}
|