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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Starts the PostgreSQL the specs run against and waits until it accepts connections.
|
|
3
|
+
# A `services:` container is pulled once, before the job, and one refusal of a registry fails
|
|
4
|
+
# the run (a public mirror answered "toomanyrequests" once): here the image is pulled with
|
|
5
|
+
# retries, from the next registry when one refuses.
|
|
6
|
+
set -eu
|
|
7
|
+
|
|
8
|
+
IMAGE="${POSTGRES_IMAGE:-postgres:18}"
|
|
9
|
+
REGISTRIES="${POSTGRES_REGISTRIES:-mirror.gcr.io/library public.ecr.aws/docker/library docker.io/library}"
|
|
10
|
+
|
|
11
|
+
pulled=""
|
|
12
|
+
|
|
13
|
+
for attempt in 1 2 3; do
|
|
14
|
+
for registry in $REGISTRIES; do
|
|
15
|
+
if docker pull --quiet "$registry/$IMAGE"; then
|
|
16
|
+
pulled="$registry/$IMAGE"
|
|
17
|
+
break 2
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo "Pulling $registry/$IMAGE failed (attempt $attempt)."
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
sleep $((attempt * 5))
|
|
24
|
+
done
|
|
25
|
+
|
|
26
|
+
if [ -z "$pulled" ]; then
|
|
27
|
+
echo "No registry served $IMAGE." >&2
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
docker run --detach --name postgres --publish 5432:5432 \
|
|
32
|
+
--env POSTGRES_USER=app --env POSTGRES_PASSWORD=app --env POSTGRES_DB=app \
|
|
33
|
+
--health-cmd "pg_isready -U app -d app" --health-interval 2s --health-timeout 3s --health-retries 30 \
|
|
34
|
+
"$pulled" > /dev/null
|
|
35
|
+
|
|
36
|
+
for second in $(seq 1 60); do
|
|
37
|
+
if [ "$(docker inspect --format '{{.State.Health.Status}}' postgres)" = "healthy" ]; then
|
|
38
|
+
echo "PostgreSQL is ready ($pulled, ${second}s)."
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
sleep 1
|
|
43
|
+
done
|
|
44
|
+
|
|
45
|
+
docker logs postgres >&2
|
|
46
|
+
echo "PostgreSQL did not become healthy." >&2
|
|
47
|
+
exit 1
|
|
@@ -4,29 +4,39 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches: [main]
|
|
6
6
|
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
# Every night, everything: a pull request runs the specs of the contexts its change reaches.
|
|
9
|
+
- cron: '0 3 * * *'
|
|
7
10
|
|
|
8
11
|
concurrency:
|
|
9
12
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
-
|
|
13
|
+
# A newer commit of a pull request supersedes the run in progress; the default branch finishes every run.
|
|
14
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
11
15
|
|
|
12
16
|
permissions:
|
|
13
17
|
contents: read
|
|
14
18
|
|
|
15
|
-
env:
|
|
16
|
-
NODE_VERSION: 24
|
|
17
|
-
|
|
18
19
|
jobs:
|
|
19
20
|
install:
|
|
20
21
|
name: Install
|
|
21
22
|
runs-on: ubuntu-latest
|
|
22
23
|
timeout-minutes: 10
|
|
24
|
+
outputs:
|
|
25
|
+
scope: ${{ steps.affected.outputs.scope }}
|
|
26
|
+
contexts: ${{ steps.affected.outputs.contexts }}
|
|
27
|
+
args: ${{ steps.affected.outputs.args }}
|
|
28
|
+
lint: ${{ steps.affected.outputs.lint }}
|
|
23
29
|
steps:
|
|
24
30
|
- uses: actions/checkout@v7
|
|
25
|
-
- uses: actions/setup-node@v7
|
|
26
31
|
with:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
32
|
+
# A pull request is checked out as its merge commit, whose first parent is the base it is compared with.
|
|
33
|
+
fetch-depth: 2
|
|
34
|
+
- uses: ./.github/actions/setup
|
|
35
|
+
- name: What this run covers (everything on the default branch and at night, the affected contexts on a pull request)
|
|
36
|
+
id: affected
|
|
37
|
+
env:
|
|
38
|
+
BASE: ${{ github.event_name == 'pull_request' && 'HEAD^1' || '' }}
|
|
39
|
+
run: npx --no -- ddd-ts-kit affected --base "$BASE" --format github | tee -a "$GITHUB_OUTPUT"
|
|
30
40
|
|
|
31
41
|
typecheck:
|
|
32
42
|
name: Typecheck
|
|
@@ -35,11 +45,7 @@ jobs:
|
|
|
35
45
|
timeout-minutes: 10
|
|
36
46
|
steps:
|
|
37
47
|
- uses: actions/checkout@v7
|
|
38
|
-
- uses: actions/setup
|
|
39
|
-
with:
|
|
40
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
41
|
-
cache: npm
|
|
42
|
-
- run: npm ci
|
|
48
|
+
- uses: ./.github/actions/setup
|
|
43
49
|
- run: npm run ci:typecheck
|
|
44
50
|
|
|
45
51
|
lint:
|
|
@@ -49,13 +55,12 @@ jobs:
|
|
|
49
55
|
timeout-minutes: 10
|
|
50
56
|
steps:
|
|
51
57
|
- uses: actions/checkout@v7
|
|
52
|
-
- uses: actions/setup
|
|
53
|
-
with:
|
|
54
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
55
|
-
cache: npm
|
|
56
|
-
- run: npm ci
|
|
58
|
+
- uses: ./.github/actions/setup
|
|
57
59
|
- run: npm run ci:format
|
|
58
|
-
-
|
|
60
|
+
- name: Lint (the contexts a pull request does not reach are left to the default branch)
|
|
61
|
+
env:
|
|
62
|
+
LINT: ${{ needs.install.outputs.lint }}
|
|
63
|
+
run: npm run ci:lint -- $LINT
|
|
59
64
|
|
|
60
65
|
architecture:
|
|
61
66
|
name: Architecture
|
|
@@ -64,11 +69,7 @@ jobs:
|
|
|
64
69
|
timeout-minutes: 10
|
|
65
70
|
steps:
|
|
66
71
|
- uses: actions/checkout@v7
|
|
67
|
-
- uses: actions/setup
|
|
68
|
-
with:
|
|
69
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
70
|
-
cache: npm
|
|
71
|
-
- run: npm ci
|
|
72
|
+
- uses: ./.github/actions/setup
|
|
72
73
|
- name: Architecture rules
|
|
73
74
|
run: npm run ci:arch:check -- --format github
|
|
74
75
|
- name: Dependency graph
|
|
@@ -81,26 +82,23 @@ jobs:
|
|
|
81
82
|
timeout-minutes: 10
|
|
82
83
|
steps:
|
|
83
84
|
- uses: actions/checkout@v7
|
|
84
|
-
- uses: actions/setup
|
|
85
|
-
with:
|
|
86
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
87
|
-
cache: npm
|
|
88
|
-
- run: npm ci
|
|
85
|
+
- uses: ./.github/actions/setup
|
|
89
86
|
- run: npm run ci:deadcode
|
|
90
87
|
|
|
91
88
|
unit:
|
|
92
89
|
name: Unit tests
|
|
93
|
-
needs:
|
|
90
|
+
needs: install
|
|
94
91
|
runs-on: ubuntu-latest
|
|
95
92
|
timeout-minutes: 15
|
|
96
93
|
steps:
|
|
97
94
|
- uses: actions/checkout@v7
|
|
98
|
-
- uses: actions/setup
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
- uses: ./.github/actions/setup
|
|
96
|
+
- name: Unit specs, each context held to its coverage thresholds
|
|
97
|
+
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
98
|
+
env:
|
|
99
|
+
DDD_TS_KIT_AFFECTED: ${{ needs.install.outputs.contexts }}
|
|
100
|
+
PARTIAL: ${{ needs.install.outputs.args }}
|
|
101
|
+
run: npm run ci:test:unit -- $PARTIAL
|
|
104
102
|
- uses: actions/upload-artifact@v7
|
|
105
103
|
if: ${{ !cancelled() }}
|
|
106
104
|
with:
|
|
@@ -111,79 +109,57 @@ jobs:
|
|
|
111
109
|
|
|
112
110
|
integration:
|
|
113
111
|
name: Integration tests
|
|
114
|
-
needs:
|
|
112
|
+
needs: install
|
|
115
113
|
runs-on: ubuntu-latest
|
|
116
114
|
timeout-minutes: 20
|
|
117
115
|
env:
|
|
118
116
|
DATABASE_URL: postgres://app:app@localhost:5432/app
|
|
119
|
-
services:
|
|
120
|
-
postgres:
|
|
121
|
-
image: public.ecr.aws/docker/library/postgres:18
|
|
122
|
-
env:
|
|
123
|
-
POSTGRES_USER: app
|
|
124
|
-
POSTGRES_PASSWORD: app
|
|
125
|
-
POSTGRES_DB: app
|
|
126
|
-
ports:
|
|
127
|
-
- 5432:5432
|
|
128
|
-
options: >-
|
|
129
|
-
--health-cmd "pg_isready -U app -d app"
|
|
130
|
-
--health-interval 2s
|
|
131
|
-
--health-timeout 3s
|
|
132
|
-
--health-retries 30
|
|
133
117
|
steps:
|
|
134
118
|
- uses: actions/checkout@v7
|
|
135
|
-
- uses: actions/setup
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
-
|
|
119
|
+
- uses: ./.github/actions/setup
|
|
120
|
+
- name: PostgreSQL
|
|
121
|
+
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
122
|
+
run: sh .github/scripts/start-postgres.sh
|
|
123
|
+
- if: ${{ needs.install.outputs.scope != 'none' }}
|
|
124
|
+
run: npm run db:migrate
|
|
125
|
+
- name: Integration specs, each context held to its coverage thresholds
|
|
126
|
+
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
127
|
+
env:
|
|
128
|
+
DDD_TS_KIT_AFFECTED: ${{ needs.install.outputs.contexts }}
|
|
129
|
+
PARTIAL: ${{ needs.install.outputs.args }}
|
|
130
|
+
run: npm run ci:test:integration -- $PARTIAL
|
|
142
131
|
|
|
143
132
|
e2e:
|
|
144
133
|
name: End-to-end tests
|
|
145
|
-
needs:
|
|
134
|
+
needs: install
|
|
146
135
|
runs-on: ubuntu-latest
|
|
147
136
|
timeout-minutes: 20
|
|
148
137
|
env:
|
|
149
138
|
DATABASE_URL: postgres://app:app@localhost:5432/app
|
|
150
|
-
services:
|
|
151
|
-
postgres:
|
|
152
|
-
image: public.ecr.aws/docker/library/postgres:18
|
|
153
|
-
env:
|
|
154
|
-
POSTGRES_USER: app
|
|
155
|
-
POSTGRES_PASSWORD: app
|
|
156
|
-
POSTGRES_DB: app
|
|
157
|
-
ports:
|
|
158
|
-
- 5432:5432
|
|
159
|
-
options: >-
|
|
160
|
-
--health-cmd "pg_isready -U app -d app"
|
|
161
|
-
--health-interval 2s
|
|
162
|
-
--health-timeout 3s
|
|
163
|
-
--health-retries 30
|
|
164
139
|
steps:
|
|
165
140
|
- uses: actions/checkout@v7
|
|
166
|
-
- uses: actions/setup
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
-
|
|
141
|
+
- uses: ./.github/actions/setup
|
|
142
|
+
- name: PostgreSQL
|
|
143
|
+
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
144
|
+
run: sh .github/scripts/start-postgres.sh
|
|
145
|
+
- if: ${{ needs.install.outputs.scope != 'none' }}
|
|
146
|
+
run: npm run db:migrate
|
|
147
|
+
- name: End-to-end specs (the whole application, whatever the contexts a change reaches)
|
|
148
|
+
if: ${{ needs.install.outputs.scope != 'none' }}
|
|
149
|
+
run: npm run ci:test:e2e
|
|
173
150
|
|
|
174
|
-
|
|
175
|
-
name:
|
|
176
|
-
needs:
|
|
151
|
+
build:
|
|
152
|
+
name: Build, docs and contract drift
|
|
153
|
+
needs: install
|
|
177
154
|
runs-on: ubuntu-latest
|
|
178
155
|
timeout-minutes: 10
|
|
179
156
|
steps:
|
|
180
157
|
- uses: actions/checkout@v7
|
|
181
|
-
- uses: actions/setup
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- run: npm run ci:docs
|
|
158
|
+
- uses: ./.github/actions/setup
|
|
159
|
+
- name: The production build
|
|
160
|
+
run: npm run ci:build
|
|
161
|
+
- name: Generated documents and contracts, from that build
|
|
162
|
+
run: npm run ci:docs
|
|
187
163
|
|
|
188
164
|
security:
|
|
189
165
|
name: Security
|
|
@@ -194,11 +170,7 @@ jobs:
|
|
|
194
170
|
- uses: actions/checkout@v7
|
|
195
171
|
with:
|
|
196
172
|
fetch-depth: 0
|
|
197
|
-
- uses: actions/setup
|
|
198
|
-
with:
|
|
199
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
200
|
-
cache: npm
|
|
201
|
-
- run: npm ci
|
|
173
|
+
- uses: ./.github/actions/setup
|
|
202
174
|
- name: Production dependencies audit
|
|
203
175
|
run: npm run ci:audit
|
|
204
176
|
- name: Dependency review
|
|
@@ -210,23 +182,9 @@ jobs:
|
|
|
210
182
|
if: ${{ !cancelled() }}
|
|
211
183
|
run: docker run --rm --volume "$GITHUB_WORKSPACE:/repo" ghcr.io/gitleaks/gitleaks:v8.30.1 git /repo --redact --no-banner
|
|
212
184
|
|
|
213
|
-
build:
|
|
214
|
-
name: Build
|
|
215
|
-
needs: e2e
|
|
216
|
-
runs-on: ubuntu-latest
|
|
217
|
-
timeout-minutes: 10
|
|
218
|
-
steps:
|
|
219
|
-
- uses: actions/checkout@v7
|
|
220
|
-
- uses: actions/setup-node@v7
|
|
221
|
-
with:
|
|
222
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
223
|
-
cache: npm
|
|
224
|
-
- run: npm ci
|
|
225
|
-
- run: npm run ci:build
|
|
226
|
-
|
|
227
185
|
image:
|
|
228
186
|
name: Docker image
|
|
229
|
-
needs:
|
|
187
|
+
needs: install
|
|
230
188
|
runs-on: ubuntu-latest
|
|
231
189
|
timeout-minutes: 20
|
|
232
190
|
steps:
|
|
@@ -243,7 +201,7 @@ jobs:
|
|
|
243
201
|
gate:
|
|
244
202
|
name: gate
|
|
245
203
|
if: ${{ always() }}
|
|
246
|
-
needs: [install, typecheck, lint, architecture, deadcode, unit, integration, e2e,
|
|
204
|
+
needs: [install, typecheck, lint, architecture, deadcode, unit, integration, e2e, build, security, image]
|
|
247
205
|
runs-on: ubuntu-latest
|
|
248
206
|
timeout-minutes: 5
|
|
249
207
|
steps:
|
|
@@ -18,11 +18,7 @@ jobs:
|
|
|
18
18
|
timeout-minutes: 5
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v7
|
|
21
|
-
- uses: actions/setup
|
|
22
|
-
with:
|
|
23
|
-
node-version: 24
|
|
24
|
-
cache: npm
|
|
25
|
-
- run: npm ci
|
|
21
|
+
- uses: ./.github/actions/setup
|
|
26
22
|
- name: The title is a conventional commit subject
|
|
27
23
|
env:
|
|
28
24
|
TITLE: ${{ github.event.pull_request.title }}
|
|
@@ -4,6 +4,8 @@ workflow:
|
|
|
4
4
|
rules:
|
|
5
5
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
6
6
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
7
|
+
# A pipeline schedule (Build > Pipeline schedules, every night on the default branch) runs everything.
|
|
8
|
+
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
7
9
|
|
|
8
10
|
include:
|
|
9
11
|
- template: Jobs/SAST.gitlab-ci.yml
|
|
@@ -14,32 +16,47 @@ include:
|
|
|
14
16
|
|
|
15
17
|
stages:
|
|
16
18
|
- install
|
|
17
|
-
- static
|
|
18
19
|
- test
|
|
19
|
-
- verify
|
|
20
20
|
- security
|
|
21
|
-
- package
|
|
22
21
|
- gate
|
|
23
22
|
|
|
24
23
|
variables:
|
|
25
24
|
AST_ENABLE_MR_PIPELINES: 'true'
|
|
26
25
|
NODE_IMAGE: node:24-bookworm-slim
|
|
26
|
+
# Behind the dependency proxy of a group, a registry that rate-limits is never asked twice:
|
|
27
|
+
# POSTGRES_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/postgres:18
|
|
27
28
|
POSTGRES_IMAGE: postgres:18
|
|
28
29
|
|
|
29
30
|
default:
|
|
31
|
+
# A newer commit of a merge request supersedes the pipeline in progress; the default branch finishes every pipeline.
|
|
30
32
|
interruptible: true
|
|
31
|
-
|
|
33
|
+
# An image that could not be pulled (a registry that rate-limits once) or a runner that failed is tried again; a failing script is not.
|
|
34
|
+
retry:
|
|
35
|
+
max: 2
|
|
36
|
+
when: [runner_system_failure, stuck_or_timeout_failure, scheduler_failure]
|
|
37
|
+
|
|
38
|
+
# One install per lockfile, shared by every job and every pipeline. The key holds the lockfile
|
|
39
|
+
# and package.json: a hit is what a fresh install of that lockfile gives. A job that finds no
|
|
40
|
+
# cache installs.
|
|
32
41
|
.node:
|
|
33
42
|
image: $NODE_IMAGE
|
|
34
43
|
cache:
|
|
35
44
|
key:
|
|
36
45
|
files:
|
|
37
46
|
- package-lock.json
|
|
47
|
+
- package.json
|
|
38
48
|
paths:
|
|
39
|
-
-
|
|
49
|
+
- node_modules/
|
|
40
50
|
policy: pull
|
|
41
51
|
before_script:
|
|
42
|
-
|
|
52
|
+
{{#if pm.corepack}}
|
|
53
|
+
- corepack enable
|
|
54
|
+
{{/if}}
|
|
55
|
+
- test -d node_modules || npm ci
|
|
56
|
+
{{#if orm.prisma}}
|
|
57
|
+
# The Prisma client and the schema of the tests are build products of prisma/schema.prisma.
|
|
58
|
+
- npm run db:client
|
|
59
|
+
{{/if}}
|
|
43
60
|
|
|
44
61
|
.postgres:
|
|
45
62
|
services:
|
|
@@ -61,19 +78,28 @@ default:
|
|
|
61
78
|
install:
|
|
62
79
|
extends: .node
|
|
63
80
|
stage: install
|
|
81
|
+
# The image with git: what a merge request covers is read from the difference with its target.
|
|
82
|
+
image: node:24-bookworm
|
|
64
83
|
cache:
|
|
65
84
|
key:
|
|
66
85
|
files:
|
|
67
86
|
- package-lock.json
|
|
87
|
+
- package.json
|
|
68
88
|
paths:
|
|
69
|
-
-
|
|
89
|
+
- node_modules/
|
|
70
90
|
policy: pull-push
|
|
71
91
|
script:
|
|
72
|
-
- node --version
|
|
92
|
+
- node --version
|
|
93
|
+
- if [ -n "${CI_MERGE_REQUEST_DIFF_BASE_SHA:-}" ]; then git fetch --quiet --depth=1 origin "$CI_MERGE_REQUEST_DIFF_BASE_SHA"; fi
|
|
94
|
+
# Everything on the default branch and on a schedule, the affected contexts on a merge request.
|
|
95
|
+
- npx --no -- ddd-ts-kit affected --base "${CI_MERGE_REQUEST_DIFF_BASE_SHA:-}" --format env | tee affected.env
|
|
96
|
+
artifacts:
|
|
97
|
+
reports:
|
|
98
|
+
dotenv: affected.env
|
|
73
99
|
|
|
74
100
|
merge-request-title:
|
|
75
101
|
extends: .node
|
|
76
|
-
stage:
|
|
102
|
+
stage: test
|
|
77
103
|
needs: [install]
|
|
78
104
|
rules:
|
|
79
105
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
@@ -82,21 +108,22 @@ merge-request-title:
|
|
|
82
108
|
|
|
83
109
|
typecheck:
|
|
84
110
|
extends: .node
|
|
85
|
-
stage:
|
|
111
|
+
stage: test
|
|
86
112
|
needs: [install]
|
|
87
113
|
script:
|
|
88
114
|
- npm run ci:typecheck
|
|
89
115
|
|
|
90
116
|
lint:
|
|
91
117
|
extends: .node
|
|
92
|
-
stage:
|
|
118
|
+
stage: test
|
|
93
119
|
needs: [install]
|
|
94
120
|
variables:
|
|
95
121
|
ESLINT_CODE_QUALITY_REPORT: reports/gl-code-quality-eslint.json
|
|
96
122
|
script:
|
|
97
123
|
- mkdir -p reports
|
|
98
124
|
- npm run ci:format
|
|
99
|
-
|
|
125
|
+
# The contexts a merge request does not reach are left to the default branch.
|
|
126
|
+
- npm run ci:lint -- --format gitlab $AFFECTED_LINT
|
|
100
127
|
artifacts:
|
|
101
128
|
when: always
|
|
102
129
|
expire_in: 14 days
|
|
@@ -105,7 +132,7 @@ lint:
|
|
|
105
132
|
|
|
106
133
|
architecture:
|
|
107
134
|
extends: .node
|
|
108
|
-
stage:
|
|
135
|
+
stage: test
|
|
109
136
|
needs: [install]
|
|
110
137
|
script:
|
|
111
138
|
- mkdir -p reports
|
|
@@ -119,7 +146,7 @@ architecture:
|
|
|
119
146
|
|
|
120
147
|
deadcode:
|
|
121
148
|
extends: .node
|
|
122
|
-
stage:
|
|
149
|
+
stage: test
|
|
123
150
|
needs: [install]
|
|
124
151
|
script:
|
|
125
152
|
- npm run ci:deadcode
|
|
@@ -127,9 +154,11 @@ deadcode:
|
|
|
127
154
|
unit:
|
|
128
155
|
extends: [.node, .junit]
|
|
129
156
|
stage: test
|
|
130
|
-
needs: [
|
|
157
|
+
needs: [install]
|
|
131
158
|
script:
|
|
132
|
-
-
|
|
159
|
+
- if [ "$AFFECTED_SCOPE" = "none" ]; then echo "Only documents changed, no spec to run."; exit 0; fi
|
|
160
|
+
- export DDD_TS_KIT_AFFECTED="$AFFECTED_CONTEXTS"
|
|
161
|
+
- npm run ci:test:unit -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
|
|
133
162
|
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
|
|
134
163
|
artifacts:
|
|
135
164
|
when: always
|
|
@@ -143,24 +172,30 @@ unit:
|
|
|
143
172
|
integration:
|
|
144
173
|
extends: [.node, .postgres, .junit]
|
|
145
174
|
stage: test
|
|
146
|
-
needs: [
|
|
175
|
+
needs: [install]
|
|
147
176
|
script:
|
|
177
|
+
- if [ "$AFFECTED_SCOPE" = "none" ]; then echo "Only documents changed, no spec to run."; exit 0; fi
|
|
178
|
+
- export DDD_TS_KIT_AFFECTED="$AFFECTED_CONTEXTS"
|
|
148
179
|
- npm run db:migrate
|
|
149
|
-
- npm run ci:test:integration -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml
|
|
180
|
+
- npm run ci:test:integration -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml $AFFECTED_ARGS
|
|
150
181
|
|
|
151
182
|
e2e:
|
|
152
183
|
extends: [.node, .postgres, .junit]
|
|
153
184
|
stage: test
|
|
154
|
-
needs: [
|
|
185
|
+
needs: [install]
|
|
155
186
|
script:
|
|
187
|
+
- if [ "$AFFECTED_SCOPE" = "none" ]; then echo "Only documents changed, no spec to run."; exit 0; fi
|
|
156
188
|
- npm run db:migrate
|
|
189
|
+
# The whole application, whatever the contexts a change reaches.
|
|
157
190
|
- npm run ci:test:e2e -- --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml
|
|
158
191
|
|
|
159
|
-
|
|
192
|
+
build:
|
|
160
193
|
extends: .node
|
|
161
|
-
stage:
|
|
162
|
-
needs: [
|
|
194
|
+
stage: test
|
|
195
|
+
needs: [install]
|
|
163
196
|
script:
|
|
197
|
+
- npm run ci:build
|
|
198
|
+
# The generated documents and contracts, from that build.
|
|
164
199
|
- npm run ci:docs
|
|
165
200
|
|
|
166
201
|
audit:
|
|
@@ -181,16 +216,9 @@ secrets:
|
|
|
181
216
|
script:
|
|
182
217
|
- gitleaks git . --redact --no-banner
|
|
183
218
|
|
|
184
|
-
build:
|
|
185
|
-
extends: .node
|
|
186
|
-
stage: package
|
|
187
|
-
needs: [e2e]
|
|
188
|
-
script:
|
|
189
|
-
- npm run ci:build
|
|
190
|
-
|
|
191
219
|
image:
|
|
192
|
-
stage:
|
|
193
|
-
needs: [
|
|
220
|
+
stage: test
|
|
221
|
+
needs: []
|
|
194
222
|
image:
|
|
195
223
|
name: moby/buildkit:v0.34.0-rootless
|
|
196
224
|
entrypoint: ['']
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://unpkg.com/knip@6/schema.json",
|
|
3
3
|
"entry": [
|
|
4
|
-
{{#if
|
|
5
|
-
"{{config.contextsDir}}/*/*.module.ts",
|
|
6
|
-
{{/if}}
|
|
7
|
-
{{#if assembly.discovery}}
|
|
8
|
-
"{{config.contextsDir}}/*/{application,infrastructure}/**/*.{{knip.discovered}}.ts",
|
|
9
|
-
{{/if}}
|
|
10
|
-
"{{config.contextsDir}}/*/published-language/index.ts",
|
|
4
|
+
{{#if tests.jest}}
|
|
11
5
|
"{{config.contextsDir}}/*/test/fakes/*.ts",
|
|
6
|
+
{{/if}}
|
|
12
7
|
{{#if knip.apps}}
|
|
13
8
|
"{{config.sourceRoot}}/apps/*/main.ts",
|
|
14
9
|
{{/if}}
|
|
15
10
|
"scripts/*.ts"{{knip.e2eEntry}}
|
|
16
11
|
],
|
|
17
12
|
"project": ["{{config.sourceRoot}}/**/*.ts", "scripts/**/*.ts"{{knip.e2eProject}}],
|
|
18
|
-
{{#if
|
|
19
|
-
"ignoreDependencies":
|
|
13
|
+
{{#if knip.ignores}}
|
|
14
|
+
"ignoreDependencies": {{knip.ignored}},
|
|
20
15
|
{{/if}}
|
|
21
16
|
"ignoreExportsUsedInFile": true,
|
|
22
17
|
"vitest": {
|
|
23
18
|
"config": ["vitest.config.ts"{{knip.e2eConfig}}],
|
|
24
|
-
"entry": [
|
|
19
|
+
"entry": [
|
|
20
|
+
"{{config.sourceRoot}}/**/*.spec.ts",
|
|
21
|
+
"{{config.contextsDir}}/*/test/fakes/*.ts",
|
|
22
|
+
"test/architecture/**/*.spec.ts"{{knip.e2eSpecs}}{{knip.testDatabase}}
|
|
23
|
+
]
|
|
25
24
|
}
|
|
26
25
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@biomejs/biome": "2.5.15",
|
|
24
24
|
"@commitlint/cli": "^21.2.3",
|
|
25
25
|
"@commitlint/config-conventional": "^21.2.3",
|
|
26
|
-
"@ddd-ts-kit/eslint-plugin": "^0.
|
|
26
|
+
"@ddd-ts-kit/eslint-plugin": "^0.2.0",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
29
|
"@vitest/coverage-v8": "5.0.3",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { governedCoverage } from '@ddd-ts-kit/testing/coverage';
|
|
1
|
+
import { governedCoverage, unaffectedContexts } from '@ddd-ts-kit/testing/coverage';
|
|
2
2
|
{{#if decorators.standard}}
|
|
3
3
|
import { decorators } from '@ddd-ts-kit/testing/vitest';
|
|
4
4
|
{{/if}}
|
|
@@ -9,6 +9,8 @@ import { defineConfig } from 'vitest/config';
|
|
|
9
9
|
|
|
10
10
|
const INTEGRATION_SPECS = '{{config.contextsDir}}/*/test/integration/**/*.spec.ts';
|
|
11
11
|
const INTEGRATION_MODE = 'integration';
|
|
12
|
+
// A pull request names the contexts its change reaches (DDD_TS_KIT_AFFECTED, from `ddd-ts-kit affected`): the specs of the others are left to the default branch.
|
|
13
|
+
const NOT_AFFECTED = unaffectedContexts().map((directory) => `${directory}**`);
|
|
12
14
|
|
|
13
15
|
export default defineConfig(({ mode }) => ({
|
|
14
16
|
{{#if decorators.standard}}
|
|
@@ -22,6 +24,8 @@ export default defineConfig(({ mode }) => ({
|
|
|
22
24
|
// An import alias is resolved from the "paths" of tsconfig.json, which name the sources.
|
|
23
25
|
resolve: { tsconfigPaths: true },
|
|
24
26
|
test: {
|
|
27
|
+
// The integration project has no spec before the first repository or adapter of the project: its run passes until then.
|
|
28
|
+
passWithNoTests: mode === INTEGRATION_MODE,
|
|
25
29
|
{{#if assembly.discovery}}
|
|
26
30
|
// Discovery imports the role files of a context itself: inlined, the package loads them through the runner, which compiles them.
|
|
27
31
|
server: { deps: { inline: ['@ddd-ts-kit/di'] } },
|
|
@@ -32,10 +36,10 @@ export default defineConfig(({ mode }) => ({
|
|
|
32
36
|
test: {
|
|
33
37
|
name: 'unit',
|
|
34
38
|
include: ['{{config.sourceRoot}}/**/*.spec.ts', 'test/architecture/**/*.spec.ts'],
|
|
35
|
-
exclude: [INTEGRATION_SPECS],
|
|
39
|
+
exclude: [INTEGRATION_SPECS, ...NOT_AFFECTED],
|
|
36
40
|
},
|
|
37
41
|
},
|
|
38
|
-
{ extends: true, test: { name: INTEGRATION_MODE, include: [INTEGRATION_SPECS] } },
|
|
42
|
+
{ extends: true, test: { name: INTEGRATION_MODE, include: [INTEGRATION_SPECS], exclude: NOT_AFFECTED } },
|
|
39
43
|
],
|
|
40
44
|
coverage: {
|
|
41
45
|
provider: 'v8',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAuthenticated, type Actor } from '@ddd-ts-kit/kernel';
|
|
2
2
|
import { Policy } from '@ddd-ts-kit/kernel/declarations';
|
|
3
|
-
import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions.
|
|
3
|
+
import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(domain): give `allows` the aggregate "{{name.words}}" reads as its second parameter, add `appliesTo(subject: unknown): boolean { return subject instanceof <Aggregate>; }`, and decide from the actor, the loaded element and `now`; the handler asks it through `Access.authorize(command.actor, permission, element)`.
|
|
6
6
|
@Policy({{context.camel}}Permissions['{{access.permission}}'], { name: '{{context.kebab}}.{{name.kebab}}' })
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { anActor } from '@ddd-ts-kit/auth/testing';
|
|
3
3
|
import { anonymousActor } from '@ddd-ts-kit/kernel';
|
|
4
4
|
import { declarationOf } from '@ddd-ts-kit/kernel/declarations';
|
|
5
|
-
import { {{name.pascal}}Policy } from '{{alias.context}}/application/authorization/{{name.kebab}}.policy.
|
|
5
|
+
import { {{name.pascal}}Policy } from '{{alias.context}}/application/authorization/{{name.kebab}}.policy{{alias.ext}}';
|
|
6
6
|
|
|
7
7
|
describe('{{name.title}}', () => {
|
|
8
8
|
it('bears on the permission {{access.permission}}, under a name of its own', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { anActor } from '@ddd-ts-kit/auth/testing';
|
|
3
3
|
import { anonymousActor } from '@ddd-ts-kit/kernel';
|
|
4
|
-
import { {{name.camel}} } from '{{alias.context}}/application/authorization/{{name.kebab}}.policy.
|
|
4
|
+
import { {{name.camel}} } from '{{alias.context}}/application/authorization/{{name.kebab}}.policy{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
const now = new Date('2026-01-01T00:00:00.000Z');
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { definePolicy } from '@ddd-ts-kit/auth';
|
|
2
2
|
import { isAuthenticated } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions.
|
|
3
|
+
import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(domain): replace `unknown` by the aggregate "{{name.words}}" reads, add `appliesTo: (subject): subject is <Aggregate> => subject instanceof <Aggregate>`, and decide from the actor, the loaded element and `now`; the handler asks it through `Access.authorize(command.actor, permission, element)`.
|
|
6
6
|
export const {{name.camel}} = definePolicy<unknown>({
|