@codingame/monaco-vscode-user-data-profile-service-override 9.0.2 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/_virtual/semver.js +5 -0
  2. package/package.json +2 -2
  3. package/userDataProfile.js +10 -5
  4. package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +10 -8
  5. package/vscode/src/vs/platform/userDataSync/common/extensionsMerge.js +1 -1
  6. package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +20 -20
  7. package/vscode/src/vs/platform/userDataSync/common/globalStateSync.js +25 -26
  8. package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +27 -28
  9. package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +21 -24
  10. package/vscode/src/vs/platform/userDataSync/common/snippetsSync.js +40 -40
  11. package/vscode/src/vs/platform/userDataSync/common/tasksSync.js +14 -14
  12. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +2 -2
  14. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +26 -24
  15. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
  16. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +577 -138
  17. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +242 -103
  18. package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +1 -2
  19. package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +11 -11
  20. package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +9 -11
  21. package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +5 -6
  22. package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +7 -8
  23. package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +5 -6
  24. package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +5 -6
  25. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +44 -46
  26. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +7 -9
  27. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +75 -34
  28. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +3 -4
  29. package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +13 -15
  30. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js +0 -1
@@ -2,7 +2,6 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
3
3
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
4
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
5
- import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
6
5
  import { isWeb } from 'vscode/vscode/vs/base/common/platform';
7
6
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
8
7
  import { mark } from 'vscode/vscode/vs/base/common/performance';
@@ -57,7 +56,7 @@ InitializeOtherResourcesContribution = ( __decorate([
57
56
  ], InitializeOtherResourcesContribution));
58
57
  if (isWeb) {
59
58
  const workbenchRegistry = ( Registry.as(Extensions.Workbench));
60
- workbenchRegistry.registerWorkbenchContribution(InitializeOtherResourcesContribution, LifecyclePhase.Restored);
59
+ workbenchRegistry.registerWorkbenchContribution(InitializeOtherResourcesContribution, 3 );
61
60
  }
62
61
 
63
62
  export { UserDataInitializationService };
