mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 17:03:15 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
48 lines
2.2 KiB
TypeScript
48 lines
2.2 KiB
TypeScript
import { PluginGuardsModule } from '../../nest-rpc/plugin-guards.module';
|
|
import { DemoModule } from '../common/demo.module';
|
|
import { AllowedFileTypesModule } from '../files/allowed-file-types.module';
|
|
import { StorageModule } from '../storage/storage.module';
|
|
import { JournalRpc } from './journal.rpc';
|
|
import { JourneyDomainModule } from './journey-domain.module';
|
|
import { JourneyPhotoCaptureModule } from './journey-photo-capture.module';
|
|
import { Module } from '@nestjs/common';
|
|
|
|
/**
|
|
* The journal plugin surface, in its own container.
|
|
*
|
|
* JournalRpc used to sit in JourneyDomainModule, and it cannot stay there now
|
|
* that it writes photo bytes: that needs StorageService and, for the EXIF
|
|
* backfill, JourneyPhotoCaptureModule, which brings MemoriesModule with it.
|
|
* JourneyDomainModule exists precisely so places, assignments and the plugin
|
|
* host can reach a few journey functions WITHOUT dragging MemoriesModule and
|
|
* both photo providers into their graphs (see the comment there), so the
|
|
* dependency goes here instead and only the plugin host pays for it.
|
|
*
|
|
* JourneyDomainModule is re-exported so importing this one is a superset of
|
|
* importing that one, and nothing that already depended on it has to change.
|
|
*
|
|
* `DemoModule` is imported explicitly (Plan 3i Task 4 fix wave's own
|
|
* precedent, restated here — Plan 3j Task 5, SV8): `DemoService` is
|
|
* `@Global()`, but that broadcast only reaches a module graph that actually
|
|
* imports it somewhere — a hand-built e2e `TestingModule` that never pulls in
|
|
* `AppModule` otherwise leaves `JournalRpc`'s `DemoService` dependency
|
|
* unresolved. The earlier `MikroOrmModule.forFeature([Users])` entry (Plan 3g
|
|
* Task 3, `JournalRpc`'s own `UsersRepository.getEmail` injection) is gone —
|
|
* `DemoService.isDemoUserId` resolves `Users` through its OWN constructor
|
|
* (an injected `EntityManager`, not `@InjectRepository`), so this module no
|
|
* longer needs the entity registered for that call.
|
|
*/
|
|
@Module({
|
|
imports: [
|
|
JourneyDomainModule,
|
|
StorageModule,
|
|
AllowedFileTypesModule,
|
|
JourneyPhotoCaptureModule,
|
|
PluginGuardsModule,
|
|
DemoModule,
|
|
],
|
|
providers: [JournalRpc],
|
|
exports: [JourneyDomainModule],
|
|
})
|
|
export class JournalRpcModule {}
|