@zxyycom/vibe-check 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/dist/esm/check/check.mjs +4 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/flag-enablement.mjs +32 -0
- package/dist/esm/check/flag-enablement.mjs.map +1 -0
- package/dist/esm/check/handoff-provider-identity.mjs +18 -0
- package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +1 -1
- package/dist/esm/check/inherited-collection.mjs.map +1 -1
- package/dist/esm/check/project-changes.mjs +2 -0
- package/dist/esm/check/project-changes.mjs.map +1 -0
- package/dist/esm/check/project-context.mjs +2 -0
- package/dist/esm/check/project-context.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -1
- package/dist/esm/check-settlement/record-store.mjs +1 -1
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-data.mjs +36 -7
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +28 -4
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
- package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
- package/dist/esm/data-boundary/project-path.mjs +19 -0
- package/dist/esm/data-boundary/project-path.mjs.map +1 -0
- package/dist/esm/index.mjs +12 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/check-authoring.mjs +69 -0
- package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
- package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
- package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/contract.mjs +2 -0
- package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/execution.mjs +134 -0
- package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/options.mjs +284 -0
- package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
- package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs +11 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/path.mjs +1 -17
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/local-cache-options.mjs +28 -0
- package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
- package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +23 -19
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
- package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
- package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
- package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
- package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
- package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
- package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
- package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
- package/dist/esm/project-definition/project-changes.mjs +70 -0
- package/dist/esm/project-definition/project-changes.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +22 -15
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
- package/dist/esm/project-run/aggregation.mjs +42 -59
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/changes/git.mjs +161 -0
- package/dist/esm/project-run/changes/git.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +3 -2
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
- package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
- package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
- package/dist/esm/project-run/completion/completion.mjs +18 -1
- package/dist/esm/project-run/completion/completion.mjs.map +1 -1
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +7 -54
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidate.mjs +17 -13
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidates.mjs +26 -0
- package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +7 -3
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
- package/dist/esm/project-run/invocation/execution.mjs +98 -0
- package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
- package/dist/esm/project-run/invocation/run.mjs +13 -112
- package/dist/esm/project-run/invocation/run.mjs.map +1 -1
- package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
- package/dist/esm/project-run/outputs/status.mjs +12 -12
- package/dist/esm/project-run/outputs/status.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +2 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -2
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +147 -28
- package/docs/changelog.md +145 -2
- package/docs/checks/duplicate-detection.md +22 -3
- package/docs/checks/file-metrics.md +25 -6
- package/docs/checks/function-metrics.md +21 -2
- package/docs/checks/json-schema-validation.md +25 -4
- package/docs/checks/json-validation.md +24 -5
- package/docs/checks/maintenance-reminders.md +30 -6
- package/docs/checks/markdown-link-validation.md +24 -4
- package/docs/checks/markdown-lint.md +167 -0
- package/docs/checks/secret-detection.md +31 -7
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
- package/docs/guides/building-project-gate.md +706 -0
- package/docs/guides/callbacks.md +81 -22
- package/docs/guides/check-dependencies.md +41 -10
- package/docs/guides/collecting-project-files.md +7 -7
- package/docs/guides/command-check.md +155 -0
- package/docs/guides/data-boundaries.md +140 -0
- package/docs/guides/extending-check-lifecycle.md +77 -25
- package/docs/guides/finding-waivers.md +43 -1
- package/docs/guides/learned-scheduling.md +1 -1
- package/docs/guides/run-outputs.md +35 -9
- package/docs/guides/scheduling.md +15 -15
- package/docs/output.md +6 -5
- package/package.json +2 -1
- package/src/check/check.ts +332 -92
- package/src/check/flag-enablement.ts +76 -0
- package/src/check/handoff-provider-identity.ts +34 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check/project-changes.ts +14 -0
- package/src/check/project-context.ts +11 -0
- package/src/check-settlement/facts.ts +1 -1
- package/src/check-settlement/record-store.ts +1 -1
- package/src/data-boundary/canonical-data.ts +36 -9
- package/src/data-boundary/canonical-json.ts +18 -1
- package/src/data-boundary/closed-values.ts +26 -6
- package/src/data-boundary/config-glob.ts +17 -0
- package/src/data-boundary/project-path.ts +21 -0
- package/src/index.ts +72 -11
- package/src/machine-output/v4/atomic-publication.ts +3 -1
- package/src/package-checks/check-authoring.ts +136 -0
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
- package/src/package-checks/command-check/command-check.ts +152 -0
- package/src/package-checks/command-check/contract.ts +168 -0
- package/src/package-checks/command-check/execution.ts +211 -0
- package/src/package-checks/command-check/options.ts +331 -0
- package/src/package-checks/command-check/transcript.ts +35 -0
- package/src/package-checks/duplicate-detection/default-check.ts +37 -6
- package/src/package-checks/duplicate-detection/execution.ts +2 -4
- package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/options.ts +6 -3
- package/src/package-checks/duplicate-detection/records.ts +1 -1
- package/src/package-checks/file-metrics/constructor.ts +29 -6
- package/src/package-checks/file-metrics/execution.ts +2 -4
- package/src/package-checks/file-metrics/finding-messages.ts +1 -1
- package/src/package-checks/file-metrics/options.ts +6 -3
- package/src/package-checks/file-metrics/records.ts +1 -1
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
- package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
- package/src/package-checks/function-metrics/analysis.ts +7 -2
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
- package/src/package-checks/function-metrics/constructor.ts +30 -7
- package/src/package-checks/function-metrics/execution.ts +2 -4
- package/src/package-checks/function-metrics/finding-messages.ts +2 -2
- package/src/package-checks/function-metrics/measurement.ts +3 -1
- package/src/package-checks/function-metrics/options.ts +6 -3
- package/src/package-checks/function-metrics/records.ts +1 -1
- package/src/package-checks/host-environment/git.ts +11 -0
- package/src/package-checks/host-environment/path.ts +1 -20
- package/src/package-checks/host-environment/process/contract.ts +17 -9
- package/src/package-checks/host-environment/process/result.ts +48 -20
- package/src/package-checks/host-environment/process/runner.ts +8 -4
- package/src/package-checks/json-schema-validation/default-check.ts +38 -5
- package/src/package-checks/json-schema-validation/options.ts +4 -1
- package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
- package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
- package/src/package-checks/json-validation/default-check.ts +27 -6
- package/src/package-checks/json-validation/options.ts +4 -1
- package/src/package-checks/local-cache-options.ts +40 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
- package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
- package/src/package-checks/markdown-link-validation/execution.ts +1 -1
- package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
- package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
- package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
- package/src/package-checks/markdown-link-validation/options.ts +6 -7
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
- package/src/package-checks/markdown-lint/adapter.ts +167 -0
- package/src/package-checks/markdown-lint/default-check.ts +92 -0
- package/src/package-checks/markdown-lint/execution.ts +266 -0
- package/src/package-checks/markdown-lint/final-data.ts +33 -0
- package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
- package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
- package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
- package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
- package/src/package-checks/markdown-lint/options-validation.ts +50 -0
- package/src/package-checks/markdown-lint/options.ts +82 -0
- package/src/package-checks/markdown-lint/records.ts +132 -0
- package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
- package/src/package-checks/project-files/collection.ts +38 -22
- package/src/package-checks/project-files/config-glob.ts +1 -17
- package/src/package-checks/project-files/configuration.ts +1 -1
- package/src/package-checks/project-files/gitlink-revision.ts +4 -6
- package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
- package/src/package-checks/project-files/public-collection.ts +1 -1
- package/src/package-checks/project-files/revision-paths.ts +3 -3
- package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
- package/src/package-checks/secret-detection/default-check.ts +29 -6
- package/src/package-checks/secret-detection/execution.ts +2 -2
- package/src/package-checks/secret-detection/input-preparation.ts +64 -7
- package/src/package-checks/secret-detection/options.ts +5 -2
- package/src/package-checks/secret-detection/records.ts +1 -1
- package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
- package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
- package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
- package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
- package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
- package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
- package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
- package/src/project-definition/check-tree/authoring.ts +15 -8
- package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
- package/src/project-definition/check-tree/flag-conditions.ts +99 -0
- package/src/project-definition/check-tree/materialization.ts +12 -8
- package/src/project-definition/check-tree/resolution.ts +13 -15
- package/src/project-definition/declarative-snapshot.ts +9 -2
- package/src/project-definition/project-changes.ts +112 -0
- package/src/project-definition/project-definition-validation.ts +58 -10
- package/src/project-definition/project-definition.ts +41 -68
- package/src/project-definition/scheduler-policy.ts +6 -3
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
- package/src/project-run/aggregation.ts +51 -74
- package/src/project-run/changes/git.ts +206 -0
- package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
- package/src/project-run/check-execution/callback.ts +3 -2
- package/src/project-run/check-execution/dependencies.ts +120 -6
- package/src/project-run/check-execution/execution-finalization.ts +6 -4
- package/src/project-run/check-execution/execution-settlement.ts +88 -29
- package/src/project-run/check-execution/flag-controls.ts +22 -8
- package/src/project-run/check-execution/lifecycle.ts +14 -6
- package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
- package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
- package/src/project-run/check-execution/ready-check-execution.ts +97 -0
- package/src/project-run/check-execution/resolved-checks.ts +40 -219
- package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
- package/src/project-run/check-execution/terminal-result.ts +108 -29
- package/src/project-run/completion/completion.ts +17 -3
- package/src/project-run/controls/contract.ts +6 -16
- package/src/project-run/controls/validation.ts +7 -60
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
- package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
- package/src/project-run/invocation/candidate.ts +28 -15
- package/src/project-run/invocation/candidates.ts +56 -0
- package/src/project-run/invocation/creation.ts +7 -3
- package/src/project-run/invocation/execution.ts +136 -0
- package/src/project-run/invocation/run.ts +15 -179
- package/src/project-run/invocation/scheduler.ts +13 -6
- package/src/project-run/outputs/status.ts +15 -15
- package/src/project-run/progress-rendering/presentation.ts +35 -13
- package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
- package/src/project-run/progress-rendering/renderer.ts +10 -4
- package/src/project-run/project-context.ts +8 -4
- package/src/project-run/result.ts +5 -5
- package/src/project-run/run.ts +1 -1
- package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
- package/src/project-run/task-scheduler/execution-state.ts +4 -4
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
- package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
- package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
- package/src/project-run/task-scheduler/scheduler.ts +23 -6
- package/types/check/check.d.ts +178 -67
- package/types/check/flag-enablement.d.ts +42 -0
- package/types/check/handoff-provider-identity.d.ts +12 -0
- package/types/check/project-changes.d.ts +13 -0
- package/types/check/project-context.d.ts +10 -0
- package/types/check-settlement/facts.d.ts +1 -1
- package/types/data-boundary/canonical-data.d.ts +28 -5
- package/types/data-boundary/canonical-json.d.ts +18 -1
- package/types/data-boundary/closed-values.d.ts +17 -1
- package/types/data-boundary/config-glob.d.ts +5 -0
- package/types/data-boundary/project-path.d.ts +4 -0
- package/types/index.d.ts +27 -11
- package/types/package-checks/check-authoring.d.ts +45 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
- package/types/package-checks/command-check/command-check.d.ts +48 -0
- package/types/package-checks/command-check/contract.d.ts +108 -0
- package/types/package-checks/command-check/execution.d.ts +7 -0
- package/types/package-checks/command-check/options.d.ts +11 -0
- package/types/package-checks/command-check/transcript.d.ts +8 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +4 -3
- package/types/package-checks/duplicate-detection/records.d.ts +1 -1
- package/types/package-checks/file-metrics/constructor.d.ts +5 -2
- package/types/package-checks/file-metrics/options.d.ts +4 -3
- package/types/package-checks/file-metrics/records.d.ts +1 -1
- package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
- package/types/package-checks/function-metrics/constructor.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
- package/types/package-checks/function-metrics/options.d.ts +4 -3
- package/types/package-checks/function-metrics/records.d.ts +1 -1
- package/types/package-checks/host-environment/git.d.ts +2 -0
- package/types/package-checks/host-environment/path.d.ts +1 -3
- package/types/package-checks/host-environment/process/contract.d.ts +17 -9
- package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-schema-validation/options.d.ts +2 -1
- package/types/package-checks/json-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-validation/options.d.ts +2 -1
- package/types/package-checks/local-cache-options.d.ts +9 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
- package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
- package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
- package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
- package/types/package-checks/markdown-lint/execution.d.ts +24 -0
- package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
- package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
- package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
- package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-lint/options.d.ts +65 -0
- package/types/package-checks/markdown-lint/records.d.ts +39 -0
- package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
- package/types/package-checks/secret-detection/default-check.d.ts +4 -1
- package/types/package-checks/secret-detection/options.d.ts +3 -2
- package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
- package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
- package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
- package/types/project-definition/check-tree/authoring.d.ts +5 -3
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
- package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
- package/types/project-definition/check-tree/resolution.d.ts +6 -4
- package/types/project-definition/declarative-snapshot.d.ts +4 -1
- package/types/project-definition/project-changes.d.ts +30 -0
- package/types/project-definition/project-definition.d.ts +15 -30
- package/types/project-definition/scheduler-policy.d.ts +3 -3
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
- package/types/project-run/aggregation.d.ts +8 -6
- package/types/project-run/changes/git.d.ts +14 -0
- package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +3 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
- package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
- package/types/project-run/check-execution/flag-controls.d.ts +1 -1
- package/types/project-run/check-execution/lifecycle.d.ts +9 -5
- package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
- package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
- package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
- package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
- package/types/project-run/check-execution/terminal-result.d.ts +13 -1
- package/types/project-run/completion/completion.d.ts +3 -1
- package/types/project-run/controls/contract.d.ts +6 -16
- package/types/project-run/invocation/candidates.d.ts +8 -0
- package/types/project-run/invocation/execution.d.ts +5 -0
- package/types/project-run/invocation/run.d.ts +2 -2
- package/types/project-run/outputs/status.d.ts +4 -4
- package/types/project-run/progress-rendering/presentation.d.ts +4 -3
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
- package/types/project-run/progress-rendering/renderer.d.ts +4 -2
- package/types/project-run/project-context.d.ts +3 -3
- package/types/project-run/result.d.ts +3 -3
- package/types/project-run/run.d.ts +1 -1
- package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
- package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
- package/dist/esm/check/finding-presentation.mjs.map +0 -1
- package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
- package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
- package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
- package/types/package-checks/project-files/config-glob.d.ts +0 -5
- /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
- /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
- /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
- /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
- /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
- /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
|
@@ -108,8 +108,11 @@ function inspectDirectSchemaPolicy(
|
|
|
108
108
|
): SchemaCompileReason | undefined {
|
|
109
109
|
if (Object.hasOwn(schemaObject, "$async")) return "invalid-schema";
|
|
110
110
|
if (hasUnsupportedReferenceKeyword(schemaObject)) return "unsupported-reference";
|
|
111
|
-
if (Object.hasOwn(schemaObject, "$id")
|
|
112
|
-
|
|
111
|
+
if (Object.hasOwn(schemaObject, "$id")) {
|
|
112
|
+
const identifier = schemaObject.$id;
|
|
113
|
+
if (identifier === undefined || !permittedNestedIdentifier(identifier)) {
|
|
114
|
+
return "unsupported-reference";
|
|
115
|
+
}
|
|
113
116
|
}
|
|
114
117
|
return hasInvalidReferenceValue(schemaObject) ? "unsupported-reference" : undefined;
|
|
115
118
|
}
|
|
@@ -123,9 +126,11 @@ function hasUnsupportedReferenceKeyword(
|
|
|
123
126
|
function hasInvalidReferenceValue(
|
|
124
127
|
schemaObject: Readonly<Record<string, StrictJsonValue>>
|
|
125
128
|
): boolean {
|
|
126
|
-
return ["$ref", "$schema"].some(
|
|
127
|
-
(
|
|
128
|
-
|
|
129
|
+
return ["$ref", "$schema"].some((key) => {
|
|
130
|
+
if (!Object.hasOwn(schemaObject, key)) return false;
|
|
131
|
+
const reference = schemaObject[key];
|
|
132
|
+
return reference === undefined || !permittedReference(reference);
|
|
133
|
+
});
|
|
129
134
|
}
|
|
130
135
|
|
|
131
136
|
function inspectNestedSchemaPolicies(
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { defineCheck, type TypedCheckWithOptions } from "../../check/check.ts";
|
|
2
|
+
import {
|
|
3
|
+
resolvePackageCheckAuthoringInput,
|
|
4
|
+
type PackageCheckIdentityInput
|
|
5
|
+
} from "../check-authoring.ts";
|
|
2
6
|
import { JSON_VALIDATION_CHECK_DEFINITION, executeJsonValidation } from "./json-validation.ts";
|
|
3
7
|
import { parseJsonValidationData } from "./final-data.ts";
|
|
4
8
|
import type { JsonValidationOptions, ResolvedJsonValidationOptions } from "./options.ts";
|
|
@@ -13,21 +17,38 @@ import { validJsonValidationOptions } from "./options-validation.ts";
|
|
|
13
17
|
* @throws {TypeError} input 含未知字段、非法文件选择或非法 byte limit 时抛出。
|
|
14
18
|
*/
|
|
15
19
|
export function jsonValidation(
|
|
16
|
-
options
|
|
20
|
+
options?: JsonValidationOptions<"json-validation">
|
|
17
21
|
): TypedCheckWithOptions<
|
|
18
22
|
"json-validation",
|
|
19
23
|
ResolvedJsonValidationOptions,
|
|
20
24
|
typeof parseJsonValidationData
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
>;
|
|
26
|
+
export function jsonValidation<const Id extends string>(
|
|
27
|
+
options: JsonValidationOptions<Id> & PackageCheckIdentityInput<Id>
|
|
28
|
+
): TypedCheckWithOptions<Id, ResolvedJsonValidationOptions, typeof parseJsonValidationData>;
|
|
29
|
+
export function jsonValidation(
|
|
30
|
+
options: JsonValidationOptions
|
|
31
|
+
): TypedCheckWithOptions<string, ResolvedJsonValidationOptions, typeof parseJsonValidationData>;
|
|
32
|
+
export function jsonValidation(
|
|
33
|
+
options: JsonValidationOptions = {}
|
|
34
|
+
): TypedCheckWithOptions<string, ResolvedJsonValidationOptions, typeof parseJsonValidationData> {
|
|
35
|
+
const input = resolvePackageCheckAuthoringInput(
|
|
36
|
+
options,
|
|
37
|
+
["files", "maximumBytes"],
|
|
38
|
+
JSON_VALIDATION_CHECK_DEFINITION
|
|
39
|
+
);
|
|
40
|
+
if (input === undefined) {
|
|
41
|
+
throw new TypeError("jsonValidation options must match the documented closed policy");
|
|
42
|
+
}
|
|
43
|
+
const resolvedOptions = resolveJsonValidationOptions(input.domainOptions);
|
|
23
44
|
if (resolvedOptions === undefined) {
|
|
24
45
|
throw new TypeError("jsonValidation options must match the documented closed policy");
|
|
25
46
|
}
|
|
26
47
|
return defineCheck({
|
|
27
|
-
...
|
|
28
|
-
|
|
48
|
+
...input.definition,
|
|
49
|
+
execute: executeJsonValidation,
|
|
29
50
|
parseData: parseJsonValidationData,
|
|
30
|
-
|
|
51
|
+
prepare: (preparedOptions) =>
|
|
31
52
|
validJsonValidationOptions(preparedOptions)
|
|
32
53
|
? { status: "success", preparedOptions }
|
|
33
54
|
: {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { PackageCheckAuthoringOptions } from "../check-authoring.ts";
|
|
1
2
|
import type {
|
|
2
3
|
ProjectFileSelection,
|
|
3
4
|
ProjectFileSelectionOptions
|
|
4
5
|
} from "../project-files/configuration.ts";
|
|
5
6
|
|
|
6
7
|
/** `jsonValidation(options?)` 接受的可省略 authoring policy。 */
|
|
7
|
-
export interface JsonValidationOptions
|
|
8
|
+
export interface JsonValidationOptions<
|
|
9
|
+
Id extends string = string
|
|
10
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
8
11
|
/** 参与本 Check 的 repository-file selection;省略字段使用 package defaults。 */
|
|
9
12
|
readonly files?: ProjectFileSelectionOptions;
|
|
10
13
|
/** 单个 JSON document 允许的最大 raw byte 数;省略时为 1 MiB。 */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
hasExactPlainRecordKeys,
|
|
5
|
+
snapshotClosedRecord,
|
|
6
|
+
snapshotExactClosedRecord
|
|
7
|
+
} from "../data-boundary/closed-values.ts";
|
|
8
|
+
|
|
9
|
+
/** Shared closed grammar for an explicitly owned, deletable local cache directory. */
|
|
10
|
+
export type LocalCacheOptions =
|
|
11
|
+
| Readonly<{ readonly enabled: false }>
|
|
12
|
+
| Readonly<{ readonly enabled: true; readonly directory: string }>;
|
|
13
|
+
|
|
14
|
+
export function resolveOptionalLocalCacheOptions(value: unknown): LocalCacheOptions | undefined {
|
|
15
|
+
if (value === undefined) return Object.freeze({ enabled: false as const });
|
|
16
|
+
const cache = snapshotClosedRecord(value);
|
|
17
|
+
if (cache === undefined) return undefined;
|
|
18
|
+
if (hasExactPlainRecordKeys(cache, ["enabled"]) && cache.enabled === false)
|
|
19
|
+
return Object.freeze({ enabled: false as const });
|
|
20
|
+
if (
|
|
21
|
+
hasExactPlainRecordKeys(cache, ["enabled", "directory"]) &&
|
|
22
|
+
cache.enabled === true &&
|
|
23
|
+
typeof cache.directory === "string"
|
|
24
|
+
)
|
|
25
|
+
return Object.freeze({ enabled: true as const, directory: cache.directory });
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function validLocalCacheOptions(value: unknown): value is LocalCacheOptions {
|
|
30
|
+
const disabled = snapshotExactClosedRecord(value, ["enabled"]);
|
|
31
|
+
if (disabled?.enabled === false) return true;
|
|
32
|
+
const enabled = snapshotExactClosedRecord(value, ["enabled", "directory"]);
|
|
33
|
+
return (
|
|
34
|
+
enabled?.enabled === true &&
|
|
35
|
+
typeof enabled.directory === "string" &&
|
|
36
|
+
enabled.directory.length > 0 &&
|
|
37
|
+
!enabled.directory.includes("\0") &&
|
|
38
|
+
isAbsolute(enabled.directory)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -4,6 +4,11 @@ import {
|
|
|
4
4
|
type CheckResult,
|
|
5
5
|
type TypedCheckWithOptions
|
|
6
6
|
} from "../../check/check.ts";
|
|
7
|
+
import {
|
|
8
|
+
resolvePackageCheckAuthoringInput,
|
|
9
|
+
type PackageCheckAuthoringOptions,
|
|
10
|
+
type PackageCheckIdentityInput
|
|
11
|
+
} from "../check-authoring.ts";
|
|
7
12
|
import {
|
|
8
13
|
MAINTENANCE_REMINDER_UNAVAILABLE_REASON,
|
|
9
14
|
parseMaintenanceRemindersData,
|
|
@@ -59,6 +64,14 @@ export interface MaintenanceReminderOptions {
|
|
|
59
64
|
}>;
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
/** `maintenanceReminders` 的对象式构造输入,组合提醒政策与项目 Check 声明。 */
|
|
68
|
+
export interface MaintenanceRemindersInput<
|
|
69
|
+
Id extends string = string
|
|
70
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
71
|
+
/** 保留作者声明顺序的提醒政策条目。 */
|
|
72
|
+
readonly entries: readonly MaintenanceReminder[];
|
|
73
|
+
}
|
|
74
|
+
|
|
62
75
|
/** `maintenance-reminders` whole-Check unavailable outcome 的稳定 reason code。 */
|
|
63
76
|
export type MaintenanceRemindersUnavailableCode =
|
|
64
77
|
(typeof WHOLE_CHECK_UNAVAILABLE_CODE)[keyof typeof WHOLE_CHECK_UNAVAILABLE_CODE];
|
|
@@ -93,9 +106,9 @@ export type ReminderMeasurement =
|
|
|
93
106
|
| Readonly<{ readonly kind: "succeeded"; readonly value: ReminderEvaluation }>;
|
|
94
107
|
|
|
95
108
|
/**
|
|
96
|
-
*
|
|
109
|
+
* 创建一个维护提醒普通 Check,并在其局部最终数据中评估多条维护提醒。
|
|
97
110
|
*
|
|
98
|
-
* @remarks
|
|
111
|
+
* @remarks 传入 entries 数组会保留默认 identity;对象输入可同时声明项目 Check 字段。构造函数补齐 Git 可执行文件、默认展示和直接执行逻辑,返回值仍是普通 Check,可按现有原生对象组合规则替换完整 `options` 分支。
|
|
99
112
|
* @example 创建一个单一 Check 的维护提醒
|
|
100
113
|
* ```ts
|
|
101
114
|
* import { defineConfig, maintenanceReminders, run } from "@zxyycom/vibe-check";
|
|
@@ -136,13 +149,55 @@ export function maintenanceReminders(
|
|
|
136
149
|
typeof MAINTENANCE_REMINDERS_CHECK_ID,
|
|
137
150
|
MaintenanceReminderOptions,
|
|
138
151
|
typeof parseMaintenanceRemindersData
|
|
139
|
-
|
|
152
|
+
>;
|
|
153
|
+
export function maintenanceReminders(
|
|
154
|
+
input: MaintenanceRemindersInput<typeof MAINTENANCE_REMINDERS_CHECK_ID>
|
|
155
|
+
): TypedCheckWithOptions<
|
|
156
|
+
typeof MAINTENANCE_REMINDERS_CHECK_ID,
|
|
157
|
+
MaintenanceReminderOptions,
|
|
158
|
+
typeof parseMaintenanceRemindersData
|
|
159
|
+
>;
|
|
160
|
+
export function maintenanceReminders<const Id extends string>(
|
|
161
|
+
input: MaintenanceRemindersInput<Id> & PackageCheckIdentityInput<Id>
|
|
162
|
+
): TypedCheckWithOptions<Id, MaintenanceReminderOptions, typeof parseMaintenanceRemindersData>;
|
|
163
|
+
export function maintenanceReminders(
|
|
164
|
+
input: MaintenanceRemindersInput
|
|
165
|
+
): TypedCheckWithOptions<string, MaintenanceReminderOptions, typeof parseMaintenanceRemindersData>;
|
|
166
|
+
export function maintenanceReminders(
|
|
167
|
+
input: readonly MaintenanceReminder[] | MaintenanceRemindersInput
|
|
168
|
+
): TypedCheckWithOptions<string, MaintenanceReminderOptions, typeof parseMaintenanceRemindersData> {
|
|
169
|
+
if (isMaintenanceReminderEntries(input)) {
|
|
170
|
+
return createMaintenanceRemindersCheck(
|
|
171
|
+
{
|
|
172
|
+
checkId: MAINTENANCE_REMINDERS_CHECK_ID,
|
|
173
|
+
displayName: "Maintenance reminders",
|
|
174
|
+
omitQuietPassedRow: true
|
|
175
|
+
},
|
|
176
|
+
input
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
const resolvedInput = resolveMaintenanceRemindersInput(input);
|
|
180
|
+
if (resolvedInput === undefined) {
|
|
181
|
+
throw new TypeError(
|
|
182
|
+
"maintenanceReminders input must be entries or a closed { entries, checkId?, displayName?, enabledByFlags?, checks?, dependsOn?, observes?, maxParallel?, admissionPriority?, mutex?, resourceClaims?, omitQuietPassedRow? } object"
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
return createMaintenanceRemindersCheck(resolvedInput.definition, resolvedInput.entries);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
type PackageCheckDefinition<Id extends string> = NonNullable<
|
|
189
|
+
ReturnType<typeof resolvePackageCheckAuthoringInput<Id>>
|
|
190
|
+
>["definition"];
|
|
191
|
+
|
|
192
|
+
function createMaintenanceRemindersCheck<Id extends string>(
|
|
193
|
+
definition: PackageCheckDefinition<Id>,
|
|
194
|
+
entries: readonly MaintenanceReminder[]
|
|
195
|
+
): TypedCheckWithOptions<Id, MaintenanceReminderOptions, typeof parseMaintenanceRemindersData> {
|
|
140
196
|
return defineCheck({
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
execution: executeMaintenanceReminders,
|
|
197
|
+
...definition,
|
|
198
|
+
execute: executeMaintenanceReminders,
|
|
144
199
|
parseData: parseMaintenanceRemindersData,
|
|
145
|
-
|
|
200
|
+
prepare: (options) =>
|
|
146
201
|
validMaintenanceReminderOptions(options)
|
|
147
202
|
? { status: "success", preparedOptions: options }
|
|
148
203
|
: {
|
|
@@ -161,9 +216,34 @@ export function maintenanceReminders(
|
|
|
161
216
|
options: {
|
|
162
217
|
entries,
|
|
163
218
|
git: { executable: "git" }
|
|
164
|
-
}
|
|
165
|
-
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function isMaintenanceReminderEntries(
|
|
224
|
+
input: readonly MaintenanceReminder[] | MaintenanceRemindersInput
|
|
225
|
+
): input is readonly MaintenanceReminder[] {
|
|
226
|
+
return Array.isArray(input);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function resolveMaintenanceRemindersInput<Id extends string>(
|
|
230
|
+
input: MaintenanceRemindersInput<Id>
|
|
231
|
+
):
|
|
232
|
+
| Readonly<{
|
|
233
|
+
readonly definition: PackageCheckDefinition<Id>;
|
|
234
|
+
readonly entries: readonly MaintenanceReminder[];
|
|
235
|
+
}>
|
|
236
|
+
| undefined {
|
|
237
|
+
const resolved = resolvePackageCheckAuthoringInput(input, ["entries"], {
|
|
238
|
+
checkId: MAINTENANCE_REMINDERS_CHECK_ID,
|
|
239
|
+
displayName: "Maintenance reminders",
|
|
240
|
+
omitQuietPassedRow: true
|
|
166
241
|
});
|
|
242
|
+
if (resolved === undefined) return undefined;
|
|
243
|
+
const entries = resolved.domainOptions.entries;
|
|
244
|
+
if (!Array.isArray(entries)) return undefined;
|
|
245
|
+
const reminderEntries: readonly MaintenanceReminder[] = entries;
|
|
246
|
+
return Object.freeze({ definition: resolved.definition, entries: reminderEntries });
|
|
167
247
|
}
|
|
168
248
|
|
|
169
249
|
/** 在普通对象组合后验证完整的选项形状。 */
|
|
@@ -51,9 +51,9 @@ export async function runGit(input: {
|
|
|
51
51
|
}
|
|
52
52
|
stdout += text;
|
|
53
53
|
});
|
|
54
|
-
child.once("error", () =>
|
|
55
|
-
settle(input.signal.aborted ? { kind: "cancelled" } : { kind: "failed" })
|
|
56
|
-
);
|
|
54
|
+
child.once("error", () => {
|
|
55
|
+
settle(input.signal.aborted ? { kind: "cancelled" } : { kind: "failed" });
|
|
56
|
+
});
|
|
57
57
|
child.once("close", (status) => {
|
|
58
58
|
if (input.signal.aborted) {
|
|
59
59
|
settle({ kind: "cancelled" });
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { defineCheck, type TypedCheckWithOptions } from "../../check/check.ts";
|
|
2
|
+
import {
|
|
3
|
+
resolvePackageCheckAuthoringInput,
|
|
4
|
+
type PackageCheckIdentityInput
|
|
5
|
+
} from "../check-authoring.ts";
|
|
2
6
|
import {
|
|
3
7
|
MARKDOWN_LINK_VALIDATION_CHECK_DEFINITION,
|
|
4
8
|
executeMarkdownLinkValidation
|
|
@@ -41,21 +45,60 @@ import { validMarkdownLinkValidationOptions } from "./options-validation.ts";
|
|
|
41
45
|
* ```
|
|
42
46
|
*/
|
|
43
47
|
export function markdownLinkValidation(
|
|
44
|
-
options
|
|
48
|
+
options?: MarkdownLinkValidationOptions<"markdown-link-validation">
|
|
45
49
|
): TypedCheckWithOptions<
|
|
46
50
|
"markdown-link-validation",
|
|
47
51
|
ResolvedMarkdownLinkValidationOptions,
|
|
48
52
|
typeof parseMarkdownLinkValidationData
|
|
53
|
+
>;
|
|
54
|
+
export function markdownLinkValidation<const Id extends string>(
|
|
55
|
+
options: MarkdownLinkValidationOptions<Id> & PackageCheckIdentityInput<Id>
|
|
56
|
+
): TypedCheckWithOptions<
|
|
57
|
+
Id,
|
|
58
|
+
ResolvedMarkdownLinkValidationOptions,
|
|
59
|
+
typeof parseMarkdownLinkValidationData
|
|
60
|
+
>;
|
|
61
|
+
export function markdownLinkValidation(
|
|
62
|
+
options: MarkdownLinkValidationOptions
|
|
63
|
+
): TypedCheckWithOptions<
|
|
64
|
+
string,
|
|
65
|
+
ResolvedMarkdownLinkValidationOptions,
|
|
66
|
+
typeof parseMarkdownLinkValidationData
|
|
67
|
+
>;
|
|
68
|
+
export function markdownLinkValidation(
|
|
69
|
+
options: MarkdownLinkValidationOptions = {}
|
|
70
|
+
): TypedCheckWithOptions<
|
|
71
|
+
string,
|
|
72
|
+
ResolvedMarkdownLinkValidationOptions,
|
|
73
|
+
typeof parseMarkdownLinkValidationData
|
|
49
74
|
> {
|
|
50
|
-
const
|
|
75
|
+
const input = resolvePackageCheckAuthoringInput(
|
|
76
|
+
options,
|
|
77
|
+
[
|
|
78
|
+
"files",
|
|
79
|
+
"findingPolicy",
|
|
80
|
+
"requireExistingTargets",
|
|
81
|
+
"validateSameDocumentAnchors",
|
|
82
|
+
"validateCrossDocumentAnchors",
|
|
83
|
+
"rootExternalTargetMode",
|
|
84
|
+
"requireNonEmptyDirectories",
|
|
85
|
+
"limits",
|
|
86
|
+
"cache"
|
|
87
|
+
],
|
|
88
|
+
MARKDOWN_LINK_VALIDATION_CHECK_DEFINITION
|
|
89
|
+
);
|
|
90
|
+
if (input === undefined) {
|
|
91
|
+
throw new TypeError("markdownLinkValidation options must match the documented closed policy");
|
|
92
|
+
}
|
|
93
|
+
const resolvedOptions = resolveMarkdownLinkValidationOptions(input.domainOptions);
|
|
51
94
|
if (resolvedOptions === undefined) {
|
|
52
95
|
throw new TypeError("markdownLinkValidation options must match the documented closed policy");
|
|
53
96
|
}
|
|
54
97
|
return defineCheck({
|
|
55
|
-
...
|
|
56
|
-
|
|
98
|
+
...input.definition,
|
|
99
|
+
execute: executeMarkdownLinkValidation,
|
|
57
100
|
parseData: parseMarkdownLinkValidationData,
|
|
58
|
-
|
|
101
|
+
prepare: (preparedOptions) =>
|
|
59
102
|
validMarkdownLinkValidationOptions(preparedOptions)
|
|
60
103
|
? { status: "success", preparedOptions }
|
|
61
104
|
: {
|
|
@@ -5,7 +5,7 @@ import type { CheckExecutionContext, CheckResult } from "../../check/check.ts";
|
|
|
5
5
|
import { collectProjectFiles } from "../project-files/collection.ts";
|
|
6
6
|
import type { ProjectFileSelection } from "../project-files/configuration.ts";
|
|
7
7
|
import { partitionProjectFilesByEligibility } from "../project-files/input-eligibility.ts";
|
|
8
|
-
import { appendCheckMessages } from "../../
|
|
8
|
+
import { appendCheckMessages } from "../../package-tools/finding-presentation/finding-presentation.ts";
|
|
9
9
|
import { createMarkdownLocalResolver, type MarkdownLocalResolver } from "./local-resolver.ts";
|
|
10
10
|
import type { MarkdownLinkValidationFinalData } from "./final-data.ts";
|
|
11
11
|
import { markdownFindingMessages } from "./finding-messages.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CheckMessage } from "../../check/check.ts";
|
|
2
|
-
import { presentCheckFindings } from "../../
|
|
2
|
+
import { presentCheckFindings } from "../../package-tools/finding-presentation/finding-presentation.ts";
|
|
3
3
|
import type { MarkdownLinkRecordCandidate } from "./records.ts";
|
|
4
4
|
|
|
5
5
|
const PRESENTED_FINDING_LIMIT = 10;
|
|
@@ -233,11 +233,7 @@ function isMarkdownAstNode(value: unknown): value is MarkdownAstNode {
|
|
|
233
233
|
function sourceRangeFromPosition(
|
|
234
234
|
position: MarkdownAstPosition | undefined
|
|
235
235
|
): MarkdownSourceRange | null {
|
|
236
|
-
if (
|
|
237
|
-
position === undefined ||
|
|
238
|
-
position.start.offset === undefined ||
|
|
239
|
-
position.end.offset === undefined
|
|
240
|
-
) {
|
|
236
|
+
if (position?.start.offset === undefined || position?.end.offset === undefined) {
|
|
241
237
|
return null;
|
|
242
238
|
}
|
|
243
239
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { canonicalizeJsonObject } from "../../data-boundary/canonical-data.ts";
|
|
2
2
|
import {
|
|
3
|
-
hasExactPlainRecordKeys,
|
|
4
3
|
hasRequiredAndOptionalRecordKeys,
|
|
5
4
|
snapshotClosedRecord
|
|
6
5
|
} from "../../data-boundary/closed-values.ts";
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
snapshotProjectFileSelection
|
|
11
10
|
} from "../project-files/configuration.ts";
|
|
12
11
|
import { DEFAULT_FINDING_POLICY, resolveFindingPolicy } from "../code-quality-findings/policy.ts";
|
|
12
|
+
import { resolveOptionalLocalCacheOptions } from "../local-cache-options.ts";
|
|
13
13
|
import type { ResolvedMarkdownLinkValidationOptions } from "./options.ts";
|
|
14
14
|
import { validMarkdownLinkValidationOptions } from "./options-validation.ts";
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ export function resolveMarkdownLinkValidationOptions(
|
|
|
33
33
|
const limits = resolvedLimits(input.limits);
|
|
34
34
|
const files = resolvedFiles(input.files);
|
|
35
35
|
const findingPolicy = resolveFindingPolicy(input.findingPolicy, DEFAULT_FINDING_POLICY);
|
|
36
|
-
const cache =
|
|
36
|
+
const cache = resolveOptionalLocalCacheOptions(input.cache);
|
|
37
37
|
if (
|
|
38
38
|
limits === undefined ||
|
|
39
39
|
files === undefined ||
|
|
@@ -94,23 +94,6 @@ function isMarkdownLinkValidationInput(
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
function resolvedCache(value: unknown): ResolvedMarkdownLinkValidationOptions["cache"] | undefined {
|
|
98
|
-
if (value === undefined) return Object.freeze({ enabled: false as const });
|
|
99
|
-
const cache = snapshotClosedRecord(value);
|
|
100
|
-
if (cache === undefined) return undefined;
|
|
101
|
-
if (hasExactPlainRecordKeys(cache, ["enabled"]) && cache.enabled === false) {
|
|
102
|
-
return Object.freeze({ enabled: false as const });
|
|
103
|
-
}
|
|
104
|
-
if (
|
|
105
|
-
hasExactPlainRecordKeys(cache, ["enabled", "directory"]) &&
|
|
106
|
-
cache.enabled === true &&
|
|
107
|
-
typeof cache.directory === "string"
|
|
108
|
-
) {
|
|
109
|
-
return Object.freeze({ enabled: true as const, directory: cache.directory });
|
|
110
|
-
}
|
|
111
|
-
return undefined;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
97
|
function resolvedFiles(value: unknown) {
|
|
115
98
|
return value === undefined
|
|
116
99
|
? snapshotProjectFileSelection(DEFAULT_FILES)
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { isAbsolute } from "node:path";
|
|
2
|
-
|
|
3
1
|
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
4
2
|
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
5
3
|
import { validProjectFileSelection } from "../project-files/configuration.ts";
|
|
6
4
|
import { validFindingPolicy } from "../code-quality-findings/policy.ts";
|
|
5
|
+
import { validLocalCacheOptions } from "../local-cache-options.ts";
|
|
7
6
|
import type { ResolvedMarkdownLinkValidationOptions } from "./options.ts";
|
|
8
7
|
|
|
9
8
|
function boundedPositiveSafeInteger(value: unknown, maximum: number): value is number {
|
|
@@ -32,25 +31,11 @@ function validOptionFields(options: Readonly<Record<string, unknown>>): boolean
|
|
|
32
31
|
validProjectFileSelection(options.files) &&
|
|
33
32
|
validFindingPolicy(options.findingPolicy) &&
|
|
34
33
|
validAnchorValidationOptions(options) &&
|
|
35
|
-
|
|
34
|
+
validLocalCacheOptions(options.cache) &&
|
|
36
35
|
validMarkdownLinkLimits(options.limits)
|
|
37
36
|
);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
function validMarkdownLinkCache(value: unknown): boolean {
|
|
41
|
-
const disabled = snapshotExactClosedRecord(value, ["enabled"]);
|
|
42
|
-
if (disabled !== undefined && disabled.enabled === false) return true;
|
|
43
|
-
const enabled = snapshotExactClosedRecord(value, ["enabled", "directory"]);
|
|
44
|
-
return (
|
|
45
|
-
enabled !== undefined &&
|
|
46
|
-
enabled.enabled === true &&
|
|
47
|
-
typeof enabled.directory === "string" &&
|
|
48
|
-
enabled.directory.length > 0 &&
|
|
49
|
-
!enabled.directory.includes("\0") &&
|
|
50
|
-
isAbsolute(enabled.directory)
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
39
|
function validAnchorValidationOptions(options: Readonly<Record<string, unknown>>): boolean {
|
|
55
40
|
return (
|
|
56
41
|
typeof options.requireExistingTargets === "boolean" &&
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
+
import type { PackageCheckAuthoringOptions } from "../check-authoring.ts";
|
|
1
2
|
import type {
|
|
2
3
|
ProjectFileSelection,
|
|
3
4
|
ProjectFileSelectionOptions
|
|
4
5
|
} from "../project-files/configuration.ts";
|
|
5
6
|
import type { FindingPolicy } from "../code-quality-findings/policy.ts";
|
|
7
|
+
import type { LocalCacheOptions } from "../local-cache-options.ts";
|
|
6
8
|
|
|
7
9
|
export type MarkdownRootExternalTargetMode = "ignore" | "report" | "validate";
|
|
8
10
|
|
|
9
11
|
/** 调用方显式拥有的 Link-private parse-facts local cache policy。 */
|
|
10
|
-
type MarkdownLinkValidationCacheOptions =
|
|
11
|
-
| Readonly<{ readonly enabled: false }>
|
|
12
|
-
| Readonly<{
|
|
13
|
-
readonly enabled: true;
|
|
14
|
-
readonly directory: string;
|
|
15
|
-
}>;
|
|
12
|
+
type MarkdownLinkValidationCacheOptions = LocalCacheOptions;
|
|
16
13
|
|
|
17
14
|
/** 可省略的 Markdown validation work limits。 */
|
|
18
15
|
export interface MarkdownLinkValidationLimitOptions {
|
|
@@ -22,7 +19,9 @@ export interface MarkdownLinkValidationLimitOptions {
|
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
/** `markdownLinkValidation(options?)` 接受的可省略 authoring policy。 */
|
|
25
|
-
export interface MarkdownLinkValidationOptions
|
|
22
|
+
export interface MarkdownLinkValidationOptions<
|
|
23
|
+
Id extends string = string
|
|
24
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
26
25
|
/** 参与本 Check 的 Markdown source selection;省略字段使用 package defaults。 */
|
|
27
26
|
readonly files?: ProjectFileSelectionOptions;
|
|
28
27
|
/** local-reference finding 是否使本 Check failed;省略时为 non-blocking。 */
|
|
@@ -111,11 +111,10 @@ function isCurrentCacheEnvelope(
|
|
|
111
111
|
readonly payload: unknown;
|
|
112
112
|
}> {
|
|
113
113
|
return (
|
|
114
|
-
envelope
|
|
115
|
-
envelope
|
|
116
|
-
|
|
117
|
-
envelope
|
|
118
|
-
envelope.payloadVersion === CACHE_PAYLOAD_VERSION
|
|
114
|
+
envelope?.cacheFormatVersion === CACHE_FORMAT_VERSION &&
|
|
115
|
+
validIdentityDigest(envelope?.identityDigest) &&
|
|
116
|
+
envelope?.parserContractVersion === MARKDOWN_LINK_PARSE_FACTS_PARSER_CONTRACT_VERSION &&
|
|
117
|
+
envelope?.payloadVersion === CACHE_PAYLOAD_VERSION
|
|
119
118
|
);
|
|
120
119
|
}
|
|
121
120
|
|