PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

[Performance improvements for find/install] Refactor Find to use IRepositorySearch

Open SydneyhSmith opened this issue 3 years ago • 0 comments

Summary of the new feature / enhancement

  • Find is inconsistently used, and server APIs sometimes called directly for same purpose. This makes it impossible to add a simple client side cache to cover cases: Find-PSResource -Name Az* -Repository PSGallery -SkipPublishersCheck:$false
  • Need to have clean serach interface that covers all search scenarios:
  • IRepositorySearch
  • Find(repositoryName, string packageName) -> Find latest version single pkg (no wild card)
  • Find(repositoryName, string[] packageName) -> Find latest version of multiple pkg names (wildcard supported)
  • Find(repositoryName, string packageName, version) -> Find single pkg with version (no wild card)
  • Find(repositoryName, string[] packageName, version) -> Find multiple pkg names with version (wildcard supported)
  • FindAll() ->
  • IRepositoryPackage
  • GetPackage(repositoryName, string packageName)
  • GetPackage(repositoryName, string[] packageName)
  • GetPackage(repositoryName, string[] package, version)
  • Dependency search does not use Find method, but calls nuget search APIs directly.

Proposed technical implementation details (optional)

No response

SydneyhSmith avatar May 24 '22 17:05 SydneyhSmith