♻️ refactor: remove duplicated code (Quick Wins)

- Delete unused Input.svelte from Picture app (70 LOC)
- Remove sleep() from shared-api-client, import from shared-utils
- Fix NodeJS.Timeout type for browser compatibility

Part of consolidation effort - see docs/CONSOLIDATION_OPPORTUNITIES.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-01-29 16:19:18 +01:00
parent 0a6a1dcd1a
commit 1348fca84d
6 changed files with 9 additions and 78 deletions

View file

@ -11,8 +11,8 @@ import {
getErrorCodeFromStatus,
isRetryableError,
parseErrorResponse,
sleep,
} from './utils';
import { sleep } from '@manacore/shared-utils';
const DEFAULT_TIMEOUT = 30000;
const DEFAULT_RETRIES = 0;

View file

@ -59,13 +59,6 @@ export async function parseErrorResponse(response: Response): Promise<string> {
}
}
/**
* Sleep utility for retry delays
*/
export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
/**
* Check if error is retryable (network issues, 5xx errors)
*/