Updates method name from 'checkDependenciesAsync' to
'checkDependenciesOnStartup' to better reflect its purpose of
verifying dependencies during plugin startup.
Enhances code readability and maintainability.
Applies linting rules to the codebase and resolves identified issues.
Addresses:
- Renamed headings in settings tabs to improve UI consistency and style.
- Resolved require() style imports
- Added void operator to ensure correct promise handling.
- Replaced deprecated Obsidian API calls.
- Enforces sentence case to enhance UI text consistency.
- Replace all 'any' types with proper TypeScript types throughout codebase
- Fix processedResult parameters to use PreprocessingResult interface
- Update UI modal types: app parameter (App), pluginDefaults (obsidianTypstPDFExportSettings)
- Fix dropdown components to use DropdownComponent from Obsidian API
- Replace plugin 'any' types with obsidianTypstPDFExport throughout converters
- Fix margins parameter to use proper interface structure
- Update fs parameter to use proper Node.js fs module type
- Improve error handling with proper unknown type and type guards
- Remove unused PdfEmbedProcessor and clean up imports
Achieves complete type safety with zero remaining 'any' types across src/ directory.
Provides better IDE support, compile-time error detection, and maintainability.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move showDependencyStatus() and checkDependenciesAsync() from main.ts to DependencyChecker.ts as static methods
- Replace 31-line implementations with 12-line delegation calls in main.ts
- Add necessary imports (Notice, ExportErrorHandler) to DependencyChecker.ts
- Maintain same public API while improving separation of concerns
- Reduce main.ts from 280 to 253 lines (total 79% reduction from original 1233 lines)
This completes Step 1.10 of the refactoring plan, achieving clean delegation
of dependency management functionality while preserving backward compatibility.
Build verified: ✅ TypeScript compilation successful
- Add support for user-configured additionalPaths in dependency checking
- Implement comprehensive default system paths (home-relative and absolute)
- Update path resolution to handle both full paths and bare executable names
- Use 'which' command fallback with augmented PATH for executable discovery
- Ensure consistent path handling across sync and async dependency methods
This resolves issues where executables installed in common locations like
/opt/homebrew/bin were not found when executable path settings were empty.
The plugin now searches standard package manager installation directories
by default while respecting user-configured additional paths.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Specifies the types for data and close events in process handlers.
This improves code clarity and maintainability by ensuring that the
data received from stdout and stderr streams is treated as a Buffer,
and the close event receives a number or null for the exit code.
Replaces `child_process.exec` with `child_process.spawn` for both asynchronous and synchronous dependency checks.
This change mitigates potential command injection vulnerabilities by passing arguments separately, enhancing the security of the application.
Consolidates dependency checking logic into a dedicated `DependencyChecker` class.
This improves code organization and reusability.
It now uses a single method for checking all dependencies, both asynchronously (for displaying status) and synchronously (for startup checks).
It also augments the PATH environment variable to include common binary locations to improve detection.
The status modal now displays more detailed information about each dependency.