@codingame/monaco-vscode-update-service-override 34.1.1 → 35.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.
@@ -63,7 +63,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
63
63
  this.messageNode = append(this.domNode, $(".state-message"));
64
64
  this.buttonBar = append(this.domNode, $(".button-bar"));
65
65
  this.releaseNotesButton = append(this.buttonBar, $("button.release-notes-button"));
66
- this.releaseNotesButton.textContent = ( localize(15684, "Release Notes"));
66
+ this.releaseNotesButton.textContent = ( localize(16347, "Release Notes"));
67
67
  this._register(addDisposableListener(this.releaseNotesButton, "click", () => {
68
68
  if (this.releaseNotesVersion) {
69
69
  this.runCommandAndClose(ShowCurrentReleaseNotesActionId, this.releaseNotesVersion);
@@ -82,7 +82,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
82
82
  const productVersion = this.productService.version;
83
83
  if (productVersion) {
84
84
  const currentCommitId = this.productService.commit?.substring(0, 7);
85
- this.currentVersionNode.textContent = currentCommitId ? ( localize(15685, "Current Version: {0} ({1})", productVersion, currentCommitId)) : ( localize(15686, "Current Version: {0}", productVersion));
85
+ this.currentVersionNode.textContent = currentCommitId ? ( localize(16348, "Current Version: {0} ({1})", productVersion, currentCommitId)) : ( localize(16349, "Current Version: {0}", productVersion));
86
86
  this.currentVersionCopyValue.value = currentCommitId ? `${productVersion} (${this.productService.commit})` : productVersion;
87
87
  this.currentVersionNode.parentElement.style.display = "";
88
88
  } else {
@@ -132,52 +132,55 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
132
132
  case StateType.Overwriting:
133
133
  this.renderOverwriting(state);
134
134
  break;
135
+ case StateType.Cancelling:
136
+ this.renderCancelling();
137
+ break;
135
138
  case StateType.Restarting:
136
139
  this.renderRestarting(state);
137
140
  break;
138
141
  }
139
142
  }
140
143
  renderUninitialized() {
141
- this.renderTitleAndInfo(( localize(15687, "Initializing")));
142
- this.renderMessage(( localize(15688, "Initializing update service...")));
144
+ this.renderTitleAndInfo(( localize(16350, "Initializing")));
145
+ this.renderMessage(( localize(16351, "Initializing update service...")));
143
146
  }
144
147
  renderDisabled(
145
148
  {
146
149
  reason
147
150
  }
148
151
  ) {
149
- this.renderTitleAndInfo(( localize(15689, "Updates Disabled")));
152
+ this.renderTitleAndInfo(( localize(16352, "Updates Disabled")));
150
153
  switch (reason) {
151
154
  case DisablementReason.NotBuilt:
152
- this.renderMessage(( localize(15690, "Updates are not available for this build.")), Codicon.info);
155
+ this.renderMessage(( localize(16353, "Updates are not available for this build.")), Codicon.info);
153
156
  break;
154
157
  case DisablementReason.DisabledByEnvironment:
155
- this.renderMessage(( localize(15691, "Updates are disabled by the --disable-updates command line flag.")), Codicon.warning);
158
+ this.renderMessage(( localize(16354, "Updates are disabled by the --disable-updates command line flag.")), Codicon.warning);
156
159
  break;
157
160
  case DisablementReason.ManuallyDisabled:
158
161
  this.renderMessage(( localize(
159
- 15692,
162
+ 16355,
160
163
  "Updates are manually disabled. Change the \"update.mode\" setting to enable."
161
164
  )), Codicon.warning);
162
165
  break;
163
166
  case DisablementReason.Policy:
164
- this.renderMessage(( localize(15693, "Updates are disabled by organization policy.")), Codicon.info);
167
+ this.renderMessage(( localize(16356, "Updates are disabled by organization policy.")), Codicon.info);
165
168
  break;
166
169
  case DisablementReason.MissingConfiguration:
167
- this.renderMessage(( localize(15694, "Updates are disabled because no update URL is configured.")), Codicon.info);
170
+ this.renderMessage(( localize(16357, "Updates are disabled because no update URL is configured.")), Codicon.info);
168
171
  break;
169
172
  case DisablementReason.InvalidConfiguration:
170
- this.renderMessage(( localize(15695, "Updates are disabled because the update URL is invalid.")), Codicon.error);
173
+ this.renderMessage(( localize(16358, "Updates are disabled because the update URL is invalid.")), Codicon.error);
171
174
  break;
172
175
  case DisablementReason.RunningAsAdmin:
173
176
  this.renderMessage(( localize(
174
- 15696,
177
+ 16359,
175
178
  "Updates are not available when running a user install of {0} as administrator.",
176
179
  this.productService.nameShort
177
180
  )), Codicon.warning);
178
181
  break;
179
182
  default:
180
- this.renderMessage(( localize(15697, "Updates are disabled.")), Codicon.warning);
183
+ this.renderMessage(( localize(16360, "Updates are disabled.")), Codicon.warning);
181
184
  break;
182
185
  }
183
186
  }
@@ -188,55 +191,55 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
188
191
  }
189
192
  ) {
190
193
  if (error) {
191
- this.renderTitleAndInfo(( localize(15698, "Update Error")));
194
+ this.renderTitleAndInfo(( localize(16361, "Update Error")));
192
195
  this.renderMessage(error, Codicon.error);
193
196
  return;
194
197
  }
195
198
  if (notAvailable) {
196
- this.renderTitleAndInfo(( localize(15699, "No Update Available")));
197
- this.renderMessage(( localize(15700, "There are no updates currently available.")), Codicon.info);
199
+ this.renderTitleAndInfo(( localize(16362, "No Update Available")));
200
+ this.renderMessage(( localize(16363, "There are no updates currently available.")), Codicon.info);
198
201
  return;
199
202
  }
200
- this.renderTitleAndInfo(( localize(15701, "Up to Date")));
203
+ this.renderTitleAndInfo(( localize(16364, "Up to Date")));
201
204
  switch (this.configurationService.getValue("update.mode")) {
202
205
  case "none":
203
- this.renderMessage(( localize(15702, "Automatic updates are disabled.")), Codicon.warning);
206
+ this.renderMessage(( localize(16365, "Automatic updates are disabled.")), Codicon.warning);
204
207
  break;
205
208
  case "manual":
206
209
  this.renderMessage(( localize(
207
- 15703,
210
+ 16366,
208
211
  "Automatic updates will be checked but not installed automatically."
209
212
  )));
210
213
  break;
211
214
  case "start":
212
- this.renderMessage(( localize(15704, "Updates will be applied on restart.")));
215
+ this.renderMessage(( localize(16367, "Updates will be applied on restart.")));
213
216
  break;
214
217
  case "default":
215
218
  if (this.meteredConnectionService.isConnectionMetered) {
216
219
  this.renderMessage(( localize(
217
- 15705,
220
+ 16368,
218
221
  "Automatic updates are paused because the network connection is metered."
219
222
  )), Codicon.radioTower);
220
223
  } else {
221
- this.renderMessage(( localize(15706, "Automatic updates are enabled. Happy Coding!")), Codicon.smiley);
224
+ this.renderMessage(( localize(16369, "Automatic updates are enabled. Happy Coding!")), Codicon.smiley);
222
225
  }
223
226
  break;
224
227
  }
225
228
  }
226
229
  renderCheckingForUpdates() {
227
- this.renderTitleAndInfo(( localize(15707, "Checking for Updates")));
228
- this.renderMessage(( localize(15708, "Checking for updates, please wait...")));
230
+ this.renderTitleAndInfo(( localize(16370, "Checking for Updates")));
231
+ this.renderMessage(( localize(16371, "Checking for updates, please wait...")));
229
232
  }
230
233
  renderAvailableForDownload(
231
234
  {
232
235
  update
233
236
  }
234
237
  ) {
235
- this.renderTitleAndInfo(( localize(15709, "Update Available")), update);
236
- this.renderActionButton(( localize(15710, "Download")), "update.downloadNow");
238
+ this.renderTitleAndInfo(( localize(16372, "Update Available")), update);
239
+ this.renderActionButton(( localize(16373, "Download")), "update.downloadNow");
237
240
  }
238
241
  renderDownloading(state) {
239
- this.renderTitleAndInfo(( localize(15711, "Downloading Update")), state.update);
242
+ this.renderTitleAndInfo(( localize(16374, "Downloading Update")), state.update);
240
243
  const {
241
244
  downloadedBytes,
242
245
  totalBytes
@@ -249,15 +252,15 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
249
252
  this.progressContainer.style.display = "";
250
253
  const speed = computeDownloadSpeed(state);
251
254
  if (speed !== undefined && speed > 0) {
252
- this.speedInfoNode.textContent = ( localize(15712, "{0}/s", formatBytes(speed)));
255
+ this.speedInfoNode.textContent = ( localize(16375, "{0}/s", formatBytes(speed)));
253
256
  }
254
257
  const timeRemaining = computeDownloadTimeRemaining(state);
255
258
  if (timeRemaining !== undefined && timeRemaining > 0) {
256
- this.timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(15713, "remaining"))}`;
259
+ this.timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(16376, "remaining"))}`;
257
260
  }
258
261
  this.downloadStatsContainer.style.display = "";
259
262
  } else {
260
- this.renderMessage(( localize(15714, "Downloading update, please wait...")));
263
+ this.renderMessage(( localize(16377, "Downloading update, please wait...")));
261
264
  }
