f574884b32
CALENDAR_ENCRYPTION_KEY was named after the calendar module because that module needed encryption first, in Phase 5. Every feature since has shared the same key -- SMTP, the DKV and tender mailboxes, and as of today the LDAP bind password -- so the name has been describing one of five users rather than the thing itself, and each new feature inherited the confusion. TESSERA_ENCRYPTION_KEY is the name now. The old one is still read, because renaming outright would stop every existing installation at the next start: their .env carries the old name, and compose was just made to fail hard on a missing key. When only the old name is present the API logs a deprecation warning naming both, and when both are set the new one wins -- otherwise a half-migrated .env would encrypt with one key and decrypt with the other. CalendarCryptoService becomes CryptoService in its own global CryptoModule. Four modules used to import CalendarModule purely to reach the provider, which read as a dependency on calendars where there was none; that import is gone. Compose keeps the hard failure: without either name the stack refuses to start. Verified in both files for all three cases -- neither name set (abort), only the old name (starts), only the new name (starts). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { CalendarController } from './calendar.controller';
|
|
import { CalendarService } from './calendar.service';
|
|
import { CalDAVProvider } from './providers/caldav.provider';
|
|
import { ICSProvider } from './providers/ics.provider';
|
|
import { ExchangeProvider } from './providers/exchange.provider';
|
|
|
|
/**
|
|
* NestJS module for calendar source management and event aggregation.
|
|
*
|
|
* Provides:
|
|
* - CalendarService: Source CRUD + event aggregation across providers
|
|
* - CalDAVProvider: CalDAV protocol integration via tsdav
|
|
* - ICSProvider: ICS file fetch + parse via node-ical
|
|
* - ExchangeProvider: Exchange Online (Graph) + Exchange Server (EWS) integration
|
|
* - CalendarController: REST API for sources and events
|
|
*
|
|
* Exports CalendarService for potential use by other modules.
|
|
*/
|
|
@Module({
|
|
controllers: [CalendarController],
|
|
providers: [
|
|
CalendarService,
|
|
CalDAVProvider,
|
|
ICSProvider,
|
|
ExchangeProvider,
|
|
],
|
|
exports: [CalendarService],
|
|
})
|
|
export class CalendarModule {}
|