chore(plan): fix stale src/db doc refs + register s3-routing test
- 8 repository/port doc comments pointed at long-gone src/db/* layout; now reference the real drizzle repository paths - test:unit and test:s3 now include test/s3-routing.test.ts (was passing but never wired into any script)
This commit is contained in:
1 parent
3a9052d551
commit
890444fed6
9 files changed
+11
-11
No files matched your search
+2
-2
@@ -9,12 +9,12 @@
|
|||||||
"start": "NODE_ENV=production bun dist/index.js",
|
"start": "NODE_ENV=production bun dist/index.js",
|
||||||
"db:migrate": "bun dist/migrate.js",
|
"db:migrate": "bun dist/migrate.js",
|
||||||
"test": "bun run test:unit",
|
"test": "bun run test:unit",
|
||||||
"test:unit": "bun test --preload ./test/helpers/setup-env.ts test/rateLimit.test.ts && bun test --preload ./test/helpers/setup-env.ts test/file.test.ts && bun test --preload ./test/helpers/setup-env.ts test/files.test.ts && bun test --preload ./test/helpers/setup-env.ts test/health.test.ts && bun test --preload ./test/helpers/setup-env.ts test/db.test.ts && bun test --preload ./test/helpers/setup-env.ts test/bot-pool.test.ts && bun test --preload ./test/helpers/setup-env.ts test/bot.test.tsLine truncated
|
"test:unit": "bun test --preload ./test/helpers/setup-env.ts test/rateLimit.test.ts && bun test --preload ./test/helpers/setup-env.ts test/file.test.ts && bun test --preload ./test/helpers/setup-env.ts test/files.test.ts && bun test --preload ./test/helpers/setup-env.ts test/health.test.ts && bun test --preload ./test/helpers/setup-env.ts test/db.test.ts && bun test --preload ./test/helpers/setup-env.ts test/bot-pool.test.ts && bun test --preload ./test/helpers/setup-env.ts test/bot.test.tsLine truncated
|
||||||
"test:quarantine": "bun test --preload ./test/helpers/setup-env.ts test/telegram.test.ts && bun test --preload ./test/helpers/setup-env.ts test/upload.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-docker-registry.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-sdk.test.ts && bun test --preload ./test/helpers/setup-env.ts test/production-e2e.test.ts",
|
"test:quarantine": "bun test --preload ./test/helpers/setup-env.ts test/telegram.test.ts && bun test --preload ./test/helpers/setup-env.ts test/upload.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-docker-registry.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-sdk.test.ts && bun test --preload ./test/helpers/setup-env.ts test/production-e2e.test.ts",
|
||||||
"test:s3-auth": "bun test --preload ./test/helpers/setup-env.ts test/s3-auth.test.ts",
|
"test:s3-auth": "bun test --preload ./test/helpers/setup-env.ts test/s3-auth.test.ts",
|
||||||
"test:s3-ops": "bun test --preload ./test/helpers/setup-env.ts test/s3-operations.test.ts",
|
"test:s3-ops": "bun test --preload ./test/helpers/setup-env.ts test/s3-operations.test.ts",
|
||||||
"test:web-api": "bun test --preload ./test/helpers/setup-env.ts test/web-api.test.ts",
|
"test:web-api": "bun test --preload ./test/helpers/setup-env.ts test/web-api.test.ts",
|
||||||
"test:s3": "bun test --preload ./test/helpers/setup-env.ts test/s3-auth.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-auth-edge.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-operations.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-range.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-object-stream.test.ts && bun test --preload ./test/helpers/setup-env.ts test/object-stream-parallel.test.ts && bun test --preload ./Line truncated
|
"test:s3": "bun test --preload ./test/helpers/setup-env.ts test/s3-auth.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-auth-edge.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-operations.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-routing.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-range.test.ts && bun test --preload ./test/helpers/setup-env.ts test/s3-object-stream.test.ts && bun test --preload ./test/helpersLine truncated
|
||||||
"lint": "bunx biome check src test",
|
"lint": "bunx biome check src test",
|
||||||
"format": "bunx biome format --write src test",
|
"format": "bunx biome format --write src test",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { Bucket } from '../entities/bucket';
|
|||||||
/**
|
/**
|
||||||
* Repository interface for Bucket entity persistence.
|
* Repository interface for Bucket entity persistence.
|
||||||
*
|
*
|
||||||
* Abstracts the bucket CRUD operations currently in `src/db/buckets.ts`.
|
* Abstracts the bucket CRUD operations currently in `infrastructure/persistence/repositories/bucket-repository.ts`.
|
||||||
*/
|
*/
|
||||||
export interface IBucketRepository {
|
export interface IBucketRepository {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { FilePart, NewFilePart } from '../entities/file-part';
|
|||||||
/**
|
/**
|
||||||
* Repository interface for FilePart entity persistence.
|
* Repository interface for FilePart entity persistence.
|
||||||
*
|
*
|
||||||
* Abstracts the file-part operations currently in `src/db/file-parts.ts`.
|
* Abstracts the file-part operations currently in `infrastructure/persistence/repositories/file-part-repository.ts`.
|
||||||
* File parts represent the chunks of a large file stored across multiple
|
* File parts represent the chunks of a large file stored across multiple
|
||||||
* Telegram messages for Telegram-safe storage.
|
* Telegram messages for Telegram-safe storage.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export interface S3FileRecord extends File {
|
|||||||
* Repository interface for File entity persistence.
|
* Repository interface for File entity persistence.
|
||||||
*
|
*
|
||||||
* Abstracts all file CRUD operations currently spread across
|
* Abstracts all file CRUD operations currently spread across
|
||||||
* `src/db/files.ts` and `src/db/files-ext.ts`.
|
* `infrastructure/persistence/repositories/file-repository.ts` and `infrastructure/persistence/repositories/file-repository.ts`.
|
||||||
*/
|
*/
|
||||||
export interface IFileRepository {
|
export interface IFileRepository {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { MultipartPart, MultipartUpload } from '../entities/multipart';
|
|||||||
/**
|
/**
|
||||||
* Repository interface for S3 multipart upload persistence.
|
* Repository interface for S3 multipart upload persistence.
|
||||||
*
|
*
|
||||||
* Abstracts the multipart upload operations currently in `src/db/multipart.ts`.
|
* Abstracts the multipart upload operations currently in `infrastructure/persistence/repositories/multipart-repository.ts`.
|
||||||
* Manages both multipart upload sessions and their individual parts.
|
* Manages both multipart upload sessions and their individual parts.
|
||||||
*/
|
*/
|
||||||
export interface IMultipartRepository {
|
export interface IMultipartRepository {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const mapRowToBucket = (row: Record<string, unknown>): Bucket => ({
|
|||||||
/**
|
/**
|
||||||
* Drizzle-backed implementation of {@link IBucketRepository}.
|
* Drizzle-backed implementation of {@link IBucketRepository}.
|
||||||
*
|
*
|
||||||
* Delegates to the same SQL queries as the original `src/db/buckets.ts`
|
* Delegates to the same SQL queries as the original `infrastructure/persistence/repositories/bucket-repository.ts`
|
||||||
* module, using raw SQL for drizzle tables that are not part of the
|
* module, using raw SQL for drizzle tables that are not part of the
|
||||||
* typed schema.
|
* typed schema.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const mapRowToFilePart = (row: Record<string, unknown>): FilePart => ({
|
|||||||
/**
|
/**
|
||||||
* Drizzle-backed implementation of {@link IFilePartRepository}.
|
* Drizzle-backed implementation of {@link IFilePartRepository}.
|
||||||
*
|
*
|
||||||
* Delegates to the same SQL queries as the original `src/db/file-parts.ts`
|
* Delegates to the same SQL queries as the original `infrastructure/persistence/repositories/file-part-repository.ts`
|
||||||
* module, using raw SQL for all operations.
|
* module, using raw SQL for all operations.
|
||||||
*/
|
*/
|
||||||
export class DrizzleFilePartRepository implements IFilePartRepository {
|
export class DrizzleFilePartRepository implements IFilePartRepository {
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ const mapDbRowToS3Record = (row: Record<string, unknown>): S3FileRecord => ({
|
|||||||
/**
|
/**
|
||||||
* Drizzle-backed implementation of {@link IFileRepository}.
|
* Drizzle-backed implementation of {@link IFileRepository}.
|
||||||
*
|
*
|
||||||
* Delegates to the same SQL queries as the original `src/db/files.ts` and
|
* Delegates to the same SQL queries as the original `infrastructure/persistence/repositories/file-repository.ts` and
|
||||||
* `src/db/files-ext.ts` modules while presenting a clean domain interface.
|
* `infrastructure/persistence/repositories/file-repository.ts` modules while presenting a clean domain interface.
|
||||||
*/
|
*/
|
||||||
export class DrizzleFileRepository implements IFileRepository {
|
export class DrizzleFileRepository implements IFileRepository {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const mapRowToMultipartUpload = (r: Record<string, unknown>): MultipartUpload =>
|
|||||||
/**
|
/**
|
||||||
* Drizzle-backed implementation of {@link IMultipartRepository}.
|
* Drizzle-backed implementation of {@link IMultipartRepository}.
|
||||||
*
|
*
|
||||||
* Delegates to the same SQL queries as the original `src/db/multipart.ts`
|
* Delegates to the same SQL queries as the original `infrastructure/persistence/repositories/multipart-repository.ts`
|
||||||
* module, using raw SQL for all operations on the un-typed
|
* module, using raw SQL for all operations on the un-typed
|
||||||
* `multipart_uploads` and `multipart_parts` tables.
|
* `multipart_uploads` and `multipart_parts` tables.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user