Some checks failed
CD / Build and push images (push) Successful in 3m57s
CD / Deploy to Test (push) Successful in 11s
CI / Lint, typecheck, test (push) Successful in 4m32s
CI / Build container images (push) Has been skipped
CD / Smoke tests against Test (push) Successful in 1m14s
CD / Promote to Int (push) Successful in 11s
CI / Auth e2e pack (push) Failing after 2m51s
CI / Import/export fidelity gate (push) Has been skipped
Semantics changed from the issue during planning (documented there, comment 1192): favorites are PERSONAL per user, not pond-wide — the sys-fav label approach is dropped entirely. Storage is a page_favorites table (userId+pageId, FK cascade); PUT/DELETE /pages/:id/favorite toggles idempotently and needs read access only (#60 404 semantics — a star is a note-to-self, not a page modification), GET /ponds/:id/favorites lists the account's stars sliced to still-readable pages. Trashed pages keep their rows, so restore keeps the star; purge cascades it away. Web: one shared ['favorites', pondId] query feeds the TopBar star (between labels and history, golden when set), the golden tree icons in the sidebar, and a latching "Favorites" filter button next to the view switch that narrows either view (combinable with the label filter). No public-API/MCP exposure — with the label approach gone, that parity is no longer free; favorites stay UI-only for now. New favorites e2e pack (star toggle, golden icon, filter, per-user isolation) wired into CI; DB suite covers the round-trip, read gating, and the trash/restore/purge lifecycle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fb2VzvcoBPHkjh8bZ6PzQn
102 lines
3.8 KiB
TypeScript
102 lines
3.8 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 { BackupModule } from './backup/backup.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 { HomeModule } from './home/home.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 { McpModule } from './mcp/mcp.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 { PublicApiModule } from './public-api/public-api.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 { FavoritesModule } from './favorites/favorites.module';
|
|
import { VersionsModule } from './versions/versions.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule,
|
|
PrismaModule,
|
|
AuditModule,
|
|
RateLimitModule,
|
|
MailModule,
|
|
SettingsModule,
|
|
// Before SetupModule and AuthModule: global guards run in registration
|
|
// order, and the maintenance gate (in-app restore, issue #103) must
|
|
// answer before anything touches the mid-restore database.
|
|
BackupModule,
|
|
// Before AuthModule: the setup gate must win over AuthGuard's 401 while
|
|
// setup is pending.
|
|
SetupModule,
|
|
UsersModule,
|
|
PermissionsModule,
|
|
PondsModule,
|
|
PagesModule,
|
|
CommentsModule,
|
|
WatchesModule,
|
|
FavoritesModule,
|
|
NotificationsModule,
|
|
FilesModule,
|
|
TrashModule,
|
|
CompactionModule,
|
|
VersionsModule,
|
|
LabelsModule,
|
|
LegalModule,
|
|
HomeModule,
|
|
LinksModule,
|
|
SearchModule,
|
|
GrantsModule,
|
|
MembersModule,
|
|
PublicModule,
|
|
PublicApiModule,
|
|
McpModule,
|
|
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 {}
|