From 3a347c13e2bbcf3dcb71e331365ee42c4a9aa565 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Tue, 28 Jan 2020 21:46:27 +0100 Subject: [PATCH] fixing types --- gulpfile.ts | 2 +- .../model/diagnostics/ConfigDiagnostics.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index 55076961..69a8d252 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -348,7 +348,7 @@ gulp.task('generate-man', async (cb) => { let txt = '# Pigallery 2 man page\n'; txt += 'pigallery2 uses [typeconfig](https://github.com/bpatrik/typeconfig) for configuration\n\n'; txt += '`npm start -- --help` prints the following:\n\n'; - txt += '```bash\n' + ConfigClassBuilder.attachPrivateInterface(Config).__printMan() + '```'; + txt += '```\n' + ConfigClassBuilder.attachPrivateInterface(Config).__printMan() + '```'; await fsp.writeFile('MANPAGE.md', txt); cb(); }); diff --git a/src/backend/model/diagnostics/ConfigDiagnostics.ts b/src/backend/model/diagnostics/ConfigDiagnostics.ts index 40048954..a03867f4 100644 --- a/src/backend/model/diagnostics/ConfigDiagnostics.ts +++ b/src/backend/model/diagnostics/ConfigDiagnostics.ts @@ -1,4 +1,4 @@ -import {Config, PrivateConfigClass} from '../../../common/config/private/Config'; +import {Config} from '../../../common/config/private/Config'; import {Logger} from '../../Logger'; import {NotificationManager} from '../NotifocationManager'; import {ProjectPath} from '../../ProjectPath'; @@ -6,7 +6,7 @@ import {SQLConnection} from '../database/sql/SQLConnection'; import * as fs from 'fs'; import {FFmpegFactory} from '../FFmpegFactory'; import {ClientConfig} from '../../../common/config/public/ClientConfig'; -import {ServerConfig} from '../../../common/config/private/PrivateConfig'; +import {IPrivateConfig, ServerConfig} from '../../../common/config/private/PrivateConfig'; import MapLayers = ClientConfig.MapLayers; const LOG_TAG = '[ConfigDiagnostics]'; @@ -40,7 +40,7 @@ export class ConfigDiagnostics { } - static async testMetaFileConfig(metaFileConfig: ClientConfig.MetaFileConfig, config: PrivateConfig) { + static async testMetaFileConfig(metaFileConfig: ClientConfig.MetaFileConfig, config: IPrivateConfig) { if (metaFileConfig.enabled === true && config.Client.Map.enabled === false) { throw new Error('*.gpx meta files are not supported without MAP'); @@ -73,7 +73,7 @@ export class ConfigDiagnostics { }); } - static async testServerVideoConfig(videoConfig: ServerConfig.VideoConfig, config: PrivateConfig) { + static async testServerVideoConfig(videoConfig: ServerConfig.VideoConfig, config: IPrivateConfig) { if (config.Client.Media.Video.enabled === true) { if (videoConfig.transcoding.fps <= 0) { throw new Error('fps should be grater than 0'); @@ -158,11 +158,11 @@ export class ConfigDiagnostics { } - static async testTasksConfig(task: ServerConfig.JobConfig, config: PrivateConfig) { + static async testTasksConfig(task: ServerConfig.JobConfig, config: IPrivateConfig) { } - static async testFacesConfig(faces: ClientConfig.FacesConfig, config: PrivateConfig) { + static async testFacesConfig(faces: ClientConfig.FacesConfig, config: IPrivateConfig) { if (faces.enabled === true) { if (config.Server.Database.type === ServerConfig.DatabaseType.memory) { throw new Error('Memory Database do not support faces'); @@ -173,7 +173,7 @@ export class ConfigDiagnostics { } } - static async testSearchConfig(search: ClientConfig.SearchConfig, config: PrivateConfig) { + static async testSearchConfig(search: ClientConfig.SearchConfig, config: IPrivateConfig) { if (search.enabled === true && config.Server.Database.type === ServerConfig.DatabaseType.memory) { throw new Error('Memory Database do not support searching'); @@ -181,7 +181,7 @@ export class ConfigDiagnostics { } - static async testSharingConfig(sharing: ClientConfig.SharingConfig, config: PrivateConfig) { + static async testSharingConfig(sharing: ClientConfig.SharingConfig, config: IPrivateConfig) { if (sharing.enabled === true && config.Server.Database.type === ServerConfig.DatabaseType.memory) { throw new Error('Memory Database do not support sharing'); @@ -192,7 +192,7 @@ export class ConfigDiagnostics { } } - static async testRandomPhotoConfig(sharing: ClientConfig.RandomPhotoConfig, config: PrivateConfig) { + static async testRandomPhotoConfig(sharing: ClientConfig.RandomPhotoConfig, config: IPrivateConfig) { if (sharing.enabled === true && config.Server.Database.type === ServerConfig.DatabaseType.memory) { throw new Error('Memory Database do not support random photo');