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