refactor(server): plan 4 — trek-photos.repository.ts finishes its rename

3e Task 6 renamed the CLASS (TrekPhotosRepository -> TrekPhotoRegistrationService,
since the name collided with the generated ORM TrekPhotos.repository.ts) but
left the FILE and its test file's names unchanged. Renames both to
trek-photo-registration.service.ts / .test.ts.

The old path is kept as a thin re-export stub (the src/websocket.ts shape)
rather than repointed at every one of its ~20 importers in this pass: several
of those files sit in two sibling tasks' exclusively-owned windows on this
shared branch (Task 3's budget/packing/todo/accommodations/places ripple,
reached through tests/helpers/plugin-host.ts and mcp-test-controllers.ts;
Task 5c's held-back tests/unit/services/{trekPhotoMedia,conflictUpdate}.test.ts)
and are off limits here. Flagged for a follow-up once those tasks land: delete
the stub and repoint every remaining importer at ./trek-photo-registration.service.
This commit is contained in:
jubnl
2026-09-24 06:13:33 +02:00
parent d499b4505f
commit 652aa568e4
3 changed files with 31 additions and 4 deletions
@@ -31,6 +31,15 @@ import type { JourneyPhotosRepository } from '../../db/repositories/JourneyPhoto
* .repository.ts`, also `TrekPhotosRepository`, per the `EntityRepositoryType`
* convention every entity in this program follows). Same shape as the 3d
* §18.3 `ReservationsReadRepository` → `ReservationsReadService` precedent.
*
* File/test renamed to match (Plan 4 Task 8a — 3e Task 6 renamed only the
* class). The old path, `trek-photos.repository.ts`, is kept as a thin
* re-export stub (the same `src/websocket.ts` shape) rather than updated at
* every one of its ~20 importers in this pass: several of those files sit in
* two sibling tasks' exclusively-owned windows on this shared branch (Task
* 3's `nest/{budget,packing,todo,accommodations,places}/**` ripple and Task
* 5c's held-back test files) and are off limits here. The stub can be
* deleted and every importer repointed once those tasks land.
*/
@Injectable()
export class TrekPhotoRegistrationService {
@@ -0,0 +1,17 @@
/**
* Legacy re-export stub (the same shape `src/websocket.ts` is) — the real
* implementation moved to `trek-photo-registration.service.ts` (Plan 4 Task
* 8a: 3e Task 6 renamed the CLASS off `TrekPhotosRepository` because it
* collided with the generated ORM `TrekPhotos.repository.ts`, but left the
* FILE and test names unchanged; this finishes that rename).
*
* Kept here only because several importers of this path currently sit in
* two sibling tasks' exclusively-owned file windows on this shared branch
* (Task 3's `nest/{budget,packing,todo,accommodations,places}/**` ripple,
* which reaches this file through `tests/helpers/plugin-host.ts` and
* `mcp-test-controllers.ts`; Task 5c's held-back
* `tests/unit/services/{trekPhotoMedia,conflictUpdate}.test.ts`) and cannot
* be edited here. Delete this stub and repoint every remaining importer at
* `./trek-photo-registration.service` once those tasks land.
*/
export { TrekPhotoRegistrationService } from './trek-photo-registration.service';
@@ -1,7 +1,8 @@
/**
* TrekPhotoRegistrationService (renamed from `TrekPhotosRepository`, Plan 3e
* R13 — collided with the generated ORM `TrekPhotos.repository.ts`) — PH1-11,
* now onto `TrekPhotosRepository`/`TripPhotosRepository` (the ORM ones).
* TrekPhotoRegistrationService (class renamed from `TrekPhotosRepository`,
* Plan 3e R13 — collided with the generated ORM `TrekPhotos.repository.ts`;
* file/test renamed to match, Plan 4 Task 8a) — PH1-11, now onto
* `TrekPhotosRepository`/`TripPhotosRepository` (the ORM ones).
*
* The three sources of a photo's "when and where" disagree in how much they
* know: a provider search answers with coordinates, the same provider's
@@ -15,7 +16,7 @@ import { resetTestDb } from '../../helpers/test-db';
import { createTestOrm, type TestOrm } from '../../helpers/test-orm';
import { createUser, createTrip } from '../../helpers/factories';
import { DatabaseService } from '../../../src/nest/database/database.service';
import { TrekPhotoRegistrationService } from '../../../src/nest/photos/trek-photos.repository';
import { TrekPhotoRegistrationService } from '../../../src/nest/photos/trek-photo-registration.service';
import { TrekPhotos } from '../../../src/db/entities/TrekPhotos.entity';
import { TripPhotos } from '../../../src/db/entities/TripPhotos.entity';
import { JourneyPhotos } from '../../../src/db/entities/JourneyPhotos.entity';