ddd-ts-kit 0.108.1 → 0.110.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/CHANGELOG.md +144 -0
- package/README.fr.md +33 -14
- package/README.md +28 -14
- package/dist/affected/reach-of.d.ts.map +1 -1
- package/dist/affected/reach-of.js +4 -1
- package/dist/affected/reach-of.js.map +1 -1
- package/dist/check/canonical/holds-shared-files.d.ts +3 -0
- package/dist/check/canonical/holds-shared-files.d.ts.map +1 -0
- package/dist/check/canonical/holds-shared-files.js +7 -0
- package/dist/check/canonical/holds-shared-files.js.map +1 -0
- package/dist/check/canonical/is-shared-directory.d.ts +7 -0
- package/dist/check/canonical/is-shared-directory.d.ts.map +1 -0
- package/dist/check/canonical/is-shared-directory.js +13 -0
- package/dist/check/canonical/is-shared-directory.js.map +1 -0
- package/dist/check/canonical/role.d.ts +2 -0
- package/dist/check/canonical/role.d.ts.map +1 -1
- package/dist/check/canonical/roles.d.ts.map +1 -1
- package/dist/check/canonical/roles.js +10 -5
- package/dist/check/canonical/roles.js.map +1 -1
- package/dist/check/canonical/shared-directories.d.ts +3 -0
- package/dist/check/canonical/shared-directories.d.ts.map +1 -0
- package/dist/check/canonical/shared-directories.js +8 -0
- package/dist/check/canonical/shared-directories.js.map +1 -0
- package/dist/check/canonical/stray-entry.d.ts.map +1 -1
- package/dist/check/canonical/stray-entry.js +43 -4
- package/dist/check/canonical/stray-entry.js.map +1 -1
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +2 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/configuration/module-problems.js +20 -16
- package/dist/check/configuration/module-problems.js.map +1 -1
- package/dist/check/errors/code-reference.d.ts +7 -0
- package/dist/check/errors/code-reference.d.ts.map +1 -0
- package/dist/check/errors/code-reference.js +2 -0
- package/dist/check/errors/code-reference.js.map +1 -0
- package/dist/check/errors/code-references.d.ts +7 -0
- package/dist/check/errors/code-references.d.ts.map +1 -0
- package/dist/check/errors/code-references.js +13 -0
- package/dist/check/errors/code-references.js.map +1 -0
- package/dist/check/errors/kit-code-keys.d.ts +3 -0
- package/dist/check/errors/kit-code-keys.d.ts.map +1 -0
- package/dist/check/errors/kit-code-keys.js +5 -0
- package/dist/check/errors/kit-code-keys.js.map +1 -0
- package/dist/check/errors/kit-codes-list.d.ts +3 -0
- package/dist/check/errors/kit-codes-list.d.ts.map +1 -0
- package/dist/check/errors/kit-codes-list.js +3 -0
- package/dist/check/errors/kit-codes-list.js.map +1 -0
- package/dist/check/explain/errors-docs.d.ts.map +1 -1
- package/dist/check/explain/errors-docs.js +5 -2
- package/dist/check/explain/errors-docs.js.map +1 -1
- package/dist/check/explain/module-docs.d.ts.map +1 -1
- package/dist/check/explain/module-docs.js +9 -6
- package/dist/check/explain/module-docs.js.map +1 -1
- package/dist/check/explain/persistence-docs.d.ts.map +1 -1
- package/dist/check/explain/persistence-docs.js +18 -0
- package/dist/check/explain/persistence-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +3 -1
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/fixtures/errors-route.d.ts +1 -1
- package/dist/check/fixtures/errors-route.d.ts.map +1 -1
- package/dist/check/fixtures/errors-route.js +2 -2
- package/dist/check/fixtures/errors-route.js.map +1 -1
- package/dist/check/fixtures/files-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/files-fixtures.js +77 -0
- package/dist/check/fixtures/files-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/module-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/module-fixtures.js +27 -31
- package/dist/check/fixtures/module-fixtures.js.map +1 -1
- package/dist/check/fixtures/named-refusal-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/named-refusal-fixtures.js +40 -0
- package/dist/check/fixtures/named-refusal-fixtures.js.map +1 -1
- package/dist/check/fixtures/shared-folder-fixtures.d.ts +7 -0
- package/dist/check/fixtures/shared-folder-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/shared-folder-fixtures.js +176 -0
- package/dist/check/fixtures/shared-folder-fixtures.js.map +1 -0
- package/dist/check/fixtures/shared-kernel-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/shared-kernel-fixtures.js +11 -0
- package/dist/check/fixtures/shared-kernel-fixtures.js.map +1 -1
- package/dist/check/fixtures/with-modules.d.ts +4 -0
- package/dist/check/fixtures/with-modules.d.ts.map +1 -0
- package/dist/check/fixtures/with-modules.js +22 -0
- package/dist/check/fixtures/with-modules.js.map +1 -0
- package/dist/check/model/context-location.d.ts +5 -0
- package/dist/check/model/context-location.d.ts.map +1 -1
- package/dist/check/project/locate.js +12 -5
- package/dist/check/project/locate.js.map +1 -1
- package/dist/check/rules/errors-known-code.d.ts.map +1 -1
- package/dist/check/rules/errors-known-code.js +60 -9
- package/dist/check/rules/errors-known-code.js.map +1 -1
- package/dist/check/rules/module-complete.d.ts.map +1 -1
- package/dist/check/rules/module-complete.js +19 -20
- package/dist/check/rules/module-complete.js.map +1 -1
- package/dist/check/rules/module-declared.js +5 -1
- package/dist/check/rules/module-declared.js.map +1 -1
- package/dist/check/rules/search-store-from-platform.d.ts +3 -0
- package/dist/check/rules/search-store-from-platform.d.ts.map +1 -0
- package/dist/check/rules/search-store-from-platform.js +93 -0
- package/dist/check/rules/search-store-from-platform.js.map +1 -0
- package/dist/check/rules/test-acceptance-black-box.d.ts.map +1 -1
- package/dist/check/rules/test-acceptance-black-box.js +6 -7
- package/dist/check/rules/test-acceptance-black-box.js.map +1 -1
- package/dist/check/rules/test-builder-required.d.ts.map +1 -1
- package/dist/check/rules/test-builder-required.js +15 -12
- package/dist/check/rules/test-builder-required.js.map +1 -1
- package/dist/check/rules/test-spec-required.d.ts.map +1 -1
- package/dist/check/rules/test-spec-required.js +12 -11
- package/dist/check/rules/test-spec-required.js.map +1 -1
- package/dist/check/rules/tree-closed.js +1 -1
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/check/support/path-in-context.d.ts +1 -1
- package/dist/check/support/path-in-context.d.ts.map +1 -1
- package/dist/check/support/path-in-context.js +6 -3
- package/dist/check/support/path-in-context.js.map +1 -1
- package/dist/check/support/test-folder-of.d.ts +11 -0
- package/dist/check/support/test-folder-of.d.ts.map +1 -0
- package/dist/check/support/test-folder-of.js +12 -0
- package/dist/check/support/test-folder-of.js.map +1 -0
- package/dist/commands/drizzle-generate.d.ts.map +1 -1
- package/dist/commands/drizzle-generate.js +9 -0
- package/dist/commands/drizzle-generate.js.map +1 -1
- package/dist/commands/generate.js +9 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lint.d.ts +2 -1
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +4 -1
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/move-to-module.d.ts.map +1 -1
- package/dist/commands/move-to-module.js +0 -2
- package/dist/commands/move-to-module.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/known-stack-keys.d.ts +1 -1
- package/dist/config/known-stack-keys.d.ts.map +1 -1
- package/dist/config/known-stack-keys.js +1 -0
- package/dist/config/known-stack-keys.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/stack.d.ts +9 -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/context-layout/context-layout.d.ts +3 -2
- package/dist/context-layout/context-layout.d.ts.map +1 -1
- package/dist/context-layout/context-layout.js +18 -8
- package/dist/context-layout/context-layout.js.map +1 -1
- package/dist/context-layout/imports-of.d.ts +11 -0
- package/dist/context-layout/imports-of.d.ts.map +1 -0
- package/dist/context-layout/imports-of.js +20 -0
- package/dist/context-layout/imports-of.js.map +1 -0
- package/dist/context-layout/module-moves.d.ts +10 -7
- package/dist/context-layout/module-moves.d.ts.map +1 -1
- package/dist/context-layout/module-moves.js +65 -122
- package/dist/context-layout/module-moves.js.map +1 -1
- package/dist/context-layout/runner-configs-by-hand.d.ts +11 -0
- package/dist/context-layout/runner-configs-by-hand.d.ts.map +1 -0
- package/dist/context-layout/runner-configs-by-hand.js +23 -0
- package/dist/context-layout/runner-configs-by-hand.js.map +1 -0
- package/dist/context-layout/settle.d.ts +20 -0
- package/dist/context-layout/settle.d.ts.map +1 -0
- package/dist/context-layout/settle.js +58 -0
- package/dist/context-layout/settle.js.map +1 -0
- package/dist/controllers/declared-code.d.ts +3 -0
- package/dist/controllers/declared-code.d.ts.map +1 -0
- package/dist/controllers/declared-code.js +8 -0
- package/dist/controllers/declared-code.js.map +1 -0
- package/dist/controllers/finish-migration.d.ts.map +1 -1
- package/dist/controllers/finish-migration.js +5 -3
- package/dist/controllers/finish-migration.js.map +1 -1
- package/dist/controllers/migrate-context.js +3 -2
- package/dist/controllers/migrate-context.js.map +1 -1
- package/dist/controllers/plan-context.d.ts +1 -1
- package/dist/controllers/plan-context.d.ts.map +1 -1
- package/dist/controllers/plan-context.js +11 -6
- package/dist/controllers/plan-context.js.map +1 -1
- package/dist/controllers/render-controller.d.ts.map +1 -1
- package/dist/controllers/render-controller.js +20 -4
- package/dist/controllers/render-controller.js.map +1 -1
- package/dist/depcruise/hygiene-rules.js +2 -2
- package/dist/depcruise/hygiene-rules.js.map +1 -1
- package/dist/depcruise/test-files.d.ts +4 -1
- package/dist/depcruise/test-files.d.ts.map +1 -1
- package/dist/depcruise/test-files.js +5 -2
- package/dist/depcruise/test-files.js.map +1 -1
- package/dist/describe/codes-named-in.d.ts +8 -0
- package/dist/describe/codes-named-in.d.ts.map +1 -0
- package/dist/describe/codes-named-in.js +33 -0
- package/dist/describe/codes-named-in.js.map +1 -0
- package/dist/describe/read-controllers.js +2 -2
- package/dist/describe/read-controllers.js.map +1 -1
- package/dist/describe/read-route-groups.d.ts +6 -2
- package/dist/describe/read-route-groups.d.ts.map +1 -1
- package/dist/describe/read-route-groups.js +8 -4
- package/dist/describe/read-route-groups.js.map +1 -1
- package/dist/describe/read-routes.d.ts.map +1 -1
- package/dist/describe/read-routes.js +7 -2
- package/dist/describe/read-routes.js.map +1 -1
- package/dist/docs/spec-heading.d.ts +5 -4
- package/dist/docs/spec-heading.d.ts.map +1 -1
- package/dist/docs/spec-heading.js +4 -6
- package/dist/docs/spec-heading.js.map +1 -1
- package/dist/docs/spec-of-page.d.ts +7 -2
- package/dist/docs/spec-of-page.d.ts.map +1 -1
- package/dist/docs/spec-of-page.js +8 -3
- package/dist/docs/spec-of-page.js.map +1 -1
- package/dist/docs/specs-by-directory.d.ts +2 -2
- package/dist/docs/specs-by-directory.d.ts.map +1 -1
- package/dist/docs/specs-by-directory.js +4 -5
- package/dist/docs/specs-by-directory.js.map +1 -1
- package/dist/docs/write-behaviour.d.ts +1 -1
- package/dist/docs/write-behaviour.d.ts.map +1 -1
- package/dist/docs/write-behaviour.js +17 -2
- package/dist/docs/write-behaviour.js.map +1 -1
- package/dist/file-moves/follow-in-migrations.d.ts +10 -0
- package/dist/file-moves/follow-in-migrations.d.ts.map +1 -0
- package/dist/file-moves/follow-in-migrations.js +30 -0
- package/dist/file-moves/follow-in-migrations.js.map +1 -0
- package/dist/file-moves/move-files.d.ts +2 -1
- package/dist/file-moves/move-files.d.ts.map +1 -1
- package/dist/file-moves/move-files.js +4 -2
- package/dist/file-moves/move-files.js.map +1 -1
- package/dist/generate/errors/write-named-refusal.d.ts.map +1 -1
- package/dist/generate/errors/write-named-refusal.js +6 -2
- package/dist/generate/errors/write-named-refusal.js.map +1 -1
- package/dist/generate/kinds/builder-kind.js +1 -1
- package/dist/generate/kinds/builder-kind.js.map +1 -1
- package/dist/generate/kinds/declarations-of.js +1 -1
- package/dist/generate/kinds/declarations-of.js.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts +2 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +19 -5
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/e2e/acting-role.d.ts +15 -0
- package/dist/generate/kinds/e2e/acting-role.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/acting-role.js +19 -0
- package/dist/generate/kinds/e2e/acting-role.js.map +1 -0
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +5 -1
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
- package/dist/generate/kinds/gateway-kind.js +14 -2
- package/dist/generate/kinds/gateway-kind.js.map +1 -1
- package/dist/generate/kinds/generate-repository.js +1 -1
- package/dist/generate/kinds/generate-repository.js.map +1 -1
- package/dist/generate/kinds/module-kind.d.ts.map +1 -1
- package/dist/generate/kinds/module-kind.js +9 -1
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/route/group-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/group-vars.js +5 -3
- package/dist/generate/kinds/route/group-vars.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +1 -1
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/world/context-fakes.d.ts +1 -1
- package/dist/generate/kinds/world/context-fakes.d.ts.map +1 -1
- package/dist/generate/kinds/world/context-fakes.js +8 -7
- package/dist/generate/kinds/world/context-fakes.js.map +1 -1
- package/dist/generate/kinds/world/context-world.d.ts +1 -1
- package/dist/generate/kinds/world/context-world.d.ts.map +1 -1
- package/dist/generate/kinds/world/context-world.js +3 -1
- package/dist/generate/kinds/world/context-world.js.map +1 -1
- package/dist/generate/place-generated-files.d.ts +2 -0
- package/dist/generate/place-generated-files.d.ts.map +1 -1
- package/dist/generate/place-generated-files.js +13 -13
- package/dist/generate/place-generated-files.js.map +1 -1
- package/dist/generate/refresh-docs.d.ts +1 -1
- package/dist/generate/refresh-docs.d.ts.map +1 -1
- package/dist/generate/refresh-docs.js +3 -1
- package/dist/generate/refresh-docs.js.map +1 -1
- package/dist/generate/refuse-earlier-layout.d.ts +4 -3
- package/dist/generate/refuse-earlier-layout.d.ts.map +1 -1
- package/dist/generate/refuse-earlier-layout.js +9 -6
- package/dist/generate/refuse-earlier-layout.js.map +1 -1
- package/dist/help/flag-notes.d.ts.map +1 -1
- package/dist/help/flag-notes.js +8 -7
- package/dist/help/flag-notes.js.map +1 -1
- package/dist/help/tool-notes.d.ts.map +1 -1
- package/dist/help/tool-notes.js +23 -17
- package/dist/help/tool-notes.js.map +1 -1
- package/dist/help/usage.js +2 -2
- package/dist/help/work-notes.d.ts.map +1 -1
- package/dist/help/work-notes.js +4 -3
- package/dist/help/work-notes.js.map +1 -1
- package/dist/init/files/platform-files.d.ts.map +1 -1
- package/dist/init/files/platform-files.js +11 -0
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +2 -0
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/versions.d.ts.map +1 -1
- package/dist/init/manifest/versions.js +25 -24
- package/dist/init/manifest/versions.js.map +1 -1
- package/dist/init/rewire-personal-data.d.ts.map +1 -1
- package/dist/init/rewire-personal-data.js +4 -2
- package/dist/init/rewire-personal-data.js.map +1 -1
- package/dist/init/rewire-tables.d.ts.map +1 -1
- package/dist/init/rewire-tables.js +4 -2
- package/dist/init/rewire-tables.js.map +1 -1
- package/dist/init/stack/resolve-operations.d.ts +12 -0
- package/dist/init/stack/resolve-operations.d.ts.map +1 -0
- package/dist/init/stack/resolve-operations.js +23 -0
- package/dist/init/stack/resolve-operations.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +2 -19
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +2 -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 +6 -4
- package/dist/init/template-vars.js.map +1 -1
- package/dist/init/with-held-imports.d.ts +9 -0
- package/dist/init/with-held-imports.d.ts.map +1 -0
- package/dist/init/with-held-imports.js +15 -0
- package/dist/init/with-held-imports.js.map +1 -0
- package/dist/knip/enter-module-test-folders.d.ts +10 -0
- package/dist/knip/enter-module-test-folders.d.ts.map +1 -0
- package/dist/knip/enter-module-test-folders.js +42 -0
- package/dist/knip/enter-module-test-folders.js.map +1 -0
- package/dist/knip/index.d.ts +1 -0
- package/dist/knip/index.d.ts.map +1 -1
- package/dist/knip/index.js +1 -0
- package/dist/knip/index.js.map +1 -1
- package/dist/lint/eslint-in-project.d.ts +1 -1
- package/dist/lint/eslint-in-project.d.ts.map +1 -1
- package/dist/lint/eslint-in-project.js +3 -2
- package/dist/lint/eslint-in-project.js.map +1 -1
- package/dist/lint/lint-run.d.ts +2 -0
- package/dist/lint/lint-run.d.ts.map +1 -1
- package/dist/merge/landed-commit.js +14 -2
- package/dist/merge/landed-commit.js.map +1 -1
- package/dist/merge/landed-point.js +3 -0
- package/dist/merge/landed-point.js.map +1 -1
- package/dist/merge/lost/dropped-additions.d.ts +20 -0
- package/dist/merge/lost/dropped-additions.d.ts.map +1 -0
- package/dist/merge/lost/dropped-additions.js +42 -0
- package/dist/merge/lost/dropped-additions.js.map +1 -0
- package/dist/merge/lost/expected-over.d.ts +13 -0
- package/dist/merge/lost/expected-over.d.ts.map +1 -0
- package/dist/merge/lost/expected-over.js +16 -0
- package/dist/merge/lost/expected-over.js.map +1 -0
- package/dist/merge/lost/kept-rows.d.ts +4 -2
- package/dist/merge/lost/kept-rows.d.ts.map +1 -1
- package/dist/merge/lost/kept-rows.js +10 -7
- package/dist/merge/lost/kept-rows.js.map +1 -1
- package/dist/merge/lost/lost-lines.d.ts +2 -2
- package/dist/merge/lost/lost-lines.d.ts.map +1 -1
- package/dist/merge/lost/lost-lines.js +5 -3
- package/dist/merge/lost/lost-lines.js.map +1 -1
- package/dist/merge/lost/lost-tests.d.ts +2 -2
- package/dist/merge/lost/lost-tests.d.ts.map +1 -1
- package/dist/merge/lost/lost-tests.js +5 -3
- package/dist/merge/lost/lost-tests.js.map +1 -1
- package/dist/merge/lost/verify-merge.d.ts.map +1 -1
- package/dist/merge/lost/verify-merge.js +12 -5
- package/dist/merge/lost/verify-merge.js.map +1 -1
- package/dist/merge/merge-trunk.d.ts.map +1 -1
- package/dist/merge/merge-trunk.js +35 -7
- package/dist/merge/merge-trunk.js.map +1 -1
- package/dist/merge/slices-from-fork.d.ts +20 -0
- package/dist/merge/slices-from-fork.d.ts.map +1 -0
- package/dist/merge/slices-from-fork.js +27 -0
- package/dist/merge/slices-from-fork.js.map +1 -0
- package/dist/merge/trunk-of.d.ts +4 -2
- package/dist/merge/trunk-of.d.ts.map +1 -1
- package/dist/merge/trunk-of.js +4 -2
- package/dist/merge/trunk-of.js.map +1 -1
- package/dist/migration/warn-dropped-context-tables.d.ts.map +1 -1
- package/dist/migration/warn-dropped-context-tables.js +6 -4
- package/dist/migration/warn-dropped-context-tables.js.map +1 -1
- package/dist/model-modules/context-level-folder-of.d.ts +9 -0
- package/dist/model-modules/context-level-folder-of.d.ts.map +1 -0
- package/dist/model-modules/context-level-folder-of.js +11 -0
- package/dist/model-modules/context-level-folder-of.js.map +1 -0
- package/dist/model-modules/earlier-folders.d.ts +10 -0
- package/dist/model-modules/earlier-folders.d.ts.map +1 -0
- package/dist/model-modules/earlier-folders.js +20 -0
- package/dist/model-modules/earlier-folders.js.map +1 -0
- package/dist/model-modules/folders-of-context.d.ts +8 -0
- package/dist/model-modules/folders-of-context.d.ts.map +1 -0
- package/dist/model-modules/folders-of-context.js +11 -0
- package/dist/model-modules/folders-of-context.js.map +1 -0
- package/dist/model-modules/held-file-of.d.ts +10 -0
- package/dist/model-modules/held-file-of.d.ts.map +1 -0
- package/dist/model-modules/held-file-of.js +18 -0
- package/dist/model-modules/held-file-of.js.map +1 -0
- package/dist/model-modules/index.d.ts +8 -1
- package/dist/model-modules/index.d.ts.map +1 -1
- package/dist/model-modules/index.js +8 -1
- package/dist/model-modules/index.js.map +1 -1
- package/dist/model-modules/into-module.d.ts +3 -3
- package/dist/model-modules/into-module.d.ts.map +1 -1
- package/dist/model-modules/into-module.js +9 -12
- package/dist/model-modules/into-module.js.map +1 -1
- package/dist/model-modules/is-context-level.d.ts +4 -5
- package/dist/model-modules/is-context-level.d.ts.map +1 -1
- package/dist/model-modules/is-context-level.js +6 -16
- package/dist/model-modules/is-context-level.js.map +1 -1
- package/dist/model-modules/is-held-by-shared.d.ts +8 -0
- package/dist/model-modules/is-held-by-shared.d.ts.map +1 -0
- package/dist/model-modules/is-held-by-shared.js +20 -0
- package/dist/model-modules/is-held-by-shared.js.map +1 -0
- package/dist/model-modules/module-layers.d.ts +9 -2
- package/dist/model-modules/module-layers.d.ts.map +1 -1
- package/dist/model-modules/module-layers.js +10 -3
- package/dist/model-modules/module-layers.js.map +1 -1
- package/dist/model-modules/module-name-flaw.d.ts +4 -1
- package/dist/model-modules/module-name-flaw.d.ts.map +1 -1
- package/dist/model-modules/module-name-flaw.js +6 -2
- package/dist/model-modules/module-name-flaw.js.map +1 -1
- package/dist/model-modules/module-placement.d.ts +8 -6
- package/dist/model-modules/module-placement.d.ts.map +1 -1
- package/dist/model-modules/module-placement.js +32 -30
- package/dist/model-modules/module-placement.js.map +1 -1
- package/dist/model-modules/module-split.d.ts +7 -5
- package/dist/model-modules/module-split.d.ts.map +1 -1
- package/dist/model-modules/module-split.js +18 -17
- package/dist/model-modules/module-split.js.map +1 -1
- package/dist/model-modules/module-test-folder-of.d.ts +8 -0
- package/dist/model-modules/module-test-folder-of.d.ts.map +1 -0
- package/dist/model-modules/module-test-folder-of.js +11 -0
- package/dist/model-modules/module-test-folder-of.js.map +1 -0
- package/dist/model-modules/role-folders-of.d.ts +5 -3
- package/dist/model-modules/role-folders-of.d.ts.map +1 -1
- package/dist/model-modules/role-folders-of.js +19 -11
- package/dist/model-modules/role-folders-of.js.map +1 -1
- package/dist/model-modules/role-folders.d.ts +1 -1
- package/dist/model-modules/role-folders.js +1 -1
- package/dist/model-modules/subject-module.d.ts +13 -0
- package/dist/model-modules/subject-module.d.ts.map +1 -0
- package/dist/model-modules/subject-module.js +34 -0
- package/dist/model-modules/subject-module.js.map +1 -0
- package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
- package/dist/move-to-module/moves-into-module.js +29 -16
- package/dist/move-to-module/moves-into-module.js.map +1 -1
- package/dist/naming/plural.d.ts.map +1 -1
- package/dist/naming/plural.js +5 -0
- package/dist/naming/plural.js.map +1 -1
- package/dist/plan/format-plan.js +1 -1
- package/dist/plan/format-plan.js.map +1 -1
- package/dist/progress/build-next-of.d.ts.map +1 -1
- package/dist/progress/build-next-of.js +8 -3
- package/dist/progress/build-next-of.js.map +1 -1
- package/dist/refusals/apply-plan.d.ts.map +1 -1
- package/dist/refusals/apply-plan.js +8 -4
- package/dist/refusals/apply-plan.js.map +1 -1
- package/dist/refusals/move-named-specs.d.ts.map +1 -1
- package/dist/refusals/move-named-specs.js +7 -4
- package/dist/refusals/move-named-specs.js.map +1 -1
- package/dist/refusals/unit-folder-of.d.ts +9 -0
- package/dist/refusals/unit-folder-of.d.ts.map +1 -0
- package/dist/refusals/unit-folder-of.js +15 -0
- package/dist/refusals/unit-folder-of.js.map +1 -0
- package/dist/slice/plan-staging.d.ts +2 -1
- package/dist/slice/plan-staging.d.ts.map +1 -1
- package/dist/slice/plan-staging.js +3 -1
- package/dist/slice/plan-staging.js.map +1 -1
- package/dist/stack/declares-roles.d.ts +8 -0
- package/dist/stack/declares-roles.d.ts.map +1 -0
- package/dist/stack/declares-roles.js +11 -0
- package/dist/stack/declares-roles.js.map +1 -0
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +7 -4
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/progress-of.js +12 -1
- package/dist/worker/progress-of.js.map +1 -1
- package/dist/worker/row-commits.js +7 -1
- package/dist/worker/row-commits.js.map +1 -1
- package/package.json +6 -5
- package/templates/command/handler.spec.buses.ts.tpl +4 -1
- package/templates/command/handler.spec.container.ts.tpl +6 -1
- package/templates/controller/controller.spec.ts.tpl +4 -1
- package/templates/controller/guard.spec.ts.tpl +2 -2
- package/templates/controller/guard.ts.tpl +2 -1
- package/templates/e2e/e2e.spec.ts.tpl +5 -2
- package/templates/error/codes-import.ts.tpl +1 -0
- package/templates/error/refusal-case.spec.ts.tpl +1 -1
- package/templates/error/refusal.spec.ts.tpl +1 -0
- package/templates/file-upload/handler.spec.ts.tpl +4 -1
- package/templates/init/README.md.tpl +20 -0
- package/templates/init/docker/docker-compose.yml.tpl +24 -0
- package/templates/init/docker/env.example.tpl +9 -0
- package/templates/init/e2e/create-credentials.jwt.ts.tpl +13 -0
- package/templates/init/e2e/create-credentials.keycloak.ts.tpl +13 -0
- package/templates/init/e2e/create-credentials.none.ts.tpl +13 -0
- package/templates/init/e2e/create-credentials.passport.ts.tpl +13 -0
- package/templates/init/e2e/test-environment.ts.tpl +4 -0
- package/templates/init/main.ts.tpl +3 -0
- package/templates/init/platform/audit/search-audit-entries/search-audit-entries.controller.ts.tpl +2 -2
- package/templates/init/platform/audit/search-audit-entries/search-audit-entries.route.ts.tpl +2 -2
- package/templates/init/platform/composition/compose-application.container.ts.tpl +13 -0
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +4 -0
- package/templates/init/platform/composition/create-platform.manual.ts.tpl +14 -4
- package/templates/init/platform/composition/lay-foundations.container.ts.tpl +30 -0
- package/templates/init/platform/composition/lay-foundations.manual.ts.tpl +11 -0
- package/templates/init/platform/composition/platform-options.manual.ts.tpl +7 -0
- package/templates/init/platform/composition/platform.manual.ts.tpl +7 -0
- package/templates/init/platform/config/app-config.ts.tpl +13 -0
- package/templates/init/platform/config/load-config.ts.tpl +38 -3
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +8 -2
- package/templates/init/platform/search/open-search.ts.tpl +88 -0
- package/templates/init/platform/search/provisioned-indexes.ts.tpl +134 -0
- package/templates/init/platform/search/search-indexes.ts.tpl +23 -0
- package/templates/init/platform/search/search-name-taken-error.ts.tpl +10 -0
- package/templates/init/platform/search/search.module.container.ts.tpl +17 -0
- package/templates/init/platform/search/store-index.ts.tpl +49 -0
- package/templates/init/rules/infrastructure.md.tpl +3 -0
- package/templates/init/rules/platform.md.tpl +3 -0
- package/templates/init/rules/presentation.md.tpl +2 -2
- package/templates/init/rules/tests.md.tpl +1 -0
- package/templates/init/scripts/privacy-erase.container.ts.tpl +9 -0
- package/templates/init/scripts/privacy-erase.manual.ts.tpl +9 -0
- package/templates/init/scripts/privacy-export.container.ts.tpl +9 -0
- package/templates/init/scripts/privacy-export.manual.ts.tpl +9 -0
- package/templates/init/scripts/privacy-purge.container.ts.tpl +9 -0
- package/templates/init/scripts/privacy-purge.manual.ts.tpl +9 -0
- package/templates/nest-controller/controller.spec.ts.tpl +4 -1
- package/templates/pipeline/biome.json.tpl +1 -1
- package/templates/pipeline/jest.mutation.config.js.tpl +1 -1
- package/templates/pipeline/knip.json.tpl +2 -0
- package/templates/pipeline/package-scripts.json +2 -2
- package/templates/pipeline/vitest.config.ts.tpl +11 -6
- package/templates/pipeline/vitest.mutation.config.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/accounts.routes.ts.tpl +2 -1
- package/templates/presets/identity/context/presentation/http/invitations.routes.ts.tpl +2 -1
- package/templates/presets/identity/context/presentation/http/organisations.routes.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/change-member-role.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/deactivate-account.handler.spec.ts.tpl +4 -4
- package/templates/presets/identity/context/test/unit/grant-delegation.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/invite-member.handler.spec.ts.tpl +3 -3
- package/templates/presets/identity/context/test/unit/provision-account.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/remove-member.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/revoke-delegation.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/revoke-invitation.handler.spec.ts.tpl +2 -1
- package/templates/presets/identity/context/test/unit/search-members.handler.spec.ts.tpl +2 -2
- package/templates/query/handler.spec.buses.ts.tpl +4 -1
- package/templates/query/handler.spec.container.ts.tpl +6 -1
- package/templates/query/search.handler.spec.buses.ts.tpl +2 -2
- package/templates/query/search.handler.spec.container.ts.tpl +2 -2
- package/templates/query/search.reader.spec.ts.tpl +2 -2
- package/templates/route/route.class-validator.ts.tpl +5 -0
- package/templates/route/route.none.ts.tpl +6 -1
- package/templates/route/route.search.ts.tpl +3 -3
- package/templates/route/route.spec.ts.tpl +4 -1
- package/templates/route/route.standard-schema.ts.tpl +5 -0
- package/templates/route/route.typebox.ts.tpl +5 -0
- package/templates/route/route.zod.ts.tpl +5 -0
- package/templates/service/main.ts.tpl +3 -0
- package/templates/value-object/value-object.spec.ts.tpl +6 -3
- package/templates/worker/main.ts.tpl +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"into-module.d.ts","sourceRoot":"","sources":["../../src/model-modules/into-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"into-module.d.ts","sourceRoot":"","sources":["../../src/model-modules/into-module.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK3E"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { MODULE_LAYERS,
|
|
1
|
+
import { MODULE_LAYERS, TEST_FOLDER } from './module-layers.js';
|
|
2
|
+
/** The folders of the tests a module holds for itself: its specs, its fakes and its builders. */
|
|
3
|
+
const MODULE_TESTS = ['unit', 'integration', 'fakes', 'builders'];
|
|
2
4
|
/**
|
|
3
|
-
* Puts a path relative to its context, written without modules,
|
|
4
|
-
*
|
|
5
|
-
*
|
|
5
|
+
* Puts a path relative to its context, written without modules, in its module: a file of a layer
|
|
6
|
+
* under the folder of the module (`<module>/domain/...`), a spec, a fake or a builder in its test
|
|
7
|
+
* folder (`<module>/test/unit/...`). Any other path stays as it is written.
|
|
6
8
|
*/
|
|
7
9
|
export function intoModule(module, file) {
|
|
8
|
-
const [first = '', second = ''
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
if (MODULE_LAYERS.includes(first)) {
|
|
13
|
-
return `${module}/${file}`;
|
|
14
|
-
}
|
|
15
|
-
return first === 'test' && MODULE_TEST_FOLDERS.includes(second) ? ['test', second, module, ...rest].join('/') : file;
|
|
10
|
+
const [first = '', second = ''] = file.split('/');
|
|
11
|
+
const held = MODULE_LAYERS.includes(first) || (first === TEST_FOLDER && MODULE_TESTS.includes(second));
|
|
12
|
+
return module !== undefined && held ? `${module}/${file}` : file;
|
|
16
13
|
}
|
|
17
14
|
//# sourceMappingURL=into-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"into-module.js","sourceRoot":"","sources":["../../src/model-modules/into-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"into-module.js","sourceRoot":"","sources":["../../src/model-modules/into-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7D,iGAAiG;AACjG,MAAM,YAAY,GAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAA0B,EAAE,IAAY;IACjE,MAAM,CAAC,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,WAAW,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvG,OAAO,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The files a context
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* and the fakes, builders and worlds of its specs. Every other file of a layer belongs to a module.
|
|
2
|
+
* The files a context divided into modules keeps outside every module, by their path relative to
|
|
3
|
+
* the context written without modules: the closed list of its error codes and its permission set
|
|
4
|
+
* (`perContext` of the canonical tree, at the root of the context), and what its `shared/` folder
|
|
5
|
+
* holds (`isHeldByShared`). Every other file of a layer belongs to a module.
|
|
7
6
|
*/
|
|
8
7
|
export declare function isContextLevel(context: string, file: string): boolean;
|
|
9
8
|
//# sourceMappingURL=is-context-level.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-context-level.d.ts","sourceRoot":"","sources":["../../src/model-modules/is-context-level.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-context-level.d.ts","sourceRoot":"","sources":["../../src/model-modules/is-context-level.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOrE"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import { ROLES } from '../check/canonical/roles.js';
|
|
2
|
-
|
|
3
|
-
const SHARED_BY_THE_MODULES = [
|
|
4
|
-
// The database of the context: its schema, its tables and its migrations; a row schema is of a module.
|
|
5
|
-
/^infrastructure\/persistence\/(?![^/]*-row\.schema\.ts$)[^/]+\.schema\.ts$/,
|
|
6
|
-
// The route groups, their guards and the shapes several routes answer with.
|
|
7
|
-
/^presentation\/http\/[^/]+\.routes\.ts$/,
|
|
8
|
-
/^presentation\/http\/(?:shared|guards)\//,
|
|
9
|
-
// What the specs of several modules share.
|
|
10
|
-
/^test\/(?:fakes|builders|worlds)\//,
|
|
11
|
-
];
|
|
2
|
+
import { isHeldByShared } from './is-held-by-shared.js';
|
|
12
3
|
/**
|
|
13
|
-
* The files a context
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* and the fakes, builders and worlds of its specs. Every other file of a layer belongs to a module.
|
|
4
|
+
* The files a context divided into modules keeps outside every module, by their path relative to
|
|
5
|
+
* the context written without modules: the closed list of its error codes and its permission set
|
|
6
|
+
* (`perContext` of the canonical tree, at the root of the context), and what its `shared/` folder
|
|
7
|
+
* holds (`isHeldByShared`). Every other file of a layer belongs to a module.
|
|
18
8
|
*/
|
|
19
9
|
export function isContextLevel(context, file) {
|
|
20
|
-
return (
|
|
10
|
+
return (isHeldByShared(file) ||
|
|
21
11
|
ROLES.some((role) => (role.perContext ?? []).some((name) => file === `${role.directory}/${name.replace('<context>', context)}`)));
|
|
22
12
|
}
|
|
23
13
|
//# sourceMappingURL=is-context-level.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-context-level.js","sourceRoot":"","sources":["../../src/model-modules/is-context-level.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"is-context-level.js","sourceRoot":"","sources":["../../src/model-modules/is-context-level.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,IAAY;IAC1D,OAAO,CACL,cAAc,CAAC,IAAI,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAClB,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,CAC3G,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True for a file that belongs to no module of a context divided into modules, and sits in its
|
|
3
|
+
* `shared/` folder: the schema and tables of its database, its route groups with their guards and
|
|
4
|
+
* shared shapes, and its worlds. A fake or a builder follows its subject into a module; one that
|
|
5
|
+
* has none, and a spec of what `shared/` holds, sit in `shared/test/` too, told by no path.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isHeldByShared(file: string): boolean;
|
|
8
|
+
//# sourceMappingURL=is-held-by-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-held-by-shared.d.ts","sourceRoot":"","sources":["../../src/model-modules/is-held-by-shared.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** What `shared/` of a context divided into modules holds, by its path relative to the context written without `shared/`. */
|
|
2
|
+
const HELD_BY_SHARED = [
|
|
3
|
+
// The database of the context: its schema, its tables and its migrations; a row schema is of a module.
|
|
4
|
+
/^infrastructure\/persistence\/(?![^/]*-row\.schema\.ts$)[^/]+\.schema\.ts$/,
|
|
5
|
+
// The route groups, their guards and the shapes several routes answer with.
|
|
6
|
+
/^presentation\/http\/[^/]+\.routes\.ts$/,
|
|
7
|
+
/^presentation\/http\/(?:shared|guards)\//,
|
|
8
|
+
// The arrangements the specs of several modules share.
|
|
9
|
+
/^test\/worlds\//,
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* True for a file that belongs to no module of a context divided into modules, and sits in its
|
|
13
|
+
* `shared/` folder: the schema and tables of its database, its route groups with their guards and
|
|
14
|
+
* shared shapes, and its worlds. A fake or a builder follows its subject into a module; one that
|
|
15
|
+
* has none, and a spec of what `shared/` holds, sit in `shared/test/` too, told by no path.
|
|
16
|
+
*/
|
|
17
|
+
export function isHeldByShared(file) {
|
|
18
|
+
return HELD_BY_SHARED.some((pattern) => pattern.test(file));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=is-held-by-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-held-by-shared.js","sourceRoot":"","sources":["../../src/model-modules/is-held-by-shared.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAC7H,MAAM,cAAc,GAAsB;IACxC,uGAAuG;IACvG,4EAA4E;IAC5E,4EAA4E;IAC5E,yCAAyC;IACzC,0CAA0C;IAC1C,uDAAuD;IACvD,iBAAiB;CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/** The four layers a module of the model holds, each with its role folders unchanged below it. */
|
|
2
2
|
export declare const MODULE_LAYERS: readonly string[];
|
|
3
|
-
/** The layers 0.86 and 0.87 put a module under (`domain/<module>/`), still read so that context-layout moves them. */
|
|
4
|
-
export declare const EARLIER_MODULE_LAYERS: readonly string[];
|
|
5
3
|
/** The folders of `test/` whose specs follow the module of their subject: `test/unit/<module>/`. */
|
|
6
4
|
export declare const MODULE_TEST_FOLDERS: readonly string[];
|
|
5
|
+
/** The folder of the tests of a context, and of a module that holds its own: `<module>/test/`. */
|
|
6
|
+
export declare const TEST_FOLDER = "test";
|
|
7
|
+
/**
|
|
8
|
+
* The folder where a context divided into modules keeps what belongs to none of them: never a
|
|
9
|
+
* module, never declared, read only in a context that declares modules.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SHARED_FOLDER = "shared";
|
|
12
|
+
/** What `shared/` holds: the database of the context, its route groups, what its specs share. No domain, no application. */
|
|
13
|
+
export declare const SHARED_FOLDERS: readonly string[];
|
|
7
14
|
/** What a module can never be named: a layer, a folder of the root of a context. */
|
|
8
15
|
export declare const CONTEXT_FOLDERS: readonly string[];
|
|
9
16
|
//# sourceMappingURL=module-layers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-layers.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-layers.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAgE,CAAC;AAE5G,
|
|
1
|
+
{"version":3,"file":"module-layers.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-layers.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAgE,CAAC;AAE5G,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAA4B,CAAC;AAE9E,kGAAkG;AAClG,eAAO,MAAM,WAAW,SAAS,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,4HAA4H;AAC5H,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAoD,CAAC;AAEjG,oFAAoF;AACpF,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAA0D,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/** The four layers a module of the model holds, each with its role folders unchanged below it. */
|
|
2
2
|
export const MODULE_LAYERS = ['domain', 'application', 'infrastructure', 'presentation'];
|
|
3
|
-
/** The layers 0.86 and 0.87 put a module under (`domain/<module>/`), still read so that context-layout moves them. */
|
|
4
|
-
export const EARLIER_MODULE_LAYERS = ['domain', 'application'];
|
|
5
3
|
/** The folders of `test/` whose specs follow the module of their subject: `test/unit/<module>/`. */
|
|
6
4
|
export const MODULE_TEST_FOLDERS = ['unit', 'integration'];
|
|
5
|
+
/** The folder of the tests of a context, and of a module that holds its own: `<module>/test/`. */
|
|
6
|
+
export const TEST_FOLDER = 'test';
|
|
7
|
+
/**
|
|
8
|
+
* The folder where a context divided into modules keeps what belongs to none of them: never a
|
|
9
|
+
* module, never declared, read only in a context that declares modules.
|
|
10
|
+
*/
|
|
11
|
+
export const SHARED_FOLDER = 'shared';
|
|
12
|
+
/** What `shared/` holds: the database of the context, its route groups, what its specs share. No domain, no application. */
|
|
13
|
+
export const SHARED_FOLDERS = ['infrastructure', 'presentation', TEST_FOLDER];
|
|
7
14
|
/** What a module can never be named: a layer, a folder of the root of a context. */
|
|
8
|
-
export const CONTEXT_FOLDERS = [...MODULE_LAYERS, 'published-language',
|
|
15
|
+
export const CONTEXT_FOLDERS = [...MODULE_LAYERS, 'published-language', TEST_FOLDER];
|
|
9
16
|
//# sourceMappingURL=module-layers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-layers.js","sourceRoot":"","sources":["../../src/model-modules/module-layers.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAAsB,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAE5G,
|
|
1
|
+
{"version":3,"file":"module-layers.js","sourceRoot":"","sources":["../../src/model-modules/module-layers.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAAsB,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAE5G,oGAAoG;AACpG,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE9E,kGAAkG;AAClG,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAEtC,4HAA4H;AAC5H,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;AAEjG,oFAAoF;AACpF,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,GAAG,aAAa,EAAE,oBAAoB,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -3,6 +3,8 @@ export type ModuleNameFlaw = {
|
|
|
3
3
|
readonly reason: 'format';
|
|
4
4
|
} | {
|
|
5
5
|
readonly reason: 'role-folder';
|
|
6
|
+
} | {
|
|
7
|
+
readonly reason: 'shared-folder';
|
|
6
8
|
} | {
|
|
7
9
|
readonly reason: 'technical';
|
|
8
10
|
readonly word: string;
|
|
@@ -10,7 +12,8 @@ export type ModuleNameFlaw = {
|
|
|
10
12
|
/**
|
|
11
13
|
* The one judgement of a module name that the config check, the rule module/declared and
|
|
12
14
|
* `generate module` share: a folder name in kebab-case, never the name of a layer, of a folder of the
|
|
13
|
-
* root of a context or of a role folder, never
|
|
15
|
+
* root of a context or of a role folder, never `shared`, the folder of what belongs to no module,
|
|
16
|
+
* never a technical grouping. Whether its words are terms of the glossary depends on the context.
|
|
14
17
|
*/
|
|
15
18
|
export declare function moduleNameFlaw(name: string): ModuleNameFlaw | undefined;
|
|
16
19
|
//# sourceMappingURL=module-name-flaw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-name-flaw.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-name-flaw.ts"],"names":[],"mappings":"AAyBA,iGAAiG;AACjG,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAClC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"module-name-flaw.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-name-flaw.ts"],"names":[],"mappings":"AAyBA,iGAAiG;AACjG,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAClC;IAAE,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GACpC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAgBvE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TECHNICAL_WORDS } from '../check/language/technical-words.js';
|
|
2
2
|
import { splitWords } from '../naming/index.js';
|
|
3
3
|
import { isRoleFolder } from './is-role-folder.js';
|
|
4
|
-
import { CONTEXT_FOLDERS, MODULE_LAYERS } from './module-layers.js';
|
|
4
|
+
import { CONTEXT_FOLDERS, MODULE_LAYERS, SHARED_FOLDER } from './module-layers.js';
|
|
5
5
|
/**
|
|
6
6
|
* Words that name a bag, not a part of the model: a module called `shared`, `common` or `core`
|
|
7
7
|
* becomes the place where everything else goes, which is what modules are there to avoid.
|
|
@@ -23,7 +23,8 @@ const KEBAB = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
|
23
23
|
/**
|
|
24
24
|
* The one judgement of a module name that the config check, the rule module/declared and
|
|
25
25
|
* `generate module` share: a folder name in kebab-case, never the name of a layer, of a folder of the
|
|
26
|
-
* root of a context or of a role folder, never
|
|
26
|
+
* root of a context or of a role folder, never `shared`, the folder of what belongs to no module,
|
|
27
|
+
* never a technical grouping. Whether its words are terms of the glossary depends on the context.
|
|
27
28
|
*/
|
|
28
29
|
export function moduleNameFlaw(name) {
|
|
29
30
|
if (!KEBAB.test(name)) {
|
|
@@ -32,6 +33,9 @@ export function moduleNameFlaw(name) {
|
|
|
32
33
|
if (CONTEXT_FOLDERS.includes(name) || MODULE_LAYERS.some((layer) => isRoleFolder(layer, name))) {
|
|
33
34
|
return { reason: 'role-folder' };
|
|
34
35
|
}
|
|
36
|
+
if (name === SHARED_FOLDER) {
|
|
37
|
+
return { reason: 'shared-folder' };
|
|
38
|
+
}
|
|
35
39
|
const word = splitWords(name).find((candidate) => MODULE_TECHNICAL_WORDS.includes(candidate));
|
|
36
40
|
return word === undefined ? undefined : { reason: 'technical', word };
|
|
37
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-name-flaw.js","sourceRoot":"","sources":["../../src/model-modules/module-name-flaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"module-name-flaw.js","sourceRoot":"","sources":["../../src/model-modules/module-name-flaw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;A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|
readonly unplaced: (context: string, relative: string) => never;
|
|
16
16
|
/** Called when `--module` names another module than the one that holds the use case of the file: it throws. */
|
|
17
17
|
readonly split: (context: string, relative: string, holder: string) => never;
|
|
18
|
-
/** The module whose production file a spec of a context is named after
|
|
18
|
+
/** The module whose production file a spec, a fake or a builder of a context is named after, if one is. */
|
|
19
19
|
readonly subjectModule: (context: string, spec: string) => string | undefined;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Where a path of a context, written as it would be without
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
22
|
+
* Where a path of a context divided into modules, written as it would be without them, is. What
|
|
23
|
+
* belongs to no module is in `shared/` (`isHeldByShared`); the code list and the permission set
|
|
24
|
+
* stay as written, at the root. A file of a layer is in the module that holds it, the asked one
|
|
25
|
+
* first, or, for a file being written, in the asked module; one still at the level of the
|
|
26
|
+
* context, which `move-to-module` has not moved yet, is read there. A spec, a fake or a builder
|
|
27
|
+
* goes with its subject, in the test folder of the module that holds the file it is named after,
|
|
28
|
+
* and in `shared/test/` when no module does. A path of a context without modules is as written.
|
|
27
29
|
*/
|
|
28
30
|
export declare function modulePlacement(sources: PlacementSources): (file: string, writing: boolean) => string;
|
|
29
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-placement.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-placement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"module-placement.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-placement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMxC,qGAAqG;AACrG,UAAU,WAAW;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,gFAAgF;IAChF,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,CAAC;IAC3D,8GAA8G;IAC9G,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,KAAK,CAAC;IAChE,+GAA+G;IAC/G,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC;IAC7E,2GAA2G;IAC3G,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC/E;AAQD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,MAAM,CAwBrG"}
|
|
@@ -1,43 +1,50 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { declaredModules } from './declared-modules.js';
|
|
3
2
|
import { intoModule } from './into-module.js';
|
|
4
3
|
import { isContextLevel } from './is-context-level.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { isHeldByShared } from './is-held-by-shared.js';
|
|
5
|
+
import { MODULE_LAYERS, SHARED_FOLDER, TEST_FOLDER } from './module-layers.js';
|
|
7
6
|
/**
|
|
8
|
-
* Where a path of a context, written as it would be without
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Where a path of a context divided into modules, written as it would be without them, is. What
|
|
8
|
+
* belongs to no module is in `shared/` (`isHeldByShared`); the code list and the permission set
|
|
9
|
+
* stay as written, at the root. A file of a layer is in the module that holds it, the asked one
|
|
10
|
+
* first, or, for a file being written, in the asked module; one still at the level of the
|
|
11
|
+
* context, which `move-to-module` has not moved yet, is read there. A spec, a fake or a builder
|
|
12
|
+
* goes with its subject, in the test folder of the module that holds the file it is named after,
|
|
13
|
+
* and in `shared/test/` when no module does. A path of a context without modules is as written.
|
|
13
14
|
*/
|
|
14
15
|
export function modulePlacement(sources) {
|
|
15
16
|
return (file, writing) => {
|
|
16
|
-
const role = rolePathOf(sources
|
|
17
|
-
if (role === undefined
|
|
17
|
+
const role = rolePathOf(sources, file);
|
|
18
|
+
if (role === undefined) {
|
|
18
19
|
return file;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const inShared = `${sources.config.contextsDir}/${role.context}/${SHARED_FOLDER}/${role.relative}`;
|
|
22
|
+
if (isHeldByShared(role.relative)) {
|
|
23
|
+
return readWhereItIs(sources, file, inShared);
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
if (role.relative.startsWith(`${TEST_FOLDER}/`)) {
|
|
26
|
+
return testInItsModule(sources, role) ?? inShared;
|
|
27
|
+
}
|
|
28
|
+
if (isContextLevel(role.context, role.relative) || sources.existsAsIs(file)) {
|
|
29
|
+
return file;
|
|
30
|
+
}
|
|
31
|
+
return inItsModule(sources, role, writing) ?? (writing ? sources.unplaced(role.context, role.relative) : file);
|
|
24
32
|
};
|
|
25
33
|
}
|
|
26
|
-
/**
|
|
27
|
-
function
|
|
34
|
+
/** What belongs to no module is in `shared/`; what a context in the middle of its move still holds at its own level is read there. */
|
|
35
|
+
function readWhereItIs({ existsAsIs }, file, inShared) {
|
|
36
|
+
return !existsAsIs(inShared) && existsAsIs(file) ? file : inShared;
|
|
37
|
+
}
|
|
38
|
+
/** The path a file has in a context divided into modules, when it is written in a layer or in the test folder. */
|
|
39
|
+
function rolePathOf({ config, modulesOf }, file) {
|
|
28
40
|
const prefix = `${config.contextsDir}/`;
|
|
29
41
|
const [context = '', ...parts] = file.startsWith(prefix) ? file.slice(prefix.length).split('/') : [];
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
: undefined;
|
|
34
|
-
}
|
|
35
|
-
/** A spec of `test/unit/` or `test/integration/`, at any depth, not already in the folder of a module. */
|
|
36
|
-
function isSpecOutsideModules([layer, folder = '', first = ''], modules) {
|
|
37
|
-
return layer === 'test' && MODULE_TEST_FOLDERS.includes(folder) && first !== '' && !modules.includes(first);
|
|
42
|
+
const [top = ''] = parts;
|
|
43
|
+
const held = parts.length > 1 && (MODULE_LAYERS.includes(top) || top === TEST_FOLDER);
|
|
44
|
+
return held && modulesOf(context).length > 0 ? { context, relative: parts.join('/') } : undefined;
|
|
38
45
|
}
|
|
39
|
-
/**
|
|
40
|
-
function
|
|
46
|
+
/** A spec, a fake or a builder in its module: the one that holds it, the asked one, or the one that holds its subject. */
|
|
47
|
+
function testInItsModule(sources, role) {
|
|
41
48
|
const { context, relative } = role;
|
|
42
49
|
const asked = sources.asked?.context === context ? sources.asked.module : undefined;
|
|
43
50
|
const candidates = candidatesOf(sources, role, asked);
|
|
@@ -93,9 +100,4 @@ function useCaseFoldersOf(relative) {
|
|
|
93
100
|
? [`presentation/http/${first}/${second}`, `application/commands/${second}`, `application/queries/${second}`]
|
|
94
101
|
: [];
|
|
95
102
|
}
|
|
96
|
-
/** A file written in a context that declares modules, without saying which one: refused, with the way out. */
|
|
97
|
-
function unplaced(sources, { context, relative }, file) {
|
|
98
|
-
const declared = (ownEntry(sources.config.contexts, context)?.modules ?? []).length > 0;
|
|
99
|
-
return declared ? sources.unplaced(context, relative) : file;
|
|
100
|
-
}
|
|
101
103
|
//# sourceMappingURL=module-placement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-placement.js","sourceRoot":"","sources":["../../src/model-modules/module-placement.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"module-placement.js","sourceRoot":"","sources":["../../src/model-modules/module-placement.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6B5E;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,OAAyB;IACvD,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAEvC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,IAAI,aAAa,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEnG,IAAI,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,WAAW,GAAG,CAAC,EAAE,CAAC;YAChD,OAAO,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,QAAQ,CAAC;QACpD,CAAC;QAED,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI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
|
|
4
4
|
readonly path: string;
|
|
5
|
-
/** True when the
|
|
6
|
-
readonly
|
|
5
|
+
/** True when the file sits under `shared/`, the folder of what belongs to no module: it then has no module. */
|
|
6
|
+
readonly shared?: boolean;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Reads the module of a path relative to its context, among the modules of the model the config
|
|
10
10
|
* declares (`declaredModules`): `calendars/domain/aggregates/calendar.aggregate.ts` is
|
|
11
11
|
* `domain/aggregates/calendar.aggregate.ts` of the module `calendars`, and
|
|
12
|
-
* `test/unit/calendars/calendar.aggregate.spec.ts` is `test/unit/calendar.aggregate.spec.ts` of it
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* `test/unit/calendars/calendar.aggregate.spec.ts` is `test/unit/calendar.aggregate.spec.ts` of it,
|
|
13
|
+
* as is `calendars/test/unit/calendar.aggregate.spec.ts`, in the test folder of the module.
|
|
14
|
+
* In a context that declares modules, `shared/infrastructure/persistence/scheduling.schema.ts` is
|
|
15
|
+
* `infrastructure/persistence/scheduling.schema.ts` of no module, and said so (`shared`).
|
|
16
|
+
* A folder the config does not declare is no module: `tree/closed` reports it, and no tool reads it
|
|
15
17
|
* as one. The folder of the module itself (`calendars`) is the module with an empty path. A path
|
|
16
18
|
* already read without its module (`pathInContext`) is given no module.
|
|
17
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-split.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-split.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-split.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-split.ts"],"names":[],"mappings":"AAEA,mHAAmH;AACnH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+GAA+G;IAC/G,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,WAAW,CAQjF"}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EARLIER_MODULE_LAYERS, MODULE_LAYERS, MODULE_TEST_FOLDERS } from './module-layers.js';
|
|
1
|
+
import { MODULE_LAYERS, MODULE_TEST_FOLDERS, SHARED_FOLDER, SHARED_FOLDERS, TEST_FOLDER } from './module-layers.js';
|
|
3
2
|
/**
|
|
4
3
|
* Reads the module of a path relative to its context, among the modules of the model the config
|
|
5
4
|
* declares (`declaredModules`): `calendars/domain/aggregates/calendar.aggregate.ts` is
|
|
6
5
|
* `domain/aggregates/calendar.aggregate.ts` of the module `calendars`, and
|
|
7
|
-
* `test/unit/calendars/calendar.aggregate.spec.ts` is `test/unit/calendar.aggregate.spec.ts` of it
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* `test/unit/calendars/calendar.aggregate.spec.ts` is `test/unit/calendar.aggregate.spec.ts` of it,
|
|
7
|
+
* as is `calendars/test/unit/calendar.aggregate.spec.ts`, in the test folder of the module.
|
|
8
|
+
* In a context that declares modules, `shared/infrastructure/persistence/scheduling.schema.ts` is
|
|
9
|
+
* `infrastructure/persistence/scheduling.schema.ts` of no module, and said so (`shared`).
|
|
10
|
+
* A folder the config does not declare is no module: `tree/closed` reports it, and no tool reads it
|
|
10
11
|
* as one. The folder of the module itself (`calendars`) is the module with an empty path. A path
|
|
11
12
|
* already read without its module (`pathInContext`) is given no module.
|
|
12
13
|
*/
|
|
13
14
|
export function moduleSplit(file, modules) {
|
|
14
15
|
const parts = file.split('/');
|
|
15
16
|
return (inFolderOfModule(parts, modules) ??
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
inSharedFolder(parts, modules) ??
|
|
18
|
+
inTestFolder(parts, modules) ?? { module: undefined, path: file });
|
|
18
19
|
}
|
|
19
|
-
/** `<module>/<layer
|
|
20
|
+
/** `<module>/<layer>/...` and `<module>/test/...`, or the folder of the module itself. */
|
|
20
21
|
function inFolderOfModule([first = '', second, ...rest], modules) {
|
|
21
|
-
if (!modules.includes(first) || (second !== undefined && !MODULE_LAYERS.includes(second))) {
|
|
22
|
+
if (!modules.includes(first) || (second !== undefined && !MODULE_LAYERS.includes(second) && second !== TEST_FOLDER)) {
|
|
22
23
|
return undefined;
|
|
23
24
|
}
|
|
24
25
|
return { module: first, path: second === undefined ? '' : [second, ...rest].join('/') };
|
|
25
26
|
}
|
|
26
|
-
/** `
|
|
27
|
-
function
|
|
28
|
-
return first ===
|
|
29
|
-
? { module, path: [
|
|
27
|
+
/** `shared/<infrastructure|presentation|test>/...`, in a context divided into modules. */
|
|
28
|
+
function inSharedFolder([first, second = '', ...rest], modules) {
|
|
29
|
+
return modules.length > 0 && first === SHARED_FOLDER && SHARED_FOLDERS.includes(second)
|
|
30
|
+
? { module: undefined, path: [second, ...rest].join('/'), shared: true }
|
|
30
31
|
: undefined;
|
|
31
32
|
}
|
|
32
|
-
/**
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
? { module
|
|
33
|
+
/** `test/<unit|integration>/<module>/...`. */
|
|
34
|
+
function inTestFolder([first, second = '', module = '', ...below], modules) {
|
|
35
|
+
return first === TEST_FOLDER && MODULE_TEST_FOLDERS.includes(second) && modules.includes(module)
|
|
36
|
+
? { module, path: [TEST_FOLDER, second, ...below].join('/') }
|
|
36
37
|
: undefined;
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=module-split.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-split.js","sourceRoot":"","sources":["../../src/model-modules/module-split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"module-split.js","sourceRoot":"","sources":["../../src/model-modules/module-split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAA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AAE,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;QACxE,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,8CAA8C;AAC9C,SAAS,YAAY,CACnB,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,KAAK,CAAoB,EAC9D,OAA0B;IAE1B,OAAO,KAAK,KAAK,WAAW,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC9F,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC7D,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContextTree } from './context-tree.js';
|
|
2
|
+
/**
|
|
3
|
+
* Where the tests of a module of the model go, from the project root, for a folder of the tests
|
|
4
|
+
* (`unit`, `integration`): the test folder of the module (`<module>/test/unit`). Without a
|
|
5
|
+
* module, the folder of the context.
|
|
6
|
+
*/
|
|
7
|
+
export declare function moduleTestFolderOf({ directory }: ContextTree, module: string | undefined, folder: string): string;
|
|
8
|
+
//# sourceMappingURL=module-test-folder-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-test-folder-of.d.ts","sourceRoot":"","sources":["../../src/model-modules/module-test-folder-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { intoModule } from './into-module.js';
|
|
2
|
+
import { TEST_FOLDER } from './module-layers.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where the tests of a module of the model go, from the project root, for a folder of the tests
|
|
5
|
+
* (`unit`, `integration`): the test folder of the module (`<module>/test/unit`). Without a
|
|
6
|
+
* module, the folder of the context.
|
|
7
|
+
*/
|
|
8
|
+
export function moduleTestFolderOf({ directory }, module, folder) {
|
|
9
|
+
return `${directory}/${intoModule(module, `${TEST_FOLDER}/${folder}`)}`;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=module-test-folder-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-test-folder-of.js","sourceRoot":"","sources":["../../src/model-modules/module-test-folder-of.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAE,SAAS,EAAe,EAAE,MAA0B,EAAE,MAAc;IACvG,OAAO,GAAG,SAAS,IAAI,UAAU,CAAC,MAAM,EAAE,GAAG,WAAW,IAAI,MAAM,EAAE,CAAC,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -2,9 +2,11 @@ import type { Workspace } from '../workspace/index.js';
|
|
|
2
2
|
import type { ContextTree } from './context-tree.js';
|
|
3
3
|
/**
|
|
4
4
|
* Every folder of a context that plays one role, by its path from the project root: the folder
|
|
5
|
-
* of the context itself (`domain/aggregates`)
|
|
6
|
-
* (`calendars/domain/aggregates`,
|
|
7
|
-
*
|
|
5
|
+
* of the context itself (`domain/aggregates`), the same folder in each module of its model
|
|
6
|
+
* (`calendars/domain/aggregates`, `calendars/test/unit` for a folder of the tests), and in `shared/` when
|
|
7
|
+
* the context is divided into modules (`shared/infrastructure/persistence`). A reader that lists a
|
|
8
|
+
* role goes through here, so a file moved into a module is never lost from what the kit writes
|
|
9
|
+
* about its context.
|
|
8
10
|
*/
|
|
9
11
|
export declare function roleFoldersOf(ws: Workspace, { directory, modules }: ContextTree, folder: string): string[];
|
|
10
12
|
//# sourceMappingURL=role-folders-of.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-folders-of.d.ts","sourceRoot":"","sources":["../../src/model-modules/role-folders-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"role-folders-of.d.ts","sourceRoot":"","sources":["../../src/model-modules/role-folders-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAW1G"}
|