chore: apply ESLint auto-fix across entire backend
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
Reformats code style (line breaks, indentation, type annotations) without changing logic. Also includes minor feature additions bundled in the same lint run (stats service, user-settings groups, agrarmonitor polling improvements). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,18 +60,22 @@ export class PdfService {
|
||||
|
||||
const entries = await fs.readdir(tmpDir);
|
||||
const images = entries
|
||||
.filter(f => f.endsWith('.png'))
|
||||
.filter((f) => f.endsWith('.png'))
|
||||
.sort((a, b) => {
|
||||
const numA = parseInt(a.match(/\d+/)?.[0] ?? '0', 10);
|
||||
const numB = parseInt(b.match(/\d+/)?.[0] ?? '0', 10);
|
||||
return numA - numB;
|
||||
})
|
||||
.map(f => path.join(tmpDir, f));
|
||||
.map((f) => path.join(tmpDir, f));
|
||||
|
||||
if (images.length === 0) {
|
||||
this.logger.warn(`Ghostscript hat keine Seiten erstellt: ${pdfPath} — Verzeichnisinhalt: [${entries.join(', ')}]`);
|
||||
this.logger.warn(
|
||||
`Ghostscript hat keine Seiten erstellt: ${pdfPath} — Verzeichnisinhalt: [${entries.join(', ')}]`,
|
||||
);
|
||||
} else {
|
||||
this.logger.debug(`PDF konvertiert: ${images.length} Seite(n) in ${tmpDir}`);
|
||||
this.logger.debug(
|
||||
`PDF konvertiert: ${images.length} Seite(n) in ${tmpDir}`,
|
||||
);
|
||||
}
|
||||
|
||||
return images;
|
||||
@@ -114,7 +118,9 @@ export class PdfService {
|
||||
async cleanup(imagePaths: string[]): Promise<void> {
|
||||
const dirs = new Set<string>();
|
||||
for (const imgPath of imagePaths) {
|
||||
try { await fs.unlink(imgPath); } catch {}
|
||||
try {
|
||||
await fs.unlink(imgPath);
|
||||
} catch {}
|
||||
dirs.add(path.dirname(imgPath));
|
||||
}
|
||||
for (const dir of dirs) {
|
||||
|
||||
Reference in New Issue
Block a user