@codingame/monaco-vscode-configuration-service-override 11.1.2 → 12.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 (31) hide show
  1. package/index.d.ts +29 -2
  2. package/index.js +138 -1
  3. package/package.json +27 -8
  4. package/vscode/src/vs/editor/common/services/textResourceConfigurationService.d.ts +26 -0
  5. package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +13 -11
  6. package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.d.ts +1 -0
  7. package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +82 -79
  8. package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.d.ts +19 -0
  9. package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +31 -32
  10. package/vscode/src/vs/workbench/services/configuration/browser/configuration.d.ts +130 -0
  11. package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +18 -16
  12. package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +144 -0
  13. package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +182 -186
  14. package/vscode/src/vs/workbench/services/configuration/common/configurationCache.d.ts +16 -0
  15. package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +3 -1
  16. package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.d.ts +86 -0
  17. package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +219 -194
  18. package/vscode/src/vs/workbench/services/configuration/common/configurationModels.d.ts +43 -0
  19. package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +1 -0
  20. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.d.ts +37 -0
  21. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +30 -26
  22. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.d.ts +13 -0
  23. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +3 -1
  24. package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.d.ts +16 -0
  25. package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js +8 -5
  26. package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.d.ts +64 -0
  27. package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +54 -53
  28. package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.d.ts +39 -0
  29. package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +15 -11
  30. package/configuration.js +0 -138
  31. package/tools.js +0 -44
@@ -1,10 +1,11 @@
1
+
1
2
  import { localize } from 'vscode/vscode/vs/nls';
2
3
  import { deepClone } from 'vscode/vscode/vs/base/common/objects';
3
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
5
  import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
5
- import { Extensions as Extensions$1, configurationDefaultsSchemaId, OVERRIDE_PROPERTY_REGEX, validateProperty, parseScope, getAllConfigurationProperties, getDefaultValue } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
6
+ import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, parseScope, getAllConfigurationProperties, getDefaultValue } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
6
7
  import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
7
- import { workspaceSettingsSchemaId, launchSchemaId, tasksSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
8
+ import { workspaceSettingsSchemaId, launchSchemaId, tasksSchemaId } from '@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common/vscode/vs/workbench/services/configuration/common/configuration';
8
9
  import { isObject, isUndefined } from 'vscode/vscode/vs/base/common/types';
9
10
  import { ExtensionIdentifierMap } from 'vscode/vscode/vs/platform/extensions/common/extensions';
10
11
  import { Extensions as Extensions$2 } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
@@ -12,37 +13,37 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
12
13
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
13
14
  import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
14
15
 
15
- const jsonRegistry = ( (Registry.as(Extensions.JSONContribution)));
16
- const configurationRegistry = ( (Registry.as(Extensions$1.Configuration)));
16
+ const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
17
+ const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
17
18
  const configurationEntrySchema = {
18
19
  type: 'object',
19
20
  defaultSnippets: [{ body: { title: '', properties: {} } }],
20
21
  properties: {
21
22
  title: {
22
23
  description: ( localize(
23
- 3627,
24
+ 2370,
24
25
  'A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading.'
25
26
  )),
26
27
  type: 'string'
27
28
  },
28
29
  order: {
29
30
  description: ( localize(
30
- 3628,
31
+ 2371,
31
32
  'When specified, gives the order of this category of settings relative to other categories.'
32
33
  )),
33
34
  type: 'integer'
34
35
  },
35
36
  properties: {
36
- description: ( localize(3629, 'Description of the configuration properties.')),
37
+ description: ( localize(2372, 'Description of the configuration properties.')),
37
38
  type: 'object',
38
39
  propertyNames: {
39
40
  pattern: '\\S+',
40
- patternErrorMessage: ( localize(3630, 'Property should not be empty.')),
41
+ patternErrorMessage: ( localize(2373, 'Property should not be empty.')),
41
42
  },
42
43
  additionalProperties: {
43
44
  anyOf: [
44
45
  {
45
- title: ( localize(3631, 'Schema of the configuration property.')),
46
+ title: ( localize(2374, 'Schema of the configuration property.')),
46
47
  $ref: 'http://json-schema.org/draft-07/schema#'
47
48
  },
48
49
  {
@@ -53,30 +54,30 @@ const configurationEntrySchema = {
53
54
  enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
54
55
  default: 'window',
55
56
  enumDescriptions: [
56
- ( localize(3632, "Configuration that can be configured only in the user settings.")),
57
+ ( localize(2375, "Configuration that can be configured only in the user settings.")),
57
58
  ( localize(
58
- 3633,
59
- "Configuration that can be configured only in the user settings or only in the remote settings."
60
- )),
59
+ 2376,
60
+ "Configuration that can be configured only in the user settings or only in the remote settings."
61
+ )),
61
62
  ( localize(
62
- 3634,
63
- "Configuration that can be configured in the user, remote or workspace settings."
64
- )),
63
+ 2377,
64
+ "Configuration that can be configured in the user, remote or workspace settings."
65
+ )),
65
66
  ( localize(
66
- 3635,
67
- "Configuration that can be configured in the user, remote, workspace or folder settings."
68
- )),
67
+ 2378,
68
+ "Configuration that can be configured in the user, remote, workspace or folder settings."
69
+ )),
69
70
  ( localize(
70
- 3636,
71
- "Resource configuration that can be configured in language specific settings."
72
- )),
71
+ 2379,
72
+ "Resource configuration that can be configured in language specific settings."
73
+ )),
73
74
  ( localize(
74
- 3637,
75
- "Machine configuration that can be configured also in workspace or folder settings."
76
- ))
75
+ 2380,
76
+ "Machine configuration that can be configured also in workspace or folder settings."
77
+ ))
77
78
  ],
