mirror of
https://github.com/readest/readest.git
synced 2026-11-29 19:02:28 +00:00
* fix(build): make pnpm preview serve pages and rewrites again Two bugs took down the OpenNext/wrangler preview with Next 16.4: - Every page returned 500 with "Unexpected loadManifest(/.next/server/preview-props.json) call!". Next 16.4 reads a new server/preview-props.json, and @opennextjs/cloudflare 1.20.11 only copies `*-manifest.json` files into the worker. 1.20.13 copies this file too. - Rewritten URLs such as /reader/<id> returned 500 with "Error in routingHandler TypeError: (0 , import_path_to_regexp.parse) is not a function or its return value is not iterable". The workspace override forced every path-to-regexp to >=8.4.0, but @opennextjs/aws and wrangler are written for ^6.3.0, and v8's parse() returns an object instead of a token list. The override is now split by major version: v6 stays >=6.3.0 (no open advisories) and v8 stays >=8.4.0 (patched for GHSA-27v5-c462-wpq7 and GHSA-j3q9-mxjg-w52f). Verified: before the change, `pnpm preview` returned 500 on / and on /reader/<id>, with the errors above in the wrangler log. After the change, /, /library, /reader?ids=<id> and /reader/<id> all return 200, the reader page loads its chunk, and the log has neither error. pnpm test (1198 files, 14239 tests), pnpm lint and pnpm build-web pass. This is a dependency change, so it has no unit test. The Nix pnpmDeps.hash comes from the PR's fod-hashes check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(nix): refresh pnpmDeps.hash for the OpenNext and path-to-regexp lockfile change The value is the got: line from the PR's fod-hashes check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
289 lines
15 KiB
JSON
289 lines
15 KiB
JSON
{
|
|
"name": "@readest/readest-app",
|
|
"version": "0.12.16",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "dotenv -e .env.tauri -- next dev",
|
|
"build": "dotenv -e .env.tauri -- next build",
|
|
"start": "dotenv -e .env.tauri -- next start",
|
|
"dev-web": "dotenv -e .env.web -- next dev",
|
|
"build-web": "dotenv -e .env.web -- next build",
|
|
"start-web": "dotenv -e .env.web -- next start",
|
|
"dev-web:vinext": "dotenv -e .env.web -- vinext dev",
|
|
"build-web:vinext": "dotenv -e .env.web -- vinext build",
|
|
"start-web:vinext": "dotenv -e .env.web -- vinext start",
|
|
"build-tauri": "dotenv -e .env.tauri -- next build",
|
|
"build-browser-ext": "pnpm --filter @readest/send-to-readest-extension build",
|
|
"upload-sourcemaps": "node scripts/upload-sourcemaps.mjs",
|
|
"dev-android": "dotenv -v KEEP_SOURCEMAPS=1 -e .env.tauri -- tauri android build -t aarch64 -- --features devtools && adb install -r src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk",
|
|
"dev-ios": "dotenv -v KEEP_SOURCEMAPS=1 -e .env.tauri -- tauri ios build -- --features devtools && ideviceinstaller install src-tauri/gen/apple/build/arm64/Readest.ipa",
|
|
"dev-ios-sim": "rm -rf src-tauri/gen/apple/build/arm64-sim/Readest.app && dotenv -e .env.tauri -- tauri ios build --target aarch64-sim -- --features devtools && xcrun simctl install booted src-tauri/gen/apple/build/arm64-sim/Readest.app",
|
|
"dev-macos": "dotenv -v KEEP_SOURCEMAPS=1 -e .env.tauri -- tauri build --features devtools --bundles app && open ../../target/release/bundle/macos/Readest.app",
|
|
"i18n:extract": "i18next-scanner --config i18next-scanner.config.cjs",
|
|
"i18n:extract:ext": "pnpm --filter @readest/send-to-readest-extension i18n:extract",
|
|
"lint": "tsc --noEmit && biome lint .",
|
|
"lint:lua": "node ../readest.koplugin/scripts/lint-koplugin.mjs",
|
|
"test:lua": "node ../readest.koplugin/scripts/test-koplugin.mjs",
|
|
"test": "dotenv -e .env -e .env.test.local -- vitest",
|
|
"test:extension": "dotenv -e .env -e .env.test.local -- vitest extensions/send-to-readest/ --run",
|
|
"test:coverage": "dotenv -e .env -e .env.test.local -- vitest run --coverage",
|
|
"test:browser": "dotenv -e .env -e .env.test.local -- vitest run --config vitest.browser.config.mts",
|
|
"test:tauri": "bash scripts/test-tauri.sh",
|
|
"test:android": "bash scripts/test-android.sh",
|
|
"test:pr:web:unit": "dotenv -e .env -e .env.test.local -- vitest run --maxWorkers=4",
|
|
"test:pr:web": "pnpm test:pr:web:unit && pnpm test:browser && pnpm test:extension && pnpm build-browser-ext",
|
|
"test:pr:tauri": "bash scripts/test-tauri.sh",
|
|
"test:all": "pnpm test -- --watch=false && pnpm test:browser && bash scripts/test-tauri.sh",
|
|
"verify:nightly": "node scripts/nightly-verify-harness/serve.mjs",
|
|
"bench": "node --experimental-strip-types --no-warnings bench/index.ts",
|
|
"test:e2e": "wdio run wdio.conf.ts",
|
|
"test:e2e:web": "playwright test",
|
|
"test:e2e:web:headed": "playwright test --headed --workers=1 --trace on",
|
|
"test:e2e:web:ui": "playwright test --ui",
|
|
"test:e2e:web:report": "playwright show-report",
|
|
"tauri:dev:test": "dotenv -e .env.tauri -- tauri dev --features webdriver",
|
|
"tauri:build:test": "dotenv -e .env.tauri -- tauri build --debug --features webdriver",
|
|
"tauri": "node scripts/tauri.mjs",
|
|
"tauri:dev:cdp": "READEST_CDP_PORT=9222 node scripts/tauri.mjs dev",
|
|
"cdp": "node scripts/cdp.mjs",
|
|
"fmt:check": "cargo fmt -p Readest --check",
|
|
"clippy:check": "cargo clippy -p Readest --no-deps -- -D warnings",
|
|
"test:rust": "cargo test -p Readest --lib",
|
|
"format": "pnpm -w format",
|
|
"format:check": "pnpm -w format:check",
|
|
"prepare-vendor": "mkdirp ./public/vendor/pdfjs",
|
|
"copy-pdfjs-worker": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs\" ./public/vendor/pdfjs",
|
|
"copy-pdfjs-wasm": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/wasm/*\" ./public/vendor/pdfjs",
|
|
"copy-pdfjs-fonts": "cpx \"../../packages/foliate-js/node_modules/pdfjs-dist/{cmaps,standard_fonts}/*\" ./public/vendor/pdfjs",
|
|
"copy-flatten-pdfjs-annotation-layer-css": "npx postcss \"../../packages/foliate-js/vendor/pdfjs/annotation_layer_builder.css\" --no-map -u postcss-nested > ./public/vendor/pdfjs/annotation_layer_builder.css",
|
|
"copy-flatten-pdfjs-text-layer-css": "npx postcss \"../../packages/foliate-js/vendor/pdfjs/text_layer_builder.css\" --no-map -u postcss-nested > ./public/vendor/pdfjs/text_layer_builder.css",
|
|
"copy-flatten-pdfjs-css": "pnpm copy-flatten-pdfjs-annotation-layer-css && pnpm copy-flatten-pdfjs-text-layer-css",
|
|
"copy-pdfjs": "pnpm copy-pdfjs-worker && pnpm copy-pdfjs-wasm && pnpm copy-pdfjs-fonts && pnpm copy-flatten-pdfjs-css",
|
|
"setup-pdfjs": "pnpm prepare-vendor && pnpm copy-pdfjs",
|
|
"setup-vendors": "pnpm setup-pdfjs",
|
|
"build-win-x64": "dotenv -e .env.tauri.local -- tauri build --target i686-pc-windows-msvc --bundles nsis",
|
|
"build-win-arm64": "dotenv -e .env.tauri.local -- tauri build --target aarch64-pc-windows-msvc --bundles nsis",
|
|
"build-linux-x64": "dotenv -e .env.tauri.local -- pnpm tauri build --bundles appimage",
|
|
"build-macos-universial": "dotenv -e .env.tauri.local -e .env.apple-nonstore.local -- tauri build -t universal-apple-darwin --bundles dmg --config src-tauri/tauri.macos-nonestore.conf.json",
|
|
"build-macos-universial-appstore": "dotenv -e .env.tauri.local -e .env.apple-appstore.local -- tauri build -t universal-apple-darwin --bundles app --config src-tauri/tauri.appstore.conf.json",
|
|
"build-macos-universial-appstore-dev": "dotenv -e .env.tauri.local -e .env.apple-appstore-dev.local -- tauri build -t universal-apple-darwin --bundles app --config src-tauri/tauri.appstore-dev.conf.json",
|
|
"build-ios": "dotenv -e .env.ios-appstore-dev.local -- tauri ios build",
|
|
"build-ios-appstore": "dotenv -e .env.ios-appstore.local -- tauri ios build --export-method app-store-connect",
|
|
"release-macos-universial-appstore": "dotenv -e .env.tauri.local -e .env.apple-appstore.local -- bash scripts/release-mac-appstore.sh",
|
|
"release-ios-appstore": "dotenv -e .env.ios-appstore.local -- bash scripts/release-ios-appstore.sh",
|
|
"submit-appstore-ios": "dotenv -e .env.apple-appstore.local -- bash -c 'cd ../.. && fastlane release_ios'",
|
|
"submit-appstore-macos": "dotenv -e .env.apple-appstore.local -- bash -c 'cd ../.. && fastlane release_macos'",
|
|
"release-google-play": "dotenv -e .env.google-play.local -- bash scripts/release-google-play.sh",
|
|
"validate-google-play": "dotenv -e .env.google-play.local -- bash scripts/validate-google-play-listing.sh",
|
|
"config-wrangler": "sed -i \"s/\\${TRANSLATIONS_KV_ID}/$TRANSLATIONS_KV_ID/g\" wrangler.toml",
|
|
"preview": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && opennextjs-cloudflare preview --ip 0.0.0.0 --port 3001",
|
|
"strip-web-sourcemaps": "find .open-next/assets -name '*.js.map' -type f -delete",
|
|
"deploy": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && pnpm strip-web-sourcemaps && opennextjs-cloudflare deploy --minify",
|
|
"upload": "pnpm patch-build-webpack && NEXT_PUBLIC_APP_PLATFORM=web opennextjs-cloudflare build && pnpm restore-build-original && opennextjs-cloudflare upload",
|
|
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts",
|
|
"patch-build-webpack": "if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's/next build\"/next build --webpack\"/' package.json; else sed -i 's/next build\"/next build --webpack\"/' package.json; fi",
|
|
"restore-build-original": "if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's/next build --webpack\"/next build\"/' package.json; else sed -i 's/next build --webpack\"/next build\"/' package.json; fi",
|
|
"update-metadata": "bash ./scripts/sync-release-notes.sh release-notes.json ../../data/metainfo/appdata.xml",
|
|
"wordlens:manifest": "node scripts/build-wordlens-data.mjs manifest",
|
|
"wordlens:preview": "node scripts/preview-wordlens.mjs",
|
|
"wordlens:sync": "node scripts/sync-wordlens-r2.mjs",
|
|
"dictionary:yomitan:convert": "tsx scripts/convert-yomitan-dictionary.ts",
|
|
"check:optional-chaining": "count=$(grep -rno '\\?\\.[a-zA-Z_$]' .next/static/chunks/* out/_next/static/chunks/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Optional chaining found in output!'; exit 1; else echo '✅ No optional chaining found.'; fi",
|
|
"check:translations": "count=$(grep -rno '__STRING_NOT_TRANSLATED__' public/locales/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Untranslated strings found!'; exit 1; else echo '✅ All strings translated.'; fi",
|
|
"check:lookbehind-regex": "count=$(grep -rnoE '\\(\\?<[!=]' .next/static/chunks/* out/_next/static/chunks/* | wc -l); if [ \"$count\" -gt 0 ]; then echo '❌ Lookbehind regex found in output!'; exit 1; else echo '✅ No lookbehind regex found.'; fi",
|
|
"check:all": "pnpm check:translations && pnpm check:lookbehind-regex",
|
|
"build-check": "pnpm build && pnpm build-web && pnpm check:all",
|
|
"worktree:new": "pnpm exec tsx scripts/worktree-new.ts",
|
|
"worktree:rm": "pnpm exec tsx scripts/worktree-rm.ts"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/openai-compatible": "^2.0.81",
|
|
"@ai-sdk/react": "^3.0.302",
|
|
"@assistant-ui/react": "0.11.58",
|
|
"@assistant-ui/react-ai-sdk": "1.2.0",
|
|
"@assistant-ui/react-markdown": "0.11.9",
|
|
"@aws-sdk/client-s3": "^3.1000.0",
|
|
"@aws-sdk/s3-request-presigner": "^3.1000.0",
|
|
"@choochmeque/tauri-plugin-sharekit-api": "^0.3.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@emnapi/core": "^1.8.1",
|
|
"@emnapi/runtime": "^1.8.1",
|
|
"@fabianlars/tauri-plugin-oauth": "2",
|
|
"@googleapis/androidpublisher": "^36.0.0",
|
|
"@mozilla/readability": "^0.6.0",
|
|
"@napi-rs/wasm-runtime": "^1.1.1",
|
|
"@noble/hashes": "^1.8.0",
|
|
"@opennextjs/cloudflare": "^1.20.13",
|
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@readest/turso-database-common": "0.7.0-pre.3-readest.0",
|
|
"@readest/turso-database-wasm": "0.7.0-pre.3-readest.0",
|
|
"@readest/turso-database-wasm-common": "0.7.0-pre.3-readest.0",
|
|
"@serwist/next": "^9.5.6",
|
|
"@serwist/webpack-plugin": "^9.5.6",
|
|
"@stripe/react-stripe-js": "^6.2.0",
|
|
"@stripe/stripe-js": "^9.3.1",
|
|
"@supabase/auth-ui-react": "^0.4.7",
|
|
"@supabase/auth-ui-shared": "^0.1.8",
|
|
"@supabase/supabase-js": "^2.76.1",
|
|
"@tauri-apps/api": "2.11.1",
|
|
"@tauri-apps/plugin-biometric": "^2.3.3",
|
|
"@tauri-apps/plugin-cli": "^2.4.1",
|
|
"@tauri-apps/plugin-clipboard-manager": "^2.3.3",
|
|
"@tauri-apps/plugin-deep-link": "^2.4.10",
|
|
"@tauri-apps/plugin-dialog": "^2.7.3",
|
|
"@tauri-apps/plugin-fs": "^2.5.2",
|
|
"@tauri-apps/plugin-haptics": "^2.3.3",
|
|
"@tauri-apps/plugin-http": "^2.6.0",
|
|
"@tauri-apps/plugin-log": "^2.9.1",
|
|
"@tauri-apps/plugin-opener": "^2.5.5",
|
|
"@tauri-apps/plugin-os": "^2.3.2",
|
|
"@tauri-apps/plugin-process": "^2.3.1",
|
|
"@tauri-apps/plugin-shell": "~2.3.6",
|
|
"@tauri-apps/plugin-updater": "^2.11.0",
|
|
"@tauri-apps/plugin-websocket": "~2.4.3",
|
|
"@tybys/wasm-util": "^0.10.1",
|
|
"@zip.js/zip.js": "^2.8.16",
|
|
"abortcontroller-polyfill": "^1.7.8",
|
|
"ai": "^6.0.299",
|
|
"ai-sdk-ollama": "^3.2.0",
|
|
"app-store-server-api": "^0.17.1",
|
|
"aws4fetch": "^1.0.20",
|
|
"buffer": "^6.0.3",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"cors": "^2.8.5",
|
|
"dayjs": "^1.11.13",
|
|
"dompurify": "^3.4.16",
|
|
"fflate": "^0.8.3",
|
|
"foliate-js": "workspace:*",
|
|
"franc-min": "^6.2.0",
|
|
"fzf": "^0.5.2",
|
|
"google-auth-library": "^10.5.0",
|
|
"highlight.js": "^11.11.1",
|
|
"i18next": "^24.2.0",
|
|
"i18next-browser-languagedetector": "^8.0.2",
|
|
"i18next-http-backend": "^4.0.2",
|
|
"iso-639-2": "^3.0.2",
|
|
"iso-639-3": "^3.0.1",
|
|
"isomorphic-ws": "^5.0.0",
|
|
"jieba-wasm": "^2.4.0",
|
|
"js-md5": "^0.8.3",
|
|
"jwt-decode": "^4.0.0",
|
|
"katex": "^0.18.11",
|
|
"lucide-react": "^0.562.0",
|
|
"lunr": "^2.3.9",
|
|
"mammoth": "^1.12.0",
|
|
"marked": "^15.0.12",
|
|
"marked-footnote": "^1.4.0",
|
|
"marked-katex-extension": "^5.1.13",
|
|
"music-metadata": "12.1.0",
|
|
"nanoid": "^5.1.6",
|
|
"next": "16.4.2",
|
|
"nunjucks": "^3.2.4",
|
|
"overlayscrollbars": "^2.11.4",
|
|
"overlayscrollbars-react": "^0.5.6",
|
|
"posthog-js": "^1.246.0",
|
|
"react": "19.2.8",
|
|
"react-colorful": "^5.8.0",
|
|
"react-dom": "19.2.8",
|
|
"react-i18next": "^15.2.0",
|
|
"react-icons": "^5.4.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-responsive": "^10.0.0",
|
|
"react-virtuoso": "^4.17.0",
|
|
"react-window": "^1.8.11",
|
|
"remark-gfm": "^4.0.1",
|
|
"semver": "^7.7.1",
|
|
"streamdown": "^1.6.10",
|
|
"stripe": "^22.0.2",
|
|
"styled-jsx": "^5.1.7",
|
|
"tailwind-merge": "^3.4.0",
|
|
"tauri-plugin-device-info-api": "^1.0.1",
|
|
"tinycolor2": "^1.6.0",
|
|
"uqr": "^0.1.3",
|
|
"uuid": "^14.0.0",
|
|
"virtua": "^0.49.1",
|
|
"ws": "^8.18.3",
|
|
"zod": "^4.0.8",
|
|
"zustand": "5.0.10"
|
|
},
|
|
"devDependencies": {
|
|
"@next/bundle-analyzer": "^15.4.2",
|
|
"@playwright/test": "^1.60.0",
|
|
"@sentry/cli": "^2.39.1",
|
|
"@tailwindcss/postcss": "^4.3.3",
|
|
"@tailwindcss/typography": "^0.5.20",
|
|
"@tauri-apps/cli": "2.11.4",
|
|
"@testing-library/dom": "^10.4.0",
|
|
"@testing-library/react": "^16.3.0",
|
|
"@tursodatabase/database": "0.6.0-pre.28",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/cssbeautify": "^0.3.5",
|
|
"@types/lunr": "^2.3.7",
|
|
"@types/mocha": "^10.0.10",
|
|
"@types/node": "^22.15.31",
|
|
"@types/nunjucks": "^3.2.6",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-color": "^3.0.13",
|
|
"@types/react-dom": "^19.0.0",
|
|
"@types/react-window": "^1.8.8",
|
|
"@types/semver": "^7.7.0",
|
|
"@types/tinycolor2": "^1.4.6",
|
|
"@types/uuid": "^10.0.0",
|
|
"@types/ws": "^8.18.1",
|
|
"@vitejs/plugin-react": "^5.1.1",
|
|
"@vitejs/plugin-rsc": "^0.5.23",
|
|
"@vitest/browser-playwright": "^4.1.12",
|
|
"@vitest/browser-webdriverio": "^4.1.11",
|
|
"@vitest/coverage-v8": "^4.1.12",
|
|
"@wdio/cli": "^9.25.0",
|
|
"@wdio/globals": "^9.23.0",
|
|
"@wdio/local-runner": "^9.24.0",
|
|
"@wdio/mocha-framework": "^9.24.0",
|
|
"@wdio/spec-reporter": "^9.24.0",
|
|
"@wdio/types": "^9.24.0",
|
|
"caniuse-lite": "^1.0.30001746",
|
|
"cpx2": "^8.0.0",
|
|
"daisyui": "^5.7.22",
|
|
"dotenv-cli": "^7.4.4",
|
|
"fast-check": "^4.8.0",
|
|
"i18next-scanner": "^4.6.0",
|
|
"jsdom": "^28.1.0",
|
|
"mkdirp": "^3.0.1",
|
|
"node-env-run": "^4.0.2",
|
|
"playwright": "^1.58.2",
|
|
"postcss": "^8.4.49",
|
|
"postcss-cli": "^11.0.0",
|
|
"postcss-nested": "^7.0.2",
|
|
"raw-loader": "^4.0.2",
|
|
"react-server-dom-webpack": "^19.2.8",
|
|
"serwist": "^9.3.0",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsx": "4.21.0",
|
|
"typescript": "^7.0.2",
|
|
"vinext": "^0.0.21",
|
|
"vite": "^7.3.7",
|
|
"vite-tsconfig-paths": "^5.1.4",
|
|
"vitest": "^4.1.12",
|
|
"wrangler": "^4.85.0"
|
|
},
|
|
"browserslist": [
|
|
"chrome 92",
|
|
"edge 92",
|
|
"firefox 92",
|
|
"safari 15.2"
|
|
]
|
|
}
|