laymos 0.0.1 → 0.0.2
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 +137 -710
- package/bin/laymos.mjs +2 -0
- package/dist/architecture/analyze-project/analyze-project.d.ts +9 -0
- package/dist/architecture/analyze-project/analyze-project.d.ts.map +1 -0
- package/dist/architecture/analyze-project/analyze-project.js +47 -0
- package/dist/architecture/analyze-project/index.d.ts +3 -0
- package/dist/architecture/analyze-project/index.d.ts.map +1 -0
- package/dist/architecture/analyze-project/index.js +1 -0
- package/dist/architecture/build-report/build-report.d.ts +7 -0
- package/dist/architecture/build-report/build-report.d.ts.map +1 -0
- package/dist/{engine/4-emit/emit.js → architecture/build-report/build-report.js} +12 -9
- package/dist/architecture/build-report/index.d.ts +2 -0
- package/dist/architecture/build-report/index.d.ts.map +1 -0
- package/dist/architecture/build-report/index.js +1 -0
- package/dist/architecture/errors.d.ts +11 -0
- package/dist/architecture/errors.d.ts.map +1 -0
- package/dist/{engine → architecture}/errors.js +0 -2
- package/dist/{engine/1-extract/extract.d.ts → architecture/extract-dependencies/extract-dependencies.d.ts} +1 -1
- package/dist/architecture/extract-dependencies/extract-dependencies.d.ts.map +1 -0
- package/dist/{engine/1-extract/extract.js → architecture/extract-dependencies/extract-dependencies.js} +13 -11
- package/dist/architecture/extract-dependencies/index.d.ts +3 -0
- package/dist/architecture/extract-dependencies/index.d.ts.map +1 -0
- package/dist/architecture/extract-dependencies/index.js +1 -0
- package/dist/architecture/resolve-architecture/index.d.ts +3 -0
- package/dist/architecture/resolve-architecture/index.d.ts.map +1 -0
- package/dist/architecture/resolve-architecture/index.js +1 -0
- package/dist/{engine/2-resolve/resolve.d.ts → architecture/resolve-architecture/resolve-architecture.d.ts} +2 -2
- package/dist/architecture/resolve-architecture/resolve-architecture.d.ts.map +1 -0
- package/dist/{engine/2-resolve/resolve.js → architecture/resolve-architecture/resolve-architecture.js} +1 -1
- package/dist/architecture/validate-rules/index.d.ts +3 -0
- package/dist/architecture/validate-rules/index.d.ts.map +1 -0
- package/dist/architecture/validate-rules/index.js +1 -0
- package/dist/{engine/3-evaluate/evaluate.d.ts → architecture/validate-rules/validate-rules.d.ts} +4 -4
- package/dist/architecture/validate-rules/validate-rules.d.ts.map +1 -0
- package/dist/{engine/3-evaluate/evaluate.js → architecture/validate-rules/validate-rules.js} +2 -2
- package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts +109 -0
- package/dist/architecture-analysis-schema/architecture-analysis-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/architecture-analysis-schema.js +10 -0
- package/dist/architecture-analysis-schema/index.d.ts +7 -0
- package/dist/architecture-analysis-schema/index.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/index.js +3 -0
- package/dist/architecture-analysis-schema/layer-analysis-schema.d.ts +27 -0
- package/dist/architecture-analysis-schema/layer-analysis-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/layer-analysis-schema.js +18 -0
- package/dist/architecture-analysis-schema/module-analysis-schema.d.ts +150 -0
- package/dist/architecture-analysis-schema/module-analysis-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/module-analysis-schema.js +96 -0
- package/dist/architecture-analysis-schema/module-source-schema.d.ts +16 -0
- package/dist/architecture-analysis-schema/module-source-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/module-source-schema.js +10 -0
- package/dist/architecture-analysis-schema/project-config-schema.d.ts +51 -0
- package/dist/architecture-analysis-schema/project-config-schema.d.ts.map +1 -0
- package/dist/architecture-analysis-schema/project-config-schema.js +110 -0
- package/dist/change-set-schema/change-set-schema.d.ts +55 -0
- package/dist/change-set-schema/change-set-schema.d.ts.map +1 -0
- package/dist/change-set-schema/change-set-schema.js +43 -0
- package/dist/change-set-schema/index.d.ts +3 -0
- package/dist/change-set-schema/index.d.ts.map +1 -0
- package/dist/change-set-schema/index.js +2 -0
- package/dist/cli/cli.js +6 -1
- package/dist/cli/deps/dependency-tree.d.ts +3 -0
- package/dist/cli/deps/dependency-tree.d.ts.map +1 -0
- package/dist/cli/deps/dependency-tree.js +39 -0
- package/dist/cli/deps/deps.d.ts +7 -0
- package/dist/cli/deps/deps.d.ts.map +1 -0
- package/dist/cli/deps/deps.js +26 -0
- package/dist/cli/deps/index.d.ts +2 -0
- package/dist/cli/deps/index.d.ts.map +1 -0
- package/dist/cli/deps/index.js +2 -0
- package/dist/cli/errors.d.ts +2 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +34 -0
- package/dist/cli/inspect/file/file.d.ts +8 -0
- package/dist/cli/inspect/file/file.d.ts.map +1 -0
- package/dist/cli/inspect/file/file.js +16 -0
- package/dist/cli/inspect/file/index.d.ts +2 -0
- package/dist/cli/inspect/file/index.d.ts.map +1 -0
- package/dist/cli/inspect/file/index.js +1 -0
- package/dist/cli/inspect/file/report.d.ts +3 -0
- package/dist/cli/inspect/file/report.d.ts.map +1 -0
- package/dist/cli/inspect/file/report.js +26 -0
- package/dist/cli/inspect/index.d.ts +2 -0
- package/dist/cli/inspect/index.d.ts.map +1 -0
- package/dist/cli/inspect/index.js +1 -0
- package/dist/cli/inspect/inspect.d.ts +4 -0
- package/dist/cli/inspect/inspect.d.ts.map +1 -0
- package/dist/cli/inspect/inspect.js +14 -0
- package/dist/cli/inspect/json.d.ts +4 -0
- package/dist/cli/inspect/json.d.ts.map +1 -0
- package/dist/cli/inspect/json.js +5 -0
- package/dist/cli/inspect/layer/index.d.ts +2 -0
- package/dist/cli/inspect/layer/index.d.ts.map +1 -0
- package/dist/cli/inspect/layer/index.js +1 -0
- package/dist/cli/inspect/layer/layer.d.ts +7 -0
- package/dist/cli/inspect/layer/layer.d.ts.map +1 -0
- package/dist/cli/inspect/layer/layer.js +13 -0
- package/dist/cli/inspect/layer/report.d.ts +3 -0
- package/dist/cli/inspect/layer/report.d.ts.map +1 -0
- package/dist/cli/inspect/layer/report.js +21 -0
- package/dist/cli/inspect/module/index.d.ts +2 -0
- package/dist/cli/inspect/module/index.d.ts.map +1 -0
- package/dist/cli/inspect/module/index.js +1 -0
- package/dist/cli/inspect/module/module.d.ts +7 -0
- package/dist/cli/inspect/module/module.d.ts.map +1 -0
- package/dist/cli/inspect/module/module.js +15 -0
- package/dist/cli/inspect/module/report.d.ts +3 -0
- package/dist/cli/inspect/module/report.d.ts.map +1 -0
- package/dist/cli/inspect/module/report.js +38 -0
- package/dist/cli/inspect/path-tree.d.ts +7 -0
- package/dist/cli/inspect/path-tree.d.ts.map +1 -0
- package/dist/cli/inspect/path-tree.js +62 -0
- package/dist/cli/inspect/path.d.ts +5 -0
- package/dist/cli/inspect/path.d.ts.map +1 -0
- package/dist/cli/inspect/path.js +10 -0
- package/dist/cli/inspect/project/index.d.ts +2 -0
- package/dist/cli/inspect/project/index.d.ts.map +1 -0
- package/dist/cli/inspect/project/index.js +1 -0
- package/dist/cli/inspect/project/project.d.ts +8 -0
- package/dist/cli/inspect/project/project.d.ts.map +1 -0
- package/dist/cli/inspect/project/project.js +19 -0
- package/dist/cli/inspect/project/report.d.ts +3 -0
- package/dist/cli/inspect/project/report.d.ts.map +1 -0
- package/dist/cli/inspect/project/report.js +16 -0
- package/dist/cli/lint/index.d.ts +2 -0
- package/dist/cli/lint/index.d.ts.map +1 -0
- package/dist/cli/lint/index.js +2 -0
- package/dist/cli/lint/layers/index.d.ts +3 -0
- package/dist/cli/lint/layers/index.d.ts.map +1 -0
- package/dist/cli/lint/layers/index.js +4 -0
- package/dist/cli/lint/layers/layers.d.ts +5 -0
- package/dist/cli/lint/layers/layers.d.ts.map +1 -0
- package/dist/cli/lint/layers/layers.js +18 -0
- package/dist/cli/lint/layers/report.d.ts +5 -0
- package/dist/cli/lint/layers/report.d.ts.map +1 -0
- package/dist/cli/lint/layers/report.js +60 -0
- package/dist/cli/lint/lint.d.ts +4 -0
- package/dist/cli/lint/lint.d.ts.map +1 -0
- package/dist/cli/lint/lint.js +26 -0
- package/dist/cli/lint/modules/index.d.ts +5 -0
- package/dist/cli/lint/modules/index.d.ts.map +1 -0
- package/dist/cli/lint/modules/index.js +4 -0
- package/dist/cli/lint/modules/modules.d.ts +5 -0
- package/dist/cli/lint/modules/modules.d.ts.map +1 -0
- package/dist/cli/lint/modules/modules.js +15 -0
- package/dist/cli/lint/modules/report.d.ts +5 -0
- package/dist/cli/lint/modules/report.d.ts.map +1 -0
- package/dist/cli/lint/modules/report.js +69 -0
- package/dist/cli/run.d.ts +1 -8
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +14 -242
- package/dist/cli/stories/index.d.ts +2 -0
- package/dist/cli/stories/index.d.ts.map +1 -0
- package/dist/cli/stories/index.js +1 -0
- package/dist/cli/stories/progress.d.ts +7 -0
- package/dist/cli/stories/progress.d.ts.map +1 -0
- package/dist/cli/stories/progress.js +45 -0
- package/dist/cli/stories/report.d.ts +9 -0
- package/dist/cli/stories/report.d.ts.map +1 -0
- package/dist/cli/stories/report.js +63 -0
- package/dist/cli/stories/stories.d.ts +6 -0
- package/dist/cli/stories/stories.d.ts.map +1 -0
- package/dist/cli/stories/stories.js +30 -0
- package/dist/config/define-config.d.ts +5 -0
- package/dist/config/define-config.d.ts.map +1 -1
- package/dist/config/define-config.js +152 -7
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +2 -0
- package/dist/config/layer-graph.d.ts +2 -2
- package/dist/config/layer-graph.d.ts.map +1 -1
- package/dist/config/layer-graph.js +2 -29
- package/dist/config/layer.d.ts +2 -2
- package/dist/config/layer.d.ts.map +1 -1
- package/dist/config/layer.js +2 -15
- package/dist/config/load-config/index.d.ts +2 -0
- package/dist/config/load-config/index.d.ts.map +1 -0
- package/dist/config/load-config/index.js +1 -0
- package/dist/config/load-config/load-config.d.ts +34 -0
- package/dist/config/load-config/load-config.d.ts.map +1 -0
- package/dist/config/load-config/load-config.js +127 -0
- package/dist/config/module.d.ts +4 -2
- package/dist/config/module.d.ts.map +1 -1
- package/dist/config/module.js +5 -12
- package/dist/config/project-narrative.d.ts +15 -0
- package/dist/config/project-narrative.d.ts.map +1 -0
- package/dist/config/project-narrative.js +11 -0
- package/dist/config/types.d.ts +5 -3
- package/dist/config/types.d.ts.map +1 -1
- package/dist/domain/architecture-analysis/architecture-analysis.d.ts +4 -0
- package/dist/domain/architecture-analysis/architecture-analysis.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/architecture-analysis.js +13 -0
- package/dist/domain/architecture-analysis/index.d.ts +3 -0
- package/dist/domain/architecture-analysis/index.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/index.js +2 -0
- package/dist/domain/architecture-analysis/layer-rules.d.ts +3 -0
- package/dist/domain/architecture-analysis/layer-rules.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layer-rules.js +15 -0
- package/dist/domain/architecture-analysis/layers/allowed-dependencies.d.ts +3 -0
- package/dist/domain/architecture-analysis/layers/allowed-dependencies.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/allowed-dependencies.js +20 -0
- package/dist/domain/architecture-analysis/layers/coverage-violations.d.ts +2 -0
- package/dist/domain/architecture-analysis/layers/coverage-violations.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/coverage-violations.js +5 -0
- package/dist/domain/architecture-analysis/layers/dependency-violations.d.ts +5 -0
- package/dist/domain/architecture-analysis/layers/dependency-violations.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/dependency-violations.js +18 -0
- package/dist/domain/architecture-analysis/layers/index.d.ts +9 -0
- package/dist/domain/architecture-analysis/layers/index.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/index.js +4 -0
- package/dist/domain/architecture-analysis/layers/layer-membership.d.ts +3 -0
- package/dist/domain/architecture-analysis/layers/layer-membership.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/layer-membership.js +13 -0
- package/dist/domain/architecture-analysis/layers/layers.d.ts +11 -0
- package/dist/domain/architecture-analysis/layers/layers.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/layers.js +22 -0
- package/dist/domain/architecture-analysis/layers/module-coverage-violations.d.ts +4 -0
- package/dist/domain/architecture-analysis/layers/module-coverage-violations.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/layers/module-coverage-violations.js +9 -0
- package/dist/domain/architecture-analysis/modules/dependency-graph.d.ts +2 -0
- package/dist/domain/architecture-analysis/modules/dependency-graph.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/dependency-graph.js +45 -0
- package/dist/domain/architecture-analysis/modules/dependency-permissions.d.ts +4 -0
- package/dist/domain/architecture-analysis/modules/dependency-permissions.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/dependency-permissions.js +35 -0
- package/dist/domain/architecture-analysis/modules/index.d.ts +12 -0
- package/dist/domain/architecture-analysis/modules/index.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/index.js +3 -0
- package/dist/domain/architecture-analysis/modules/module-descriptors.d.ts +5 -0
- package/dist/domain/architecture-analysis/modules/module-descriptors.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/module-descriptors.js +37 -0
- package/dist/domain/architecture-analysis/modules/module-membership.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/module-membership.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/module-membership.js +12 -0
- package/dist/domain/architecture-analysis/modules/modules.d.ts +16 -0
- package/dist/domain/architecture-analysis/modules/modules.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/modules.js +35 -0
- package/dist/domain/architecture-analysis/modules/public-entry-points.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/public-entry-points.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/public-entry-points.js +11 -0
- package/dist/domain/architecture-analysis/modules/unexposed-modules.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/unexposed-modules.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/unexposed-modules.js +10 -0
- package/dist/domain/architecture-analysis/modules/violations/boundaries.d.ts +8 -0
- package/dist/domain/architecture-analysis/modules/violations/boundaries.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/boundaries.js +47 -0
- package/dist/domain/architecture-analysis/modules/violations/coverage.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/coverage.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/coverage.js +7 -0
- package/dist/domain/architecture-analysis/modules/violations/cycles.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/cycles.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/cycles.js +7 -0
- package/dist/domain/architecture-analysis/modules/violations/dead-modules.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/dead-modules.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/dead-modules.js +23 -0
- package/dist/domain/architecture-analysis/modules/violations/dependencies.d.ts +4 -0
- package/dist/domain/architecture-analysis/modules/violations/dependencies.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/dependencies.js +7 -0
- package/dist/domain/architecture-analysis/modules/violations/entry-points.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/entry-points.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/entry-points.js +17 -0
- package/dist/domain/architecture-analysis/modules/violations/graph-coverage.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/graph-coverage.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/graph-coverage.js +16 -0
- package/dist/domain/architecture-analysis/modules/violations/index.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/index.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/index.js +2 -0
- package/dist/domain/architecture-analysis/modules/violations/unused-shared.d.ts +3 -0
- package/dist/domain/architecture-analysis/modules/violations/unused-shared.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/unused-shared.js +9 -0
- package/dist/domain/architecture-analysis/modules/violations/violations.d.ts +9 -0
- package/dist/domain/architecture-analysis/modules/violations/violations.d.ts.map +1 -0
- package/dist/domain/architecture-analysis/modules/violations/violations.js +22 -0
- package/dist/domain/file-graph/file-graph.d.ts +10 -0
- package/dist/domain/file-graph/file-graph.d.ts.map +1 -0
- package/dist/domain/file-graph/file-graph.js +37 -0
- package/dist/domain/file-graph/index.d.ts +4 -0
- package/dist/domain/file-graph/index.d.ts.map +1 -0
- package/dist/domain/file-graph/index.js +1 -0
- package/dist/domain/project-config/index.d.ts +10 -0
- package/dist/domain/project-config/index.d.ts.map +1 -0
- package/dist/domain/project-config/index.js +12 -0
- package/dist/domain/project-config/project-config.d.ts +52 -0
- package/dist/domain/project-config/project-config.d.ts.map +1 -0
- package/dist/domain/project-config/project-config.js +39 -0
- package/dist/domain/project-config/resolve.d.ts +8 -0
- package/dist/domain/project-config/resolve.d.ts.map +1 -0
- package/dist/domain/project-config/resolve.js +29 -0
- package/dist/domain/project-config/validation/containment.d.ts +4 -0
- package/dist/domain/project-config/validation/containment.d.ts.map +1 -0
- package/dist/domain/project-config/validation/containment.js +21 -0
- package/dist/domain/project-config/validation/index.d.ts +3 -0
- package/dist/domain/project-config/validation/index.d.ts.map +1 -0
- package/dist/domain/project-config/validation/index.js +2 -0
- package/dist/domain/project-config/validation/layers/cycles.d.ts +3 -0
- package/dist/domain/project-config/validation/layers/cycles.d.ts.map +1 -0
- package/dist/domain/project-config/validation/layers/cycles.js +64 -0
- package/dist/domain/project-config/validation/layers/index.d.ts +3 -0
- package/dist/domain/project-config/validation/layers/index.d.ts.map +1 -0
- package/dist/domain/project-config/validation/layers/index.js +2 -0
- package/dist/domain/project-config/validation/layers/layers.d.ts +3 -0
- package/dist/domain/project-config/validation/layers/layers.d.ts.map +1 -0
- package/dist/domain/project-config/validation/layers/layers.js +9 -0
- package/dist/domain/project-config/validation/layers/overlaps.d.ts +3 -0
- package/dist/domain/project-config/validation/layers/overlaps.d.ts.map +1 -0
- package/dist/domain/project-config/validation/layers/overlaps.js +26 -0
- package/dist/domain/project-config/validation/layers/references.d.ts +3 -0
- package/dist/domain/project-config/validation/layers/references.d.ts.map +1 -0
- package/dist/domain/project-config/validation/layers/references.js +21 -0
- package/dist/domain/project-config/validation/modules/containment.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/containment.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/containment.js +24 -0
- package/dist/domain/project-config/validation/modules/graphs.d.ts +4 -0
- package/dist/domain/project-config/validation/modules/graphs.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/graphs.js +96 -0
- package/dist/domain/project-config/validation/modules/index.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/index.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/index.js +2 -0
- package/dist/domain/project-config/validation/modules/kinds.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/kinds.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/kinds.js +18 -0
- package/dist/domain/project-config/validation/modules/modules.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/modules.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/modules.js +16 -0
- package/dist/domain/project-config/validation/modules/nested.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/nested.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/nested.js +34 -0
- package/dist/domain/project-config/validation/modules/overlaps.d.ts +4 -0
- package/dist/domain/project-config/validation/modules/overlaps.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/overlaps.js +43 -0
- package/dist/domain/project-config/validation/modules/paths.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/paths.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/paths.js +27 -0
- package/dist/domain/project-config/validation/modules/scopes.d.ts +4 -0
- package/dist/domain/project-config/validation/modules/scopes.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/scopes.js +28 -0
- package/dist/domain/project-config/validation/modules/subpaths.d.ts +3 -0
- package/dist/domain/project-config/validation/modules/subpaths.d.ts.map +1 -0
- package/dist/domain/project-config/validation/modules/subpaths.js +40 -0
- package/dist/domain/project-config/validation/paths.d.ts +3 -0
- package/dist/domain/project-config/validation/paths.d.ts.map +1 -0
- package/dist/domain/project-config/validation/paths.js +39 -0
- package/dist/domain/project-config/validation/validation.d.ts +3 -0
- package/dist/domain/project-config/validation/validation.d.ts.map +1 -0
- package/dist/domain/project-config/validation/validation.js +12 -0
- package/dist/entrypoints/cli/cli.d.ts +3 -0
- package/dist/entrypoints/cli/cli.d.ts.map +1 -0
- package/dist/entrypoints/cli/cli.js +6 -0
- package/dist/entrypoints/cli/run.d.ts +13 -0
- package/dist/entrypoints/cli/run.d.ts.map +1 -0
- package/dist/entrypoints/cli/run.js +155 -0
- package/dist/entrypoints/cli/test-output.d.ts +17 -0
- package/dist/entrypoints/cli/test-output.d.ts.map +1 -0
- package/dist/entrypoints/cli/test-output.js +244 -0
- package/dist/entrypoints/node/index.d.ts +24 -0
- package/dist/entrypoints/node/index.d.ts.map +1 -0
- package/dist/entrypoints/node/index.js +27 -0
- package/dist/entrypoints/report/index.d.ts +2 -0
- package/dist/entrypoints/report/index.d.ts.map +1 -0
- package/dist/entrypoints/report/index.js +1 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -1
- package/dist/markdown/index.d.ts +3 -0
- package/dist/markdown/index.d.ts.map +1 -0
- package/dist/markdown/index.js +1 -0
- package/dist/markdown/markdown.d.ts +7 -0
- package/dist/markdown/markdown.d.ts.map +1 -0
- package/dist/markdown/markdown.js +13 -0
- package/dist/orchestrator/analyze-project/analyze-project.d.ts +119 -0
- package/dist/orchestrator/analyze-project/analyze-project.d.ts.map +1 -0
- package/dist/orchestrator/analyze-project/analyze-project.js +9 -0
- package/dist/orchestrator/analyze-project/index.d.ts +2 -0
- package/dist/orchestrator/analyze-project/index.d.ts.map +1 -0
- package/dist/orchestrator/analyze-project/index.js +2 -0
- package/dist/orchestrator/inspect/index.d.ts +4 -0
- package/dist/orchestrator/inspect/index.d.ts.map +1 -0
- package/dist/orchestrator/inspect/index.js +1 -0
- package/dist/orchestrator/inspect/inspect.d.ts +269 -0
- package/dist/orchestrator/inspect/inspect.d.ts.map +1 -0
- package/dist/orchestrator/inspect/inspect.js +147 -0
- package/dist/orchestrator/load-changes/index.d.ts +2 -0
- package/dist/orchestrator/load-changes/index.d.ts.map +1 -0
- package/dist/orchestrator/load-changes/index.js +2 -0
- package/dist/orchestrator/load-changes/load-changes.d.ts +6 -0
- package/dist/orchestrator/load-changes/load-changes.d.ts.map +1 -0
- package/dist/orchestrator/load-changes/load-changes.js +18 -0
- package/dist/orchestrator/load-module-source/errors.d.ts +17 -0
- package/dist/orchestrator/load-module-source/errors.d.ts.map +1 -0
- package/dist/orchestrator/load-module-source/errors.js +5 -0
- package/dist/orchestrator/load-module-source/index.d.ts +2 -0
- package/dist/orchestrator/load-module-source/index.d.ts.map +1 -0
- package/dist/orchestrator/load-module-source/index.js +1 -0
- package/dist/orchestrator/load-module-source/load-module-source.d.ts +12 -0
- package/dist/orchestrator/load-module-source/load-module-source.d.ts.map +1 -0
- package/dist/orchestrator/load-module-source/load-module-source.js +39 -0
- package/dist/orchestrator/load-project/index.d.ts +3 -0
- package/dist/orchestrator/load-project/index.d.ts.map +1 -0
- package/dist/orchestrator/load-project/index.js +2 -0
- package/dist/orchestrator/load-project/load-project.d.ts +54 -0
- package/dist/orchestrator/load-project/load-project.d.ts.map +1 -0
- package/dist/orchestrator/load-project/load-project.js +30 -0
- package/dist/orchestrator/query-dependencies/index.d.ts +3 -0
- package/dist/orchestrator/query-dependencies/index.d.ts.map +1 -0
- package/dist/orchestrator/query-dependencies/index.js +4 -0
- package/dist/orchestrator/query-dependencies/query-dependencies.d.ts +12 -0
- package/dist/orchestrator/query-dependencies/query-dependencies.d.ts.map +1 -0
- package/dist/orchestrator/query-dependencies/query-dependencies.js +20 -0
- package/dist/orchestrator/run-stories/errors.d.ts +11 -0
- package/dist/orchestrator/run-stories/errors.d.ts.map +1 -0
- package/dist/orchestrator/run-stories/errors.js +3 -0
- package/dist/orchestrator/run-stories/extract-snippets.d.ts +12 -0
- package/dist/orchestrator/run-stories/extract-snippets.d.ts.map +1 -0
- package/dist/orchestrator/run-stories/extract-snippets.js +181 -0
- package/dist/orchestrator/run-stories/index.d.ts +3 -0
- package/dist/orchestrator/run-stories/index.d.ts.map +1 -0
- package/dist/orchestrator/run-stories/index.js +3 -0
- package/dist/orchestrator/run-stories/run-stories.d.ts +16 -0
- package/dist/orchestrator/run-stories/run-stories.d.ts.map +1 -0
- package/dist/orchestrator/run-stories/run-stories.js +290 -0
- package/dist/report/architecture.d.ts +1 -1
- package/dist/report/architecture.d.ts.map +1 -1
- package/dist/report/index.d.ts +2 -1
- package/dist/report/index.d.ts.map +1 -1
- package/dist/report/index.js +1 -1
- package/dist/report/tests.d.ts +411 -0
- package/dist/report/tests.d.ts.map +1 -0
- package/dist/report/tests.js +102 -0
- package/dist/services/config/config.d.ts +12 -0
- package/dist/services/config/config.d.ts.map +1 -0
- package/dist/services/config/config.js +46 -0
- package/dist/services/config/errors.d.ts +13 -0
- package/dist/services/config/errors.d.ts.map +1 -0
- package/dist/services/config/errors.js +3 -0
- package/dist/services/config/index.d.ts +4 -0
- package/dist/services/config/index.d.ts.map +1 -0
- package/dist/services/config/index.js +7 -0
- package/dist/services/file-cruiser/errors.d.ts +10 -0
- package/dist/services/file-cruiser/errors.d.ts.map +1 -0
- package/dist/services/file-cruiser/errors.js +3 -0
- package/dist/services/file-cruiser/file-cruiser.d.ts +11 -0
- package/dist/services/file-cruiser/file-cruiser.d.ts.map +1 -0
- package/dist/services/file-cruiser/file-cruiser.js +7 -0
- package/dist/services/file-cruiser/index.d.ts +4 -0
- package/dist/services/file-cruiser/index.d.ts.map +1 -0
- package/dist/services/file-cruiser/index.js +6 -0
- package/dist/services/file-cruiser/oxc/file-scanner.d.ts +5 -0
- package/dist/services/file-cruiser/oxc/file-scanner.d.ts.map +1 -0
- package/dist/services/file-cruiser/oxc/file-scanner.js +54 -0
- package/dist/services/file-cruiser/oxc/import-resolver.d.ts +5 -0
- package/dist/services/file-cruiser/oxc/import-resolver.d.ts.map +1 -0
- package/dist/services/file-cruiser/oxc/import-resolver.js +44 -0
- package/dist/services/file-cruiser/oxc/index.d.ts +2 -0
- package/dist/services/file-cruiser/oxc/index.d.ts.map +1 -0
- package/dist/services/file-cruiser/oxc/index.js +2 -0
- package/dist/services/file-cruiser/oxc/oxc.d.ts +5 -0
- package/dist/services/file-cruiser/oxc/oxc.d.ts.map +1 -0
- package/dist/services/file-cruiser/oxc/oxc.js +29 -0
- package/dist/services/git/changed-paths.d.ts +4 -0
- package/dist/services/git/changed-paths.d.ts.map +1 -0
- package/dist/services/git/changed-paths.js +85 -0
- package/dist/services/git/errors.d.ts +11 -0
- package/dist/services/git/errors.d.ts.map +1 -0
- package/dist/services/git/errors.js +3 -0
- package/dist/services/git/git.d.ts +12 -0
- package/dist/services/git/git.d.ts.map +1 -0
- package/dist/services/git/git.js +23 -0
- package/dist/services/git/index.d.ts +4 -0
- package/dist/services/git/index.d.ts.map +1 -0
- package/dist/services/git/index.js +6 -0
- package/dist/services/git/parse-patch.d.ts +3 -0
- package/dist/services/git/parse-patch.d.ts.map +1 -0
- package/dist/services/git/parse-patch.js +53 -0
- package/dist/services/git/run-git.d.ts +9 -0
- package/dist/services/git/run-git.d.ts.map +1 -0
- package/dist/services/git/run-git.js +22 -0
- package/dist/story/index.d.ts +3 -0
- package/dist/story/index.d.ts.map +1 -0
- package/dist/story/index.js +2 -0
- package/dist/story/schema/index.d.ts +6 -0
- package/dist/story/schema/index.d.ts.map +1 -0
- package/dist/story/schema/index.js +4 -0
- package/dist/story/schema/slug.d.ts +2 -0
- package/dist/story/schema/slug.d.ts.map +1 -0
- package/dist/story/schema/slug.js +6 -0
- package/dist/story/schema/story-report-schema.d.ts +408 -0
- package/dist/story/schema/story-report-schema.d.ts.map +1 -0
- package/dist/story/schema/story-report-schema.js +94 -0
- package/dist/story/schema/story-tree-schema.d.ts +42 -0
- package/dist/story/schema/story-tree-schema.d.ts.map +1 -0
- package/dist/story/schema/story-tree-schema.js +40 -0
- package/dist/story/story.d.ts +38 -0
- package/dist/story/story.d.ts.map +1 -0
- package/dist/story/story.js +56 -0
- package/dist/tests/authoring/index.d.ts +72 -0
- package/dist/tests/authoring/index.d.ts.map +1 -0
- package/dist/tests/authoring/index.js +312 -0
- package/dist/tests/run-tests/index.d.ts +3 -0
- package/dist/tests/run-tests/index.d.ts.map +1 -0
- package/dist/tests/run-tests/index.js +1 -0
- package/dist/tests/run-tests/run-tests.d.ts +26 -0
- package/dist/tests/run-tests/run-tests.d.ts.map +1 -0
- package/dist/tests/run-tests/run-tests.js +284 -0
- package/package.json +36 -24
- package/schema.json +212 -0
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -1
- package/dist/engine/1-extract/extract.d.ts.map +0 -1
- package/dist/engine/1-extract/index.d.ts +0 -3
- package/dist/engine/1-extract/index.d.ts.map +0 -1
- package/dist/engine/1-extract/index.js +0 -1
- package/dist/engine/2-resolve/index.d.ts +0 -3
- package/dist/engine/2-resolve/index.d.ts.map +0 -1
- package/dist/engine/2-resolve/index.js +0 -1
- package/dist/engine/2-resolve/resolve.d.ts.map +0 -1
- package/dist/engine/3-evaluate/evaluate.d.ts.map +0 -1
- package/dist/engine/3-evaluate/index.d.ts +0 -3
- package/dist/engine/3-evaluate/index.d.ts.map +0 -1
- package/dist/engine/3-evaluate/index.js +0 -1
- package/dist/engine/4-emit/emit.d.ts +0 -7
- package/dist/engine/4-emit/emit.d.ts.map +0 -1
- package/dist/engine/4-emit/index.d.ts +0 -2
- package/dist/engine/4-emit/index.d.ts.map +0 -1
- package/dist/engine/4-emit/index.js +0 -1
- package/dist/engine/errors.d.ts +0 -19
- package/dist/engine/errors.d.ts.map +0 -1
- package/dist/node.d.ts +0 -24
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -139
- package/dist/report/stories.d.ts +0 -22
- package/dist/report/stories.d.ts.map +0 -1
- package/dist/report/stories.js +0 -1
- package/dist/story/artifact/artifact.d.ts +0 -57
- package/dist/story/artifact/artifact.d.ts.map +0 -1
- package/dist/story/artifact/artifact.js +0 -234
- package/dist/story/artifact/index.d.ts +0 -2
- package/dist/story/artifact/index.d.ts.map +0 -1
- package/dist/story/artifact/index.js +0 -1
- package/dist/story/artifact/storage.d.ts +0 -10
- package/dist/story/artifact/storage.d.ts.map +0 -1
- package/dist/story/artifact/storage.js +0 -162
- package/dist/story/artifact/types.d.ts +0 -74
- package/dist/story/artifact/types.d.ts.map +0 -1
- package/dist/story/artifact/types.js +0 -1
- package/dist/story/core/blocks.d.ts +0 -20
- package/dist/story/core/blocks.d.ts.map +0 -1
- package/dist/story/core/blocks.js +0 -104
- package/dist/story/core/declare.d.ts +0 -63
- package/dist/story/core/declare.d.ts.map +0 -1
- package/dist/story/core/declare.js +0 -62
- package/dist/story/core/index.d.ts +0 -4
- package/dist/story/core/index.d.ts.map +0 -1
- package/dist/story/core/index.js +0 -1
- package/dist/story/core/recorder.d.ts +0 -38
- package/dist/story/core/recorder.d.ts.map +0 -1
- package/dist/story/core/recorder.js +0 -28
- package/dist/story/core/runtime-context.d.ts +0 -14
- package/dist/story/core/runtime-context.d.ts.map +0 -1
- package/dist/story/core/runtime-context.js +0 -19
- package/dist/story/core/types.d.ts +0 -21
- package/dist/story/core/types.d.ts.map +0 -1
- package/dist/story/core/types.js +0 -1
- package/dist/story/effect/effect.d.ts +0 -52
- package/dist/story/effect/effect.d.ts.map +0 -1
- package/dist/story/effect/effect.js +0 -99
- package/dist/story/effect/index.d.ts +0 -3
- package/dist/story/effect/index.d.ts.map +0 -1
- package/dist/story/effect/index.js +0 -1
- package/dist/story/runner/index.d.ts +0 -3
- package/dist/story/runner/index.d.ts.map +0 -1
- package/dist/story/runner/index.js +0 -1
- package/dist/story/runner/runner.d.ts +0 -44
- package/dist/story/runner/runner.d.ts.map +0 -1
- package/dist/story/runner/runner.js +0 -476
- package/dist/story/story-runtime/index.d.ts +0 -2
- package/dist/story/story-runtime/index.d.ts.map +0 -1
- package/dist/story/story-runtime/index.js +0 -1
- package/dist/story/story-runtime/story-runtime.d.ts +0 -52
- package/dist/story/story-runtime/story-runtime.d.ts.map +0 -1
- package/dist/story/story-runtime/story-runtime.js +0 -194
- package/dist/story/vanilla/index.d.ts +0 -29
- package/dist/story/vanilla/index.d.ts.map +0 -1
- package/dist/story/vanilla/index.js +0 -78
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const ModuleDefinitionSchema: Schema.Struct<{
|
|
3
|
+
readonly layer: Schema.String;
|
|
4
|
+
readonly shared: Schema.Boolean;
|
|
5
|
+
readonly exposed: Schema.Boolean;
|
|
6
|
+
readonly graph: Schema.optional<Schema.String>;
|
|
7
|
+
readonly member: Schema.optional<Schema.String>;
|
|
8
|
+
}>;
|
|
9
|
+
export type ModuleDefinition = typeof ModuleDefinitionSchema.Type;
|
|
10
|
+
export declare const ModuleGraphDefinitionSchema: Schema.Struct<{
|
|
11
|
+
readonly layer: Schema.String;
|
|
12
|
+
readonly path: Schema.String;
|
|
13
|
+
readonly members: Schema.$Record<Schema.String, Schema.String>;
|
|
14
|
+
readonly rules: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
15
|
+
}>;
|
|
16
|
+
export type ModuleGraphDefinition = typeof ModuleGraphDefinitionSchema.Type;
|
|
17
|
+
declare const ModuleImportViolationSchema: Schema.Struct<{
|
|
18
|
+
readonly fromFile: Schema.String;
|
|
19
|
+
readonly fromModule: Schema.String;
|
|
20
|
+
readonly toFile: Schema.String;
|
|
21
|
+
readonly toModule: Schema.String;
|
|
22
|
+
}>;
|
|
23
|
+
export type ModuleImportViolation = typeof ModuleImportViolationSchema.Type;
|
|
24
|
+
export declare const ModuleDependencySchema: Schema.Struct<{
|
|
25
|
+
readonly fromModule: Schema.String;
|
|
26
|
+
readonly toModule: Schema.String;
|
|
27
|
+
readonly toEntryPoint: Schema.optional<Schema.String>;
|
|
28
|
+
readonly permitted: Schema.Boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export type ModuleDependency = typeof ModuleDependencySchema.Type;
|
|
31
|
+
export declare const ModuleShapeSchema: Schema.Literals<readonly ["file", "directory"]>;
|
|
32
|
+
export type ModuleShape = typeof ModuleShapeSchema.Type;
|
|
33
|
+
export declare const ObservedModuleKindSchema: Schema.Literals<readonly ["regular", "root", "terminal", "isolated"]>;
|
|
34
|
+
export type ObservedModuleKind = typeof ObservedModuleKindSchema.Type;
|
|
35
|
+
export declare const AnalyzedModuleSchema: Schema.Struct<{
|
|
36
|
+
readonly path: Schema.String;
|
|
37
|
+
readonly layer: Schema.String;
|
|
38
|
+
readonly shared: Schema.Boolean;
|
|
39
|
+
readonly exposed: Schema.Boolean;
|
|
40
|
+
readonly shape: Schema.Literals<readonly ["file", "directory"]>;
|
|
41
|
+
readonly observedKind: Schema.Literals<readonly ["regular", "root", "terminal", "isolated"]>;
|
|
42
|
+
readonly graph: Schema.optional<Schema.String>;
|
|
43
|
+
readonly member: Schema.optional<Schema.String>;
|
|
44
|
+
}>;
|
|
45
|
+
export type AnalyzedModule = typeof AnalyzedModuleSchema.Type;
|
|
46
|
+
export declare const AnalyzedModuleGraphSchema: Schema.Struct<{
|
|
47
|
+
readonly id: Schema.String;
|
|
48
|
+
readonly layer: Schema.String;
|
|
49
|
+
readonly path: Schema.String;
|
|
50
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
51
|
+
readonly rules: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
52
|
+
}>;
|
|
53
|
+
export type AnalyzedModuleGraph = typeof AnalyzedModuleGraphSchema.Type;
|
|
54
|
+
export declare const ModuleViolationSchema: Schema.Union<readonly [Schema.Struct<{
|
|
55
|
+
readonly kind: Schema.Literal<"coverage">;
|
|
56
|
+
readonly file: Schema.String;
|
|
57
|
+
}>, Schema.Struct<{
|
|
58
|
+
readonly kind: Schema.Literal<"graph-coverage">;
|
|
59
|
+
readonly graph: Schema.String;
|
|
60
|
+
readonly file: Schema.String;
|
|
61
|
+
}>, Schema.Struct<{
|
|
62
|
+
readonly kind: Schema.Literal<"missing-entry-point">;
|
|
63
|
+
readonly module: Schema.String;
|
|
64
|
+
readonly path: Schema.String;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
readonly fromFile: Schema.String;
|
|
67
|
+
readonly fromModule: Schema.String;
|
|
68
|
+
readonly toFile: Schema.String;
|
|
69
|
+
readonly toModule: Schema.String;
|
|
70
|
+
readonly kind: Schema.Literal<"dependency">;
|
|
71
|
+
}>, Schema.Struct<{
|
|
72
|
+
readonly fromFile: Schema.String;
|
|
73
|
+
readonly fromModule: Schema.String;
|
|
74
|
+
readonly toFile: Schema.String;
|
|
75
|
+
readonly toModule: Schema.String;
|
|
76
|
+
readonly kind: Schema.Literal<"boundary">;
|
|
77
|
+
}>, Schema.Struct<{
|
|
78
|
+
readonly kind: Schema.Literal<"cycle">;
|
|
79
|
+
readonly modules: Schema.$Array<Schema.String>;
|
|
80
|
+
}>, Schema.Struct<{
|
|
81
|
+
readonly kind: Schema.Literal<"unused-shared">;
|
|
82
|
+
readonly module: Schema.String;
|
|
83
|
+
}>, Schema.Struct<{
|
|
84
|
+
readonly kind: Schema.Literal<"dead-module">;
|
|
85
|
+
readonly module: Schema.String;
|
|
86
|
+
}>]>;
|
|
87
|
+
export type ModuleViolation = typeof ModuleViolationSchema.Type;
|
|
88
|
+
export declare const ModuleAnalysisSchema: Schema.Struct<{
|
|
89
|
+
readonly modules: Schema.$Array<Schema.Struct<{
|
|
90
|
+
readonly path: Schema.String;
|
|
91
|
+
readonly layer: Schema.String;
|
|
92
|
+
readonly shared: Schema.Boolean;
|
|
93
|
+
readonly exposed: Schema.Boolean;
|
|
94
|
+
readonly shape: Schema.Literals<readonly ["file", "directory"]>;
|
|
95
|
+
readonly observedKind: Schema.Literals<readonly ["regular", "root", "terminal", "isolated"]>;
|
|
96
|
+
readonly graph: Schema.optional<Schema.String>;
|
|
97
|
+
readonly member: Schema.optional<Schema.String>;
|
|
98
|
+
}>>;
|
|
99
|
+
readonly graphs: Schema.$Array<Schema.Struct<{
|
|
100
|
+
readonly id: Schema.String;
|
|
101
|
+
readonly layer: Schema.String;
|
|
102
|
+
readonly path: Schema.String;
|
|
103
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
104
|
+
readonly rules: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
105
|
+
}>>;
|
|
106
|
+
readonly membership: Schema.$ReadonlyMap<Schema.String, Schema.String>;
|
|
107
|
+
readonly entryPoints: Schema.$ReadonlySet<Schema.String>;
|
|
108
|
+
readonly dependencies: Schema.$Array<Schema.Struct<{
|
|
109
|
+
readonly fromModule: Schema.String;
|
|
110
|
+
readonly toModule: Schema.String;
|
|
111
|
+
readonly toEntryPoint: Schema.optional<Schema.String>;
|
|
112
|
+
readonly permitted: Schema.Boolean;
|
|
113
|
+
}>>;
|
|
114
|
+
readonly violations: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
115
|
+
readonly kind: Schema.Literal<"coverage">;
|
|
116
|
+
readonly file: Schema.String;
|
|
117
|
+
}>, Schema.Struct<{
|
|
118
|
+
readonly kind: Schema.Literal<"graph-coverage">;
|
|
119
|
+
readonly graph: Schema.String;
|
|
120
|
+
readonly file: Schema.String;
|
|
121
|
+
}>, Schema.Struct<{
|
|
122
|
+
readonly kind: Schema.Literal<"missing-entry-point">;
|
|
123
|
+
readonly module: Schema.String;
|
|
124
|
+
readonly path: Schema.String;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
readonly fromFile: Schema.String;
|
|
127
|
+
readonly fromModule: Schema.String;
|
|
128
|
+
readonly toFile: Schema.String;
|
|
129
|
+
readonly toModule: Schema.String;
|
|
130
|
+
readonly kind: Schema.Literal<"dependency">;
|
|
131
|
+
}>, Schema.Struct<{
|
|
132
|
+
readonly fromFile: Schema.String;
|
|
133
|
+
readonly fromModule: Schema.String;
|
|
134
|
+
readonly toFile: Schema.String;
|
|
135
|
+
readonly toModule: Schema.String;
|
|
136
|
+
readonly kind: Schema.Literal<"boundary">;
|
|
137
|
+
}>, Schema.Struct<{
|
|
138
|
+
readonly kind: Schema.Literal<"cycle">;
|
|
139
|
+
readonly modules: Schema.$Array<Schema.String>;
|
|
140
|
+
}>, Schema.Struct<{
|
|
141
|
+
readonly kind: Schema.Literal<"unused-shared">;
|
|
142
|
+
readonly module: Schema.String;
|
|
143
|
+
}>, Schema.Struct<{
|
|
144
|
+
readonly kind: Schema.Literal<"dead-module">;
|
|
145
|
+
readonly module: Schema.String;
|
|
146
|
+
}>]>>;
|
|
147
|
+
}>;
|
|
148
|
+
export type ModuleAnalysis = typeof ModuleAnalysisSchema.Type;
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=module-analysis-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-analysis-schema.d.ts","sourceRoot":"","sources":["../../src/architecture-analysis-schema/module-analysis-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,sBAAsB;;;;;;EAQjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAElE,eAAO,MAAM,2BAA2B;;;;;EAKtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAC;AAE5E,QAAA,MAAM,2BAA2B;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAC;AAE5E,eAAO,MAAM,sBAAsB;;;;;EAQjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAElE,eAAO,MAAM,iBAAiB,iDAAyC,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AAExD,eAAO,MAAM,wBAAwB,uEAKnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAE9D,eAAO,MAAM,yBAAyB;;;;;;EAMpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,IAAI,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgChC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAC;AAEhE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export const ModuleDefinitionSchema = Schema.Struct({
|
|
3
|
+
layer: Schema.String,
|
|
4
|
+
shared: Schema.Boolean,
|
|
5
|
+
exposed: Schema.Boolean,
|
|
6
|
+
// Absent for a free-form Module; the owning Module Graph id for a member.
|
|
7
|
+
graph: Schema.optional(Schema.String),
|
|
8
|
+
// The member's key relative to its Module Graph path. Absent when free-form.
|
|
9
|
+
member: Schema.optional(Schema.String),
|
|
10
|
+
});
|
|
11
|
+
export const ModuleGraphDefinitionSchema = Schema.Struct({
|
|
12
|
+
layer: Schema.String,
|
|
13
|
+
path: Schema.String,
|
|
14
|
+
members: Schema.Record(Schema.String, Schema.String),
|
|
15
|
+
rules: Schema.Record(Schema.String, Schema.Array(Schema.String)),
|
|
16
|
+
});
|
|
17
|
+
const ModuleImportViolationSchema = Schema.Struct({
|
|
18
|
+
fromFile: Schema.String,
|
|
19
|
+
fromModule: Schema.String,
|
|
20
|
+
toFile: Schema.String,
|
|
21
|
+
toModule: Schema.String,
|
|
22
|
+
});
|
|
23
|
+
export const ModuleDependencySchema = Schema.Struct({
|
|
24
|
+
fromModule: Schema.String,
|
|
25
|
+
toModule: Schema.String,
|
|
26
|
+
// Absent when the import bypasses the public entry point of the target Module.
|
|
27
|
+
toEntryPoint: Schema.optional(Schema.String),
|
|
28
|
+
// False when the import is a Module dependency violation, a Layer dependency
|
|
29
|
+
// violation, or bypasses the target's public entry point.
|
|
30
|
+
permitted: Schema.Boolean,
|
|
31
|
+
});
|
|
32
|
+
export const ModuleShapeSchema = Schema.Literals(['file', 'directory']);
|
|
33
|
+
export const ObservedModuleKindSchema = Schema.Literals([
|
|
34
|
+
'regular',
|
|
35
|
+
'root',
|
|
36
|
+
'terminal',
|
|
37
|
+
'isolated',
|
|
38
|
+
]);
|
|
39
|
+
export const AnalyzedModuleSchema = Schema.Struct({
|
|
40
|
+
path: Schema.String,
|
|
41
|
+
layer: Schema.String,
|
|
42
|
+
shared: Schema.Boolean,
|
|
43
|
+
exposed: Schema.Boolean,
|
|
44
|
+
shape: ModuleShapeSchema,
|
|
45
|
+
observedKind: ObservedModuleKindSchema,
|
|
46
|
+
graph: Schema.optional(Schema.String),
|
|
47
|
+
member: Schema.optional(Schema.String),
|
|
48
|
+
});
|
|
49
|
+
export const AnalyzedModuleGraphSchema = Schema.Struct({
|
|
50
|
+
id: Schema.String,
|
|
51
|
+
layer: Schema.String,
|
|
52
|
+
path: Schema.String,
|
|
53
|
+
members: Schema.Array(Schema.String),
|
|
54
|
+
rules: Schema.Record(Schema.String, Schema.Array(Schema.String)),
|
|
55
|
+
});
|
|
56
|
+
export const ModuleViolationSchema = Schema.Union([
|
|
57
|
+
Schema.Struct({ kind: Schema.Literal('coverage'), file: Schema.String }),
|
|
58
|
+
Schema.Struct({
|
|
59
|
+
kind: Schema.Literal('graph-coverage'),
|
|
60
|
+
graph: Schema.String,
|
|
61
|
+
file: Schema.String,
|
|
62
|
+
}),
|
|
63
|
+
Schema.Struct({
|
|
64
|
+
kind: Schema.Literal('missing-entry-point'),
|
|
65
|
+
module: Schema.String,
|
|
66
|
+
path: Schema.String,
|
|
67
|
+
}),
|
|
68
|
+
Schema.Struct({
|
|
69
|
+
kind: Schema.Literal('dependency'),
|
|
70
|
+
...ModuleImportViolationSchema.fields,
|
|
71
|
+
}),
|
|
72
|
+
Schema.Struct({
|
|
73
|
+
kind: Schema.Literal('boundary'),
|
|
74
|
+
...ModuleImportViolationSchema.fields,
|
|
75
|
+
}),
|
|
76
|
+
Schema.Struct({
|
|
77
|
+
kind: Schema.Literal('cycle'),
|
|
78
|
+
modules: Schema.Array(Schema.String),
|
|
79
|
+
}),
|
|
80
|
+
Schema.Struct({
|
|
81
|
+
kind: Schema.Literal('unused-shared'),
|
|
82
|
+
module: Schema.String,
|
|
83
|
+
}),
|
|
84
|
+
Schema.Struct({
|
|
85
|
+
kind: Schema.Literal('dead-module'),
|
|
86
|
+
module: Schema.String,
|
|
87
|
+
}),
|
|
88
|
+
]);
|
|
89
|
+
export const ModuleAnalysisSchema = Schema.Struct({
|
|
90
|
+
modules: Schema.Array(AnalyzedModuleSchema),
|
|
91
|
+
graphs: Schema.Array(AnalyzedModuleGraphSchema),
|
|
92
|
+
membership: Schema.ReadonlyMap(Schema.String, Schema.String),
|
|
93
|
+
entryPoints: Schema.ReadonlySet(Schema.String),
|
|
94
|
+
dependencies: Schema.Array(ModuleDependencySchema),
|
|
95
|
+
violations: Schema.Array(ModuleViolationSchema),
|
|
96
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const ModuleSourceFileSchema: Schema.Struct<{
|
|
3
|
+
readonly path: Schema.String;
|
|
4
|
+
readonly content: Schema.String;
|
|
5
|
+
}>;
|
|
6
|
+
export type ModuleSourceFile = typeof ModuleSourceFileSchema.Type;
|
|
7
|
+
export declare const ModuleSourceSnapshotSchema: Schema.Struct<{
|
|
8
|
+
readonly modulePath: Schema.String;
|
|
9
|
+
readonly entryPoint: Schema.optional<Schema.String>;
|
|
10
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
11
|
+
readonly path: Schema.String;
|
|
12
|
+
readonly content: Schema.String;
|
|
13
|
+
}>>;
|
|
14
|
+
}>;
|
|
15
|
+
export type ModuleSourceSnapshot = typeof ModuleSourceSnapshotSchema.Type;
|
|
16
|
+
//# sourceMappingURL=module-source-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-source-schema.d.ts","sourceRoot":"","sources":["../../src/architecture-analysis-schema/module-source-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,sBAAsB;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAElE,eAAO,MAAM,0BAA0B;;;;;;;EAIrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,OAAO,0BAA0B,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export const ModuleSourceFileSchema = Schema.Struct({
|
|
3
|
+
path: Schema.String,
|
|
4
|
+
content: Schema.String,
|
|
5
|
+
});
|
|
6
|
+
export const ModuleSourceSnapshotSchema = Schema.Struct({
|
|
7
|
+
modulePath: Schema.String,
|
|
8
|
+
entryPoint: Schema.optional(Schema.String),
|
|
9
|
+
files: Schema.Array(ModuleSourceFileSchema),
|
|
10
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
declare const ModuleSchema: Schema.Struct<{
|
|
3
|
+
readonly shared: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
4
|
+
readonly exposed: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
5
|
+
}>;
|
|
6
|
+
declare const ModuleGraphSchema: Schema.Struct<{
|
|
7
|
+
readonly description: Schema.optional<Schema.String>;
|
|
8
|
+
readonly path: Schema.String;
|
|
9
|
+
readonly modules: Schema.$Record<Schema.String, Schema.Struct<{
|
|
10
|
+
readonly shared: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
11
|
+
readonly exposed: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
12
|
+
}>>;
|
|
13
|
+
readonly rules: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, never>;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ProjectConfigSchema: Schema.Struct<{
|
|
16
|
+
readonly $schema: Schema.optional<Schema.String>;
|
|
17
|
+
readonly sourceRoots: Schema.$Array<Schema.String>;
|
|
18
|
+
readonly ignoredPaths: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
|
|
19
|
+
readonly storiesPath: Schema.optional<Schema.String>;
|
|
20
|
+
readonly layers: Schema.$Record<Schema.String, Schema.Struct<{
|
|
21
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
22
|
+
readonly description: Schema.optional<Schema.String>;
|
|
23
|
+
readonly modules: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
24
|
+
readonly shared: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
25
|
+
readonly exposed: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
26
|
+
}>>, never>;
|
|
27
|
+
readonly moduleGraphs: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
28
|
+
readonly description: Schema.optional<Schema.String>;
|
|
29
|
+
readonly path: Schema.String;
|
|
30
|
+
readonly modules: Schema.$Record<Schema.String, Schema.Struct<{
|
|
31
|
+
readonly shared: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
32
|
+
readonly exposed: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
33
|
+
}>>;
|
|
34
|
+
readonly rules: Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, never>;
|
|
35
|
+
}>>, never>;
|
|
36
|
+
}>>;
|
|
37
|
+
readonly layerGraphs: Schema.$Record<Schema.String, Schema.Struct<{
|
|
38
|
+
readonly description: Schema.optional<Schema.String>;
|
|
39
|
+
readonly rules: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
40
|
+
}>>;
|
|
41
|
+
}>;
|
|
42
|
+
export type Config = typeof ProjectConfigSchema.Type;
|
|
43
|
+
export type ModuleConfig = typeof ModuleSchema.Type;
|
|
44
|
+
export type ModuleGraphConfig = typeof ModuleGraphSchema.Type;
|
|
45
|
+
export declare const ConfigValidationIssueSchema: Schema.Struct<{
|
|
46
|
+
readonly kind: Schema.Literals<readonly ["path", "overlap", "reference", "cycle", "module", "module-graph"]>;
|
|
47
|
+
readonly message: Schema.String;
|
|
48
|
+
}>;
|
|
49
|
+
export type ConfigValidationIssue = typeof ConfigValidationIssueSchema.Type;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=project-config-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-config-schema.d.ts","sourceRoot":"","sources":["../../src/architecture-analysis-schema/project-config-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,QAAA,MAAM,YAAY;;;EAYhB,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;EA4BrB,CAAC;AAqDH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;EAmC9B,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AAE9D,eAAO,MAAM,2BAA2B;;;EAatC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
const ModuleSchema = Schema.Struct({
|
|
3
|
+
shared: Schema.Boolean.annotate({
|
|
4
|
+
description: 'Whether peers in the same Layer may import this Module. Illegal inside a Module Graph, where Rules govern peer access.',
|
|
5
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
|
|
6
|
+
exposed: Schema.Boolean.annotate({
|
|
7
|
+
description: 'Whether other Layers may import this Module.',
|
|
8
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
|
|
9
|
+
}).annotate({
|
|
10
|
+
title: 'Module',
|
|
11
|
+
description: 'A Configured Module keyed by its canonical source file or directory — project-relative when declared in a Layer, Module Graph-relative when declared in a Module Graph. Both flags default to false, so a Module is importable by nobody until it says otherwise.',
|
|
12
|
+
});
|
|
13
|
+
const ModuleGraphSchema = Schema.Struct({
|
|
14
|
+
description: Schema.optional(Schema.String).annotate({
|
|
15
|
+
description: 'Human-readable summary of this Module Graph.',
|
|
16
|
+
}),
|
|
17
|
+
path: Schema.String.annotate({
|
|
18
|
+
description: 'Canonical project-relative directory rooting this Module Graph. Every member lives below it and every file below it must belong to a member.',
|
|
19
|
+
}),
|
|
20
|
+
modules: Schema.Record(Schema.String, ModuleSchema)
|
|
21
|
+
.annotate({
|
|
22
|
+
description: 'Every member of this Module Graph, keyed relative to its path. At least two members, at least one exposed, and no member may be Shared.',
|
|
23
|
+
})
|
|
24
|
+
.pipe(Schema.check(Schema.isMinProperties(2))),
|
|
25
|
+
rules: Schema.Record(Schema.String, Schema.Array(Schema.String))
|
|
26
|
+
.annotate({
|
|
27
|
+
description: 'Maps a member key to the member keys it may directly depend on. Rules are default-deny and, unlike LayerGraph Rules, are NOT transitive: only declared edges are permitted. They must be acyclic within this Module Graph.',
|
|
28
|
+
})
|
|
29
|
+
.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
30
|
+
}).annotate({
|
|
31
|
+
title: 'Module Graph',
|
|
32
|
+
description: 'A named, bounded set of Modules inside one Layer describing one capability too large for a single Module. Unlike a LayerGraph it is a disjoint unit: its Rules are never unioned with another Graph’s, are not transitive, and are checked for cycles on their own.',
|
|
33
|
+
});
|
|
34
|
+
const LayerSchema = Schema.Struct({
|
|
35
|
+
paths: Schema.Array(Schema.String)
|
|
36
|
+
.annotate({
|
|
37
|
+
description: 'Canonical project-relative paths belonging to this Layer. No declared Layer scopes may overlap, within one Layer or across Layers.',
|
|
38
|
+
})
|
|
39
|
+
.pipe(Schema.check(Schema.isMinLength(1))),
|
|
40
|
+
description: Schema.optional(Schema.String).annotate({
|
|
41
|
+
description: 'Human-readable summary of this Layer.',
|
|
42
|
+
}),
|
|
43
|
+
modules: Schema.Record(Schema.String, ModuleSchema)
|
|
44
|
+
.annotate({
|
|
45
|
+
description: 'Every free-form Configured Module in this Layer, keyed by canonical project-relative source file or directory.',
|
|
46
|
+
})
|
|
47
|
+
.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
48
|
+
moduleGraphs: Schema.Record(Schema.String, ModuleGraphSchema)
|
|
49
|
+
.annotate({
|
|
50
|
+
description: 'Every Module Graph in this Layer, keyed by id.',
|
|
51
|
+
})
|
|
52
|
+
.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
53
|
+
}).annotate({
|
|
54
|
+
title: 'Layer',
|
|
55
|
+
description: 'A named, configured group of project-relative paths, owning the Modules and Module Graphs declared within it.',
|
|
56
|
+
});
|
|
57
|
+
const LayerGraphSchema = Schema.Struct({
|
|
58
|
+
description: Schema.optional(Schema.String).annotate({
|
|
59
|
+
description: 'Human-readable summary of this LayerGraph.',
|
|
60
|
+
}),
|
|
61
|
+
rules: Schema.Record(Schema.String, Schema.Array(Schema.String)).annotate({
|
|
62
|
+
description: 'Maps a Layer id to the Layer ids it may directly depend on. Rules are default-deny and transitive: a dependency between two Layers with no declared path between them, direct or transitive, is a violation. A Layer with no outgoing rule is a valid, intentional leaf.',
|
|
63
|
+
}),
|
|
64
|
+
}).annotate({
|
|
65
|
+
title: 'LayerGraph',
|
|
66
|
+
description: 'A named set of Rules representing one responsibility (e.g. core architecture, test boundaries). This is an organizational grouping, not an enforcement boundary — enforcement unions every Rule declared across every LayerGraph in the project.',
|
|
67
|
+
});
|
|
68
|
+
export const ProjectConfigSchema = Schema.Struct({
|
|
69
|
+
$schema: Schema.optional(Schema.String).annotate({
|
|
70
|
+
description: 'JSON Schema URL, used by editors for autocomplete and validation.',
|
|
71
|
+
}),
|
|
72
|
+
sourceRoots: Schema.Array(Schema.String)
|
|
73
|
+
.annotate({
|
|
74
|
+
description: 'Canonical project-relative files or folders that define the complete static analysis universe.',
|
|
75
|
+
})
|
|
76
|
+
.pipe(Schema.check(Schema.isMinLength(1))),
|
|
77
|
+
ignoredPaths: Schema.Array(Schema.String)
|
|
78
|
+
.annotate({
|
|
79
|
+
description: 'Canonical project-relative files or folders explicitly excluded from the analysis universe.',
|
|
80
|
+
})
|
|
81
|
+
.pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
82
|
+
storiesPath: Schema.optional(Schema.String).annotate({
|
|
83
|
+
description: 'Canonical project-relative folder holding every Story file and the index.ts entry point exposing the Story Collection. Implicitly an Ignored path.',
|
|
84
|
+
}),
|
|
85
|
+
layers: Schema.Record(Schema.String, LayerSchema)
|
|
86
|
+
.annotate({
|
|
87
|
+
description: 'Every Layer in the project, keyed by id, each owning its Modules and Module Graphs.',
|
|
88
|
+
})
|
|
89
|
+
.pipe(Schema.check(Schema.isMinProperties(1))),
|
|
90
|
+
layerGraphs: Schema.Record(Schema.String, LayerGraphSchema).annotate({
|
|
91
|
+
description: 'Every LayerGraph in the project, keyed by id. An empty set denies every cross-Layer dependency.',
|
|
92
|
+
}),
|
|
93
|
+
}).annotate({
|
|
94
|
+
title: 'Laymos Config',
|
|
95
|
+
description: "Declares a project's Layers, their Modules and Module Graphs, and its LayerGraphs.",
|
|
96
|
+
});
|
|
97
|
+
export const ConfigValidationIssueSchema = Schema.Struct({
|
|
98
|
+
kind: Schema.Literals([
|
|
99
|
+
'path',
|
|
100
|
+
'overlap',
|
|
101
|
+
'reference',
|
|
102
|
+
'cycle',
|
|
103
|
+
'module',
|
|
104
|
+
'module-graph',
|
|
105
|
+
]),
|
|
106
|
+
message: Schema.String,
|
|
107
|
+
}).annotate({
|
|
108
|
+
title: 'Config Validation Issue',
|
|
109
|
+
description: 'A single problem found while validating a Laymos Config.',
|
|
110
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const ChangeStatusSchema: Schema.Literals<readonly ["added", "modified"]>;
|
|
3
|
+
export type ChangeStatus = typeof ChangeStatusSchema.Type;
|
|
4
|
+
export declare const ChangedPathSchema: Schema.Struct<{
|
|
5
|
+
readonly path: Schema.String;
|
|
6
|
+
readonly status: Schema.Literals<readonly ["added", "modified"]>;
|
|
7
|
+
readonly committed: Schema.Boolean;
|
|
8
|
+
readonly uncommitted: Schema.Boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export type ChangedPath = typeof ChangedPathSchema.Type;
|
|
11
|
+
export declare const ChangeSetSchema: Schema.Struct<{
|
|
12
|
+
readonly baseRef: Schema.String;
|
|
13
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
14
|
+
readonly path: Schema.String;
|
|
15
|
+
readonly status: Schema.Literals<readonly ["added", "modified"]>;
|
|
16
|
+
readonly committed: Schema.Boolean;
|
|
17
|
+
readonly uncommitted: Schema.Boolean;
|
|
18
|
+
}>>;
|
|
19
|
+
}>;
|
|
20
|
+
export type ChangeSet = typeof ChangeSetSchema.Type;
|
|
21
|
+
export declare const DiffLineSchema: Schema.Struct<{
|
|
22
|
+
readonly kind: Schema.Literals<readonly ["context", "added", "removed"]>;
|
|
23
|
+
readonly content: Schema.String;
|
|
24
|
+
readonly oldNumber: Schema.optional<Schema.Number>;
|
|
25
|
+
readonly newNumber: Schema.optional<Schema.Number>;
|
|
26
|
+
}>;
|
|
27
|
+
export type DiffLine = typeof DiffLineSchema.Type;
|
|
28
|
+
export declare const DiffHunkSchema: Schema.Struct<{
|
|
29
|
+
readonly header: Schema.String;
|
|
30
|
+
readonly oldStart: Schema.Number;
|
|
31
|
+
readonly newStart: Schema.Number;
|
|
32
|
+
readonly lines: Schema.$Array<Schema.Struct<{
|
|
33
|
+
readonly kind: Schema.Literals<readonly ["context", "added", "removed"]>;
|
|
34
|
+
readonly content: Schema.String;
|
|
35
|
+
readonly oldNumber: Schema.optional<Schema.Number>;
|
|
36
|
+
readonly newNumber: Schema.optional<Schema.Number>;
|
|
37
|
+
}>>;
|
|
38
|
+
}>;
|
|
39
|
+
export type DiffHunk = typeof DiffHunkSchema.Type;
|
|
40
|
+
export declare const FileDiffSchema: Schema.Struct<{
|
|
41
|
+
readonly path: Schema.String;
|
|
42
|
+
readonly hunks: Schema.$Array<Schema.Struct<{
|
|
43
|
+
readonly header: Schema.String;
|
|
44
|
+
readonly oldStart: Schema.Number;
|
|
45
|
+
readonly newStart: Schema.Number;
|
|
46
|
+
readonly lines: Schema.$Array<Schema.Struct<{
|
|
47
|
+
readonly kind: Schema.Literals<readonly ["context", "added", "removed"]>;
|
|
48
|
+
readonly content: Schema.String;
|
|
49
|
+
readonly oldNumber: Schema.optional<Schema.Number>;
|
|
50
|
+
readonly newNumber: Schema.optional<Schema.Number>;
|
|
51
|
+
}>>;
|
|
52
|
+
}>>;
|
|
53
|
+
}>;
|
|
54
|
+
export type FileDiff = typeof FileDiffSchema.Type;
|
|
55
|
+
//# sourceMappingURL=change-set-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-set-schema.d.ts","sourceRoot":"","sources":["../../src/change-set-schema/change-set-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,eAAO,MAAM,kBAAkB,iDAAyC,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;EAS5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;EAO1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AAEpD,eAAO,MAAM,cAAc;;;;;EASzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAElD,eAAO,MAAM,cAAc;;;;;;;;;;EAQzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAElD,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAOzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export const ChangeStatusSchema = Schema.Literals(['added', 'modified']);
|
|
3
|
+
export const ChangedPathSchema = Schema.Struct({
|
|
4
|
+
path: Schema.String,
|
|
5
|
+
status: ChangeStatusSchema,
|
|
6
|
+
committed: Schema.Boolean,
|
|
7
|
+
uncommitted: Schema.Boolean,
|
|
8
|
+
}).annotate({
|
|
9
|
+
title: 'Changed Path',
|
|
10
|
+
description: "One path a Base ref changed, relative to the Config's folder, and how it changed. A path may carry both committed work since the Base ref and uncommitted work in the working tree.",
|
|
11
|
+
});
|
|
12
|
+
export const ChangeSetSchema = Schema.Struct({
|
|
13
|
+
baseRef: Schema.String,
|
|
14
|
+
files: Schema.Array(ChangedPathSchema),
|
|
15
|
+
}).annotate({
|
|
16
|
+
title: 'Change Set',
|
|
17
|
+
description: "The added and modified paths between a Base ref and the working tree, relative to the Config's folder. It decorates an Architecture Analysis and never alters the analysis universe.",
|
|
18
|
+
});
|
|
19
|
+
export const DiffLineSchema = Schema.Struct({
|
|
20
|
+
kind: Schema.Literals(['context', 'added', 'removed']),
|
|
21
|
+
content: Schema.String,
|
|
22
|
+
oldNumber: Schema.optional(Schema.Number),
|
|
23
|
+
newNumber: Schema.optional(Schema.Number),
|
|
24
|
+
}).annotate({
|
|
25
|
+
title: 'Diff Line',
|
|
26
|
+
description: 'One line of a Diff hunk, numbered in the side of the file it belongs to.',
|
|
27
|
+
});
|
|
28
|
+
export const DiffHunkSchema = Schema.Struct({
|
|
29
|
+
header: Schema.String,
|
|
30
|
+
oldStart: Schema.Number,
|
|
31
|
+
newStart: Schema.Number,
|
|
32
|
+
lines: Schema.Array(DiffLineSchema),
|
|
33
|
+
}).annotate({
|
|
34
|
+
title: 'Diff Hunk',
|
|
35
|
+
description: 'One contiguous changed region of a modified path.',
|
|
36
|
+
});
|
|
37
|
+
export const FileDiffSchema = Schema.Struct({
|
|
38
|
+
path: Schema.String,
|
|
39
|
+
hunks: Schema.Array(DiffHunkSchema),
|
|
40
|
+
}).annotate({
|
|
41
|
+
title: 'File Diff',
|
|
42
|
+
description: 'The changed regions of one modified path between a Base ref and the working tree, parsed into hunks and numbered lines.',
|
|
43
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ChangedPathSchema, ChangeSetSchema, ChangeStatusSchema, DiffHunkSchema, DiffLineSchema, FileDiffSchema, } from './change-set-schema.js';
|
|
2
|
+
export type { ChangedPath, ChangeSet, ChangeStatus, DiffHunk, DiffLine, FileDiff, } from './change-set-schema.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/change-set-schema/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,wBAAwB,CAAC"}
|
package/dist/cli/cli.js
CHANGED
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
import * as NodeRuntime from '@effect/platform-node/NodeRuntime';
|
|
4
4
|
import * as NodeServices from '@effect/platform-node/NodeServices';
|
|
5
|
+
import { ModuleInspectionCycle } from '../orchestrator/inspect/index.js';
|
|
6
|
+
import { renderOperationalError } from './errors.js';
|
|
5
7
|
import { cli } from './run.js';
|
|
6
|
-
cli.pipe(Effect.provide(NodeServices.layer),
|
|
8
|
+
cli.pipe(Effect.provide(NodeServices.layer), Effect.catch((error) => Effect.sync(() => {
|
|
9
|
+
console.error(renderOperationalError(error));
|
|
10
|
+
process.exitCode = error instanceof ModuleInspectionCycle ? 1 : 2;
|
|
11
|
+
})), NodeRuntime.runMain());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-tree.d.ts","sourceRoot":"","sources":["../../../src/cli/deps/dependency-tree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,kCAAkC,CAAC;AAG1C,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,MAAM,CAIR"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as colors from 'yoctocolors';
|
|
2
|
+
import { groupByPath } from '../../domain/file-graph/index.js';
|
|
3
|
+
export function renderDependencyTree(target, entries) {
|
|
4
|
+
return [renderLegend(), '', ...renderRoot(groupByPath(target, entries))].join('\n');
|
|
5
|
+
}
|
|
6
|
+
// A lone root drawn with a "└── " connector reads oddly when it's the only
|
|
7
|
+
// thing at that level (nothing else for the connector to distinguish it
|
|
8
|
+
// from) — print it bare and start the connectors one level down instead.
|
|
9
|
+
function renderRoot(nodes) {
|
|
10
|
+
if (nodes.length !== 1)
|
|
11
|
+
return renderNodes(nodes, '');
|
|
12
|
+
const root = nodes[0];
|
|
13
|
+
const label = root.kind === undefined ? root.name : colorize(root.name, root.kind);
|
|
14
|
+
return [label, ...renderNodes(root.children, '')];
|
|
15
|
+
}
|
|
16
|
+
function renderLegend() {
|
|
17
|
+
return [
|
|
18
|
+
`${colors.green('■')} target`,
|
|
19
|
+
`${colors.yellow('■')} direct dependency`,
|
|
20
|
+
`${colors.gray('■')} transitive dependency`,
|
|
21
|
+
].join(' ');
|
|
22
|
+
}
|
|
23
|
+
function renderNodes(nodes, prefix) {
|
|
24
|
+
return nodes.flatMap((node, index) => {
|
|
25
|
+
const isLast = index === nodes.length - 1;
|
|
26
|
+
const connector = isLast ? '└── ' : '├── ';
|
|
27
|
+
const childPrefix = prefix + (isLast ? ' ' : '│ ');
|
|
28
|
+
const label = node.kind === undefined ? node.name : colorize(node.name, node.kind);
|
|
29
|
+
return [
|
|
30
|
+
`${prefix}${connector}${label}`,
|
|
31
|
+
...renderNodes(node.children, childPrefix),
|
|
32
|
+
];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function colorize(label, kind) {
|
|
36
|
+
if (kind === 'target')
|
|
37
|
+
return colors.green(label);
|
|
38
|
+
return kind === 'direct' ? colors.yellow(label) : colors.gray(label);
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { Command } from 'effect/unstable/cli';
|
|
3
|
+
export declare function makeDepsCommand<R>(configPath: Effect.Effect<string, never, R>): Command.Command<"deps", {
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly recursive: boolean;
|
|
6
|
+
}, {}, import("../../index.js").ConfigError | import("../../index.js").CruiseError | import("../../orchestrator/query-dependencies/query-dependencies.js").DependencyTargetNotFound, Exclude<R, "effect/unstable/cli/GlobalFlag/log-level">>;
|
|
7
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../src/cli/deps/deps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAc9D,wBAAgB,eAAe,CAAC,CAAC,EAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;;;6OAyB5C"}
|