78
79
  markdownDescription: ( localize(
79
- 3638,
80
+ 2381,
80
81
  "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
81
82
  ))
82
83
  },
@@ -85,14 +86,14 @@ const configurationEntrySchema = {
85
86
  items: {
86
87
  type: 'string',
87
88
  },
88
- description: ( localize(3639, 'Descriptions for enum values'))
89
+ description: ( localize(2382, 'Descriptions for enum values'))
89
90
  },
90
91
  markdownEnumDescriptions: {
91
92
  type: 'array',
92
93
  items: {
93
94
  type: 'string',
94
95
  },
95
- description: ( localize(3640, 'Descriptions for enum values in the markdown format.'))
96
+ description: ( localize(2383, 'Descriptions for enum values in the markdown format.'))
96
97
  },
97
98
  enumItemLabels: {
98
99
  type: 'array',
@@ -100,26 +101,26 @@ const configurationEntrySchema = {
100
101
  type: 'string'
101
102
  },
102
103
  markdownDescription: ( localize(
103
- 3641,
104
+ 2384,
104
105
  'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
105
106
  '`enum`'
106
107
  ))
107
108
  },
108
109
  markdownDescription: {
109
110
  type: 'string',
110
- description: ( localize(3642, 'The description in the markdown format.'))
111
+ description: ( localize(2385, 'The description in the markdown format.'))
111
112
  },
112
113
  deprecationMessage: {
113
114
  type: 'string',
114
115
  description: ( localize(
115
- 3643,
116
+ 2386,
116
117
  'If set, the property is marked as deprecated and the given message is shown as an explanation.'
117
118
  ))
118
119
  },
119
120
  markdownDeprecationMessage: {
120
121
  type: 'string',
121
122
  description: ( localize(
122
- 3644,
123
+ 2387,
123
124
  'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
124
125
  ))
125
126
  },
@@ -127,26 +128,26 @@ const configurationEntrySchema = {
127
128
  type: 'string',
128
129
  enum: ['singlelineText', 'multilineText'],
129
130
  enumDescriptions: [
130
- ( localize(3645, 'The value will be shown in an inputbox.')),
131
- ( localize(3646, 'The value will be shown in a textarea.'))
131
+ ( localize(2388, 'The value will be shown in an inputbox.')),
132
+ ( localize(2389, 'The value will be shown in a textarea.'))
132
133
  ],
133
134
  default: 'singlelineText',
134
135
  description: ( localize(
135
- 3647,
136
+ 2390,
136
137
  'When specified, controls the presentation format of the string setting.'
137
138
  ))
138
139
  },
