@zxyycom/vibe-check 0.0.1
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/LICENSE +21 -0
- package/README.md +154 -0
- package/dist/esm/check/check.mjs +5 -0
- package/dist/esm/check/check.mjs.map +1 -0
- package/dist/esm/check/descriptor-validation.mjs +37 -0
- package/dist/esm/check/descriptor-validation.mjs.map +1 -0
- package/dist/esm/check/descriptor.mjs +2 -0
- package/dist/esm/check/descriptor.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +62 -0
- package/dist/esm/check/inherited-collection.mjs.map +1 -0
- package/dist/esm/check/options-snapshot.mjs +75 -0
- package/dist/esm/check/options-snapshot.mjs.map +1 -0
- package/dist/esm/check-settlement/fact-validation.mjs +216 -0
- package/dist/esm/check-settlement/fact-validation.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs +2 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs +80 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs.map +1 -0
- package/dist/esm/check-settlement/record-store.mjs +59 -0
- package/dist/esm/check-settlement/record-store.mjs.map +1 -0
- package/dist/esm/check-settlement/session.mjs +179 -0
- package/dist/esm/check-settlement/session.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-data.mjs +159 -0
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-json.mjs +2 -0
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -0
- package/dist/esm/data-boundary/closed-values.mjs +98 -0
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -0
- package/dist/esm/data-boundary/value-shapes.mjs +13 -0
- package/dist/esm/data-boundary/value-shapes.mjs.map +1 -0
- package/dist/esm/finding-waivers/reconciliation.mjs +84 -0
- package/dist/esm/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/index.mjs +26 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs +102 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs +14 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs.map +1 -0
- package/dist/esm/machine-output/v4/projection.mjs +23 -0
- package/dist/esm/machine-output/v4/projection.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs +59 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-model.mjs +19 -0
- package/dist/esm/machine-output/v4/publication-model.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publish.mjs +20 -0
- package/dist/esm/machine-output/v4/publish.mjs.map +1 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs +9 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs +8 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema.mjs +50 -0
- package/dist/esm/machine-output/v4/schema.mjs.map +1 -0
- package/dist/esm/machine-output/v4/serializers.mjs +9 -0
- package/dist/esm/machine-output/v4/serializers.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation-result.mjs +16 -0
- package/dist/esm/machine-output/v4/validation-result.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation.mjs +131 -0
- package/dist/esm/machine-output/v4/validation.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs +49 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs +71 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs +37 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs +38 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs +47 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs +44 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +39 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +124 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +77 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs +87 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs +94 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs +180 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs +10 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs +151 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs +126 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs +60 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs +5 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs +119 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs +39 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs +170 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs +33 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs +82 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/records.mjs +109 -0
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +59 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs +17 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs +145 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +54 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/final-data-parsing.mjs +35 -0
- package/dist/esm/package-checks/final-data-parsing.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs +96 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs +43 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs +178 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs +64 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs +17 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs +138 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs +71 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/records.mjs +133 -0
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs +75 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs +4 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs +81 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/git.mjs +51 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/path.mjs +18 -0
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs +13 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs +2 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs +19 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs +34 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs +33 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs +30 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs +163 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs +141 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs +64 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs +35 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs +118 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs +45 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs +212 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +128 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs +71 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs +190 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +234 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs +27 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs +138 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs +33 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs +16 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs +73 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs +153 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +155 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +58 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs +125 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs +72 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +55 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +199 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs +109 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs +28 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs +158 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs +17 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +191 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +83 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +50 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs +2 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs +32 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs +196 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs +23 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs +41 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +142 -0
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs +11 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/configuration.mjs +104 -0
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs +24 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs +36 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +57 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +72 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs +13 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs +30 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs +19 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +102 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +242 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +50 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs +60 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -0
- package/dist/esm/project-definition/output-defaults.mjs +7 -0
- package/dist/esm/project-definition/output-defaults.mjs.map +1 -0
- package/dist/esm/project-definition/output-validation.mjs +44 -0
- package/dist/esm/project-definition/output-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +95 -0
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition.mjs +92 -0
- package/dist/esm/project-definition/project-definition.mjs.map +1 -0
- package/dist/esm/project-run/aggregation.mjs +66 -0
- package/dist/esm/project-run/aggregation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +70 -0
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs +50 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +103 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +90 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/messages.mjs +38 -0
- package/dist/esm/project-run/check-execution/messages.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/plan.mjs +35 -0
- package/dist/esm/project-run/check-execution/plan.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs +83 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight.mjs +186 -0
- package/dist/esm/project-run/check-execution/preflight.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +168 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +49 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -0
- package/dist/esm/project-run/completion.mjs +173 -0
- package/dist/esm/project-run/completion.mjs.map +1 -0
- package/dist/esm/project-run/controls/contract.mjs +2 -0
- package/dist/esm/project-run/controls/contract.mjs.map +1 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs +61 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation-result.mjs +2 -0
- package/dist/esm/project-run/controls/validation-result.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation.mjs +156 -0
- package/dist/esm/project-run/controls/validation.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +182 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs +242 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs.map +1 -0
- package/dist/esm/project-run/invocation-creation.mjs +111 -0
- package/dist/esm/project-run/invocation-creation.mjs.map +1 -0
- package/dist/esm/project-run/invocation.mjs +195 -0
- package/dist/esm/project-run/invocation.mjs.map +1 -0
- package/dist/esm/project-run/machine-publication.mjs +16 -0
- package/dist/esm/project-run/machine-publication.mjs.map +1 -0
- package/dist/esm/project-run/output-configuration.mjs +17 -0
- package/dist/esm/project-run/output-configuration.mjs.map +1 -0
- package/dist/esm/project-run/output-status.mjs +43 -0
- package/dist/esm/project-run/output-status.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs +135 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +100 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +123 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs +12 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -0
- package/dist/esm/project-run/project-context.mjs +8 -0
- package/dist/esm/project-run/project-context.mjs.map +1 -0
- package/dist/esm/project-run/result.mjs +54 -0
- package/dist/esm/project-run/result.mjs.map +1 -0
- package/dist/esm/project-run/run.mjs +23 -0
- package/dist/esm/project-run/run.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs +66 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs +119 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs +116 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs +82 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs +27 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs +125 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs +74 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +147 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -0
- package/docs/api-mechanics.md +205 -0
- package/docs/checks/duplicate-detection.md +195 -0
- package/docs/checks/file-metrics.md +229 -0
- package/docs/checks/function-metrics.md +222 -0
- package/docs/checks/json-schema-validation.md +190 -0
- package/docs/checks/json-validation.md +133 -0
- package/docs/checks/maintenance-reminders.md +158 -0
- package/docs/checks/markdown-link-validation.md +192 -0
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +195 -0
- package/docs/examples/artifacts/mixed-outcomes/records.ndjson +2 -0
- package/docs/examples/artifacts/mixed-outcomes/run.json +70 -0
- package/docs/output.md +97 -0
- package/docs/schemas/vibe-check-record.schema.json +33 -0
- package/docs/schemas/vibe-check-run.schema.json +173 -0
- package/index.mjs +1 -0
- package/package.json +49 -0
- package/src/check/check.ts +497 -0
- package/src/check/descriptor-validation.ts +60 -0
- package/src/check/descriptor.ts +5 -0
- package/src/check/inherited-collection.ts +101 -0
- package/src/check/options-snapshot.ts +80 -0
- package/src/check-settlement/fact-validation.ts +289 -0
- package/src/check-settlement/facts.ts +27 -0
- package/src/check-settlement/outcome-normalization.ts +118 -0
- package/src/check-settlement/record-store.ts +73 -0
- package/src/check-settlement/session.ts +257 -0
- package/src/data-boundary/canonical-data.ts +188 -0
- package/src/data-boundary/canonical-json.ts +11 -0
- package/src/data-boundary/closed-values.ts +126 -0
- package/src/data-boundary/value-shapes.ts +15 -0
- package/src/finding-waivers/reconciliation.ts +176 -0
- package/src/index.ts +123 -0
- package/src/machine-output/v4/atomic-publication.ts +123 -0
- package/src/machine-output/v4/freeze-publication-value.ts +12 -0
- package/src/machine-output/v4/projection.ts +36 -0
- package/src/machine-output/v4/publication-invariants.ts +89 -0
- package/src/machine-output/v4/publication-model.ts +38 -0
- package/src/machine-output/v4/publish.ts +23 -0
- package/src/machine-output/v4/records-fingerprint.ts +12 -0
- package/src/machine-output/v4/schema-identities.ts +8 -0
- package/src/machine-output/v4/schema.ts +97 -0
- package/src/machine-output/v4/serializers.ts +18 -0
- package/src/machine-output/v4/validation-result.ts +59 -0
- package/src/machine-output/v4/validation.ts +166 -0
- package/src/package-checks/code-quality-findings/policy.ts +85 -0
- package/src/package-checks/duplicate-detection/area-policy.ts +103 -0
- package/src/package-checks/duplicate-detection/cache/cache-contract.ts +49 -0
- package/src/package-checks/duplicate-detection/cache/identity.ts +61 -0
- package/src/package-checks/duplicate-detection/cache/key.ts +46 -0
- package/src/package-checks/duplicate-detection/cache/payload.ts +78 -0
- package/src/package-checks/duplicate-detection/cache/store.ts +77 -0
- package/src/package-checks/duplicate-detection/default-check.ts +50 -0
- package/src/package-checks/duplicate-detection/execution.ts +168 -0
- package/src/package-checks/duplicate-detection/final-data.ts +10 -0
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/command-path.ts +8 -0
- package/src/package-checks/duplicate-detection/jscpd/command-resolution.ts +112 -0
- package/src/package-checks/duplicate-detection/jscpd/json-report.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner-contract.ts +18 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner.ts +257 -0
- package/src/package-checks/duplicate-detection/jscpd/scoped-fragments.ts +17 -0
- package/src/package-checks/duplicate-detection/measurement-model.ts +44 -0
- package/src/package-checks/duplicate-detection/measurement.ts +223 -0
- package/src/package-checks/duplicate-detection/options-resolution.ts +162 -0
- package/src/package-checks/duplicate-detection/options-validation.ts +75 -0
- package/src/package-checks/duplicate-detection/options.ts +72 -0
- package/src/package-checks/duplicate-detection/project-revision.ts +5 -0
- package/src/package-checks/duplicate-detection/records.ts +171 -0
- package/src/package-checks/file-metrics/constructor.ts +46 -0
- package/src/package-checks/file-metrics/execution.ts +233 -0
- package/src/package-checks/file-metrics/final-data.ts +10 -0
- package/src/package-checks/file-metrics/measurement-model.ts +10 -0
- package/src/package-checks/file-metrics/measurement.ts +52 -0
- package/src/package-checks/file-metrics/options-resolution.ts +213 -0
- package/src/package-checks/file-metrics/options-validation.ts +104 -0
- package/src/package-checks/file-metrics/options.ts +91 -0
- package/src/package-checks/file-metrics/records.ts +182 -0
- package/src/package-checks/file-metrics/scc/availability.ts +100 -0
- package/src/package-checks/file-metrics/scc/csv.ts +20 -0
- package/src/package-checks/file-metrics/scc/parser.ts +223 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +68 -0
- package/src/package-checks/final-data-parsing.ts +49 -0
- package/src/package-checks/function-metrics/analysis.ts +138 -0
- package/src/package-checks/function-metrics/constructor.ts +55 -0
- package/src/package-checks/function-metrics/execution.ts +263 -0
- package/src/package-checks/function-metrics/final-data.ts +10 -0
- package/src/package-checks/function-metrics/lizard/availability.ts +90 -0
- package/src/package-checks/function-metrics/lizard/csv.ts +20 -0
- package/src/package-checks/function-metrics/lizard/parser.ts +179 -0
- package/src/package-checks/function-metrics/lizard/scanner.ts +62 -0
- package/src/package-checks/function-metrics/measurement-model.ts +30 -0
- package/src/package-checks/function-metrics/measurement.ts +57 -0
- package/src/package-checks/function-metrics/options-resolution.ts +215 -0
- package/src/package-checks/function-metrics/options-validation.ts +89 -0
- package/src/package-checks/function-metrics/options.ts +84 -0
- package/src/package-checks/function-metrics/records.ts +254 -0
- package/src/package-checks/function-metrics/target-files.ts +85 -0
- package/src/package-checks/host-environment/error-message.ts +3 -0
- package/src/package-checks/host-environment/filesystem.ts +110 -0
- package/src/package-checks/host-environment/git.ts +68 -0
- package/src/package-checks/host-environment/path.ts +20 -0
- package/src/package-checks/host-environment/process/command.ts +21 -0
- package/src/package-checks/host-environment/process/contract.ts +56 -0
- package/src/package-checks/host-environment/process/env.ts +25 -0
- package/src/package-checks/host-environment/process/failure.ts +40 -0
- package/src/package-checks/host-environment/process/result.ts +39 -0
- package/src/package-checks/host-environment/process/runner.ts +47 -0
- package/src/package-checks/json-document/strict-document.ts +209 -0
- package/src/package-checks/json-schema-validation/default-check.ts +54 -0
- package/src/package-checks/json-schema-validation/execution-stages.ts +230 -0
- package/src/package-checks/json-schema-validation/final-data.ts +115 -0
- package/src/package-checks/json-schema-validation/issue-collector.ts +43 -0
- package/src/package-checks/json-schema-validation/json-schema-validation.ts +191 -0
- package/src/package-checks/json-schema-validation/options-resolution.ts +61 -0
- package/src/package-checks/json-schema-validation/options-validation.ts +256 -0
- package/src/package-checks/json-schema-validation/options.ts +66 -0
- package/src/package-checks/json-schema-validation/reference-resolver.ts +165 -0
- package/src/package-checks/json-schema-validation/remote-response.ts +84 -0
- package/src/package-checks/json-schema-validation/schema-engine.ts +263 -0
- package/src/package-checks/json-schema-validation/schema-policy.ts +275 -0
- package/src/package-checks/json-validation/default-check.ts +48 -0
- package/src/package-checks/json-validation/final-data.ts +46 -0
- package/src/package-checks/json-validation/json-validation.ts +212 -0
- package/src/package-checks/json-validation/options-resolution.ts +50 -0
- package/src/package-checks/json-validation/options-validation.ts +27 -0
- package/src/package-checks/json-validation/options.ts +18 -0
- package/src/package-checks/maintenance-reminders/assessment-results.ts +117 -0
- package/src/package-checks/maintenance-reminders/final-data.ts +239 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +264 -0
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +67 -0
- package/src/package-checks/maintenance-reminders/measurement.ts +183 -0
- package/src/package-checks/maintenance-reminders/options-validation.ts +88 -0
- package/src/package-checks/markdown-link-validation/default-check.ts +70 -0
- package/src/package-checks/markdown-link-validation/execution.ts +325 -0
- package/src/package-checks/markdown-link-validation/filesystem-probes.ts +127 -0
- package/src/package-checks/markdown-link-validation/final-data.ts +47 -0
- package/src/package-checks/markdown-link-validation/local-resolution.ts +306 -0
- package/src/package-checks/markdown-link-validation/local-resolver.ts +51 -0
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +302 -0
- package/src/package-checks/markdown-link-validation/options-resolution.ts +114 -0
- package/src/package-checks/markdown-link-validation/options-validation.ts +72 -0
- package/src/package-checks/markdown-link-validation/options.ts +50 -0
- package/src/package-checks/markdown-link-validation/records.ts +77 -0
- package/src/package-checks/markdown-link-validation/resolver-engine.ts +276 -0
- package/src/package-checks/markdown-link-validation/target-descriptor.ts +34 -0
- package/src/package-checks/markdown-link-validation/traversal-result.ts +58 -0
- package/src/package-checks/project-files/collection.ts +199 -0
- package/src/package-checks/project-files/config-glob.ts +17 -0
- package/src/package-checks/project-files/configuration.ts +152 -0
- package/src/package-checks/project-files/exact-input-measurement.ts +38 -0
- package/src/package-checks/project-files/file-fingerprint.ts +46 -0
- package/src/package-checks/project-files/gitlink-revision.ts +82 -0
- package/src/package-checks/project-files/gitlink-worktree.ts +106 -0
- package/src/package-checks/project-files/input-eligibility.ts +21 -0
- package/src/package-checks/project-files/reported-path.ts +35 -0
- package/src/package-checks/project-files/revision-paths.ts +34 -0
- package/src/package-checks/project-files/revision-worktree-files.ts +148 -0
- package/src/project-definition/check-tree/authoring.ts +332 -0
- package/src/project-definition/check-tree/materialization.ts +56 -0
- package/src/project-definition/check-tree/resolution.ts +108 -0
- package/src/project-definition/output-defaults.ts +6 -0
- package/src/project-definition/output-validation.ts +54 -0
- package/src/project-definition/project-definition-validation.ts +123 -0
- package/src/project-definition/project-definition.ts +184 -0
- package/src/project-run/aggregation.ts +90 -0
- package/src/project-run/check-execution/callback.ts +106 -0
- package/src/project-run/check-execution/dependencies.ts +70 -0
- package/src/project-run/check-execution/execution-finalization.ts +177 -0
- package/src/project-run/check-execution/execution-settlement.ts +147 -0
- package/src/project-run/check-execution/messages.ts +46 -0
- package/src/project-run/check-execution/plan.ts +46 -0
- package/src/project-run/check-execution/preflight-result.ts +131 -0
- package/src/project-run/check-execution/preflight.ts +321 -0
- package/src/project-run/check-execution/resolved-checks.ts +285 -0
- package/src/project-run/check-execution/terminal-result.ts +74 -0
- package/src/project-run/completion.ts +263 -0
- package/src/project-run/controls/contract.ts +24 -0
- package/src/project-run/controls/outputs-override-validation.ts +86 -0
- package/src/project-run/controls/validation-result.ts +12 -0
- package/src/project-run/controls/validation.ts +176 -0
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +223 -0
- package/src/project-run/diagnostic-logging/logger.ts +325 -0
- package/src/project-run/invocation-creation.ts +160 -0
- package/src/project-run/invocation.ts +303 -0
- package/src/project-run/machine-publication.ts +23 -0
- package/src/project-run/output-configuration.ts +24 -0
- package/src/project-run/output-status.ts +69 -0
- package/src/project-run/progress-rendering/presentation.ts +189 -0
- package/src/project-run/progress-rendering/renderer-formatting.ts +141 -0
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +152 -0
- package/src/project-run/progress-rendering/renderer.ts +68 -0
- package/src/project-run/project-context.ts +11 -0
- package/src/project-run/result.ts +175 -0
- package/src/project-run/run.ts +50 -0
- package/src/project-run/task-scheduler/execution-state.ts +153 -0
- package/src/project-run/task-scheduler/graph-validation.ts +176 -0
- package/src/project-run/task-scheduler/graph.ts +185 -0
- package/src/project-run/task-scheduler/scheduler-admission-decision.ts +177 -0
- package/src/project-run/task-scheduler/scheduler-blocker-summary.ts +42 -0
- package/src/project-run/task-scheduler/scheduler-decision-inspection.ts +199 -0
- package/src/project-run/task-scheduler/scheduler-decision-model.ts +158 -0
- package/src/project-run/task-scheduler/scheduler-decision.ts +103 -0
- package/src/project-run/task-scheduler/scheduler.ts +228 -0
- package/third-party-licenses/momoa-3.3.12-LICENSE +201 -0
- package/types/check/check.d.ts +350 -0
- package/types/check/descriptor-validation.d.ts +18 -0
- package/types/check/descriptor.d.ts +5 -0
- package/types/check/inherited-collection.d.ts +35 -0
- package/types/check/options-snapshot.d.ts +2 -0
- package/types/check-settlement/fact-validation.d.ts +14 -0
- package/types/check-settlement/facts.d.ts +19 -0
- package/types/check-settlement/outcome-normalization.d.ts +9 -0
- package/types/check-settlement/record-store.d.ts +14 -0
- package/types/check-settlement/session.d.ts +41 -0
- package/types/data-boundary/canonical-data.d.ts +13 -0
- package/types/data-boundary/canonical-json.d.ts +6 -0
- package/types/data-boundary/closed-values.d.ts +8 -0
- package/types/data-boundary/value-shapes.d.ts +4 -0
- package/types/finding-waivers/reconciliation.d.ts +66 -0
- package/types/index.d.ts +57 -0
- package/types/machine-output/v4/atomic-publication.d.ts +9 -0
- package/types/machine-output/v4/freeze-publication-value.d.ts +6 -0
- package/types/machine-output/v4/projection.d.ts +7 -0
- package/types/machine-output/v4/publication-invariants.d.ts +3 -0
- package/types/machine-output/v4/publication-model.d.ts +15 -0
- package/types/machine-output/v4/publish.d.ts +7 -0
- package/types/machine-output/v4/records-fingerprint.d.ts +4 -0
- package/types/machine-output/v4/schema-identities.d.ts +7 -0
- package/types/machine-output/v4/schema.d.ts +44 -0
- package/types/machine-output/v4/serializers.d.ts +6 -0
- package/types/machine-output/v4/validation-result.d.ts +26 -0
- package/types/machine-output/v4/validation.d.ts +6 -0
- package/types/package-checks/code-quality-findings/policy.d.ts +20 -0
- package/types/package-checks/duplicate-detection/area-policy.d.ts +3 -0
- package/types/package-checks/duplicate-detection/cache/cache-contract.d.ts +48 -0
- package/types/package-checks/duplicate-detection/cache/identity.d.ts +17 -0
- package/types/package-checks/duplicate-detection/cache/key.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/payload.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/store.d.ts +18 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +11 -0
- package/types/package-checks/duplicate-detection/execution.d.ts +11 -0
- package/types/package-checks/duplicate-detection/final-data.d.ts +5 -0
- package/types/package-checks/duplicate-detection/jscpd/availability.d.ts +19 -0
- package/types/package-checks/duplicate-detection/jscpd/command-path.d.ts +1 -0
- package/types/package-checks/duplicate-detection/jscpd/command-resolution.d.ts +23 -0
- package/types/package-checks/duplicate-detection/jscpd/json-report.d.ts +2 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner-contract.d.ts +11 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner.d.ts +21 -0
- package/types/package-checks/duplicate-detection/jscpd/scoped-fragments.d.ts +4 -0
- package/types/package-checks/duplicate-detection/measurement-model.d.ts +36 -0
- package/types/package-checks/duplicate-detection/measurement.d.ts +14 -0
- package/types/package-checks/duplicate-detection/options-resolution.d.ts +3 -0
- package/types/package-checks/duplicate-detection/options-validation.d.ts +1 -0
- package/types/package-checks/duplicate-detection/options.d.ts +65 -0
- package/types/package-checks/duplicate-detection/project-revision.d.ts +1 -0
- package/types/package-checks/duplicate-detection/records.d.ts +22 -0
- package/types/package-checks/file-metrics/constructor.d.ts +11 -0
- package/types/package-checks/file-metrics/execution.d.ts +11 -0
- package/types/package-checks/file-metrics/final-data.d.ts +5 -0
- package/types/package-checks/file-metrics/measurement-model.d.ts +12 -0
- package/types/package-checks/file-metrics/measurement.d.ts +13 -0
- package/types/package-checks/file-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/file-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/file-metrics/options.d.ts +75 -0
- package/types/package-checks/file-metrics/records.d.ts +43 -0
- package/types/package-checks/file-metrics/scc/availability.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/csv.d.ts +1 -0
- package/types/package-checks/file-metrics/scc/parser.d.ts +25 -0
- package/types/package-checks/file-metrics/scc/scanner.d.ts +14 -0
- package/types/package-checks/final-data-parsing.d.ts +9 -0
- package/types/package-checks/function-metrics/analysis.d.ts +10 -0
- package/types/package-checks/function-metrics/constructor.d.ts +11 -0
- package/types/package-checks/function-metrics/execution.d.ts +7 -0
- package/types/package-checks/function-metrics/final-data.d.ts +5 -0
- package/types/package-checks/function-metrics/lizard/availability.d.ts +11 -0
- package/types/package-checks/function-metrics/lizard/csv.d.ts +1 -0
- package/types/package-checks/function-metrics/lizard/parser.d.ts +17 -0
- package/types/package-checks/function-metrics/lizard/scanner.d.ts +15 -0
- package/types/package-checks/function-metrics/measurement-model.d.ts +26 -0
- package/types/package-checks/function-metrics/measurement.d.ts +21 -0
- package/types/package-checks/function-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/function-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/function-metrics/options.d.ts +76 -0
- package/types/package-checks/function-metrics/records.d.ts +37 -0
- package/types/package-checks/function-metrics/target-files.d.ts +3 -0
- package/types/package-checks/host-environment/error-message.d.ts +1 -0
- package/types/package-checks/host-environment/filesystem.d.ts +19 -0
- package/types/package-checks/host-environment/git.d.ts +13 -0
- package/types/package-checks/host-environment/path.d.ts +3 -0
- package/types/package-checks/host-environment/process/command.d.ts +7 -0
- package/types/package-checks/host-environment/process/contract.d.ts +50 -0
- package/types/package-checks/host-environment/process/env.d.ts +16 -0
- package/types/package-checks/host-environment/process/failure.d.ts +4 -0
- package/types/package-checks/host-environment/process/result.d.ts +2 -0
- package/types/package-checks/host-environment/process/runner.d.ts +3 -0
- package/types/package-checks/json-document/strict-document.d.ts +35 -0
- package/types/package-checks/json-schema-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-schema-validation/execution-stages.d.ts +27 -0
- package/types/package-checks/json-schema-validation/final-data.d.ts +15 -0
- package/types/package-checks/json-schema-validation/issue-collector.d.ts +12 -0
- package/types/package-checks/json-schema-validation/json-schema-validation.d.ts +42 -0
- package/types/package-checks/json-schema-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-schema-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-schema-validation/options.d.ts +53 -0
- package/types/package-checks/json-schema-validation/reference-resolver.d.ts +23 -0
- package/types/package-checks/json-schema-validation/remote-response.d.ts +2 -0
- package/types/package-checks/json-schema-validation/schema-engine.d.ts +33 -0
- package/types/package-checks/json-schema-validation/schema-policy.d.ts +17 -0
- package/types/package-checks/json-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-validation/final-data.d.ts +10 -0
- package/types/package-checks/json-validation/json-validation.d.ts +28 -0
- package/types/package-checks/json-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-validation/options.d.ts +13 -0
- package/types/package-checks/maintenance-reminders/assessment-results.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/final-data.d.ts +47 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +111 -0
- package/types/package-checks/maintenance-reminders/maintenance-support.d.ts +7 -0
- package/types/package-checks/maintenance-reminders/measurement.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/options-validation.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/default-check.d.ts +27 -0
- package/types/package-checks/markdown-link-validation/execution.d.ts +12 -0
- package/types/package-checks/markdown-link-validation/filesystem-probes.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/final-data.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/local-resolution.d.ts +92 -0
- package/types/package-checks/markdown-link-validation/local-resolver.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/markdown-parser.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-link-validation/options.d.ts +43 -0
- package/types/package-checks/markdown-link-validation/records.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/resolver-engine.d.ts +15 -0
- package/types/package-checks/markdown-link-validation/target-descriptor.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/traversal-result.d.ts +12 -0
- package/types/package-checks/project-files/collection.d.ts +9 -0
- package/types/package-checks/project-files/config-glob.d.ts +5 -0
- package/types/package-checks/project-files/configuration.d.ts +31 -0
- package/types/package-checks/project-files/exact-input-measurement.d.ts +12 -0
- package/types/package-checks/project-files/file-fingerprint.d.ts +7 -0
- package/types/package-checks/project-files/gitlink-revision.d.ts +9 -0
- package/types/package-checks/project-files/gitlink-worktree.d.ts +26 -0
- package/types/package-checks/project-files/input-eligibility.d.ts +7 -0
- package/types/package-checks/project-files/reported-path.d.ts +1 -0
- package/types/package-checks/project-files/revision-paths.d.ts +12 -0
- package/types/package-checks/project-files/revision-worktree-files.d.ts +5 -0
- package/types/project-definition/check-tree/authoring.d.ts +41 -0
- package/types/project-definition/check-tree/materialization.d.ts +4 -0
- package/types/project-definition/check-tree/resolution.d.ts +25 -0
- package/types/project-definition/output-defaults.d.ts +14 -0
- package/types/project-definition/output-validation.d.ts +3 -0
- package/types/project-definition/project-definition-validation.d.ts +6 -0
- package/types/project-definition/project-definition.d.ts +88 -0
- package/types/project-run/aggregation.d.ts +7 -0
- package/types/project-run/check-execution/callback.d.ts +24 -0
- package/types/project-run/check-execution/dependencies.d.ts +9 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +18 -0
- package/types/project-run/check-execution/execution-settlement.d.ts +41 -0
- package/types/project-run/check-execution/messages.d.ts +3 -0
- package/types/project-run/check-execution/plan.d.ts +10 -0
- package/types/project-run/check-execution/preflight-result.d.ts +23 -0
- package/types/project-run/check-execution/preflight.d.ts +27 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +51 -0
- package/types/project-run/check-execution/terminal-result.d.ts +27 -0
- package/types/project-run/completion.d.ts +14 -0
- package/types/project-run/controls/contract.d.ts +24 -0
- package/types/project-run/controls/outputs-override-validation.d.ts +3 -0
- package/types/project-run/controls/validation-result.d.ts +14 -0
- package/types/project-run/controls/validation.d.ts +3 -0
- package/types/project-run/diagnostic-logging/diagnostic-detail-rendering.d.ts +11 -0
- package/types/project-run/diagnostic-logging/logger.d.ts +33 -0
- package/types/project-run/invocation-creation.d.ts +12 -0
- package/types/project-run/invocation.d.ts +34 -0
- package/types/project-run/machine-publication.d.ts +10 -0
- package/types/project-run/output-configuration.d.ts +3 -0
- package/types/project-run/output-status.d.ts +21 -0
- package/types/project-run/progress-rendering/presentation.d.ts +28 -0
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +23 -0
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +24 -0
- package/types/project-run/progress-rendering/renderer.d.ts +44 -0
- package/types/project-run/project-context.d.ts +7 -0
- package/types/project-run/result.d.ts +99 -0
- package/types/project-run/run.d.ts +18 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +67 -0
- package/types/project-run/task-scheduler/graph-validation.d.ts +11 -0
- package/types/project-run/task-scheduler/graph.d.ts +40 -0
- package/types/project-run/task-scheduler/scheduler-admission-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler-blocker-summary.d.ts +4 -0
- package/types/project-run/task-scheduler/scheduler-decision-inspection.d.ts +24 -0
- package/types/project-run/task-scheduler/scheduler-decision-model.d.ts +94 -0
- package/types/project-run/task-scheduler/scheduler-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler.d.ts +3 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
import type { ResolvedMarkdownLinkValidationOptions } from "./options.ts";
|
|
4
|
+
import type { CheckExecutionContext, CheckResult } from "../../check/check.ts";
|
|
5
|
+
import { collectProjectFiles } from "../project-files/collection.ts";
|
|
6
|
+
import type { ProjectFileSelection } from "../project-files/configuration.ts";
|
|
7
|
+
import { partitionProjectFilesByEligibility } from "../project-files/input-eligibility.ts";
|
|
8
|
+
import {
|
|
9
|
+
createMarkdownLocalResolver,
|
|
10
|
+
type MarkdownLocalResolutionReason,
|
|
11
|
+
type MarkdownLocalResolver,
|
|
12
|
+
type MarkdownSourceReadFailureReason
|
|
13
|
+
} from "./local-resolver.ts";
|
|
14
|
+
import type { MarkdownLinkValidationFinalData } from "./final-data.ts";
|
|
15
|
+
import {
|
|
16
|
+
buildMarkdownInputRejectedRecord,
|
|
17
|
+
buildMarkdownLinkRecordCandidate,
|
|
18
|
+
type MarkdownLinkRecordCandidate
|
|
19
|
+
} from "./records.ts";
|
|
20
|
+
import { settledMarkdownTraversalResult } from "./traversal-result.ts";
|
|
21
|
+
import { validMarkdownLinkValidationOptions } from "./options-validation.ts";
|
|
22
|
+
|
|
23
|
+
export const MARKDOWN_LINK_VALIDATION_CHECK_DEFINITION = {
|
|
24
|
+
checkId: "markdown-link-validation",
|
|
25
|
+
displayName: "Markdown link validation"
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
interface MarkdownLinkValidationRun {
|
|
29
|
+
readonly options: ResolvedMarkdownLinkValidationOptions;
|
|
30
|
+
readonly resolver: MarkdownLocalResolver;
|
|
31
|
+
readonly signal: AbortSignal;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** `markdown-link-validation` whole-Check unavailable outcome 的稳定 reason code。 */
|
|
35
|
+
export type MarkdownLinkValidationUnavailableReason =
|
|
36
|
+
| "invalid-options"
|
|
37
|
+
| "cancelled"
|
|
38
|
+
| "occurrence-limit-exceeded"
|
|
39
|
+
| "project-root-unavailable"
|
|
40
|
+
| MarkdownLocalResolutionReason
|
|
41
|
+
| MarkdownSourceReadFailureReason;
|
|
42
|
+
|
|
43
|
+
type MarkdownLinkValidationUnavailable = Readonly<{
|
|
44
|
+
readonly kind: "unavailable";
|
|
45
|
+
readonly reason: MarkdownLinkValidationUnavailableReason;
|
|
46
|
+
}>;
|
|
47
|
+
|
|
48
|
+
type MarkdownSourceDiscovery =
|
|
49
|
+
| Readonly<{
|
|
50
|
+
readonly kind: "complete";
|
|
51
|
+
readonly rejectedPaths: readonly string[];
|
|
52
|
+
readonly selectedPathCount: number;
|
|
53
|
+
readonly sourcePaths: readonly string[];
|
|
54
|
+
}>
|
|
55
|
+
| MarkdownLinkValidationUnavailable;
|
|
56
|
+
|
|
57
|
+
type MarkdownSourceValidation =
|
|
58
|
+
| Readonly<{
|
|
59
|
+
readonly kind: "complete";
|
|
60
|
+
readonly candidates: readonly MarkdownLinkRecordCandidate[];
|
|
61
|
+
readonly occurrenceCount: number;
|
|
62
|
+
}>
|
|
63
|
+
| MarkdownLinkValidationUnavailable;
|
|
64
|
+
|
|
65
|
+
type MarkdownLinkTraversal =
|
|
66
|
+
| Readonly<{
|
|
67
|
+
readonly kind: "complete";
|
|
68
|
+
readonly candidates: readonly MarkdownLinkRecordCandidate[];
|
|
69
|
+
readonly occurrenceCount: number;
|
|
70
|
+
readonly sourceFileCount: number;
|
|
71
|
+
}>
|
|
72
|
+
| MarkdownLinkValidationUnavailable;
|
|
73
|
+
|
|
74
|
+
/** 验证本 Check 选中的 Markdown source 的离线本地链接完整性。 */
|
|
75
|
+
export async function executeMarkdownLinkValidation(
|
|
76
|
+
context: CheckExecutionContext<ResolvedMarkdownLinkValidationOptions>
|
|
77
|
+
): Promise<CheckResult<MarkdownLinkValidationFinalData>> {
|
|
78
|
+
if (!validMarkdownLinkValidationOptions(context.options)) return unavailable("invalid-options");
|
|
79
|
+
const prepared = await prepareMarkdownTraversal(context);
|
|
80
|
+
if (prepared.kind === "result") return prepared.result;
|
|
81
|
+
const { rejectedInputCount, traversal, resolver } = prepared;
|
|
82
|
+
|
|
83
|
+
for (const candidate of traversal.candidates) {
|
|
84
|
+
context.records.report({ id: candidate.id }, candidate.data);
|
|
85
|
+
}
|
|
86
|
+
return settledMarkdownTraversalResult({
|
|
87
|
+
findingCount: traversal.candidates.length,
|
|
88
|
+
findingPolicy: context.options.findingPolicy,
|
|
89
|
+
occurrenceCount: traversal.occurrenceCount,
|
|
90
|
+
rejectedInputCount,
|
|
91
|
+
sourceFileCount: traversal.sourceFileCount,
|
|
92
|
+
targetReadCount: resolver.targetReadCount
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
type PreparedMarkdownTraversal =
|
|
97
|
+
| Readonly<{
|
|
98
|
+
readonly kind: "result";
|
|
99
|
+
readonly result: CheckResult<MarkdownLinkValidationFinalData>;
|
|
100
|
+
}>
|
|
101
|
+
| Readonly<{
|
|
102
|
+
readonly kind: "traversal";
|
|
103
|
+
readonly rejectedInputCount: number;
|
|
104
|
+
readonly resolver: MarkdownLocalResolver;
|
|
105
|
+
readonly traversal: Extract<MarkdownLinkTraversal, { readonly kind: "complete" }>;
|
|
106
|
+
}>;
|
|
107
|
+
|
|
108
|
+
async function prepareMarkdownTraversal(
|
|
109
|
+
context: CheckExecutionContext<ResolvedMarkdownLinkValidationOptions>
|
|
110
|
+
): Promise<PreparedMarkdownTraversal> {
|
|
111
|
+
if (context.signal.aborted) return result(unavailable("cancelled"));
|
|
112
|
+
const created = await createMarkdownLocalResolver(
|
|
113
|
+
context.project.root,
|
|
114
|
+
context.options.limits.maxTargetReads
|
|
115
|
+
);
|
|
116
|
+
if (!created.ok) return result(unavailable(created.reason));
|
|
117
|
+
if (context.signal.aborted) return result(unavailable("cancelled"));
|
|
118
|
+
const sourceDiscovery = discoverMarkdownSourcePaths(context.project, context.options.files);
|
|
119
|
+
if (sourceDiscovery.kind === "unavailable") return result(unavailable(sourceDiscovery.reason));
|
|
120
|
+
if (sourceDiscovery.selectedPathCount === 0) return result(noEligibleInput());
|
|
121
|
+
if (context.signal.aborted) return result(unavailable("cancelled"));
|
|
122
|
+
reportRejectedInputs(context, sourceDiscovery.rejectedPaths);
|
|
123
|
+
const traversal = await traverseMarkdownSources(sourceDiscovery.sourcePaths, {
|
|
124
|
+
resolver: created.resolver,
|
|
125
|
+
options: context.options,
|
|
126
|
+
signal: context.signal
|
|
127
|
+
});
|
|
128
|
+
if (traversal.kind === "unavailable") {
|
|
129
|
+
return result(
|
|
130
|
+
appendRejectedInputMessage(
|
|
131
|
+
unavailable(traversal.reason),
|
|
132
|
+
sourceDiscovery.rejectedPaths.length
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
if (context.signal.aborted) {
|
|
137
|
+
return result(
|
|
138
|
+
appendRejectedInputMessage(unavailable("cancelled"), sourceDiscovery.rejectedPaths.length)
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
return Object.freeze({
|
|
142
|
+
kind: "traversal",
|
|
143
|
+
rejectedInputCount: sourceDiscovery.rejectedPaths.length,
|
|
144
|
+
resolver: created.resolver,
|
|
145
|
+
traversal
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function result(
|
|
150
|
+
checkResult: CheckResult<MarkdownLinkValidationFinalData>
|
|
151
|
+
): PreparedMarkdownTraversal {
|
|
152
|
+
return Object.freeze({ kind: "result", result: checkResult });
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function noEligibleInput(): CheckResult<MarkdownLinkValidationFinalData> {
|
|
156
|
+
return Object.freeze({ status: "not-applicable", reason: { code: "no-eligible-input" } });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function discoverMarkdownSourcePaths(
|
|
160
|
+
project: CheckExecutionContext<ResolvedMarkdownLinkValidationOptions>["project"],
|
|
161
|
+
files: ProjectFileSelection
|
|
162
|
+
): MarkdownSourceDiscovery {
|
|
163
|
+
try {
|
|
164
|
+
const selectedPaths = collectProjectFiles(project.root, files);
|
|
165
|
+
const partition = partitionProjectFilesByEligibility(selectedPaths, isMarkdownSourcePath);
|
|
166
|
+
return Object.freeze({
|
|
167
|
+
kind: "complete" as const,
|
|
168
|
+
rejectedPaths: partition.rejectedPaths,
|
|
169
|
+
selectedPathCount: selectedPaths.length,
|
|
170
|
+
sourcePaths: partition.acceptedPaths
|
|
171
|
+
});
|
|
172
|
+
} catch {
|
|
173
|
+
return unavailableValidation("source-unavailable");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function reportRejectedInputs(
|
|
178
|
+
context: CheckExecutionContext<ResolvedMarkdownLinkValidationOptions>,
|
|
179
|
+
paths: readonly string[]
|
|
180
|
+
): void {
|
|
181
|
+
for (const selectedPath of paths) {
|
|
182
|
+
const record = buildMarkdownInputRejectedRecord(selectedPath);
|
|
183
|
+
context.records.report({ id: record.id }, record.data);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function appendRejectedInputMessage(
|
|
188
|
+
checkResult: CheckResult<MarkdownLinkValidationFinalData>,
|
|
189
|
+
rejectedInputCount: number
|
|
190
|
+
): CheckResult<MarkdownLinkValidationFinalData> {
|
|
191
|
+
if (rejectedInputCount === 0) return checkResult;
|
|
192
|
+
return Object.freeze({
|
|
193
|
+
...checkResult,
|
|
194
|
+
messages: Object.freeze([
|
|
195
|
+
...(checkResult.messages ?? []),
|
|
196
|
+
Object.freeze({
|
|
197
|
+
code: "input-rejected",
|
|
198
|
+
level: "warning" as const,
|
|
199
|
+
message: `${rejectedInputCount} selected markdownLinkValidation input file(s) were rejected because only .md/.markdown paths are supported; inspect this Check's Records and narrow files.include/exclude.`
|
|
200
|
+
})
|
|
201
|
+
])
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function unavailableValidation(
|
|
206
|
+
reason: MarkdownLinkValidationUnavailableReason
|
|
207
|
+
): MarkdownLinkValidationUnavailable {
|
|
208
|
+
return Object.freeze({ kind: "unavailable", reason });
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async function traverseMarkdownSources(
|
|
212
|
+
sourcePaths: readonly string[],
|
|
213
|
+
run: MarkdownLinkValidationRun
|
|
214
|
+
): Promise<MarkdownLinkTraversal> {
|
|
215
|
+
const candidates: MarkdownLinkRecordCandidate[] = [];
|
|
216
|
+
let occurrenceCount = 0;
|
|
217
|
+
let sourceFileCount = 0;
|
|
218
|
+
|
|
219
|
+
for (const sourcePath of sourcePaths) {
|
|
220
|
+
const sourceValidation = await validateMarkdownSource(sourcePath, occurrenceCount, run);
|
|
221
|
+
if (sourceValidation.kind === "unavailable") return sourceValidation;
|
|
222
|
+
|
|
223
|
+
candidates.push(...sourceValidation.candidates);
|
|
224
|
+
occurrenceCount = sourceValidation.occurrenceCount;
|
|
225
|
+
sourceFileCount += 1;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return Object.freeze({
|
|
229
|
+
kind: "complete" as const,
|
|
230
|
+
candidates: Object.freeze(candidates),
|
|
231
|
+
occurrenceCount,
|
|
232
|
+
sourceFileCount
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
async function validateMarkdownSource(
|
|
237
|
+
sourcePath: string,
|
|
238
|
+
occurrenceCountBeforeSource: number,
|
|
239
|
+
run: MarkdownLinkValidationRun
|
|
240
|
+
): Promise<MarkdownSourceValidation> {
|
|
241
|
+
if (run.signal.aborted) return unavailableValidation("cancelled");
|
|
242
|
+
const sourceRead = await run.resolver.readSource(sourcePath, run.options.limits.maxMarkdownBytes);
|
|
243
|
+
if (run.signal.aborted) return unavailableValidation("cancelled");
|
|
244
|
+
if (!sourceRead.ok) return unavailableValidation(sourceRead.reason);
|
|
245
|
+
|
|
246
|
+
const candidates: MarkdownLinkRecordCandidate[] = [];
|
|
247
|
+
let occurrenceCount = occurrenceCountBeforeSource;
|
|
248
|
+
for (const [occurrenceIndex, occurrence] of sourceRead.source.facts.occurrences.entries()) {
|
|
249
|
+
if (run.signal.aborted) return unavailableValidation("cancelled");
|
|
250
|
+
occurrenceCount += 1;
|
|
251
|
+
if (occurrenceCount > run.options.limits.maxOccurrences) {
|
|
252
|
+
return unavailableValidation("occurrence-limit-exceeded");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const resolution = await run.resolver.resolve({
|
|
256
|
+
source: sourceRead.source,
|
|
257
|
+
rawDestination: occurrence.rawDestination,
|
|
258
|
+
rootExternalTargetMode: run.options.rootExternalTargetMode,
|
|
259
|
+
requireExistingTargets: run.options.requireExistingTargets,
|
|
260
|
+
requireNonEmptyDirectories: run.options.requireNonEmptyDirectories,
|
|
261
|
+
validateSameDocumentAnchors: run.options.validateSameDocumentAnchors,
|
|
262
|
+
validateCrossDocumentAnchors: run.options.validateCrossDocumentAnchors,
|
|
263
|
+
maxMarkdownBytes: run.options.limits.maxMarkdownBytes
|
|
264
|
+
});
|
|
265
|
+
if (run.signal.aborted) return unavailableValidation("cancelled");
|
|
266
|
+
if (resolution.kind === "unavailable") return unavailableValidation(resolution.reason);
|
|
267
|
+
const candidate = buildMarkdownLinkRecordCandidate(
|
|
268
|
+
sourceRead.source.path,
|
|
269
|
+
occurrenceIndex,
|
|
270
|
+
occurrence,
|
|
271
|
+
resolution
|
|
272
|
+
);
|
|
273
|
+
if (candidate !== undefined) candidates.push(candidate);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return Object.freeze({
|
|
277
|
+
kind: "complete" as const,
|
|
278
|
+
candidates: Object.freeze(candidates),
|
|
279
|
+
occurrenceCount
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function isMarkdownSourcePath(filePath: string): boolean {
|
|
284
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
285
|
+
return extension === ".md" || extension === ".markdown";
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function unavailable(
|
|
289
|
+
reason: MarkdownLinkValidationUnavailableReason
|
|
290
|
+
): CheckResult<MarkdownLinkValidationFinalData> {
|
|
291
|
+
return Object.freeze({
|
|
292
|
+
status: "unavailable",
|
|
293
|
+
reason: { code: reason },
|
|
294
|
+
messages: Object.freeze([
|
|
295
|
+
Object.freeze({ code: reason, level: "error" as const, message: unavailableMessage(reason) })
|
|
296
|
+
])
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function unavailableMessage(reason: MarkdownLinkValidationUnavailableReason): string {
|
|
301
|
+
return UNAVAILABLE_MESSAGES[reason];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const UNAVAILABLE_MESSAGES: Readonly<Record<MarkdownLinkValidationUnavailableReason, string>> = {
|
|
305
|
+
"invalid-options":
|
|
306
|
+
"markdownLinkValidation options are invalid; recreate the Check with markdownLinkValidation(options) or restore its complete resolved options.",
|
|
307
|
+
"project-root-unavailable":
|
|
308
|
+
"Markdown link validation could not resolve the project root; check that the path exists and is accessible.",
|
|
309
|
+
"source-unavailable":
|
|
310
|
+
"A selected Markdown source could not be collected, read, decoded, or contained safely; check the file source and permissions.",
|
|
311
|
+
"source-too-large":
|
|
312
|
+
"A selected Markdown source exceeds maxMarkdownBytes; narrow the file selection or raise the bounded limit.",
|
|
313
|
+
"markdown-parse-failed":
|
|
314
|
+
"A selected Markdown source could not be parsed completely; inspect that document's Markdown syntax and encoding.",
|
|
315
|
+
"invalid-local-destination":
|
|
316
|
+
"A local Markdown destination could not be parsed safely; inspect the affected link destination syntax.",
|
|
317
|
+
"target-unavailable":
|
|
318
|
+
"A local Markdown target could not be probed or read safely; check the target path, permissions, size, and encoding.",
|
|
319
|
+
"occurrence-limit-exceeded":
|
|
320
|
+
"Markdown link validation exceeded maxOccurrences; narrow the source selection or raise the bounded limit.",
|
|
321
|
+
"target-read-limit-exceeded":
|
|
322
|
+
"Markdown link validation exceeded maxTargetReads; narrow the source selection or raise the bounded limit.",
|
|
323
|
+
cancelled:
|
|
324
|
+
"Markdown link validation was cancelled before it could form a complete result; inspect the caller's cancellation reason and retry if appropriate."
|
|
325
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { constants } from "node:fs";
|
|
2
|
+
import { lstat, open, readlink } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
isNotFound,
|
|
7
|
+
isWithinRoot,
|
|
8
|
+
relativeSegments,
|
|
9
|
+
type EndpointProbe,
|
|
10
|
+
type RootProbe
|
|
11
|
+
} from "./local-resolution.ts";
|
|
12
|
+
|
|
13
|
+
export async function probeRootContainedPath(
|
|
14
|
+
canonicalProjectRoot: string,
|
|
15
|
+
candidatePath: string
|
|
16
|
+
): Promise<RootProbe> {
|
|
17
|
+
if (!isWithinRoot(canonicalProjectRoot, candidatePath)) {
|
|
18
|
+
return Object.freeze({ kind: "outside" as const });
|
|
19
|
+
}
|
|
20
|
+
let pendingSegments = relativeSegments(canonicalProjectRoot, candidatePath);
|
|
21
|
+
let currentPath = canonicalProjectRoot;
|
|
22
|
+
let symlinkHops = 0;
|
|
23
|
+
|
|
24
|
+
while (pendingSegments.length > 0) {
|
|
25
|
+
const segment = pendingSegments.shift();
|
|
26
|
+
if (segment === undefined) {
|
|
27
|
+
return Object.freeze({ kind: "unavailable" as const });
|
|
28
|
+
}
|
|
29
|
+
const nextPath = path.join(currentPath, segment);
|
|
30
|
+
let status: Awaited<ReturnType<typeof lstat>>;
|
|
31
|
+
try {
|
|
32
|
+
status = await lstat(nextPath);
|
|
33
|
+
} catch (error: unknown) {
|
|
34
|
+
if (isNotFound(error)) {
|
|
35
|
+
return Object.freeze({ kind: "missing" as const, absolutePath: nextPath });
|
|
36
|
+
}
|
|
37
|
+
return Object.freeze({ kind: "unavailable" as const });
|
|
38
|
+
}
|
|
39
|
+
if (!status.isSymbolicLink()) {
|
|
40
|
+
currentPath = nextPath;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (symlinkHops >= 40) {
|
|
44
|
+
return Object.freeze({ kind: "unavailable" as const });
|
|
45
|
+
}
|
|
46
|
+
symlinkHops += 1;
|
|
47
|
+
let linkDestination: string;
|
|
48
|
+
try {
|
|
49
|
+
linkDestination = path.resolve(path.dirname(nextPath), await readlink(nextPath));
|
|
50
|
+
} catch {
|
|
51
|
+
return Object.freeze({ kind: "unavailable" as const });
|
|
52
|
+
}
|
|
53
|
+
if (!isWithinRoot(canonicalProjectRoot, linkDestination)) {
|
|
54
|
+
return Object.freeze({ kind: "outside" as const });
|
|
55
|
+
}
|
|
56
|
+
pendingSegments = [
|
|
57
|
+
...relativeSegments(canonicalProjectRoot, linkDestination),
|
|
58
|
+
...pendingSegments
|
|
59
|
+
];
|
|
60
|
+
currentPath = canonicalProjectRoot;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return Object.freeze({ kind: "contained" as const, absolutePath: currentPath });
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export async function probeEndpoint(targetPath: string): Promise<EndpointProbe> {
|
|
67
|
+
let status: Awaited<ReturnType<typeof lstat>>;
|
|
68
|
+
try {
|
|
69
|
+
status = await lstat(targetPath);
|
|
70
|
+
} catch (error: unknown) {
|
|
71
|
+
return isNotFound(error)
|
|
72
|
+
? Object.freeze({ kind: "missing" as const })
|
|
73
|
+
: Object.freeze({ kind: "unavailable" as const });
|
|
74
|
+
}
|
|
75
|
+
if (status.isSymbolicLink()) {
|
|
76
|
+
return Object.freeze({ kind: "unavailable" as const });
|
|
77
|
+
}
|
|
78
|
+
if (status.isDirectory()) {
|
|
79
|
+
return Object.freeze({ kind: "directory" as const });
|
|
80
|
+
}
|
|
81
|
+
if (status.isFile()) {
|
|
82
|
+
return Object.freeze({ kind: "file" as const });
|
|
83
|
+
}
|
|
84
|
+
return Object.freeze({ kind: "unsupported" as const });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export async function readRegularFile(
|
|
88
|
+
filePath: string,
|
|
89
|
+
maxBytes: number
|
|
90
|
+
): Promise<
|
|
91
|
+
| Readonly<{ readonly ok: true; readonly bytes: Uint8Array }>
|
|
92
|
+
| Readonly<{ readonly ok: false; readonly reason: "too-large" | "unavailable" }>
|
|
93
|
+
> {
|
|
94
|
+
let handle: Awaited<ReturnType<typeof open>> | undefined;
|
|
95
|
+
try {
|
|
96
|
+
handle = await open(filePath, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
97
|
+
const status = await handle.stat();
|
|
98
|
+
if (!status.isFile()) {
|
|
99
|
+
return Object.freeze({ ok: false as const, reason: "unavailable" as const });
|
|
100
|
+
}
|
|
101
|
+
if (status.size > maxBytes) {
|
|
102
|
+
return Object.freeze({ ok: false as const, reason: "too-large" as const });
|
|
103
|
+
}
|
|
104
|
+
const bytes = await readBoundedBytes(handle, maxBytes);
|
|
105
|
+
return bytes === null
|
|
106
|
+
? Object.freeze({ ok: false as const, reason: "too-large" as const })
|
|
107
|
+
: Object.freeze({ ok: true as const, bytes });
|
|
108
|
+
} catch {
|
|
109
|
+
return Object.freeze({ ok: false as const, reason: "unavailable" as const });
|
|
110
|
+
} finally {
|
|
111
|
+
await handle?.close().catch(() => undefined);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async function readBoundedBytes(
|
|
116
|
+
handle: Awaited<ReturnType<typeof open>>,
|
|
117
|
+
maxBytes: number
|
|
118
|
+
): Promise<Uint8Array | null> {
|
|
119
|
+
const bytes = new Uint8Array(maxBytes + 1);
|
|
120
|
+
let offset = 0;
|
|
121
|
+
while (offset < bytes.byteLength) {
|
|
122
|
+
const result = await handle.read(bytes, offset, bytes.byteLength - offset, offset);
|
|
123
|
+
if (result.bytesRead === 0) break;
|
|
124
|
+
offset += result.bytesRead;
|
|
125
|
+
}
|
|
126
|
+
return offset > maxBytes ? null : bytes.slice(0, offset);
|
|
127
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exactFinalDataRecord,
|
|
3
|
+
invalidFinalData,
|
|
4
|
+
nonNegativeSafeInteger
|
|
5
|
+
} from "../final-data-parsing.ts";
|
|
6
|
+
|
|
7
|
+
/** `markdown-link-validation` 在 passed/failed outcome 中发布的主数据。 */
|
|
8
|
+
export interface MarkdownLinkValidationFinalData {
|
|
9
|
+
readonly sourceFileCount: number;
|
|
10
|
+
readonly occurrenceCount: number;
|
|
11
|
+
readonly targetReadCount: number;
|
|
12
|
+
readonly findingCount: number;
|
|
13
|
+
readonly rejectedInputCount: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** 验证计数不变量并脱离一份 canonical final-data object。 */
|
|
17
|
+
export function parseMarkdownLinkValidationData(data: unknown): MarkdownLinkValidationFinalData {
|
|
18
|
+
const value = exactFinalDataRecord(
|
|
19
|
+
data,
|
|
20
|
+
["sourceFileCount", "occurrenceCount", "targetReadCount", "findingCount", "rejectedInputCount"],
|
|
21
|
+
"markdownLinkValidation"
|
|
22
|
+
);
|
|
23
|
+
const sourceFileCount = nonNegativeSafeInteger(value.sourceFileCount);
|
|
24
|
+
const occurrenceCount = nonNegativeSafeInteger(value.occurrenceCount);
|
|
25
|
+
const targetReadCount = nonNegativeSafeInteger(value.targetReadCount);
|
|
26
|
+
const findingCount = nonNegativeSafeInteger(value.findingCount);
|
|
27
|
+
const rejectedInputCount = nonNegativeSafeInteger(value.rejectedInputCount);
|
|
28
|
+
if (
|
|
29
|
+
sourceFileCount === undefined ||
|
|
30
|
+
occurrenceCount === undefined ||
|
|
31
|
+
targetReadCount === undefined ||
|
|
32
|
+
findingCount === undefined ||
|
|
33
|
+
rejectedInputCount === undefined ||
|
|
34
|
+
targetReadCount > occurrenceCount ||
|
|
35
|
+
findingCount < rejectedInputCount ||
|
|
36
|
+
findingCount - rejectedInputCount > occurrenceCount
|
|
37
|
+
) {
|
|
38
|
+
throw invalidFinalData("markdownLinkValidation");
|
|
39
|
+
}
|
|
40
|
+
return Object.freeze({
|
|
41
|
+
sourceFileCount,
|
|
42
|
+
occurrenceCount,
|
|
43
|
+
targetReadCount,
|
|
44
|
+
findingCount,
|
|
45
|
+
rejectedInputCount
|
|
46
|
+
});
|
|
47
|
+
}
|