refactor: keep the outgoing host descriptions out of the browser bundle and scan every URL form #903

This commit is contained in:
Linus Rath
2026-10-28 04:30:23 +01:00
parent 3ef4a40836
commit 031d94635c
10 changed files with 561 additions and 293 deletions
@@ -1,7 +1,7 @@
import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { listReachableHosts } from '@/lib/admin/reachable-hosts';
import { OUTGOING_HOSTS } from '@/lib/outgoing-hosts';
import { OUTGOING_HOSTS } from '@/lib/admin/outgoing-hosts-registry';
import type { OrgPolicyDraft } from '@/components/admin/org/use-org-policy-draft';
const apiFetch = vi.hoisted(() => vi.fn());
@@ -6,7 +6,7 @@ import { SettingsSection, SettingItem, ToggleSwitch } from '@/components/setting
import { ConfigNote, RevertButton, SourceBadge } from '@/components/admin/config-items';
import { AdminLink } from '@/components/admin/admin-link';
import { apiFetch } from '@/lib/browser-navigation';
import type { OutgoingHost } from '@/lib/outgoing-hosts';
import type { OutgoingHost } from '@/lib/admin/outgoing-hosts-registry';
import type { ReachableHost } from '@/lib/admin/reachable-hosts';
import type { OrgPolicyDraft } from '../use-org-policy-draft';