@codingame/monaco-vscode-configuration-service-override 4.5.1 → 5.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.
@@ -36,6 +36,7 @@ import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/commo
36
36
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
37
37
  import { runWhenWindowIdle } from 'vscode/vscode/vs/base/browser/dom';
38
38
 
39
+ const _moduleId = "vs/workbench/services/configuration/browser/configurationService";
39
40
  function getLocalUserConfigurationScopes(userDataProfile, hasRemote) {
40
41
  return (userDataProfile.isDefault || userDataProfile.useDefaultFlags?.settings)
41
42
  ? hasRemote ? LOCAL_MACHINE_SCOPES : undefined
@@ -60,58 +61,60 @@ class WorkspaceService extends Disposable {
60
61
  this.initialized = false;
61
62
  this.applicationConfiguration = null;
62
63
  this.remoteUserConfiguration = null;
63
- this._onDidChangeConfiguration = this._register(( new Emitter()));
64
+ this._onDidChangeConfiguration = this._register(( (new Emitter())));
64
65
  this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
65
- this._onWillChangeWorkspaceFolders = this._register(( new Emitter()));
66
+ this._onWillChangeWorkspaceFolders = this._register(( (new Emitter())));
66
67
  this.onWillChangeWorkspaceFolders = this._onWillChangeWorkspaceFolders.event;
67
- this._onDidChangeWorkspaceFolders = this._register(( new Emitter()));
68
+ this._onDidChangeWorkspaceFolders = this._register(( (new Emitter())));
68
69
  this.onDidChangeWorkspaceFolders = this._onDidChangeWorkspaceFolders.event;
69
- this._onDidChangeWorkspaceName = this._register(( new Emitter()));
70
+ this._onDidChangeWorkspaceName = this._register(( (new Emitter())));
70
71
  this.onDidChangeWorkspaceName = this._onDidChangeWorkspaceName.event;
71
- this._onDidChangeWorkbenchState = this._register(( new Emitter()));
72
+ this._onDidChangeWorkbenchState = this._register(( (new Emitter())));
72
73
  this.onDidChangeWorkbenchState = this._onDidChangeWorkbenchState.event;
73
74
  this.isWorkspaceTrusted = true;
74
75
  this._restrictedSettings = { default: [] };
75
- this._onDidChangeRestrictedSettings = this._register(( new Emitter()));
76
+ this._onDidChangeRestrictedSettings = this._register(( (new Emitter())));
76
77
  this.onDidChangeRestrictedSettings = this._onDidChangeRestrictedSettings.event;
77
- this.configurationRegistry = ( Registry.as(Extensions.Configuration));
78
- this.initRemoteUserConfigurationBarrier = ( new Barrier());
79
- this.completeWorkspaceBarrier = ( new Barrier());
80
- this.defaultConfiguration = this._register(( new DefaultConfiguration(configurationCache, environmentService)));
81
- this.policyConfiguration = policyService instanceof NullPolicyService ? ( new NullPolicyConfiguration()) : this._register(( new PolicyConfiguration(this.defaultConfiguration, policyService, logService)));
78
+ this.configurationRegistry = ( (Registry.as(Extensions.Configuration)));
79
+ this.initRemoteUserConfigurationBarrier = ( (new Barrier()));
80
+ this.completeWorkspaceBarrier = ( (new Barrier()));
81
+ this.defaultConfiguration = this._register(( (new DefaultConfiguration(configurationCache, environmentService, logService))));
82
+ this.policyConfiguration = policyService instanceof NullPolicyService ? ( (new NullPolicyConfiguration())) : this._register(( (new PolicyConfiguration(this.defaultConfiguration, policyService, logService))));
82
83
  this.configurationCache = configurationCache;
83
- this._configuration = ( new Configuration(
84
+ this._configuration = ( (new Configuration(
84
85
  this.defaultConfiguration.configurationModel,
85
86
  this.policyConfiguration.configurationModel,
86
- ( new ConfigurationModel()),
87
- ( new ConfigurationModel()),
88
- ( new ConfigurationModel()),
89
- ( new ConfigurationModel()),
90
- ( new ResourceMap()),
91
- ( new ConfigurationModel()),
92
- ( new ResourceMap()),
93
- this.workspace
94
- ));
95
- this.applicationConfigurationDisposables = this._register(( new DisposableStore()));
87
+ ConfigurationModel.createEmptyModel(logService),
88
+ ConfigurationModel.createEmptyModel(logService),
89
+ ConfigurationModel.createEmptyModel(logService),
90
+ ConfigurationModel.createEmptyModel(logService),
91
+ (new ResourceMap()),
92
+ ConfigurationModel.createEmptyModel(logService),
93
+ (new ResourceMap()),
94
+ this.workspace,
95
+ logService
96
+ )));
97
+ this.applicationConfigurationDisposables = this._register(( (new DisposableStore())));
96
98
  this.createApplicationConfiguration();
97
- this.localUserConfiguration = this._register(( new UserConfiguration(
99
+ this.localUserConfiguration = this._register(( (new UserConfiguration(
98
100
  userDataProfileService.currentProfile.settingsResource,
99
101
  userDataProfileService.currentProfile.tasksResource,
100
102
  { scopes: getLocalUserConfigurationScopes(userDataProfileService.currentProfile, !!remoteAuthority) },
101
103
  fileService,
102
104
  uriIdentityService,
103
105
  logService
104
- )));
105
- this.cachedFolderConfigs = ( new ResourceMap());
106
+ ))));
107
+ this.cachedFolderConfigs = ( (new ResourceMap()));
106
108
  this._register(this.localUserConfiguration.onDidChangeConfiguration(userConfiguration => this.onLocalUserConfigurationChanged(userConfiguration)));
107
109
  if (remoteAuthority) {
108
- const remoteUserConfiguration = this.remoteUserConfiguration = this._register(( new RemoteUserConfiguration(
110
+ const remoteUserConfiguration = this.remoteUserConfiguration = this._register(( (new RemoteUserConfiguration(
109
111
  remoteAuthority,
110
112
  configurationCache,
111
113
  fileService,
112
114
  uriIdentityService,
113
- remoteAgentService
114
- )));
115
+ remoteAgentService,
116
+ logService
117
+ ))));
115
118
  this._register(remoteUserConfiguration.onDidInitialize(remoteUserConfigurationModel => {
116
119
  this._register(remoteUserConfiguration.onDidChangeConfiguration(remoteUserConfigurationModel => this.onRemoteUserConfigurationChanged(remoteUserConfigurationModel)));
117
120
  this.onRemoteUserConfigurationChanged(remoteUserConfigurationModel);
@@ -121,7 +124,7 @@ class WorkspaceService extends Disposable {
121
124
  else {
122
125
  this.initRemoteUserConfigurationBarrier.open();
123
126
  }
124
- this.workspaceConfiguration = this._register(( new WorkspaceConfiguration(configurationCache, fileService, uriIdentityService, logService)));
127
+ this.workspaceConfiguration = this._register(( (new WorkspaceConfiguration(configurationCache, fileService, uriIdentityService, logService))));
125
128
  this._register(this.workspaceConfiguration.onDidUpdateConfiguration(fromCache => {
126
129
  this.onWorkspaceConfigurationChanged(fromCache).then(() => {
127
130
  this.workspace.initialized = this.workspaceConfiguration.initialized;
@@ -131,7 +134,7 @@ class WorkspaceService extends Disposable {
131
134
  this._register(this.defaultConfiguration.onDidChangeConfiguration(({ properties, defaults }) => this.onDefaultConfigurationChanged(defaults, properties)));
132
135
  this._register(this.policyConfiguration.onDidChangeConfiguration(configurationModel => this.onPolicyConfigurationChanged(configurationModel)));
133
136
  this._register(userDataProfileService.onDidChangeCurrentProfile(e => this.onUserDataProfileChanged(e)));
134
- this.workspaceEditingQueue = ( new Queue());
137
+ this.workspaceEditingQueue = ( (new Queue()));
135
138
  }
136
139
  createApplicationConfiguration() {
137
140
  this.applicationConfigurationDisposables.clear();
@@ -139,7 +142,12 @@ class WorkspaceService extends Disposable {
139
142
  this.applicationConfiguration = null;
140
143
  }
141
144
  else {
142
- this.applicationConfiguration = this.applicationConfigurationDisposables.add(this._register(( new ApplicationConfiguration(this.userDataProfilesService, this.fileService, this.uriIdentityService))));
145
+ this.applicationConfiguration = this.applicationConfigurationDisposables.add(this._register(( (new ApplicationConfiguration(
146
+ this.userDataProfilesService,
147
+ this.fileService,
148
+ this.uriIdentityService,
149
+ this.logService
150
+ )))));
143
151
  this.applicationConfigurationDisposables.add(this.applicationConfiguration.onDidChangeConfiguration(configurationModel => this.onApplicationConfigurationChanged(configurationModel)));
144
152
  }
145
153
  }
@@ -200,7 +208,7 @@ class WorkspaceService extends Disposable {
200
208
  }
201
209
  let foldersHaveChanged = false;
202
210
  let currentWorkspaceFolders = this.getWorkspace().folders;
203
- let newStoredFolders = ( currentWorkspaceFolders.map(f => f.raw)).filter((folder, index) => {
211
+ let newStoredFolders = ( (currentWorkspaceFolders.map(f => f.raw))).filter((folder, index) => {
204
212
  if (!isStoredWorkspaceFolder(folder)) {
205
213
  return true;
206
214
  }
@@ -211,7 +219,7 @@ class WorkspaceService extends Disposable {
211
219
  const workspaceConfigPath = this.getWorkspace().configuration;
212
220
  const workspaceConfigFolder = this.uriIdentityService.extUri.dirname(workspaceConfigPath);
213
221
  currentWorkspaceFolders = toWorkspaceFolders(newStoredFolders, workspaceConfigPath, this.uriIdentityService.extUri);
214
- const currentWorkspaceFolderUris = ( currentWorkspaceFolders.map(folder => folder.uri));
222
+ const currentWorkspaceFolderUris = ( (currentWorkspaceFolders.map(folder => folder.uri)));
215
223
  const storedFoldersToAdd = [];
216
224
  for (const folderToAdd of foldersToAdd) {
217
225
  const folderURI = folderToAdd.uri;
@@ -245,13 +253,17 @@ class WorkspaceService extends Disposable {
245
253
  }
246
254
  async setFolders(folders) {
247
255
  if (!this.instantiationService) {
248
- throw new Error('Cannot update workspace folders because workspace service is not yet ready to accept writes.');
256
+ throw ( (new Error(
257
+ 'Cannot update workspace folders because workspace service is not yet ready to accept writes.'
258
+ )));
249
259
  }
250
260
  await this.instantiationService.invokeFunction(accessor => this.workspaceConfiguration.setFolders(folders, accessor.get(IJSONEditingService)));
251
261
  return this.onWorkspaceConfigurationChanged(false);
252
262
  }
253
263
  contains(resources, toCheck) {
254
- return ( resources.some(resource => this.uriIdentityService.extUri.isEqual(resource, toCheck)));
264
+ return (
265
+ (resources.some(resource => this.uriIdentityService.extUri.isEqual(resource, toCheck)))
266
+ );
255
267
  }
256
268
  getConfigurationData() {
257
269
  return this._configuration.toData();
@@ -272,7 +284,9 @@ class WorkspaceService extends Disposable {
272
284
  }
273
285
  if (!targets.length) {
274
286
  if (overrides?.overrideIdentifiers && overrides.overrideIdentifiers.length > 1) {
275
- throw new Error('Configuration Target is required while updating the value for multiple override identifiers');
287
+ throw ( (new Error(
288
+ 'Configuration Target is required while updating the value for multiple override identifiers'
289
+ )));
276
290
  }
277
291
  const inspect = this.inspect(key, { resource: overrides?.resource, overrideIdentifier: overrides?.overrideIdentifiers ? overrides.overrideIdentifiers[0] : undefined });
278
292
  targets.push(...this.deriveConfigurationTargets(key, value, inspect));
@@ -280,9 +294,9 @@ class WorkspaceService extends Disposable {
280
294
  value = undefined;
281
295
  }
282
296
  }
283
- await Promises.settled(( targets.map(
297
+ await Promises.settled(( (targets.map(
284
298
  target => this.writeConfigurationValue(key, value, target, overrides, options)
285
- )));
299
+ ))));
286
300
  }
287
301
  async reloadConfiguration(target) {
288
302
  if (target === undefined) {
@@ -325,7 +339,9 @@ class WorkspaceService extends Disposable {
325
339
  return this._configuration.inspect(key, overrides);
326
340
  }
327
341
  keys() {
328
- return ( this._configuration.keys());
342
+ return (
343
+ (this._configuration.keys())
344
+ );
329
345
  }
330
346
  async whenRemoteConfigurationLoaded() {
331
347
  await this.initRemoteUserConfigurationBarrier.wait();
@@ -403,35 +419,35 @@ class WorkspaceService extends Disposable {
403
419
  const workspaceConfigPath = workspaceIdentifier.configPath;
404
420
  const workspaceFolders = toWorkspaceFolders(this.workspaceConfiguration.getFolders(), workspaceConfigPath, this.uriIdentityService.extUri);
405
421
  const workspaceId = workspaceIdentifier.id;
406
- const workspace = ( new Workspace(
422
+ const workspace = ( (new Workspace(
407
423
  workspaceId,
408
424
  workspaceFolders,
409
425
  this.workspaceConfiguration.isTransient(),
410
426
  workspaceConfigPath,
411
427
  uri => this.uriIdentityService.extUri.ignorePathCasing(uri)
412
- ));
428
+ )));
413
429
  workspace.initialized = this.workspaceConfiguration.initialized;
414
430
  return workspace;
415
431
  }
416
432
  createSingleFolderWorkspace(singleFolderWorkspaceIdentifier) {
417
- const workspace = ( new Workspace(
433
+ const workspace = ( (new Workspace(
418
434
  singleFolderWorkspaceIdentifier.id,
419
435
  [toWorkspaceFolder(singleFolderWorkspaceIdentifier.uri)],
420
436
  false,
421
437
  null,
422
438
  uri => this.uriIdentityService.extUri.ignorePathCasing(uri)
423
- ));
439
+ )));
424
440
  workspace.initialized = true;
425
441
  return workspace;
426
442
  }
427
443
  createEmptyWorkspace(emptyWorkspaceIdentifier) {
428
- const workspace = ( new Workspace(
444
+ const workspace = ( (new Workspace(
429
445
  emptyWorkspaceIdentifier.id,
430
446
  [],
431
447
  false,
432
448
  null,
433
449
  uri => this.uriIdentityService.extUri.ignorePathCasing(uri)
434
- ));
450
+ )));
435
451
  workspace.initialized = true;
436
452
  return Promise.resolve(workspace);
437
453
  }
@@ -477,11 +493,13 @@ class WorkspaceService extends Disposable {
477
493
  }
478
494
  compareFolders(currentFolders, newFolders) {
479
495
  const result = { added: [], removed: [], changed: [] };
480
- result.added = newFolders.filter(newFolder => !( currentFolders.some(currentFolder => ( newFolder.uri.toString()) === ( currentFolder.uri.toString()))));
496
+ result.added = newFolders.filter(newFolder => !( (currentFolders.some(
497
+ currentFolder => ( (newFolder.uri.toString())) === ( (currentFolder.uri.toString()))
498
+ ))));
481
499
  for (let currentIndex = 0; currentIndex < currentFolders.length; currentIndex++) {
482
500
  const currentFolder = currentFolders[currentIndex];
483
501
  let newIndex = 0;
484
- for (newIndex = 0; newIndex < newFolders.length && ( currentFolder.uri.toString()) !== ( newFolders[newIndex].uri.toString()); newIndex++) { }
502
+ for (newIndex = 0; newIndex < newFolders.length && ( (currentFolder.uri.toString())) !== ( (newFolders[newIndex].uri.toString())); newIndex++) { }
485
503
  if (newIndex < newFolders.length) {
486
504
  if (currentIndex !== newIndex || currentFolder.name !== newFolders[newIndex].name) {
487
505
  result.changed.push(currentFolder);
@@ -496,10 +514,10 @@ class WorkspaceService extends Disposable {
496
514
  async initializeConfiguration(trigger) {
497
515
  await this.defaultConfiguration.initialize();
498
516
  const initPolicyConfigurationPromise = this.policyConfiguration.initialize();
499
- const initApplicationConfigurationPromise = this.applicationConfiguration ? this.applicationConfiguration.initialize() : Promise.resolve(( new ConfigurationModel()));
517
+ const initApplicationConfigurationPromise = this.applicationConfiguration ? this.applicationConfiguration.initialize() : Promise.resolve(ConfigurationModel.createEmptyModel(this.logService));
500
518
  const initUserConfiguration = async () => {
501
519
  mark('code/willInitUserConfiguration');
502
- const result = await Promise.all([this.localUserConfiguration.initialize(), this.remoteUserConfiguration ? this.remoteUserConfiguration.initialize() : Promise.resolve(( new ConfigurationModel()))]);
520
+ const result = await Promise.all([this.localUserConfiguration.initialize(), this.remoteUserConfiguration ? this.remoteUserConfiguration.initialize() : Promise.resolve(ConfigurationModel.createEmptyModel(this.logService))]);
503
521
  if (this.applicationConfiguration) {
504
522
  const applicationConfigurationModel = await initApplicationConfigurationPromise;
505
523
  result[0] = this.localUserConfiguration.reparse({ exclude: applicationConfigurationModel.getValue(APPLY_ALL_PROFILES_SETTING) });
@@ -521,7 +539,7 @@ class WorkspaceService extends Disposable {
521
539
  }
522
540
  async reloadApplicationConfiguration(donotTrigger) {
523
541
  if (!this.applicationConfiguration) {
524
- return ( new ConfigurationModel());
542
+ return ConfigurationModel.createEmptyModel(this.logService);
525
543
  }
526
544
  const model = await this.applicationConfiguration.loadConfiguration();
527
545
  if (!donotTrigger) {
@@ -548,7 +566,7 @@ class WorkspaceService extends Disposable {
548
566
  }
549
567
  return model;
550
568
  }
551
- return ( new ConfigurationModel());
569
+ return ConfigurationModel.createEmptyModel(this.logService);
552
570
  }
553
571
  async reloadWorkspaceConfiguration() {
554
572
  const workbenchState = this.getWorkbenchState();
@@ -563,14 +581,14 @@ class WorkspaceService extends Disposable {
563
581
  return this.onWorkspaceFolderConfigurationChanged(folder);
564
582
  }
565
583
  async loadConfiguration(applicationConfigurationModel, userConfigurationModel, remoteUserConfigurationModel, trigger) {
566
- this.cachedFolderConfigs = ( new ResourceMap());
584
+ this.cachedFolderConfigs = ( (new ResourceMap()));
567
585
  const folders = this.workspace.folders;
568
586
  const folderConfigurations = await this.loadFolderConfigurations(folders);
569
587
  const workspaceConfiguration = this.getWorkspaceConfigurationModel(folderConfigurations);
570
- const folderConfigurationModels = ( new ResourceMap());
588
+ const folderConfigurationModels = ( (new ResourceMap()));
571
589
  folderConfigurations.forEach((folderConfiguration, index) => folderConfigurationModels.set(folders[index].uri, folderConfiguration));
572
590
  const currentConfiguration = this._configuration;
573
- this._configuration = ( new Configuration(
591
+ this._configuration = ( (new Configuration(
574
592
  this.defaultConfiguration.configurationModel,
575
593
  this.policyConfiguration.configurationModel,
576
594
  applicationConfigurationModel,
@@ -578,10 +596,11 @@ class WorkspaceService extends Disposable {
578
596
  remoteUserConfigurationModel,
579
597
  workspaceConfiguration,
580
598
  folderConfigurationModels,
581
- ( new ConfigurationModel()),
582
- ( new ResourceMap()),
583
- this.workspace
584
- ));
599
+ ConfigurationModel.createEmptyModel(this.logService),
600
+ (new ResourceMap()),
601
+ this.workspace,
602
+ this.logService
603
+ )));
585
604
  this.initialized = true;
586
605
  if (trigger) {
587
606
  const change = this._configuration.compare(currentConfiguration);
@@ -596,7 +615,7 @@ class WorkspaceService extends Disposable {
596
615
  case 3 :
597
616
  return this.workspaceConfiguration.getConfiguration();
598
617
  default:
599
- return ( new ConfigurationModel());
618
+ return ConfigurationModel.createEmptyModel(this.logService);
600
619
  }
601
620
  }
602
621
  onUserDataProfileChanged(e) {
@@ -715,7 +734,7 @@ class WorkspaceService extends Disposable {
715
734
  updateRestrictedSettings() {
716
735
  const changed = [];
717
736
  const allProperties = this.configurationRegistry.getConfigurationProperties();
718
- const defaultRestrictedSettings = ( Object.keys(allProperties)).filter(key => allProperties[key].restricted).sort((a, b) => a.localeCompare(b));
737
+ const defaultRestrictedSettings = ( (Object.keys(allProperties))).filter(key => allProperties[key].restricted).sort((a, b) => a.localeCompare(b));
719
738
  const defaultDelta = delta(defaultRestrictedSettings, this._restrictedSettings.default, (a, b) => a.localeCompare(b));
720
739
  changed.push(...defaultDelta.added, ...defaultDelta.removed);
721
740
  const application = (this.applicationConfiguration?.getRestrictedSettings() || []).sort((a, b) => a.localeCompare(b));
@@ -727,7 +746,7 @@ class WorkspaceService extends Disposable {
727
746
  const userRemote = (this.remoteUserConfiguration?.getRestrictedSettings() || []).sort((a, b) => a.localeCompare(b));
728
747
  const userRemoteDelta = delta(userRemote, this._restrictedSettings.userRemote || [], (a, b) => a.localeCompare(b));
729
748
  changed.push(...userRemoteDelta.added, ...userRemoteDelta.removed);
730
- const workspaceFolderMap = ( new ResourceMap());
749
+ const workspaceFolderMap = ( (new ResourceMap()));
731
750
  for (const workspaceFolder of this.workspace.folders) {
732
751
  const cachedFolderConfig = this.cachedFolderConfigs.get(workspaceFolder.uri);
733
752
  const folderRestrictedSettings = (cachedFolderConfig?.getRestrictedSettings() || []).sort((a, b) => a.localeCompare(b));
@@ -799,15 +818,15 @@ class WorkspaceService extends Disposable {
799
818
  }
800
819
  async onFoldersChanged() {
801
820
  const changes = [];
802
- for (const key of ( this.cachedFolderConfigs.keys())) {
803
- if (!this.workspace.folders.filter(folder => ( folder.uri.toString()) === ( key.toString()))[0]) {
821
+ for (const key of ( (this.cachedFolderConfigs.keys()))) {
822
+ if (!this.workspace.folders.filter(folder => ( (folder.uri.toString())) === ( (key.toString())))[0]) {
804
823
  const folderConfiguration = this.cachedFolderConfigs.get(key);
805
824
  folderConfiguration.dispose();
806
825
  this.cachedFolderConfigs.delete(key);
807
826
  changes.push(this._configuration.compareAndDeleteFolderConfiguration(key));
808
827
  }
809
828
  }
810
- const toInitialize = this.workspace.folders.filter(folder => !( this.cachedFolderConfigs.has(folder.uri)));
829
+ const toInitialize = this.workspace.folders.filter(folder => !( (this.cachedFolderConfigs.has(folder.uri))));
811
830
  if (toInitialize.length) {
812
831
  const folderConfigurations = await this.loadFolderConfigurations(toInitialize);
813
832
  folderConfigurations.forEach((folderConfiguration, index) => {
@@ -817,10 +836,10 @@ class WorkspaceService extends Disposable {
817
836
  return mergeChanges(...changes);
818
837
  }
819
838
  loadFolderConfigurations(folders) {
820
- return Promise.all([...( folders.map(folder => {
839
+ return Promise.all([...( (folders.map(folder => {
821
840
  let folderConfiguration = this.cachedFolderConfigs.get(folder.uri);
822
841
  if (!folderConfiguration) {
823
- folderConfiguration = ( new FolderConfiguration(
842
+ folderConfiguration = ( (new FolderConfiguration(
824
843
  !this.initialized,
825
844
  folder,
826
845
  FOLDER_CONFIG_FOLDER_NAME,
@@ -830,12 +849,12 @@ class WorkspaceService extends Disposable {
830
849
  this.uriIdentityService,
831
850
  this.logService,
832
851
  this.configurationCache
833
- ));
852
+ )));
834
853
  this._register(folderConfiguration.onDidChange(() => this.onWorkspaceFolderConfigurationChanged(folder)));
835
854
  this.cachedFolderConfigs.set(folder.uri, this._register(folderConfiguration));
836
855
  }
837
856
  return folderConfiguration.loadConfiguration();
838
- }))]);
857
+ })))]);
839
858
  }
840
859
  async validateWorkspaceFoldersAndReload(fromCache) {
841
860
  const validWorkspaceFolders = await this.toValidWorkspaceFolders(this.workspace.folders);
@@ -854,7 +873,7 @@ class WorkspaceService extends Disposable {
854
873
  }
855
874
  }
856
875
  catch (e) {
857
- this.logService.warn(`Ignoring the error while validating workspace folder ${( workspaceFolder.uri.toString())} - ${toErrorMessage(e)}`);
876
+ this.logService.warn(`Ignoring the error while validating workspace folder ${( (workspaceFolder.uri.toString()))} - ${toErrorMessage(e)}`);
858
877
  }
859
878
  validWorkspaceFolders.push(workspaceFolder);
860
879
  }
@@ -862,23 +881,25 @@ class WorkspaceService extends Disposable {
862
881
  }
863
882
  async writeConfigurationValue(key, value, target, overrides, options) {
864
883
  if (!this.instantiationService) {
865
- throw new Error('Cannot write configuration because the configuration service is not yet ready to accept writes.');
884
+ throw ( (new Error(
885
+ 'Cannot write configuration because the configuration service is not yet ready to accept writes.'
886
+ )));
866
887
  }
867
888
  if (target === 7 ) {
868
- throw new Error('Invalid configuration target');
889
+ throw ( (new Error('Invalid configuration target')));
869
890
  }
870
891
  if (target === 8 ) {
871
892
  const previous = { data: this._configuration.toData(), workspace: this.workspace };
872
893
  this._configuration.updateValue(key, value, overrides);
873
- this.triggerConfigurationChange({ keys: overrides?.overrideIdentifiers?.length ? [keyFromOverrideIdentifiers(overrides.overrideIdentifiers), key] : [key], overrides: overrides?.overrideIdentifiers?.length ? ( overrides.overrideIdentifiers.map(overrideIdentifier => ([overrideIdentifier, [key]]))) : [] }, previous, target);
894
+ this.triggerConfigurationChange({ keys: overrides?.overrideIdentifiers?.length ? [keyFromOverrideIdentifiers(overrides.overrideIdentifiers), key] : [key], overrides: overrides?.overrideIdentifiers?.length ? ( (overrides.overrideIdentifiers.map(overrideIdentifier => ([overrideIdentifier, [key]])))) : [] }, previous, target);
874
895
  return;
875
896
  }
876
897
  const editableConfigurationTarget = this.toEditableConfigurationTarget(target, key);
877
898
  if (!editableConfigurationTarget) {
878
- throw new Error('Invalid configuration target');
899
+ throw ( (new Error('Invalid configuration target')));
879
900
  }
880
901
  if (editableConfigurationTarget === 2 && !this.remoteUserConfiguration) {
881
- throw new Error('Invalid configuration target');
902
+ throw ( (new Error('Invalid configuration target')));
882
903
  }
883
904
  if (overrides?.overrideIdentifiers?.length && overrides.overrideIdentifiers.length > 1) {
884
905
  const configurationModel = this.getConfigurationModelForEditableConfigurationTarget(editableConfigurationTarget, overrides.resource);
@@ -961,7 +982,7 @@ class WorkspaceService extends Disposable {
961
982
  if (target !== 7 ) {
962
983
  this.logService.debug(`Configuration keys changed in ${ConfigurationTargetToString(target)} target`, ...change.keys);
963
984
  }
964
- const configurationChangeEvent = ( new ConfigurationChangeEvent(change, previous, this._configuration, this.workspace));
985
+ const configurationChangeEvent = ( (new ConfigurationChangeEvent(change, previous, this._configuration, this.workspace, this.logService)));
965
986
  configurationChangeEvent.source = target;
966
987
  this._onDidChangeConfiguration.fire(configurationChangeEvent);
967
988
  }
@@ -1002,8 +1023,8 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1002
1023
  this.workspaceTrustManagementService = workspaceTrustManagementService;
1003
1024
  extensionService.whenInstalledExtensionsRegistered().then(() => {
1004
1025
  this.registerConfigurationSchemas();
1005
- const configurationRegistry = ( Registry.as(Extensions.Configuration));
1006
- const delayer = this._register(( new Delayer(50)));
1026
+ const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
1027
+ const delayer = this._register(( (new Delayer(50))));
1007
1028
  this._register(Event.any(configurationRegistry.onDidUpdateConfiguration, configurationRegistry.onDidSchemaChange, workspaceTrustManagementService.onDidChangeTrust)(() => delayer.trigger(() => this.registerConfigurationSchemas(), lifecycleService.phase === 4 ? undefined : 2500 )));
1008
1029
  });
1009
1030
  }
@@ -1046,11 +1067,11 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1046
1067
  allowComments: true
1047
1068
  };
1048
1069
  const defaultSettingsSchema = {
1049
- properties: ( Object.keys(allSettings.properties)).reduce((result, key) => {
1070
+ properties: ( (Object.keys(allSettings.properties))).reduce((result, key) => {
1050
1071
  result[key] = Object.assign({ deprecationMessage: undefined }, allSettings.properties[key]);
1051
1072
  return result;
1052
1073
  }, {}),
1053
- patternProperties: ( Object.keys(allSettings.patternProperties)).reduce((result, key) => {
1074
+ patternProperties: ( (Object.keys(allSettings.patternProperties))).reduce((result, key) => {
1054
1075
  result[key] = Object.assign({ deprecationMessage: undefined }, allSettings.patternProperties[key]);
1055
1076
  return result;
1056
1077
  }, {}),
@@ -1068,11 +1089,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1068
1089
  } : workspaceSettingsSchema;
1069
1090
  const configDefaultsSchema = {
1070
1091
  type: 'object',
1071
- description: ( localizeWithPath(
1072
- 'vs/workbench/services/configuration/browser/configurationService',
1073
- 'configurationDefaults.description',
1074
- 'Contribute defaults for configurations'
1075
- )),
1092
+ description: ( localizeWithPath(_moduleId, 0, 'Contribute defaults for configurations')),
1076
1093
  properties: Object.assign({}, machineOverridableSettings.properties, windowSettings.properties, resourceSettings.properties),
1077
1094
  patternProperties: {
1078
1095
  [OVERRIDE_PROPERTY_PATTERN]: {
@@ -1094,7 +1111,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1094
1111
  });
1095
1112
  }
1096
1113
  registerSchemas(schemas) {
1097
- const jsonRegistry = ( Registry.as(Extensions$1.JSONContribution));
1114
+ const jsonRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
1098
1115
  jsonRegistry.registerSchema(defaultSettingsSchemaId, schemas.defaultSettingsSchema);
1099
1116
  jsonRegistry.registerSchema(userSettingsSchemaId, schemas.userSettingsSchema);
1100
1117
  jsonRegistry.registerSchema(profileSettingsSchemaId, schemas.profileSettingsSchema);
@@ -1116,13 +1133,13 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
1116
1133
  return result;
1117
1134
  }
1118
1135
  };
1119
- RegisterConfigurationSchemasContribution = ( __decorate([
1120
- ( __param(0, IWorkspaceContextService)),
1121
- ( __param(1, IWorkbenchEnvironmentService)),
1122
- ( __param(2, IWorkspaceTrustManagementService)),
1123
- ( __param(3, IExtensionService)),
1124
- ( __param(4, ILifecycleService))
1125
- ], RegisterConfigurationSchemasContribution));
1136
+ RegisterConfigurationSchemasContribution = ( (__decorate([
1137
+ ( (__param(0, IWorkspaceContextService))),
1138
+ ( (__param(1, IWorkbenchEnvironmentService))),
1139
+ ( (__param(2, IWorkspaceTrustManagementService))),
1140
+ ( (__param(3, IExtensionService))),
1141
+ ( (__param(4, ILifecycleService)))
1142
+ ], RegisterConfigurationSchemasContribution)));
1126
1143
  let ResetConfigurationDefaultsOverridesCache = class ResetConfigurationDefaultsOverridesCache extends Disposable {
1127
1144
  constructor(configurationService, extensionService) {
1128
1145
  super();
@@ -1131,18 +1148,18 @@ let ResetConfigurationDefaultsOverridesCache = class ResetConfigurationDefaultsO
1131
1148
  }
1132
1149
  }
1133
1150
  };
1134
- ResetConfigurationDefaultsOverridesCache = ( __decorate([
1135
- ( __param(0, IConfigurationService)),
1136
- ( __param(1, IExtensionService))
1137
- ], ResetConfigurationDefaultsOverridesCache));
1151
+ ResetConfigurationDefaultsOverridesCache = ( (__decorate([
1152
+ ( (__param(0, IConfigurationService))),
1153
+ ( (__param(1, IExtensionService)))
1154
+ ], ResetConfigurationDefaultsOverridesCache)));
1138
1155
  let UpdateExperimentalSettingsDefaults = class UpdateExperimentalSettingsDefaults extends Disposable {
1139
1156
  static { this.ID = 'workbench.contrib.updateExperimentalSettingsDefaults'; }
1140
1157
  constructor(workbenchAssignmentService) {
1141
1158
  super();
1142
1159
  this.workbenchAssignmentService = workbenchAssignmentService;
1143
- this.processedExperimentalSettings = ( new Set());
1144
- this.configurationRegistry = ( Registry.as(Extensions.Configuration));
1145
- this.processExperimentalSettings(( Object.keys(this.configurationRegistry.getConfigurationProperties())));
1160
+ this.processedExperimentalSettings = ( (new Set()));
1161
+ this.configurationRegistry = ( (Registry.as(Extensions.Configuration)));
1162
+ this.processExperimentalSettings(( (Object.keys(this.configurationRegistry.getConfigurationProperties()))));
1146
1163
  this._register(this.configurationRegistry.onDidUpdateConfiguration(({ properties }) => this.processExperimentalSettings(properties)));
1147
1164
  }
1148
1165
  async processExperimentalSettings(properties) {
@@ -1153,7 +1170,7 @@ let UpdateExperimentalSettingsDefaults = class UpdateExperimentalSettingsDefault
1153
1170
  if (!schema?.tags?.includes('experimental')) {
1154
1171
  continue;
1155
1172
  }
1156
- if (( this.processedExperimentalSettings.has(property))) {
1173
+ if (( (this.processedExperimentalSettings.has(property)))) {
1157
1174
  continue;
1158
1175
  }
1159
1176
  this.processedExperimentalSettings.add(property);
@@ -1165,33 +1182,25 @@ let UpdateExperimentalSettingsDefaults = class UpdateExperimentalSettingsDefault
1165
1182
  }
1166
1183
  catch (error) { }
1167
1184
  }
1168
- if (( Object.keys(overrides)).length) {
1169
- this.configurationRegistry.registerDefaultConfigurations([{ overrides, source: ( localizeWithPath(
1170
- 'vs/workbench/services/configuration/browser/configurationService',
1171
- 'experimental',
1172
- "Experiments"
1173
- )) }]);
1185
+ if (( (Object.keys(overrides))).length) {
1186
+ this.configurationRegistry.registerDefaultConfigurations([{ overrides, source: ( localizeWithPath(_moduleId, 1, "Experiments")) }]);
1174
1187
  }
1175
1188
  }
1176
1189
  };
1177
- UpdateExperimentalSettingsDefaults = ( __decorate([
1178
- ( __param(0, IWorkbenchAssignmentService))
1179
- ], UpdateExperimentalSettingsDefaults));
1180
- const workbenchContributionsRegistry = ( Registry.as(Extensions$2.Workbench));
1190
+ UpdateExperimentalSettingsDefaults = ( (__decorate([
1191
+ ( (__param(0, IWorkbenchAssignmentService)))
1192
+ ], UpdateExperimentalSettingsDefaults)));
1193
+ const workbenchContributionsRegistry = ( (Registry.as(Extensions$2.Workbench)));
1181
1194
  workbenchContributionsRegistry.registerWorkbenchContribution(RegisterConfigurationSchemasContribution, 3 );
1182
1195
  workbenchContributionsRegistry.registerWorkbenchContribution(ResetConfigurationDefaultsOverridesCache, 4 );
1183
1196
  registerWorkbenchContribution2(UpdateExperimentalSettingsDefaults.ID, UpdateExperimentalSettingsDefaults, 2 );
1184
- const configurationRegistry = ( Registry.as(Extensions.Configuration));
1197
+ const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
1185
1198
  configurationRegistry.registerConfiguration({
1186
1199
  ...workbenchConfigurationNodeBase,
1187
1200
  properties: {
1188
1201
  [APPLY_ALL_PROFILES_SETTING]: {
1189
1202
  'type': 'array',
1190
- description: ( localizeWithPath(
1191
- 'vs/workbench/services/configuration/browser/configurationService',
1192
- 'setting description',
1193
- "Configure settings to be applied for all profiles."
1194
- )),
1203
+ description: ( localizeWithPath(_moduleId, 2, "Configure settings to be applied for all profiles.")),
1195
1204
  'default': [],
1196
1205
  'scope': 1 ,
1197
1206
  additionalProperties: true,