@codingame/monaco-vscode-update-service-override 25.1.1 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-update-service-override",
3
- "version": "25.1.1",
3
+ "version": "26.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - update service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "25.1.1"
18
+ "@codingame/monaco-vscode-api": "26.0.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -7,109 +7,102 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
7
7
 
8
8
  const configurationRegistry = ( Registry.as(Extensions.Configuration));
9
9
  configurationRegistry.registerConfiguration({
10
- id: 'update',
10
+ id: "update",
11
11
  order: 15,
12
- title: ( localize(2443, "Update")),
13
- type: 'object',
12
+ title: ( localize(2446, "Update")),
13
+ type: "object",
14
14
  properties: {
15
- 'update.mode': {
16
- type: 'string',
17
- enum: ['none', 'manual', 'start', 'default'],
18
- default: 'default',
15
+ "update.mode": {
16
+ type: "string",
17
+ enum: ["none", "manual", "start", "default"],
18
+ default: "default",
19
19
  scope: ConfigurationScope.APPLICATION,
20
20
  description: ( localize(
21
- 2444,
21
+ 2447,
22
22
  "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
23
23
  )),
24
- tags: ['usesOnlineServices'],
25
- enumDescriptions: [
26
- ( localize(2445, "Disable updates.")),
27
- ( localize(
28
- 2446,
24
+ tags: ["usesOnlineServices"],
25
+ enumDescriptions: [( localize(2448, "Disable updates.")), ( localize(
26
+ 2449,
29
27
  "Disable automatic background update checks. Updates will be available if you manually check for updates."
30
- )),
31
- ( localize(
32
- 2447,
28
+ )), ( localize(
29
+ 2450,
33
30
  "Check for updates only on startup. Disable automatic background update checks."
34
- )),
35
- ( localize(
36
- 2448,
31
+ )), ( localize(
32
+ 2451,
37
33
  "Enable automatic update checks. Code will check for updates automatically and periodically."
38
- ))
39
- ],
34
+ ))],
40
35
  policy: {
41
- name: 'UpdateMode',
36
+ name: "UpdateMode",
42
37
  category: PolicyCategory.Update,
43
- minimumVersion: '1.67',
38
+ minimumVersion: "1.67",
44
39
  localization: {
45
- description: { key: 'updateMode', value: ( localize(
46
- 2444,
47
- "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
48
- )), },
49
- enumDescriptions: [
50
- {
51
- key: 'none',
52
- value: ( localize(2445, "Disable updates.")),
53
- },
54
- {
55
- key: 'manual',
56
- value: ( localize(
57
- 2446,
58
- "Disable automatic background update checks. Updates will be available if you manually check for updates."
59
- )),
60
- },
61
- {
62
- key: 'start',
63
- value: ( localize(
64
- 2447,
65
- "Check for updates only on startup. Disable automatic background update checks."
66
- )),
67
- },
68
- {
69
- key: 'default',
70
- value: ( localize(
71
- 2448,
72
- "Enable automatic update checks. Code will check for updates automatically and periodically."
73
- )),
74
- }
75
- ]
76
- },
40
+ description: {
41
+ key: "updateMode",
42
+ value: ( localize(
43
+ 2447,
44
+ "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
45
+ ))
46
+ },
47
+ enumDescriptions: [{
48
+ key: "none",
49
+ value: ( localize(2448, "Disable updates."))
50
+ }, {
51
+ key: "manual",
52
+ value: ( localize(
53
+ 2449,
54
+ "Disable automatic background update checks. Updates will be available if you manually check for updates."
55
+ ))
56
+ }, {
57
+ key: "start",
58
+ value: ( localize(
59
+ 2450,
60
+ "Check for updates only on startup. Disable automatic background update checks."
61
+ ))
62
+ }, {
63
+ key: "default",
64
+ value: ( localize(
65
+ 2451,
66
+ "Enable automatic update checks. Code will check for updates automatically and periodically."
67
+ ))
68
+ }]
69
+ }
77
70
  }
78
71
  },
79
- 'update.channel': {
80
- type: 'string',
81
- default: 'default',
72
+ "update.channel": {
73
+ type: "string",
74
+ default: "default",
82
75
  scope: ConfigurationScope.APPLICATION,
83
76
  description: ( localize(
84
- 2444,
77
+ 2447,
85
78
  "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
86
79
  )),
87
80
  deprecationMessage: ( localize(
88
- 2449,
81
+ 2452,
89
82
  "This setting is deprecated, please use '{0}' instead.",
90
- 'update.mode'
83
+ "update.mode"
91
84
  ))
92
85
  },
93
- 'update.enableWindowsBackgroundUpdates': {
94
- type: 'boolean',
86
+ "update.enableWindowsBackgroundUpdates": {
87
+ type: "boolean",
95
88
  default: true,
96
89
  scope: ConfigurationScope.APPLICATION,
97
- title: ( localize(2450, "Enable Background Updates on Windows")),
90
+ title: ( localize(2453, "Enable Background Updates on Windows")),
98
91
  description: ( localize(
99
- 2451,
92
+ 2454,
100
93
  "Enable to download and install new VS Code versions in the background on Windows."
101
94
  )),
102
95
  included: isWindows && !isWeb
103
96
  },
104
- 'update.showReleaseNotes': {
105
- type: 'boolean',
97
+ "update.showReleaseNotes": {
98
+ type: "boolean",
106
99
  default: true,
107
100
  scope: ConfigurationScope.APPLICATION,
108
101
  description: ( localize(
109
- 2452,
102
+ 2455,
110
103
  "Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."
111
104
  )),
112
- tags: ['usesOnlineServices']
105
+ tags: ["usesOnlineServices"]
113
106
  }
114
107
  }
115
108
  });
@@ -12,7 +12,13 @@ import { IPreferencesService } from '@codingame/monaco-vscode-api/vscode/vs/work
12
12
  import { settingKeyToDisplayFormat } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels';
13
13
 
14
14
  let SimpleSettingRenderer = class SimpleSettingRenderer {
15
- constructor(_configurationService, _contextMenuService, _preferencesService, _telemetryService, _clipboardService) {
15
+ constructor(
16
+ _configurationService,
17
+ _contextMenuService,
18
+ _preferencesService,
19
+ _telemetryService,
20
+ _clipboardService
21
+ ) {
16
22
  this._configurationService = _configurationService;
17
23
  this._contextMenuService = _contextMenuService;
18
24
  this._preferencesService = _preferencesService;
@@ -56,7 +62,11 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
56
62
  return undefined;
57
63
  }
58
64
  getHtmlRenderer() {
59
- return ({ raw }) => {
65
+ return (
66
+ {
67
+ raw
68
+ }
69
+ ) => {
60
70
  const replacedAnchor = this.replaceAnchor(raw);
61
71
  if (replacedAnchor) {
62
72
  raw = replacedAnchor;
@@ -65,7 +75,11 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
65
75
  };
66
76
  }
67
77
  getCodeSpanRenderer() {
68
- return ({ text }) => {
78
+ return (
79
+ {
80
+ text
81
+ }
82
+ ) => {
69
83
  const replacedSimple = this.replaceSimple(text);
70
84
  if (replacedSimple) {
71
85
  return replacedSimple;
@@ -74,7 +88,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
74
88
  };
75
89
  }
76
90
  settingToUriString(settingId, value) {
77
- return `${Schemas.codeSetting}://${settingId}${value ? `/${value}` : ''}`;
91
+ return `${Schemas.codeSetting}://${settingId}${value ? `/${value}` : ""}`;
78
92
  }
79
93
  getSetting(settingId) {
80
94
  if (( this._encounteredSettings.has(settingId))) {
@@ -83,7 +97,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
83
97
  return this._preferencesService.getSetting(settingId);
84
98
  }
85
99
  parseValue(settingId, value) {
86
- if (value === 'undefined' || value === '') {
100
+ if (value === "undefined" || value === "") {
87
101
  return undefined;
88
102
  }
89
103
  const setting = this.getSetting(settingId);
@@ -91,13 +105,13 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
91
105
  return value;
92
106
  }
93
107
  switch (setting.type) {
94
- case 'boolean':
95
- return value === 'true';
96
- case 'number':
97
- return parseInt(value, 10);
98
- case 'string':
99
- default:
100
- return value;
108
+ case "boolean":
109
+ return value === "true";
110
+ case "number":
111
+ return parseInt(value, 10);
112
+ case "string":
113
+ default:
114
+ return value;
101
115
  }
102
116
  }
103
117
  render(settingId, newValue) {
@@ -109,12 +123,11 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
109
123
  }
110
124
  viewInSettingsMessage(settingId, alreadyDisplayed) {
111
125
  if (alreadyDisplayed) {
112
- return localize(8602, "View in Settings");
113
- }
114
- else {
126
+ return localize(8909, "View in Settings");
127
+ } else {
115
128
  const displayName = settingKeyToDisplayFormat(settingId);
116
129
  return localize(
117
- 8603,
130
+ 8910,
118
131
  "View \"{0}: {1}\" in Settings",
119
132
  displayName.category,
120
133
  displayName.label
@@ -124,7 +137,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
124
137
  restorePreviousSettingMessage(settingId) {
125
138
  const displayName = settingKeyToDisplayFormat(settingId);
126
139
  return localize(
127
- 8604,
140
+ 8911,
128
141
  "Restore value of \"{0}: {1}\"",
129
142
  displayName.category,
130
143
  displayName.label
@@ -139,15 +152,14 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
139
152
  if (this.isAlreadySet(setting, booleanValue)) {
140
153
  if (booleanValue) {
141
154
  return localize(
142
- 8605,
155
+ 8912,
143
156
  "\"{0}: {1}\" is already enabled",
144
157
  displayName.category,
145
158
  displayName.label
146
159
  );
147
- }
148
- else {
160
+ } else {
149
161
  return localize(
150
- 8606,
162
+ 8913,
151
163
  "\"{0}: {1}\" is already disabled",
152
164
  displayName.category,
153
165
  displayName.label
@@ -155,17 +167,16 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
155
167
  }
156
168
  }
157
169
  if (booleanValue) {
158
- return localize(8607, "Enable \"{0}: {1}\"", displayName.category, displayName.label);
159
- }
160
- else {
161
- return localize(8608, "Disable \"{0}: {1}\"", displayName.category, displayName.label);
170
+ return localize(8914, "Enable \"{0}: {1}\"", displayName.category, displayName.label);
171
+ } else {
172
+ return localize(8915, "Disable \"{0}: {1}\"", displayName.category, displayName.label);
162
173
  }
163
174
  }
164
175
  stringSettingMessage(setting, stringValue) {
165
176
  const displayName = settingKeyToDisplayFormat(setting.key);
166
177
  if (this.isAlreadySet(setting, stringValue)) {
167
178
  return localize(
168
- 8609,
179
+ 8916,
169
180
  "\"{0}: {1}\" is already set to \"{2}\"",
170
181
  displayName.category,
171
182
  displayName.label,
@@ -173,7 +184,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
173
184
  );
174
185
  }
175
186
  return localize(
176
- 8610,
187
+ 8917,
177
188
  "Set \"{0}: {1}\" to \"{2}\"",
178
189
  displayName.category,
179
190
  displayName.label,
@@ -184,7 +195,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
184
195
  const displayName = settingKeyToDisplayFormat(setting.key);
185
196
  if (this.isAlreadySet(setting, numberValue)) {
186
197
  return localize(
187
- 8611,
198
+ 8918,
188
199
  "\"{0}: {1}\" is already set to {2}",
189
200
  displayName.category,
190
201
  displayName.label,
@@ -192,7 +203,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
192
203
  );
193
204
  }
194
205
  return localize(
195
- 8612,
206
+ 8919,
196
207
  "Set \"{0}: {1}\" to {2}",
197
208
  displayName.category,
198
209
  displayName.label,
@@ -201,20 +212,18 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
201
212
  }
202
213
  renderSetting(setting, newValue) {
203
214
  const href = this.settingToUriString(setting.key, newValue);
204
- const title = ( localize(8613, "View or change setting"));
215
+ const title = ( localize(8920, "View or change setting"));
205
216
  return `<code tabindex="0"><a href="${href}" class="codesetting" title="${title}" aria-role="button"><svg width="14" height="14" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M9.1 4.4L8.6 2H7.4l-.5 2.4-.7.3-2-1.3-.9.8 1.3 2-.2.7-2.4.5v1.2l2.4.5.3.8-1.3 2 .8.8 2-1.3.8.3.4 2.3h1.2l.5-2.4.8-.3 2 1.3.8-.8-1.3-2 .3-.8 2.3-.4V7.4l-2.4-.5-.3-.8 1.3-2-.8-.8-2 1.3-.7-.2zM9.4 1l.5 2.4L12 2.1l2 2-1.4 2.1 2.4.4v2.8l-2.4.5L14 12l-2 2-2.1-1.4-.5 2.4H6.6l-.5-2.4L4 13.9l-2-2 1.4-2.1L1 9.4V6.6l2.4-.5L2.1 4l2-2 2.1 1.4.4-2.4h2.8zm.6 7c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zM8 9c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z"/></svg>
206
- <span class="separator"></span>
207
- <span class="setting-name">${setting.key}</span>
208
- </a></code>`;
217
+ <span class="separator"></span>
218
+ <span class="setting-name">${setting.key}</span>
219
+ </a></code>`;
209
220
  }
210
221
  getSettingMessage(setting, newValue) {
211
- if (setting.type === 'boolean') {
222
+ if (setting.type === "boolean") {
212
223
  return this.booleanSettingMessage(setting, newValue);
213
- }
214
- else if (setting.type === 'string') {
224
+ } else if (setting.type === "string") {
215
225
  return this.stringSettingMessage(setting, newValue);
216
- }
217
- else if (setting.type === 'number') {
226
+ } else if (setting.type === "number") {
218
227
  return this.numberSettingMessage(setting, newValue);
219
228
  }
220
229
  return undefined;
@@ -240,7 +249,7 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
240
249
  const restoreMessage = this.restorePreviousSettingMessage(settingId);
241
250
  actions.push({
242
251
  class: undefined,
243
- id: 'restoreSetting',
252
+ id: "restoreSetting",
244
253
  enabled: true,
245
254
  tooltip: restoreMessage,
246
255
  label: restoreMessage,
@@ -248,14 +257,13 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
248
257
  return this.restoreSetting(settingId);
249
258
  }
250
259
  });
251
- }
252
- else if (newSettingValue !== undefined) {
260
+ } else if (newSettingValue !== undefined) {
253
261
  const setting = this.getSetting(settingId);
254
262
  const trySettingMessage = setting ? this.getSettingMessage(setting, newSettingValue) : undefined;
255
263
  if (setting && trySettingMessage) {
256
264
  actions.push({
257
265
  class: undefined,
258
- id: 'trySetting',
266
+ id: "trySetting",
259
267
  enabled: !this.isAlreadySet(setting, newSettingValue),
260
268
  tooltip: trySettingMessage,
261
269
  label: trySettingMessage,
@@ -269,19 +277,21 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
269
277
  actions.push({
270
278
  class: undefined,
271
279
  enabled: true,
272
- id: 'viewInSettings',
280
+ id: "viewInSettings",
273
281
  tooltip: viewInSettingsMessage,
274
282
  label: viewInSettingsMessage,
275
283
  run: () => {
276
- return this._preferencesService.openApplicationSettings({ query: `@id:${settingId}` });
284
+ return this._preferencesService.openApplicationSettings({
285
+ query: `@id:${settingId}`
286
+ });
277
287
  }
278
288
  });
279
289
  actions.push({
280
290
  class: undefined,
281
291
  enabled: true,
282
- id: 'copySettingId',
283
- tooltip: ( localize(8614, "Copy Setting ID")),
284
- label: ( localize(8614, "Copy Setting ID")),
292
+ id: "copySettingId",
293
+ tooltip: ( localize(8921, "Copy Setting ID")),
294
+ label: ( localize(8921, "Copy Setting ID")),
285
295
  run: () => {
286
296
  this._clipboardService.writeText(settingId);
287
297
  }
@@ -294,28 +304,27 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
294
304
  return;
295
305
  }
296
306
  this._contextMenuService.showContextMenu({
297
- getAnchor: () => ({ x, y }),
307
+ getAnchor: () => ({
308
+ x,
309
+ y
310
+ }),
298
311
  getActions: () => actions,
299
- getActionViewItem: (action) => {
300
- return ( new ActionViewItem(action, action, { label: true }));
301
- },
312
+ getActionViewItem: action => {
313
+ return ( new ActionViewItem(action, action, {
314
+ label: true
315
+ }));
316
+ }
302
317
  });
303
318
  }
304
319
  async updateSetting(uri, x, y) {
305
320
  if (uri.scheme === Schemas.codeSetting) {
306
- this._telemetryService.publicLog2('releaseNotesSettingAction', {
321
+ this._telemetryService.publicLog2("releaseNotesSettingAction", {
307
322
  settingId: uri.authority
308
323
  });
309
324
  return this.showContextMenu(uri, x, y);
310
325
  }
311
326
  }
312
327
  };
313
- SimpleSettingRenderer = ( __decorate([
314
- ( __param(0, IConfigurationService)),
315
- ( __param(1, IContextMenuService)),
316
- ( __param(2, IPreferencesService)),
317
- ( __param(3, ITelemetryService)),
318
- ( __param(4, IClipboardService))
319
- ], SimpleSettingRenderer));
328
+ SimpleSettingRenderer = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IContextMenuService)), ( __param(2, IPreferencesService)), ( __param(3, ITelemetryService)), ( __param(4, IClipboardService))], SimpleSettingRenderer));
320
329
 
321
330
  export { SimpleSettingRenderer };