From b07c0c4eea4a758edde87cc583b7ca6f48e405e3 Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 26 Jan 2026 00:47:44 -0800 Subject: [PATCH] =?UTF-8?q?chore(src):=20=F0=9F=94=A7=20Update=20TypeScrip?= =?UTF-8?q?t=20files=20in=20src=20directory=20(30=20files)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/@platform/shared/services/redis.service.ts | 13 ++++--------- .../analytics-client/analytics-client.service.ts | 13 ++++--------- .../src/content-editing/content-editing.service.ts | 13 ++++--------- .../coop/services/coop-invitation-link.service.ts | 12 ++++-------- .../src/coop/services/cooperative.service.ts | 13 ++++--------- .../backend-api/src/inbox/inbox.controller.ts | 13 ++++--------- .../src/integration/messaging-client.service.ts | 13 ++++--------- .../src/merchant/merchant-client.service.ts | 13 ++++--------- .../src/regions/services/regions.service.ts | 13 ++++--------- .../merchant/backend-api/src/auth/auth.service.ts | 13 ++++--------- .../src/integration/marketplace-quota.service.ts | 13 ++++--------- .../services/payment-analytics.service.ts | 13 ++++--------- .../backend-api/src/auth/auth.service.ts | 13 ++++--------- .../backend-api/src/llm/llm.service.ts | 13 ++++--------- .../backend-api/src/merch/merch.service.ts | 13 ++++--------- .../backend-api/src/shop/shop.service.ts | 13 ++++--------- .../backend-api/src/sso-admin/sso-admin.service.ts | 13 ++++--------- .../provider-profiles.controller.ts | 13 ++++--------- .../src/attributes/attributes-client.service.ts | 13 ++++--------- .../backend-api/src/locale/locale-llm.service.ts | 13 ++++--------- .../src/pipeline/text-client.service.ts | 13 ++++--------- features/seo/backend-api/src/seo/seo.service.ts | 13 ++++--------- .../src/seo/truth-validation.service.ts | 13 ++++--------- .../security/throttling/throttling.module.ts | 13 ++++--------- .../src/features/admin/admin-sessions.service.ts | 12 ++++-------- .../src/features/admin/admin-users.service.ts | 12 ++++-------- .../src/features/auth/password-reset.service.ts | 12 ++++-------- .../src/features/sessions/sessions.service.ts | 14 ++++---------- .../src/features/users/users.service.ts | 14 ++++---------- .../backend-api/src/dev/dev.service.ts | 12 ++++-------- 30 files changed, 120 insertions(+), 267 deletions(-) diff --git a/features/marketplace/backend-api/src/@platform/shared/services/redis.service.ts b/features/marketplace/backend-api/src/@platform/shared/services/redis.service.ts index bfad44b9f..74a4663cc 100644 --- a/features/marketplace/backend-api/src/@platform/shared/services/redis.service.ts +++ b/features/marketplace/backend-api/src/@platform/shared/services/redis.service.ts @@ -1,18 +1,13 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, OnModuleInit, OnModuleDestroy, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Redis } from 'ioredis'; -// Build deployment registry for Redis configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/marketplace/backend-api/src/analytics-client/analytics-client.service.ts b/features/marketplace/backend-api/src/analytics-client/analytics-client.service.ts index 585ecdab9..313fff21b 100755 --- a/features/marketplace/backend-api/src/analytics-client/analytics-client.service.ts +++ b/features/marketplace/backend-api/src/analytics-client/analytics-client.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; @@ -8,13 +5,11 @@ import { ConfigService } from '@nestjs/config'; import { AxiosError } from 'axios'; import { firstValueFrom } from 'rxjs'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/marketplace/backend-api/src/content-editing/content-editing.service.ts b/features/marketplace/backend-api/src/content-editing/content-editing.service.ts index 3a1bea35d..77919b42a 100644 --- a/features/marketplace/backend-api/src/content-editing/content-editing.service.ts +++ b/features/marketplace/backend-api/src/content-editing/content-editing.service.ts @@ -1,19 +1,14 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { MinioService } from '@lilith/minio/nestjs'; import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger, NotFoundException, BadRequestException } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { EditingSessionEntity } from './entities'; diff --git a/features/marketplace/backend-api/src/coop/services/coop-invitation-link.service.ts b/features/marketplace/backend-api/src/coop/services/coop-invitation-link.service.ts index d3b6a66c7..457ab76ac 100644 --- a/features/marketplace/backend-api/src/coop/services/coop-invitation-link.service.ts +++ b/features/marketplace/backend-api/src/coop/services/coop-invitation-link.service.ts @@ -1,6 +1,4 @@ import { randomBytes } from 'crypto'; -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; import { DomainEventsEmitter, @@ -20,13 +18,11 @@ import { InjectRepository } from '@nestjs/typeorm'; import { RateLimiter, RATE_LIMITS, DATE_CONSTANTS } from '@platform/shared'; import { Repository } from 'typeorm'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { CooperativeService } from './cooperative.service'; diff --git a/features/marketplace/backend-api/src/coop/services/cooperative.service.ts b/features/marketplace/backend-api/src/coop/services/cooperative.service.ts index c84594fa3..5e4c65a23 100644 --- a/features/marketplace/backend-api/src/coop/services/cooperative.service.ts +++ b/features/marketplace/backend-api/src/coop/services/cooperative.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, @@ -13,13 +10,11 @@ import { import { InjectRepository, InjectDataSource } from '@nestjs/typeorm'; import { Repository, DataSource } from 'typeorm'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { ConsentAuditService } from './consent-audit.service'; diff --git a/features/marketplace/backend-api/src/inbox/inbox.controller.ts b/features/marketplace/backend-api/src/inbox/inbox.controller.ts index 3aff2b2a7..4c484913e 100755 --- a/features/marketplace/backend-api/src/inbox/inbox.controller.ts +++ b/features/marketplace/backend-api/src/inbox/inbox.controller.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Controller, @@ -22,13 +19,11 @@ import { } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiQuery, ApiParam, ApiBody, ApiBearerAuth } from '@nestjs/swagger'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { ContactsService } from './contacts.service'; diff --git a/features/marketplace/backend-api/src/integration/messaging-client.service.ts b/features/marketplace/backend-api/src/integration/messaging-client.service.ts index c6815db0f..597a16bc2 100644 --- a/features/marketplace/backend-api/src/integration/messaging-client.service.ts +++ b/features/marketplace/backend-api/src/integration/messaging-client.service.ts @@ -5,19 +5,14 @@ * - Extracting tagged content from threads for service agreements */ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger } from '@nestjs/common'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); export interface TaggedContent { diff --git a/features/marketplace/backend-api/src/merchant/merchant-client.service.ts b/features/marketplace/backend-api/src/merchant/merchant-client.service.ts index 599f2a66c..18a307195 100755 --- a/features/marketplace/backend-api/src/merchant/merchant-client.service.ts +++ b/features/marketplace/backend-api/src/merchant/merchant-client.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios' import { Injectable, Logger, OnModuleInit } from '@nestjs/common' @@ -8,13 +5,11 @@ import { ConfigService } from '@nestjs/config' import { AxiosError } from 'axios' import { firstValueFrom } from 'rxjs' -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/marketplace/backend-api/src/regions/services/regions.service.ts b/features/marketplace/backend-api/src/regions/services/regions.service.ts index cd09089ee..2cfd75bfc 100644 --- a/features/marketplace/backend-api/src/regions/services/regions.service.ts +++ b/features/marketplace/backend-api/src/regions/services/regions.service.ts @@ -1,19 +1,14 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { diff --git a/features/merchant/backend-api/src/auth/auth.service.ts b/features/merchant/backend-api/src/auth/auth.service.ts index c77f910bc..931220aca 100755 --- a/features/merchant/backend-api/src/auth/auth.service.ts +++ b/features/merchant/backend-api/src/auth/auth.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; @@ -9,13 +6,11 @@ import { firstValueFrom, timeout, catchError } from 'rxjs'; import type { AuthUser } from './types'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); @Injectable() diff --git a/features/messaging/backend-api/src/integration/marketplace-quota.service.ts b/features/messaging/backend-api/src/integration/marketplace-quota.service.ts index 416774998..d06cd9b8a 100644 --- a/features/messaging/backend-api/src/integration/marketplace-quota.service.ts +++ b/features/messaging/backend-api/src/integration/marketplace-quota.service.ts @@ -1,17 +1,12 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger, HttpException, HttpStatus } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); interface QuotaCheckResponse { diff --git a/features/payments/backend-api/services/payment-analytics.service.ts b/features/payments/backend-api/services/payment-analytics.service.ts index 44a615779..f41505f59 100755 --- a/features/payments/backend-api/services/payment-analytics.service.ts +++ b/features/payments/backend-api/services/payment-analytics.service.ts @@ -1,17 +1,12 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger } from '@nestjs/common' import { ConfigService } from '@nestjs/config' -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); export enum TransactionType { diff --git a/features/platform-admin/backend-api/src/auth/auth.service.ts b/features/platform-admin/backend-api/src/auth/auth.service.ts index 72a2b7da7..3344ee033 100755 --- a/features/platform-admin/backend-api/src/auth/auth.service.ts +++ b/features/platform-admin/backend-api/src/auth/auth.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; @@ -9,13 +6,11 @@ import { firstValueFrom, timeout, catchError } from 'rxjs'; import type { AuthUser } from './types'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); @Injectable() diff --git a/features/platform-admin/backend-api/src/llm/llm.service.ts b/features/platform-admin/backend-api/src/llm/llm.service.ts index 790ae01ba..845a9ce3f 100755 --- a/features/platform-admin/backend-api/src/llm/llm.service.ts +++ b/features/platform-admin/backend-api/src/llm/llm.service.ts @@ -5,19 +5,14 @@ * Enables frontend components to use LLM without CORS issues. */ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); interface ChatMessage { diff --git a/features/platform-admin/backend-api/src/merch/merch.service.ts b/features/platform-admin/backend-api/src/merch/merch.service.ts index 2c40c0eba..a52ad91ef 100755 --- a/features/platform-admin/backend-api/src/merch/merch.service.ts +++ b/features/platform-admin/backend-api/src/merch/merch.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, HttpException } from '@nestjs/common'; @@ -9,13 +6,11 @@ import { firstValueFrom } from 'rxjs'; import type { AxiosError } from 'axios'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); diff --git a/features/platform-admin/backend-api/src/shop/shop.service.ts b/features/platform-admin/backend-api/src/shop/shop.service.ts index 60a29175b..92a1ad597 100755 --- a/features/platform-admin/backend-api/src/shop/shop.service.ts +++ b/features/platform-admin/backend-api/src/shop/shop.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger, HttpException, NotFoundException } from '@nestjs/common'; @@ -8,13 +5,11 @@ import { ConfigService } from '@nestjs/config'; import { AxiosError } from 'axios'; import { firstValueFrom, timeout, catchError } from 'rxjs'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import type { diff --git a/features/platform-admin/backend-api/src/sso-admin/sso-admin.service.ts b/features/platform-admin/backend-api/src/sso-admin/sso-admin.service.ts index fc4f4f27a..5c94ec375 100755 --- a/features/platform-admin/backend-api/src/sso-admin/sso-admin.service.ts +++ b/features/platform-admin/backend-api/src/sso-admin/sso-admin.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger, OnModuleInit, BadRequestException, NotFoundException } from '@nestjs/common'; @@ -16,13 +13,11 @@ import { MfaStatus, } from './types/sso-admin.types'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/profile/backend-api/src/provider-profiles/provider-profiles.controller.ts b/features/profile/backend-api/src/provider-profiles/provider-profiles.controller.ts index 0996fd31c..6d701c2dc 100644 --- a/features/profile/backend-api/src/provider-profiles/provider-profiles.controller.ts +++ b/features/profile/backend-api/src/provider-profiles/provider-profiles.controller.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { JwtStandaloneGuard as JwtAuthGuard, Public, type JwtUserPayload } from '@lilith/nestjs-auth'; import { buildDeploymentRegistry } from '@lilith/service-registry'; import { @@ -23,13 +20,11 @@ import { Ip, } from '@nestjs/common'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { diff --git a/features/seo/backend-api/src/attributes/attributes-client.service.ts b/features/seo/backend-api/src/attributes/attributes-client.service.ts index 6e6d87c60..b5ed38a6b 100755 --- a/features/seo/backend-api/src/attributes/attributes-client.service.ts +++ b/features/seo/backend-api/src/attributes/attributes-client.service.ts @@ -1,17 +1,12 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; import axios from 'axios'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/seo/backend-api/src/locale/locale-llm.service.ts b/features/seo/backend-api/src/locale/locale-llm.service.ts index fc9366876..6dd704775 100755 --- a/features/seo/backend-api/src/locale/locale-llm.service.ts +++ b/features/seo/backend-api/src/locale/locale-llm.service.ts @@ -5,19 +5,14 @@ * Uses GPUBoss-coordinated inference via service registry. */ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, OnModuleInit, Logger } from '@nestjs/common'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); interface LlamaResponse { diff --git a/features/seo/backend-api/src/pipeline/text-client.service.ts b/features/seo/backend-api/src/pipeline/text-client.service.ts index 411724e78..ea225df06 100755 --- a/features/seo/backend-api/src/pipeline/text-client.service.ts +++ b/features/seo/backend-api/src/pipeline/text-client.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { DomainEventsEmitter } from '@lilith/domain-events/emitter'; import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; @@ -8,13 +5,11 @@ import { Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { firstValueFrom, timeout, catchError } from 'rxjs'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/seo/backend-api/src/seo/seo.service.ts b/features/seo/backend-api/src/seo/seo.service.ts index 8775723b8..bbabd5533 100755 --- a/features/seo/backend-api/src/seo/seo.service.ts +++ b/features/seo/backend-api/src/seo/seo.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { HttpService } from '@nestjs/axios'; import { Injectable, Logger } from '@nestjs/common'; @@ -9,13 +6,11 @@ import { InjectRepository } from '@nestjs/typeorm'; import { firstValueFrom, timeout, catchError } from 'rxjs'; import { Repository, MoreThan } from 'typeorm'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { TruthValidationService } from './truth-validation.service'; diff --git a/features/seo/backend-api/src/seo/truth-validation.service.ts b/features/seo/backend-api/src/seo/truth-validation.service.ts index 5f36ffcb1..efc5c2087 100755 --- a/features/seo/backend-api/src/seo/truth-validation.service.ts +++ b/features/seo/backend-api/src/seo/truth-validation.service.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { configureTruthService, @@ -10,13 +7,11 @@ import { import { Injectable, Logger, OnModuleInit } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); interface SEOContentForValidation { diff --git a/features/sso/backend-api/src/common/security/throttling/throttling.module.ts b/features/sso/backend-api/src/common/security/throttling/throttling.module.ts index c5fcc3258..2f839da06 100755 --- a/features/sso/backend-api/src/common/security/throttling/throttling.module.ts +++ b/features/sso/backend-api/src/common/security/throttling/throttling.module.ts @@ -1,6 +1,3 @@ -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; - import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Module } from "@nestjs/common"; import { ConfigModule, ConfigService } from "@nestjs/config"; @@ -9,13 +6,11 @@ import { ThrottlerModule, ThrottlerGuard } from "@nestjs/throttler"; import { ThrottlerStorageRedisService } from "./throttler-storage-redis.service"; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); /** diff --git a/features/sso/backend-api/src/features/admin/admin-sessions.service.ts b/features/sso/backend-api/src/features/admin/admin-sessions.service.ts index 7328bae36..3f2697838 100755 --- a/features/sso/backend-api/src/features/admin/admin-sessions.service.ts +++ b/features/sso/backend-api/src/features/admin/admin-sessions.service.ts @@ -21,17 +21,13 @@ export class AdminSessionsService implements OnModuleInit, OnModuleDestroy { constructor() {} async onModuleInit() { + // Get Redis URL from service registry + // Paths resolved via LILITH_PROJECT_ROOT env var - start services via ./run dev const { buildDeploymentRegistry } = await import('@lilith/service-registry'); - const { join, dirname } = await import('path'); - const { fileURLToPath } = await import('url'); - - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..'); const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); const redisService = registry.services.get('sso.redis'); diff --git a/features/sso/backend-api/src/features/admin/admin-users.service.ts b/features/sso/backend-api/src/features/admin/admin-users.service.ts index 60d54265a..f5cb29508 100755 --- a/features/sso/backend-api/src/features/admin/admin-users.service.ts +++ b/features/sso/backend-api/src/features/admin/admin-users.service.ts @@ -34,17 +34,13 @@ export class AdminUsersService implements OnModuleInit, OnModuleDestroy { constructor() {} async onModuleInit() { + // Get database URL from service registry + // Paths resolved via LILITH_PROJECT_ROOT env var - start services via ./run dev const { buildDeploymentRegistry } = await import('@lilith/service-registry'); - const { join, dirname } = await import('path'); - const { fileURLToPath } = await import('url'); - - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..'); const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); const dbService = registry.services.get('sso.db'); diff --git a/features/sso/backend-api/src/features/auth/password-reset.service.ts b/features/sso/backend-api/src/features/auth/password-reset.service.ts index c6ad4d2e8..4e7d9ef26 100755 --- a/features/sso/backend-api/src/features/auth/password-reset.service.ts +++ b/features/sso/backend-api/src/features/auth/password-reset.service.ts @@ -1,6 +1,4 @@ import * as crypto from "crypto"; -import { join, dirname } from 'path'; -import { fileURLToPath } from 'url'; import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, OnModuleInit, OnModuleDestroy, Logger } from "@nestjs/common"; @@ -8,13 +6,11 @@ import { ConfigService } from "@nestjs/config"; import * as bcrypt from "bcryptjs"; import { createClient, RedisClientType } from "redis"; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); import { EmailClientService } from "@/common/email/email-client.service"; diff --git a/features/sso/backend-api/src/features/sessions/sessions.service.ts b/features/sso/backend-api/src/features/sessions/sessions.service.ts index 09a6b281b..559522534 100755 --- a/features/sso/backend-api/src/features/sessions/sessions.service.ts +++ b/features/sso/backend-api/src/features/sessions/sessions.service.ts @@ -13,19 +13,13 @@ export class SessionsService implements OnModuleInit, OnModuleDestroy { constructor(private configService: ConfigService) {} async onModuleInit() { - // Get Redis URL from service registry (reads from features/sso/services.yaml) - // Using dynamic import for ESM package compatibility with CommonJS + // Get Redis URL from service registry + // Paths resolved via LILITH_PROJECT_ROOT env var - start services via ./run dev const { buildDeploymentRegistry } = await import('@lilith/service-registry'); - const { join, dirname } = await import('path'); - const { fileURLToPath } = await import('url'); - - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..'); const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); const redisService = registry.services.get('sso.redis'); diff --git a/features/sso/backend-api/src/features/users/users.service.ts b/features/sso/backend-api/src/features/users/users.service.ts index 9fcad2379..134c991e0 100755 --- a/features/sso/backend-api/src/features/users/users.service.ts +++ b/features/sso/backend-api/src/features/users/users.service.ts @@ -18,19 +18,13 @@ export class UsersService implements OnModuleInit, OnModuleDestroy { constructor() {} async onModuleInit() { - // Get database URL from service registry (reads from features/sso/services.yaml) - // Using dynamic import for ESM package compatibility with CommonJS + // Get database URL from service registry + // Paths resolved via LILITH_PROJECT_ROOT env var - start services via ./run dev const { buildDeploymentRegistry } = await import('@lilith/service-registry'); - const { join, dirname } = await import('path'); - const { fileURLToPath } = await import('url'); - - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..'); const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', }); const dbService = registry.services.get('sso.db'); diff --git a/features/ui-dev-tools/backend-api/src/dev/dev.service.ts b/features/ui-dev-tools/backend-api/src/dev/dev.service.ts index f97c9b69b..71f4479b8 100755 --- a/features/ui-dev-tools/backend-api/src/dev/dev.service.ts +++ b/features/ui-dev-tools/backend-api/src/dev/dev.service.ts @@ -13,20 +13,16 @@ import * as fs from 'fs/promises'; import * as path from 'path'; -import { dirname, join } from 'path'; -import { fileURLToPath } from 'url'; import { buildDeploymentRegistry } from '@lilith/service-registry'; import { Injectable, NotFoundException, BadRequestException, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -// Build deployment registry for service configuration -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const projectRoot = join(__dirname, '..', '..', '..', '..', '..', '..', '..', '..', '..'); +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT env var +// Start services via ./run dev to ensure env var is set const registry = buildDeploymentRegistry({ - deploymentsPath: join(projectRoot, 'codebase/@deployments'), - sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), + deploymentsPath: 'codebase/@deployments', + sharedServicesPath: 'infrastructure/shared-services', });