262
265
  }
263
266
  renderDownloaded(
@@ -265,8 +268,8 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
265
268
  update
266
269
  }
267
270
  ) {
268
- this.renderTitleAndInfo(( localize(15715, "Update is Ready to Install")), update);
269
- this.renderActionButton(( localize(15716, "Install")), "update.install");
271
+ this.renderTitleAndInfo(( localize(16378, "Update is Ready to Install")), update);
272
+ this.renderActionButton(( localize(16379, "Install")), "update.install");
270
273
  }
271
274
  renderUpdating(
272
275
  {
@@ -275,7 +278,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
275
278
  maxProgress
276
279
  }
277
280
  ) {
278
- this.renderTitleAndInfo(( localize(15717, "Installing Update")), update);
281
+ this.renderTitleAndInfo(( localize(16380, "Installing Update")), update);
279
282
  const percentage = computeProgressPercent(currentProgress, maxProgress);
280
283
  if (percentage !== undefined) {
281
284
  this.progressFill.style.width = `${percentage}%`;
@@ -283,7 +286,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
283
286
  this.progressSizeNode.textContent = "";
284
287
  this.progressContainer.style.display = "";
285
288
  } else {
286
- this.renderMessage(( localize(15718, "Installing update, please wait...")));
289
+ this.renderMessage(( localize(16381, "Installing update, please wait...")));
287
290
  }
288
291
  }
