zedbee 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DISCLOSURE +19 -0
- package/LICENSE +121 -0
- package/README.md +91 -0
- package/SECURITY.md +47 -0
- package/THIRD_PARTY_NOTICES.md +18244 -0
- package/dist/attribution/compare.d.ts +16 -0
- package/dist/attribution/compare.d.ts.map +1 -0
- package/dist/attribution/compare.js +159 -0
- package/dist/attribution/compare.js.map +1 -0
- package/dist/attribution/entities.d.ts +11 -0
- package/dist/attribution/entities.d.ts.map +1 -0
- package/dist/attribution/entities.js +349 -0
- package/dist/attribution/entities.js.map +1 -0
- package/dist/attribution/fingerprint.d.ts +18 -0
- package/dist/attribution/fingerprint.d.ts.map +1 -0
- package/dist/attribution/fingerprint.js +340 -0
- package/dist/attribution/fingerprint.js.map +1 -0
- package/dist/attribution/metrics.d.ts +8 -0
- package/dist/attribution/metrics.d.ts.map +1 -0
- package/dist/attribution/metrics.js +196 -0
- package/dist/attribution/metrics.js.map +1 -0
- package/dist/attribution/range.d.ts +4 -0
- package/dist/attribution/range.d.ts.map +1 -0
- package/dist/attribution/range.js +32 -0
- package/dist/attribution/range.js.map +1 -0
- package/dist/cache/captured-dependencies.d.ts +50 -0
- package/dist/cache/captured-dependencies.d.ts.map +1 -0
- package/dist/cache/captured-dependencies.js +479 -0
- package/dist/cache/captured-dependencies.js.map +1 -0
- package/dist/cache/dependency-inputs.d.ts +38 -0
- package/dist/cache/dependency-inputs.d.ts.map +1 -0
- package/dist/cache/dependency-inputs.js +151 -0
- package/dist/cache/dependency-inputs.js.map +1 -0
- package/dist/cache/key.d.ts +42 -0
- package/dist/cache/key.d.ts.map +1 -0
- package/dist/cache/key.js +197 -0
- package/dist/cache/key.js.map +1 -0
- package/dist/cache/store.d.ts +35 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +177 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/checks/adapter.d.ts +96 -0
- package/dist/checks/adapter.d.ts.map +1 -0
- package/dist/checks/adapter.js +2 -0
- package/dist/checks/adapter.js.map +1 -0
- package/dist/checks/analysis-reuse.d.ts +14 -0
- package/dist/checks/analysis-reuse.d.ts.map +1 -0
- package/dist/checks/analysis-reuse.js +123 -0
- package/dist/checks/analysis-reuse.js.map +1 -0
- package/dist/checks/applicability.d.ts +7 -0
- package/dist/checks/applicability.d.ts.map +1 -0
- package/dist/checks/applicability.js +121 -0
- package/dist/checks/applicability.js.map +1 -0
- package/dist/checks/complexity/adapter.d.ts +7 -0
- package/dist/checks/complexity/adapter.d.ts.map +1 -0
- package/dist/checks/complexity/adapter.js +206 -0
- package/dist/checks/complexity/adapter.js.map +1 -0
- package/dist/checks/complexity/metric-message.d.ts +7 -0
- package/dist/checks/complexity/metric-message.d.ts.map +1 -0
- package/dist/checks/complexity/metric-message.js +16 -0
- package/dist/checks/complexity/metric-message.js.map +1 -0
- package/dist/checks/complexity/readability-rule.d.ts +5 -0
- package/dist/checks/complexity/readability-rule.d.ts.map +1 -0
- package/dist/checks/complexity/readability-rule.js +110 -0
- package/dist/checks/complexity/readability-rule.js.map +1 -0
- package/dist/checks/configuration-presentation.d.ts +8 -0
- package/dist/checks/configuration-presentation.d.ts.map +1 -0
- package/dist/checks/configuration-presentation.js +94 -0
- package/dist/checks/configuration-presentation.js.map +1 -0
- package/dist/checks/dead-code/adapter.d.ts +3 -0
- package/dist/checks/dead-code/adapter.d.ts.map +1 -0
- package/dist/checks/dead-code/adapter.js +218 -0
- package/dist/checks/dead-code/adapter.js.map +1 -0
- package/dist/checks/dead-code/captured-filesystem.d.ts +12 -0
- package/dist/checks/dead-code/captured-filesystem.d.ts.map +1 -0
- package/dist/checks/dead-code/captured-filesystem.js +138 -0
- package/dist/checks/dead-code/captured-filesystem.js.map +1 -0
- package/dist/checks/dead-code/executor.d.ts +21 -0
- package/dist/checks/dead-code/executor.d.ts.map +1 -0
- package/dist/checks/dead-code/executor.js +78 -0
- package/dist/checks/dead-code/executor.js.map +1 -0
- package/dist/checks/dead-code/import-boundary.d.ts +14 -0
- package/dist/checks/dead-code/import-boundary.d.ts.map +1 -0
- package/dist/checks/dead-code/import-boundary.js +256 -0
- package/dist/checks/dead-code/import-boundary.js.map +1 -0
- package/dist/checks/dead-code/knip-worker.d.ts +2 -0
- package/dist/checks/dead-code/knip-worker.d.ts.map +1 -0
- package/dist/checks/dead-code/knip-worker.js +169 -0
- package/dist/checks/dead-code/knip-worker.js.map +1 -0
- package/dist/checks/dead-code/managed-config.d.ts +13 -0
- package/dist/checks/dead-code/managed-config.d.ts.map +1 -0
- package/dist/checks/dead-code/managed-config.js +128 -0
- package/dist/checks/dead-code/managed-config.js.map +1 -0
- package/dist/checks/dead-code/parse-report.d.ts +3 -0
- package/dist/checks/dead-code/parse-report.d.ts.map +1 -0
- package/dist/checks/dead-code/parse-report.js +107 -0
- package/dist/checks/dead-code/parse-report.js.map +1 -0
- package/dist/checks/dead-code/resolver.LICENSE +22 -0
- package/dist/checks/dead-code/resolver.provenance.json +10 -0
- package/dist/checks/dead-code/resolver.wasm +0 -0
- package/dist/checks/dead-code/wasi.d.ts +9 -0
- package/dist/checks/dead-code/wasi.d.ts.map +1 -0
- package/dist/checks/dead-code/wasi.js +101 -0
- package/dist/checks/dead-code/wasi.js.map +1 -0
- package/dist/checks/dependency-architecture/adapter.d.ts +3 -0
- package/dist/checks/dependency-architecture/adapter.d.ts.map +1 -0
- package/dist/checks/dependency-architecture/adapter.js +305 -0
- package/dist/checks/dependency-architecture/adapter.js.map +1 -0
- package/dist/checks/dependency-architecture/normalize-graph.d.ts +11 -0
- package/dist/checks/dependency-architecture/normalize-graph.d.ts.map +1 -0
- package/dist/checks/dependency-architecture/normalize-graph.js +225 -0
- package/dist/checks/dependency-architecture/normalize-graph.js.map +1 -0
- package/dist/checks/dependency-architecture/rules.d.ts +11 -0
- package/dist/checks/dependency-architecture/rules.d.ts.map +1 -0
- package/dist/checks/dependency-architecture/rules.js +47 -0
- package/dist/checks/dependency-architecture/rules.js.map +1 -0
- package/dist/checks/description.d.ts +41 -0
- package/dist/checks/description.d.ts.map +1 -0
- package/dist/checks/description.js +2 -0
- package/dist/checks/description.js.map +1 -0
- package/dist/checks/descriptors.d.ts +7 -0
- package/dist/checks/descriptors.d.ts.map +1 -0
- package/dist/checks/descriptors.js +50 -0
- package/dist/checks/descriptors.js.map +1 -0
- package/dist/checks/diagnostics.d.ts +25 -0
- package/dist/checks/diagnostics.d.ts.map +1 -0
- package/dist/checks/diagnostics.js +106 -0
- package/dist/checks/diagnostics.js.map +1 -0
- package/dist/checks/dispatcher.d.ts +18 -0
- package/dist/checks/dispatcher.d.ts.map +1 -0
- package/dist/checks/dispatcher.js +789 -0
- package/dist/checks/dispatcher.js.map +1 -0
- package/dist/checks/duplication/adapter.d.ts +9 -0
- package/dist/checks/duplication/adapter.d.ts.map +1 -0
- package/dist/checks/duplication/adapter.js +155 -0
- package/dist/checks/duplication/adapter.js.map +1 -0
- package/dist/checks/duplication/normalize-clone.d.ts +12 -0
- package/dist/checks/duplication/normalize-clone.d.ts.map +1 -0
- package/dist/checks/duplication/normalize-clone.js +190 -0
- package/dist/checks/duplication/normalize-clone.js.map +1 -0
- package/dist/checks/duplication/settings.d.ts +16 -0
- package/dist/checks/duplication/settings.d.ts.map +1 -0
- package/dist/checks/duplication/settings.js +32 -0
- package/dist/checks/duplication/settings.js.map +1 -0
- package/dist/checks/duplication/types.d.ts +53 -0
- package/dist/checks/duplication/types.d.ts.map +1 -0
- package/dist/checks/duplication/types.js +2 -0
- package/dist/checks/duplication/types.js.map +1 -0
- package/dist/checks/engine-identity.d.ts +5 -0
- package/dist/checks/engine-identity.d.ts.map +1 -0
- package/dist/checks/engine-identity.js +130 -0
- package/dist/checks/engine-identity.js.map +1 -0
- package/dist/checks/eslint/comment-directive.d.ts +3 -0
- package/dist/checks/eslint/comment-directive.d.ts.map +1 -0
- package/dist/checks/eslint/comment-directive.js +39 -0
- package/dist/checks/eslint/comment-directive.js.map +1 -0
- package/dist/checks/eslint/convert-message.d.ts +4 -0
- package/dist/checks/eslint/convert-message.d.ts.map +1 -0
- package/dist/checks/eslint/convert-message.js +67 -0
- package/dist/checks/eslint/convert-message.js.map +1 -0
- package/dist/checks/eslint/freeze-rule-settings.d.ts +4 -0
- package/dist/checks/eslint/freeze-rule-settings.d.ts.map +1 -0
- package/dist/checks/eslint/freeze-rule-settings.js +19 -0
- package/dist/checks/eslint/freeze-rule-settings.js.map +1 -0
- package/dist/checks/eslint/lint-adapter.d.ts +8 -0
- package/dist/checks/eslint/lint-adapter.d.ts.map +1 -0
- package/dist/checks/eslint/lint-adapter.js +227 -0
- package/dist/checks/eslint/lint-adapter.js.map +1 -0
- package/dist/checks/eslint/load-engine.d.ts +7 -0
- package/dist/checks/eslint/load-engine.d.ts.map +1 -0
- package/dist/checks/eslint/load-engine.js +126 -0
- package/dist/checks/eslint/load-engine.js.map +1 -0
- package/dist/checks/eslint/managed-config.d.ts +27 -0
- package/dist/checks/eslint/managed-config.d.ts.map +1 -0
- package/dist/checks/eslint/managed-config.js +223 -0
- package/dist/checks/eslint/managed-config.js.map +1 -0
- package/dist/checks/eslint/parse-store.d.ts +13 -0
- package/dist/checks/eslint/parse-store.d.ts.map +1 -0
- package/dist/checks/eslint/parse-store.js +138 -0
- package/dist/checks/eslint/parse-store.js.map +1 -0
- package/dist/checks/eslint/rule-settings.d.ts +15 -0
- package/dist/checks/eslint/rule-settings.d.ts.map +1 -0
- package/dist/checks/eslint/rule-settings.js +317 -0
- package/dist/checks/eslint/rule-settings.js.map +1 -0
- package/dist/checks/events.d.ts +27 -0
- package/dist/checks/events.d.ts.map +1 -0
- package/dist/checks/events.js +2 -0
- package/dist/checks/events.js.map +1 -0
- package/dist/checks/incomplete-error.d.ts +26 -0
- package/dist/checks/incomplete-error.d.ts.map +1 -0
- package/dist/checks/incomplete-error.js +53 -0
- package/dist/checks/incomplete-error.js.map +1 -0
- package/dist/checks/incomplete-result.d.ts +17 -0
- package/dist/checks/incomplete-result.d.ts.map +1 -0
- package/dist/checks/incomplete-result.js +27 -0
- package/dist/checks/incomplete-result.js.map +1 -0
- package/dist/checks/input-contract.d.ts +10 -0
- package/dist/checks/input-contract.d.ts.map +1 -0
- package/dist/checks/input-contract.js +85 -0
- package/dist/checks/input-contract.js.map +1 -0
- package/dist/checks/metadata.d.ts +71 -0
- package/dist/checks/metadata.d.ts.map +1 -0
- package/dist/checks/metadata.js +34 -0
- package/dist/checks/metadata.js.map +1 -0
- package/dist/checks/observation-result.d.ts +4 -0
- package/dist/checks/observation-result.d.ts.map +1 -0
- package/dist/checks/observation-result.js +242 -0
- package/dist/checks/observation-result.js.map +1 -0
- package/dist/checks/policy-scheduling.d.ts +9 -0
- package/dist/checks/policy-scheduling.d.ts.map +1 -0
- package/dist/checks/policy-scheduling.js +116 -0
- package/dist/checks/policy-scheduling.js.map +1 -0
- package/dist/checks/prettier/adapter.d.ts +3 -0
- package/dist/checks/prettier/adapter.d.ts.map +1 -0
- package/dist/checks/prettier/adapter.js +174 -0
- package/dist/checks/prettier/adapter.js.map +1 -0
- package/dist/checks/prettier/fingerprint.d.ts +2 -0
- package/dist/checks/prettier/fingerprint.d.ts.map +1 -0
- package/dist/checks/prettier/fingerprint.js +7 -0
- package/dist/checks/prettier/fingerprint.js.map +1 -0
- package/dist/checks/prettier/format-diff.d.ts +9 -0
- package/dist/checks/prettier/format-diff.d.ts.map +1 -0
- package/dist/checks/prettier/format-diff.js +180 -0
- package/dist/checks/prettier/format-diff.js.map +1 -0
- package/dist/checks/prettier/settings.d.ts +43 -0
- package/dist/checks/prettier/settings.d.ts.map +1 -0
- package/dist/checks/prettier/settings.js +76 -0
- package/dist/checks/prettier/settings.js.map +1 -0
- package/dist/checks/prettier/supported-path.d.ts +19 -0
- package/dist/checks/prettier/supported-path.d.ts.map +1 -0
- package/dist/checks/prettier/supported-path.js +21 -0
- package/dist/checks/prettier/supported-path.js.map +1 -0
- package/dist/checks/project/config-boundary.d.ts +16 -0
- package/dist/checks/project/config-boundary.d.ts.map +1 -0
- package/dist/checks/project/config-boundary.js +249 -0
- package/dist/checks/project/config-boundary.js.map +1 -0
- package/dist/checks/react/accessibility-adapter.d.ts +2 -0
- package/dist/checks/react/accessibility-adapter.d.ts.map +1 -0
- package/dist/checks/react/accessibility-adapter.js +3 -0
- package/dist/checks/react/accessibility-adapter.js.map +1 -0
- package/dist/checks/react/adapter.d.ts +11 -0
- package/dist/checks/react/adapter.d.ts.map +1 -0
- package/dist/checks/react/adapter.js +181 -0
- package/dist/checks/react/adapter.js.map +1 -0
- package/dist/checks/react/config.d.ts +4 -0
- package/dist/checks/react/config.d.ts.map +1 -0
- package/dist/checks/react/config.js +31 -0
- package/dist/checks/react/config.js.map +1 -0
- package/dist/checks/react/correctness-adapter.d.ts +2 -0
- package/dist/checks/react/correctness-adapter.d.ts.map +1 -0
- package/dist/checks/react/correctness-adapter.js +3 -0
- package/dist/checks/react/correctness-adapter.js.map +1 -0
- package/dist/checks/react/rule-settings.d.ts +2 -0
- package/dist/checks/react/rule-settings.d.ts.map +1 -0
- package/dist/checks/react/rule-settings.js +2 -0
- package/dist/checks/react/rule-settings.js.map +1 -0
- package/dist/checks/react/version.d.ts +13 -0
- package/dist/checks/react/version.d.ts.map +1 -0
- package/dist/checks/react/version.js +152 -0
- package/dist/checks/react/version.js.map +1 -0
- package/dist/checks/runner/bootstrap.d.ts +2 -0
- package/dist/checks/runner/bootstrap.d.ts.map +1 -0
- package/dist/checks/runner/bootstrap.js +30 -0
- package/dist/checks/runner/bootstrap.js.map +1 -0
- package/dist/checks/runner/context.d.ts +16 -0
- package/dist/checks/runner/context.d.ts.map +1 -0
- package/dist/checks/runner/context.js +38 -0
- package/dist/checks/runner/context.js.map +1 -0
- package/dist/checks/runner/envelope.d.ts +23 -0
- package/dist/checks/runner/envelope.d.ts.map +1 -0
- package/dist/checks/runner/envelope.js +134 -0
- package/dist/checks/runner/envelope.js.map +1 -0
- package/dist/checks/runner/executor.d.ts +29 -0
- package/dist/checks/runner/executor.d.ts.map +1 -0
- package/dist/checks/runner/executor.js +322 -0
- package/dist/checks/runner/executor.js.map +1 -0
- package/dist/checks/runner/exit-status.d.ts +10 -0
- package/dist/checks/runner/exit-status.d.ts.map +1 -0
- package/dist/checks/runner/exit-status.js +14 -0
- package/dist/checks/runner/exit-status.js.map +1 -0
- package/dist/checks/runner/process-group.d.ts +7 -0
- package/dist/checks/runner/process-group.d.ts.map +1 -0
- package/dist/checks/runner/process-group.js +54 -0
- package/dist/checks/runner/process-group.js.map +1 -0
- package/dist/checks/runner/protocol.d.ts +33 -0
- package/dist/checks/runner/protocol.d.ts.map +1 -0
- package/dist/checks/runner/protocol.js +120 -0
- package/dist/checks/runner/protocol.js.map +1 -0
- package/dist/checks/runner/registry.d.ts +5 -0
- package/dist/checks/runner/registry.d.ts.map +1 -0
- package/dist/checks/runner/registry.js +39 -0
- package/dist/checks/runner/registry.js.map +1 -0
- package/dist/checks/runner/run-job.d.ts +8 -0
- package/dist/checks/runner/run-job.d.ts.map +1 -0
- package/dist/checks/runner/run-job.js +16 -0
- package/dist/checks/runner/run-job.js.map +1 -0
- package/dist/checks/runner/send-worker-reply.d.ts +4 -0
- package/dist/checks/runner/send-worker-reply.d.ts.map +1 -0
- package/dist/checks/runner/send-worker-reply.js +11 -0
- package/dist/checks/runner/send-worker-reply.js.map +1 -0
- package/dist/checks/runner/session.d.ts +8 -0
- package/dist/checks/runner/session.d.ts.map +1 -0
- package/dist/checks/runner/session.js +18 -0
- package/dist/checks/runner/session.js.map +1 -0
- package/dist/checks/runner/supervisor.d.ts +2 -0
- package/dist/checks/runner/supervisor.d.ts.map +1 -0
- package/dist/checks/runner/supervisor.js +273 -0
- package/dist/checks/runner/supervisor.js.map +1 -0
- package/dist/checks/runner/windows-job.d.ts +10 -0
- package/dist/checks/runner/windows-job.d.ts.map +1 -0
- package/dist/checks/runner/windows-job.js +104 -0
- package/dist/checks/runner/windows-job.js.map +1 -0
- package/dist/checks/runner/worker-slot.d.ts +75 -0
- package/dist/checks/runner/worker-slot.d.ts.map +1 -0
- package/dist/checks/runner/worker-slot.js +375 -0
- package/dist/checks/runner/worker-slot.js.map +1 -0
- package/dist/checks/runner/worker.d.ts +2 -0
- package/dist/checks/runner/worker.d.ts.map +1 -0
- package/dist/checks/runner/worker.js +212 -0
- package/dist/checks/runner/worker.js.map +1 -0
- package/dist/checks/sanitize-result.d.ts +73 -0
- package/dist/checks/sanitize-result.d.ts.map +1 -0
- package/dist/checks/sanitize-result.js +281 -0
- package/dist/checks/sanitize-result.js.map +1 -0
- package/dist/checks/sanitize-target.d.ts +8 -0
- package/dist/checks/sanitize-target.d.ts.map +1 -0
- package/dist/checks/sanitize-target.js +26 -0
- package/dist/checks/sanitize-target.js.map +1 -0
- package/dist/checks/secrets/adapter.d.ts +9 -0
- package/dist/checks/secrets/adapter.d.ts.map +1 -0
- package/dist/checks/secrets/adapter.js +86 -0
- package/dist/checks/secrets/adapter.js.map +1 -0
- package/dist/checks/secrets/config.d.ts +3 -0
- package/dist/checks/secrets/config.d.ts.map +1 -0
- package/dist/checks/secrets/config.js +13 -0
- package/dist/checks/secrets/config.js.map +1 -0
- package/dist/checks/secrets/content.d.ts +25 -0
- package/dist/checks/secrets/content.d.ts.map +1 -0
- package/dist/checks/secrets/content.js +126 -0
- package/dist/checks/secrets/content.js.map +1 -0
- package/dist/checks/secrets/normalize.d.ts +11 -0
- package/dist/checks/secrets/normalize.d.ts.map +1 -0
- package/dist/checks/secrets/normalize.js +61 -0
- package/dist/checks/secrets/normalize.js.map +1 -0
- package/dist/checks/settle-snapshot-sides.d.ts +2 -0
- package/dist/checks/settle-snapshot-sides.d.ts.map +1 -0
- package/dist/checks/settle-snapshot-sides.js +30 -0
- package/dist/checks/settle-snapshot-sides.js.map +1 -0
- package/dist/checks/structural-security/adapter.d.ts +3 -0
- package/dist/checks/structural-security/adapter.d.ts.map +1 -0
- package/dist/checks/structural-security/adapter.js +112 -0
- package/dist/checks/structural-security/adapter.js.map +1 -0
- package/dist/checks/structural-security/fingerprint.d.ts +3 -0
- package/dist/checks/structural-security/fingerprint.d.ts.map +1 -0
- package/dist/checks/structural-security/fingerprint.js +13 -0
- package/dist/checks/structural-security/fingerprint.js.map +1 -0
- package/dist/checks/structural-security/rules.d.ts +11 -0
- package/dist/checks/structural-security/rules.d.ts.map +1 -0
- package/dist/checks/structural-security/rules.js +377 -0
- package/dist/checks/structural-security/rules.js.map +1 -0
- package/dist/checks/typescript/adapter.d.ts +11 -0
- package/dist/checks/typescript/adapter.d.ts.map +1 -0
- package/dist/checks/typescript/adapter.js +71 -0
- package/dist/checks/typescript/adapter.js.map +1 -0
- package/dist/checks/typescript/compiler-host.d.ts +20 -0
- package/dist/checks/typescript/compiler-host.d.ts.map +1 -0
- package/dist/checks/typescript/compiler-host.js +295 -0
- package/dist/checks/typescript/compiler-host.js.map +1 -0
- package/dist/checks/typescript/config.d.ts +10 -0
- package/dist/checks/typescript/config.d.ts.map +1 -0
- package/dist/checks/typescript/config.js +297 -0
- package/dist/checks/typescript/config.js.map +1 -0
- package/dist/checks/typescript/convert-diagnostic.d.ts +4 -0
- package/dist/checks/typescript/convert-diagnostic.d.ts.map +1 -0
- package/dist/checks/typescript/convert-diagnostic.js +79 -0
- package/dist/checks/typescript/convert-diagnostic.js.map +1 -0
- package/dist/checks/typescript/reuse-inputs.d.ts +7 -0
- package/dist/checks/typescript/reuse-inputs.d.ts.map +1 -0
- package/dist/checks/typescript/reuse-inputs.js +31 -0
- package/dist/checks/typescript/reuse-inputs.js.map +1 -0
- package/dist/checks/vulnerabilities/adapter.d.ts +10 -0
- package/dist/checks/vulnerabilities/adapter.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/adapter.js +97 -0
- package/dist/checks/vulnerabilities/adapter.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/errors.d.ts +8 -0
- package/dist/checks/vulnerabilities/inventory/errors.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/errors.js +18 -0
- package/dist/checks/vulnerabilities/inventory/errors.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/limits.d.ts +9 -0
- package/dist/checks/vulnerabilities/inventory/limits.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/limits.js +9 -0
- package/dist/checks/vulnerabilities/inventory/limits.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/normalize.d.ts +7 -0
- package/dist/checks/vulnerabilities/inventory/normalize.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/normalize.js +89 -0
- package/dist/checks/vulnerabilities/inventory/normalize.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-bun.d.ts +3 -0
- package/dist/checks/vulnerabilities/inventory/parse-bun.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-bun.js +70 -0
- package/dist/checks/vulnerabilities/inventory/parse-bun.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-lockfile.d.ts +4 -0
- package/dist/checks/vulnerabilities/inventory/parse-lockfile.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-lockfile.js +55 -0
- package/dist/checks/vulnerabilities/inventory/parse-lockfile.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-npm.d.ts +3 -0
- package/dist/checks/vulnerabilities/inventory/parse-npm.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-npm.js +216 -0
- package/dist/checks/vulnerabilities/inventory/parse-npm.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-pnpm.d.ts +3 -0
- package/dist/checks/vulnerabilities/inventory/parse-pnpm.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-pnpm.js +133 -0
- package/dist/checks/vulnerabilities/inventory/parse-pnpm.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-yarn.d.ts +3 -0
- package/dist/checks/vulnerabilities/inventory/parse-yarn.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/parse-yarn.js +125 -0
- package/dist/checks/vulnerabilities/inventory/parse-yarn.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/source-position.d.ts +5 -0
- package/dist/checks/vulnerabilities/inventory/source-position.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/source-position.js +22 -0
- package/dist/checks/vulnerabilities/inventory/source-position.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/types.d.ts +11 -0
- package/dist/checks/vulnerabilities/inventory/types.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/types.js +2 -0
- package/dist/checks/vulnerabilities/inventory/types.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/validate-structure.d.ts +2 -0
- package/dist/checks/vulnerabilities/inventory/validate-structure.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/inventory/validate-structure.js +34 -0
- package/dist/checks/vulnerabilities/inventory/validate-structure.js.map +1 -0
- package/dist/checks/vulnerabilities/normalize.d.ts +5 -0
- package/dist/checks/vulnerabilities/normalize.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/normalize.js +59 -0
- package/dist/checks/vulnerabilities/normalize.js.map +1 -0
- package/dist/checks/vulnerabilities/osv/client.d.ts +15 -0
- package/dist/checks/vulnerabilities/osv/client.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/osv/client.js +229 -0
- package/dist/checks/vulnerabilities/osv/client.js.map +1 -0
- package/dist/checks/vulnerabilities/osv/errors.d.ts +11 -0
- package/dist/checks/vulnerabilities/osv/errors.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/osv/errors.js +19 -0
- package/dist/checks/vulnerabilities/osv/errors.js.map +1 -0
- package/dist/checks/vulnerabilities/osv/read-response.d.ts +3 -0
- package/dist/checks/vulnerabilities/osv/read-response.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/osv/read-response.js +50 -0
- package/dist/checks/vulnerabilities/osv/read-response.js.map +1 -0
- package/dist/checks/vulnerabilities/osv/schemas.d.ts +41 -0
- package/dist/checks/vulnerabilities/osv/schemas.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/osv/schemas.js +50 -0
- package/dist/checks/vulnerabilities/osv/schemas.js.map +1 -0
- package/dist/checks/vulnerabilities/osv/types.d.ts +40 -0
- package/dist/checks/vulnerabilities/osv/types.d.ts.map +1 -0
- package/dist/checks/vulnerabilities/osv/types.js +2 -0
- package/dist/checks/vulnerabilities/osv/types.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +289 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/checks.d.ts +32 -0
- package/dist/commands/checks.d.ts.map +1 -0
- package/dist/commands/checks.js +351 -0
- package/dist/commands/checks.js.map +1 -0
- package/dist/commands/diagnostics.d.ts +25 -0
- package/dist/commands/diagnostics.d.ts.map +1 -0
- package/dist/commands/diagnostics.js +82 -0
- package/dist/commands/diagnostics.js.map +1 -0
- package/dist/commands/doctor.d.ts +26 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +84 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/executor.d.ts +4 -0
- package/dist/commands/executor.d.ts.map +1 -0
- package/dist/commands/executor.js +42 -0
- package/dist/commands/executor.js.map +1 -0
- package/dist/commands/fix.d.ts +51 -0
- package/dist/commands/fix.d.ts.map +1 -0
- package/dist/commands/fix.js +462 -0
- package/dist/commands/fix.js.map +1 -0
- package/dist/commands/init.d.ts +40 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +184 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/scan.d.ts +55 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +270 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/service.d.ts +6 -0
- package/dist/commands/service.d.ts.map +1 -0
- package/dist/commands/service.js +20 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/config/file-policy.d.ts +10 -0
- package/dist/config/file-policy.d.ts.map +1 -0
- package/dist/config/file-policy.js +72 -0
- package/dist/config/file-policy.js.map +1 -0
- package/dist/config/json-schema.d.ts +4 -0
- package/dist/config/json-schema.d.ts.map +1 -0
- package/dist/config/json-schema.js +129 -0
- package/dist/config/json-schema.js.map +1 -0
- package/dist/config/load-config.d.ts +17 -0
- package/dist/config/load-config.d.ts.map +1 -0
- package/dist/config/load-config.js +406 -0
- package/dist/config/load-config.js.map +1 -0
- package/dist/config/profiles.d.ts +3 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/profiles.js +317 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/config/schema.d.ts +944 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +364 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/settings-definition.d.ts +25 -0
- package/dist/config/settings-definition.d.ts.map +1 -0
- package/dist/config/settings-definition.js +2 -0
- package/dist/config/settings-definition.js.map +1 -0
- package/dist/config/settings-registry.d.ts +19 -0
- package/dist/config/settings-registry.d.ts.map +1 -0
- package/dist/config/settings-registry.js +161 -0
- package/dist/config/settings-registry.js.map +1 -0
- package/dist/config/target-policy.d.ts +8 -0
- package/dist/config/target-policy.d.ts.map +1 -0
- package/dist/config/target-policy.js +58 -0
- package/dist/config/target-policy.js.map +1 -0
- package/dist/core/compare.d.ts +3 -0
- package/dist/core/compare.d.ts.map +1 -0
- package/dist/core/compare.js +5 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/display-text.d.ts +13 -0
- package/dist/core/display-text.d.ts.map +1 -0
- package/dist/core/display-text.js +24 -0
- package/dist/core/display-text.js.map +1 -0
- package/dist/core/package-version.d.ts +2 -0
- package/dist/core/package-version.d.ts.map +1 -0
- package/dist/core/package-version.js +14 -0
- package/dist/core/package-version.js.map +1 -0
- package/dist/core/summarize.d.ts +4 -0
- package/dist/core/summarize.d.ts.map +1 -0
- package/dist/core/summarize.js +28 -0
- package/dist/core/summarize.js.map +1 -0
- package/dist/core/types.d.ts +128 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/doctor/diagnostics.d.ts +27 -0
- package/dist/doctor/diagnostics.d.ts.map +1 -0
- package/dist/doctor/diagnostics.js +379 -0
- package/dist/doctor/diagnostics.js.map +1 -0
- package/dist/fixes/apply-plan.d.ts +14 -0
- package/dist/fixes/apply-plan.d.ts.map +1 -0
- package/dist/fixes/apply-plan.js +245 -0
- package/dist/fixes/apply-plan.js.map +1 -0
- package/dist/fixes/availability.d.ts +3 -0
- package/dist/fixes/availability.d.ts.map +1 -0
- package/dist/fixes/availability.js +4 -0
- package/dist/fixes/availability.js.map +1 -0
- package/dist/fixes/build-plan.d.ts +40 -0
- package/dist/fixes/build-plan.d.ts.map +1 -0
- package/dist/fixes/build-plan.js +589 -0
- package/dist/fixes/build-plan.js.map +1 -0
- package/dist/fixes/eslint-provider.d.ts +16 -0
- package/dist/fixes/eslint-provider.d.ts.map +1 -0
- package/dist/fixes/eslint-provider.js +153 -0
- package/dist/fixes/eslint-provider.js.map +1 -0
- package/dist/fixes/exact-edits.d.ts +5 -0
- package/dist/fixes/exact-edits.d.ts.map +1 -0
- package/dist/fixes/exact-edits.js +69 -0
- package/dist/fixes/exact-edits.js.map +1 -0
- package/dist/fixes/prettier-provider.d.ts +18 -0
- package/dist/fixes/prettier-provider.d.ts.map +1 -0
- package/dist/fixes/prettier-provider.js +74 -0
- package/dist/fixes/prettier-provider.js.map +1 -0
- package/dist/fixes/result-presentation.d.ts +9 -0
- package/dist/fixes/result-presentation.d.ts.map +1 -0
- package/dist/fixes/result-presentation.js +20 -0
- package/dist/fixes/result-presentation.js.map +1 -0
- package/dist/fixes/sanitize.d.ts +11 -0
- package/dist/fixes/sanitize.d.ts.map +1 -0
- package/dist/fixes/sanitize.js +217 -0
- package/dist/fixes/sanitize.js.map +1 -0
- package/dist/fixes/types.d.ts +123 -0
- package/dist/fixes/types.d.ts.map +1 -0
- package/dist/fixes/types.js +8 -0
- package/dist/fixes/types.js.map +1 -0
- package/dist/fixes/write-working-file.d.ts +26 -0
- package/dist/fixes/write-working-file.d.ts.map +1 -0
- package/dist/fixes/write-working-file.js +221 -0
- package/dist/fixes/write-working-file.js.map +1 -0
- package/dist/git/base-comparison.d.ts +13 -0
- package/dist/git/base-comparison.d.ts.map +1 -0
- package/dist/git/base-comparison.js +64 -0
- package/dist/git/base-comparison.js.map +1 -0
- package/dist/git/base-ref.d.ts +4 -0
- package/dist/git/base-ref.d.ts.map +1 -0
- package/dist/git/base-ref.js +21 -0
- package/dist/git/base-ref.js.map +1 -0
- package/dist/git/batch-object-stream.d.ts +8 -0
- package/dist/git/batch-object-stream.d.ts.map +1 -0
- package/dist/git/batch-object-stream.js +111 -0
- package/dist/git/batch-object-stream.js.map +1 -0
- package/dist/git/change-set.d.ts +25 -0
- package/dist/git/change-set.d.ts.map +1 -0
- package/dist/git/change-set.js +346 -0
- package/dist/git/change-set.js.map +1 -0
- package/dist/git/client.d.ts +39 -0
- package/dist/git/client.d.ts.map +1 -0
- package/dist/git/client.js +384 -0
- package/dist/git/client.js.map +1 -0
- package/dist/git/errors.d.ts +7 -0
- package/dist/git/errors.d.ts.map +1 -0
- package/dist/git/errors.js +11 -0
- package/dist/git/errors.js.map +1 -0
- package/dist/git/snapshot-path.d.ts +14 -0
- package/dist/git/snapshot-path.d.ts.map +1 -0
- package/dist/git/snapshot-path.js +59 -0
- package/dist/git/snapshot-path.js.map +1 -0
- package/dist/git/snapshot.d.ts +28 -0
- package/dist/git/snapshot.d.ts.map +1 -0
- package/dist/git/snapshot.js +492 -0
- package/dist/git/snapshot.js.map +1 -0
- package/dist/hooks/detect.d.ts +8 -0
- package/dist/hooks/detect.d.ts.map +1 -0
- package/dist/hooks/detect.js +208 -0
- package/dist/hooks/detect.js.map +1 -0
- package/dist/hooks/husky.d.ts +3 -0
- package/dist/hooks/husky.d.ts.map +1 -0
- package/dist/hooks/husky.js +23 -0
- package/dist/hooks/husky.js.map +1 -0
- package/dist/hooks/lefthook.d.ts +3 -0
- package/dist/hooks/lefthook.d.ts.map +1 -0
- package/dist/hooks/lefthook.js +27 -0
- package/dist/hooks/lefthook.js.map +1 -0
- package/dist/hooks/raw-git.d.ts +2 -0
- package/dist/hooks/raw-git.d.ts.map +1 -0
- package/dist/hooks/raw-git.js +5 -0
- package/dist/hooks/raw-git.js.map +1 -0
- package/dist/hooks/simple-git-hooks.d.ts +3 -0
- package/dist/hooks/simple-git-hooks.d.ts.map +1 -0
- package/dist/hooks/simple-git-hooks.js +33 -0
- package/dist/hooks/simple-git-hooks.js.map +1 -0
- package/dist/hooks/state.d.ts +2 -0
- package/dist/hooks/state.d.ts.map +1 -0
- package/dist/hooks/state.js +10 -0
- package/dist/hooks/state.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/init/recommend.d.ts +7 -0
- package/dist/init/recommend.d.ts.map +1 -0
- package/dist/init/recommend.js +274 -0
- package/dist/init/recommend.js.map +1 -0
- package/dist/init/types.d.ts +60 -0
- package/dist/init/types.d.ts.map +1 -0
- package/dist/init/types.js +2 -0
- package/dist/init/types.js.map +1 -0
- package/dist/init/write-config.d.ts +3 -0
- package/dist/init/write-config.d.ts.map +1 -0
- package/dist/init/write-config.js +195 -0
- package/dist/init/write-config.js.map +1 -0
- package/dist/inspection/inspect-repository.d.ts +7 -0
- package/dist/inspection/inspect-repository.d.ts.map +1 -0
- package/dist/inspection/inspect-repository.js +212 -0
- package/dist/inspection/inspect-repository.js.map +1 -0
- package/dist/inspection/read-json.d.ts +37 -0
- package/dist/inspection/read-json.d.ts.map +1 -0
- package/dist/inspection/read-json.js +345 -0
- package/dist/inspection/read-json.js.map +1 -0
- package/dist/inspection/snapshot-registry.d.ts +24 -0
- package/dist/inspection/snapshot-registry.d.ts.map +1 -0
- package/dist/inspection/snapshot-registry.js +174 -0
- package/dist/inspection/snapshot-registry.js.map +1 -0
- package/dist/inspection/source-capture.d.ts +42 -0
- package/dist/inspection/source-capture.d.ts.map +1 -0
- package/dist/inspection/source-capture.js +336 -0
- package/dist/inspection/source-capture.js.map +1 -0
- package/dist/inspection/types.d.ts +31 -0
- package/dist/inspection/types.d.ts.map +1 -0
- package/dist/inspection/types.js +9 -0
- package/dist/inspection/types.js.map +1 -0
- package/dist/inspection/workspaces.d.ts +22 -0
- package/dist/inspection/workspaces.d.ts.map +1 -0
- package/dist/inspection/workspaces.js +209 -0
- package/dist/inspection/workspaces.js.map +1 -0
- package/dist/policy/evaluate.d.ts +13 -0
- package/dist/policy/evaluate.d.ts.map +1 -0
- package/dist/policy/evaluate.js +71 -0
- package/dist/policy/evaluate.js.map +1 -0
- package/dist/renderers/incomplete.d.ts +4 -0
- package/dist/renderers/incomplete.d.ts.map +1 -0
- package/dist/renderers/incomplete.js +72 -0
- package/dist/renderers/incomplete.js.map +1 -0
- package/dist/renderers/json.d.ts +3 -0
- package/dist/renderers/json.d.ts.map +1 -0
- package/dist/renderers/json.js +126 -0
- package/dist/renderers/json.js.map +1 -0
- package/dist/renderers/sarif.d.ts +3 -0
- package/dist/renderers/sarif.d.ts.map +1 -0
- package/dist/renderers/sarif.js +222 -0
- package/dist/renderers/sarif.js.map +1 -0
- package/dist/renderers/terminal-cells.d.ts +6 -0
- package/dist/renderers/terminal-cells.d.ts.map +1 -0
- package/dist/renderers/terminal-cells.js +110 -0
- package/dist/renderers/terminal-cells.js.map +1 -0
- package/dist/renderers/terminal-style.d.ts +4 -0
- package/dist/renderers/terminal-style.d.ts.map +1 -0
- package/dist/renderers/terminal-style.js +21 -0
- package/dist/renderers/terminal-style.js.map +1 -0
- package/dist/renderers/text.d.ts +10 -0
- package/dist/renderers/text.d.ts.map +1 -0
- package/dist/renderers/text.js +379 -0
- package/dist/renderers/text.js.map +1 -0
- package/dist/reporting/agent-guidance.d.ts +11 -0
- package/dist/reporting/agent-guidance.d.ts.map +1 -0
- package/dist/reporting/agent-guidance.js +17 -0
- package/dist/reporting/agent-guidance.js.map +1 -0
- package/dist/reporting/check-label.d.ts +3 -0
- package/dist/reporting/check-label.d.ts.map +1 -0
- package/dist/reporting/check-label.js +38 -0
- package/dist/reporting/check-label.js.map +1 -0
- package/dist/reporting/next-steps.d.ts +13 -0
- package/dist/reporting/next-steps.d.ts.map +1 -0
- package/dist/reporting/next-steps.js +47 -0
- package/dist/reporting/next-steps.js.map +1 -0
- package/dist/reporting/presentation.d.ts +23 -0
- package/dist/reporting/presentation.d.ts.map +1 -0
- package/dist/reporting/presentation.js +120 -0
- package/dist/reporting/presentation.js.map +1 -0
- package/dist/reporting/report-age.d.ts +3 -0
- package/dist/reporting/report-age.d.ts.map +1 -0
- package/dist/reporting/report-age.js +31 -0
- package/dist/reporting/report-age.js.map +1 -0
- package/dist/reporting/report-callouts.d.ts +15 -0
- package/dist/reporting/report-callouts.d.ts.map +1 -0
- package/dist/reporting/report-callouts.js +47 -0
- package/dist/reporting/report-callouts.js.map +1 -0
- package/dist/reporting/report-path.d.ts +3 -0
- package/dist/reporting/report-path.d.ts.map +1 -0
- package/dist/reporting/report-path.js +8 -0
- package/dist/reporting/report-path.js.map +1 -0
- package/dist/reporting/result-sections.d.ts +14 -0
- package/dist/reporting/result-sections.d.ts.map +1 -0
- package/dist/reporting/result-sections.js +27 -0
- package/dist/reporting/result-sections.js.map +1 -0
- package/dist/reporting/source-identity.d.ts +4 -0
- package/dist/reporting/source-identity.d.ts.map +1 -0
- package/dist/reporting/source-identity.js +17 -0
- package/dist/reporting/source-identity.js.map +1 -0
- package/dist/reporting/source-line.d.ts +3 -0
- package/dist/reporting/source-line.d.ts.map +1 -0
- package/dist/reporting/source-line.js +8 -0
- package/dist/reporting/source-line.js.map +1 -0
- package/dist/reporting/temporary-reports.d.ts +31 -0
- package/dist/reporting/temporary-reports.d.ts.map +1 -0
- package/dist/reporting/temporary-reports.js +646 -0
- package/dist/reporting/temporary-reports.js.map +1 -0
- package/dist/runtime/node-support.d.ts +3 -0
- package/dist/runtime/node-support.d.ts.map +1 -0
- package/dist/runtime/node-support.js +6 -0
- package/dist/runtime/node-support.js.map +1 -0
- package/dist/scan/analysis-failure.d.ts +18 -0
- package/dist/scan/analysis-failure.d.ts.map +1 -0
- package/dist/scan/analysis-failure.js +210 -0
- package/dist/scan/analysis-failure.js.map +1 -0
- package/dist/scan/analysis-session.d.ts +90 -0
- package/dist/scan/analysis-session.d.ts.map +1 -0
- package/dist/scan/analysis-session.js +327 -0
- package/dist/scan/analysis-session.js.map +1 -0
- package/dist/scan/incomplete-report.d.ts +25 -0
- package/dist/scan/incomplete-report.d.ts.map +1 -0
- package/dist/scan/incomplete-report.js +78 -0
- package/dist/scan/incomplete-report.js.map +1 -0
- package/dist/scan/report.d.ts +37 -0
- package/dist/scan/report.d.ts.map +1 -0
- package/dist/scan/report.js +2 -0
- package/dist/scan/report.js.map +1 -0
- package/dist/scan/reporting-options.d.ts +7 -0
- package/dist/scan/reporting-options.d.ts.map +1 -0
- package/dist/scan/reporting-options.js +19 -0
- package/dist/scan/reporting-options.js.map +1 -0
- package/dist/scan/resource-policy.d.ts +13 -0
- package/dist/scan/resource-policy.d.ts.map +1 -0
- package/dist/scan/resource-policy.js +67 -0
- package/dist/scan/resource-policy.js.map +1 -0
- package/dist/scan/run-scan.d.ts +32 -0
- package/dist/scan/run-scan.d.ts.map +1 -0
- package/dist/scan/run-scan.js +130 -0
- package/dist/scan/run-scan.js.map +1 -0
- package/dist/scan/source-excerpts.d.ts +7 -0
- package/dist/scan/source-excerpts.d.ts.map +1 -0
- package/dist/scan/source-excerpts.js +225 -0
- package/dist/scan/source-excerpts.js.map +1 -0
- package/dist/scan/source-mode.d.ts +9 -0
- package/dist/scan/source-mode.d.ts.map +1 -0
- package/dist/scan/source-mode.js +20 -0
- package/dist/scan/source-mode.js.map +1 -0
- package/dist/scan/unsupported-inputs.d.ts +14 -0
- package/dist/scan/unsupported-inputs.d.ts.map +1 -0
- package/dist/scan/unsupported-inputs.js +71 -0
- package/dist/scan/unsupported-inputs.js.map +1 -0
- package/dist/service/client.d.ts +37 -0
- package/dist/service/client.d.ts.map +1 -0
- package/dist/service/client.js +656 -0
- package/dist/service/client.js.map +1 -0
- package/dist/service/entry.d.ts +2 -0
- package/dist/service/entry.d.ts.map +1 -0
- package/dist/service/entry.js +104 -0
- package/dist/service/entry.js.map +1 -0
- package/dist/service/identity-content.d.ts +8 -0
- package/dist/service/identity-content.d.ts.map +1 -0
- package/dist/service/identity-content.js +250 -0
- package/dist/service/identity-content.js.map +1 -0
- package/dist/service/identity-parallel.d.ts +3 -0
- package/dist/service/identity-parallel.d.ts.map +1 -0
- package/dist/service/identity-parallel.js +83 -0
- package/dist/service/identity-parallel.js.map +1 -0
- package/dist/service/identity-worker.d.ts +2 -0
- package/dist/service/identity-worker.d.ts.map +1 -0
- package/dist/service/identity-worker.js +32 -0
- package/dist/service/identity-worker.js.map +1 -0
- package/dist/service/identity.d.ts +17 -0
- package/dist/service/identity.d.ts.map +1 -0
- package/dist/service/identity.js +70 -0
- package/dist/service/identity.js.map +1 -0
- package/dist/service/protocol.d.ts +32 -0
- package/dist/service/protocol.d.ts.map +1 -0
- package/dist/service/protocol.js +153 -0
- package/dist/service/protocol.js.map +1 -0
- package/dist/service/server.d.ts +28 -0
- package/dist/service/server.d.ts.map +1 -0
- package/dist/service/server.js +462 -0
- package/dist/service/server.js.map +1 -0
- package/dist/service/state.d.ts +32 -0
- package/dist/service/state.d.ts.map +1 -0
- package/dist/service/state.js +270 -0
- package/dist/service/state.js.map +1 -0
- package/dist/service/transport.d.ts +16 -0
- package/dist/service/transport.d.ts.map +1 -0
- package/dist/service/transport.js +116 -0
- package/dist/service/transport.js.map +1 -0
- package/dist/service/windows-pipe.d.ts +16 -0
- package/dist/service/windows-pipe.d.ts.map +1 -0
- package/dist/service/windows-pipe.js +397 -0
- package/dist/service/windows-pipe.js.map +1 -0
- package/dist/ui/bee-grid.d.ts +19 -0
- package/dist/ui/bee-grid.d.ts.map +1 -0
- package/dist/ui/bee-grid.js +36 -0
- package/dist/ui/bee-grid.js.map +1 -0
- package/dist/ui/branded-command-frame.d.ts +18 -0
- package/dist/ui/branded-command-frame.d.ts.map +1 -0
- package/dist/ui/branded-command-frame.js +46 -0
- package/dist/ui/branded-command-frame.js.map +1 -0
- package/dist/ui/checks-dashboard.d.ts +11 -0
- package/dist/ui/checks-dashboard.d.ts.map +1 -0
- package/dist/ui/checks-dashboard.js +39 -0
- package/dist/ui/checks-dashboard.js.map +1 -0
- package/dist/ui/compact-pixels.d.ts +7 -0
- package/dist/ui/compact-pixels.d.ts.map +1 -0
- package/dist/ui/compact-pixels.js +21 -0
- package/dist/ui/compact-pixels.js.map +1 -0
- package/dist/ui/doctor-dashboard.d.ts +11 -0
- package/dist/ui/doctor-dashboard.d.ts.map +1 -0
- package/dist/ui/doctor-dashboard.js +46 -0
- package/dist/ui/doctor-dashboard.js.map +1 -0
- package/dist/ui/findings-list.d.ts +8 -0
- package/dist/ui/findings-list.d.ts.map +1 -0
- package/dist/ui/findings-list.js +39 -0
- package/dist/ui/findings-list.js.map +1 -0
- package/dist/ui/fix-app.d.ts +34 -0
- package/dist/ui/fix-app.d.ts.map +1 -0
- package/dist/ui/fix-app.js +232 -0
- package/dist/ui/fix-app.js.map +1 -0
- package/dist/ui/fix-result-dashboard.d.ts +12 -0
- package/dist/ui/fix-result-dashboard.d.ts.map +1 -0
- package/dist/ui/fix-result-dashboard.js +47 -0
- package/dist/ui/fix-result-dashboard.js.map +1 -0
- package/dist/ui/incomplete-list.d.ts +7 -0
- package/dist/ui/incomplete-list.d.ts.map +1 -0
- package/dist/ui/incomplete-list.js +25 -0
- package/dist/ui/incomplete-list.js.map +1 -0
- package/dist/ui/init-app.d.ts +24 -0
- package/dist/ui/init-app.d.ts.map +1 -0
- package/dist/ui/init-app.js +294 -0
- package/dist/ui/init-app.js.map +1 -0
- package/dist/ui/live-dashboard.d.ts +28 -0
- package/dist/ui/live-dashboard.d.ts.map +1 -0
- package/dist/ui/live-dashboard.js +268 -0
- package/dist/ui/live-dashboard.js.map +1 -0
- package/dist/ui/outcome-strip.d.ts +7 -0
- package/dist/ui/outcome-strip.d.ts.map +1 -0
- package/dist/ui/outcome-strip.js +67 -0
- package/dist/ui/outcome-strip.js.map +1 -0
- package/dist/ui/pixel-bee.d.ts +11 -0
- package/dist/ui/pixel-bee.d.ts.map +1 -0
- package/dist/ui/pixel-bee.js +67 -0
- package/dist/ui/pixel-bee.js.map +1 -0
- package/dist/ui/pixel-clock.d.ts +10 -0
- package/dist/ui/pixel-clock.d.ts.map +1 -0
- package/dist/ui/pixel-clock.js +65 -0
- package/dist/ui/pixel-clock.js.map +1 -0
- package/dist/ui/pixel-wordmark.d.ts +11 -0
- package/dist/ui/pixel-wordmark.d.ts.map +1 -0
- package/dist/ui/pixel-wordmark.js +47 -0
- package/dist/ui/pixel-wordmark.js.map +1 -0
- package/dist/ui/render-ink.d.ts +12 -0
- package/dist/ui/render-ink.d.ts.map +1 -0
- package/dist/ui/render-ink.js +119 -0
- package/dist/ui/render-ink.js.map +1 -0
- package/dist/ui/render-static.d.ts +8 -0
- package/dist/ui/render-static.d.ts.map +1 -0
- package/dist/ui/render-static.js +40 -0
- package/dist/ui/render-static.js.map +1 -0
- package/dist/ui/scan-app.d.ts +17 -0
- package/dist/ui/scan-app.d.ts.map +1 -0
- package/dist/ui/scan-app.js +65 -0
- package/dist/ui/scan-app.js.map +1 -0
- package/dist/ui/scan-result-dashboard.d.ts +9 -0
- package/dist/ui/scan-result-dashboard.d.ts.map +1 -0
- package/dist/ui/scan-result-dashboard.js +109 -0
- package/dist/ui/scan-result-dashboard.js.map +1 -0
- package/dist/ui/terminal-mouse.d.ts +11 -0
- package/dist/ui/terminal-mouse.d.ts.map +1 -0
- package/dist/ui/terminal-mouse.js +18 -0
- package/dist/ui/terminal-mouse.js.map +1 -0
- package/dist/ui/terminal-viewport-model.d.ts +5 -0
- package/dist/ui/terminal-viewport-model.d.ts.map +1 -0
- package/dist/ui/terminal-viewport-model.js +32 -0
- package/dist/ui/terminal-viewport-model.js.map +1 -0
- package/dist/ui/terminal-viewport.d.ts +18 -0
- package/dist/ui/terminal-viewport.d.ts.map +1 -0
- package/dist/ui/terminal-viewport.js +80 -0
- package/dist/ui/terminal-viewport.js.map +1 -0
- package/dist/ui/theme.d.ts +18 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +18 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/updates/cache.d.ts +12 -0
- package/dist/updates/cache.d.ts.map +1 -0
- package/dist/updates/cache.js +71 -0
- package/dist/updates/cache.js.map +1 -0
- package/dist/updates/metadata.d.ts +15 -0
- package/dist/updates/metadata.d.ts.map +1 -0
- package/dist/updates/metadata.js +78 -0
- package/dist/updates/metadata.js.map +1 -0
- package/dist/updates/notification.d.ts +19 -0
- package/dist/updates/notification.d.ts.map +1 -0
- package/dist/updates/notification.js +95 -0
- package/dist/updates/notification.js.map +1 -0
- package/dist/updates/worker.d.ts +5 -0
- package/dist/updates/worker.d.ts.map +1 -0
- package/dist/updates/worker.js +54 -0
- package/dist/updates/worker.js.map +1 -0
- package/docs/checks.md +185 -0
- package/docs/cli-reference.md +324 -0
- package/docs/commercial-licensing.md +26 -0
- package/docs/dependency-license-obligations.md +16 -0
- package/docs/managed-fixes.md +203 -0
- package/docs/privacy.md +90 -0
- package/docs/react-analysis.md +39 -0
- package/docs/readability-complexity.md +35 -0
- package/docs/reporting.md +105 -0
- package/docs/structural-security-coverage.md +32 -0
- package/docs/support.md +137 -0
- package/licenses/overrides/ast-grep-platform-0.45.1-LICENSE +21 -0
- package/licenses/overrides/emnapi-1.11.2-LICENSE +21 -0
- package/licenses/overrides/esrecurse-4.3.0-LICENSE +22 -0
- package/licenses/overrides/humanfs-types-0.15.0-LICENSE +201 -0
- package/licenses/overrides/imurmurhash-0.1.4-LICENSE +20 -0
- package/licenses/overrides/jscpd-5.0.15-LICENSE +21 -0
- package/licenses/overrides/keyv-4.5.4-LICENSE +22 -0
- package/licenses/overrides/koffi-platform-3.2.1-LICENSE +22 -0
- package/licenses/overrides/language-subtag-registry-0.3.23-LICENSE +125 -0
- package/licenses/overrides/language-tags-1.0.9-LICENSE +21 -0
- package/licenses/overrides/napi-rs-wasm-runtime-1.1.6-LICENSE +43 -0
- package/licenses/overrides/natural-compare-1.4.0-LICENSE +21 -0
- package/licenses/overrides/oxc-parser-platform-0.143.0-LICENSE +22 -0
- package/licenses/overrides/tslib-2.8.1-LICENSE +12 -0
- package/licenses/overrides/wasm-util-0.10.3-LICENSE +21 -0
- package/licenses/overrides/yarnpkg-lockfile-1.1.0-LICENSE +26 -0
- package/licenses/overrides/yoga-layout-3.2.1-LICENSE +21 -0
- package/licenses/production-inventory.json +8533 -0
- package/licenses/reviewed-obligations.json +23 -0
- package/licenses/reviewed-overrides.json +614 -0
- package/package.json +133 -0
- package/schema/zedbee.schema.json +4828 -0
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
import pLimit from "p-limit";
|
|
2
|
+
import { CHECK_IDS, } from "../config/schema.js";
|
|
3
|
+
import {} from "../config/file-policy.js";
|
|
4
|
+
import { observationCheckResult } from "./observation-result.js";
|
|
5
|
+
import { sanitizeCheckResult } from "./sanitize-result.js";
|
|
6
|
+
import { sanitizeCheckTarget } from "./sanitize-target.js";
|
|
7
|
+
import { incompleteResult } from "./incomplete-result.js";
|
|
8
|
+
import { CheckIncompleteError } from "./incomplete-error.js";
|
|
9
|
+
import { AnalyzerJobError } from "./diagnostics.js";
|
|
10
|
+
import { displayResultForPolicy } from "../policy/evaluate.js";
|
|
11
|
+
import { compareCodeUnits } from "../core/compare.js";
|
|
12
|
+
import { displayLabel, displayProse } from "../core/display-text.js";
|
|
13
|
+
import { createObservationCacheKeyBuilder, effectiveBehaviorFingerprint, } from "../cache/key.js";
|
|
14
|
+
import { observationCacheEngineIdentity } from "./engine-identity.js";
|
|
15
|
+
import { isCacheableObservationCheck } from "./metadata.js";
|
|
16
|
+
import { sanitizeCacheableObservationSet, } from "../cache/store.js";
|
|
17
|
+
import { validateDependencyInputs } from "../cache/captured-dependencies.js";
|
|
18
|
+
import { resolveInspectionPolicy, resolveScheduledTargetPolicy, } from "./policy-scheduling.js";
|
|
19
|
+
import { immutableConfigurationSnapshot, snapshotManagedPolicy, } from "../config/settings-registry.js";
|
|
20
|
+
import { sanitizeFixCandidates } from "../fixes/sanitize.js";
|
|
21
|
+
function checkPolicy(context, checkId) {
|
|
22
|
+
const checks = context.config.checks;
|
|
23
|
+
return checks[checkId];
|
|
24
|
+
}
|
|
25
|
+
const CHECK_LABELS = Object.freeze({
|
|
26
|
+
formatting: "Formatting",
|
|
27
|
+
lint: "Lint",
|
|
28
|
+
types: "TypeScript",
|
|
29
|
+
cyclomaticComplexity: "Cyclomatic complexity",
|
|
30
|
+
readabilityComplexity: "Readability complexity",
|
|
31
|
+
structuralSecurity: "Structural security",
|
|
32
|
+
secrets: "Secrets",
|
|
33
|
+
duplication: "Duplication",
|
|
34
|
+
dependencyArchitecture: "Dependency architecture",
|
|
35
|
+
deadCode: "Dead code",
|
|
36
|
+
reactCorrectness: "React correctness",
|
|
37
|
+
reactAccessibility: "React accessibility",
|
|
38
|
+
vulnerabilities: "Vulnerabilities",
|
|
39
|
+
});
|
|
40
|
+
function checkLabel(checkId) {
|
|
41
|
+
return CHECK_LABELS[checkId] ?? checkId;
|
|
42
|
+
}
|
|
43
|
+
function immutablePolicy(checkId, policy) {
|
|
44
|
+
return CHECK_IDS.includes(checkId)
|
|
45
|
+
? snapshotManagedPolicy(checkId, policy)
|
|
46
|
+
: immutableConfigurationSnapshot(policy);
|
|
47
|
+
}
|
|
48
|
+
function executionResult(result, policy, target, policyForFile, fixCandidates) {
|
|
49
|
+
return {
|
|
50
|
+
result: sanitizeCheckResult(result),
|
|
51
|
+
...(target === undefined ? {} : { target }),
|
|
52
|
+
policy,
|
|
53
|
+
...(policyForFile === undefined ? {} : { policyForFile }),
|
|
54
|
+
...(fixCandidates === undefined ? {} : { fixCandidates }),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function mayBeEnabled(context, checkId) {
|
|
58
|
+
const policy = checkPolicy(context, checkId);
|
|
59
|
+
if (policy === undefined)
|
|
60
|
+
return false;
|
|
61
|
+
if (policy.severity !== "off")
|
|
62
|
+
return true;
|
|
63
|
+
if (!CHECK_IDS.includes(checkId))
|
|
64
|
+
return false;
|
|
65
|
+
return context.config.overrides.some((override) => override.checks[checkId]?.severity !== undefined &&
|
|
66
|
+
override.checks[checkId]?.severity !== "off");
|
|
67
|
+
}
|
|
68
|
+
function inspectionPolicy(context, checkId) {
|
|
69
|
+
const root = checkPolicy(context, checkId);
|
|
70
|
+
if (root === undefined || !CHECK_IDS.includes(checkId))
|
|
71
|
+
return root;
|
|
72
|
+
return resolveInspectionPolicy(context.config, checkId);
|
|
73
|
+
}
|
|
74
|
+
function readonlyMap(entries) {
|
|
75
|
+
const internal = new Map(entries);
|
|
76
|
+
let facade;
|
|
77
|
+
facade = Object.freeze({
|
|
78
|
+
get size() {
|
|
79
|
+
return internal.size;
|
|
80
|
+
},
|
|
81
|
+
get(key) {
|
|
82
|
+
return internal.get(key);
|
|
83
|
+
},
|
|
84
|
+
has(key) {
|
|
85
|
+
return internal.has(key);
|
|
86
|
+
},
|
|
87
|
+
entries() {
|
|
88
|
+
return internal.entries();
|
|
89
|
+
},
|
|
90
|
+
keys() {
|
|
91
|
+
return internal.keys();
|
|
92
|
+
},
|
|
93
|
+
values() {
|
|
94
|
+
return internal.values();
|
|
95
|
+
},
|
|
96
|
+
forEach(callback, thisArg) {
|
|
97
|
+
internal.forEach((value, key) => callback.call(thisArg, value, key, facade));
|
|
98
|
+
},
|
|
99
|
+
[Symbol.iterator]() {
|
|
100
|
+
return internal[Symbol.iterator]();
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
return facade;
|
|
104
|
+
}
|
|
105
|
+
function snapshotChangedFile(file) {
|
|
106
|
+
return Object.freeze({
|
|
107
|
+
path: file.path,
|
|
108
|
+
...(file.previousPath === undefined
|
|
109
|
+
? {}
|
|
110
|
+
: { previousPath: file.previousPath }),
|
|
111
|
+
status: file.status,
|
|
112
|
+
addedRanges: Object.freeze(file.addedRanges.map((range) => Object.freeze({ start: range.start, end: range.end }))),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function snapshotChangeSet(changeSet) {
|
|
116
|
+
const files = readonlyMap([...changeSet.files].map(([path, file]) => [path, snapshotChangedFile(file)]));
|
|
117
|
+
return Object.freeze({
|
|
118
|
+
files,
|
|
119
|
+
isEmpty: changeSet.isEmpty,
|
|
120
|
+
containsAddedLine(file, line) {
|
|
121
|
+
return (files
|
|
122
|
+
.get(file.replaceAll("\\", "/"))
|
|
123
|
+
?.addedRanges.some((range) => line >= range.start && line <= range.end) ?? false);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function snapshotOverride(override) {
|
|
128
|
+
return Object.freeze({
|
|
129
|
+
files: Object.freeze([...override.files]),
|
|
130
|
+
checks: Object.freeze(Object.fromEntries(Object.entries(override.checks).map(([id, patch]) => [
|
|
131
|
+
id,
|
|
132
|
+
patch === undefined ? undefined : immutablePolicy(id, patch),
|
|
133
|
+
]))),
|
|
134
|
+
configurationOrigins: snapshotConfigurationOrigins(override.configurationOrigins),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function snapshotConfigurationOrigins(origins) {
|
|
138
|
+
return immutableConfigurationSnapshot(Object.fromEntries(CHECK_IDS.map((checkId) => [checkId, origins?.[checkId] ?? {}])));
|
|
139
|
+
}
|
|
140
|
+
function snapshotConfig(config) {
|
|
141
|
+
return Object.freeze({
|
|
142
|
+
schemaVersion: config.schemaVersion,
|
|
143
|
+
profile: config.profile,
|
|
144
|
+
pathExclusions: immutableConfigurationSnapshot(config.pathExclusions),
|
|
145
|
+
checks: Object.freeze(Object.fromEntries(Object.entries(config.checks).map(([id, policy]) => [
|
|
146
|
+
id,
|
|
147
|
+
immutablePolicy(id, policy),
|
|
148
|
+
]))),
|
|
149
|
+
overrides: Object.freeze(config.overrides.map(snapshotOverride)),
|
|
150
|
+
reporting: immutableConfigurationSnapshot(config.reporting),
|
|
151
|
+
resources: immutableConfigurationSnapshot(config.resources),
|
|
152
|
+
configurationOrigins: snapshotConfigurationOrigins(config.configurationOrigins),
|
|
153
|
+
failOnIncomplete: config.failOnIncomplete,
|
|
154
|
+
...(config.configPath === undefined
|
|
155
|
+
? {}
|
|
156
|
+
: { configPath: config.configPath }),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function snapshotInspection(inspection) {
|
|
160
|
+
return Object.freeze({
|
|
161
|
+
snapshotRoot: inspection.snapshotRoot,
|
|
162
|
+
packageManager: inspection.packageManager,
|
|
163
|
+
lockfiles: Object.freeze([...inspection.lockfiles]),
|
|
164
|
+
workspaces: Object.freeze(inspection.workspaces.map((workspace) => Object.freeze({
|
|
165
|
+
...(workspace.name === undefined ? {} : { name: workspace.name }),
|
|
166
|
+
relativeRoot: workspace.relativeRoot,
|
|
167
|
+
manifestPath: workspace.manifestPath,
|
|
168
|
+
sourceFiles: Object.freeze([...workspace.sourceFiles]),
|
|
169
|
+
tsconfigPaths: Object.freeze([...workspace.tsconfigPaths]),
|
|
170
|
+
environments: Object.freeze([...workspace.environments]),
|
|
171
|
+
dependencyDeclarations: Object.freeze(workspace.dependencyDeclarations.map((declaration) => Object.freeze({
|
|
172
|
+
name: declaration.name,
|
|
173
|
+
specifier: declaration.specifier,
|
|
174
|
+
section: declaration.section,
|
|
175
|
+
}))),
|
|
176
|
+
}))),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
function cacheInspection(inspection, target) {
|
|
180
|
+
const workspaces = inspection.workspaces
|
|
181
|
+
.filter((workspace) => target.kind === "repository" ||
|
|
182
|
+
workspace.relativeRoot === target.relativeRoot)
|
|
183
|
+
.map((workspace) => ({
|
|
184
|
+
name: workspace.name,
|
|
185
|
+
relativeRoot: workspace.relativeRoot,
|
|
186
|
+
manifestPath: workspace.manifestPath,
|
|
187
|
+
sourceFiles: workspace.sourceFiles,
|
|
188
|
+
tsconfigPaths: workspace.tsconfigPaths,
|
|
189
|
+
environments: workspace.environments,
|
|
190
|
+
dependencyDeclarations: workspace.dependencyDeclarations,
|
|
191
|
+
productionDependencies: workspace.productionDependencies,
|
|
192
|
+
developmentDependencies: workspace.developmentDependencies,
|
|
193
|
+
}));
|
|
194
|
+
return {
|
|
195
|
+
packageManager: inspection.packageManager,
|
|
196
|
+
lockfiles: inspection.lockfiles,
|
|
197
|
+
workspaces,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const LINT_SOURCE_PATH = /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/u;
|
|
201
|
+
const REACT_COMPLEXITY_SOURCE_PATH = /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/iu;
|
|
202
|
+
const FILE_BEHAVIOR_CHECKS = new Set([
|
|
203
|
+
"lint",
|
|
204
|
+
"cyclomaticComplexity",
|
|
205
|
+
"readabilityComplexity",
|
|
206
|
+
"reactCorrectness",
|
|
207
|
+
"reactAccessibility",
|
|
208
|
+
]);
|
|
209
|
+
function isFileBehaviorPath(checkId, path) {
|
|
210
|
+
return checkId === "lint"
|
|
211
|
+
? LINT_SOURCE_PATH.test(path)
|
|
212
|
+
: REACT_COMPLEXITY_SOURCE_PATH.test(path);
|
|
213
|
+
}
|
|
214
|
+
function cacheBehaviorPaths(checkId, target, baseline, staged) {
|
|
215
|
+
if (!FILE_BEHAVIOR_CHECKS.has(checkId))
|
|
216
|
+
return Object.freeze([]);
|
|
217
|
+
const paths = [baseline, staged].flatMap((inspection) => inspection.workspaces
|
|
218
|
+
.filter(({ relativeRoot }) => target.kind === "repository" || relativeRoot === target.relativeRoot)
|
|
219
|
+
.flatMap(({ sourceFiles }) => sourceFiles.filter((path) => isFileBehaviorPath(checkId, path))));
|
|
220
|
+
return Object.freeze([...new Set(paths)].sort(compareCodeUnits));
|
|
221
|
+
}
|
|
222
|
+
function sameTarget(left, right) {
|
|
223
|
+
return (left.id === right.id &&
|
|
224
|
+
left.kind === right.kind &&
|
|
225
|
+
left.relativeRoot === right.relativeRoot);
|
|
226
|
+
}
|
|
227
|
+
async function collectObservations(adapter, runContext, cachePolicy, behavior, options, cacheKeyFor) {
|
|
228
|
+
if (!isCacheableObservationCheck(adapter.id) ||
|
|
229
|
+
(options.cache === undefined && options.cacheEngineIdentity === undefined)) {
|
|
230
|
+
return Reflect.apply(adapter.collect, undefined, [runContext]);
|
|
231
|
+
}
|
|
232
|
+
const engineIdentity = (options.cacheEngineIdentity ?? observationCacheEngineIdentity)(adapter.id);
|
|
233
|
+
if (engineIdentity === undefined) {
|
|
234
|
+
return Reflect.apply(adapter.collect, undefined, [runContext]);
|
|
235
|
+
}
|
|
236
|
+
let cacheKey;
|
|
237
|
+
if (options.cache !== undefined && engineIdentity !== undefined) {
|
|
238
|
+
try {
|
|
239
|
+
cacheKey = await cacheKeyFor({
|
|
240
|
+
checkId: adapter.id,
|
|
241
|
+
engineIdentity,
|
|
242
|
+
policy: cachePolicy,
|
|
243
|
+
checkTarget: runContext.target,
|
|
244
|
+
relevantConfig: {
|
|
245
|
+
schemaVersion: runContext.config.schemaVersion,
|
|
246
|
+
behavior,
|
|
247
|
+
baseline: cacheInspection(runContext.baselineInspection, runContext.target),
|
|
248
|
+
target: cacheInspection(runContext.targetInspection, runContext.target),
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
const cached = await options.cache.get(cacheKey).catch(() => undefined);
|
|
252
|
+
if (cached !== undefined &&
|
|
253
|
+
cached.checkId === adapter.id &&
|
|
254
|
+
sameTarget(cached.target, runContext.target) &&
|
|
255
|
+
((adapter.id !== "lint" &&
|
|
256
|
+
adapter.id !== "types" &&
|
|
257
|
+
adapter.id !== "deadCode") ||
|
|
258
|
+
validateDependencyInputs(cached.dependencyInputs, runContext, adapter.id === "deadCode"))) {
|
|
259
|
+
return sanitizeCacheableObservationSet(cached);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
cacheKey = undefined;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
const collected = await Reflect.apply(adapter.collect, undefined, [
|
|
267
|
+
runContext,
|
|
268
|
+
]);
|
|
269
|
+
if (cacheKey !== undefined &&
|
|
270
|
+
options.cache !== undefined &&
|
|
271
|
+
!runContext.signal.aborted &&
|
|
272
|
+
(adapter.id !== "deadCode" ||
|
|
273
|
+
(await cacheKeyFor.matchesSnapshotFiles(collected.dependencyInputs))) &&
|
|
274
|
+
((adapter.id !== "lint" &&
|
|
275
|
+
adapter.id !== "types" &&
|
|
276
|
+
adapter.id !== "deadCode") ||
|
|
277
|
+
validateDependencyInputs(collected.dependencyInputs, runContext, adapter.id === "deadCode"))) {
|
|
278
|
+
await options.cache.set(cacheKey, collected).catch(() => undefined);
|
|
279
|
+
}
|
|
280
|
+
return collected;
|
|
281
|
+
}
|
|
282
|
+
function adapterBaseContext(context) {
|
|
283
|
+
return Object.freeze({
|
|
284
|
+
repositoryRoot: context.repositoryRoot,
|
|
285
|
+
changeSet: snapshotChangeSet(context.changeSet),
|
|
286
|
+
config: snapshotConfig(context.config),
|
|
287
|
+
snapshots: Object.freeze({
|
|
288
|
+
baselineDir: context.snapshots.baselineDir,
|
|
289
|
+
targetDir: context.snapshots.targetDir,
|
|
290
|
+
baselineRef: context.snapshots.baselineRef,
|
|
291
|
+
targetRef: context.snapshots.targetRef,
|
|
292
|
+
unsupportedEntries: Object.freeze(context.snapshots.unsupportedEntries.map((entry) => Object.freeze({ ...entry }))),
|
|
293
|
+
}),
|
|
294
|
+
baselineInspection: snapshotInspection(context.baselineInspection),
|
|
295
|
+
targetInspection: snapshotInspection(context.targetInspection),
|
|
296
|
+
signal: context.signal,
|
|
297
|
+
policyForFile: context.policyForFile,
|
|
298
|
+
filePolicyConfig: snapshotConfig(context.config),
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function inspectionContext(context, checkId, policy) {
|
|
302
|
+
return Object.freeze({
|
|
303
|
+
repositoryRoot: context.repositoryRoot,
|
|
304
|
+
changeSet: context.changeSet,
|
|
305
|
+
config: snapshotConfig({
|
|
306
|
+
...context.config,
|
|
307
|
+
checks: { ...context.config.checks, [checkId]: policy },
|
|
308
|
+
}),
|
|
309
|
+
baselineInspection: context.baselineInspection,
|
|
310
|
+
targetInspection: context.targetInspection,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function scopedContext(context, checkId, target, policy) {
|
|
314
|
+
const config = snapshotConfig({
|
|
315
|
+
...context.config,
|
|
316
|
+
checks: { ...context.config.checks, [checkId]: policy },
|
|
317
|
+
});
|
|
318
|
+
return Object.freeze({
|
|
319
|
+
...context,
|
|
320
|
+
config,
|
|
321
|
+
target: Object.freeze({ ...target }),
|
|
322
|
+
// Keep the adapter snapshot detached from the authoritative execution
|
|
323
|
+
// envelope while preserving the same deeply immutable behavior.
|
|
324
|
+
policy: Object.freeze({ ...policy }),
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
function compareResults(left, right) {
|
|
328
|
+
return (compareCodeUnits(left.result.checkId, right.result.checkId) ||
|
|
329
|
+
compareCodeUnits(left.result.target ?? "", right.result.target ?? ""));
|
|
330
|
+
}
|
|
331
|
+
function adapterId(value) {
|
|
332
|
+
if (typeof value !== "string" ||
|
|
333
|
+
value.length === 0 ||
|
|
334
|
+
value.trim() !== value ||
|
|
335
|
+
/[\u0000-\u001f\u007f]/u.test(value)) {
|
|
336
|
+
throw new TypeError("Adapter returned an invalid check id");
|
|
337
|
+
}
|
|
338
|
+
return displayLabel(value, "adapter check id");
|
|
339
|
+
}
|
|
340
|
+
function snapshotAdapter(raw) {
|
|
341
|
+
const candidate = raw;
|
|
342
|
+
let id = "unknown";
|
|
343
|
+
try {
|
|
344
|
+
id = adapterId(candidate.id);
|
|
345
|
+
const output = candidate.output;
|
|
346
|
+
const inspect = candidate.inspect;
|
|
347
|
+
const planFixes = candidate.planFixes;
|
|
348
|
+
if (typeof inspect !== "function") {
|
|
349
|
+
throw new TypeError("Adapter returned an invalid inspect function");
|
|
350
|
+
}
|
|
351
|
+
if (planFixes !== undefined && typeof planFixes !== "function") {
|
|
352
|
+
throw new TypeError("Adapter returned an invalid fix provider");
|
|
353
|
+
}
|
|
354
|
+
const inspectFunction = inspect;
|
|
355
|
+
if (output === "observations") {
|
|
356
|
+
const collect = candidate.collect;
|
|
357
|
+
if (typeof collect !== "function") {
|
|
358
|
+
throw new TypeError("Adapter returned an invalid collect function");
|
|
359
|
+
}
|
|
360
|
+
return Object.freeze({
|
|
361
|
+
valid: true,
|
|
362
|
+
adapter: Object.freeze({
|
|
363
|
+
id,
|
|
364
|
+
output,
|
|
365
|
+
inspect: inspectFunction,
|
|
366
|
+
collect: collect,
|
|
367
|
+
...(planFixes === undefined
|
|
368
|
+
? {}
|
|
369
|
+
: { planFixes: planFixes }),
|
|
370
|
+
}),
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
if (output === "legacy-check-result" && id === "formatting") {
|
|
374
|
+
const runLegacy = candidate.runLegacy;
|
|
375
|
+
if (typeof runLegacy !== "function") {
|
|
376
|
+
throw new TypeError("Adapter returned an invalid legacy function");
|
|
377
|
+
}
|
|
378
|
+
return Object.freeze({
|
|
379
|
+
valid: true,
|
|
380
|
+
adapter: Object.freeze({
|
|
381
|
+
id,
|
|
382
|
+
output,
|
|
383
|
+
inspect: inspectFunction,
|
|
384
|
+
runLegacy: runLegacy,
|
|
385
|
+
...(planFixes === undefined
|
|
386
|
+
? {}
|
|
387
|
+
: { planFixes: planFixes }),
|
|
388
|
+
}),
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
throw new TypeError("Adapter returned an invalid output contract");
|
|
392
|
+
}
|
|
393
|
+
catch {
|
|
394
|
+
return Object.freeze({ valid: false, id });
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function snapshotApplicability(value) {
|
|
398
|
+
if (typeof value !== "object" || value === null) {
|
|
399
|
+
throw new TypeError("Adapter returned invalid applicability");
|
|
400
|
+
}
|
|
401
|
+
const candidate = value;
|
|
402
|
+
const applies = candidate.applies;
|
|
403
|
+
if (applies === false) {
|
|
404
|
+
const reason = candidate.reason;
|
|
405
|
+
if (typeof reason !== "string" ||
|
|
406
|
+
reason.length === 0 ||
|
|
407
|
+
reason.trim() !== reason ||
|
|
408
|
+
/[\u0000-\u001f\u007f]/u.test(reason)) {
|
|
409
|
+
throw new TypeError("Adapter returned an invalid skip reason");
|
|
410
|
+
}
|
|
411
|
+
return Object.freeze({
|
|
412
|
+
applies,
|
|
413
|
+
reason: displayProse(reason, "skip reason"),
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
if (applies !== true) {
|
|
417
|
+
throw new TypeError("Adapter returned invalid applicability");
|
|
418
|
+
}
|
|
419
|
+
const executionClass = candidate.executionClass;
|
|
420
|
+
const requiresBaseline = candidate.requiresBaseline;
|
|
421
|
+
const rawTargets = candidate.targets;
|
|
422
|
+
const rawDisclosure = candidate.networkDisclosure;
|
|
423
|
+
if ((executionClass !== "lightweight" &&
|
|
424
|
+
executionClass !== "project-analysis" &&
|
|
425
|
+
executionClass !== "network") ||
|
|
426
|
+
typeof requiresBaseline !== "boolean" ||
|
|
427
|
+
!Array.isArray(rawTargets)) {
|
|
428
|
+
throw new TypeError("Adapter returned invalid applicability");
|
|
429
|
+
}
|
|
430
|
+
const targets = Object.freeze(rawTargets
|
|
431
|
+
.map((target) => sanitizeCheckTarget(target))
|
|
432
|
+
.sort((left, right) => compareCodeUnits(left.id, right.id)));
|
|
433
|
+
let networkDisclosure;
|
|
434
|
+
if (rawDisclosure !== undefined) {
|
|
435
|
+
if (executionClass !== "network" ||
|
|
436
|
+
typeof rawDisclosure !== "object" ||
|
|
437
|
+
rawDisclosure === null) {
|
|
438
|
+
throw new TypeError("Adapter returned invalid network disclosure");
|
|
439
|
+
}
|
|
440
|
+
const disclosure = rawDisclosure;
|
|
441
|
+
if (!Array.isArray(disclosure.services) ||
|
|
442
|
+
!Array.isArray(disclosure.metadata)) {
|
|
443
|
+
throw new TypeError("Adapter returned invalid network disclosure");
|
|
444
|
+
}
|
|
445
|
+
const services = Object.freeze(disclosure.services.map((service) => displayProse(service, "network service")));
|
|
446
|
+
const metadata = Object.freeze(disclosure.metadata.map((field) => displayProse(field, "network metadata")));
|
|
447
|
+
if (services.length === 0 || metadata.length === 0) {
|
|
448
|
+
throw new TypeError("Adapter returned invalid network disclosure");
|
|
449
|
+
}
|
|
450
|
+
networkDisclosure = Object.freeze({ services, metadata });
|
|
451
|
+
}
|
|
452
|
+
return Object.freeze({
|
|
453
|
+
applies,
|
|
454
|
+
executionClass,
|
|
455
|
+
requiresBaseline,
|
|
456
|
+
targets,
|
|
457
|
+
...(networkDisclosure === undefined ? {} : { networkDisclosure }),
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
export async function dispatchChecks(adapters, context, options = {}) {
|
|
461
|
+
const clock = options.clock ?? performance.now.bind(performance);
|
|
462
|
+
const emit = (event) => {
|
|
463
|
+
try {
|
|
464
|
+
options.onEvent?.(event);
|
|
465
|
+
}
|
|
466
|
+
catch {
|
|
467
|
+
// Observers are display-only and must not change scan execution.
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
// Bounded producers retain only four active adapter inputs. Worker/class
|
|
471
|
+
// scheduling belongs to the shared executor, including its four-worker mode.
|
|
472
|
+
const limit = pLimit(4);
|
|
473
|
+
// Default installed metadata is reused only within this dispatch. Preserve
|
|
474
|
+
// injected resolvers' per-collection behavior and avoid all reads without cache.
|
|
475
|
+
const identities = new Map();
|
|
476
|
+
const executionOptions = options.cache === undefined || options.cacheEngineIdentity !== undefined
|
|
477
|
+
? options
|
|
478
|
+
: {
|
|
479
|
+
...options,
|
|
480
|
+
cacheEngineIdentity(checkId) {
|
|
481
|
+
if (!identities.has(checkId))
|
|
482
|
+
identities.set(checkId, observationCacheEngineIdentity(checkId));
|
|
483
|
+
return identities.get(checkId);
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
const adapterContext = adapterBaseContext(context);
|
|
487
|
+
const cacheKeyFor = createObservationCacheKeyBuilder(adapterContext.snapshots.baselineDir, adapterContext.snapshots.targetDir, adapterContext.snapshots.targetRef === "index"
|
|
488
|
+
? {
|
|
489
|
+
mode: "index",
|
|
490
|
+
baseline: adapterContext.snapshots.baselineRef,
|
|
491
|
+
target: "index",
|
|
492
|
+
}
|
|
493
|
+
: {
|
|
494
|
+
mode: "base",
|
|
495
|
+
baseline: adapterContext.snapshots.baselineRef,
|
|
496
|
+
target: adapterContext.snapshots.targetRef,
|
|
497
|
+
});
|
|
498
|
+
const scheduled = [];
|
|
499
|
+
const adapterSnapshots = adapters.map(snapshotAdapter);
|
|
500
|
+
for (const snapshot of adapterSnapshots) {
|
|
501
|
+
if (!snapshot.valid) {
|
|
502
|
+
const label = checkLabel(snapshot.id);
|
|
503
|
+
scheduled.push(Promise.resolve(executionResult(incompleteResult({
|
|
504
|
+
checkId: snapshot.id,
|
|
505
|
+
durationMs: 0,
|
|
506
|
+
code: "ADAPTER_INVALID",
|
|
507
|
+
message: `${label} has an invalid adapter definition.`,
|
|
508
|
+
remediation: "Check the installed Zedbee version and run zedbee doctor.",
|
|
509
|
+
}), null)));
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
const adapter = snapshot.adapter;
|
|
513
|
+
if (!mayBeEnabled(context, adapter.id)) {
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
let inspectPolicy;
|
|
517
|
+
try {
|
|
518
|
+
inspectPolicy = inspectionPolicy(context, adapter.id);
|
|
519
|
+
}
|
|
520
|
+
catch {
|
|
521
|
+
const label = checkLabel(adapter.id);
|
|
522
|
+
scheduled.push(Promise.resolve(executionResult(incompleteResult({
|
|
523
|
+
checkId: adapter.id,
|
|
524
|
+
durationMs: 0,
|
|
525
|
+
code: "POLICY_RESOLUTION_FAILED",
|
|
526
|
+
message: `${label} could not resolve its repository policy.`,
|
|
527
|
+
remediation: "Check the repository configuration and run zedbee doctor.",
|
|
528
|
+
}), null)));
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
if (inspectPolicy === undefined)
|
|
532
|
+
continue;
|
|
533
|
+
const inspectExecutionPolicy = immutablePolicy(adapter.id, inspectPolicy);
|
|
534
|
+
let applicability;
|
|
535
|
+
try {
|
|
536
|
+
applicability = snapshotApplicability(await Reflect.apply(adapter.inspect, undefined, [
|
|
537
|
+
inspectionContext(adapterContext, adapter.id, inspectPolicy),
|
|
538
|
+
]));
|
|
539
|
+
}
|
|
540
|
+
catch {
|
|
541
|
+
const label = checkLabel(adapter.id);
|
|
542
|
+
scheduled.push(Promise.resolve(executionResult(incompleteResult({
|
|
543
|
+
checkId: adapter.id,
|
|
544
|
+
durationMs: 0,
|
|
545
|
+
code: "ADAPTER_INSPECTION_FAILED",
|
|
546
|
+
message: `${label} could not determine whether it applies.`,
|
|
547
|
+
remediation: "Check the repository configuration and run zedbee doctor.",
|
|
548
|
+
}), null)));
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
if (!applicability.applies) {
|
|
552
|
+
scheduled.push(Promise.resolve(executionResult({
|
|
553
|
+
checkId: adapter.id,
|
|
554
|
+
status: "skipped",
|
|
555
|
+
durationMs: 0,
|
|
556
|
+
findings: [],
|
|
557
|
+
skipReason: applicability.reason,
|
|
558
|
+
}, inspectExecutionPolicy)));
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
const targets = applicability.targets;
|
|
562
|
+
if (targets.length === 0) {
|
|
563
|
+
const label = checkLabel(adapter.id);
|
|
564
|
+
scheduled.push(Promise.resolve(executionResult(incompleteResult({
|
|
565
|
+
checkId: adapter.id,
|
|
566
|
+
durationMs: 0,
|
|
567
|
+
code: "ADAPTER_TARGETS_MISSING",
|
|
568
|
+
message: `${label} could not determine which selected targets to analyze.`,
|
|
569
|
+
remediation: "Check the selected paths and repository configuration, then retry.",
|
|
570
|
+
}), null)));
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
for (const target of targets) {
|
|
574
|
+
let policy;
|
|
575
|
+
try {
|
|
576
|
+
const scheduledPolicy = resolveScheduledTargetPolicy(context.config, adapter.id, target, context.targetInspection, context.changeSet, adapterContext.policyForFile);
|
|
577
|
+
if (scheduledPolicy === undefined)
|
|
578
|
+
continue;
|
|
579
|
+
policy = scheduledPolicy;
|
|
580
|
+
}
|
|
581
|
+
catch {
|
|
582
|
+
const label = checkLabel(adapter.id);
|
|
583
|
+
const queuedAt = clock();
|
|
584
|
+
emit({
|
|
585
|
+
type: "check-queued",
|
|
586
|
+
checkId: adapter.id,
|
|
587
|
+
target: target.id,
|
|
588
|
+
timestamp: queuedAt,
|
|
589
|
+
});
|
|
590
|
+
const startedAt = clock();
|
|
591
|
+
emit({
|
|
592
|
+
type: "check-running",
|
|
593
|
+
checkId: adapter.id,
|
|
594
|
+
target: target.id,
|
|
595
|
+
timestamp: startedAt,
|
|
596
|
+
});
|
|
597
|
+
const result = incompleteResult({
|
|
598
|
+
checkId: adapter.id,
|
|
599
|
+
target: target.id,
|
|
600
|
+
durationMs: 0,
|
|
601
|
+
code: "TARGET_POLICY_FAILED",
|
|
602
|
+
message: `${label} could not resolve policy for ${target.id}.`,
|
|
603
|
+
remediation: "Check the target configuration and run zedbee doctor.",
|
|
604
|
+
});
|
|
605
|
+
const execution = executionResult(result, null, target);
|
|
606
|
+
emit({
|
|
607
|
+
type: "check-completed",
|
|
608
|
+
checkId: adapter.id,
|
|
609
|
+
target: target.id,
|
|
610
|
+
timestamp: clock(),
|
|
611
|
+
result: sanitizeCheckResult(result),
|
|
612
|
+
});
|
|
613
|
+
scheduled.push(Promise.resolve(execution));
|
|
614
|
+
continue;
|
|
615
|
+
}
|
|
616
|
+
const executionPolicy = immutablePolicy(adapter.id, policy);
|
|
617
|
+
if (applicability.networkDisclosure !== undefined) {
|
|
618
|
+
emit({
|
|
619
|
+
type: "network-disclosure",
|
|
620
|
+
checkId: adapter.id,
|
|
621
|
+
target: target.id,
|
|
622
|
+
timestamp: clock(),
|
|
623
|
+
services: applicability.networkDisclosure.services,
|
|
624
|
+
metadata: applicability.networkDisclosure.metadata,
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
emit({
|
|
628
|
+
type: "check-queued",
|
|
629
|
+
checkId: adapter.id,
|
|
630
|
+
target: target.id,
|
|
631
|
+
timestamp: clock(),
|
|
632
|
+
});
|
|
633
|
+
scheduled.push(limit(async () => {
|
|
634
|
+
const started = clock();
|
|
635
|
+
emit({
|
|
636
|
+
type: "check-running",
|
|
637
|
+
checkId: adapter.id,
|
|
638
|
+
target: target.id,
|
|
639
|
+
timestamp: started,
|
|
640
|
+
});
|
|
641
|
+
let result;
|
|
642
|
+
let runContext;
|
|
643
|
+
const durationMs = () => Math.max(0, clock() - started);
|
|
644
|
+
const label = checkLabel(adapter.id);
|
|
645
|
+
try {
|
|
646
|
+
adapterContext.signal.throwIfAborted();
|
|
647
|
+
runContext = scopedContext(adapterContext, adapter.id, target, executionPolicy);
|
|
648
|
+
const attributionContext = {
|
|
649
|
+
...adapterContext,
|
|
650
|
+
target,
|
|
651
|
+
policy: executionPolicy,
|
|
652
|
+
};
|
|
653
|
+
let adapterResult;
|
|
654
|
+
if (adapter.output === "observations") {
|
|
655
|
+
const checkId = adapter.id;
|
|
656
|
+
const observations = await collectObservations(adapter, runContext, FILE_BEHAVIOR_CHECKS.has(checkId)
|
|
657
|
+
? adapterContext.config.checks[checkId]
|
|
658
|
+
: runContext.policy, CHECK_IDS.includes(checkId)
|
|
659
|
+
? effectiveBehaviorFingerprint(adapterContext.config, checkId, cacheBehaviorPaths(checkId, target, adapterContext.baselineInspection, adapterContext.targetInspection), adapterContext.changeSet)
|
|
660
|
+
: undefined, executionOptions, cacheKeyFor);
|
|
661
|
+
try {
|
|
662
|
+
adapterResult = await observationCheckResult(adapter.id, observations, attributionContext, applicability.requiresBaseline);
|
|
663
|
+
}
|
|
664
|
+
catch {
|
|
665
|
+
adapterResult = undefined;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
else {
|
|
669
|
+
adapterResult = await Reflect.apply(adapter.runLegacy, undefined, [runContext]);
|
|
670
|
+
}
|
|
671
|
+
if (adapterResult === undefined) {
|
|
672
|
+
result = incompleteResult({
|
|
673
|
+
checkId: adapter.id,
|
|
674
|
+
target: target.id,
|
|
675
|
+
durationMs: durationMs(),
|
|
676
|
+
code: "ADAPTER_RESULT_INVALID",
|
|
677
|
+
message: `${label} returned an invalid result for ${target.id === "." ? "the repository root" : target.id}.`,
|
|
678
|
+
remediation: "Run zedbee doctor and update Zedbee before retrying.",
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
try {
|
|
683
|
+
result = sanitizeCheckResult(adapterResult, {
|
|
684
|
+
checkId: adapter.id,
|
|
685
|
+
target: target.id,
|
|
686
|
+
durationMs: durationMs(),
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
catch {
|
|
690
|
+
result = incompleteResult({
|
|
691
|
+
checkId: adapter.id,
|
|
692
|
+
target: target.id,
|
|
693
|
+
durationMs: durationMs(),
|
|
694
|
+
code: "ADAPTER_RESULT_INVALID",
|
|
695
|
+
message: `${label} returned an invalid result for ${target.id === "." ? "the repository root" : target.id}.`,
|
|
696
|
+
remediation: "Run zedbee doctor and update Zedbee before retrying.",
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
catch (error) {
|
|
702
|
+
result =
|
|
703
|
+
error instanceof CheckIncompleteError
|
|
704
|
+
? incompleteResult({
|
|
705
|
+
checkId: adapter.id,
|
|
706
|
+
target: target.id,
|
|
707
|
+
durationMs: durationMs(),
|
|
708
|
+
code: error.code,
|
|
709
|
+
message: error.message,
|
|
710
|
+
remediation: error.remediation,
|
|
711
|
+
...(error.diagnostic === undefined
|
|
712
|
+
? {}
|
|
713
|
+
: { diagnostic: error.diagnostic }),
|
|
714
|
+
...(error.path === undefined ? {} : { path: error.path }),
|
|
715
|
+
...(error.paths === undefined
|
|
716
|
+
? {}
|
|
717
|
+
: { paths: error.paths }),
|
|
718
|
+
...(error.snapshot === undefined
|
|
719
|
+
? {}
|
|
720
|
+
: { snapshot: error.snapshot }),
|
|
721
|
+
...(error.projectPaths === undefined
|
|
722
|
+
? {}
|
|
723
|
+
: { projectPaths: error.projectPaths }),
|
|
724
|
+
...(error.disposition === undefined
|
|
725
|
+
? {}
|
|
726
|
+
: { disposition: error.disposition }),
|
|
727
|
+
})
|
|
728
|
+
: incompleteResult({
|
|
729
|
+
checkId: adapter.id,
|
|
730
|
+
target: target.id,
|
|
731
|
+
durationMs: durationMs(),
|
|
732
|
+
code: "ADAPTER_EXECUTION_FAILED",
|
|
733
|
+
...(error instanceof AnalyzerJobError
|
|
734
|
+
? { diagnostic: error.diagnostic }
|
|
735
|
+
: {}),
|
|
736
|
+
message: `${label} could not analyze ${target.id === "." ? "the repository root" : target.id}.`,
|
|
737
|
+
remediation: "Check the analyzer installation and selected input, then retry.",
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
const policyDisplayResult = displayResultForPolicy(result, executionPolicy, adapterContext.policyForFile);
|
|
741
|
+
let displayResult = policyDisplayResult ?? sanitizeCheckResult(result);
|
|
742
|
+
let fixCandidates;
|
|
743
|
+
if (options.collectFixes === true &&
|
|
744
|
+
adapter.planFixes !== undefined &&
|
|
745
|
+
policyDisplayResult?.status === "completed" &&
|
|
746
|
+
policyDisplayResult.findings.length > 0 &&
|
|
747
|
+
runContext !== undefined) {
|
|
748
|
+
try {
|
|
749
|
+
fixCandidates = sanitizeFixCandidates(await Reflect.apply(adapter.planFixes, undefined, [
|
|
750
|
+
runContext,
|
|
751
|
+
policyDisplayResult.findings,
|
|
752
|
+
]), {
|
|
753
|
+
checkId: adapter.id,
|
|
754
|
+
findingIds: policyDisplayResult.findings.map((finding) => finding.id),
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
catch (error) {
|
|
758
|
+
result = incompleteResult({
|
|
759
|
+
checkId: adapter.id,
|
|
760
|
+
target: target.id,
|
|
761
|
+
durationMs: durationMs(),
|
|
762
|
+
code: "FIX_PROVIDER_FAILED",
|
|
763
|
+
...(error instanceof AnalyzerJobError ||
|
|
764
|
+
error instanceof CheckIncompleteError
|
|
765
|
+
? error.diagnostic === undefined
|
|
766
|
+
? {}
|
|
767
|
+
: { diagnostic: error.diagnostic }
|
|
768
|
+
: {}),
|
|
769
|
+
message: `${label} could not prepare managed fixes.`,
|
|
770
|
+
remediation: "Update Zedbee or inspect the managed rule compatibility before retrying.",
|
|
771
|
+
});
|
|
772
|
+
displayResult =
|
|
773
|
+
displayResultForPolicy(result, executionPolicy, adapterContext.policyForFile) ?? sanitizeCheckResult(result);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
emit({
|
|
777
|
+
type: "check-completed",
|
|
778
|
+
checkId: adapter.id,
|
|
779
|
+
target: target.id,
|
|
780
|
+
timestamp: clock(),
|
|
781
|
+
result: sanitizeCheckResult(displayResult),
|
|
782
|
+
});
|
|
783
|
+
return executionResult(result, executionPolicy, target, adapterContext.policyForFile, fixCandidates);
|
|
784
|
+
}));
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
return (await Promise.all(scheduled)).sort(compareResults);
|
|
788
|
+
}
|
|
789
|
+
//# sourceMappingURL=dispatcher.js.map
|