mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-11-24 08:42:24 +02:00
fixing types
This commit is contained in:
parent
4e3f464cf8
commit
3a347c13e2
@ -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();
|
||||
});
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user