Files
solon/package.json
T
CatoandClaude 03db0e515b PDFs: read fax- and JBIG2-compressed scans (#419)
unpdf's bundled PDF.js ships without PDF.js's WebAssembly decoders, so a
page scanned as CCITT fax or JBIG2 (most commune scans; in PDF.js 6 both go
through the JBIG2 module) drew blank: "JBig2 failed to initialize", then
"no text in the PDF". Three of Balzers' regulations failed this way.

One module opens every PDF (src/lib/law/text/pdf.ts): unpdf on the
official PDF.js build (pdfjs-dist 6.4.299, already in the lockfile through
chatkit, now a direct dependency) with wasmUrl pointing at its decoders.
The cantonal reader, the OCR and Liechtenstein's systematic register use it.
Measured: Balzers' failing scans render with content (0.1-1 MB a page, from
a 23 KB blank). A regression test renders a one-page CCITT scan.


Claude-Session: https://claude.ai/code/session_019MDtmsWmge2YFXGRyA2au4

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 09:05:09 +01:00

105 lines
3.4 KiB
JSON

{
"name": "solon",
"version": "0.1.0",
"packageManager": "pnpm@11.25.0",
"engines": {
"node": ">=20"
},
"private": true,
"license": "MIT",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"design:check": "node scripts/design-system-check.js",
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run design:check && pnpm run check:places-literals && pnpm run test",
"test": "vitest run",
"test:e2e": "playwright test",
"test:puppeteer": "BASE_URL=${BASE_URL:-http://localhost:3000} node tests/puppeteer/smoke.mjs",
"test:puppeteer:mega": "BASE_URL=${BASE_URL:-http://localhost:3000} node tests/puppeteer/mega-menu.mjs",
"format": "prettier --write .",
"format:check": "prettier --check .",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"check:vendored-drift": "node scripts/check-vendored-drift.mjs",
"places:sync-config": "tsx scripts/places-sync-config.ts",
"places:import": "tsx scripts/places-import.ts",
"places:import-files": "tsx scripts/places-import-files.ts",
"places:fetch": "tsx scripts/places-fetch.ts",
"law:register": "tsx scripts/law-register.ts",
"law:text": "tsx scripts/law-text.ts",
"check:places-literals": "node --import tsx scripts/check-places-no-literals.ts",
"check:law-search": "tsx scripts/check-law-search.ts"
},
"dependencies": {
"@better-auth/passkey": "^1.7.14",
"@bitbaum/accountkit": "^0.27.0",
"@bitbaum/ai-kit": "^1.24.0",
"@bitbaum/chatkit": "^0.22.1",
"@bitbaum/geo-kit": "^0.3.0",
"@bitbaum/mail-kit": "0.2.0",
"@bitbaum/searchkit": "^0.2.3",
"@fleet/design-tokens": "npm:@bitbaum/design-tokens@^1.5.2",
"@modelcontextprotocol/sdk": "^1.32.2",
"@napi-rs/canvas": "^1.1.0",
"@noble/hashes": "2.4.0",
"@noble/secp256k1": "3.2.0",
"@scure/base": "^2.4.0",
"better-auth": "^1.7.14",
"bip-kit": "^0.6.1",
"bs58check": "^4.0.0",
"clsx": "2.1.1",
"d3-geo": "3.1.1",
"diff": "^8.0.4",
"drizzle-orm": "^0.45.4",
"fflate": "^0.8.3",
"lucide-react": "1.65.0",
"next": "16.4.3",
"next-intl": "^4.14.9",
"pdfjs-dist": "6.4.299",
"pg": "^8.23.1",
"proj4": "2.22.0",
"react": "19.3.1",
"react-dom": "19.3.1",
"tailwindcss": "4.3.3",
"tesseract.js": "^7.0.0",
"topojson-client": "3.1.0",
"topojson-server": "3.0.1",
"topojson-simplify": "3.0.3",
"unpdf": "^1.9.1",
"us-atlas": "^3.0.1",
"world-atlas": "^2.0.2",
"zod": "^4.6.7"
},
"devDependencies": {
"@electric-sql/pglite": "^0.5.13",
"@playwright/test": "1.64.1",
"@tailwindcss/postcss": "4.3.3",
"@types/d3-geo": "^3.1.1",
"@types/geojson": "^7946.0.16",
"@types/node": "26.6.6",
"@types/pg": "^8.23.1",
"@types/proj4": "^2.19.0",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@types/topojson-client": "^3.1.5",
"@types/topojson-server": "^3.0.4",
"@types/topojson-simplify": "^3.0.3",
"@types/topojson-specification": "^1.0.5",
"drizzle-kit": "^0.31.11",
"eslint": "10.14.0",
"eslint-config-next": "16.4.3",
"espree": "^11.2.0",
"postcss": "8.5.32",
"prettier": "3.9.10",
"puppeteer": "25.16.0",
"ts-node": "10.9.2",
"tsx": "^4.23.15",
"typescript": "^6.0.3",
"vitest": "^5.0.5"
}
}