zedbee 0.1.0-beta.12 → 0.1.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/SECURITY.md +2 -0
- package/THIRD_PARTY_NOTICES.md +130 -14
- package/dist/attribution/entities.d.ts.map +1 -1
- package/dist/attribution/entities.js +74 -72
- package/dist/attribution/entities.js.map +1 -1
- package/dist/attribution/metrics.d.ts +2 -0
- package/dist/attribution/metrics.d.ts.map +1 -1
- package/dist/attribution/metrics.js +8 -0
- package/dist/attribution/metrics.js.map +1 -1
- package/dist/attribution/pair-locations.js +1 -1
- package/dist/attribution/pair-locations.js.map +1 -1
- package/dist/attribution/source-identity.d.ts +6 -0
- package/dist/attribution/source-identity.d.ts.map +1 -0
- package/dist/attribution/source-identity.js +60 -0
- package/dist/attribution/source-identity.js.map +1 -0
- package/dist/cache/key.d.ts +6 -1
- package/dist/cache/key.d.ts.map +1 -1
- package/dist/cache/key.js +57 -21
- package/dist/cache/key.js.map +1 -1
- package/dist/cache/store.d.ts.map +1 -1
- package/dist/cache/store.js +7 -7
- package/dist/cache/store.js.map +1 -1
- package/dist/checks/applicability.d.ts.map +1 -1
- package/dist/checks/applicability.js +17 -14
- package/dist/checks/applicability.js.map +1 -1
- package/dist/checks/complexity/adapter.d.ts.map +1 -1
- package/dist/checks/complexity/adapter.js +72 -18
- package/dist/checks/complexity/adapter.js.map +1 -1
- package/dist/checks/complexity/pair-class-metrics.d.ts +12 -0
- package/dist/checks/complexity/pair-class-metrics.d.ts.map +1 -0
- package/dist/checks/complexity/pair-class-metrics.js +220 -0
- package/dist/checks/complexity/pair-class-metrics.js.map +1 -0
- package/dist/checks/dead-code/adapter.d.ts.map +1 -1
- package/dist/checks/dead-code/adapter.js +8 -97
- package/dist/checks/dead-code/adapter.js.map +1 -1
- package/dist/checks/dead-code/framework-entrypoints.d.ts +9 -0
- package/dist/checks/dead-code/framework-entrypoints.d.ts.map +1 -0
- package/dist/checks/dead-code/framework-entrypoints.js +47 -0
- package/dist/checks/dead-code/framework-entrypoints.js.map +1 -0
- package/dist/checks/dead-code/import-boundary.d.ts +1 -1
- package/dist/checks/dead-code/import-boundary.d.ts.map +1 -1
- package/dist/checks/dead-code/import-boundary.js +3 -1
- package/dist/checks/dead-code/import-boundary.js.map +1 -1
- package/dist/checks/dead-code/knip-worker.js +19 -8
- package/dist/checks/dead-code/knip-worker.js.map +1 -1
- package/dist/checks/dead-code/managed-config.d.ts +4 -2
- package/dist/checks/dead-code/managed-config.d.ts.map +1 -1
- package/dist/checks/dead-code/managed-config.js +29 -2
- package/dist/checks/dead-code/managed-config.js.map +1 -1
- package/dist/checks/dead-code/parse-report.d.ts.map +1 -1
- package/dist/checks/dead-code/parse-report.js +26 -23
- package/dist/checks/dead-code/parse-report.js.map +1 -1
- package/dist/checks/dependency-architecture/adapter.d.ts.map +1 -1
- package/dist/checks/dependency-architecture/adapter.js +57 -46
- package/dist/checks/dependency-architecture/adapter.js.map +1 -1
- package/dist/checks/dependency-architecture/normalize-graph.d.ts +2 -0
- package/dist/checks/dependency-architecture/normalize-graph.d.ts.map +1 -1
- package/dist/checks/dependency-architecture/normalize-graph.js +12 -3
- package/dist/checks/dependency-architecture/normalize-graph.js.map +1 -1
- package/dist/checks/diagnostic-messages.d.ts +4 -0
- package/dist/checks/diagnostic-messages.d.ts.map +1 -0
- package/dist/checks/diagnostic-messages.js +50 -0
- package/dist/checks/diagnostic-messages.js.map +1 -0
- package/dist/checks/dispatch-adapter.d.ts +25 -0
- package/dist/checks/dispatch-adapter.d.ts.map +1 -0
- package/dist/checks/dispatch-adapter.js +133 -0
- package/dist/checks/dispatch-adapter.js.map +1 -0
- package/dist/checks/dispatch-cache.d.ts +9 -0
- package/dist/checks/dispatch-cache.d.ts.map +1 -0
- package/dist/checks/dispatch-cache.js +154 -0
- package/dist/checks/dispatch-cache.js.map +1 -0
- package/dist/checks/dispatch-context.d.ts +11 -0
- package/dist/checks/dispatch-context.d.ts.map +1 -0
- package/dist/checks/dispatch-context.js +155 -0
- package/dist/checks/dispatch-context.js.map +1 -0
- package/dist/checks/dispatch-target.d.ts +17 -0
- package/dist/checks/dispatch-target.d.ts.map +1 -0
- package/dist/checks/dispatch-target.js +167 -0
- package/dist/checks/dispatch-target.js.map +1 -0
- package/dist/checks/dispatcher.d.ts +3 -7
- package/dist/checks/dispatcher.d.ts.map +1 -1
- package/dist/checks/dispatcher.js +12 -642
- package/dist/checks/dispatcher.js.map +1 -1
- package/dist/checks/duplication/adapter.d.ts.map +1 -1
- package/dist/checks/duplication/adapter.js +44 -6
- package/dist/checks/duplication/adapter.js.map +1 -1
- package/dist/checks/duplication/clone-comparison.d.ts +6 -0
- package/dist/checks/duplication/clone-comparison.d.ts.map +1 -0
- package/dist/checks/duplication/clone-comparison.js +163 -0
- package/dist/checks/duplication/clone-comparison.js.map +1 -0
- package/dist/checks/duplication/normalize-clone.d.ts.map +1 -1
- package/dist/checks/duplication/normalize-clone.js +9 -0
- package/dist/checks/duplication/normalize-clone.js.map +1 -1
- package/dist/checks/duplication/source-tokens.d.ts +18 -0
- package/dist/checks/duplication/source-tokens.d.ts.map +1 -0
- package/dist/checks/duplication/source-tokens.js +68 -0
- package/dist/checks/duplication/source-tokens.js.map +1 -0
- package/dist/checks/duplication/types.d.ts +2 -0
- package/dist/checks/duplication/types.d.ts.map +1 -1
- package/dist/checks/engine-identity.d.ts.map +1 -1
- package/dist/checks/engine-identity.js +9 -8
- package/dist/checks/engine-identity.js.map +1 -1
- package/dist/checks/eslint/convert-message.d.ts +2 -0
- package/dist/checks/eslint/convert-message.d.ts.map +1 -1
- package/dist/checks/eslint/convert-message.js +34 -1
- package/dist/checks/eslint/convert-message.js.map +1 -1
- package/dist/checks/eslint/lint-adapter.d.ts.map +1 -1
- package/dist/checks/eslint/lint-adapter.js +17 -13
- package/dist/checks/eslint/lint-adapter.js.map +1 -1
- package/dist/checks/events.d.ts +7 -1
- package/dist/checks/events.d.ts.map +1 -1
- package/dist/checks/metadata.d.ts +4 -2
- package/dist/checks/metadata.d.ts.map +1 -1
- package/dist/checks/metadata.js +7 -4
- package/dist/checks/metadata.js.map +1 -1
- package/dist/checks/observation-result.d.ts.map +1 -1
- package/dist/checks/observation-result.js +26 -14
- package/dist/checks/observation-result.js.map +1 -1
- package/dist/checks/prettier/project-engine.d.ts +8 -14
- package/dist/checks/prettier/project-engine.d.ts.map +1 -1
- package/dist/checks/prettier/project-engine.js +33 -281
- package/dist/checks/prettier/project-engine.js.map +1 -1
- package/dist/checks/prettier/project-error.d.ts +7 -0
- package/dist/checks/prettier/project-error.d.ts.map +1 -0
- package/dist/checks/prettier/project-error.js +12 -0
- package/dist/checks/prettier/project-error.js.map +1 -0
- package/dist/checks/prettier/project-import-capture.d.ts +20 -0
- package/dist/checks/prettier/project-import-capture.d.ts.map +1 -0
- package/dist/checks/prettier/project-import-capture.js +173 -0
- package/dist/checks/prettier/project-import-capture.js.map +1 -0
- package/dist/checks/prettier/project-import-dependencies.d.ts +5 -0
- package/dist/checks/prettier/project-import-dependencies.d.ts.map +1 -0
- package/dist/checks/prettier/project-import-dependencies.js +84 -0
- package/dist/checks/prettier/project-import-dependencies.js.map +1 -0
- package/dist/checks/prettier/project-installation.d.ts +3 -0
- package/dist/checks/prettier/project-installation.d.ts.map +1 -0
- package/dist/checks/prettier/project-installation.js +204 -0
- package/dist/checks/prettier/project-installation.js.map +1 -0
- package/dist/checks/prettier/project-protocol.d.ts.map +1 -1
- package/dist/checks/prettier/project-protocol.js +15 -3
- package/dist/checks/prettier/project-protocol.js.map +1 -1
- package/dist/checks/prettier/project-snapshot-identity.d.ts +7 -0
- package/dist/checks/prettier/project-snapshot-identity.d.ts.map +1 -0
- package/dist/checks/prettier/project-snapshot-identity.js +63 -0
- package/dist/checks/prettier/project-snapshot-identity.js.map +1 -0
- package/dist/checks/prettier/project-types.d.ts +2 -0
- package/dist/checks/prettier/project-types.d.ts.map +1 -1
- package/dist/checks/prettier/project-worker.js +25 -3
- package/dist/checks/prettier/project-worker.js.map +1 -1
- package/dist/checks/prettier/project-workspace.d.ts +7 -0
- package/dist/checks/prettier/project-workspace.d.ts.map +1 -1
- package/dist/checks/prettier/project-workspace.js +101 -40
- package/dist/checks/prettier/project-workspace.js.map +1 -1
- package/dist/checks/project-inputs.d.ts +6 -0
- package/dist/checks/project-inputs.d.ts.map +1 -0
- package/dist/checks/project-inputs.js +70 -0
- package/dist/checks/project-inputs.js.map +1 -0
- package/dist/checks/runner/process-group.d.ts.map +1 -1
- package/dist/checks/runner/process-group.js +30 -2
- package/dist/checks/runner/process-group.js.map +1 -1
- package/dist/checks/secrets/content.d.ts.map +1 -1
- package/dist/checks/secrets/content.js +35 -16
- package/dist/checks/secrets/content.js.map +1 -1
- package/dist/checks/typescript/adapter.d.ts.map +1 -1
- package/dist/checks/typescript/adapter.js +6 -14
- package/dist/checks/typescript/adapter.js.map +1 -1
- package/dist/checks/typescript/aliases.d.ts +28 -0
- package/dist/checks/typescript/aliases.d.ts.map +1 -0
- package/dist/checks/typescript/aliases.js +259 -0
- package/dist/checks/typescript/aliases.js.map +1 -0
- package/dist/checks/typescript/configuration-paths.d.ts +8 -0
- package/dist/checks/typescript/configuration-paths.d.ts.map +1 -0
- package/dist/checks/typescript/configuration-paths.js +138 -0
- package/dist/checks/typescript/configuration-paths.js.map +1 -0
- package/dist/checks/typescript/convert-diagnostic.d.ts +2 -0
- package/dist/checks/typescript/convert-diagnostic.d.ts.map +1 -1
- package/dist/checks/typescript/convert-diagnostic.js +23 -5
- package/dist/checks/typescript/convert-diagnostic.js.map +1 -1
- package/dist/checks/typescript/project-coverage.d.ts +16 -0
- package/dist/checks/typescript/project-coverage.d.ts.map +1 -0
- package/dist/checks/typescript/project-coverage.js +49 -0
- package/dist/checks/typescript/project-coverage.js.map +1 -0
- package/dist/checks/vulnerabilities/inventory/normalize.d.ts +1 -0
- package/dist/checks/vulnerabilities/inventory/normalize.d.ts.map +1 -1
- package/dist/checks/vulnerabilities/inventory/normalize.js +5 -2
- package/dist/checks/vulnerabilities/inventory/normalize.js.map +1 -1
- package/dist/checks/vulnerabilities/inventory/parse-bun.d.ts.map +1 -1
- package/dist/checks/vulnerabilities/inventory/parse-bun.js +18 -7
- package/dist/checks/vulnerabilities/inventory/parse-bun.js.map +1 -1
- package/dist/checks/vulnerabilities/inventory/parse-yarn.d.ts.map +1 -1
- package/dist/checks/vulnerabilities/inventory/parse-yarn.js +21 -11
- package/dist/checks/vulnerabilities/inventory/parse-yarn.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.js +1 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/checks.d.ts +5 -2
- package/dist/commands/checks.d.ts.map +1 -1
- package/dist/commands/checks.js +18 -5
- package/dist/commands/checks.js.map +1 -1
- package/dist/commands/fix.d.ts.map +1 -1
- package/dist/commands/fix.js +6 -297
- package/dist/commands/fix.js.map +1 -1
- package/dist/commands/init.d.ts +4 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +36 -379
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/scan.d.ts +2 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +6 -13
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +3 -0
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/config/load-config.d.ts.map +1 -1
- package/dist/config/load-config.js +6 -15
- package/dist/config/load-config.js.map +1 -1
- package/dist/config/selection-path.d.ts +7 -0
- package/dist/config/selection-path.d.ts.map +1 -0
- package/dist/config/selection-path.js +20 -0
- package/dist/config/selection-path.js.map +1 -0
- package/dist/core/check-label.d.ts +2 -0
- package/dist/core/check-label.d.ts.map +1 -0
- package/dist/core/check-label.js +19 -0
- package/dist/core/check-label.js.map +1 -0
- package/dist/core/freeze-result.d.ts +3 -0
- package/dist/core/freeze-result.d.ts.map +1 -0
- package/dist/core/freeze-result.js +10 -0
- package/dist/core/freeze-result.js.map +1 -0
- package/dist/core/immutable-map.d.ts +3 -0
- package/dist/core/immutable-map.d.ts.map +1 -0
- package/dist/core/immutable-map.js +33 -0
- package/dist/core/immutable-map.js.map +1 -0
- package/dist/core/kernel-lease.d.ts +17 -0
- package/dist/core/kernel-lease.d.ts.map +1 -0
- package/dist/core/kernel-lease.js +55 -0
- package/dist/core/kernel-lease.js.map +1 -0
- package/dist/fixes/apply-plan.d.ts.map +1 -1
- package/dist/fixes/apply-plan.js +2 -9
- package/dist/fixes/apply-plan.js.map +1 -1
- package/dist/fixes/build-plan.d.ts +5 -5
- package/dist/fixes/build-plan.d.ts.map +1 -1
- package/dist/fixes/build-plan.js +15 -466
- package/dist/fixes/build-plan.js.map +1 -1
- package/dist/fixes/exact-edits.d.ts +11 -1
- package/dist/fixes/exact-edits.d.ts.map +1 -1
- package/dist/fixes/exact-edits.js +101 -46
- package/dist/fixes/exact-edits.js.map +1 -1
- package/dist/fixes/plan-candidates.d.ts +8 -0
- package/dist/fixes/plan-candidates.d.ts.map +1 -0
- package/dist/fixes/plan-candidates.js +144 -0
- package/dist/fixes/plan-candidates.js.map +1 -0
- package/dist/fixes/prettier-provider.d.ts +3 -2
- package/dist/fixes/prettier-provider.d.ts.map +1 -1
- package/dist/fixes/prettier-provider.js +53 -0
- package/dist/fixes/prettier-provider.js.map +1 -1
- package/dist/fixes/public-plan.d.ts +8 -0
- package/dist/fixes/public-plan.d.ts.map +1 -0
- package/dist/fixes/public-plan.js +194 -0
- package/dist/fixes/public-plan.js.map +1 -0
- package/dist/fixes/working-preview.d.ts +18 -0
- package/dist/fixes/working-preview.d.ts.map +1 -0
- package/dist/fixes/working-preview.js +162 -0
- package/dist/fixes/working-preview.js.map +1 -0
- package/dist/git/change-set.d.ts.map +1 -1
- package/dist/git/change-set.js +10 -9
- package/dist/git/change-set.js.map +1 -1
- package/dist/git/client.d.ts +16 -0
- package/dist/git/client.d.ts.map +1 -1
- package/dist/git/client.js +46 -3
- package/dist/git/client.js.map +1 -1
- package/dist/git/merge-comparison.d.ts.map +1 -1
- package/dist/git/merge-comparison.js +16 -4
- package/dist/git/merge-comparison.js.map +1 -1
- package/dist/git/selected-comparison.d.ts +13 -0
- package/dist/git/selected-comparison.d.ts.map +1 -0
- package/dist/git/selected-comparison.js +143 -0
- package/dist/git/selected-comparison.js.map +1 -0
- package/dist/git/snapshot-work.d.ts +18 -0
- package/dist/git/snapshot-work.d.ts.map +1 -0
- package/dist/git/snapshot-work.js +59 -0
- package/dist/git/snapshot-work.js.map +1 -0
- package/dist/git/snapshot.d.ts +6 -1
- package/dist/git/snapshot.d.ts.map +1 -1
- package/dist/git/snapshot.js +102 -5
- package/dist/git/snapshot.js.map +1 -1
- package/dist/init/formatter-setup.d.ts +29 -0
- package/dist/init/formatter-setup.d.ts.map +1 -0
- package/dist/init/formatter-setup.js +166 -0
- package/dist/init/formatter-setup.js.map +1 -0
- package/dist/init/import-provenance.d.ts +7 -0
- package/dist/init/import-provenance.d.ts.map +1 -0
- package/dist/init/import-provenance.js +58 -0
- package/dist/init/import-provenance.js.map +1 -0
- package/dist/init/install-dependency.d.mts +40 -0
- package/dist/init/install-dependency.mjs +427 -0
- package/dist/init/install-project.d.ts +1 -0
- package/dist/init/install-project.d.ts.map +1 -1
- package/dist/init/install-project.js +12 -31
- package/dist/init/install-project.js.map +1 -1
- package/dist/init/presentation.d.ts +54 -0
- package/dist/init/presentation.d.ts.map +1 -0
- package/dist/init/presentation.js +139 -0
- package/dist/init/presentation.js.map +1 -0
- package/dist/init/selection-policy.d.ts +29 -0
- package/dist/init/selection-policy.d.ts.map +1 -0
- package/dist/init/selection-policy.js +59 -0
- package/dist/init/selection-policy.js.map +1 -0
- package/dist/init/types.d.ts +7 -0
- package/dist/init/types.d.ts.map +1 -1
- package/dist/init/types.js.map +1 -1
- package/dist/init/write-config.d.ts.map +1 -1
- package/dist/init/write-config.js +3 -13
- package/dist/init/write-config.js.map +1 -1
- package/dist/inspection/inspect-repository.d.ts.map +1 -1
- package/dist/inspection/inspect-repository.js +17 -3
- package/dist/inspection/inspect-repository.js.map +1 -1
- package/dist/inspection/snapshot-registry.d.ts +2 -0
- package/dist/inspection/snapshot-registry.d.ts.map +1 -1
- package/dist/inspection/snapshot-registry.js +58 -7
- package/dist/inspection/snapshot-registry.js.map +1 -1
- package/dist/inspection/types.d.ts +6 -1
- package/dist/inspection/types.d.ts.map +1 -1
- package/dist/inspection/types.js +7 -1
- package/dist/inspection/types.js.map +1 -1
- package/dist/inspection/workspaces.d.ts.map +1 -1
- package/dist/inspection/workspaces.js +17 -0
- package/dist/inspection/workspaces.js.map +1 -1
- package/dist/reporting/check-label.d.ts +1 -1
- package/dist/reporting/check-label.d.ts.map +1 -1
- package/dist/reporting/check-label.js +1 -18
- package/dist/reporting/check-label.js.map +1 -1
- package/dist/reporting/fix-plan-store.d.ts +7 -0
- package/dist/reporting/fix-plan-store.d.ts.map +1 -0
- package/dist/reporting/fix-plan-store.js +29 -0
- package/dist/reporting/fix-plan-store.js.map +1 -0
- package/dist/reporting/fix-presentation.d.ts +77 -0
- package/dist/reporting/fix-presentation.d.ts.map +1 -0
- package/dist/reporting/fix-presentation.js +262 -0
- package/dist/reporting/fix-presentation.js.map +1 -0
- package/dist/reporting/temporary-report-common.d.ts +27 -0
- package/dist/reporting/temporary-report-common.d.ts.map +1 -0
- package/dist/reporting/temporary-report-common.js +33 -0
- package/dist/reporting/temporary-report-common.js.map +1 -0
- package/dist/reporting/temporary-report-filesystem.d.ts +6 -0
- package/dist/reporting/temporary-report-filesystem.d.ts.map +1 -0
- package/dist/reporting/temporary-report-filesystem.js +124 -0
- package/dist/reporting/temporary-report-filesystem.js.map +1 -0
- package/dist/reporting/temporary-report-lifecycle.d.ts +19 -0
- package/dist/reporting/temporary-report-lifecycle.d.ts.map +1 -0
- package/dist/reporting/temporary-report-lifecycle.js +278 -0
- package/dist/reporting/temporary-report-lifecycle.js.map +1 -0
- package/dist/reporting/temporary-report-lock.d.ts +21 -0
- package/dist/reporting/temporary-report-lock.d.ts.map +1 -0
- package/dist/reporting/temporary-report-lock.js +106 -0
- package/dist/reporting/temporary-report-lock.js.map +1 -0
- package/dist/reporting/temporary-reports.d.ts +3 -24
- package/dist/reporting/temporary-reports.d.ts.map +1 -1
- package/dist/reporting/temporary-reports.js +10 -534
- package/dist/reporting/temporary-reports.js.map +1 -1
- package/dist/scan/analysis-failure.d.ts.map +1 -1
- package/dist/scan/analysis-failure.js +23 -0
- package/dist/scan/analysis-failure.js.map +1 -1
- package/dist/scan/analysis-session.d.ts +4 -0
- package/dist/scan/analysis-session.d.ts.map +1 -1
- package/dist/scan/analysis-session.js +60 -13
- package/dist/scan/analysis-session.js.map +1 -1
- package/dist/scan/incomplete-report.js +2 -2
- package/dist/scan/incomplete-report.js.map +1 -1
- package/dist/scan/merge-scan.d.ts +2 -1
- package/dist/scan/merge-scan.d.ts.map +1 -1
- package/dist/scan/merge-scan.js +82 -37
- package/dist/scan/merge-scan.js.map +1 -1
- package/dist/scan/progress.d.ts +4 -0
- package/dist/scan/progress.d.ts.map +1 -0
- package/dist/scan/progress.js +18 -0
- package/dist/scan/progress.js.map +1 -0
- package/dist/scan/run-scan.d.ts.map +1 -1
- package/dist/scan/run-scan.js +11 -15
- package/dist/scan/run-scan.js.map +1 -1
- package/dist/scan/source-excerpts.d.ts +1 -1
- package/dist/scan/source-excerpts.d.ts.map +1 -1
- package/dist/scan/source-excerpts.js +25 -27
- package/dist/scan/source-excerpts.js.map +1 -1
- package/dist/service/client-connection.d.ts +21 -0
- package/dist/service/client-connection.d.ts.map +1 -0
- package/dist/service/client-connection.js +219 -0
- package/dist/service/client-connection.js.map +1 -0
- package/dist/service/client-executor.d.ts +10 -0
- package/dist/service/client-executor.d.ts.map +1 -0
- package/dist/service/client-executor.js +69 -0
- package/dist/service/client-executor.js.map +1 -0
- package/dist/service/client-ownership.d.ts +16 -0
- package/dist/service/client-ownership.d.ts.map +1 -0
- package/dist/service/client-ownership.js +104 -0
- package/dist/service/client-ownership.js.map +1 -0
- package/dist/service/client-startup.d.ts +3 -0
- package/dist/service/client-startup.d.ts.map +1 -0
- package/dist/service/client-startup.js +123 -0
- package/dist/service/client-startup.js.map +1 -0
- package/dist/service/client.d.ts +2 -27
- package/dist/service/client.d.ts.map +1 -1
- package/dist/service/client.js +7 -490
- package/dist/service/client.js.map +1 -1
- package/dist/service/identity-parallel.js +3 -3
- package/dist/service/identity-parallel.js.map +1 -1
- package/dist/service/identity.js +4 -4
- package/dist/service/identity.js.map +1 -1
- package/dist/service/server-connection.d.ts +43 -0
- package/dist/service/server-connection.d.ts.map +1 -0
- package/dist/service/server-connection.js +327 -0
- package/dist/service/server-connection.js.map +1 -0
- package/dist/service/server.d.ts +1 -1
- package/dist/service/server.d.ts.map +1 -1
- package/dist/service/server.js +77 -343
- package/dist/service/server.js.map +1 -1
- package/dist/service/state.d.ts.map +1 -1
- package/dist/service/state.js +14 -26
- package/dist/service/state.js.map +1 -1
- package/dist/service/windows-pipe.d.ts +22 -14
- package/dist/service/windows-pipe.d.ts.map +1 -1
- package/dist/service/windows-pipe.js +384 -350
- package/dist/service/windows-pipe.js.map +1 -1
- package/dist/telemetry/ai-context.d.ts +14 -0
- package/dist/telemetry/ai-context.d.ts.map +1 -0
- package/dist/telemetry/ai-context.js +129 -0
- package/dist/telemetry/ai-context.js.map +1 -0
- package/dist/telemetry/batch.d.ts +4 -0
- package/dist/telemetry/batch.d.ts.map +1 -0
- package/dist/telemetry/batch.js +21 -0
- package/dist/telemetry/batch.js.map +1 -0
- package/dist/telemetry/client.d.ts +3 -0
- package/dist/telemetry/client.d.ts.map +1 -1
- package/dist/telemetry/client.js +63 -2
- package/dist/telemetry/client.js.map +1 -1
- package/dist/telemetry/details-store.d.ts +15 -0
- package/dist/telemetry/details-store.d.ts.map +1 -0
- package/dist/telemetry/details-store.js +198 -0
- package/dist/telemetry/details-store.js.map +1 -0
- package/dist/telemetry/finding-catalog.d.ts +2 -0
- package/dist/telemetry/finding-catalog.d.ts.map +1 -0
- package/dist/telemetry/finding-catalog.js +2817 -0
- package/dist/telemetry/finding-catalog.js.map +1 -0
- package/dist/telemetry/finding-rules.d.ts +3 -0
- package/dist/telemetry/finding-rules.d.ts.map +1 -0
- package/dist/telemetry/finding-rules.js +16 -0
- package/dist/telemetry/finding-rules.js.map +1 -0
- package/dist/telemetry/finding-summary.d.ts +8 -0
- package/dist/telemetry/finding-summary.d.ts.map +1 -0
- package/dist/telemetry/finding-summary.js +63 -0
- package/dist/telemetry/finding-summary.js.map +1 -0
- package/dist/telemetry/schema.d.ts +603 -4
- package/dist/telemetry/schema.d.ts.map +1 -1
- package/dist/telemetry/schema.js +117 -1
- package/dist/telemetry/schema.js.map +1 -1
- package/dist/telemetry/state.d.ts +5 -4
- package/dist/telemetry/state.d.ts.map +1 -1
- package/dist/telemetry/state.js +115 -69
- package/dist/telemetry/state.js.map +1 -1
- package/dist/telemetry/transport.d.ts.map +1 -1
- package/dist/telemetry/transport.js +5 -1
- package/dist/telemetry/transport.js.map +1 -1
- package/dist/telemetry/worker.d.ts.map +1 -1
- package/dist/telemetry/worker.js +9 -1
- package/dist/telemetry/worker.js.map +1 -1
- package/dist/ui/init-app.d.ts +6 -14
- package/dist/ui/init-app.d.ts.map +1 -1
- package/dist/ui/init-app.js +39 -203
- package/dist/ui/init-app.js.map +1 -1
- package/dist/ui/init-operation.d.ts +19 -0
- package/dist/ui/init-operation.d.ts.map +1 -0
- package/dist/ui/init-operation.js +54 -0
- package/dist/ui/init-operation.js.map +1 -0
- package/dist/ui/init-view.d.ts +42 -0
- package/dist/ui/init-view.d.ts.map +1 -0
- package/dist/ui/init-view.js +199 -0
- package/dist/ui/init-view.js.map +1 -0
- package/dist/ui/live-dashboard.d.ts +5 -1
- package/dist/ui/live-dashboard.d.ts.map +1 -1
- package/dist/ui/live-dashboard.js +46 -4
- package/dist/ui/live-dashboard.js.map +1 -1
- package/dist/vendor/knip/node_modules/get-tsconfig/LICENSE +21 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/README.md +268 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.cjs +7 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.d.cts +2116 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.d.mts +2116 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.mjs +7 -0
- package/dist/vendor/knip/node_modules/get-tsconfig/package.json +46 -0
- package/docs/checks.md +56 -5
- package/docs/cli-reference.md +12 -2
- package/docs/commercial-licensing.md +1 -1
- package/docs/managed-fixes.md +14 -0
- package/docs/privacy.md +55 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts +9 -447
- package/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts +9 -447
- package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +41 -6
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js +69 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts +1 -447
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +141 -273
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +59 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +30 -10
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js +57 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.js +10 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +12 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +65 -55
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-generated-empty-object-type.d.ts +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-generated-empty-object-type.js +97 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +49 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts +5 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +76 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +35 -23
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +85 -12
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js +14 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js +4 -14
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts +2 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +52 -49
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.js +46 -18
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +3 -91
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-assignment.d.ts +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-assignment.js +518 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js +4 -113
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-private-class-members.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +6 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-default-assignment.d.ts +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-default-assignment.js +29 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +4 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js +47 -10
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +50 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +12 -9
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-void-return.d.ts +3 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-void-return.js +100 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +39 -12
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +75 -37
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/FunctionSignature.d.ts +15 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/FunctionSignature.js +123 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/baseTypeUtils.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/baseTypeUtils.js +17 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/classScopeAnalyzer.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/extractComputedName.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/types.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js +11 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getAwaitTokenRemovalRange.d.ts +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getAwaitTokenRemovalRange.js +15 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getBaseTypesOfClassMember.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isConditionalTest.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfArrowFunctionBodyNeedingParentheses.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfArrowFunctionBodyNeedingParentheses.js +30 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatementNeedingParentheses.d.ts +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatementNeedingParentheses.js +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeOnlyReference.d.ts +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeOnlyReference.js +23 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/lazyRules.d.ts +6 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/lazyRules.js +18 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypePredicate.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/walkStatements.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +19 -18
- package/node_modules/@typescript-eslint/parser/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/parser/dist/parser.js +1 -0
- package/node_modules/@typescript-eslint/parser/package.json +9 -8
- package/node_modules/@typescript-eslint/project-service/dist/createProjectService.js +10 -9
- package/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js +1 -0
- package/node_modules/@typescript-eslint/project-service/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/project-service/dist/throttleOpenedFileCleanup.d.ts +7 -0
- package/node_modules/@typescript-eslint/project-service/dist/throttleOpenedFileCleanup.js +37 -0
- package/node_modules/@typescript-eslint/project-service/package.json +7 -6
- package/node_modules/@typescript-eslint/scope-manager/dist/ID.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/assert.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.collection.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.float16.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.iterator.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.regexp.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.date.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.temporal.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.typedarrays.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +13 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js +1 -0
- package/node_modules/@typescript-eslint/scope-manager/package.json +8 -7
- package/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js +1 -0
- package/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js +1 -0
- package/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/tsconfig-utils/package.json +4 -3
- package/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js +4 -14
- package/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.js +7 -0
- package/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeBrandedLiteralLike.js +3 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +10 -5
- package/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts +5 -0
- package/node_modules/@typescript-eslint/type-utils/dist/predicates.js +11 -0
- package/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +2 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierSourceMatches.d.ts +3 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierSourceMatches.js +19 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.js +87 -9
- package/node_modules/@typescript-eslint/type-utils/package.json +9 -8
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +3 -3
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +1 -0
- package/node_modules/@typescript-eslint/types/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/types/dist/lib.js +1 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.js +1 -0
- package/node_modules/@typescript-eslint/types/dist/ts-estree.js +1 -0
- package/node_modules/@typescript-eslint/types/package.json +8 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/check-modifiers.js +7 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/check-syntax-errors.js +8 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +12 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js +3 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js +14 -6
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +23 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +86 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +48 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js +45 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/version.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/package.json +9 -8
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/json-schema.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +17 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-estree.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js +1 -0
- package/node_modules/@typescript-eslint/utils/package.json +7 -6
- package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js +1 -0
- package/node_modules/@typescript-eslint/visitor-keys/dist/index.js +1 -0
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +1 -0
- package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -5
- package/node_modules/dependency-cruiser/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/dependency-cruiser/node_modules/ignore/README.md +452 -0
- package/node_modules/dependency-cruiser/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/dependency-cruiser/node_modules/ignore/index.js +793 -0
- package/node_modules/dependency-cruiser/node_modules/ignore/legacy.js +690 -0
- package/node_modules/dependency-cruiser/node_modules/ignore/package.json +87 -0
- package/node_modules/get-tsconfig/dist/index.cjs +4 -4
- package/node_modules/get-tsconfig/dist/index.mjs +4 -4
- package/node_modules/get-tsconfig/package.json +1 -1
- package/node_modules/ignore/README.md +49 -0
- package/node_modules/ignore/index.js +906 -162
- package/node_modules/ignore/legacy.js +760 -127
- package/node_modules/ignore/package.json +10 -4
- package/node_modules/typescript-eslint/dist/compatibility-types.js +1 -0
- package/node_modules/typescript-eslint/dist/config-helper.js +1 -0
- package/node_modules/typescript-eslint/dist/getTSConfigRootDirFromStack.js +1 -0
- package/node_modules/typescript-eslint/dist/globs.js +1 -0
- package/node_modules/typescript-eslint/dist/index.js +2 -0
- package/node_modules/typescript-eslint/package.json +13 -20
- package/package.json +11 -9
- package/plugins/swarm/README.md +31 -14
- package/plugins/swarm/{skills/scan/SKILL.md → references/scan.md} +6 -13
- package/schema/zedbee.schema.json +12 -0
package/dist/telemetry/schema.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { allowedFindingRule } from "./finding-rules.js";
|
|
2
3
|
// Self-contained wire contract, also vendored and checked by the private collector.
|
|
3
4
|
export const TELEMETRY_CHECK_IDS = [
|
|
4
5
|
"formatting",
|
|
@@ -31,7 +32,7 @@ export const TELEMETRY_EVENTS = [
|
|
|
31
32
|
];
|
|
32
33
|
const count = z.number().int().min(0).max(1_000_000);
|
|
33
34
|
const identity = z.string().uuid();
|
|
34
|
-
export const
|
|
35
|
+
export const telemetryV1EventSchema = z
|
|
35
36
|
.strictObject({
|
|
36
37
|
schema_version: z.literal(1),
|
|
37
38
|
event: z.enum(TELEMETRY_EVENTS),
|
|
@@ -145,6 +146,121 @@ export const telemetryEventSchema = z
|
|
|
145
146
|
if (event.command !== "init" && event.hook !== undefined)
|
|
146
147
|
invalid();
|
|
147
148
|
});
|
|
149
|
+
export const AI_TOOLS = ["claude_code", "codex", "cursor"];
|
|
150
|
+
const unique = (values) => new Set(values).size === values.length;
|
|
151
|
+
const checkIds = z.array(z.enum(TELEMETRY_CHECK_IDS)).max(13).refine(unique);
|
|
152
|
+
const toolIds = z.array(z.enum(AI_TOOLS)).max(3).refine(unique);
|
|
153
|
+
export const findingGroupSchema = z
|
|
154
|
+
.strictObject({
|
|
155
|
+
check_id: z.enum(TELEMETRY_CHECK_IDS),
|
|
156
|
+
rule_id: z.string().max(128),
|
|
157
|
+
severity: z.enum(["info", "warning", "error"]),
|
|
158
|
+
count: count.min(1),
|
|
159
|
+
})
|
|
160
|
+
.refine((row) => allowedFindingRule(row.check_id, row.rule_id), "Unapproved finding rule");
|
|
161
|
+
export const scanDetailsSchema = z
|
|
162
|
+
.strictObject({
|
|
163
|
+
finding_breakdown_version: z.literal(1),
|
|
164
|
+
finding_breakdown_status: z.enum(["complete", "truncated", "unavailable"]),
|
|
165
|
+
finding_groups: z.array(findingGroupSchema).max(256).optional(),
|
|
166
|
+
finding_unmapped_count: count.optional(),
|
|
167
|
+
finding_omitted_count: count.optional(),
|
|
168
|
+
finding_counts_clipped: z.boolean().optional(),
|
|
169
|
+
completed_check_ids: checkIds.optional(),
|
|
170
|
+
ai_detection_version: z.literal(1),
|
|
171
|
+
caller_ai_tool: z.enum([...AI_TOOLS, "unknown", "ambiguous"]),
|
|
172
|
+
caller_ai_tool_candidates: toolIds,
|
|
173
|
+
caller_ai_tool_source: z.enum(["none", "environment_hint"]),
|
|
174
|
+
detected_ai_tools: toolIds,
|
|
175
|
+
generic_agent_instructions_detected: z.boolean(),
|
|
176
|
+
repo_ai_detection_status: z.enum(["complete", "partial", "unavailable"]),
|
|
177
|
+
})
|
|
178
|
+
.superRefine((details, ctx) => {
|
|
179
|
+
const invalid = () => ctx.addIssue({ code: "custom", message: "Invalid scan detail contract" });
|
|
180
|
+
const fields = [
|
|
181
|
+
details.finding_groups,
|
|
182
|
+
details.finding_unmapped_count,
|
|
183
|
+
details.finding_omitted_count,
|
|
184
|
+
details.finding_counts_clipped,
|
|
185
|
+
details.completed_check_ids,
|
|
186
|
+
];
|
|
187
|
+
if (details.finding_breakdown_status === "unavailable") {
|
|
188
|
+
if (fields.some((value) => value !== undefined))
|
|
189
|
+
invalid();
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
if (fields.some((value) => value === undefined))
|
|
193
|
+
invalid();
|
|
194
|
+
if (details.finding_breakdown_status === "complete" &&
|
|
195
|
+
(details.finding_unmapped_count !== 0 ||
|
|
196
|
+
details.finding_omitted_count !== 0 ||
|
|
197
|
+
details.finding_counts_clipped !== false))
|
|
198
|
+
invalid();
|
|
199
|
+
const keys = details.finding_groups?.map((row) => JSON.stringify([row.check_id, row.rule_id, row.severity])) ?? [];
|
|
200
|
+
if (!unique(keys))
|
|
201
|
+
invalid();
|
|
202
|
+
if (details.finding_breakdown_status === "truncated" &&
|
|
203
|
+
!details.finding_counts_clipped &&
|
|
204
|
+
details.finding_unmapped_count === 0 &&
|
|
205
|
+
details.finding_omitted_count === 0)
|
|
206
|
+
invalid();
|
|
207
|
+
}
|
|
208
|
+
const candidates = details.caller_ai_tool_candidates;
|
|
209
|
+
const expected = candidates.length === 0
|
|
210
|
+
? "unknown"
|
|
211
|
+
: candidates.length === 1
|
|
212
|
+
? candidates[0]
|
|
213
|
+
: "ambiguous";
|
|
214
|
+
if (details.caller_ai_tool !== expected ||
|
|
215
|
+
details.caller_ai_tool_source !==
|
|
216
|
+
(candidates.length ? "environment_hint" : "none"))
|
|
217
|
+
invalid();
|
|
218
|
+
if (new TextEncoder().encode(JSON.stringify(details)).byteLength > 16_384)
|
|
219
|
+
invalid();
|
|
220
|
+
});
|
|
221
|
+
export const SCAN_DETAIL_KEYS = Object.keys(scanDetailsSchema.shape);
|
|
222
|
+
const telemetryV2EventSchema = z
|
|
223
|
+
.strictObject({
|
|
224
|
+
...telemetryV1EventSchema.shape,
|
|
225
|
+
...scanDetailsSchema.shape,
|
|
226
|
+
schema_version: z.literal(2),
|
|
227
|
+
event: z.literal("scan_finished"),
|
|
228
|
+
command: z.literal("scan"),
|
|
229
|
+
})
|
|
230
|
+
.superRefine((event, ctx) => {
|
|
231
|
+
const legacy = Object.fromEntries(Object.keys(telemetryV1EventSchema.shape).map((key) => [
|
|
232
|
+
key,
|
|
233
|
+
event[key],
|
|
234
|
+
]));
|
|
235
|
+
legacy.schema_version = 1;
|
|
236
|
+
const details = Object.fromEntries(SCAN_DETAIL_KEYS.map((key) => [key, event[key]]));
|
|
237
|
+
const invalid = () => ctx.addIssue({
|
|
238
|
+
code: "custom",
|
|
239
|
+
message: "Invalid enriched scan contract",
|
|
240
|
+
});
|
|
241
|
+
if (!telemetryV1EventSchema.safeParse(legacy).success ||
|
|
242
|
+
!scanDetailsSchema.safeParse(details).success)
|
|
243
|
+
invalid();
|
|
244
|
+
if (event.finding_breakdown_status === "unavailable") {
|
|
245
|
+
if (event.finding_count !== undefined)
|
|
246
|
+
invalid();
|
|
247
|
+
}
|
|
248
|
+
else if (event.finding_count === undefined)
|
|
249
|
+
invalid();
|
|
250
|
+
else if (event.finding_counts_clipped) {
|
|
251
|
+
if (event.finding_count !== 1_000_000)
|
|
252
|
+
invalid();
|
|
253
|
+
}
|
|
254
|
+
else if ((event.finding_groups ?? []).reduce((total, row) => total + row.count, 0) +
|
|
255
|
+
(event.finding_unmapped_count ?? 0) +
|
|
256
|
+
(event.finding_omitted_count ?? 0) !==
|
|
257
|
+
event.finding_count)
|
|
258
|
+
invalid();
|
|
259
|
+
});
|
|
260
|
+
export const telemetryEventSchema = z.union([
|
|
261
|
+
telemetryV1EventSchema,
|
|
262
|
+
telemetryV2EventSchema,
|
|
263
|
+
]);
|
|
148
264
|
export const telemetryBatchSchema = z.strictObject({
|
|
149
265
|
events: z.array(telemetryEventSchema).min(1).max(20),
|
|
150
266
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/telemetry/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oFAAoF;AACpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY;IACZ,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,uBAAuB;IACvB,oBAAoB;IACpB,SAAS;IACT,aAAa;IACb,wBAAwB;IACxB,UAAU;IACV,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;CACT,CAAC;AACX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;CACA,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,cAAc;IACd,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,kBAAkB;CACV,CAAC;AACX,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACrD,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,YAAY,CAAC;IACZ,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAC/B,QAAQ,EAAE,QAAQ;IAClB,MAAM,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Aa,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;IACnD,CAAC;SAAM,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;SACnD,IAAI,KAAK,CAAC,sBAAsB,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;IACnD,CAAC;SAAM,IACL,CAAC,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,MAAM,CACjC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,EACjC,CAAC,CACF;QACC,CAAC,KAAK,CAAC,sBAAsB,IAAI,CAAC,CAAC;QACnC,CAAC,KAAK,CAAC,qBAAqB,IAAI,CAAC,CAAC;QACpC,KAAK,CAAC,aAAa;QAEnB,OAAO,EAAE,CAAC;AACd,CAAC,CAAC,CAAC;AACL,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1C,sBAAsB;IACtB,sBAAsB;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CACrD,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type TelemetryEvent } from "./schema.js";
|
|
2
|
+
import { type TelemetryV1Event as TelemetryEvent } from "./schema.js";
|
|
3
3
|
import type { TelemetryEnvironment } from "./policy.js";
|
|
4
4
|
declare const stateSchema: z.ZodObject<{
|
|
5
5
|
version: z.ZodLiteral<1>;
|
|
@@ -72,9 +72,9 @@ declare const stateSchema: z.ZodObject<{
|
|
|
72
72
|
incomplete: "incomplete";
|
|
73
73
|
pass: "pass";
|
|
74
74
|
blocked: "blocked";
|
|
75
|
-
cancelled: "cancelled";
|
|
76
75
|
preview: "preview";
|
|
77
76
|
applied: "applied";
|
|
77
|
+
cancelled: "cancelled";
|
|
78
78
|
}>>;
|
|
79
79
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
80
80
|
empty_input: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -135,12 +135,13 @@ export declare class TelemetryStore {
|
|
|
135
135
|
readonly directory: string;
|
|
136
136
|
constructor(directory: string);
|
|
137
137
|
private checkDirectory;
|
|
138
|
+
private snapshot;
|
|
138
139
|
read(): TelemetryState | undefined;
|
|
139
|
-
lock(name?:
|
|
140
|
+
lock(name?: "state.lock" | "sender.lock"): () => void;
|
|
140
141
|
private update;
|
|
141
142
|
initialize(): TelemetryState;
|
|
142
143
|
setEnabled(enabled: boolean): void;
|
|
143
|
-
enqueue(
|
|
144
|
+
enqueue(input: unknown): void;
|
|
144
145
|
pending(): TelemetryEvent[];
|
|
145
146
|
acknowledge(ids: readonly string[]): void;
|
|
146
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/telemetry/state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/telemetry/state.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,KAAK,gBAAgB,IAAI,cAAc,EACxC,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMf,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAkBzD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,oBAAoB,GAAG,MAAM,CAMpE;AA2DD,qBAAa,cAAc;IACb,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;IACtC,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,QAAQ;IAoChB,IAAI,IAAI,cAAc,GAAG,SAAS;IAIlC,IAAI,CAAC,IAAI,GAAE,YAAY,GAAG,aAA4B,GAAG,MAAM,IAAI;IAyCnE,OAAO,CAAC,MAAM;IAsCd,UAAU,IAAI,cAAc;IAQ5B,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAMlC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAa7B,OAAO,IAAI,cAAc,EAAE;IAM3B,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;CAM1C"}
|
package/dist/telemetry/state.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { closeSync, constants, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { isAbsolute, join } from "node:path";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
5
|
+
import { openSynchronousKernelFileLease } from "../core/kernel-lease.js";
|
|
6
|
+
import { openWindowsStateLease } from "../service/windows-pipe.js";
|
|
5
7
|
import { z } from "zod";
|
|
6
|
-
import { telemetryEventSchema } from "./schema.js";
|
|
8
|
+
import { telemetryV1EventSchema as telemetryEventSchema, } from "./schema.js";
|
|
7
9
|
const WEEK = 7 * 24 * 60 * 60 * 1000;
|
|
8
10
|
const stateSchema = z.strictObject({
|
|
9
11
|
version: z.literal(1),
|
|
@@ -12,6 +14,17 @@ const stateSchema = z.strictObject({
|
|
|
12
14
|
notice_version: z.number().int().min(0).max(1),
|
|
13
15
|
events: z.array(telemetryEventSchema).max(100),
|
|
14
16
|
});
|
|
17
|
+
const persistedSchema = z.strictObject({
|
|
18
|
+
version: z.literal(2),
|
|
19
|
+
state: stateSchema,
|
|
20
|
+
acknowledged_legacy_optout: z
|
|
21
|
+
.string()
|
|
22
|
+
.regex(/^[a-f0-9]{64}$/u)
|
|
23
|
+
.optional(),
|
|
24
|
+
});
|
|
25
|
+
function unavailable() {
|
|
26
|
+
return Object.assign(new Error("Telemetry state is busy or unavailable; retry or set ZEDBEE_TELEMETRY_DISABLED=1"), { code: "EBUSY" });
|
|
27
|
+
}
|
|
15
28
|
export function telemetryDirectory(env) {
|
|
16
29
|
const root = env.XDG_STATE_HOME && isAbsolute(env.XDG_STATE_HOME)
|
|
17
30
|
? env.XDG_STATE_HOME
|
|
@@ -26,7 +39,7 @@ function owned(stat) {
|
|
|
26
39
|
function readPrivate(path, maximum) {
|
|
27
40
|
let fd;
|
|
28
41
|
try {
|
|
29
|
-
fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
42
|
+
fd = openSync(path, constants.O_RDONLY | constants.O_NONBLOCK | (constants.O_NOFOLLOW ?? 0));
|
|
30
43
|
}
|
|
31
44
|
catch (error) {
|
|
32
45
|
if (error.code === "ENOENT")
|
|
@@ -38,7 +51,30 @@ function readPrivate(path, maximum) {
|
|
|
38
51
|
owned(stat);
|
|
39
52
|
if (!stat.isFile() || stat.nlink !== 1 || stat.size > maximum)
|
|
40
53
|
throw new Error("Unsafe telemetry file");
|
|
41
|
-
|
|
54
|
+
const raw = readFileSync(fd, "utf8");
|
|
55
|
+
const after = fstatSync(fd);
|
|
56
|
+
const current = lstatSync(path);
|
|
57
|
+
if (after.dev !== stat.dev ||
|
|
58
|
+
after.ino !== stat.ino ||
|
|
59
|
+
after.size !== stat.size ||
|
|
60
|
+
after.mtimeMs !== stat.mtimeMs ||
|
|
61
|
+
after.ctimeMs !== stat.ctimeMs ||
|
|
62
|
+
current.dev !== stat.dev ||
|
|
63
|
+
current.ino !== stat.ino)
|
|
64
|
+
throw unavailable();
|
|
65
|
+
return {
|
|
66
|
+
raw,
|
|
67
|
+
fingerprint: createHash("sha256")
|
|
68
|
+
.update(JSON.stringify([
|
|
69
|
+
stat.dev,
|
|
70
|
+
stat.ino,
|
|
71
|
+
stat.size,
|
|
72
|
+
stat.mtimeMs,
|
|
73
|
+
stat.ctimeMs,
|
|
74
|
+
raw,
|
|
75
|
+
]))
|
|
76
|
+
.digest("hex"),
|
|
77
|
+
};
|
|
42
78
|
}
|
|
43
79
|
finally {
|
|
44
80
|
closeSync(fd);
|
|
@@ -65,91 +101,101 @@ export class TelemetryStore {
|
|
|
65
101
|
throw error;
|
|
66
102
|
}
|
|
67
103
|
}
|
|
68
|
-
|
|
104
|
+
snapshot() {
|
|
69
105
|
if (!this.checkDirectory())
|
|
70
|
-
return undefined;
|
|
71
|
-
|
|
72
|
-
|
|
106
|
+
return { persisted: undefined, legacyFingerprint: undefined };
|
|
107
|
+
// Older wx/PID writers never touch this protocol's state, lease or outbox.
|
|
108
|
+
// Their preference is read-only input; their recovery markers are never trusted.
|
|
109
|
+
const legacyFile = readPrivate(join(this.directory, "state.json"), 300_000);
|
|
110
|
+
const legacy = legacyFile === undefined
|
|
111
|
+
? undefined
|
|
112
|
+
: stateSchema.parse(JSON.parse(legacyFile.raw));
|
|
113
|
+
const current = readPrivate(join(this.directory, "state-v2.json"), 301_000);
|
|
114
|
+
let persisted = current === undefined
|
|
115
|
+
? undefined
|
|
116
|
+
: persistedSchema.parse(JSON.parse(current.raw));
|
|
117
|
+
if (!persisted && legacy) {
|
|
118
|
+
// Do not duplicate the old sender's outbox. Preserve its installation identity.
|
|
119
|
+
persisted = { version: 2, state: { ...legacy, events: [] } };
|
|
120
|
+
}
|
|
121
|
+
if (persisted &&
|
|
122
|
+
legacy?.enabled === false &&
|
|
123
|
+
persisted.acknowledged_legacy_optout !== legacyFile?.fingerprint) {
|
|
124
|
+
persisted.state.enabled = false;
|
|
125
|
+
persisted.state.events = [];
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
persisted,
|
|
129
|
+
legacyFingerprint: legacy?.enabled === false ? legacyFile?.fingerprint : undefined,
|
|
130
|
+
};
|
|
73
131
|
}
|
|
74
|
-
|
|
132
|
+
read() {
|
|
133
|
+
return this.snapshot().persisted?.state;
|
|
134
|
+
}
|
|
135
|
+
// Kernel ownership expires on process death. No retry, PID reclamation or unlink.
|
|
75
136
|
lock(name = "state.lock") {
|
|
76
137
|
this.checkDirectory(true);
|
|
77
|
-
const path = join(this.directory, name);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
if (Date.now() - lstatSync(path).mtimeMs > 10_000) {
|
|
83
|
-
recovery = openSync(recoveryPath, "wx", 0o600);
|
|
84
|
-
const raw = readPrivate(path, 128);
|
|
85
|
-
if (raw !== undefined &&
|
|
86
|
-
Date.now() - lstatSync(path).mtimeMs > 10_000) {
|
|
87
|
-
const pid = Number(raw);
|
|
88
|
-
if (Number.isSafeInteger(pid) && pid > 0) {
|
|
89
|
-
try {
|
|
90
|
-
process.kill(pid, 0);
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
if (error.code === "ESRCH")
|
|
94
|
-
unlinkSync(path);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch {
|
|
101
|
-
/* Fail closed on unverifiable/busy recovery locks. */
|
|
138
|
+
const path = join(this.directory, name === "state.lock" ? "state-v2.lease" : "sender-v2.lease");
|
|
139
|
+
let lease;
|
|
140
|
+
if (process.platform === "win32") {
|
|
141
|
+
lease = openWindowsStateLease(path);
|
|
102
142
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
143
|
+
else {
|
|
144
|
+
const fd = openSync(path, constants.O_CREAT |
|
|
145
|
+
constants.O_RDWR |
|
|
146
|
+
constants.O_NONBLOCK |
|
|
147
|
+
(constants.O_NOFOLLOW ?? 0), 0o600);
|
|
148
|
+
try {
|
|
149
|
+
const stat = fstatSync(fd);
|
|
150
|
+
owned(stat);
|
|
151
|
+
if (!stat.isFile() || stat.nlink !== 1 || stat.size !== 0)
|
|
152
|
+
throw new Error("Unsafe telemetry lease");
|
|
153
|
+
const current = lstatSync(path);
|
|
154
|
+
if (current.dev !== stat.dev || current.ino !== stat.ino)
|
|
155
|
+
throw unavailable();
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
closeSync(fd);
|
|
159
|
+
throw error;
|
|
110
160
|
}
|
|
161
|
+
lease = openSynchronousKernelFileLease(fd, unavailable);
|
|
111
162
|
}
|
|
112
|
-
const fd = openSync(path, "wx", 0o600);
|
|
113
163
|
try {
|
|
114
|
-
|
|
164
|
+
if (!lease.acquire())
|
|
165
|
+
throw unavailable();
|
|
166
|
+
this.checkDirectory();
|
|
115
167
|
}
|
|
116
168
|
catch (error) {
|
|
117
|
-
|
|
118
|
-
try {
|
|
119
|
-
unlinkSync(path);
|
|
120
|
-
}
|
|
121
|
-
catch { }
|
|
169
|
+
lease.close();
|
|
122
170
|
throw error;
|
|
123
171
|
}
|
|
124
|
-
|
|
125
|
-
closeSync(fd);
|
|
126
|
-
return () => {
|
|
127
|
-
try {
|
|
128
|
-
const current = lstatSync(path);
|
|
129
|
-
if (current.ino === identity.ino && current.dev === identity.dev)
|
|
130
|
-
unlinkSync(path);
|
|
131
|
-
}
|
|
132
|
-
catch { }
|
|
133
|
-
};
|
|
172
|
+
return () => lease.close();
|
|
134
173
|
}
|
|
135
|
-
update(change) {
|
|
174
|
+
update(change, explicitlyEnable = false) {
|
|
136
175
|
const release = this.lock();
|
|
137
176
|
let temporary;
|
|
138
177
|
try {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
178
|
+
const snapshot = this.snapshot();
|
|
179
|
+
const persisted = snapshot.persisted ?? {
|
|
180
|
+
version: 2,
|
|
181
|
+
state: {
|
|
182
|
+
version: 1,
|
|
183
|
+
enabled: true,
|
|
184
|
+
notice_version: 0,
|
|
185
|
+
events: [],
|
|
186
|
+
},
|
|
144
187
|
};
|
|
188
|
+
const state = persisted.state;
|
|
189
|
+
if (explicitlyEnable && snapshot.legacyFingerprint !== undefined)
|
|
190
|
+
persisted.acknowledged_legacy_optout = snapshot.legacyFingerprint;
|
|
145
191
|
change(state);
|
|
146
192
|
stateSchema.parse(state);
|
|
147
193
|
temporary = join(this.directory, `${randomUUID()}.tmp`);
|
|
148
|
-
writeFileSync(temporary, JSON.stringify(
|
|
194
|
+
writeFileSync(temporary, JSON.stringify(persisted), {
|
|
149
195
|
flag: "wx",
|
|
150
196
|
mode: 0o600,
|
|
151
197
|
});
|
|
152
|
-
renameSync(temporary, join(this.directory, "state.json"));
|
|
198
|
+
renameSync(temporary, join(this.directory, "state-v2.json"));
|
|
153
199
|
return state;
|
|
154
200
|
}
|
|
155
201
|
finally {
|
|
@@ -176,10 +222,10 @@ export class TelemetryStore {
|
|
|
176
222
|
state.enabled = enabled;
|
|
177
223
|
if (!enabled)
|
|
178
224
|
state.events = [];
|
|
179
|
-
});
|
|
225
|
+
}, enabled);
|
|
180
226
|
}
|
|
181
|
-
enqueue(
|
|
182
|
-
telemetryEventSchema.parse(
|
|
227
|
+
enqueue(input) {
|
|
228
|
+
const event = telemetryEventSchema.parse(input);
|
|
183
229
|
if (event.environment === "ci")
|
|
184
230
|
throw new Error("CI events cannot be persisted");
|
|
185
231
|
this.update((state) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/telemetry/state.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY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AAC,MAAM,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI;gBACjE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,KAAK,EAAE,OAAO;YACnB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;YAC1E,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IACD,WAAW,CAAC,GAAsB;QAChC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YACpB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/telemetry/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/telemetry/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAExE,eAAO,MAAM,kBAAkB,2CAA2C,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,OAAO,CAAC,CAAC;AACtB,yFAAyF;AACzF,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,OAAO,CAAC,CAkBlB"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { telemetryBatchSchema } from "./schema.js";
|
|
2
|
+
import { TELEMETRY_REQUEST_BYTES } from "./batch.js";
|
|
2
3
|
export const TELEMETRY_ENDPOINT = "https://telemetry.zedbee.dev/v1/events";
|
|
3
4
|
/** True means terminal acknowledgement, including permanently rejected wire versions. */
|
|
4
5
|
export async function sendTelemetry(events, signal, fetcher = fetch) {
|
|
5
6
|
try {
|
|
6
7
|
const batch = telemetryBatchSchema.parse({ events });
|
|
8
|
+
const body = JSON.stringify(batch);
|
|
9
|
+
if (Buffer.byteLength(body) > TELEMETRY_REQUEST_BYTES)
|
|
10
|
+
return false;
|
|
7
11
|
const response = await fetcher(TELEMETRY_ENDPOINT, {
|
|
8
12
|
method: "POST",
|
|
9
13
|
redirect: "error",
|
|
10
14
|
signal: AbortSignal.any([signal, AbortSignal.timeout(2000)]),
|
|
11
15
|
headers: { "content-type": "application/json" },
|
|
12
|
-
body
|
|
16
|
+
body,
|
|
13
17
|
});
|
|
14
18
|
// The collector's acknowledgement has no body; never buffer arbitrary remote content.
|
|
15
19
|
await response.body?.cancel();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/telemetry/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,wCAAwC,CAAC;AAK3E,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAAiC,EACjC,MAAmB,EACnB,UAAwB,KAAK;IAE7B,IAAI,CAAC;QACH,MAA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,sFAAsF;QACtF,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/telemetry/worker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAsB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/telemetry/worker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAsB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAMnE,wBAAsB,cAAc,CAClC,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,WAAW,EACnB,IAAI,GAAE,aAA6B,GAClC,OAAO,CAAC,IAAI,CAAC,CA8Bf"}
|
package/dist/telemetry/worker.js
CHANGED
|
@@ -3,6 +3,8 @@ import { fileURLToPath } from "node:url";
|
|
|
3
3
|
import { telemetryContext, telemetryDisabled } from "./policy.js";
|
|
4
4
|
import { TelemetryStore, telemetryDirectory } from "./state.js";
|
|
5
5
|
import { sendTelemetry } from "./transport.js";
|
|
6
|
+
import { TelemetryDetailsStore, enrichTelemetryEvent, } from "./details-store.js";
|
|
7
|
+
import { telemetryBatches } from "./batch.js";
|
|
6
8
|
export async function drainTelemetry(store, signal, send = sendTelemetry) {
|
|
7
9
|
let release;
|
|
8
10
|
try {
|
|
@@ -10,15 +12,21 @@ export async function drainTelemetry(store, signal, send = sendTelemetry) {
|
|
|
10
12
|
telemetryContext(process.env).environment === "ci")
|
|
11
13
|
return;
|
|
12
14
|
release = store.lock("sender.lock");
|
|
15
|
+
const details = new TelemetryDetailsStore(store.directory);
|
|
13
16
|
for (let attempt = 0; attempt < 5 && !signal.aborted; attempt++) {
|
|
14
17
|
if (telemetryDisabled(process.env))
|
|
15
18
|
return;
|
|
16
|
-
const
|
|
19
|
+
const pending = store.pending();
|
|
20
|
+
details.prune(pending.map((event) => event.event_id));
|
|
21
|
+
const events = telemetryBatches(pending
|
|
22
|
+
.slice(0, 20)
|
|
23
|
+
.map((event) => enrichTelemetryEvent(event, details.read(event))))[0] ?? [];
|
|
17
24
|
if (events.length === 0)
|
|
18
25
|
return;
|
|
19
26
|
if (!(await send(events, signal)))
|
|
20
27
|
return;
|
|
21
28
|
store.acknowledge(events.map((event) => event.event_id));
|
|
29
|
+
details.remove(events.map((event) => event.event_id));
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/telemetry/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AACnE,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAqB,EACrB,MAAmB,EACnB,OAAsB,aAAa;IAEnC,IAAI,OAAiC,CAAC;IACtC,IAAI,CAAC;QACH,IACE,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC;YAC9B,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,KAAK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