All checks were successful
CI / Lint, typecheck, test (push) Successful in 3m26s
CI / Build container images (push) Has been skipped
CD / Build and push images (push) Successful in 3m49s
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m12s
CD / Promote to Int (push) Successful in 10s
CI / Auth e2e pack (push) Successful in 5m27s
CI / Import/export fidelity gate (push) Successful in 46s
New notifications table (payload denormalized for join-free rendering; mailed_at already prepares the #95 digests). Generation fans page events out to page and pond watchers, excluding the actors, and re-checks page read permission per watcher at delivery time — a revoked watcher gets nothing. Sources: named version snapshots (api), new comments (api), and the collab server's automatic session-close snapshots — announced over a new pg NOTIFY channel (the reverse of the established api→collab bus) consumed by a dedicated LISTEN client in the api, since the collab server has no permission resolution of its own. API: paginated list (unread first via nulls-first ordering), mark read, mark all read. UI: bell with unread badge in the top bar (30 s polling, no push in v1) and a dropdown whose entries navigate and mark themselves read; comment notifications deep-link with ?comments=1, which now opens the comments panel on load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
89 lines
3.3 KiB
TypeScript
89 lines
3.3 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { APP_FILTER } from '@nestjs/core';
|
|
import { LoggerModule } from 'nestjs-pino';
|
|
|
|
import { AdminModule } from './admin/admin.module';
|
|
import { AuditModule } from './audit/audit.module';
|
|
import { AuthModule } from './auth/auth.module';
|
|
import { ApiExceptionFilter } from './common/api-exception.filter';
|
|
import { CommentsModule } from './comments/comments.module';
|
|
import { CompactionModule } from './compaction/compaction.module';
|
|
import { AppConfig } from './config/app-config.service';
|
|
import { ConfigModule } from './config/config.module';
|
|
import { FilesModule } from './files/files.module';
|
|
import { GrantsModule } from './grants/grants.module';
|
|
import { HealthModule } from './health/health.module';
|
|
import { ImportExportModule } from './import-export/import-export.module';
|
|
import { LabelsModule } from './labels/labels.module';
|
|
import { LegalModule } from './legal/legal.module';
|
|
import { LinksModule } from './links/links.module';
|
|
import { MailModule } from './mail/mail.module';
|
|
import { MembersModule } from './members/members.module';
|
|
import { PagesModule } from './pages/pages.module';
|
|
import { PermissionsModule } from './permissions/permissions.module';
|
|
import { PluginsModule } from './plugins/plugins.module';
|
|
import { PondsModule } from './ponds/ponds.module';
|
|
import { PrismaModule } from './prisma/prisma.module';
|
|
import { PublicModule } from './public/public.module';
|
|
import { RateLimitModule } from './rate-limit/rate-limit.module';
|
|
import { SearchModule } from './search/search.module';
|
|
import { SettingsModule } from './settings/settings.module';
|
|
import { SetupModule } from './setup/setup.module';
|
|
import { TrashModule } from './trash/trash.module';
|
|
import { UsersModule } from './users/users.module';
|
|
import { NotificationsModule } from './notifications/notifications.module';
|
|
import { WatchesModule } from './watches/watches.module';
|
|
import { VersionsModule } from './versions/versions.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule,
|
|
PrismaModule,
|
|
AuditModule,
|
|
RateLimitModule,
|
|
MailModule,
|
|
SettingsModule,
|
|
// Before AuthModule: global guards run in registration order, and the
|
|
// setup gate must win over AuthGuard's 401 while setup is pending.
|
|
SetupModule,
|
|
UsersModule,
|
|
PermissionsModule,
|
|
PondsModule,
|
|
PagesModule,
|
|
CommentsModule,
|
|
WatchesModule,
|
|
NotificationsModule,
|
|
FilesModule,
|
|
TrashModule,
|
|
CompactionModule,
|
|
VersionsModule,
|
|
LabelsModule,
|
|
LegalModule,
|
|
LinksModule,
|
|
SearchModule,
|
|
GrantsModule,
|
|
MembersModule,
|
|
PublicModule,
|
|
ImportExportModule,
|
|
PluginsModule,
|
|
AuthModule,
|
|
AdminModule,
|
|
LoggerModule.forRootAsync({
|
|
inject: [AppConfig],
|
|
useFactory: (config: AppConfig) => ({
|
|
pinoHttp: {
|
|
level: config.env.LOG_LEVEL,
|
|
// Human-readable logs in local development, JSON everywhere else.
|
|
transport: config.env.NODE_ENV === 'development' ? { target: 'pino-pretty' } : undefined,
|
|
autoLogging: config.env.NODE_ENV !== 'test',
|
|
// Request bodies are never logged (operations.md logging rules).
|
|
redact: { paths: ['req.headers.authorization', 'req.headers.cookie'], remove: true },
|
|
},
|
|
}),
|
|
}),
|
|
HealthModule,
|
|
],
|
|
providers: [{ provide: APP_FILTER, useClass: ApiExceptionFilter }],
|
|
})
|
|
export class AppModule {}
|