@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
|
@@ -60,7 +60,9 @@ class TTCNStates extends CLikeStates {
|
|
|
60
60
|
this.context.restartNewFunction("");
|
|
61
61
|
} else if (token === "control") {
|
|
62
62
|
this.context.restartNewFunction("__control__");
|
|
63
|
-
this.next((currentToken) =>
|
|
63
|
+
this.next((currentToken) => {
|
|
64
|
+
this._state_dec_to_imp(currentToken);
|
|
65
|
+
});
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -68,7 +70,9 @@ class TTCNStates extends CLikeStates {
|
|
|
68
70
|
if (isAlphabetic(token)) {
|
|
69
71
|
this.context.addToFunctionName(token);
|
|
70
72
|
} else if (token === "(") {
|
|
71
|
-
this.next((currentToken) =>
|
|
73
|
+
this.next((currentToken) => {
|
|
74
|
+
this._state_dec(currentToken);
|
|
75
|
+
}, token);
|
|
72
76
|
} else if (token === "@deterministic") {
|
|
73
77
|
this.context.addToLongFunctionName(`${token} `);
|
|
74
78
|
} else {
|
|
@@ -78,7 +82,9 @@ class TTCNStates extends CLikeStates {
|
|
|
78
82
|
|
|
79
83
|
protected override _state_dec_to_imp(token: string): void {
|
|
80
84
|
if (token === "{") {
|
|
81
|
-
this.next((currentToken) =>
|
|
85
|
+
this.next((currentToken) => {
|
|
86
|
+
this._state_imp(currentToken);
|
|
87
|
+
}, "{");
|
|
82
88
|
} else {
|
|
83
89
|
this.context.addToLongFunctionName(` ${token}`);
|
|
84
90
|
}
|
|
@@ -567,15 +567,21 @@ class TypeScriptTypeAnnotationStates extends CodeStateMachine {
|
|
|
567
567
|
};
|
|
568
568
|
|
|
569
569
|
private readonly _inline_type_annotation = (token: string): void => {
|
|
570
|
-
this.readInsideBracketsThen("{}", token, () =>
|
|
570
|
+
this.readInsideBracketsThen("{}", token, () => {
|
|
571
|
+
this.returnFromState();
|
|
572
|
+
});
|
|
571
573
|
};
|
|
572
574
|
|
|
573
575
|
private readonly _state_generic_type = (token: string): void => {
|
|
574
|
-
this.readInsideBracketsThen("<>", token, () =>
|
|
576
|
+
this.readInsideBracketsThen("<>", token, () => {
|
|
577
|
+
this.returnFromState();
|
|
578
|
+
});
|
|
575
579
|
};
|
|
576
580
|
|
|
577
581
|
private readonly _function_type_annotation = (token: string): void => {
|
|
578
|
-
this.readInsideBracketsThen("()", token, () =>
|
|
582
|
+
this.readInsideBracketsThen("()", token, () => {
|
|
583
|
+
this.returnFromState();
|
|
584
|
+
});
|
|
579
585
|
};
|
|
580
586
|
}
|
|
581
587
|
|
|
@@ -30,6 +30,7 @@ export class ZigReader extends CodeReader {
|
|
|
30
30
|
class ZigStates extends GoLikeStates {
|
|
31
31
|
protected static override readonly FUNC_KEYWORD = "fn";
|
|
32
32
|
|
|
33
|
-
protected override readonly _type_definition = (token: string): void =>
|
|
33
|
+
protected override readonly _type_definition = (token: string): void => {
|
|
34
34
|
super._state_global(token);
|
|
35
|
+
};
|
|
35
36
|
}
|
|
@@ -110,7 +110,9 @@ export class CodeStateMachine {
|
|
|
110
110
|
protected readUntilTokens: string[] = [];
|
|
111
111
|
protected bracketCount = 0;
|
|
112
112
|
protected readonly stateMachineConstructor: typeof CodeStateMachine;
|
|
113
|
-
protected readonly globalState: StateHandler = (token) =>
|
|
113
|
+
protected readonly globalState: StateHandler = (token) => {
|
|
114
|
+
this._state_global(token);
|
|
115
|
+
};
|
|
114
116
|
|
|
115
117
|
public constructor(context: FileInfoBuilder) {
|
|
116
118
|
this.stateMachineConstructor = new.target;
|
|
@@ -43,15 +43,20 @@ export function js_style_regex_expression(generator: TokenGenerator): TokenGener
|
|
|
43
43
|
if (isRegex) {
|
|
44
44
|
const regexTokens = [token];
|
|
45
45
|
index += 1;
|
|
46
|
-
while (index < tokens.length
|
|
47
|
-
|
|
46
|
+
while (index < tokens.length) {
|
|
47
|
+
const nextToken = tokens[index];
|
|
48
|
+
if (nextToken === undefined || nextToken.endsWith("/")) break;
|
|
49
|
+
regexTokens.push(nextToken);
|
|
48
50
|
index += 1;
|
|
49
51
|
}
|
|
50
52
|
if (index < tokens.length) {
|
|
51
|
-
|
|
53
|
+
const closingToken = tokens[index];
|
|
54
|
+
if (closingToken === undefined) break;
|
|
55
|
+
regexTokens.push(closingToken);
|
|
52
56
|
index += 1;
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
const flags = tokens[index];
|
|
58
|
+
if (flags !== undefined && /^[igm]+$/u.test(flags)) {
|
|
59
|
+
regexTokens.push(flags);
|
|
55
60
|
index += 1;
|
|
56
61
|
}
|
|
57
62
|
}
|
|
@@ -28,7 +28,9 @@ export interface FunctionMetricsWorkerPort {
|
|
|
28
28
|
export function createNodeFunctionMetricsWorker(): FunctionMetricsWorkerPort {
|
|
29
29
|
const worker = new Worker(new URL("./analyzer-worker.ts", import.meta.url));
|
|
30
30
|
return Object.freeze({
|
|
31
|
-
postMessage: (value: unknown): void =>
|
|
31
|
+
postMessage: (value: unknown): void => {
|
|
32
|
+
worker.postMessage(value);
|
|
33
|
+
},
|
|
32
34
|
subscribe: (listeners: Parameters<FunctionMetricsWorkerPort["subscribe"]>[0]): (() => void) => {
|
|
33
35
|
worker.once("message", listeners.message);
|
|
34
36
|
worker.once("error", listeners.error);
|
|
@@ -69,17 +71,29 @@ export async function analyzeAdmittedSources(
|
|
|
69
71
|
worker.terminate();
|
|
70
72
|
resolveResult(result);
|
|
71
73
|
};
|
|
72
|
-
const cancelled = (): void =>
|
|
74
|
+
const cancelled = (): void => {
|
|
75
|
+
finish(Object.freeze({ kind: "cancelled" }));
|
|
76
|
+
};
|
|
73
77
|
unsubscribe = worker.subscribe({
|
|
74
|
-
error: () =>
|
|
75
|
-
|
|
78
|
+
error: () => {
|
|
79
|
+
finish(Object.freeze({ kind: "analysis-failed" }));
|
|
80
|
+
},
|
|
81
|
+
exit: () => {
|
|
82
|
+
finish(Object.freeze({ kind: "analysis-failed" }));
|
|
83
|
+
},
|
|
76
84
|
message: (value: unknown): void => {
|
|
77
|
-
if (signal.aborted)
|
|
85
|
+
if (signal.aborted) {
|
|
86
|
+
cancelled();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
78
89
|
finish(parseWorkerResponse(value, approvedExactPaths));
|
|
79
90
|
}
|
|
80
91
|
});
|
|
81
92
|
signal.addEventListener("abort", cancelled, { once: true });
|
|
82
|
-
if (signal.aborted)
|
|
93
|
+
if (signal.aborted) {
|
|
94
|
+
cancelled();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
83
97
|
try {
|
|
84
98
|
worker.postMessage(request);
|
|
85
99
|
} catch {
|
|
@@ -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 { executeFunctionMetrics } from "./execution.ts";
|
|
3
7
|
import { parseFunctionMetricsData } from "./final-data.ts";
|
|
4
8
|
import type { FunctionMetricsOptions, ResolvedFunctionMetricsOptions } from "./options.ts";
|
|
@@ -14,27 +18,46 @@ const FUNCTION_METRICS_CHECK_DEFINITION = {
|
|
|
14
18
|
* 使用可省略的区域、阈值与 finding policy 构造一个完整 function-metrics Check。
|
|
15
19
|
*
|
|
16
20
|
* @param options - 省略字段由 package 补齐;显式 files 数组完整替换对应字段的默认数组。
|
|
17
|
-
* @returns 固定 `function-metrics` identity、完整冻结 options、
|
|
21
|
+
* @returns 固定 `function-metrics` identity、完整冻结 options、preparation 与 execution。
|
|
18
22
|
* @throws {TypeError} input 含未知字段、空 area、非法 finding policy/waiver 或非法 limit 时抛出。
|
|
19
23
|
*/
|
|
20
24
|
export function functionMetrics(
|
|
21
|
-
options
|
|
25
|
+
options?: FunctionMetricsOptions<"function-metrics">
|
|
22
26
|
): TypedCheckWithOptions<
|
|
23
27
|
"function-metrics",
|
|
24
28
|
ResolvedFunctionMetricsOptions,
|
|
25
29
|
typeof parseFunctionMetricsData
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
>;
|
|
31
|
+
export function functionMetrics<const Id extends string>(
|
|
32
|
+
options: FunctionMetricsOptions<Id> & PackageCheckIdentityInput<Id>
|
|
33
|
+
): TypedCheckWithOptions<Id, ResolvedFunctionMetricsOptions, typeof parseFunctionMetricsData>;
|
|
34
|
+
export function functionMetrics(
|
|
35
|
+
options: FunctionMetricsOptions
|
|
36
|
+
): TypedCheckWithOptions<string, ResolvedFunctionMetricsOptions, typeof parseFunctionMetricsData>;
|
|
37
|
+
export function functionMetrics(
|
|
38
|
+
options: FunctionMetricsOptions = {}
|
|
39
|
+
): TypedCheckWithOptions<string, ResolvedFunctionMetricsOptions, typeof parseFunctionMetricsData> {
|
|
40
|
+
const input = resolvePackageCheckAuthoringInput(
|
|
41
|
+
options,
|
|
42
|
+
["codeAreas", "findingPolicy", "findingWaivers"],
|
|
43
|
+
FUNCTION_METRICS_CHECK_DEFINITION
|
|
44
|
+
);
|
|
45
|
+
if (input === undefined) {
|
|
46
|
+
throw new TypeError(
|
|
47
|
+
"functionMetrics options must use the documented closed policy: a non-empty area map, recognized finding policies and waivers, and positive safe-integer limits"
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const resolvedOptions = resolveFunctionMetricsOptions(input.domainOptions);
|
|
28
51
|
if (resolvedOptions === undefined) {
|
|
29
52
|
throw new TypeError(
|
|
30
53
|
"functionMetrics options must use the documented closed policy: a non-empty area map, recognized finding policies and waivers, and positive safe-integer limits"
|
|
31
54
|
);
|
|
32
55
|
}
|
|
33
56
|
return defineCheck({
|
|
34
|
-
...
|
|
35
|
-
|
|
57
|
+
...input.definition,
|
|
58
|
+
execute: executeFunctionMetrics,
|
|
36
59
|
parseData: parseFunctionMetricsData,
|
|
37
|
-
|
|
60
|
+
prepare: (preparedOptions) =>
|
|
38
61
|
validResolvedFunctionMetricsOptions(preparedOptions)
|
|
39
62
|
? { status: "success", preparedOptions }
|
|
40
63
|
: {
|
|
@@ -2,7 +2,7 @@ import type { CheckExecutionContext, CheckMessage, CheckResult } from "../../che
|
|
|
2
2
|
import {
|
|
3
3
|
reconcileFindingWaivers,
|
|
4
4
|
type FindingWaiverReconciliation
|
|
5
|
-
} from "../../finding-waivers/reconciliation.ts";
|
|
5
|
+
} from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
6
6
|
import { collectProjectFileSets, requireProjectFileSet } from "../project-files/collection.ts";
|
|
7
7
|
import { partitionProjectFilesByEligibility } from "../project-files/input-eligibility.ts";
|
|
8
8
|
import { settleFindings } from "../code-quality-findings/policy.ts";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
reportFindingWaiverAudits,
|
|
11
11
|
reportReconciledCodeQualityFindingRecords
|
|
12
12
|
} from "../code-quality-findings/finding-waiver-evidence.ts";
|
|
13
|
-
import { appendCheckMessages } from "../../
|
|
13
|
+
import { appendCheckMessages } from "../../package-tools/finding-presentation/finding-presentation.ts";
|
|
14
14
|
import { functionFindingMessages, functionWaiverMessages } from "./finding-messages.ts";
|
|
15
15
|
import { analyzeFunctionMetrics } from "./analysis.ts";
|
|
16
16
|
import {
|
|
@@ -276,8 +276,6 @@ function directMeasurementFailure(
|
|
|
276
276
|
case "source-unavailable":
|
|
277
277
|
return unavailable("source-unavailable");
|
|
278
278
|
}
|
|
279
|
-
const exhaustiveMeasurement: never = measurement;
|
|
280
|
-
return exhaustiveMeasurement;
|
|
281
279
|
}
|
|
282
280
|
|
|
283
281
|
function unavailable(
|
|
@@ -1,9 +1,9 @@
|
|
|
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 {
|
|
4
4
|
FindingWaiverAudit,
|
|
5
5
|
FindingWaiverReconciliation
|
|
6
|
-
} from "../../finding-waivers/reconciliation.ts";
|
|
6
|
+
} from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
7
7
|
import {
|
|
8
8
|
functionMetricsWaiverIdentity,
|
|
9
9
|
type FunctionInputRejectedCandidate,
|
|
@@ -130,7 +130,9 @@ async function readBoundedSource(
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
function yieldAdmissionToTimer(): Promise<void> {
|
|
133
|
-
return new Promise<void>((resolveYield) =>
|
|
133
|
+
return new Promise<void>((resolveYield) => {
|
|
134
|
+
setTimeout(resolveYield, 0);
|
|
135
|
+
});
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
/**
|
|
@@ -1,9 +1,10 @@
|
|
|
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";
|
|
6
|
-
import type { FindingWaiver } from "../../finding-waivers/reconciliation.ts";
|
|
7
|
+
import type { FindingWaiver } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
7
8
|
|
|
8
9
|
/** `functionMetrics` 构造函数可省略的文件选择策略。 */
|
|
9
10
|
export type FunctionMetricsFileOptions = ProjectFileSelectionOptions;
|
|
@@ -65,7 +66,9 @@ export interface FunctionMetricsFindingIdentity {
|
|
|
65
66
|
export type FunctionMetricsFindingWaiver = FindingWaiver<FunctionMetricsFindingIdentity>;
|
|
66
67
|
|
|
67
68
|
/** `functionMetrics(options?)` 接受并补齐默认值的公开策略。 */
|
|
68
|
-
export interface FunctionMetricsOptions
|
|
69
|
+
export interface FunctionMetricsOptions<
|
|
70
|
+
Id extends string = string
|
|
71
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
69
72
|
/** 省略时建立默认 `project` 区域;显式映射必须非空,且每个区域必须声明 `files`。 */
|
|
70
73
|
readonly codeAreas?: Readonly<Record<string, FunctionMetricsCodeAreaOptions>>;
|
|
71
74
|
/** 省略时为 `non-blocking`;区域可局部覆盖。 */
|
|
@@ -74,7 +77,7 @@ export interface FunctionMetricsOptions {
|
|
|
74
77
|
readonly findingWaivers?: readonly FunctionMetricsFindingWaiver[];
|
|
75
78
|
}
|
|
76
79
|
|
|
77
|
-
/** 构造函数生成并由 Check
|
|
80
|
+
/** 构造函数生成并由 Check preparation/execution 消费的完整 options。 */
|
|
78
81
|
export interface ResolvedFunctionMetricsOptions {
|
|
79
82
|
readonly codeAreas: Readonly<Record<string, ResolvedFunctionMetricsCodeAreaOptions>>;
|
|
80
83
|
readonly findingWaivers: readonly FunctionMetricsFindingWaiver[];
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
type FunctionMetricAnalysis,
|
|
4
4
|
type FunctionMetricInstance
|
|
5
5
|
} from "./analysis.ts";
|
|
6
|
-
import type { MaterializedFindingWaiver } from "../../finding-waivers/reconciliation.ts";
|
|
6
|
+
import type { MaterializedFindingWaiver } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
7
7
|
import { isBlockingFinding } from "../code-quality-findings/policy.ts";
|
|
8
8
|
import {
|
|
9
9
|
buildHashedFindingWaiverAuditRecord,
|
|
@@ -17,6 +17,17 @@ export function runGit(options: RunGitOptions): ProcessResult {
|
|
|
17
17
|
return runProcessSync({ command: "git", ...options });
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/** Renders the actionable failure evidence shared by Git operation boundaries. */
|
|
21
|
+
export function gitFailureDetail(result: ProcessResult): string {
|
|
22
|
+
const stderr = result.stderr.trim();
|
|
23
|
+
if (stderr.length > 0) return stderr;
|
|
24
|
+
const processErrorMessage = result.error?.message;
|
|
25
|
+
if (processErrorMessage !== undefined && processErrorMessage.length > 0) {
|
|
26
|
+
return processErrorMessage;
|
|
27
|
+
}
|
|
28
|
+
return result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`;
|
|
29
|
+
}
|
|
30
|
+
|
|
20
31
|
export function gitHeadSha(cwd: string): string | null {
|
|
21
32
|
const result = runGit({ args: ["rev-parse", "HEAD"], cwd });
|
|
22
33
|
if (processFailed(result)) return null;
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
return filePath.replace(/\\/g, "/");
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/** 判断值是否已是跨平台可稳定发布的 project-root-relative slash path。 */
|
|
6
|
-
export function isNormalizedProjectRelativePath(value: unknown): value is string {
|
|
7
|
-
if (
|
|
8
|
-
typeof value !== "string" ||
|
|
9
|
-
value.length === 0 ||
|
|
10
|
-
value.startsWith("/") ||
|
|
11
|
-
value.includes("\\") ||
|
|
12
|
-
value.includes("\u0000") ||
|
|
13
|
-
/^[A-Za-z]:/u.test(value)
|
|
14
|
-
) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return value
|
|
18
|
-
.split("/")
|
|
19
|
-
.every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
20
|
-
}
|
|
1
|
+
export { isNormalizedProjectRelativePath, toSlashPath } from "../../data-boundary/project-path.ts";
|
|
@@ -12,9 +12,12 @@ export interface ProcessFailure extends Error {
|
|
|
12
12
|
|
|
13
13
|
export type ProcessResult = {
|
|
14
14
|
readonly error?: Error;
|
|
15
|
+
readonly isCanceled?: true;
|
|
16
|
+
readonly isMaxBuffer?: true;
|
|
15
17
|
readonly signal: NodeJS.Signals | null;
|
|
16
18
|
readonly status: number | null;
|
|
17
19
|
readonly stderr: string;
|
|
20
|
+
readonly timedOut?: true;
|
|
18
21
|
readonly stdout: string;
|
|
19
22
|
};
|
|
20
23
|
|
|
@@ -32,8 +35,11 @@ export type RunProcessSyncOptions = {
|
|
|
32
35
|
|
|
33
36
|
export type RunProcessOptions = {
|
|
34
37
|
readonly args?: readonly string[];
|
|
38
|
+
readonly cancelSignal?: AbortSignal;
|
|
35
39
|
readonly command: string;
|
|
36
40
|
readonly cwd?: string | URL;
|
|
41
|
+
/** `false` uses only the supplied `env`; omission preserves Execa's inherited default. */
|
|
42
|
+
readonly extendEnv?: boolean;
|
|
37
43
|
readonly env?: NodeJS.ProcessEnv;
|
|
38
44
|
readonly label?: string;
|
|
39
45
|
readonly maxBuffer?: number;
|
|
@@ -42,15 +48,17 @@ export type RunProcessOptions = {
|
|
|
42
48
|
};
|
|
43
49
|
|
|
44
50
|
export type ExecaResultLike = {
|
|
45
|
-
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
51
|
+
/** Execa's imported result types permit explicitly present `undefined` values. */
|
|
52
|
+
readonly code?: string | undefined;
|
|
53
|
+
readonly exitCode?: number | undefined;
|
|
54
|
+
readonly failed?: boolean | undefined;
|
|
55
|
+
readonly isCanceled?: boolean | undefined;
|
|
56
|
+
readonly isMaxBuffer?: boolean | undefined;
|
|
57
|
+
readonly message?: string | undefined;
|
|
58
|
+
readonly originalMessage?: string | undefined;
|
|
59
|
+
readonly shortMessage?: string | undefined;
|
|
60
|
+
readonly signal?: NodeJS.Signals | undefined;
|
|
53
61
|
readonly stderr?: unknown;
|
|
54
62
|
readonly stdout?: unknown;
|
|
55
|
-
readonly timedOut?: boolean;
|
|
63
|
+
readonly timedOut?: boolean | undefined;
|
|
56
64
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { ExecaResultLike, ProcessResult } from "./contract.ts";
|
|
2
2
|
|
|
3
3
|
export function toProcessResult(result: ExecaResultLike, label: string): ProcessResult {
|
|
4
|
+
const cause = processCause(result);
|
|
5
|
+
const error = processErrorFor(result, label, cause);
|
|
4
6
|
return {
|
|
5
|
-
error:
|
|
7
|
+
...(error === undefined ? {} : { error }),
|
|
8
|
+
...(cause === "cancellation" ? { isCanceled: true as const } : {}),
|
|
9
|
+
...(cause === "max-buffer" ? { isMaxBuffer: true as const } : {}),
|
|
6
10
|
signal: result.signal ?? null,
|
|
7
11
|
status: result.exitCode ?? null,
|
|
8
12
|
stderr: outputString(result.stderr),
|
|
13
|
+
...(cause === "timeout" ? { timedOut: true as const } : {}),
|
|
9
14
|
stdout: outputString(result.stdout)
|
|
10
15
|
};
|
|
11
16
|
}
|
|
@@ -14,26 +19,49 @@ function outputString(output: unknown): string {
|
|
|
14
19
|
return typeof output === "string" ? output : "";
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
type ProcessCause =
|
|
23
|
+
| "cancellation"
|
|
24
|
+
| "exit"
|
|
25
|
+
| "max-buffer"
|
|
26
|
+
| "signal"
|
|
27
|
+
| "startup-failure"
|
|
28
|
+
| "timeout";
|
|
29
|
+
|
|
30
|
+
function processCause(result: ExecaResultLike): ProcessCause {
|
|
31
|
+
if (typeof result.exitCode === "number" && result.exitCode !== 0) return "exit";
|
|
32
|
+
if (result.isCanceled === true) return "cancellation";
|
|
33
|
+
if (result.timedOut === true) return "timeout";
|
|
34
|
+
if (result.isMaxBuffer === true) return "max-buffer";
|
|
35
|
+
if (result.signal !== undefined) return "signal";
|
|
36
|
+
if (result.exitCode === 0) return "exit";
|
|
37
|
+
return "startup-failure";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function processErrorFor(
|
|
41
|
+
result: ExecaResultLike,
|
|
42
|
+
label: string,
|
|
43
|
+
cause: ProcessCause
|
|
44
|
+
): Error | undefined {
|
|
45
|
+
if (!requiresProcessError(cause, result)) return undefined;
|
|
46
|
+
|
|
47
|
+
const error: NodeJS.ErrnoException = new Error(processErrorMessage(result, label));
|
|
48
|
+
const code = processErrorCode(result);
|
|
49
|
+
if (code !== undefined) error.code = code;
|
|
28
50
|
return error;
|
|
29
51
|
}
|
|
30
52
|
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
function requiresProcessError(cause: ProcessCause, result: ExecaResultLike): boolean {
|
|
54
|
+
return cause !== "exit" && result.failed === true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function processErrorMessage(result: ExecaResultLike, label: string): string {
|
|
58
|
+
if (result.originalMessage !== undefined) return result.originalMessage;
|
|
59
|
+
if (result.shortMessage !== undefined) return result.shortMessage;
|
|
60
|
+
if (result.message !== undefined) return result.message;
|
|
61
|
+
return `${label} failed`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function processErrorCode(result: ExecaResultLike): string | undefined {
|
|
65
|
+
if (result.code === undefined || result.code.length === 0) return undefined;
|
|
66
|
+
return result.code;
|
|
39
67
|
}
|
|
@@ -14,7 +14,7 @@ export function runProcessSync(options: RunProcessSyncOptions): ProcessResult {
|
|
|
14
14
|
const result = execaSync(command, args, {
|
|
15
15
|
...processOptions,
|
|
16
16
|
encoding: processOptions.encoding ?? "utf8",
|
|
17
|
-
env: plainTextProcessEnv({ env: processOptions.env }),
|
|
17
|
+
env: plainTextProcessEnv(processOptions.env === undefined ? {} : { env: processOptions.env }),
|
|
18
18
|
maxBuffer: processOptions.maxBuffer ?? DEFAULT_PROCESS_MAX_BUFFER_BYTES,
|
|
19
19
|
reject: false,
|
|
20
20
|
stripFinalNewline: false,
|
|
@@ -26,9 +26,11 @@ export function runProcessSync(options: RunProcessSyncOptions): ProcessResult {
|
|
|
26
26
|
export function runProcess(options: RunProcessOptions): Promise<ProcessResult> {
|
|
27
27
|
const {
|
|
28
28
|
args = [],
|
|
29
|
+
cancelSignal,
|
|
29
30
|
command,
|
|
30
31
|
cwd,
|
|
31
32
|
env,
|
|
33
|
+
extendEnv,
|
|
32
34
|
label = command,
|
|
33
35
|
maxBuffer = DEFAULT_PROCESS_MAX_BUFFER_BYTES,
|
|
34
36
|
timeout,
|
|
@@ -36,12 +38,14 @@ export function runProcess(options: RunProcessOptions): Promise<ProcessResult> {
|
|
|
36
38
|
} = options;
|
|
37
39
|
|
|
38
40
|
return execa(command, args, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
...(cancelSignal === undefined ? {} : { cancelSignal }),
|
|
42
|
+
...(cwd === undefined ? {} : { cwd }),
|
|
43
|
+
...(extendEnv === undefined ? {} : { extendEnv }),
|
|
44
|
+
env: plainTextProcessEnv(env === undefined ? {} : { env }),
|
|
41
45
|
maxBuffer,
|
|
42
46
|
reject: false,
|
|
43
47
|
stripFinalNewline: false,
|
|
44
|
-
timeout,
|
|
48
|
+
...(timeout === undefined ? {} : { timeout }),
|
|
45
49
|
windowsHide
|
|
46
50
|
}).then((result) => toProcessResult(result, label));
|
|
47
51
|
}
|
|
@@ -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
|
JSON_SCHEMA_VALIDATION_CHECK_DEFINITION,
|
|
4
8
|
executeJsonSchemaValidation
|
|
@@ -19,21 +23,50 @@ import { validJsonSchemaValidationOptions } from "./options-validation.ts";
|
|
|
19
23
|
* @throws {TypeError} input 不符合 closed authoring policy、identity 或 binding 不变量时抛出。
|
|
20
24
|
*/
|
|
21
25
|
export function jsonSchemaValidation(
|
|
22
|
-
options
|
|
26
|
+
options?: JsonSchemaValidationOptions<"json-schema-validation">
|
|
23
27
|
): TypedCheckWithOptions<
|
|
24
28
|
"json-schema-validation",
|
|
25
29
|
ResolvedJsonSchemaValidationOptions,
|
|
26
30
|
typeof parseJsonSchemaValidationData
|
|
31
|
+
>;
|
|
32
|
+
export function jsonSchemaValidation<const Id extends string>(
|
|
33
|
+
options: JsonSchemaValidationOptions<Id> & PackageCheckIdentityInput<Id>
|
|
34
|
+
): TypedCheckWithOptions<
|
|
35
|
+
Id,
|
|
36
|
+
ResolvedJsonSchemaValidationOptions,
|
|
37
|
+
typeof parseJsonSchemaValidationData
|
|
38
|
+
>;
|
|
39
|
+
export function jsonSchemaValidation(
|
|
40
|
+
options: JsonSchemaValidationOptions
|
|
41
|
+
): TypedCheckWithOptions<
|
|
42
|
+
string,
|
|
43
|
+
ResolvedJsonSchemaValidationOptions,
|
|
44
|
+
typeof parseJsonSchemaValidationData
|
|
45
|
+
>;
|
|
46
|
+
export function jsonSchemaValidation(
|
|
47
|
+
options: JsonSchemaValidationOptions = {}
|
|
48
|
+
): TypedCheckWithOptions<
|
|
49
|
+
string,
|
|
50
|
+
ResolvedJsonSchemaValidationOptions,
|
|
51
|
+
typeof parseJsonSchemaValidationData
|
|
27
52
|
> {
|
|
28
|
-
const
|
|
53
|
+
const input = resolvePackageCheckAuthoringInput(
|
|
54
|
+
options,
|
|
55
|
+
["files", "maximumBytes", "schemaIdentity", "referenceResolution", "schemas", "bindings"],
|
|
56
|
+
JSON_SCHEMA_VALIDATION_CHECK_DEFINITION
|
|
57
|
+
);
|
|
58
|
+
if (input === undefined) {
|
|
59
|
+
throw new TypeError("jsonSchemaValidation options must match the documented closed policy");
|
|
60
|
+
}
|
|
61
|
+
const resolvedOptions = resolveJsonSchemaValidationOptions(input.domainOptions);
|
|
29
62
|
if (resolvedOptions === undefined) {
|
|
30
63
|
throw new TypeError("jsonSchemaValidation options must match the documented closed policy");
|
|
31
64
|
}
|
|
32
65
|
return defineCheck({
|
|
33
|
-
...
|
|
34
|
-
|
|
66
|
+
...input.definition,
|
|
67
|
+
execute: executeJsonSchemaValidation,
|
|
35
68
|
parseData: parseJsonSchemaValidationData,
|
|
36
|
-
|
|
69
|
+
prepare: (preparedOptions) =>
|
|
37
70
|
validJsonSchemaValidationOptions(preparedOptions)
|
|
38
71
|
? { status: "success", preparedOptions }
|
|
39
72
|
: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PackageCheckAuthoringOptions } from "../check-authoring.ts";
|
|
1
2
|
import type {
|
|
2
3
|
ProjectFileSelection,
|
|
3
4
|
ProjectFileSelectionOptions
|
|
@@ -63,7 +64,9 @@ export interface JsonSchemaInstanceBinding {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/** `jsonSchemaValidation(options?)` 接受的可省略 authoring policy。 */
|
|
66
|
-
export interface JsonSchemaValidationOptions
|
|
67
|
+
export interface JsonSchemaValidationOptions<
|
|
68
|
+
Id extends string = string
|
|
69
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
67
70
|
/** schema/instance declarations 必须属于的 repository-file selection。 */
|
|
68
71
|
readonly files?: ProjectFileSelectionOptions;
|
|
69
72
|
/** 每个 local schema/instance document 允许的最大 raw byte 数;省略时为 1 MiB。 */
|
|
@@ -68,9 +68,13 @@ export class ControlledReferenceResolver {
|
|
|
68
68
|
throw new ReferenceResolutionFailure("unapproved-reference");
|
|
69
69
|
if (this.#resolverInput.signal.aborted) throw new ReferenceTransportFailure();
|
|
70
70
|
const controller = new AbortController();
|
|
71
|
-
const abortForCaller = (): void =>
|
|
71
|
+
const abortForCaller = (): void => {
|
|
72
|
+
controller.abort();
|
|
73
|
+
};
|
|
72
74
|
this.#resolverInput.signal.addEventListener("abort", abortForCaller, { once: true });
|
|
73
|
-
const timeout = setTimeout(() =>
|
|
75
|
+
const timeout = setTimeout(() => {
|
|
76
|
+
controller.abort();
|
|
77
|
+
}, REMOTE_TIMEOUT_MS);
|
|
74
78
|
try {
|
|
75
79
|
return await this.loadWithController(referenceUri, controller);
|
|
76
80
|
} catch (error) {
|