@codingame/monaco-vscode-extension-gallery-service-override 19.1.3 → 20.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.
package/index.js CHANGED
@@ -4,7 +4,7 @@ import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/
4
4
  import { IAllowedExtensionsService, IExtensionTipsService, IGlobalExtensionEnablementService, IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
5
5
  import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
6
6
  import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
7
- import { getLocale } from '@codingame/monaco-vscode-516ccb00-d5b9-5317-baf0-fcc96e99669a-common/vscode/vs/platform/languagePacks/common/languagePacks';
7
+ import { getLocale } from '@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common/vscode/vs/platform/languagePacks/common/languagePacks';
8
8
  import { ExtensionsWorkbenchService } from '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
9
9
  import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService, IWebExtensionsScannerService, IExtensionManagementServerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
10
10
  import { ExtensionManagementServerService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extension-gallery-service-override",
3
- "version": "19.1.3",
3
+ "version": "20.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - extension-gallery service-override",
6
6
  "keywords": [],
@@ -15,16 +15,16 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "19.1.3",
19
- "@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "19.1.3",
20
- "@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "19.1.3",
21
- "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "19.1.3",
22
- "@codingame/monaco-vscode-516ccb00-d5b9-5317-baf0-fcc96e99669a-common": "19.1.3",
23
- "@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common": "19.1.3",
24
- "@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "19.1.3",
25
- "@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "19.1.3",
26
- "@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "19.1.3",
27
- "@codingame/monaco-vscode-api": "19.1.3"
18
+ "@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "20.0.0",
19
+ "@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "20.0.0",
20
+ "@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "20.0.0",
21
+ "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "20.0.0",
22
+ "@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common": "20.0.0",
23
+ "@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "20.0.0",
24
+ "@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "20.0.0",
25
+ "@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "20.0.0",
26
+ "@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common": "20.0.0",
27
+ "@codingame/monaco-vscode-api": "20.0.0"
28
28
  },
29
29
  "main": "index.js",
30
30
  "module": "index.js",
@@ -113,6 +113,7 @@ export declare abstract class AbstractExtensionManagementService extends Commont
113
113
  private getAllDepsAndPackExtensions;
114
114
  private checkAndGetCompatibleVersion;
115
115
  protected getCompatibleVersion(extension: IGalleryExtension, sameVersion: boolean, includePreRelease: boolean, productVersion: IProductVersion): Promise<IGalleryExtension | null>;
116
+ private getUninstallExtensionTaskKey;
116
117
  uninstallExtensions(extensions: UninstallExtensionInfo[]): Promise<void>;
117
118
  private checkForDependents;
118
119
  private getDependentsErrorMessage;
@@ -33,7 +33,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
33
33
  const allowedToInstall = this.allowedExtensionsService.isAllowed({ id: extension.identifier.id, publisherDisplayName: extension.publisherDisplayName });
34
34
  if (allowedToInstall !== true) {
35
35
  return (new MarkdownString(localize(
36
- 1765,
36
+ 1777,
37
37
  "This extension cannot be installed because {0}",
38
38
  allowedToInstall.value
39
39
  )));
@@ -41,12 +41,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
41
41
  if (!(await this.isExtensionPlatformCompatible(extension))) {
42
42
  const learnLink = isWeb ? 'https://aka.ms/vscode-web-extensions-guide' : 'https://aka.ms/vscode-platform-specific-extensions';
43
43
  return (new MarkdownString(`${( localize(
44
- 1766,
44
+ 1778,
45
45
  "The '{0}' extension is not available in {1} for the {2}.",
46
46
  extension.displayName ?? extension.identifier.id,
47
47
  this.productService.nameLong,
48
48
  TargetPlatformToString(await this.getTargetPlatform())
49
- ))} [${( localize(1767, "Learn Why"))}](${learnLink})`));
49
+ ))} [${( localize(1779, "Learn Why"))}](${learnLink})`));
50
50
  }
51
51
  return true;
52
52
  }
@@ -111,7 +111,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
111
111
  }
112
112
  async installGalleryExtensions(extensions) {
113
113
  if (!this.galleryService.isEnabled()) {
114
- throw ( new ExtensionManagementError(( localize(1768, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
114
+ throw ( new ExtensionManagementError(( localize(1780, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
115
115
  }
116
116
  const results = [];
117
117
  const installableExtensions = [];
@@ -195,6 +195,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
195
195
  const alreadyRequestedInstallations = [];
196
196
  const getInstallExtensionTaskKey = (extension, profileLocation) => `${( ExtensionKey.create(extension).toString())}-${( profileLocation.toString())}`;
197
197
  const createInstallExtensionTask = (manifest, extension, options, root) => {
198
+ let uninstallTaskToWaitFor;
198
199
  if (!URI.isUri(extension)) {
199
200
  if (( installingExtensionsMap.has(`${extension.identifier.id.toLowerCase()}-${( options.profileLocation.toString())}`))) {
200
201
  return;
@@ -215,10 +216,11 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
215
216
  }
216
217
  return;
217
218
  }
219
+ uninstallTaskToWaitFor = this.uninstallingExtensions.get(this.getUninstallExtensionTaskKey(extension.identifier, options.profileLocation));
218
220
  }
219
221
  const installExtensionTask = this.createInstallExtensionTask(manifest, extension, options);
220
222
  const key = `${getGalleryExtensionId(manifest.publisher, manifest.name)}-${( options.profileLocation.toString())}`;
221
- installingExtensionsMap.set(key, { task: installExtensionTask, root });
223
+ installingExtensionsMap.set(key, { task: installExtensionTask, root, uninstallTaskToWaitFor });
222
224
  this._onInstallExtension.fire({ identifier: installExtensionTask.identifier, source: extension, profileLocation: options.profileLocation });
223
225
  this.logService.info('Installing extension:', installExtensionTask.identifier.id, options);
224
226
  if (!URI.isUri(extension)) {
@@ -287,10 +289,20 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
287
289
  for (const [profileLocation, task] of otherProfilesToUpdate) {
288
290
  createInstallExtensionTask(task.manifest, task.source, { ...task.options, profileLocation }, undefined);
289
291
  }
290
- await this.joinAllSettled(( [...installingExtensionsMap.entries()].map(async ([key, { task }]) => {
292
+ await this.joinAllSettled(( [...installingExtensionsMap.entries()].map(async ([key, { task, uninstallTaskToWaitFor }]) => {
291
293
  const startTime = ( new Date()).getTime();
292
294
  let local;
293
295
  try {
296
+ if (uninstallTaskToWaitFor) {
297
+ this.logService.info('Waiting for existing uninstall task to complete before installing', task.identifier.id);
298
+ try {
299
+ await uninstallTaskToWaitFor.waitUntilTaskIsFinished();
300
+ this.logService.info('Finished waiting for uninstall task, proceeding with install', task.identifier.id);
301
+ }
302
+ catch (error) {
303
+ this.logService.info('Uninstall task failed, proceeding with install anyway', task.identifier.id, getErrorMessage(error));
304
+ }
305
+ }
294
306
  local = await task.run();
295
307
  await this.joinAllSettled(( this.participants.map(
296
308
  participant => participant.postInstall(local, task.source, task.options, CancellationToken.None)
@@ -535,7 +547,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
535
547
  const extensionsControlManifest = await this.getExtensionsControlManifest();
536
548
  if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
537
549
  throw ( new ExtensionManagementError(( localize(
538
- 1769,
550
+ 1781,
539
551
  "Can't install '{0}' extension since it was reported to be problematic.",
540
552
  extension.identifier.id
541
553
  )), ExtensionManagementErrorCode.Malicious));
@@ -546,7 +558,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
546
558
  compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true, productVersion }, CancellationToken.None))[0];
547
559
  if (!compatibleExtension) {
548
560
  throw ( new ExtensionManagementError(( localize(
549
- 1770,
561
+ 1782,
550
562
  "Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
551
563
  extension.identifier.id,
552
564
  deprecationInfo.extension.id
@@ -557,7 +569,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
557
569
  if ((await this.canInstall(extension)) !== true) {
558
570
  const targetPlatform = await this.getTargetPlatform();
559
571
  throw ( new ExtensionManagementError(( localize(
560
- 1766,
572
+ 1778,
561
573
  "The '{0}' extension is not available in {1} for the {2}.",
562
574
  extension.identifier.id,
563
575
  this.productService.nameLong,
@@ -569,7 +581,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
569
581
  const incompatibleApiProposalsMessages = [];
570
582
  if (!areApiProposalsCompatible(extension.properties.enabledApiProposals ?? [], incompatibleApiProposalsMessages)) {
571
583
  throw ( new ExtensionManagementError(( localize(
572
- 1771,
584
+ 1783,
573
585
  "Can't install '{0}' extension. {1}",
574
586
  extension.displayName ?? extension.identifier.id,
575
587
  incompatibleApiProposalsMessages[0]
@@ -577,13 +589,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
577
589
  }
578
590
  if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
579
591
  throw ( new ExtensionManagementError(( localize(
580
- 1772,
592
+ 1784,
581
593
  "Can't install release version of '{0}' extension because it has no release version.",
582
594
  extension.displayName ?? extension.identifier.id
583
595
  )), ExtensionManagementErrorCode.ReleaseVersionNotFound));
584
596
  }
585
597
  throw ( new ExtensionManagementError(( localize(
586
- 1773,
598
+ 1785,
587
599
  "Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
588
600
  extension.identifier.id,
589
601
  this.productService.nameLong,
@@ -626,14 +638,24 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
626
638
  }
627
639
  return compatibleExtension;
628
640
  }
641
+ getUninstallExtensionTaskKey(identifier, profileLocation, version) {
642
+ return `${identifier.id.toLowerCase()}${version ? `-${version}` : ''}@${( profileLocation.toString())}`;
643
+ }
629
644
  async uninstallExtensions(extensions) {
630
- const getUninstallExtensionTaskKey = (extension, uninstallOptions) => `${extension.identifier.id.toLowerCase()}${uninstallOptions.versionOnly ? `-${extension.manifest.version}` : ''}@${( uninstallOptions.profileLocation.toString())}`;
645
+ const getUninstallExtensionTaskKey = (extension, uninstallOptions) => this.getUninstallExtensionTaskKey(extension.identifier, uninstallOptions.profileLocation, uninstallOptions.versionOnly ? extension.manifest.version : undefined);
631
646
  const createUninstallExtensionTask = (extension, uninstallOptions) => {
632
- const uninstallExtensionTask = this.createUninstallExtensionTask(extension, uninstallOptions);
633
- this.uninstallingExtensions.set(getUninstallExtensionTaskKey(uninstallExtensionTask.extension, uninstallOptions), uninstallExtensionTask);
647
+ let installTaskToWaitFor;
648
+ for (const { task } of ( this.installingExtensions.values())) {
649
+ if (!(task.source instanceof URI) && areSameExtensions(task.identifier, extension.identifier) && this.uriIdentityService.extUri.isEqual(task.options.profileLocation, uninstallOptions.profileLocation)) {
650
+ installTaskToWaitFor = task;
651
+ break;
652
+ }
653
+ }
654
+ const task = this.createUninstallExtensionTask(extension, uninstallOptions);
655
+ this.uninstallingExtensions.set(getUninstallExtensionTaskKey(task.extension, uninstallOptions), task);
634
656
  this.logService.info('Uninstalling extension from the profile:', `${extension.identifier.id}@${extension.manifest.version}`, ( uninstallOptions.profileLocation.toString()));
635
657
  this._onUninstallExtension.fire({ identifier: extension.identifier, profileLocation: uninstallOptions.profileLocation, applicationScoped: extension.isApplicationScoped });
636
- return uninstallExtensionTask;
658
+ allTasks.push({ task, installTaskToWaitFor });
637
659
  };
638
660
  const postUninstallExtension = (extension, uninstallOptions, error) => {
639
661
  if (error) {
@@ -668,7 +690,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
668
690
  alreadyRequestedUninstalls.push(uninstallExtensionTask.waitUntilTaskIsFinished());
669
691
  }
670
692
  else {
671
- allTasks.push(createUninstallExtensionTask(extension, uninstallOptions));
693
+ createUninstallExtensionTask(extension, uninstallOptions);
672
694
  }
673
695
  if (uninstallOptions.remove || extension.isApplicationScoped) {
674
696
  if (uninstallOptions.remove) {
@@ -688,14 +710,14 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
688
710
  alreadyRequestedUninstalls.push(uninstallExtensionTask.waitUntilTaskIsFinished());
689
711
  }
690
712
  else {
691
- allTasks.push(createUninstallExtensionTask(profileExtension, uninstallOptionsWithProfile));
713
+ createUninstallExtensionTask(profileExtension, uninstallOptionsWithProfile);
692
714
  }
693
715
  }
694
716
  }
695
717
  }
696
718
  }
697
719
  try {
698
- for (const task of allTasks.slice(0)) {
720
+ for (const { task } of allTasks.slice(0)) {
699
721
  const installed = await getInstalledExtensions(task.options.profileLocation);
700
722
  if (task.options.donotIncludePack) {
701
723
  this.logService.info('Uninstalling the extension without including packed extension', `${task.extension.identifier.id}@${task.extension.manifest.version}`);
@@ -707,7 +729,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
707
729
  this.logService.info('Extensions is already requested to uninstall', packedExtension.identifier.id);
708
730
  }
709
731
  else {
710
- allTasks.push(createUninstallExtensionTask(packedExtension, task.options));
732
+ createUninstallExtensionTask(packedExtension, task.options);
711
733
  }
712
734
  }
713
735
  }
@@ -715,11 +737,21 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
715
737
  this.logService.info('Uninstalling the extension without checking dependents', `${task.extension.identifier.id}@${task.extension.manifest.version}`);
716
738
  }
717
739
  else {
718
- this.checkForDependents(( allTasks.map(task => task.extension)), installed, task.extension);
740
+ this.checkForDependents(( allTasks.map(({ task }) => task.extension)), installed, task.extension);
719
741
  }
720
742
  }
721
- await this.joinAllSettled(( allTasks.map(async (task) => {
743
+ await this.joinAllSettled(( allTasks.map(async ({ task, installTaskToWaitFor }) => {
722
744
  try {
745
+ if (installTaskToWaitFor) {
746
+ this.logService.info('Waiting for existing install task to complete before uninstalling', task.extension.identifier.id);
747
+ try {
748
+ await installTaskToWaitFor.waitUntilTaskIsFinished();
749
+ this.logService.info('Finished waiting for install task, proceeding with uninstall', task.extension.identifier.id);
750
+ }
751
+ catch (error) {
752
+ this.logService.info('Install task failed, proceeding with uninstall anyway', task.extension.identifier.id, getErrorMessage(error));
753
+ }
754
+ }
723
755
  await task.run();
724
756
  await this.joinAllSettled(( this.participants.map(
725
757
  participant => participant.postUninstall(task.extension, task.options, CancellationToken.None)
@@ -743,7 +775,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
743
775
  if (alreadyRequestedUninstalls.length) {
744
776
  await this.joinAllSettled(alreadyRequestedUninstalls);
745
777
  }
746
- for (const task of allTasks) {
778
+ for (const { task } of allTasks) {
747
779
  postUninstallExtension(task.extension, task.options);
748
780
  }
749
781
  if (extensionsToRemove.length) {
@@ -752,7 +784,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
752
784
  }
753
785
  catch (e) {
754
786
  const error = toExtensionManagementError(e);
755
- for (const task of allTasks) {
787
+ for (const { task } of allTasks) {
756
788
  try {
757
789
  task.cancel();
758
790
  }
@@ -764,7 +796,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
764
796
  throw error;
765
797
  }
766
798
  finally {
767
- for (const task of allTasks) {
799
+ for (const { task } of allTasks) {
768
800
  if (!this.uninstallingExtensions.delete(getUninstallExtensionTaskKey(task.extension, task.options))) {
769
801
  this.logService.warn('Uninstallation task is not found in the cache', task.extension.identifier.id);
770
802
  }
@@ -788,7 +820,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
788
820
  if (extensionToUninstall === dependingExtension) {
789
821
  if (dependents.length === 1) {
790
822
  return localize(
791
- 1774,
823
+ 1786,
792
824
  "Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
793
825
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
794
826
  dependents[0].manifest.displayName || dependents[0].manifest.name
@@ -796,7 +828,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
796
828
  }
797
829
  if (dependents.length === 2) {
798
830
  return localize(
799
- 1775,
831
+ 1787,
800
832
  "Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
801
833
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
802
834
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -804,7 +836,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
804
836
  );
805
837
  }
806
838
  return localize(
807
- 1776,
839
+ 1788,
808
840
  "Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
809
841
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
810
842
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -813,7 +845,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
813
845
  }
814
846
  if (dependents.length === 1) {
815
847
  return localize(
816
- 1777,
848
+ 1789,
817
849
  "Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
818
850
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
819
851
  dependingExtension.manifest.displayName
@@ -823,7 +855,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
823
855
  }
824
856
  if (dependents.length === 2) {
825
857
  return localize(
826
- 1778,
858
+ 1790,
827
859
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
828
860
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
829
861
  dependingExtension.manifest.displayName
@@ -833,7 +865,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
833
865
  );
834
866
  }
835
867
  return localize(
836
- 1779,
868
+ 1791,
837
869
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
838
870
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
839
871
  dependingExtension.manifest.displayName
@@ -80,14 +80,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
80
80
  `command:workbench.action.openSettings?${encodeURIComponent(JSON.stringify({ query: `@id:${AllowedExtensionsConfigKey}` }))}`
81
81
  )).toString());
82
82
  const extensionValue = this._allowedExtensionsConfigValue[id];
83
- const extensionReason = ( new MarkdownString(( localize(1780, "it is not in the [allowed list]({0})", settingsCommandLink))));
83
+ const extensionReason = ( new MarkdownString(( localize(1792, "it is not in the [allowed list]({0})", settingsCommandLink))));
84
84
  if (!isUndefined(extensionValue)) {
85
85
  if (isBoolean(extensionValue)) {
86
86
  return extensionValue ? true : extensionReason;
87
87
  }
88
88
  if (extensionValue === 'stable' && prerelease) {
89
89
  return (new MarkdownString(localize(
90
- 1781,
90
+ 1793,
91
91
  "the pre-release versions of this extension are not in the [allowed list]({0})",
92
92
  settingsCommandLink
93
93
  )));
@@ -107,7 +107,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
107
107
  return false;
108
108
  }))) {
109
109
  return (new MarkdownString(localize(
110
- 1782,
110
+ 1794,
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
- 1783,
123
+ 1795,
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
- 1784,
131
+ 1796,
132
132
  "the pre-release versions from this publisher are not in the [allowed list]({1})",
133
133
  publisherKey,
134
134
  settingsCommandLink
@@ -1,13 +1,14 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
4
- import { IExtensionGalleryManifest } from "@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest";
4
+ import { IExtensionGalleryManifest, ExtensionGalleryManifestStatus } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest";
5
5
  import { IExtensionGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service";
6
6
  export declare class ExtensionGalleryManifestService extends Disposable implements IExtensionGalleryManifestService {
7
7
  protected readonly productService: IProductService;
8
8
  readonly _serviceBrand: undefined;
9
9
  readonly onDidChangeExtensionGalleryManifest: Event<any>;
10
+ readonly onDidChangeExtensionGalleryManifestStatus: Event<any>;
11
+ get extensionGalleryManifestStatus(): ExtensionGalleryManifestStatus;
10
12
  constructor(productService: IProductService);
11
- isEnabled(): boolean;
12
13
  getExtensionGalleryManifest(): Promise<IExtensionGalleryManifest | null>;
13
14
  }
@@ -3,17 +3,18 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
4
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
5
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
6
- import { ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
6
+ import { ExtensionGalleryManifestStatus, ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
7
7
  import { FilterType, SortBy } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
8
8
 
9
9
  let ExtensionGalleryManifestService = class ExtensionGalleryManifestService extends Disposable {
10
+ get extensionGalleryManifestStatus() {
11
+ return !!this.productService.extensionsGallery?.serviceUrl ? ExtensionGalleryManifestStatus.Available : ExtensionGalleryManifestStatus.Unavailable;
12
+ }
10
13
  constructor(productService) {
11
14
  super();
12
15
  this.productService = productService;
13
16
  this.onDidChangeExtensionGalleryManifest = Event.None;
14
- }
15
- isEnabled() {
16
- return !!this.productService.extensionsGallery?.serviceUrl;
17
+ this.onDidChangeExtensionGalleryManifestStatus = Event.None;
17
18
  }
18
19
  async getExtensionGalleryManifest() {
19
20
  const extensionsGallery = this.productService.extensionsGallery;
@@ -1,5 +1,5 @@
1
1
  import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
- import { IPager } from "@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common/vscode/vs/base/common/paging";
2
+ import { IPager } from "@codingame/monaco-vscode-62190c26-af1c-5f7a-a364-e05a59cfb7c7-common/vscode/vs/base/common/paging";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
4
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
5
5
  import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
@@ -13,7 +13,7 @@ import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform
13
13
  import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
14
14
  import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
15
15
  import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
16
- import { IAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/assignment/common/assignment";
16
+ import { IAssignmentService } from "@codingame/monaco-vscode-configuration-service-override/vscode/vs/platform/assignment/common/assignment";
17
17
  import { IExtensionGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service";
18
18
  interface IRawGalleryExtensionFile {
19
19
  readonly assetType: string;
@@ -26,7 +26,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
26
26
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
27
27
  import { StopWatch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stopwatch';
28
28
  import { format2 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
29
- import { getExtensionGalleryManifestResourceUri, ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
29
+ import { getExtensionGalleryManifestResourceUri, ExtensionGalleryResourceType, ExtensionGalleryManifestStatus, Flag } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
30
30
  import { IExtensionGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service';
31
31
  import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
32
32
 
@@ -321,7 +321,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
321
321
  this.commonHeadersPromise = resolveMarketplaceHeaders(productService.version, productService, this.environmentService, this.configurationService, this.fileService, storageService, this.telemetryService);
322
322
  }
323
323
  isEnabled() {
324
- return this.extensionGalleryManifestService.isEnabled();
324
+ return this.extensionGalleryManifestService.extensionGalleryManifestStatus === ExtensionGalleryManifestStatus.Available;
325
325
  }
326
326
  async getExtensions(extensionInfos, arg1, arg2) {
327
327
  const extensionGalleryManifest = await this.extensionGalleryManifestService.getExtensionGalleryManifest();
@@ -330,7 +330,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
330
330
  }
331
331
  const options = CancellationToken.isCancellationToken(arg1) ? {} : arg1;
332
332
  const token = CancellationToken.isCancellationToken(arg1) ? arg1 : arg2;
333
- const resourceApi = await this.getResourceApi(extensionGalleryManifest, !!options.updateCheck);
333
+ const resourceApi = await this.getResourceApi(extensionGalleryManifest);
334
334
  const result = resourceApi
335
335
  ? await this.getExtensionsUsingResourceApi(extensionInfos, options, resourceApi, extensionGalleryManifest, token)
336
336
  : await this.getExtensionsUsingQueryApi(extensionInfos, options, extensionGalleryManifest, token);
@@ -350,29 +350,18 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
350
350
  }
351
351
  return result;
352
352
  }
353
- async getResourceApi(extensionGalleryManifest, updateCheck) {
354
- const latestVersionResource = getExtensionGalleryManifestResourceUri(extensionGalleryManifest, ExtensionGalleryResourceType.ExtensionLatestVersionUri);
355
- if (!latestVersionResource) {
356
- return undefined;
357
- }
358
- if (this.productService.quality !== 'stable') {
359
- return {
360
- uri: latestVersionResource,
361
- fallback: this.unpkgResourceApi
362
- };
353
+ async getResourceApi(extensionGalleryManifest) {
354
+ const value = (await this.assignmentService?.getTreatment('extensions.gallery.useResourceApi')) ?? 'marketplace';
355
+ if (value === 'unpkg' && this.unpkgResourceApi) {
356
+ return { uri: this.unpkgResourceApi };
363
357
  }
364
- const value = updateCheck
365
- ? (await this.assignmentService?.getTreatment('extensions.gallery.useResourceApi')) ?? 'marketplace'
366
- : (await this.assignmentService?.getTreatment('extensions.gallery.useLatestApi')) ?? 'unpkg';
367
- if (value === 'marketplace') {
358
+ const latestVersionResource = getExtensionGalleryManifestResourceUri(extensionGalleryManifest, ExtensionGalleryResourceType.ExtensionLatestVersionUri);
359
+ if (latestVersionResource) {
368
360
  return {
369
361
  uri: latestVersionResource,
370
362
  fallback: this.unpkgResourceApi
371
363
  };
372
364
  }
373
- if (value === 'unpkg' && this.unpkgResourceApi) {
374
- return { uri: this.unpkgResourceApi };
375
- }
376
365
  return undefined;
377
366
  }
378
367
  async getExtensionsUsingQueryApi(extensionInfos, options, extensionGalleryManifest, token) {
@@ -561,7 +550,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
561
550
  return false;
562
551
  }
563
552
  }
564
- if (!isTargetPlatformCompatible(extension.targetPlatform, allTargetPlatforms, targetPlatform)) {
553
+ if (targetPlatform && !isTargetPlatformCompatible(extension.targetPlatform, allTargetPlatforms, targetPlatform)) {
565
554
  return false;
566
555
  }
567
556
  if (compatible) {
@@ -1158,7 +1147,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1158
1147
  }, {
1159
1148
  compatible: !!onlyCompatible,
1160
1149
  productVersion,
1161
- targetPlatform: onlyCompatible?.targetPlatform ?? CURRENT_TARGET_PLATFORM,
1150
+ targetPlatform: onlyCompatible?.targetPlatform,
1162
1151
  version: onlyCompatible?.version ?? version.version
1163
1152
  }, galleryExtensions[0].publisher.displayName, allTargetPlatforms))) {
1164
1153
  versions.push(version);
@@ -1167,11 +1156,17 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
1167
1156
  catch (error) { }
1168
1157
  })));
1169
1158
  const result = [];
1170
- const seen = ( new Set());
1159
+ const seen = ( new Map());
1171
1160
  for (const version of sortExtensionVersions(versions, onlyCompatible?.targetPlatform ?? CURRENT_TARGET_PLATFORM)) {
1172
- if (!( seen.has(version.version))) {
1173
- seen.add(version.version);
1174
- result.push({ version: version.version, date: version.lastUpdated, isPreReleaseVersion: isPreReleaseVersion(version) });
1161
+ const index = seen.get(version.version);
1162
+ const existing = index !== undefined ? result[index] : undefined;
1163
+ const targetPlatform = getTargetPlatformForExtensionVersion(version);
1164
+ if (!existing) {
1165
+ seen.set(version.version, result.length);
1166
+ result.push({ version: version.version, date: version.lastUpdated, isPreReleaseVersion: isPreReleaseVersion(version), targetPlatforms: [targetPlatform] });
1167
+ }
1168
+ else {
1169
+ existing.targetPlatforms.push(targetPlatform);
1175
1170
  }
1176
1171
  }
1177
1172
  return result;
@@ -7,4 +7,4 @@ import { RuntimeExtensionsEditor } from './browserRuntimeExtensionsEditor.js';
7
7
  import { RuntimeExtensionsInput } from '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/common/runtimeExtensionsInput';
8
8
  import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
9
9
 
10
- ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(6732, "Running Extensions"))), [( new SyncDescriptor(RuntimeExtensionsInput))]);
10
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(6851, "Running Extensions"))), [( new SyncDescriptor(RuntimeExtensionsInput))]);
@@ -8,7 +8,7 @@ var ReportExtensionIssueAction_1;
8
8
  let ReportExtensionIssueAction = class ReportExtensionIssueAction extends Action {
9
9
  static { ReportExtensionIssueAction_1 = this; }
10
10
  static { this._id = 'workbench.extensions.action.reportExtensionIssue'; }
11
- static { this._label = ( localize(7092, "Report Issue")); }
11
+ static { this._label = ( localize(7217, "Report Issue")); }
12
12
  constructor(extension, issueService) {
13
13
  super(ReportExtensionIssueAction_1._id, ReportExtensionIssueAction_1._label, 'extension-action report-issue');
14
14
  this.extension = extension;
@@ -78,8 +78,8 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
78
78
  this._register(allowedExtensionsService.onDidChangeAllowedExtensionsConfigValue(() => this._onDidChangeExtensions([], [], false)));
79
79
  if (this.allUserExtensionsDisabled) {
80
80
  this.lifecycleService.when(LifecyclePhase.Eventually).then(() => {
81
- this.notificationService.prompt(Severity.Info, ( localize(12784, "All installed extensions are temporarily disabled.")), [{
82
- label: ( localize(12785, "Reload and Enable Extensions")),
81
+ this.notificationService.prompt(Severity.Info, ( localize(13034, "All installed extensions are temporarily disabled.")), [{
82
+ label: ( localize(13035, "Reload and Enable Extensions")),
83
83
  run: () => hostService.reload({ disableExtensions: false })
84
84
  }], {
85
85
  sticky: true,
@@ -131,7 +131,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
131
131
  throwErrorIfCannotChangeEnablement(extension, donotCheckDependencies) {
132
132
  if (isLanguagePackExtension(extension.manifest)) {
133
133
  throw ( new Error(( localize(
134
- 12786,
134
+ 13036,
135
135
  "Cannot change enablement of {0} extension because it contributes language packs.",
136
136
  extension.manifest.displayName || extension.identifier.id
137
137
  ))));
@@ -141,14 +141,14 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
141
141
  a => a.id === this.userDataSyncAccountService.account.authenticationProviderId
142
142
  ))) {
143
143
  throw ( new Error(( localize(
144
- 12787,
144
+ 13037,
145
145
  "Cannot change enablement {0} extension because Settings Sync depends on it.",
146
146
  extension.manifest.displayName || extension.identifier.id
147
147
  ))));
148
148
  }
149
149
  if (this._isEnabledInEnv(extension)) {
150
150
  throw ( new Error(( localize(
151
- 12788,
151
+ 13038,
152
152
  "Cannot change enablement of {0} extension because it is enabled in environment",
153
153
  extension.manifest.displayName || extension.identifier.id
154
154
  ))));
@@ -159,37 +159,37 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
159
159
  switch (enablementStateOfExtension) {
160
160
  case EnablementState.DisabledByEnvironment:
161
161
  throw ( new Error(( localize(
162
- 12789,
162
+ 13039,
163
163
  "Cannot change enablement of {0} extension because it is disabled in environment",
164
164
  extension.manifest.displayName || extension.identifier.id
165
165
  ))));
166
166
  case EnablementState.DisabledByMalicious:
167
167
  throw ( new Error(( localize(
168
- 12790,
168
+ 13040,
169
169
  "Cannot change enablement of {0} extension because it is malicious",
170
170
  extension.manifest.displayName || extension.identifier.id
171
171
  ))));
172
172
  case EnablementState.DisabledByVirtualWorkspace:
173
173
  throw ( new Error(( localize(
174
- 12791,
174
+ 13041,
175
175
  "Cannot change enablement of {0} extension because it does not support virtual workspaces",
176
176
  extension.manifest.displayName || extension.identifier.id
177
177
  ))));
178
178
  case EnablementState.DisabledByExtensionKind:
179
179
  throw ( new Error(( localize(
180
- 12792,
180
+ 13042,
181
181
  "Cannot change enablement of {0} extension because of its extension kind",
182
182
  extension.manifest.displayName || extension.identifier.id
183
183
  ))));
184
184
  case EnablementState.DisabledByAllowlist:
185
185
  throw ( new Error(( localize(
186
- 12793,
186
+ 13043,
187
187
  "Cannot change enablement of {0} extension because it is disallowed",
188
188
  extension.manifest.displayName || extension.identifier.id
189
189
  ))));
190
190
  case EnablementState.DisabledByInvalidExtension:
191
191
  throw ( new Error(( localize(
192
- 12794,
192
+ 13044,
193
193
  "Cannot change enablement of {0} extension because of it is invalid",
194
194
  extension.manifest.displayName || extension.identifier.id
195
195
  ))));
@@ -202,7 +202,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
202
202
  continue;
203
203
  }
204
204
  throw ( new Error(( localize(
205
- 12795,
205
+ 13045,
206
206
  "Cannot enable '{0}' extension because it depends on '{1}' extension that cannot be enabled",
207
207
  extension.manifest.displayName || extension.identifier.id,
208
208
  dependency.manifest.displayName || dependency.identifier.id
@@ -212,11 +212,11 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
212
212
  }
213
213
  throwErrorIfCannotChangeWorkspaceEnablement(extension) {
214
214
  if (!this.hasWorkspace) {
215
- throw ( new Error(( localize(12796, "No workspace."))));
215
+ throw ( new Error(( localize(13046, "No workspace."))));
216
216
  }
217
217
  if (isAuthenticationProviderExtension(extension.manifest)) {
218
218
  throw ( new Error(( localize(
219
- 12797,
219
+ 13047,
220
220
  "Cannot change enablement of {0} extension in workspace because it contributes authentication providers",
221
221
  extension.manifest.displayName || extension.identifier.id
222
222
  ))));
@@ -605,7 +605,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
605
605
  }
606
606
  if (!this.extensionManifestPropertiesService.canExecuteOnWeb(manifest)) {
607
607
  throw ( new Error(( localize(
608
- 12798,
608
+ 13048,
609
609
  "Cannot add '{0}' because this extension is not a web extension.",
610
610
  manifest.displayName || manifest.name
611
611
  ))));
@@ -889,7 +889,7 @@ if (isWeb) {
889
889
  constructor() {
890
890
  super({
891
891
  id: 'workbench.extensions.action.openInstalledWebExtensionsResource',
892
- title: ( localize2(12799, 'Open Installed Web Extensions Resource')),
892
+ title: ( localize2(13049, 'Open Installed Web Extensions Resource')),
893
893
  category: Categories.Developer,
894
894
  f1: true,
895
895
  precondition: IsWebContext
@@ -87,17 +87,17 @@ let ExtensionFeaturesManagementService = class ExtensionFeaturesManagementServic
87
87
  if (feature.access.requireUserConsent) {
88
88
  const extensionDescription = this.extensionService.extensions.find(e => ExtensionIdentifier.equals(e.identifier, extension));
89
89
  const confirmationResult = await this.dialogService.confirm({
90
- title: ( localize(12800, "Access '{0}' Feature", feature.label)),
90
+ title: ( localize(13050, "Access '{0}' Feature", feature.label)),
91
91
  message: ( localize(
92
- 12801,
92
+ 13051,
93
93
  "'{0}' extension would like to access the '{1}' feature.",
94
94
  extensionDescription?.displayName ?? extension._lower,
95
95
  feature.label
96
96
  )),
97
97
  detail: justification ?? feature.description,
98
98
  custom: true,
99
- primaryButton: ( localize(12802, "Allow")),
100
- cancelButton: ( localize(12803, "Don't Allow")),
99
+ primaryButton: ( localize(13052, "Allow")),
100
+ cancelButton: ( localize(13053, "Don't Allow")),
101
101
  });
102
102
  enabled = confirmationResult.confirmed;
103
103
  }
@@ -22,7 +22,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
22
22
  this.remoteExtensionManagementServer = {
23
23
  id: 'remote',
24
24
  extensionManagementService,
25
- get label() { return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(12804, "Remote")); },
25
+ get label() { return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(13054, "Remote")); },
26
26
  };
27
27
  }
28
28
  if (isWeb) {
@@ -30,7 +30,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
30
30
  this.webExtensionManagementServer = {
31
31
  id: 'web',
32
32
  extensionManagementService,
33
- label: ( localize(12805, "Browser")),
33
+ label: ( localize(13055, "Browser")),
34
34
  };
35
35
  }
36
36
  }
@@ -38,7 +38,7 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
38
38
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
39
39
  import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
40
40
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
41
- import { verifiedPublisherIcon } from '@codingame/monaco-vscode-516ccb00-d5b9-5317-baf0-fcc96e99669a-common/vscode/vs/workbench/services/extensionManagement/common/extensionsIcons';
41
+ import { verifiedPublisherIcon } from '@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common/vscode/vs/workbench/services/extensionManagement/common/extensionsIcons';
42
42
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
43
43
  import { CommontExtensionManagementService } from '../../../../platform/extensionManagement/common/abstractExtensionManagementService.js';
44
44
 
@@ -222,7 +222,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
222
222
  getDependentsErrorMessage(extension, dependents) {
223
223
  if (dependents.length === 1) {
224
224
  return localize(
225
- 12806,
225
+ 13056,
226
226
  "Cannot uninstall extension '{0}'. Extension '{1}' depends on this.",
227
227
  extension.manifest.displayName || extension.manifest.name,
228
228
  dependents[0].manifest.displayName || dependents[0].manifest.name
@@ -230,7 +230,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
230
230
  }
231
231
  if (dependents.length === 2) {
232
232
  return localize(
233
- 12807,
233
+ 13057,
234
234
  "Cannot uninstall extension '{0}'. Extensions '{1}' and '{2}' depend on this.",
235
235
  extension.manifest.displayName || extension.manifest.name,
236
236
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -238,7 +238,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
238
238
  );
239
239
  }
240
240
  return localize(
241
- 12808,
241
+ 13058,
242
242
  "Cannot uninstall extension '{0}'. Extensions '{1}', '{2}' and others depend on this.",
243
243
  extension.manifest.displayName || extension.manifest.name,
244
244
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -348,7 +348,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
348
348
  }
349
349
  const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
350
350
  if (!manifest) {
351
- return ( new MarkdownString()).appendText(( localize(12809, "Manifest is not found")));
351
+ return ( new MarkdownString()).appendText(( localize(13059, "Manifest is not found")));
352
352
  }
353
353
  if (this.extensionManagementServerService.remoteExtensionManagementServer
354
354
  && (await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.canInstall(gallery)) === true
@@ -361,7 +361,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
361
361
  return true;
362
362
  }
363
363
  return ( new MarkdownString()).appendText(( localize(
364
- 12810,
364
+ 13060,
365
365
  "Cannot install the '{0}' extension because it is not available in this setup.",
366
366
  gallery.displayName || gallery.name
367
367
  )));
@@ -377,7 +377,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
377
377
  return true;
378
378
  }
379
379
  return ( new MarkdownString()).appendText(( localize(
380
- 12810,
380
+ 13060,
381
381
  "Cannot install the '{0}' extension because it is not available in this setup.",
382
382
  extension.manifest.displayName ?? extension.identifier.id
383
383
  )));
@@ -406,7 +406,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
406
406
  const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
407
407
  if (!manifest) {
408
408
  throw ( new Error(( localize(
409
- 12811,
409
+ 13061,
410
410
  "Installing Extension {0} failed: Manifest is not found.",
411
411
  extension.displayName || extension.name
412
412
  ))));
@@ -425,7 +425,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
425
425
  const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
426
426
  if (!manifest) {
427
427
  throw ( new Error(( localize(
428
- 12811,
428
+ 13061,
429
429
  "Installing Extension {0} failed: Manifest is not found.",
430
430
  extension.displayName || extension.name
431
431
  ))));
@@ -473,7 +473,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
473
473
  const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
474
474
  if (!manifest) {
475
475
  throw ( new Error(( localize(
476
- 12811,
476
+ 13061,
477
477
  "Installing Extension {0} failed: Manifest is not found.",
478
478
  gallery.displayName || gallery.name
479
479
  ))));
@@ -577,7 +577,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
577
577
  const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
578
578
  if (!manifest) {
579
579
  return Promise.reject(( localize(
580
- 12811,
580
+ 13061,
581
581
  "Installing Extension {0} failed: Manifest is not found.",
582
582
  gallery.displayName || gallery.name
583
583
  )));
@@ -627,7 +627,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
627
627
  for (const server of servers) {
628
628
  if (!installableServers.includes(server)) {
629
629
  const error = ( new Error(( localize(
630
- 12812,
630
+ 13062,
631
631
  "Cannot install the '{0}' extension because it is not available in the '{1}' setup.",
632
632
  gallery.displayName || gallery.name,
633
633
  server.label
@@ -651,7 +651,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
651
651
  }
652
652
  if (!servers.length) {
653
653
  const error = ( new Error(( localize(
654
- 12810,
654
+ 13060,
655
655
  "Cannot install the '{0}' extension because it is not available in this setup.",
656
656
  gallery.displayName || gallery.name
657
657
  ))));
@@ -689,24 +689,24 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
689
689
  if (this.isExtensionsSyncEnabled()) {
690
690
  const { result } = await this.dialogService.prompt({
691
691
  type: Severity.Info,
692
- message: extensions.length === 1 ? ( localize(12813, "Install Extension")) : ( localize(12814, "Install Extensions")),
692
+ message: extensions.length === 1 ? ( localize(13063, "Install Extension")) : ( localize(13064, "Install Extensions")),
693
693
  detail: extensions.length === 1
694
694
  ? ( localize(
695
- 12815,
695
+ 13065,
696
696
  "Would you like to install and synchronize '{0}' extension across your devices?",
697
697
  extensions[0].displayName
698
698
  ))
699
699
  : ( localize(
700
- 12816,
700
+ 13066,
701
701
  "Would you like to install and synchronize extensions across your devices?"
702
702
  )),
703
703
  buttons: [
704
704
  {
705
- label: ( localize(12817, "&&Install")),
705
+ label: ( localize(13067, "&&Install")),
706
706
  run: () => false
707
707
  },
708
708
  {
709
- label: ( localize(12818, "Install (Do &&not sync)")),
709
+ label: ( localize(13068, "Install (Do &&not sync)")),
710
710
  run: () => true
711
711
  }
712
712
  ],
@@ -755,7 +755,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
755
755
  const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
756
756
  if (!manifest) {
757
757
  throw ( new Error(( localize(
758
- 12811,
758
+ 13061,
759
759
  "Installing Extension {0} failed: Manifest is not found.",
760
760
  extension.displayName || extension.name
761
761
  ))));
@@ -787,7 +787,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
787
787
  const unverfiiedPublishers = allPublishers.filter(p => !p.publisherDomain?.verified);
788
788
  const verifiedPublishers = allPublishers.filter(p => p.publisherDomain?.verified);
789
789
  const installButton = {
790
- label: allPublishers.length > 1 ? ( localize(12819, "Trust Publishers & &&Install")) : ( localize(12820, "Trust Publisher & &&Install")),
790
+ label: allPublishers.length > 1 ? ( localize(13069, "Trust Publishers & &&Install")) : ( localize(13070, "Trust Publisher & &&Install")),
791
791
  run: () => {
792
792
  this.telemetryService.publicLog2('extensions:trustPublisher', { action: 'trust', extensionId: ( untrustedExtensions.map(e => e.identifier.id)).join(',') });
793
793
  this.trustPublishers(...( allPublishers.map(
@@ -796,7 +796,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
796
796
  }
797
797
  };
798
798
  const learnMoreButton = {
799
- label: ( localize(12821, "&&Learn More")),
799
+ label: ( localize(13071, "&&Learn More")),
800
800
  run: () => {
801
801
  this.telemetryService.publicLog2('extensions:trustPublisher', { action: 'learn', extensionId: ( untrustedExtensions.map(e => e.identifier.id)).join(',') });
802
802
  this.instantiationService.invokeFunction(accessor => accessor.get(ICommandService).executeCommand('vscode.open', ( URI.parse('https://aka.ms/vscode-extension-security'))));
@@ -809,19 +809,19 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
809
809
  const unverifiedLink = 'https://aka.ms/vscode-verify-publisher';
810
810
  const title = allPublishers.length === 1
811
811
  ? ( localize(
812
- 12822,
812
+ 13072,
813
813
  "Do you trust the publisher \"{0}\"?",
814
814
  allPublishers[0].publisherDisplayName
815
815
  ))
816
816
  : allPublishers.length === 2
817
817
  ? ( localize(
818
- 12823,
818
+ 13073,
819
819
  "Do you trust publishers \"{0}\" and \"{1}\"?",
820
820
  allPublishers[0].publisherDisplayName,
821
821
  allPublishers[1].publisherDisplayName
822
822
  ))
823
823
  : ( localize(
824
- 12824,
824
+ 13074,
825
825
  "Do you trust the publisher \"{0}\" and {1} others?",
826
826
  allPublishers[0].publisherDisplayName,
827
827
  allPublishers.length - 1
@@ -832,7 +832,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
832
832
  const manifest = untrustedExtensionManifests[0];
833
833
  if (otherUntrustedPublishers.length) {
834
834
  customMessage.appendMarkdown(( localize(
835
- 12825,
835
+ 13075,
836
836
  "The extension {0} is published by {1}.",
837
837
  `[${extension.displayName}](${extension.detailsLink})`,
838
838
  getPublisherLink(extension)
@@ -843,7 +843,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
843
843
  )).toString());
844
844
  if (otherUntrustedPublishers.length === 1) {
845
845
  customMessage.appendMarkdown(( localize(
846
- 12826,
846
+ 13076,
847
847
  "Installing this extension will also install [extensions]({0}) published by {1}.",
848
848
  commandUri,
849
849
  getPublisherLink(otherUntrustedPublishers[0])
@@ -851,7 +851,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
851
851
  }
852
852
  else {
853
853
  customMessage.appendMarkdown(( localize(
854
- 12827,
854
+ 13077,
855
855
  "Installing this extension will also install [extensions]({0}) published by {1} and {2}.",
856
856
  commandUri,
857
857
  ( otherUntrustedPublishers.slice(0, otherUntrustedPublishers.length - 1).map(p => getPublisherLink(p))).join(', '),
@@ -860,13 +860,13 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
860
860
  }
861
861
  customMessage.appendMarkdown('&nbsp;');
862
862
  customMessage.appendMarkdown(( localize(
863
- 12828,
863
+ 13078,
864
864
  "This is the first time you're installing extensions from these publishers."
865
865
  )));
866
866
  }
867
867
  else {
868
868
  customMessage.appendMarkdown(( localize(
869
- 12829,
869
+ 13079,
870
870
  "The extension {0} is published by {1}. This is the first extension you're installing from this publisher.",
871
871
  `[${extension.displayName}](${extension.detailsLink})`,
872
872
  getPublisherLink(extension)
@@ -875,7 +875,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
875
875
  }
876
876
  else {
877
877
  customMessage.appendMarkdown(( localize(
878
- 12830,
878
+ 13080,
879
879
  "This is the first time you're installing extensions from publishers {0} and {1}.",
880
880
  getPublisherLink(allPublishers[0]),
881
881
  getPublisherLink(allPublishers[allPublishers.length - 1])
@@ -885,7 +885,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
885
885
  for (const publisher of verifiedPublishers) {
886
886
  customMessage.appendText('\n');
887
887
  const publisherVerifiedMessage = ( localize(
888
- 12831,
888
+ 13081,
889
889
  "{0} has verified ownership of {1}.",
890
890
  getPublisherLink(publisher),
891
891
  `[$(link-external) ${( URI.parse(publisher.publisherDomain.link)).authority}](${publisher.publisherDomain.link})`
@@ -896,7 +896,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
896
896
  customMessage.appendText('\n');
897
897
  if (unverfiiedPublishers.length === 1) {
898
898
  customMessage.appendMarkdown(`$(${Codicon.unverified.id})&nbsp;${( localize(
899
- 12832,
899
+ 13082,
900
900
  "{0} is [**not** verified]({1}).",
901
901
  getPublisherLink(unverfiiedPublishers[0]),
902
902
  unverifiedLink
@@ -904,7 +904,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
904
904
  }
905
905
  else {
906
906
  customMessage.appendMarkdown(`$(${Codicon.unverified.id})&nbsp;${( localize(
907
- 12833,
907
+ 13083,
908
908
  "{0} and {1} are [**not** verified]({2}).",
909
909
  ( unverfiiedPublishers.slice(0, unverfiiedPublishers.length - 1).map(p => getPublisherLink(p))).join(', '),
910
910
  getPublisherLink(unverfiiedPublishers[unverfiiedPublishers.length - 1]),
@@ -915,19 +915,19 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
915
915
  }
916
916
  else {
917
917
  customMessage.appendText('\n');
918
- customMessage.appendMarkdown(`$(${Codicon.unverified.id})&nbsp;${( localize(12834, "All publishers are [**not** verified]({0}).", unverifiedLink))}`);
918
+ customMessage.appendMarkdown(`$(${Codicon.unverified.id})&nbsp;${( localize(13084, "All publishers are [**not** verified]({0}).", unverifiedLink))}`);
919
919
  }
920
920
  customMessage.appendText('\n');
921
921
  if (allPublishers.length > 1) {
922
922
  customMessage.appendMarkdown(( localize(
923
- 12835,
923
+ 13085,
924
924
  "{0} has no control over the behavior of third-party extensions, including how they manage your personal data. Proceed only if you trust the publishers.",
925
925
  this.productService.nameLong
926
926
  )));
927
927
  }
928
928
  else {
929
929
  customMessage.appendMarkdown(( localize(
930
- 12836,
930
+ 13086,
931
931
  "{0} has no control over the behavior of third-party extensions, including how they manage your personal data. Proceed only if you trust the publisher.",
932
932
  this.productService.nameLong
933
933
  )));
@@ -1006,13 +1006,13 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
1006
1006
  async checkForWorkspaceTrust(manifest, requireTrust) {
1007
1007
  if (requireTrust || this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(manifest) === false) {
1008
1008
  const buttons = [];
1009
- buttons.push({ label: ( localize(12837, "Trust Workspace & Install")), type: 'ContinueWithTrust' });
1009
+ buttons.push({ label: ( localize(13087, "Trust Workspace & Install")), type: 'ContinueWithTrust' });
1010
1010
  if (!requireTrust) {
1011
- buttons.push({ label: ( localize(12838, "Install")), type: 'ContinueWithoutTrust' });
1011
+ buttons.push({ label: ( localize(13088, "Install")), type: 'ContinueWithoutTrust' });
1012
1012
  }
1013
- buttons.push({ label: ( localize(12839, "Learn More")), type: 'Manage' });
1013
+ buttons.push({ label: ( localize(13089, "Learn More")), type: 'Manage' });
1014
1014
  const trustState = await this.workspaceTrustRequestService.requestWorkspaceTrust({
1015
- message: ( localize(12840, "Enabling this extension requires a trusted workspace.")),
1015
+ message: ( localize(13090, "Enabling this extension requires a trusted workspace.")),
1016
1016
  buttons
1017
1017
  });
1018
1018
  if (trustState === undefined) {
@@ -1036,7 +1036,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
1036
1036
  throw ( new ExtensionManagementError('Not supported in Web', ExtensionManagementErrorCode.Unsupported));
1037
1037
  }
1038
1038
  }
1039
- const productName = ( localize(12841, "{0} for the Web", this.productService.nameLong));
1039
+ const productName = ( localize(13091, "{0} for the Web", this.productService.nameLong));
1040
1040
  const virtualWorkspaceSupport = this.extensionManifestPropertiesService.getExtensionVirtualWorkspaceSupportType(manifest);
1041
1041
  const virtualWorkspaceSupportReason = getWorkspaceSupportTypeMessage(manifest.capabilities?.virtualWorkspaces);
1042
1042
  const hasLimitedSupport = virtualWorkspaceSupport === 'limited' || !!virtualWorkspaceSupportReason;
@@ -1044,7 +1044,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
1044
1044
  return;
1045
1045
  }
1046
1046
  const limitedSupportMessage = ( localize(
1047
- 12842,
1047
+ 13092,
1048
1048
  "'{0}' has limited functionality in {1}.",
1049
1049
  extension.displayName || extension.identifier.id,
1050
1050
  productName
@@ -1053,16 +1053,16 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
1053
1053
  let buttons = [];
1054
1054
  let detail;
1055
1055
  const installAnywayButton = {
1056
- label: ( localize(12843, "&&Install Anyway")),
1056
+ label: ( localize(13093, "&&Install Anyway")),
1057
1057
  run: () => { }
1058
1058
  };
1059
1059
  const showExtensionsButton = {
1060
- label: ( localize(12844, "&&Show Extensions")),
1060
+ label: ( localize(13094, "&&Show Extensions")),
1061
1061
  run: () => this.instantiationService.invokeFunction(accessor => accessor.get(ICommandService).executeCommand('extension.open', extension.identifier.id, 'extensionPack'))
1062
1062
  };
1063
1063
  if (nonWebExtensions.length && hasLimitedSupport) {
1064
1064
  message = limitedSupportMessage;
1065
- detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ''}${( localize(12845, "Contains extensions which are not supported."))}`;
1065
+ detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ''}${( localize(13095, "Contains extensions which are not supported."))}`;
1066
1066
  buttons = [
1067
1067
  installAnywayButton,
1068
1068
  showExtensionsButton
@@ -1075,7 +1075,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
1075
1075
  }
1076
1076
  else {
1077
1077
  message = ( localize(
1078
- 12846,
1078
+ 13096,
1079
1079
  "'{0}' contains extensions which are not supported in {1}.",
1080
1080
  extension.displayName || extension.identifier.id,
1081
1081
  productName
@@ -1362,7 +1362,7 @@ let WorkspaceExtensionsManagementService = class WorkspaceExtensionsManagementSe
1362
1362
  if (extension.manifest.main) {
1363
1363
  if (!(await this.fileService.exists(this.uriIdentityService.extUri.joinPath(extension.location, extension.manifest.main)))) {
1364
1364
  isValid = false;
1365
- validations.push([Severity.Error, ( localize(12847, "Cannot activate because {0} not found", extension.manifest.main))]);
1365
+ validations.push([Severity.Error, ( localize(13097, "Cannot activate because {0} not found", extension.manifest.main))]);
1366
1366
  }
1367
1367
  }
1368
1368
  return {