All files / src config.ts

0% Statements 0/1
0% Branches 0/2
100% Functions 0/0
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                                           
// src/config.ts
 
/**
 * A centralized configuration module that reads environment variables
 * from `import.meta.env`. This provides a single, explicit place to manage
 * environment-specific settings and makes mocking for tests significantly easier.
 */
const config = {
  app: {
    version: import.meta.env.VITE_APP_VERSION,
    commitMessage: import.meta.env.VITE_APP_COMMIT_MESSAGE,
    commitUrl: import.meta.env.VITE_APP_COMMIT_URL,
  },
  google: {
    mapsEmbedApiKey: import.meta.env.VITE_GOOGLE_MAPS_EMBED_API_KEY,
  },
  /**
   * Sentry/Bugsink error tracking configuration (ADR-015).
   * Uses VITE_ prefix for client-side environment variables.
   */
  sentry: {
    dsn: import.meta.env.VITE_SENTRY_DSN,
    environment: import.meta.env.VITE_SENTRY_ENVIRONMENT || import.meta.env.MODE,
    debug: import.meta.env.VITE_SENTRY_DEBUG === 'true',
    enabled: import.meta.env.VITE_SENTRY_ENABLED !== 'false',
  },
};
 
export default config;