@codingame/monaco-vscode-update-service-override 7.1.0 → 7.1.1
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 +2 -2
- package/vscode/src/vs/platform/update/common/update.config.contribution.js +20 -29
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.js +23 -54
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.js +5 -6
- package/vscode/src/vs/workbench/contrib/update/browser/update.contribution.js +17 -22
- package/vscode/src/vs/workbench/contrib/update/browser/update.js +51 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-update-service-override",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@7.1.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { isWindows, isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
4
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
|
|
6
|
-
const _moduleId = "vs/platform/update/common/update.config.contribution";
|
|
7
6
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
8
7
|
configurationRegistry.registerConfiguration({
|
|
9
8
|
id: 'update',
|
|
10
9
|
order: 15,
|
|
11
|
-
title: (
|
|
10
|
+
title: ( localize(6669, "Update")),
|
|
12
11
|
type: 'object',
|
|
13
12
|
properties: {
|
|
14
13
|
'update.mode': {
|
|
@@ -16,27 +15,23 @@ configurationRegistry.registerConfiguration({
|
|
|
16
15
|
enum: ['none', 'manual', 'start', 'default'],
|
|
17
16
|
default: 'default',
|
|
18
17
|
scope: ConfigurationScope.APPLICATION,
|
|
19
|
-
description: (
|
|
20
|
-
|
|
21
|
-
1,
|
|
18
|
+
description: ( localize(
|
|
19
|
+
6670,
|
|
22
20
|
"Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
|
|
23
21
|
)),
|
|
24
22
|
tags: ['usesOnlineServices'],
|
|
25
23
|
enumDescriptions: [
|
|
26
|
-
(
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
3,
|
|
24
|
+
( localize(6671, "Disable updates.")),
|
|
25
|
+
( localize(
|
|
26
|
+
6672,
|
|
30
27
|
"Disable automatic background update checks. Updates will be available if you manually check for updates."
|
|
31
28
|
)),
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
4,
|
|
29
|
+
( localize(
|
|
30
|
+
6673,
|
|
35
31
|
"Check for updates only on startup. Disable automatic background update checks."
|
|
36
32
|
)),
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
5,
|
|
33
|
+
( localize(
|
|
34
|
+
6674,
|
|
40
35
|
"Enable automatic update checks. Code will check for updates automatically and periodically."
|
|
41
36
|
))
|
|
42
37
|
],
|
|
@@ -49,14 +44,12 @@ configurationRegistry.registerConfiguration({
|
|
|
49
44
|
type: 'string',
|
|
50
45
|
default: 'default',
|
|
51
46
|
scope: ConfigurationScope.APPLICATION,
|
|
52
|
-
description: (
|
|
53
|
-
|
|
54
|
-
1,
|
|
47
|
+
description: ( localize(
|
|
48
|
+
6674,
|
|
55
49
|
"Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
|
|
56
50
|
)),
|
|
57
|
-
deprecationMessage: (
|
|
58
|
-
|
|
59
|
-
6,
|
|
51
|
+
deprecationMessage: ( localize(
|
|
52
|
+
6675,
|
|
60
53
|
"This setting is deprecated, please use '{0}' instead.",
|
|
61
54
|
'update.mode'
|
|
62
55
|
))
|
|
@@ -65,10 +58,9 @@ configurationRegistry.registerConfiguration({
|
|
|
65
58
|
type: 'boolean',
|
|
66
59
|
default: true,
|
|
67
60
|
scope: ConfigurationScope.APPLICATION,
|
|
68
|
-
title: (
|
|
69
|
-
description: (
|
|
70
|
-
|
|
71
|
-
8,
|
|
61
|
+
title: ( localize(6676, "Enable Background Updates on Windows")),
|
|
62
|
+
description: ( localize(
|
|
63
|
+
6677,
|
|
72
64
|
"Enable to download and install new VS Code versions in the background on Windows."
|
|
73
65
|
)),
|
|
74
66
|
included: isWindows && !isWeb
|
|
@@ -77,9 +69,8 @@ configurationRegistry.registerConfiguration({
|
|
|
77
69
|
type: 'boolean',
|
|
78
70
|
default: true,
|
|
79
71
|
scope: ConfigurationScope.APPLICATION,
|
|
80
|
-
description: (
|
|
81
|
-
|
|
82
|
-
9,
|
|
72
|
+
description: ( localize(
|
|
73
|
+
6678,
|
|
83
74
|
"Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."
|
|
84
75
|
)),
|
|
85
76
|
tags: ['usesOnlineServices']
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
4
4
|
import { settingKeyToDisplayFormat } from 'vscode/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels';
|
|
5
|
-
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
6
5
|
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
7
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
-
import { DefaultSettings } from 'vscode/vscode/vs/workbench/services/preferences/common/preferencesModels';
|
|
9
7
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
10
8
|
import { ActionViewItem } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
11
9
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
12
10
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
11
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
13
12
|
|
|
14
|
-
const _moduleId = "vs/workbench/contrib/markdown/browser/markdownSettingRenderer";
|
|
15
|
-
const codeSettingRegex = /^<code (codesetting)="([^\s"\:]+)(?::([^"]+))?">/;
|
|
16
13
|
let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
17
14
|
constructor(_configurationService, _contextMenuService, _preferencesService, _telemetryService, _clipboardService) {
|
|
18
15
|
this._configurationService = _configurationService;
|
|
@@ -23,8 +20,9 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
23
20
|
this._updatedSettings = ( (new Map()));
|
|
24
21
|
this._encounteredSettings = ( (new Map()));
|
|
25
22
|
this._featuredSettings = ( (new Map()));
|
|
26
|
-
this.
|
|
27
|
-
|
|
23
|
+
this.codeSettingRegex = ( (new RegExp(
|
|
24
|
+
`^<a (href)=".*code.*://settings/([^\\s"]+)"(?:\\s*codesetting="([^"]+)")?>`
|
|
25
|
+
)));
|
|
28
26
|
}
|
|
29
27
|
get featuredSettingStates() {
|
|
30
28
|
const result = ( (new Map()));
|
|
@@ -35,12 +33,12 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
35
33
|
}
|
|
36
34
|
getHtmlRenderer() {
|
|
37
35
|
return (html) => {
|
|
38
|
-
const match = codeSettingRegex.exec(html);
|
|
36
|
+
const match = this.codeSettingRegex.exec(html);
|
|
39
37
|
if (match && match.length === 4) {
|
|
40
38
|
const settingId = match[2];
|
|
41
39
|
const rendered = this.render(settingId, match[3]);
|
|
42
40
|
if (rendered) {
|
|
43
|
-
html = html.replace(codeSettingRegex, rendered);
|
|
41
|
+
html = html.replace(this.codeSettingRegex, rendered);
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
return html;
|
|
@@ -50,23 +48,10 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
50
48
|
return `${Schemas.codeSetting}://${settingId}${value ? `/${value}` : ''}`;
|
|
51
49
|
}
|
|
52
50
|
getSetting(settingId) {
|
|
53
|
-
if (!this.settingsGroups) {
|
|
54
|
-
this.settingsGroups = this._defaultSettings.getSettingsGroups();
|
|
55
|
-
}
|
|
56
51
|
if (( (this._encounteredSettings.has(settingId)))) {
|
|
57
52
|
return this._encounteredSettings.get(settingId);
|
|
58
53
|
}
|
|
59
|
-
|
|
60
|
-
for (const section of group.sections) {
|
|
61
|
-
for (const setting of section.settings) {
|
|
62
|
-
if (setting.key === settingId) {
|
|
63
|
-
this._encounteredSettings.set(settingId, setting);
|
|
64
|
-
return setting;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return undefined;
|
|
54
|
+
return this._preferencesService.getSetting(settingId);
|
|
70
55
|
}
|
|
71
56
|
parseValue(settingId, value) {
|
|
72
57
|
if (value === 'undefined' || value === '') {
|
|
@@ -95,13 +80,12 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
95
80
|
}
|
|
96
81
|
viewInSettingsMessage(settingId, alreadyDisplayed) {
|
|
97
82
|
if (alreadyDisplayed) {
|
|
98
|
-
return (
|
|
83
|
+
return ( localize(11366, "View in Settings"));
|
|
99
84
|
}
|
|
100
85
|
else {
|
|
101
86
|
const displayName = settingKeyToDisplayFormat(settingId);
|
|
102
|
-
return (
|
|
103
|
-
|
|
104
|
-
1,
|
|
87
|
+
return ( localize(
|
|
88
|
+
11367,
|
|
105
89
|
"View \"{0}: {1}\" in Settings",
|
|
106
90
|
displayName.category,
|
|
107
91
|
displayName.label
|
|
@@ -110,9 +94,8 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
110
94
|
}
|
|
111
95
|
restorePreviousSettingMessage(settingId) {
|
|
112
96
|
const displayName = settingKeyToDisplayFormat(settingId);
|
|
113
|
-
return (
|
|
114
|
-
|
|
115
|
-
2,
|
|
97
|
+
return ( localize(
|
|
98
|
+
11368,
|
|
116
99
|
"Restore value of \"{0}: {1}\"",
|
|
117
100
|
displayName.category,
|
|
118
101
|
displayName.label
|
|
@@ -125,22 +108,10 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
125
108
|
}
|
|
126
109
|
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
127
110
|
if (booleanValue) {
|
|
128
|
-
return (
|
|
129
|
-
_moduleId,
|
|
130
|
-
3,
|
|
131
|
-
"Enable \"{0}: {1}\"",
|
|
132
|
-
displayName.category,
|
|
133
|
-
displayName.label
|
|
134
|
-
));
|
|
111
|
+
return ( localize(11369, "Enable \"{0}: {1}\"", displayName.category, displayName.label));
|
|
135
112
|
}
|
|
136
113
|
else {
|
|
137
|
-
return (
|
|
138
|
-
_moduleId,
|
|
139
|
-
4,
|
|
140
|
-
"Disable \"{0}: {1}\"",
|
|
141
|
-
displayName.category,
|
|
142
|
-
displayName.label
|
|
143
|
-
));
|
|
114
|
+
return ( localize(11370, "Disable \"{0}: {1}\"", displayName.category, displayName.label));
|
|
144
115
|
}
|
|
145
116
|
}
|
|
146
117
|
stringSettingMessage(setting, stringValue) {
|
|
@@ -149,9 +120,8 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
149
120
|
return undefined;
|
|
150
121
|
}
|
|
151
122
|
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
152
|
-
return (
|
|
153
|
-
|
|
154
|
-
5,
|
|
123
|
+
return ( localize(
|
|
124
|
+
11371,
|
|
155
125
|
"Set \"{0}: {1}\" to \"{2}\"",
|
|
156
126
|
displayName.category,
|
|
157
127
|
displayName.label,
|
|
@@ -164,9 +134,8 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
164
134
|
return undefined;
|
|
165
135
|
}
|
|
166
136
|
const displayName = settingKeyToDisplayFormat(setting.key);
|
|
167
|
-
return (
|
|
168
|
-
|
|
169
|
-
6,
|
|
137
|
+
return ( localize(
|
|
138
|
+
11372,
|
|
170
139
|
"Set \"{0}: {1}\" to {2}",
|
|
171
140
|
displayName.category,
|
|
172
141
|
displayName.label,
|
|
@@ -175,11 +144,11 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
175
144
|
}
|
|
176
145
|
renderSetting(setting, newValue) {
|
|
177
146
|
const href = this.settingToUriString(setting.key, newValue);
|
|
178
|
-
const title = (
|
|
147
|
+
const title = ( localize(11373, "View or change setting"));
|
|
179
148
|
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>
|
|
180
149
|
<span class="separator"></span>
|
|
181
150
|
<span class="setting-name">${setting.key}</span>
|
|
182
|
-
</a></code
|
|
151
|
+
</a></code>`;
|
|
183
152
|
}
|
|
184
153
|
getSettingMessage(setting, newValue) {
|
|
185
154
|
if (setting.type === 'boolean') {
|
|
@@ -254,8 +223,8 @@ let SimpleSettingRenderer = class SimpleSettingRenderer {
|
|
|
254
223
|
class: undefined,
|
|
255
224
|
enabled: true,
|
|
256
225
|
id: 'copySettingId',
|
|
257
|
-
tooltip: (
|
|
258
|
-
label: (
|
|
226
|
+
tooltip: ( localize(11374, "Copy Setting ID")),
|
|
227
|
+
label: ( localize(11374, "Copy Setting ID")),
|
|
259
228
|
run: () => {
|
|
260
229
|
this._clipboardService.writeText(settingId);
|
|
261
230
|
}
|
|
@@ -10,7 +10,7 @@ import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
|
10
10
|
import { TokenizationRegistry } from 'vscode/vscode/vs/editor/common/languages';
|
|
11
11
|
import { generateTokensCSSForColorMap } from 'vscode/vscode/vs/editor/common/languages/supports/tokenization';
|
|
12
12
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
13
|
-
import {
|
|
13
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
14
14
|
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
|
|
15
15
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
16
16
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -33,7 +33,6 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
33
33
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
34
34
|
import marked_1 from 'vscode/external/vscode-marked/lib/marked.esm.js';
|
|
35
35
|
|
|
36
|
-
const _moduleId = "vs/workbench/contrib/update/browser/releaseNotesEditor";
|
|
37
36
|
let ReleaseNotesManager = class ReleaseNotesManager {
|
|
38
37
|
constructor(_environmentService, _keybindingService, _languageService, _openerService, _requestService, _configurationService, _editorService, _editorGroupService, _codeEditorService, _webviewWorkbenchService, _extensionService, _productService, _instantiationService) {
|
|
39
38
|
this._environmentService = _environmentService;
|
|
@@ -72,7 +71,7 @@ let ReleaseNotesManager = class ReleaseNotesManager {
|
|
|
72
71
|
const releaseNoteText = await this.loadReleaseNotes(version, useCurrentFile);
|
|
73
72
|
this._lastText = releaseNoteText;
|
|
74
73
|
const html = await this.renderBody(releaseNoteText);
|
|
75
|
-
const title = (
|
|
74
|
+
const title = ( localize(10529, "Release Notes: {0}", version));
|
|
76
75
|
const activeEditorPane = this._editorService.activeEditorPane;
|
|
77
76
|
if (this._currentReleaseNotes) {
|
|
78
77
|
this._currentReleaseNotes.setName(title);
|
|
@@ -121,7 +120,7 @@ let ReleaseNotesManager = class ReleaseNotesManager {
|
|
|
121
120
|
const versionLabel = match[1].replace(/\./g, '_');
|
|
122
121
|
const baseUrl = 'https://code.visualstudio.com/raw';
|
|
123
122
|
const url = `${baseUrl}/v${versionLabel}.md`;
|
|
124
|
-
const unassigned = (
|
|
123
|
+
const unassigned = ( localize(10530, "unassigned"));
|
|
125
124
|
const escapeMdHtml = (text) => {
|
|
126
125
|
return escape(text).replace(/\\/g, '\\\\');
|
|
127
126
|
};
|
|
@@ -172,7 +171,7 @@ let ReleaseNotesManager = class ReleaseNotesManager {
|
|
|
172
171
|
catch {
|
|
173
172
|
throw ( (new Error('Failed to fetch release notes')));
|
|
174
173
|
}
|
|
175
|
-
if (!text || !/^#\s/.test(text)) {
|
|
174
|
+
if (!text || (!/^#\s/.test(text) && !useCurrentFile)) {
|
|
176
175
|
throw ( (new Error('Invalid release notes')));
|
|
177
176
|
}
|
|
178
177
|
return patchKeybindings(text);
|
|
@@ -330,7 +329,7 @@ let ReleaseNotesManager = class ReleaseNotesManager {
|
|
|
330
329
|
|
|
331
330
|
const label = document.createElement('label');
|
|
332
331
|
label.htmlFor = 'showReleaseNotes';
|
|
333
|
-
label.textContent = '${(
|
|
332
|
+
label.textContent = '${( localize(10531, "Show release notes after an update"))}';
|
|
334
333
|
container.appendChild(label);
|
|
335
334
|
|
|
336
335
|
const beforeElement = document.querySelector("body > h1")?.nextElementSibling;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../../../platform/update/common/update.config.contribution.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
4
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
5
5
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
@@ -20,7 +20,6 @@ import { IProductService } from 'vscode/vscode/vs/platform/product/common/produc
|
|
|
20
20
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
21
21
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
22
22
|
|
|
23
|
-
const _moduleId = "vs/workbench/contrib/update/browser/update.contribution";
|
|
24
23
|
const workbench = ( (Registry.as(Extensions.Workbench)));
|
|
25
24
|
workbench.registerWorkbenchContribution(ProductContribution, LifecyclePhase.Restored);
|
|
26
25
|
workbench.registerWorkbenchContribution(UpdateContribution, LifecyclePhase.Restored);
|
|
@@ -30,8 +29,8 @@ class ShowCurrentReleaseNotesAction extends Action2 {
|
|
|
30
29
|
super({
|
|
31
30
|
id: ShowCurrentReleaseNotesActionId,
|
|
32
31
|
title: {
|
|
33
|
-
...(
|
|
34
|
-
mnemonicTitle: (
|
|
32
|
+
...( localize2(2983, "Show Release Notes")),
|
|
33
|
+
mnemonicTitle: ( localize(2984, "Show &&Release Notes")),
|
|
35
34
|
},
|
|
36
35
|
category: { value: product$1.nameShort, original: product$1.nameShort },
|
|
37
36
|
f1: true,
|
|
@@ -56,9 +55,8 @@ class ShowCurrentReleaseNotesAction extends Action2 {
|
|
|
56
55
|
await openerService.open(( (URI.parse(productService.releaseNotesUrl))));
|
|
57
56
|
}
|
|
58
57
|
else {
|
|
59
|
-
throw ( (new Error(
|
|
60
|
-
|
|
61
|
-
2,
|
|
58
|
+
throw ( (new Error(localize(
|
|
59
|
+
2985,
|
|
62
60
|
"This version of {0} does not have release notes online",
|
|
63
61
|
productService.nameLong
|
|
64
62
|
))));
|
|
@@ -71,12 +69,11 @@ class ShowCurrentReleaseNotesFromCurrentFileAction extends Action2 {
|
|
|
71
69
|
super({
|
|
72
70
|
id: ShowCurrentReleaseNotesFromCurrentFileActionId,
|
|
73
71
|
title: {
|
|
74
|
-
...(
|
|
75
|
-
mnemonicTitle: (
|
|
72
|
+
...( localize2(2986, "Open Current File as Release Notes")),
|
|
73
|
+
mnemonicTitle: ( localize(2986, "Show &&Release Notes")),
|
|
76
74
|
},
|
|
77
|
-
category: (
|
|
75
|
+
category: ( localize2(2987, "Developer")),
|
|
78
76
|
f1: true,
|
|
79
|
-
precondition: RELEASE_NOTES_URL
|
|
80
77
|
});
|
|
81
78
|
}
|
|
82
79
|
async run(accessor) {
|
|
@@ -86,9 +83,7 @@ class ShowCurrentReleaseNotesFromCurrentFileAction extends Action2 {
|
|
|
86
83
|
await showReleaseNotesInEditor(instantiationService, productService.version, true);
|
|
87
84
|
}
|
|
88
85
|
catch (err) {
|
|
89
|
-
throw ( (new Error(
|
|
90
|
-
localizeWithPath(_moduleId, 5, "Cannot open the current file as Release Notes")
|
|
91
|
-
)));
|
|
86
|
+
throw ( (new Error(localize(2988, "Cannot open the current file as Release Notes"))));
|
|
92
87
|
}
|
|
93
88
|
}
|
|
94
89
|
}
|
|
@@ -98,7 +93,7 @@ class CheckForUpdateAction extends Action2 {
|
|
|
98
93
|
constructor() {
|
|
99
94
|
super({
|
|
100
95
|
id: 'update.checkForUpdate',
|
|
101
|
-
title: (
|
|
96
|
+
title: ( localize2(2989, 'Check for Updates...')),
|
|
102
97
|
category: { value: product$1.nameShort, original: product$1.nameShort },
|
|
103
98
|
f1: true,
|
|
104
99
|
precondition: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle))),
|
|
@@ -113,7 +108,7 @@ class DownloadUpdateAction extends Action2 {
|
|
|
113
108
|
constructor() {
|
|
114
109
|
super({
|
|
115
110
|
id: 'update.downloadUpdate',
|
|
116
|
-
title: (
|
|
111
|
+
title: ( localize2(2990, 'Download Update')),
|
|
117
112
|
category: { value: product$1.nameShort, original: product$1.nameShort },
|
|
118
113
|
f1: true,
|
|
119
114
|
precondition: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.AvailableForDownload)))
|
|
@@ -127,7 +122,7 @@ class InstallUpdateAction extends Action2 {
|
|
|
127
122
|
constructor() {
|
|
128
123
|
super({
|
|
129
124
|
id: 'update.installUpdate',
|
|
130
|
-
title: (
|
|
125
|
+
title: ( localize2(2991, 'Install Update')),
|
|
131
126
|
category: { value: product$1.nameShort, original: product$1.nameShort },
|
|
132
127
|
f1: true,
|
|
133
128
|
precondition: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Downloaded)))
|
|
@@ -141,7 +136,7 @@ class RestartToUpdateAction extends Action2 {
|
|
|
141
136
|
constructor() {
|
|
142
137
|
super({
|
|
143
138
|
id: 'update.restartToUpdate',
|
|
144
|
-
title: (
|
|
139
|
+
title: ( localize2(2992, 'Restart to Update')),
|
|
145
140
|
category: { value: product$1.nameShort, original: product$1.nameShort },
|
|
146
141
|
f1: true,
|
|
147
142
|
precondition: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)))
|
|
@@ -156,7 +151,7 @@ class DownloadAction extends Action2 {
|
|
|
156
151
|
constructor() {
|
|
157
152
|
super({
|
|
158
153
|
id: DownloadAction.ID,
|
|
159
|
-
title: (
|
|
154
|
+
title: ( localize2(2993, "Download {0}", product$1.nameLong)),
|
|
160
155
|
precondition: ( (ContextKeyExpr.and(IsWebContext, DOWNLOAD_URL))),
|
|
161
156
|
f1: true,
|
|
162
157
|
menu: [{
|
|
@@ -183,7 +178,7 @@ if (isWindows) {
|
|
|
183
178
|
constructor() {
|
|
184
179
|
super({
|
|
185
180
|
id: '_update.applyupdate',
|
|
186
|
-
title: (
|
|
181
|
+
title: ( localize2(2994, 'Apply Update...')),
|
|
187
182
|
category: Categories.Developer,
|
|
188
183
|
f1: true,
|
|
189
184
|
precondition: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle)))
|
|
@@ -193,10 +188,10 @@ if (isWindows) {
|
|
|
193
188
|
const updateService = accessor.get(IUpdateService);
|
|
194
189
|
const fileDialogService = accessor.get(IFileDialogService);
|
|
195
190
|
const updatePath = await fileDialogService.showOpenDialog({
|
|
196
|
-
title: (
|
|
191
|
+
title: ( localize(2995, "Apply Update")),
|
|
197
192
|
filters: [{ name: 'Setup', extensions: ['exe'] }],
|
|
198
193
|
canSelectFiles: true,
|
|
199
|
-
openLabel: mnemonicButtonLabel((
|
|
194
|
+
openLabel: mnemonicButtonLabel(( localize(2996, "&&Update")))
|
|
200
195
|
});
|
|
201
196
|
if (!updatePath || !updatePath[0]) {
|
|
202
197
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
4
4
|
import { Disposable, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -33,7 +33,6 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
33
33
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
34
34
|
|
|
35
35
|
var ProductContribution_1;
|
|
36
|
-
const _moduleId = "vs/workbench/contrib/update/browser/update";
|
|
37
36
|
const CONTEXT_UPDATE_STATE = ( (new RawContextKey('updateState', StateType.Uninitialized)));
|
|
38
37
|
const MAJOR_MINOR_UPDATE_AVAILABLE = ( (new RawContextKey('majorMinorUpdateAvailable', false)));
|
|
39
38
|
const RELEASE_NOTES_URL = ( (new RawContextKey('releaseNotesUrl', '')));
|
|
@@ -53,9 +52,8 @@ async function openLatestReleaseNotesInBrowser(accessor) {
|
|
|
53
52
|
await openerService.open(uri);
|
|
54
53
|
}
|
|
55
54
|
else {
|
|
56
|
-
throw ( (new Error(
|
|
57
|
-
|
|
58
|
-
0,
|
|
55
|
+
throw ( (new Error(localize(
|
|
56
|
+
6704,
|
|
59
57
|
"This version of {0} does not have release notes online",
|
|
60
58
|
productService.nameLong
|
|
61
59
|
))));
|
|
@@ -115,14 +113,13 @@ let ProductContribution = class ProductContribution {
|
|
|
115
113
|
if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && currentVersion && isMajorMinorUpdate(lastVersion, currentVersion)) {
|
|
116
114
|
showReleaseNotesInEditor(instantiationService, productService.version, false)
|
|
117
115
|
.then(undefined, () => {
|
|
118
|
-
notificationService.prompt(Severity$1.Info, (
|
|
119
|
-
|
|
120
|
-
1,
|
|
116
|
+
notificationService.prompt(Severity$1.Info, ( localize(
|
|
117
|
+
6705,
|
|
121
118
|
"Welcome to {0} v{1}! Would you like to read the Release Notes?",
|
|
122
119
|
productService.nameLong,
|
|
123
120
|
productService.version
|
|
124
121
|
)), [{
|
|
125
|
-
label: (
|
|
122
|
+
label: ( localize(6706, "Release Notes")),
|
|
126
123
|
run: () => {
|
|
127
124
|
const uri = ( (URI.parse(releaseNotesUrl)));
|
|
128
125
|
openerService.open(uri);
|
|
@@ -180,17 +177,16 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
180
177
|
if (state.reason === DisablementReason.RunningAsAdmin) {
|
|
181
178
|
this.notificationService.notify({
|
|
182
179
|
severity: Severity$1.Info,
|
|
183
|
-
message: (
|
|
184
|
-
|
|
185
|
-
3,
|
|
180
|
+
message: ( localize(
|
|
181
|
+
6707,
|
|
186
182
|
"Updates are disabled because you are running the user-scope installation of {0} as Administrator.",
|
|
187
183
|
this.productService.nameLong
|
|
188
184
|
)),
|
|
189
185
|
actions: {
|
|
190
186
|
primary: [
|
|
191
|
-
( (new Action('', (
|
|
192
|
-
|
|
193
|
-
|
|
187
|
+
( (new Action('', ( localize(6708, "Learn More")), undefined, undefined, () => {
|
|
188
|
+
this.openerService.open('https://aka.ms/vscode-windows-setup');
|
|
189
|
+
})))
|
|
194
190
|
]
|
|
195
191
|
},
|
|
196
192
|
neverShowAgain: { id: 'no-updates-running-as-admin', }
|
|
@@ -225,18 +221,18 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
225
221
|
let badge = undefined;
|
|
226
222
|
let priority = undefined;
|
|
227
223
|
if (state.type === StateType.AvailableForDownload || state.type === StateType.Downloaded || state.type === StateType.Ready) {
|
|
228
|
-
badge = ( (new NumberBadge(1, () => (
|
|
224
|
+
badge = ( (new NumberBadge(1, () => ( localize(6709, "New {0} update available.", this.productService.nameShort)))));
|
|
229
225
|
}
|
|
230
226
|
else if (state.type === StateType.CheckingForUpdates) {
|
|
231
|
-
badge = ( (new ProgressBadge(() => (
|
|
227
|
+
badge = ( (new ProgressBadge(() => ( localize(6710, "Checking for Updates...")))));
|
|
232
228
|
priority = 1;
|
|
233
229
|
}
|
|
234
230
|
else if (state.type === StateType.Downloading) {
|
|
235
|
-
badge = ( (new ProgressBadge(() => (
|
|
231
|
+
badge = ( (new ProgressBadge(() => ( localize(6711, "Downloading...")))));
|
|
236
232
|
priority = 1;
|
|
237
233
|
}
|
|
238
234
|
else if (state.type === StateType.Updating) {
|
|
239
|
-
badge = ( (new ProgressBadge(() => (
|
|
235
|
+
badge = ( (new ProgressBadge(() => ( localize(6712, "Updating...")))));
|
|
240
236
|
priority = 1;
|
|
241
237
|
}
|
|
242
238
|
this.badgeDisposable.clear();
|
|
@@ -253,11 +249,11 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
253
249
|
this.notificationService.notify({
|
|
254
250
|
severity: Severity$1.Error,
|
|
255
251
|
message: error,
|
|
256
|
-
source: (
|
|
252
|
+
source: ( localize(6713, "Update Service")),
|
|
257
253
|
});
|
|
258
254
|
}
|
|
259
255
|
onUpdateNotAvailable() {
|
|
260
|
-
this.dialogService.info((
|
|
256
|
+
this.dialogService.info(( localize(6714, "There are currently no updates available.")));
|
|
261
257
|
}
|
|
262
258
|
onUpdateAvailable(update) {
|
|
263
259
|
if (!this.shouldShowNotification()) {
|
|
@@ -267,14 +263,14 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
267
263
|
if (!productVersion) {
|
|
268
264
|
return;
|
|
269
265
|
}
|
|
270
|
-
this.notificationService.prompt(Severity$1.Info, (
|
|
271
|
-
label: (
|
|
266
|
+
this.notificationService.prompt(Severity$1.Info, ( localize(6715, "There is an available update.")), [{
|
|
267
|
+
label: ( localize(6716, "Download Update")),
|
|
272
268
|
run: () => this.updateService.downloadUpdate()
|
|
273
269
|
}, {
|
|
274
|
-
label: (
|
|
270
|
+
label: ( localize(6717, "Later")),
|
|
275
271
|
run: () => { }
|
|
276
272
|
}, {
|
|
277
|
-
label: (
|
|
273
|
+
label: ( localize(6717, "Release Notes")),
|
|
278
274
|
run: () => {
|
|
279
275
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
280
276
|
}
|
|
@@ -294,20 +290,19 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
294
290
|
if (!productVersion) {
|
|
295
291
|
return;
|
|
296
292
|
}
|
|
297
|
-
this.notificationService.prompt(Severity$1.Info, (
|
|
298
|
-
|
|
299
|
-
14,
|
|
293
|
+
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
294
|
+
6718,
|
|
300
295
|
"There's an update available: {0} {1}",
|
|
301
296
|
this.productService.nameLong,
|
|
302
297
|
productVersion
|
|
303
298
|
)), [{
|
|
304
|
-
label: (
|
|
299
|
+
label: ( localize(6719, "Install Update")),
|
|
305
300
|
run: () => this.updateService.applyUpdate()
|
|
306
301
|
}, {
|
|
307
|
-
label: (
|
|
302
|
+
label: ( localize(6719, "Later")),
|
|
308
303
|
run: () => { }
|
|
309
304
|
}, {
|
|
310
|
-
label: (
|
|
305
|
+
label: ( localize(6719, "Release Notes")),
|
|
311
306
|
run: () => {
|
|
312
307
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
313
308
|
}
|
|
@@ -318,24 +313,23 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
318
313
|
return;
|
|
319
314
|
}
|
|
320
315
|
const actions = [{
|
|
321
|
-
label: (
|
|
316
|
+
label: ( localize(6720, "Update Now")),
|
|
322
317
|
run: () => this.updateService.quitAndInstall()
|
|
323
318
|
}, {
|
|
324
|
-
label: (
|
|
319
|
+
label: ( localize(6720, "Later")),
|
|
325
320
|
run: () => { }
|
|
326
321
|
}];
|
|
327
322
|
const productVersion = update.productVersion;
|
|
328
323
|
if (productVersion) {
|
|
329
324
|
actions.push({
|
|
330
|
-
label: (
|
|
325
|
+
label: ( localize(6720, "Release Notes")),
|
|
331
326
|
run: () => {
|
|
332
327
|
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, productVersion));
|
|
333
328
|
}
|
|
334
329
|
});
|
|
335
330
|
}
|
|
336
|
-
this.notificationService.prompt(Severity$1.Info, (
|
|
337
|
-
|
|
338
|
-
17,
|
|
331
|
+
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
332
|
+
6721,
|
|
339
333
|
"Restart {0} to apply the latest update.",
|
|
340
334
|
this.productService.nameLong
|
|
341
335
|
)), actions, { sticky: true });
|
|
@@ -358,7 +352,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
358
352
|
group: '7_update',
|
|
359
353
|
command: {
|
|
360
354
|
id: 'update.check',
|
|
361
|
-
title: (
|
|
355
|
+
title: ( localize(6722, "Check for Updates..."))
|
|
362
356
|
},
|
|
363
357
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle)))
|
|
364
358
|
});
|
|
@@ -367,7 +361,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
367
361
|
group: '7_update',
|
|
368
362
|
command: {
|
|
369
363
|
id: 'update.checking',
|
|
370
|
-
title: (
|
|
364
|
+
title: ( localize(6722, "Checking for Updates...")),
|
|
371
365
|
precondition: ( (ContextKeyExpr.false()))
|
|
372
366
|
},
|
|
373
367
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.CheckingForUpdates)))
|
|
@@ -377,7 +371,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
377
371
|
group: '7_update',
|
|
378
372
|
command: {
|
|
379
373
|
id: 'update.downloadNow',
|
|
380
|
-
title: (
|
|
374
|
+
title: ( localize(6723, "Download Update (1)"))
|
|
381
375
|
},
|
|
382
376
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.AvailableForDownload)))
|
|
383
377
|
});
|
|
@@ -386,7 +380,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
386
380
|
group: '7_update',
|
|
387
381
|
command: {
|
|
388
382
|
id: 'update.downloading',
|
|
389
|
-
title: (
|
|
383
|
+
title: ( localize(6724, "Downloading Update...")),
|
|
390
384
|
precondition: ( (ContextKeyExpr.false()))
|
|
391
385
|
},
|
|
392
386
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Downloading)))
|
|
@@ -396,7 +390,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
396
390
|
group: '7_update',
|
|
397
391
|
command: {
|
|
398
392
|
id: 'update.install',
|
|
399
|
-
title: (
|
|
393
|
+
title: ( localize(6725, "Install Update... (1)"))
|
|
400
394
|
},
|
|
401
395
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Downloaded)))
|
|
402
396
|
});
|
|
@@ -405,7 +399,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
405
399
|
group: '7_update',
|
|
406
400
|
command: {
|
|
407
401
|
id: 'update.updating',
|
|
408
|
-
title: (
|
|
402
|
+
title: ( localize(6726, "Installing Update...")),
|
|
409
403
|
precondition: ( (ContextKeyExpr.false()))
|
|
410
404
|
},
|
|
411
405
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Updating)))
|
|
@@ -425,7 +419,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
425
419
|
order: 1,
|
|
426
420
|
command: {
|
|
427
421
|
id: 'update.showUpdateReleaseNotes',
|
|
428
|
-
title: (
|
|
422
|
+
title: ( localize(6727, "Show Update Release Notes"))
|
|
429
423
|
},
|
|
430
424
|
when: ( (ContextKeyExpr.and(
|
|
431
425
|
(CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)),
|
|
@@ -439,7 +433,7 @@ let UpdateContribution = class UpdateContribution extends Disposable {
|
|
|
439
433
|
order: 2,
|
|
440
434
|
command: {
|
|
441
435
|
id: 'update.restart',
|
|
442
|
-
title: (
|
|
436
|
+
title: ( localize(6728, "Restart to Update (1)"))
|
|
443
437
|
},
|
|
444
438
|
when: ( (CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)))
|
|
445
439
|
});
|
|
@@ -479,7 +473,7 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
479
473
|
constructor() {
|
|
480
474
|
super({
|
|
481
475
|
id: commandId,
|
|
482
|
-
title: isSwitchingToInsiders ? (
|
|
476
|
+
title: isSwitchingToInsiders ? ( localize(6729, "Switch to Insiders Version...")) : ( localize(6730, "Switch to Stable Version...")),
|
|
483
477
|
precondition: IsWebContext,
|
|
484
478
|
menu: {
|
|
485
479
|
id: MenuId.GlobalActivity,
|
|
@@ -513,19 +507,17 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
513
507
|
}
|
|
514
508
|
const res = await dialogService.confirm({
|
|
515
509
|
type: 'info',
|
|
516
|
-
message: (
|
|
510
|
+
message: ( localize(6731, "Changing the version requires a reload to take effect")),
|
|
517
511
|
detail: newQuality === 'insider' ?
|
|
518
|
-
(
|
|
519
|
-
|
|
520
|
-
28,
|
|
512
|
+
( localize(
|
|
513
|
+
6732,
|
|
521
514
|
"Press the reload button to switch to the Insiders version of VS Code."
|
|
522
515
|
)) :
|
|
523
|
-
(
|
|
524
|
-
|
|
525
|
-
29,
|
|
516
|
+
( localize(
|
|
517
|
+
6733,
|
|
526
518
|
"Press the reload button to switch to the Stable version of VS Code."
|
|
527
519
|
)),
|
|
528
|
-
primaryButton: (
|
|
520
|
+
primaryButton: ( localize(6734, "&&Reload"))
|
|
529
521
|
});
|
|
530
522
|
if (res.confirmed) {
|
|
531
523
|
const promises = [];
|
|
@@ -551,23 +543,18 @@ let SwitchProductQualityContribution = class SwitchProductQualityContribution ex
|
|
|
551
543
|
async selectSettingsSyncService(dialogService) {
|
|
552
544
|
const { result } = await dialogService.prompt({
|
|
553
545
|
type: Severity$1.Info,
|
|
554
|
-
message: (
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"Choose the settings sync service to use after changing the version"
|
|
558
|
-
)),
|
|
559
|
-
detail: ( localizeWithPath(
|
|
560
|
-
_moduleId,
|
|
561
|
-
32,
|
|
546
|
+
message: ( localize(6735, "Choose the settings sync service to use after changing the version")),
|
|
547
|
+
detail: ( localize(
|
|
548
|
+
6736,
|
|
562
549
|
"The Insiders version of VS Code will synchronize your settings, keybindings, extensions, snippets and UI State using separate insiders settings sync service by default."
|
|
563
550
|
)),
|
|
564
551
|
buttons: [
|
|
565
552
|
{
|
|
566
|
-
label: (
|
|
553
|
+
label: ( localize(6737, "&&Insiders")),
|
|
567
554
|
run: () => 'insiders'
|
|
568
555
|
},
|
|
569
556
|
{
|
|
570
|
-
label: (
|
|
557
|
+
label: ( localize(6738, "&&Stable (current)")),
|
|
571
558
|
run: () => 'stable'
|
|
572
559
|
}
|
|
573
560
|
],
|