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,63 +0,0 @@
|
|
|
1
|
-
import type { SourceLocation } from './recorder.js';
|
|
2
|
-
import type { StoryGroupMeta, StoryMeta } from './types.js';
|
|
3
|
-
export type ScenarioExpectation = {
|
|
4
|
-
readonly kind: 'success';
|
|
5
|
-
readonly verify: (value: unknown, prepared: unknown) => unknown;
|
|
6
|
-
} | {
|
|
7
|
-
readonly kind: 'error';
|
|
8
|
-
readonly verify: (error: unknown, prepared: unknown) => unknown;
|
|
9
|
-
};
|
|
10
|
-
interface ScenarioDeclarationBase {
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly description: string;
|
|
13
|
-
readonly mode: 'run' | 'skip';
|
|
14
|
-
readonly location: SourceLocation;
|
|
15
|
-
}
|
|
16
|
-
export type ScenarioDeclaration = (ScenarioDeclarationBase & {
|
|
17
|
-
readonly mode: 'skip';
|
|
18
|
-
}) | (ScenarioDeclarationBase & {
|
|
19
|
-
readonly mode: 'run';
|
|
20
|
-
readonly run: {
|
|
21
|
-
readonly prepare: () => unknown;
|
|
22
|
-
readonly expectation: ScenarioExpectation;
|
|
23
|
-
readonly cleanup?: (prepared: unknown) => unknown;
|
|
24
|
-
readonly timeout?: unknown;
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
export interface StoryExecution {
|
|
28
|
-
readonly execute: (prepared: unknown) => unknown;
|
|
29
|
-
readonly layer?: unknown;
|
|
30
|
-
}
|
|
31
|
-
export interface StoryDeclaration {
|
|
32
|
-
readonly name: string;
|
|
33
|
-
readonly description: string;
|
|
34
|
-
readonly group?: StoryGroupDeclaration;
|
|
35
|
-
readonly scenarios: readonly ScenarioDeclaration[];
|
|
36
|
-
readonly execution: StoryExecution | undefined;
|
|
37
|
-
}
|
|
38
|
-
export interface StoryGroupDeclaration {
|
|
39
|
-
readonly name: string;
|
|
40
|
-
readonly description: string;
|
|
41
|
-
readonly parent?: StoryGroupDeclaration;
|
|
42
|
-
}
|
|
43
|
-
export interface MutableStoryDeclaration {
|
|
44
|
-
readonly name: string;
|
|
45
|
-
readonly description: string;
|
|
46
|
-
readonly group?: StoryGroupDeclaration;
|
|
47
|
-
readonly scenarios: ScenarioDeclaration[];
|
|
48
|
-
execution: StoryExecution | undefined;
|
|
49
|
-
}
|
|
50
|
-
export type StoryCollector = (declaration: StoryDeclaration) => void;
|
|
51
|
-
/** Declares the single Story owned by a Story file. */
|
|
52
|
-
export declare function declareStory(name: string, meta: StoryMeta, group?: StoryGroupDeclaration): MutableStoryDeclaration;
|
|
53
|
-
export declare function declareStoryGroup(name: string, meta: StoryGroupMeta, parent?: StoryGroupDeclaration): StoryGroupDeclaration;
|
|
54
|
-
/** Adds a Scenario to a mutable Story declaration. */
|
|
55
|
-
export declare function addScenario(declaration: MutableStoryDeclaration, scenario: Omit<Extract<ScenarioDeclaration, {
|
|
56
|
-
readonly mode: 'skip';
|
|
57
|
-
}>, 'location'> | Omit<Extract<ScenarioDeclaration, {
|
|
58
|
-
readonly mode: 'run';
|
|
59
|
-
}>, 'location'>): void;
|
|
60
|
-
/** Runs `load` with a Story collector installed and returns what it declared. */
|
|
61
|
-
export declare function collectDeclaredStories(load: () => Promise<unknown>): Promise<StoryDeclaration[]>;
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=declare.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../../../src/story/core/declare.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAC3B;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC;CACjE,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC;CACjE,CAAC;AAEN,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,MAAM,mBAAmB,GAC3B,CAAC,uBAAuB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACrD,CAAC,uBAAuB,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE;QACZ,QAAQ,CAAC,OAAO,EAAE,MAAM,OA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Z,IAAI,EAAE,SAAS,EACf,KAAK,CAAC,EAAE,qBAAqB,GAC5B,uBAAuB,CAYzB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,cAAc,EACpB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,qBAAqB,CAQvB;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CACzB,WAAW,EAAE,uBAAuB,EACpC,QAAQ,EACJ,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,UAAU,CAAC,GACzE,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,EAAE,UAAU,CAAC,GAC3E,IAAI,CAMN;AAiBD,iFAAiF;AACjF,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAC3B,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAY7B"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { captureLocation } from './recorder.js';
|
|
2
|
-
const collectorKey = Symbol.for('laymos/story-collector');
|
|
3
|
-
const collectorHost = globalThis;
|
|
4
|
-
/** Declares the single Story owned by a Story file. */
|
|
5
|
-
export function declareStory(name, meta, group) {
|
|
6
|
-
requirePathSegment(name, 'Story');
|
|
7
|
-
requireDescription(meta.description, `Story "${name}"`);
|
|
8
|
-
const declaration = {
|
|
9
|
-
name,
|
|
10
|
-
description: meta.description,
|
|
11
|
-
...(group === undefined ? {} : { group }),
|
|
12
|
-
scenarios: [],
|
|
13
|
-
execution: undefined,
|
|
14
|
-
};
|
|
15
|
-
collectorHost[collectorKey]?.(declaration);
|
|
16
|
-
return declaration;
|
|
17
|
-
}
|
|
18
|
-
export function declareStoryGroup(name, meta, parent) {
|
|
19
|
-
requirePathSegment(name, 'Story Group');
|
|
20
|
-
requireDescription(meta.description, `Story Group "${name}"`);
|
|
21
|
-
return {
|
|
22
|
-
name,
|
|
23
|
-
description: meta.description,
|
|
24
|
-
...(parent === undefined ? {} : { parent }),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/** Adds a Scenario to a mutable Story declaration. */
|
|
28
|
-
export function addScenario(declaration, scenario) {
|
|
29
|
-
requireDescription(scenario.description, `Scenario "${scenario.name}"`);
|
|
30
|
-
declaration.scenarios.push({
|
|
31
|
-
...scenario,
|
|
32
|
-
location: captureLocation(),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function requireDescription(description, subject) {
|
|
36
|
-
if (description.trim().length === 0) {
|
|
37
|
-
throw new TypeError(`${subject} description must not be empty`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function requirePathSegment(name, subject) {
|
|
41
|
-
if (name.trim().length === 0) {
|
|
42
|
-
throw new TypeError(`${subject} name must not be empty`);
|
|
43
|
-
}
|
|
44
|
-
if (name.includes('/')) {
|
|
45
|
-
throw new TypeError(`${subject} name "${name}" must not contain "/"`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** Runs `load` with a Story collector installed and returns what it declared. */
|
|
49
|
-
export async function collectDeclaredStories(load) {
|
|
50
|
-
if (collectorHost[collectorKey] !== undefined) {
|
|
51
|
-
throw new Error('Story modules must be loaded sequentially');
|
|
52
|
-
}
|
|
53
|
-
const collected = [];
|
|
54
|
-
collectorHost[collectorKey] = (declaration) => collected.push(declaration);
|
|
55
|
-
try {
|
|
56
|
-
await load();
|
|
57
|
-
return collected;
|
|
58
|
-
}
|
|
59
|
-
finally {
|
|
60
|
-
delete collectorHost[collectorKey];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/story/core/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { decision, functionBlock, step } from './blocks.js';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Context } from 'effect';
|
|
2
|
-
import type { Attributes, AttributesInput, DecisionValue } from './types.js';
|
|
3
|
-
export interface SourceLocation {
|
|
4
|
-
readonly file: string;
|
|
5
|
-
readonly line: number;
|
|
6
|
-
readonly column: number;
|
|
7
|
-
}
|
|
8
|
-
export interface BlockDeclaration {
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly description: string;
|
|
11
|
-
readonly kind: 'block' | 'decision';
|
|
12
|
-
readonly location: SourceLocation;
|
|
13
|
-
}
|
|
14
|
-
export type ArmDeclaration = {
|
|
15
|
-
readonly kind: 'literal';
|
|
16
|
-
readonly value: DecisionValue;
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly description: string;
|
|
19
|
-
} | {
|
|
20
|
-
readonly kind: 'otherwise';
|
|
21
|
-
readonly name: string;
|
|
22
|
-
readonly description: string;
|
|
23
|
-
};
|
|
24
|
-
export type SelectedArm = {
|
|
25
|
-
readonly kind: 'literal';
|
|
26
|
-
readonly value: DecisionValue;
|
|
27
|
-
} | {
|
|
28
|
-
readonly kind: 'otherwise';
|
|
29
|
-
};
|
|
30
|
-
export interface StoryRecorder {
|
|
31
|
-
declareArm(block: BlockDeclaration, arm: ArmDeclaration): void;
|
|
32
|
-
start(block: BlockDeclaration, selectedArm: SelectedArm | undefined, attributes: Attributes | undefined, parent: unknown): unknown;
|
|
33
|
-
finish(token: unknown, outcome: 'succeeded' | 'failed' | 'interrupted'): void;
|
|
34
|
-
}
|
|
35
|
-
export declare const CurrentRecorder: Context.Reference<StoryRecorder | undefined>;
|
|
36
|
-
export declare function resolveAttributes<Args extends readonly unknown[]>(input: AttributesInput<Args> | undefined, args: Args): Attributes | undefined;
|
|
37
|
-
export declare function captureLocation(): SourceLocation;
|
|
38
|
-
//# sourceMappingURL=recorder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../src/story/core/recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,GACtB;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEN,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/D,KAAK,CACH,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;IACX,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,IAAI,CAAC;CAC/E;AAED,eAAO,MAAM,eAAe,8CAG3B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EAC/D,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,SAAS,EACxC,IAAI,EAAE,IAAI,GACT,UAAU,GAAG,SAAS,CAGxB;AAED,wBAAgB,eAAe,IAAI,cAAc,CAwBhD"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Context } from 'effect';
|
|
2
|
-
export const CurrentRecorder = Context.Reference('laymos/story/current-recorder', { defaultValue: () => undefined });
|
|
3
|
-
export function resolveAttributes(input, args) {
|
|
4
|
-
if (input === undefined)
|
|
5
|
-
return undefined;
|
|
6
|
-
return typeof input === 'function' ? input(...args) : input;
|
|
7
|
-
}
|
|
8
|
-
export function captureLocation() {
|
|
9
|
-
const stack = new Error().stack?.split('\n').slice(1) ?? [];
|
|
10
|
-
for (const line of stack) {
|
|
11
|
-
if (line.includes('/story/core/') ||
|
|
12
|
-
line.includes('/story/effect/') ||
|
|
13
|
-
line.includes('/story/story-runtime/') ||
|
|
14
|
-
line.includes('/story/runner/') ||
|
|
15
|
-
line.includes('node:internal')) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
const match = line.match(/(?:\(|\s)(file:\/\/\/[^)\s]+|\/[^)\s]+):(\d+):(\d+)\)?$/);
|
|
19
|
-
if (match?.[1] !== undefined) {
|
|
20
|
-
return {
|
|
21
|
-
file: decodeURIComponent(match[1].replace(/^file:\/\//, '')),
|
|
22
|
-
line: Number(match[2]),
|
|
23
|
-
column: Number(match[3]),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return { file: '<unknown>', line: 0, column: 0 };
|
|
28
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MutableStoryDeclaration, StoryCollector } from './declare.js';
|
|
2
|
-
import type { StoryRecorder } from './recorder.js';
|
|
3
|
-
export interface StoryRuntimeContext {
|
|
4
|
-
readonly activeStory: MutableStoryDeclaration | undefined;
|
|
5
|
-
readonly collector: StoryCollector | undefined;
|
|
6
|
-
readonly recorder: StoryRecorder | undefined;
|
|
7
|
-
}
|
|
8
|
-
type StoryRuntimeContextUpdate = {
|
|
9
|
-
readonly [Key in keyof StoryRuntimeContext]?: StoryRuntimeContext[Key];
|
|
10
|
-
};
|
|
11
|
-
export declare function getStoryRuntimeContext(): StoryRuntimeContext;
|
|
12
|
-
export declare function withStoryRuntimeContext<R>(update: StoryRuntimeContextUpdate, body: () => R): R;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=runtime-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../../src/story/core/runtime-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;CAC9C;AAED,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,GAAG,IAAI,MAAM,mBAAmB,CAAC,CAAC,EAAE,mBAAmB,CAAC,GAAG,CAAC;CACvE,CAAC;AAcF,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,MAAM,EAAE,yBAAyB,EACjC,IAAI,EAAE,MAAM,CAAC,GACZ,CAAC,CAGH"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
const runtimeContextKey = Symbol.for('laymos/story-runtime-context');
|
|
3
|
-
const emptyContext = {
|
|
4
|
-
activeStory: undefined,
|
|
5
|
-
collector: undefined,
|
|
6
|
-
recorder: undefined,
|
|
7
|
-
};
|
|
8
|
-
export function getStoryRuntimeContext() {
|
|
9
|
-
return getRuntimeContextStorage().getStore() ?? emptyContext;
|
|
10
|
-
}
|
|
11
|
-
export function withStoryRuntimeContext(update, body) {
|
|
12
|
-
const context = { ...getStoryRuntimeContext(), ...update };
|
|
13
|
-
return getRuntimeContextStorage().run(context, body);
|
|
14
|
-
}
|
|
15
|
-
function getRuntimeContextStorage() {
|
|
16
|
-
const host = globalThis;
|
|
17
|
-
host[runtimeContextKey] ??= new AsyncLocalStorage();
|
|
18
|
-
return host[runtimeContextKey];
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type DecisionValue = string | number | boolean;
|
|
2
|
-
export type Attributes = Readonly<Record<string, unknown>>;
|
|
3
|
-
export type AttributesInput<Args extends readonly unknown[]> = Attributes | ((...args: Args) => Attributes);
|
|
4
|
-
export interface BlockMeta<Args extends readonly unknown[] = readonly []> {
|
|
5
|
-
readonly description: string;
|
|
6
|
-
readonly attributes?: AttributesInput<Args>;
|
|
7
|
-
}
|
|
8
|
-
export interface ArmMeta {
|
|
9
|
-
readonly name?: string;
|
|
10
|
-
readonly description: string;
|
|
11
|
-
}
|
|
12
|
-
export interface StoryMeta {
|
|
13
|
-
readonly description: string;
|
|
14
|
-
}
|
|
15
|
-
export interface StoryGroupMeta {
|
|
16
|
-
readonly description: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ScenarioMeta {
|
|
19
|
-
readonly description: string;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/story/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3D,MAAM,MAAM,eAAe,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,IACvD,UAAU,GACV,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC;AAEpC,MAAM,WAAW,SAAS,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,GAAG,SAAS,EAAE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B"}
|
package/dist/story/core/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import type { Duration, Layer } from 'effect';
|
|
3
|
-
import type { ArmMeta, BlockMeta, DecisionValue, StoryGroupMeta, StoryMeta } from '../core/types.js';
|
|
4
|
-
export interface ScenarioMeta {
|
|
5
|
-
readonly description: string;
|
|
6
|
-
readonly timeout?: Duration.Input;
|
|
7
|
-
}
|
|
8
|
-
export interface EffectVerifiedScenario<Prepared, R> {
|
|
9
|
-
cleanup<E>(cleanup: (prepared: Prepared) => Effect.Effect<unknown, E, R>): EffectVerifiedScenario<Prepared, R>;
|
|
10
|
-
}
|
|
11
|
-
export interface EffectPreparedScenario<Prepared, Output, Error, R> {
|
|
12
|
-
cleanup<CleanupError>(cleanup: (prepared: Prepared) => Effect.Effect<unknown, CleanupError, R>): EffectPreparedScenario<Prepared, Output, Error, R>;
|
|
13
|
-
verify<VerificationError>(verify: (output: Output, prepared: Prepared) => Effect.Effect<unknown, VerificationError, R>): EffectVerifiedScenario<Prepared, R>;
|
|
14
|
-
verifyError<VerificationError>(verify: (error: Error, prepared: Prepared) => Effect.Effect<unknown, VerificationError, R>): EffectVerifiedScenario<Prepared, R>;
|
|
15
|
-
}
|
|
16
|
-
export interface EffectScenario<Prepared, Output, Error, R> {
|
|
17
|
-
prepare<PreparationError>(prepare: () => Effect.Effect<Prepared, PreparationError, R>): EffectPreparedScenario<Prepared, Output, Error, R>;
|
|
18
|
-
}
|
|
19
|
-
export interface EffectStory<Prepared, Output, Error, R> {
|
|
20
|
-
scenario(name: string, meta: ScenarioMeta, define: (scenario: EffectScenario<Prepared, Output, Error, R>) => EffectVerifiedScenario<Prepared, R>): EffectStory<Prepared, Output, Error, R>;
|
|
21
|
-
skip(name: string, meta: ScenarioMeta): EffectStory<Prepared, Output, Error, R>;
|
|
22
|
-
}
|
|
23
|
-
export interface EffectStoryBuilder<R> {
|
|
24
|
-
provide<Services, LayerError>(layer: Layer.Layer<Services, LayerError, never>): EffectStoryBuilder<Services>;
|
|
25
|
-
execute<Prepared, Output, Error>(execute: (prepared: Prepared) => Effect.Effect<Output, Error, R>): EffectStory<Prepared, Output, Error, R>;
|
|
26
|
-
}
|
|
27
|
-
export interface EffectStoryGroup {
|
|
28
|
-
group(name: string, meta: StoryGroupMeta): EffectStoryGroup;
|
|
29
|
-
story(name: string, meta: StoryMeta): EffectStoryBuilder<never>;
|
|
30
|
-
}
|
|
31
|
-
/** Declares a Story when loaded by the Laymos Story runner. */
|
|
32
|
-
export declare function story(name: string, meta: StoryMeta): EffectStoryBuilder<never>;
|
|
33
|
-
/** Declares a reusable Story Group. */
|
|
34
|
-
export declare function storyGroup(name: string, meta: StoryGroupMeta): EffectStoryGroup;
|
|
35
|
-
type AnyEffect = Effect.Effect<any, any, any>;
|
|
36
|
-
type Success<T> = T extends Effect.Effect<infer A, any, any> ? A : never;
|
|
37
|
-
type Error<T> = T extends Effect.Effect<any, infer E, any> ? E : never;
|
|
38
|
-
type Services<T> = T extends Effect.Effect<any, any, infer R> ? R : never;
|
|
39
|
-
export interface DecisionBuilder<Remaining extends DecisionValue, A, E, R> {
|
|
40
|
-
when<Key extends Remaining, Next extends AnyEffect>(value: Key, meta: ArmMeta, body: (value: Key) => Next): DecisionBuilder<Exclude<Remaining, Key>, A | Success<Next>, E | Error<Next>, R | Services<Next>>;
|
|
41
|
-
otherwise<Next extends AnyEffect>(meta: ArmMeta, body: (value: Remaining) => Next): Effect.Effect<A | Success<Next>, E | Error<Next>, R | Services<Next>>;
|
|
42
|
-
readonly exhaustive: [Remaining] extends [never] ? () => Effect.Effect<A, E, R> : never;
|
|
43
|
-
[Symbol.iterator](): Effect.EffectIterator<Effect.Effect<A, E, R>>;
|
|
44
|
-
}
|
|
45
|
-
/** Marks a reusable Effect-returning function boundary as a Story Block. */
|
|
46
|
-
export declare function functionBlock<Args extends readonly unknown[], A, E, R>(name: string, meta: BlockMeta<Args>, fn: (...args: Args) => Effect.Effect<A, E, R>): (...args: Args) => Effect.Effect<A, E, R>;
|
|
47
|
-
/** Wraps an Effect in an inline Story Block. */
|
|
48
|
-
export declare function step<A, E, R>(name: string, meta: BlockMeta, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
49
|
-
/** Builds an eager, literal-keyed Effect Decision. */
|
|
50
|
-
export declare function decision<const Input extends DecisionValue>(name: string, meta: BlockMeta<[Input]>, input: Input): DecisionBuilder<Input, never, never, never>;
|
|
51
|
-
export type { Attributes } from '../core/types.js';
|
|
52
|
-
//# sourceMappingURL=effect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../src/story/effect/effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB,CAAC,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,CAAC,EACP,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,GAC5D,sBAAsB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAChE,OAAO,CAAC,YAA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
|
5
|
-
return inertStory;
|
|
6
|
-
},
|
|
7
|
-
skip(_name, meta) {
|
|
8
|
-
requireDescription(meta.description, `Scenario "${_name}"`);
|
|
9
|
-
return inertStory;
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
const inertStoryBuilder = {
|
|
13
|
-
provide() {
|
|
14
|
-
return inertStoryBuilder;
|
|
15
|
-
},
|
|
16
|
-
execute() {
|
|
17
|
-
return inertStory;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
/** Declares a Story when loaded by the Laymos Story runner. */
|
|
21
|
-
export function story(name, meta) {
|
|
22
|
-
requirePathSegment(name, 'Story');
|
|
23
|
-
requireDescription(meta.description, `Story "${name}"`);
|
|
24
|
-
return inertStoryBuilder;
|
|
25
|
-
}
|
|
26
|
-
/** Declares a reusable Story Group. */
|
|
27
|
-
export function storyGroup(name, meta) {
|
|
28
|
-
requirePathSegment(name, 'Story Group');
|
|
29
|
-
requireDescription(meta.description, `Story Group "${name}"`);
|
|
30
|
-
return inertStoryGroup;
|
|
31
|
-
}
|
|
32
|
-
const inertStoryGroup = {
|
|
33
|
-
group(name, meta) {
|
|
34
|
-
requirePathSegment(name, 'Story Group');
|
|
35
|
-
requireDescription(meta.description, `Story Group "${name}"`);
|
|
36
|
-
return inertStoryGroup;
|
|
37
|
-
},
|
|
38
|
-
story,
|
|
39
|
-
};
|
|
40
|
-
class DecisionBuilderImpl {
|
|
41
|
-
state;
|
|
42
|
-
constructor(state) {
|
|
43
|
-
this.state = state;
|
|
44
|
-
}
|
|
45
|
-
when(value, meta, body) {
|
|
46
|
-
requireDescription(meta.description, `Decision Arm "${meta.name ?? value}"`);
|
|
47
|
-
if (!this.state.matched && Object.is(this.state.input, value)) {
|
|
48
|
-
this.state.matched = true;
|
|
49
|
-
this.state.selected = body(value);
|
|
50
|
-
}
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
otherwise(meta, body) {
|
|
54
|
-
requireDescription(meta.description, `Decision Arm "${meta.name ?? 'Otherwise'}"`);
|
|
55
|
-
if (!this.state.matched) {
|
|
56
|
-
this.state.matched = true;
|
|
57
|
-
this.state.selected = body(this.state.input);
|
|
58
|
-
}
|
|
59
|
-
return this.state.selected;
|
|
60
|
-
}
|
|
61
|
-
exhaustive() {
|
|
62
|
-
return this.state.selected;
|
|
63
|
-
}
|
|
64
|
-
[Symbol.iterator]() {
|
|
65
|
-
return this.state.selected[Symbol.iterator]();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/** Marks a reusable Effect-returning function boundary as a Story Block. */
|
|
69
|
-
export function functionBlock(name, meta, fn) {
|
|
70
|
-
requireDescription(meta.description, `Block "${name}"`);
|
|
71
|
-
return fn;
|
|
72
|
-
}
|
|
73
|
-
/** Wraps an Effect in an inline Story Block. */
|
|
74
|
-
export function step(name, meta, effect) {
|
|
75
|
-
requireDescription(meta.description, `Block "${name}"`);
|
|
76
|
-
return effect;
|
|
77
|
-
}
|
|
78
|
-
/** Builds an eager, literal-keyed Effect Decision. */
|
|
79
|
-
export function decision(name, meta, input) {
|
|
80
|
-
requireDescription(meta.description, `Decision "${name}"`);
|
|
81
|
-
return new DecisionBuilderImpl({
|
|
82
|
-
input,
|
|
83
|
-
matched: false,
|
|
84
|
-
selected: Effect.void,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function requireDescription(description, subject) {
|
|
88
|
-
if (description.trim().length === 0) {
|
|
89
|
-
throw new TypeError(`${subject} description must not be empty`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function requirePathSegment(name, subject) {
|
|
93
|
-
if (name.trim().length === 0) {
|
|
94
|
-
throw new TypeError(`${subject} name must not be empty`);
|
|
95
|
-
}
|
|
96
|
-
if (name.includes('/')) {
|
|
97
|
-
throw new TypeError(`${subject} name "${name}" must not contain "/"`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/effect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/E,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { decision, functionBlock, step, story, storyGroup } from './effect.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/story/runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { discoverStories, executeStories, StoryDiscoveryError, StoryRunnerError, } from './runner.js';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Cause, Duration, Effect } from 'effect';
|
|
2
|
-
import type { StoryArtifact, StoryScenarioFailurePhase } from '../artifact/types.js';
|
|
3
|
-
import type { StoryCatalog } from '../../report/stories.js';
|
|
4
|
-
export interface StoryRunOptions {
|
|
5
|
-
readonly timeout?: Duration.Input;
|
|
6
|
-
}
|
|
7
|
-
export interface StoryFailure {
|
|
8
|
-
readonly storyId: string;
|
|
9
|
-
readonly scenario?: string;
|
|
10
|
-
readonly phase?: StoryScenarioFailurePhase;
|
|
11
|
-
readonly message: string;
|
|
12
|
-
}
|
|
13
|
-
export interface StoriesRunResult {
|
|
14
|
-
readonly status: 'passed' | 'failed';
|
|
15
|
-
readonly report: {
|
|
16
|
-
readonly stories: Readonly<Record<string, StoryArtifact>>;
|
|
17
|
-
};
|
|
18
|
-
readonly failures: readonly StoryFailure[];
|
|
19
|
-
}
|
|
20
|
-
declare const StoryRunnerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
21
|
-
readonly _tag: "StoryRunnerError";
|
|
22
|
-
} & Readonly<A>;
|
|
23
|
-
export declare class StoryRunnerError extends StoryRunnerError_base<{
|
|
24
|
-
readonly operation: 'discover' | 'execute';
|
|
25
|
-
readonly message: string;
|
|
26
|
-
readonly cause: unknown;
|
|
27
|
-
}> {
|
|
28
|
-
}
|
|
29
|
-
export interface StoryDiscoveryIssue {
|
|
30
|
-
readonly storyId?: string;
|
|
31
|
-
readonly message: string;
|
|
32
|
-
}
|
|
33
|
-
declare const StoryDiscoveryError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
34
|
-
readonly _tag: "StoryDiscoveryError";
|
|
35
|
-
} & Readonly<A>;
|
|
36
|
-
export declare class StoryDiscoveryError extends StoryDiscoveryError_base<{
|
|
37
|
-
readonly message: string;
|
|
38
|
-
readonly issues: readonly StoryDiscoveryIssue[];
|
|
39
|
-
}> {
|
|
40
|
-
}
|
|
41
|
-
export declare function executeStories(baseDir: string, filters: readonly string[], options?: StoryRunOptions): Effect.Effect<StoriesRunResult, StoryRunnerError>;
|
|
42
|
-
export declare function discoverStories(baseDir: string): Effect.Effect<StoryCatalog, StoryDiscoveryError>;
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/story/runner/runner.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,EAGL,QAAQ,EACR,MAAM,EAKP,MAAM,QAAQ,CAAC;AAQhB,OAAO,KAAK,EACV,aAAa,EAGb,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,KAAK,EACV,Y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