@codingame/monaco-vscode-configuration-service-override 25.1.2 → 26.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 (16) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +31 -15
  3. package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +300 -278
  4. package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +44 -30
  5. package/vscode/src/vs/workbench/services/configuration/browser/configuration.d.ts +4 -3
  6. package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +257 -151
  7. package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +1 -0
  8. package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +477 -236
  9. package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +31 -13
  10. package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +383 -249
  11. package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +68 -17
  12. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +137 -86
  13. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +16 -13
  14. package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js +13 -10
  15. package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +93 -59
  16. package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +76 -33
@@ -17,192 +17,190 @@ import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/com
17
17
  const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
18
18
  const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
19
19
  const configurationEntrySchema = {
20
- type: 'object',
21
- defaultSnippets: [{ body: { title: '', properties: {} } }],
20
+ type: "object",
21
+ defaultSnippets: [{
22
+ body: {
23
+ title: "",
24
+ properties: {}
25
+ }
26
+ }],
22
27
  properties: {
23
28
  title: {
24
29
  description: ( localize(
25
- 2626,
26
- '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.'
30
+ 2629,
31
+ "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."
27
32
  )),
28
- type: 'string'
33
+ type: "string"
29
34
  },
30
35
  order: {
31
36
  description: ( localize(
32
- 2627,
33
- 'When specified, gives the order of this category of settings relative to other categories.'
37
+ 2630,
38
+ "When specified, gives the order of this category of settings relative to other categories."
34
39
  )),
35
- type: 'integer'
40
+ type: "integer"
36
41
  },
37
42
  properties: {
38
- description: ( localize(2628, 'Description of the configuration properties.')),
39
- type: 'object',
43
+ description: ( localize(2631, "Description of the configuration properties.")),
44
+ type: "object",
40
45
  propertyNames: {
41
- pattern: '\\S+',
42
- patternErrorMessage: ( localize(2629, 'Property should not be empty.')),
46
+ pattern: "\\S+",
47
+ patternErrorMessage: ( localize(2632, "Property should not be empty."))
43
48
  },
44
49
  additionalProperties: {
45
- anyOf: [
46
- {
47
- title: ( localize(2630, 'Schema of the configuration property.')),
48
- $ref: 'http://json-schema.org/draft-07/schema#'
49
- },
50
- {
51
- type: 'object',
52
- properties: {
53
- scope: {
54
- type: 'string',
55
- enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
56
- default: 'window',
57
- enumDescriptions: [
58
- ( localize(2631, "Configuration that can be configured only in the user settings.")),
59
- ( localize(
60
- 2632,
61
- "Configuration that can be configured only in the user settings or only in the remote settings."
62
- )),
63
- ( localize(
64
- 2633,
65
- "Configuration that can be configured in the user, remote or workspace settings."
66
- )),
67
- ( localize(
68
- 2634,
69
- "Configuration that can be configured in the user, remote, workspace or folder settings."
70
- )),
71
- ( localize(
72
- 2635,
73
- "Resource configuration that can be configured in language specific settings."
74
- )),
75
- ( localize(
76
- 2636,
77
- "Machine configuration that can be configured also in workspace or folder settings."
78
- ))
79
- ],
80
- markdownDescription: ( localize(
81
- 2637,
82
- "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
83
- ))
84
- },
85
- enumDescriptions: {
86
- type: 'array',
87
- items: {
88
- type: 'string',
89
- },
90
- description: ( localize(2638, 'Descriptions for enum values'))
91
- },
92
- markdownEnumDescriptions: {
93
- type: 'array',
94
- items: {
95
- type: 'string',
96
- },
97
- description: ( localize(2639, 'Descriptions for enum values in the markdown format.'))
98
- },
99
- enumItemLabels: {
100
- type: 'array',
101
- items: {
102
- type: 'string'
103
- },
104
- markdownDescription: ( localize(
105
- 2640,
106
- 'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
107
- '`enum`'
108
- ))
109
- },
110
- markdownDescription: {
111
- type: 'string',
112
- description: ( localize(2641, 'The description in the markdown format.'))
50
+ anyOf: [{
51
+ title: ( localize(2633, "Schema of the configuration property.")),
52
+ $ref: "http://json-schema.org/draft-07/schema#"
53
+ }, {
54
+ type: "object",
55
+ properties: {
56
+ scope: {
57
+ type: "string",
58
+ enum: [
59
+ "application",
60
+ "machine",
61
+ "window",
62
+ "resource",
63
+ "language-overridable",
64
+ "machine-overridable"
65
+ ],
66
+ default: "window",
67
+ enumDescriptions: [( localize(2634, "Configuration that can be configured only in the user settings.")), ( localize(
68
+ 2635,
69
+ "Configuration that can be configured only in the user settings or only in the remote settings."
70
+ )), ( localize(
71
+ 2636,
72
+ "Configuration that can be configured in the user, remote or workspace settings."
73
+ )), ( localize(
74
+ 2637,
75
+ "Configuration that can be configured in the user, remote, workspace or folder settings."
76
+ )), ( localize(
77
+ 2638,
78
+ "Resource configuration that can be configured in language specific settings."
79
+ )), ( localize(
80
+ 2639,
81
+ "Machine configuration that can be configured also in workspace or folder settings."
82
+ ))],
83
+ markdownDescription: ( localize(
84
+ 2640,
85
+ "Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
86
+ ))
87
+ },
88
+ enumDescriptions: {
89
+ type: "array",
90
+ items: {
91
+ type: "string"
113
92
  },
114
- deprecationMessage: {
115
- type: 'string',
116
- description: ( localize(
117
- 2642,
118
- 'If set, the property is marked as deprecated and the given message is shown as an explanation.'
119
- ))
93
+ description: ( localize(2641, "Descriptions for enum values"))
94
+ },
95
+ markdownEnumDescriptions: {
96
+ type: "array",
97
+ items: {
98
+ type: "string"
120
99
  },
121
- markdownDeprecationMessage: {
122
- type: 'string',
123
- description: ( localize(
124
- 2643,
125
- 'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
126
- ))
100
+ description: ( localize(2642, "Descriptions for enum values in the markdown format."))
101
+ },
102
+ enumItemLabels: {
103
+ type: "array",
104
+ items: {
105
+ type: "string"
127
106
  },
128
- editPresentation: {
129
- type: 'string',
130
- enum: ['singlelineText', 'multilineText'],
131
- enumDescriptions: [
132
- ( localize(2644, 'The value will be shown in an inputbox.')),
133
- ( localize(2645, 'The value will be shown in a textarea.'))
107
+ markdownDescription: ( localize(
108
+ 2643,
109
+ "Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.",
110
+ "`enum`"
111
+ ))
112
+ },
113
+ markdownDescription: {
114
+ type: "string",
115
+ description: ( localize(2644, "The description in the markdown format."))
116
+ },
117
+ deprecationMessage: {
118
+ type: "string",
119
+ description: ( localize(
120
+ 2645,
121
+ "If set, the property is marked as deprecated and the given message is shown as an explanation."
122
+ ))
123
+ },
124
+ markdownDeprecationMessage: {
125
+ type: "string",
126
+ description: ( localize(
127
+ 2646,
128
+ "If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format."
129
+ ))
130
+ },
131
+ editPresentation: {
132
+ type: "string",
133
+ enum: ["singlelineText", "multilineText"],
134
+ enumDescriptions: [( localize(2647, "The value will be shown in an inputbox.")), ( localize(2648, "The value will be shown in a textarea."))],
135
+ default: "singlelineText",
136
+ description: ( localize(
137
+ 2649,
138
+ "When specified, controls the presentation format of the string setting."
139
+ ))
140
+ },
141
+ order: {
142
+ type: "integer",
143
+ description: ( localize(
144
+ 2650,
145
+ "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."
146
+ ))
147
+ },
148
+ ignoreSync: {
149
+ type: "boolean",
150
+ description: ( localize(
151
+ 2651,
152
+ "When enabled, Settings Sync will not sync the user value of this configuration by default."
153
+ ))
154
+ },
155
+ tags: {
156
+ type: "array",
157
+ items: {
158
+ type: "string",
159
+ enum: [
160
+ "accessibility",
161
+ "advanced",
162
+ "experimental",
163
+ "telemetry",
164
+ "usesOnlineServices"
134
165
  ],
135
- default: 'singlelineText',
136
- description: ( localize(
137
- 2646,
138
- 'When specified, controls the presentation format of the string setting.'
139
- ))
140
- },
141
- order: {
142
- type: 'integer',
143
- description: ( localize(
144
- 2647,
145
- '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.'
146
- ))
147
- },
148
- ignoreSync: {
149
- type: 'boolean',
150
- description: ( localize(
151
- 2648,
152
- 'When enabled, Settings Sync will not sync the user value of this configuration by default.'
153
- ))
154
- },
155
- tags: {
156
- type: 'array',
157
- items: {
158
- type: 'string',
159
- enum: [
160
- 'accessibility',
161
- 'advanced',
162
- 'experimental',
163
- 'telemetry',
164
- 'usesOnlineServices',
165
- ],
166
- enumDescriptions: [
167
- ( localize(2649, 'Accessibility settings')),
168
- ( localize(
169
- 2650,
170
- 'Advanced settings are hidden by default in the Settings editor unless the user chooses to show advanced settings.'
171
- )),
172
- ( localize(
173
- 2651,
174
- 'Experimental settings are subject to change and may be removed in future releases.'
175
- )),
176
- ( localize(
177
- 2652,
178
- 'Preview settings can be used to try out new features before they are finalized.'
179
- )),
180
- ( localize(2653, 'Telemetry settings')),
181
- ( localize(2654, 'Settings that use online services'))
182
- ],
183
- },
184
- additionalItems: true,
185
- markdownDescription: ( localize(
166
+ enumDescriptions: [( localize(2652, "Accessibility settings")), ( localize(
167
+ 2653,
168
+ "Advanced settings are hidden by default in the Settings editor unless the user chooses to show advanced settings."
169
+ )), ( localize(
170
+ 2654,
171
+ "Experimental settings are subject to change and may be removed in future releases."
172
+ )), ( localize(
186
173
  2655,
187
- 'A list of tags under which to place the setting. The tag can then be searched up in the Settings editor. For example, specifying the `experimental` tag allows one to find the setting by searching `@tag:experimental`.'
188
- )),
189
- }
174
+ "Preview settings can be used to try out new features before they are finalized."
175
+ )), ( localize(2656, "Telemetry settings")), ( localize(2657, "Settings that use online services"))]
176
+ },
177
+ additionalItems: true,
178
+ markdownDescription: ( localize(
179
+ 2658,
180
+ "A list of tags under which to place the setting. The tag can then be searched up in the Settings editor. For example, specifying the `experimental` tag allows one to find the setting by searching `@tag:experimental`."
181
+ ))
190
182
  }
191
183
  }
192
- ]
184
+ }]
193
185
  }
194
186
  }
195
187
  }
196
188
  };
197
189
  let _configDelta;
198
190
  const defaultConfigurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
199
- extensionPoint: 'configurationDefaults',
191
+ extensionPoint: "configurationDefaults",
200
192
  jsonSchema: {
201
- $ref: configurationDefaultsSchemaId,
193
+ $ref: configurationDefaultsSchemaId
202
194
  },
203
195
  canHandleResolver: true
204
196
  });
205
- defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
197
+ defaultConfigurationExtPoint.setHandler((
198
+ extensions,
199
+ {
200
+ added,
201
+ removed
202
+ }
203
+ ) => {
206
204
  if (_configDelta) {
207
205
  configurationRegistry.deltaConfiguration(_configDelta);
208
206
  }
@@ -214,21 +212,30 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
214
212
  }
215
213
  });
216
214
  if (removed.length) {
217
- const removedDefaultConfigurations = ( removed.map(
218
- extension => ({ overrides: deepClone(extension.value), source: { id: extension.description.identifier.value, displayName: extension.description.displayName } })
219
- ));
215
+ const removedDefaultConfigurations = ( removed.map(extension => ({
216
+ overrides: deepClone(extension.value),
217
+ source: {
218
+ id: extension.description.identifier.value,
219
+ displayName: extension.description.displayName
220
+ }
221
+ })));
220
222
  _configDelta.removedDefaults = removedDefaultConfigurations;
221
223
  }
222
224
  if (added.length) {
223
225
  const registeredProperties = configurationRegistry.getConfigurationProperties();
224
- const allowedScopes = [ConfigurationScope.MACHINE_OVERRIDABLE, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE];
226
+ const allowedScopes = [
227
+ ConfigurationScope.MACHINE_OVERRIDABLE,
228
+ ConfigurationScope.WINDOW,
229
+ ConfigurationScope.RESOURCE,
230
+ ConfigurationScope.LANGUAGE_OVERRIDABLE
231
+ ];
225
232
  const addedDefaultConfigurations = ( added.map(extension => {
226
233
  const overrides = deepClone(extension.value);
227
234
  for (const key of ( Object.keys(overrides))) {
228
235
  const registeredPropertyScheme = registeredProperties[key];
229
236
  if (registeredPropertyScheme?.disallowConfigurationDefault) {
230
237
  extension.collector.warn(( localize(
231
- 2656,
238
+ 2659,
232
239
  "Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
233
240
  key
234
241
  )));
@@ -238,7 +245,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
238
245
  if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
239
246
  if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
240
247
  extension.collector.warn(( localize(
241
- 2657,
248
+ 2660,
242
249
  "Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
243
250
  key
244
251
  )));
@@ -247,28 +254,37 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
247
254
  }
248
255
  }
249
256
  }
250
- return { overrides, source: { id: extension.description.identifier.value, displayName: extension.description.displayName } };
257
+ return {
258
+ overrides,
259
+ source: {
260
+ id: extension.description.identifier.value,
261
+ displayName: extension.description.displayName
262
+ }
263
+ };
251
264
  }));
252
265
  _configDelta.addedDefaults = addedDefaultConfigurations;
253
266
  }
254
267
  });
