mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
Move the calendar export off the trip aggregate
exportICS and its four module helpers were 330 lines of RFC 5545 inside TripsService, and FeedsService had to import the whole trip aggregate to get an ICS string out of it. They move to a calendar domain unchanged - same statements, same escaping, same folding, same VTIMEZONE fallback - so the emitted bytes are identical on both the download and the feed. The 21 unit cases move with the code and keep every assertion, which is what makes that claim checkable rather than asserted. FeedsModule now imports CalendarModule instead of TripsModule, and its e2e container drops from the trip aggregate to two small modules. NotFoundError/ValidationError move to common/ so a second domain can raise them without importing the first one for its error types; trips re-exports them, so the nine files that import them from there are untouched. Fixes a harness that tsc cannot see on the way past: mcp-test-controllers built TripsService with 12 arguments for 14 parameters, leaving unsplash and userCleanup undefined.
This commit is contained in:
@@ -56,6 +56,8 @@ import { JourneyDomainService } from '../../src/nest/journey/journey-domain.serv
|
||||
import { JourneyShareService } from '../../src/nest/journey/journey-share.service';
|
||||
import { TrekPhotosRepository } from '../../src/nest/photos/trek-photos.repository';
|
||||
import { UnsplashService } from '../../src/nest/unsplash/unsplash.service';
|
||||
import { UserCleanupService } from '../../src/nest/auth/user-cleanup.service';
|
||||
import { CalendarService } from '../../src/nest/calendar/calendar.service';
|
||||
import { PlacePhotoCacheService } from '../../src/nest/place-photos/place-photo-cache.service';
|
||||
import { RuntimeEnvService } from '../../src/nest/app-config/runtime-env.service';
|
||||
import { makeNotificationsService, makeNotificationPreferencesService } from './notifications';
|
||||
@@ -105,7 +107,13 @@ export function createMcpTestRegistry(): McpRegistry {
|
||||
new VacayService(dbService, realtimeService),
|
||||
realtimeService,
|
||||
placesService,
|
||||
// These two were missing: the call passed 12 arguments to a 14-parameter
|
||||
// constructor, so unsplash and userCleanup were undefined here. tsconfig
|
||||
// has include:['src'], so tsc never saw it.
|
||||
new UnsplashService(dbService, new RuntimeEnvService()),
|
||||
new UserCleanupService(dbService),
|
||||
);
|
||||
const calendarService = new CalendarService(dbService, reservationsService);
|
||||
return createTestRegistry(
|
||||
[
|
||||
new TagsMcp(new TagsService(dbService), authService),
|
||||
@@ -123,7 +131,7 @@ export function createMcpTestRegistry(): McpRegistry {
|
||||
new AssignmentsMcp(new AssignmentsService(dbService, permissionsService, realtimeService, queryHelpersService, journeyDomain), daysService, authService),
|
||||
new CollabMcp(collabService, authService),
|
||||
new VacayMcp(new VacayService(dbService, realtimeService), authService),
|
||||
new TripsMcp(tripsService, todoService, collabService, authService),
|
||||
new TripsMcp(tripsService, todoService, collabService, authService, calendarService),
|
||||
new ShareMcp(new ShareService(dbService, new SettingsService(dbService), permissionsService, queryHelpersService), authService),
|
||||
new MapsMcp(mapsService),
|
||||
new PlacesMcp(placesService, mapsService, dbService, authService, journeyDomain),
|
||||
|
||||
Reference in New Issue
Block a user