Files
DenozordecandCursor 6c6e76fca3
CI / changes (push) Successful in 7s
CI / openapi (push) Failing after 40s
CI / web (push) Successful in 56s
CI / commitlint (push) Skipped
CI / go (push) Failing after 34s
CI / bird2 (push) Skipped
CI / release (push) Skipped
feat(ops): protect metrics, rate-limit auth, agent secret timing, e2e smoke
Bearer для /metrics (EVOBGP_METRICS_TOKEN); rate limit /v1/auth/config; constant-time agent secret; OTel stub; Playwright smoke; HTTP_PROXY note; checklist обновлён.

Co-authored-by: Cursor <[email protected]>
2026-07-31 12:29:00 +07:00

41 lines
1.5 KiB
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { TanStackRouterVite as TanStackRouterPlugin } from '@tanstack/router-plugin/vite'
import path from 'node:path'
export default defineConfig({
plugins: [
TanStackRouterPlugin({ target: 'react', autoCodeSplitting: true }),
react(),
tailwindcss(),
],
resolve: {
alias: [
// shadcn components inside packages/ui import '@/hooks/use-mobile' (their own alias).
// Vite doesn't read tsconfig paths from packages/ui; expose a fallback so those imports
// resolve to packages/ui/src/hooks instead of apps/web/src/hooks.
{
find: '@/hooks/use-mobile',
replacement: path.resolve(__dirname, '../../packages/ui/src/hooks/use-mobile.ts'),
},
{ find: '@', replacement: path.resolve(__dirname, './src') },
{ find: '@evobgp/ui/components', replacement: path.resolve(__dirname, '../../packages/ui/src/components') },
{ find: '@evobgp/ui/hooks', replacement: path.resolve(__dirname, '../../packages/ui/src/hooks') },
{ find: '@evobgp/ui/lib/utils', replacement: path.resolve(__dirname, '../../packages/ui/src/lib/utils.ts') },
],
},
server: {
port: 5173,
proxy: {
'/v1': { target: 'http://127.0.0.1:8080', changeOrigin: true },
'/metrics': { target: 'http://127.0.0.1:8080', changeOrigin: true },
},
},
test: {
environment: 'happy-dom',
globals: true,
exclude: ['**/node_modules/**', '**/e2e/**', '**/dist/**'],
},
})