fix: satisfy deploy lint gate for S3 compatibility work
- Apply Biome organize-import/formatting fixes across changed S3 files - Replace remaining string concatenations with template literals for lint - Make home page inline handlers explicit via window.* and add button types - Clean S3 auth lint issues with dot-property access and optional chaining - Keep GetObject proxy and production/S3 SDK tests passing Verification: - bun run lint (0 errors, 1 CSS specificity warning) - S3_SECRET_KEY=<env> bun test test/production-e2e.test.ts (29 pass) - S3_SECRET_KEY=<env> bun test test/s3-sdk.test.ts (20 pass) - bun test test/s3-auth.test.ts (5 pass)
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
export const handleHome = async (): Promise<Response> => {
|
||||
const html = await Bun.file(import.meta.dir + '/../home.html').text();
|
||||
const html = await Bun.file(`${import.meta.dir}/../home.html`).text();
|
||||
return new Response(html, {
|
||||
status: 200,
|
||||
headers: {
|
||||
|
||||
+28
-28
@@ -1,39 +1,39 @@
|
||||
import { verifySignature, verifyPresignedUrl } from '../utils/s3/auth';
|
||||
import {
|
||||
listBucketsXml,
|
||||
s3ErrorResponse,
|
||||
listBucketResultXml,
|
||||
listBucketV2ResultXml,
|
||||
initiateMultipartUploadXml,
|
||||
listPartsXml,
|
||||
completeMultipartUploadXml,
|
||||
deleteResultXml,
|
||||
copyObjectResultXml,
|
||||
parseDeleteObjectsBody,
|
||||
parseCompleteMultipartBody,
|
||||
} from '../utils/s3/xml';
|
||||
import { createBucket, findBucketByName, listBuckets, deleteBucket } from '../db/buckets';
|
||||
import {
|
||||
createMultipartUpload,
|
||||
findMultipartUpload,
|
||||
completeMultipartUpload,
|
||||
abortMultipartUpload,
|
||||
insertMultipartPart,
|
||||
listMultipartParts,
|
||||
} from '../db/multipart';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { createBucket, deleteBucket, findBucketByName, listBuckets } from '../db/buckets';
|
||||
import {
|
||||
countBucketObjects,
|
||||
findFileByBucketAndKey,
|
||||
listObjectsByPrefix,
|
||||
softDeleteFile,
|
||||
countBucketObjects,
|
||||
} from '../db/files-ext';
|
||||
import {
|
||||
abortMultipartUpload,
|
||||
completeMultipartUpload,
|
||||
createMultipartUpload,
|
||||
findMultipartUpload,
|
||||
insertMultipartPart,
|
||||
listMultipartParts,
|
||||
} from '../db/multipart';
|
||||
import type { File } from '../db/schema';
|
||||
import { config } from '../env';
|
||||
import { forwardToStorage, getFileInfo } from '../utils/telegram';
|
||||
import { computeHash, ensureExtension, getErrorMessage, cleanupTempFile } from '../utils/file';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { cleanupTempFile, computeHash, ensureExtension, getErrorMessage } from '../utils/file';
|
||||
import logger from '../utils/logger';
|
||||
import { verifyPresignedUrl, verifySignature } from '../utils/s3/auth';
|
||||
import {
|
||||
completeMultipartUploadXml,
|
||||
copyObjectResultXml,
|
||||
deleteResultXml,
|
||||
initiateMultipartUploadXml,
|
||||
listBucketResultXml,
|
||||
listBucketsXml,
|
||||
listBucketV2ResultXml,
|
||||
listPartsXml,
|
||||
parseCompleteMultipartBody,
|
||||
parseDeleteObjectsBody,
|
||||
s3ErrorResponse,
|
||||
} from '../utils/s3/xml';
|
||||
import { forwardToStorage, getFileInfo } from '../utils/telegram';
|
||||
|
||||
const REGION = config.s3DefaultRegion || 'us-east-1';
|
||||
const REQUEST_ID = () => nanoid(16);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { createBucket, findBucketByName, listBuckets, deleteBucket } from '../db/buckets';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { createBucket, deleteBucket, findBucketByName, listBuckets } from '../db/buckets';
|
||||
import {
|
||||
countBucketObjects,
|
||||
findFileByBucketAndKey,
|
||||
listObjectsByPrefix,
|
||||
softDeleteFile,
|
||||
countBucketObjects,
|
||||
} from '../db/files-ext';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { config } from '../env';
|
||||
import { forwardToStorage, getFileInfo } from '../utils/telegram';
|
||||
import { computeHash, ensureExtension, getErrorMessage, cleanupTempFile } from '../utils/file';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { cleanupTempFile, computeHash, ensureExtension, getErrorMessage } from '../utils/file';
|
||||
import logger from '../utils/logger';
|
||||
import { forwardToStorage, getFileInfo } from '../utils/telegram';
|
||||
|
||||
type RouteParams = { bucket?: string; key?: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user