@codingame/monaco-vscode-relauncher-service-override 25.1.2 → 26.0.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-relauncher-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - relauncher service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.1"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -24,25 +24,37 @@ import { IUserDataSyncWorkbenchService } from '@codingame/monaco-vscode-api/vsco
|
|
|
24
24
|
|
|
25
25
|
var SettingsChangeRelauncher_1;
|
|
26
26
|
let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable {
|
|
27
|
-
static {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
static {
|
|
28
|
+
SettingsChangeRelauncher_1 = this;
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.SETTINGS = [
|
|
32
|
+
TitleBarSetting.TITLE_BAR_STYLE,
|
|
33
|
+
MenuSettings.MenuStyle,
|
|
34
|
+
"window.nativeTabs",
|
|
35
|
+
"window.nativeFullScreen",
|
|
36
|
+
"window.clickThroughInactive",
|
|
37
|
+
"window.controlsStyle",
|
|
38
|
+
"update.mode",
|
|
39
|
+
"editor.accessibilitySupport",
|
|
40
|
+
"security.workspace.trust.enabled",
|
|
41
|
+
"workbench.enableExperiments",
|
|
42
|
+
"_extensionsGallery.enablePPE",
|
|
43
|
+
"security.restrictUNCAccess",
|
|
44
|
+
"accessibility.verbosity.debug",
|
|
45
|
+
"telemetry.feedback.enabled",
|
|
46
|
+
"chat.extensionUnification.enabled"
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
constructor(
|
|
50
|
+
hostService,
|
|
51
|
+
configurationService,
|
|
52
|
+
userDataSyncService,
|
|
53
|
+
userDataSyncEnablementService,
|
|
54
|
+
userDataSyncWorkbenchService,
|
|
55
|
+
productService,
|
|
56
|
+
dialogService
|
|
57
|
+
) {
|
|
46
58
|
super();
|
|
47
59
|
this.hostService = hostService;
|
|
48
60
|
this.configurationService = configurationService;
|
|
@@ -50,22 +62,24 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
50
62
|
this.userDataSyncEnablementService = userDataSyncEnablementService;
|
|
51
63
|
this.productService = productService;
|
|
52
64
|
this.dialogService = dialogService;
|
|
53
|
-
this.titleBarStyle = ( new ChangeObserver(
|
|
54
|
-
this.menuStyle = ( new ChangeObserver(
|
|
55
|
-
this.nativeTabs = ( new ChangeObserver(
|
|
56
|
-
this.nativeFullScreen = ( new ChangeObserver(
|
|
57
|
-
this.clickThroughInactive = ( new ChangeObserver(
|
|
58
|
-
this.controlsStyle = ( new ChangeObserver(
|
|
59
|
-
this.updateMode = ( new ChangeObserver(
|
|
60
|
-
this.workspaceTrustEnabled = ( new ChangeObserver(
|
|
61
|
-
this.experimentsEnabled = ( new ChangeObserver(
|
|
62
|
-
this.enablePPEExtensionsGallery = ( new ChangeObserver(
|
|
63
|
-
this.restrictUNCAccess = ( new ChangeObserver(
|
|
64
|
-
this.accessibilityVerbosityDebug = ( new ChangeObserver(
|
|
65
|
-
this.telemetryFeedbackEnabled = ( new ChangeObserver(
|
|
66
|
-
this.extensionUnificationEnabled = ( new ChangeObserver(
|
|
65
|
+
this.titleBarStyle = ( new ChangeObserver("string"));
|
|
66
|
+
this.menuStyle = ( new ChangeObserver("string"));
|
|
67
|
+
this.nativeTabs = ( new ChangeObserver("boolean"));
|
|
68
|
+
this.nativeFullScreen = ( new ChangeObserver("boolean"));
|
|
69
|
+
this.clickThroughInactive = ( new ChangeObserver("boolean"));
|
|
70
|
+
this.controlsStyle = ( new ChangeObserver("string"));
|
|
71
|
+
this.updateMode = ( new ChangeObserver("string"));
|
|
72
|
+
this.workspaceTrustEnabled = ( new ChangeObserver("boolean"));
|
|
73
|
+
this.experimentsEnabled = ( new ChangeObserver("boolean"));
|
|
74
|
+
this.enablePPEExtensionsGallery = ( new ChangeObserver("boolean"));
|
|
75
|
+
this.restrictUNCAccess = ( new ChangeObserver("boolean"));
|
|
76
|
+
this.accessibilityVerbosityDebug = ( new ChangeObserver("boolean"));
|
|
77
|
+
this.telemetryFeedbackEnabled = ( new ChangeObserver("boolean"));
|
|
78
|
+
this.extensionUnificationEnabled = ( new ChangeObserver("boolean"));
|
|
67
79
|
this.update(false);
|
|
68
|
-
this._register(
|
|
80
|
+
this._register(
|
|
81
|
+
this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange(e))
|
|
82
|
+
);
|
|
69
83
|
this._register(userDataSyncWorkbenchService.onDidTurnOnSync(e => this.update(true)));
|
|
70
84
|
}
|
|
71
85
|
onConfigurationChange(e) {
|
|
@@ -75,7 +89,9 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
75
89
|
if (this.isTurningOnSyncInProgress()) {
|
|
76
90
|
return;
|
|
77
91
|
}
|
|
78
|
-
this.update(
|
|
92
|
+
this.update(
|
|
93
|
+
e.source !== ConfigurationTarget.DEFAULT
|
|
94
|
+
);
|
|
79
95
|
}
|
|
80
96
|
isTurningOnSyncInProgress() {
|
|
81
97
|
return !this.userDataSyncEnablementService.isEnabled() && this.userDataSyncService.status === SyncStatus.Syncing;
|
|
@@ -87,61 +103,71 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
87
103
|
}
|
|
88
104
|
const config = this.configurationService.getValue();
|
|
89
105
|
if (isNative) {
|
|
90
|
-
processChanged(
|
|
106
|
+
processChanged(
|
|
107
|
+
(config.window.titleBarStyle === TitlebarStyle.NATIVE || config.window.titleBarStyle === TitlebarStyle.CUSTOM) && this.titleBarStyle.handleChange(config.window?.titleBarStyle)
|
|
108
|
+
);
|
|
91
109
|
processChanged(!isMacintosh && this.menuStyle.handleChange(config.window?.menuStyle));
|
|
92
110
|
processChanged(isMacintosh && this.nativeTabs.handleChange(config.window?.nativeTabs));
|
|
93
|
-
processChanged(
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
processChanged(
|
|
112
|
+
isMacintosh && this.nativeFullScreen.handleChange(config.window?.nativeFullScreen)
|
|
113
|
+
);
|
|
114
|
+
processChanged(
|
|
115
|
+
isMacintosh && this.clickThroughInactive.handleChange(config.window?.clickThroughInactive)
|
|
116
|
+
);
|
|
117
|
+
processChanged(
|
|
118
|
+
!isMacintosh && this.controlsStyle.handleChange(config.window?.controlsStyle)
|
|
119
|
+
);
|
|
96
120
|
processChanged(this.updateMode.handleChange(config.update?.mode));
|
|
97
|
-
if (isLinux && typeof config.editor?.accessibilitySupport ===
|
|
121
|
+
if (isLinux && typeof config.editor?.accessibilitySupport === "string" && config.editor.accessibilitySupport !== this.accessibilitySupport) {
|
|
98
122
|
this.accessibilitySupport = config.editor.accessibilitySupport;
|
|
99
|
-
if (this.accessibilitySupport ===
|
|
123
|
+
if (this.accessibilitySupport === "on") {
|
|
100
124
|
changed = true;
|
|
101
125
|
}
|
|
102
126
|
}
|
|
103
|
-
processChanged(
|
|
127
|
+
processChanged(
|
|
128
|
+
this.workspaceTrustEnabled.handleChange(config?.security?.workspace?.trust?.enabled)
|
|
129
|
+
);
|
|
104
130
|
processChanged(this.restrictUNCAccess.handleChange(config?.security?.restrictUNCAccess));
|
|
105
|
-
processChanged(
|
|
131
|
+
processChanged(
|
|
132
|
+
this.accessibilityVerbosityDebug.handleChange(config?.accessibility?.verbosity?.debug)
|
|
133
|
+
);
|
|
106
134
|
}
|
|
107
135
|
processChanged(this.experimentsEnabled.handleChange(config.workbench?.enableExperiments));
|
|
108
|
-
processChanged(
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
processChanged(
|
|
137
|
+
this.productService.quality !== "stable" && this.enablePPEExtensionsGallery.handleChange(config._extensionsGallery?.enablePPE)
|
|
138
|
+
);
|
|
139
|
+
processChanged(
|
|
140
|
+
this.telemetryFeedbackEnabled.handleChange(config.telemetry?.feedback?.enabled)
|
|
141
|
+
);
|
|
142
|
+
processChanged(
|
|
143
|
+
this.extensionUnificationEnabled.handleChange(config.chat?.extensionUnification?.enabled) && config.chat?.extensionUnification?.enabled === true
|
|
144
|
+
);
|
|
111
145
|
if (askToRelaunch && changed && this.hostService.hasFocus) {
|
|
112
|
-
this.doConfirm(isNative ?
|
|
113
|
-
|
|
114
|
-
( localize(10223, "A setting has changed that requires a reload to take effect.")), isNative ?
|
|
115
|
-
( localize(
|
|
116
|
-
10224,
|
|
146
|
+
this.doConfirm(isNative ? ( localize(10540, "A setting has changed that requires a restart to take effect.")) : ( localize(10541, "A setting has changed that requires a reload to take effect.")), isNative ? ( localize(
|
|
147
|
+
10542,
|
|
117
148
|
"Press the restart button to restart {0} and enable the setting.",
|
|
118
149
|
this.productService.nameLong
|
|
119
|
-
)) :
|
|
120
|
-
|
|
121
|
-
10225,
|
|
150
|
+
)) : ( localize(
|
|
151
|
+
10543,
|
|
122
152
|
"Press the reload button to reload {0} and enable the setting.",
|
|
123
153
|
this.productService.nameLong
|
|
124
|
-
)), isNative ?
|
|
125
|
-
( localize(10226, "&&Restart")) :
|
|
126
|
-
( localize(10227, "&&Reload")), () => this.hostService.restart());
|
|
154
|
+
)), isNative ? ( localize(10544, "&&Restart")) : ( localize(10545, "&&Reload")), () => this.hostService.restart());
|
|
127
155
|
}
|
|
128
156
|
}
|
|
129
157
|
async doConfirm(message, detail, primaryButton, confirmedFn) {
|
|
130
|
-
const {
|
|
158
|
+
const {
|
|
159
|
+
confirmed
|
|
160
|
+
} = await this.dialogService.confirm({
|
|
161
|
+
message,
|
|
162
|
+
detail,
|
|
163
|
+
primaryButton
|
|
164
|
+
});
|
|
131
165
|
if (confirmed) {
|
|
132
166
|
confirmedFn();
|
|
133
167
|
}
|
|
134
168
|
}
|
|
135
169
|
};
|
|
136
|
-
SettingsChangeRelauncher = SettingsChangeRelauncher_1 = ( __decorate([
|
|
137
|
-
( __param(0, IHostService)),
|
|
138
|
-
( __param(1, IConfigurationService)),
|
|
139
|
-
( __param(2, IUserDataSyncService)),
|
|
140
|
-
( __param(3, IUserDataSyncEnablementService)),
|
|
141
|
-
( __param(4, IUserDataSyncWorkbenchService)),
|
|
142
|
-
( __param(5, IProductService)),
|
|
143
|
-
( __param(6, IDialogService))
|
|
144
|
-
], SettingsChangeRelauncher));
|
|
170
|
+
SettingsChangeRelauncher = SettingsChangeRelauncher_1 = ( __decorate([( __param(0, IHostService)), ( __param(1, IConfigurationService)), ( __param(2, IUserDataSyncService)), ( __param(3, IUserDataSyncEnablementService)), ( __param(4, IUserDataSyncWorkbenchService)), ( __param(5, IProductService)), ( __param(6, IDialogService))], SettingsChangeRelauncher));
|
|
145
171
|
class ChangeObserver {
|
|
146
172
|
static create(typeName) {
|
|
147
173
|
return ( new ChangeObserver(typeName));
|
|
@@ -168,19 +194,19 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
168
194
|
}
|
|
169
195
|
if (environmentService.remoteAuthority) {
|
|
170
196
|
hostService.reload();
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const stopped = await extensionService.stopExtensionHosts(( localize(10228, "Changing workspace folders")));
|
|
197
|
+
} else if (isNative) {
|
|
198
|
+
const stopped = await extensionService.stopExtensionHosts(( localize(10546, "Changing workspace folders")));
|
|
174
199
|
if (stopped) {
|
|
175
200
|
extensionService.startExtensionHosts();
|
|
176
201
|
}
|
|
177
202
|
}
|
|
178
203
|
}, 10)));
|
|
179
|
-
this.contextService.getCompleteWorkspace()
|
|
180
|
-
.then(workspace => {
|
|
204
|
+
this.contextService.getCompleteWorkspace().then(workspace => {
|
|
181
205
|
this.firstFolderResource = workspace.folders.length > 0 ? workspace.folders[0].uri : undefined;
|
|
182
206
|
this.handleWorkbenchState();
|
|
183
|
-
this._register(
|
|
207
|
+
this._register(
|
|
208
|
+
this.contextService.onDidChangeWorkbenchState(() => setTimeout(() => this.handleWorkbenchState()))
|
|
209
|
+
);
|
|
184
210
|
});
|
|
185
211
|
this._register(toDisposable(() => {
|
|
186
212
|
this.onDidChangeWorkspaceFoldersUnbind?.dispose();
|
|
@@ -208,12 +234,7 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
208
234
|
}
|
|
209
235
|
}
|
|
210
236
|
};
|
|
211
|
-
WorkspaceChangeExtHostRelauncher = ( __decorate([
|
|
212
|
-
( __param(0, IWorkspaceContextService)),
|
|
213
|
-
( __param(1, IExtensionService)),
|
|
214
|
-
( __param(2, IHostService)),
|
|
215
|
-
( __param(3, IWorkbenchEnvironmentService))
|
|
216
|
-
], WorkspaceChangeExtHostRelauncher));
|
|
237
|
+
WorkspaceChangeExtHostRelauncher = ( __decorate([( __param(0, IWorkspaceContextService)), ( __param(1, IExtensionService)), ( __param(2, IHostService)), ( __param(3, IWorkbenchEnvironmentService))], WorkspaceChangeExtHostRelauncher));
|
|
217
238
|
const workbenchRegistry = ( Registry.as(Extensions.Workbench));
|
|
218
239
|
workbenchRegistry.registerWorkbenchContribution(SettingsChangeRelauncher, LifecyclePhase.Restored);
|
|
219
240
|
workbenchRegistry.registerWorkbenchContribution(WorkspaceChangeExtHostRelauncher, LifecyclePhase.Restored);
|