@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,84 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProjectFileSelection,
|
|
3
|
+
ProjectFileSelectionOptions
|
|
4
|
+
} from "../project-files/configuration.ts";
|
|
5
|
+
import type { FindingPolicy } from "../code-quality-findings/policy.ts";
|
|
6
|
+
|
|
7
|
+
/** `functionMetrics` 构造函数可省略的文件选择策略。 */
|
|
8
|
+
export type FunctionMetricsFileOptions = ProjectFileSelectionOptions;
|
|
9
|
+
|
|
10
|
+
/** `functionMetrics` 构造函数可省略的函数指标上限。 */
|
|
11
|
+
export interface FunctionMetricsLimitOptions {
|
|
12
|
+
readonly codeLines?: Readonly<{
|
|
13
|
+
/** 省略时为 `60`;函数 NLOC 超过此值时产生 finding。 */
|
|
14
|
+
readonly maximum?: number;
|
|
15
|
+
readonly lowComplexityAllowance?: Readonly<{
|
|
16
|
+
/** 省略时为 `6`;复杂度小于此值时可使用较高 NLOC 上限。 */
|
|
17
|
+
readonly cyclomaticComplexityBelow?: number;
|
|
18
|
+
/** 省略时为 `180`;不得小于普通代码行上限。 */
|
|
19
|
+
readonly maximum?: number;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
readonly cyclomaticComplexity?: Readonly<{
|
|
23
|
+
/** 省略时为 `12`。 */
|
|
24
|
+
readonly maximum?: number;
|
|
25
|
+
}>;
|
|
26
|
+
readonly parameters?: Readonly<{
|
|
27
|
+
/** 省略时为 `6`。 */
|
|
28
|
+
readonly maximum?: number;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** 可独立选择文件、指标上限和 finding policy 的 function-metrics 区域。 */
|
|
33
|
+
export interface FunctionMetricsCodeAreaOptions {
|
|
34
|
+
/** 显式区域必须声明本字段;其中各子字段可省略并使用 package 默认值。 */
|
|
35
|
+
readonly files: FunctionMetricsFileOptions;
|
|
36
|
+
/** 省略时继承顶层 `findingPolicy`。 */
|
|
37
|
+
readonly findingPolicy?: FindingPolicy;
|
|
38
|
+
/** 省略的嵌套上限使用 package 默认值。 */
|
|
39
|
+
readonly limits?: FunctionMetricsLimitOptions;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** `functionMetrics` 构造函数可省略的 Lizard 可执行文件策略。 */
|
|
43
|
+
export interface FunctionMetricsScannerOptions {
|
|
44
|
+
/** 省略时为 `lizard`;显式命令必须直接接受 adapter 拥有的 Lizard 参数。 */
|
|
45
|
+
readonly executable?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** `functionMetrics(options?)` 接受并补齐默认值的公开策略。 */
|
|
49
|
+
export interface FunctionMetricsOptions {
|
|
50
|
+
/** 省略时建立默认 `project` 区域;显式映射必须非空,且每个区域必须声明 `files`。 */
|
|
51
|
+
readonly codeAreas?: Readonly<Record<string, FunctionMetricsCodeAreaOptions>>;
|
|
52
|
+
/** 省略时为 `non-blocking`;区域可局部覆盖。 */
|
|
53
|
+
readonly findingPolicy?: FindingPolicy;
|
|
54
|
+
/** 省略时使用 PATH 中的 `lizard`。 */
|
|
55
|
+
readonly scanner?: FunctionMetricsScannerOptions;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** 构造函数生成并由 Check preflight/execution 消费的完整 options。 */
|
|
59
|
+
export interface ResolvedFunctionMetricsOptions {
|
|
60
|
+
readonly codeAreas: Readonly<Record<string, ResolvedFunctionMetricsCodeAreaOptions>>;
|
|
61
|
+
readonly scanner: ResolvedFunctionMetricsScannerOptions;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ResolvedFunctionMetricsCodeAreaOptions {
|
|
65
|
+
readonly files: ProjectFileSelection;
|
|
66
|
+
readonly findingPolicy: FindingPolicy;
|
|
67
|
+
readonly limits: ResolvedFunctionMetricsLimits;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface ResolvedFunctionMetricsLimits {
|
|
71
|
+
readonly codeLines: Readonly<{
|
|
72
|
+
readonly maximum: number;
|
|
73
|
+
readonly lowComplexityAllowance: Readonly<{
|
|
74
|
+
readonly cyclomaticComplexityBelow: number;
|
|
75
|
+
readonly maximum: number;
|
|
76
|
+
}>;
|
|
77
|
+
}>;
|
|
78
|
+
readonly cyclomaticComplexity: Readonly<{ readonly maximum: number }>;
|
|
79
|
+
readonly parameters: Readonly<{ readonly maximum: number }>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ResolvedFunctionMetricsScannerOptions {
|
|
83
|
+
readonly executable: string;
|
|
84
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isStableFunctionName,
|
|
3
|
+
type FunctionMetricAnalysis,
|
|
4
|
+
type FunctionMetricInstance
|
|
5
|
+
} from "./analysis.ts";
|
|
6
|
+
import { isBlockingFinding } from "../code-quality-findings/policy.ts";
|
|
7
|
+
import type { FunctionMetric, FunctionMetricsAreaInput } from "./measurement-model.ts";
|
|
8
|
+
import type { ResolvedFunctionMetricsLimits } from "./options.ts";
|
|
9
|
+
|
|
10
|
+
type FunctionMetricName = "cyclomatic-complexity" | "function-code-density" | "parameter-count";
|
|
11
|
+
const INPUT_REJECTED_RECORD_ID_PREFIX = "/input-rejected/";
|
|
12
|
+
|
|
13
|
+
/** 一条超出函数 metric 上限的 supplemental Record data。 */
|
|
14
|
+
export type FunctionMetricsFindingRecordData = Readonly<{
|
|
15
|
+
readonly blocking: boolean;
|
|
16
|
+
readonly codeAreas: readonly string[];
|
|
17
|
+
readonly functionName: string;
|
|
18
|
+
readonly limit: number;
|
|
19
|
+
readonly metric: FunctionMetricName;
|
|
20
|
+
readonly path: string;
|
|
21
|
+
readonly startLine: number;
|
|
22
|
+
readonly value: number;
|
|
23
|
+
}>;
|
|
24
|
+
|
|
25
|
+
/** 一条已被 files policy 选中、但不受 functionMetrics 支持的输入 Finding。 */
|
|
26
|
+
export type FunctionMetricsInputRejectedRecordData = Readonly<{
|
|
27
|
+
readonly blocking: false;
|
|
28
|
+
readonly codeAreas: readonly string[];
|
|
29
|
+
readonly kind: "input-rejected";
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly reason: "unsupported-file-type";
|
|
32
|
+
}>;
|
|
33
|
+
|
|
34
|
+
/** functionMetrics 发布的 metric 或 input-rejection Record data。 */
|
|
35
|
+
export type FunctionMetricsRecordData =
|
|
36
|
+
| FunctionMetricsFindingRecordData
|
|
37
|
+
| FunctionMetricsInputRejectedRecordData;
|
|
38
|
+
|
|
39
|
+
export interface FunctionRecordCandidate {
|
|
40
|
+
readonly data: FunctionMetricsFindingRecordData;
|
|
41
|
+
readonly id: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface FunctionInputRejectedCandidate {
|
|
45
|
+
readonly data: FunctionMetricsInputRejectedRecordData;
|
|
46
|
+
readonly id: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** 为每个 rejected path 构造一条 area-aware、固定 non-blocking 的 Finding。 */
|
|
50
|
+
export function buildFunctionInputRejectedCandidates(
|
|
51
|
+
codeAreasByPath: ReadonlyMap<string, readonly string[]>
|
|
52
|
+
): readonly FunctionInputRejectedCandidate[] {
|
|
53
|
+
return Object.freeze(
|
|
54
|
+
[...codeAreasByPath]
|
|
55
|
+
.sort(([left], [right]) => compareText(left, right))
|
|
56
|
+
.map(([path, codeAreas]) =>
|
|
57
|
+
Object.freeze({
|
|
58
|
+
data: Object.freeze({
|
|
59
|
+
blocking: false as const,
|
|
60
|
+
codeAreas: Object.freeze(uniqueSorted(codeAreas)),
|
|
61
|
+
kind: "input-rejected" as const,
|
|
62
|
+
path,
|
|
63
|
+
reason: "unsupported-file-type" as const
|
|
64
|
+
}),
|
|
65
|
+
id: `${INPUT_REJECTED_RECORD_ID_PREFIX}${path}`
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type MatchingFunctionMetricAreas = readonly [
|
|
72
|
+
FunctionMetricsAreaInput,
|
|
73
|
+
...FunctionMetricsAreaInput[]
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
interface FunctionPolicyContext {
|
|
77
|
+
readonly blocking: boolean;
|
|
78
|
+
readonly codeAreas: readonly string[];
|
|
79
|
+
readonly functionName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface FunctionMetricEvaluation {
|
|
83
|
+
readonly blocking: boolean;
|
|
84
|
+
readonly codeAreas: readonly string[];
|
|
85
|
+
readonly functionName: string;
|
|
86
|
+
readonly limit: number;
|
|
87
|
+
readonly metric: FunctionMetricName;
|
|
88
|
+
readonly path: string;
|
|
89
|
+
readonly startLine: number;
|
|
90
|
+
readonly subject: string;
|
|
91
|
+
readonly value: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** 为每个超过 matching-area 最严格阈值的 metric 构造 supplemental fact。 */
|
|
95
|
+
export function buildFunctionRecordCandidates(
|
|
96
|
+
analysis: FunctionMetricAnalysis,
|
|
97
|
+
areas: readonly FunctionMetricsAreaInput[]
|
|
98
|
+
): readonly FunctionRecordCandidate[] | undefined {
|
|
99
|
+
const areasByPath = indexAreasByPath(areas);
|
|
100
|
+
const candidates: FunctionRecordCandidate[] = [];
|
|
101
|
+
for (const instance of analysis.instances) {
|
|
102
|
+
const [firstArea, ...remainingAreas] = areasByPath.get(instance.metric.file) ?? [];
|
|
103
|
+
if (firstArea === undefined) return undefined;
|
|
104
|
+
const matchingAreas = [firstArea, ...remainingAreas] as const;
|
|
105
|
+
const policyContext = resolveFunctionPolicyContext(instance, matchingAreas);
|
|
106
|
+
for (const evaluation of metricEvaluations(instance, policyContext, matchingAreas)) {
|
|
107
|
+
appendFindingCandidate(candidates, evaluation);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
candidates.sort((left, right) => compareText(left.id, right.id));
|
|
111
|
+
return Object.freeze(candidates);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function indexAreasByPath(
|
|
115
|
+
areas: readonly FunctionMetricsAreaInput[]
|
|
116
|
+
): ReadonlyMap<string, readonly FunctionMetricsAreaInput[]> {
|
|
117
|
+
const mutableAreas = new Map<string, FunctionMetricsAreaInput[]>();
|
|
118
|
+
for (const area of areas) {
|
|
119
|
+
for (const path of area.approvedExactPaths) {
|
|
120
|
+
const matchingAreas = mutableAreas.get(path) ?? [];
|
|
121
|
+
matchingAreas.push(area);
|
|
122
|
+
mutableAreas.set(path, matchingAreas);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return new Map(
|
|
126
|
+
Array.from(mutableAreas, ([path, matchingAreas]) => [path, Object.freeze(matchingAreas)])
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function resolveFunctionPolicyContext(
|
|
131
|
+
instance: FunctionMetricInstance,
|
|
132
|
+
matchingAreas: MatchingFunctionMetricAreas
|
|
133
|
+
): Readonly<FunctionPolicyContext> {
|
|
134
|
+
return Object.freeze({
|
|
135
|
+
blocking: isBlockingFinding(matchingAreas.map((area) => area.findingPolicy)),
|
|
136
|
+
codeAreas: Object.freeze(uniqueSorted(matchingAreas.map((area) => area.codeArea))),
|
|
137
|
+
functionName: isStableFunctionName(instance.metric.name) ? instance.metric.name : "<anonymous>"
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function metricEvaluations(
|
|
142
|
+
instance: FunctionMetricInstance,
|
|
143
|
+
policyContext: FunctionPolicyContext,
|
|
144
|
+
matchingAreas: MatchingFunctionMetricAreas
|
|
145
|
+
): FunctionMetricEvaluation[] {
|
|
146
|
+
const evaluations: FunctionMetricEvaluation[] = [];
|
|
147
|
+
const complexityEvaluation = complexityMetricEvaluation(instance, policyContext, matchingAreas);
|
|
148
|
+
if (complexityEvaluation !== null) evaluations.push(complexityEvaluation);
|
|
149
|
+
evaluations.push(
|
|
150
|
+
codeLinesMetricEvaluation(instance, policyContext, matchingAreas),
|
|
151
|
+
parameterMetricEvaluation(instance, policyContext, matchingAreas)
|
|
152
|
+
);
|
|
153
|
+
return evaluations;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function sharedMetricEvaluation(
|
|
157
|
+
instance: FunctionMetricInstance,
|
|
158
|
+
policyContext: FunctionPolicyContext
|
|
159
|
+
) {
|
|
160
|
+
return {
|
|
161
|
+
blocking: policyContext.blocking,
|
|
162
|
+
codeAreas: policyContext.codeAreas,
|
|
163
|
+
functionName: policyContext.functionName,
|
|
164
|
+
path: instance.metric.file,
|
|
165
|
+
startLine: instance.metric.startLine,
|
|
166
|
+
subject: instance.semanticSubject
|
|
167
|
+
} as const;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function complexityMetricEvaluation(
|
|
171
|
+
instance: FunctionMetricInstance,
|
|
172
|
+
policyContext: FunctionPolicyContext,
|
|
173
|
+
matchingAreas: MatchingFunctionMetricAreas
|
|
174
|
+
): FunctionMetricEvaluation | null {
|
|
175
|
+
const value = instance.metric.cyclomaticComplexity.value;
|
|
176
|
+
if (value === null) return null;
|
|
177
|
+
return {
|
|
178
|
+
...sharedMetricEvaluation(instance, policyContext),
|
|
179
|
+
limit: Math.min(...matchingAreas.map((area) => area.limits.cyclomaticComplexity.maximum)),
|
|
180
|
+
metric: "cyclomatic-complexity",
|
|
181
|
+
value
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function codeLinesMetricEvaluation(
|
|
186
|
+
instance: FunctionMetricInstance,
|
|
187
|
+
policyContext: FunctionPolicyContext,
|
|
188
|
+
matchingAreas: MatchingFunctionMetricAreas
|
|
189
|
+
): FunctionMetricEvaluation {
|
|
190
|
+
return {
|
|
191
|
+
...sharedMetricEvaluation(instance, policyContext),
|
|
192
|
+
limit: Math.min(
|
|
193
|
+
...matchingAreas.map((area) => functionCodeLineMaximum(instance.metric, area.limits))
|
|
194
|
+
),
|
|
195
|
+
metric: "function-code-density",
|
|
196
|
+
value: instance.metric.lines
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function parameterMetricEvaluation(
|
|
201
|
+
instance: FunctionMetricInstance,
|
|
202
|
+
policyContext: FunctionPolicyContext,
|
|
203
|
+
matchingAreas: MatchingFunctionMetricAreas
|
|
204
|
+
): FunctionMetricEvaluation {
|
|
205
|
+
return {
|
|
206
|
+
...sharedMetricEvaluation(instance, policyContext),
|
|
207
|
+
limit: Math.min(...matchingAreas.map((area) => area.limits.parameters.maximum)),
|
|
208
|
+
metric: "parameter-count",
|
|
209
|
+
value: instance.metric.parameterCount
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function appendFindingCandidate(
|
|
214
|
+
candidates: FunctionRecordCandidate[],
|
|
215
|
+
evaluation: FunctionMetricEvaluation
|
|
216
|
+
): void {
|
|
217
|
+
if (evaluation.value <= evaluation.limit) return;
|
|
218
|
+
candidates.push(
|
|
219
|
+
Object.freeze({
|
|
220
|
+
id: `${evaluation.subject}:${evaluation.metric}`,
|
|
221
|
+
data: Object.freeze({
|
|
222
|
+
blocking: evaluation.blocking,
|
|
223
|
+
codeAreas: evaluation.codeAreas,
|
|
224
|
+
functionName: evaluation.functionName,
|
|
225
|
+
limit: evaluation.limit,
|
|
226
|
+
metric: evaluation.metric,
|
|
227
|
+
path: evaluation.path,
|
|
228
|
+
startLine: evaluation.startLine,
|
|
229
|
+
value: evaluation.value
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function functionCodeLineMaximum(
|
|
236
|
+
metric: FunctionMetric,
|
|
237
|
+
limits: ResolvedFunctionMetricsLimits
|
|
238
|
+
): number {
|
|
239
|
+
const allowance = limits.codeLines.lowComplexityAllowance;
|
|
240
|
+
const complexity = metric.cyclomaticComplexity.value;
|
|
241
|
+
return complexity !== null && complexity < allowance.cyclomaticComplexityBelow
|
|
242
|
+
? allowance.maximum
|
|
243
|
+
: limits.codeLines.maximum;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function uniqueSorted(values: readonly string[]): string[] {
|
|
247
|
+
return [...new Set(values)].sort(compareText);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function compareText(left: string, right: string): number {
|
|
251
|
+
if (left < right) return -1;
|
|
252
|
+
if (left > right) return 1;
|
|
253
|
+
return 0;
|
|
254
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** Lizard 1.23.0 官方 language readers 支持的 exact input 扩展名。 */
|
|
2
|
+
const LIZARD_SUPPORTED_FILE_EXTENSIONS = Object.freeze([
|
|
3
|
+
"c",
|
|
4
|
+
"cc",
|
|
5
|
+
"cjs",
|
|
6
|
+
"cpp",
|
|
7
|
+
"cs",
|
|
8
|
+
"cxx",
|
|
9
|
+
"erl",
|
|
10
|
+
"es",
|
|
11
|
+
"escript",
|
|
12
|
+
"f",
|
|
13
|
+
"f03",
|
|
14
|
+
"f08",
|
|
15
|
+
"f70",
|
|
16
|
+
"f90",
|
|
17
|
+
"f95",
|
|
18
|
+
"for",
|
|
19
|
+
"fpp",
|
|
20
|
+
"ftn",
|
|
21
|
+
"gd",
|
|
22
|
+
"go",
|
|
23
|
+
"h",
|
|
24
|
+
"hpp",
|
|
25
|
+
"hrl",
|
|
26
|
+
"java",
|
|
27
|
+
"js",
|
|
28
|
+
"jsx",
|
|
29
|
+
"kt",
|
|
30
|
+
"kts",
|
|
31
|
+
"lua",
|
|
32
|
+
"m",
|
|
33
|
+
"mjs",
|
|
34
|
+
"mm",
|
|
35
|
+
"pck",
|
|
36
|
+
"php",
|
|
37
|
+
"pkb",
|
|
38
|
+
"pks",
|
|
39
|
+
"pl",
|
|
40
|
+
"plb",
|
|
41
|
+
"pls",
|
|
42
|
+
"pm",
|
|
43
|
+
"py",
|
|
44
|
+
"r",
|
|
45
|
+
"rb",
|
|
46
|
+
"rs",
|
|
47
|
+
"scala",
|
|
48
|
+
"sol",
|
|
49
|
+
"sql",
|
|
50
|
+
"st",
|
|
51
|
+
"swift",
|
|
52
|
+
"ts",
|
|
53
|
+
"ttcn",
|
|
54
|
+
"ttcnpp",
|
|
55
|
+
"tsx",
|
|
56
|
+
"vue",
|
|
57
|
+
"zig"
|
|
58
|
+
] as const);
|
|
59
|
+
|
|
60
|
+
const LIZARD_SUPPORTED_FILE_EXTENSION_SET: ReadonlySet<string> = new Set(
|
|
61
|
+
LIZARD_SUPPORTED_FILE_EXTENSIONS
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
/** functionMetrics 默认 files.include 使用的 case-insensitive extension globs。 */
|
|
65
|
+
export const LIZARD_SUPPORTED_FILE_GLOBS = Object.freeze(
|
|
66
|
+
LIZARD_SUPPORTED_FILE_EXTENSIONS.map(
|
|
67
|
+
(extension) => `**/*.${caseInsensitiveExtensionPattern(extension)}`
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export function isLizardTarget(filePath: string): boolean {
|
|
72
|
+
const extensionSeparator = filePath.lastIndexOf(".");
|
|
73
|
+
if (extensionSeparator < 0) return false;
|
|
74
|
+
const extension = filePath.slice(extensionSeparator + 1).toLowerCase();
|
|
75
|
+
return LIZARD_SUPPORTED_FILE_EXTENSION_SET.has(extension);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function caseInsensitiveExtensionPattern(extension: string): string {
|
|
79
|
+
return extension
|
|
80
|
+
.split("")
|
|
81
|
+
.map((character) =>
|
|
82
|
+
/[a-z]/u.test(character) ? `[${character}${character.toUpperCase()}]` : character
|
|
83
|
+
)
|
|
84
|
+
.join("");
|
|
85
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { errorMessage } from "./error-message.ts";
|
|
5
|
+
import { toSlashPath } from "./path.ts";
|
|
6
|
+
|
|
7
|
+
export type WriteTextFileInput = {
|
|
8
|
+
readonly content: string;
|
|
9
|
+
readonly filePath: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type WriteJsonFileInput = {
|
|
13
|
+
readonly filePath: string;
|
|
14
|
+
readonly trailingNewline?: boolean;
|
|
15
|
+
readonly value: unknown;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type WalkFilesInput = {
|
|
19
|
+
readonly ignoredDirs?: Iterable<string>;
|
|
20
|
+
readonly rootDir: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function ensureDirForFile(filePath: string): void {
|
|
24
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function readTextFile(filePath: string): string {
|
|
28
|
+
return fs.readFileSync(filePath, "utf8");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function writeTextFile({ content, filePath }: WriteTextFileInput): void {
|
|
32
|
+
ensureDirForFile(filePath);
|
|
33
|
+
fs.writeFileSync(filePath, content, "utf8");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function readJsonFile(filePath: string): unknown {
|
|
37
|
+
let source: string;
|
|
38
|
+
try {
|
|
39
|
+
source = readTextFile(filePath);
|
|
40
|
+
} catch (error: unknown) {
|
|
41
|
+
throw new Error(`could not read JSON file ${filePath}: ${errorMessage(error)}`, {
|
|
42
|
+
cause: error
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
return JSON.parse(source);
|
|
48
|
+
} catch (error: unknown) {
|
|
49
|
+
throw new Error(`could not parse JSON file ${filePath}: ${errorMessage(error)}`, {
|
|
50
|
+
cause: error
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function writeJsonFile({
|
|
56
|
+
filePath,
|
|
57
|
+
trailingNewline = true,
|
|
58
|
+
value
|
|
59
|
+
}: WriteJsonFileInput): void {
|
|
60
|
+
const content = serializeJsonFile(value, filePath);
|
|
61
|
+
writeTextFile({ content: trailingNewline ? `${content}\n` : content, filePath });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function walkFiles({
|
|
65
|
+
ignoredDirs: ignoredDirectoryNames,
|
|
66
|
+
rootDir
|
|
67
|
+
}: WalkFilesInput): readonly string[] {
|
|
68
|
+
const ignoredDirs = new Set(ignoredDirectoryNames ?? []);
|
|
69
|
+
const results: string[] = [];
|
|
70
|
+
|
|
71
|
+
const visit = (subDir: string) => {
|
|
72
|
+
const currentDir = subDir ? path.join(rootDir, subDir) : rootDir;
|
|
73
|
+
let entries: fs.Dirent[];
|
|
74
|
+
try {
|
|
75
|
+
entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
76
|
+
} catch (error: unknown) {
|
|
77
|
+
throw new Error(`could not read directory ${currentDir}: ${errorMessage(error)}`, {
|
|
78
|
+
cause: error
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
for (const entry of entries) {
|
|
83
|
+
const relPath = subDir ? `${subDir}/${entry.name}` : entry.name;
|
|
84
|
+
if (entry.isDirectory()) {
|
|
85
|
+
if (!ignoredDirs.has(entry.name)) {
|
|
86
|
+
visit(relPath);
|
|
87
|
+
}
|
|
88
|
+
} else if (entry.isFile()) {
|
|
89
|
+
results.push(toSlashPath(relPath));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
visit("");
|
|
95
|
+
return Object.freeze(results.sort());
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function serializeJsonFile(value: unknown, filePath: string): string {
|
|
99
|
+
try {
|
|
100
|
+
const content = JSON.stringify(value, null, 2);
|
|
101
|
+
if (content === undefined) {
|
|
102
|
+
throw new TypeError("value is not JSON-serializable");
|
|
103
|
+
}
|
|
104
|
+
return content;
|
|
105
|
+
} catch (error: unknown) {
|
|
106
|
+
throw new Error(`could not serialize JSON file ${filePath}: ${errorMessage(error)}`, {
|
|
107
|
+
cause: error
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { processFailed, runProcessSync } from "./process/command.ts";
|
|
2
|
+
import type { ProcessResult, RunProcessSyncOptions } from "./process/command.ts";
|
|
3
|
+
import { toSlashPath } from "./path.ts";
|
|
4
|
+
|
|
5
|
+
export type RunGitOptions = Omit<RunProcessSyncOptions, "command">;
|
|
6
|
+
|
|
7
|
+
export type GitCommitOptions = {
|
|
8
|
+
readonly cwd: string;
|
|
9
|
+
readonly sha: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type GitLogFieldOptions = GitCommitOptions & {
|
|
13
|
+
readonly format: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function runGit(options: RunGitOptions): ProcessResult {
|
|
17
|
+
return runProcessSync({ command: "git", ...options });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function gitHeadSha(cwd: string): string | null {
|
|
21
|
+
const result = runGit({ args: ["rev-parse", "HEAD"], cwd });
|
|
22
|
+
if (processFailed(result)) return null;
|
|
23
|
+
return result.stdout.trim() || null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function gitCommitDate(options: GitCommitOptions): string | null {
|
|
27
|
+
return gitLogField({ format: "%aI", ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function gitCommitTitle(options: GitCommitOptions): string | null {
|
|
31
|
+
return gitLogField({ format: "%s", ...options });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function splitGitFileList(stdout: string): string[] {
|
|
35
|
+
return stdout.trim().split(/\r?\n/).filter(Boolean).map(toSlashPath);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function splitNulDelimitedGitFileList(stdout: string): string[] {
|
|
39
|
+
return stdout
|
|
40
|
+
.split("\0")
|
|
41
|
+
.filter((filePath) => filePath.length > 0)
|
|
42
|
+
.map(toSlashPath);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function parseGitStatusPaths(stdout: string): string[] {
|
|
46
|
+
return stdout
|
|
47
|
+
.split(/\r?\n/)
|
|
48
|
+
.map((line) => line.trimEnd())
|
|
49
|
+
.filter(Boolean)
|
|
50
|
+
.map((line) => {
|
|
51
|
+
const rawPath = line.slice(3).trim();
|
|
52
|
+
const renameMarker = " -> ";
|
|
53
|
+
return rawPath.includes(renameMarker)
|
|
54
|
+
? rawPath.slice(rawPath.indexOf(renameMarker) + renameMarker.length)
|
|
55
|
+
: rawPath;
|
|
56
|
+
})
|
|
57
|
+
.filter(Boolean)
|
|
58
|
+
.map(toSlashPath);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function gitLogField({ format, ...options }: GitLogFieldOptions): string | null {
|
|
62
|
+
const result = runGit({
|
|
63
|
+
args: ["log", `--format=${format}`, "--max-count=1", options.sha],
|
|
64
|
+
cwd: options.cwd
|
|
65
|
+
});
|
|
66
|
+
if (processFailed(result)) return null;
|
|
67
|
+
return result.stdout.trim() || null;
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function toSlashPath(filePath: string): string {
|
|
2
|
+
return filePath.replace(/\\/g, "/");
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/** 判断值是否已是跨平台可稳定发布的 project-root-relative slash path。 */
|
|
6
|
+
export function isNormalizedProjectRelativePath(value: unknown): value is string {
|
|
7
|
+
if (
|
|
8
|
+
typeof value !== "string" ||
|
|
9
|
+
value.length === 0 ||
|
|
10
|
+
value.startsWith("/") ||
|
|
11
|
+
value.includes("\\") ||
|
|
12
|
+
value.includes("\u0000") ||
|
|
13
|
+
/^[A-Za-z]:/u.test(value)
|
|
14
|
+
) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return value
|
|
18
|
+
.split("/")
|
|
19
|
+
.every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ProcessResult } from "./contract.ts";
|
|
2
|
+
|
|
3
|
+
export { processFailure, processFailureFromResult, processFailed } from "./failure.ts";
|
|
4
|
+
export { PLAIN_TEXT_PROCESS_ENV, plainTextProcessEnv } from "./env.ts";
|
|
5
|
+
export { runProcess, runProcessSync } from "./runner.ts";
|
|
6
|
+
export { DEFAULT_PROCESS_MAX_BUFFER_BYTES } from "./contract.ts";
|
|
7
|
+
export type {
|
|
8
|
+
ProcessFailure,
|
|
9
|
+
ProcessResult,
|
|
10
|
+
RunProcessOptions,
|
|
11
|
+
RunProcessSyncOptions
|
|
12
|
+
} from "./contract.ts";
|
|
13
|
+
|
|
14
|
+
export function writeProcessOutput(result: Pick<ProcessResult, "stderr" | "stdout">): void {
|
|
15
|
+
if (result.stdout) {
|
|
16
|
+
process.stdout.write(result.stdout);
|
|
17
|
+
}
|
|
18
|
+
if (result.stderr) {
|
|
19
|
+
process.stderr.write(result.stderr);
|
|
20
|
+
}
|
|
21
|
+
}
|