@codingame/monaco-vscode-extension-gallery-service-override 3.2.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/extensionGallery.js +7 -1
  2. package/override/vs/platform/dialogs/common/dialogs.js +2 -0
  3. package/package.json +9 -9
  4. package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +18 -16
  5. package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +24 -23
  6. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +5 -2
  7. package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js +10 -0
  8. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +33 -19
  9. package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker.js +8 -5
  11. package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +109 -40
  13. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +11 -8
  14. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +31 -11
  15. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.js +35 -21
  16. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +54 -29
  17. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.js +6 -6
  18. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +11 -1
  19. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +18 -17
  20. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +71 -31
  21. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +63 -20
  22. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +551 -134
  23. package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extension.css.js +1 -1
  27. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +78 -4
  31. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +7 -1
  32. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionsProfileScannerService.js +24 -0
  33. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +15 -8
  34. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementChannelClient.js +2 -2
  35. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +3 -2
  36. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +469 -57
  37. package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.js +5 -2
  38. package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js +1 -0
  39. package/vscode/src/vs/workbench/services/extensions/browser/extensionsScannerService.js +33 -0
@@ -24,6 +24,10 @@ import { ExtensionEnablementService } from './vscode/src/vs/workbench/services/e
24
24
  import { IExtensionUrlHandler, ExtensionUrlHandler } from 'vscode/vscode/vs/workbench/services/extensions/browser/extensionUrlHandler';
25
25
  import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService';
