Download src/mocks/analytics-handlers.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/mocks/analytics-handlers.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/mocks/analytics-handlers.ts
-
curl -L -o analytics-handlers.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/mocks/analytics-handlers.ts
497 Bytes
| import { http, HttpResponse } from "msw"; | |
| // Block both the direct PostHog ingestion endpoint and the OpenHands reverse | |
| // proxy (z.openhands.dev) used by the library telemetry service so mock-mode | |
| // builds never send analytics events to PostHog. | |
| export const ANALYTICS_HANDLERS = [ | |
| http.post("https://us.i.posthog.com/e", async () => | |
| HttpResponse.json(null, { status: 200 }), | |
| ), | |
| http.post("https://z.openhands.dev/*", async () => | |
| HttpResponse.json(null, { status: 200 }), | |
| ), | |
| ]; | |