chore: fix lint errors — noBannedTypes, import ordering, formatting
Deploy FileDrop / deploy (push) Successful in 42s
Deploy FileDrop / deploy (push) Successful in 42s
- Replace unsafe 'Function' type in test with ITelegramService interface - Biome auto-fix formatting and import sorting across 8 files Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -205,11 +205,14 @@ export class BotPool implements ITelegramService {
|
||||
|
||||
if (attempt <= MAX_TRANSIENT_RETRIES && isTransientError(error)) {
|
||||
const backoffMs = Math.min(1000 * 2 ** attempt, 10_000);
|
||||
logger.warn(`Transient error forwarding file, retrying (${attempt}/${MAX_TRANSIENT_RETRIES})`, {
|
||||
fileName,
|
||||
error: errorStr,
|
||||
backoffMs,
|
||||
});
|
||||
logger.warn(
|
||||
`Transient error forwarding file, retrying (${attempt}/${MAX_TRANSIENT_RETRIES})`,
|
||||
{
|
||||
fileName,
|
||||
error: errorStr,
|
||||
backoffMs,
|
||||
},
|
||||
);
|
||||
await sleep(backoffMs);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { TelegramFileInfo } from '../../../domain/ports/telegram-service';
|
||||
import { fileInfoCache } from '../../../infrastructure/cache/index';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
import logger from '../../../shared/logger/index';
|
||||
import { cleanupTempFile, formatCreatedAt, getErrorMessage } from '../../../shared/utils/file';
|
||||
import { createChunkedObjectResponse } from '../../../utils/chunked-storage';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
import type { TelegramFileInfo } from '../../../domain/ports/telegram-service';
|
||||
import { locateZipEntry } from '../../../utils/zip';
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
listMultipartUploadsByBucket,
|
||||
} from '../../../db/multipart';
|
||||
import type { File } from '../../../db/schema';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
import logger from '../../../shared/logger/index';
|
||||
import { cleanupTempFile, ensureExtension, getErrorMessage } from '../../../shared/utils/file';
|
||||
import {
|
||||
@@ -43,7 +44,6 @@ import {
|
||||
parseDeleteObjectsBody,
|
||||
s3ErrorResponse,
|
||||
} from '../../../utils/s3/xml';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
|
||||
/**
|
||||
* The default S3 region returned when no region is explicitly configured.
|
||||
|
||||
@@ -8,13 +8,13 @@ import {
|
||||
listObjectsByPrefix,
|
||||
softDeleteFile,
|
||||
} from '../../../db/files-ext';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
import logger from '../../../shared/logger/index';
|
||||
import { cleanupTempFile, ensureExtension, getErrorMessage } from '../../../shared/utils/file';
|
||||
import {
|
||||
createChunkedObjectResponse,
|
||||
storeFileInTelegramChunks,
|
||||
} from '../../../utils/chunked-storage';
|
||||
import { botPool } from '../../../infrastructure/telegram/bot-pool';
|
||||
|
||||
/**
|
||||
* Route parameters extracted from the URL path.
|
||||
|
||||
@@ -6,10 +6,10 @@ import { db, files as fileSchema } from '../db';
|
||||
import { insertFileParts, listFileParts, type NewFilePartInput } from '../db/file-parts';
|
||||
import type { File } from '../db/schema';
|
||||
import { config } from '../env';
|
||||
import { botPool } from '../infrastructure/telegram/bot-pool';
|
||||
import { computeHash } from './file';
|
||||
import { createGetObjectResponse, type ObjectPartSource } from './s3/object-stream';
|
||||
import type { RangeParseResult } from './s3/range';
|
||||
import { botPool } from '../infrastructure/telegram/bot-pool';
|
||||
|
||||
export type ChunkCompressionAlgorithm = 'gzip' | null;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { nanoid } from 'nanoid';
|
||||
import { db, files as fileSchema } from '../db';
|
||||
import type { NewFile } from '../db/schema';
|
||||
import { config } from '../env';
|
||||
import { cleanupTempFile } from './file';
|
||||
import { botPool } from '../infrastructure/telegram/bot-pool';
|
||||
import { cleanupTempFile } from './file';
|
||||
import { createZip, type ZipEntry } from './zip';
|
||||
|
||||
export type PreparedUpload = {
|
||||
|
||||
Reference in New Issue
Block a user