• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 8158893836

05 Mar 2024 03:33PM UTC coverage: 93.258% (-0.04%) from 93.293%
8158893836

Pull #1252

github

iamacook
Migrate `Backbone` validation to `zod`
Pull Request #1252: Migrate `Backbone` validation to `zod`

1715 of 2081 branches covered (82.41%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 3 files covered. (100.0%)

3 existing lines in 2 files now uncovered.

6377 of 6596 relevant lines covered (96.68%)

346.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/src/datasources/db/postgres-database.module.ts
1
import * as postgres from 'postgres';
82✔
2
import { Module } from '@nestjs/common';
82✔
3
import { PostgresDatabaseShutdownHook } from '@/datasources/db/postgres-database.shutdown.hook';
82✔
4
import { IConfigurationService } from '@/config/configuration.service.interface';
82✔
5
import { PostgresDatabaseMigrationHook } from '@/datasources/db/postgres-database.migration.hook';
82✔
6

7
function dbFactory(configurationService: IConfigurationService): postgres.Sql {
UNCOV
8
  const sslConfig = configurationService.getOrThrow('db.postgres.ssl.enabled')
×
9
    ? {
10
        rejectUnauthorized: configurationService.getOrThrow(
11
          'db.postgres.ssl.rejectUnauthorized',
12
        ),
13
      }
14
    : false;
UNCOV
15
  return postgres({
×
16
    host: configurationService.getOrThrow('db.postgres.host'),
17
    port: configurationService.getOrThrow('db.postgres.port'),
18
    db: configurationService.getOrThrow('db.postgres.database'),
19
    user: configurationService.getOrThrow('db.postgres.username'),
20
    password: configurationService.getOrThrow('db.postgres.password'),
21
    ssl: sslConfig,
22
  });
23
}
24

25
@Module({
26
  providers: [
27
    {
28
      provide: 'DB_INSTANCE',
29
      useFactory: dbFactory,
30
      inject: [IConfigurationService],
31
    },
32
    PostgresDatabaseShutdownHook,
33
    PostgresDatabaseMigrationHook,
34
  ],
35
  exports: ['DB_INSTANCE'],
36
})
37
export class PostgresDatabaseModule {}
82✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc