Refactors dependency checking into a class

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.
This commit is contained in:
AlexKucera committed 2025-09-03 19:35:07 +02:00
1 parent 5fc8e348f4
commit d0b096368f
3 files changed
+195 -88

No files matched your search

+24
View File
@@ -37,4 +37,28 @@ export const EXPORT_CONSTANTS = {
SHORT: 5000,
LONG: 12000
}
} as const;
/**
* Dependency checking constants and utilities
*/
export const DEPENDENCY_CONSTANTS = {
/**
* Default executable names for dependencies
*/
DEFAULT_EXECUTABLES: {
pandoc: 'pandoc',
typst: 'typst',
imagemagick: 'convert'
},
/**
* Common paths to augment PATH with
*/
COMMON_PATHS: [
'/.local/bin',
'/.cargo/bin',
'/usr/local/bin',
'/opt/homebrew/bin'
]
} as const;