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

safe-global / safe-client-gateway / 11340871916

15 Oct 2024 06:58AM UTC coverage: 46.83% (-45.0%) from 91.836%
11340871916

push

github

web-flow
Bump typescript from 5.6.2 to 5.6.3 (#2015)

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.2 to 5.6.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

500 of 3096 branches covered (16.15%)

Branch coverage included in aggregate %.

5092 of 8845 relevant lines covered (57.57%)

12.16 hits per line

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

47.62
/src/datasources/db/postgres-database.module.ts
1
import postgres from 'postgres';
16✔
2
import { Module } from '@nestjs/common';
16✔
3
import { PostgresDatabaseShutdownHook } from '@/datasources/db/postgres-database.shutdown.hook';
16✔
4
import { IConfigurationService } from '@/config/configuration.service.interface';
16✔
5
import { PostgresDatabaseMigrationHook } from '@/datasources/db/postgres-database.migration.hook';
16✔
6
import fs from 'fs';
16✔
7
import { PostgresDatabaseMigrator } from '@/datasources/db/postgres-database.migrator';
16✔
8
import { ICachedQueryResolver } from '@/datasources/db/cached-query-resolver.interface';
16✔
9
import { CachedQueryResolver } from '@/datasources/db/cached-query-resolver';
16✔
10

11
function dbFactory(configurationService: IConfigurationService): postgres.Sql {
12
  const caPath = configurationService.get<string>('db.postgres.ssl.caPath');
×
13
  const ca: string | undefined =
14
    caPath && caPath.length > 0 ? fs.readFileSync(caPath, 'utf8') : undefined;
×
15

16
  const sslConfig = configurationService.getOrThrow('db.postgres.ssl.enabled')
×
17
    ? {
18
        requestCert: configurationService.getOrThrow(
19
          'db.postgres.ssl.requestCert',
20
        ),
21
        rejectUnauthorized: configurationService.getOrThrow(
22
          'db.postgres.ssl.rejectUnauthorized',
23
        ),
24
        ca,
25
      }
26
    : false;
27
  return postgres({
×
28
    host: configurationService.getOrThrow('db.postgres.host'),
29
    port: configurationService.getOrThrow('db.postgres.port'),
30
    db: configurationService.getOrThrow('db.postgres.database'),
31
    user: configurationService.getOrThrow('db.postgres.username'),
32
    password: configurationService.getOrThrow('db.postgres.password'),
33
    ssl: sslConfig,
34
  });
35
}
36

37
function migratorFactory(sql: postgres.Sql): PostgresDatabaseMigrator {
38
  return new PostgresDatabaseMigrator(sql);
×
39
}
40

41
@Module({
42
  providers: [
43
    {
44
      provide: 'DB_INSTANCE',
45
      useFactory: dbFactory,
46
      inject: [IConfigurationService],
47
    },
48
    {
49
      provide: PostgresDatabaseMigrator,
50
      useFactory: migratorFactory,
51
      inject: ['DB_INSTANCE'],
52
    },
53
    {
54
      provide: ICachedQueryResolver,
55
      useClass: CachedQueryResolver,
56
    },
57
    PostgresDatabaseShutdownHook,
58
    PostgresDatabaseMigrationHook,
59
  ],
60
  exports: ['DB_INSTANCE', ICachedQueryResolver],
61
})
62
export class PostgresDatabaseModule {}
16✔
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