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,646 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { constants } from "node:fs";
|
|
3
|
+
import { link, lstat, mkdir, open, readdir, realpath, rename, unlink, } from "node:fs/promises";
|
|
4
|
+
import { tmpdir, userInfo } from "node:os";
|
|
5
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
6
|
+
import { performance } from "node:perf_hooks";
|
|
7
|
+
import { validateTemporaryReportPath } from "./report-path.js";
|
|
8
|
+
const STATE_FILE_NAME = ".lifecycle.json";
|
|
9
|
+
const MAX_STATE_BYTES = 1024 * 1024;
|
|
10
|
+
const MAX_STATE_REPORTS = 10_000;
|
|
11
|
+
const LOCK_FILE_NAME = ".lifecycle.lock";
|
|
12
|
+
const LOCK_TIMEOUT_MS = 2_000;
|
|
13
|
+
const LOCK_RETRY_MS = 25;
|
|
14
|
+
const REPORT_NAME = /^zedbee-(?:scan-report|fix-plan)-[0-9]{14}(?:-[0-9]+)?\.json$/u;
|
|
15
|
+
function userNamespace(identity) {
|
|
16
|
+
if (Number.isSafeInteger(identity.uid) && identity.uid >= 0) {
|
|
17
|
+
return `zedbee-u${identity.uid}`;
|
|
18
|
+
}
|
|
19
|
+
if (typeof identity.username !== "string" || identity.username.length === 0) {
|
|
20
|
+
throw new TypeError("Unable to resolve temporary-report user identity");
|
|
21
|
+
}
|
|
22
|
+
return `zedbee-user-${createHash("sha256")
|
|
23
|
+
.update(identity.username, "utf8")
|
|
24
|
+
.digest("hex")
|
|
25
|
+
.slice(0, 32)}`;
|
|
26
|
+
}
|
|
27
|
+
function reportTimestamp(nowMs) {
|
|
28
|
+
const date = new Date(nowMs);
|
|
29
|
+
const year = date.getFullYear();
|
|
30
|
+
if (!Number.isInteger(year) || year < 0 || year > 9_999) {
|
|
31
|
+
throw new TypeError("Invalid temporary-report clock");
|
|
32
|
+
}
|
|
33
|
+
return [
|
|
34
|
+
String(year).padStart(4, "0"),
|
|
35
|
+
String(date.getMonth() + 1).padStart(2, "0"),
|
|
36
|
+
String(date.getDate()).padStart(2, "0"),
|
|
37
|
+
String(date.getHours()).padStart(2, "0"),
|
|
38
|
+
String(date.getMinutes()).padStart(2, "0"),
|
|
39
|
+
String(date.getSeconds()).padStart(2, "0"),
|
|
40
|
+
].join("");
|
|
41
|
+
}
|
|
42
|
+
function warning(code, message, path) {
|
|
43
|
+
let validatedPath;
|
|
44
|
+
if (path !== undefined) {
|
|
45
|
+
try {
|
|
46
|
+
validatedPath = validateTemporaryReportPath(path);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
validatedPath = undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return Object.freeze({
|
|
53
|
+
code,
|
|
54
|
+
message,
|
|
55
|
+
...(validatedPath === undefined ? {} : { path: validatedPath }),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function result(warnings, reportPath) {
|
|
59
|
+
return Object.freeze({
|
|
60
|
+
...(reportPath === undefined ? {} : { reportPath }),
|
|
61
|
+
warnings: Object.freeze([...warnings]),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function errorCode(error) {
|
|
65
|
+
if (typeof error === "object" &&
|
|
66
|
+
error !== null &&
|
|
67
|
+
"code" in error &&
|
|
68
|
+
typeof error.code === "string") {
|
|
69
|
+
return error.code;
|
|
70
|
+
}
|
|
71
|
+
return "UNKNOWN";
|
|
72
|
+
}
|
|
73
|
+
async function ensureManagedDirectory(canonicalParent, name, platform = process.platform) {
|
|
74
|
+
const path = join(canonicalParent, name);
|
|
75
|
+
await mkdir(path, { mode: 0o700 }).catch((error) => {
|
|
76
|
+
if (errorCode(error) !== "EEXIST")
|
|
77
|
+
throw error;
|
|
78
|
+
});
|
|
79
|
+
const expected = await lstat(path);
|
|
80
|
+
if (!expected.isDirectory() || expected.isSymbolicLink()) {
|
|
81
|
+
throw new TypeError("Managed temporary-report boundary is not a directory");
|
|
82
|
+
}
|
|
83
|
+
if (platform === "win32") {
|
|
84
|
+
const canonicalPath = await realpath(path);
|
|
85
|
+
const current = await lstat(path);
|
|
86
|
+
if (current.isSymbolicLink() ||
|
|
87
|
+
!current.isDirectory() ||
|
|
88
|
+
current.dev !== expected.dev ||
|
|
89
|
+
current.ino !== expected.ino ||
|
|
90
|
+
dirname(canonicalPath) !== canonicalParent) {
|
|
91
|
+
throw new TypeError("Managed temporary-report boundary escapes its parent");
|
|
92
|
+
}
|
|
93
|
+
return canonicalPath;
|
|
94
|
+
}
|
|
95
|
+
const handle = await open(path, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);
|
|
96
|
+
try {
|
|
97
|
+
const opened = await handle.stat();
|
|
98
|
+
if (!opened.isDirectory() ||
|
|
99
|
+
opened.dev !== expected.dev ||
|
|
100
|
+
opened.ino !== expected.ino) {
|
|
101
|
+
throw new TypeError("Managed temporary-report boundary changed");
|
|
102
|
+
}
|
|
103
|
+
await handle.chmod(0o700);
|
|
104
|
+
const canonicalPath = await realpath(path);
|
|
105
|
+
const current = await lstat(path);
|
|
106
|
+
if (current.isSymbolicLink() ||
|
|
107
|
+
!current.isDirectory() ||
|
|
108
|
+
current.dev !== opened.dev ||
|
|
109
|
+
current.ino !== opened.ino ||
|
|
110
|
+
dirname(canonicalPath) !== canonicalParent) {
|
|
111
|
+
throw new TypeError("Managed temporary-report boundary escapes its parent");
|
|
112
|
+
}
|
|
113
|
+
return canonicalPath;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
await handle.close();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export async function syncTemporaryReportDirectory(directory, platform = process.platform) {
|
|
120
|
+
if (platform === "win32")
|
|
121
|
+
return;
|
|
122
|
+
const handle = await open(directory, "r");
|
|
123
|
+
try {
|
|
124
|
+
await handle.sync();
|
|
125
|
+
}
|
|
126
|
+
finally {
|
|
127
|
+
await handle.close();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async function atomicReplace(directory, destination, contents, warnings) {
|
|
131
|
+
const temporary = join(directory, `.write-${randomUUID()}.tmp`);
|
|
132
|
+
let handle = await open(temporary, "wx", 0o600);
|
|
133
|
+
let renamed = false;
|
|
134
|
+
try {
|
|
135
|
+
await handle.chmod(0o600);
|
|
136
|
+
await handle.writeFile(contents, "utf8");
|
|
137
|
+
await handle.sync();
|
|
138
|
+
await handle.close();
|
|
139
|
+
handle = undefined;
|
|
140
|
+
await rename(temporary, destination);
|
|
141
|
+
renamed = true;
|
|
142
|
+
await syncTemporaryReportDirectory(directory);
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
await handle?.close().catch((error) => {
|
|
146
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `An atomic temporary file could not be closed (${errorCode(error)}).`));
|
|
147
|
+
});
|
|
148
|
+
if (!renamed) {
|
|
149
|
+
await unlink(temporary).catch((error) => {
|
|
150
|
+
if (errorCode(error) !== "ENOENT") {
|
|
151
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `An atomic temporary file could not be removed (${errorCode(error)}).`));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
class LockTimeoutError extends Error {
|
|
158
|
+
path;
|
|
159
|
+
code = "LOCK_TIMEOUT";
|
|
160
|
+
constructor(message, path) {
|
|
161
|
+
super(message);
|
|
162
|
+
this.path = path;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
class StateLimitError extends Error {
|
|
166
|
+
code = "STATE_LIMIT";
|
|
167
|
+
}
|
|
168
|
+
function wait(milliseconds) {
|
|
169
|
+
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
170
|
+
}
|
|
171
|
+
async function acquireLock(repositoryDirectory, warnings) {
|
|
172
|
+
const path = join(repositoryDirectory, LOCK_FILE_NAME);
|
|
173
|
+
const deadline = performance.now() + LOCK_TIMEOUT_MS;
|
|
174
|
+
for (;;) {
|
|
175
|
+
let handle;
|
|
176
|
+
try {
|
|
177
|
+
handle = await open(path, "wx", 0o600);
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
if (errorCode(error) !== "EEXIST")
|
|
181
|
+
throw error;
|
|
182
|
+
const remaining = deadline - performance.now();
|
|
183
|
+
if (remaining <= 0) {
|
|
184
|
+
let actionablePath;
|
|
185
|
+
try {
|
|
186
|
+
const metadata = await lstat(path);
|
|
187
|
+
if (metadata.isFile() && !metadata.isSymbolicLink()) {
|
|
188
|
+
actionablePath = validateTemporaryReportPath(path);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
actionablePath = undefined;
|
|
193
|
+
}
|
|
194
|
+
throw new LockTimeoutError("Temporary-report lock timed out", actionablePath);
|
|
195
|
+
}
|
|
196
|
+
await wait(Math.min(LOCK_RETRY_MS, remaining));
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
let metadata;
|
|
200
|
+
try {
|
|
201
|
+
metadata = await handle.stat();
|
|
202
|
+
await handle.chmod(0o600);
|
|
203
|
+
await handle.sync();
|
|
204
|
+
return {
|
|
205
|
+
handle,
|
|
206
|
+
path,
|
|
207
|
+
device: metadata.dev,
|
|
208
|
+
inode: metadata.ino,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
if (metadata !== undefined) {
|
|
213
|
+
await releaseLock({
|
|
214
|
+
handle,
|
|
215
|
+
path,
|
|
216
|
+
device: metadata.dev,
|
|
217
|
+
inode: metadata.ino,
|
|
218
|
+
}, warnings);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
await handle.close().catch((closeError) => {
|
|
222
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A failed lock handle could not be closed (${errorCode(closeError)}).`));
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
async function releaseLock(lock, warnings) {
|
|
230
|
+
try {
|
|
231
|
+
let current;
|
|
232
|
+
try {
|
|
233
|
+
current = await lstat(lock.path);
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `The owned temporary-report lock could not be validated (${errorCode(error)}).`));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (current.isSymbolicLink() ||
|
|
240
|
+
!current.isFile() ||
|
|
241
|
+
current.dev !== lock.device ||
|
|
242
|
+
current.ino !== lock.inode) {
|
|
243
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", "The owned temporary-report lock identity changed and was left untouched."));
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
try {
|
|
247
|
+
await unlink(lock.path);
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `The validated temporary-report lock could not be removed (${errorCode(error)}).`, lock.path));
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
await syncTemporaryReportDirectory(dirname(lock.path));
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `The released lock directory could not be synchronized (${errorCode(error)}).`));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
await lock.handle.close().catch((error) => {
|
|
262
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `The owned temporary-report lock could not be closed (${errorCode(error)}).`));
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function parseState(serialized) {
|
|
267
|
+
const value = JSON.parse(serialized);
|
|
268
|
+
if (value === null || typeof value !== "object") {
|
|
269
|
+
throw new TypeError("Invalid temporary-report lifecycle state");
|
|
270
|
+
}
|
|
271
|
+
if (value.schemaVersion === 1) {
|
|
272
|
+
if (!hasOnlyKeys(value, ["schemaVersion", "generation", "reports"]) ||
|
|
273
|
+
!Number.isSafeInteger(value.generation) ||
|
|
274
|
+
value.generation < 1 ||
|
|
275
|
+
value.generation >= Number.MAX_SAFE_INTEGER ||
|
|
276
|
+
!Array.isArray(value.reports) ||
|
|
277
|
+
value.reports.length > MAX_STATE_REPORTS ||
|
|
278
|
+
value.reports.some((report) => typeof report !== "object" ||
|
|
279
|
+
report === null ||
|
|
280
|
+
!hasOnlyKeys(report, ["fileName", "createdGeneration"]) ||
|
|
281
|
+
typeof report.fileName !== "string" ||
|
|
282
|
+
basename(report.fileName) !== report.fileName ||
|
|
283
|
+
!REPORT_NAME.test(report.fileName) ||
|
|
284
|
+
!Number.isSafeInteger(report.createdGeneration) ||
|
|
285
|
+
report.createdGeneration < 1 ||
|
|
286
|
+
report.createdGeneration > value.generation)) {
|
|
287
|
+
throw new TypeError("Invalid temporary-report lifecycle state");
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else if (value.schemaVersion === 2) {
|
|
291
|
+
if (!hasOnlyKeys(value, ["schemaVersion", "reports"]) ||
|
|
292
|
+
!Array.isArray(value.reports) ||
|
|
293
|
+
value.reports.length > MAX_STATE_REPORTS ||
|
|
294
|
+
value.reports.some((report) => typeof report !== "object" ||
|
|
295
|
+
report === null ||
|
|
296
|
+
!hasOnlyKeys(report, ["fileName", "createdAtMs"]) ||
|
|
297
|
+
typeof report.fileName !== "string" ||
|
|
298
|
+
basename(report.fileName) !== report.fileName ||
|
|
299
|
+
!REPORT_NAME.test(report.fileName) ||
|
|
300
|
+
!Number.isSafeInteger(report.createdAtMs) ||
|
|
301
|
+
report.createdAtMs < 0)) {
|
|
302
|
+
throw new TypeError("Invalid temporary-report lifecycle state");
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
throw new TypeError("Invalid temporary-report lifecycle state");
|
|
307
|
+
}
|
|
308
|
+
const reports = value.reports;
|
|
309
|
+
if (new Set(reports.map((report) => report.fileName)).size !== reports.length) {
|
|
310
|
+
throw new TypeError("Duplicate temporary-report lifecycle entry");
|
|
311
|
+
}
|
|
312
|
+
return value;
|
|
313
|
+
}
|
|
314
|
+
function serializeState(state) {
|
|
315
|
+
if (state.reports.length > MAX_STATE_REPORTS) {
|
|
316
|
+
throw new StateLimitError("Temporary-report lifecycle record limit reached");
|
|
317
|
+
}
|
|
318
|
+
const serialized = `${JSON.stringify(state)}\n`;
|
|
319
|
+
if (Buffer.byteLength(serialized, "utf8") > MAX_STATE_BYTES) {
|
|
320
|
+
throw new StateLimitError("Temporary-report lifecycle byte limit reached");
|
|
321
|
+
}
|
|
322
|
+
return serialized;
|
|
323
|
+
}
|
|
324
|
+
function hasOnlyKeys(value, expected) {
|
|
325
|
+
const keys = Object.keys(value);
|
|
326
|
+
return (keys.length === expected.length &&
|
|
327
|
+
expected.every((key) => Object.prototype.hasOwnProperty.call(value, key)));
|
|
328
|
+
}
|
|
329
|
+
async function readBoundedRegularFile(path) {
|
|
330
|
+
const expected = await lstat(path);
|
|
331
|
+
if (expected.isSymbolicLink() ||
|
|
332
|
+
!expected.isFile() ||
|
|
333
|
+
expected.size > MAX_STATE_BYTES) {
|
|
334
|
+
throw new TypeError("Invalid temporary-report lifecycle file");
|
|
335
|
+
}
|
|
336
|
+
const handle = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
337
|
+
try {
|
|
338
|
+
const metadata = await handle.stat();
|
|
339
|
+
if (!metadata.isFile() ||
|
|
340
|
+
metadata.size > MAX_STATE_BYTES ||
|
|
341
|
+
metadata.dev !== expected.dev ||
|
|
342
|
+
metadata.ino !== expected.ino) {
|
|
343
|
+
throw new TypeError("Invalid temporary-report lifecycle file");
|
|
344
|
+
}
|
|
345
|
+
const capacity = Math.min(metadata.size + 1, MAX_STATE_BYTES + 1);
|
|
346
|
+
const buffer = Buffer.alloc(capacity);
|
|
347
|
+
let offset = 0;
|
|
348
|
+
while (offset < buffer.length) {
|
|
349
|
+
const { bytesRead } = await handle.read(buffer, offset, buffer.length - offset, offset);
|
|
350
|
+
if (bytesRead === 0)
|
|
351
|
+
break;
|
|
352
|
+
offset += bytesRead;
|
|
353
|
+
}
|
|
354
|
+
if (offset > MAX_STATE_BYTES || offset > metadata.size) {
|
|
355
|
+
throw new TypeError("Temporary-report lifecycle file changed while read");
|
|
356
|
+
}
|
|
357
|
+
return buffer.subarray(0, offset).toString("utf8");
|
|
358
|
+
}
|
|
359
|
+
finally {
|
|
360
|
+
await handle.close();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async function loadState(repositoryDirectory, warnings, nowMs) {
|
|
364
|
+
try {
|
|
365
|
+
const parsed = parseState(await readBoundedRegularFile(join(repositoryDirectory, STATE_FILE_NAME)));
|
|
366
|
+
if (parsed.schemaVersion === 2)
|
|
367
|
+
return parsed;
|
|
368
|
+
const reports = [];
|
|
369
|
+
for (const report of parsed.reports) {
|
|
370
|
+
const path = trackedReportPath(repositoryDirectory, report.fileName);
|
|
371
|
+
let createdAtMs = nowMs;
|
|
372
|
+
if (path !== undefined) {
|
|
373
|
+
try {
|
|
374
|
+
const metadata = await lstat(path);
|
|
375
|
+
if (metadata.isFile() &&
|
|
376
|
+
!metadata.isSymbolicLink() &&
|
|
377
|
+
Number.isSafeInteger(metadata.mtimeMs) &&
|
|
378
|
+
metadata.mtimeMs >= 0) {
|
|
379
|
+
createdAtMs = Math.min(metadata.mtimeMs, nowMs);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
// Preserve the tracked entry with a fresh age; cleanup validates it later.
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
reports.push({ fileName: report.fileName, createdAtMs });
|
|
387
|
+
}
|
|
388
|
+
return { schemaVersion: 2, reports };
|
|
389
|
+
}
|
|
390
|
+
catch (error) {
|
|
391
|
+
if (errorCode(error) === "ENOENT") {
|
|
392
|
+
const entries = await readdir(repositoryDirectory).catch(() => undefined);
|
|
393
|
+
if (entries !== undefined &&
|
|
394
|
+
entries.length === 1 &&
|
|
395
|
+
entries[0] === LOCK_FILE_NAME) {
|
|
396
|
+
return { schemaVersion: 2, reports: [] };
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `Temporary-report lifecycle state was unavailable (${errorCode(error)}); unknown entries were left untouched.`));
|
|
400
|
+
return { schemaVersion: 2, reports: [] };
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
async function rollbackReport(reportPath, warnings) {
|
|
404
|
+
try {
|
|
405
|
+
const metadata = await lstat(reportPath);
|
|
406
|
+
if (!metadata.isFile() || metadata.isSymbolicLink()) {
|
|
407
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", "A newly written report changed type and was left untouched."));
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
catch (error) {
|
|
412
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A newly written report could not be validated for rollback (${errorCode(error)}).`));
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
try {
|
|
416
|
+
await unlink(reportPath);
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A newly written report could not be rolled back (${errorCode(error)}).`, reportPath));
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
try {
|
|
423
|
+
await syncTemporaryReportDirectory(dirname(reportPath));
|
|
424
|
+
}
|
|
425
|
+
catch (error) {
|
|
426
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A rolled-back report's directory could not be synchronized (${errorCode(error)}).`));
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async function writeUniqueReport(repositoryDirectory, json, reportKind, nowMs, warnings) {
|
|
430
|
+
const temporary = join(repositoryDirectory, `.report-${randomUUID()}.tmp`);
|
|
431
|
+
let handle = await open(temporary, "wx", 0o600);
|
|
432
|
+
let publishedPath;
|
|
433
|
+
let cleanupAttempted = false;
|
|
434
|
+
try {
|
|
435
|
+
await handle.chmod(0o600);
|
|
436
|
+
await handle.writeFile(json, "utf8");
|
|
437
|
+
await handle.sync();
|
|
438
|
+
await handle.close();
|
|
439
|
+
handle = undefined;
|
|
440
|
+
const stem = `zedbee-${reportKind}-${reportTimestamp(nowMs)}`;
|
|
441
|
+
for (let attempt = 0; attempt < MAX_STATE_REPORTS; attempt += 1) {
|
|
442
|
+
const fileName = `${stem}${attempt === 0 ? "" : `-${attempt + 1}`}.json`;
|
|
443
|
+
const path = trackedReportPath(repositoryDirectory, fileName);
|
|
444
|
+
if (path === undefined) {
|
|
445
|
+
throw new TypeError("Invalid generated report name");
|
|
446
|
+
}
|
|
447
|
+
validateTemporaryReportPath(path);
|
|
448
|
+
try {
|
|
449
|
+
await link(temporary, path);
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
if (errorCode(error) === "EEXIST")
|
|
453
|
+
continue;
|
|
454
|
+
throw error;
|
|
455
|
+
}
|
|
456
|
+
publishedPath = path;
|
|
457
|
+
await syncTemporaryReportDirectory(repositoryDirectory);
|
|
458
|
+
cleanupAttempted = true;
|
|
459
|
+
await removeReportTemporary(temporary, repositoryDirectory, warnings);
|
|
460
|
+
return { fileName, path };
|
|
461
|
+
}
|
|
462
|
+
throw new Error("Unable to allocate a unique temporary-report name");
|
|
463
|
+
}
|
|
464
|
+
catch (error) {
|
|
465
|
+
if (publishedPath !== undefined) {
|
|
466
|
+
await rollbackReport(publishedPath, warnings);
|
|
467
|
+
}
|
|
468
|
+
throw error;
|
|
469
|
+
}
|
|
470
|
+
finally {
|
|
471
|
+
await handle?.close().catch((closeError) => {
|
|
472
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A report temporary file could not be closed (${errorCode(closeError)}).`));
|
|
473
|
+
});
|
|
474
|
+
if (!cleanupAttempted) {
|
|
475
|
+
await removeReportTemporary(temporary, repositoryDirectory, warnings);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
async function removeReportTemporary(temporary, repositoryDirectory, warnings) {
|
|
480
|
+
try {
|
|
481
|
+
await unlink(temporary);
|
|
482
|
+
}
|
|
483
|
+
catch (error) {
|
|
484
|
+
if (errorCode(error) !== "ENOENT") {
|
|
485
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A report temporary file could not be removed (${errorCode(error)}).`));
|
|
486
|
+
}
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
try {
|
|
490
|
+
await syncTemporaryReportDirectory(repositoryDirectory);
|
|
491
|
+
}
|
|
492
|
+
catch (error) {
|
|
493
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A report temporary-file removal could not be synchronized (${errorCode(error)}).`));
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
function trackedReportPath(repositoryDirectory, fileName) {
|
|
497
|
+
if (basename(fileName) !== fileName || !REPORT_NAME.test(fileName)) {
|
|
498
|
+
return undefined;
|
|
499
|
+
}
|
|
500
|
+
const path = resolve(repositoryDirectory, fileName);
|
|
501
|
+
return dirname(path) === repositoryDirectory ? path : undefined;
|
|
502
|
+
}
|
|
503
|
+
async function removeExpiredReports(repositoryDirectory, reports, nowMs, maxAgeMs, warnings) {
|
|
504
|
+
const retained = [];
|
|
505
|
+
for (const report of reports) {
|
|
506
|
+
if (nowMs - report.createdAtMs < maxAgeMs) {
|
|
507
|
+
retained.push(report);
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
const path = trackedReportPath(repositoryDirectory, report.fileName);
|
|
511
|
+
if (path === undefined) {
|
|
512
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", "An invalid lifecycle entry was ignored and no file was removed."));
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
let metadata;
|
|
516
|
+
try {
|
|
517
|
+
metadata = await lstat(path);
|
|
518
|
+
}
|
|
519
|
+
catch (error) {
|
|
520
|
+
if (errorCode(error) === "ENOENT")
|
|
521
|
+
continue;
|
|
522
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A tracked report could not be validated and was left untouched (${errorCode(error)}).`));
|
|
523
|
+
retained.push(report);
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
if (!metadata.isFile() || metadata.isSymbolicLink()) {
|
|
527
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", "A tracked report was not a regular file and was left untouched."));
|
|
528
|
+
retained.push(report);
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
await unlink(path);
|
|
533
|
+
}
|
|
534
|
+
catch (error) {
|
|
535
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A validated tracked report could not be removed (${errorCode(error)}).`, path));
|
|
536
|
+
retained.push(report);
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
try {
|
|
540
|
+
await syncTemporaryReportDirectory(repositoryDirectory);
|
|
541
|
+
}
|
|
542
|
+
catch (error) {
|
|
543
|
+
warnings.push(warning("TEMP_REPORT_CLEANUP_FAILED", `A removed report's directory could not be synchronized (${errorCode(error)}).`));
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return retained;
|
|
547
|
+
}
|
|
548
|
+
export function createTemporaryReportStore(options) {
|
|
549
|
+
const configuredTemporaryRoot = options?.temporaryRoot ?? tmpdir();
|
|
550
|
+
const configuredUserIdentity = options?.userIdentity;
|
|
551
|
+
const now = options?.now ?? Date.now;
|
|
552
|
+
const platform = options?.platform ?? process.platform;
|
|
553
|
+
return Object.freeze({
|
|
554
|
+
async maintain(request) {
|
|
555
|
+
const warnings = [];
|
|
556
|
+
let reportPath;
|
|
557
|
+
let ownedLock;
|
|
558
|
+
try {
|
|
559
|
+
if (!Number.isSafeInteger(request.maxAgeMs) || request.maxAgeMs < 0) {
|
|
560
|
+
throw new TypeError("Invalid temporary-report maximum age");
|
|
561
|
+
}
|
|
562
|
+
const nowMs = now();
|
|
563
|
+
if (!Number.isSafeInteger(nowMs) || nowMs < 0) {
|
|
564
|
+
throw new TypeError("Invalid temporary-report clock");
|
|
565
|
+
}
|
|
566
|
+
const [canonicalTemporaryRoot, canonicalRepositoryRoot] = await Promise.all([
|
|
567
|
+
realpath(configuredTemporaryRoot),
|
|
568
|
+
realpath(request.repositoryRoot),
|
|
569
|
+
]);
|
|
570
|
+
const reportsRoot = await ensureManagedDirectory(canonicalTemporaryRoot, userNamespace(configuredUserIdentity ?? userInfo()), platform);
|
|
571
|
+
const repositoryHash = createHash("sha256")
|
|
572
|
+
.update(canonicalRepositoryRoot, "utf8")
|
|
573
|
+
.digest("hex")
|
|
574
|
+
.slice(0, 32);
|
|
575
|
+
const repositoryDirectory = await ensureManagedDirectory(reportsRoot, repositoryHash, platform);
|
|
576
|
+
ownedLock = await acquireLock(repositoryDirectory, warnings);
|
|
577
|
+
const previousState = await loadState(repositoryDirectory, warnings, nowMs);
|
|
578
|
+
const reports = [
|
|
579
|
+
...(await removeExpiredReports(repositoryDirectory, previousState.reports, nowMs, request.maxAgeMs, warnings)),
|
|
580
|
+
];
|
|
581
|
+
if (request.json !== undefined) {
|
|
582
|
+
const reportKind = request.reportKind ?? "scan-report";
|
|
583
|
+
let hasCapacity = true;
|
|
584
|
+
const capacityProbe = {
|
|
585
|
+
schemaVersion: 2,
|
|
586
|
+
reports: [
|
|
587
|
+
...reports,
|
|
588
|
+
{
|
|
589
|
+
fileName: `zedbee-${reportKind}-${reportTimestamp(nowMs)}.json`,
|
|
590
|
+
createdAtMs: nowMs,
|
|
591
|
+
},
|
|
592
|
+
],
|
|
593
|
+
};
|
|
594
|
+
try {
|
|
595
|
+
serializeState(capacityProbe);
|
|
596
|
+
}
|
|
597
|
+
catch (error) {
|
|
598
|
+
hasCapacity = false;
|
|
599
|
+
warnings.push(warning("TEMP_REPORT_WRITE_FAILED", `The temporary report could not be written (${errorCode(error)}).`));
|
|
600
|
+
}
|
|
601
|
+
if (hasCapacity) {
|
|
602
|
+
try {
|
|
603
|
+
const report = await writeUniqueReport(repositoryDirectory, request.json, reportKind, nowMs, warnings);
|
|
604
|
+
reportPath = report.path;
|
|
605
|
+
reports.push({
|
|
606
|
+
fileName: report.fileName,
|
|
607
|
+
createdAtMs: nowMs,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
catch (error) {
|
|
611
|
+
warnings.push(warning("TEMP_REPORT_WRITE_FAILED", `The temporary report could not be written (${errorCode(error)}).`));
|
|
612
|
+
reportPath = undefined;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
const nextState = {
|
|
617
|
+
schemaVersion: 2,
|
|
618
|
+
reports,
|
|
619
|
+
};
|
|
620
|
+
try {
|
|
621
|
+
await atomicReplace(repositoryDirectory, join(repositoryDirectory, STATE_FILE_NAME), serializeState(nextState), warnings);
|
|
622
|
+
}
|
|
623
|
+
catch (error) {
|
|
624
|
+
warnings.push(warning("TEMP_REPORT_WRITE_FAILED", `Temporary-report lifecycle state could not be persisted (${errorCode(error)}).`));
|
|
625
|
+
if (reportPath !== undefined) {
|
|
626
|
+
await rollbackReport(reportPath, warnings);
|
|
627
|
+
reportPath = undefined;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
catch (error) {
|
|
632
|
+
warnings.push(warning(error instanceof LockTimeoutError || request.json === undefined
|
|
633
|
+
? "TEMP_REPORT_CLEANUP_FAILED"
|
|
634
|
+
: "TEMP_REPORT_WRITE_FAILED", `Temporary-report maintenance could not start (${errorCode(error)}).`, error instanceof LockTimeoutError ? error.path : undefined));
|
|
635
|
+
reportPath = undefined;
|
|
636
|
+
}
|
|
637
|
+
finally {
|
|
638
|
+
if (ownedLock !== undefined) {
|
|
639
|
+
await releaseLock(ownedLock, warnings);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return result(warnings, reportPath);
|
|
643
|
+
},
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
//# sourceMappingURL=temporary-reports.js.map
|