laymos 0.0.1 → 0.0.3
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-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/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/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/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/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/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/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/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/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -1
- 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/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/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/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/config/define-config.d.ts +0 -3
- package/dist/config/define-config.d.ts.map +0 -1
- package/dist/config/define-config.js +0 -228
- package/dist/config/index.d.ts +0 -5
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -4
- package/dist/config/layer-graph.d.ts +0 -7
- package/dist/config/layer-graph.d.ts.map +0 -1
- package/dist/config/layer-graph.js +0 -53
- package/dist/config/layer.d.ts +0 -5
- package/dist/config/layer.d.ts.map +0 -1
- package/dist/config/layer.js +0 -21
- package/dist/config/module.d.ts +0 -9
- package/dist/config/module.d.ts.map +0 -1
- package/dist/config/module.js +0 -29
- package/dist/config/path.d.ts +0 -4
- package/dist/config/path.d.ts.map +0 -1
- package/dist/config/path.js +0 -32
- package/dist/config/types.d.ts +0 -36
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js +0 -1
- package/dist/engine/1-extract/extract.d.ts +0 -12
- package/dist/engine/1-extract/extract.d.ts.map +0 -1
- package/dist/engine/1-extract/extract.js +0 -160
- 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 +0 -24
- package/dist/engine/2-resolve/resolve.d.ts.map +0 -1
- package/dist/engine/2-resolve/resolve.js +0 -74
- package/dist/engine/3-evaluate/evaluate.d.ts +0 -10
- package/dist/engine/3-evaluate/evaluate.d.ts.map +0 -1
- package/dist/engine/3-evaluate/evaluate.js +0 -80
- 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/emit.js +0 -77
- 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/engine/errors.js +0 -5
- package/dist/node.d.ts +0 -24
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -139
- package/dist/report/architecture.d.ts +0 -104
- package/dist/report/architecture.d.ts.map +0 -1
- package/dist/report/architecture.js +0 -1
- package/dist/report/index.d.ts +0 -3
- package/dist/report/index.d.ts.map +0 -1
- package/dist/report/index.js +0 -2
- 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
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export function edge(from, to) {
|
|
2
|
-
if (Array.isArray(to)) {
|
|
3
|
-
if (to.length === 0) {
|
|
4
|
-
throw new Error(`Edge from "${from.name}" must have at least 1 target`);
|
|
5
|
-
}
|
|
6
|
-
return to.map((target) => singleEdge(from, target));
|
|
7
|
-
}
|
|
8
|
-
return singleEdge(from, to);
|
|
9
|
-
}
|
|
10
|
-
function singleEdge(from, to) {
|
|
11
|
-
if (from === to || from.name === to.name) {
|
|
12
|
-
throw new Error(`Edge "${from.name} -> ${to.name}" is a self-edge`);
|
|
13
|
-
}
|
|
14
|
-
return { from, to };
|
|
15
|
-
}
|
|
16
|
-
export function layerGraph(name, edges, options) {
|
|
17
|
-
if (name.length === 0) {
|
|
18
|
-
throw new Error('Graph name must not be empty');
|
|
19
|
-
}
|
|
20
|
-
const flatEdges = edges.flat();
|
|
21
|
-
if (flatEdges.length === 0) {
|
|
22
|
-
throw new Error(`Graph "${name}" must have at least 1 edge`);
|
|
23
|
-
}
|
|
24
|
-
const layers = [];
|
|
25
|
-
const seen = new Map();
|
|
26
|
-
const seenEdges = new Set();
|
|
27
|
-
for (const e of flatEdges) {
|
|
28
|
-
for (const l of [e.from, e.to]) {
|
|
29
|
-
const existing = seen.get(l.name);
|
|
30
|
-
if (existing && existing !== l) {
|
|
31
|
-
throw new Error(`Graph "${name}" has duplicate layer name "${l.name}" with different definitions`);
|
|
32
|
-
}
|
|
33
|
-
if (!existing) {
|
|
34
|
-
seen.set(l.name, l);
|
|
35
|
-
layers.push(l);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const key = `${e.from.name}\0${e.to.name}`;
|
|
39
|
-
if (seenEdges.has(key)) {
|
|
40
|
-
throw new Error(`Graph "${name}" has duplicate edge "${e.from.name} -> ${e.to.name}"`);
|
|
41
|
-
}
|
|
42
|
-
seenEdges.add(key);
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
kind: 'layer-graph',
|
|
46
|
-
name,
|
|
47
|
-
layers,
|
|
48
|
-
edges: flatEdges,
|
|
49
|
-
...(options?.description !== undefined
|
|
50
|
-
? { description: options.description }
|
|
51
|
-
: {}),
|
|
52
|
-
};
|
|
53
|
-
}
|
package/dist/config/layer.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../src/config/layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,KAAK,CAmBP"}
|
package/dist/config/layer.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { normalizeConfigPath } from './path.js';
|
|
2
|
-
export function layer(name, paths, options) {
|
|
3
|
-
if (name.length === 0) {
|
|
4
|
-
throw new Error('Layer name must not be empty');
|
|
5
|
-
}
|
|
6
|
-
if (paths.length === 0) {
|
|
7
|
-
throw new Error(`Layer "${name}" must have at least 1 path`);
|
|
8
|
-
}
|
|
9
|
-
const normalizedPaths = paths.map(normalizeConfigPath);
|
|
10
|
-
if (new Set(normalizedPaths).size !== normalizedPaths.length) {
|
|
11
|
-
throw new Error(`Layer "${name}" contains duplicate paths`);
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
kind: 'layer',
|
|
15
|
-
name,
|
|
16
|
-
paths: normalizedPaths,
|
|
17
|
-
...(options?.description !== undefined
|
|
18
|
-
? { description: options.description }
|
|
19
|
-
: {}),
|
|
20
|
-
};
|
|
21
|
-
}
|
package/dist/config/module.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ModuleDef, ModuleRules } from './types.js';
|
|
2
|
-
export declare function module(path: string, options?: {
|
|
3
|
-
description?: string;
|
|
4
|
-
}): ModuleDef;
|
|
5
|
-
export declare function rules(module: ModuleDef, constraints: {
|
|
6
|
-
canImport?: readonly ModuleDef[];
|
|
7
|
-
canImportedBy?: readonly ModuleDef[];
|
|
8
|
-
}): ModuleRules;
|
|
9
|
-
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/config/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzD,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,SAAS,CAWX;AAED,wBAAgB,KAAK,CACnB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE;IACX,SAAS,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CACtC,GACA,WAAW,CAmBb"}
|
package/dist/config/module.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { normalizeConfigPath } from './path.js';
|
|
2
|
-
export function module(path, options) {
|
|
3
|
-
if (path.length === 0) {
|
|
4
|
-
throw new Error('Module path must not be empty');
|
|
5
|
-
}
|
|
6
|
-
return {
|
|
7
|
-
kind: 'module',
|
|
8
|
-
path: normalizeConfigPath(path),
|
|
9
|
-
...(options?.description !== undefined
|
|
10
|
-
? { description: options.description }
|
|
11
|
-
: {}),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export function rules(module, constraints) {
|
|
15
|
-
if (constraints.canImport === undefined &&
|
|
16
|
-
constraints.canImportedBy === undefined) {
|
|
17
|
-
throw new Error(`Rules for module "${module.path}" must declare canImport or canImportedBy`);
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
kind: 'module-rules',
|
|
21
|
-
module,
|
|
22
|
-
...(constraints.canImport !== undefined
|
|
23
|
-
? { canImport: constraints.canImport }
|
|
24
|
-
: {}),
|
|
25
|
-
...(constraints.canImportedBy !== undefined
|
|
26
|
-
? { canImportedBy: constraints.canImportedBy }
|
|
27
|
-
: {}),
|
|
28
|
-
};
|
|
29
|
-
}
|
package/dist/config/path.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/config/path.ts"],"names":[],"mappings":"AAGA,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA0BxD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEnE"}
|
package/dist/config/path.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const globSyntax = /[*?{}[\]]/;
|
|
2
|
-
const windowsAbsolutePath = /^[a-zA-Z]:\//;
|
|
3
|
-
/** Converts a configured path to project-root-relative POSIX form. */
|
|
4
|
-
export function normalizeConfigPath(path) {
|
|
5
|
-
if (path.length === 0) {
|
|
6
|
-
throw new Error('Path must not be empty');
|
|
7
|
-
}
|
|
8
|
-
const unixPath = path.replaceAll('\\', '/');
|
|
9
|
-
if (unixPath.startsWith('/') || windowsAbsolutePath.test(unixPath)) {
|
|
10
|
-
throw new Error(`Path "${path}" must be relative to the project root`);
|
|
11
|
-
}
|
|
12
|
-
if (globSyntax.test(unixPath)) {
|
|
13
|
-
throw new Error(`Path "${path}" must be a plain path, not a glob`);
|
|
14
|
-
}
|
|
15
|
-
const segments = [];
|
|
16
|
-
for (const segment of unixPath.split('/')) {
|
|
17
|
-
if (segment.length === 0 || segment === '.')
|
|
18
|
-
continue;
|
|
19
|
-
if (segment === '..') {
|
|
20
|
-
if (segments.length === 0) {
|
|
21
|
-
throw new Error(`Path "${path}" escapes the project root`);
|
|
22
|
-
}
|
|
23
|
-
segments.pop();
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
segments.push(segment);
|
|
27
|
-
}
|
|
28
|
-
return segments.join('/') || '.';
|
|
29
|
-
}
|
|
30
|
-
export function pathContains(parent, child) {
|
|
31
|
-
return parent === '.' || child === parent || child.startsWith(`${parent}/`);
|
|
32
|
-
}
|
package/dist/config/types.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface Layer {
|
|
2
|
-
readonly kind: 'layer';
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly paths: readonly string[];
|
|
5
|
-
readonly description?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface LayerEdge {
|
|
8
|
-
readonly from: Layer;
|
|
9
|
-
readonly to: Layer;
|
|
10
|
-
}
|
|
11
|
-
export interface LayerGraph {
|
|
12
|
-
readonly kind: 'layer-graph';
|
|
13
|
-
readonly name: string;
|
|
14
|
-
readonly layers: readonly Layer[];
|
|
15
|
-
readonly edges: readonly LayerEdge[];
|
|
16
|
-
readonly description?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ModuleDef {
|
|
19
|
-
readonly kind: 'module';
|
|
20
|
-
readonly path: string;
|
|
21
|
-
readonly description?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ModuleRules {
|
|
24
|
-
readonly kind: 'module-rules';
|
|
25
|
-
readonly module: ModuleDef;
|
|
26
|
-
readonly canImport?: readonly ModuleDef[];
|
|
27
|
-
readonly canImportedBy?: readonly ModuleDef[];
|
|
28
|
-
}
|
|
29
|
-
export interface LaymosConfig {
|
|
30
|
-
readonly sourceRoots: readonly string[];
|
|
31
|
-
readonly graphs: readonly LayerGraph[];
|
|
32
|
-
readonly modules?: readonly ModuleDef[];
|
|
33
|
-
readonly moduleRules?: readonly ModuleRules[];
|
|
34
|
-
readonly ignore?: readonly string[];
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC"}
|
package/dist/config/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import { ExtractError } from '../errors.js';
|
|
3
|
-
export interface FileNode {
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly imports: readonly string[];
|
|
6
|
-
}
|
|
7
|
-
export interface FileGraph {
|
|
8
|
-
readonly files: Readonly<Record<string, FileNode>>;
|
|
9
|
-
}
|
|
10
|
-
/** Extracts configured source roots with skott and type-only tracking enabled. */
|
|
11
|
-
export declare function extractFileGraph(baseDir: string, sourceRoots: readonly string[], ignoredPaths?: readonly string[]): Effect.Effect<FileGraph, ExtractError>;
|
|
12
|
-
//# sourceMappingURL=extract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/engine/1-extract/extract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACpD;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,YAAY,GAAE,SAAS,MAAM,EAAO,GACnC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,CAgExC"}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { readdir, stat } from 'node:fs/promises';
|
|
2
|
-
import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
3
|
-
import { Effect } from 'effect';
|
|
4
|
-
import skott from 'skott';
|
|
5
|
-
import { pathContains } from '../../config/path.js';
|
|
6
|
-
import { ExtractError } from '../errors.js';
|
|
7
|
-
/** Extracts configured source roots with skott and type-only tracking enabled. */
|
|
8
|
-
export function extractFileGraph(baseDir, sourceRoots, ignoredPaths = []) {
|
|
9
|
-
return Effect.tryPromise({
|
|
10
|
-
try: async () => {
|
|
11
|
-
const inventoryFiles = await listSourceFiles(baseDir, sourceRoots);
|
|
12
|
-
const eligibleFiles = inventoryFiles.filter((path) => !ignoredPaths.some((ignored) => pathContains(ignored, path)));
|
|
13
|
-
const eligible = new Set(eligibleFiles);
|
|
14
|
-
const imports = new Map(inventoryFiles.map((path) => [path, new Set()]));
|
|
15
|
-
const extracted = new Set();
|
|
16
|
-
for (const sourceRoot of sourceRoots) {
|
|
17
|
-
const absolute = resolve(baseDir, sourceRoot);
|
|
18
|
-
const sourceRootStat = await statOrUndefined(absolute);
|
|
19
|
-
if (sourceRootStat === undefined)
|
|
20
|
-
continue;
|
|
21
|
-
if (sourceRootStat.isFile() && !eligible.has(sourceRoot))
|
|
22
|
-
continue;
|
|
23
|
-
if (!sourceRootStat.isFile() && !sourceRootStat.isDirectory())
|
|
24
|
-
continue;
|
|
25
|
-
const structure = sourceRootStat.isFile()
|
|
26
|
-
? await runSkott({ baseDir, ignoredPaths, entrypoint: absolute })
|
|
27
|
-
: await runSkott({ baseDir, ignoredPaths, cwd: absolute });
|
|
28
|
-
const resolutionBase = sourceRootStat.isFile()
|
|
29
|
-
? dirname(absolute)
|
|
30
|
-
: absolute;
|
|
31
|
-
for (const path of collectExtractedGraph({
|
|
32
|
-
baseDir,
|
|
33
|
-
eligible,
|
|
34
|
-
graph: structure.graph,
|
|
35
|
-
imports,
|
|
36
|
-
resolutionBase,
|
|
37
|
-
})) {
|
|
38
|
-
extracted.add(path);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
for (const path of eligibleFiles) {
|
|
42
|
-
if (extracted.has(path))
|
|
43
|
-
continue;
|
|
44
|
-
const entrypoint = resolve(baseDir, path);
|
|
45
|
-
const structure = await runSkott({
|
|
46
|
-
baseDir,
|
|
47
|
-
ignoredPaths,
|
|
48
|
-
entrypoint,
|
|
49
|
-
});
|
|
50
|
-
collectExtractedGraph({
|
|
51
|
-
baseDir,
|
|
52
|
-
eligible,
|
|
53
|
-
graph: structure.graph,
|
|
54
|
-
imports,
|
|
55
|
-
resolutionBase: dirname(entrypoint),
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
files: Object.fromEntries(inventoryFiles.map((path) => [
|
|
60
|
-
path,
|
|
61
|
-
{ path, imports: [...imports.get(path)].sort() },
|
|
62
|
-
])),
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
catch: (cause) => new ExtractError({ baseDir, cause }),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
async function runSkott({ baseDir, ignoredPaths, entrypoint, cwd, }) {
|
|
69
|
-
const { getStructure } = await skott({
|
|
70
|
-
...(entrypoint === undefined ? { cwd: cwd ?? baseDir } : { entrypoint }),
|
|
71
|
-
ignorePatterns: ignoredPaths.flatMap((path) => {
|
|
72
|
-
const absolute = toPosixPath(resolve(baseDir, path));
|
|
73
|
-
return [absolute, `${absolute}/**`];
|
|
74
|
-
}),
|
|
75
|
-
tsConfigPath: resolve(baseDir, 'tsconfig.json'),
|
|
76
|
-
dependencyTracking: {
|
|
77
|
-
builtin: false,
|
|
78
|
-
thirdParty: false,
|
|
79
|
-
typeOnly: true,
|
|
80
|
-
},
|
|
81
|
-
fileExtensions: [...sourceExtensions],
|
|
82
|
-
incremental: false,
|
|
83
|
-
});
|
|
84
|
-
return getStructure();
|
|
85
|
-
}
|
|
86
|
-
function collectExtractedGraph({ baseDir, eligible, graph, imports, resolutionBase, }) {
|
|
87
|
-
const extracted = new Set();
|
|
88
|
-
for (const node of Object.values(graph)) {
|
|
89
|
-
const from = findEligiblePath(baseDir, node.id, eligible, resolutionBase);
|
|
90
|
-
if (from === undefined)
|
|
91
|
-
continue;
|
|
92
|
-
extracted.add(from);
|
|
93
|
-
for (const adjacent of node.adjacentTo) {
|
|
94
|
-
const to = findEligiblePath(baseDir, adjacent, eligible, resolutionBase);
|
|
95
|
-
if (to !== undefined)
|
|
96
|
-
imports.get(from).add(to);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return extracted;
|
|
100
|
-
}
|
|
101
|
-
const sourceExtensions = ['.js', '.jsx', '.mjs', '.cjs', '.ts', '.tsx'];
|
|
102
|
-
async function listSourceFiles(baseDir, sourceRoots) {
|
|
103
|
-
const files = new Set();
|
|
104
|
-
for (const sourceRoot of sourceRoots) {
|
|
105
|
-
const absolute = resolve(baseDir, sourceRoot);
|
|
106
|
-
const sourceRootStat = await statOrUndefined(absolute);
|
|
107
|
-
if (sourceRootStat?.isFile()) {
|
|
108
|
-
if (isSupportedSourceFile(sourceRoot))
|
|
109
|
-
files.add(sourceRoot);
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
if (!sourceRootStat?.isDirectory())
|
|
113
|
-
continue;
|
|
114
|
-
const entries = await readdir(absolute, {
|
|
115
|
-
recursive: true,
|
|
116
|
-
withFileTypes: true,
|
|
117
|
-
});
|
|
118
|
-
for (const entry of entries) {
|
|
119
|
-
if (!entry.isFile() || !isSupportedSourceFile(entry.name))
|
|
120
|
-
continue;
|
|
121
|
-
files.add(toPosixPath(relative(baseDir, join(entry.parentPath, entry.name))));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return [...files].sort();
|
|
125
|
-
}
|
|
126
|
-
async function statOrUndefined(path) {
|
|
127
|
-
try {
|
|
128
|
-
return await stat(path);
|
|
129
|
-
}
|
|
130
|
-
catch (cause) {
|
|
131
|
-
if (typeof cause === 'object' &&
|
|
132
|
-
cause !== null &&
|
|
133
|
-
'code' in cause &&
|
|
134
|
-
cause.code === 'ENOENT') {
|
|
135
|
-
return undefined;
|
|
136
|
-
}
|
|
137
|
-
throw cause;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
function isSupportedSourceFile(path) {
|
|
141
|
-
return (sourceExtensions.some((extension) => path.endsWith(extension)) &&
|
|
142
|
-
!path.endsWith('.d.ts') &&
|
|
143
|
-
!/\.min\.(?:[cm]?js|jsx)$/.test(path));
|
|
144
|
-
}
|
|
145
|
-
function findEligiblePath(baseDir, path, eligible, resolutionBase) {
|
|
146
|
-
const absoluteCandidates = isAbsolute(path)
|
|
147
|
-
? [path]
|
|
148
|
-
: [
|
|
149
|
-
resolve(process.cwd(), path),
|
|
150
|
-
...(resolutionBase === undefined
|
|
151
|
-
? []
|
|
152
|
-
: [resolve(resolutionBase, path)]),
|
|
153
|
-
];
|
|
154
|
-
return absoluteCandidates
|
|
155
|
-
.map((candidate) => toPosixPath(relative(baseDir, candidate)))
|
|
156
|
-
.find((candidate) => eligible.has(candidate));
|
|
157
|
-
}
|
|
158
|
-
function toPosixPath(path) {
|
|
159
|
-
return sep === '/' ? path : path.split(sep).join('/');
|
|
160
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engine/1-extract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { extractFileGraph } from './extract.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engine/2-resolve/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveProject } from './resolve.js';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import type { LaymosConfig } from '../../config/types.js';
|
|
3
|
-
import type { FileGraph } from '../1-extract/index.js';
|
|
4
|
-
export type ResolvedFile = {
|
|
5
|
-
readonly kind: 'ignored';
|
|
6
|
-
readonly path: string;
|
|
7
|
-
} | {
|
|
8
|
-
readonly kind: 'uncovered';
|
|
9
|
-
readonly path: string;
|
|
10
|
-
} | {
|
|
11
|
-
readonly kind: 'covered';
|
|
12
|
-
readonly path: string;
|
|
13
|
-
readonly layer: string;
|
|
14
|
-
readonly module?: string;
|
|
15
|
-
};
|
|
16
|
-
export interface ResolvedProject {
|
|
17
|
-
readonly config: LaymosConfig;
|
|
18
|
-
readonly fileGraph: FileGraph;
|
|
19
|
-
readonly files: Readonly<Record<string, ResolvedFile>>;
|
|
20
|
-
readonly reachability: Readonly<Record<string, readonly string[]>>;
|
|
21
|
-
}
|
|
22
|
-
/** Assigns files to layers and modules; validation happens in defineConfig. */
|
|
23
|
-
export declare function resolveProject(config: LaymosConfig, fileGraph: FileGraph): Effect.Effect<ResolvedProject>;
|
|
24
|
-
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/engine/2-resolve/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CACpE;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CA4DhC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import { pathContains } from '../../config/path.js';
|
|
3
|
-
/** Assigns files to layers and modules; validation happens in defineConfig. */
|
|
4
|
-
export function resolveProject(config, fileGraph) {
|
|
5
|
-
const layers = [
|
|
6
|
-
...new Set(config.graphs.flatMap((graph) => [...graph.layers])),
|
|
7
|
-
];
|
|
8
|
-
const files = {};
|
|
9
|
-
for (const path of Object.keys(fileGraph.files).sort()) {
|
|
10
|
-
if ((config.ignore ?? []).some((ignored) => pathContains(ignored, path))) {
|
|
11
|
-
files[path] = { kind: 'ignored', path };
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
const layer = layers
|
|
15
|
-
.flatMap((candidate) => candidate.paths
|
|
16
|
-
.filter((prefix) => pathContains(prefix, path))
|
|
17
|
-
.map((prefix) => ({ candidate, prefix })))
|
|
18
|
-
.sort((a, b) => b.prefix.length - a.prefix.length)[0]?.candidate;
|
|
19
|
-
if (layer === undefined) {
|
|
20
|
-
files[path] = { kind: 'uncovered', path };
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const module = (config.modules ?? []).find((candidate) => pathContains(candidate.path, path));
|
|
24
|
-
files[path] = {
|
|
25
|
-
kind: 'covered',
|
|
26
|
-
path,
|
|
27
|
-
layer: layer.name,
|
|
28
|
-
...(module !== undefined ? { module: module.path } : {}),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const visibleFileGraph = {
|
|
32
|
-
files: Object.fromEntries(Object.entries(fileGraph.files).map(([path, node]) => [
|
|
33
|
-
path,
|
|
34
|
-
{
|
|
35
|
-
path,
|
|
36
|
-
imports: files[path]?.kind === 'ignored'
|
|
37
|
-
? []
|
|
38
|
-
: node.imports.filter((target) => files[target]?.kind !== 'ignored'),
|
|
39
|
-
},
|
|
40
|
-
])),
|
|
41
|
-
};
|
|
42
|
-
return Effect.succeed({
|
|
43
|
-
config,
|
|
44
|
-
fileGraph: visibleFileGraph,
|
|
45
|
-
files,
|
|
46
|
-
reachability: buildReachability(config),
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function buildReachability(config) {
|
|
50
|
-
const adjacency = new Map();
|
|
51
|
-
for (const graph of config.graphs) {
|
|
52
|
-
for (const layer of graph.layers) {
|
|
53
|
-
if (!adjacency.has(layer.name))
|
|
54
|
-
adjacency.set(layer.name, new Set());
|
|
55
|
-
}
|
|
56
|
-
for (const edge of graph.edges) {
|
|
57
|
-
adjacency.get(edge.from.name).add(edge.to.name);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const reachability = {};
|
|
61
|
-
for (const layer of adjacency.keys()) {
|
|
62
|
-
const reached = new Set();
|
|
63
|
-
const pending = [...(adjacency.get(layer) ?? [])];
|
|
64
|
-
while (pending.length > 0) {
|
|
65
|
-
const next = pending.pop();
|
|
66
|
-
if (reached.has(next))
|
|
67
|
-
continue;
|
|
68
|
-
reached.add(next);
|
|
69
|
-
pending.push(...(adjacency.get(next) ?? []));
|
|
70
|
-
}
|
|
71
|
-
reachability[layer] = [...reached].sort();
|
|
72
|
-
}
|
|
73
|
-
return reachability;
|
|
74
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import type { Coverage, LayerCoverage, LayerViolation, ModuleCoverage, ModuleViolation, Violation } from '../../report/index.js';
|
|
3
|
-
import type { ResolvedProject } from '../2-resolve/index.js';
|
|
4
|
-
export type { Coverage, LayerCoverage, LayerViolation, ModuleCoverage, ModuleViolation, Violation, };
|
|
5
|
-
export interface Evaluation {
|
|
6
|
-
readonly violations: readonly Violation[];
|
|
7
|
-
readonly coverage: Coverage;
|
|
8
|
-
}
|
|
9
|
-
export declare function evaluateRules(resolved: ResolvedProject): Effect.Effect<Evaluation>;
|
|
10
|
-
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../src/engine/3-evaluate/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,YAAY,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,GACV,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,GACxB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAoG3B"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
export function evaluateRules(resolved) {
|
|
3
|
-
const violations = [];
|
|
4
|
-
const rules = new Map((resolved.config.moduleRules ?? []).map((rule) => [rule.module.path, rule]));
|
|
5
|
-
for (const fromPath of Object.keys(resolved.fileGraph.files).sort()) {
|
|
6
|
-
const from = resolved.files[fromPath];
|
|
7
|
-
if (from?.kind !== 'covered')
|
|
8
|
-
continue;
|
|
9
|
-
for (const toPath of resolved.fileGraph.files[fromPath].imports) {
|
|
10
|
-
const to = resolved.files[toPath];
|
|
11
|
-
if (to?.kind !== 'covered')
|
|
12
|
-
continue;
|
|
13
|
-
if (from.layer !== to.layer &&
|
|
14
|
-
!(resolved.reachability[from.layer] ?? []).includes(to.layer)) {
|
|
15
|
-
violations.push({
|
|
16
|
-
kind: 'layer',
|
|
17
|
-
from: { layer: from.layer, file: fromPath },
|
|
18
|
-
to: { layer: to.layer, file: toPath },
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (from.module === undefined ||
|
|
22
|
-
to.module === undefined ||
|
|
23
|
-
from.module === to.module) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const fromRule = rules.get(from.module);
|
|
27
|
-
if (fromRule?.canImport !== undefined &&
|
|
28
|
-
!fromRule.canImport.some((module) => module.path === to.module)) {
|
|
29
|
-
violations.push({
|
|
30
|
-
kind: 'module',
|
|
31
|
-
rule: 'canImport',
|
|
32
|
-
from: { module: from.module, layer: from.layer, file: fromPath },
|
|
33
|
-
to: { module: to.module, layer: to.layer, file: toPath },
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
const toRule = rules.get(to.module);
|
|
37
|
-
if (toRule?.canImportedBy !== undefined &&
|
|
38
|
-
!toRule.canImportedBy.some((module) => module.path === from.module)) {
|
|
39
|
-
violations.push({
|
|
40
|
-
kind: 'module',
|
|
41
|
-
rule: 'canImportedBy',
|
|
42
|
-
from: { module: from.module, layer: from.layer, file: fromPath },
|
|
43
|
-
to: { module: to.module, layer: to.layer, file: toPath },
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const visibleFiles = Object.values(resolved.files).filter((file) => file.kind !== 'ignored');
|
|
49
|
-
const coveredFiles = visibleFiles.filter((file) => file.kind === 'covered');
|
|
50
|
-
const uncoveredFiles = visibleFiles
|
|
51
|
-
.filter((file) => file.kind === 'uncovered')
|
|
52
|
-
.map((file) => file.path)
|
|
53
|
-
.sort();
|
|
54
|
-
const layerNames = [
|
|
55
|
-
...new Set(resolved.config.graphs.flatMap((graph) => graph.layers.map((layer) => layer.name))),
|
|
56
|
-
];
|
|
57
|
-
return Effect.succeed({
|
|
58
|
-
violations,
|
|
59
|
-
coverage: {
|
|
60
|
-
layers: {
|
|
61
|
-
totalFiles: visibleFiles.length,
|
|
62
|
-
coveredFiles: coveredFiles.length,
|
|
63
|
-
uncovered: uncoveredFiles,
|
|
64
|
-
},
|
|
65
|
-
modules: layerNames.map((layer) => {
|
|
66
|
-
const layerFiles = coveredFiles.filter((file) => file.layer === layer);
|
|
67
|
-
const uncovered = layerFiles
|
|
68
|
-
.filter((file) => file.module === undefined)
|
|
69
|
-
.map((file) => file.path)
|
|
70
|
-
.sort();
|
|
71
|
-
return {
|
|
72
|
-
layer,
|
|
73
|
-
totalFiles: layerFiles.length,
|
|
74
|
-
coveredFiles: layerFiles.length - uncovered.length,
|
|
75
|
-
uncovered,
|
|
76
|
-
};
|
|
77
|
-
}),
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engine/3-evaluate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { evaluateRules } from './evaluate.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import type { AnalysisWarning, LaymosReport } from '../../report/index.js';
|
|
3
|
-
import type { ResolvedProject } from '../2-resolve/index.js';
|
|
4
|
-
import type { Evaluation } from '../3-evaluate/index.js';
|
|
5
|
-
/** Emits the canonical, serializable result of Laymos analysis. */
|
|
6
|
-
export declare function emitReport(resolved: ResolvedProject, evaluation: Evaluation, warnings?: readonly AnalysisWarning[]): Effect.Effect<LaymosReport>;
|
|
7
|
-
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../../src/engine/4-emit/emit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAKb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuEzD,mEAAmE;AACnE,wBAAgB,UAAU,CACxB,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,UAAU,EACtB,QAAQ,GAAE,SAAS,eAAe,EAAO,GACxC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAS7B"}
|