139
140
  order: {
140
141
  type: 'integer',
141
142
  description: ( localize(
142
- 3648,
143
+ 2391,
143
144
  'When specified, gives the order of this setting relative to other settings within the same category. Settings with an order property will be placed before settings without this property set.'
144
145
  ))
145
146
  },
146
147
  ignoreSync: {
147
148
  type: 'boolean',
148
149
  description: ( localize(
149
- 3649,
150
+ 2392,
150
151
  'When enabled, Settings Sync will not sync the user value of this configuration by default.'
151
152
  ))
152
153
  },
@@ -162,7 +163,8 @@ const defaultConfigurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
162
163
  extensionPoint: 'configurationDefaults',
163
164
  jsonSchema: {
164
165
  $ref: configurationDefaultsSchemaId,
165
- }
166
+ },
167
+ canHandleResolver: true
166
168
  });
167
169
  defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
168
170
  if (_configDelta) {
@@ -176,21 +178,21 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
176
178
  }
177
179
  });
178
180
  if (removed.length) {
179
- const removedDefaultConfigurations = ( (removed.map(
181
+ const removedDefaultConfigurations = ( removed.map(
180
182
  extension => ({ overrides: deepClone(extension.value), source: { id: extension.description.identifier.value, displayName: extension.description.displayName } })
181
- )));
183
+ ));
182
184
  _configDelta.removedDefaults = removedDefaultConfigurations;
183
185
  }
184
186
  if (added.length) {
185
187
  const registeredProperties = configurationRegistry.getConfigurationProperties();
186
- const allowedScopes = [6 , 3 , 4 , 5 ];
187
- const addedDefaultConfigurations = ( (added.map(extension => {
188
+ const allowedScopes = [ConfigurationScope.MACHINE_OVERRIDABLE, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE];
189
+ const addedDefaultConfigurations = ( added.map(extension => {
188
190
  const overrides = deepClone(extension.value);
189
- for (const key of ( (Object.keys(overrides)))) {
191
+ for (const key of ( Object.keys(overrides))) {
190
192
  const registeredPropertyScheme = registeredProperties[key];
191
193
  if (registeredPropertyScheme?.disallowConfigurationDefault) {
192
194
  extension.collector.warn(( localize(
193
- 3650,
195
+ 2393,
194
196
  "Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
195
197
  key
196
198
  )));
@@ -200,7 +202,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
200
202
  if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
201
203
  if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
202
204
  extension.collector.warn(( localize(
203
- 3651,
205
+ 2394,
204
206
  "Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
205
207
  key
206
208
  )));
@@ -210,7 +212,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
210
212
  }
211
213
  }
212
214
  return { overrides, source: { id: extension.description.identifier.value, displayName: extension.description.displayName } };
213
- })));
215
+ }));
214
216
  _configDelta.addedDefaults = addedDefaultConfigurations;
215
217
  }
216
218
  });
@@ -218,7 +220,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
218
220
  extensionPoint: 'configuration',
219
221
  deps: [defaultConfigurationExtPoint],
220
222
  jsonSchema: {
221
- description: ( localize(3652, 'Contributes configuration settings.')),
223
+ description: ( localize(2395, 'Contributes configuration settings.')),
222
224
  oneOf: [
223
225
  configurationEntrySchema,
224
226
  {
@@ -226,9 +228,10 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
226
228
  items: configurationEntrySchema
227
229
  }
228
230
  ]
229
- }
231
+ },
232
+ canHandleResolver: true
230
233
  });