@@ -7,12 +7,10 @@ import { GlobalExtensionEnablementService } from 'vscode/vscode/vs/platform/exte
7
7
  import { EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
8
8
  import { IExtensionManagementService, IExtensionGalleryService, IGlobalExtensionEnablementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
9
9
  import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
10
- import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
11
10
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
12
11
  import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
13
12
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
14
13
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
15
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
16
14
  import { IUserDataProfileStorageService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfileStorageService.service';
17
15
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
18
16
  import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
@@ -170,7 +168,7 @@ let ExtensionsResource = class ExtensionsResource {
170
168
  return;
171
169
  }
172
170
  progress?.(( localize(
173
- 8851,
171
+ 8912,
174
172
  "Installing extension {0}...",
175
173
  installExtensionInfo.extension.displayName ?? installExtensionInfo.extension.identifier.id
176
174
  )));
@@ -192,7 +190,7 @@ let ExtensionsResource = class ExtensionsResource {
192
190
  await this.extensionManagementService.copyExtensions(from.extensionsResource, to.extensionsResource);
193
191
  const extensionsToDisable = await this.withProfileScopedServices(from, async (extensionEnablementService) => extensionEnablementService.getDisabledExtensions());
194
192
  if (disableExtensions) {
195
- const extensions = await this.extensionManagementService.getInstalled(ExtensionType.User, to.extensionsResource);
193
+ const extensions = await this.extensionManagementService.getInstalled(1 , to.extensionsResource);
196
194
  for (const extension of extensions) {
197
195
  extensionsToDisable.push(extension.identifier);
198
196
  }
@@ -229,6 +227,7 @@ let ExtensionsResource = class ExtensionsResource {
229
227
  if (!profileExtension.version && preRelease) {
230
228
  profileExtension.preRelease = true;
231
229
  }
230
+ profileExtension.applicationScoped = extension.isApplicationScoped;
232
231
  result.set(profileExtension.identifier.id.toLowerCase(), profileExtension);
233
232
  }
234
233
  return [...( (result.values()))];
@@ -260,11 +259,11 @@ ExtensionsResource = ( (__decorate([
260
259
  ], ExtensionsResource)));
261
260
  class ExtensionsResourceTreeItem {
262
261
  constructor() {
263
- this.type = ProfileResourceType.Extensions;
264
- this.handle = ProfileResourceType.Extensions;
265
- this.label = { label: ( localize(8852, "Extensions")) };
262
+ this.type = "extensions" ;
263
+ this.handle = "extensions" ;
264
+ this.label = { label: ( localize(8913, "Extensions")) };
266
265
  this.collapsibleState = TreeItemCollapsibleState.Expanded;
267
- this.contextValue = ProfileResourceType.Extensions;
266
+ this.contextValue = "extensions" ;
268
267
  this.excludedExtensions = ( (new Set()));
269
268
  }
270
269
  async getChildren() {
@@ -272,10 +271,11 @@ class ExtensionsResourceTreeItem {
272
271
  const that = this;
273
272
  return (
274
273
  (extensions.map(e => ({
274
+ ...e,
275
275
  handle: e.identifier.id.toLowerCase(),
276
276
  parent: this,
277
277
  label: { label: e.displayName || e.identifier.id },
278
- description: e.disabled ? ( localize(8853, "Disabled")) : undefined,
278
+ description: e.applicationScoped ? ( localize(8914, "All Profiles")) : undefined,
279
279
  collapsibleState: TreeItemCollapsibleState.None,
280
280
  checkbox: that.checkbox ? {
281
281
  get isChecked() { return !( (that.excludedExtensions.has(e.identifier.id.toLowerCase()))); },
@@ -287,9 +287,9 @@ class ExtensionsResourceTreeItem {
287
287
  that.excludedExtensions.add(e.identifier.id.toLowerCase());
288
288
  }
289
289
  },
290
- tooltip: ( localize(8854, "Select {0} Extension", e.displayName || e.identifier.id)),
290
+ tooltip: ( localize(8915, "Select {0} Extension", e.displayName || e.identifier.id)),
291
291
  accessibilityInformation: {
292
- label: ( localize(8854, "Select {0} Extension", e.displayName || e.identifier.id)),
292
+ label: ( localize(8915, "Select {0} Extension", e.displayName || e.identifier.id)),
293
293
  }
294
294
  } : undefined,
295
295
  themeIcon: Codicon.extensions,
@@ -2,10 +2,8 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
4
4
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
5
- import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
6
5
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
7
6
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
8
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
9
7
  import { IUserDataProfileStorageService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfileStorageService.service';
10
8
  import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
11
9
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
@@ -20,7 +18,7 @@ let GlobalStateResourceInitializer = class GlobalStateResourceInitializer {
20
18
  if (storageKeys.length) {
21
19
  const storageEntries = [];
22
20
  for (const key of storageKeys) {
23
- storageEntries.push({ key, value: globalState.storage[key], scope: StorageScope.PROFILE, target: StorageTarget.USER });
21
+ storageEntries.push({ key, value: globalState.storage[key], scope: 0 , target: 0 });
24
22
  }
25
23
  this.storageService.storeAll(storageEntries, true);
26
24
  }
@@ -47,7 +45,7 @@ let GlobalStateResource = class GlobalStateResource {
47
45
  const storage = {};
48
46
  const storageData = await this.userDataProfileStorageService.readStorageData(profile);
49
47
  for (const [key, value] of storageData) {
50
- if (value.value !== undefined && value.target === StorageTarget.USER) {
48
+ if (value.value !== undefined && value.target === 0 ) {
51
49
  storage[key] = value.value;
52
50
  }
53
51
  }
@@ -58,9 +56,9 @@ let GlobalStateResource = class GlobalStateResource {
58
56
  if (storageKeys.length) {
59
57
  const updatedStorage = ( (new Map()));
60
58
  const nonProfileKeys = [
61
- ...( (this.storageService.keys(StorageScope.APPLICATION, StorageTarget.MACHINE))),
62
- ...( (this.storageService.keys(StorageScope.WORKSPACE, StorageTarget.USER))),
63
- ...( (this.storageService.keys(StorageScope.WORKSPACE, StorageTarget.MACHINE))),
59
+ ...( (this.storageService.keys(-1, 1 ))),
60
+ ...( (this.storageService.keys(1, 0 ))),
61
+ ...( (this.storageService.keys(1, 1 ))),
64
62
  ];
65
63
  for (const key of storageKeys) {
66
64
  if (nonProfileKeys.includes(key)) {
@@ -70,7 +68,7 @@ let GlobalStateResource = class GlobalStateResource {
70
68
  updatedStorage.set(key, globalState.storage[key]);
71
69
  }
72
70
  }
73
- await this.userDataProfileStorageService.updateStorageData(profile, updatedStorage, StorageTarget.USER);
71
+ await this.userDataProfileStorageService.updateStorageData(profile, updatedStorage, 0 );
74
72
  }
75
73
  }
76
74
  };
@@ -83,9 +81,9 @@ class GlobalStateResourceTreeItem {
83
81
  constructor(resource, uriIdentityService) {
84
82
  this.resource = resource;
85
83
  this.uriIdentityService = uriIdentityService;
86
- this.type = ProfileResourceType.GlobalState;
87
- this.handle = ProfileResourceType.GlobalState;
88
- this.label = { label: ( localize(8846, "UI State")) };
84
+ this.type = "globalState" ;
85
+ this.handle = "globalState" ;
86
+ this.label = { label: ( localize(8907, "UI State")) };
89
87
  this.collapsibleState = TreeItemCollapsibleState.Collapsed;
90
88
  }
91
89
  async getChildren() {
@@ -1,12 +1,11 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
3
- import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
3
+ import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
4
4
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
5
5
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
6
6
  import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
7
7
  import { platform } from 'vscode/vscode/vs/base/common/platform';
8
8
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
9
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
10
9
  import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
11
10
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
12
11
  import { localize } from 'vscode/vscode/vs/nls';
@@ -61,7 +60,7 @@ let KeybindingsResource = class KeybindingsResource {
61
60
  );
62
61
  }
63
62
  catch (error) {
64
- if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
63
+ if (error instanceof FileOperationError && error.fileOperationResult === 1 ) {
65
64
  return null;
66
65
  }
67
66
  else {
@@ -79,9 +78,9 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
79
78
  this.profile = profile;
80
79
  this.uriIdentityService = uriIdentityService;
81
80
  this.instantiationService = instantiationService;
82
- this.type = ProfileResourceType.Keybindings;
83
- this.handle = ProfileResourceType.Keybindings;
84
- this.label = { label: ( localize(8847, "Keyboard Shortcuts")) };
81
+ this.type = "keybindings" ;
82
+ this.handle = "keybindings" ;
83
+ this.label = { label: ( localize(8908, "Keyboard Shortcuts")) };
85
84
  this.collapsibleState = TreeItemCollapsibleState.Expanded;
86
85
  }
87
86
  isFromDefaultProfile() {
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
3
- import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
4
- import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
3
+ import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
4
+ import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
5
5
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
6
6
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
7
7
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
@@ -9,7 +9,6 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
9
9
  import { updateIgnoredSettings } from 'vscode/vscode/vs/platform/userDataSync/common/settingsMerge';
10
10
  import { IUserDataSyncUtilService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
11
11
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
12
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
13
12
  import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
14
13
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
15
14
  import { localize } from 'vscode/vscode/vs/nls';
@@ -70,7 +69,7 @@ let SettingsResource = class SettingsResource {
70
69
  }
71
70
  getIgnoredSettings() {
72
71
  const allSettings = ( (Registry.as(Extensions.Configuration))).getConfigurationProperties();
73
- const ignoredSettings = ( (Object.keys(allSettings))).filter(key => allSettings[key]?.scope === ConfigurationScope.MACHINE || allSettings[key]?.scope === ConfigurationScope.MACHINE_OVERRIDABLE);
72
+ const ignoredSettings = ( (Object.keys(allSettings))).filter(key => allSettings[key]?.scope === 2 || allSettings[key]?.scope === 6 );
74
73
  return ignoredSettings;
75
74
  }
76
75
  async getLocalFileContent(profile) {
@@ -81,7 +80,7 @@ let SettingsResource = class SettingsResource {
81
80
  );
82
81
  }
83
82
  catch (error) {
84
- if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
83
+ if (error instanceof FileOperationError && error.fileOperationResult === 1 ) {
85
84
  return null;
86
85
  }
87
86
  else {
@@ -100,9 +99,9 @@ let SettingsResourceTreeItem = class SettingsResourceTreeItem {
100
99
  this.profile = profile;
101
100
  this.uriIdentityService = uriIdentityService;
102
101
  this.instantiationService = instantiationService;
103
- this.type = ProfileResourceType.Settings;
104
- this.handle = ProfileResourceType.Settings;
105
- this.label = { label: ( localize(8845, "Settings")) };
102
+ this.type = "settings" ;
103
+ this.handle = "settings" ;
104
+ this.label = { label: ( localize(8906, "Settings")) };
106
105
  this.collapsibleState = TreeItemCollapsibleState.Expanded;
107
106
  }
108
107
  async getChildren() {
@@ -2,11 +2,10 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
3
3
  import { ResourceSet } from 'vscode/vscode/vs/base/common/map';
4
4
  import { localize } from 'vscode/vscode/vs/nls';
5
- import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
5
+ import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
6
6
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
7
7
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
8
8
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
9
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
10
9
  import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
11
10
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
12
11
  import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
@@ -63,7 +62,7 @@ let SnippetsResource = class SnippetsResource {
63
62
  stat = await this.fileService.resolve(profile.snippetsHome);
64
63
  }
65
64
  catch (e) {
66
- if (e instanceof FileOperationError && e.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
65
+ if (e instanceof FileOperationError && e.fileOperationResult === 1 ) {
67
66
  return snippets;
68
67
  }
69
68
  else {
@@ -91,9 +90,9 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
91
90
  this.profile = profile;
92
91
  this.instantiationService = instantiationService;
93
92
  this.uriIdentityService = uriIdentityService;
94
- this.type = ProfileResourceType.Snippets;
93
+ this.type = "snippets" ;
95
94
  this.handle = ( (this.profile.snippetsHome.toString()));
96
- this.label = { label: ( localize(8849, "Snippets")) };
95
+ this.label = { label: ( localize(8910, "Snippets")) };
97
96
  this.collapsibleState = TreeItemCollapsibleState.Collapsed;
98
97
  this.excludedSnippets = ( (new ResourceSet()));
99
98
  }
@@ -121,7 +120,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
121
120
  },
122
121
  accessibilityInformation: {
123
122
  label: ( localize(
124
- 8850,
123
+ 8911,
125
124
  "Select Snippet {0}",
126
125
  this.uriIdentityService.extUri.basename(resource)
127
126
  )),
@@ -1,12 +1,11 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
3
3
  import { localize } from 'vscode/vscode/vs/nls';
4
- import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
4
+ import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
5
5
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
6
6
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
7
7
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
8
8
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
9
- import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
10
9
  import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
11
10
  import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
12
11
  import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
@@ -60,7 +59,7 @@ let TasksResource = class TasksResource {
60
59
  );
61
60
  }
62
61
  catch (error) {
63
- if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
62
+ if (error instanceof FileOperationError && error.fileOperationResult === 1 ) {
64
63
  return null;
65
64
  }
66
65
  else {
@@ -78,9 +77,9 @@ let TasksResourceTreeItem = class TasksResourceTreeItem {
78
77
  this.profile = profile;
79
78
  this.uriIdentityService = uriIdentityService;
80
79
  this.instantiationService = instantiationService;
81
- this.type = ProfileResourceType.Tasks;
82
- this.handle = ProfileResourceType.Tasks;
83
- this.label = { label: ( localize(8848, "Tasks")) };
80
+ this.type = "tasks" ;
81
+ this.handle = "tasks" ;
82
+ this.label = { label: ( localize(8909, "Tasks")) };
84
83
  this.collapsibleState = TreeItemCollapsibleState.Expanded;
85
84
  }
86
85
  async getChildren() {
@@ -1,7 +1,6 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import './media/userDataProfileView.css.js';
3
3
  import { localize } from 'vscode/vscode/vs/nls';
4
- import 'vscode/vscode/vs/platform/instantiation/common/extensions';
5
4
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
5
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
7
6
  import { PROFILES_CATEGORY, PROFILE_URL_AUTHORITY, toUserDataProfileUri, isProfileURL, PROFILE_URL_AUTHORITY_PREFIX, PROFILE_FILTER, PROFILE_EXTENSION } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
@@ -21,7 +20,6 @@ import { ExtensionsResource, ExtensionsResourceTreeItem, ExtensionsResourceExpor
21
20
  import { GlobalStateResource, GlobalStateResourceTreeItem, GlobalStateResourceExportTreeItem } from './globalStateResource.js';
22
21
  import { InMemoryFileSystemProvider } from 'vscode/vscode/vs/platform/files/common/inMemoryFilesystemProvider';
23
22
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
24
- import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
25
23
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
26
24
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
27
25
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
@@ -82,12 +80,12 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
82
80
  disposables.add(token.onCancellationRequested(() => creationPromise.cancel()));
83
81
  let profile;
84
82
  return this.progressService.withProgress({
85
- location: ProgressLocation.Notification,
83
+ location: 15 ,
86
84
  delay: 500,
87
85
  sticky: true,
88
86
  cancellable: true,
89
87
  }, async (progress) => {
90
- const reportProgress = (message) => progress.report({ message: ( localize(3659, "Create Profile: {0}", message)) });
88
+ const reportProgress = (message) => progress.report({ message: ( localize(3687, "Create Profile: {0}", message)) });
91
89
  creationPromise = createCancelablePromise(async (token) => {
92
90
  const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, from, { ...options?.resourceTypeFlags, extensions: false }));
93
91
  const profileTemplate = await userDataProfilesExportState.getProfileTemplate(options.name ?? from.name, options?.icon);
@@ -103,7 +101,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
103
101
  try {
104
102
  await creationPromise;
105
103
  if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
106
- reportProgress(( localize(3660, "Installing Extensions...")));
104
+ reportProgress(( localize(3688, "Installing Extensions...")));
107
105
  await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
108
106
  }
109
107
  }
@@ -122,12 +120,12 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
122
120
  disposables.add(token.onCancellationRequested(() => creationPromise.cancel()));
123
121
  let profile;
124
122
  return this.progressService.withProgress({
125
- location: ProgressLocation.Notification,
123
+ location: 15 ,
126
124
  delay: 500,
127
125
  sticky: true,
128
126
  cancellable: true,
129
127
  }, async (progress) => {
130
- const reportProgress = (message) => progress.report({ message: ( localize(3659, "Create Profile: {0}", message)) });
128
+ const reportProgress = (message) => progress.report({ message: ( localize(3687, "Create Profile: {0}", message)) });
131
129
  creationPromise = createCancelablePromise(async (token) => {
132
130
  profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
133
131
  if (!profile) {
@@ -152,42 +150,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
152
150
  }
153
151
  async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
154
152
  if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
155
- reportProgress(( localize(3661, "Creating Settings...")));
153
+ reportProgress(( localize(3689, "Creating Settings...")));
156
154
  await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
157
155
  }
158
156
  if (token.isCancellationRequested) {
159
157
  return;
160
158
  }
161
159
  if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
162
- reportProgress(( localize(3662, "Creating Keyboard Shortcuts...")));
160
+ reportProgress(( localize(3690, "Creating Keyboard Shortcuts...")));
163
161
  await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
164
162
  }
165
163
  if (token.isCancellationRequested) {
166
164
  return;
167
165
  }
168
166
  if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
169
- reportProgress(( localize(3663, "Creating Tasks...")));
167
+ reportProgress(( localize(3691, "Creating Tasks...")));
170
168
  await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
171
169
  }
172
170
  if (token.isCancellationRequested) {
173
171
  return;
174
172
  }
175
173
  if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
176
- reportProgress(( localize(3664, "Creating Snippets...")));
174
+ reportProgress(( localize(3692, "Creating Snippets...")));
177
175
  await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
178
176
  }
179
177
  if (token.isCancellationRequested) {
180
178
  return;
181
179
  }
182
180
  if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
183
- reportProgress(( localize(3665, "Applying UI State...")));
181
+ reportProgress(( localize(3693, "Applying UI State...")));
184
182
  await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
185
183
  }
186
184
  if (token.isCancellationRequested) {
187
185
  return;
188
186
  }
189
187
  if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
190
- reportProgress(( localize(3660, "Installing Extensions...")));
188
+ reportProgress(( localize(3688, "Installing Extensions...")));
191
189
  await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
192
190
  }
193
191
  }
@@ -195,7 +193,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
195
193
  const disposables = ( (new DisposableStore()));
196
194
  try {
197
195
  const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, profile, exportFlags));
198
- await this.doExportProfile(userDataProfilesExportState, ProgressLocation.Notification);
196
+ await this.doExportProfile(userDataProfilesExportState, 15 );
199
197
  }
200
198
  finally {
201
199
  disposables.dispose();
@@ -204,18 +202,18 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
204
202
  async createTroubleshootProfile() {
205
203
  const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
206
204
  try {
207
- const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(3666, "Troubleshoot Issue")), undefined);
205
+ const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(3694, "Troubleshoot Issue")), undefined);
208
206
  await this.progressService.withProgress({
209
- location: ProgressLocation.Notification,
207
+ location: 15 ,
210
208
  delay: 1000,
211
209
  sticky: true,
212
210
  }, async (progress) => {
213
- const reportProgress = (message) => progress.report({ message: ( localize(3667, "Setting up Troubleshoot Profile: {0}", message)) });
211
+ const reportProgress = (message) => progress.report({ message: ( localize(3695, "Setting up Troubleshoot Profile: {0}", message)) });
214
212
  const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
215
213
  if (profile) {
216
- reportProgress(( localize(3668, "Applying Extensions...")));
214
+ reportProgress(( localize(3696, "Applying Extensions...")));
217
215
  await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
218
- reportProgress(( localize(3669, "Switching Profile...")));
216
+ reportProgress(( localize(3697, "Switching Profile...")));
219
217
  await this.userDataProfileManagementService.switchProfile(profile);
220
218
  }
221
219
  });
@@ -233,7 +231,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
233
231
  try {
234
232
  await this.progressService.withProgress({
235
233
  location,
236
- title: ( localize(3670, "{0}: Exporting...", PROFILES_CATEGORY.value)),
234
+ title: ( localize(3698, "{0}: Exporting...", PROFILES_CATEGORY.value)),
237
235
  }, async (progress) => {
238
236
  const id = await this.pickProfileContentHandler(profile.name);
239
237
  if (!id) {
@@ -247,17 +245,17 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
247
245
  if (!saveResult) {
248
246
  return;
249
247
  }
250
- const message = ( localize(3671, "Profile '{0}' was exported successfully.", profile.name));
248
+ const message = ( localize(3699, "Profile '{0}' was exported successfully.", profile.name));
251
249
  if (profileContentHandler.extensionId) {
252
250
  const buttons = [];
253
251
  const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( (toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString()));
254
252
  buttons.push({
255
- label: ( localize(3672, "&&Copy Link")),
253
+ label: ( localize(3700, "&&Copy Link")),
256
254
  run: () => this.clipboardService.writeText(link)
257
255
  });
258
256
  if (this.productService.webUrl) {
259
257
  buttons.push({
260
- label: ( localize(3673, "&&Open Link")),
258
+ label: ( localize(3701, "&&Open Link")),
261
259
  run: async () => {
262
260
  await this.openerService.open(link);
263
261
  }
@@ -265,7 +263,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
265
263
  }
266
264
  else {
267
265
  buttons.push({
268
- label: ( localize(3674, "&&Open in {0}", profileContentHandler.name)),
266
+ label: ( localize(3702, "&&Open in {0}", profileContentHandler.name)),
269
267
  run: async () => {
270
268
  await this.openerService.open(( (saveResult.link.toString())));
271
269
  }
@@ -275,7 +273,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
275
273
  type: Severity$1.Info,
276
274
  message,
277
275
  buttons,
278
- cancelButton: ( localize(3675, "Close"))
276
+ cancelButton: ( localize(3703, "Close"))
279
277
  });
280
278
  }
281
279
  else {
@@ -297,10 +295,10 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
297
295
  profileTemplate = JSON.parse(profileContent);
298
296
  }
299
297
  catch (error) {
300
- throw ( (new Error(localize(3676, "This profile is not valid."))));
298
+ throw ( (new Error(localize(3704, "This profile is not valid."))));
301
299
  }
302
300
  if (!isUserDataProfileTemplate(profileTemplate)) {
303
- throw ( (new Error(localize(3676, "This profile is not valid."))));
301
+ throw ( (new Error(localize(3704, "This profile is not valid."))));
304
302
  }
305
303
  if (options?.name) {
306
304
  profileTemplate.name = options.name;
@@ -334,27 +332,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
334
332
  return undefined;
335
333
  }
336
334
  if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
337
- progress(( localize(3677, "Applying Settings...")));
335
+ progress(( localize(3705, "Applying Settings...")));
338
336
  await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
339
337
  }
340
338
  if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
341
- progress(( localize(3678, "Applying Keyboard Shortcuts...")));
339
+ progress(( localize(3706, "Applying Keyboard Shortcuts...")));
342
340
  await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
343
341
  }
344
342
  if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
345
- progress(( localize(3679, "Applying Tasks...")));
343
+ progress(( localize(3707, "Applying Tasks...")));
346
344
  await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
347
345
  }
348
346
  if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
349
- progress(( localize(3680, "Applying Snippets...")));
347
+ progress(( localize(3708, "Applying Snippets...")));
350
348
  await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
351
349
  }
352
350
  if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
353
- progress(( localize(3681, "Applying State...")));
351
+ progress(( localize(3709, "Applying State...")));
354
352
  await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
355
353
  }
356
354
  if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
357
- progress(( localize(3668, "Applying Extensions...")));
355
+ progress(( localize(3696, "Applying Extensions...")));
358
356
  await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
359
357
  }
360
358
  return profile;
@@ -407,7 +405,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
407
405
  options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description });
408
406
  }
409
407
  const result = await this.quickInputService.pick(options.reverse(), {
410
- title: ( localize(3682, "Export '{0}' profile as...", name)),
408
+ title: ( localize(3710, "Export '{0}' profile as...", name)),
411
409
  hideInput: true
412
410
  });
413
411
  return result?.id;
@@ -422,11 +420,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
422
420
  const { confirmed } = await this.dialogService.confirm({
423
421
  type: Severity$1.Info,
424
422
  message: ( localize(
425
- 3683,
423
+ 3711,
426
424
  "Profile with name '{0}' already exists. Do you want to replace its contents?",
427
425
  profileName
428
426
  )),
429
- primaryButton: ( localize(3684, "&&Replace"))
427
+ primaryButton: ( localize(3712, "&&Replace"))
430
428
  });
431
429
  if (!confirmed) {
432
430
  return undefined;
@@ -470,12 +468,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
470
468
  this.fileService = fileService;
471
469
  this.productService = productService;
472
470
  this.textFileService = textFileService;
473
- this.name = ( localize(3685, "Local"));
474
- this.description = ( localize(3686, "file"));
471
+ this.name = ( localize(3713, "Local"));
472
+ this.description = ( localize(3714, "file"));
475
473
  }
476
474
  async saveProfile(name, content, token) {
477
475
  const link = await this.fileDialogService.showSaveDialog({
478
- title: ( localize(3687, "Save Profile")),
476
+ title: ( localize(3715, "Save Profile")),
479
477
  filters: PROFILE_FILTER,
480
478
  defaultUri: this.uriIdentityService.extUri.joinPath(await this.fileDialogService.defaultFilePath(), `${name}.${PROFILE_EXTENSION}`),
481
479
  });
@@ -502,7 +500,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
502
500
  canSelectFiles: true,
503
501
  canSelectMany: false,
504
502
  filters: PROFILE_FILTER,
505
- title: ( localize(3688, "Select Profile")),
503
+ title: ( localize(3716, "Select Profile")),
506
504
  });
507
505
  return profileLocation ? profileLocation[0] : null;
508
506
  }
@@ -549,13 +547,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
549
547
  for (const root of this.roots) {
550
548
  root.checkbox = {
551
549
  isChecked: !root.isFromDefaultProfile(),
552
- tooltip: ( localize(3689, "Select {0}", root.label.label)),
550
+ tooltip: ( localize(3717, "Select {0}", root.label.label)),
553
551
  accessibilityInformation: {
554
- label: ( localize(3689, "Select {0}", root.label.label)),
552
+ label: ( localize(3717, "Select {0}", root.label.label)),
555
553
  }
556
554
  };
557
555
  if (root.isFromDefaultProfile()) {
558
- root.description = ( localize(3690, "From Default Profile"));
556
+ root.description = ( localize(3718, "From Default Profile"));
559
557
  }
560
558
  }
561
559
  return this.roots;
@@ -718,11 +716,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
718
716
  let name = this.profile.name;
719
717
  if (this.profile.isDefault) {
720
718
  name = await this.quickInputService.input({
721
- placeHolder: ( localize(3691, "Name the profile")),
722
- title: ( localize(3692, "Export Profile")),
719
+ placeHolder: ( localize(3719, "Name the profile")),
720
+ title: ( localize(3720, "Export Profile")),
723
721
  async validateInput(input) {
724
722
  if (!input.trim()) {
725
- return ( localize(3693, "Profile name must be provided."));
723
+ return ( localize(3721, "Profile name must be provided."));
726
724
  }
727
725
  return undefined;
728
726
  },