ddd-ts-kit 0.86.0 → 0.88.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 +43 -0
- package/README.fr.md +38 -39
- package/README.md +38 -37
- package/dist/check/canonical/earlier-context-file.d.ts +15 -0
- package/dist/check/canonical/earlier-context-file.d.ts.map +1 -0
- package/dist/check/canonical/earlier-context-file.js +33 -0
- package/dist/check/canonical/earlier-context-file.js.map +1 -0
- package/dist/check/canonical/stray-entry.d.ts.map +1 -1
- package/dist/check/canonical/stray-entry.js +11 -9
- package/dist/check/canonical/stray-entry.js.map +1 -1
- package/dist/check/configuration/module-problems.js +2 -2
- package/dist/check/configuration/module-problems.js.map +1 -1
- package/dist/check/errors/code-list.d.ts +1 -1
- package/dist/check/errors/code-list.d.ts.map +1 -1
- package/dist/check/errors/is-codes-file.d.ts +1 -1
- package/dist/check/errors/is-codes-file.d.ts.map +1 -1
- package/dist/check/errors/is-codes-file.js +1 -1
- package/dist/check/errors/is-codes-file.js.map +1 -1
- package/dist/check/explain/errors-docs.js +5 -5
- package/dist/check/explain/errors-docs.js.map +1 -1
- package/dist/check/explain/language-docs.js +1 -1
- package/dist/check/explain/language-docs.js.map +1 -1
- package/dist/check/explain/layout-docs.js +1 -1
- package/dist/check/explain/layout-docs.js.map +1 -1
- package/dist/check/explain/module-docs.d.ts.map +1 -1
- package/dist/check/explain/module-docs.js +16 -12
- package/dist/check/explain/module-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.js +2 -2
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +8 -7
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/authz-granted-fixtures.js +2 -2
- package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.js +3 -3
- package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-scope-narrows-fixtures.js +4 -4
- package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -1
- package/dist/check/fixtures/constructor-injection-fixtures.js +6 -6
- package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -1
- package/dist/check/fixtures/context-file-fixtures.d.ts +4 -0
- package/dist/check/fixtures/context-file-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/context-file-fixtures.js +36 -0
- package/dist/check/fixtures/context-file-fixtures.js.map +1 -0
- package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.js +15 -36
- package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/declared-declarations.d.ts +4 -2
- package/dist/check/fixtures/declared-declarations.d.ts.map +1 -1
- package/dist/check/fixtures/declared-declarations.js +9 -3
- package/dist/check/fixtures/declared-declarations.js.map +1 -1
- package/dist/check/fixtures/earlier-declarations-fixtures.d.ts +4 -0
- package/dist/check/fixtures/earlier-declarations-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/earlier-declarations-fixtures.js +48 -0
- package/dist/check/fixtures/earlier-declarations-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/module-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/module-fixtures.js +50 -17
- package/dist/check/fixtures/module-fixtures.js.map +1 -1
- package/dist/check/fixtures/named-refusal-fixtures.js +5 -5
- package/dist/check/fixtures/named-refusal-fixtures.js.map +1 -1
- package/dist/check/fixtures/paths.d.ts +1 -1
- package/dist/check/fixtures/paths.js +1 -1
- package/dist/check/fixtures/paths.js.map +1 -1
- package/dist/check/fixtures/vocabulary-fixtures.js +2 -2
- package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
- package/dist/check/project/locate.d.ts.map +1 -1
- package/dist/check/project/locate.js +18 -9
- package/dist/check/project/locate.js.map +1 -1
- package/dist/check/rules/declarations-barrel-current.js +16 -11
- package/dist/check/rules/declarations-barrel-current.js.map +1 -1
- package/dist/check/rules/errors-code-listed.js +6 -8
- package/dist/check/rules/errors-code-listed.js.map +1 -1
- package/dist/check/rules/errors-code-unique.js +2 -2
- package/dist/check/rules/errors-code-unique.js.map +1 -1
- package/dist/check/rules/errors-known-code.js +2 -2
- package/dist/check/rules/errors-known-code.js.map +1 -1
- package/dist/check/rules/language-glossary-term.js +1 -1
- package/dist/check/rules/language-glossary-term.js.map +1 -1
- package/dist/check/rules/module-complete.d.ts.map +1 -1
- package/dist/check/rules/module-complete.js +67 -13
- package/dist/check/rules/module-complete.js.map +1 -1
- package/dist/check/rules/naming-suffix.d.ts.map +1 -1
- package/dist/check/rules/naming-suffix.js +12 -9
- package/dist/check/rules/naming-suffix.js.map +1 -1
- package/dist/check/rules/tree-closed.d.ts.map +1 -1
- package/dist/check/rules/tree-closed.js +8 -1
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/check/support/is-generated-context-file.d.ts +1 -1
- package/dist/check/support/is-generated-context-file.js +1 -1
- package/dist/check/support/path-in-context.d.ts +5 -1
- package/dist/check/support/path-in-context.d.ts.map +1 -1
- package/dist/check/support/path-in-context.js +12 -3
- package/dist/check/support/path-in-context.js.map +1 -1
- package/dist/commands/context-layout.d.ts +4 -0
- package/dist/commands/context-layout.d.ts.map +1 -0
- package/dist/commands/context-layout.js +48 -0
- package/dist/commands/context-layout.js.map +1 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +14 -9
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/generate.js +2 -2
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/move-to-module.d.ts.map +1 -1
- package/dist/commands/move-to-module.js +2 -0
- package/dist/commands/move-to-module.js.map +1 -1
- package/dist/config/stack.d.ts +1 -1
- package/dist/context-files/context-file-at.d.ts +7 -0
- package/dist/context-files/context-file-at.d.ts.map +1 -0
- package/dist/context-files/context-file-at.js +9 -0
- package/dist/context-files/context-file-at.js.map +1 -0
- package/dist/context-files/context-file-placement.d.ts +8 -0
- package/dist/context-files/context-file-placement.d.ts.map +1 -0
- package/dist/context-files/context-file-placement.js +23 -0
- package/dist/context-files/context-file-placement.js.map +1 -0
- package/dist/context-files/context-file.d.ts +16 -0
- package/dist/context-files/context-file.d.ts.map +1 -0
- package/dist/context-files/context-file.js +12 -0
- package/dist/context-files/context-file.js.map +1 -0
- package/dist/context-files/earlier-place-of.d.ts +7 -0
- package/dist/context-files/earlier-place-of.d.ts.map +1 -0
- package/dist/context-files/earlier-place-of.js +10 -0
- package/dist/context-files/earlier-place-of.js.map +1 -0
- package/dist/context-files/index.d.ts +5 -0
- package/dist/context-files/index.d.ts.map +1 -0
- package/dist/context-files/index.js +5 -0
- package/dist/context-files/index.js.map +1 -0
- package/dist/context-layout/context-layout.d.ts +19 -0
- package/dist/context-layout/context-layout.d.ts.map +1 -0
- package/dist/context-layout/context-layout.js +55 -0
- package/dist/context-layout/context-layout.js.map +1 -0
- package/dist/context-layout/index.d.ts +2 -0
- package/dist/context-layout/index.d.ts.map +1 -0
- package/dist/context-layout/index.js +2 -0
- package/dist/context-layout/index.js.map +1 -0
- package/dist/context-layout/module-moves.d.ts +21 -0
- package/dist/context-layout/module-moves.d.ts.map +1 -0
- package/dist/context-layout/module-moves.js +146 -0
- package/dist/context-layout/module-moves.js.map +1 -0
- package/dist/controllers/migrate-context.js +20 -15
- package/dist/controllers/migrate-context.js.map +1 -1
- package/dist/controllers/plan-context.d.ts +5 -1
- package/dist/controllers/plan-context.d.ts.map +1 -1
- package/dist/controllers/plan-context.js +19 -5
- package/dist/controllers/plan-context.js.map +1 -1
- package/dist/declared/barrel-file.d.ts +1 -1
- package/dist/declared/barrel-file.js +1 -1
- package/dist/declared/context-declarations.d.ts +4 -2
- package/dist/declared/context-declarations.d.ts.map +1 -1
- package/dist/declared/context-declarations.js +4 -2
- package/dist/declared/context-declarations.js.map +1 -1
- package/dist/declared/declarations-folder-of.d.ts +12 -7
- package/dist/declared/declarations-folder-of.d.ts.map +1 -1
- package/dist/declared/declarations-folder-of.js +15 -11
- package/dist/declared/declarations-folder-of.js.map +1 -1
- package/dist/declared/earlier-layout-notice.d.ts +10 -0
- package/dist/declared/earlier-layout-notice.d.ts.map +1 -0
- package/dist/declared/earlier-layout-notice.js +12 -0
- package/dist/declared/earlier-layout-notice.js.map +1 -0
- package/dist/declared/earlier-layout-of.d.ts +10 -0
- package/dist/declared/earlier-layout-of.d.ts.map +1 -0
- package/dist/declared/earlier-layout-of.js +16 -0
- package/dist/declared/earlier-layout-of.js.map +1 -0
- package/dist/declared/earlier-shape-of.d.ts +13 -0
- package/dist/declared/earlier-shape-of.d.ts.map +1 -0
- package/dist/declared/earlier-shape-of.js +35 -0
- package/dist/declared/earlier-shape-of.js.map +1 -0
- package/dist/declared/folder-declarations-file.d.ts +6 -4
- package/dist/declared/folder-declarations-file.d.ts.map +1 -1
- package/dist/declared/folder-declarations-file.js +7 -5
- package/dist/declared/folder-declarations-file.js.map +1 -1
- package/dist/declared/index.d.ts +3 -2
- package/dist/declared/index.d.ts.map +1 -1
- package/dist/declared/index.js +3 -2
- package/dist/declared/index.js.map +1 -1
- package/dist/declared/is-declarations-file.d.ts +3 -2
- package/dist/declared/is-declarations-file.d.ts.map +1 -1
- package/dist/declared/is-declarations-file.js +9 -9
- package/dist/declared/is-declarations-file.js.map +1 -1
- package/dist/declared/keeps-role-folder-files.d.ts +12 -0
- package/dist/declared/keeps-role-folder-files.d.ts.map +1 -0
- package/dist/declared/keeps-role-folder-files.js +25 -0
- package/dist/declared/keeps-role-folder-files.js.map +1 -0
- package/dist/declared/keeps-single-file.d.ts +1 -1
- package/dist/declared/keeps-single-file.js +1 -1
- package/dist/declared/render-declarations.d.ts +7 -3
- package/dist/declared/render-declarations.d.ts.map +1 -1
- package/dist/declared/render-declarations.js +5 -3
- package/dist/declared/render-declarations.js.map +1 -1
- package/dist/declared/render-folder-declarations.d.ts +2 -2
- package/dist/declared/same-files.d.ts +3 -0
- package/dist/declared/same-files.d.ts.map +1 -0
- package/dist/declared/same-files.js +5 -0
- package/dist/declared/same-files.js.map +1 -0
- package/dist/depcruise/layer-rules.js +21 -7
- package/dist/depcruise/layer-rules.js.map +1 -1
- package/dist/describe/read-adapters.d.ts.map +1 -1
- package/dist/describe/read-adapters.js +6 -4
- package/dist/describe/read-adapters.js.map +1 -1
- package/dist/describe/read-controllers.d.ts.map +1 -1
- package/dist/describe/read-controllers.js +5 -3
- package/dist/describe/read-controllers.js.map +1 -1
- package/dist/describe/read-errors.d.ts +1 -1
- package/dist/describe/read-errors.d.ts.map +1 -1
- package/dist/describe/read-errors.js +5 -3
- package/dist/describe/read-errors.js.map +1 -1
- package/dist/describe/read-routes.d.ts.map +1 -1
- package/dist/describe/read-routes.js +5 -5
- package/dist/describe/read-routes.js.map +1 -1
- package/dist/dev/refresh-declarations.d.ts.map +1 -1
- package/dist/dev/refresh-declarations.js +1 -1
- package/dist/dev/refresh-declarations.js.map +1 -1
- package/dist/docs/context-facts.d.ts +1 -1
- package/dist/docs/context-facts.d.ts.map +1 -1
- package/dist/docs/read-context.d.ts.map +1 -1
- package/dist/docs/read-context.js +2 -1
- package/dist/docs/read-context.js.map +1 -1
- package/dist/docs/refresh-context-doc.js +1 -1
- package/dist/docs/refresh-context-doc.js.map +1 -1
- package/dist/docs/state-machine-lines.d.ts +1 -1
- package/dist/docs/state-machine-lines.d.ts.map +1 -1
- package/dist/docs/state-machine-lines.js +6 -2
- package/dist/docs/state-machine-lines.js.map +1 -1
- package/dist/docs/write-docs.d.ts +3 -3
- package/dist/docs/write-docs.d.ts.map +1 -1
- package/dist/docs/write-docs.js +3 -3
- package/dist/docs/write-docs.js.map +1 -1
- package/dist/file-moves/file-move.d.ts +6 -0
- package/dist/file-moves/file-move.d.ts.map +1 -0
- package/dist/file-moves/file-move.js +2 -0
- package/dist/file-moves/file-move.js.map +1 -0
- package/dist/file-moves/index.d.ts +3 -0
- package/dist/file-moves/index.d.ts.map +1 -0
- package/dist/file-moves/index.js +2 -0
- package/dist/file-moves/index.js.map +1 -0
- package/dist/file-moves/move-files.d.ts +15 -0
- package/dist/file-moves/move-files.d.ts.map +1 -0
- package/dist/file-moves/move-files.js +37 -0
- package/dist/file-moves/move-files.js.map +1 -0
- package/dist/generate/errors/codes-list.d.ts +1 -1
- package/dist/generate/errors/codes-list.d.ts.map +1 -1
- package/dist/generate/errors/write-named-refusal.d.ts +1 -1
- package/dist/generate/errors/write-named-refusal.d.ts.map +1 -1
- package/dist/generate/errors/write-named-refusal.js +3 -2
- package/dist/generate/errors/write-named-refusal.js.map +1 -1
- package/dist/generate/kind.d.ts +1 -1
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +22 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/error-kind.js +1 -1
- package/dist/generate/kinds/error-kind.js.map +1 -1
- package/dist/generate/kinds/module-kind.js +1 -1
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/port-kind.d.ts.map +1 -1
- package/dist/generate/kinds/port-kind.js +3 -1
- package/dist/generate/kinds/port-kind.js.map +1 -1
- package/dist/generate/kinds/presentation/controller-of.d.ts +1 -1
- package/dist/generate/kinds/presentation/controller-of.d.ts.map +1 -1
- package/dist/generate/kinds/presentation/controller-of.js +7 -5
- package/dist/generate/kinds/presentation/controller-of.js.map +1 -1
- package/dist/generate/permissions-file.d.ts +4 -1
- package/dist/generate/permissions-file.d.ts.map +1 -1
- package/dist/generate/permissions-file.js +6 -2
- package/dist/generate/permissions-file.js.map +1 -1
- package/dist/generate/place-context-files.d.ts +9 -0
- package/dist/generate/place-context-files.d.ts.map +1 -0
- package/dist/generate/place-context-files.js +14 -0
- package/dist/generate/place-context-files.js.map +1 -0
- package/dist/generate/place-generated-files.d.ts +18 -0
- package/dist/generate/place-generated-files.d.ts.map +1 -0
- package/dist/generate/{place-in-modules.js → place-generated-files.js} +42 -17
- package/dist/generate/place-generated-files.js.map +1 -0
- package/dist/generate/refresh-barrels.d.ts +17 -11
- package/dist/generate/refresh-barrels.d.ts.map +1 -1
- package/dist/generate/refresh-barrels.js +32 -26
- package/dist/generate/refresh-barrels.js.map +1 -1
- package/dist/generate/refresh-docs.d.ts +2 -2
- package/dist/generate/refresh-docs.d.ts.map +1 -1
- package/dist/generate/refresh-docs.js +6 -3
- package/dist/generate/refresh-docs.js.map +1 -1
- package/dist/generate/refuse-earlier-layout.d.ts +9 -0
- package/dist/generate/refuse-earlier-layout.d.ts.map +1 -0
- package/dist/generate/refuse-earlier-layout.js +15 -0
- package/dist/generate/refuse-earlier-layout.js.map +1 -0
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +24 -9
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +1 -0
- package/dist/help/usage.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +6 -0
- package/dist/init/run-init.js.map +1 -1
- package/dist/knip/ignore-code-types-where-they-are.d.ts +11 -0
- package/dist/knip/ignore-code-types-where-they-are.d.ts.map +1 -0
- package/dist/knip/ignore-code-types-where-they-are.js +56 -0
- package/dist/knip/ignore-code-types-where-they-are.js.map +1 -0
- package/dist/knip/index.d.ts +2 -0
- package/dist/knip/index.d.ts.map +1 -0
- package/dist/knip/index.js +2 -0
- package/dist/knip/index.js.map +1 -0
- package/dist/model-modules/index.d.ts +1 -1
- package/dist/model-modules/index.d.ts.map +1 -1
- package/dist/model-modules/index.js +1 -1
- package/dist/model-modules/index.js.map +1 -1
- package/dist/model-modules/into-module.d.ts +5 -1
- package/dist/model-modules/into-module.d.ts.map +1 -1
- package/dist/model-modules/into-module.js +12 -5
- package/dist/model-modules/into-module.js.map +1 -1
- package/dist/model-modules/is-context-level.d.ts +5 -3
- package/dist/model-modules/is-context-level.d.ts.map +1 -1
- package/dist/model-modules/is-context-level.js +17 -4
- package/dist/model-modules/is-context-level.js.map +1 -1
- package/dist/model-modules/module-layers.d.ts +7 -1
- package/dist/model-modules/module-layers.d.ts.map +1 -1
- package/dist/model-modules/module-layers.js +8 -2
- package/dist/model-modules/module-layers.js.map +1 -1
- package/dist/model-modules/module-name-flaw.d.ts +2 -2
- package/dist/model-modules/module-name-flaw.js +4 -4
- package/dist/model-modules/module-name-flaw.js.map +1 -1
- package/dist/model-modules/module-placement.d.ts +5 -1
- package/dist/model-modules/module-placement.d.ts.map +1 -1
- package/dist/model-modules/module-placement.js +47 -18
- package/dist/model-modules/module-placement.js.map +1 -1
- package/dist/model-modules/module-split.d.ts +9 -5
- package/dist/model-modules/module-split.d.ts.map +1 -1
- package/dist/model-modules/module-split.js +30 -13
- package/dist/model-modules/module-split.js.map +1 -1
- package/dist/model-modules/role-directories-of.d.ts.map +1 -1
- package/dist/model-modules/role-directories-of.js +6 -1
- package/dist/model-modules/role-directories-of.js.map +1 -1
- package/dist/model-modules/role-folders-of.d.ts +1 -1
- package/dist/model-modules/role-folders-of.d.ts.map +1 -1
- package/dist/model-modules/role-folders-of.js +15 -5
- package/dist/model-modules/role-folders-of.js.map +1 -1
- package/dist/model-modules/role-folders.d.ts +2 -2
- package/dist/model-modules/role-folders.js +2 -2
- package/dist/move-to-module/module-move.d.ts +2 -4
- package/dist/move-to-module/module-move.d.ts.map +1 -1
- package/dist/move-to-module/move-to-module.d.ts +2 -6
- package/dist/move-to-module/move-to-module.d.ts.map +1 -1
- package/dist/move-to-module/move-to-module.js +2 -31
- package/dist/move-to-module/move-to-module.js.map +1 -1
- package/dist/move-to-module/moves-into-module.d.ts +1 -1
- package/dist/move-to-module/moves-into-module.d.ts.map +1 -1
- package/dist/move-to-module/moves-into-module.js +25 -6
- package/dist/move-to-module/moves-into-module.js.map +1 -1
- package/dist/refusals/code-types-pattern.d.ts +4 -0
- package/dist/refusals/code-types-pattern.d.ts.map +1 -0
- package/dist/refusals/code-types-pattern.js +6 -0
- package/dist/refusals/code-types-pattern.js.map +1 -0
- package/dist/refusals/ignore-code-types.d.ts +1 -1
- package/dist/refusals/ignore-code-types.d.ts.map +1 -1
- package/dist/refusals/ignore-code-types.js +3 -2
- package/dist/refusals/ignore-code-types.js.map +1 -1
- package/dist/refusals/path-from-contexts.d.ts +1 -1
- package/dist/refusals/path-from-contexts.js +2 -2
- package/dist/refusals/path-from-contexts.js.map +1 -1
- package/dist/refusals/with-codes.d.ts +1 -1
- package/dist/refusals/with-codes.d.ts.map +1 -1
- package/dist/refusals/with-codes.js +1 -1
- package/dist/refusals/with-codes.js.map +1 -1
- package/dist/refusals/write-refusal-classes.d.ts.map +1 -1
- package/dist/refusals/write-refusal-classes.js +4 -2
- package/dist/refusals/write-refusal-classes.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -0
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/templates/command/handler.spec.buses.ts.tpl +1 -1
- package/templates/command/handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/context/permission-set.tpl +1 -1
- package/templates/context/permissions.spec.ts.tpl +1 -1
- package/templates/error/refusal.ts.tpl +1 -1
- package/templates/file-upload/handler.spec.ts.tpl +1 -1
- package/templates/init/AGENTS.md.tpl +1 -1
- package/templates/init/README.md.tpl +2 -2
- package/templates/init/rules/application.md.tpl +3 -2
- package/templates/init/rules/domain.md.tpl +3 -2
- package/templates/init/rules/infrastructure.md.tpl +1 -0
- package/templates/init/rules/presentation.md.tpl +2 -1
- package/templates/pipeline/knip.json.tpl +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/policy/policy.declared.ts.tpl +1 -1
- package/templates/policy/policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/change-member-roles.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/grant-delegations.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/invite-members.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/read-members.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/remove-members.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/revoke-delegations.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/authorization/revoke-invitations.policy.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/accept-invitation/accept-invitation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/change-member-role/change-member-role.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/decline-invitation/decline-invitation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/grant-delegation/grant-delegation.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/invite-member/invite-member.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/invite-member/invite-member.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/open-organisation/open-organisation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/provision-account/provision-account.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/remove-member/remove-member.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/remove-member/remove-member.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/revoke-delegation/revoke-delegation.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.command.ts.tpl +1 -1
- package/templates/presets/identity/context/application/commands/revoke-invitation/revoke-invitation.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/queries/search-members/search-members.handler.ts.tpl +1 -1
- package/templates/presets/identity/context/application/queries/search-members/search-members.query.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/above-own-role.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/account-already-deactivated.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/already-member.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/deactivated-account.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/delegation-not-active.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/delegation-period-inverted.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/delegation-to-oneself.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/delegation-too-long.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/delegation-with-no-right.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/email-not-verified.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invalid-display-name.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invalid-email-address.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invalid-organisation-name.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invalid-organisation-slug.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invitation-expired.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invitation-not-addressed-to-account.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/invitation-not-pending.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/last-owner.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/not-an-owner.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/organisation-slug-taken.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/own-role.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/right-not-in-role.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/unknown-account.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/unknown-delegation.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/unknown-invitation.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/unknown-member.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/domain/errors/unknown-organisation.error.named.ts.tpl +1 -1
- package/templates/presets/identity/context/test/worlds/__context__.world.ts.tpl +1 -1
- package/templates/query/handler.spec.buses.ts.tpl +1 -1
- package/templates/query/handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/query/search.handler.declared.ts.tpl +1 -1
- package/templates/query/search.handler.spec.buses.ts.tpl +1 -1
- package/templates/query/search.handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/query/search.handler.ts.tpl +1 -1
- package/dist/declared/single-file-notice.d.ts +0 -8
- package/dist/declared/single-file-notice.d.ts.map +0 -1
- package/dist/declared/single-file-notice.js +0 -9
- package/dist/declared/single-file-notice.js.map +0 -1
- package/dist/generate/place-in-modules.d.ts +0 -16
- package/dist/generate/place-in-modules.d.ts.map +0 -1
- package/dist/generate/place-in-modules.js.map +0 -1
- /package/templates/presets/identity/context/{domain/errors/codes.named.ts.tpl → __context__.codes.named.ts.tpl} +0 -0
- /package/templates/presets/identity/context/{application/authorization/__context__.permissions.ts.tpl → __context__.permissions.ts.tpl} +0 -0
|
@@ -4,13 +4,19 @@ const IN_BILLING = '@/contexts/billing';
|
|
|
4
4
|
/** `export * from` each file, given relative to the billing context. */
|
|
5
5
|
const exporting = (...files) => source(...files.map((file) => `export * from '${IN_BILLING}/${file}.js';`));
|
|
6
6
|
/**
|
|
7
|
-
* The declarations of `DECLARED_CONTEXT`, one file per
|
|
8
|
-
*
|
|
7
|
+
* The declarations of `DECLARED_CONTEXT`, one file per layer and the summary at the root of the
|
|
8
|
+
* context, written out so that the fixtures do not prove the rule with its own code.
|
|
9
9
|
*/
|
|
10
10
|
export const DECLARED_DECLARATIONS = {
|
|
11
|
+
[PATHS.BARREL]: exporting('application/application.declarations', 'infrastructure/infrastructure.declarations'),
|
|
12
|
+
[PATHS.APPLICATION_DECLARATIONS]: exporting('application/authorization/only-issuer-voids.policy', 'application/commands/issue-invoice/issue-invoice.command', 'application/commands/issue-invoice/issue-invoice.handler', 'application/event-handlers/invoice-issued.event-handler', 'application/integration/handlers/product-listed.integration-handler', 'application/integration/publishers/invoice-issued.publisher', 'application/queries/invoices-issued/invoices-issued.handler', 'application/queries/invoices-issued/invoices-issued.query', 'application/scheduling/send-reminders.job'),
|
|
13
|
+
[`${PATHS.BILLING}/infrastructure/infrastructure.declarations.ts`]: exporting('infrastructure/external/in-process-price-catalog.gateway', 'infrastructure/external/remote-payment-gateway.adapter', 'infrastructure/persistence/in-memory-invoice.repository'),
|
|
14
|
+
};
|
|
15
|
+
/** The same declarations, one file per role folder, as 0.85 and 0.86 wrote them. */
|
|
16
|
+
export const ROLE_FOLDER_DECLARATIONS = {
|
|
11
17
|
[PATHS.BARREL]: exporting('application/authorization/authorization.declarations', 'application/commands/commands.declarations', 'application/event-handlers/event-handlers.declarations', 'application/integration/integration.declarations', 'application/queries/queries.declarations', 'application/scheduling/scheduling.declarations', 'infrastructure/external/external.declarations', 'infrastructure/persistence/persistence.declarations'),
|
|
12
18
|
[`${PATHS.BILLING}/application/authorization/authorization.declarations.ts`]: exporting('application/authorization/only-issuer-voids.policy'),
|
|
13
|
-
[PATHS.
|
|
19
|
+
[`${PATHS.BILLING}/application/commands/commands.declarations.ts`]: exporting('application/commands/issue-invoice/issue-invoice.command', 'application/commands/issue-invoice/issue-invoice.handler'),
|
|
14
20
|
[`${PATHS.BILLING}/application/event-handlers/event-handlers.declarations.ts`]: exporting('application/event-handlers/invoice-issued.event-handler'),
|
|
15
21
|
[`${PATHS.BILLING}/application/integration/integration.declarations.ts`]: exporting('application/integration/handlers/product-listed.integration-handler', 'application/integration/publishers/invoice-issued.publisher'),
|
|
16
22
|
[`${PATHS.BILLING}/application/queries/queries.declarations.ts`]: exporting('application/queries/invoices-issued/invoices-issued.handler', 'application/queries/invoices-issued/invoices-issued.query'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-declarations.js","sourceRoot":"","sources":["../../../src/check/fixtures/declared-declarations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,wEAAwE;AACxE,MAAM,SAAS,GAAG,CAAC,GAAG,KAAe,EAAU,EAAE,CAC/C,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,UAAU,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,CACvB,sDAAsD,EACtD,4CAA4C,EAC5C,wDAAwD,EACxD,kDAAkD,EAClD,0CAA0C,EAC1C,gDAAgD,EAChD,+CAA+C,EAC/C,qDAAqD,CACtD;IACD,CAAC,GAAG,KAAK,CAAC,OAAO,0DAA0D,CAAC,EAAE,SAAS,CACrF,oDAAoD,CACrD;IACD,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"declared-declarations.js","sourceRoot":"","sources":["../../../src/check/fixtures/declared-declarations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAA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SAAS,CACjF,qEAAqE,EACrE,6DAA6D,CAC9D;IACD,CAAC,GAAG,KAAK,CAAC,OAAO,8CAA8C,CAAC,EAAE,SAAS,CACzE,6DAA6D,EAC7D,2DAA2D,CAC5D;IACD,CAAC,GAAG,KAAK,CAAC,OAAO,oDAAoD,CAAC,EAAE,SAAS,CAC/E,2CAA2C,CAC5C;IACD,CAAC,GAAG,KAAK,CAAC,OAAO,mDAAmD,CAAC,EAAE,SAAS,CAC9E,0DAA0D,EAC1D,wDAAwD,CACzD;IACD,CAAC,GAAG,KAAK,CAAC,OAAO,yDAAyD,CAAC,EAAE,SAAS,CACpF,yDAAyD,CAC1D;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Fixture } from './fixture.js';
|
|
2
|
+
/** The layouts of the declarations an earlier version wrote: accepted while current, then refused. */
|
|
3
|
+
export declare const EARLIER_DECLARATIONS_FIXTURES: readonly Fixture[];
|
|
4
|
+
//# sourceMappingURL=earlier-declarations-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earlier-declarations-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,sGAAsG;AACtG,eAAO,MAAM,6BAA6B,EAAE,SAAS,OAAO,EA6C3D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DECLARED_CONTEXT } from './declared-context.js';
|
|
2
|
+
import { DECLARED_DECLARATIONS, ROLE_FOLDER_DECLARATIONS } from './declared-declarations.js';
|
|
3
|
+
import { declaredProject } from './declared-project.js';
|
|
4
|
+
import { PATHS } from './paths.js';
|
|
5
|
+
import { SINGLE_FILE_DECLARATIONS } from './single-file-declarations.js';
|
|
6
|
+
import { withoutFile } from './without-file.js';
|
|
7
|
+
const { APPLICATION_DECLARATIONS, BARREL, BILLING } = PATHS;
|
|
8
|
+
/** The billing context declared in the single file of 0.84: no declarations file in a role folder. */
|
|
9
|
+
const singleFile = (declarations) => Object.fromEntries(Object.entries(declaredProject(DECLARED_CONTEXT, { [BARREL]: declarations })).filter(([file]) => file === BARREL || !file.startsWith(`${BILLING}/`) || !file.endsWith('.declarations.ts')));
|
|
10
|
+
/** The layouts of the declarations an earlier version wrote: accepted while current, then refused. */
|
|
11
|
+
export const EARLIER_DECLARATIONS_FIXTURES = [
|
|
12
|
+
{
|
|
13
|
+
ruleId: 'declarations/barrel-current',
|
|
14
|
+
name: 'the declarations of a role folder that 0.85 and 0.86 wrote, left behind next to those of the layers',
|
|
15
|
+
expect: { file: `${BILLING}/application/commands/commands.declarations.ts` },
|
|
16
|
+
files: declaredProject(DECLARED_CONTEXT, {
|
|
17
|
+
...DECLARED_DECLARATIONS,
|
|
18
|
+
[`${BILLING}/application/commands/commands.declarations.ts`]: ROLE_FOLDER_DECLARATIONS[`${BILLING}/application/commands/commands.declarations.ts`] ?? '',
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
ruleId: 'declarations/barrel-current',
|
|
23
|
+
name: 'the declarations of the role folders of 0.85 and 0.86, current and not moved yet: a warning, until a later minor version',
|
|
24
|
+
expect: { file: BARREL },
|
|
25
|
+
severity: 'warn',
|
|
26
|
+
files: withoutFile(withoutFile(declaredProject(DECLARED_CONTEXT, ROLE_FOLDER_DECLARATIONS), APPLICATION_DECLARATIONS), `${BILLING}/infrastructure/infrastructure.declarations.ts`),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
ruleId: 'declarations/barrel-current',
|
|
30
|
+
name: 'the single declarations file of 0.84, current and not moved yet: a warning, until a later minor version',
|
|
31
|
+
expect: { file: BARREL },
|
|
32
|
+
severity: 'warn',
|
|
33
|
+
files: singleFile(SINGLE_FILE_DECLARATIONS),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
ruleId: 'declarations/barrel-current',
|
|
37
|
+
name: 'the single declarations file of 0.84 that misses a role file: stale, an error',
|
|
38
|
+
expect: { file: BARREL },
|
|
39
|
+
files: singleFile(SINGLE_FILE_DECLARATIONS.replace("export * from '@/contexts/billing/application/scheduling/send-reminders.job.js';\n", '')),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
ruleId: 'declarations/barrel-current',
|
|
43
|
+
name: 'a context half moved, the single declarations file of 0.84 next to the declarations of its layers: an error',
|
|
44
|
+
expect: { file: BARREL },
|
|
45
|
+
files: declaredProject(DECLARED_CONTEXT, { [BARREL]: SINGLE_FILE_DECLARATIONS }),
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
//# sourceMappingURL=earlier-declarations-fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earlier-declarations-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/earlier-declarations-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE5D,sGAAsG;AACtG,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAgB,EAAE,CACxD,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM,CAClF,CAAC,CAAC,IAAI,CAAC,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;QACnH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,eAAe,CAAC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAC;KACjF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAiDtC,CAAC"}
|
|
@@ -12,7 +12,9 @@ import { CONSTRUCTOR_INJECTION_FIXTURES } from './constructor-injection-fixtures
|
|
|
12
12
|
import { CONSUMER_FIXTURES } from './consumer-fixtures.js';
|
|
13
13
|
import { CONTEXT_FIXTURES } from './context-fixtures.js';
|
|
14
14
|
import { COVERAGE_FIXTURES } from './coverage-fixtures.js';
|
|
15
|
+
import { CONTEXT_FILE_FIXTURES } from './context-file-fixtures.js';
|
|
15
16
|
import { DECLARATIONS_FIXTURES } from './declarations-fixtures.js';
|
|
17
|
+
import { EARLIER_DECLARATIONS_FIXTURES } from './earlier-declarations-fixtures.js';
|
|
16
18
|
import { DOMAIN_EVENTS_FIXTURES } from './domain-events-fixtures.js';
|
|
17
19
|
import { ERRORS_FIXTURES } from './errors-fixtures.js';
|
|
18
20
|
import { EVENT_SOURCING_FIXTURES } from './event-sourcing-fixtures.js';
|
|
@@ -63,7 +65,9 @@ export const FIXTURES = [
|
|
|
63
65
|
...CONSUMER_FIXTURES,
|
|
64
66
|
...CONTEXT_FIXTURES,
|
|
65
67
|
...COVERAGE_FIXTURES,
|
|
68
|
+
...CONTEXT_FILE_FIXTURES,
|
|
66
69
|
...DECLARATIONS_FIXTURES,
|
|
70
|
+
...EARLIER_DECLARATIONS_FIXTURES,
|
|
67
71
|
...DOMAIN_EVENTS_FIXTURES,
|
|
68
72
|
...ERRORS_FIXTURES,
|
|
69
73
|
...NAMED_REFUSAL_FIXTURES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eA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EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAuB;IAC1C,GAAG,uBAAuB;IAC1B,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,4BAA4B;IAC/B,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,qBAAqB;IACxB,GAAG,6BAA6B;IAChC,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,uBAAuB;IAC1B,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,0BAA0B;IAC7B,GAAG,uBAAuB;CAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/module-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"module-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/module-fixtures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBzC,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAqL7C,CAAC"}
|
|
@@ -7,16 +7,17 @@ import { project } from './project.js';
|
|
|
7
7
|
import { SAMPLES } from './samples.js';
|
|
8
8
|
const { BILLING, HANDLER, HANDLER_SPEC } = PATHS;
|
|
9
9
|
const { SPEC } = SAMPLES;
|
|
10
|
-
const IN_MODULE = `${BILLING}/application/
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const IN_MODULE = `${BILLING}/invoices/application/commands/issue-invoice/issue-invoice.handler.ts`;
|
|
11
|
+
const SPEC_IN_MODULE = `${BILLING}/test/unit/invoices/issue-invoice.handler.spec.ts`;
|
|
12
|
+
const INVOICE_ISSUED = `${BILLING}/invoices/domain/events/invoice-issued.event.ts`;
|
|
13
|
+
const REMINDER_SENT = `${BILLING}/reminders/domain/events/reminder-sent.event.ts`;
|
|
13
14
|
const HANDLER_CLASS = "import { CommandHandler } from '@ddd-ts-kit/kernel/declarations';\n\n@CommandHandler(IssueInvoice)\nexport class IssueInvoiceHandler {}\n";
|
|
14
15
|
export const MODULE_FIXTURES = [
|
|
15
16
|
{
|
|
16
17
|
ruleId: 'module/declared',
|
|
17
18
|
name: 'a module named after a term of the glossary, with its row in CONTEXT.md',
|
|
18
19
|
expect: 'pass',
|
|
19
|
-
files: project({ [IN_MODULE]: 'export class IssueInvoiceHandler {}\n', [
|
|
20
|
+
files: project({ [IN_MODULE]: 'export class IssueInvoiceHandler {}\n', [SPEC_IN_MODULE]: SPEC }, withModules({ invoices: {} })),
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
ruleId: 'module/declared',
|
|
@@ -38,9 +39,41 @@ export const MODULE_FIXTURES = [
|
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
ruleId: 'module/complete',
|
|
41
|
-
name: 'a context whose files
|
|
42
|
+
name: 'a context whose files are all in its modules, its specs with them, but what it keeps at its own level',
|
|
42
43
|
expect: 'pass',
|
|
43
|
-
files: project({
|
|
44
|
+
files: project({
|
|
45
|
+
[IN_MODULE]: 'export class IssueInvoiceHandler {}\n',
|
|
46
|
+
[SPEC_IN_MODULE]: SPEC,
|
|
47
|
+
[`${BILLING}/infrastructure/persistence/billing.schema.ts`]: "export const billingSchema = 'billing';\n",
|
|
48
|
+
[`${BILLING}/presentation/http/invoices.routes.ts`]: 'export class InvoicesRoutes {}\n',
|
|
49
|
+
[`${BILLING}/presentation/http/shared/money.schema.ts`]: 'export const money = 1;\n',
|
|
50
|
+
[`${BILLING}/test/fakes/invoice.repository.fake.ts`]: 'export class InvoiceRepositoryFake {}\n',
|
|
51
|
+
}, withModules({ invoices: { classification: 'core' } })),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
ruleId: 'module/complete',
|
|
55
|
+
name: 'an adapter left at the level of a context divided into modules',
|
|
56
|
+
expect: { file: `${BILLING}/infrastructure/persistence` },
|
|
57
|
+
severity: 'warn',
|
|
58
|
+
files: project({
|
|
59
|
+
[IN_MODULE]: 'export class IssueInvoiceHandler {}\n',
|
|
60
|
+
[SPEC_IN_MODULE]: SPEC,
|
|
61
|
+
[`${BILLING}/infrastructure/persistence/knex-invoice.repository.ts`]: 'export class KnexInvoiceRepository {}\n',
|
|
62
|
+
}, withModules({ invoices: {} })),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
ruleId: 'module/complete',
|
|
66
|
+
name: 'the spec of a file of a module left at the level of the context',
|
|
67
|
+
expect: { file: `${BILLING}/test/unit` },
|
|
68
|
+
severity: 'warn',
|
|
69
|
+
files: project({ [IN_MODULE]: 'export class IssueInvoiceHandler {}\n', [HANDLER_SPEC]: SPEC }, withModules({ invoices: {} })),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
ruleId: 'module/complete',
|
|
73
|
+
name: 'a module where 0.86 and 0.87 put it, under domain/',
|
|
74
|
+
expect: { file: `${BILLING}/domain/invoices` },
|
|
75
|
+
severity: 'warn',
|
|
76
|
+
files: project({ [`${BILLING}/domain/invoices/events/invoice-issued.event.ts`]: 'export const invoiceIssued = 1;\n' }, withModules({ invoices: {} })),
|
|
44
77
|
},
|
|
45
78
|
{
|
|
46
79
|
ruleId: 'module/complete',
|
|
@@ -55,7 +88,7 @@ export const MODULE_FIXTURES = [
|
|
|
55
88
|
expect: 'pass',
|
|
56
89
|
files: project({
|
|
57
90
|
[INVOICE_ISSUED]: 'export const invoiceIssued = 1;\n',
|
|
58
|
-
[REMINDER_SENT]: eventImporting('reminderSent', 'invoiceIssued', '@/contexts/billing/domain/
|
|
91
|
+
[REMINDER_SENT]: eventImporting('reminderSent', 'invoiceIssued', '@/contexts/billing/invoices/domain/events/invoice-issued.event.js'),
|
|
59
92
|
}, withModules({ invoices: {}, reminders: {} })),
|
|
60
93
|
},
|
|
61
94
|
{
|
|
@@ -64,32 +97,32 @@ export const MODULE_FIXTURES = [
|
|
|
64
97
|
expect: { file: INVOICE_ISSUED },
|
|
65
98
|
severity: 'warn',
|
|
66
99
|
files: project({
|
|
67
|
-
[INVOICE_ISSUED]: eventImporting('invoiceIssued', 'reminderSent', '@/contexts/billing/domain/
|
|
68
|
-
[REMINDER_SENT]: eventImporting('reminderSent', 'invoiceIssued', '@/contexts/billing/domain/
|
|
100
|
+
[INVOICE_ISSUED]: eventImporting('invoiceIssued', 'reminderSent', '@/contexts/billing/reminders/domain/events/reminder-sent.event.js'),
|
|
101
|
+
[REMINDER_SENT]: eventImporting('reminderSent', 'invoiceIssued', '@/contexts/billing/invoices/domain/events/invoice-issued.event.js'),
|
|
69
102
|
}, withModules({ invoices: {}, reminders: {} })),
|
|
70
103
|
},
|
|
71
104
|
{
|
|
72
105
|
ruleId: 'declarations/barrel-current',
|
|
73
106
|
name: 'two modules holding a role file of one name, which the declarations of the context would export twice',
|
|
74
|
-
expect: { file: `${BILLING}/application/
|
|
107
|
+
expect: { file: `${BILLING}/reminders/application/commands/issue-invoice/issue-invoice.handler.ts` },
|
|
75
108
|
files: declaredProject({
|
|
76
109
|
[IN_MODULE]: HANDLER_CLASS,
|
|
77
|
-
[`${BILLING}/application/
|
|
78
|
-
[
|
|
110
|
+
[`${BILLING}/reminders/application/commands/issue-invoice/issue-invoice.handler.ts`]: HANDLER_CLASS,
|
|
111
|
+
[SPEC_IN_MODULE]: SPEC,
|
|
79
112
|
}, withModules({ invoices: {}, reminders: {} }, ['invoices', 'reminders'], 'declared')),
|
|
80
113
|
},
|
|
81
114
|
{
|
|
82
115
|
ruleId: 'tree/closed',
|
|
83
116
|
name: 'a stray folder inside a module of the model',
|
|
84
|
-
expect: { file: `${BILLING}/domain/
|
|
85
|
-
files: project({ [`${BILLING}/domain/
|
|
117
|
+
expect: { file: `${BILLING}/invoices/domain/helpers` },
|
|
118
|
+
files: project({ [`${BILLING}/invoices/domain/helpers/rounding.ts`]: 'export const rounding = 1;\n' }, withModules({ invoices: {} })),
|
|
86
119
|
},
|
|
87
120
|
{
|
|
88
121
|
ruleId: 'tree/closed',
|
|
89
|
-
name: 'a folder of the
|
|
90
|
-
expect: { file: `${BILLING}/
|
|
122
|
+
name: 'a folder of the context that no config declares as a module',
|
|
123
|
+
expect: { file: `${BILLING}/invoices` },
|
|
91
124
|
files: project({
|
|
92
|
-
[`${BILLING}/domain/
|
|
125
|
+
[`${BILLING}/invoices/domain/events/invoice-issued.event.ts`]: 'export const invoiceIssued = 1;\n',
|
|
93
126
|
}),
|
|
94
127
|
},
|
|
95
128
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/module-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MA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,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClE,CAAC;QACF,CAAC,GAAG,OAAO,aAAa,CAAC,EACvB,IAAI,CAAC,MAAM,KAAK,CAAC;YACf,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;YACpB,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,oDAAoD,KAAK,IAAI;KACzF,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,SAAS,cAAc,CAAC,IAAY,EAAE,KAAa,EAAE,IAAY;IAC/D,OAAO,YAAY,KAAK,YAAY,IAAI,sBAAsB,IAAI,MAAM,KAAK,KAAK,CAAC;AACrF,CAAC"}
|
|
@@ -10,16 +10,16 @@ import { SAMPLES } from './samples.js';
|
|
|
10
10
|
import { source } from './source.js';
|
|
11
11
|
const { BILLING, ROUTE } = PATHS;
|
|
12
12
|
const NAMED = { [CONFIG_FILE]: config({ stack: { refusals: 'named' } }) };
|
|
13
|
-
const CODES = `${BILLING}/
|
|
13
|
+
const CODES = `${BILLING}/billing.codes.ts`;
|
|
14
14
|
const ALREADY_ISSUED = `${BILLING}/domain/errors/invoice-already-issued.error.ts`;
|
|
15
15
|
const UNKNOWN_INVOICE = `${BILLING}/domain/errors/unknown-invoice.error.ts`;
|
|
16
16
|
const ALREADY_SENT = `${BILLING}/domain/errors/invoice-already-sent.error.ts`;
|
|
17
17
|
const LEDGER_CLOSED = `${BILLING}/domain/errors/ledger-closed.error.ts`;
|
|
18
18
|
const INVOICE_ERROR = `${BILLING}/domain/errors/invoice.error.ts`;
|
|
19
|
-
/** `
|
|
19
|
+
/** `billing.codes.ts`, the code list of billing, `entries` written as they are. */
|
|
20
20
|
const codes = (entries, asConst = ' as const') => source(`export const BillingCodes = {`, entries, `}${asConst};`, '', 'export type BillingCode = (typeof BillingCodes)[keyof typeof BillingCodes];');
|
|
21
21
|
/** A refusal class of billing: its code as `code` writes it (none when empty), and a factory that gives `refusal(..)` its message. */
|
|
22
|
-
const refusal = (name, code = `BillingCodes.${name}`) => source("import { DomainRefusal } from '@ddd-ts-kit/kernel';", "import { BillingCodes } from '@/contexts/billing/
|
|
22
|
+
const refusal = (name, code = `BillingCodes.${name}`) => source("import { DomainRefusal } from '@ddd-ts-kit/kernel';", "import { BillingCodes } from '@/contexts/billing/billing.codes.js';", '', `export class ${name} extends DomainRefusal {`, ...(code === '' ? [] : [` readonly code = ${code};`, '']), ' static forInvoice(invoiceId: string) {', ` return ${name}.refusal('The invoice refuses it.', { invoiceId });`, ' }', '}');
|
|
23
23
|
const LISTED = codes(" InvoiceAlreadyIssued: 'INVOICE_ALREADY_ISSUED',\n UnknownInvoice: 'UNKNOWN_INVOICE',");
|
|
24
24
|
/** Billing under `named`: its code list and one class per refusal, what `generate error` writes. */
|
|
25
25
|
const NAMED_REFUSALS = {
|
|
@@ -111,7 +111,7 @@ const CODE_LISTED = [
|
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
ruleId: 'errors/code-listed',
|
|
114
|
-
name: 'refusal classes in a context without
|
|
114
|
+
name: 'refusal classes in a context without its code list',
|
|
115
115
|
expect: { file: ALREADY_ISSUED },
|
|
116
116
|
files: project({ [ALREADY_ISSUED]: refusal('InvoiceAlreadyIssued'), [UNKNOWN_INVOICE]: refusal('UnknownInvoice') }, NAMED),
|
|
117
117
|
},
|
|
@@ -195,7 +195,7 @@ const NAMED_LANGUAGE = [
|
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
ruleId: 'naming/suffix',
|
|
198
|
-
name: 'the code list of a context,
|
|
198
|
+
name: 'the code list of a context, billing.codes.ts at its root',
|
|
199
199
|
expect: 'pass',
|
|
200
200
|
files: project(NAMED_REFUSALS, NAMED),
|
|
201
201
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-refusal-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/named-refusal-fixtures.ts"],"names":[],"mappings":"AAAA,O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
|
31
31
|
readonly PUBLISHED: "src/contexts/billing/published-language/invoice-issued.v1.integration-event.ts";
|
|
32
32
|
readonly MODULE: "src/contexts/billing/billing.module.ts";
|
|
33
33
|
readonly BARREL: "src/contexts/billing/billing.declarations.ts";
|
|
34
|
-
readonly
|
|
34
|
+
readonly APPLICATION_DECLARATIONS: "src/contexts/billing/application/application.declarations.ts";
|
|
35
35
|
readonly PLATFORM_MODULE: 'src/platform/composition/platform.module.ts';
|
|
36
36
|
/** The decision record behind what the fixtures relax on purpose, so that only the rule under test speaks. */
|
|
37
37
|
readonly FIXTURE_ADR: 'docs/adr/0001-fixture-decisions.md';
|
|
@@ -33,7 +33,7 @@ export const PATHS = {
|
|
|
33
33
|
PUBLISHED: `${BILLING}/published-language/invoice-issued.v1.integration-event.ts`,
|
|
34
34
|
MODULE: `${BILLING}/billing.module.ts`,
|
|
35
35
|
BARREL: `${BILLING}/billing.declarations.ts`,
|
|
36
|
-
|
|
36
|
+
APPLICATION_DECLARATIONS: `${BILLING}/application/application.declarations.ts`,
|
|
37
37
|
PLATFORM_MODULE: 'src/platform/composition/platform.module.ts',
|
|
38
38
|
/** The decision record behind what the fixtures relax on purpose, so that only the rule under test speaks. */
|
|
39
39
|
FIXTURE_ADR: 'docs/adr/0001-fixture-decisions.md',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/check/fixtures/paths.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,sBAAsB,CAAC;AACvC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAEvC,mHAAmH;AACnH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO;IACP,OAAO;IACP,SAAS,EAAE,GAAG,OAAO,yCAAyC;IAC9D,cAAc,EAAE,GAAG,OAAO,sCAAsC;IAChE,OAAO,EAAE,GAAG,OAAO,mCAAmC;IACtD,KAAK,EAAE,GAAG,OAAO,wCAAwC;IACzD,eAAe,EAAE,GAAG,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WAAW,EAAE,qCAAqC;CAC1C,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { PATHS } from './paths.js';
|
|
|
5
5
|
import { project } from './project.js';
|
|
6
6
|
const { AGGREGATE, AGGREGATE_SPEC, BILLING, CATALOG, PUBLISHED, ROUTES } = PATHS;
|
|
7
7
|
const STATUS = `${BILLING}/domain/vocabularies/invoice-status.vocabulary.ts`;
|
|
8
|
-
const PERMISSIONS = `${BILLING}/
|
|
8
|
+
const PERMISSIONS = `${BILLING}/billing.permissions.ts`;
|
|
9
9
|
const GRANTS = 'src/platform/auth/roles/roles.ts';
|
|
10
10
|
const ROLE = 'src/platform/auth/authorization/role.ts';
|
|
11
11
|
const SERVICE = `${BILLING}/domain/services/pricing.service.ts`;
|
|
@@ -37,7 +37,7 @@ export const VOCABULARY_FIXTURES = [
|
|
|
37
37
|
...aggregate(invoice('InvoiceStatus.Issued')),
|
|
38
38
|
[AGGREGATE_SPEC]: "import { it } from 'vitest';\n\nit('reads issued', () => 'issued');\n",
|
|
39
39
|
[PUBLISHED]: "export const contract = { status: 'issued' as string, issued: true };\n",
|
|
40
|
-
[GRANTS]: "import { billingPermissions } from '@/contexts/billing/
|
|
40
|
+
[GRANTS]: "import { billingPermissions } from '@/contexts/billing/billing.permissions.js';\n\nexport const grants = { [billingPermissions['invoice.issue'].id]: [billingPermissions['invoice.issue']] };\n",
|
|
41
41
|
}),
|
|
42
42
|
},
|
|
43
43
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/vocabulary-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OA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M,EAAE,IAAI;QACZ,IAAI,EAAE,4DAA4D;QAClE,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;QACjC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;KAC7D;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,+DAA+D;QACrE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,2FAA2F;QAC3F,IAAI,EAAE,CAAC,eAAe,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;KACpD;CACF,CAAC;AAEF,8DAA8D;AAC9D,SAAS,KAAK,CAAC,KAAmB;IAChC,OAAO,OAAO,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACnH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locate.d.ts","sourceRoot":"","sources":["../../../src/check/project/locate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"locate.d.ts","sourceRoot":"","sources":["../../../src/check/project/locate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAclD,2CAA2C;AAC3C,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAkB7D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { earlierPlaceOf } from '../../context-files/index.js';
|
|
1
2
|
import { declaredModules, moduleSplit } from '../../model-modules/index.js';
|
|
2
3
|
import { isUnder } from './is-under.js';
|
|
3
4
|
const LAYERS = [
|
|
@@ -32,27 +33,35 @@ function locateInContexts(config, relative) {
|
|
|
32
33
|
if (rest.length === 0) {
|
|
33
34
|
return locateAtContextRoot(context, first);
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
const inModule = moduleLocation(config, { context, layer, rest });
|
|
36
|
+
const inModule = moduleLocation(config, context, [first, ...rest]);
|
|
37
37
|
if (inModule !== undefined) {
|
|
38
38
|
return inModule;
|
|
39
39
|
}
|
|
40
|
+
const layer = LAYERS.find((candidate) => candidate === first) ?? 'root';
|
|
40
41
|
return { area: 'context', context, layer, inside: layer === 'root' ? [first, ...rest] : rest };
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
* A module of the model is one folder
|
|
44
|
-
* the path is what it would be without modules,
|
|
44
|
+
* A module of the model is one folder of the context holding its layers, and one folder of the
|
|
45
|
+
* test folders of its specs: left out, the rest of the path is what it would be without modules,
|
|
46
|
+
* so every role keeps its place.
|
|
45
47
|
*/
|
|
46
|
-
function moduleLocation(config,
|
|
47
|
-
const { module, path } = moduleSplit(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
function moduleLocation(config, context, parts) {
|
|
49
|
+
const { module, path } = moduleSplit(parts.join('/'), declaredModules(config, context));
|
|
50
|
+
const [first, ...inside] = path.split('/');
|
|
51
|
+
const layer = LAYERS.find((candidate) => candidate === first);
|
|
52
|
+
return module === undefined || layer === undefined ? undefined : { area: 'context', context, layer, inside, module };
|
|
51
53
|
}
|
|
52
54
|
function locateAtContextRoot(context, entry) {
|
|
53
55
|
if (entry === `${context}.module.ts`) {
|
|
54
56
|
return { area: 'context', context, layer: 'module', inside: [] };
|
|
55
57
|
}
|
|
58
|
+
// The code list and the permission set sit at the root, and are read as they were in their role folder;
|
|
59
|
+
// an import names them without an extension, or with `.js`.
|
|
60
|
+
const [layer, ...inside] = earlierPlaceOf(context, `${entry.replace(/\.(?:js|ts)$/, '')}.ts`)?.split('/') ?? [];
|
|
61
|
+
const placed = LAYERS.find((candidate) => candidate === layer);
|
|
62
|
+
if (placed !== undefined) {
|
|
63
|
+
return { area: 'context', context, layer: placed, inside };
|
|
64
|
+
}
|
|
56
65
|
// A directory import (`../billing/published-language`) names the layer without a file.
|
|
57
66
|
const named = LAYERS.find((candidate) => candidate === entry.replace(/\.ts$/, ''));
|
|
58
67
|
return { area: 'context', context, layer: named ?? 'root', inside: [] };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locate.js","sourceRoot":"","sources":["../../../src/check/project/locate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,GAAqB;IAC/B,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,oBAAoB;IACpB,MAAM;CACP,CAAC;AAEF,2CAA2C;AAC3C,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,IAAY;IACjD,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACtC,OAAO,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,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O,CAAC,cAAc,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAChH,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;IAE/D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC7D,CAAC;IAED,uFAAuF;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAEnF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { specifierOf } from '../../alias/index.js';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { barrelFile, contextDeclarations, contextInjections, declaredRoleOf, dependenciesFile, generatedDrift,
|
|
3
|
+
import { barrelFile, contextDeclarations, contextInjections, declaredRoleOf, dependenciesFile, generatedDrift, earlierLayoutNotice, earlierLayoutOf, isDeclarationsFile, renderDependenciesFile, renderInjections, } from '../../declared/index.js';
|
|
4
4
|
import { declaredModules } from '../../model-modules/index.js';
|
|
5
5
|
import { sourceAt } from '../project/source-at.js';
|
|
6
6
|
import { isDeclaredStyle } from '../support/is-declared-style.js';
|
|
@@ -8,7 +8,7 @@ import { reporter } from '../support/reporter.js';
|
|
|
8
8
|
const REGENERATE = 'Run `ddd-ts-kit docs`, or `ddd-ts-kit generate` again, which rewrite it: the file is derived from the role files of the context and from their constructor signatures, and never edited by hand.';
|
|
9
9
|
export const declarationsBarrelCurrent = {
|
|
10
10
|
id: 'declarations/barrel-current',
|
|
11
|
-
description: 'In the declared style, the generated files of a context are what its tree says: with a barrel, the <
|
|
11
|
+
description: 'In the declared style, the generated files of a context are what its tree says: with a barrel, the <layer>.declarations.ts of each layer lists exactly its role files and registers the dependency list read from each constructor, and <context>.declarations.ts re-exports those files; under discovery <context>.dependencies.ts registers the lists alone.',
|
|
12
12
|
scope: 'project',
|
|
13
13
|
run(project) {
|
|
14
14
|
if (!isDeclaredStyle(project)) {
|
|
@@ -47,7 +47,7 @@ function judge(project, context) {
|
|
|
47
47
|
}
|
|
48
48
|
return judgeDeclarations(project, { context, directory, entries, sources, modules, specifierOf: specifierOfFile });
|
|
49
49
|
}
|
|
50
|
-
/** With a barrel: the declarations of each
|
|
50
|
+
/** With a barrel: the declarations of each layer and their summary, or a layout an earlier version wrote while it is current. */
|
|
51
51
|
function judgeDeclarations(project, declared) {
|
|
52
52
|
const { context, directory, entries, modules } = declared;
|
|
53
53
|
const { files } = contextDeclarations(declared);
|
|
@@ -58,14 +58,19 @@ function judgeDeclarations(project, declared) {
|
|
|
58
58
|
})),
|
|
59
59
|
...entries
|
|
60
60
|
.filter((entry) => isDeclarationsFile(context, entry, modules) && !files.has(entry))
|
|
61
|
-
.map((entry) => ({ file: `${directory}/${entry}`, flaw:
|
|
61
|
+
.map((entry) => ({ file: `${directory}/${entry}`, flaw: underived(context, entry) })),
|
|
62
62
|
...twins(declared),
|
|
63
63
|
];
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return
|
|
64
|
+
const layout = judged.some(({ flaw }) => flaw !== undefined)
|
|
65
|
+
? earlierLayoutOf(declared, (entry) => writtenIn(project, `${directory}/${entry}`))
|
|
66
|
+
: undefined;
|
|
67
|
+
// Two role files of one name stay an error in any layout: the summary would not compile.
|
|
68
|
+
return layout === undefined
|
|
69
|
+
? judged
|
|
70
|
+
: [
|
|
71
|
+
{ file: `${directory}/${barrelFile(context)}`, flaw: earlierLayoutNotice(context, layout), severity: 'warn' },
|
|
72
|
+
...twins(declared),
|
|
73
|
+
];
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
76
|
* Two role files of one name in two folders of a context, as two modules of the model may hold:
|
|
@@ -107,9 +112,9 @@ function stale(project, context, { name, file, expected, optional }) {
|
|
|
107
112
|
function writtenIn(project, file) {
|
|
108
113
|
return project.files.find((candidate) => candidate.path === file)?.text.replaceAll('\r\n', '\n');
|
|
109
114
|
}
|
|
110
|
-
function
|
|
115
|
+
function underived(context, entry) {
|
|
111
116
|
return {
|
|
112
|
-
message: `${entry} of "${context}" is generated for a folder that holds no declared role file
|
|
117
|
+
message: `${entry} of "${context}" is generated for a folder that holds no declarations any more (a layer without declared role file, or a role folder, which an earlier version declared on its own): nothing keeps it up to date.`,
|
|
113
118
|
fix: 'Run `ddd-ts-kit docs`, or `ddd-ts-kit generate` again, which delete it, and commit the deletion.',
|
|
114
119
|
};
|
|
115
120
|
}
|