Brand strings, config defaults, i18n dicts, PDF attachment metadata, HTML titles, Docker container name, package name, repo URLs, deploy paths, and all documentation updated. Git remote switched to faunosteo.git. Domain URLs (zoosteo.fr) preserved — DNS update is separate. 155/155 tests green. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
/**
|
|
* Runtime application config.
|
|
* Resolution order:
|
|
* 1. window.__APP_CONFIG__ (injected by docker/entrypoint.sh)
|
|
* 2. import.meta.env.VITE_APP_* (build-time Vite defines)
|
|
* 3. Hard-coded defaults
|
|
*/
|
|
export interface AppConfig {
|
|
siteName: string
|
|
brandName: string
|
|
footerName: string
|
|
tagline: string
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
__APP_CONFIG__?: Partial<AppConfig>
|
|
}
|
|
}
|
|
|
|
const DEFAULTS: AppConfig = {
|
|
siteName: 'Faunosteo',
|
|
brandName: 'Faunosteo',
|
|
footerName: 'Faunosteo',
|
|
tagline: "Bilans d'ostéopathie animalière",
|
|
}
|
|
|
|
function resolveConfig(): AppConfig {
|
|
const runtime = typeof window !== 'undefined' ? window.__APP_CONFIG__ : {}
|
|
return {
|
|
siteName:
|
|
runtime?.siteName ??
|
|
import.meta.env.VITE_APP_SITE_NAME ??
|
|
DEFAULTS.siteName,
|
|
brandName:
|
|
runtime?.brandName ??
|
|
import.meta.env.VITE_APP_BRAND_NAME ??
|
|
DEFAULTS.brandName,
|
|
footerName:
|
|
runtime?.footerName ??
|
|
import.meta.env.VITE_APP_FOOTER_NAME ??
|
|
DEFAULTS.footerName,
|
|
tagline:
|
|
runtime?.tagline ??
|
|
import.meta.env.VITE_APP_TAGLINE ??
|
|
DEFAULTS.tagline,
|
|
}
|
|
}
|
|
|
|
export const appConfig: AppConfig = resolveConfig()
|