1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-25 02:04:15 +02:00

updating server side packages

This commit is contained in:
Patrik J. Braun 2022-11-29 21:23:39 +01:00
parent acc7b6871e
commit 9c352ef758
3 changed files with 542 additions and 1575 deletions

2044
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,28 +31,27 @@
"url": "https://github.com/bpatrik/PiGallery2/issues"
},
"dependencies": {
"archiver": "5.3.0",
"bcrypt": "5.0.1",
"better-sqlite3": "7.5.1",
"archiver": "5.3.1",
"bcrypt": "5.1.0",
"better-sqlite3": "7.6.2",
"cookie-parser": "1.4.6",
"cookie-session": "2.0.0",
"csurf": "1.11.0",
"ejs": "3.1.6",
"ejs": "3.1.8",
"exifreader": "4.4.0",
"express": "4.17.3",
"express-unless": "1.0.0",
"express": "4.18.2",
"express-unless": "2.1.3",
"fluent-ffmpeg": "2.1.2",
"image-size": "1.0.1",
"jimp": "0.16.1",
"image-size": "1.0.2",
"locale": "0.1.0",
"node-geocoder": "4.0.0",
"node-geocoder": "4.2.0",
"reflect-metadata": "0.1.13",
"sharp": "0.31.2",
"ts-exif-parser": "0.2.2",
"ts-node-iptc": "1.0.11",
"typeconfig": "2.0.21",
"typeconfig": "2.0.24",
"xml2js": "0.4.23",
"typeorm": "0.3.4"
"typeorm": "0.3.10"
},
"devDependencies": {
"@angular-builders/custom-webpack": "13.1.0",
@ -141,7 +140,7 @@
"zone.js": "0.11.5"
},
"optionalDependencies": {
"ffmpeg-static": "5.0.0",
"ffmpeg-static": "5.1.0",
"ffprobe-static": "3.1.0",
"mysql": "2.18.1"
},

View File

@ -1,28 +1,28 @@
import { Config } from '../common/config/private/Config';
import {Config} from '../common/config/private/Config';
import * as express from 'express';
import { Request } from 'express';
import {Request} from 'express';
import * as cookieParser from 'cookie-parser';
import * as _http from 'http';
import { Server as HttpServer } from 'http';
import {Server as HttpServer} from 'http';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import * as locale from 'locale';
import { ObjectManagers } from './model/ObjectManagers';
import { Logger } from './Logger';
import { LoggerRouter } from './routes/LoggerRouter';
import { DiskManager } from './model/DiskManger';
import { ConfigDiagnostics } from './model/diagnostics/ConfigDiagnostics';
import { Localizations } from './model/Localizations';
import { CookieNames } from '../common/CookieNames';
import { Router } from './routes/Router';
import { PhotoProcessing } from './model/fileprocessing/PhotoProcessing';
import {ObjectManagers} from './model/ObjectManagers';
import {Logger} from './Logger';
import {LoggerRouter} from './routes/LoggerRouter';
import {DiskManager} from './model/DiskManger';
import {ConfigDiagnostics} from './model/diagnostics/ConfigDiagnostics';
import {Localizations} from './model/Localizations';
import {CookieNames} from '../common/CookieNames';
import {Router} from './routes/Router';
import {PhotoProcessing} from './model/fileprocessing/PhotoProcessing';
import * as _csrf from 'csurf';
import * as unless from 'express-unless';
import { Event } from '../common/event/Event';
import { QueryParams } from '../common/QueryParams';
import { ConfigClassBuilder } from 'typeconfig/node';
import { ConfigClassOptions } from 'typeconfig/src/decorators/class/IConfigClass';
import { DatabaseType } from '../common/config/private/PrivateConfig';
import {Event} from '../common/event/Event';
import {QueryParams} from '../common/QueryParams';
import {ConfigClassBuilder} from 'typeconfig/node';
import {ConfigClassOptions} from 'typeconfig/src/decorators/class/IConfigClass';
import {DatabaseType} from '../common/config/private/PrivateConfig';
import {unless} from 'express-unless';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const session = require('cookie-session');
@ -56,11 +56,11 @@ export class Server {
Logger.verbose(
LOG_TAG,
'using config from ' +
(
ConfigClassBuilder.attachPrivateInterface(Config)
.__options as ConfigClassOptions
).configPath +
':'
(
ConfigClassBuilder.attachPrivateInterface(Config)
.__options as ConfigClassOptions
).configPath +
':'
);
Logger.verbose(LOG_TAG, JSON.stringify(Config, null, '\t'));
@ -105,11 +105,11 @@ export class Server {
// enable token generation but do not check it
this.app.post(
['/api/user/login', '/api/share/login'],
_csrf({ ignoreMethods: ['POST'] })
_csrf({ignoreMethods: ['POST']})
);
this.app.get(
['/api/user/me', '/api/share/:' + QueryParams.gallery.sharingKey_params],
_csrf({ ignoreMethods: ['GET'] })
_csrf({ignoreMethods: ['GET']})
);
DiskManager.init();