@codingame/monaco-vscode-user-data-profile-service-override 6.0.3 → 7.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/package.json +2 -2
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +41 -20
- package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +193 -87
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +349 -253
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +452 -125
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +24 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +190 -92
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +5 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
3
|
+
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
3
4
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
6
|
import { GlobalExtensionEnablementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
@@ -106,7 +107,7 @@ let ExtensionsResource = class ExtensionsResource {
|
|
|
106
107
|
toContent(extensions, exclude) {
|
|
107
108
|
return JSON.stringify(exclude?.length ? extensions.filter(e => !exclude.includes(e.identifier.id.toLowerCase())) : extensions);
|
|
108
109
|
}
|
|
109
|
-
async apply(content, profile) {
|
|
110
|
+
async apply(content, profile, progress, token) {
|
|
110
111
|
return this.withProfileScopedServices(profile, async (extensionEnablementService) => {
|
|
111
112
|
const profileExtensions = await this.getProfileExtensions(content);
|
|
112
113
|
const installedExtensions = await this.extensionManagementService.getInstalled(undefined, profile.extensionsResource);
|
|
@@ -164,7 +165,23 @@ let ExtensionsResource = class ExtensionsResource {
|
|
|
164
165
|
}
|
|
165
166
|
}))));
|
|
166
167
|
if (installExtensionInfos.length) {
|
|
167
|
-
|
|
168
|
+
if (token) {
|
|
169
|
+
for (const installExtensionInfo of installExtensionInfos) {
|
|
170
|
+
if (token.isCancellationRequested) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
progress?.(( localizeWithPath(
|
|
174
|
+
_moduleId,
|
|
175
|
+
0,
|
|
176
|
+
"Installing extension {0}...",
|
|
177
|
+
installExtensionInfo.extension.displayName ?? installExtensionInfo.extension.identifier.id
|
|
178
|
+
)));
|
|
179
|
+
await this.extensionManagementService.installFromGallery(installExtensionInfo.extension, installExtensionInfo.options);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
await this.extensionManagementService.installGalleryExtensions(installExtensionInfos);
|
|
184
|
+
}
|
|
168
185
|
}
|
|
169
186
|
this.logService.info(`Importing Profile (${profile.name}): Finished installing extensions.`);
|
|
170
187
|
}
|
|
@@ -247,7 +264,7 @@ class ExtensionsResourceTreeItem {
|
|
|
247
264
|
constructor() {
|
|
248
265
|
this.type = ProfileResourceType.Extensions;
|
|
249
266
|
this.handle = ProfileResourceType.Extensions;
|
|
250
|
-
this.label = { label: ( localizeWithPath(_moduleId,
|
|
267
|
+
this.label = { label: ( localizeWithPath(_moduleId, 1, "Extensions")) };
|
|
251
268
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
252
269
|
this.contextValue = ProfileResourceType.Extensions;
|
|
253
270
|
this.excludedExtensions = ( (new Set()));
|
|
@@ -260,7 +277,7 @@ class ExtensionsResourceTreeItem {
|
|
|
260
277
|
handle: e.identifier.id.toLowerCase(),
|
|
261
278
|
parent: this,
|
|
262
279
|
label: { label: e.displayName || e.identifier.id },
|
|
263
|
-
description: e.disabled ? ( localizeWithPath(_moduleId,
|
|
280
|
+
description: e.disabled ? ( localizeWithPath(_moduleId, 2, "Disabled")) : undefined,
|
|
264
281
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
265
282
|
checkbox: that.checkbox ? {
|
|
266
283
|
get isChecked() { return !( (that.excludedExtensions.has(e.identifier.id.toLowerCase()))); },
|
|
@@ -272,11 +289,12 @@ class ExtensionsResourceTreeItem {
|
|
|
272
289
|
that.excludedExtensions.add(e.identifier.id.toLowerCase());
|
|
273
290
|
}
|
|
274
291
|
},
|
|
275
|
-
tooltip: ( localizeWithPath(_moduleId,
|
|
292
|
+
tooltip: ( localizeWithPath(_moduleId, 3, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
276
293
|
accessibilityInformation: {
|
|
277
|
-
label: ( localizeWithPath(_moduleId,
|
|
294
|
+
label: ( localizeWithPath(_moduleId, 3, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
278
295
|
}
|
|
279
296
|
} : undefined,
|
|
297
|
+
themeIcon: Codicon.extensions,
|
|
280
298
|
command: {
|
|
281
299
|
id: 'extension.open',
|
|
282
300
|
title: '',
|