@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,78 @@
|
|
|
1
|
+
import { isNonArrayRecord } from "../../../data-boundary/value-shapes.ts";
|
|
2
|
+
import type { DuplicateCodeFragment, DuplicateCodeLocation } from "../measurement-model.ts";
|
|
3
|
+
import { stableStringify } from "./key.ts";
|
|
4
|
+
import {
|
|
5
|
+
SCAN_CACHE_VERSION,
|
|
6
|
+
type DuplicateCodeCacheIdentity,
|
|
7
|
+
type ScanCachePayload
|
|
8
|
+
} from "./cache-contract.ts";
|
|
9
|
+
|
|
10
|
+
export function isMatchingPayload(
|
|
11
|
+
payload: unknown,
|
|
12
|
+
identity: DuplicateCodeCacheIdentity,
|
|
13
|
+
cacheKey: string
|
|
14
|
+
): payload is ScanCachePayload {
|
|
15
|
+
if (!isNonArrayRecord(payload)) return false;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
cacheIdentityFieldsMatch(payload, identity, cacheKey) &&
|
|
19
|
+
cacheStructuredFieldsMatch(payload, identity)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function isMetricArray(value: unknown): value is readonly DuplicateCodeFragment[] {
|
|
24
|
+
if (!Array.isArray(value)) return false;
|
|
25
|
+
return value.every(isDuplicateCodeFragment);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function cacheIdentityFieldsMatch(
|
|
29
|
+
payload: Record<string, unknown>,
|
|
30
|
+
identity: DuplicateCodeCacheIdentity,
|
|
31
|
+
cacheKey: string
|
|
32
|
+
): boolean {
|
|
33
|
+
return (
|
|
34
|
+
payload.scanCacheVersion === SCAN_CACHE_VERSION &&
|
|
35
|
+
payload.cacheKey === cacheKey &&
|
|
36
|
+
payload.toolName === identity.toolName &&
|
|
37
|
+
payload.toolVersion === identity.toolVersion &&
|
|
38
|
+
payload.configVersion === identity.configVersion &&
|
|
39
|
+
payload.commitSha === identity.commitSha
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function cacheStructuredFieldsMatch(
|
|
44
|
+
payload: Record<string, unknown>,
|
|
45
|
+
identity: DuplicateCodeCacheIdentity
|
|
46
|
+
): boolean {
|
|
47
|
+
return (
|
|
48
|
+
stableStringify(payload.scannerConfiguration) ===
|
|
49
|
+
stableStringify(identity.scannerConfiguration) &&
|
|
50
|
+
stableStringify(payload.inputFingerprint) === stableStringify(identity.inputFingerprint)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isDuplicateCodeFragment(value: unknown): value is DuplicateCodeFragment {
|
|
55
|
+
return (
|
|
56
|
+
isNonArrayRecord(value) &&
|
|
57
|
+
isFiniteNumber(value.id) &&
|
|
58
|
+
isFiniteNumber(value.tokenCount) &&
|
|
59
|
+
isFiniteNumber(value.lineCount) &&
|
|
60
|
+
Array.isArray(value.codeAreas) &&
|
|
61
|
+
value.codeAreas.every((area) => typeof area === "string") &&
|
|
62
|
+
Array.isArray(value.locations) &&
|
|
63
|
+
value.locations.every(isDuplicateCodeLocation)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function isDuplicateCodeLocation(value: unknown): value is DuplicateCodeLocation {
|
|
68
|
+
return (
|
|
69
|
+
isNonArrayRecord(value) &&
|
|
70
|
+
typeof value.path === "string" &&
|
|
71
|
+
isFiniteNumber(value.startLine) &&
|
|
72
|
+
isFiniteNumber(value.endLine)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function isFiniteNumber(value: unknown): value is number {
|
|
77
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
78
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** 读取和写入 duplicate-code raw-scan cache entries。 */
|
|
2
|
+
|
|
3
|
+
import { readJsonFile, writeJsonFile } from "../../host-environment/filesystem.ts";
|
|
4
|
+
import type { DuplicateCodeFragment } from "../measurement-model.ts";
|
|
5
|
+
import { buildScanCacheKey, getScanCachePath } from "./key.ts";
|
|
6
|
+
import { isMatchingPayload, isMetricArray } from "./payload.ts";
|
|
7
|
+
import {
|
|
8
|
+
SCAN_CACHE_VERSION,
|
|
9
|
+
type DuplicateCodeCacheHit,
|
|
10
|
+
type DuplicateCodeCacheIdentity,
|
|
11
|
+
type DuplicateCodeCacheMiss,
|
|
12
|
+
type ScanCachePayload
|
|
13
|
+
} from "./cache-contract.ts";
|
|
14
|
+
|
|
15
|
+
export { buildScanCacheKey, getScanCachePath } from "./key.ts";
|
|
16
|
+
export { SCAN_CACHE_VERSION } from "./cache-contract.ts";
|
|
17
|
+
export type {
|
|
18
|
+
DuplicateCodeCacheHit,
|
|
19
|
+
DuplicateCodeCacheIdentity,
|
|
20
|
+
DuplicateCodeCacheMiss
|
|
21
|
+
} from "./cache-contract.ts";
|
|
22
|
+
|
|
23
|
+
export function loadScanCacheEntry({
|
|
24
|
+
rootDir,
|
|
25
|
+
identity
|
|
26
|
+
}: {
|
|
27
|
+
identity: DuplicateCodeCacheIdentity;
|
|
28
|
+
rootDir: string;
|
|
29
|
+
}): DuplicateCodeCacheHit | DuplicateCodeCacheMiss {
|
|
30
|
+
const cacheKey = buildScanCacheKey(identity);
|
|
31
|
+
const cachePath = getScanCachePath(rootDir, cacheKey);
|
|
32
|
+
|
|
33
|
+
let payload: unknown;
|
|
34
|
+
try {
|
|
35
|
+
payload = readJsonFile(cachePath);
|
|
36
|
+
} catch {
|
|
37
|
+
return { hit: false, reason: "cache-miss", cacheKey, cachePath };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (!isMatchingPayload(payload, identity, cacheKey)) {
|
|
41
|
+
return { hit: false, reason: "cache-payload-mismatch", cacheKey, cachePath };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!isMetricArray(payload.metrics)) {
|
|
45
|
+
return { hit: false, reason: "cache-payload-invalid", cacheKey, cachePath };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return { hit: true, metrics: payload.metrics, cacheKey, cachePath };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function writeScanCacheEntry({
|
|
52
|
+
rootDir,
|
|
53
|
+
identity,
|
|
54
|
+
metrics
|
|
55
|
+
}: {
|
|
56
|
+
identity: DuplicateCodeCacheIdentity;
|
|
57
|
+
metrics: readonly DuplicateCodeFragment[];
|
|
58
|
+
rootDir: string;
|
|
59
|
+
}): { cacheKey: string; cachePath: string } {
|
|
60
|
+
const cacheKey = buildScanCacheKey(identity);
|
|
61
|
+
const cachePath = getScanCachePath(rootDir, cacheKey);
|
|
62
|
+
const payload: ScanCachePayload = {
|
|
63
|
+
scanCacheVersion: SCAN_CACHE_VERSION,
|
|
64
|
+
cacheKey,
|
|
65
|
+
toolName: identity.toolName,
|
|
66
|
+
toolVersion: identity.toolVersion,
|
|
67
|
+
scannerConfiguration: identity.scannerConfiguration,
|
|
68
|
+
configVersion: identity.configVersion,
|
|
69
|
+
commitSha: identity.commitSha,
|
|
70
|
+
inputFingerprint: identity.inputFingerprint,
|
|
71
|
+
metrics,
|
|
72
|
+
createdAt: new Date().toISOString()
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
writeJsonFile({ filePath: cachePath, value: payload });
|
|
76
|
+
return { cacheKey, cachePath };
|
|
77
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineCheck, type TypedCheckWithOptions } from "../../check/check.ts";
|
|
2
|
+
import { DUPLICATE_DETECTION_CHECK_DEFINITION, executeDuplicateDetection } from "./execution.ts";
|
|
3
|
+
import { parseDuplicateDetectionData } from "./final-data.ts";
|
|
4
|
+
import type { DuplicateDetectionOptions, ResolvedDuplicateDetectionOptions } from "./options.ts";
|
|
5
|
+
import { resolveDuplicateDetectionOptions } from "./options-resolution.ts";
|
|
6
|
+
import { validResolvedDuplicateDetectionOptions } from "./options-validation.ts";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 使用可省略的区域、cache 与 scanner policy 构造一个完整 duplicate-detection Check。
|
|
10
|
+
*
|
|
11
|
+
* @param options - 省略字段由 package 补齐;显式 files 数组作为对应字段的完整替换值。
|
|
12
|
+
* @returns 固定 `duplicate-detection` identity、完整冻结 options、preflight 与 execution。
|
|
13
|
+
* @throws {TypeError} input 含未知字段、空 area、非法阈值、非法 cache 或 scanner policy 时抛出。
|
|
14
|
+
*/
|
|
15
|
+
export function duplicateDetection(
|
|
16
|
+
options: DuplicateDetectionOptions = {}
|
|
17
|
+
): TypedCheckWithOptions<
|
|
18
|
+
"duplicate-detection",
|
|
19
|
+
ResolvedDuplicateDetectionOptions,
|
|
20
|
+
typeof parseDuplicateDetectionData
|
|
21
|
+
> {
|
|
22
|
+
const resolvedOptions = resolveDuplicateDetectionOptions(options);
|
|
23
|
+
if (resolvedOptions === undefined) {
|
|
24
|
+
throw new TypeError(
|
|
25
|
+
"duplicateDetection options are invalid; use the documented closed constructor policy"
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return defineCheck({
|
|
29
|
+
...DUPLICATE_DETECTION_CHECK_DEFINITION,
|
|
30
|
+
execution: executeDuplicateDetection,
|
|
31
|
+
parseData: parseDuplicateDetectionData,
|
|
32
|
+
preflight: (preparedOptions) =>
|
|
33
|
+
validResolvedDuplicateDetectionOptions(preparedOptions)
|
|
34
|
+
? { status: "success", preparedOptions }
|
|
35
|
+
: {
|
|
36
|
+
status: "failure",
|
|
37
|
+
action: "block",
|
|
38
|
+
reason: { code: "invalid-options" },
|
|
39
|
+
messages: [
|
|
40
|
+
{
|
|
41
|
+
code: "invalid-options",
|
|
42
|
+
level: "error",
|
|
43
|
+
message:
|
|
44
|
+
"duplicateDetection options are invalid; recreate the Check with duplicateDetection(options) or restore its complete resolved options."
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
options: resolvedOptions
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
|
|
3
|
+
import type { CheckExecutionContext, CheckResult } from "../../check/check.ts";
|
|
4
|
+
import { collectProjectFileSets, requireProjectFileSet } from "../project-files/collection.ts";
|
|
5
|
+
import { fingerprintProjectFiles } from "../project-files/file-fingerprint.ts";
|
|
6
|
+
import { settleFindings } from "../code-quality-findings/policy.ts";
|
|
7
|
+
import { getGitSha } from "./project-revision.ts";
|
|
8
|
+
import { measureDuplicateDetection, type DuplicateMeasurementResult } from "./measurement.ts";
|
|
9
|
+
import type {
|
|
10
|
+
DuplicateDetectionAreaInput,
|
|
11
|
+
DuplicateDetectionExactInputSet
|
|
12
|
+
} from "./measurement-model.ts";
|
|
13
|
+
import type { ResolvedDuplicateDetectionOptions } from "./options.ts";
|
|
14
|
+
import { validResolvedDuplicateDetectionOptions } from "./options-validation.ts";
|
|
15
|
+
import { buildDuplicateRecordCandidates } from "./records.ts";
|
|
16
|
+
import type { DuplicateDetectionFinalData } from "./final-data.ts";
|
|
17
|
+
|
|
18
|
+
export const DUPLICATE_DETECTION_CHECK_DEFINITION = {
|
|
19
|
+
checkId: "duplicate-detection",
|
|
20
|
+
displayName: "Duplicate detection"
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
/** `duplicate-detection` whole-Check unavailable outcome 的稳定 reason code。 */
|
|
24
|
+
export type DuplicateDetectionUnavailableReasonCode =
|
|
25
|
+
| "cache-write-failed"
|
|
26
|
+
| "external-dependency-unavailable"
|
|
27
|
+
| "external-execution-failed"
|
|
28
|
+
| "external-result-invalid"
|
|
29
|
+
| "invalid-options"
|
|
30
|
+
| "source-unavailable";
|
|
31
|
+
|
|
32
|
+
/** Default Check callback;scanner configuration 由其完整 options 拥有。 */
|
|
33
|
+
export async function executeDuplicateDetection(
|
|
34
|
+
context: CheckExecutionContext<ResolvedDuplicateDetectionOptions>
|
|
35
|
+
): Promise<CheckResult<DuplicateDetectionFinalData>> {
|
|
36
|
+
if (!validResolvedDuplicateDetectionOptions(context.options))
|
|
37
|
+
return unavailable("invalid-options");
|
|
38
|
+
|
|
39
|
+
let exactInput: DuplicateDetectionExactInputSet;
|
|
40
|
+
try {
|
|
41
|
+
exactInput = prepareExactInputSet(context.project.root, context.options);
|
|
42
|
+
} catch {
|
|
43
|
+
return unavailable("source-unavailable");
|
|
44
|
+
}
|
|
45
|
+
if (exactInput.approvedExactPaths.length < 2) {
|
|
46
|
+
return Object.freeze({ status: "not-applicable", reason: { code: "no-eligible-input" } });
|
|
47
|
+
}
|
|
48
|
+
const measurement = await measureDuplicateDetection({
|
|
49
|
+
cache: context.options.cache,
|
|
50
|
+
dependency: context.options.scanner,
|
|
51
|
+
exactInput
|
|
52
|
+
});
|
|
53
|
+
if (measurement.kind !== "complete") return directMeasurementFailure(measurement);
|
|
54
|
+
const candidates = buildDuplicateRecordCandidates(
|
|
55
|
+
measurement.fragments,
|
|
56
|
+
context.options.codeAreas
|
|
57
|
+
);
|
|
58
|
+
if (candidates === undefined) return unavailable("external-result-invalid");
|
|
59
|
+
for (const candidate of candidates) {
|
|
60
|
+
context.records.report({ id: candidate.id }, candidate.data);
|
|
61
|
+
}
|
|
62
|
+
return settleFindings(
|
|
63
|
+
candidates.map((candidate) => ({ actionable: true, blocking: candidate.data.blocking }))
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function prepareExactInputSet(
|
|
68
|
+
rootDir: string,
|
|
69
|
+
options: ResolvedDuplicateDetectionOptions
|
|
70
|
+
): DuplicateDetectionExactInputSet {
|
|
71
|
+
const areas = collectAreaInputs(rootDir, options.codeAreas);
|
|
72
|
+
const approvedExactPaths = uniqueSorted(areas.flatMap((area) => area.approvedExactPaths));
|
|
73
|
+
const inputFingerprint = fingerprintProjectFiles(rootDir, approvedExactPaths);
|
|
74
|
+
return Object.freeze({
|
|
75
|
+
approvedExactPaths: Object.freeze(approvedExactPaths),
|
|
76
|
+
areas,
|
|
77
|
+
cacheRootDir: resolve(rootDir, options.cache.directory),
|
|
78
|
+
commitSha: getGitSha(rootDir),
|
|
79
|
+
inputFingerprint: Object.freeze({
|
|
80
|
+
...inputFingerprint,
|
|
81
|
+
fileList: Object.freeze([...inputFingerprint.fileList])
|
|
82
|
+
}),
|
|
83
|
+
rootDir
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function collectAreaInputs(
|
|
88
|
+
rootDir: string,
|
|
89
|
+
codeAreas: ResolvedDuplicateDetectionOptions["codeAreas"]
|
|
90
|
+
): readonly DuplicateDetectionAreaInput[] {
|
|
91
|
+
const areas: DuplicateDetectionAreaInput[] = [];
|
|
92
|
+
const orderedPolicies = Object.entries(codeAreas).sort(([left], [right]) =>
|
|
93
|
+
compareText(left, right)
|
|
94
|
+
);
|
|
95
|
+
const filesByArea = collectProjectFileSets(
|
|
96
|
+
rootDir,
|
|
97
|
+
Object.fromEntries(orderedPolicies.map(([areaId, policy]) => [areaId, policy.files]))
|
|
98
|
+
);
|
|
99
|
+
for (const [codeArea, policy] of orderedPolicies) {
|
|
100
|
+
const approvedExactPaths = requireProjectFileSet(filesByArea, codeArea);
|
|
101
|
+
if (approvedExactPaths.length === 0) continue;
|
|
102
|
+
areas.push(
|
|
103
|
+
Object.freeze({
|
|
104
|
+
approvedExactPaths: Object.freeze(approvedExactPaths),
|
|
105
|
+
codeArea,
|
|
106
|
+
minimumLines: policy.minimumLines,
|
|
107
|
+
minimumTokens: policy.minimumTokens
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
return Object.freeze(areas);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function uniqueSorted(values: readonly string[]): string[] {
|
|
115
|
+
return [...new Set(values)].sort(compareText);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function compareText(left: string, right: string): number {
|
|
119
|
+
if (left < right) return -1;
|
|
120
|
+
if (left > right) return 1;
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function directMeasurementFailure(
|
|
125
|
+
measurement: Exclude<DuplicateMeasurementResult, { kind: "complete" }>
|
|
126
|
+
): CheckResult<DuplicateDetectionFinalData> {
|
|
127
|
+
switch (measurement.kind) {
|
|
128
|
+
case "cache-write-failed":
|
|
129
|
+
return unavailable("cache-write-failed");
|
|
130
|
+
case "execution-failed":
|
|
131
|
+
return unavailable("external-execution-failed");
|
|
132
|
+
case "invalid-result":
|
|
133
|
+
return unavailable("external-result-invalid");
|
|
134
|
+
case "unavailable":
|
|
135
|
+
return unavailable("external-dependency-unavailable");
|
|
136
|
+
}
|
|
137
|
+
const exhaustiveMeasurement: never = measurement;
|
|
138
|
+
return exhaustiveMeasurement;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function unavailable(
|
|
142
|
+
code: DuplicateDetectionUnavailableReasonCode
|
|
143
|
+
): CheckResult<DuplicateDetectionFinalData> {
|
|
144
|
+
return Object.freeze({
|
|
145
|
+
status: "unavailable",
|
|
146
|
+
reason: { code },
|
|
147
|
+
messages: Object.freeze([
|
|
148
|
+
Object.freeze({ code, level: "error" as const, message: unavailableMessage(code) })
|
|
149
|
+
])
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function unavailableMessage(code: DuplicateDetectionUnavailableReasonCode): string {
|
|
154
|
+
switch (code) {
|
|
155
|
+
case "invalid-options":
|
|
156
|
+
return "duplicateDetection options are invalid; recreate the Check with duplicateDetection(options) or restore its complete resolved options.";
|
|
157
|
+
case "source-unavailable":
|
|
158
|
+
return "Duplicate detection could not collect its configured project files; check the project root, file permissions, and selected file source.";
|
|
159
|
+
case "external-dependency-unavailable":
|
|
160
|
+
return "The configured jscpd command is unavailable or incompatible; restore the package dependency or configure a compatible executable.";
|
|
161
|
+
case "external-execution-failed":
|
|
162
|
+
return "jscpd did not complete successfully; run the configured command directly and inspect its environment.";
|
|
163
|
+
case "external-result-invalid":
|
|
164
|
+
return "jscpd output could not form a trusted complete result; check command and report compatibility.";
|
|
165
|
+
case "cache-write-failed":
|
|
166
|
+
return "Duplicate detection completed scanning but could not write its cache; check the configured cache directory permissions.";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FindingSummary } from "../code-quality-findings/policy.ts";
|
|
2
|
+
import { parseFindingSummaryData } from "../final-data-parsing.ts";
|
|
3
|
+
|
|
4
|
+
/** `duplicate-detection` 在 passed/failed outcome 中发布的主数据。 */
|
|
5
|
+
export type DuplicateDetectionFinalData = FindingSummary;
|
|
6
|
+
|
|
7
|
+
/** 验证并脱离一份 `duplicate-detection` canonical final-data object。 */
|
|
8
|
+
export function parseDuplicateDetectionData(data: unknown): DuplicateDetectionFinalData {
|
|
9
|
+
return parseFindingSummaryData(data, "duplicateDetection");
|
|
10
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { runProcess } from "../../host-environment/process/command.ts";
|
|
2
|
+
import type { ResolvedDuplicateDetectionScannerOptions } from "../options.ts";
|
|
3
|
+
import { isMissingExplicitCommand } from "./command-path.ts";
|
|
4
|
+
import { isPackageJscpdCommand, resolveJscpdCommand } from "./command-resolution.ts";
|
|
5
|
+
import { parseJscpdVersionOutput } from "./scanner.ts";
|
|
6
|
+
|
|
7
|
+
type JscpdAvailability = Readonly<
|
|
8
|
+
| {
|
|
9
|
+
available: true;
|
|
10
|
+
error: null;
|
|
11
|
+
name: "jscpd";
|
|
12
|
+
reason: null;
|
|
13
|
+
source: JscpdSource;
|
|
14
|
+
version: string;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
available: false;
|
|
18
|
+
error: string;
|
|
19
|
+
name: "jscpd";
|
|
20
|
+
reason: "execution-error" | "tool-unavailable";
|
|
21
|
+
source: JscpdSource;
|
|
22
|
+
version: null;
|
|
23
|
+
}
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
type JscpdSource = "custom command" | "package dependency";
|
|
27
|
+
|
|
28
|
+
type ToolCommandResult = Awaited<ReturnType<typeof runProcess>>;
|
|
29
|
+
|
|
30
|
+
export async function checkJscpd(
|
|
31
|
+
rootDir: string,
|
|
32
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
33
|
+
): Promise<JscpdAvailability> {
|
|
34
|
+
const resolved = resolveJscpdCommand(dependency.command);
|
|
35
|
+
if (resolved.kind === "unavailable") {
|
|
36
|
+
return unavailableJscpd(resolved.error, "tool-unavailable", dependency);
|
|
37
|
+
}
|
|
38
|
+
if (isMissingExplicitCommand(resolved.command.executable)) {
|
|
39
|
+
return unavailableJscpd("jscpd dependency binary unavailable", "tool-unavailable", dependency);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const result = await runProcess({
|
|
44
|
+
args: [...resolved.command.versionArguments],
|
|
45
|
+
command: resolved.command.executable,
|
|
46
|
+
cwd: rootDir
|
|
47
|
+
});
|
|
48
|
+
return availabilityFromVersionResult(result, dependency);
|
|
49
|
+
} catch (error: unknown) {
|
|
50
|
+
return error instanceof Error
|
|
51
|
+
? processErrorAvailability(error, dependency)
|
|
52
|
+
: unavailableJscpd("unknown error", "execution-error", dependency);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function availabilityFromVersionResult(
|
|
57
|
+
result: ToolCommandResult,
|
|
58
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
59
|
+
): JscpdAvailability {
|
|
60
|
+
if (result.error) return processErrorAvailability(result.error, dependency);
|
|
61
|
+
const output = commandOutput(result);
|
|
62
|
+
if (result.status !== 0) return failedVersionAvailability(result, output, dependency);
|
|
63
|
+
const version = parseJscpdVersionOutput(output);
|
|
64
|
+
if (version === null) return unrecognizedVersionAvailability(dependency);
|
|
65
|
+
return {
|
|
66
|
+
name: "jscpd",
|
|
67
|
+
available: true,
|
|
68
|
+
version,
|
|
69
|
+
error: null,
|
|
70
|
+
source: jscpdSource(dependency),
|
|
71
|
+
reason: null
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function failedVersionAvailability(
|
|
76
|
+
result: ToolCommandResult,
|
|
77
|
+
output: string,
|
|
78
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
79
|
+
): JscpdAvailability {
|
|
80
|
+
const detail = output ? `: ${output}` : "";
|
|
81
|
+
return unavailableJscpd(
|
|
82
|
+
`jscpd --version failed, ${processTermination(result)}${detail}`,
|
|
83
|
+
"execution-error",
|
|
84
|
+
dependency
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function unrecognizedVersionAvailability(
|
|
89
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
90
|
+
): JscpdAvailability {
|
|
91
|
+
return unavailableJscpd(
|
|
92
|
+
"jscpd --version returned unrecognized output",
|
|
93
|
+
"execution-error",
|
|
94
|
+
dependency
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function processErrorAvailability(
|
|
99
|
+
error: Error,
|
|
100
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
101
|
+
): JscpdAvailability {
|
|
102
|
+
const isMissingTool = (error as NodeJS.ErrnoException).code === "ENOENT";
|
|
103
|
+
return unavailableJscpd(
|
|
104
|
+
isMissingTool ? "jscpd dependency binary unavailable" : `jscpd version error: ${error.message}`,
|
|
105
|
+
isMissingTool ? "tool-unavailable" : "execution-error",
|
|
106
|
+
dependency
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function unavailableJscpd(
|
|
111
|
+
error: string,
|
|
112
|
+
reason: Exclude<JscpdAvailability["reason"], null>,
|
|
113
|
+
dependency: ResolvedDuplicateDetectionScannerOptions
|
|
114
|
+
): JscpdAvailability {
|
|
115
|
+
return {
|
|
116
|
+
name: "jscpd",
|
|
117
|
+
available: false,
|
|
118
|
+
version: null,
|
|
119
|
+
error,
|
|
120
|
+
source: jscpdSource(dependency),
|
|
121
|
+
reason
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function jscpdSource(dependency: ResolvedDuplicateDetectionScannerOptions): JscpdSource {
|
|
126
|
+
return isPackageJscpdCommand(dependency.command) ? "package dependency" : "custom command";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function commandOutput(result: ToolCommandResult): string {
|
|
130
|
+
return (result.stdout || "").trim() || (result.stderr || "").trim();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function processTermination(result: ToolCommandResult): string {
|
|
134
|
+
return typeof result.status === "number"
|
|
135
|
+
? `exit ${result.status}`
|
|
136
|
+
: `signal ${result.signal || "unknown"}`;
|
|
137
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { isAbsolute } from "node:path";
|
|
3
|
+
|
|
4
|
+
export function isMissingExplicitCommand(command: string): boolean {
|
|
5
|
+
return (
|
|
6
|
+
(isAbsolute(command) || command.includes("/") || command.includes("\\")) && !existsSync(command)
|
|
7
|
+
);
|
|
8
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
import { isNonArrayRecord } from "../../../data-boundary/value-shapes.ts";
|
|
6
|
+
import type { DuplicateDetectionScannerCommand } from "../options.ts";
|
|
7
|
+
|
|
8
|
+
const JSCPD_BIN_NAME = "jscpd";
|
|
9
|
+
const JSCPD_PACKAGE_NAME = "jscpd";
|
|
10
|
+
|
|
11
|
+
export interface JscpdCommand {
|
|
12
|
+
readonly executable: string;
|
|
13
|
+
readonly scanPrefixArguments: readonly string[];
|
|
14
|
+
readonly versionArguments: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ResolvedJscpdCommand =
|
|
18
|
+
| Readonly<{ command: JscpdCommand; kind: "resolved" }>
|
|
19
|
+
| Readonly<{ error: string; kind: "unavailable" }>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* package-provided scanner 的可移植 marker。真实 executable 只由私有 jscpd adapter 解析,避免公共
|
|
23
|
+
* Definition 与 fingerprint 保存 consumer-specific Bun 或 package path。
|
|
24
|
+
*/
|
|
25
|
+
export const DEFAULT_JSCPD_COMMAND: DuplicateDetectionScannerCommand = Object.freeze({
|
|
26
|
+
kind: "package"
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function isPackageJscpdCommand(
|
|
30
|
+
command: DuplicateDetectionScannerCommand
|
|
31
|
+
): command is Extract<DuplicateDetectionScannerCommand, { readonly kind: "package" }> {
|
|
32
|
+
return command.kind === "package";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function resolveJscpdCommand(
|
|
36
|
+
command: DuplicateDetectionScannerCommand
|
|
37
|
+
): ResolvedJscpdCommand {
|
|
38
|
+
if (command.kind === "custom") {
|
|
39
|
+
return Object.freeze({
|
|
40
|
+
command: Object.freeze({
|
|
41
|
+
executable: command.executable,
|
|
42
|
+
scanPrefixArguments: Object.freeze([]),
|
|
43
|
+
versionArguments: Object.freeze(["--version"])
|
|
44
|
+
}),
|
|
45
|
+
kind: "resolved"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const binTarget = installedJscpdBinTarget();
|
|
50
|
+
if (binTarget === null) {
|
|
51
|
+
return Object.freeze({
|
|
52
|
+
error: "candidate jscpd package manifest or declared bin target is unavailable",
|
|
53
|
+
kind: "unavailable"
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
command: Object.freeze({
|
|
59
|
+
executable: process.execPath,
|
|
60
|
+
scanPrefixArguments: Object.freeze([binTarget]),
|
|
61
|
+
versionArguments: Object.freeze([binTarget, "--version"])
|
|
62
|
+
}),
|
|
63
|
+
kind: "resolved"
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function readJscpdBinTarget(packageManifestPath: string): string | null {
|
|
68
|
+
let manifest: unknown;
|
|
69
|
+
try {
|
|
70
|
+
manifest = JSON.parse(readFileSync(packageManifestPath, "utf8"));
|
|
71
|
+
} catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const binTarget = declaredJscpdBinTarget(manifest);
|
|
76
|
+
if (binTarget === null || isAbsolute(binTarget)) return null;
|
|
77
|
+
|
|
78
|
+
const packageDirectory = dirname(packageManifestPath);
|
|
79
|
+
const resolvedTarget = resolve(packageDirectory, binTarget);
|
|
80
|
+
const targetRelativePath = relative(packageDirectory, resolvedTarget);
|
|
81
|
+
if (
|
|
82
|
+
targetRelativePath === "" ||
|
|
83
|
+
targetRelativePath === ".." ||
|
|
84
|
+
targetRelativePath.startsWith("../") ||
|
|
85
|
+
targetRelativePath.startsWith("..\\") ||
|
|
86
|
+
!existsSync(resolvedTarget)
|
|
87
|
+
) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return resolvedTarget;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function installedJscpdBinTarget(): string | null {
|
|
95
|
+
try {
|
|
96
|
+
const packageManifestPath = fileURLToPath(
|
|
97
|
+
import.meta.resolve(`${JSCPD_PACKAGE_NAME}/package.json`)
|
|
98
|
+
);
|
|
99
|
+
return readJscpdBinTarget(packageManifestPath);
|
|
100
|
+
} catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function declaredJscpdBinTarget(manifest: unknown): string | null {
|
|
106
|
+
if (!isNonArrayRecord(manifest)) return null;
|
|
107
|
+
const bin = manifest.bin;
|
|
108
|
+
if (typeof bin === "string") return bin;
|
|
109
|
+
if (!isNonArrayRecord(bin)) return null;
|
|
110
|
+
const target = bin[JSCPD_BIN_NAME];
|
|
111
|
+
return typeof target === "string" ? target : null;
|
|
112
|
+
}
|