@@ -9,10 +9,11 @@ import { canceled, getErrorMessage, isPromiseCanceledError } from 'vs/base/commo
9
9
import { getOrDefault } from 'vs/base/common/objects' ;
10
10
import { IPager } from 'vs/base/common/paging' ;
11
11
import { isWeb } from 'vs/base/common/platform' ;
12
+ import { equalsIgnoreCase } from 'vs/base/common/strings' ;
12
13
import { URI } from 'vs/base/common/uri' ;
13
14
import { IHeaders , IRequestContext , IRequestOptions } from 'vs/base/parts/request/common/request' ;
14
15
import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
15
- import { arePlatformsValid , CURRENT_TARGET_PLATFORM , DefaultIconPath , IExtensionGalleryService , IExtensionIdentifier , IExtensionIdentifierWithVersion , IGalleryExtension , IGalleryExtensionAsset , IGalleryExtensionAssets , IGalleryExtensionVersion , InstallOperation , IQueryOptions , IReportedExtension , isIExtensionIdentifier , ITranslation , SortBy , SortOrder , StatisticType , TargetPlatform , WEB_EXTENSION_TAG } from 'vs/platform/extensionManagement/common/extensionManagement' ;
16
+ import { arePlatformsValid , CURRENT_TARGET_PLATFORM , DefaultIconPath , IExtensionGalleryService , IExtensionIdentifier , IExtensionIdentifierWithVersion , IGalleryExtension , IGalleryExtensionAsset , IGalleryExtensionAssets , IGalleryExtensionVersion , InstallOperation , IQueryOptions , IReportedExtension , isIExtensionIdentifier , ITranslation , SortBy , SortOrder , StatisticType , TargetPlatform , toTargetPlatform , WEB_EXTENSION_TAG } from 'vs/platform/extensionManagement/common/extensionManagement' ;
16
17
import { adoptToGalleryExtensionId , areSameExtensions , getGalleryExtensionId , getGalleryExtensionTelemetryData } from 'vs/platform/extensionManagement/common/extensionManagementUtil' ;
17
18
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions' ;
18
19
import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator' ;
@@ -42,7 +43,7 @@ interface IRawGalleryExtensionVersion {
42
43
readonly fallbackAssetUri : string ;
43
44
readonly files : IRawGalleryExtensionFile [ ] ;
44
45
readonly properties ?: IRawGalleryExtensionProperty [ ] ;
45
- readonly targetPlatform ?: TargetPlatform ;
46
+ readonly targetPlatform ?: string ;
46
47
}
47
48
48
49
interface IRawGalleryExtensionStatistics {
@@ -324,7 +325,7 @@ function getIsPreview(flags: string): boolean {
324
325
}
325
326
326
327
function getTargetPlatforms ( version : IRawGalleryExtensionVersion ) : TargetPlatform [ ] {
327
- return version . targetPlatform ? [ version . targetPlatform ] : [ ...ANY_TARGET_PLATFORMS ] ;
328
+ return version . targetPlatform && ! equalsIgnoreCase ( version . targetPlatform , 'universal' ) ? [ toTargetPlatform ( version . targetPlatform ) ] : [ ...ANY_TARGET_PLATFORMS ] ;
328
329
}
329
330
330
331
function toExtension ( galleryExtension : IRawGalleryExtension , version : IRawGalleryExtensionVersion , index : number , query : Query , querySource ?: string ) : IGalleryExtension {
0 commit comments