ddd-ts-kit 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -23
- package/dist/alias/compiler-resolution-of.d.ts +10 -0
- package/dist/alias/compiler-resolution-of.d.ts.map +1 -0
- package/dist/alias/compiler-resolution-of.js +13 -0
- package/dist/alias/compiler-resolution-of.js.map +1 -0
- package/dist/alias/compiler-resolution.d.ts +8 -0
- package/dist/alias/compiler-resolution.d.ts.map +1 -0
- package/dist/alias/compiler-resolution.js +2 -0
- package/dist/alias/compiler-resolution.js.map +1 -0
- package/dist/alias/index.d.ts +3 -1
- package/dist/alias/index.d.ts.map +1 -1
- package/dist/alias/index.js +3 -1
- package/dist/alias/index.js.map +1 -1
- package/dist/alias/module-name-mapper.d.ts +4 -3
- package/dist/alias/module-name-mapper.d.ts.map +1 -1
- package/dist/alias/module-name-mapper.js +6 -4
- package/dist/alias/module-name-mapper.js.map +1 -1
- package/dist/alias/specifier-of.d.ts +7 -0
- package/dist/alias/specifier-of.d.ts.map +1 -0
- package/dist/alias/specifier-of.js +17 -0
- package/dist/alias/specifier-of.js.map +1 -0
- package/dist/alias/specifier-suffix.d.ts +6 -0
- package/dist/alias/specifier-suffix.d.ts.map +1 -0
- package/dist/alias/specifier-suffix.js +8 -0
- package/dist/alias/specifier-suffix.js.map +1 -0
- package/dist/alias/to-alias.d.ts +3 -2
- package/dist/alias/to-alias.d.ts.map +1 -1
- package/dist/alias/to-alias.js +4 -3
- package/dist/alias/to-alias.js.map +1 -1
- package/dist/build/emitted-place.d.ts +2 -0
- package/dist/build/emitted-place.d.ts.map +1 -1
- package/dist/build/emitted-specifier.d.ts +3 -2
- package/dist/build/emitted-specifier.d.ts.map +1 -1
- package/dist/build/emitted-specifier.js +6 -12
- package/dist/build/emitted-specifier.js.map +1 -1
- package/dist/build/emitted-target.d.ts +9 -0
- package/dist/build/emitted-target.d.ts.map +1 -0
- package/dist/build/emitted-target.js +18 -0
- package/dist/build/emitted-target.js.map +1 -0
- package/dist/build/rewrite-aliases.d.ts +5 -3
- package/dist/build/rewrite-aliases.d.ts.map +1 -1
- package/dist/build/rewrite-aliases.js +12 -7
- package/dist/build/rewrite-aliases.js.map +1 -1
- package/dist/build/rewrite-specifiers.d.ts +3 -1
- package/dist/build/rewrite-specifiers.d.ts.map +1 -1
- package/dist/build/rewrite-specifiers.js +2 -2
- package/dist/build/rewrite-specifiers.js.map +1 -1
- package/dist/build/unresolved-problem.d.ts +4 -0
- package/dist/build/unresolved-problem.d.ts.map +1 -0
- package/dist/build/unresolved-problem.js +16 -0
- package/dist/build/unresolved-problem.js.map +1 -0
- package/dist/check/alias/compiler-resolution.d.ts +10 -0
- package/dist/check/alias/compiler-resolution.d.ts.map +1 -0
- package/dist/check/alias/compiler-resolution.js +47 -0
- package/dist/check/alias/compiler-resolution.js.map +1 -0
- package/dist/check/alias/test-runners.js +4 -4
- package/dist/check/alias/test-runners.js.map +1 -1
- package/dist/check/canonical/roles.d.ts.map +1 -1
- package/dist/check/canonical/roles.js +6 -0
- package/dist/check/canonical/roles.js.map +1 -1
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +8 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/eslint-only-rules.d.ts.map +1 -1
- package/dist/check/catalogue/eslint-only-rules.js +12 -0
- package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
- package/dist/check/configuration/config-inspection.d.ts +2 -0
- package/dist/check/configuration/config-inspection.d.ts.map +1 -1
- package/dist/check/configuration/config-inspection.js +11 -1
- package/dist/check/configuration/config-inspection.js.map +1 -1
- package/dist/check/declarations/classes-of.js +1 -1
- package/dist/check/declarations/classes-of.js.map +1 -1
- package/dist/check/errors/builds-through-factories.d.ts +4 -0
- package/dist/check/errors/builds-through-factories.d.ts.map +1 -0
- package/dist/check/errors/builds-through-factories.js +5 -0
- package/dist/check/errors/builds-through-factories.js.map +1 -0
- package/dist/check/errors/error-code.d.ts +6 -0
- package/dist/check/errors/error-code.d.ts.map +1 -0
- package/dist/check/errors/error-code.js +2 -0
- package/dist/check/errors/error-code.js.map +1 -0
- package/dist/check/errors/error-codes.d.ts +8 -0
- package/dist/check/errors/error-codes.d.ts.map +1 -0
- package/dist/check/errors/error-codes.js +21 -0
- package/dist/check/errors/error-codes.js.map +1 -0
- package/dist/check/errors/kit-error-codes.d.ts +3 -0
- package/dist/check/errors/kit-error-codes.d.ts.map +1 -0
- package/dist/check/errors/kit-error-codes.js +17 -0
- package/dist/check/errors/kit-error-codes.js.map +1 -0
- package/dist/check/explain/context-docs.js +7 -7
- package/dist/check/explain/context-docs.js.map +1 -1
- package/dist/check/explain/errors-docs.d.ts +3 -0
- package/dist/check/explain/errors-docs.d.ts.map +1 -0
- package/dist/check/explain/errors-docs.js +30 -0
- package/dist/check/explain/errors-docs.js.map +1 -0
- package/dist/check/explain/imports-docs.d.ts.map +1 -1
- package/dist/check/explain/imports-docs.js +24 -9
- package/dist/check/explain/imports-docs.js.map +1 -1
- package/dist/check/explain/layer-docs.js +7 -7
- package/dist/check/explain/layer-docs.js.map +1 -1
- package/dist/check/explain/ports-docs.d.ts.map +1 -1
- package/dist/check/explain/ports-docs.js +15 -7
- package/dist/check/explain/ports-docs.js.map +1 -1
- package/dist/check/explain/rule-docs.d.ts.map +1 -1
- package/dist/check/explain/rule-docs.js +2 -0
- package/dist/check/explain/rule-docs.js.map +1 -1
- package/dist/check/explain/scheduling-docs.js +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +35 -10
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/alias-declared-fixtures.js +32 -1
- package/dist/check/fixtures/alias-declared-fixtures.js.map +1 -1
- package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/config-fixtures.js +6 -0
- package/dist/check/fixtures/config-fixtures.js.map +1 -1
- package/dist/check/fixtures/constructor-injection-fixtures.d.ts +3 -0
- package/dist/check/fixtures/constructor-injection-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/constructor-injection-fixtures.js +111 -0
- package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -0
- package/dist/check/fixtures/declared-project.d.ts.map +1 -1
- package/dist/check/fixtures/declared-project.js +4 -1
- package/dist/check/fixtures/declared-project.js.map +1 -1
- package/dist/check/fixtures/errors-fixtures.d.ts +3 -0
- package/dist/check/fixtures/errors-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/errors-fixtures.js +126 -0
- package/dist/check/fixtures/errors-fixtures.js.map +1 -0
- package/dist/check/fixtures/extension-fixtures.d.ts +3 -0
- package/dist/check/fixtures/extension-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/extension-fixtures.js +77 -0
- package/dist/check/fixtures/extension-fixtures.js.map +1 -0
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +6 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/signature-project.d.ts +11 -0
- package/dist/check/fixtures/signature-project.d.ts.map +1 -0
- package/dist/check/fixtures/signature-project.js +21 -0
- package/dist/check/fixtures/signature-project.js.map +1 -0
- package/dist/check/fixtures/signature.d.ts +13 -0
- package/dist/check/fixtures/signature.d.ts.map +1 -0
- package/dist/check/fixtures/signature.js +24 -0
- package/dist/check/fixtures/signature.js.map +1 -0
- package/dist/check/project/beside-the-sources.d.ts +5 -0
- package/dist/check/project/beside-the-sources.d.ts.map +1 -0
- package/dist/check/project/beside-the-sources.js +21 -0
- package/dist/check/project/beside-the-sources.js.map +1 -0
- package/dist/check/project/resolve-import.d.ts.map +1 -1
- package/dist/check/project/resolve-import.js +4 -1
- package/dist/check/project/resolve-import.js.map +1 -1
- package/dist/check/rules/clean-one-export-per-file.d.ts.map +1 -1
- package/dist/check/rules/clean-one-export-per-file.js +14 -8
- package/dist/check/rules/clean-one-export-per-file.js.map +1 -1
- package/dist/check/rules/config-valid.d.ts.map +1 -1
- package/dist/check/rules/config-valid.js +2 -1
- package/dist/check/rules/config-valid.js.map +1 -1
- package/dist/check/rules/declarations-barrel-current.d.ts.map +1 -1
- package/dist/check/rules/declarations-barrel-current.js +34 -32
- package/dist/check/rules/declarations-barrel-current.js.map +1 -1
- package/dist/check/rules/declarations-constructor-injection.d.ts +3 -0
- package/dist/check/rules/declarations-constructor-injection.d.ts.map +1 -0
- package/dist/check/rules/declarations-constructor-injection.js +58 -0
- package/dist/check/rules/declarations-constructor-injection.js.map +1 -0
- package/dist/check/rules/errors-code-unique.d.ts +3 -0
- package/dist/check/rules/errors-code-unique.d.ts.map +1 -0
- package/dist/check/rules/errors-code-unique.js +34 -0
- package/dist/check/rules/errors-code-unique.js.map +1 -0
- package/dist/check/rules/errors-known-code.d.ts +3 -0
- package/dist/check/rules/errors-known-code.d.ts.map +1 -0
- package/dist/check/rules/errors-known-code.js +51 -0
- package/dist/check/rules/errors-known-code.js.map +1 -0
- package/dist/check/rules/imports-alias-declared.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-declared.js +3 -1
- package/dist/check/rules/imports-alias-declared.js.map +1 -1
- package/dist/check/rules/imports-alias-only.d.ts.map +1 -1
- package/dist/check/rules/imports-alias-only.js +16 -29
- package/dist/check/rules/imports-alias-only.js.map +1 -1
- package/dist/check/rules/imports-extension.d.ts +3 -0
- package/dist/check/rules/imports-extension.d.ts.map +1 -0
- package/dist/check/rules/imports-extension.js +65 -0
- package/dist/check/rules/imports-extension.js.map +1 -0
- package/dist/check/rules/language-glossary-term.d.ts.map +1 -1
- package/dist/check/rules/language-glossary-term.js +7 -5
- package/dist/check/rules/language-glossary-term.js.map +1 -1
- package/dist/check/rules/ports-no-concrete-dependency.d.ts.map +1 -1
- package/dist/check/rules/ports-no-concrete-dependency.js +43 -15
- package/dist/check/rules/ports-no-concrete-dependency.js.map +1 -1
- package/dist/check/rules/tree-closed.js +6 -4
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/commands/build-aliases.d.ts.map +1 -1
- package/dist/commands/build-aliases.js +5 -3
- package/dist/commands/build-aliases.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +17 -2
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/error-factories.d.ts +7 -0
- package/dist/commands/error-factories.d.ts.map +1 -0
- package/dist/commands/error-factories.js +65 -0
- package/dist/commands/error-factories.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commit/is-derived.d.ts.map +1 -1
- package/dist/commit/is-derived.js +5 -2
- package/dist/commit/is-derived.js.map +1 -1
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/default-import-extension.d.ts +3 -0
- package/dist/config/default-import-extension.d.ts.map +1 -0
- package/dist/config/default-import-extension.js +3 -0
- package/dist/config/default-import-extension.js.map +1 -0
- package/dist/config/import-extensions.d.ts +3 -0
- package/dist/config/import-extensions.d.ts.map +1 -0
- package/dist/config/import-extensions.js +3 -0
- package/dist/config/import-extensions.js.map +1 -0
- package/dist/config/index.d.ts +4 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +4 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/parse-config.d.ts.map +1 -1
- package/dist/config/parse-config.js +2 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/parse-stack.d.ts.map +1 -1
- package/dist/config/parse-stack.js +3 -1
- package/dist/config/parse-stack.js.map +1 -1
- package/dist/config/restack-config-text.d.ts +11 -0
- package/dist/config/restack-config-text.d.ts.map +1 -0
- package/dist/config/restack-config-text.js +31 -0
- package/dist/config/restack-config-text.js.map +1 -0
- package/dist/config/serialize-config.d.ts.map +1 -1
- package/dist/config/serialize-config.js +3 -6
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/stack.d.ts +17 -0
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +2 -0
- package/dist/config/stack.js.map +1 -1
- package/dist/config/unwritten-import-extension.d.ts +3 -0
- package/dist/config/unwritten-import-extension.d.ts.map +1 -0
- package/dist/config/unwritten-import-extension.js +3 -0
- package/dist/config/unwritten-import-extension.js.map +1 -0
- package/dist/config/written-stack.d.ts +8 -0
- package/dist/config/written-stack.d.ts.map +1 -0
- package/dist/config/written-stack.js +10 -0
- package/dist/config/written-stack.js.map +1 -0
- package/dist/declared/declared-role.d.ts.map +1 -1
- package/dist/declared/declared-role.js +1 -0
- package/dist/declared/declared-role.js.map +1 -1
- package/dist/declared/dependencies-file.d.ts +7 -0
- package/dist/declared/dependencies-file.d.ts.map +1 -0
- package/dist/declared/dependencies-file.js +9 -0
- package/dist/declared/dependencies-file.js.map +1 -0
- package/dist/declared/generated-drift.d.ts +7 -0
- package/dist/declared/generated-drift.d.ts.map +1 -0
- package/dist/declared/generated-drift.js +47 -0
- package/dist/declared/generated-drift.js.map +1 -0
- package/dist/declared/index.d.ts +8 -1
- package/dist/declared/index.d.ts.map +1 -1
- package/dist/declared/index.js +6 -1
- package/dist/declared/index.js.map +1 -1
- package/dist/declared/injection/class-injection.d.ts +19 -0
- package/dist/declared/injection/class-injection.d.ts.map +1 -0
- package/dist/declared/injection/class-injection.js +2 -0
- package/dist/declared/injection/class-injection.js.map +1 -0
- package/dist/declared/injection/constructor-of.d.ts +16 -0
- package/dist/declared/injection/constructor-of.d.ts.map +1 -0
- package/dist/declared/injection/constructor-of.js +33 -0
- package/dist/declared/injection/constructor-of.js.map +1 -0
- package/dist/declared/injection/context-injections.d.ts +8 -0
- package/dist/declared/injection/context-injections.d.ts.map +1 -0
- package/dist/declared/injection/context-injections.js +14 -0
- package/dist/declared/injection/context-injections.js.map +1 -0
- package/dist/declared/injection/declared-kind-of.d.ts +8 -0
- package/dist/declared/injection/declared-kind-of.d.ts.map +1 -0
- package/dist/declared/injection/declared-kind-of.js +12 -0
- package/dist/declared/injection/declared-kind-of.js.map +1 -0
- package/dist/declared/injection/exported-name-of.d.ts +4 -0
- package/dist/declared/injection/exported-name-of.d.ts.map +1 -0
- package/dist/declared/injection/exported-name-of.js +17 -0
- package/dist/declared/injection/exported-name-of.js.map +1 -0
- package/dist/declared/injection/language-types.d.ts +3 -0
- package/dist/declared/injection/language-types.d.ts.map +1 -0
- package/dist/declared/injection/language-types.js +32 -0
- package/dist/declared/injection/language-types.js.map +1 -0
- package/dist/declared/injection/local-names.d.ts +17 -0
- package/dist/declared/injection/local-names.d.ts.map +1 -0
- package/dist/declared/injection/local-names.js +41 -0
- package/dist/declared/injection/local-names.js.map +1 -0
- package/dist/declared/injection/parameter-shape.d.ts +11 -0
- package/dist/declared/injection/parameter-shape.d.ts.map +1 -0
- package/dist/declared/injection/parameter-shape.js +58 -0
- package/dist/declared/injection/parameter-shape.js.map +1 -0
- package/dist/declared/injection/raw-class-name.d.ts +7 -0
- package/dist/declared/injection/raw-class-name.d.ts.map +1 -0
- package/dist/declared/injection/raw-class-name.js +28 -0
- package/dist/declared/injection/raw-class-name.js.map +1 -0
- package/dist/declared/injection/read-constructor.d.ts +10 -0
- package/dist/declared/injection/read-constructor.d.ts.map +1 -0
- package/dist/declared/injection/read-constructor.js +2 -0
- package/dist/declared/injection/read-constructor.js.map +1 -0
- package/dist/declared/injection/read-injections.d.ts +6 -0
- package/dist/declared/injection/read-injections.d.ts.map +1 -0
- package/dist/declared/injection/read-injections.js +75 -0
- package/dist/declared/injection/read-injections.js.map +1 -0
- package/dist/declared/injection/render-injections.d.ts +11 -0
- package/dist/declared/injection/render-injections.d.ts.map +1 -0
- package/dist/declared/injection/render-injections.js +51 -0
- package/dist/declared/injection/render-injections.js.map +1 -0
- package/dist/declared/injection/rendered-injections.d.ts +8 -0
- package/dist/declared/injection/rendered-injections.d.ts.map +1 -0
- package/dist/declared/injection/rendered-injections.js +2 -0
- package/dist/declared/injection/rendered-injections.js.map +1 -0
- package/dist/declared/injection/resolve-token.d.ts +18 -0
- package/dist/declared/injection/resolve-token.d.ts.map +1 -0
- package/dist/declared/injection/resolve-token.js +46 -0
- package/dist/declared/injection/resolve-token.js.map +1 -0
- package/dist/declared/injection/resolved-token.d.ts +10 -0
- package/dist/declared/injection/resolved-token.d.ts.map +1 -0
- package/dist/declared/injection/resolved-token.js +2 -0
- package/dist/declared/injection/resolved-token.js.map +1 -0
- package/dist/declared/injection/sources.d.ts +4 -0
- package/dist/declared/injection/sources.d.ts.map +1 -0
- package/dist/declared/injection/sources.js +2 -0
- package/dist/declared/injection/sources.js.map +1 -0
- package/dist/declared/injection/token-reference.d.ts +14 -0
- package/dist/declared/injection/token-reference.d.ts.map +1 -0
- package/dist/declared/injection/token-reference.js +2 -0
- package/dist/declared/injection/token-reference.js.map +1 -0
- package/dist/declared/render-barrel.d.ts +8 -5
- package/dist/declared/render-barrel.d.ts.map +1 -1
- package/dist/declared/render-barrel.js +13 -6
- package/dist/declared/render-barrel.js.map +1 -1
- package/dist/declared/render-dependencies-file.d.ts +8 -0
- package/dist/declared/render-dependencies-file.d.ts.map +1 -0
- package/dist/declared/render-dependencies-file.js +12 -0
- package/dist/declared/render-dependencies-file.js.map +1 -0
- package/dist/depcruise/hygiene-rules.js +2 -1
- package/dist/depcruise/hygiene-rules.js.map +1 -1
- package/dist/describe/context-description.d.ts +22 -0
- package/dist/describe/context-description.d.ts.map +1 -1
- package/dist/describe/describe-context.d.ts.map +1 -1
- package/dist/describe/describe-context.js +4 -0
- package/dist/describe/describe-context.js.map +1 -1
- package/dist/describe/format-description.d.ts.map +1 -1
- package/dist/describe/format-description.js +9 -0
- package/dist/describe/format-description.js.map +1 -1
- package/dist/describe/read-errors.d.ts +8 -0
- package/dist/describe/read-errors.d.ts.map +1 -0
- package/dist/describe/read-errors.js +52 -0
- package/dist/describe/read-errors.js.map +1 -0
- package/dist/describe/read-projections.d.ts +5 -0
- package/dist/describe/read-projections.d.ts.map +1 -0
- package/dist/describe/read-projections.js +19 -0
- package/dist/describe/read-projections.js.map +1 -0
- package/dist/describe/reference-lines.js +23 -1
- package/dist/describe/reference-lines.js.map +1 -1
- package/dist/dev/refresh-declarations.d.ts +9 -0
- package/dist/dev/refresh-declarations.d.ts.map +1 -0
- package/dist/dev/refresh-declarations.js +28 -0
- package/dist/dev/refresh-declarations.js.map +1 -0
- package/dist/generate/access-vars.js +3 -3
- package/dist/generate/access-vars.js.map +1 -1
- package/dist/generate/errors/add-factory.d.ts +13 -0
- package/dist/generate/errors/add-factory.d.ts.map +1 -0
- package/dist/generate/errors/add-factory.js +30 -0
- package/dist/generate/errors/add-factory.js.map +1 -0
- package/dist/generate/errors/add-spec-case.d.ts +6 -0
- package/dist/generate/errors/add-spec-case.d.ts.map +1 -0
- package/dist/generate/errors/add-spec-case.js +26 -0
- package/dist/generate/errors/add-spec-case.js.map +1 -0
- package/dist/generate/errors/class-body.d.ts +8 -0
- package/dist/generate/errors/class-body.d.ts.map +1 -0
- package/dist/generate/errors/class-body.js +11 -0
- package/dist/generate/errors/class-body.js.map +1 -0
- package/dist/generate/errors/codes-of-context.d.ts +4 -0
- package/dist/generate/errors/codes-of-context.d.ts.map +1 -0
- package/dist/generate/errors/codes-of-context.js +17 -0
- package/dist/generate/errors/codes-of-context.js.map +1 -0
- package/dist/generate/errors/refusal-code.d.ts +13 -0
- package/dist/generate/errors/refusal-code.d.ts.map +1 -0
- package/dist/generate/errors/refusal-code.js +19 -0
- package/dist/generate/errors/refusal-code.js.map +1 -0
- package/dist/generate/errors/refusal-name.d.ts +4 -0
- package/dist/generate/errors/refusal-name.d.ts.map +1 -0
- package/dist/generate/errors/refusal-name.js +15 -0
- package/dist/generate/errors/refusal-name.js.map +1 -0
- package/dist/generate/errors/static-methods.d.ts +10 -0
- package/dist/generate/errors/static-methods.d.ts.map +1 -0
- package/dist/generate/errors/static-methods.js +13 -0
- package/dist/generate/errors/static-methods.js.map +1 -0
- package/dist/generate/errors/vague-refusal-names.d.ts +3 -0
- package/dist/generate/errors/vague-refusal-names.d.ts.map +1 -0
- package/dist/generate/errors/vague-refusal-names.js +15 -0
- package/dist/generate/errors/vague-refusal-names.js.map +1 -0
- package/dist/generate/kinds/context-plan.d.ts +10 -0
- package/dist/generate/kinds/context-plan.d.ts.map +1 -0
- package/dist/generate/kinds/context-plan.js +2 -0
- package/dist/generate/kinds/context-plan.js.map +1 -0
- package/dist/generate/kinds/declare-context-entries.d.ts +3 -1
- package/dist/generate/kinds/declare-context-entries.d.ts.map +1 -1
- package/dist/generate/kinds/declare-context-entries.js +4 -2
- package/dist/generate/kinds/declare-context-entries.js.map +1 -1
- package/dist/generate/kinds/domain-error-kind.d.ts.map +1 -1
- package/dist/generate/kinds/domain-error-kind.js +4 -1
- package/dist/generate/kinds/domain-error-kind.js.map +1 -1
- package/dist/generate/kinds/error-kind.d.ts +3 -0
- package/dist/generate/kinds/error-kind.d.ts.map +1 -0
- package/dist/generate/kinds/error-kind.js +75 -0
- package/dist/generate/kinds/error-kind.js.map +1 -0
- package/dist/generate/kinds/extraction/service-selection.js +8 -11
- package/dist/generate/kinds/extraction/service-selection.js.map +1 -1
- package/dist/generate/kinds/job/job-vars.d.ts.map +1 -1
- package/dist/generate/kinds/job/job-vars.js +5 -3
- package/dist/generate/kinds/job/job-vars.js.map +1 -1
- package/dist/generate/kinds/plan-vars.d.ts +5 -0
- package/dist/generate/kinds/plan-vars.d.ts.map +1 -0
- package/dist/generate/kinds/plan-vars.js +24 -0
- package/dist/generate/kinds/plan-vars.js.map +1 -0
- package/dist/generate/kinds/projection-kind.d.ts +3 -0
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -0
- package/dist/generate/kinds/projection-kind.js +72 -0
- package/dist/generate/kinds/projection-kind.js.map +1 -0
- package/dist/generate/kinds/publish-in-index.js +2 -2
- package/dist/generate/kinds/publish-in-index.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +7 -6
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/wire-context.d.ts +10 -0
- package/dist/generate/kinds/wire-context.d.ts.map +1 -0
- package/dist/generate/kinds/wire-context.js +36 -0
- package/dist/generate/kinds/wire-context.js.map +1 -0
- package/dist/generate/kinds/write-context-files.d.ts +1 -8
- package/dist/generate/kinds/write-context-files.d.ts.map +1 -1
- package/dist/generate/kinds/write-context-files.js +3 -40
- package/dist/generate/kinds/write-context-files.js.map +1 -1
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +4 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/refresh-barrels.d.ts +4 -3
- package/dist/generate/refresh-barrels.d.ts.map +1 -1
- package/dist/generate/refresh-barrels.js +41 -16
- package/dist/generate/refresh-barrels.js.map +1 -1
- package/dist/generate/spec-vars.js +4 -4
- package/dist/generate/spec-vars.js.map +1 -1
- package/dist/generate/storage-vars.d.ts +2 -2
- package/dist/generate/storage-vars.d.ts.map +1 -1
- package/dist/generate/storage-vars.js +6 -10
- package/dist/generate/storage-vars.js.map +1 -1
- package/dist/generate/workspace-sources.d.ts +6 -0
- package/dist/generate/workspace-sources.d.ts.map +1 -0
- package/dist/generate/workspace-sources.js +13 -0
- package/dist/generate/workspace-sources.js.map +1 -0
- package/dist/init/manifest/scripts-for.js +6 -1
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.js +23 -23
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +32 -3
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/recorded-options.d.ts +11 -0
- package/dist/init/stack/recorded-options.d.ts.map +1 -0
- package/dist/init/stack/recorded-options.js +19 -0
- package/dist/init/stack/recorded-options.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts +6 -1
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +48 -9
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/resolve-style.d.ts +3 -5
- package/dist/init/stack/resolve-style.d.ts.map +1 -1
- package/dist/init/stack/resolve-style.js +11 -3
- package/dist/init/stack/resolve-style.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +4 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/init/write-agent-settings.js +4 -3
- package/dist/init/write-agent-settings.js.map +1 -1
- package/dist/init/write-type-script-configs.d.ts +2 -1
- package/dist/init/write-type-script-configs.d.ts.map +1 -1
- package/dist/init/write-type-script-configs.js +4 -4
- package/dist/init/write-type-script-configs.js.map +1 -1
- package/dist/refresh-declarations.d.ts +3 -0
- package/dist/refresh-declarations.d.ts.map +1 -0
- package/dist/refresh-declarations.js +4 -0
- package/dist/refresh-declarations.js.map +1 -0
- package/dist/refusals/apply-plan.d.ts +17 -0
- package/dist/refusals/apply-plan.d.ts.map +1 -0
- package/dist/refusals/apply-plan.js +118 -0
- package/dist/refusals/apply-plan.js.map +1 -0
- package/dist/refusals/factory-name-for.d.ts +7 -0
- package/dist/refusals/factory-name-for.d.ts.map +1 -0
- package/dist/refusals/factory-name-for.js +16 -0
- package/dist/refusals/factory-name-for.js.map +1 -0
- package/dist/refusals/legacy-error.d.ts +21 -0
- package/dist/refusals/legacy-error.d.ts.map +1 -0
- package/dist/refusals/legacy-error.js +2 -0
- package/dist/refusals/legacy-error.js.map +1 -0
- package/dist/refusals/legacy-errors.d.ts +6 -0
- package/dist/refusals/legacy-errors.d.ts.map +1 -0
- package/dist/refusals/legacy-errors.js +16 -0
- package/dist/refusals/legacy-errors.js.map +1 -0
- package/dist/refusals/migration-draft.d.ts +15 -0
- package/dist/refusals/migration-draft.d.ts.map +1 -0
- package/dist/refusals/migration-draft.js +41 -0
- package/dist/refusals/migration-draft.js.map +1 -0
- package/dist/refusals/migration-plan.d.ts +6 -0
- package/dist/refusals/migration-plan.d.ts.map +1 -0
- package/dist/refusals/migration-plan.js +2 -0
- package/dist/refusals/migration-plan.js.map +1 -0
- package/dist/refusals/move.d.ts +15 -0
- package/dist/refusals/move.d.ts.map +1 -0
- package/dist/refusals/move.js +2 -0
- package/dist/refusals/move.js.map +1 -0
- package/dist/refusals/nested-cases.d.ts +3 -0
- package/dist/refusals/nested-cases.d.ts.map +1 -0
- package/dist/refusals/nested-cases.js +9 -0
- package/dist/refusals/nested-cases.js.map +1 -0
- package/dist/refusals/plan-file.d.ts +3 -0
- package/dist/refusals/plan-file.d.ts.map +1 -0
- package/dist/refusals/plan-file.js +3 -0
- package/dist/refusals/plan-file.js.map +1 -0
- package/dist/refusals/planned-factory.d.ts +11 -0
- package/dist/refusals/planned-factory.d.ts.map +1 -0
- package/dist/refusals/planned-factory.js +2 -0
- package/dist/refusals/planned-factory.js.map +1 -0
- package/dist/refusals/planned-move.d.ts +8 -0
- package/dist/refusals/planned-move.d.ts.map +1 -0
- package/dist/refusals/planned-move.js +2 -0
- package/dist/refusals/planned-move.js.map +1 -0
- package/dist/refusals/project-sources.d.ts +5 -0
- package/dist/refusals/project-sources.d.ts.map +1 -0
- package/dist/refusals/project-sources.js +13 -0
- package/dist/refusals/project-sources.js.map +1 -0
- package/dist/refusals/propose-plan.d.ts +16 -0
- package/dist/refusals/propose-plan.d.ts.map +1 -0
- package/dist/refusals/propose-plan.js +39 -0
- package/dist/refusals/propose-plan.js.map +1 -0
- package/dist/refusals/read-legacy-error.d.ts +9 -0
- package/dist/refusals/read-legacy-error.d.ts.map +1 -0
- package/dist/refusals/read-legacy-error.js +75 -0
- package/dist/refusals/read-legacy-error.js.map +1 -0
- package/dist/refusals/read-plan.d.ts +4 -0
- package/dist/refusals/read-plan.d.ts.map +1 -0
- package/dist/refusals/read-plan.js +43 -0
- package/dist/refusals/read-plan.js.map +1 -0
- package/dist/refusals/render-factory.d.ts +5 -0
- package/dist/refusals/render-factory.d.ts.map +1 -0
- package/dist/refusals/render-factory.js +14 -0
- package/dist/refusals/render-factory.js.map +1 -0
- package/dist/refusals/replace-in-code.d.ts +16 -0
- package/dist/refusals/replace-in-code.d.ts.map +1 -0
- package/dist/refusals/replace-in-code.js +20 -0
- package/dist/refusals/replace-in-code.js.map +1 -0
- package/dist/refusals/rewrite-usages.d.ts +6 -0
- package/dist/refusals/rewrite-usages.d.ts.map +1 -0
- package/dist/refusals/rewrite-usages.js +80 -0
- package/dist/refusals/rewrite-usages.js.map +1 -0
- package/dist/refusals/spec-parts.d.ts +8 -0
- package/dist/refusals/spec-parts.d.ts.map +1 -0
- package/dist/refusals/spec-parts.js +14 -0
- package/dist/refusals/spec-parts.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +8 -0
- package/dist/run.js.map +1 -1
- package/dist/stack/alias-vars.d.ts +2 -1
- package/dist/stack/alias-vars.d.ts.map +1 -1
- package/dist/stack/alias-vars.js +6 -3
- package/dist/stack/alias-vars.js.map +1 -1
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +2 -1
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/templates/acl/translator.spec.ts.tpl +1 -1
- package/templates/adapter/adapter.declared.ts.tpl +3 -3
- package/templates/adapter/adapter.spec.ts.tpl +1 -1
- package/templates/adapter/adapter.ts.tpl +1 -1
- package/templates/adapter/wiring.tsyringe.tpl +3 -3
- package/templates/aggregate/aggregate.spec.ts.tpl +2 -2
- package/templates/aggregate/aggregate.ts.tpl +5 -0
- package/templates/architecture/extractable.declared.spec.ts.tpl +1 -1
- package/templates/architecture/extractable.manual.spec.ts.tpl +4 -4
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +1 -1
- package/templates/architecture/wiring.declared.tpl +1 -1
- package/templates/architecture/wiring.manual.tpl +1 -1
- package/templates/architecture/wiring.tsyringe.tpl +1 -1
- package/templates/builder/builder.ts.tpl +1 -1
- package/templates/command/handler.declared.ts.tpl +12 -7
- package/templates/command/handler.spec.buses.ts.tpl +4 -4
- package/templates/command/handler.spec.tsyringe.ts.tpl +5 -5
- package/templates/command/handler.ts.tpl +9 -4
- package/templates/command/wiring.manual.tpl +2 -2
- package/templates/command/wiring.tsyringe.tpl +3 -3
- package/templates/context/module.manual.ts.tpl +1 -1
- package/templates/context/permission-set.tpl +1 -1
- package/templates/context/permissions.spec.ts.tpl +1 -1
- package/templates/context/routes.spec.ts.tpl +1 -1
- package/templates/context/wiring.declared.tpl +2 -2
- package/templates/context/wiring.manual.tpl +1 -1
- package/templates/context/wiring.tsyringe.tpl +2 -2
- package/templates/docs/openapi.json.tpl +5 -0
- package/templates/domain-error/domain-error.spec.ts.tpl +1 -1
- package/templates/domain-event/domain-event.spec.ts.tpl +1 -1
- package/templates/domain-service/domain-service.spec.ts.tpl +1 -1
- package/templates/e2e/e2e.spec.ts.tpl +2 -2
- package/templates/entity/entity.spec.ts.tpl +1 -1
- package/templates/entity/entity.ts.tpl +5 -0
- package/templates/error/case.spec.ts.tpl +8 -0
- package/templates/error/concept-error.spec.ts.tpl +7 -0
- package/templates/error/concept-error.ts.tpl +5 -0
- package/templates/error/factory.ts.tpl +4 -0
- package/templates/event-handler/event-handler.declared.ts.tpl +3 -3
- package/templates/event-handler/event-handler.spec.ts.tpl +2 -2
- package/templates/event-handler/event-handler.ts.tpl +1 -1
- package/templates/event-handler/wiring.manual.tpl +2 -2
- package/templates/event-handler/wiring.tsyringe.tpl +2 -2
- package/templates/gateway/adapter.declared.ts.tpl +3 -3
- package/templates/gateway/adapter.ts.tpl +2 -2
- package/templates/gateway/contract.spec.ts.tpl +3 -3
- package/templates/gateway/fake.ts.tpl +1 -1
- package/templates/gateway/platform-test.declared.tpl +1 -1
- package/templates/gateway/platform.declared.tpl +1 -1
- package/templates/gateway/wiring.tsyringe.tpl +3 -3
- package/templates/init/CLAUDE.md.tpl +5 -2
- package/templates/init/README.md.tpl +15 -10
- package/templates/init/e2e/create-credentials.jwt.ts.tpl +1 -1
- package/templates/init/e2e/create-credentials.keycloak.ts.tpl +1 -1
- package/templates/init/e2e/create-credentials.none.ts.tpl +2 -2
- package/templates/init/e2e/start-application.database.ts.tpl +16 -16
- package/templates/init/e2e/start-application.memory.ts.tpl +16 -16
- package/templates/init/e2e/test-environment.ts.tpl +1 -1
- package/templates/init/jest.config.js.tpl +7 -0
- package/templates/init/main.ts.tpl +11 -11
- package/templates/init/platform/audit/audit.module.manual.ts.tpl +5 -5
- package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +4 -4
- package/templates/init/platform/audit/create-audit.ts.tpl +5 -5
- package/templates/init/platform/audit/search-audit-entries.handler.ts.tpl +1 -1
- package/templates/init/platform/audit/search-audit-entries.route.ts.tpl +1 -1
- package/templates/init/platform/auth/authorization.tsyringe.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authenticator.jwt.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authenticator.keycloak.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authenticator.none.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authorizer.abac.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authorizer.custom.ts.tpl +2 -2
- package/templates/init/platform/auth/create-authorizer.rbac.ts.tpl +1 -1
- package/templates/init/platform/auth/create-authorizer.rebac.ts.tpl +3 -3
- package/templates/init/platform/auth/create-tuple-store.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/auth/custom-authorizer.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/auth/http-boundary.ts.tpl +1 -1
- package/templates/init/platform/auth/permission-mapping.ts.tpl +1 -1
- package/templates/init/platform/auth/permissions.ts.tpl +1 -1
- package/templates/init/platform/auth/principal-of.none.ts.tpl +1 -1
- package/templates/init/platform/auth/relate-system-actors.ts.tpl +1 -1
- package/templates/init/platform/auth/relation-tuples.ts.tpl +2 -2
- package/templates/init/platform/auth/security-schemes.none.ts.tpl +1 -1
- package/templates/init/platform/buses/create-command-bus.ts.tpl +2 -2
- package/templates/init/platform/buses/create-query-bus.ts.tpl +1 -1
- package/templates/init/platform/compose-application.manual.ts.tpl +6 -6
- package/templates/init/platform/compose-application.tsyringe.ts.tpl +10 -10
- package/templates/init/platform/config/app-config.ts.tpl +2 -2
- package/templates/init/platform/config/load-config.ts.tpl +3 -3
- package/templates/init/platform/create-platform.manual.ts.tpl +16 -16
- package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
- package/templates/init/platform/database/create-data-source.typeorm.ts.tpl +1 -1
- package/templates/init/platform/database/data-source.typeorm.ts.tpl +1 -1
- package/templates/init/platform/database/database.drizzle.ts.tpl +1 -1
- package/templates/init/platform/database/database.prisma.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.memory.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.pooled.ts.tpl +2 -2
- package/templates/init/platform/database/inert-persistence.prisma.ts.tpl +3 -3
- package/templates/init/platform/database/inert-persistence.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/open-persistence.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/database/open-persistence.memory.ts.tpl +1 -1
- package/templates/init/platform/database/open-persistence.pooled.ts.tpl +3 -3
- package/templates/init/platform/database/open-persistence.prisma.ts.tpl +3 -3
- package/templates/init/platform/database/open-persistence.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +4 -4
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +5 -5
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +4 -4
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +3 -3
- package/templates/init/platform/database/persistence-over.drizzle.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.knex.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
- package/templates/init/platform/database/persistence-over.typeorm.ts.tpl +2 -2
- package/templates/init/platform/database/persistence.orm.ts.tpl +1 -1
- package/templates/init/platform/errors.ts.tpl +1 -1
- package/templates/init/platform/events/create-event-provider.custom.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.kafka.ts.tpl +3 -3
- package/templates/init/platform/events/create-event-provider.nats.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.rabbitmq.ts.tpl +2 -2
- package/templates/init/platform/events/create-event-provider.redis.ts.tpl +2 -2
- package/templates/init/platform/events/custom-event-bus.contract.spec.ts.tpl +1 -1
- package/templates/init/platform/events/in-process-events.ts.tpl +1 -1
- package/templates/init/platform/events/start-outbox-relay.ts.tpl +1 -1
- package/templates/init/platform/http/create-app-module.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.express.ts.tpl +4 -4
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +4 -4
- package/templates/init/platform/http/start-http-server.nest.ts.tpl +5 -5
- package/templates/init/platform/http/with-documentation.ts.tpl +2 -2
- package/templates/init/platform/lay-foundations.tsyringe.ts.tpl +5 -5
- package/templates/init/platform/platform-test.module.tsyringe.ts.tpl +1 -1
- package/templates/init/platform/platform.manual.ts.tpl +3 -3
- package/templates/init/platform/platform.module.tsyringe.ts.tpl +8 -8
- package/templates/init/platform/resilience/adapter-aspects.ts.tpl +2 -2
- package/templates/init/platform/resilience/default-resilience.ts.tpl +1 -1
- package/templates/init/platform/resilience/own-policy.ts.tpl +1 -1
- package/templates/init/platform/tracing.ts.tpl +2 -2
- package/templates/init/rules/application.md.tpl +8 -2
- package/templates/init/rules/domain.md.tpl +11 -0
- package/templates/init/rules/infrastructure.md.tpl +3 -3
- package/templates/init/rules/presentation.md.tpl +5 -0
- package/templates/init/scripts/openapi.ts.tpl +5 -5
- package/templates/integration-event/audited.tpl +1 -1
- package/templates/integration-event/integration-event.class-validator.ts.tpl +1 -1
- package/templates/integration-event/integration-event.custom.ts.tpl +1 -1
- package/templates/integration-event/publisher.declared.ts.tpl +4 -4
- package/templates/integration-event/publisher.spec.ts.tpl +2 -2
- package/templates/integration-event/publisher.ts.tpl +2 -2
- package/templates/integration-event/wiring.manual.tpl +2 -2
- package/templates/integration-event/wiring.tsyringe.tpl +2 -2
- package/templates/integration-handler/integration-handler.declared.ts.tpl +3 -3
- package/templates/integration-handler/integration-handler.spec.ts.tpl +2 -2
- package/templates/integration-handler/integration-handler.ts.tpl +1 -1
- package/templates/integration-handler/wiring.manual.tpl +3 -3
- package/templates/integration-handler/wiring.tsyringe.tpl +2 -2
- package/templates/job/job.declared.ts.tpl +3 -3
- package/templates/job/job.spec.buses.ts.tpl +2 -2
- package/templates/job/job.spec.tsyringe.ts.tpl +2 -2
- package/templates/job/job.ts.tpl +1 -1
- package/templates/job/wiring.manual.tpl +1 -1
- package/templates/job/wiring.tsyringe.tpl +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/policy/policy.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.declared.ts.tpl +1 -1
- package/templates/policy/policy.spec.ts.tpl +1 -1
- package/templates/policy/policy.ts.tpl +1 -1
- package/templates/policy/registration.tpl +1 -1
- package/templates/port/fake.ts.tpl +1 -1
- package/templates/projection/projection.spec.ts.tpl +17 -0
- package/templates/projection/projection.ts.tpl +11 -0
- package/templates/query/handler.declared.ts.tpl +4 -4
- package/templates/query/handler.spec.buses.ts.tpl +5 -5
- package/templates/query/handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/handler.ts.tpl +3 -3
- package/templates/query/query.ts.tpl +1 -1
- package/templates/query/reader.fake.ts.tpl +2 -2
- package/templates/query/reader.in-memory.ts.tpl +4 -4
- package/templates/query/reader.port.ts.tpl +2 -2
- package/templates/query/search.handler.declared.ts.tpl +6 -6
- package/templates/query/search.handler.spec.buses.ts.tpl +5 -5
- package/templates/query/search.handler.spec.tsyringe.ts.tpl +6 -6
- package/templates/query/search.handler.ts.tpl +4 -4
- package/templates/query/search.query.ts.tpl +1 -1
- package/templates/query/search.reader.fake.ts.tpl +2 -2
- package/templates/query/search.reader.in-memory.ts.tpl +3 -3
- package/templates/query/search.reader.port.ts.tpl +1 -1
- package/templates/query/search.reader.spec.ts.tpl +2 -2
- package/templates/query/search.wiring.manual.tpl +3 -3
- package/templates/query/search.wiring.tsyringe.tpl +4 -4
- package/templates/query/wiring.manual.tpl +3 -3
- package/templates/query/wiring.tsyringe.tpl +4 -4
- package/templates/repository/contract.spec.ts.tpl +5 -5
- package/templates/repository/drizzle/mapper.ts.tpl +2 -2
- package/templates/repository/drizzle/repository.ts.tpl +9 -17
- package/templates/repository/drizzle/schema-export.tpl +1 -1
- package/templates/repository/fake.ts.tpl +2 -2
- package/templates/repository/knex/mapper.ts.tpl +2 -2
- package/templates/repository/knex/repository.ts.tpl +10 -30
- package/templates/repository/knex/schema-export.tpl +1 -1
- package/templates/repository/knex/tables.ts.tpl +1 -1
- package/templates/repository/none/repository.ts.tpl +3 -3
- package/templates/repository/prisma/mapper.ts.tpl +2 -2
- package/templates/repository/prisma/repository.ts.tpl +6 -9
- package/templates/repository/repository.ts.tpl +1 -1
- package/templates/repository/typeorm/mapper.ts.tpl +2 -2
- package/templates/repository/typeorm/repository.ts.tpl +9 -12
- package/templates/repository/typeorm/schema-export.tpl +1 -1
- package/templates/repository/typeorm/table.tpl +1 -1
- package/templates/repository/wiring.manual.tpl +1 -1
- package/templates/repository/wiring.tsyringe.tpl +2 -2
- package/templates/route/route.class-validator.ts.tpl +1 -1
- package/templates/route/route.none.ts.tpl +1 -1
- package/templates/route/route.search.ts.tpl +2 -2
- package/templates/route/route.spec.ts.tpl +1 -1
- package/templates/route/route.standard-schema.ts.tpl +1 -1
- package/templates/route/route.zod.ts.tpl +1 -1
- package/templates/route/routes.on-tsyringe.tpl +1 -1
- package/templates/route/wiring.manual.tpl +1 -1
- package/templates/service/main.ts.tpl +11 -11
- package/templates/value-object/value-object.spec.ts.tpl +1 -1
- package/templates/value-object/value-object.ts.tpl +5 -0
- package/templates/worker/main.ts.tpl +9 -9
- package/dist/alias/platform-alias.d.ts +0 -4
- package/dist/alias/platform-alias.d.ts.map +0 -1
- package/dist/alias/platform-alias.js +0 -7
- package/dist/alias/platform-alias.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-description.js","sourceRoot":"","sources":["../../src/describe/format-description.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-description.js","sourceRoot":"","sources":["../../src/describe/format-description.ts"],"names":[],"mappings":"AAWA,uGAAuG;AACvG,MAAM,UAAU,iBAAiB,CAAC,OAA2B;IAC3D,MAAM,MAAM,GAAsD;QAChE,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;QAClC,CAAC,eAAe,EAAE,OAAO,CAAC,YAAY,CAAC;QACvC,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC;QACpC,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAClH,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC,iBAAiB,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAClE,CAAC,kBAAkB,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QACrE,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,QAAQ,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACjG,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,aAAa;YACb,OAAO,CAAC,WAAW,CAAC,GAAG,CAC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-sources.js';
|
|
3
|
+
/**
|
|
4
|
+
* The refusals of a context: one row per static factory of an error class, with its code and
|
|
5
|
+
* the facts it exposes, and one row per class that carries its code itself, as 0.2 wrote them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readErrors({ ws, directory }: ContextSources): ErrorFact[];
|
|
8
|
+
//# sourceMappingURL=read-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-errors.d.ts","sourceRoot":"","sources":["../../src/describe/read-errors.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,SAAS,EAAE,CAUzE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { errorCodes } from '../check/errors/error-codes.js';
|
|
2
|
+
import { wholeLiteral } from '../check/declarations/whole-literal.js';
|
|
3
|
+
import { scan } from '../check/scan/scan.js';
|
|
4
|
+
import { callArguments } from '../check/text/call-arguments.js';
|
|
5
|
+
import { matchingBracket } from '../check/text/matching-bracket.js';
|
|
6
|
+
import { staticMethods } from '../generate/errors/static-methods.js';
|
|
7
|
+
const FOLDER = 'domain/errors';
|
|
8
|
+
const CLASS = /(?<![\w$.])class\s+([A-Za-z_$][\w$]*)[^{]*\{/g;
|
|
9
|
+
const EXPOSING = /\.\s*exposing\s*\(/g;
|
|
10
|
+
/**
|
|
11
|
+
* The refusals of a context: one row per static factory of an error class, with its code and
|
|
12
|
+
* the facts it exposes, and one row per class that carries its code itself, as 0.2 wrote them.
|
|
13
|
+
*/
|
|
14
|
+
export function readErrors({ ws, directory }) {
|
|
15
|
+
return ws
|
|
16
|
+
.list(`${directory}/${FOLDER}`)
|
|
17
|
+
.filter((name) => name.endsWith('.error.ts'))
|
|
18
|
+
.flatMap((name) => {
|
|
19
|
+
const file = `${directory}/${FOLDER}/${name}`;
|
|
20
|
+
const scanned = scan(ws.read(file) ?? '');
|
|
21
|
+
return [...scanned.code.matchAll(CLASS)].flatMap((declared) => errorsOf(scanned, declared, file));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function errorsOf(scanned, declared, file) {
|
|
25
|
+
const errorClass = declared[1] ?? '';
|
|
26
|
+
const body = { open: declared.index + declared[0].length - 1, close: 0 };
|
|
27
|
+
const within = { ...body, close: matchingBracket(scanned.code, body.open) };
|
|
28
|
+
const built = staticMethods(scanned.code, within).flatMap((method) => {
|
|
29
|
+
const [code] = codesIn(scanned, method);
|
|
30
|
+
return code === undefined
|
|
31
|
+
? []
|
|
32
|
+
: [{ errorClass, refusal: method.name, code, exposes: exposedBy(scanned, method), file }];
|
|
33
|
+
});
|
|
34
|
+
const own = errorCodes(scanned)
|
|
35
|
+
.filter(({ code }) => !built.some((fact) => fact.code === code))
|
|
36
|
+
.map(({ code }) => ({ errorClass, refusal: '', code, exposes: [], file }));
|
|
37
|
+
return [...built, ...(built.length === 0 ? own : [])];
|
|
38
|
+
}
|
|
39
|
+
function codesIn(scanned, method) {
|
|
40
|
+
const starts = scanned.lineAt(method.open);
|
|
41
|
+
const ends = scanned.lineAt(method.end);
|
|
42
|
+
return errorCodes(scanned)
|
|
43
|
+
.filter(({ line }) => line >= starts && line <= ends)
|
|
44
|
+
.map(({ code }) => code);
|
|
45
|
+
}
|
|
46
|
+
function exposedBy(scanned, method) {
|
|
47
|
+
return [...scanned.code.matchAll(EXPOSING)]
|
|
48
|
+
.filter((match) => match.index > method.open && match.index < method.end)
|
|
49
|
+
.flatMap((match) => callArguments(scanned.code, match.index + match[0].length - 1))
|
|
50
|
+
.flatMap((argument) => wholeLiteral(scanned, argument) ?? []);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=read-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read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KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,OAAO,CAAC,OAAa,EAAE,MAAoB;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAExC,OAAO,UAAU,CAAC,OAAO,CAAC;SACvB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,CAAC;SACpD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,SAAS,CAAC,OAAa,EAAE,MAAoB;IACpD,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACxC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;SACxE,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAClF,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProjectionFact } from './context-description.js';
|
|
2
|
+
import type { ContextSources } from './context-sources.js';
|
|
3
|
+
/** The projectors of a context, one per `*.projection.ts` file, with the events each one applies. */
|
|
4
|
+
export declare function readProjections({ ws, directory }: ContextSources): ProjectionFact[];
|
|
5
|
+
//# sourceMappingURL=read-projections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-projections.d.ts","sourceRoot":"","sources":["../../src/describe/read-projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK3D,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,cAAc,EAAE,CAenF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const FOLDER = 'application/projections';
|
|
2
|
+
const SUFFIX = '.projection.ts';
|
|
3
|
+
/** The projectors of a context, one per `*.projection.ts` file, with the events each one applies. */
|
|
4
|
+
export function readProjections({ ws, directory }) {
|
|
5
|
+
return ws
|
|
6
|
+
.list(`${directory}/${FOLDER}`)
|
|
7
|
+
.filter((file) => file.endsWith(SUFFIX))
|
|
8
|
+
.map((file) => {
|
|
9
|
+
const path = `${directory}/${FOLDER}/${file}`;
|
|
10
|
+
const text = ws.read(path) ?? '';
|
|
11
|
+
return {
|
|
12
|
+
name: /@Projection\(\s*'([^']+)'/.exec(text)?.[1] ?? '',
|
|
13
|
+
projector: /export class ([\w$]+)/.exec(text)?.[1] ?? '',
|
|
14
|
+
applies: [...text.matchAll(/@On\(\s*([\w$.]+)/g)].map(([, event = '']) => event),
|
|
15
|
+
file: path,
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=read-projections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-projections.js","sourceRoot":"","sources":["../../src/describe/read-projections.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEhC,qGAAqG;AACrG,MAAM,UAAU,eAAe,CAAC,EAAE,EAAE,EAAE,SAAS,EAAkB;IAC/D,OAAO,EAAE;SACN,IAAI,CAAC,GAAG,SAAS,IAAI,MAAM,EAAE,CAAC;SAC9B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACvC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,IAAI,GAAG,GAAG,SAAS,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAEjC,OAAO;YACL,IAAI,EAAE,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;YACvD,SAAS,EAAE,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;YACxD,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;YAChF,IAAI,EAAE,IAAI;SACX,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -28,6 +28,15 @@ function tablesOf(context) {
|
|
|
28
28
|
rows: context.routes.map(routeRow),
|
|
29
29
|
},
|
|
30
30
|
...eventTables(context),
|
|
31
|
+
{
|
|
32
|
+
title: 'Projections',
|
|
33
|
+
columns: ['Projection', 'Class', 'Applies'],
|
|
34
|
+
rows: context.projections.map((projection) => [
|
|
35
|
+
code(projection.name),
|
|
36
|
+
code(projection.projector),
|
|
37
|
+
codes(projection.applies),
|
|
38
|
+
]),
|
|
39
|
+
},
|
|
31
40
|
...adapterTables(context),
|
|
32
41
|
];
|
|
33
42
|
}
|
|
@@ -55,7 +64,7 @@ function eventTables(context) {
|
|
|
55
64
|
},
|
|
56
65
|
];
|
|
57
66
|
}
|
|
58
|
-
/** The tables of what the context binds: its ports, its policies and its gateways. */
|
|
67
|
+
/** The tables of what the context binds and answers: its ports, its policies, its errors and its gateways. */
|
|
59
68
|
function adapterTables(context) {
|
|
60
69
|
return [
|
|
61
70
|
{
|
|
@@ -72,6 +81,7 @@ function adapterTables(context) {
|
|
|
72
81
|
columns: ['Policy', 'Permission'],
|
|
73
82
|
rows: context.policies.map((policy) => [code(policy.name), code(policy.permission)]),
|
|
74
83
|
},
|
|
84
|
+
errorTable(context),
|
|
75
85
|
{
|
|
76
86
|
title: 'Gateways',
|
|
77
87
|
columns: ['Gateway', 'Upstream', 'Adapters'],
|
|
@@ -83,6 +93,18 @@ function adapterTables(context) {
|
|
|
83
93
|
},
|
|
84
94
|
];
|
|
85
95
|
}
|
|
96
|
+
function errorTable(context) {
|
|
97
|
+
return {
|
|
98
|
+
title: 'Errors',
|
|
99
|
+
columns: ['Error class', 'Refusal', 'Code', 'Exposed facts'],
|
|
100
|
+
rows: context.errors.map((error) => [
|
|
101
|
+
code(error.errorClass),
|
|
102
|
+
error.refusal === '' ? 'the class itself' : code(error.refusal),
|
|
103
|
+
code(error.code),
|
|
104
|
+
error.exposes.length === 0 ? 'none' : codes(error.exposes),
|
|
105
|
+
]),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
86
108
|
function routeRow(route) {
|
|
87
109
|
const request = route.request
|
|
88
110
|
.map(({ part, schema }) => (schema === part ? part : `${part}: \`${schema}\``))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-lines.js","sourceRoot":"","sources":["../../src/describe/reference-lines.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,6HAA6H;AAC7H,MAAM,UAAU,cAAc,CAAC,OAA2B;IACxD,MAAM,IAAI,GAAG,CAAC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C;AAED,SAAS,KAAK,CAAC,MAAyB;IACtC,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rewrites the generated file of every declared context of the project around `start` from
|
|
3
|
+
* its role files and its constructor signatures, and tells what it rewrote. It is what the
|
|
4
|
+
* `dev` script loads before the application, on every restart of the watcher: a dependency
|
|
5
|
+
* added to a constructor is injected on the reload that follows the save. A failure is told
|
|
6
|
+
* and never thrown: the composition root then refuses a class left without a list, by name.
|
|
7
|
+
*/
|
|
8
|
+
export declare function refreshDeclarations(start: string, tell: (line: string) => void): readonly string[];
|
|
9
|
+
//# sourceMappingURL=refresh-declarations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-declarations.d.ts","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,MAAM,EAAE,CAqBlG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { findRoot } from '../commands/find-root.js';
|
|
2
|
+
import { readConfig } from '../config/index.js';
|
|
3
|
+
import { refreshBarrels } from '../generate/refresh-barrels.js';
|
|
4
|
+
import { Workspace } from '../workspace/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Rewrites the generated file of every declared context of the project around `start` from
|
|
7
|
+
* its role files and its constructor signatures, and tells what it rewrote. It is what the
|
|
8
|
+
* `dev` script loads before the application, on every restart of the watcher: a dependency
|
|
9
|
+
* added to a constructor is injected on the reload that follows the save. A failure is told
|
|
10
|
+
* and never thrown: the composition root then refuses a class left without a list, by name.
|
|
11
|
+
*/
|
|
12
|
+
export function refreshDeclarations(start, tell) {
|
|
13
|
+
try {
|
|
14
|
+
const root = findRoot(start);
|
|
15
|
+
const ws = new Workspace(root, false);
|
|
16
|
+
refreshBarrels(ws, readConfig(root).config);
|
|
17
|
+
const { created, updated, notes } = ws.commit(false);
|
|
18
|
+
const rewritten = [...created, ...updated];
|
|
19
|
+
rewritten.forEach((file) => tell(`ddd-ts-kit: rewrote ${file} from the role files and their constructors`));
|
|
20
|
+
notes.forEach((note) => tell(`ddd-ts-kit: ${note}`));
|
|
21
|
+
return rewritten;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
tell(`ddd-ts-kit: the generated declarations were not refreshed: ${error instanceof Error ? error.message : String(error)}`);
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=refresh-declarations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-declarations.js","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,IAA4B;IAC7E,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEtC,cAAc,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;QAE5C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;QAE3C,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,uBAAuB,IAAI,6CAA6C,CAAC,CAAC,CAAC;QAC5G,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,CAAC;QAErD,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CACF,8DAA8D,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACvH,CAAC;QAEF,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { specifierOf } from '../alias/index.js';
|
|
2
2
|
import { CliError } from '../cli-error.js';
|
|
3
3
|
import { fitStatement } from '../layout/index.js';
|
|
4
4
|
import { declarePermission } from './declare-permission.js';
|
|
@@ -51,8 +51,8 @@ function publicAccess(useCase) {
|
|
|
51
51
|
}
|
|
52
52
|
function protectedAccess(scope, useCase, permission) {
|
|
53
53
|
const set = `${scope.context.camel}Permissions`;
|
|
54
|
-
const file =
|
|
55
|
-
const permissions = `import { ${set} } from '${
|
|
54
|
+
const file = `${scope.config.contextsDir}/${scope.context.kebab}/${permissionsFile(scope.context)}`;
|
|
55
|
+
const permissions = `import { ${set} } from '${specifierOf(scope.config, file)}';`;
|
|
56
56
|
const requirement = `${set}['${permission}']${resourceOption(scope)}`;
|
|
57
57
|
return {
|
|
58
58
|
protected: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-vars.js","sourceRoot":"","sources":["../../src/generate/access-vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3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C,IAAI,CAAC;IACnF,MAAM,WAAW,GAAG,GAAG,GAAG,KAAK,UAAU,KAAK,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IAEtE,OAAO;QACL,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,KAAK;QACb,UAAU;QACV,WAAW,EAAE,aAAa,WAAW,GAAG;QACxC,YAAY,EAAE,8CAA8C;QAC5D,iBAAiB,EAAE,YAAY,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI;QACrF,iBAAiB,EAAE,WAAW;QAC9B,MAAM,EAAE,QAAQ;QAChB,WAAW;QACX,wBAAwB,EAAE,WAAW;QACrC,SAAS,EAAE,UAAU;QACrB,UAAU,EAAE,YAAY,CAAC,aAAa,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,SAAS,EAAE,iBAAiB;QAC5B,iBAAiB,EAAE,0EAA0E;KAC9F,CAAC;AACJ,CAAC;AAED,4GAA4G;AAC5G,SAAS,cAAc,CAAC,KAAY;IAClC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QACzC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,gDAAgD,KAAK,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FactoryAddition {
|
|
2
|
+
readonly className: string;
|
|
3
|
+
readonly name: string;
|
|
4
|
+
/** The method, indented as a member, without the blank lines around it. */
|
|
5
|
+
readonly text: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The source of an error class with one more static factory, after the last one it has, so
|
|
9
|
+
* that the factories stay together above the other members. Undefined when the class is not
|
|
10
|
+
* found; the source itself when a static method of that name is already there.
|
|
11
|
+
*/
|
|
12
|
+
export declare function addFactory(source: string, addition: FactoryAddition): string | undefined;
|
|
13
|
+
//# sourceMappingURL=add-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-factory.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/add-factory.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAqBxF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { scan } from '../../check/scan/scan.js';
|
|
2
|
+
import { classBody } from './class-body.js';
|
|
3
|
+
import { staticMethods } from './static-methods.js';
|
|
4
|
+
/**
|
|
5
|
+
* The source of an error class with one more static factory, after the last one it has, so
|
|
6
|
+
* that the factories stay together above the other members. Undefined when the class is not
|
|
7
|
+
* found; the source itself when a static method of that name is already there.
|
|
8
|
+
*/
|
|
9
|
+
export function addFactory(source, addition) {
|
|
10
|
+
const scanned = scan(source);
|
|
11
|
+
const body = classBody(scanned, addition.className);
|
|
12
|
+
if (body === undefined) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
const methods = staticMethods(scanned.code, body);
|
|
16
|
+
if (methods.some((method) => method.name === addition.name)) {
|
|
17
|
+
return source;
|
|
18
|
+
}
|
|
19
|
+
const last = methods.at(-1);
|
|
20
|
+
if (last === undefined) {
|
|
21
|
+
return `${source.slice(0, body.open + 1)}\n${addition.text}\n${afterOpening(source, body)}`;
|
|
22
|
+
}
|
|
23
|
+
return `${source.slice(0, last.end + 1)}\n\n${addition.text}${source.slice(last.end + 1)}`;
|
|
24
|
+
}
|
|
25
|
+
/** An empty class closes on the line of its opening brace; one with members keeps a blank line before the first. */
|
|
26
|
+
function afterOpening(source, body) {
|
|
27
|
+
const rest = source.slice(body.open + 1);
|
|
28
|
+
return source.slice(body.open + 1, body.close).trim() === '' ? rest.trimStart() : rest;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=add-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-factory.js","sourceRoot":"","sources":["../../../src/generate/errors/add-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASpD;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,QAAyB;IAClE,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAEpD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAElD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;IAC9F,CAAC;IAED,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;AAC7F,CAAC;AAED,oHAAoH;AACpH,SAAS,YAAY,CAAC,MAAc,EAAE,IAAe;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAEzC,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spec of an error class with one more case at the end of its first `describe`. Undefined
|
|
3
|
+
* when the spec has no `describe`; the source itself when it already calls the factory.
|
|
4
|
+
*/
|
|
5
|
+
export declare function addSpecCase(source: string, factoryCall: string, text: string): string | undefined;
|
|
6
|
+
//# sourceMappingURL=add-spec-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-spec-case.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/add-spec-case.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAuBjG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { scan } from '../../check/scan/scan.js';
|
|
2
|
+
import { matchingBracket } from '../../check/text/matching-bracket.js';
|
|
3
|
+
const DESCRIBE = /(?<![\w$.])describe\s*\(/;
|
|
4
|
+
/**
|
|
5
|
+
* The spec of an error class with one more case at the end of its first `describe`. Undefined
|
|
6
|
+
* when the spec has no `describe`; the source itself when it already calls the factory.
|
|
7
|
+
*/
|
|
8
|
+
export function addSpecCase(source, factoryCall, text) {
|
|
9
|
+
if (source.includes(factoryCall)) {
|
|
10
|
+
return source;
|
|
11
|
+
}
|
|
12
|
+
const { code } = scan(source);
|
|
13
|
+
const described = DESCRIBE.exec(code);
|
|
14
|
+
if (described === null) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const callback = code.indexOf('{', described.index);
|
|
18
|
+
const close = callback === -1 ? -1 : matchingBracket(code, callback);
|
|
19
|
+
if (close <= callback) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const before = source.slice(0, close).trimEnd();
|
|
23
|
+
// The first case of an empty block follows its opening line; the others are a blank line apart.
|
|
24
|
+
return `${before}${before.endsWith('{') ? '\n' : '\n\n'}${text}\n${source.slice(close)}`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=add-spec-case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-spec-case.js","sourceRoot":"","sources":["../../../src/generate/errors/add-spec-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,WAAmB,EAAE,IAAY;IAC3E,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEtC,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAErE,IAAI,KAAK,IAAI,QAAQ,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IAEhD,gGAAgG;IAChG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Scan } from '../../check/scan/scan.js';
|
|
2
|
+
/** Where the body of a class opens and closes in its source, braces included. */
|
|
3
|
+
export interface ClassBody {
|
|
4
|
+
readonly open: number;
|
|
5
|
+
readonly close: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function classBody(scan: Scan, className: string): ClassBody | undefined;
|
|
8
|
+
//# sourceMappingURL=class-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-body.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/class-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIrD,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAU9E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { escapeRegExp } from '../../check/text/escape-reg-exp.js';
|
|
2
|
+
import { matchingBracket } from '../../check/text/matching-bracket.js';
|
|
3
|
+
export function classBody(scan, className) {
|
|
4
|
+
const declared = new RegExp(`(?<![\\w$.])class\\s+${escapeRegExp(className)}(?![\\w$])`).exec(scan.code);
|
|
5
|
+
if (declared === null) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
const open = scan.code.indexOf('{', declared.index);
|
|
9
|
+
return open === -1 ? undefined : { open, close: matchingBracket(scan.code, open) };
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=class-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-body.js","sourceRoot":"","sources":["../../../src/generate/errors/class-body.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAQvE,MAAM,UAAU,SAAS,CAAC,IAAU,EAAE,SAAiB;IACrD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,wBAAwB,YAAY,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzG,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes-of-context.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/codes-of-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAehE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { errorCodes } from '../../check/errors/error-codes.js';
|
|
2
|
+
import { scan } from '../../check/scan/scan.js';
|
|
3
|
+
/** Where each code of the error files of a context is set, as `file:line`. */
|
|
4
|
+
export function codesOfContext(scope) {
|
|
5
|
+
const directory = `${scope.dir}/domain/errors`;
|
|
6
|
+
const taken = new Map();
|
|
7
|
+
for (const name of scope.ws.list(directory).filter((file) => file.endsWith('.error.ts'))) {
|
|
8
|
+
const file = `${directory}/${name}`;
|
|
9
|
+
for (const { code, line } of errorCodes(scan(scope.ws.read(file) ?? ''))) {
|
|
10
|
+
if (!taken.has(code)) {
|
|
11
|
+
taken.set(code, `${file}:${line}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return taken;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=codes-of-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes-of-context.js","sourceRoot":"","sources":["../../../src/generate/errors/codes-of-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAGhD,8EAA8E;AAC9E,MAAM,UAAU,cAAc,CAAC,KAAY;IACzC,MAAM,SAAS,GAAG,GAAG,KAAK,CAAC,GAAG,gBAAgB,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,GAAG,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC;QAEpC,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YACzE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Name } from '../../naming/index.js';
|
|
2
|
+
interface Naming {
|
|
3
|
+
readonly concept: Name;
|
|
4
|
+
readonly refusal: Name;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The code a factory sets: its name in constant case, with the name of the concept before it
|
|
8
|
+
* when the name alone is one word or a code of the kit (`AppointmentError.notFound` sets
|
|
9
|
+
* `APPOINTMENT_NOT_FOUND`). A code given with `--code` is one of the forms `errors/factory-name` accepts.
|
|
10
|
+
*/
|
|
11
|
+
export declare function refusalCode({ concept, refusal }: Naming, asked: string | undefined): string;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=refusal-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal-code.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/refusal-code.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,UAAU,MAAM;IACd,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAgB3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KIT_ERROR_CODES } from '../../check/errors/kit-error-codes.js';
|
|
2
|
+
import { CliError } from '../../cli-error.js';
|
|
3
|
+
/**
|
|
4
|
+
* The code a factory sets: its name in constant case, with the name of the concept before it
|
|
5
|
+
* when the name alone is one word or a code of the kit (`AppointmentError.notFound` sets
|
|
6
|
+
* `APPOINTMENT_NOT_FOUND`). A code given with `--code` is one of the forms `errors/factory-name` accepts.
|
|
7
|
+
*/
|
|
8
|
+
export function refusalCode({ concept, refusal }, asked) {
|
|
9
|
+
const alone = refusal.constant;
|
|
10
|
+
const accepted = [alone, `${concept.constant}_${alone}`, `${alone}_${concept.constant}`];
|
|
11
|
+
if (asked === undefined) {
|
|
12
|
+
return alone.includes('_') && !KIT_ERROR_CODES.includes(alone) ? alone : `${concept.constant}_${alone}`;
|
|
13
|
+
}
|
|
14
|
+
if (!accepted.includes(asked)) {
|
|
15
|
+
throw new CliError(`The code "${asked}" does not say what ${concept.pascal}Error.${refusal.camel} says.`, `Use one of: ${accepted.join(', ')}; or name the refusal after the code (rule errors/factory-name).`);
|
|
16
|
+
}
|
|
17
|
+
return asked;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=refusal-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal-code.js","sourceRoot":"","sources":["../../../src/generate/errors/refusal-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAU,EAAE,KAAyB;IACjF,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,EAAE,EAAE,GAAG,KAAK,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,EAAE,CAAC;IAC1G,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,QAAQ,CAChB,aAAa,KAAK,uBAAuB,OAAO,CAAC,MAAM,SAAS,OAAO,CAAC,KAAK,QAAQ,EACrF,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,kEAAkE,CACrG,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Name } from '../../naming/index.js';
|
|
2
|
+
/** The name of a factory, from `slotTaken`, `slot-taken` or "slot taken": a phrase of the business, never `create` or `error1`. */
|
|
3
|
+
export declare function refusalName(input: string): Name;
|
|
4
|
+
//# sourceMappingURL=refusal-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal-name.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/refusal-name.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG1D,mIAAmI;AACnI,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAkB/C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CliError } from '../../cli-error.js';
|
|
2
|
+
import { toName } from '../../naming/index.js';
|
|
3
|
+
import { VAGUE_REFUSAL_NAMES } from './vague-refusal-names.js';
|
|
4
|
+
/** The name of a factory, from `slotTaken`, `slot-taken` or "slot taken": a phrase of the business, never `create` or `error1`. */
|
|
5
|
+
export function refusalName(input) {
|
|
6
|
+
const name = toName(input);
|
|
7
|
+
if (name.camel === '' || !/^[A-Za-z][A-Za-z -]*$/.test(input.trim())) {
|
|
8
|
+
throw new CliError(`"${input}" is not the name of a refusal.`, 'Name it as a domain expert says it, in letters only: slotTaken, alreadyConfirmed, notFound.');
|
|
9
|
+
}
|
|
10
|
+
if (VAGUE_REFUSAL_NAMES.includes(name.camel.toLowerCase())) {
|
|
11
|
+
throw new CliError(`"${name.camel}" says that an error is built, not which rule refused.`, 'Name the refusal as a domain expert says it: slotTaken, alreadyConfirmed, notFound (rule errors/factory-name).');
|
|
12
|
+
}
|
|
13
|
+
return name;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=refusal-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal-name.js","sourceRoot":"","sources":["../../../src/generate/errors/refusal-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAa,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,mIAAmI;AACnI,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3B,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,QAAQ,CAChB,IAAI,KAAK,iCAAiC,EAC1C,6FAA6F,CAC9F,CAAC;IACJ,CAAC;IAED,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,QAAQ,CAChB,IAAI,IAAI,CAAC,KAAK,wDAAwD,EACtE,gHAAgH,CACjH,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ClassBody } from './class-body.js';
|
|
2
|
+
/** A static method of a class: its name, and where its block opens and closes in the code. */
|
|
3
|
+
export interface StaticMethod {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly open: number;
|
|
6
|
+
readonly end: number;
|
|
7
|
+
}
|
|
8
|
+
/** The public static methods written in the body of a class, in order. */
|
|
9
|
+
export declare function staticMethods(code: string, body: ClassBody): StaticMethod[];
|
|
10
|
+
//# sourceMappingURL=static-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-methods.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/static-methods.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,8FAA8F;AAC9F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,YAAY,EAAE,CAS3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { matchingBracket } from '../../check/text/matching-bracket.js';
|
|
2
|
+
const STATIC_METHOD = /^[ \t]*(?:public\s+)?static\s+(?:async\s+)?([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\(/gm;
|
|
3
|
+
/** The public static methods written in the body of a class, in order. */
|
|
4
|
+
export function staticMethods(code, body) {
|
|
5
|
+
return [...code.matchAll(STATIC_METHOD)]
|
|
6
|
+
.filter((match) => match.index > body.open && match.index < body.close)
|
|
7
|
+
.flatMap((match) => {
|
|
8
|
+
const parameters = match.index + match[0].length - 1;
|
|
9
|
+
const open = code.indexOf('{', matchingBracket(code, parameters));
|
|
10
|
+
return open === -1 ? [] : [{ name: match[1] ?? '', open, end: matchingBracket(code, open) }];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=static-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-methods.js","sourceRoot":"","sources":["../../../src/generate/errors/static-methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,aAAa,GAAG,kFAAkF,CAAC;AASzG,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,IAAe;IACzD,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;SACrC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SACtE,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACjB,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;QAElE,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vague-refusal-names.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/vague-refusal-names.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAYhD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Names that say an error is being made, never which rule of the business refused: `errors/factory-name` refuses them. */
|
|
2
|
+
export const VAGUE_REFUSAL_NAMES = [
|
|
3
|
+
'create',
|
|
4
|
+
'make',
|
|
5
|
+
'of',
|
|
6
|
+
'from',
|
|
7
|
+
'build',
|
|
8
|
+
'new',
|
|
9
|
+
'error',
|
|
10
|
+
'failure',
|
|
11
|
+
'fail',
|
|
12
|
+
'refusal',
|
|
13
|
+
'refuse',
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=vague-refusal-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vague-refusal-names.js","sourceRoot":"","sources":["../../../src/generate/errors/vague-refusal-names.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,QAAQ;IACR,MAAM;IACN,IAAI;IACJ,MAAM;IACN,OAAO;IACP,KAAK;IACL,OAAO;IACP,SAAS;IACT,MAAM;IACN,SAAS;IACT,QAAQ;CACT,CAAC"}
|