* refactor: move lighthouse audits to dataforseo (#43) * refactor: move lighthouse audits to dataforseo * chore: remove obsolete audit settings modal * refactor: rename psi flows to lighthouse * save * refactor: simplify audit lighthouse storage flow * fix: separate lighthouse metrics from actionable audits * refactor: remove redundant audit project inputs * feat: redesign lighthouse issues screen with score gauges and table layout Replace flat score cards with circular SVG gauges, condense metrics into a compact grid, and switch issue list from cards to an expandable table with fixed column widths. * test: harden lighthouse regression coverage * fix: restore project-scoped audit inputs * refactor: simplify lighthouse payload handling * refactor: inline lighthouse server handlers * refactor: share audit workflow types * refactor: simplify lighthouse payload flows * save * refactor: drop project pagespeed api key * fix: restore lighthouse issues loading with resilient project context * fix: restore audit issues back navigation * refactor: simplify project context and lighthouse error handling * fix: tolerate DataForSEO lighthouse payload drift * refactor: route audit lighthouse through dataforseo client --------- * feat: add PostHog error tracking for client and server Integrate posthog-js and posthog-node to capture unhandled errors in both the client error boundary and server function middleware, skipping expected errors like auth and 404s. * fix: improve PostHog error tracking setup - Fix captureExceptionImmediate args (pass undefined as distinctId, not request path) - Rename VITE_POSTHOG_KEY/POSTHOG_KEY to POSTHOG_PUBLIC_KEY (single env var for both client and server) - Expose POSTHOG_PUBLIC_KEY and POSTHOG_HOST via Vite envPrefix instead of VITE_ prefix - Enable capture_exceptions in client posthog-js init for error tracking - Use waitUntil() instead of await for server error capture (non-blocking) - Add try/catch around client captureException to prevent unhandled rejections * fix: align PostHog setup with lint rules * fix: gate PostHog to hosted mode * docs: remove hosted PostHog README note --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
773 B
TypeScript
30 lines
773 B
TypeScript
// Custom environment variable type definitions
|
|
// These extend the auto-generated Env interface from worker-configuration.d.ts
|
|
|
|
declare namespace Cloudflare {
|
|
interface Env {
|
|
R2: R2Bucket;
|
|
|
|
AUTH_MODE?: "cloudflare_access" | "local_noauth" | "hosted";
|
|
TEAM_DOMAIN?: string;
|
|
POLICY_AUD?: string;
|
|
POSTHOG_PUBLIC_KEY?: string;
|
|
POSTHOG_HOST?: string;
|
|
BETTER_AUTH_SECRET?: string;
|
|
BETTER_AUTH_URL?: string;
|
|
|
|
// DataForSEO API Basic auth value (base64 of login:password)
|
|
DATAFORSEO_API_KEY: string;
|
|
}
|
|
}
|
|
|
|
interface ImportMetaEnv {
|
|
readonly AUTH_MODE?: "cloudflare_access" | "local_noauth" | "hosted";
|
|
readonly POSTHOG_PUBLIC_KEY?: string;
|
|
readonly POSTHOG_HOST?: string;
|
|
}
|
|
|
|
interface ImportMeta {
|
|
readonly env: ImportMetaEnv;
|
|
}
|