()
| 37 | const POSTHOG_QUERY_HOST = "https://us.posthog.com"; |
| 38 | |
| 39 | export function getPostHogQueryConfig(): { |
| 40 | apiKey: string; |
| 41 | projectId: string; |
| 42 | host: string; |
| 43 | } | null { |
| 44 | const apiKey = process.env.POSTHOG_PERSONAL_API_KEY; |
| 45 | const projectId = process.env.POSTHOG_PROJECT_ID; |
| 46 | if (!apiKey || !projectId) return null; |
| 47 | return { |
| 48 | apiKey, |
| 49 | projectId, |
| 50 | host: POSTHOG_QUERY_HOST, |
| 51 | }; |
| 52 | } |
| 53 | |
| 54 | async function queryPostHog( |
| 55 | config: { apiKey: string; projectId: string; host: string }, |
no outgoing calls
no test coverage detected