refactor(proxy): export ProxyRules type from proxy.conf.mjs

This commit is contained in:
kamask
2026-11-10 16:04:29 +03:00
parent 0d2c25a8f7
commit ad493f6f52
2 changed files with 5 additions and 4 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
// Проверяет правило `/pb/` в proxy.conf.mjs: оно должно повторять `location /pb/` из nginx и серверный `PB_URL`.
import { afterEach, describe, expect, it, vi } from 'vitest';
import type { ProxyRules } from '../../proxy.conf.mjs';
type Rules = typeof import('../../proxy.conf.mjs').default;
async function loadRules(pbUrl: string | undefined): Promise<Rules> {
async function loadRules(pbUrl: string | undefined): Promise<ProxyRules> {
vi.stubEnv('PB_URL', pbUrl);
vi.resetModules();
return (await import('../../proxy.conf.mjs')).default;