Add the immutable PDF renderer for "Nutzungsnachweis" billing reports.
- src/modules/billing/types.ts: BillingReportSnapshot self-contained type
(address, selected positions, repeat downloads, net total in cents,
report/invoice metadata, period, document ID, legal notice).
- src/modules/pdf/document.ts: pdfmake document definition builder with
monochrome invoice layout (black logo, sender/recipient blocks, rounded
black summary panel, repeated black table headers, light-gray rows,
German dates, cents-derived totals, page numbers, document ID, invoice
reference, legal separation notice).
- src/modules/pdf/render.ts: renderBillingPdf → { bytes, sha256 } using
pdfmake 0.3 with IBM Plex Mono (OFL) embedded via the VFS.
- scripts/render-pdf-fixture.ts: stress fixture generator (1 row, 60 rows,
long address, long fields, umlauts, 3-page case) into tmp/pdfs/.
- tests/fixtures/billing-report.ts: deterministic reportFixture (60,00 EUR).
- tsconfig.json: server-only path alias for tsx script execution.
Co-Authored-By: Claude <noreply@anthropic.com>
57 lines
1.4 KiB
JSON
57 lines
1.4 KiB
JSON
{
|
|
"private": true,
|
|
"type": "module",
|
|
"packageManager": "pnpm@11.16.0",
|
|
"engines": {
|
|
"node": ">=24 <25"
|
|
},
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@better-auth/drizzle-adapter": "^1.6.26",
|
|
"@js-temporal/polyfill": "^0.5.1",
|
|
"better-auth": "^1.6.26",
|
|
"drizzle-orm": "^0.45.2",
|
|
"next": "^16.3.0",
|
|
"nodemailer": "^9.0.5",
|
|
"pdfmake": "~0.3.11",
|
|
"pg": "^8.22.0",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"server-only": "^0.0.1",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4.3.3",
|
|
"@testcontainers/postgresql": "^12.1.0",
|
|
"@testing-library/jest-dom": "^7.0.0",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/node": "^24.13.3",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@types/pdfmake": "^0.3.3",
|
|
"@types/pg": "^8.21.0",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"@vitejs/plugin-react": "^6.0.5",
|
|
"drizzle-kit": "^0.31.10",
|
|
"eslint": "^9.39.5",
|
|
"eslint-config-next": "^16.3.0",
|
|
"jsdom": "^30.0.1",
|
|
"msw": "^2.15.0",
|
|
"pdfjs-dist": "^6.2.108",
|
|
"tailwindcss": "^4.3.3",
|
|
"testcontainers": "^12.1.0",
|
|
"tsx": "^4.23.11",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.1.10"
|
|
}
|
|
}
|