231
- const extensionConfigurations = ( (new ExtensionIdentifierMap()));
234
+ const extensionConfigurations = ( new ExtensionIdentifierMap());
232
235
  configurationExtPoint.setHandler((extensions, { added, removed }) => {
233
236
  _configDelta ??= {};
234
237
  if (removed.length) {
@@ -239,11 +242,11 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
239
242
  }
240
243
  _configDelta.removedConfigurations = removedConfigurations;
241
244
  }
242
- const seenProperties = ( (new Set()));
245
+ const seenProperties = ( new Set());
243
246
  function handleConfiguration(node, extension) {
244
247
  const configuration = deepClone(node);
245
248
  if (configuration.title && (typeof configuration.title !== 'string')) {
246
- extension.collector.error(( localize(3653, "'configuration.title' must be a string")));
249
+ extension.collector.error(( localize(2396, "'configuration.title' must be a string")));
247
250
  }
248
251
  validateProperties(configuration, extension);
249
252
  configuration.id = node.id || extension.description.identifier.value;
@@ -256,7 +259,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
256
259
  const properties = configuration.properties;
257
260
  if (properties) {
258
261
  if (typeof properties !== 'object') {
259
- extension.collector.error(( localize(3654, "'configuration.properties' must be an object")));
262
+ extension.collector.error(( localize(2397, "'configuration.properties' must be an object")));
260
263
  configuration.properties = {};
261
264
  }
262
265
  for (const key in properties) {
@@ -267,24 +270,24 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
267
270
  extension.collector.warn(message);
268
271
  continue;
269
272
  }
270
- if (( (seenProperties.has(key)))) {
273
+ if (( seenProperties.has(key))) {
271
274
  delete properties[key];
272
- extension.collector.warn(( localize(3655, "Cannot register '{0}'. This property is already registered.", key)));
275
+ extension.collector.warn(( localize(2398, "Cannot register '{0}'. This property is already registered.", key)));
273
276
  continue;
274
277
  }
275
278
  if (!isObject(propertyConfiguration)) {
276
279
  delete properties[key];
277
- extension.collector.error(( localize(3656, "configuration.properties property '{0}' must be an object", key)));
280
+ extension.collector.error(( localize(2399, "configuration.properties property '{0}' must be an object", key)));
278
281
  continue;
279
282
  }
280
283
  seenProperties.add(key);
281
- propertyConfiguration.scope = propertyConfiguration.scope ? parseScope(( (propertyConfiguration.scope.toString()))) : 3 ;
284
+ propertyConfiguration.scope = propertyConfiguration.scope ? parseScope(( propertyConfiguration.scope.toString())) : ConfigurationScope.WINDOW;
282
285
  }
283
286
  }
284
287
  const subNodes = configuration.allOf;
285
288
  if (subNodes) {
286
289
  extension.collector.error(( localize(
287
- 3657,
290
+ 2400,
288
291
  "'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
289
292
  )));
290
293
  for (const node of subNodes) {
@@ -327,7 +330,7 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
327
330
  'folders': {
328
331
  minItems: 0,
329
332
  uniqueItems: true,
330
- description: ( localize(3658, "List of folders to be loaded in the workspace.")),
333
+ description: ( localize(2401, "List of folders to be loaded in the workspace.")),
331
334
  items: {
332
335
  type: 'object',
333
336
  defaultSnippets: [{ body: { path: '$1' } }],
@@ -336,13 +339,13 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
336
339
  path: {
337
340
  type: 'string',
338
341
  description: ( localize(
339
- 3659,
342
+ 2402,
340
343
  "A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
341
344
  ))
342
345
  },
343
346
  name: {
344
347
  type: 'string',
345
- description: ( localize(3660, "An optional name for the folder. "))
348
+ description: ( localize(2403, "An optional name for the folder. "))
346
349
  }
347
350
  },
348
351
  required: ['path']
@@ -350,11 +353,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
350
353
  properties: {
351
354
  uri: {
352
355
  type: 'string',
353
- description: ( localize(3661, "URI of the folder"))
356
+ description: ( localize(2404, "URI of the folder"))
354
357
  },
355
358
  name: {
356
359
  type: 'string',
357
- description: ( localize(3660, "An optional name for the folder. "))
360
+ description: ( localize(2403, "An optional name for the folder. "))
358
361
  }
359
362
  },
360
363
  required: ['uri']
@@ -364,39 +367,39 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
364
367
  'settings': {
365
368
  type: 'object',
366
369
  default: {},
367
- description: ( localize(3662, "Workspace settings")),
370
+ description: ( localize(2405, "Workspace settings")),
368
371
  $ref: workspaceSettingsSchemaId
369
372
  },
370
373
  'launch': {
371
374
  type: 'object',
372
375
  default: { configurations: [], compounds: [] },
373
- description: ( localize(3663, "Workspace launch configurations")),
376
+ description: ( localize(2406, "Workspace launch configurations")),
374
377
  $ref: launchSchemaId
375
378
  },
376
379
  'tasks': {
377
380
  type: 'object',
378
381
  default: { version: '2.0.0', tasks: [] },
379
- description: ( localize(3664, "Workspace task configurations")),
382
+ description: ( localize(2407, "Workspace task configurations")),
380
383
  $ref: tasksSchemaId
381
384
  },
382
385
  'extensions': {
383
386
  type: 'object',
384
387
  default: {},
385
- description: ( localize(3665, "Workspace extensions")),
388
+ description: ( localize(2408, "Workspace extensions")),
386
389
  $ref: 'vscode://schemas/extensions'
387
390
  },
388
391
  'remoteAuthority': {
389
392
  type: 'string',
390
393
  doNotSuggest: true,
391
- description: ( localize(3666, "The remote server where the workspace is located.")),
394
+ description: ( localize(2409, "The remote server where the workspace is located.")),
392
395
  },
393
396
  'transient': {
394
397
  type: 'boolean',
395
398
  doNotSuggest: true,
396
- description: ( localize(3667, "A transient workspace will disappear when restarting or reloading.")),
399
+ description: ( localize(2410, "A transient workspace will disappear when restarting or reloading.")),
397
400
  }
398
401
  },
399
- errorMessage: ( localize(3668, "Unknown workspace configuration property"))
402
+ errorMessage: ( localize(2411, "Unknown workspace configuration property"))
400
403
  });
401
404
  class SettingsTableRenderer extends Disposable {
402
405
  constructor() {
@@ -411,16 +414,16 @@ class SettingsTableRenderer extends Disposable {
411
414
  ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration]
412
415
  : [];
413
416
  const properties = getAllConfigurationProperties(configuration);
414
- const contrib = properties ? ( (Object.keys(properties))) : [];
415
- const headers = [( localize(3669, "ID")), ( localize(3670, "Description")), ( localize(3671, "Default"))];
416
- const rows = ( (contrib.sort((a, b) => a.localeCompare(b))
417
+ const contrib = ( Object.keys(properties)) ;
418
+ const headers = [( localize(2412, "ID")), ( localize(2413, "Description")), ( localize(2414, "Default"))];
419
+ const rows = ( contrib.sort((a, b) => a.localeCompare(b))
417
420
  .map(key => {
418
421
  return [
419
- ( (new MarkdownString())).appendMarkdown(`\`${key}\``),
420
- properties[key].markdownDescription ? ( (new MarkdownString(properties[key].markdownDescription, false))) : properties[key].description ?? '',
421
- ( (new MarkdownString())).appendCodeblock('json', JSON.stringify(isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default, null, 2)),
422
+ ( new MarkdownString()).appendMarkdown(`\`${key}\``),
423
+ properties[key].markdownDescription ? ( new MarkdownString(properties[key].markdownDescription, false)) : properties[key].description ?? '',
424
+ ( new MarkdownString()).appendCodeblock('json', JSON.stringify(isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default, null, 2)),
422
425
  ];
423
- })));
426
+ }));
424
427
  return {
425
428
  data: {
426
429
  headers,
@@ -430,11 +433,11 @@ class SettingsTableRenderer extends Disposable {
430
433
  };
431
434
  }
432
435
  }
433
- ( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
436
+ ( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
434
437
  id: 'configuration',
435
- label: ( localize(3672, "Settings")),
438
+ label: ( localize(2415, "Settings")),
436
439
  access: {
437
440
  canToggle: false
438
441
  },
439
- renderer: ( (new SyncDescriptor(SettingsTableRenderer))),
442
+ renderer: ( new SyncDescriptor(SettingsTableRenderer)),
440
443
  });
@@ -0,0 +1,19 @@
1
+ import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
2
+ import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
3
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
4
+ import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
5
+ import { INotificationService } from "vscode/vscode/vs/platform/notification/common/notification.service";
6
+ import { IHostService } from "vscode/vscode/vs/workbench/services/host/browser/host.service";
7
+ import { IQuickInputService } from "vscode/vscode/vs/platform/quickinput/common/quickInput.service";
8
+ import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
9
+ export declare class WorkspacesFinderContribution extends Disposable implements IWorkbenchContribution {
10
+ private readonly contextService;
11
+ private readonly notificationService;
12
+ private readonly fileService;
13
+ private readonly quickInputService;
14
+ private readonly hostService;
15
+ private readonly storageService;
16
+ constructor(contextService: IWorkspaceContextService, notificationService: INotificationService, fileService: IFileService, quickInputService: IQuickInputService, hostService: IHostService, storageService: IStorageService);
17
+ private findWorkspaces;
18
+ private doHandleWorkspaceFiles;
19
+ }
@@ -1,8 +1,10 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { localize, localize2 } from 'vscode/vscode/vs/nls';
3
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
5
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
5
- import { hasWorkspaceFileExtension, WORKSPACE_SUFFIX } from 'vscode/vscode/vs/platform/workspace/common/workspace';
6
+ import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
7
+ import { WorkbenchState, hasWorkspaceFileExtension, WORKSPACE_SUFFIX } from 'vscode/vscode/vs/platform/workspace/common/workspace';
6
8
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
7
9
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
8
10
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
@@ -11,13 +13,14 @@ import { INotificationService } from 'vscode/vscode/vs/platform/notification/com
11
13
  import { joinPath, isEqual } from 'vscode/vscode/vs/base/common/resources';
12
14
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
13
15
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
16
+ import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
14
17
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
15
- import { isVirtualWorkspace } from 'vscode/vscode/vs/platform/workspace/common/virtualWorkspace';
18
+ import { isVirtualWorkspace } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/workspace/common/virtualWorkspace';
16
19
  import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
17
20
  import { ResourceContextKey, ActiveEditorContext, TemporaryWorkspaceContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
18
21
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
19
- import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
20
- import Severity$1 from 'vscode/vscode/vs/base/common/severity';
22
+ import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-cc9ccbec-e2a1-599d-84ae-46f5efc666e3-common/vscode/vs/workbench/contrib/files/common/files';
23
+ import Severity from 'vscode/vscode/vs/base/common/severity';
21
24
 
22
25
  let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Disposable {
23
26
  constructor(contextService, notificationService, fileService, quickInputService, hostService, storageService) {
@@ -32,7 +35,7 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
32
35
  }
33
36
  async findWorkspaces() {
34
37
  const folder = this.contextService.getWorkspace().folders[0];
35
- if (!folder || this.contextService.getWorkbenchState() !== 2 || isVirtualWorkspace(this.contextService.getWorkspace())) {
38
+ if (!folder || this.contextService.getWorkbenchState() !== WorkbenchState.FOLDER || isVirtualWorkspace(this.contextService.getWorkspace())) {
36
39
  return;
37
40
  }
38
41
  const rootFileNames = (await this.fileService.resolve(folder.uri)).children?.map(child => child.name);
@@ -47,28 +50,28 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
47
50
  const neverShowAgain = { id: 'workspaces.dontPromptToOpen', scope: NeverShowAgainScope.WORKSPACE, isSecondary: true };
48
51
  if (workspaces.length === 1) {
49
52
  const workspaceFile = workspaces[0];
50
- this.notificationService.prompt(Severity$1.Info, ( localize(
51
- 3673,
53
+ this.notificationService.prompt(Severity.Info, ( localize(
54
+ 11119,
52
55
  "This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
53
56
  workspaceFile,
54
57
  'https://go.microsoft.com/fwlink/?linkid=2025315'
55
58
  )), [{
56
- label: ( localize(3674, "Open Workspace")),
59
+ label: ( localize(11120, "Open Workspace")),
57
60
  run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
58
61
  }], {
59
62
  neverShowAgain,
60
- priority: !this.storageService.isNew(1 ) ? NotificationPriority.SILENT : undefined
63
+ priority: !this.storageService.isNew(StorageScope.WORKSPACE) ? NotificationPriority.SILENT : undefined
61
64
  });
62
65
  }
63
66
  else if (workspaces.length > 1) {
64
- this.notificationService.prompt(Severity$1.Info, ( localize(
65
- 3675,
67
+ this.notificationService.prompt(Severity.Info, ( localize(
68
+ 11121,
66
69
  "This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
67
70
  'https://go.microsoft.com/fwlink/?linkid=2025315'
68
71
  )), [{
69
- label: ( localize(3676, "Select Workspace")),
72
+ label: ( localize(11122, "Select Workspace")),
70
73
  run: () => {
71
- this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localize(3677, "Select a workspace to open")) }).then(pick => {
74
+ this.quickInputService.pick(( workspaces.map(workspace => ({ label: workspace }))), { placeHolder: ( localize(11123, "Select a workspace to open")) }).then(pick => {
72
75
  if (pick) {
73
76
  this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
74
77
  }
@@ -76,33 +79,29 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
76
79
  }
77
80
  }], {
78
81
  neverShowAgain,
79
- priority: !this.storageService.isNew(1 ) ? NotificationPriority.SILENT : undefined
82
+ priority: !this.storageService.isNew(StorageScope.WORKSPACE) ? NotificationPriority.SILENT : undefined
80
83
  });
81
84
  }
82
85
  }
83
86
  };
84
- WorkspacesFinderContribution = ( (__decorate([
85
- ( (__param(0, IWorkspaceContextService))),
86
- ( (__param(1, INotificationService))),
87
- ( (__param(2, IFileService))),
88
- ( (__param(3, IQuickInputService))),
89
- ( (__param(4, IHostService))),
90
- ( (__param(5, IStorageService)))
91
- ], WorkspacesFinderContribution)));
92
- ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(WorkspacesFinderContribution, 4 );
87
+ WorkspacesFinderContribution = ( __decorate([
88
+ ( __param(0, IWorkspaceContextService)),
89
+ ( __param(1, INotificationService)),
90
+ ( __param(2, IFileService)),
91
+ ( __param(3, IQuickInputService)),
92
+ ( __param(4, IHostService)),
93
+ ( __param(5, IStorageService))
94
+ ], WorkspacesFinderContribution));
95
+ ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(WorkspacesFinderContribution, LifecyclePhase.Eventually);
93
96
  registerAction2(class extends Action2 {
94
97
  constructor() {
95
98
  super({
96
99
  id: 'workbench.action.openWorkspaceFromEditor',
97
- title: ( localize2(3674, "Open Workspace")),
100
+ title: ( localize2(11120, "Open Workspace")),
98
101
  f1: false,
99
102
  menu: {
100
103
  id: MenuId.EditorContent,
101
- when: ( (ContextKeyExpr.and(
102
- (ResourceContextKey.Extension.isEqualTo(WORKSPACE_SUFFIX)),
103
- (ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)),
104
- (TemporaryWorkspaceContext.toNegated())
105
- )))
104
+ when: ( ContextKeyExpr.and(( ResourceContextKey.Extension.isEqualTo(WORKSPACE_SUFFIX)), ( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), ( TemporaryWorkspaceContext.toNegated())))
106
105
  }
107
106
  });
108
107
  }
@@ -110,10 +109,10 @@ registerAction2(class extends Action2 {
110
109
  const hostService = accessor.get(IHostService);
111
110
  const contextService = accessor.get(IWorkspaceContextService);
112
111
  const notificationService = accessor.get(INotificationService);
113
- if (contextService.getWorkbenchState() === 3 ) {
112
+ if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
114
113
  const workspaceConfiguration = contextService.getWorkspace().configuration;
115
114
  if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
116
- notificationService.info(( localize(3678, "This workspace is already open.")));
115
+ notificationService.info(( localize(11124, "This workspace is already open.")));
117
116
  return;
118
117
  }
119
118
  }