26
26
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
27
+ import { IExtensionsScannerService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionsScannerService';
28
+ import { ExtensionsScannerService } from './vscode/src/vs/workbench/services/extensions/browser/extensionsScannerService.js';
29
+ import { ExtensionsProfileScannerService } from './vscode/src/vs/workbench/services/extensionManagement/browser/extensionsProfileScannerService.js';
30
+ import { IExtensionsProfileScannerService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionsProfileScannerService';
27
31
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
28
32
  import { IExtensionFeaturesManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
29
33
  import { ExtensionFeaturesManagementService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js';
@@ -90,7 +94,9 @@ function getServiceOverride(options = { webOnly: false }) {
90
94
  [( IRemoteUserDataProfilesService.toString())]: new SyncDescriptor(RemoteUserDataProfilesService, [], true),
91
95
  [( IWorkbenchExtensionEnablementService.toString())]: new SyncDescriptor(ExtensionEnablementService, [], true),
92
96
  [( IExtensionUrlHandler.toString())]: new SyncDescriptor(ExtensionUrlHandler, [], true),
93
- [( IExtensionFeaturesManagementService.toString())]: new SyncDescriptor(ExtensionFeaturesManagementService, [], true)
97
+ [( IExtensionFeaturesManagementService.toString())]: new SyncDescriptor(ExtensionFeaturesManagementService, [], true),
98
+ [( IExtensionsScannerService.toString())]: new SyncDescriptor(ExtensionsScannerService, [], true),
99
+ [( IExtensionsProfileScannerService.toString())]: new SyncDescriptor(ExtensionsProfileScannerService, [], true)
94
100
  };
95
101
  }
96
102
 
@@ -1,3 +1,5 @@
1
+ export { AbstractDialogHandler, IDialogService, IFileDialogService, getFileNamesMessage } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
2
+
1
3
  var ConfirmResult;
2
4
  ( (function(ConfirmResult) {
3
5
  ConfirmResult[ConfirmResult["SAVE"] = 0] = "SAVE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extension-gallery-service-override",
3
- "version": "3.2.2",
3
+ "version": "4.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,13 +18,13 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@3.2.2",
22
- "@codingame/monaco-vscode-files-service-override": "3.2.2",
23
- "@codingame/monaco-vscode-quickaccess-service-override": "3.2.2",
24
- "@codingame/monaco-vscode-extensions-service-override": "3.2.2",
25
- "@codingame/monaco-vscode-environment-service-override": "3.2.2",
26
- "@codingame/monaco-vscode-layout-service-override": "3.2.2",
27
- "@codingame/monaco-vscode-host-service-override": "3.2.2",
28
- "@codingame/monaco-vscode-base-service-override": "3.2.2"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@4.0.0",
22
+ "@codingame/monaco-vscode-files-service-override": "4.0.0",
23
+ "@codingame/monaco-vscode-quickaccess-service-override": "4.0.0",
24
+ "@codingame/monaco-vscode-extensions-service-override": "4.0.0",
25
+ "@codingame/monaco-vscode-environment-service-override": "4.0.0",
26
+ "@codingame/monaco-vscode-layout-service-override": "4.0.0",
27
+ "@codingame/monaco-vscode-host-service-override": "4.0.0",
28
+ "@codingame/monaco-vscode-base-service-override": "4.0.0"
29
29
  }
30
30
  }
@@ -78,7 +78,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
78
78
  const installableExtensions = [];
79
79
  await Promise.allSettled(( extensions.map(async ({ extension, options }) => {
80
80
  try {
81
- const compatible = await this.checkAndGetCompatibleVersion(extension, !!options?.installGivenVersion, !!options?.installPreReleaseVersion);
81
+ const compatible = await this.checkAndGetCompatibleVersion(extension, !!options?.installGivenVersion, !!options?.installPreReleaseVersion, options.productVersion ?? { version: this.productService.version, date: this.productService.date });
82
82
  installableExtensions.push({ ...compatible, options });
83
83
  }
84
84
  catch (error) {
@@ -164,9 +164,10 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
164
164
  const isApplicationScoped = options.isApplicationScoped || options.isBuiltin || isApplicationScopedExtension(manifest);
165
165
  const installExtensionTaskOptions = {
166
166
  ...options,
167
- installOnlyNewlyAddedFromExtensionPack: URI.isUri(extension) ? options.installOnlyNewlyAddedFromExtensionPack : true,
167
+ installOnlyNewlyAddedFromExtensionPack: options.installOnlyNewlyAddedFromExtensionPack ?? !URI.isUri(extension) ,
168
168
  isApplicationScoped,
169
- profileLocation: isApplicationScoped ? this.userDataProfilesService.defaultProfile.extensionsResource : options.profileLocation ?? this.getCurrentExtensionsManifestLocation()
169
+ profileLocation: isApplicationScoped ? this.userDataProfilesService.defaultProfile.extensionsResource : options.profileLocation ?? this.getCurrentExtensionsManifestLocation(),
170
+ productVersion: options.productVersion ?? { version: this.productService.version, date: this.productService.date }
170
171
  };
171
172
  const existingInstallExtensionTask = !URI.isUri(extension) ? this.installingExtensions.get(getInstallExtensionTaskKey(extension, installExtensionTaskOptions.profileLocation)) : undefined;
172
173
  if (existingInstallExtensionTask) {
@@ -183,8 +184,8 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
183
184
  }
184
185
  else {
185
186
  try {
186
- const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, manifest, !!task.options.installOnlyNewlyAddedFromExtensionPack, !!task.options.installPreReleaseVersion, task.options.profileLocation);
187
- const installed = await this.getInstalled(undefined, task.options.profileLocation);
187
+ const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, manifest, !!task.options.installOnlyNewlyAddedFromExtensionPack, !!task.options.installPreReleaseVersion, task.options.profileLocation, task.options.productVersion);
188
+ const installed = await this.getInstalled(undefined, task.options.profileLocation, task.options.productVersion);
188
189
  const options = { ...task.options, donotIncludePackAndDependencies: true, context: { ...task.options.context, [EXTENSION_INSTALL_DEP_PACK_CONTEXT]: true } };
189
190
  for (const { gallery, manifest } of distinct(allDepsAndPackExtensionsToInstall, ({ gallery }) => gallery.identifier.id)) {
190
191
  if (( installingExtensionsMap.has(`${gallery.identifier.id.toLowerCase()}-${( options.profileLocation.toString())}`))) {
@@ -267,6 +268,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
267
268
  }
268
269
  catch (error) {
269
270
  if (successResults.length) {
271
+ this.logService.info('Rollback: Uninstalling installed extensions', getErrorMessage(error));
270
272
  await Promise.allSettled(( successResults.map(async ({ local, profileLocation }) => {
271
273
  try {
272
274
  await this.createUninstallExtensionTask(local, { versionOnly: true, profileLocation }).run();
@@ -327,11 +329,11 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
327
329
  }
328
330
  return results;
329
331
  }
330
- async getAllDepsAndPackExtensions(extensionIdentifier, manifest, getOnlyNewlyAddedFromExtensionPack, installPreRelease, profile) {
332
+ async getAllDepsAndPackExtensions(extensionIdentifier, manifest, getOnlyNewlyAddedFromExtensionPack, installPreRelease, profile, productVersion) {
331
333
  if (!this.galleryService.isEnabled()) {
332
334
  return [];
333
335
  }
334
- const installed = await this.getInstalled(undefined, profile);
336
+ const installed = await this.getInstalled(undefined, profile, productVersion);
335
337
  const knownIdentifiers = [];
336
338
  const allDependenciesAndPacks = [];
337
339
  const collectDependenciesAndPackExtensionsToInstall = async (extensionIdentifier, manifest) => {
@@ -359,7 +361,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
359
361
  const isDependency = ( dependecies.some(id => areSameExtensions({ id }, galleryExtension.identifier)));
360
362
  let compatible;
361
363
  try {
362
- compatible = await this.checkAndGetCompatibleVersion(galleryExtension, false, installPreRelease);
364
+ compatible = await this.checkAndGetCompatibleVersion(galleryExtension, false, installPreRelease, productVersion);
363
365
  }
364
366
  catch (error) {
365
367
  if (!isDependency) {
@@ -379,7 +381,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
379
381
  await collectDependenciesAndPackExtensionsToInstall(extensionIdentifier, manifest);
380
382
  return allDependenciesAndPacks;
381
383
  }
382
- async checkAndGetCompatibleVersion(extension, sameVersion, installPreRelease) {
384
+ async checkAndGetCompatibleVersion(extension, sameVersion, installPreRelease, productVersion) {
383
385
  let compatibleExtension;
384
386
  const extensionsControlManifest = await this.getExtensionsControlManifest();
385
387
  if (( extensionsControlManifest.malicious.some(identifier => areSameExtensions(extension.identifier, identifier)))) {
@@ -388,7 +390,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
388
390
  const deprecationInfo = extensionsControlManifest.deprecated[extension.identifier.id.toLowerCase()];
389
391
  if (deprecationInfo?.extension?.autoMigrate) {
390
392
  this.logService.info(`The '${extension.identifier.id}' extension is deprecated, fetching the compatible '${deprecationInfo.extension.id}' extension instead.`);
391
- compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true }, CancellationToken.None))[0];
393
+ compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true, productVersion }, CancellationToken.None))[0];
392
394
  if (!compatibleExtension) {
393
395
  throw new ExtensionManagementError(localizeWithPath('vs/platform/extensionManagement/common/abstractExtensionManagementService', 'notFoundDeprecatedReplacementExtension', "Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.", extension.identifier.id, deprecationInfo.extension.id), ExtensionManagementErrorCode.Deprecated);
394
396
  }
@@ -398,7 +400,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
398
400
  const targetPlatform = await this.getTargetPlatform();
399
401
  throw new ExtensionManagementError(localizeWithPath('vs/platform/extensionManagement/common/abstractExtensionManagementService', 'incompatible platform', "The '{0}' extension is not available in {1} for {2}.", extension.identifier.id, this.productService.nameLong, TargetPlatformToString(targetPlatform)), ExtensionManagementErrorCode.IncompatibleTargetPlatform);
400
402
  }
401
- compatibleExtension = await this.getCompatibleVersion(extension, sameVersion, installPreRelease);
403
+ compatibleExtension = await this.getCompatibleVersion(extension, sameVersion, installPreRelease, productVersion);
402
404
  if (!compatibleExtension) {
403
405
  if (!installPreRelease && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
404
406
  throw new ExtensionManagementError(localizeWithPath('vs/platform/extensionManagement/common/abstractExtensionManagementService', 'notFoundReleaseExtension', "Can't install release version of '{0}' extension because it has no release version.", extension.displayName ?? extension.identifier.id), ExtensionManagementErrorCode.ReleaseVersionNotFound);
@@ -416,21 +418,21 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
416
418
  }
417
419
  return { extension: compatibleExtension, manifest };
418
420
  }
419
- async getCompatibleVersion(extension, sameVersion, includePreRelease) {
421
+ async getCompatibleVersion(extension, sameVersion, includePreRelease, productVersion) {
420
422
  const targetPlatform = await this.getTargetPlatform();
421
423
  let compatibleExtension = null;
422
424
  if (!sameVersion && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion !== includePreRelease) {
423
- compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, preRelease: includePreRelease }], { targetPlatform, compatible: true }, CancellationToken.None))[0] || null;
425
+ compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, preRelease: includePreRelease }], { targetPlatform, compatible: true, productVersion }, CancellationToken.None))[0] || null;
424
426
  }
425
- if (!compatibleExtension && (await this.galleryService.isExtensionCompatible(extension, includePreRelease, targetPlatform))) {
427
+ if (!compatibleExtension && (await this.galleryService.isExtensionCompatible(extension, includePreRelease, targetPlatform, productVersion))) {
426
428
  compatibleExtension = extension;
427
429
  }
428
430
  if (!compatibleExtension) {
429
431
  if (sameVersion) {
430
- compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, version: extension.version }], { targetPlatform, compatible: true }, CancellationToken.None))[0] || null;
432
+ compatibleExtension = (await this.galleryService.getExtensions([{ ...extension.identifier, version: extension.version }], { targetPlatform, compatible: true, productVersion }, CancellationToken.None))[0] || null;
431
433
  }
432
434
  else {
433
- compatibleExtension = await this.galleryService.getCompatibleExtension(extension, includePreRelease, targetPlatform);
435
+ compatibleExtension = await this.galleryService.getCompatibleExtension(extension, includePreRelease, targetPlatform, productVersion);
434
436
  }
435
437
  }
436
438
  return compatibleExtension;
@@ -353,13 +353,13 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
353
353
  if (options.source) {
354
354
  query = query.withSource(options.source);
355
355
  }
356
- const { extensions } = await this.queryGalleryExtensions(query, { targetPlatform: options.targetPlatform ?? CURRENT_TARGET_PLATFORM, includePreRelease: includePreReleases, versions, compatible: !!options.compatible }, token);
356
+ const { extensions } = await this.queryGalleryExtensions(query, { targetPlatform: options.targetPlatform ?? CURRENT_TARGET_PLATFORM, includePreRelease: includePreReleases, versions, compatible: !!options.compatible, productVersion: options.productVersion ?? { version: this.productService.version, date: this.productService.date } }, token);
357
357
  if (options.source) {
358
358
  extensions.forEach((e, index) => setTelemetry(e, index, options.source));
359
359
  }
360
360
  return extensions;
361
361
  }
362
- async getCompatibleExtension(extension, includePreRelease, targetPlatform) {
362
+ async getCompatibleExtension(extension, includePreRelease, targetPlatform, productVersion = { version: this.productService.version, date: this.productService.date }) {
363
363
  if (isNotWebExtensionInWebTargetPlatform(extension.allTargetPlatforms, targetPlatform)) {
364
364
  return null;
365
365
  }
@@ -370,10 +370,10 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
370
370
  .withFlags(Flags.IncludeVersions)
371
371
  .withPage(1, 1)
372
372
  .withFilter(FilterType.ExtensionId, extension.identifier.uuid);
373
- const { extensions } = await this.queryGalleryExtensions(query, { targetPlatform, compatible: true, includePreRelease }, CancellationToken.None);
373
+ const { extensions } = await this.queryGalleryExtensions(query, { targetPlatform, compatible: true, includePreRelease, productVersion }, CancellationToken.None);
374
374
  return extensions[0] || null;
375
375
  }
376
- async isExtensionCompatible(extension, includePreRelease, targetPlatform) {
376
+ async isExtensionCompatible(extension, includePreRelease, targetPlatform, productVersion = { version: this.productService.version, date: this.productService.date }) {
377
377
  if (!isTargetPlatformCompatible(extension.properties.targetPlatform, extension.allTargetPlatforms, targetPlatform)) {
378
378
  return false;
379
379
  }
@@ -388,9 +388,9 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
388
388
  }
389
389
  engine = manifest.engines.vscode;
390
390
  }
391
- return isEngineValid(engine, this.productService.version, this.productService.date);
391
+ return isEngineValid(engine, productVersion.version, productVersion.date);
392
392
  }
393
- async isValidVersion(rawGalleryExtensionVersion, versionType, compatible, allTargetPlatforms, targetPlatform) {
393
+ async isValidVersion(extension, rawGalleryExtensionVersion, versionType, compatible, allTargetPlatforms, targetPlatform, productVersion = { version: this.productService.version, date: this.productService.date }) {
394
394
  if (!isTargetPlatformCompatible(getTargetPlatformForExtensionVersion(rawGalleryExtensionVersion), allTargetPlatforms, targetPlatform)) {
395
395
  return false;
396
396
  }
@@ -399,8 +399,8 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
399
399
  }
400
400
  if (compatible) {
401
401
  try {
402
- const engine = await this.getEngine(rawGalleryExtensionVersion);
403
- if (!isEngineValid(engine, this.productService.version, this.productService.date)) {
402
+ const engine = await this.getEngine(extension, rawGalleryExtensionVersion);
403
+ if (!isEngineValid(engine, productVersion.version, productVersion.date)) {
404
404
  return false;
405
405
  }
406
406
  }
@@ -455,7 +455,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
455
455
  query = query.withSource(options.source);
456
456
  }
457
457
  const runQuery = async (query, token) => {
458
- const { extensions, total } = await this.queryGalleryExtensions(query, { targetPlatform: CURRENT_TARGET_PLATFORM, compatible: false, includePreRelease: !!options.includePreRelease }, token);
458
+ const { extensions, total } = await this.queryGalleryExtensions(query, { targetPlatform: CURRENT_TARGET_PLATFORM, compatible: false, includePreRelease: !!options.includePreRelease, productVersion: options.productVersion ?? { version: this.productService.version, date: this.productService.date } }, token);
459
459
  extensions.forEach((e, index) => setTelemetry(e, ((query.pageNumber - 1) * query.pageSize) + index, options.source));
460
460
  return { extensions, total };
461
461
  };
@@ -544,7 +544,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
544
544
  if (version && rawGalleryExtensionVersion.version !== version) {
545
545
  continue;
546
546
  }
547
- if (await this.isValidVersion(rawGalleryExtensionVersion, includePreRelease ? 'any' : 'release', criteria.compatible, allTargetPlatforms, criteria.targetPlatform)) {
547
+ if (await this.isValidVersion(getGalleryExtensionId(rawGalleryExtension.publisher.publisherName, rawGalleryExtension.extensionName), rawGalleryExtensionVersion, includePreRelease ? 'any' : 'release', criteria.compatible, allTargetPlatforms, criteria.targetPlatform, criteria.productVersion)) {
548
548
  return toExtension(rawGalleryExtension, rawGalleryExtensionVersion, allTargetPlatforms, queryContext);
549
549
  }
550
550
  if (version && rawGalleryExtensionVersion.version === version) {
@@ -647,7 +647,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
647
647
  fallbackUri: `${extension.assets.download.fallbackUri}${( URI.parse(extension.assets.download.fallbackUri)).query ? '&' : '?'}${operationParam}=true`
648
648
  } : extension.assets.download;
649
649
  const headers = extension.queryContext?.[ACTIVITY_HEADER_NAME] ? { [ACTIVITY_HEADER_NAME]: extension.queryContext[ACTIVITY_HEADER_NAME] } : undefined;
650
- const context = await this.getAsset(downloadAsset, headers ? { headers } : undefined);
650
+ const context = await this.getAsset(extension.identifier.id, downloadAsset, AssetType.VSIX, headers ? { headers } : undefined);
651
651
  await this.fileService.writeFile(location, context.stream);
652
652
  log(( new Date()).getTime() - startTime);
653
653
  }
@@ -656,12 +656,12 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
656
656
  throw new Error('No signature asset found');
657
657
  }
658
658
  this.logService.trace('ExtensionGalleryService#downloadSignatureArchive', extension.identifier.id);
659
- const context = await this.getAsset(extension.assets.signature);
659
+ const context = await this.getAsset(extension.identifier.id, extension.assets.signature, AssetType.Signature);
660
660
  await this.fileService.writeFile(location, context.stream);
661
661
  }
662
662
  async getReadme(extension, token) {
663
663
  if (extension.assets.readme) {
664
- const context = await this.getAsset(extension.assets.readme, {}, token);
664
+ const context = await this.getAsset(extension.identifier.id, extension.assets.readme, AssetType.Details, {}, token);
665
665
  const content = await asTextOrError(context);
666
666
  return content || '';
667
667
  }
@@ -669,25 +669,25 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
669
669
  }
670
670
  async getManifest(extension, token) {
671
671
  if (extension.assets.manifest) {
672
- const context = await this.getAsset(extension.assets.manifest, {}, token);
672
+ const context = await this.getAsset(extension.identifier.id, extension.assets.manifest, AssetType.Manifest, {}, token);
673
673
  const text = await asTextOrError(context);
674
674
  return text ? JSON.parse(text) : null;
675
675
  }
676
676
  return null;
677
677
  }
678
- async getManifestFromRawExtensionVersion(rawExtensionVersion, token) {
678
+ async getManifestFromRawExtensionVersion(extension, rawExtensionVersion, token) {
679
679
  const manifestAsset = getVersionAsset(rawExtensionVersion, AssetType.Manifest);
680
680
  if (!manifestAsset) {
681
681
  throw new Error('Manifest was not found');
682
682
  }
683
683
  const headers = { 'Accept-Encoding': 'gzip' };
684
- const context = await this.getAsset(manifestAsset, { headers });
684
+ const context = await this.getAsset(extension, manifestAsset, AssetType.Manifest, { headers });
685
685
  return await asJson(context);
686
686
  }
687
687
  async getCoreTranslation(extension, languageId) {
688
688
  const asset = extension.assets.coreTranslations.filter(t => t[0] === languageId.toUpperCase())[0];
689
689
  if (asset) {
690
- const context = await this.getAsset(asset[1]);
690
+ const context = await this.getAsset(extension.identifier.id, asset[1], asset[0]);
691
691
  const text = await asTextOrError(context);
692
692
  return text ? JSON.parse(text) : null;
693
693
  }
@@ -695,7 +695,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
695
695
  }
696
696
  async getChangelog(extension, token) {
697
697
  if (extension.assets.changelog) {
698
- const context = await this.getAsset(extension.assets.changelog, {}, token);
698
+ const context = await this.getAsset(extension.identifier.id, extension.assets.changelog, AssetType.Changelog, {}, token);
699
699
  const content = await asTextOrError(context);
700
700
  return content || '';
701
701
  }
@@ -722,7 +722,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
722
722
  const validVersions = [];
723
723
  await Promise.all(( galleryExtensions[0].versions.map(async (version) => {
724
724
  try {
725
- if (await this.isValidVersion(version, includePreRelease ? 'any' : 'release', true, allTargetPlatforms, targetPlatform)) {
725
+ if (await this.isValidVersion(extension.identifier.id, version, includePreRelease ? 'any' : 'release', true, allTargetPlatforms, targetPlatform)) {
726
726
  validVersions.push(version);
727
727
  }
728
728
  }
@@ -738,7 +738,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
738
738
  }
739
739
  return result;
740
740
  }
741
- async getAsset(asset, options = {}, token = CancellationToken.None) {
741
+ async getAsset(extension, asset, assetType, options = {}, token = CancellationToken.None) {
742
742
  const commonHeaders = await this.commonHeadersPromise;
743
743
  const baseOptions = { type: 'GET' };
744
744
  const headers = { ...commonHeaders, ...(options.headers || {}) };
@@ -759,15 +759,16 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
759
759
  throw err;
760
760
  }
761
761
  const message = getErrorMessage(err);
762
- this.telemetryService.publicLog2('galleryService:cdnFallback', { url, message });
762
+ this.telemetryService.publicLog2('galleryService:cdnFallback', { extension, assetType, message });
763
763
  const fallbackOptions = { ...options, url: fallbackUrl };
764
764
  return this.requestService.request(fallbackOptions, token);
765
765
  }
766
766
  }
767
- async getEngine(rawExtensionVersion) {
767
+ async getEngine(extension, rawExtensionVersion) {
768
768
  let engine = getEngine(rawExtensionVersion);
769
769
  if (!engine) {
770
- const manifest = await this.getManifestFromRawExtensionVersion(rawExtensionVersion, CancellationToken.None);
770
+ this.telemetryService.publicLog2('galleryService:engineFallback', { extension, version: rawExtensionVersion.version });
771
+ const manifest = await this.getManifestFromRawExtensionVersion(extension, rawExtensionVersion, CancellationToken.None);
771
772
  if (!manifest) {
772
773
  throw new Error('Manifest was not found');
773
774
  }
@@ -83,13 +83,16 @@ class ExtensionManagementChannelClient extends Disposable {
83
83
  ));
84
84
  }
85
85
  uninstall(extension, options) {
86
+ if (extension.isWorkspaceScoped) {
87
+ throw new Error('Cannot uninstall a workspace extension');
88
+ }
86
89
  return Promise.resolve(this.channel.call('uninstall', [extension, options]));
87
90
  }
88
91
  reinstallFromGallery(extension) {
89
92
  return Promise.resolve(this.channel.call('reinstallFromGallery', [extension])).then(local => transformIncomingExtension(local, null));
90
93
  }
91
- getInstalled(type = null, extensionsProfileResource) {
92
- return Promise.resolve(this.channel.call('getInstalled', [type, extensionsProfileResource]))
94
+ getInstalled(type = null, extensionsProfileResource, productVersion) {
95
+ return Promise.resolve(this.channel.call('getInstalled', [type, extensionsProfileResource, productVersion]))
93
96
  .then(extensions => ( extensions.map(extension => transformIncomingExtension(extension, null))));
94
97
  }
95
98
  updateMetadata(local, metadata, extensionsProfileResource) {
@@ -1,8 +1,18 @@
1
1
  import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
2
+ import 'vscode/vscode/vs/base/common/arrays';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { joinPath } from 'vscode/vscode/vs/base/common/resources';
5
+ import 'vscode/vscode/vs/base/common/path';
6
+ import 'vscode/vscode/vs/base/common/platform';
4
7
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
5
8
  import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
9
+ import 'vscode/vscode/vs/base/common/async';
10
+ import 'vscode/vscode/vs/base/common/event';
11
+ import 'vscode/vscode/vs/base/common/process';
12
+ import 'vscode/vscode/vs/base/common/strings';
13
+ import 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
14
+ import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
15
+ import 'vscode/vscode/vs/base/common/network';
6
16
 
7
17
  let ExtensionTipsService = class ExtensionTipsService extends Disposable {
8
18
  constructor(fileService, productService) {
@@ -1,6 +1,8 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { append, $, addDisposableListener, clearNode } from 'vscode/vscode/vs/base/browser/dom';
3
3
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
4
+ import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
5
+ import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
4
6
  import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
5
7
  import { Action, Separator } from 'vscode/vscode/vs/base/common/actions';
6
8
  import { isNonEmptyArray } from 'vscode/vscode/vs/base/common/arrays';
@@ -24,7 +26,17 @@ import { Severity, INotificationService } from 'vscode/vscode/vs/platform/notifi
24
26
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
25
27
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
26
28
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
27
- import { editorBackground } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
29
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
30
+ import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
31
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
32
+ import { editorBackground } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
33
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
34
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
35
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
36
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
37
+ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
38
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
39
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
28
40
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
29
41
  import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
30
42
  import { errorIcon, warningIcon } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons';
@@ -41,8 +53,8 @@ var AbstractRuntimeExtensionsEditor_1;
41
53
  let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor extends EditorPane {
42
54
  static { AbstractRuntimeExtensionsEditor_1 = this; }
43
55
  static { this.ID = 'workbench.editor.runtimeExtensions'; }
44
- constructor(telemetryService, themeService, contextKeyService, _extensionsWorkbenchService, _extensionService, _notificationService, _contextMenuService, _instantiationService, storageService, _labelService, _environmentService, _clipboardService, _extensionFeaturesManagementService) {
45
- super(AbstractRuntimeExtensionsEditor_1.ID, telemetryService, themeService, storageService);
56
+ constructor(group, telemetryService, themeService, contextKeyService, _extensionsWorkbenchService, _extensionService, _notificationService, _contextMenuService, _instantiationService, storageService, _labelService, _environmentService, _clipboardService, _extensionFeaturesManagementService) {
57
+ super(AbstractRuntimeExtensionsEditor_1.ID, group, telemetryService, themeService, storageService);
46
58
  this._extensionsWorkbenchService = _extensionsWorkbenchService;
47
59
  this._extensionService = _extensionService;
48
60
  this._notificationService = _notificationService;
@@ -324,15 +336,16 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
324
336
  "Extension is activating..."
325
337
  ));
326
338
  }
327
- data.activationTime.title = title;
339
+ data.elementDisposables.push(setupCustomHover(getDefaultHoverDelegate('mouse'), data.activationTime, title));
328
340
  clearNode(data.msgContainer);
329
341
  if (this._getUnresponsiveProfile(element.description.identifier)) {
330
342
  const el = $('span', undefined, ...renderLabelWithIcons(` $(alert) Unresponsive`));
331
- el.title = ( localizeWithPath(
343
+ const extensionHostFreezTitle = ( localizeWithPath(
332
344
  'vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor',
333
345
  'unresponsive.title',
334
346
  "Extension has caused the extension host to freeze."
335
347
  ));
348
+ data.elementDisposables.push(setupCustomHover(getDefaultHoverDelegate('mouse'), el, extensionHostFreezTitle));
336
349
  data.msgContainer.appendChild(el);
337
350
  }
338
351
  if (isNonEmptyArray(element.status.runtimeErrors)) {
@@ -387,13 +400,14 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
387
400
  feature.label,
388
401
  accessData.current.count
389
402
  )));
390
- element.title = ( localizeWithPath(
403
+ const title = ( localizeWithPath(
391
404
  'vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor',
392
405
  'requests count title',
393
406
  "Last request was {0}. Overall Requests: {1}",
394
407
  fromNow(accessData.current.lastAccessed, true, true),
395
408
  accessData.totalCount
396
409
  ));
410
+ data.elementDisposables.push(setupCustomHover(getDefaultHoverDelegate('mouse'), element, title));
397
411
  data.msgContainer.appendChild(element);
398
412
  }
399
413
  }
@@ -486,19 +500,19 @@ AbstractRuntimeExtensionsEditor.__decorator = ( __decorate([
486
500
  memoize
487
501
  ], AbstractRuntimeExtensionsEditor.prototype, "saveExtensionHostProfileAction", null));
488
502
  AbstractRuntimeExtensionsEditor = AbstractRuntimeExtensionsEditor_1 = ( __decorate([
489
- ( __param(0, ITelemetryService)),
490
- ( __param(1, IThemeService)),
491
- ( __param(2, IContextKeyService)),
492
- ( __param(3, IExtensionsWorkbenchService)),
493
- ( __param(4, IExtensionService)),
494
- ( __param(5, INotificationService)),
495
- ( __param(6, IContextMenuService)),
496
- ( __param(7, IInstantiationService)),
497
- ( __param(8, IStorageService)),
498
- ( __param(9, ILabelService)),
499
- ( __param(10, IWorkbenchEnvironmentService)),
500
- ( __param(11, IClipboardService)),
501
- ( __param(12, IExtensionFeaturesManagementService))
503
+ ( __param(1, ITelemetryService)),
504
+ ( __param(2, IThemeService)),
505
+ ( __param(3, IContextKeyService)),
506
+ ( __param(4, IExtensionsWorkbenchService)),
507
+ ( __param(5, IExtensionService)),
508
+ ( __param(6, INotificationService)),
509
+ ( __param(7, IContextMenuService)),
510
+ ( __param(8, IInstantiationService)),
511
+ ( __param(9, IStorageService)),
512
+ ( __param(10, ILabelService)),
513
+ ( __param(11, IWorkbenchEnvironmentService)),
514
+ ( __param(12, IClipboardService)),
515
+ ( __param(13, IExtensionFeaturesManagementService))
502
516
  ], AbstractRuntimeExtensionsEditor));
503
517
  class ShowRuntimeExtensionsAction extends Action2 {
504
518
  constructor() {
@@ -57,7 +57,7 @@ let ConfigBasedRecommendations = class ConfigBasedRecommendations extends Extens
57
57
  }
58
58
  toExtensionRecommendation(tip) {
59
59
  return {
60
- extensionId: tip.extensionId,
60
+ extension: tip.extensionId,
61
61
  reason: {
62
62
  reasonId: 3 ,
63
63
  reasonText: ( localizeWithPath(
@@ -9,11 +9,13 @@ import { distinct } from 'vscode/vscode/vs/base/common/arrays';
9
9
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
10
10
  import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
11
11
  import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
12
+ import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
12
13
 
13
14
  let DeprecatedExtensionsChecker = class DeprecatedExtensionsChecker extends Disposable {
14
- constructor(extensionsWorkbenchService, extensionManagementService, storageService, notificationService, instantiationService) {
15
+ constructor(extensionsWorkbenchService, extensionManagementService, extensionEnablementService, storageService, notificationService, instantiationService) {
15
16
  super();
16
17
  this.extensionsWorkbenchService = extensionsWorkbenchService;
18
+ this.extensionEnablementService = extensionEnablementService;
17
19
  this.storageService = storageService;
18
20
  this.notificationService = notificationService;
19
21
  this.instantiationService = instantiationService;
@@ -36,7 +38,7 @@ let DeprecatedExtensionsChecker = class DeprecatedExtensionsChecker extends Disp
36
38
  }
37
39
  const local = await this.extensionsWorkbenchService.queryLocal();
38
40
  const previouslyNotified = this.getNotifiedDeprecatedExtensions();
39
- const toNotify = local.filter(e => !!e.deprecationInfo).filter(e => !previouslyNotified.includes(e.identifier.id.toLowerCase()));
41
+ const toNotify = local.filter(e => !!e.deprecationInfo && e.local && this.extensionEnablementService.isEnabled(e.local)).filter(e => !previouslyNotified.includes(e.identifier.id.toLowerCase()));
40
42
  if (toNotify.length) {
41
43
  this.notificationService.prompt(Severity.Warning, ( localizeWithPath(
42
44
  'vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker',
@@ -79,9 +81,10 @@ let DeprecatedExtensionsChecker = class DeprecatedExtensionsChecker extends Disp
79
81
  DeprecatedExtensionsChecker = ( __decorate([
80
82
  ( __param(0, IExtensionsWorkbenchService)),
81
83
  ( __param(1, IExtensionManagementService)),
82
- ( __param(2, IStorageService)),
83
- ( __param(3, INotificationService)),
84
- ( __param(4, IInstantiationService))
84
+ ( __param(2, IWorkbenchExtensionEnablementService)),
85
+ ( __param(3, IStorageService)),
86
+ ( __param(4, INotificationService)),
87
+ ( __param(5, IInstantiationService))
85
88
  ], DeprecatedExtensionsChecker));
86
89
 
87
90
  export { DeprecatedExtensionsChecker };
@@ -40,7 +40,7 @@ let ExeBasedRecommendations = class ExeBasedRecommendations extends ExtensionRec
40
40
  }
41
41
  toExtensionRecommendation(tip) {
42
42
  return {
43
- extensionId: tip.extensionId.toLowerCase(),
43
+ extension: tip.extensionId.toLowerCase(),
44
44
  reason: {
45
45
  reasonId: 2 ,
46
46
  reasonText: ( localizeWithPath(