@@ -810,9 +810,11 @@ private string FindAllFromTypeEndPoint(bool includePrerelease, bool isSearchingM
810
810
_cmdletPassedIn . WriteDebug ( "In V2ServerAPICalls::FindAllFromTypeEndPoint()" ) ;
811
811
string typeEndpoint = _isPSGalleryRepo && ! isSearchingModule ? "/items/psscript" : String . Empty ;
812
812
string paginationParam = $ "&$orderby=Id desc&$inlinecount=allpages&$skip={ skip } &$top=6000";
813
+ // JFrog/Artifactory requires an empty search term to enumerate all packages in the feed
814
+ string searchTerm = _isJFrogRepo ? "&searchTerm=''" : "" ;
813
815
var prereleaseFilter = includePrerelease ? "IsAbsoluteLatestVersion&includePrerelease=true" : "IsLatestVersion" ;
814
816
815
- var requestUrlV2 = $ "{ Repository . Uri } { typeEndpoint } /Search()?$filter={ prereleaseFilter } { paginationParam } ";
817
+ var requestUrlV2 = $ "{ Repository . Uri } { typeEndpoint } /Search()?$filter={ prereleaseFilter } { searchTerm } { paginationParam } ";
816
818
return HttpRequestCall ( requestUrlV2 , out errRecord ) ;
817
819
}
818
820
@@ -830,6 +832,8 @@ private string FindTagFromEndpoint(string[] tags, bool includePrerelease, bool i
830
832
// type: Command -> just search Modules
831
833
string typeEndpoint = _isPSGalleryRepo && ! isSearchingModule ? "/items/psscript" : String . Empty ;
832
834
string paginationParam = $ "&$orderby=Id desc&$inlinecount=allpages&$skip={ skip } &$top=6000";
835
+ // JFrog/Artifactory requires an empty search term to enumerate all packages in the feed
836
+ string searchTerm = _isJFrogRepo ? "&searchTerm=''" : "" ;
833
837
var prereleaseFilter = includePrerelease ? "includePrerelease=true&$filter=IsAbsoluteLatestVersion" : "$filter=IsLatestVersion" ;
834
838
string typeFilterPart = isSearchingModule ? $ " and substringof('PSModule', Tags) eq true" : $ " and substringof('PSScript', Tags) eq true";
835
839
@@ -839,7 +843,7 @@ private string FindTagFromEndpoint(string[] tags, bool includePrerelease, bool i
839
843
tagFilterPart += $ " and substringof('{ tag } ', Tags) eq true";
840
844
}
841
845
842
- var requestUrlV2 = $ "{ Repository . Uri } { typeEndpoint } /Search()?{ prereleaseFilter } { typeFilterPart } { tagFilterPart } { paginationParam } ";
846
+ var requestUrlV2 = $ "{ Repository . Uri } { typeEndpoint } /Search()?{ prereleaseFilter } { searchTerm } { typeFilterPart } { tagFilterPart } { paginationParam } ";
843
847
844
848
return HttpRequestCall ( requestUrlV2 : requestUrlV2 , out errRecord ) ;
845
849
}
0 commit comments