@codingame/monaco-vscode-extension-gallery-service-override 37.2.0 → 37.3.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 (27) hide show
  1. package/common.d.ts +12 -0
  2. package/common.js +136 -0
  3. package/index.d.ts +2 -10
  4. package/index.js +4 -128
  5. package/package.json +10 -2
  6. package/session.d.ts +4 -0
  7. package/session.js +15 -0
  8. package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +40 -40
  9. package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +6 -6
  10. package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +11 -11
  11. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +8 -6
  12. package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +5 -5
  13. package/vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js +5 -5
  14. package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.d.ts +1 -0
  15. package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.js +27 -0
  16. package/vscode/src/vs/sessions/services/extensionRecommendations/common/extensionRecommendationNotificationService.d.ts +9 -0
  17. package/vscode/src/vs/sessions/services/extensionRecommendations/common/extensionRecommendationNotificationService.js +18 -0
  18. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +19 -19
  19. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +1 -1
  20. package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
  21. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
  22. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +30 -28
  23. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js +6 -6
  24. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +2 -2
  25. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +119 -109
  26. package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.js +7 -7
  27. package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js +1 -1
@@ -35,7 +35,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
35
35
  });
36
36
  if (allowedToInstall !== true) {
37
37
  return (new MarkdownString(localize(
38
- 2206,
38
+ 2224,
39
39
  "This extension cannot be installed because {0}",
40
40
  allowedToInstall.value
41
41
  )));
@@ -43,12 +43,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
43
43
  if (!(await this.isExtensionPlatformCompatible(extension))) {
44
44
  const learnLink = isWeb ? "https://aka.ms/vscode-web-extensions-guide" : "https://aka.ms/vscode-platform-specific-extensions";
45
45
  return (new MarkdownString(`${( localize(
46
- 2207,
46
+ 2225,
47
47
  "The '{0}' extension is not available in {1} for the {2} platform.",
48
48
  extension.displayName ?? extension.identifier.id,
49
49
  this.productService.nameLong,
50
50
  TargetPlatformToString(await this.getTargetPlatform())
51
- ))} [${( localize(2208, "Learn Why"))}](${learnLink})`));
51
+ ))} [${( localize(2226, "Learn Why"))}](${learnLink})`));
52
52
  }
53
53
  return true;
54
54
  }
@@ -145,11 +145,11 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
145
145
  }
146
146
  async installGalleryExtensions(extensions) {
147
147
  if (!this.galleryService.isEnabled()) {
148
- throw ( new ExtensionManagementError(( localize(2209, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
148
+ throw ( new ExtensionManagementError(( localize(2227, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
149
149
  }
150
150
  const results = [];
151
151
  const installableExtensions = [];
152
- await Promise.allSettled(( extensions.map(async (
152
+ await Promise.allSettled(extensions.map(async (
153
153
  {
154
154
  extension,
155
155
  options
@@ -178,7 +178,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
178
178
  profileLocation: options.profileLocation ?? this.getCurrentExtensionsManifestLocation()
179
179
  });
180
180
  }
181
- })));
181
+ }));
182
182
  if (installableExtensions.length) {
183
183
  results.push(...(await this.installExtensions(installableExtensions)));
184
184
  }
@@ -261,16 +261,16 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
261
261
  }
262
262
  async resetPinnedStateForAllUserExtensions(pinned) {
263
263
  try {
264
- await this.joinAllSettled(( this.userDataProfilesService.profiles.map(async profile => {
264
+ await this.joinAllSettled(this.userDataProfilesService.profiles.map(async profile => {
265
265
  const extensions = await this.getInstalled(ExtensionType.User, profile.extensionsResource);
266
- await this.joinAllSettled(( extensions.map(async extension => {
266
+ await this.joinAllSettled(extensions.map(async extension => {
267
267
  if (extension.pinned !== pinned) {
268
268
  await this.updateMetadata(extension, {
269
269
  pinned
270
270
  }, profile.extensionsResource);
271
271
  }
272
- })));
273
- })));
272
+ }));
273
+ }));
274
274
  } catch (error) {
275
275
  this.logService.error(
276
276
  "Error while resetting pinned state for all user extensions",
@@ -405,7 +405,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
405
405
  createInstallExtensionTask(manifest, extension, installExtensionTaskOptions, undefined);
406
406
  }
407
407
  }
408
- await Promise.all(( [...( installingExtensionsMap.values())].map(async (
408
+ await Promise.all([...( installingExtensionsMap.values())].map(async (
409
409
  {
410
410
  task
411
411
  }
@@ -479,19 +479,19 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
479
479
  }
480
480
  }
481
481
  }
482
- })));
483
- const otherProfilesToUpdate = await this.getOtherProfilesToUpdateExtension(( [...( installingExtensionsMap.values())].map((
482
+ }));
483
+ const otherProfilesToUpdate = await this.getOtherProfilesToUpdateExtension([...( installingExtensionsMap.values())].map((
484
484
  {
485
485
  task
486
486
  }
487
- ) => task)));
487
+ ) => task));
488
488
  for (const [profileLocation, task] of otherProfilesToUpdate) {
489
489
  createInstallExtensionTask(task.manifest, task.source, {
490
490
  ...task.options,
491
491
  profileLocation
492
492
  }, undefined);
493
493
  }
494
- await this.joinAllSettled(( [...installingExtensionsMap.entries()].map(async (
494
+ await this.joinAllSettled([...installingExtensionsMap.entries()].map(async (
495
495
  [key, {
496
496
  task,
497
497
  uninstallTaskToWaitFor
@@ -520,9 +520,9 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
520
520
  }
521
521
  }
522
522
  local = await task.run();
523
- await this.joinAllSettled(( this.participants.map(
523
+ await this.joinAllSettled(this.participants.map(
524
524
  participant => participant.postInstall(local, task.source, task.options, CancellationToken.None)
525
- )), ExtensionManagementErrorCode.PostInstall);
525
+ ), ExtensionManagementErrorCode.PostInstall);
526
526
  } catch (e) {
527
527
  const error = toExtensionManagementError(e);
528
528
  if (!URI.isUri(task.source)) {
@@ -577,7 +577,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
577
577
  profileLocation: task.options.profileLocation,
578
578
  applicationScoped: local.isApplicationScoped
579
579
  });
580
- })));
580
+ }));
581
581
  if (alreadyRequestedInstallations.length) {
582
582
  await this.joinAllSettled(alreadyRequestedInstallations);
583
583
  }
@@ -652,7 +652,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
652
652
  }
653
653
  }
654
654
  if (rollbackTasks.length) {
655
- await Promise.allSettled(( rollbackTasks.map(async rollbackTask => {
655
+ await Promise.allSettled(rollbackTasks.map(async rollbackTask => {
656
656
  try {
657
657
  await rollbackTask.run();
658
658
  this.logService.info("Rollback: Uninstalled extension", rollbackTask.extension.identifier.id);
@@ -663,7 +663,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
663
663
  getErrorMessage(error)
664
664
  );
665
665
  }
666
- })));
666
+ }));
667
667
  }
668
668
  } finally {
669
669
  for (const {
@@ -789,10 +789,10 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
789
789
  }))
790
790
  );
791
791
  if (ids.length) {
792
- const galleryExtensions = await this.galleryService.getExtensions(( ids.map(id => ({
792
+ const galleryExtensions = await this.galleryService.getExtensions(ids.map(id => ({
793
793
  id,
794
794
  preRelease: preferPreRelease
795
- }))), CancellationToken.None);
795
+ })), CancellationToken.None);
796
796
  for (const galleryExtension of galleryExtensions) {
797
797
  if (knownIdentifiers.find(identifier => areSameExtensions(identifier, galleryExtension.identifier))) {
798
798
  continue;
@@ -832,7 +832,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
832
832
  const extensionsControlManifest = await this.getExtensionsControlManifest();
833
833
  if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
834
834
  throw ( new ExtensionManagementError(( localize(
835
- 2210,
835
+ 2228,
836
836
  "Can't install '{0}' extension since it was reported to be problematic.",
837
837
  extension.identifier.id
838
838
  )), ExtensionManagementErrorCode.Malicious));
@@ -852,7 +852,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
852
852
  }, CancellationToken.None))[0];
853
853
  if (!compatibleExtension) {
854
854
  throw ( new ExtensionManagementError(( localize(
855
- 2211,
855
+ 2229,
856
856
  "Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
857
857
  extension.identifier.id,
858
858
  deprecationInfo.extension.id
@@ -862,7 +862,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
862
862
  if ((await this.canInstall(extension)) !== true) {
863
863
  const targetPlatform = await this.getTargetPlatform();
864
864
  throw ( new ExtensionManagementError(( localize(
865
- 2207,
865
+ 2225,
866
866
  "The '{0}' extension is not available in {1} for the {2} platform.",
867
867
  extension.identifier.id,
868
868
  this.productService.nameLong,
@@ -873,13 +873,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
873
873
  if (!compatibleExtension) {
874
874
  if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
875
875
  throw ( new ExtensionManagementError(( localize(
876
- 2212,
876
+ 2230,
877
877
  "Can't install release version of '{0}' extension because it has no release version.",
878
878
  extension.displayName ?? extension.identifier.id
879
879
  )), ExtensionManagementErrorCode.ReleaseVersionNotFound));
880
880
  }
881
881
  throw ( new ExtensionManagementError(( localize(
882
- 2213,
882
+ 2231,
883
883
  "Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
884
884
  extension.identifier.id,
885
885
  this.productService.nameLong,
@@ -1090,14 +1090,14 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1090
1090
  `${task.extension.identifier.id}@${task.extension.manifest.version}`
1091
1091
  );
1092
1092
  } else {
1093
- this.checkForDependents(( allTasks.map((
1093
+ this.checkForDependents(allTasks.map((
1094
1094
  {
1095
1095
  task
1096
1096
  }
1097
- ) => task.extension)), installed, task.extension);
1097
+ ) => task.extension), installed, task.extension);
1098
1098
  }
1099
1099
  }
1100
- await this.joinAllSettled(( allTasks.map(async (
1100
+ await this.joinAllSettled(allTasks.map(async (
1101
1101
  {
1102
1102
  task,
1103
1103
  installTaskToWaitFor
@@ -1124,9 +1124,9 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1124
1124
  }
1125
1125
  }
1126
1126
  await task.run();
1127
- await this.joinAllSettled(( this.participants.map(
1127
+ await this.joinAllSettled(this.participants.map(
1128
1128
  participant => participant.postUninstall(task.extension, task.options, CancellationToken.None)
1129
- )));
1129
+ ));
1130
1130
  if (task.extension.identifier.uuid && !isWeb) {
1131
1131
  try {
1132
1132
  await this.galleryService.reportStatistic(
@@ -1144,7 +1144,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1144
1144
  } finally {
1145
1145
  processedTasks.push(task);
1146
1146
  }
1147
- })));
1147
+ }));
1148
1148
  if (alreadyRequestedUninstalls.length) {
1149
1149
  await this.joinAllSettled(alreadyRequestedUninstalls);
1150
1150
  }
@@ -1154,7 +1154,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1154
1154
  postUninstallExtension(task.extension, task.options);
1155
1155
  }
1156
1156
  if (extensionsToRemove.length) {
1157
- await this.joinAllSettled(( extensionsToRemove.map(extension => this.deleteExtension(extension))));
1157
+ await this.joinAllSettled(extensionsToRemove.map(extension => this.deleteExtension(extension)));
1158
1158
  }
1159
1159
  } catch (e) {
1160
1160
  const error = toExtensionManagementError(e);
@@ -1199,7 +1199,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1199
1199
  if (extensionToUninstall === dependingExtension) {
1200
1200
  if (dependents.length === 1) {
1201
1201
  return localize(
1202
- 2214,
1202
+ 2232,
1203
1203
  "Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
1204
1204
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1205
1205
  dependents[0].manifest.displayName || dependents[0].manifest.name
@@ -1207,7 +1207,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1207
1207
  }
1208
1208
  if (dependents.length === 2) {
1209
1209
  return localize(
1210
- 2215,
1210
+ 2233,
1211
1211
  "Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
1212
1212
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1213
1213
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -1215,7 +1215,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1215
1215
  );
1216
1216
  }
1217
1217
  return localize(
1218
- 2216,
1218
+ 2234,
1219
1219
  "Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
1220
1220
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1221
1221
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -1224,7 +1224,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1224
1224
  }
1225
1225
  if (dependents.length === 1) {
1226
1226
  return localize(
1227
- 2217,
1227
+ 2235,
1228
1228
  "Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
1229
1229
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1230
1230
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -1233,7 +1233,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1233
1233
  }
1234
1234
  if (dependents.length === 2) {
1235
1235
  return localize(
1236
- 2218,
1236
+ 2236,
1237
1237
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
1238
1238
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1239
1239
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -1242,7 +1242,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1242
1242
  );
1243
1243
  }
1244
1244
  return localize(
1245
- 2219,
1245
+ 2237,
1246
1246
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
1247
1247
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1248
1248
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -40,7 +40,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
40
40
  if (!isObject(value) || Array.isArray(value)) {
41
41
  return undefined;
42
42
  }
43
- const entries = ( Object.entries(value).map(([key, value]) => [key.toLowerCase(), value]));
43
+ const entries = Object.entries(value).map(([key, value]) => [key.toLowerCase(), value]);
44
44
  if (entries.length === 1 && entries[0][0] === "*" && entries[0][1] === true) {
45
45
  return undefined;
46
46
  }
@@ -77,14 +77,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
77
77
  query: `@id:${AllowedExtensionsConfigKey}`
78
78
  }).toString());
79
79
  const extensionValue = this._allowedExtensionsConfigValue[id];
80
- const extensionReason = ( new MarkdownString(( localize(2220, "it is not in the [allowed list]({0})", settingsCommandLink))));
80
+ const extensionReason = ( new MarkdownString(( localize(2238, "it is not in the [allowed list]({0})", settingsCommandLink))));
81
81
  if (!isUndefined(extensionValue)) {
82
82
  if (isBoolean(extensionValue)) {
83
83
  return extensionValue ? true : extensionReason;
84
84
  }
85
85
  if (extensionValue === "stable" && prerelease) {
86
86
  return (new MarkdownString(localize(
87
- 2221,
87
+ 2239,
88
88
  "the pre-release versions of this extension are not in the [allowed list]({0})",
89
89
  settingsCommandLink
90
90
  )));
@@ -107,7 +107,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
107
107
  return false;
108
108
  }))) {
109
109
  return (new MarkdownString(localize(
110
- 2222,
110
+ 2240,
111
111
  "the version {0} of this extension is not in the [allowed list]({1})",
112
112
  version,
113
113
  settingsCommandLink
@@ -120,7 +120,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
120
120
  if (!isUndefined(publisherValue)) {
121
121
  if (isBoolean(publisherValue)) {
122
122
  return publisherValue ? true : ( new MarkdownString(( localize(
123
- 2223,
123
+ 2241,
124
124
  "the extensions from this publisher are not in the [allowed list]({1})",
125
125
  publisherKey,
126
126
  settingsCommandLink
@@ -128,7 +128,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
128
128
  }
129
129
  if (publisherValue === "stable" && prerelease) {
130
130
  return (new MarkdownString(localize(
131
- 2224,
131
+ 2242,
132
132
  "the pre-release versions from this publisher are not in the [allowed list]({1})",
133
133
  publisherKey,
134
134
  settingsCommandLink
@@ -113,10 +113,10 @@ class Query {
113
113
  }));
114
114
  }
115
115
  withFilter(filterType, ...values) {
116
- const criteria = [...this.state.criteria, ...(values.length ? ( values.map(value => ({
116
+ const criteria = [...this.state.criteria, ...(values.length ? values.map(value => ({
117
117
  filterType,
118
118
  value
119
- }))) : [{
119
+ })) : [{
120
120
  filterType
121
121
  }])];
122
122
  return ( new Query({
@@ -198,7 +198,7 @@ function getVersionAsset(version, type) {
198
198
  function getExtensions(version, property) {
199
199
  const values = version.properties ? version.properties.filter(p => p.key === property) : [];
200
200
  const value = values.length > 0 && values[0].value;
201
- return value ? ( value.split(",").map(v => adoptToGalleryExtensionId(v))) : [];
201
+ return value ? value.split(",").map(v => adoptToGalleryExtensionId(v)) : [];
202
202
  }
203
203
  function getEngine(version) {
204
204
  const values = version.properties ? version.properties.filter(p => p.key === PropertyType.Engine) : [];
@@ -252,7 +252,7 @@ function getTargetPlatformForExtensionVersion(version) {
252
252
  return version.targetPlatform ? toTargetPlatform(version.targetPlatform) : TargetPlatform.UNDEFINED;
253
253
  }
254
254
  function getAllTargetPlatforms(rawGalleryExtension) {
255
- const allTargetPlatforms = distinct(( rawGalleryExtension.versions.map(getTargetPlatformForExtensionVersion)));
255
+ const allTargetPlatforms = distinct(rawGalleryExtension.versions.map(getTargetPlatformForExtensionVersion));
256
256
  const isWebExtension = !!rawGalleryExtension.tags?.includes(WEB_EXTENSION_TAG);
257
257
  const webTargetPlatformIndex = allTargetPlatforms.indexOf(TargetPlatform.WEB);
258
258
  if (isWebExtension) {
@@ -457,7 +457,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
457
457
  const token = CancellationToken.isCancellationToken(arg1) ? arg1 : arg2;
458
458
  const resourceApi = this.getResourceApi(extensionGalleryManifest);
459
459
  const result = resourceApi ? await this.getExtensionsUsingResourceApi(extensionInfos, options, resourceApi, extensionGalleryManifest, token) : await this.getExtensionsUsingQueryApi(extensionInfos, options, extensionGalleryManifest, token);
460
- const uuids = ( result.map(r => r.identifier.uuid));
460
+ const uuids = result.map(r => r.identifier.uuid);
461
461
  const extensionInfosByName = [];
462
462
  for (const e of extensionInfos) {
463
463
  if (e.uuid && !uuids.includes(e.uuid)) {
@@ -561,7 +561,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
561
561
  toFetchLatest.push(extensionInfo);
562
562
  }
563
563
  }
564
- await Promise.all(( toFetchLatest.map(async extensionInfo => {
564
+ await Promise.all(toFetchLatest.map(async extensionInfo => {
565
565
  let galleryExtension;
566
566
  try {
567
567
  galleryExtension = await this.getLatestGalleryExtension(extensionInfo, options, resourceApi, extensionGalleryManifest, token);
@@ -603,7 +603,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
603
603
  });
604
604
  toQuery.push(extensionInfo);
605
605
  }
606
- })));
606
+ }));
607
607
  if (toQuery.length) {
608
608
  const extensions = await this.getExtensionsUsingQueryApi(toQuery, options, extensionGalleryManifest, token);
609
609
  result.push(...extensions);
@@ -1105,7 +1105,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1105
1105
  }
1106
1106
  }
1107
1107
  return {
1108
- extensions: ( result.sort((a, b) => a[0] - b[0]).map(([, extension]) => extension)),
1108
+ extensions: result.sort((a, b) => a[0] - b[0]).map(([, extension]) => extension),
1109
1109
  total
1110
1110
  };
1111
1111
  }
@@ -1258,7 +1258,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1258
1258
  }
1259
1259
  } finally {
1260
1260
  this.telemetryService.publicLog2("galleryService:query", {
1261
- filterTypes: ( query.criteria.map(criterium => criterium.filterType)),
1261
+ filterTypes: query.criteria.map(criterium => criterium.filterType),
1262
1262
  flags: query.flags,
1263
1263
  sortBy: query.sortBy,
1264
1264
  sortOrder: String(query.sortOrder),
@@ -1591,7 +1591,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1591
1591
  version: this.productService.version,
1592
1592
  date: this.productService.date
1593
1593
  };
1594
- await Promise.all(( galleryExtensions[0].versions.map(async version => {
1594
+ await Promise.all(galleryExtensions[0].versions.map(async version => {
1595
1595
  try {
1596
1596
  if ((await this.isValidVersion({
1597
1597
  id: extensionIdentifier.id,
@@ -1610,7 +1610,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1610
1610
  versions.push(version);
1611
1611
  }
1612
1612
  } catch (error) {}
1613
- })));
1613
+ }));
1614
1614
  const result = [];
1615
1615
  const seen = ( new Map());
1616
1616
  for (const version of sortExtensionVersions(versions, onlyCompatible?.targetPlatform ?? CURRENT_TARGET_PLATFORM)) {
@@ -54,12 +54,12 @@ class ExtensionManagementChannelClient extends CommontExtensionManagementService
54
54
  }))
55
55
  );
56
56
  this._register(
57
- this.channel.listen("onDidInstallExtensions")(results => this.onDidInstallExtensionsEvent(( results.map(e => ({
57
+ this.channel.listen("onDidInstallExtensions")(results => this.onDidInstallExtensionsEvent(results.map(e => ({
58
58
  ...e,
59
59
  local: e.local ? transformIncomingExtension(e.local, null) : e.local,
60
60
  source: this.isUriComponents(e.source) ? URI.revive(e.source) : e.source,
61
61
  profileLocation: URI.revive(e.profileLocation)
62
- })))))
62
+ }))))
63
63
  );
64
64
  this._register(
65
65
  this.channel.listen("onUninstallExtension")(e => this.onUninstallExtensionEvent({
@@ -122,7 +122,7 @@ class ExtensionManagementChannelClient extends CommontExtensionManagementService
122
122
  "installExtensionsFromProfile",
123
123
  [extensions, fromProfileLocation, toProfileLocation]
124
124
  );
125
- return ( result.map(local => transformIncomingExtension(local, null)));
125
+ return result.map(local => transformIncomingExtension(local, null));
126
126
  }
127
127
  getManifest(vsix) {
128
128
  return Promise.resolve(this.channel.call("getManifest", [vsix]));
@@ -132,12 +132,12 @@ class ExtensionManagementChannelClient extends CommontExtensionManagementService
132
132
  }
133
133
  async installGalleryExtensions(extensions) {
134
134
  const results = await this.channel.call("installGalleryExtensions", [extensions]);
135
- return ( results.map(e => ({
135
+ return results.map(e => ({
136
136
  ...e,
137
137
  local: e.local ? transformIncomingExtension(e.local, null) : e.local,
138
138
  source: this.isUriComponents(e.source) ? URI.revive(e.source) : e.source,
139
139
  profileLocation: URI.revive(e.profileLocation)
140
- })));
140
+ }));
141
141
  }
142
142
  uninstall(extension, options) {
143
143
  if (extension.isWorkspaceScoped) {
@@ -155,7 +155,9 @@ class ExtensionManagementChannelClient extends CommontExtensionManagementService
155
155
  return Promise.resolve(this.channel.call(
156
156
  "getInstalled",
157
157
  [type, extensionsProfileResource, productVersion, language]
158
- )).then(extensions => ( extensions.map(extension => transformIncomingExtension(extension, null))));
158
+ )).then(
159
+ extensions => extensions.map(extension => transformIncomingExtension(extension, null))
160
+ );
159
161
  }
160
162
  updateMetadata(local, metadata, extensionsProfileResource) {
161
163
  return Promise.resolve(
@@ -23,12 +23,12 @@ class UserDataProfilesService extends Disposable {
23
23
  this._profiles = [];
24
24
  this._onDidChangeProfiles = this._register(( new Emitter()));
25
25
  this.onDidChangeProfiles = this._onDidChangeProfiles.event;
26
- this._profiles = ( profiles.map(profile => reviveProfile(profile, this.profilesHome.scheme)));
26
+ this._profiles = profiles.map(profile => reviveProfile(profile, this.profilesHome.scheme));
27
27
  this._register(this.channel.listen("onDidChangeProfiles")(e => {
28
- const added = ( e.added.map(profile => reviveProfile(profile, this.profilesHome.scheme)));
29
- const removed = ( e.removed.map(profile => reviveProfile(profile, this.profilesHome.scheme)));
30
- const updated = ( e.updated.map(profile => reviveProfile(profile, this.profilesHome.scheme)));
31
- this._profiles = ( e.all.map(profile => reviveProfile(profile, this.profilesHome.scheme)));
28
+ const added = e.added.map(profile => reviveProfile(profile, this.profilesHome.scheme));
29
+ const removed = e.removed.map(profile => reviveProfile(profile, this.profilesHome.scheme));
30
+ const updated = e.updated.map(profile => reviveProfile(profile, this.profilesHome.scheme));
31
+ this._profiles = e.all.map(profile => reviveProfile(profile, this.profilesHome.scheme));
32
32
  this._onDidChangeProfiles.fire({
33
33
  added,
34
34
  removed,
@@ -17,7 +17,7 @@ let IgnoredExtensionsManagementService = class IgnoredExtensionsManagementServic
17
17
  return configuredIgnoredExtensions.includes(`-${extensionId.toLowerCase()}`);
18
18
  }
19
19
  updateIgnoredExtensions(ignoredExtensionId, ignore) {
20
- let currentValue = ( [...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(id => id.toLowerCase()));
20
+ let currentValue = [...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(id => id.toLowerCase());
21
21
  currentValue = currentValue.filter(v => v !== ignoredExtensionId && v !== `-${ignoredExtensionId}`);
22
22
  if (ignore) {
23
23
  currentValue.push(ignoredExtensionId.toLowerCase());
@@ -29,7 +29,7 @@ let IgnoredExtensionsManagementService = class IgnoredExtensionsManagementServic
29
29
  );
30
30
  }
31
31
  updateSynchronizedExtensions(extensionId, sync) {
32
- let currentValue = ( [...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(id => id.toLowerCase()));
32
+ let currentValue = [...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(id => id.toLowerCase());
33
33
  currentValue = currentValue.filter(v => v !== extensionId && v !== `-${extensionId}`);
34
34
  if (sync) {
35
35
  currentValue.push(`-${extensionId.toLowerCase()}`);
@@ -41,8 +41,8 @@ let IgnoredExtensionsManagementService = class IgnoredExtensionsManagementServic
41
41
  );
42
42
  }
43
43
  getIgnoredExtensions(installed) {
44
- const defaultIgnoredExtensions = ( installed.filter(i => i.isMachineScoped).map(i => i.identifier.id.toLowerCase()));
45
- const value = ( this.getConfiguredIgnoredExtensions().map(id => id.toLowerCase()));
44
+ const defaultIgnoredExtensions = installed.filter(i => i.isMachineScoped).map(i => i.identifier.id.toLowerCase());
45
+ const value = this.getConfiguredIgnoredExtensions().map(id => id.toLowerCase());
46
46
  const added = [], removed = [];
47
47
  if (Array.isArray(value)) {
48
48
  for (const key of value) {
@@ -58,7 +58,7 @@ let IgnoredExtensionsManagementService = class IgnoredExtensionsManagementServic
58
58
  );
59
59
  }
60
60
  getConfiguredIgnoredExtensions() {
61
- return ( (this.configurationService.getValue("settingsSync.ignoredExtensions") || []).map(id => id.toLowerCase()));
61
+ return (this.configurationService.getValue("settingsSync.ignoredExtensions") || []).map(id => id.toLowerCase());
62
62
  }
63
63
  };
64
64
  IgnoredExtensionsManagementService = ( __decorate([( __param(0, IConfigurationService))], IgnoredExtensionsManagementService));
@@ -0,0 +1,27 @@
1
+
2
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
+ import { Extensions, ConfigurationScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
4
+ import { EXTENSIONS_ENABLE_AGENTS_WINDOW_CAPABILITY } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
5
+ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
6
+
7
+ ( Registry.as(Extensions.Configuration)).registerConfiguration({
8
+ id: "extensions",
9
+ properties: {
10
+ [EXTENSIONS_ENABLE_AGENTS_WINDOW_CAPABILITY]: {
11
+ type: "boolean",
12
+ scope: ConfigurationScope.APPLICATION,
13
+ description: ( localize(
14
+ 4048,
15
+ "When enabled, extensions can declare whether they support running in the Agents window."
16
+ )),
17
+ default: false,
18
+ tags: ["experimental"],
19
+ experiment: {
20
+ mode: "startup"
21
+ },
22
+ agentsWindow: {
23
+ default: false
24
+ }
25
+ }
26
+ }
27
+ });
@@ -0,0 +1,9 @@
1
+ import { RecommendationsNotificationResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations";
2
+ import { IExtensionRecommendationNotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations.service";
3
+ export declare class NullExtensionRecommendationNotificationService implements IExtensionRecommendationNotificationService {
4
+ readonly _serviceBrand: undefined;
5
+ readonly ignoredRecommendations: string[];
6
+ hasToIgnoreRecommendationNotifications(): boolean;
7
+ promptImportantExtensionsInstallNotification(): Promise<RecommendationsNotificationResult>;
8
+ promptWorkspaceRecommendations(): Promise<void>;
9
+ }
@@ -0,0 +1,18 @@
1
+
2
+ import { RecommendationsNotificationResult } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations';
3
+
4
+ class NullExtensionRecommendationNotificationService {
5
+ constructor() {
6
+ this.ignoredRecommendations = [];
7
+ }
8
+ hasToIgnoreRecommendationNotifications() {
9
+ return true;
10
+ }
11
+ async promptImportantExtensionsInstallNotification() {
12
+ return RecommendationsNotificationResult.Ignored;
13
+ }
14
+ async promptWorkspaceRecommendations() {
15
+ }
16
+ }
17
+
18
+ export { NullExtensionRecommendationNotificationService };