pub struct ProjectDetector { /* private fields */ }Expand description
Detects package.json files in a project, including workspace members
Implementations§
Source§impl ProjectDetector
impl ProjectDetector
pub fn new(project_path: PathBuf) -> Self
Sourcepub fn detect(&self) -> Result<Vec<DetectedFile>>
pub fn detect(&self) -> Result<Vec<DetectedFile>>
Detect all package.json files in the project
Sourcepub fn detect_lockfile(&self) -> Option<LockfileType>
pub fn detect_lockfile(&self) -> Option<LockfileType>
Check if a lock file exists and return which type
pub fn lockfile_path(&self, lockfile_type: LockfileType) -> PathBuf
Auto Trait Implementations§
impl Freeze for ProjectDetector
impl RefUnwindSafe for ProjectDetector
impl Send for ProjectDetector
impl Sync for ProjectDetector
impl Unpin for ProjectDetector
impl UnsafeUnpin for ProjectDetector
impl UnwindSafe for ProjectDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more