openreader/tests/global-teardown.ts
Richard R 81d249ed52 feat(storage): implement S3/SeaweedFS blob storage for documents
Replaces local filesystem document storage with S3-compatible object storage.
Adds embedded SeaweedFS 'weed mini' for local development and Docker deployments.
Updates document upload flow to use presigned URLs with a server fallback proxy.
Refactors auth configuration to use BASE_URL and AUTH_SECRET.

BREAKING CHANGE: Renamed BETTER_AUTH_URL to BASE_URL and BETTER_AUTH_SECRET to AUTH_SECRET. Removed legacy document upload/content endpoints. Requires S3 environment variables (auto-configured for embedded SeaweedFS).
2026-02-10 12:29:15 -07:00

11 lines
384 B
TypeScript

import { deleteDocumentPrefix } from '../src/lib/server/documents-blobstore';
import { getS3Config, isS3Configured } from '../src/lib/server/s3';
export default async function globalTeardown(): Promise<void> {
if (!isS3Configured()) return;
const config = getS3Config();
const nsRootPrefix = `${config.prefix}/documents_v1/ns/`;
await deleteDocumentPrefix(nsRootPrefix);
}