feat: implement usage stats logging with telemetry refactoring

This commit is contained in:
tanzhenxin
2025-08-12 12:16:38 +08:00
parent c96852dc56
commit 807844fb57
12 changed files with 203 additions and 242 deletions

View File

@@ -8,3 +8,9 @@ import { setSimulate429 } from './src/utils/testUtils.js';
// Disable 429 simulation globally for all tests
setSimulate429(false);
// Some dependencies (e.g., undici) expect a global File constructor in Node.
// Provide a minimal shim for test environment if missing.
if (typeof (globalThis as unknown as { File?: unknown }).File === 'undefined') {
(globalThis as unknown as { File: unknown }).File = class {} as unknown;
}