pub struct RuntimeDetector { /* private fields */ }Expand description
Runtime detector for JavaScript/TypeScript projects
Implementations§
Source§impl RuntimeDetector
impl RuntimeDetector
pub fn new(project_path: PathBuf) -> Self
Sourcepub fn detect_js_runtime_and_package_manager(&self) -> RuntimeDetectionResult
pub fn detect_js_runtime_and_package_manager(&self) -> RuntimeDetectionResult
Detect JavaScript runtime and package manager for the project
Sourcepub fn detect_all_package_managers(&self) -> Vec<PackageManager>
pub fn detect_all_package_managers(&self) -> Vec<PackageManager>
Detect all available package managers in the project
Sourcepub fn is_bun_project(&self) -> bool
pub fn is_bun_project(&self) -> bool
Check if this is likely a Bun project
Sourcepub fn is_js_project(&self) -> bool
pub fn is_js_project(&self) -> bool
Check if this is a JavaScript/TypeScript project
Sourcepub fn get_audit_commands(&self) -> Vec<String>
pub fn get_audit_commands(&self) -> Vec<String>
Get recommended audit commands for the project
Sourcepub fn get_detection_summary(&self) -> String
pub fn get_detection_summary(&self) -> String
Get a human-readable summary of the detection
Auto Trait Implementations§
impl Freeze for RuntimeDetector
impl RefUnwindSafe for RuntimeDetector
impl Send for RuntimeDetector
impl Sync for RuntimeDetector
impl Unpin for RuntimeDetector
impl UnwindSafe for RuntimeDetector
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more