@matteeh/osq 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +234 -15
- package/dist/cli/approve.d.ts +7 -0
- package/dist/cli/approve.d.ts.map +1 -1
- package/dist/cli/approve.js +34 -0
- package/dist/cli/approve.js.map +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/check.d.ts +15 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +65 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +6 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lint.d.ts +3 -0
- package/dist/cli/lint.d.ts.map +1 -1
- package/dist/cli/lint.js +33 -14
- package/dist/cli/lint.js.map +1 -1
- package/dist/cli/plan-queue.d.ts +10 -4
- package/dist/cli/plan-queue.d.ts.map +1 -1
- package/dist/cli/plan-queue.js +20 -19
- package/dist/cli/plan-queue.js.map +1 -1
- package/dist/cli/plan-sections.d.ts +15 -0
- package/dist/cli/plan-sections.d.ts.map +1 -0
- package/dist/cli/plan-sections.js +47 -0
- package/dist/cli/plan-sections.js.map +1 -0
- package/dist/cli/plan.d.ts +1 -0
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +14 -4
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +73 -1
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/run.d.ts +7 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +22 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/verified.d.ts +15 -0
- package/dist/cli/verified.d.ts.map +1 -0
- package/dist/cli/verified.js +34 -0
- package/dist/cli/verified.js.map +1 -0
- package/dist/core/foundation/config-agents.d.ts +16 -0
- package/dist/core/foundation/config-agents.d.ts.map +1 -0
- package/dist/core/foundation/config-agents.js +2 -0
- package/dist/core/foundation/config-agents.js.map +1 -0
- package/dist/core/foundation/config-claude.d.ts +48 -0
- package/dist/core/foundation/config-claude.d.ts.map +1 -0
- package/dist/core/foundation/config-claude.js +106 -0
- package/dist/core/foundation/config-claude.js.map +1 -0
- package/dist/core/foundation/config-codex-resolve.d.ts +10 -0
- package/dist/core/foundation/config-codex-resolve.d.ts.map +1 -0
- package/dist/core/foundation/config-codex-resolve.js +24 -0
- package/dist/core/foundation/config-codex-resolve.js.map +1 -0
- package/dist/core/foundation/config-file.d.ts +18 -0
- package/dist/core/foundation/config-file.d.ts.map +1 -0
- package/dist/core/foundation/config-file.js +46 -0
- package/dist/core/foundation/config-file.js.map +1 -0
- package/dist/core/foundation/config-gates.d.ts +2 -0
- package/dist/core/foundation/config-gates.d.ts.map +1 -1
- package/dist/core/foundation/config-gates.js +8 -0
- package/dist/core/foundation/config-gates.js.map +1 -1
- package/dist/core/foundation/config-opencode.d.ts +25 -0
- package/dist/core/foundation/config-opencode.d.ts.map +1 -0
- package/dist/core/foundation/config-opencode.js +55 -0
- package/dist/core/foundation/config-opencode.js.map +1 -0
- package/dist/core/foundation/config-pi.d.ts +10 -0
- package/dist/core/foundation/config-pi.d.ts.map +1 -1
- package/dist/core/foundation/config-pi.js +13 -0
- package/dist/core/foundation/config-pi.js.map +1 -1
- package/dist/core/foundation/config-planning.d.ts +12 -1
- package/dist/core/foundation/config-planning.d.ts.map +1 -1
- package/dist/core/foundation/config-planning.js +29 -1
- package/dist/core/foundation/config-planning.js.map +1 -1
- package/dist/core/foundation/config-traceability.d.ts +28 -0
- package/dist/core/foundation/config-traceability.d.ts.map +1 -0
- package/dist/core/foundation/config-traceability.js +63 -0
- package/dist/core/foundation/config-traceability.js.map +1 -0
- package/dist/core/foundation/config-user.d.ts +32 -0
- package/dist/core/foundation/config-user.d.ts.map +1 -0
- package/dist/core/foundation/config-user.js +2 -0
- package/dist/core/foundation/config-user.js.map +1 -0
- package/dist/core/foundation/config-vcs.d.ts +29 -0
- package/dist/core/foundation/config-vcs.d.ts.map +1 -0
- package/dist/core/foundation/config-vcs.js +57 -0
- package/dist/core/foundation/config-vcs.js.map +1 -0
- package/dist/core/foundation/config.d.ts +23 -24
- package/dist/core/foundation/config.d.ts.map +1 -1
- package/dist/core/foundation/config.js +29 -36
- package/dist/core/foundation/config.js.map +1 -1
- package/dist/core/foundation/decisions-validate.d.ts +16 -0
- package/dist/core/foundation/decisions-validate.d.ts.map +1 -0
- package/dist/core/foundation/decisions-validate.js +74 -0
- package/dist/core/foundation/decisions-validate.js.map +1 -0
- package/dist/core/foundation/decisions.d.ts +34 -0
- package/dist/core/foundation/decisions.d.ts.map +1 -0
- package/dist/core/foundation/decisions.js +152 -0
- package/dist/core/foundation/decisions.js.map +1 -0
- package/dist/core/foundation/doctor-decisions.d.ts +9 -0
- package/dist/core/foundation/doctor-decisions.d.ts.map +1 -0
- package/dist/core/foundation/doctor-decisions.js +49 -0
- package/dist/core/foundation/doctor-decisions.js.map +1 -0
- package/dist/core/foundation/doctor-managed.d.ts.map +1 -1
- package/dist/core/foundation/doctor-managed.js +3 -0
- package/dist/core/foundation/doctor-managed.js.map +1 -1
- package/dist/core/foundation/doctor-prices.d.ts +8 -0
- package/dist/core/foundation/doctor-prices.d.ts.map +1 -0
- package/dist/core/foundation/doctor-prices.js +25 -0
- package/dist/core/foundation/doctor-prices.js.map +1 -0
- package/dist/core/foundation/doctor.d.ts.map +1 -1
- package/dist/core/foundation/doctor.js +20 -30
- package/dist/core/foundation/doctor.js.map +1 -1
- package/dist/core/foundation/harness-catalog.d.ts +7 -8
- package/dist/core/foundation/harness-catalog.d.ts.map +1 -1
- package/dist/core/foundation/harness-catalog.js +26 -41
- package/dist/core/foundation/harness-catalog.js.map +1 -1
- package/dist/core/foundation/init-blocks.d.ts +1 -1
- package/dist/core/foundation/init-blocks.d.ts.map +1 -1
- package/dist/core/foundation/init-blocks.js +51 -14
- package/dist/core/foundation/init-blocks.js.map +1 -1
- package/dist/core/foundation/init.d.ts +4 -0
- package/dist/core/foundation/init.d.ts.map +1 -1
- package/dist/core/foundation/init.js +7 -0
- package/dist/core/foundation/init.js.map +1 -1
- package/dist/core/foundation/new.d.ts +4 -1
- package/dist/core/foundation/new.d.ts.map +1 -1
- package/dist/core/foundation/new.js +18 -8
- package/dist/core/foundation/new.js.map +1 -1
- package/dist/core/foundation/package-root.d.ts +6 -0
- package/dist/core/foundation/package-root.d.ts.map +1 -1
- package/dist/core/foundation/package-root.js +6 -0
- package/dist/core/foundation/package-root.js.map +1 -1
- package/dist/core/foundation/rules-block.d.ts +11 -0
- package/dist/core/foundation/rules-block.d.ts.map +1 -0
- package/dist/core/foundation/rules-block.js +90 -0
- package/dist/core/foundation/rules-block.js.map +1 -0
- package/dist/core/foundation/traceability-block.d.ts +13 -0
- package/dist/core/foundation/traceability-block.d.ts.map +1 -0
- package/dist/core/foundation/traceability-block.js +124 -0
- package/dist/core/foundation/traceability-block.js.map +1 -0
- package/dist/core/lifecycle/done.d.ts.map +1 -1
- package/dist/core/lifecycle/done.js +2 -4
- package/dist/core/lifecycle/done.js.map +1 -1
- package/dist/core/lifecycle/recertify.d.ts +9 -0
- package/dist/core/lifecycle/recertify.d.ts.map +1 -0
- package/dist/core/lifecycle/recertify.js +27 -0
- package/dist/core/lifecycle/recertify.js.map +1 -0
- package/dist/core/lifecycle/reject.d.ts.map +1 -1
- package/dist/core/lifecycle/reject.js +3 -4
- package/dist/core/lifecycle/reject.js.map +1 -1
- package/dist/core/lifecycle/retry.d.ts.map +1 -1
- package/dist/core/lifecycle/retry.js +6 -20
- package/dist/core/lifecycle/retry.js.map +1 -1
- package/dist/core/lifecycle/verification-record.d.ts +42 -0
- package/dist/core/lifecycle/verification-record.d.ts.map +1 -0
- package/dist/core/lifecycle/verification-record.js +76 -0
- package/dist/core/lifecycle/verification-record.js.map +1 -0
- package/dist/core/report/approval-flags.d.ts +16 -3
- package/dist/core/report/approval-flags.d.ts.map +1 -1
- package/dist/core/report/approval-flags.js +59 -22
- package/dist/core/report/approval-flags.js.map +1 -1
- package/dist/core/report/brief-to-approval.d.ts +7 -0
- package/dist/core/report/brief-to-approval.d.ts.map +1 -0
- package/dist/core/report/brief-to-approval.js +43 -0
- package/dist/core/report/brief-to-approval.js.map +1 -0
- package/dist/core/report/planning-price-gaps.d.ts +10 -0
- package/dist/core/report/planning-price-gaps.d.ts.map +1 -0
- package/dist/core/report/planning-price-gaps.js +37 -0
- package/dist/core/report/planning-price-gaps.js.map +1 -0
- package/dist/core/report/planning-slice-lookup.d.ts.map +1 -1
- package/dist/core/report/planning-slice-lookup.js +3 -9
- package/dist/core/report/planning-slice-lookup.js.map +1 -1
- package/dist/core/report/recent-disclosures.d.ts +18 -0
- package/dist/core/report/recent-disclosures.d.ts.map +1 -0
- package/dist/core/report/recent-disclosures.js +105 -0
- package/dist/core/report/recent-disclosures.js.map +1 -0
- package/dist/core/report/record-disclosures.d.ts +14 -0
- package/dist/core/report/record-disclosures.d.ts.map +1 -0
- package/dist/core/report/record-disclosures.js +30 -0
- package/dist/core/report/record-disclosures.js.map +1 -0
- package/dist/core/report/record-estimates.d.ts +25 -0
- package/dist/core/report/record-estimates.d.ts.map +1 -0
- package/dist/core/report/record-estimates.js +83 -0
- package/dist/core/report/record-estimates.js.map +1 -0
- package/dist/core/report/record-rework.d.ts +19 -0
- package/dist/core/report/record-rework.d.ts.map +1 -0
- package/dist/core/report/record-rework.js +50 -0
- package/dist/core/report/record-rework.js.map +1 -0
- package/dist/core/report/record-verification.d.ts +16 -0
- package/dist/core/report/record-verification.d.ts.map +1 -0
- package/dist/core/report/record-verification.js +33 -0
- package/dist/core/report/record-verification.js.map +1 -0
- package/dist/core/report/report-dependencies.d.ts +29 -0
- package/dist/core/report/report-dependencies.d.ts.map +1 -0
- package/dist/core/report/report-dependencies.js +92 -0
- package/dist/core/report/report-dependencies.js.map +1 -0
- package/dist/core/report/report-events.d.ts +1 -0
- package/dist/core/report/report-events.d.ts.map +1 -1
- package/dist/core/report/report-events.js +8 -26
- package/dist/core/report/report-events.js.map +1 -1
- package/dist/core/report/report-mutation.d.ts +34 -0
- package/dist/core/report/report-mutation.d.ts.map +1 -0
- package/dist/core/report/report-mutation.js +191 -0
- package/dist/core/report/report-mutation.js.map +1 -0
- package/dist/core/report/report-scope.d.ts +21 -0
- package/dist/core/report/report-scope.d.ts.map +1 -0
- package/dist/core/report/report-scope.js +61 -0
- package/dist/core/report/report-scope.js.map +1 -0
- package/dist/core/report/report-traceability.d.ts +29 -0
- package/dist/core/report/report-traceability.d.ts.map +1 -0
- package/dist/core/report/report-traceability.js +94 -0
- package/dist/core/report/report-traceability.js.map +1 -0
- package/dist/core/report/report.d.ts +35 -1
- package/dist/core/report/report.d.ts.map +1 -1
- package/dist/core/report/report.js +130 -111
- package/dist/core/report/report.js.map +1 -1
- package/dist/core/report/result-sections.d.ts +30 -0
- package/dist/core/report/result-sections.d.ts.map +1 -0
- package/dist/core/report/result-sections.js +125 -0
- package/dist/core/report/result-sections.js.map +1 -0
- package/dist/core/report/scope-size.d.ts +7 -0
- package/dist/core/report/scope-size.d.ts.map +1 -0
- package/dist/core/report/scope-size.js +22 -0
- package/dist/core/report/scope-size.js.map +1 -0
- package/dist/core/run/commit-message.d.ts +24 -0
- package/dist/core/run/commit-message.d.ts.map +1 -0
- package/dist/core/run/commit-message.js +76 -0
- package/dist/core/run/commit-message.js.map +1 -0
- package/dist/core/run/dead-commit.d.ts +10 -0
- package/dist/core/run/dead-commit.d.ts.map +1 -0
- package/dist/core/run/dead-commit.js +70 -0
- package/dist/core/run/dead-commit.js.map +1 -0
- package/dist/core/run/focused-tests.d.ts +43 -0
- package/dist/core/run/focused-tests.d.ts.map +1 -0
- package/dist/core/run/focused-tests.js +116 -0
- package/dist/core/run/focused-tests.js.map +1 -0
- package/dist/core/run/manifest-approval.d.ts +7 -0
- package/dist/core/run/manifest-approval.d.ts.map +1 -0
- package/dist/core/run/manifest-approval.js +30 -0
- package/dist/core/run/manifest-approval.js.map +1 -0
- package/dist/core/run/manifest.d.ts +11 -1
- package/dist/core/run/manifest.d.ts.map +1 -1
- package/dist/core/run/manifest.js +52 -11
- package/dist/core/run/manifest.js.map +1 -1
- package/dist/core/run/mutation-report.d.ts +29 -0
- package/dist/core/run/mutation-report.d.ts.map +1 -0
- package/dist/core/run/mutation-report.js +107 -0
- package/dist/core/run/mutation-report.js.map +1 -0
- package/dist/core/run/mutation-run.d.ts +32 -0
- package/dist/core/run/mutation-run.d.ts.map +1 -0
- package/dist/core/run/mutation-run.js +80 -0
- package/dist/core/run/mutation-run.js.map +1 -0
- package/dist/core/run/verification.d.ts +12 -1
- package/dist/core/run/verification.d.ts.map +1 -1
- package/dist/core/run/verification.js +24 -2
- package/dist/core/run/verification.js.map +1 -1
- package/dist/core/spec/approve-worktree-shared.d.ts +33 -0
- package/dist/core/spec/approve-worktree-shared.d.ts.map +1 -0
- package/dist/core/spec/approve-worktree-shared.js +59 -0
- package/dist/core/spec/approve-worktree-shared.js.map +1 -0
- package/dist/core/spec/approve-worktree.d.ts +21 -0
- package/dist/core/spec/approve-worktree.d.ts.map +1 -0
- package/dist/core/spec/approve-worktree.js +153 -0
- package/dist/core/spec/approve-worktree.js.map +1 -0
- package/dist/core/spec/approve.d.ts +20 -10
- package/dist/core/spec/approve.d.ts.map +1 -1
- package/dist/core/spec/approve.js +57 -54
- package/dist/core/spec/approve.js.map +1 -1
- package/dist/core/spec/capability-impact.d.ts +43 -0
- package/dist/core/spec/capability-impact.d.ts.map +1 -0
- package/dist/core/spec/capability-impact.js +85 -0
- package/dist/core/spec/capability-impact.js.map +1 -0
- package/dist/core/spec/decisions-lint.d.ts +18 -0
- package/dist/core/spec/decisions-lint.d.ts.map +1 -0
- package/dist/core/spec/decisions-lint.js +127 -0
- package/dist/core/spec/decisions-lint.js.map +1 -0
- package/dist/core/spec/delta.d.ts +6 -0
- package/dist/core/spec/delta.d.ts.map +1 -1
- package/dist/core/spec/delta.js +73 -5
- package/dist/core/spec/delta.js.map +1 -1
- package/dist/core/spec/digest-capability.d.ts +17 -0
- package/dist/core/spec/digest-capability.d.ts.map +1 -0
- package/dist/core/spec/digest-capability.js +89 -0
- package/dist/core/spec/digest-capability.js.map +1 -0
- package/dist/core/spec/digest-decisions.d.ts +27 -0
- package/dist/core/spec/digest-decisions.d.ts.map +1 -0
- package/dist/core/spec/digest-decisions.js +86 -0
- package/dist/core/spec/digest-decisions.js.map +1 -0
- package/dist/core/spec/digest-flags.d.ts +1 -0
- package/dist/core/spec/digest-flags.d.ts.map +1 -1
- package/dist/core/spec/digest-flags.js +16 -16
- package/dist/core/spec/digest-flags.js.map +1 -1
- package/dist/core/spec/digest-format.d.ts +4 -0
- package/dist/core/spec/digest-format.d.ts.map +1 -0
- package/dist/core/spec/digest-format.js +44 -0
- package/dist/core/spec/digest-format.js.map +1 -0
- package/dist/core/spec/digest.d.ts +6 -3
- package/dist/core/spec/digest.d.ts.map +1 -1
- package/dist/core/spec/digest.js +18 -32
- package/dist/core/spec/digest.js.map +1 -1
- package/dist/core/spec/human-steps.d.ts +20 -0
- package/dist/core/spec/human-steps.d.ts.map +1 -0
- package/dist/core/spec/human-steps.js +52 -0
- package/dist/core/spec/human-steps.js.map +1 -0
- package/dist/core/spec/impact-lint.d.ts +24 -0
- package/dist/core/spec/impact-lint.d.ts.map +1 -0
- package/dist/core/spec/impact-lint.js +39 -0
- package/dist/core/spec/impact-lint.js.map +1 -0
- package/dist/core/spec/import-graph.d.ts +35 -0
- package/dist/core/spec/import-graph.d.ts.map +1 -0
- package/dist/core/spec/import-graph.js +155 -0
- package/dist/core/spec/import-graph.js.map +1 -0
- package/dist/core/spec/lint-findings.d.ts +44 -0
- package/dist/core/spec/lint-findings.d.ts.map +1 -0
- package/dist/core/spec/lint-findings.js +56 -0
- package/dist/core/spec/lint-findings.js.map +1 -0
- package/dist/core/spec/lint-output.d.ts +53 -0
- package/dist/core/spec/lint-output.d.ts.map +1 -0
- package/dist/core/spec/lint-output.js +87 -0
- package/dist/core/spec/lint-output.js.map +1 -0
- package/dist/core/spec/linter.d.ts +14 -4
- package/dist/core/spec/linter.d.ts.map +1 -1
- package/dist/core/spec/linter.js +271 -111
- package/dist/core/spec/linter.js.map +1 -1
- package/dist/core/spec/merged-spec-check.d.ts +24 -0
- package/dist/core/spec/merged-spec-check.d.ts.map +1 -0
- package/dist/core/spec/merged-spec-check.js +95 -0
- package/dist/core/spec/merged-spec-check.js.map +1 -0
- package/dist/core/spec/openspec-issues.d.ts +58 -0
- package/dist/core/spec/openspec-issues.d.ts.map +1 -0
- package/dist/core/spec/openspec-issues.js +166 -0
- package/dist/core/spec/openspec-issues.js.map +1 -0
- package/dist/core/spec/parser.d.ts +1 -0
- package/dist/core/spec/parser.d.ts.map +1 -1
- package/dist/core/spec/parser.js +16 -6
- package/dist/core/spec/parser.js.map +1 -1
- package/dist/core/spec/scenario-impact.d.ts +47 -0
- package/dist/core/spec/scenario-impact.d.ts.map +1 -0
- package/dist/core/spec/scenario-impact.js +130 -0
- package/dist/core/spec/scenario-impact.js.map +1 -0
- package/dist/core/spec/test-impact.d.ts +28 -0
- package/dist/core/spec/test-impact.d.ts.map +1 -0
- package/dist/core/spec/test-impact.js +119 -0
- package/dist/core/spec/test-impact.js.map +1 -0
- package/dist/core/spec/traceability-links.d.ts +50 -0
- package/dist/core/spec/traceability-links.d.ts.map +1 -0
- package/dist/core/spec/traceability-links.js +120 -0
- package/dist/core/spec/traceability-links.js.map +1 -0
- package/dist/core/spec/traceability-lint.d.ts +29 -0
- package/dist/core/spec/traceability-lint.d.ts.map +1 -0
- package/dist/core/spec/traceability-lint.js +143 -0
- package/dist/core/spec/traceability-lint.js.map +1 -0
- package/dist/core/status/blocked-item.d.ts +8 -0
- package/dist/core/status/blocked-item.d.ts.map +1 -0
- package/dist/core/status/blocked-item.js +45 -0
- package/dist/core/status/blocked-item.js.map +1 -0
- package/dist/core/status/change-locations.d.ts +44 -0
- package/dist/core/status/change-locations.d.ts.map +1 -0
- package/dist/core/status/change-locations.js +138 -0
- package/dist/core/status/change-locations.js.map +1 -0
- package/dist/core/status/dependency-readiness.d.ts +11 -0
- package/dist/core/status/dependency-readiness.d.ts.map +1 -0
- package/dist/core/status/dependency-readiness.js +39 -0
- package/dist/core/status/dependency-readiness.js.map +1 -0
- package/dist/core/status/inbox-projection.d.ts.map +1 -1
- package/dist/core/status/inbox-projection.js +23 -4
- package/dist/core/status/inbox-projection.js.map +1 -1
- package/dist/core/status/inbox-text.d.ts.map +1 -1
- package/dist/core/status/inbox-text.js +34 -3
- package/dist/core/status/inbox-text.js.map +1 -1
- package/dist/core/status/inbox.d.ts +10 -1
- package/dist/core/status/inbox.d.ts.map +1 -1
- package/dist/core/status/inbox.js +19 -1
- package/dist/core/status/inbox.js.map +1 -1
- package/dist/core/status/layout.d.ts +6 -0
- package/dist/core/status/layout.d.ts.map +1 -1
- package/dist/core/status/layout.js +8 -0
- package/dist/core/status/layout.js.map +1 -1
- package/dist/core/status/next-step.d.ts +17 -0
- package/dist/core/status/next-step.d.ts.map +1 -0
- package/dist/core/status/next-step.js +85 -0
- package/dist/core/status/next-step.js.map +1 -0
- package/dist/core/status/pre-spawn-words.d.ts +13 -0
- package/dist/core/status/pre-spawn-words.d.ts.map +1 -0
- package/dist/core/status/pre-spawn-words.js +26 -0
- package/dist/core/status/pre-spawn-words.js.map +1 -0
- package/dist/core/status/queue-parser.d.ts +1 -0
- package/dist/core/status/queue-parser.d.ts.map +1 -1
- package/dist/core/status/queue-parser.js +41 -2
- package/dist/core/status/queue-parser.js.map +1 -1
- package/dist/core/status/queue-planning.d.ts +1 -0
- package/dist/core/status/queue-planning.d.ts.map +1 -1
- package/dist/core/status/queue-planning.js +24 -12
- package/dist/core/status/queue-planning.js.map +1 -1
- package/dist/core/status/queue-report-detail.d.ts.map +1 -1
- package/dist/core/status/queue-report-detail.js +5 -3
- package/dist/core/status/queue-report-detail.js.map +1 -1
- package/dist/core/status/queue-state.d.ts +1 -1
- package/dist/core/status/queue-state.d.ts.map +1 -1
- package/dist/core/status/queue-state.js +27 -41
- package/dist/core/status/queue-state.js.map +1 -1
- package/dist/core/status/show.d.ts +25 -0
- package/dist/core/status/show.d.ts.map +1 -1
- package/dist/core/status/show.js +354 -91
- package/dist/core/status/show.js.map +1 -1
- package/dist/core/status/state.d.ts.map +1 -1
- package/dist/core/status/state.js +1 -23
- package/dist/core/status/state.js.map +1 -1
- package/dist/core/status/status.d.ts +18 -0
- package/dist/core/status/status.d.ts.map +1 -1
- package/dist/core/status/status.js +59 -80
- package/dist/core/status/status.js.map +1 -1
- package/dist/core/status/verification.d.ts +27 -0
- package/dist/core/status/verification.d.ts.map +1 -0
- package/dist/core/status/verification.js +111 -0
- package/dist/core/status/verification.js.map +1 -0
- package/dist/core/trace/function-ranges.d.ts +30 -0
- package/dist/core/trace/function-ranges.d.ts.map +1 -0
- package/dist/core/trace/function-ranges.js +250 -0
- package/dist/core/trace/function-ranges.js.map +1 -0
- package/dist/core/trace/mutation-pick.d.ts +55 -0
- package/dist/core/trace/mutation-pick.d.ts.map +1 -0
- package/dist/core/trace/mutation-pick.js +96 -0
- package/dist/core/trace/mutation-pick.js.map +1 -0
- package/dist/core/trace/scenario-index.d.ts +27 -0
- package/dist/core/trace/scenario-index.d.ts.map +1 -0
- package/dist/core/trace/scenario-index.js +76 -0
- package/dist/core/trace/scenario-index.js.map +1 -0
- package/dist/core/trace/scenario-lookup.d.ts +14 -0
- package/dist/core/trace/scenario-lookup.d.ts.map +1 -0
- package/dist/core/trace/scenario-lookup.js +179 -0
- package/dist/core/trace/scenario-lookup.js.map +1 -0
- package/dist/core/trace/tag-scan.d.ts +44 -0
- package/dist/core/trace/tag-scan.d.ts.map +1 -0
- package/dist/core/trace/tag-scan.js +200 -0
- package/dist/core/trace/tag-scan.js.map +1 -0
- package/dist/core/vcs/doctor-git.d.ts +13 -0
- package/dist/core/vcs/doctor-git.d.ts.map +1 -0
- package/dist/core/vcs/doctor-git.js +114 -0
- package/dist/core/vcs/doctor-git.js.map +1 -0
- package/dist/core/vcs/git-vcs-write.d.ts +47 -0
- package/dist/core/vcs/git-vcs-write.d.ts.map +1 -0
- package/dist/core/vcs/git-vcs-write.js +210 -0
- package/dist/core/vcs/git-vcs-write.js.map +1 -0
- package/dist/core/vcs/git-vcs.d.ts +40 -0
- package/dist/core/vcs/git-vcs.d.ts.map +1 -0
- package/dist/core/vcs/git-vcs.js +170 -0
- package/dist/core/vcs/git-vcs.js.map +1 -0
- package/dist/core/vcs/no-vcs.d.ts +26 -0
- package/dist/core/vcs/no-vcs.d.ts.map +1 -0
- package/dist/core/vcs/no-vcs.js +62 -0
- package/dist/core/vcs/no-vcs.js.map +1 -0
- package/dist/core/vcs/select.d.ts +11 -0
- package/dist/core/vcs/select.d.ts.map +1 -0
- package/dist/core/vcs/select.js +33 -0
- package/dist/core/vcs/select.js.map +1 -0
- package/dist/core/vcs/snapshot.d.ts +34 -0
- package/dist/core/vcs/snapshot.d.ts.map +1 -0
- package/dist/core/vcs/snapshot.js +71 -0
- package/dist/core/vcs/snapshot.js.map +1 -0
- package/dist/core/vcs/vcs.d.ts +55 -0
- package/dist/core/vcs/vcs.d.ts.map +1 -0
- package/dist/core/vcs/vcs.js +2 -0
- package/dist/core/vcs/vcs.js.map +1 -0
- package/dist/core/vcs/worktree.d.ts +10 -0
- package/dist/core/vcs/worktree.d.ts.map +1 -0
- package/dist/core/vcs/worktree.js +25 -0
- package/dist/core/vcs/worktree.js.map +1 -0
- package/dist/core/web/web-data-folders.d.ts.map +1 -1
- package/dist/core/web/web-data-folders.js +18 -33
- package/dist/core/web/web-data-folders.js.map +1 -1
- package/dist/core/web/web-data-lifecycle.d.ts.map +1 -1
- package/dist/core/web/web-data-lifecycle.js +2 -1
- package/dist/core/web/web-data-lifecycle.js.map +1 -1
- package/dist/core/web/web-events.d.ts +8 -6
- package/dist/core/web/web-events.d.ts.map +1 -1
- package/dist/core/web/web-events.js +7 -31
- package/dist/core/web/web-events.js.map +1 -1
- package/dist/core/web/web-server.d.ts.map +1 -1
- package/dist/core/web/web-server.js +3 -0
- package/dist/core/web/web-server.js.map +1 -1
- package/dist/core/web/web-trees.d.ts +27 -0
- package/dist/core/web/web-trees.d.ts.map +1 -0
- package/dist/core/web/web-trees.js +82 -0
- package/dist/core/web/web-trees.js.map +1 -0
- package/dist/harness/claude/claude-exec-args.d.ts +13 -0
- package/dist/harness/claude/claude-exec-args.d.ts.map +1 -0
- package/dist/harness/claude/claude-exec-args.js +61 -0
- package/dist/harness/claude/claude-exec-args.js.map +1 -0
- package/dist/harness/claude/claude-exec.d.ts +12 -0
- package/dist/harness/claude/claude-exec.d.ts.map +1 -0
- package/dist/harness/claude/claude-exec.js +79 -0
- package/dist/harness/claude/claude-exec.js.map +1 -0
- package/dist/harness/claude/claude-stream.d.ts +31 -0
- package/dist/harness/claude/claude-stream.d.ts.map +1 -0
- package/dist/harness/claude/claude-stream.js +150 -0
- package/dist/harness/claude/claude-stream.js.map +1 -0
- package/dist/harness/claude/claude-tools.d.ts +5 -0
- package/dist/harness/claude/claude-tools.d.ts.map +1 -0
- package/dist/harness/claude/claude-tools.js +30 -0
- package/dist/harness/claude/claude-tools.js.map +1 -0
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +3 -0
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/opencode/opencode-session.d.ts +42 -0
- package/dist/harness/opencode/opencode-session.d.ts.map +1 -0
- package/dist/harness/opencode/opencode-session.js +123 -0
- package/dist/harness/opencode/opencode-session.js.map +1 -0
- package/dist/harness/opencode/opencode.d.ts +2 -1
- package/dist/harness/opencode/opencode.d.ts.map +1 -1
- package/dist/harness/opencode/opencode.js +52 -28
- package/dist/harness/opencode/opencode.js.map +1 -1
- package/dist/harness/prompt.js +1 -1
- package/dist/harness/prompt.js.map +1 -1
- package/dist/harness/types.d.ts +114 -1
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +2 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/scenario.d.ts +29 -0
- package/dist/testing/scenario.d.ts.map +1 -0
- package/dist/testing/scenario.js +157 -0
- package/dist/testing/scenario.js.map +1 -0
- package/dist/watcher/archiver.d.ts +2 -1
- package/dist/watcher/archiver.d.ts.map +1 -1
- package/dist/watcher/archiver.js +27 -2
- package/dist/watcher/archiver.js.map +1 -1
- package/dist/watcher/auto-recertify.d.ts +27 -0
- package/dist/watcher/auto-recertify.d.ts.map +1 -0
- package/dist/watcher/auto-recertify.js +113 -0
- package/dist/watcher/auto-recertify.js.map +1 -0
- package/dist/watcher/auto-retry.d.ts +1 -1
- package/dist/watcher/auto-retry.d.ts.map +1 -1
- package/dist/watcher/auto-retry.js +3 -11
- package/dist/watcher/auto-retry.js.map +1 -1
- package/dist/watcher/baseline-key.d.ts +17 -0
- package/dist/watcher/baseline-key.d.ts.map +1 -0
- package/dist/watcher/baseline-key.js +31 -0
- package/dist/watcher/baseline-key.js.map +1 -0
- package/dist/watcher/baseline.d.ts +32 -0
- package/dist/watcher/baseline.d.ts.map +1 -0
- package/dist/watcher/baseline.js +166 -0
- package/dist/watcher/baseline.js.map +1 -0
- package/dist/watcher/blocked.d.ts +12 -0
- package/dist/watcher/blocked.d.ts.map +1 -0
- package/dist/watcher/blocked.js +24 -0
- package/dist/watcher/blocked.js.map +1 -0
- package/dist/watcher/build-project.d.ts +11 -0
- package/dist/watcher/build-project.d.ts.map +1 -0
- package/dist/watcher/build-project.js +36 -0
- package/dist/watcher/build-project.js.map +1 -0
- package/dist/watcher/build.d.ts +8 -5
- package/dist/watcher/build.d.ts.map +1 -1
- package/dist/watcher/build.js +35 -39
- package/dist/watcher/build.js.map +1 -1
- package/dist/watcher/dependencies.d.ts +28 -0
- package/dist/watcher/dependencies.d.ts.map +1 -0
- package/dist/watcher/dependencies.js +152 -0
- package/dist/watcher/dependencies.js.map +1 -0
- package/dist/watcher/done-metadata.d.ts +4 -0
- package/dist/watcher/done-metadata.d.ts.map +1 -0
- package/dist/watcher/done-metadata.js +20 -0
- package/dist/watcher/done-metadata.js.map +1 -0
- package/dist/watcher/failure-reason.d.ts +1 -1
- package/dist/watcher/failure-reason.d.ts.map +1 -1
- package/dist/watcher/fingerprint.d.ts +2 -2
- package/dist/watcher/fingerprint.d.ts.map +1 -1
- package/dist/watcher/fingerprint.js +31 -2
- package/dist/watcher/fingerprint.js.map +1 -1
- package/dist/watcher/focused-verify.d.ts +17 -0
- package/dist/watcher/focused-verify.d.ts.map +1 -0
- package/dist/watcher/focused-verify.js +54 -0
- package/dist/watcher/focused-verify.js.map +1 -0
- package/dist/watcher/git-guard.d.ts +24 -0
- package/dist/watcher/git-guard.d.ts.map +1 -0
- package/dist/watcher/git-guard.js +95 -0
- package/dist/watcher/git-guard.js.map +1 -0
- package/dist/watcher/instructions-drift.d.ts +21 -0
- package/dist/watcher/instructions-drift.d.ts.map +1 -0
- package/dist/watcher/instructions-drift.js +115 -0
- package/dist/watcher/instructions-drift.js.map +1 -0
- package/dist/watcher/loop.d.ts.map +1 -1
- package/dist/watcher/loop.js +37 -51
- package/dist/watcher/loop.js.map +1 -1
- package/dist/watcher/measures.d.ts.map +1 -1
- package/dist/watcher/measures.js +22 -39
- package/dist/watcher/measures.js.map +1 -1
- package/dist/watcher/mutation-check.d.ts +42 -0
- package/dist/watcher/mutation-check.d.ts.map +1 -0
- package/dist/watcher/mutation-check.js +147 -0
- package/dist/watcher/mutation-check.js.map +1 -0
- package/dist/watcher/outcome.d.ts +2 -0
- package/dist/watcher/outcome.d.ts.map +1 -1
- package/dist/watcher/outcome.js +5 -1
- package/dist/watcher/outcome.js.map +1 -1
- package/dist/watcher/regression.d.ts +10 -5
- package/dist/watcher/regression.d.ts.map +1 -1
- package/dist/watcher/regression.js +29 -19
- package/dist/watcher/regression.js.map +1 -1
- package/dist/watcher/runner.d.ts.map +1 -1
- package/dist/watcher/runner.js +12 -14
- package/dist/watcher/runner.js.map +1 -1
- package/dist/watcher/spawn.d.ts.map +1 -1
- package/dist/watcher/spawn.js +11 -1
- package/dist/watcher/spawn.js.map +1 -1
- package/dist/watcher/task-verify.d.ts +7 -2
- package/dist/watcher/task-verify.d.ts.map +1 -1
- package/dist/watcher/task-verify.js +33 -8
- package/dist/watcher/task-verify.js.map +1 -1
- package/dist/watcher/verify.d.ts +1 -5
- package/dist/watcher/verify.d.ts.map +1 -1
- package/dist/watcher/verify.js +2 -6
- package/dist/watcher/verify.js.map +1 -1
- package/package.json +5 -1
- package/templates/PLANNER.md +35 -9
- package/templates/openspec/config.yaml +1 -1
- package/templates/openspec/schemas/osq/schema.yaml +4 -2
- package/templates/openspec/schemas/osq/templates/proposal.md +9 -2
- package/templates/proposal.md +9 -2
- package/ui/dist/assets/{index-CZYeQ8la.js → index-D39uYbbL.js} +1 -1
- package/ui/dist/index.html +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scenario index: every scenario call, every exported function with its
|
|
3
|
+
* tags, and every unreadable form, built once from the import graph's files.
|
|
4
|
+
* Nothing is persisted.
|
|
5
|
+
*/
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { scanSource, } from './tag-scan.js';
|
|
9
|
+
function sortedUnique(values) {
|
|
10
|
+
return [...new Set(values)].sort();
|
|
11
|
+
}
|
|
12
|
+
function testsNaming(calls, capability, name) {
|
|
13
|
+
return sortedUnique(calls
|
|
14
|
+
.filter((call) => call.capability === capability && call.name === name)
|
|
15
|
+
.map((call) => call.file));
|
|
16
|
+
}
|
|
17
|
+
function scenariosInFile(calls, file) {
|
|
18
|
+
const seen = new Set();
|
|
19
|
+
const scenarios = [];
|
|
20
|
+
for (const call of calls) {
|
|
21
|
+
if (call.file !== file)
|
|
22
|
+
continue;
|
|
23
|
+
const key = `${call.capability}\u0000${call.name}`;
|
|
24
|
+
if (seen.has(key))
|
|
25
|
+
continue;
|
|
26
|
+
seen.add(key);
|
|
27
|
+
scenarios.push({ capability: call.capability, name: call.name });
|
|
28
|
+
}
|
|
29
|
+
return scenarios.sort((a, b) => a.capability.localeCompare(b.capability) || a.name.localeCompare(b.name));
|
|
30
|
+
}
|
|
31
|
+
function coveringTests(graph, calls, functionFile, name) {
|
|
32
|
+
return sortedUnique(calls
|
|
33
|
+
.filter((call) => call.covers === name && graph.importsOf(call.file).includes(functionFile))
|
|
34
|
+
.map((call) => call.file));
|
|
35
|
+
}
|
|
36
|
+
function covers(graph, calls, testFile, functionFile, name) {
|
|
37
|
+
if (!graph.importsOf(testFile).includes(functionFile))
|
|
38
|
+
return false;
|
|
39
|
+
return calls.some((call) => call.file === testFile && call.covers === name);
|
|
40
|
+
}
|
|
41
|
+
function readSource(projectRoot, file) {
|
|
42
|
+
try {
|
|
43
|
+
return readFileSync(path.join(projectRoot, file), 'utf8');
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** Read each of `graph.files` once and index its tags, scenario calls, and unreadable forms. */
|
|
50
|
+
export function buildScenarioIndex(projectRoot, graph) {
|
|
51
|
+
const files = [...graph.files];
|
|
52
|
+
const functions = [];
|
|
53
|
+
const calls = [];
|
|
54
|
+
const unreadable = [];
|
|
55
|
+
const scenarioTestFiles = [];
|
|
56
|
+
for (const file of files) {
|
|
57
|
+
const scan = scanSource(file, readSource(projectRoot, file));
|
|
58
|
+
functions.push(...scan.functions);
|
|
59
|
+
calls.push(...scan.calls);
|
|
60
|
+
unreadable.push(...scan.unreadable);
|
|
61
|
+
if (scan.scenarioTestFile)
|
|
62
|
+
scenarioTestFiles.push(file);
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
files,
|
|
66
|
+
scenarioTestFiles,
|
|
67
|
+
functions,
|
|
68
|
+
calls,
|
|
69
|
+
unreadable,
|
|
70
|
+
testsNaming: (capability, name) => testsNaming(calls, capability, name),
|
|
71
|
+
scenariosInFile: (file) => scenariosInFile(calls, file),
|
|
72
|
+
coveringTests: (functionFile, name) => coveringTests(graph, calls, functionFile, name),
|
|
73
|
+
covers: (testFile, functionFile, name) => covers(graph, calls, testFile, functionFile, name),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=scenario-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-index.js","sourceRoot":"","sources":["../../../src/core/trace/scenario-index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAKL,UAAU,GACX,MAAM,eAAe,CAAC;AAoBvB,SAAS,YAAY,CAAC,MAAwB;IAC5C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,WAAW,CAAC,KAA8B,EAAE,UAAkB,EAAE,IAAY;IACnF,OAAO,YAAY,CACjB,KAAK;SACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;SACtE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5B,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,KAA8B,EAAE,IAAY;IACnE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,SAAS,GAAqB,EAAE,CAAC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AW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC;QACvE,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;QACvD,aAAa,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC;QACtF,MAAM,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC;KAC7F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type DeltaScenario, type ScenarioOutcome } from '../spec/delta.js';
|
|
2
|
+
/** Drop every cached spec and reset the read counter. */
|
|
3
|
+
export declare function clearScenarioLookupCache(): void;
|
|
4
|
+
/** How many spec files have been read since the last cache clear. */
|
|
5
|
+
export declare function scenarioSpecReadCount(): number;
|
|
6
|
+
/** Every scenario of one capability's effective spec, for lint. */
|
|
7
|
+
export declare function effectiveScenarios(openspecRoot: string, changeFolder: string | null, capability: string): readonly DeltaScenario[];
|
|
8
|
+
/**
|
|
9
|
+
* The outcomes of one scenario, looked up by capability and exact name. Throws
|
|
10
|
+
* with the exact message when the scenario is missing, duplicated, defined in
|
|
11
|
+
* disagreeing places, or its delta cannot be merged.
|
|
12
|
+
*/
|
|
13
|
+
export declare function lookupScenario(capability: string, name: string, cwd: string, env: Record<string, string | undefined>): readonly ScenarioOutcome[];
|
|
14
|
+
//# sourceMappingURL=scenario-lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-lookup.d.ts","sourceRoot":"","sources":["../../../src/core/trace/scenario-lookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,eAAe,EAIrB,MAAM,kBAAkB,CAAC;AA6B1B,yDAAyD;AACzD,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,qEAAqE;AACrE,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAmGD,mEAAmE;AACnE,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,UAAU,EAAE,MAAM,GACjB,SAAS,aAAa,EAAE,CAI1B;AAiED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,SAAS,eAAe,EAAE,CAgB5B"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { mergeDelta, parseCapabilitySpec, parseDelta, } from '../spec/delta.js';
|
|
4
|
+
import { isActiveChangeFolderName } from '../status/layout.js';
|
|
5
|
+
const placesCache = new Map();
|
|
6
|
+
let specReads = 0;
|
|
7
|
+
/** Drop every cached spec and reset the read counter. */
|
|
8
|
+
export function clearScenarioLookupCache() {
|
|
9
|
+
placesCache.clear();
|
|
10
|
+
specReads = 0;
|
|
11
|
+
}
|
|
12
|
+
/** How many spec files have been read since the last cache clear. */
|
|
13
|
+
export function scenarioSpecReadCount() {
|
|
14
|
+
return specReads;
|
|
15
|
+
}
|
|
16
|
+
function specFilePath(openspecRoot, capability) {
|
|
17
|
+
return path.join(openspecRoot, 'specs', capability, 'spec.md');
|
|
18
|
+
}
|
|
19
|
+
function deltaFilePath(changeFolder, capability) {
|
|
20
|
+
return path.join(changeFolder, 'specs', capability, 'spec.md');
|
|
21
|
+
}
|
|
22
|
+
function relativeToHolder(openspecRoot, filePath) {
|
|
23
|
+
return path.relative(path.dirname(openspecRoot), filePath);
|
|
24
|
+
}
|
|
25
|
+
function readSpec(filePath) {
|
|
26
|
+
if (!existsSync(filePath))
|
|
27
|
+
return null;
|
|
28
|
+
specReads++;
|
|
29
|
+
return readFileSync(filePath, 'utf8');
|
|
30
|
+
}
|
|
31
|
+
function scenarioList(spec) {
|
|
32
|
+
return spec.requirements.flatMap((requirement) => requirement.scenarios);
|
|
33
|
+
}
|
|
34
|
+
/** The living spec as a place list: one entry, or none when it is absent. */
|
|
35
|
+
function livingPlaces(openspecRoot, capability, content) {
|
|
36
|
+
if (content === null)
|
|
37
|
+
return [];
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
relativePath: relativeToHolder(openspecRoot, specFilePath(openspecRoot, capability)),
|
|
41
|
+
scenarios: scenarioList(parseCapabilitySpec(content)),
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
/** The living spec merged with one change's delta, when the delta exists. */
|
|
46
|
+
function loadEffectivePlaces(openspecRoot, changeFolder, capability) {
|
|
47
|
+
const living = readSpec(specFilePath(openspecRoot, capability));
|
|
48
|
+
if (changeFolder === null)
|
|
49
|
+
return livingPlaces(openspecRoot, capability, living);
|
|
50
|
+
const deltaRaw = readSpec(deltaFilePath(changeFolder, capability));
|
|
51
|
+
if (deltaRaw === null)
|
|
52
|
+
return livingPlaces(openspecRoot, capability, living);
|
|
53
|
+
const merged = mergeDelta(living, capability, parseDelta(deltaRaw));
|
|
54
|
+
return livingPlaces(openspecRoot, capability, merged);
|
|
55
|
+
}
|
|
56
|
+
/** The living spec plus every active change's ADDED/MODIFIED requirements. */
|
|
57
|
+
function loadAllPlaces(openspecRoot, capability) {
|
|
58
|
+
const places = livingPlaces(openspecRoot, capability, readSpec(specFilePath(openspecRoot, capability)));
|
|
59
|
+
const changesDir = path.join(openspecRoot, 'changes');
|
|
60
|
+
if (!existsSync(changesDir))
|
|
61
|
+
return places;
|
|
62
|
+
const names = readdirSync(changesDir, { withFileTypes: true })
|
|
63
|
+
.filter((entry) => entry.isDirectory() && isActiveChangeFolderName(entry.name))
|
|
64
|
+
.map((entry) => entry.name)
|
|
65
|
+
.sort();
|
|
66
|
+
for (const name of names) {
|
|
67
|
+
const filePath = deltaFilePath(path.join(changesDir, name), capability);
|
|
68
|
+
const raw = readSpec(filePath);
|
|
69
|
+
if (raw === null)
|
|
70
|
+
continue;
|
|
71
|
+
const delta = parseDelta(raw);
|
|
72
|
+
const relativePath = relativeToHolder(openspecRoot, filePath);
|
|
73
|
+
for (const requirement of [...delta.added, ...delta.modified]) {
|
|
74
|
+
if (requirement.scenarios.length > 0) {
|
|
75
|
+
places.push({ relativePath, scenarios: requirement.scenarios });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return places;
|
|
80
|
+
}
|
|
81
|
+
function cachedPlaces(key, produce) {
|
|
82
|
+
const cached = placesCache.get(key);
|
|
83
|
+
if (cached !== undefined)
|
|
84
|
+
return cached;
|
|
85
|
+
const places = produce();
|
|
86
|
+
placesCache.set(key, places);
|
|
87
|
+
return places;
|
|
88
|
+
}
|
|
89
|
+
function effectivePlaces(openspecRoot, changeFolder, capability) {
|
|
90
|
+
const key = `effective\u0000${openspecRoot}\u0000${changeFolder ?? ''}\u0000${capability}`;
|
|
91
|
+
return cachedPlaces(key, () => loadEffectivePlaces(openspecRoot, changeFolder, capability));
|
|
92
|
+
}
|
|
93
|
+
function allPlaces(openspecRoot, capability) {
|
|
94
|
+
const key = `all\u0000${openspecRoot}\u0000\u0000${capability}`;
|
|
95
|
+
return cachedPlaces(key, () => loadAllPlaces(openspecRoot, capability));
|
|
96
|
+
}
|
|
97
|
+
/** Every scenario of one capability's effective spec, for lint. */
|
|
98
|
+
export function effectiveScenarios(openspecRoot, changeFolder, capability) {
|
|
99
|
+
const root = path.resolve(openspecRoot);
|
|
100
|
+
const folder = changeFolder === null ? null : path.resolve(changeFolder);
|
|
101
|
+
return effectivePlaces(root, folder, capability).flatMap((place) => place.scenarios);
|
|
102
|
+
}
|
|
103
|
+
/** The first scenario name that repeats, in document order, or null. */
|
|
104
|
+
function duplicateScenarioName(places) {
|
|
105
|
+
for (const place of places) {
|
|
106
|
+
const seen = new Set();
|
|
107
|
+
for (const scenario of place.scenarios) {
|
|
108
|
+
if (seen.has(scenario.name))
|
|
109
|
+
return scenario.name;
|
|
110
|
+
seen.add(scenario.name);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
function definitionsOf(places, name) {
|
|
116
|
+
const definitions = [];
|
|
117
|
+
for (const place of places) {
|
|
118
|
+
for (const scenario of place.scenarios) {
|
|
119
|
+
if (scenario.name === name)
|
|
120
|
+
definitions.push({ place, outcomes: scenario.outcomes });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return definitions;
|
|
124
|
+
}
|
|
125
|
+
function sameOutcomes(a, b) {
|
|
126
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
127
|
+
}
|
|
128
|
+
function resolveDefinitions(capability, name, definitions) {
|
|
129
|
+
const first = definitions[0];
|
|
130
|
+
const conflict = definitions
|
|
131
|
+
.slice(1)
|
|
132
|
+
.find((definition) => !sameOutcomes(first.outcomes, definition.outcomes));
|
|
133
|
+
if (conflict === undefined)
|
|
134
|
+
return first.outcomes;
|
|
135
|
+
throw new Error(`The ${capability} scenario "${name}" differs between ${first.place.relativePath} and ` +
|
|
136
|
+
`${conflict.place.relativePath}; set OSQ_CHANGE to the change folder the test should prove`);
|
|
137
|
+
}
|
|
138
|
+
/** The nearest ancestor of `cwd`, included, that holds `openspec/specs`. */
|
|
139
|
+
function findOpenspecRoot(cwd) {
|
|
140
|
+
const start = path.resolve(cwd);
|
|
141
|
+
let dir = start;
|
|
142
|
+
for (;;) {
|
|
143
|
+
if (existsSync(path.join(dir, 'openspec', 'specs')))
|
|
144
|
+
return path.join(dir, 'openspec');
|
|
145
|
+
const parent = path.dirname(dir);
|
|
146
|
+
if (parent === dir)
|
|
147
|
+
return path.join(start, 'openspec');
|
|
148
|
+
dir = parent;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function resolveLocation(cwd, env) {
|
|
152
|
+
const raw = env.OSQ_CHANGE?.trim();
|
|
153
|
+
if (raw) {
|
|
154
|
+
const changeFolder = path.resolve(cwd, raw);
|
|
155
|
+
return { openspecRoot: path.dirname(path.dirname(changeFolder)), changeFolder };
|
|
156
|
+
}
|
|
157
|
+
return { openspecRoot: findOpenspecRoot(cwd), changeFolder: null };
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The outcomes of one scenario, looked up by capability and exact name. Throws
|
|
161
|
+
* with the exact message when the scenario is missing, duplicated, defined in
|
|
162
|
+
* disagreeing places, or its delta cannot be merged.
|
|
163
|
+
*/
|
|
164
|
+
export function lookupScenario(capability, name, cwd, env) {
|
|
165
|
+
const location = resolveLocation(cwd, env);
|
|
166
|
+
const places = location.changeFolder === null
|
|
167
|
+
? allPlaces(location.openspecRoot, capability)
|
|
168
|
+
: effectivePlaces(location.openspecRoot, location.changeFolder, capability);
|
|
169
|
+
const duplicate = duplicateScenarioName(places);
|
|
170
|
+
if (duplicate !== null) {
|
|
171
|
+
throw new Error(`The ${capability} spec has two scenarios named "${duplicate}"`);
|
|
172
|
+
}
|
|
173
|
+
const definitions = definitionsOf(places, name);
|
|
174
|
+
if (definitions.length === 0) {
|
|
175
|
+
throw new Error(`The ${capability} spec has no scenario "${name}"`);
|
|
176
|
+
}
|
|
177
|
+
return resolveDefinitions(capability, name, definitions);
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=scenario-lookup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-lookup.js","sourceRoot":"","sources":["../../../src/core/trace/scenario-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAIL,U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MAAM,GACV,QAAQ,CAAC,YAAY,KAAK,IAAI;QAC5B,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;QAC9C,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAEhF,MAAM,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,OAAO,UAAU,kCAAkC,SAAS,GAAG,CAAC,CAAC;IACnF,CAAC;IACD,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,OAAO,UAAU,0BAA0B,IAAI,GAAG,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,kBAAkB,CAAC,UAAU,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tag and scenario call scanner. It reads one file's text with regular
|
|
3
|
+
* expressions over lines, never a TypeScript parser, which would be a fifth
|
|
4
|
+
* runtime dependency.
|
|
5
|
+
*/
|
|
6
|
+
/** One scenario a function serves, from a `@scenario` tag. */
|
|
7
|
+
export interface TaggedScenario {
|
|
8
|
+
readonly capability: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
}
|
|
11
|
+
/** One exported function the scanner reads, with its tags. */
|
|
12
|
+
export interface ScannedFunction {
|
|
13
|
+
readonly file: string;
|
|
14
|
+
readonly line: number;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly scenarios: readonly TaggedScenario[];
|
|
17
|
+
readonly adrs: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
/** One readable `scenario(...)` call in a scenario test file. */
|
|
20
|
+
export interface ScenarioCall {
|
|
21
|
+
readonly file: string;
|
|
22
|
+
readonly line: number;
|
|
23
|
+
readonly capability: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly covers: string;
|
|
26
|
+
}
|
|
27
|
+
/** A tag or scenario call the scanner cannot read, with its 1-based line. */
|
|
28
|
+
export interface UnreadableForm {
|
|
29
|
+
readonly file: string;
|
|
30
|
+
readonly line: number;
|
|
31
|
+
readonly reason: string;
|
|
32
|
+
/** The call's literal capability, present only when that much was readable. */
|
|
33
|
+
readonly capability?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Everything one source file yields. */
|
|
36
|
+
export interface TagScan {
|
|
37
|
+
readonly scenarioTestFile: boolean;
|
|
38
|
+
readonly functions: readonly ScannedFunction[];
|
|
39
|
+
readonly calls: readonly ScenarioCall[];
|
|
40
|
+
readonly unreadable: readonly UnreadableForm[];
|
|
41
|
+
}
|
|
42
|
+
/** Scan one file's text for exported functions with tags, scenario calls, and unreadable forms. */
|
|
43
|
+
export declare function scanSource(file: string, text: string): TagScan;
|
|
44
|
+
//# sourceMappingURL=tag-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-scan.d.ts","sourceRoot":"","sources":["../../../src/core/trace/tag-scan.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,iEAAiE;AACjE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,yCAAyC;AACzC,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,SAAS,cAAc,EAAE,CAAC;CAChD;AAkMD,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQ9D"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tag and scenario call scanner. It reads one file's text with regular
|
|
3
|
+
* expressions over lines, never a TypeScript parser, which would be a fifth
|
|
4
|
+
* runtime dependency.
|
|
5
|
+
*/
|
|
6
|
+
const UNATTACHED = 'tag is not attached to an exported function';
|
|
7
|
+
const BAD_TAG = 'tag is not a valid @scenario or @adr';
|
|
8
|
+
const BAD_SCENARIO = '@scenario is not "<capability>: <name>"';
|
|
9
|
+
const BAD_ADR = '@adr has no digits';
|
|
10
|
+
const BAD_CAPABILITY = 'scenario call capability is not a literal';
|
|
11
|
+
const BAD_NAME = 'scenario call name is not a literal';
|
|
12
|
+
const BAD_COVERS = 'scenario call covers is not an identifier';
|
|
13
|
+
const ALIASED_IMPORT = 'scenario is imported under another name';
|
|
14
|
+
const FUNCTION_DECL = /^\s*export\s+(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/;
|
|
15
|
+
const CONST_DECL = /^\s*export\s+const\s+([A-Za-z_$][\w$]*)(?::(?:=>|[^=])*)?\s*=\s*(?:async\s*)?(?:function\b|(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;
|
|
16
|
+
/** The exported function a declaration line names, or null. */
|
|
17
|
+
function declarationName(line) {
|
|
18
|
+
if (line === undefined)
|
|
19
|
+
return null;
|
|
20
|
+
return (FUNCTION_DECL.exec(line) ?? CONST_DECL.exec(line))?.[1] ?? null;
|
|
21
|
+
}
|
|
22
|
+
/** True when a trimmed comment line holds a tag. */
|
|
23
|
+
function isTagLike(trimmed) {
|
|
24
|
+
const comment = trimmed.startsWith('*') || trimmed.startsWith('//') || trimmed.startsWith('/*');
|
|
25
|
+
return comment && (trimmed.includes('@scenario') || trimmed.includes('@adr'));
|
|
26
|
+
}
|
|
27
|
+
/** A comment line's text with its markers stripped. */
|
|
28
|
+
function cleanTagText(trimmed) {
|
|
29
|
+
return trimmed
|
|
30
|
+
.replace(/^(?:\/\*+|\/\/|\*+)/, '')
|
|
31
|
+
.replace(/\*\/\s*$/, '')
|
|
32
|
+
.trim();
|
|
33
|
+
}
|
|
34
|
+
/** One `@scenario` or `@adr` line, or how it is unreadable. */
|
|
35
|
+
function parseTag(text) {
|
|
36
|
+
if (text.startsWith('@scenario')) {
|
|
37
|
+
const rest = text.slice('@scenario'.length).trim();
|
|
38
|
+
const colon = rest.indexOf(':');
|
|
39
|
+
const capability = colon === -1 ? '' : rest.slice(0, colon).trim();
|
|
40
|
+
const name = colon === -1 ? '' : rest.slice(colon + 1).trim();
|
|
41
|
+
if (capability === '' || name === '')
|
|
42
|
+
return { kind: 'bad', reason: BAD_SCENARIO };
|
|
43
|
+
return { kind: 'scenario', capability, name };
|
|
44
|
+
}
|
|
45
|
+
if (text.startsWith('@adr')) {
|
|
46
|
+
const rest = text.slice('@adr'.length).trim();
|
|
47
|
+
if (!/^\d+$/.test(rest))
|
|
48
|
+
return { kind: 'bad', reason: BAD_ADR };
|
|
49
|
+
return { kind: 'adr', number: rest };
|
|
50
|
+
}
|
|
51
|
+
return { kind: 'bad', reason: BAD_TAG };
|
|
52
|
+
}
|
|
53
|
+
/** Read every comment, attaching tags to the declaration below a doc comment. */
|
|
54
|
+
function collectTags(file, text, unreadable) {
|
|
55
|
+
const lines = text.split('\n');
|
|
56
|
+
const tags = new Map();
|
|
57
|
+
let block = null;
|
|
58
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
59
|
+
const trimmed = (lines[index] ?? '').trim();
|
|
60
|
+
if (block === null) {
|
|
61
|
+
if (trimmed.startsWith('/**'))
|
|
62
|
+
block = { kind: 'doc', tagLines: [] };
|
|
63
|
+
else if (trimmed.startsWith('/*'))
|
|
64
|
+
block = { kind: 'plain', tagLines: [] };
|
|
65
|
+
else if (trimmed.startsWith('//')) {
|
|
66
|
+
if (isTagLike(trimmed)) {
|
|
67
|
+
unreadable.push(unreadableForm(file, index + 1, parseTag(cleanTagText(trimmed))));
|
|
68
|
+
}
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
else
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (isTagLike(trimmed))
|
|
75
|
+
block.tagLines.push({ line: index + 1, text: trimmed });
|
|
76
|
+
if (!trimmed.includes('*/'))
|
|
77
|
+
continue;
|
|
78
|
+
const attached = block.kind === 'doc' && declarationName(lines[index + 1]) !== null;
|
|
79
|
+
const accumulator = tags.get(index + 2) ?? { scenarios: [], adrs: [] };
|
|
80
|
+
for (const tagLine of block.tagLines) {
|
|
81
|
+
const tag = parseTag(cleanTagText(tagLine.text));
|
|
82
|
+
if (attached && tag.kind === 'scenario') {
|
|
83
|
+
accumulator.scenarios.push({ capability: tag.capability, name: tag.name });
|
|
84
|
+
}
|
|
85
|
+
else if (attached && tag.kind === 'adr') {
|
|
86
|
+
accumulator.adrs.push(tag.number);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
unreadable.push(unreadableForm(file, tagLine.line, tag));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (attached)
|
|
93
|
+
tags.set(index + 2, accumulator);
|
|
94
|
+
block = null;
|
|
95
|
+
}
|
|
96
|
+
return tags;
|
|
97
|
+
}
|
|
98
|
+
/** A tag line's unreadable form. */
|
|
99
|
+
function unreadableForm(file, line, tag) {
|
|
100
|
+
return { file, line, reason: tag.kind === 'bad' ? tag.reason : UNATTACHED };
|
|
101
|
+
}
|
|
102
|
+
/** Every exported function in the documented forms, with the tags attached to it. */
|
|
103
|
+
function scanFunctions(file, text, tags) {
|
|
104
|
+
const functions = [];
|
|
105
|
+
const lines = text.split('\n');
|
|
106
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
107
|
+
const name = declarationName(lines[index]);
|
|
108
|
+
if (name === null)
|
|
109
|
+
continue;
|
|
110
|
+
const attached = tags.get(index + 1);
|
|
111
|
+
functions.push({
|
|
112
|
+
file,
|
|
113
|
+
line: index + 1,
|
|
114
|
+
name,
|
|
115
|
+
scenarios: attached?.scenarios ?? [],
|
|
116
|
+
adrs: attached?.adrs ?? [],
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return functions;
|
|
120
|
+
}
|
|
121
|
+
/** The 1-based line of a character offset. */
|
|
122
|
+
function lineOf(text, index) {
|
|
123
|
+
let line = 1;
|
|
124
|
+
for (let position = 0; position < index && position < text.length; position += 1) {
|
|
125
|
+
if (text[position] === '\n')
|
|
126
|
+
line += 1;
|
|
127
|
+
}
|
|
128
|
+
return line;
|
|
129
|
+
}
|
|
130
|
+
const CALL_START = /\bscenario\s*\(/g;
|
|
131
|
+
const READABLE_CALL = /\bscenario\s*\(\s*(['"])((?:[^\\])*?)\1\s*,\s*(['"])((?:[^\\])*?)\3\s*,\s*\{\s*covers\s*:\s*([A-Za-z_$][\w$]*)\s*(?:\}|,)/g;
|
|
132
|
+
const COVERS = /^\s*\{\s*covers\s*:\s*([A-Za-z_$][\w$]*)\s*(?:\}|,)/;
|
|
133
|
+
/** Why a `scenario(` call could not be read, naming the argument that isn't a literal. */
|
|
134
|
+
function callReason(text, start) {
|
|
135
|
+
const after = text.slice(start);
|
|
136
|
+
const first = /^\s*(['"])((?:[^\\])*?)\1\s*,\s*/.exec(after);
|
|
137
|
+
if (first === null)
|
|
138
|
+
return BAD_CAPABILITY;
|
|
139
|
+
const rest = after.slice(first[0].length);
|
|
140
|
+
const second = /^\s*(['"])((?:[^\\])*?)\1\s*,\s*/.exec(rest);
|
|
141
|
+
if (second === null)
|
|
142
|
+
return BAD_NAME;
|
|
143
|
+
return COVERS.test(rest.slice(second[0].length)) ? BAD_TAG : BAD_COVERS;
|
|
144
|
+
}
|
|
145
|
+
/** Read every `scenario(` call, recording the unreadable ones. */
|
|
146
|
+
function scanScenarioCalls(file, text, calls, unreadable) {
|
|
147
|
+
const readable = new Set();
|
|
148
|
+
for (const match of text.matchAll(READABLE_CALL)) {
|
|
149
|
+
const index = match.index ?? 0;
|
|
150
|
+
readable.add(index);
|
|
151
|
+
calls.push({
|
|
152
|
+
file,
|
|
153
|
+
line: lineOf(text, index),
|
|
154
|
+
capability: match[2] ?? '',
|
|
155
|
+
name: match[4] ?? '',
|
|
156
|
+
covers: match[5] ?? '',
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
for (const match of text.matchAll(CALL_START)) {
|
|
160
|
+
const index = match.index ?? 0;
|
|
161
|
+
if (readable.has(index))
|
|
162
|
+
continue;
|
|
163
|
+
const start = index + match[0].length;
|
|
164
|
+
const capability = /^\s*(['"])((?:[^\\])*?)\1/.exec(text.slice(start))?.[2];
|
|
165
|
+
unreadable.push({
|
|
166
|
+
file,
|
|
167
|
+
line: lineOf(text, index),
|
|
168
|
+
reason: callReason(text, start),
|
|
169
|
+
capability: capability ?? undefined,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const TESTING_IMPORT = /(?:from\s*|require\s*\(\s*|import\s*\(\s*)['"]@matteeh\/osq\/testing['"]/;
|
|
174
|
+
const NAMED_TESTING_IMPORT = /import\s*\{([^}]*)\}\s*from\s*['"]@matteeh\/osq\/testing['"]/g;
|
|
175
|
+
/** True when the file imports the testing helper; record an aliased `scenario` import. */
|
|
176
|
+
function scanTestingImport(file, text, unreadable) {
|
|
177
|
+
if (!TESTING_IMPORT.test(text))
|
|
178
|
+
return false;
|
|
179
|
+
for (const match of text.matchAll(NAMED_TESTING_IMPORT)) {
|
|
180
|
+
for (const part of (match[1] ?? '').split(',')) {
|
|
181
|
+
const alias = /^\s*scenario\s+as\s+([A-Za-z_$][\w$]*)\s*$/.exec(part);
|
|
182
|
+
if (alias !== null && alias[1] !== 'scenario') {
|
|
183
|
+
unreadable.push({ file, line: lineOf(text, match.index ?? 0), reason: ALIASED_IMPORT });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
/** Scan one file's text for exported functions with tags, scenario calls, and unreadable forms. */
|
|
190
|
+
export function scanSource(file, text) {
|
|
191
|
+
const calls = [];
|
|
192
|
+
const unreadable = [];
|
|
193
|
+
const scenarioTestFile = scanTestingImport(file, text, unreadable);
|
|
194
|
+
const tags = collectTags(file, text, unreadable);
|
|
195
|
+
const functions = scanFunctions(file, text, tags);
|
|
196
|
+
if (scenarioTestFile)
|
|
197
|
+
scanScenarioCalls(file, text, calls, unreadable);
|
|
198
|
+
return { scenarioTestFile, functions, calls, unreadable };
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=tag-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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AAE,CAAC;YAC/C,MAAM,KAAK,GAAG,4CAA4C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;gBAC9C,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;YAC1F,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAY;IACnD,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,MAAM,UAAU,GAAqB,EAAE,CAAC;IACxC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAClD,IAAI,gBAAgB;QAAE,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACvE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OsqConfig } from '../foundation/config.js';
|
|
2
|
+
import type { DoctorCheckResult } from '../foundation/doctor.js';
|
|
3
|
+
export interface DoctorGitOptions {
|
|
4
|
+
/** Override the git binary; tests use an absent path for the missing case. */
|
|
5
|
+
readonly gitBinary?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The `git` doctor check, the version-control warnings, and, when a
|
|
9
|
+
* redirecting variable is set, the `git-env` warning. All pass with a warning
|
|
10
|
+
* and never change doctor's exit code.
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkGit(projectRoot: string, config: OsqConfig, options?: DoctorGitOptions): Promise<DoctorCheckResult[]>;
|
|
13
|
+
//# sourceMappingURL=doctor-git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-git.d.ts","sourceRoot":"","sources":["../../../src/core/vcs/doctor-git.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAuBjE,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAkGD;;;;GAIG;AACH,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAW9B"}
|