Files
nextcloud-mcp-server/third_party/astrolabe/package.json
Chris Coutinho d5544a7731 refactor(astrolabe): replace client-side PDF.js with server-side PyMuPDF rendering
Replace the client-side PDF.js viewer with server-side rendering using PyMuPDF.
This avoids CSP worker restrictions and ES private field access issues that
affected Chromium browsers.

Changes:
- Add /api/v1/pdf-preview endpoint to MCP server (management.py)
- Add pdf-preview route and controller action in Astrolabe PHP backend
- Refactor PDFViewer.vue to display server-rendered PNG images
- Remove pdfjs-dist dependency and client-side PDF loading code
- Use @nextcloud/axios for CSRF token handling in PDFViewer

The server downloads the PDF via WebDAV, renders the requested page with
PyMuPDF at the specified scale, and returns a base64-encoded PNG image.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:04:57 +01:00

42 lines
1.1 KiB
JSON

{
"name": "astrolabe",
"version": "0.8.3",
"license": "AGPL-3.0-or-later",
"engines": {
"node": "^22.0.0",
"npm": "^10.5.0"
},
"scripts": {
"build": "vite build",
"dev": "vite --mode development build",
"watch": "vite --mode development build --watch",
"lint": "eslint src",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css"
},
"type": "module",
"browserslist": [
"extends @nextcloud/browserslist-config"
],
"dependencies": {
"@nextcloud/axios": "^2.5.1",
"@nextcloud/dialogs": "^7.2.0",
"@nextcloud/initial-state": "^3.0.0",
"@nextcloud/l10n": "^3.1.0",
"@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^9.3.3",
"markdown-it": "^14.1.0",
"plotly.js-dist-min": "^3.0.0",
"vue": "^3.0.0",
"vue-material-design-icons": "^5.3.1"
},
"devDependencies": {
"@nextcloud/browserslist-config": "3.1.2",
"@nextcloud/eslint-config": "8.4.2",
"@nextcloud/stylelint-config": "3.1.1",
"@vitejs/plugin-vue": "^6.0.3",
"sass-embedded": "^1.97.1",
"terser": "5.44.1",
"vite": "7.2.7"
}
}