ddd-ts-kit 0.1.1 → 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 +81 -21
- 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/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 +17 -2
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -4
- 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 +2 -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 +8 -0
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +1 -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/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/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 +3 -1
- package/dist/generate/kinds/declare-context-entries.d.ts.map +1 -1
- package/dist/generate/kinds/declare-context-entries.js +4 -2
- package/dist/generate/kinds/declare-context-entries.js.map +1 -1
- 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/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 -40
- package/dist/generate/kinds/write-context-files.js.map +1 -1
- 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/spec-vars.js +4 -4
- package/dist/generate/spec-vars.js.map +1 -1
- 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/manifest/scripts-for.js +6 -1
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.js +23 -23
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +32 -3
- 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 +46 -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 +3 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/init/write-agent-settings.js +4 -3
- package/dist/init/write-agent-settings.js.map +1 -1
- 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/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 +2 -0
- 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/version.d.ts +1 -1
- package/dist/version.js +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 +1 -1
- package/templates/architecture/extractable.manual.spec.ts.tpl +4 -4
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +1 -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/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 +15 -10
- 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/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 -10
- 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/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/rules/application.md.tpl +8 -2
- package/templates/init/rules/infrastructure.md.tpl +3 -3
- package/templates/init/scripts/openapi.ts.tpl +5 -5
- 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/package-scripts.json +1 -1
- package/templates/policy/policy.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.ts.tpl +1 -1
- package/templates/policy/policy.ts.tpl +1 -1
- package/templates/policy/registration.tpl +1 -1
- package/templates/port/fake.ts.tpl +1 -1
- package/templates/projection/projection.spec.ts.tpl +17 -0
- package/templates/projection/projection.ts.tpl +11 -0
- package/templates/query/handler.declared.ts.tpl +4 -4
- package/templates/query/handler.spec.buses.ts.tpl +5 -5
- package/templates/query/handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/handler.ts.tpl +3 -3
- package/templates/query/query.ts.tpl +1 -1
- package/templates/query/reader.fake.ts.tpl +2 -2
- package/templates/query/reader.in-memory.ts.tpl +4 -4
- package/templates/query/reader.port.ts.tpl +2 -2
- package/templates/query/search.handler.declared.ts.tpl +6 -6
- package/templates/query/search.handler.spec.buses.ts.tpl +5 -5
- package/templates/query/search.handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/search.handler.ts.tpl +4 -4
- package/templates/query/search.query.ts.tpl +1 -1
- package/templates/query/search.reader.fake.ts.tpl +2 -2
- package/templates/query/search.reader.in-memory.ts.tpl +3 -3
- package/templates/query/search.reader.port.ts.tpl +1 -1
- package/templates/query/search.reader.spec.ts.tpl +2 -2
- package/templates/query/search.wiring.manual.tpl +3 -3
- package/templates/query/search.wiring.tsyringe.tpl +4 -4
- package/templates/query/wiring.manual.tpl +3 -3
- package/templates/query/wiring.tsyringe.tpl +4 -4
- package/templates/repository/contract.spec.ts.tpl +5 -5
- package/templates/repository/drizzle/mapper.ts.tpl +2 -2
- package/templates/repository/drizzle/repository.ts.tpl +9 -17
- package/templates/repository/drizzle/schema-export.tpl +1 -1
- package/templates/repository/fake.ts.tpl +2 -2
- package/templates/repository/knex/mapper.ts.tpl +2 -2
- package/templates/repository/knex/repository.ts.tpl +10 -30
- package/templates/repository/knex/schema-export.tpl +1 -1
- package/templates/repository/knex/tables.ts.tpl +1 -1
- package/templates/repository/none/repository.ts.tpl +3 -3
- package/templates/repository/prisma/mapper.ts.tpl +2 -2
- package/templates/repository/prisma/repository.ts.tpl +6 -9
- package/templates/repository/repository.ts.tpl +1 -1
- package/templates/repository/typeorm/mapper.ts.tpl +2 -2
- package/templates/repository/typeorm/repository.ts.tpl +9 -12
- package/templates/repository/typeorm/schema-export.tpl +1 -1
- package/templates/repository/typeorm/table.tpl +1 -1
- package/templates/repository/wiring.manual.tpl +1 -1
- package/templates/repository/wiring.tsyringe.tpl +2 -2
- package/templates/route/route.search.ts.tpl +1 -1
- package/templates/route/route.spec.ts.tpl +1 -1
- package/templates/route/routes.on-tsyringe.tpl +1 -1
- package/templates/route/wiring.manual.tpl +1 -1
- package/templates/service/main.ts.tpl +11 -11
- package/templates/value-object/value-object.spec.ts.tpl +1 -1
- package/templates/worker/main.ts.tpl +9 -9
- package/dist/alias/platform-alias.d.ts +0 -4
- package/dist/alias/platform-alias.d.ts.map +0 -1
- package/dist/alias/platform-alias.js +0 -7
- package/dist/alias/platform-alias.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-stack.d.ts","sourceRoot":"","sources":["../../../src/init/stack/resolve-stack.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"resolve-stack.d.ts","sourceRoot":"","sources":["../../../src/init/stack/resolve-stack.ts"],"names":[],"mappings":"AAEA,OAAO,EAqBL,KAAK,MAAM,EACZ,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAgBxE"}
|
|
@@ -1,24 +1,64 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, CI_PLATFORMS, CONFIG_FILE, DEFAULT_IMPORT_ALIAS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, LOGGERS, PACKAGE_MANAGERS, parseConfig, readConfig, TEST_STACKS, VALIDATION_STACKS, } from '../../config/index.js';
|
|
3
|
+
import { AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, CI_PLATFORMS, CONFIG_FILE, DEFAULT_IMPORT_ALIAS, DEFAULT_IMPORT_EXTENSION, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, IMPORT_EXTENSIONS, LOGGERS, PACKAGE_MANAGERS, parseConfig, readConfig, TEST_STACKS, VALIDATION_STACKS, } from '../../config/index.js';
|
|
4
4
|
import { aliasProblem } from '../../alias/index.js';
|
|
5
5
|
import { DEFAULT_PACKAGE_MANAGER } from '../../package-manager/default-package-manager.js';
|
|
6
6
|
import { CliError } from '../../cli-error.js';
|
|
7
7
|
import { choose } from './choose.js';
|
|
8
|
+
import { recordedOptions } from './recorded-options.js';
|
|
8
9
|
import { resolvePersistence } from './resolve-persistence.js';
|
|
9
10
|
import { resolveStyle } from './resolve-style.js';
|
|
10
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The config of the project. Already initialised, it is the one on disk: `init` run again keeps
|
|
13
|
+
* it, and `init --force` changes in it the choices its flags name and nothing else, so the
|
|
14
|
+
* contexts, the rules and every other key a team declared survive. A new project gets the stack
|
|
15
|
+
* the flags ask for.
|
|
16
|
+
*/
|
|
11
17
|
export function resolveStack(root, options) {
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
const recorded = recordedConfig(root, options.force);
|
|
19
|
+
if (recorded !== undefined && !options.force) {
|
|
20
|
+
return supportedAlias(recorded);
|
|
21
|
+
}
|
|
22
|
+
const asked = recorded === undefined ? options : { ...recordedOptions(recorded), ...options };
|
|
23
|
+
const fresh = parseConfig({ ...spelling(asked, recorded), stack: stackOf(asked), contexts: {}, rules: {} });
|
|
24
|
+
const { importAlias, importExtension } = fresh;
|
|
25
|
+
// No flag and nothing to ask again: the config publishes its events in a way `init` does not offer, written by hand.
|
|
26
|
+
const events = recorded !== undefined && asked.events === undefined ? recorded.stack.events : fresh.stack.events;
|
|
27
|
+
const stack = { ...fresh.stack, events };
|
|
28
|
+
const config = supportedAlias({ ...(recorded ?? fresh), importAlias, importExtension, stack });
|
|
29
|
+
return { ...config, worker: config.worker || hasWorker(root, config) };
|
|
30
|
+
}
|
|
31
|
+
/** Nothing for a new project, and for a config `--force` is about to replace because it cannot be read. */
|
|
32
|
+
function recordedConfig(root, force) {
|
|
33
|
+
if (!fs.existsSync(path.join(root, CONFIG_FILE))) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
return readConfig(root).config;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (force) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
14
44
|
}
|
|
45
|
+
}
|
|
46
|
+
/** How the imports are written: what a flag asks, else what the project already does, else the defaults of a new project. */
|
|
47
|
+
function spelling(options, recorded) {
|
|
48
|
+
const extension = choose(IMPORT_EXTENSIONS, options.importExtension, 'import-extension');
|
|
49
|
+
return {
|
|
50
|
+
importAlias: options.importAlias ?? recorded?.importAlias ?? DEFAULT_IMPORT_ALIAS,
|
|
51
|
+
importExtension: extension ?? recorded?.importExtension ?? DEFAULT_IMPORT_EXTENSION,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function stackOf(options) {
|
|
15
55
|
const http = choose(HTTP_STACKS, options.http, 'http') ?? 'express';
|
|
16
56
|
const di = choose(DI_STACKS, options.di, 'di') ?? (http === 'nest' ? 'nest' : 'tsyringe');
|
|
17
57
|
assertNestGoesWithNest(http, di);
|
|
18
58
|
const docsUi = http === 'none' ? 'none' : (choose(DOCS_UIS, options.docsUi, 'docs-ui') ?? 'swagger');
|
|
19
59
|
const persistence = resolvePersistence(options);
|
|
20
60
|
const broker = resolveBroker(options, persistence.orm);
|
|
21
|
-
|
|
61
|
+
return {
|
|
22
62
|
http,
|
|
23
63
|
di,
|
|
24
64
|
...resolveTooling(options),
|
|
@@ -29,9 +69,6 @@ export function resolveStack(root, options) {
|
|
|
29
69
|
...resolveOperations(options, persistence.orm),
|
|
30
70
|
...resolveStyle(options, di),
|
|
31
71
|
};
|
|
32
|
-
const alias = options.importAlias === undefined ? {} : { importAlias: options.importAlias };
|
|
33
|
-
const config = supportedAlias(parseConfig({ ...alias, stack, contexts: {}, rules: {} }));
|
|
34
|
-
return { ...config, worker: hasWorker(root, config) };
|
|
35
72
|
}
|
|
36
73
|
/** Every file `init` writes imports by the alias: one that some tool cannot resolve is refused before anything is written. */
|
|
37
74
|
function supportedAlias(config) {
|
|
@@ -41,7 +78,7 @@ function supportedAlias(config) {
|
|
|
41
78
|
}
|
|
42
79
|
throw new CliError(`The import alias "${config.importAlias}" is not supported: ${problem}.`, `Use "${DEFAULT_IMPORT_ALIAS}" or "$<name>/" (--import-alias, or "importAlias" in ${CONFIG_FILE}).`);
|
|
43
80
|
}
|
|
44
|
-
/**
|
|
81
|
+
/** A worker that is already there keeps the jobs, so the API still starts with its jobs off, whatever the config says of it. */
|
|
45
82
|
function hasWorker(root, config) {
|
|
46
83
|
return fs.existsSync(path.join(root, config.sourceRoot, 'apps/worker/main.ts'));
|
|
47
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-stack.js","sourceRoot":"","sources":["../../../src/init/stack/resolve-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,eAAe,EACf,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3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,EAAE,CAAC;QAC1C,OAAO;IACT,CAAC;IAED,MAAM,IAAI,QAAQ,CAChB,UAAU,IAAI,iCAAiC,EAAE,GAAG,EACpD,uIAAuI,CACxI,CAAC;AACJ,CAAC"}
|
|
@@ -3,10 +3,8 @@ import type { StackOptions } from './stack-options.js';
|
|
|
3
3
|
* A class declares what it is wherever something reads the declarations: `@ddd-ts-kit/di`, on
|
|
4
4
|
* tsyringe. Hand wiring and a NestJS container read none of them, so their contexts keep a
|
|
5
5
|
* module file. A declared context is assembled from its barrel or by discovery, with or
|
|
6
|
-
* without a broker: its subscriber is the one of its name either way.
|
|
6
|
+
* without a broker: its subscriber is the one of its name either way. A new declared project
|
|
7
|
+
* states dependencies in constructor signatures; an explicit one lists them in its module file.
|
|
7
8
|
*/
|
|
8
|
-
export declare function resolveStyle(options: StackOptions, di: string):
|
|
9
|
-
style: string;
|
|
10
|
-
assembly: string;
|
|
11
|
-
};
|
|
9
|
+
export declare function resolveStyle(options: StackOptions, di: string): Record<'style' | 'assembly' | 'dependencies', string>;
|
|
12
10
|
//# sourceMappingURL=resolve-style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-style.d.ts","sourceRoot":"","sources":["../../../src/init/stack/resolve-style.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"resolve-style.d.ts","sourceRoot":"","sources":["../../../src/init/stack/resolve-style.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,UAAU,GAAG,cAAc,EAAE,MAAM,CAAC,CAoBrH"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ASSEMBLIES, STYLES } from '../../config/index.js';
|
|
1
|
+
import { ASSEMBLIES, DEPENDENCY_STATEMENTS, STYLES } from '../../config/index.js';
|
|
2
2
|
import { CliError } from '../../cli-error.js';
|
|
3
3
|
import { choose } from './choose.js';
|
|
4
4
|
/**
|
|
5
5
|
* A class declares what it is wherever something reads the declarations: `@ddd-ts-kit/di`, on
|
|
6
6
|
* tsyringe. Hand wiring and a NestJS container read none of them, so their contexts keep a
|
|
7
7
|
* module file. A declared context is assembled from its barrel or by discovery, with or
|
|
8
|
-
* without a broker: its subscriber is the one of its name either way.
|
|
8
|
+
* without a broker: its subscriber is the one of its name either way. A new declared project
|
|
9
|
+
* states dependencies in constructor signatures; an explicit one lists them in its module file.
|
|
9
10
|
*/
|
|
10
11
|
export function resolveStyle(options, di) {
|
|
11
12
|
const style = choose(STYLES, options.style, 'style') ?? (di === 'tsyringe' ? 'declared' : 'explicit');
|
|
@@ -16,6 +17,13 @@ export function resolveStyle(options, di) {
|
|
|
16
17
|
if (assembly !== undefined && style !== 'declared') {
|
|
17
18
|
throw new CliError(`--assembly ${assembly} cannot be combined with --style explicit.`, 'An explicit context is assembled by its module file: drop --assembly, or use --style declared.');
|
|
18
19
|
}
|
|
19
|
-
return { style, assembly: assembly ?? 'barrel' };
|
|
20
|
+
return { style, assembly: assembly ?? 'barrel', dependencies: dependenciesOf(options, style) };
|
|
21
|
+
}
|
|
22
|
+
function dependenciesOf(options, style) {
|
|
23
|
+
const dependencies = choose(DEPENDENCY_STATEMENTS, options.dependencies, 'dependencies');
|
|
24
|
+
if (dependencies !== undefined && style !== 'declared') {
|
|
25
|
+
throw new CliError(`--dependencies ${dependencies} cannot be combined with --style explicit.`, 'An explicit context lists what each class is given in its module file: drop --dependencies, or use --style declared.');
|
|
26
|
+
}
|
|
27
|
+
return dependencies ?? (style === 'declared' ? 'signature' : 'listed');
|
|
20
28
|
}
|
|
21
29
|
//# sourceMappingURL=resolve-style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-style.js","sourceRoot":"","sources":["../../../src/init/stack/resolve-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-style.js","sourceRoot":"","sources":["../../../src/init/stack/resolve-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,OAAqB,EAAE,EAAU;IAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAEtG,IAAI,KAAK,KAAK,UAAU,IAAI,EAAE,KAAK,UAAU,EAAE,CAAC;QAC9C,MAAM,IAAI,QAAQ,CAChB,iDAAiD,EAAE,GAAG,EACtD,8PAA8P,CAC/P,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAElE,IAAI,QAAQ,KAAK,SAAS,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACnD,MAAM,IAAI,QAAQ,CAChB,cAAc,QAAQ,4CAA4C,EAClE,gGAAgG,CACjG,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAAE,YAAY,EAAE,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;AACjG,CAAC;AAED,SAAS,cAAc,CAAC,OAAqB,EAAE,KAAa;IAC1D,MAAM,YAAY,GAAG,MAAM,CAAC,qBAAqB,EAAE,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAEzF,IAAI,YAAY,KAAK,SAAS,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACvD,MAAM,IAAI,QAAQ,CAChB,kBAAkB,YAAY,4CAA4C,EAC1E,sHAAsH,CACvH,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -18,9 +18,12 @@ export interface StackOptions {
|
|
|
18
18
|
readonly logger?: string;
|
|
19
19
|
readonly style?: string;
|
|
20
20
|
readonly assembly?: string;
|
|
21
|
+
readonly dependencies?: string;
|
|
21
22
|
readonly packageManager?: string;
|
|
22
23
|
/** The prefix of the source root in imports, when it is not the default. */
|
|
23
24
|
readonly importAlias?: string;
|
|
25
|
+
/** `none` or `js`: whether an import of a file of the project ends with the extension of the emitted file. */
|
|
26
|
+
readonly importExtension?: string;
|
|
24
27
|
/** The reason given for running an ORM without the transactional outbox. */
|
|
25
28
|
readonly allowNoOutbox?: string;
|
|
26
29
|
readonly force: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-options.d.ts","sourceRoot":"","sources":["../../../src/init/stack/stack-options.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;I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C,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,8GAA8G;IAC9G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -64,7 +64,7 @@ export function writeAgentSettings(ws) {
|
|
|
64
64
|
ws.note(`${AGENT_SETTINGS} is not a JSON object: it was left as it is.`);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
const merged = mergePermissions(settings);
|
|
67
|
+
const merged = mergePermissions(settings, (rule) => ws.spoken(rule));
|
|
68
68
|
ws.update(AGENT_SETTINGS, serialize(merged.settings));
|
|
69
69
|
if (merged.added.length > 0) {
|
|
70
70
|
ws.note(`${AGENT_SETTINGS} gained ${merged.added.length} permission(s): ${merged.added.join(', ')}.`);
|
|
@@ -80,13 +80,14 @@ function parse(text) {
|
|
|
80
80
|
return undefined;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
/** A rule is compared as the project says it: its settings name the package manager it runs, not npm. */
|
|
84
|
+
function mergePermissions(settings, spoken) {
|
|
84
85
|
const current = isRecord(settings['permissions']) ? settings['permissions'] : {};
|
|
85
86
|
const added = [];
|
|
86
87
|
const permissions = { ...current };
|
|
87
88
|
for (const [kind, wanted] of Object.entries(PERMISSIONS)) {
|
|
88
89
|
const present = Array.isArray(current[kind]) ? current[kind] : [];
|
|
89
|
-
const missing = wanted.filter((rule) => !present.includes(rule));
|
|
90
|
+
const missing = wanted.map(spoken).filter((rule) => !present.includes(rule));
|
|
90
91
|
permissions[kind] = [...present, ...missing];
|
|
91
92
|
added.push(...missing.map((rule) => `${kind} ${rule}`));
|
|
92
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-agent-settings.js","sourceRoot":"","sources":["../../src/init/write-agent-settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAI/C;;;GAGG;AACH,MAAM,WAAW,GAAgB;IAC/B,KAAK,EAAE;QACL,8BAA8B;QAC9B,6BAA6B;QAC7B,iCAAiC;QACjC,6BAA6B;QAC7B,gCAAgC;QAChC,4BAA4B;QAC5B,sBAAsB;QACtB,yBAAyB;QACzB,sBAAsB;QACtB,kBAAkB;QAClB,0BAA0B;QAC1B,6BAA6B;QAC7B,0BAA0B;QAC1B,gCAAgC;QAChC,6BAA6B;QAC7B,+BAA+B;QAC/B,4BAA4B;KAC7B;IACD,wFAAwF;IACxF,k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AAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAE7E,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;QAC7C,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -3,7 +3,8 @@ import type { Workspace } from '../workspace/index.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* `tsconfig.json` for the editor and the type check, `tsconfig.build.json` for what ships: no test,
|
|
5
5
|
* no test database. `paths` declares the import alias for the compiler and for every tool that
|
|
6
|
-
* reads tsconfig; the build config extends the other, so the two cannot disagree.
|
|
6
|
+
* reads tsconfig; the build config extends the other, so the two cannot disagree. How a specifier
|
|
7
|
+
* is resolved follows "importExtension".
|
|
7
8
|
*/
|
|
8
9
|
export declare function writeTypeScriptConfigs(ws: Workspace, config: Config): void;
|
|
9
10
|
//# sourceMappingURL=write-type-script-configs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-type-script-configs.d.ts","sourceRoot":"","sources":["../../src/init/write-type-script-configs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD
|
|
1
|
+
{"version":3,"file":"write-type-script-configs.d.ts","sourceRoot":"","sources":["../../src/init/write-type-script-configs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAY1E"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { aliasRoots, compilerPaths, DEFAULT_BUILD_LAYOUT } from '../alias/index.js';
|
|
1
|
+
import { aliasRoots, compilerPaths, compilerResolutionOf, DEFAULT_BUILD_LAYOUT } from '../alias/index.js';
|
|
2
2
|
import { usesLegacyDecorators } from '../stack/uses-legacy-decorators.js';
|
|
3
3
|
import { formatJson } from '../json/format-json.js';
|
|
4
4
|
/**
|
|
5
5
|
* `tsconfig.json` for the editor and the type check, `tsconfig.build.json` for what ships: no test,
|
|
6
6
|
* no test database. `paths` declares the import alias for the compiler and for every tool that
|
|
7
|
-
* reads tsconfig; the build config extends the other, so the two cannot disagree.
|
|
7
|
+
* reads tsconfig; the build config extends the other, so the two cannot disagree. How a specifier
|
|
8
|
+
* is resolved follows "importExtension".
|
|
8
9
|
*/
|
|
9
10
|
export function writeTypeScriptConfigs(ws, config) {
|
|
10
11
|
const include = [config.sourceRoot, 'scripts', 'test', ...(config.stack.orm === 'prisma' ? ['generated'] : [])];
|
|
@@ -18,8 +19,7 @@ function compilerOptions(config) {
|
|
|
18
19
|
return {
|
|
19
20
|
target: 'ES2023',
|
|
20
21
|
lib: ['ES2023'],
|
|
21
|
-
|
|
22
|
-
moduleResolution: 'NodeNext',
|
|
22
|
+
...compilerResolutionOf(config.importExtension),
|
|
23
23
|
strict: true,
|
|
24
24
|
noUncheckedIndexedAccess: true,
|
|
25
25
|
exactOptionalPropertyTypes: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-type-script-configs.js","sourceRoot":"","sources":["../../src/init/write-type-script-configs.ts"],"names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,IAAI;QACxB,oBAAoB,EAAE,IAAI;QAC1B,YAAY,EAAE,IAAI;QAClB,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,KAAK,EAAE,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,MAAM,EAAE,oBAAoB,CAAC,MAAM;QACnC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-declarations.d.ts","sourceRoot":"","sources":["../src/refresh-declarations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-declarations.js","sourceRoot":"","sources":["../src/refresh-declarations.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,mBAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC"}
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AA4F3C,wBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,EAAc,GAAG,MAAM,CAkCvE"}
|
package/dist/run.js
CHANGED
|
@@ -41,7 +41,9 @@ const USAGE = `Usage
|
|
|
41
41
|
[--ci github|gitlab|both|none] [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]
|
|
42
42
|
[--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--audit on|off]
|
|
43
43
|
[--errors none|sentry] [--logger stdout|pino|winston] [--style declared|explicit] [--assembly barrel|discovery]
|
|
44
|
+
[--dependencies signature|listed]
|
|
44
45
|
[--package-manager npm|pnpm] [--allow-no-outbox "<reason>"] [--import-alias '$<name>/']
|
|
46
|
+
[--import-extension none|js]
|
|
45
47
|
[--context <name>:<core|supporting|generic>]... [--dry-run] [--force]
|
|
46
48
|
ddd-ts-kit generate <kind> ... [--term "<Term>=<meaning>"]... [--allow-name] [--local-only] [--dry-run] [--force] (alias: g)
|
|
47
49
|
ddd-ts-kit generate --help --json
|
package/dist/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAA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,CAAC,CAAC,CAAC,EAAE,EAAE,CACtG,CAAC;IAEF,OAAO,cAAc,OAAO;;EAE5B,KAAK;;EAEL,KAAK;;;EAGL,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -2,7 +2,8 @@ import type { Config } from '../config/index.js';
|
|
|
2
2
|
import type { RenderContext } from '../templating/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The alias of each tree and of each directory of the config, without a final slash: a template
|
|
5
|
-
* writes the rest of the path after it
|
|
5
|
+
* writes the rest of the path after it, then `ext`: what a specifier ends with under
|
|
6
|
+
* "importExtension". `jestMapper` is the lines of the mapping jest is given.
|
|
6
7
|
*/
|
|
7
8
|
export declare function aliasVars(config: Config): RenderContext;
|
|
8
9
|
//# sourceMappingURL=alias-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-vars.d.ts","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"alias-vars.d.ts","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAgBvD"}
|
package/dist/stack/alias-vars.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { aliasRoots, directoryAlias, FIXED_ALIAS_ROOTS, moduleNameMapper } from '../alias/index.js';
|
|
1
|
+
import { aliasRoots, directoryAlias, FIXED_ALIAS_ROOTS, moduleNameMapper, specifierSuffix } from '../alias/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* The alias of each tree and of each directory of the config, without a final slash: a template
|
|
4
|
-
* writes the rest of the path after it
|
|
4
|
+
* writes the rest of the path after it, then `ext`: what a specifier ends with under
|
|
5
|
+
* "importExtension". `jestMapper` is the lines of the mapping jest is given.
|
|
5
6
|
*/
|
|
6
7
|
export function aliasVars(config) {
|
|
7
8
|
const roots = aliasRoots(config);
|
|
@@ -14,11 +15,13 @@ export function aliasVars(config) {
|
|
|
14
15
|
test: test.prefix.slice(0, -1),
|
|
15
16
|
scripts: scripts.prefix.slice(0, -1),
|
|
16
17
|
generated: generated.prefix.slice(0, -1),
|
|
18
|
+
ext: specifierSuffix(config.importExtension),
|
|
19
|
+
extensionless: specifierSuffix(config.importExtension) === '',
|
|
17
20
|
jestMapper: jestMapperLines(config),
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
function jestMapperLines(config) {
|
|
21
|
-
return Object.entries(moduleNameMapper(aliasRoots(config)))
|
|
24
|
+
return Object.entries(moduleNameMapper(aliasRoots(config), specifierSuffix(config.importExtension)))
|
|
22
25
|
.map(([pattern, target]) => `'${pattern.replaceAll('\\', '\\\\')}': '${target}',`)
|
|
23
26
|
.join('\n ');
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-vars.js","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"alias-vars.js","sourceRoot":"","sources":["../../src/stack/alias-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIrH;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,MAAM,KAAK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1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.2.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ddd-ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Bootstrap, scaffold and verify DDD and Clean Architecture TypeScript projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"type": "module",
|
|
18
18
|
"bin": {
|
|
19
|
-
"ddd-ts-kit": "./dist/bin.js"
|
|
19
|
+
"ddd-ts-kit": "./dist/bin.js",
|
|
20
|
+
"ddd-ts-kit-refresh-declarations": "./dist/refresh-declarations.js"
|
|
20
21
|
},
|
|
21
22
|
"files": [
|
|
22
23
|
"dist",
|
|
@@ -28,6 +29,6 @@
|
|
|
28
29
|
"clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
32
|
+
"@ddd-ts-kit/kernel": "^0.2.0"
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
|
-
import { {{name.pascal}}Translator } from '{{alias.context}}/infrastructure/anti-corruption/{{name.kebab}}.translator.
|
|
2
|
+
import { {{name.pascal}}Translator } from '{{alias.context}}/infrastructure/anti-corruption/{{name.kebab}}.translator{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
describe('Translating the model of {{name.title}}', () => {
|
|
5
5
|
it('produces a record of {{context.kebab}}', () => {
|
|
@@ -5,8 +5,8 @@ import { retry, timeout } from '@ddd-ts-kit/aspects';
|
|
|
5
5
|
import { Retry, Timeout } from '@ddd-ts-kit/aspects/decorators';
|
|
6
6
|
{{/if}}
|
|
7
7
|
import { {{adapter.decorator}} } from '@ddd-ts-kit/kernel/declarations';
|
|
8
|
-
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port.
|
|
9
|
-
import { ownPolicy } from '{{alias.platform}}/resilience/own-policy.
|
|
8
|
+
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
9
|
+
import { ownPolicy } from '{{alias.platform}}/resilience/own-policy{{alias.ext}}';
|
|
10
10
|
|
|
11
11
|
interface OutboundCall {
|
|
12
12
|
readonly operation: string;
|
|
@@ -37,7 +37,7 @@ export class Remote{{name.pascal}} implements {{name.pascal}} {
|
|
|
37
37
|
// TODO(domain): implement each operation of {{name.pascal}} by sending one call through `this.transport` and translating the answer into the types of {{context.kebab}}; declare each one `async`, so that the policy stated in the declaration applies from its first call.
|
|
38
38
|
{{/unless}}
|
|
39
39
|
|
|
40
|
-
// TODO(platform): replace the body by the real client of the outside system (fetch on a base URL of the validated config, an SDK): type what it needs by an abstract class of application/ports (its settings), bind that class in the platform module and
|
|
40
|
+
// TODO(platform): replace the body by the real client of the outside system (fetch on a base URL of the validated config, an SDK): type what it needs by an abstract class of application/ports (its settings), bind that class in the platform module and receive it in the constructor, typed by that class.
|
|
41
41
|
protected async transport(call: OutboundCall, signal?: AbortSignal): Promise<unknown> {
|
|
42
42
|
signal?.throwIfAborted();
|
|
43
43
|
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
{{#if adapter.decorated}}
|
|
3
3
|
import { createAspectFakes, withAspectRuntime } from '@ddd-ts-kit/aspects/testing';
|
|
4
4
|
{{/if}}
|
|
5
|
-
import { Remote{{name.pascal}} } from '{{alias.context}}/infrastructure/external/{{adapter.file}}.
|
|
5
|
+
import { Remote{{name.pascal}} } from '{{alias.context}}/infrastructure/external/{{adapter.file}}{{alias.ext}}';
|
|
6
6
|
{{#if adapter.decorated}}
|
|
7
7
|
|
|
8
8
|
class Flaky{{name.pascal}} extends Remote{{name.pascal}} {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if adapter.decorated}}
|
|
2
2
|
import { Retry, Timeout } from '@ddd-ts-kit/aspects/decorators';
|
|
3
3
|
{{/if}}
|
|
4
|
-
import type { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port.
|
|
4
|
+
import type { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
interface OutboundCall {
|
|
7
7
|
readonly operation: string;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
{{#unless adapter.decorated}}
|
|
3
3
|
import { retry, timeout } from '@ddd-ts-kit/aspects';
|
|
4
4
|
{{/unless}}
|
|
5
|
-
import { ownPolicy } from '{{alias.platform}}/resilience/own-policy.
|
|
6
|
-
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port.
|
|
7
|
-
import { Remote{{name.pascal}} } from '{{alias.context}}/infrastructure/external/remote-{{name.kebab}}.adapter.
|
|
5
|
+
import { ownPolicy } from '{{alias.platform}}/resilience/own-policy{{alias.ext}}';
|
|
6
|
+
import { {{name.pascal}} } from '{{alias.context}}/application/ports/{{name.kebab}}.port{{alias.ext}}';
|
|
7
|
+
import { Remote{{name.pascal}} } from '{{alias.context}}/infrastructure/external/remote-{{name.kebab}}.adapter{{alias.ext}}';
|
|
8
8
|
@@registrations
|
|
9
9
|
{{#if adapter.decorated}}
|
|
10
10
|
builder.bind({{name.pascal}}).toClass(Remote{{name.pascal}}).as('{{adapter.kind}}').with(ownPolicy());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
2
|
import { given } from '@ddd-ts-kit/testing';
|
|
3
|
-
import { {{name.pascal}} } from '{{alias.context}}/domain/aggregates/{{name.kebab}}.aggregate.
|
|
4
|
-
import { {{name.article}}{{name.pascal}} } from '{{alias.context}}/test/builders/{{name.kebab}}.builder.
|
|
3
|
+
import { {{name.pascal}} } from '{{alias.context}}/domain/aggregates/{{name.kebab}}.aggregate{{alias.ext}}';
|
|
4
|
+
import { {{name.article}}{{name.pascal}} } from '{{alias.context}}/test/builders/{{name.kebab}}.builder{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
describe('{{name.pascal}}', () => {
|
|
7
7
|
it('is born with its identity', () => {
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
3
3
|
import { AllowAll } from '@ddd-ts-kit/auth/testing';
|
|
4
4
|
import { createTestApplication, type ContextModule } from '@ddd-ts-kit/di';
|
|
5
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module.
|
|
5
|
+
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
|
-
import { createPlatform } from '{{alias.platform}}/create-platform.
|
|
3
|
-
import { inertPersistence } from '{{alias.platform}}/database/inert-persistence.
|
|
4
|
-
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events.
|
|
5
|
-
import type { Platform } from '{{alias.platform}}/platform.
|
|
2
|
+
import { createPlatform } from '{{alias.platform}}/create-platform{{alias.ext}}';
|
|
3
|
+
import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
|
|
4
|
+
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
5
|
+
import type { Platform } from '{{alias.platform}}/platform{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
3
3
|
import { AllowAll } from '@ddd-ts-kit/auth/testing';
|
|
4
4
|
import { createTestApplication, type ContextModule } from '@ddd-ts-kit/di';
|
|
5
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module.
|
|
5
|
+
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@@imports
|
|
2
2
|
{{#if assembly.barrel}}
|
|
3
|
-
import * as {{context.camel}}Declarations from '{{alias.context}}/{{context.kebab}}.declarations.
|
|
3
|
+
import * as {{context.camel}}Declarations from '{{alias.context}}/{{context.kebab}}.declarations{{alias.ext}}';
|
|
4
4
|
{{/if}}
|
|
5
5
|
@@contexts
|
|
6
6
|
['{{context.kebab}}', {{assembled.proofModule}}],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Builder, sequence, type Defaults } from '@ddd-ts-kit/testing';
|
|
2
|
-
import { {{aggregate.pascal}} } from '{{alias.context}}/domain/aggregates/{{aggregate.kebab}}.aggregate.
|
|
2
|
+
import { {{aggregate.pascal}} } from '{{alias.context}}/domain/aggregates/{{aggregate.kebab}}.aggregate{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
interface {{aggregate.pascal}}Ingredients {
|
|
5
5
|
readonly id: string;
|