When running task dev / dev:all / dev:saas / dev:portal from a worktree, the frontend dev server injects the worktree folder basename (e.g. wt1) as a build-time constant, and the app prefixes the browser tab title with it so concurrent worktrees are distinguishable instead of all reading "Stirling PDF". Only the folder basename is exposed (never path/host/user), and only at vite dev-serve time — production builds inject an empty string and the feature compiles to a no-op. Desktop (tauri dev) is unaffected.
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
interface ImportMetaEnv {
|
|
// Used by all builds (.env)
|
|
readonly VITE_API_BASE_URL: string;
|
|
/** "true" includes the admin portal's lazy route/chunk in the editor build. */
|
|
readonly VITE_INCLUDE_PORTAL: string;
|
|
readonly VITE_GOOGLE_DRIVE_CLIENT_ID: string;
|
|
readonly VITE_GOOGLE_DRIVE_API_KEY: string;
|
|
readonly VITE_GOOGLE_DRIVE_APP_ID: string;
|
|
readonly VITE_SUPABASE_URL: string;
|
|
readonly VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY: string;
|
|
readonly VITE_STRIPE_PUBLISHABLE_KEY: string;
|
|
readonly VITE_PUBLIC_POSTHOG_KEY: string;
|
|
readonly VITE_PUBLIC_POSTHOG_HOST: string;
|
|
|
|
// SaaS only (.env.saas)
|
|
readonly VITE_USERBACK_TOKEN: string;
|
|
readonly VITE_DEV_BYPASS_AUTH: string;
|
|
|
|
// Desktop only (.env.desktop)
|
|
readonly VITE_DESKTOP_BACKEND_URL: string;
|
|
readonly VITE_SAAS_SERVER_URL: string;
|
|
readonly VITE_SAAS_BACKEND_API_URL: string;
|
|
/** When "true" (dev only), desktop auth treats JWT as expired — see authService.shouldSimulateExpiredJwt */
|
|
readonly VITE_DEV_SIMULATE_EXPIRED_JWT: string;
|
|
}
|
|
|
|
interface ImportMeta {
|
|
readonly env: ImportMetaEnv;
|
|
}
|
|
|
|
/**
|
|
* Dev-only worktree folder basename injected by vite.config at dev-serve time
|
|
* (empty string in production builds). Used to prefix the browser tab title so
|
|
* concurrent worktrees are distinguishable.
|
|
*/
|
|
declare const __DEV_WORKTREE_LABEL__: string;
|