mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 15:46:22 +00:00
* docs: add uBlock Origin install info to getting started and ad-blocking pages Chrome dropped support for the full uBlock Origin extension — highlight that BrowserOS brings it back and make it easy to install from both the getting started guide and the dedicated ad-blocking page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: revert Kimi partnership UI, restore daily limit survey Remove Kimi/Moonshot AI partnership branding from the rate limit banner, provider card, provider templates, and LLM hub. Restore the original survey CTA on daily limit errors. Moonshot AI remains as a regular provider template without the "Recommended" badge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address Greptile review comments - Guard survey CTA with !isCreditsExhausted to avoid showing it for credits-exhausted users who already see "View Usage & Billing" - Remove dead kimi-launch feature flag files (kimi-launch.ts, useKimiLaunch.ts) - Remove unused KIMI_RATE_LIMIT analytics events - Remove VITE_PUBLIC_KIMI_LAUNCH from env schema and .env.example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
850 B
TypeScript
33 lines
850 B
TypeScript
import { ZodError, z } from 'zod'
|
|
|
|
const EnvSchema = z.object({
|
|
VITE_BROWSEROS_SERVER_PORT: z.coerce.number().optional(),
|
|
VITE_PUBLIC_POSTHOG_KEY: z.string().optional(),
|
|
VITE_PUBLIC_POSTHOG_HOST: z.string().optional(),
|
|
VITE_PUBLIC_SENTRY_DSN: z.string().optional(),
|
|
VITE_PUBLIC_BROWSEROS_API: z.string().optional(),
|
|
PROD: z.boolean(),
|
|
})
|
|
|
|
try {
|
|
EnvSchema.parse(import.meta.env)
|
|
} catch (error) {
|
|
if (error instanceof ZodError) {
|
|
let message = 'Missing required values in .env:\n'
|
|
for (const issue of error.issues) {
|
|
message += `${issue.path.join('.')}\n`
|
|
}
|
|
const e = new Error(message)
|
|
e.stack = ''
|
|
throw e
|
|
}
|
|
// biome-ignore lint/suspicious/noConsole: allowed to display error information
|
|
console.error(error)
|
|
throw error
|
|
}
|
|
|
|
/**
|
|
* @public
|
|
*/
|
|
export const env = EnvSchema.parse(import.meta.env)
|