feat: implement pandoc-typst conversion pipeline (task 5)

Implements core conversion logic from processed markdown to PDF via Pandoc
and Typst. Creates a robust pipeline with proper error handling, progress
tracking, and cleanup mechanisms.

Key features:
- PandocTypstConverter class with child_process.spawn for execution
- Comprehensive argument building for templates, variables, and options
- Temporary file management with automatic cleanup
- Timeout handling for large document processing
- Progress tracking and error message extraction
- Support for both direct PDF and intermediate .typ file generation

Technical details:
- Uses spawn instead of exec for better control and streaming
- Implements proper cleanup handlers for process termination
- Supports Pandoc 3.x API with --pdf-engine=typst
- Cross-platform compatible with proper path handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-08-29 22:34:36 +02:00
1 parent 6e1b8f38ad
commit c31550920d
2 files changed
+352 -3

No files matched your search

+3 -3
View File
@@ -278,7 +278,7 @@
3,
4
],
"status": "pending",
"status": "done",
"subtasks": [
{
"id": 1,
@@ -286,7 +286,7 @@
"description": "Design and implement the core PandocTypstConverter class with TypeScript interfaces and basic constructor",
"dependencies": [],
"details": "Create a new TypeScript class PandocTypstConverter with proper interface definitions for conversion options, template settings, and output configurations. Define types for PandocOptions, TypstSettings, and ConversionResult. Set up the class constructor to accept configuration parameters. Create proper import statements and exports following the existing codebase patterns from main.ts.",
"status": "pending",
"status": "done",
"testStrategy": "Verify class instantiation with various configuration options. Test TypeScript compilation without errors."
},
{
@@ -675,7 +675,7 @@
],
"metadata": {
"created": "2025-08-29T14:23:07.961Z",
"updated": "2025-08-29T15:52:29.601Z",
"updated": "2025-08-29T20:31:05.316Z",
"description": "Tasks for master context"
}
}