289
292
  renderReady(
@@ -292,10 +295,10 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
292
295
  }
293
296
  ) {
294
297
  if (this.configurationService.getValue("update.mode") === "manual") {
295
- this.renderTitleAndInfo(( localize(15719, "Update Installed")), update);
296
- this.renderActionButton(( localize(15720, "Restart")), "update.restart");
298
+ this.renderTitleAndInfo(( localize(16382, "Update Installed")), update);
299
+ this.renderActionButton(( localize(16383, "Restart")), "update.restart");
297
300
  } else {
298
- this.renderTitleAndInfo(( localize(15721, "Restart to Update")), update);
301
+ this.renderTitleAndInfo(( localize(16384, "Restart to Update")), update);
299
302
  }
300
303
  }
301
304
  renderOverwriting(
@@ -303,23 +306,27 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
303
306
  update
304
307
  }
305
308
  ) {
306
- this.renderTitleAndInfo(( localize(15722, "Downloading Newer Update")), update);
307
- this.renderMessage(( localize(15723, "A newer update was released. Downloading, please wait...")));
309
+ this.renderTitleAndInfo(( localize(16385, "Downloading Newer Update")), update);
310
+ this.renderMessage(( localize(16386, "A newer update was released. Downloading, please wait...")));
308
311
  }
