fix: ENOENT download error for archive-only converters (PDFMathTranslate/MinerU)

- Add existsSync checks in download.tsx before file access
- Fix normalizeFiletype.ts: md-t/md-i return original format (not tar.gz)
- Add outputMode: 'archive' support in main.ts with auto .tar suffix
- PDFMathTranslate outputs translated-<lang>.pdf + bilingual-<lang>.pdf (no original)
- MinerU outputs complete folder in .tar with logging
- Hide preview icon for .tar files in results.tsx
- Update Bun version: 1.2.2 -> 1.3.6
- Add Step 19: auto-deploy to remote server after Docker push

All 159 tests pass.
This commit is contained in:
Your Name 2026-01-22 00:47:37 +08:00
parent 1f800c3619
commit 912546aaa7
10 changed files with 190 additions and 63 deletions

View file

@ -31,10 +31,11 @@ export const normalizeOutputFiletype = (filetype: string): string => {
case "markdown_mmd":
case "markdown":
return "md";
// MinerU output formats - output as tar.gz
// MinerU output formats - 保持原始格式名稱(.tar 由 main.ts 自動添加)
// 因為 MinerU 是 archive-only 引擎outputMode: "archive"
case "md-t":
case "md-i":
return "tar.gz";
return lowercaseFiletype;
default:
return lowercaseFiletype;
}