feat(telemetry): require explicit opt-in

This commit is contained in:
Turtle
2026-08-10 21:57:56 +08:00
parent 504e96a049
commit e6eb44ed2a
53 files changed
+265 -370

No files matched your search

@@ -611,12 +611,12 @@ describe('command telemetry', () => {
const reporter = { report: () => { sent.push(1) }, flush: async () => {} }
await reportCommandTelemetry(
{ command: 'build', cwd: dir, durationMs: 5, success: true },
{ resolve: async () => ({ allowed: true, reason: 'absent' }), reporter },
{ resolve: async () => ({ allowed: true, reason: 'FULL' }), reporter },
)
expect(sent).toHaveLength(1)
await reportCommandTelemetry(
{ command: 'build', cwd: dir, durationMs: 5, success: true },
{ resolve: async () => ({ allowed: false, reason: 'disabled' }), reporter },
{ resolve: async () => ({ allowed: false, reason: 'DISABLED' }), reporter },
)
expect(sent).toHaveLength(1)
await expect(reportCommandTelemetry(