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:
3 files changed
+195
-88
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user