/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
apps/api/src/app/auth/ee.auth.module.config.ts
48 строк
1 KB
Dima Grossman
fix(): conversational
24 май 2026, 11:43
24 май 2026, 11:43
a9c9422
Код
Авторство
О чём код?
import { MiddlewareConsumer, ModuleMetadata } from '@nestjs/common'; import { cacheService, FeatureFlagsService, featureFlagsService, InMemoryLRUCacheService, PlatformException, } from '@novu/application-generic'; import { RootEnvironmentGuard } from './framework/root-environment-guard.service'; import { AuthService } from './services/auth.service'; import { ApiKeyStrategy } from './services/passport/apikey.strategy'; import { JwtSubscriberStrategy } from './services/passport/subscriber-jwt.strategy'; export function getEEModuleConfig(): ModuleMetadata { const eeAuthPackage = require('@novu/ee-auth'); const eeAuthModule = eeAuthPackage?.eeAuthModule; if (!eeAuthModule) { throw new PlatformException('ee-auth module is not loaded'); } return { imports: [...eeAuthModule.imports], controllers: [...eeAuthModule.controllers], providers: [ ...eeAuthModule.providers, // reused services ApiKeyStrategy, JwtSubscriberStrategy, AuthService, cacheService, featureFlagsService, InMemoryLRUCacheService, RootEnvironmentGuard, ], exports: [...eeAuthModule.exports, RootEnvironmentGuard, AuthService, FeatureFlagsService], }; } export function configure(consumer: MiddlewareConsumer) { const eeAuthPackage = require('@novu/ee-auth'); if (!eeAuthPackage?.configure) { throw new PlatformException('ee-auth configure() is not loaded'); } eeAuthPackage.configure(consumer); }