@@ -32,7 +32,7 @@ use crate::model::node::EdgeType;
3232use crate :: model:: package_json:: PackageJson ;
3333use crate :: resolver:: preload:: { PreloadConfig , preload_manifests} ;
3434use crate :: resolver:: registry:: { ResolveError , resolve_registry_dep} ;
35- use crate :: service:: ManifestProvider ;
35+ use crate :: service:: { ManifestProvider , ProjectCacheData } ;
3636use crate :: spec:: { Catalogs , PackageSpec , Protocol } ;
3737use crate :: traits:: progress:: { BuildEvent , EventReceiver , NoopReceiver } ;
3838use crate :: traits:: registry:: { RegistryClient , ResolvedPackage } ;
@@ -118,6 +118,8 @@ pub struct BuildDepsConfig {
118118 /// Catalog definitions for the `catalog:` dependency protocol.
119119 /// Key `""` = default catalog, other keys = named catalogs.
120120 pub catalogs : Catalogs ,
121+ /// Host-provided project cache used to seed resolver manifest state.
122+ pub warm_project_cache : Option < ProjectCacheData > ,
121123}
122124
123125impl Default for BuildDepsConfig {
@@ -130,6 +132,7 @@ impl Default for BuildDepsConfig {
130132 git_clone_cache : Arc :: new ( GitCloneCache :: new ( ) ) ,
131133 http_fetch_cache : Arc :: new ( HttpFetchCache :: new ( ) ) ,
132134 catalogs : HashMap :: new ( ) ,
135+ warm_project_cache : None ,
133136 }
134137 }
135138}
@@ -164,6 +167,12 @@ impl BuildDepsConfig {
164167 self . catalogs = catalogs;
165168 self
166169 }
170+
171+ /// Set the host-provided warm project cache.
172+ pub fn with_warm_project_cache ( mut self , warm_project_cache : Option < ProjectCacheData > ) -> Self {
173+ self . warm_project_cache = warm_project_cache;
174+ self
175+ }
167176}
168177
169178/// Snapshot of node dependency flags to avoid borrowing conflicts.
0 commit comments