File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,18 @@ import { ExtensionQueryFilterType, ExtensionQueryFlags } from 'azure-devops-node
3
3
import { tableView , wordTrim } from './viewutils' ;
4
4
5
5
const pageSize = 100 ;
6
+ const installationTarget = 'Microsoft.VisualStudio.Code' ;
7
+ const excludeFlags = '37888' ; //Value to exclude un-published, locked or hidden extensions
6
8
7
9
export async function search ( searchText : string , json : boolean = false ) : Promise < any > {
8
10
const api = getPublicGalleryAPI ( ) ;
9
11
const results = await api . extensionQuery ( {
10
12
pageSize,
11
- criteria : [ { filterType : ExtensionQueryFilterType . SearchText , value : searchText } ] ,
13
+ criteria : [
14
+ { filterType : ExtensionQueryFilterType . SearchText , value : searchText } ,
15
+ { filterType : ExtensionQueryFilterType . InstallationTarget , value : installationTarget } ,
16
+ { filterType : ExtensionQueryFilterType . ExcludeWithFlags , value : excludeFlags } ,
17
+ ] ,
12
18
flags : [ ExtensionQueryFlags . ExcludeNonValidated , ExtensionQueryFlags . IncludeLatestVersionOnly ] ,
13
19
} ) ;
14
20
You can’t perform that action at this time.
0 commit comments