309
312
  renderRestarting(
310
313
  {
311
314
  update
312
315
  }
313
316
  ) {
314
- this.renderTitleAndInfo(( localize(15724, "Restarting {0}", this.productService.nameShort)), update);
315
- this.renderMessage(( localize(15725, "Restarting to update, please wait...")));
317
+ this.renderTitleAndInfo(( localize(16387, "Restarting {0}", this.productService.nameShort)), update);
318
+ this.renderMessage(( localize(16388, "Restarting to update, please wait...")));
319
+ }
320
+ renderCancelling() {
321
+ this.renderTitleAndInfo(( localize(16389, "Cancelling Update")));
322
+ this.renderMessage(( localize(16390, "Cancelling update, please wait...")));
316
323
  }
317
324
  renderTitleAndInfo(title, update) {
318
325
  this.titleNode.textContent = title;
319
326
  const version = update?.productVersion;
320
327
  if (version) {
321
328
  const updateCommitId = update.version?.substring(0, 7);
322
- this.latestVersionNode.textContent = updateCommitId ? ( localize(15726, "Latest Version: {0} ({1})", version, updateCommitId)) : ( localize(15727, "Latest Version: {0}", version));
329
+ this.latestVersionNode.textContent = updateCommitId ? ( localize(16391, "Latest Version: {0} ({1})", version, updateCommitId)) : ( localize(16392, "Latest Version: {0}", version));
323
330
  this.latestVersionCopyValue.value = updateCommitId ? `${version} (${update.version})` : version;
324
331
  this.latestVersionNode.parentElement.style.display = "";
325
332
  } else {
@@ -327,7 +334,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
327
334
  }
328
335
  const releaseDate = update?.timestamp ?? tryParseDate(this.productService.date);
329
336
  if (typeof releaseDate === "number" && releaseDate > 0) {
330
- this.releaseDateNode.textContent = ( localize(15728, "Released {0}", formatDate(releaseDate)));
337
+ this.releaseDateNode.textContent = ( localize(16393, "Released {0}", formatDate(releaseDate)));
331
338
  this.releaseDateNode.style.display = "";
332
339
  } else {
333
340
  this.releaseDateNode.style.display = "none";
@@ -360,7 +367,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
360
367
  const copyButton = append(row, $("a.copy-version-button"));
361
368
  copyButton.setAttribute("role", "button");
362
369
  copyButton.setAttribute("tabindex", "0");
363
- const title = ( localize(15729, "Copy"));
370
+ const title = ( localize(16394, "Copy"));
364
371
  copyButton.title = title;
365
372
  copyButton.setAttribute("aria-label", title);
366
373
  const copyIcon = append(copyButton, $(".copy-icon"));
@@ -54,31 +54,31 @@ function formatTimeRemaining(seconds) {
54
54
  if (hours >= 1) {
55
55
  const formattedHours = formatDecimal(hours);
56
56
  if (formattedHours === "1") {
57
- return localize(15730, "{0} hour", formattedHours);
57
+ return localize(16395, "{0} hour", formattedHours);
58
58
  } else {
59
- return localize(15731, "{0} hours", formattedHours);
59
+ return localize(16396, "{0} hours", formattedHours);
60
60
  }
61
61
  }
62
62
  const minutes = Math.floor(seconds / 60);
63
63
  if (minutes >= 1) {
64
- return localize(15732, "{0} min", minutes);
64
+ return localize(16397, "{0} min", minutes);
65
65
  }
66
- return localize(15733, "{0}s", seconds);
66
+ return localize(16398, "{0}s", seconds);
67
67
  }
68
68
  function formatBytes(bytes) {
69
69
  if (bytes < 1024) {
70
- return localize(15734, "{0} B", bytes);
70
+ return localize(16399, "{0} B", bytes);
71
71
  }
72
72
  const kb = bytes / 1024;
73
73
  if (kb < 1024) {
74
- return localize(15735, "{0} KB", formatDecimal(kb));
74
+ return localize(16400, "{0} KB", formatDecimal(kb));
75
75
  }
76
76
  const mb = kb / 1024;
77
77
  if (mb < 1024) {
78
- return localize(15736, "{0} MB", formatDecimal(mb));
78
+ return localize(16401, "{0} MB", formatDecimal(mb));
79
79
  }
80
80
  const gb = mb / 1024;
81
- return localize(15737, "{0} GB", formatDecimal(gb));
81
+ return localize(16402, "{0} GB", formatDecimal(gb));
82
82
  }
83
83
  function tryParseDate(date) {
84
84
  if (date === undefined) {