mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-12 04:23:09 +02:00
updating node packages, fixing typo
This commit is contained in:
parent
586cb3c517
commit
3bba955c82
@ -1,4 +1,4 @@
|
||||
import {RendererInput, ThumbnailWoker} from './ThumbnailWoker';
|
||||
import {RendererInput, ThumbnailWorker} from './ThumbnailWoker';
|
||||
import {Config} from '../../../common/config/private/Config';
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ export class TaskQue implements ITaskQue {
|
||||
this.taskInProgress++;
|
||||
const task = this.tasks.shift();
|
||||
try {
|
||||
task.promise.resolve(await ThumbnailWoker.render(task.data, Config.Server.thumbnail.processingLibrary));
|
||||
task.promise.resolve(await ThumbnailWorker.render(task.data, Config.Server.thumbnail.processingLibrary));
|
||||
} catch (err) {
|
||||
task.promise.reject(err);
|
||||
}
|
||||
|
@ -3,17 +3,17 @@ import {Dimensions, State} from 'gm';
|
||||
import {Logger} from '../../Logger';
|
||||
import {ThumbnailProcessingLib} from '../../../common/config/private/IPrivateConfig';
|
||||
|
||||
export class ThumbnailWoker {
|
||||
export class ThumbnailWorker {
|
||||
|
||||
private static renderer: (input: RendererInput) => Promise<void> = null;
|
||||
private static rendererType = null;
|
||||
|
||||
public static render(input: RendererInput, renderer: ThumbnailProcessingLib): Promise<void> {
|
||||
if (ThumbnailWoker.rendererType !== renderer) {
|
||||
ThumbnailWoker.renderer = RendererFactory.build(renderer);
|
||||
ThumbnailWoker.rendererType = renderer;
|
||||
if (ThumbnailWorker.rendererType !== renderer) {
|
||||
ThumbnailWorker.renderer = RendererFactory.build(renderer);
|
||||
ThumbnailWorker.rendererType = renderer;
|
||||
}
|
||||
return ThumbnailWoker.renderer(input);
|
||||
return ThumbnailWorker.renderer(input);
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ export class RendererFactory {
|
||||
const Jimp = require('jimp');
|
||||
return async (input: RendererInput): Promise<void> => {
|
||||
// generate thumbnail
|
||||
Logger.silly('[JimpThRenderer] rendering thumbnail:', input.imagePath);
|
||||
Logger.silly('[JimpThRenderer] rendering thumbnail:' + input.imagePath);
|
||||
const image = await Jimp.read(input.imagePath);
|
||||
/**
|
||||
* newWidth * newHeight = size*size
|
||||
@ -86,7 +86,7 @@ export class RendererFactory {
|
||||
const sharp = require('sharp');
|
||||
return async (input: RendererInput): Promise<void> => {
|
||||
|
||||
Logger.silly('[SharpThRenderer] rendering thumbnail:', input.imagePath);
|
||||
Logger.silly('[SharpThRenderer] rendering thumbnail:' + input.imagePath);
|
||||
const image: SharpInstance = sharp(input.imagePath);
|
||||
const metadata: Metadata = await image.metadata();
|
||||
|
||||
@ -123,7 +123,7 @@ export class RendererFactory {
|
||||
const gm = require('gm');
|
||||
return (input: RendererInput): Promise<void> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Logger.silly('[GMThRenderer] rendering thumbnail:', input.imagePath);
|
||||
Logger.silly('[GMThRenderer] rendering thumbnail:' + input.imagePath);
|
||||
let image: State = gm(input.imagePath);
|
||||
image.size((err, value: Dimensions) => {
|
||||
if (err) {
|
@ -1,6 +1,6 @@
|
||||
import {DiskMangerWorker} from './DiskMangerWorker';
|
||||
import {Logger} from '../../Logger';
|
||||
import {RendererInput, ThumbnailWoker} from './ThumbnailWoker';
|
||||
import {RendererInput, ThumbnailWorker} from './ThumbnailWoker';
|
||||
import {ThumbnailProcessingLib} from '../../../common/config/private/IPrivateConfig';
|
||||
|
||||
export class Worker {
|
||||
@ -19,7 +19,7 @@ export class Worker {
|
||||
}
|
||||
break;
|
||||
case WorkerTaskTypes.thumbnail:
|
||||
result = await ThumbnailWoker.render((<ThumbnailTask>task).input, (<ThumbnailTask>task).renderer);
|
||||
result = await ThumbnailWorker.render((<ThumbnailTask>task).input, (<ThumbnailTask>task).renderer);
|
||||
break;
|
||||
default:
|
||||
Logger.error('Unknown worker task type');
|
||||
|
@ -26,7 +26,7 @@
|
||||
[(ngModel)]="settings.mysql.password" name="password">
|
||||
</ng-container>
|
||||
<ng-container *ngIf="settings.type == DatabaseType.sqlite">
|
||||
<p class="title" i18n>SQLie settings:</p>
|
||||
<p class="title" i18n>SQLite settings:</p>
|
||||
<input type="text" class="form-control" placeholder="storage"
|
||||
[(ngModel)]="settings.sqlite.storage" name="host" required>
|
||||
</ng-container>
|
||||
|
@ -92,7 +92,7 @@
|
||||
<ng-container i18n>Size of the thumbnails.</ng-container><br/>
|
||||
<ng-container i18n>The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.)</ng-container><br/>
|
||||
<ng-container
|
||||
i18n>';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels.</ng-container>
|
||||
i18n>';' separated integers. If size is 200, that thumbnail will have 200^2 pixels.</ng-container>
|
||||
</small>
|
||||
|
||||
</div>
|
||||
|
@ -434,13 +434,13 @@
|
||||
</context-group>
|
||||
<target>Database</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="5b1d1f76e9702b36014e734fd24aa8c5c486784a" datatype="html">
|
||||
<source>SQLie settings:</source>
|
||||
<trans-unit id="ba512e6fe9e8d0a8014c1959539e463cbea3c721" datatype="html">
|
||||
<source>SQLite settings:</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">app/settings/database/database.settings.component.ts</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
</context-group>
|
||||
<target>SQLie settings:</target>
|
||||
<target>SQLite settings:</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="c84df9553019022cc521320e3afaed42f23feca1" datatype="html">
|
||||
<source>Save
|
||||
@ -684,13 +684,13 @@
|
||||
</context-group>
|
||||
<target>The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.)</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="5c43f65d4b1e7f4c12937babb0794e7b84a9a103" datatype="html">
|
||||
<source>';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels.</source>
|
||||
<trans-unit id="d2b55b02775d93e8e5feaea56c6975e7e617a38a" datatype="html">
|
||||
<source>';' separated integers. If size is 200, that thumbnail will have 200^2 pixels.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">app/settings/thumbnail/thumbanil.settings.component.ts</context>
|
||||
<context context-type="linenumber">95</context>
|
||||
</context-group>
|
||||
<target>';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels.</target>
|
||||
<target>';' separated integers. If size is 200, that thumbnail will have 200^2 pixels.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="2e75ae3885931555902da6b288ed616843d5dc3c" datatype="html">
|
||||
<source>Search settings</source>
|
||||
|
@ -434,8 +434,8 @@
|
||||
</context-group>
|
||||
<target>Adatbázis</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="5b1d1f76e9702b36014e734fd24aa8c5c486784a" datatype="html">
|
||||
<source>SQLie settings:</source>
|
||||
<trans-unit id="ba512e6fe9e8d0a8014c1959539e463cbea3c721" datatype="html">
|
||||
<source>SQLite settings:</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">app/settings/database/database.settings.component.ts</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
@ -684,8 +684,8 @@
|
||||
</context-group>
|
||||
<target>A leginkább eggyező méret lesz generálva. (A nagyobb méret jobb minőségű képet jelent, de nagyobb számításigényű és több helyet is foglal.)</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="5c43f65d4b1e7f4c12937babb0794e7b84a9a103" datatype="html">
|
||||
<source>';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels.</source>
|
||||
<trans-unit id="d2b55b02775d93e8e5feaea56c6975e7e617a38a" datatype="html">
|
||||
<source>';' separated integers. If size is 200, that thumbnail will have 200^2 pixels.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">app/settings/thumbnail/thumbanil.settings.component.ts</context>
|
||||
<context context-type="linenumber">95</context>
|
||||
|
85
package.json
85
package.json
@ -30,93 +30,94 @@
|
||||
"dependencies": {
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.18.3",
|
||||
"cookie-parser": "^1.4.3",
|
||||
"cookie-parser": "1.4.3",
|
||||
"cookie-session": "2.0.0-beta.3",
|
||||
"ejs": "2.6.1",
|
||||
"express": "4.16.3",
|
||||
"jimp": "0.2.28",
|
||||
"locale": "0.1.0",
|
||||
"reflect-metadata": "0.1.12",
|
||||
"sqlite3": "4.0.0",
|
||||
"sqlite3": "4.0.2",
|
||||
"ts-exif-parser": "0.1.23",
|
||||
"ts-node-iptc": "1.0.9",
|
||||
"typeconfig": "1.0.6",
|
||||
"typeorm": "0.2.6",
|
||||
"typeorm": "0.2.7",
|
||||
"winston": "2.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agm/core": "1.0.0-beta.3",
|
||||
"@angular-devkit/build-angular": "~0.6.5",
|
||||
"@angular/animations": "6.0.3",
|
||||
"@angular/cli": "6.0.5",
|
||||
"@angular/common": "6.0.3",
|
||||
"@angular/compiler": "6.0.3",
|
||||
"@angular/compiler-cli": "6.0.3",
|
||||
"@angular/core": "6.0.3",
|
||||
"@angular/forms": "6.0.3",
|
||||
"@angular/http": "6.0.3",
|
||||
"@angular/language-service": "^6.0.3",
|
||||
"@angular/platform-browser": "6.0.3",
|
||||
"@angular/platform-browser-dynamic": "6.0.3",
|
||||
"@angular/router": "6.0.3",
|
||||
"@ngx-translate/i18n-polyfill": "0.1.3",
|
||||
"@angular-devkit/build-angular": "0.7.1",
|
||||
"@angular-devkit/build-optimizer": "0.7.1",
|
||||
"@angular/animations": "6.1.0",
|
||||
"@angular/cli": "6.1.1",
|
||||
"@angular/common": "6.1.0",
|
||||
"@angular/compiler": "6.1.0",
|
||||
"@angular/compiler-cli": "6.1.0",
|
||||
"@angular/core": "6.1.0",
|
||||
"@angular/forms": "6.1.0",
|
||||
"@angular/http": "6.1.0",
|
||||
"@angular/language-service": "^6.1.0",
|
||||
"@angular/platform-browser": "6.1.0",
|
||||
"@angular/platform-browser-dynamic": "6.1.0",
|
||||
"@angular/router": "6.1.0",
|
||||
"@ngx-translate/i18n-polyfill": "1.0.0",
|
||||
"@types/bcryptjs": "2.4.1",
|
||||
"@types/chai": "4.1.3",
|
||||
"@types/cookie-session": "2.0.34",
|
||||
"@types/express": "4.11.1",
|
||||
"@types/chai": "4.1.4",
|
||||
"@types/cookie-session": "2.0.35",
|
||||
"@types/express": "4.16.0",
|
||||
"@types/gm": "1.18.0",
|
||||
"@types/jasmine": "2.8.7",
|
||||
"@types/node": "10.1.2",
|
||||
"@types/sharp": "0.17.8",
|
||||
"@types/winston": "2.3.9",
|
||||
"bootstrap": "4.1.1",
|
||||
"@types/jasmine": "2.8.8",
|
||||
"@types/node": "10.5.4",
|
||||
"@types/sharp": "0.17.9",
|
||||
"@types/winston": "^2.3.9",
|
||||
"bootstrap": "4.1.3",
|
||||
"chai": "4.1.2",
|
||||
"codelyzer": "4.3.0",
|
||||
"codelyzer": "4.4.2",
|
||||
"core-js": "2.5.7",
|
||||
"ejs-loader": "0.3.1",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-json-modify": "1.0.2",
|
||||
"gulp-typescript": "4.0.2",
|
||||
"gulp-zip": "4.1.0",
|
||||
"gulp-typescript": "5.0.0-alpha.3",
|
||||
"gulp-zip": "4.2.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "1.2.5",
|
||||
"jasmine-core": "3.1.0",
|
||||
"jasmine-spec-reporter": "4.2.1",
|
||||
"jw-bootstrap-switch-ng2": "1.0.10",
|
||||
"karma": "2.0.2",
|
||||
"karma": "2.0.5",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-cli": "1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "2.0.1",
|
||||
"karma-jasmine": "1.1.2",
|
||||
"karma-jasmine-html-reporter": "1.1.0",
|
||||
"karma-jasmine-html-reporter": "1.2.0",
|
||||
"karma-remap-istanbul": "0.6.0",
|
||||
"karma-systemjs": "0.16.0",
|
||||
"merge2": "1.2.2",
|
||||
"mocha": "5.2.0",
|
||||
"ng2-cookies": "1.0.12",
|
||||
"ng2-slim-loading-bar": "4.0.0",
|
||||
"ngx-bootstrap": "3.0.0",
|
||||
"ngx-clipboard": "11.1.0",
|
||||
"ngx-toastr": "^8.7.3",
|
||||
"ngx-bootstrap": "3.0.1",
|
||||
"ngx-clipboard": "11.1.1",
|
||||
"ngx-toastr": "8.10.0",
|
||||
"open-iconic": "1.1.1",
|
||||
"protractor": "5.3.2",
|
||||
"protractor": "5.4.0",
|
||||
"remap-istanbul": "0.11.1",
|
||||
"rimraf": "2.6.2",
|
||||
"run-sequence": "2.2.1",
|
||||
"rxjs": "6.2.0",
|
||||
"rxjs-compat": "^6.2.0",
|
||||
"rxjs": "6.2.2",
|
||||
"rxjs-compat": "^6.2.2",
|
||||
"ts-helpers": "1.1.2",
|
||||
"ts-node": "6.0.5",
|
||||
"tslint": "5.10.0",
|
||||
"typescript": "2.7.2",
|
||||
"ts-node": "7.0.0",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "2.9.2",
|
||||
"xlf-google-translate": "1.0.0-beta.11",
|
||||
"zone.js": "0.8.26"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"mysql": "2.15.0",
|
||||
"bcrypt": "2.0.1",
|
||||
"mysql": "2.16.0",
|
||||
"bcrypt": "3.0.0",
|
||||
"gm": "1.23.1",
|
||||
"sharp": "0.20.2"
|
||||
"sharp": "0.20.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.9 <10.0"
|
||||
|
Loading…
Reference in New Issue
Block a user