@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,35 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
import { toSlashPath } from "../host-environment/path.ts";
|
|
4
|
+
|
|
5
|
+
export function normalizeScannerReportedPath(reportedPath: string, projectRoot: string): string {
|
|
6
|
+
const normalizedReportedPath = stripWindowsExtendedPathPrefix(reportedPath);
|
|
7
|
+
const normalizedProjectRoot = stripWindowsExtendedPathPrefix(projectRoot);
|
|
8
|
+
const pathApi = pathApiForScannerPath(normalizedReportedPath, normalizedProjectRoot);
|
|
9
|
+
const nativePath = pathApi.normalize(normalizedReportedPath);
|
|
10
|
+
const projectRelativePath = pathApi.isAbsolute(nativePath)
|
|
11
|
+
? pathApi.relative(pathApi.normalize(normalizedProjectRoot), nativePath)
|
|
12
|
+
: nativePath;
|
|
13
|
+
|
|
14
|
+
return toSlashPath(projectRelativePath);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function stripWindowsExtendedPathPrefix(filePath: string): string {
|
|
18
|
+
if (filePath.startsWith("\\\\?\\UNC\\")) {
|
|
19
|
+
return `\\\\${filePath.slice(8)}`;
|
|
20
|
+
}
|
|
21
|
+
if (filePath.startsWith("\\\\?\\")) {
|
|
22
|
+
return filePath.slice(4);
|
|
23
|
+
}
|
|
24
|
+
return filePath;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function pathApiForScannerPath(reportedPath: string, projectRoot: string): path.PlatformPath {
|
|
28
|
+
return isWindowsAbsolutePath(reportedPath) || isWindowsAbsolutePath(projectRoot)
|
|
29
|
+
? path.win32
|
|
30
|
+
: path;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function isWindowsAbsolutePath(filePath: string): boolean {
|
|
34
|
+
return /^[A-Za-z]:[\\/]/u.test(filePath) || filePath.startsWith("\\\\");
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Path and Git-output projections shared by revision traversal helpers. */
|
|
2
|
+
|
|
3
|
+
import { toSlashPath } from "../host-environment/path.ts";
|
|
4
|
+
import { matchesAnyConfigGlob } from "./config-glob.ts";
|
|
5
|
+
|
|
6
|
+
export function uniqueSortedPaths(files: readonly string[]): string[] {
|
|
7
|
+
return [...new Set(files.map(toSlashPath))].sort();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function prefixAndFilter({
|
|
11
|
+
files,
|
|
12
|
+
prefix,
|
|
13
|
+
scanInputPaths
|
|
14
|
+
}: Readonly<{
|
|
15
|
+
readonly files: readonly string[];
|
|
16
|
+
readonly prefix: string;
|
|
17
|
+
readonly scanInputPaths: readonly string[];
|
|
18
|
+
}>): string[] {
|
|
19
|
+
return files
|
|
20
|
+
.map((file) => joinSlash({ path: file, prefix }))
|
|
21
|
+
.filter((file) => scanInputPaths.length === 0 || matchesAnyConfigGlob(file, scanInputPaths));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function joinSlash({
|
|
25
|
+
path,
|
|
26
|
+
prefix
|
|
27
|
+
}: Readonly<{ readonly path: string; readonly prefix: string }>): string {
|
|
28
|
+
return prefix ? `${toSlashPath(prefix)}/${toSlashPath(path)}` : toSlashPath(path);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function nonEmptyGitOutput(stdout: string | null | undefined): string | null {
|
|
32
|
+
const value = (stdout || "").trim();
|
|
33
|
+
return value || null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/** Enumerates files from initialized, non-cyclic submodule working trees. */
|
|
2
|
+
|
|
3
|
+
import { processFailed } from "../host-environment/process/command.ts";
|
|
4
|
+
import { runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
5
|
+
import {
|
|
6
|
+
canonicalRepositoryPath,
|
|
7
|
+
resolveDescendableGitlinkRepository,
|
|
8
|
+
visitRepository
|
|
9
|
+
} from "./gitlink-worktree.ts";
|
|
10
|
+
import { gitlinksAtRevision } from "./gitlink-revision.ts";
|
|
11
|
+
import {
|
|
12
|
+
joinSlash,
|
|
13
|
+
nonEmptyGitOutput,
|
|
14
|
+
prefixAndFilter,
|
|
15
|
+
uniqueSortedPaths
|
|
16
|
+
} from "./revision-paths.ts";
|
|
17
|
+
|
|
18
|
+
export function collectSubmoduleWorktreeFiles({
|
|
19
|
+
repository,
|
|
20
|
+
scanInputPaths
|
|
21
|
+
}: Readonly<{
|
|
22
|
+
readonly repository: string;
|
|
23
|
+
readonly scanInputPaths: readonly string[];
|
|
24
|
+
}>): string[] {
|
|
25
|
+
const files: string[] = [];
|
|
26
|
+
const visitedRepositories = new Set([canonicalRepositoryPath(repository)]);
|
|
27
|
+
const revision = worktreeRevision(repository);
|
|
28
|
+
if (revision === null) return files;
|
|
29
|
+
|
|
30
|
+
for (const gitlink of gitlinksAtRevision({ repository, revision })) {
|
|
31
|
+
const submoduleRepository = resolveDescendableGitlinkRepository({
|
|
32
|
+
gitlinkPath: gitlink.path,
|
|
33
|
+
repository,
|
|
34
|
+
visitedRepositories
|
|
35
|
+
});
|
|
36
|
+
if (!submoduleRepository) continue;
|
|
37
|
+
files.push(
|
|
38
|
+
...collectWorktreeFiles({
|
|
39
|
+
prefix: gitlink.path,
|
|
40
|
+
repository: submoduleRepository,
|
|
41
|
+
scanInputPaths,
|
|
42
|
+
visitedRepositories: visitRepository({
|
|
43
|
+
repository: submoduleRepository,
|
|
44
|
+
visitedRepositories
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return uniqueSortedPaths(files);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function collectWorktreeFiles({
|
|
53
|
+
prefix,
|
|
54
|
+
repository,
|
|
55
|
+
scanInputPaths,
|
|
56
|
+
visitedRepositories
|
|
57
|
+
}: Readonly<{
|
|
58
|
+
readonly prefix: string;
|
|
59
|
+
readonly repository: string;
|
|
60
|
+
readonly scanInputPaths: readonly string[];
|
|
61
|
+
readonly visitedRepositories: ReadonlySet<string>;
|
|
62
|
+
}>): string[] {
|
|
63
|
+
const result = runGit({
|
|
64
|
+
args: ["ls-files", "-z", "--cached", "--others", "--exclude-standard", "--"],
|
|
65
|
+
cwd: repository
|
|
66
|
+
});
|
|
67
|
+
if (processFailed(result)) {
|
|
68
|
+
const detail =
|
|
69
|
+
result.stderr.trim() ||
|
|
70
|
+
result.error?.message ||
|
|
71
|
+
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
72
|
+
throw new Error(`could not enumerate git-worktree files in ${repository}: ${detail}`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const files = prefixAndFilter({
|
|
76
|
+
files: splitNulDelimitedGitFileList(result.stdout),
|
|
77
|
+
prefix,
|
|
78
|
+
scanInputPaths
|
|
79
|
+
});
|
|
80
|
+
const revision = worktreeRevision(repository);
|
|
81
|
+
if (revision === null) return uniqueSortedPaths(files);
|
|
82
|
+
files.push(
|
|
83
|
+
...collectNestedWorktreeFiles({
|
|
84
|
+
prefix,
|
|
85
|
+
repository,
|
|
86
|
+
revision,
|
|
87
|
+
scanInputPaths,
|
|
88
|
+
visitedRepositories
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
return uniqueSortedPaths(files);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function collectNestedWorktreeFiles({
|
|
95
|
+
prefix,
|
|
96
|
+
repository,
|
|
97
|
+
revision,
|
|
98
|
+
scanInputPaths,
|
|
99
|
+
visitedRepositories
|
|
100
|
+
}: Readonly<{
|
|
101
|
+
readonly prefix: string;
|
|
102
|
+
readonly repository: string;
|
|
103
|
+
readonly revision: string;
|
|
104
|
+
readonly scanInputPaths: readonly string[];
|
|
105
|
+
readonly visitedRepositories: ReadonlySet<string>;
|
|
106
|
+
}>): string[] {
|
|
107
|
+
const files: string[] = [];
|
|
108
|
+
for (const gitlink of gitlinksAtRevision({ repository, revision })) {
|
|
109
|
+
const submoduleRepository = resolveDescendableGitlinkRepository({
|
|
110
|
+
gitlinkPath: gitlink.path,
|
|
111
|
+
repository,
|
|
112
|
+
visitedRepositories
|
|
113
|
+
});
|
|
114
|
+
if (!submoduleRepository) continue;
|
|
115
|
+
files.push(
|
|
116
|
+
...collectWorktreeFiles({
|
|
117
|
+
prefix: joinSlash({ path: gitlink.path, prefix }),
|
|
118
|
+
repository: submoduleRepository,
|
|
119
|
+
scanInputPaths,
|
|
120
|
+
visitedRepositories: visitRepository({
|
|
121
|
+
repository: submoduleRepository,
|
|
122
|
+
visitedRepositories
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return files;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function worktreeRevision(repository: string): string | null {
|
|
131
|
+
const result = runGit({ args: ["rev-parse", "--verify", "--quiet", "HEAD"], cwd: repository });
|
|
132
|
+
if (!processFailed(result)) {
|
|
133
|
+
const revision = nonEmptyGitOutput(result.stdout);
|
|
134
|
+
if (revision !== null) return revision;
|
|
135
|
+
throw new Error(`git-worktree revision inspection returned no revision in ${repository}`);
|
|
136
|
+
}
|
|
137
|
+
const headDoesNotExist =
|
|
138
|
+
result.error === undefined &&
|
|
139
|
+
result.signal === null &&
|
|
140
|
+
result.status === 1 &&
|
|
141
|
+
result.stderr.trim() === "";
|
|
142
|
+
if (headDoesNotExist) return null;
|
|
143
|
+
const detail =
|
|
144
|
+
result.stderr.trim() ||
|
|
145
|
+
result.error?.message ||
|
|
146
|
+
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
147
|
+
throw new Error(`could not inspect git-worktree revision in ${repository}: ${detail}`);
|
|
148
|
+
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import type { CheckDescriptor } from "../../check/descriptor.ts";
|
|
2
|
+
import {
|
|
3
|
+
isInheritedCheckCollection,
|
|
4
|
+
snapshotInheritedCheckCollection,
|
|
5
|
+
type CheckVisibility,
|
|
6
|
+
type CheckExecution,
|
|
7
|
+
type CheckPreflight,
|
|
8
|
+
type InheritedCheckCollection
|
|
9
|
+
} from "../../check/check.ts";
|
|
10
|
+
import { snapshotClosedArray, snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
11
|
+
import { validateCheckDescriptor } from "../../check/descriptor-validation.ts";
|
|
12
|
+
import { snapshotJsonObject } from "../../check/options-snapshot.ts";
|
|
13
|
+
|
|
14
|
+
type TrustedDataParser = (this: void, ...parameters: never[]) => unknown;
|
|
15
|
+
|
|
16
|
+
export type ParsedCheckCollection = Readonly<
|
|
17
|
+
| { readonly kind: "exact"; readonly values: readonly string[] }
|
|
18
|
+
| {
|
|
19
|
+
readonly kind: "inherit";
|
|
20
|
+
readonly add: readonly string[];
|
|
21
|
+
readonly remove: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
export interface ParsedCheck {
|
|
26
|
+
readonly checkId: string;
|
|
27
|
+
readonly checks: readonly ParsedCheck[];
|
|
28
|
+
readonly definition: CheckDescriptor | null;
|
|
29
|
+
readonly dependsOn: ParsedCheckCollection | undefined;
|
|
30
|
+
readonly displayName: string;
|
|
31
|
+
readonly execution: CheckExecution | null;
|
|
32
|
+
readonly maxParallel: number | undefined;
|
|
33
|
+
readonly mutex: ParsedCheckCollection | undefined;
|
|
34
|
+
readonly options: object | null;
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly parseData: TrustedDataParser | null;
|
|
37
|
+
readonly preflight: CheckPreflight | null;
|
|
38
|
+
readonly visibility: CheckVisibility | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ParsedCheckTree {
|
|
42
|
+
readonly checks: readonly ParsedCheck[];
|
|
43
|
+
readonly warnings: readonly MeaninglessCheckWarning[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MeaninglessCheckWarning {
|
|
47
|
+
readonly code: "meaningless-check";
|
|
48
|
+
readonly path: string;
|
|
49
|
+
readonly checkId: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface ParseState {
|
|
53
|
+
readonly warnings: MeaninglessCheckWarning[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface CheckAuthoringData extends Readonly<Record<string, unknown>> {
|
|
57
|
+
readonly checkId: string;
|
|
58
|
+
readonly displayName: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface ParsedCheckFields {
|
|
62
|
+
readonly definition: CheckDescriptor | null;
|
|
63
|
+
readonly execution: CheckExecution | null;
|
|
64
|
+
readonly options: object | null;
|
|
65
|
+
readonly parseData: TrustedDataParser | null;
|
|
66
|
+
readonly preflight: CheckPreflight | null;
|
|
67
|
+
readonly visibility: CheckVisibility | null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const CHECK_KEYS = [
|
|
71
|
+
"checkId",
|
|
72
|
+
"checks",
|
|
73
|
+
"dependsOn",
|
|
74
|
+
"displayName",
|
|
75
|
+
"execution",
|
|
76
|
+
"maxParallel",
|
|
77
|
+
"mutex",
|
|
78
|
+
"options",
|
|
79
|
+
"parseData",
|
|
80
|
+
"preflight",
|
|
81
|
+
"visibility"
|
|
82
|
+
] as const;
|
|
83
|
+
|
|
84
|
+
const CONTAINER_CHECK_FIELDS: ParsedCheckFields = Object.freeze({
|
|
85
|
+
definition: null,
|
|
86
|
+
execution: null,
|
|
87
|
+
options: null,
|
|
88
|
+
parseData: null,
|
|
89
|
+
preflight: null,
|
|
90
|
+
visibility: null
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Parses only the closed recursive authoring grammar. Execution callbacks are
|
|
95
|
+
* trusted project code, while every declarative field is copied and validated.
|
|
96
|
+
*/
|
|
97
|
+
export function parseCheckTreeAuthoring(value: unknown): ParsedCheckTree | undefined {
|
|
98
|
+
const roots = snapshotClosedArray(value);
|
|
99
|
+
if (roots === undefined) return undefined;
|
|
100
|
+
const state: ParseState = { warnings: [] };
|
|
101
|
+
const checks: ParsedCheck[] = [];
|
|
102
|
+
for (let index = 0; index < roots.length; index += 1) {
|
|
103
|
+
const check = parseCheck(roots[index], `definition.checks[${index}]`, state);
|
|
104
|
+
if (check === undefined) return undefined;
|
|
105
|
+
checks.push(check);
|
|
106
|
+
}
|
|
107
|
+
return Object.freeze({
|
|
108
|
+
checks: Object.freeze(checks),
|
|
109
|
+
warnings: Object.freeze(state.warnings)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function parseCheck(value: unknown, path: string, state: ParseState): ParsedCheck | undefined {
|
|
114
|
+
const data = parseCheckData(value);
|
|
115
|
+
if (data === undefined) return undefined;
|
|
116
|
+
const execution = parseExecution(data);
|
|
117
|
+
if (execution === undefined) return undefined;
|
|
118
|
+
const parseData = parseDataParser(data);
|
|
119
|
+
if (parseData === undefined) return undefined;
|
|
120
|
+
const preflight = parsePreflight(data);
|
|
121
|
+
if (preflight === undefined) return undefined;
|
|
122
|
+
const checks = parseChildren(data, path, state);
|
|
123
|
+
if (checks === undefined) return undefined;
|
|
124
|
+
const scheduling = parseScheduling(data);
|
|
125
|
+
if (scheduling === undefined) return undefined;
|
|
126
|
+
const fields = parseCheckFields(data, execution, parseData, preflight);
|
|
127
|
+
if (fields === undefined) return undefined;
|
|
128
|
+
warnForMeaninglessCheck(data, checks, fields, path, state);
|
|
129
|
+
|
|
130
|
+
return Object.freeze({
|
|
131
|
+
checkId: data.checkId,
|
|
132
|
+
checks,
|
|
133
|
+
definition: fields.definition,
|
|
134
|
+
dependsOn: scheduling.dependsOn,
|
|
135
|
+
displayName: data.displayName,
|
|
136
|
+
execution: fields.execution,
|
|
137
|
+
maxParallel: scheduling.maxParallel,
|
|
138
|
+
mutex: scheduling.mutex,
|
|
139
|
+
options: fields.options,
|
|
140
|
+
path,
|
|
141
|
+
parseData: fields.parseData,
|
|
142
|
+
preflight: fields.preflight,
|
|
143
|
+
visibility: fields.visibility
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function parseCheckData(value: unknown): CheckAuthoringData | undefined {
|
|
148
|
+
const data = snapshotClosedRecord(value);
|
|
149
|
+
if (data === undefined) return undefined;
|
|
150
|
+
return hasValidCheckIdentity(data) ? data : undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function hasValidCheckIdentity(
|
|
154
|
+
data: Readonly<Record<string, unknown>>
|
|
155
|
+
): data is CheckAuthoringData {
|
|
156
|
+
return (
|
|
157
|
+
hasOnlyCheckKeys(data) &&
|
|
158
|
+
typeof data.checkId === "string" &&
|
|
159
|
+
data.checkId.length > 0 &&
|
|
160
|
+
typeof data.displayName === "string" &&
|
|
161
|
+
data.displayName.length > 0
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function hasOnlyCheckKeys(data: Readonly<Record<string, unknown>>): boolean {
|
|
166
|
+
return Object.keys(data).every((key) => CHECK_KEYS.some((checkKey) => checkKey === key));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function parseExecution(data: CheckAuthoringData): CheckExecution | null | undefined {
|
|
170
|
+
if (!Object.hasOwn(data, "execution")) return null;
|
|
171
|
+
return isTrustedFunction<CheckExecution>(data.execution) ? data.execution : undefined;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function parseDataParser(data: CheckAuthoringData): TrustedDataParser | null | undefined {
|
|
175
|
+
if (!Object.hasOwn(data, "parseData") || data.parseData === undefined) return null;
|
|
176
|
+
return isTrustedFunction<TrustedDataParser>(data.parseData) ? data.parseData : undefined;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function parsePreflight(data: CheckAuthoringData): CheckPreflight | null | undefined {
|
|
180
|
+
if (!Object.hasOwn(data, "preflight")) return null;
|
|
181
|
+
return isTrustedFunction<CheckPreflight>(data.preflight) ? data.preflight : undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function isTrustedFunction<FunctionType extends (...parameters: never[]) => unknown>(
|
|
185
|
+
value: unknown
|
|
186
|
+
): value is FunctionType {
|
|
187
|
+
return typeof value === "function";
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function parseChildren(
|
|
191
|
+
data: CheckAuthoringData,
|
|
192
|
+
path: string,
|
|
193
|
+
state: ParseState
|
|
194
|
+
): readonly ParsedCheck[] | undefined {
|
|
195
|
+
if (!Object.hasOwn(data, "checks")) return Object.freeze([]);
|
|
196
|
+
const values = snapshotClosedArray(data.checks);
|
|
197
|
+
if (values === undefined) return undefined;
|
|
198
|
+
const checks: ParsedCheck[] = [];
|
|
199
|
+
for (let index = 0; index < values.length; index += 1) {
|
|
200
|
+
const check = parseCheck(values[index], `${path}.checks[${index}]`, state);
|
|
201
|
+
if (check === undefined) return undefined;
|
|
202
|
+
checks.push(check);
|
|
203
|
+
}
|
|
204
|
+
return Object.freeze(checks);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function parseDefinition(data: CheckAuthoringData): CheckDescriptor | undefined {
|
|
208
|
+
const definition = validateCheckDescriptor({
|
|
209
|
+
checkId: data.checkId,
|
|
210
|
+
displayName: data.displayName
|
|
211
|
+
});
|
|
212
|
+
return definition.ok ? definition.value : undefined;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function parseOptions(data: CheckAuthoringData): object | undefined {
|
|
216
|
+
if (!Object.hasOwn(data, "options")) return Object.freeze({});
|
|
217
|
+
const options = snapshotClosedRecord(data.options);
|
|
218
|
+
if (options === undefined) return undefined;
|
|
219
|
+
return snapshotJsonObject(options);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function parseCheckFields(
|
|
223
|
+
data: CheckAuthoringData,
|
|
224
|
+
execution: CheckExecution | null,
|
|
225
|
+
parseData: TrustedDataParser | null,
|
|
226
|
+
preflight: CheckPreflight | null
|
|
227
|
+
): ParsedCheckFields | undefined {
|
|
228
|
+
if (execution === null) {
|
|
229
|
+
return Object.hasOwn(data, "options") ||
|
|
230
|
+
Object.hasOwn(data, "visibility") ||
|
|
231
|
+
parseData !== null ||
|
|
232
|
+
preflight !== null
|
|
233
|
+
? undefined
|
|
234
|
+
: CONTAINER_CHECK_FIELDS;
|
|
235
|
+
}
|
|
236
|
+
const definition = parseDefinition(data);
|
|
237
|
+
if (definition === undefined) return undefined;
|
|
238
|
+
const options = parseOptions(data);
|
|
239
|
+
if (options === undefined) return undefined;
|
|
240
|
+
const visibility = parseVisibility(data);
|
|
241
|
+
if (visibility === undefined) return undefined;
|
|
242
|
+
return Object.freeze({
|
|
243
|
+
definition,
|
|
244
|
+
execution,
|
|
245
|
+
options,
|
|
246
|
+
parseData,
|
|
247
|
+
preflight,
|
|
248
|
+
visibility
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function parseVisibility(data: CheckAuthoringData): CheckVisibility | undefined {
|
|
253
|
+
if (!Object.hasOwn(data, "visibility")) return "always";
|
|
254
|
+
const visibility = data.visibility;
|
|
255
|
+
return visibility === undefined || visibility === "always" || visibility === "attention"
|
|
256
|
+
? (visibility ?? "always")
|
|
257
|
+
: undefined;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function warnForMeaninglessCheck(
|
|
261
|
+
data: CheckAuthoringData,
|
|
262
|
+
checks: readonly ParsedCheck[],
|
|
263
|
+
fields: ParsedCheckFields,
|
|
264
|
+
path: string,
|
|
265
|
+
state: ParseState
|
|
266
|
+
): void {
|
|
267
|
+
if (fields.execution !== null || checks.length > 0) return;
|
|
268
|
+
state.warnings.push(Object.freeze({ code: "meaningless-check", path, checkId: data.checkId }));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function parseScheduling(data: CheckAuthoringData):
|
|
272
|
+
| Readonly<{
|
|
273
|
+
readonly dependsOn: ParsedCheckCollection | undefined;
|
|
274
|
+
readonly maxParallel: number | undefined;
|
|
275
|
+
readonly mutex: ParsedCheckCollection | undefined;
|
|
276
|
+
}>
|
|
277
|
+
| undefined {
|
|
278
|
+
const dependsOn = parseCollection(data, "dependsOn");
|
|
279
|
+
const mutex = parseCollection(data, "mutex");
|
|
280
|
+
const maxParallel = data.maxParallel;
|
|
281
|
+
if (
|
|
282
|
+
dependsOn === null ||
|
|
283
|
+
mutex === null ||
|
|
284
|
+
(maxParallel !== undefined &&
|
|
285
|
+
(typeof maxParallel !== "number" || !Number.isSafeInteger(maxParallel) || maxParallel <= 0))
|
|
286
|
+
)
|
|
287
|
+
return undefined;
|
|
288
|
+
return Object.freeze({
|
|
289
|
+
dependsOn: dependsOn ?? undefined,
|
|
290
|
+
maxParallel,
|
|
291
|
+
mutex: mutex ?? undefined
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function parseCollection(
|
|
296
|
+
data: CheckAuthoringData,
|
|
297
|
+
field: "dependsOn" | "mutex"
|
|
298
|
+
): ParsedCheckCollection | null | undefined {
|
|
299
|
+
if (!Object.hasOwn(data, field)) return undefined;
|
|
300
|
+
const value = data[field];
|
|
301
|
+
if (isInheritedCheckCollection(value)) return parseInheritedCollection(value);
|
|
302
|
+
const values = parseCollectionItems(value);
|
|
303
|
+
return values === undefined ? null : Object.freeze({ kind: "exact", values });
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function parseInheritedCollection(
|
|
307
|
+
value: InheritedCheckCollection<unknown>
|
|
308
|
+
): ParsedCheckCollection | null {
|
|
309
|
+
const data = snapshotInheritedCheckCollection(value);
|
|
310
|
+
if (data === undefined || !hasExactInheritedKeys(data)) return null;
|
|
311
|
+
const add = data.add === undefined ? Object.freeze([]) : parseCollectionItems(data.add);
|
|
312
|
+
const remove = data.remove === undefined ? Object.freeze([]) : parseCollectionItems(data.remove);
|
|
313
|
+
if (add === undefined || remove === undefined) return null;
|
|
314
|
+
return Object.freeze({ kind: "inherit", add, remove });
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function hasExactInheritedKeys(data: Readonly<Record<string, unknown>>): boolean {
|
|
318
|
+
const keys = Object.keys(data);
|
|
319
|
+
return keys.length > 0 && keys.every((key) => key === "add" || key === "remove");
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function parseCollectionItems(value: unknown): readonly string[] | undefined {
|
|
323
|
+
const items = snapshotClosedArray(value);
|
|
324
|
+
if (items === undefined) return undefined;
|
|
325
|
+
const values: string[] = [];
|
|
326
|
+
for (const item of items) {
|
|
327
|
+
const valid = typeof item === "string" && item.length > 0;
|
|
328
|
+
if (!valid) return undefined;
|
|
329
|
+
if (!values.includes(item)) values.push(item);
|
|
330
|
+
}
|
|
331
|
+
return Object.freeze(values);
|
|
332
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { inherit, type Check, type InheritableCheckCollection } from "../../check/check.ts";
|
|
2
|
+
import type { ParsedCheck, ParsedCheckCollection, ParsedCheckTree } from "./authoring.ts";
|
|
3
|
+
|
|
4
|
+
/** Rebuilds the validated public authoring shape without retaining untyped input. */
|
|
5
|
+
export function materializeCheckTreeAuthoring(parsed: ParsedCheckTree): readonly Check[] {
|
|
6
|
+
return materializeChecks(parsed.checks);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function materializeChecks(checks: readonly ParsedCheck[]): readonly Check[] {
|
|
10
|
+
return Object.freeze(checks.map((check) => materializeCheck(check)));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function materializeCheck(check: ParsedCheck): Check {
|
|
14
|
+
const checks = materializeChecks(check.checks);
|
|
15
|
+
const dependsOn = materializeCollection(check.dependsOn);
|
|
16
|
+
const mutex = materializeCollection(check.mutex);
|
|
17
|
+
const visibility = check.visibility;
|
|
18
|
+
const preflight = check.preflight;
|
|
19
|
+
const scheduling = {
|
|
20
|
+
...(dependsOn === undefined ? {} : { dependsOn }),
|
|
21
|
+
...(check.maxParallel === undefined ? {} : { maxParallel: check.maxParallel }),
|
|
22
|
+
...(mutex === undefined ? {} : { mutex })
|
|
23
|
+
};
|
|
24
|
+
if (
|
|
25
|
+
check.definition === null ||
|
|
26
|
+
check.execution === null ||
|
|
27
|
+
check.options === null ||
|
|
28
|
+
visibility === null
|
|
29
|
+
) {
|
|
30
|
+
return Object.freeze({
|
|
31
|
+
checkId: check.checkId,
|
|
32
|
+
checks,
|
|
33
|
+
displayName: check.displayName,
|
|
34
|
+
...scheduling
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return Object.freeze({
|
|
38
|
+
checkId: check.checkId,
|
|
39
|
+
checks,
|
|
40
|
+
displayName: check.displayName,
|
|
41
|
+
execution: check.execution,
|
|
42
|
+
...(check.parseData === null ? {} : { parseData: check.parseData }),
|
|
43
|
+
options: check.options,
|
|
44
|
+
...(preflight === null ? {} : { preflight }),
|
|
45
|
+
...scheduling,
|
|
46
|
+
visibility
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function materializeCollection(
|
|
51
|
+
collection: ParsedCheckCollection | undefined
|
|
52
|
+
): InheritableCheckCollection<string> | undefined {
|
|
53
|
+
if (collection === undefined) return undefined;
|
|
54
|
+
if (collection.kind === "exact") return collection.values;
|
|
55
|
+
return inherit({ add: collection.add, remove: collection.remove });
|
|
56
|
+
}
|