255
268
  const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
256
- extensionPoint: 'configuration',
269
+ extensionPoint: "configuration",
257
270
  deps: [defaultConfigurationExtPoint],
258
271
  jsonSchema: {
259
- description: ( localize(2658, 'Contributes configuration settings.')),
260
- oneOf: [
261
- configurationEntrySchema,
262
- {
263
- type: 'array',
264
- items: configurationEntrySchema
265
- }
266
- ]
272
+ description: ( localize(2661, "Contributes configuration settings.")),
273
+ oneOf: [configurationEntrySchema, {
274
+ type: "array",
275
+ items: configurationEntrySchema
276
+ }]
267
277
  },
268
278
  canHandleResolver: true
269
279
  });
270
280
  const extensionConfigurations = ( new ExtensionIdentifierMap());
271
- configurationExtPoint.setHandler((extensions, { added, removed }) => {
281
+ configurationExtPoint.setHandler((
282
+ extensions,
283
+ {
284
+ added,
285
+ removed
286
+ }
287
+ ) => {
272
288
  _configDelta ??= {};
273
289
  if (removed.length) {
274
290
  const removedConfigurations = [];
@@ -281,13 +297,16 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
281
297
  const seenProperties = ( new Set());
282
298
  function handleConfiguration(node, extension) {
283
299
  const configuration = deepClone(node);
284
- if (configuration.title && (typeof configuration.title !== 'string')) {
285
- extension.collector.error(( localize(2659, "'configuration.title' must be a string")));
300
+ if (configuration.title && (typeof configuration.title !== "string")) {
301
+ extension.collector.error(( localize(2662, "'configuration.title' must be a string")));
286
302
  }
287
303
  validateProperties(configuration, extension);
288
304
  configuration.id = node.id || extension.description.identifier.value;
289
- configuration.extensionInfo = { id: extension.description.identifier.value, displayName: extension.description.displayName };
290
- configuration.restrictedProperties = extension.description.capabilities?.untrustedWorkspaces?.supported === 'limited' ? extension.description.capabilities?.untrustedWorkspaces.restrictedConfigurations : undefined;
305
+ configuration.extensionInfo = {
306
+ id: extension.description.identifier.value,
307
+ displayName: extension.description.displayName
308
+ };
309
+ configuration.restrictedProperties = extension.description.capabilities?.untrustedWorkspaces?.supported === "limited" ? extension.description.capabilities?.untrustedWorkspaces.restrictedConfigurations : undefined;
291
310
  configuration.title = configuration.title || extension.description.displayName || extension.description.identifier.value;
292
311
  return configuration;
293
312
  }
@@ -295,8 +314,8 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
295
314
  const properties = configuration.properties;
296
315
  const extensionConfigurationPolicy = product.extensionConfigurationPolicy;
297
316
  if (properties) {
298
- if (typeof properties !== 'object') {
299
- extension.collector.error(( localize(2660, "'configuration.properties' must be an object")));
317
+ if (typeof properties !== "object") {
318
+ extension.collector.error(( localize(2663, "'configuration.properties' must be an object")));
300
319
  configuration.properties = {};
301
320
  }
302
321
  for (const key in properties) {
@@ -309,20 +328,20 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
309
328
  }
310
329
  if (( seenProperties.has(key)) && !( EXTENSION_UNIFICATION_EXTENSION_IDS.has(extension.description.identifier.value.toLowerCase()))) {
311
330
  delete properties[key];
312
- extension.collector.warn(( localize(2661, "Cannot register '{0}'. This property is already registered.", key)));
331
+ extension.collector.warn(( localize(2664, "Cannot register '{0}'. This property is already registered.", key)));
313
332
  continue;
314
333
  }
315
334
  if (!isObject(propertyConfiguration)) {
316
335
  delete properties[key];
317
- extension.collector.error(( localize(2662, "configuration.properties property '{0}' must be an object", key)));
336
+ extension.collector.error(( localize(2665, "configuration.properties property '{0}' must be an object", key)));
318
337
  continue;
319
338
  }
320
339
  if (extensionConfigurationPolicy?.[key]) {
321
340
  propertyConfiguration.policy = extensionConfigurationPolicy?.[key];
322
341
  }
323
- if (propertyConfiguration.tags?.some(tag => tag.toLowerCase() === 'onexp')) {
342
+ if (propertyConfiguration.tags?.some(tag => tag.toLowerCase() === "onexp")) {
324
343
  propertyConfiguration.experiment = {
325
- mode: 'startup'
344
+ mode: "startup"
326
345
  };
327
346
  }
328
347
  seenProperties.add(key);
@@ -332,7 +351,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
332
351
  const subNodes = configuration.allOf;
333
352
  if (subNodes) {
334
353
  extension.collector.error(( localize(
335
- 2663,
354
+ 2666,
336
355
  "'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
337
356
  )));
338
357
  for (const node of subNodes) {
@@ -347,8 +366,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
347
366
  const value = extension.value;
348
367
  if (Array.isArray(value)) {
349
368
  value.forEach(v => configurations.push(handleConfiguration(v, extension)));
350
- }
351
- else {
369
+ } else {
352
370
  configurations.push(handleConfiguration(value, extension));
353
371
  }
354
372
  extensionConfigurations.set(extension.description.identifier, configurations);
@@ -359,177 +377,181 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
359
377
  configurationRegistry.deltaConfiguration(_configDelta);
360
378
  _configDelta = undefined;
361
379
  });
362
- jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
380
+ jsonRegistry.registerSchema("vscode://schemas/workspaceConfig", {
363
381
  allowComments: true,
364
382
  allowTrailingCommas: true,
365
383
  default: {
366
- folders: [
367
- {
368
- path: ''
369
- }
370
- ],
384
+ folders: [{
385
+ path: ""
386
+ }],
371
387
  settings: {}
372
388
  },
373
- required: ['folders'],
389
+ required: ["folders"],
374
390
  properties: {
375
- 'folders': {
391
+ "folders": {
376
392
  minItems: 0,
377
393
  uniqueItems: true,
378
- description: ( localize(2664, "List of folders to be loaded in the workspace.")),
394
+ description: ( localize(2667, "List of folders to be loaded in the workspace.")),
379
395
  items: {
380
- type: 'object',
381
- defaultSnippets: [{ body: { path: '$1' } }],
396
+ type: "object",
397
+ defaultSnippets: [{
398
+ body: {
399
+ path: "$1"
400
+ }
401
+ }],
382
402
  oneOf: [{
383
- properties: {
384
- path: {
385
- type: 'string',
386
- description: ( localize(
387
- 2665,
388
- "A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
389
- ))
390
- },
391
- name: {
392
- type: 'string',
393
- description: ( localize(2666, "An optional name for the folder. "))
394
- }
403
+ properties: {
404
+ path: {
405
+ type: "string",
406
+ description: ( localize(
407
+ 2668,
408
+ "A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
409
+ ))
395
410
  },
396
- required: ['path']
397
- }, {
398
- properties: {
399
- uri: {
400
- type: 'string',
401
- description: ( localize(2667, "URI of the folder"))
402
- },
403
- name: {
404
- type: 'string',
405
- description: ( localize(2666, "An optional name for the folder. "))
406
- }
411
+ name: {
412
+ type: "string",
413
+ description: ( localize(2669, "An optional name for the folder. "))
414
+ }
415
+ },
416
+ required: ["path"]
417
+ }, {
418
+ properties: {
419
+ uri: {
420
+ type: "string",
421
+ description: ( localize(2670, "URI of the folder"))
407
422
  },
408
- required: ['uri']
409
- }]
423
+ name: {
424
+ type: "string",
425
+ description: ( localize(2669, "An optional name for the folder. "))
426
+ }
427
+ },
428
+ required: ["uri"]
429
+ }]
410
430
  }
411
431
  },
412
- 'settings': {
413
- type: 'object',
432
+ "settings": {
433
+ type: "object",
414
434
  default: {},
415
- description: ( localize(2668, "Workspace settings")),
435
+ description: ( localize(2671, "Workspace settings")),
416
436
  $ref: workspaceSettingsSchemaId
417
437
  },
418
- 'launch': {
419
- type: 'object',
420
- default: { configurations: [], compounds: [] },
421
- description: ( localize(2669, "Workspace launch configurations")),
438
+ "launch": {
439
+ type: "object",
440
+ default: {
441
+ configurations: [],
442
+ compounds: []
443
+ },
444
+ description: ( localize(2672, "Workspace launch configurations")),
422
445
  $ref: launchSchemaId
423
446
  },
424
- 'tasks': {
425
- type: 'object',
426
- default: { version: '2.0.0', tasks: [] },
427
- description: ( localize(2670, "Workspace task configurations")),
447
+ "tasks": {
448
+ type: "object",
449
+ default: {
450
+ version: "2.0.0",
451
+ tasks: []
452
+ },
453
+ description: ( localize(2673, "Workspace task configurations")),
428
454
  $ref: tasksSchemaId
429
455
  },
430
- 'mcp': {
431
- type: 'object',
456
+ "mcp": {
457
+ type: "object",
432
458
  default: {
433
459
  inputs: [],
434
460
  servers: {
435
- 'mcp-server-time': {
436
- command: 'uvx',
437
- args: ['mcp_server_time', '--local-timezone=America/Los_Angeles']
461
+ "mcp-server-time": {
462
+ command: "uvx",
463
+ args: ["mcp_server_time", "--local-timezone=America/Los_Angeles"]
438
464
  }
439
465
  }
440
466
  },
441
- description: ( localize(2671, "Model Context Protocol server configurations")),
467
+ description: ( localize(2674, "Model Context Protocol server configurations")),
442
468
  $ref: mcpSchemaId
443
469
  },
444
- 'extensions': {
445
- type: 'object',
470
+ "extensions": {
471
+ type: "object",
446
472
  default: {},
447
- description: ( localize(2672, "Workspace extensions")),
448
- $ref: 'vscode://schemas/extensions'
473
+ description: ( localize(2675, "Workspace extensions")),
474
+ $ref: "vscode://schemas/extensions"
449
475
  },
450
- 'remoteAuthority': {
451
- type: 'string',
476
+ "remoteAuthority": {
477
+ type: "string",
452
478
  doNotSuggest: true,
453
- description: ( localize(2673, "The remote server where the workspace is located.")),
479
+ description: ( localize(2676, "The remote server where the workspace is located."))
454
480
  },
455
- 'transient': {
456
- type: 'boolean',
481
+ "transient": {
482
+ type: "boolean",
457
483
  doNotSuggest: true,
458
- description: ( localize(2674, "A transient workspace will disappear when restarting or reloading.")),
484
+ description: ( localize(2677, "A transient workspace will disappear when restarting or reloading."))
459
485
  }
460
486
  },
461
- errorMessage: ( localize(2675, "Unknown workspace configuration property"))
487
+ errorMessage: ( localize(2678, "Unknown workspace configuration property"))
462
488
  });
463
489
  class SettingsTableRenderer extends Disposable {
464
490
  constructor() {
465
491
  super(...arguments);
466
- this.type = 'table';
492
+ this.type = "table";
467
493
  }
468
494
  shouldRender(manifest) {
469
495
  return !!manifest.contributes?.configuration;
470
496
  }
471
497
  render(manifest) {
472
- const configuration = manifest.contributes?.configuration
473
- ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration]
474
- : [];
498
+ const configuration = manifest.contributes?.configuration ? Array.isArray(manifest.contributes.configuration) ? manifest.contributes.configuration : [manifest.contributes.configuration] : [];
475
499
  const properties = getAllConfigurationProperties(configuration);
476
500
  const contrib = properties ? ( Object.keys(properties)) : [];
477
- const headers = [( localize(2676, "ID")), ( localize(2677, "Description")), ( localize(2678, "Default"))];
478
- const rows = ( contrib.sort((a, b) => a.localeCompare(b))
479
- .map(key => {
480
- return [
481
- ( new MarkdownString()).appendMarkdown(`\`${key}\``),
482
- properties[key].markdownDescription ? ( new MarkdownString(properties[key].markdownDescription, false)) : properties[key].description ?? '',
483
- ( new MarkdownString()).appendCodeblock('json', JSON.stringify(isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default, null, 2)),
484
- ];
501
+ const headers = [( localize(2679, "ID")), ( localize(2680, "Description")), ( localize(2681, "Default"))];
502
+ const rows = ( contrib.sort((a, b) => a.localeCompare(b)).map(key => {
503
+ return [( new MarkdownString()).appendMarkdown(`\`${key}\``), properties[key].markdownDescription ? ( new MarkdownString(properties[key].markdownDescription, false)) : properties[key].description ?? "", ( new MarkdownString()).appendCodeblock("json", JSON.stringify(
504
+ isUndefined(properties[key].default) ? getDefaultValue(properties[key].type) : properties[key].default,
505
+ null,
506
+ 2
507
+ ))];
485
508
  }));
486
509
  return {
487
510
  data: {
488
511
  headers,
489
512
  rows
490
513
  },
491
- dispose: () => { }
514
+ dispose: () => {}
492
515
  };
493
516
  }
494
517
  }
495
518
  ( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
496
- id: 'configuration',
497
- label: ( localize(2679, "Settings")),
519
+ id: "configuration",
520
+ label: ( localize(2682, "Settings")),
498
521
  access: {
499
522
  canToggle: false
500
523
  },
501
- renderer: ( new SyncDescriptor(SettingsTableRenderer)),
524
+ renderer: ( new SyncDescriptor(SettingsTableRenderer))
502
525
  });
503
526
  class ConfigurationDefaultsTableRenderer extends Disposable {
504
527
  constructor() {
505
528
  super(...arguments);
506
- this.type = 'table';
529
+ this.type = "table";
507
530
  }
508
531
  shouldRender(manifest) {
509
532
  return !!manifest.contributes?.configurationDefaults;
510
533
  }
511
534
  render(manifest) {
512
535
  const configurationDefaults = manifest.contributes?.configurationDefaults ?? {};
513
- const headers = [( localize(2680, "Languages")), ( localize(2681, "Setting")), ( localize(2682, "Override Value"))];
536
+ const headers = [( localize(2683, "Languages")), ( localize(2684, "Setting")), ( localize(2685, "Override Value"))];
514
537
  const rows = [];
515
538
  for (const key of ( Object.keys(configurationDefaults)).sort((a, b) => a.localeCompare(b))) {
516
539
  const value = configurationDefaults[key];
517
540
  if (OVERRIDE_PROPERTY_REGEX.test(key)) {
518
541
  const languages = overrideIdentifiersFromKey(key);
519
- const languageMarkdown = ( new MarkdownString()).appendMarkdown(`${languages.join(', ')}`);
542
+ const languageMarkdown = ( new MarkdownString()).appendMarkdown(`${languages.join(", ")}`);
520
543
  for (const key of ( Object.keys(value)).sort((a, b) => a.localeCompare(b))) {
521
544
  const row = [];
522
545
  row.push(languageMarkdown);
523
546
  row.push(( new MarkdownString()).appendMarkdown(`\`${key}\``));
524
- row.push(( new MarkdownString()).appendCodeblock('json', JSON.stringify(value[key], null, 2)));
547
+ row.push(( new MarkdownString()).appendCodeblock("json", JSON.stringify(value[key], null, 2)));
525
548
  rows.push(row);
526
549
  }
527
- }
528
- else {
550
+ } else {
529
551
  const row = [];
530
- row.push('');
552
+ row.push("");
531
553
  row.push(( new MarkdownString()).appendMarkdown(`\`${key}\``));
532
- row.push(( new MarkdownString()).appendCodeblock('json', JSON.stringify(value, null, 2)));
554
+ row.push(( new MarkdownString()).appendCodeblock("json", JSON.stringify(value, null, 2)));
533
555
  rows.push(row);
534
556
  }
535
557
  }
@@ -538,15 +560,15 @@ class ConfigurationDefaultsTableRenderer extends Disposable {
538
560
  headers,
539
561
  rows
540
562
  },
541
- dispose: () => { }
563
+ dispose: () => {}
542
564
  };
543
565
  }
544
566
  }
545
567
  ( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
546
- id: 'configurationDefaults',
547
- label: ( localize(2683, "Settings Default Overrides")),
568
+ id: "configurationDefaults",
569
+ label: ( localize(2686, "Settings Default Overrides")),
548
570
  access: {
549
571
  canToggle: false
550
572
  },
551
- renderer: ( new SyncDescriptor(ConfigurationDefaultsTableRenderer)),
573
+ renderer: ( new SyncDescriptor(ConfigurationDefaultsTableRenderer))
552
574
  });