diff --git a/apps/picture/apps/web/src/lib/components/ui/Input.svelte b/apps/picture/apps/web/src/lib/components/ui/Input.svelte deleted file mode 100644 index 34bf4ed1f..000000000 --- a/apps/picture/apps/web/src/lib/components/ui/Input.svelte +++ /dev/null @@ -1,69 +0,0 @@ - - -{#if label} - -{/if} - - - -{#if error} -

{error}

-{/if} diff --git a/packages/shared-api-client/package.json b/packages/shared-api-client/package.json index d55304d8f..db2486ab6 100644 --- a/packages/shared-api-client/package.json +++ b/packages/shared-api-client/package.json @@ -15,6 +15,9 @@ "build": "tsc", "type-check": "tsc --noEmit" }, + "dependencies": { + "@manacore/shared-utils": "workspace:*" + }, "devDependencies": { "typescript": "^5.9.3" } diff --git a/packages/shared-api-client/src/client.ts b/packages/shared-api-client/src/client.ts index 0af2f3506..1dfe1b395 100644 --- a/packages/shared-api-client/src/client.ts +++ b/packages/shared-api-client/src/client.ts @@ -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; diff --git a/packages/shared-api-client/src/utils.ts b/packages/shared-api-client/src/utils.ts index 413a88903..e1118e790 100644 --- a/packages/shared-api-client/src/utils.ts +++ b/packages/shared-api-client/src/utils.ts @@ -59,13 +59,6 @@ export async function parseErrorResponse(response: Response): Promise { } } -/** - * Sleep utility for retry delays - */ -export function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - /** * Check if error is retryable (network issues, 5xx errors) */ diff --git a/packages/shared-utils/src/async.ts b/packages/shared-utils/src/async.ts index 52a2d562f..7d1421d9b 100644 --- a/packages/shared-utils/src/async.ts +++ b/packages/shared-utils/src/async.ts @@ -51,7 +51,7 @@ export function debounce any>( fn: T, delay: number ): (...args: Parameters) => void { - let timeoutId: NodeJS.Timeout | null = null; + let timeoutId: ReturnType | null = null; return (...args: Parameters) => { if (timeoutId) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0dbccf43c..9be323785 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4472,6 +4472,10 @@ importers: version: 5.9.3 packages/shared-api-client: + dependencies: + '@manacore/shared-utils': + specifier: workspace:* + version: link:../shared-utils devDependencies: typescript: specifier: ^5.9.3