0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 07:16:56 -05:00
denoland-deno/cli/npm/installer/common/mod.rs
David Sherret 9dbb99a83c
refactor: create NpmInstaller (#27626)
This separates npm resolution code from npm installation (more work
towards moving resolution code out of the CLI and cleaning up this
code).
2025-01-13 17:35:18 -05:00

18 lines
450 B
Rust

// Copyright 2018-2025 the Deno authors. MIT license.
use async_trait::async_trait;
use deno_error::JsErrorBox;
use super::PackageCaching;
pub mod bin_entries;
pub mod lifecycle_scripts;
/// Part of the resolution that interacts with the file system.
#[async_trait(?Send)]
pub trait NpmPackageFsInstaller: std::fmt::Debug + Send + Sync {
async fn cache_packages<'a>(
&self,
caching: PackageCaching<'a>,
) -> Result<(), JsErrorBox>;
}