From cfcb07d066c9149f6f14fe535bf975e9b9b587e2 Mon Sep 17 00:00:00 2001 From: William Phetsinorath Date: Mon, 23 Mar 2026 16:36:17 +0100 Subject: [PATCH] fix: import missing health module Signed-off-by: William Phetsinorath --- apps/server-nestjs/package.json | 1 + ...application-initialization.service.spec.ts | 1 + .../database-initialization.service.spec.ts | 6 +- .../database-initialization.service.ts | 17 +-- .../database/database-health.service.ts | 23 +++ .../database/database.module.ts | 13 ++ .../database/database.service.spec.ts | 14 +- .../database/database.service.ts | 11 +- .../infrastructure/database/prisma.service.ts | 14 ++ .../health/health.controller.ts | 19 +++ .../infrastructure/health/health.module.ts | 13 ++ .../infrastructure/infrastructure.module.ts | 8 +- apps/server-nestjs/src/main.module.ts | 6 +- .../src/modules/healthz/healthz.controller.ts | 19 +++ .../src/modules/healthz/healthz.module.ts | 10 ++ apps/server-nestjs/src/prisma.ts | 5 - pnpm-lock.yaml | 133 ++++++++++++++++++ 17 files changed, 283 insertions(+), 30 deletions(-) create mode 100644 apps/server-nestjs/src/cpin-module/infrastructure/database/database-health.service.ts create mode 100644 apps/server-nestjs/src/cpin-module/infrastructure/database/database.module.ts create mode 100644 apps/server-nestjs/src/cpin-module/infrastructure/database/prisma.service.ts create mode 100644 apps/server-nestjs/src/cpin-module/infrastructure/health/health.controller.ts create mode 100644 apps/server-nestjs/src/cpin-module/infrastructure/health/health.module.ts create mode 100644 apps/server-nestjs/src/modules/healthz/healthz.controller.ts create mode 100644 apps/server-nestjs/src/modules/healthz/healthz.module.ts delete mode 100644 apps/server-nestjs/src/prisma.ts diff --git a/apps/server-nestjs/package.json b/apps/server-nestjs/package.json index 1df9656be..117e78a85 100644 --- a/apps/server-nestjs/package.json +++ b/apps/server-nestjs/package.json @@ -43,6 +43,7 @@ "@nestjs/config": "^4.0.3", "@nestjs/core": "^11.1.16", "@nestjs/platform-express": "^11.1.16", + "@nestjs/terminus": "^11.1.1", "@opentelemetry/api": "^1.9.0", "@opentelemetry/auto-instrumentations-node": "^0.70.1", "@opentelemetry/exporter-metrics-otlp-proto": "^0.213.0", diff --git a/apps/server-nestjs/src/cpin-module/application-initialization/application-initialization-service/application-initialization.service.spec.ts b/apps/server-nestjs/src/cpin-module/application-initialization/application-initialization-service/application-initialization.service.spec.ts index 774101df0..80e356b09 100644 --- a/apps/server-nestjs/src/cpin-module/application-initialization/application-initialization-service/application-initialization.service.spec.ts +++ b/apps/server-nestjs/src/cpin-module/application-initialization/application-initialization-service/application-initialization.service.spec.ts @@ -19,6 +19,7 @@ describe('applicationInitializationServiceService', () => { PluginManagementService, DatabaseInitializationService, DatabaseService, + PrismaService, ], }).compile() diff --git a/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.spec.ts b/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.spec.ts index 1651dfcb1..1a898bb22 100644 --- a/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.spec.ts +++ b/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.spec.ts @@ -2,6 +2,7 @@ import type { TestingModule } from '@nestjs/testing' import { Test } from '@nestjs/testing' import { beforeEach, describe, expect, it } from 'vitest' +import { PrismaService } from '../../infrastructure/database/prisma.service' import { DatabaseInitializationService } from './database-initialization.service' describe('databaseInitializationService', () => { @@ -9,7 +10,10 @@ describe('databaseInitializationService', () => { beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - providers: [DatabaseInitializationService], + providers: [ + DatabaseInitializationService, + PrismaService, + ], }).compile() service = module.get( diff --git a/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.ts b/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.ts index ca67f6731..476cbc470 100644 --- a/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.ts +++ b/apps/server-nestjs/src/cpin-module/application-initialization/database-initialization/database-initialization.service.ts @@ -1,16 +1,11 @@ -import { Injectable, Logger } from '@nestjs/common' -import prisma from '../../../prisma' +import { Inject, Injectable, Logger } from '@nestjs/common' +import { PrismaService } from '../../infrastructure/database/prisma.service' import { modelKeys } from './utils' -type ExtractKeysWithFields = { - [K in keyof T]: T[K] extends { fields: any } ? K : never; -}[keyof T] - -type Models = ExtractKeysWithFields - -type Imports = Partial> & { - associations: [Models, any[]] +type ModelKey = (typeof modelKeys)[number] +type Imports = Partial> & { + associations: [ModelKey, any[]][] } @Injectable() @@ -19,6 +14,8 @@ export class DatabaseInitializationService { DatabaseInitializationService.name, ) + constructor(@Inject(PrismaService) private readonly prisma: PrismaService) {} + async initDb(data: Imports) { const dataStringified = JSON.stringify(data) const dataParsed = JSON.parse(dataStringified, (key, value) => { diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/database/database-health.service.ts b/apps/server-nestjs/src/cpin-module/infrastructure/database/database-health.service.ts new file mode 100644 index 000000000..1e37899c9 --- /dev/null +++ b/apps/server-nestjs/src/cpin-module/infrastructure/database/database-health.service.ts @@ -0,0 +1,23 @@ +import { Inject, Injectable } from '@nestjs/common' +import { HealthIndicatorService } from '@nestjs/terminus' +import { PrismaService } from './prisma.service' + +@Injectable() +export class DatabaseHealthService { + constructor( + @Inject(PrismaService) private readonly prisma: PrismaService, + @Inject(HealthIndicatorService) private readonly healthIndicator: HealthIndicatorService, + ) {} + + async check(key: string) { + const indicator = this.healthIndicator.check(key) + try { + await this.prisma.$queryRaw`SELECT 1` + return indicator.up() + } catch (error) { + return indicator.down({ + message: error instanceof Error ? error.message : String(error), + }) + } + } +} diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/database/database.module.ts b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.module.ts new file mode 100644 index 000000000..9545c2ddd --- /dev/null +++ b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common' +import { HealthIndicatorService } from '@nestjs/terminus' +import { ConfigurationModule } from '../configuration/configuration.module' +import { DatabaseHealthService } from './database-health.service' +import { DatabaseService } from './database.service' +import { PrismaService } from './prisma.service' + +@Module({ + imports: [ConfigurationModule], + providers: [HealthIndicatorService, DatabaseHealthService, DatabaseService, PrismaService], + exports: [DatabaseHealthService, DatabaseService, PrismaService], +}) +export class DatabaseModule {} diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.spec.ts b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.spec.ts index f4e7bfca4..416c82980 100644 --- a/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.spec.ts +++ b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.spec.ts @@ -1,9 +1,10 @@ import type { TestingModule } from '@nestjs/testing' import { Test } from '@nestjs/testing' -import { beforeEach, describe, expect, it } from 'vitest' +import { beforeEach, describe, expect, it, vi } from 'vitest' import { ConfigurationModule } from '../configuration/configuration.module' import { DatabaseService } from './database.service' +import { PrismaService } from './prisma.service' describe('databaseService', () => { let service: DatabaseService @@ -11,7 +12,16 @@ describe('databaseService', () => { beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ imports: [ConfigurationModule], - providers: [DatabaseService], + providers: [ + DatabaseService, + { + provide: PrismaService, + useValue: { + $connect: vi.fn().mockResolvedValue(undefined), + $disconnect: vi.fn().mockResolvedValue(undefined), + }, + }, + ], }).compile() service = module.get(DatabaseService) diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.ts b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.ts index 634565cf2..695a2daf5 100644 --- a/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.ts +++ b/apps/server-nestjs/src/cpin-module/infrastructure/database/database.service.ts @@ -1,13 +1,16 @@ import { setTimeout } from 'node:timers/promises' import { Inject, Injectable, Logger } from '@nestjs/common' -import prisma from '../../../prisma' import { ConfigurationService } from '../configuration/configuration.service' +import { PrismaService } from './prisma.service' @Injectable() export class DatabaseService { private readonly loggerService = new Logger(DatabaseService.name) - constructor(@Inject(ConfigurationService) private readonly configurationService: ConfigurationService) { + constructor( + @Inject(PrismaService) private readonly prisma: PrismaService, + @Inject(ConfigurationService) private readonly configurationService: ConfigurationService, + ) { this.DELAY_BEFORE_RETRY = this.configurationService.isTest || this.configurationService.isCI ? 1000 @@ -33,7 +36,7 @@ export class DatabaseService { `Trying to connect to Postgres with: ${this.configurationService.dbUrl}`, ) } - await prisma.$connect() + await this.prisma.$connect() this.loggerService.log('Connected to Postgres!') } catch (error) { @@ -59,7 +62,7 @@ export class DatabaseService { async closeConnections() { this.closingConnections = true try { - await prisma.$disconnect() + await this.prisma.$disconnect() } catch (error) { this.loggerService.error(error) } finally { diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/database/prisma.service.ts b/apps/server-nestjs/src/cpin-module/infrastructure/database/prisma.service.ts new file mode 100644 index 000000000..f10a31e57 --- /dev/null +++ b/apps/server-nestjs/src/cpin-module/infrastructure/database/prisma.service.ts @@ -0,0 +1,14 @@ +import type { OnModuleDestroy, OnModuleInit } from '@nestjs/common' +import { Injectable } from '@nestjs/common' +import { PrismaClient } from '@prisma/client' + +@Injectable() +export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { + async onModuleInit() { + await this.$connect() + } + + async onModuleDestroy() { + await this.$disconnect() + } +} diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/health/health.controller.ts b/apps/server-nestjs/src/cpin-module/infrastructure/health/health.controller.ts new file mode 100644 index 000000000..763cc6354 --- /dev/null +++ b/apps/server-nestjs/src/cpin-module/infrastructure/health/health.controller.ts @@ -0,0 +1,19 @@ +import { Controller, Get, Inject } from '@nestjs/common' +import { HealthCheck, HealthCheckService } from '@nestjs/terminus' +import { DatabaseHealthService } from '../database/database-health.service' + +@Controller('/api/v1/health') +export class HealthController { + constructor( + @Inject(HealthCheckService) private readonly health: HealthCheckService, + @Inject(DatabaseHealthService) private readonly database: DatabaseHealthService, + ) {} + + @Get() + @HealthCheck() + check() { + return this.health.check([ + () => this.database.check('database'), + ]) + } +} diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/health/health.module.ts b/apps/server-nestjs/src/cpin-module/infrastructure/health/health.module.ts new file mode 100644 index 000000000..b8bb5b141 --- /dev/null +++ b/apps/server-nestjs/src/cpin-module/infrastructure/health/health.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common' +import { TerminusModule } from '@nestjs/terminus' +import { DatabaseModule } from '../database/database.module' +import { HealthController } from './health.controller' + +@Module({ + imports: [ + TerminusModule, + DatabaseModule, + ], + controllers: [HealthController], +}) +export class HealthModule {} diff --git a/apps/server-nestjs/src/cpin-module/infrastructure/infrastructure.module.ts b/apps/server-nestjs/src/cpin-module/infrastructure/infrastructure.module.ts index 72964a654..833f953a6 100644 --- a/apps/server-nestjs/src/cpin-module/infrastructure/infrastructure.module.ts +++ b/apps/server-nestjs/src/cpin-module/infrastructure/infrastructure.module.ts @@ -1,15 +1,15 @@ import { Module } from '@nestjs/common' import { ConfigurationModule } from './configuration/configuration.module' -import { DatabaseService } from './database/database.service' +import { DatabaseModule } from './database/database.module' import { HttpClientService } from './http-client/http-client.service' import { LoggerModule } from './logger/logger.module' import { ServerService } from './server/server.service' import { TelemetryModule } from './telemetry/telemetry.module' @Module({ - providers: [DatabaseService, HttpClientService, ServerService], - imports: [LoggerModule, ConfigurationModule, TelemetryModule], - exports: [DatabaseService, HttpClientService, ServerService], + providers: [HttpClientService, ServerService], + imports: [DatabaseModule, LoggerModule, ConfigurationModule, TelemetryModule], + exports: [DatabaseModule, HttpClientService, ServerService], }) export class InfrastructureModule {} diff --git a/apps/server-nestjs/src/main.module.ts b/apps/server-nestjs/src/main.module.ts index a8c7b3fd0..5b9900c9e 100644 --- a/apps/server-nestjs/src/main.module.ts +++ b/apps/server-nestjs/src/main.module.ts @@ -1,11 +1,9 @@ import { Module } from '@nestjs/common' - import { CpinModule } from './cpin-module/cpin.module' +import { HealthzModule } from './modules/healthz/healthz.module' -// This module only exists to import other module. -// « One module to rule them all, and in NestJs bind them » @Module({ - imports: [CpinModule], + imports: [CpinModule, HealthzModule], controllers: [], providers: [], }) diff --git a/apps/server-nestjs/src/modules/healthz/healthz.controller.ts b/apps/server-nestjs/src/modules/healthz/healthz.controller.ts new file mode 100644 index 000000000..25472da06 --- /dev/null +++ b/apps/server-nestjs/src/modules/healthz/healthz.controller.ts @@ -0,0 +1,19 @@ +import { Controller, Get, Inject } from '@nestjs/common' +import { HealthCheck, HealthCheckService } from '@nestjs/terminus' +import { DatabaseHealthService } from '../../cpin-module/infrastructure/database/database-health.service' + +@Controller('api/v1/healthz') +export class HealthzController { + constructor( + @Inject(HealthCheckService) private readonly health: HealthCheckService, + @Inject(DatabaseHealthService) private readonly database: DatabaseHealthService, + ) {} + + @Get() + @HealthCheck() + check() { + return this.health.check([ + () => this.database.check('database'), + ]) + } +} diff --git a/apps/server-nestjs/src/modules/healthz/healthz.module.ts b/apps/server-nestjs/src/modules/healthz/healthz.module.ts new file mode 100644 index 000000000..58b31f46b --- /dev/null +++ b/apps/server-nestjs/src/modules/healthz/healthz.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common' +import { TerminusModule } from '@nestjs/terminus' +import { DatabaseModule } from '../../cpin-module/infrastructure/database/database.module' +import { HealthzController } from './healthz.controller' + +@Module({ + imports: [TerminusModule, DatabaseModule], + controllers: [HealthzController], +}) +export class HealthzModule {} diff --git a/apps/server-nestjs/src/prisma.ts b/apps/server-nestjs/src/prisma.ts deleted file mode 100644 index 4590932b6..000000000 --- a/apps/server-nestjs/src/prisma.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PrismaClient } from '@prisma/client' - -const prisma = new PrismaClient() - -export default prisma diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc15cc5df..ac3ffd672 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -403,6 +403,9 @@ importers: '@nestjs/platform-express': specifier: ^11.1.16 version: 11.1.16(@nestjs/common@11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.16) + '@nestjs/terminus': + specifier: ^11.1.1 + version: 11.1.1(@grpc/grpc-js@1.14.3)(@grpc/proto-loader@0.8.0)(@nestjs/common@11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.16)(@prisma/client@6.19.2(prisma@6.19.2(magicast@0.3.5)(typescript@5.9.3))(typescript@5.9.3))(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.0 @@ -2730,6 +2733,54 @@ packages: peerDependencies: typescript: '>=4.8.2' + '@nestjs/terminus@11.1.1': + resolution: {integrity: sha512-Ssql79H+EQY/Wg108eJqN4NiNsO/tLrj+qbzOWSQUf2JE4vJQ2RG3WTqUOrYjfjWmVHD3+Ys0+azed7LSMKScw==} + peerDependencies: + '@grpc/grpc-js': '*' + '@grpc/proto-loader': '*' + '@mikro-orm/core': '*' + '@mikro-orm/nestjs': '*' + '@nestjs/axios': ^2.0.0 || ^3.0.0 || ^4.0.0 + '@nestjs/common': ^10.0.0 || ^11.0.0 + '@nestjs/core': ^10.0.0 || ^11.0.0 + '@nestjs/microservices': ^10.0.0 || ^11.0.0 + '@nestjs/mongoose': ^11.0.0 + '@nestjs/sequelize': ^10.0.0 || ^11.0.0 + '@nestjs/typeorm': ^10.0.0 || ^11.0.0 + '@prisma/client': '*' + mongoose: '*' + reflect-metadata: 0.1.x || 0.2.x + rxjs: 7.x + sequelize: '*' + typeorm: '*' + peerDependenciesMeta: + '@grpc/grpc-js': + optional: true + '@grpc/proto-loader': + optional: true + '@mikro-orm/core': + optional: true + '@mikro-orm/nestjs': + optional: true + '@nestjs/axios': + optional: true + '@nestjs/microservices': + optional: true + '@nestjs/mongoose': + optional: true + '@nestjs/sequelize': + optional: true + '@nestjs/typeorm': + optional: true + '@prisma/client': + optional: true + mongoose: + optional: true + sequelize: + optional: true + typeorm: + optional: true + '@nestjs/testing@11.1.16': resolution: {integrity: sha512-E7/aUCxzeMSJV80L5GWGIuiMyR/1ncS7uOIetAImfbS4ATE1/h2GBafk0qpk+vjFtPIbtoh9BWDGICzUEU5jDA==} peerDependencies: @@ -4337,6 +4388,9 @@ packages: alien-signals@1.0.13: resolution: {integrity: sha512-OGj9yyTnJEttvzhTUWuscOvtqxq5vrhF7vL9oS0xJ2mK0ItPYP1/y+vCFebfxoEyAz0++1AIwJ5CMr+Fk3nDmg==} + ansi-align@3.0.1: + resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -4500,6 +4554,10 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + boxen@5.1.2: + resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} + engines: {node: '>=10'} + brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -4589,6 +4647,10 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + camelize-ts@3.0.0: resolution: {integrity: sha512-cgRwKKavoDKLTjO4FQTs3dRBePZp/2Y9Xpud0FhuCOTE86M2cniKN4CCXgRnsyXNMmQMifVHcv6SPaMtTx6ofQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4620,6 +4682,10 @@ packages: chardet@2.1.1: resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} + check-disk-space@3.4.0: + resolution: {integrity: sha512-drVkSqfwA+TvuEhFipiR1OC9boEGZL5RrWvVsOthdcvQNXyCCuKkEiTOTXZ7qxSf/GLwq4GvzfrQD/Wz325hgw==} + engines: {node: '>=16'} + check-error@2.1.3: resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} engines: {node: '>= 16'} @@ -4664,6 +4730,14 @@ packages: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-boxes@2.2.1: + resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} + engines: {node: '>=6'} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -8209,6 +8283,18 @@ packages: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + type-fest@5.4.4: resolution: {integrity: sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw==} engines: {node: '>=20'} @@ -8705,6 +8791,10 @@ packages: engines: {node: '>=8'} hasBin: true + widest-line@3.1.0: + resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} + engines: {node: '>=8'} + wildcard-match@5.1.4: resolution: {integrity: sha512-wldeCaczs8XXq7hj+5d/F38JE2r7EXgb6WQDM84RVwxy81T/sxB5e9+uZLK9Q9oNz1mlvjut+QtvgaOQFPVq/g==} @@ -10799,6 +10889,19 @@ snapshots: transitivePeerDependencies: - chokidar + '@nestjs/terminus@11.1.1(@grpc/grpc-js@1.14.3)(@grpc/proto-loader@0.8.0)(@nestjs/common@11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.16)(@prisma/client@6.19.2(prisma@6.19.2(magicast@0.3.5)(typescript@5.9.3))(typescript@5.9.3))(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@nestjs/common': 11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.16(@nestjs/common@11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.16)(reflect-metadata@0.2.2)(rxjs@7.8.2) + boxen: 5.1.2 + check-disk-space: 3.4.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + optionalDependencies: + '@grpc/grpc-js': 1.14.3 + '@grpc/proto-loader': 0.8.0 + '@prisma/client': 6.19.2(prisma@6.19.2(magicast@0.3.5)(typescript@5.9.3))(typescript@5.9.3) + '@nestjs/testing@11.1.16(@nestjs/common@11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.16)(@nestjs/platform-express@11.1.16)': dependencies: '@nestjs/common': 11.1.16(reflect-metadata@0.2.2)(rxjs@7.8.2) @@ -12857,6 +12960,10 @@ snapshots: alien-signals@1.0.13: {} + ansi-align@3.0.1: + dependencies: + string-width: 4.2.3 + ansi-colors@4.1.3: {} ansi-escapes@7.3.0: @@ -13018,6 +13125,17 @@ snapshots: boolbase@1.0.0: {} + boxen@5.1.2: + dependencies: + ansi-align: 3.0.1 + camelcase: 6.3.0 + chalk: 4.1.2 + cli-boxes: 2.2.1 + string-width: 4.2.3 + type-fest: 0.20.2 + widest-line: 3.1.0 + wrap-ansi: 7.0.0 + brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -13131,6 +13249,8 @@ snapshots: callsites@3.1.0: {} + camelcase@6.3.0: {} + camelize-ts@3.0.0: {} caniuse-lite@1.0.30001777: {} @@ -13162,6 +13282,8 @@ snapshots: chardet@2.1.1: {} + check-disk-space@3.4.0: {} + check-error@2.1.3: {} chokidar@3.6.0: @@ -13208,6 +13330,11 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + clean-stack@2.2.0: + optional: true + + cli-boxes@2.2.1: {} + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -17430,6 +17557,8 @@ snapshots: type-fest@0.16.0: {} + type-fest@0.20.2: {} + type-fest@5.4.4: dependencies: tagged-tag: 1.0.0 @@ -18113,6 +18242,10 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + widest-line@3.1.0: + dependencies: + string-width: 4.2.3 + wildcard-match@5.1.4: {} word-wrap@1.2.5: {}