@codingame/monaco-vscode-extension-gallery-service-override 32.0.2 → 33.0.6

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 (16) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +16 -16
  3. package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
  4. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts +76 -0
  5. package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +470 -0
  6. package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.d.ts +1 -1
  7. package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.js +1 -1
  8. package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +5 -2
  9. package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css +86 -0
  10. package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.d.ts +15 -0
  12. package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +47 -0
  13. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +14 -14
  14. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js +4 -4
  15. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +2 -2
  16. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +46 -46
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-extension-gallery-service-override",
3
- "version": "32.0.2",
3
+ "version": "33.0.6",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - extension-gallery service-override",
6
6
  "keywords": [],
7
+ "license": "MIT",
7
8
  "author": {
8
9
  "name": "CodinGame",
9
10
  "url": "http://www.codingame.com"
10
11
  },
11
- "license": "MIT",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "32.0.2"
18
+ "@codingame/monaco-vscode-api": "33.0.6"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -36,7 +36,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
36
36
  });
37
37
  if (allowedToInstall !== true) {
38
38
  return (new MarkdownString(localize(
39
- 1859,
39
+ 1881,
40
40
  "This extension cannot be installed because {0}",
41
41
  allowedToInstall.value
42
42
  )));
@@ -44,12 +44,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
44
44
  if (!(await this.isExtensionPlatformCompatible(extension))) {
45
45
  const learnLink = isWeb ? "https://aka.ms/vscode-web-extensions-guide" : "https://aka.ms/vscode-platform-specific-extensions";
46
46
  return (new MarkdownString(`${( localize(
47
- 1860,
47
+ 1882,
48
48
  "The '{0}' extension is not available in {1} for the {2} platform.",
49
49
  extension.displayName ?? extension.identifier.id,
50
50
  this.productService.nameLong,
51
51
  TargetPlatformToString(await this.getTargetPlatform())
52
- ))} [${( localize(1861, "Learn Why"))}](${learnLink})`));
52
+ ))} [${( localize(1883, "Learn Why"))}](${learnLink})`));
53
53
  }
54
54
  return true;
55
55
  }
@@ -146,7 +146,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
146
146
  }
147
147
  async installGalleryExtensions(extensions) {
148
148
  if (!this.galleryService.isEnabled()) {
149
- throw ( new ExtensionManagementError(( localize(1862, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
149
+ throw ( new ExtensionManagementError(( localize(1884, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
150
150
  }
151
151
  const results = [];
152
152
  const installableExtensions = [];
@@ -833,7 +833,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
833
833
  const extensionsControlManifest = await this.getExtensionsControlManifest();
834
834
  if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
835
835
  throw ( new ExtensionManagementError(( localize(
836
- 1863,
836
+ 1885,
837
837
  "Can't install '{0}' extension since it was reported to be problematic.",
838
838
  extension.identifier.id
839
839
  )), ExtensionManagementErrorCode.Malicious));
@@ -853,7 +853,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
853
853
  }, CancellationToken.None))[0];
854
854
  if (!compatibleExtension) {
855
855
  throw ( new ExtensionManagementError(( localize(
856
- 1864,
856
+ 1886,
857
857
  "Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
858
858
  extension.identifier.id,
859
859
  deprecationInfo.extension.id
@@ -863,7 +863,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
863
863
  if ((await this.canInstall(extension)) !== true) {
864
864
  const targetPlatform = await this.getTargetPlatform();
865
865
  throw ( new ExtensionManagementError(( localize(
866
- 1860,
866
+ 1882,
867
867
  "The '{0}' extension is not available in {1} for the {2} platform.",
868
868
  extension.identifier.id,
869
869
  this.productService.nameLong,
@@ -878,7 +878,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
878
878
  incompatibleApiProposalsMessages
879
879
  )) {
880
880
  throw ( new ExtensionManagementError(( localize(
881
- 1865,
881
+ 1887,
882
882
  "Can't install '{0}' extension. {1}",
883
883
  extension.displayName ?? extension.identifier.id,
884
884
  incompatibleApiProposalsMessages[0]
@@ -886,13 +886,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
886
886
  }
887
887
  if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
888
888
  throw ( new ExtensionManagementError(( localize(
889
- 1866,
889
+ 1888,
890
890
  "Can't install release version of '{0}' extension because it has no release version.",
891
891
  extension.displayName ?? extension.identifier.id
892
892
  )), ExtensionManagementErrorCode.ReleaseVersionNotFound));
893
893
  }
894
894
  throw ( new ExtensionManagementError(( localize(
895
- 1867,
895
+ 1889,
896
896
  "Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
897
897
  extension.identifier.id,
898
898
  this.productService.nameLong,
@@ -1212,7 +1212,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1212
1212
  if (extensionToUninstall === dependingExtension) {
1213
1213
  if (dependents.length === 1) {
1214
1214
  return localize(
1215
- 1868,
1215
+ 1890,
1216
1216
  "Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
1217
1217
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1218
1218
  dependents[0].manifest.displayName || dependents[0].manifest.name
@@ -1220,7 +1220,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1220
1220
  }
1221
1221
  if (dependents.length === 2) {
1222
1222
  return localize(
1223
- 1869,
1223
+ 1891,
1224
1224
  "Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
1225
1225
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1226
1226
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -1228,7 +1228,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1228
1228
  );
1229
1229
  }
1230
1230
  return localize(
1231
- 1870,
1231
+ 1892,
1232
1232
  "Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
1233
1233
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1234
1234
  dependents[0].manifest.displayName || dependents[0].manifest.name,
@@ -1237,7 +1237,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1237
1237
  }
1238
1238
  if (dependents.length === 1) {
1239
1239
  return localize(
1240
- 1871,
1240
+ 1893,
1241
1241
  "Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
1242
1242
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1243
1243
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -1246,7 +1246,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1246
1246
  }
1247
1247
  if (dependents.length === 2) {
1248
1248
  return localize(
1249
- 1872,
1249
+ 1894,
1250
1250
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
1251
1251
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1252
1252
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -1255,7 +1255,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
1255
1255
  );
1256
1256
  }
1257
1257
  return localize(
1258
- 1873,
1258
+ 1895,
1259
1259
  "Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
1260
1260
  extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
1261
1261
  dependingExtension.manifest.displayName || dependingExtension.manifest.name,
@@ -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(1874, "it is not in the [allowed list]({0})", settingsCommandLink))));
80
+ const extensionReason = ( new MarkdownString(( localize(1896, "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
- 1875,
87
+ 1897,
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
- 1876,
110
+ 1898,
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
- 1877,
123
+ 1899,
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
- 1878,
131
+ 1900,
132
132
  "the pre-release versions from this publisher are not in the [allowed list]({1})",
133
133
  publisherKey,
134
134
  settingsCommandLink
@@ -0,0 +1,76 @@
1
+ import { Dimension } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
2
+ import { Action } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
3
+ import { Action2 } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
4
+ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
5
+ import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
6
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
7
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
8
+ import { ExtensionIdentifier, IExtensionDescription } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
9
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
10
+ import { IInstantiationService, ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
11
+ import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
12
+ import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
13
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
14
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
15
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
16
+ import { EditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane";
17
+ import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService";
18
+ import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
19
+ import { IExtensionFeaturesManagementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures.service";
20
+ import { IExtensionHostProfile, IExtensionsStatus } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions";
21
+ import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
22
+ import { IExtension } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions";
23
+ import { IExtensionsWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service";
24
+ interface IExtensionProfileInformation {
25
+ /**
26
+ * segment when the extension was running.
27
+ * 2*i = segment start time
28
+ * 2*i+1 = segment end time
29
+ */
30
+ segments: number[];
31
+ /**
32
+ * total time when the extension was running.
33
+ * (sum of all segment lengths).
34
+ */
35
+ totalTime: number;
36
+ }
37
+ export interface IRuntimeExtension {
38
+ originalIndex: number;
39
+ description: IExtensionDescription;
40
+ marketplaceInfo: IExtension | undefined;
41
+ status: IExtensionsStatus;
42
+ profileInfo?: IExtensionProfileInformation;
43
+ unresponsiveProfile?: IExtensionHostProfile;
44
+ }
45
+ export declare abstract class AbstractRuntimeExtensionsEditor extends EditorPane {
46
+ private readonly contextKeyService;
47
+ private readonly _extensionsWorkbenchService;
48
+ private readonly _extensionService;
49
+ private readonly _notificationService;
50
+ private readonly _contextMenuService;
51
+ protected readonly _instantiationService: IInstantiationService;
52
+ private readonly _labelService;
53
+ private readonly _environmentService;
54
+ private readonly _clipboardService;
55
+ private readonly _extensionFeaturesManagementService;
56
+ private readonly _hoverService;
57
+ private readonly _menuService;
58
+ static readonly ID: string;
59
+ private _list;
60
+ private _elements;
61
+ private _updateSoon;
62
+ constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, contextKeyService: IContextKeyService, _extensionsWorkbenchService: IExtensionsWorkbenchService, _extensionService: IExtensionService, _notificationService: INotificationService, _contextMenuService: IContextMenuService, _instantiationService: IInstantiationService, storageService: IStorageService, _labelService: ILabelService, _environmentService: IWorkbenchEnvironmentService, _clipboardService: IClipboardService, _extensionFeaturesManagementService: IExtensionFeaturesManagementService, _hoverService: IHoverService, _menuService: IMenuService);
63
+ protected _updateExtensions(): Promise<void>;
64
+ private _resolveExtensions;
65
+ protected createEditor(parent: HTMLElement): void;
66
+ layout(dimension: Dimension): void;
67
+ protected abstract _getProfileInfo(): IExtensionHostProfile | null;
68
+ protected abstract _getUnresponsiveProfile(extensionId: ExtensionIdentifier): IExtensionHostProfile | undefined;
69
+ protected abstract _createSlowExtensionAction(element: IRuntimeExtension): Action | null;
70
+ protected abstract _createReportExtensionIssueAction(element: IRuntimeExtension): Action | null;
71
+ }
72
+ export declare class ShowRuntimeExtensionsAction extends Action2 {
73
+ constructor();
74
+ run(accessor: ServicesAccessor): Promise<void>;
75
+ }
76
+ export {};