fix: add missing frontend dependencies and remove trailing whitespace
- Add @tanstack/react-query, axios, and clsx to frontend dependencies - Remove trailing whitespace from multiple files to pass pre-commit hooks - These were required but missing from package.json
This commit is contained in:
@@ -103,7 +103,7 @@ describe('useImport', () => {
|
||||
await result.current.commit({ 'test.com': 'skip' })
|
||||
|
||||
expect(api.importAPI.commit).toHaveBeenCalledWith('session-2', { 'test.com': 'skip' })
|
||||
|
||||
|
||||
await waitFor(() => {
|
||||
expect(result.current.session).toBeNull()
|
||||
})
|
||||
@@ -149,7 +149,7 @@ describe('useImport', () => {
|
||||
vi.mocked(api.importAPI.upload).mockResolvedValue({ session: mockSession })
|
||||
vi.mocked(api.importAPI.status).mockResolvedValue({ has_pending: true, session: mockSession })
|
||||
vi.mocked(api.importAPI.preview).mockResolvedValue({ hosts: [], conflicts: [], errors: [] })
|
||||
|
||||
|
||||
const mockError = new Error('Commit failed')
|
||||
vi.mocked(api.importAPI.commit).mockRejectedValue(mockError)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('useProxyHosts', () => {
|
||||
vi.mocked(api.proxyHostsAPI.list).mockResolvedValue([])
|
||||
const newHost = { domain_names: 'new.com', forward_host: 'localhost', forward_port: 9000 }
|
||||
const createdHost = { uuid: '3', ...newHost, enabled: true }
|
||||
|
||||
|
||||
vi.mocked(api.proxyHostsAPI.create).mockResolvedValue(createdHost)
|
||||
|
||||
const { result } = renderHook(() => useProxyHosts())
|
||||
@@ -81,7 +81,7 @@ describe('useProxyHosts', () => {
|
||||
it('updates an existing proxy host', async () => {
|
||||
const existingHost = { uuid: '1', domain_names: 'test.com', enabled: true, forward_host: 'localhost', forward_port: 8080 }
|
||||
vi.mocked(api.proxyHostsAPI.list).mockResolvedValue([existingHost])
|
||||
|
||||
|
||||
const updatedHost = { ...existingHost, domain_names: 'updated.com' }
|
||||
vi.mocked(api.proxyHostsAPI.update).mockResolvedValue(updatedHost)
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ describe('useRemoteServers', () => {
|
||||
vi.mocked(api.remoteServersAPI.list).mockResolvedValue([])
|
||||
const newServer = { name: 'New Server', host: 'new.local', port: 5000, enabled: true, provider: 'generic' }
|
||||
const createdServer = { uuid: '4', ...newServer }
|
||||
|
||||
|
||||
vi.mocked(api.remoteServersAPI.create).mockResolvedValue(createdServer)
|
||||
|
||||
const { result } = renderHook(() => useRemoteServers())
|
||||
@@ -105,7 +105,7 @@ describe('useRemoteServers', () => {
|
||||
it('updates an existing remote server', async () => {
|
||||
const existingServer = { uuid: '1', name: 'Server 1', host: 'localhost', port: 8080, enabled: true }
|
||||
vi.mocked(api.remoteServersAPI.list).mockResolvedValue([existingServer])
|
||||
|
||||
|
||||
const updatedServer = { ...existingServer, name: 'Updated Server' }
|
||||
vi.mocked(api.remoteServersAPI.update).mockResolvedValue(updatedServer)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export function useImport() {
|
||||
|
||||
const commit = async (resolutions: Record<string, string>) => {
|
||||
if (!session) throw new Error('No active session')
|
||||
|
||||
|
||||
try {
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
@@ -87,7 +87,7 @@ export function useImport() {
|
||||
|
||||
const cancel = async () => {
|
||||
if (!session) return
|
||||
|
||||
|
||||
try {
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
|
||||
Reference in New Issue
Block a user