diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-09-09 21:57:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 15:57:39 -0400 |
commit | f92bd986de7f083ac164c0e3a2b04d3504c29741 (patch) | |
tree | dbd0a3484014da69ab8258c5f8e86616574741af /cli/npm/mod.rs | |
parent | 3bce2af0ebc997278519f5d6270915bb3fe8fd56 (diff) |
feat: download progress bar (#15814)
Diffstat (limited to 'cli/npm/mod.rs')
-rw-r--r-- | cli/npm/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index d0a57c5bc..2dd871cff 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -31,6 +31,7 @@ use resolution::NpmResolution; use crate::deno_dir::DenoDir; use crate::file_fetcher::CacheSetting; +use crate::progress_bar::ProgressBar; use self::cache::ReadonlyNpmCache; use self::resolution::NpmResolutionSnapshot; @@ -87,13 +88,15 @@ impl GlobalNpmPackageResolver { cache_setting: CacheSetting, unstable: bool, no_npm: bool, + progress_bar: ProgressBar, ) -> Self { Self::from_cache( - NpmCache::from_deno_dir(dir, cache_setting.clone()), + NpmCache::from_deno_dir(dir, cache_setting.clone(), progress_bar.clone()), reload, cache_setting, unstable, no_npm, + progress_bar, ) } @@ -103,8 +106,10 @@ impl GlobalNpmPackageResolver { cache_setting: CacheSetting, unstable: bool, no_npm: bool, + progress_bar: ProgressBar, ) -> Self { - let api = NpmRegistryApi::new(cache.clone(), reload, cache_setting); + let api = + NpmRegistryApi::new(cache.clone(), reload, cache_setting, progress_bar); let registry_url = api.base_url().to_owned(); let resolution = Arc::new(NpmResolution::new(api)); |