Verbessere Codequalität und Sicherheit durch Refactoring, Hinzufügen von ESLint-Regeln und Aktualisierung der OSV-Scanner-Konfiguration
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 6m45s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m57s

This commit is contained in:
Torsten Schulz (local)
2026-07-17 09:08:42 +02:00
parent d260f00756
commit 30465c7833
25 changed files with 40 additions and 53 deletions

View File

@@ -106,7 +106,7 @@ export async function fillFormFields(pdfDoc, form, data) {
try {
const helveticaFont = await pdfDoc.embedFont(StandardFonts.Helvetica)
form.updateFieldAppearances(helveticaFont)
} catch (_error) {
} catch (error) {
console.warn('Could not update field appearances:', error.message)
}
}
@@ -123,7 +123,7 @@ export async function fillPdfForm(pdfDoc, form, data) {
// Check if PLZ/Ort field on page 1 is empty and fix it
await fixPLZOrtField(pdfDoc, data)
} catch (_error) {
} catch (error) {
console.warn('Form filling failed, using fallback:', error.message)
await fillFormFieldsPositionally(pdfDoc, data)
}
@@ -136,7 +136,6 @@ export async function fillPdfForm(pdfDoc, form, data) {
*/
async function fixPLZOrtField(pdfDoc, data) {
try {
const pages = pdfDoc.getPages()
await pdfDoc.embedFont(StandardFonts.Helvetica)
// Draw PLZ/Ort at the correct position on page 1
@@ -160,7 +159,7 @@ async function fixPLZOrtField(pdfDoc, data) {
}
}
} catch (_error) {
} catch (error) {
console.warn('Could not fix PLZ/Ort field:', error.message)
}
}
@@ -221,7 +220,7 @@ async function fillFormFieldsPositionally(pdfDoc, data) {
firstPage.drawText('X', { x: 116, y: -8, size: 12, font: helveticaFont })
}
} catch (_error) {
} catch (error) {
console.error('Positional filling failed:', error.message)
}
}