@codingame/monaco-vscode-relauncher-service-override 11.1.2 → 12.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/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
export default function getServiceOverride(): IEditorOverrideServices;
|
package/index.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
|
+
import './vscode/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.js';
|
|
4
|
+
|
|
5
|
+
function getServiceOverride() {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { getServiceOverride as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-relauncher-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - relauncher service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,11 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.1"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {},
|
|
21
|
+
"peerDependenciesMeta": {},
|
|
17
22
|
"main": "index.js",
|
|
18
23
|
"module": "index.js",
|
|
19
24
|
"types": "index.d.ts",
|
|
@@ -22,10 +27,12 @@
|
|
|
22
27
|
"default": "./index.js"
|
|
23
28
|
},
|
|
24
29
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
30
|
+
"default": "./vscode/src/*.js",
|
|
31
|
+
"types": "./vscode/src/*.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./*": {
|
|
34
|
+
"default": "./*.js",
|
|
35
|
+
"types": "./*.d.ts"
|
|
26
36
|
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.2"
|
|
30
37
|
}
|
|
31
38
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
|
|
3
|
+
import { IHostService } from "vscode/vscode/vs/workbench/services/host/browser/host.service";
|
|
4
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
7
|
+
import { IDialogService } from "vscode/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
8
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
9
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
10
|
+
import { IUserDataSyncService } from "vscode/vscode/vs/platform/userDataSync/common/userDataSync.service";
|
|
11
|
+
import { IUserDataSyncEnablementService } from "vscode/vscode/vs/platform/userDataSync/common/userDataSync.service";
|
|
12
|
+
import { IUserDataSyncWorkbenchService } from "vscode/vscode/vs/workbench/services/userDataSync/common/userDataSync.service";
|
|
13
|
+
export declare class SettingsChangeRelauncher extends Disposable implements IWorkbenchContribution {
|
|
14
|
+
private readonly hostService;
|
|
15
|
+
private readonly configurationService;
|
|
16
|
+
private readonly userDataSyncService;
|
|
17
|
+
private readonly userDataSyncEnablementService;
|
|
18
|
+
private readonly productService;
|
|
19
|
+
private readonly dialogService;
|
|
20
|
+
private static SETTINGS;
|
|
21
|
+
private readonly titleBarStyle;
|
|
22
|
+
private readonly nativeTabs;
|
|
23
|
+
private readonly nativeFullScreen;
|
|
24
|
+
private readonly clickThroughInactive;
|
|
25
|
+
private readonly linuxWindowControlOverlay;
|
|
26
|
+
private readonly updateMode;
|
|
27
|
+
private accessibilitySupport;
|
|
28
|
+
private readonly workspaceTrustEnabled;
|
|
29
|
+
private readonly experimentsEnabled;
|
|
30
|
+
private readonly enablePPEExtensionsGallery;
|
|
31
|
+
private readonly restrictUNCAccess;
|
|
32
|
+
private readonly accessibilityVerbosityDebug;
|
|
33
|
+
constructor(hostService: IHostService, configurationService: IConfigurationService, userDataSyncService: IUserDataSyncService, userDataSyncEnablementService: IUserDataSyncEnablementService, userDataSyncWorkbenchService: IUserDataSyncWorkbenchService, productService: IProductService, dialogService: IDialogService);
|
|
34
|
+
private onConfigurationChange;
|
|
35
|
+
private isTurningOnSyncInProgress;
|
|
36
|
+
private update;
|
|
37
|
+
private doConfirm;
|
|
38
|
+
}
|
|
39
|
+
export declare class WorkspaceChangeExtHostRelauncher extends Disposable implements IWorkbenchContribution {
|
|
40
|
+
private readonly contextService;
|
|
41
|
+
private firstFolderResource?;
|
|
42
|
+
private extensionHostRestarter;
|
|
43
|
+
private onDidChangeWorkspaceFoldersUnbind;
|
|
44
|
+
constructor(contextService: IWorkspaceContextService, extensionService: IExtensionService, hostService: IHostService, environmentService: IWorkbenchEnvironmentService);
|
|
45
|
+
private handleWorkbenchState;
|
|
46
|
+
private onDidChangeWorkspaceFolders;
|
|
47
|
+
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Disposable, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
4
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
|
+
import { TitleBarSetting, TitlebarStyle } from 'vscode/vscode/vs/platform/window/common/window';
|
|
5
7
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
8
|
+
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
6
9
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
10
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
11
|
+
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
8
12
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
9
13
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
10
14
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
11
15
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
12
16
|
import { isNative, isMacintosh, isLinux } from 'vscode/vscode/vs/base/common/platform';
|
|
17
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
13
18
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
14
19
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
15
20
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
21
|
+
import { SyncStatus } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
16
22
|
import { IUserDataSyncService, IUserDataSyncEnablementService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
17
23
|
import { IUserDataSyncWorkbenchService } from 'vscode/vscode/vs/workbench/services/userDataSync/common/userDataSync.service';
|
|
18
24
|
|
|
@@ -20,7 +26,7 @@ var SettingsChangeRelauncher_1;
|
|
|
20
26
|
let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable {
|
|
21
27
|
static { SettingsChangeRelauncher_1 = this; }
|
|
22
28
|
static { this.SETTINGS = [
|
|
23
|
-
|
|
29
|
+
TitleBarSetting.TITLE_BAR_STYLE,
|
|
24
30
|
'window.nativeTabs',
|
|
25
31
|
'window.nativeFullScreen',
|
|
26
32
|
'window.clickThroughInactive',
|
|
@@ -41,32 +47,32 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
41
47
|
this.userDataSyncEnablementService = userDataSyncEnablementService;
|
|
42
48
|
this.productService = productService;
|
|
43
49
|
this.dialogService = dialogService;
|
|
44
|
-
this.titleBarStyle = (
|
|
45
|
-
this.nativeTabs = (
|
|
46
|
-
this.nativeFullScreen = (
|
|
47
|
-
this.clickThroughInactive = (
|
|
48
|
-
this.linuxWindowControlOverlay = (
|
|
49
|
-
this.updateMode = (
|
|
50
|
-
this.workspaceTrustEnabled = (
|
|
51
|
-
this.experimentsEnabled = (
|
|
52
|
-
this.enablePPEExtensionsGallery = (
|
|
53
|
-
this.restrictUNCAccess = (
|
|
54
|
-
this.accessibilityVerbosityDebug = (
|
|
50
|
+
this.titleBarStyle = ( new ChangeObserver('string'));
|
|
51
|
+
this.nativeTabs = ( new ChangeObserver('boolean'));
|
|
52
|
+
this.nativeFullScreen = ( new ChangeObserver('boolean'));
|
|
53
|
+
this.clickThroughInactive = ( new ChangeObserver('boolean'));
|
|
54
|
+
this.linuxWindowControlOverlay = ( new ChangeObserver('boolean'));
|
|
55
|
+
this.updateMode = ( new ChangeObserver('string'));
|
|
56
|
+
this.workspaceTrustEnabled = ( new ChangeObserver('boolean'));
|
|
57
|
+
this.experimentsEnabled = ( new ChangeObserver('boolean'));
|
|
58
|
+
this.enablePPEExtensionsGallery = ( new ChangeObserver('boolean'));
|
|
59
|
+
this.restrictUNCAccess = ( new ChangeObserver('boolean'));
|
|
60
|
+
this.accessibilityVerbosityDebug = ( new ChangeObserver('boolean'));
|
|
55
61
|
this.update(false);
|
|
56
62
|
this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationChange(e)));
|
|
57
63
|
this._register(userDataSyncWorkbenchService.onDidTurnOnSync(e => this.update(true)));
|
|
58
64
|
}
|
|
59
65
|
onConfigurationChange(e) {
|
|
60
|
-
if (e && !(
|
|
66
|
+
if (e && !( SettingsChangeRelauncher_1.SETTINGS.some(key => e.affectsConfiguration(key)))) {
|
|
61
67
|
return;
|
|
62
68
|
}
|
|
63
69
|
if (this.isTurningOnSyncInProgress()) {
|
|
64
70
|
return;
|
|
65
71
|
}
|
|
66
|
-
this.update(e.source !==
|
|
72
|
+
this.update(e.source !== ConfigurationTarget.DEFAULT );
|
|
67
73
|
}
|
|
68
74
|
isTurningOnSyncInProgress() {
|
|
69
|
-
return !this.userDataSyncEnablementService.isEnabled() && this.userDataSyncService.status ===
|
|
75
|
+
return !this.userDataSyncEnablementService.isEnabled() && this.userDataSyncService.status === SyncStatus.Syncing;
|
|
70
76
|
}
|
|
71
77
|
update(askToRelaunch) {
|
|
72
78
|
let changed = false;
|
|
@@ -75,7 +81,7 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
75
81
|
}
|
|
76
82
|
const config = this.configurationService.getValue();
|
|
77
83
|
if (isNative) {
|
|
78
|
-
processChanged((
|
|
84
|
+
processChanged((config.window.titleBarStyle === TitlebarStyle.NATIVE || config.window.titleBarStyle === TitlebarStyle.CUSTOM) && this.titleBarStyle.handleChange(config.window?.titleBarStyle));
|
|
79
85
|
processChanged(isMacintosh && this.nativeTabs.handleChange(config.window?.nativeTabs));
|
|
80
86
|
processChanged(isMacintosh && this.nativeFullScreen.handleChange(config.window?.nativeFullScreen));
|
|
81
87
|
processChanged(isMacintosh && this.clickThroughInactive.handleChange(config.window?.clickThroughInactive));
|
|
@@ -95,20 +101,20 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
95
101
|
processChanged(this.productService.quality !== 'stable' && this.enablePPEExtensionsGallery.handleChange(config._extensionsGallery?.enablePPE));
|
|
96
102
|
if (askToRelaunch && changed && this.hostService.hasFocus) {
|
|
97
103
|
this.doConfirm(isNative ?
|
|
98
|
-
( localize(
|
|
99
|
-
( localize(
|
|
104
|
+
( localize(8219, "A setting has changed that requires a restart to take effect.")) :
|
|
105
|
+
( localize(8220, "A setting has changed that requires a reload to take effect.")), isNative ?
|
|
100
106
|
( localize(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
8221,
|
|
108
|
+
"Press the restart button to restart {0} and enable the setting.",
|
|
109
|
+
this.productService.nameLong
|
|
110
|
+
)) :
|
|
105
111
|
( localize(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
( localize(
|
|
111
|
-
( localize(
|
|
112
|
+
8222,
|
|
113
|
+
"Press the reload button to reload {0} and enable the setting.",
|
|
114
|
+
this.productService.nameLong
|
|
115
|
+
)), isNative ?
|
|
116
|
+
( localize(8223, "&&Restart")) :
|
|
117
|
+
( localize(8224, "&&Reload")), () => this.hostService.restart());
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
120
|
async doConfirm(message, detail, primaryButton, confirmedFn) {
|
|
@@ -118,20 +124,18 @@ let SettingsChangeRelauncher = class SettingsChangeRelauncher extends Disposable
|
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
126
|
};
|
|
121
|
-
SettingsChangeRelauncher = SettingsChangeRelauncher_1 = (
|
|
122
|
-
(
|
|
123
|
-
(
|
|
124
|
-
(
|
|
125
|
-
(
|
|
126
|
-
(
|
|
127
|
-
(
|
|
128
|
-
(
|
|
129
|
-
], SettingsChangeRelauncher))
|
|
127
|
+
SettingsChangeRelauncher = SettingsChangeRelauncher_1 = ( __decorate([
|
|
128
|
+
( __param(0, IHostService)),
|
|
129
|
+
( __param(1, IConfigurationService)),
|
|
130
|
+
( __param(2, IUserDataSyncService)),
|
|
131
|
+
( __param(3, IUserDataSyncEnablementService)),
|
|
132
|
+
( __param(4, IUserDataSyncWorkbenchService)),
|
|
133
|
+
( __param(5, IProductService)),
|
|
134
|
+
( __param(6, IDialogService))
|
|
135
|
+
], SettingsChangeRelauncher));
|
|
130
136
|
class ChangeObserver {
|
|
131
137
|
static create(typeName) {
|
|
132
|
-
return (
|
|
133
|
-
(new ChangeObserver(typeName))
|
|
134
|
-
);
|
|
138
|
+
return ( new ChangeObserver(typeName));
|
|
135
139
|
}
|
|
136
140
|
constructor(typeName) {
|
|
137
141
|
this.typeName = typeName;
|
|
@@ -149,7 +153,7 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
149
153
|
constructor(contextService, extensionService, hostService, environmentService) {
|
|
150
154
|
super();
|
|
151
155
|
this.contextService = contextService;
|
|
152
|
-
this.extensionHostRestarter = this._register((
|
|
156
|
+
this.extensionHostRestarter = this._register(( new RunOnceScheduler(async () => {
|
|
153
157
|
if (!!environmentService.extensionTestsLocationURI) {
|
|
154
158
|
return;
|
|
155
159
|
}
|
|
@@ -157,12 +161,12 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
157
161
|
hostService.reload();
|
|
158
162
|
}
|
|
159
163
|
else if (isNative) {
|
|
160
|
-
const stopped = await extensionService.stopExtensionHosts(( localize(
|
|
164
|
+
const stopped = await extensionService.stopExtensionHosts(( localize(8225, "Restarting extension host due to a workspace folder change.")));
|
|
161
165
|
if (stopped) {
|
|
162
166
|
extensionService.startExtensionHosts();
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
|
-
}, 10)))
|
|
169
|
+
}, 10)));
|
|
166
170
|
this.contextService.getCompleteWorkspace()
|
|
167
171
|
.then(workspace => {
|
|
168
172
|
this.firstFolderResource = workspace.folders.length > 0 ? workspace.folders[0].uri : undefined;
|
|
@@ -174,7 +178,7 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
174
178
|
}));
|
|
175
179
|
}
|
|
176
180
|
handleWorkbenchState() {
|
|
177
|
-
if (this.contextService.getWorkbenchState() ===
|
|
181
|
+
if (this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
178
182
|
const workspace = this.contextService.getWorkspace();
|
|
179
183
|
this.firstFolderResource = workspace.folders.length > 0 ? workspace.folders[0].uri : undefined;
|
|
180
184
|
if (!this.onDidChangeWorkspaceFoldersUnbind) {
|
|
@@ -195,14 +199,14 @@ let WorkspaceChangeExtHostRelauncher = class WorkspaceChangeExtHostRelauncher ex
|
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
201
|
};
|
|
198
|
-
WorkspaceChangeExtHostRelauncher = (
|
|
199
|
-
(
|
|
200
|
-
(
|
|
201
|
-
(
|
|
202
|
-
(
|
|
203
|
-
], WorkspaceChangeExtHostRelauncher))
|
|
204
|
-
const workbenchRegistry = (
|
|
205
|
-
workbenchRegistry.registerWorkbenchContribution(SettingsChangeRelauncher,
|
|
206
|
-
workbenchRegistry.registerWorkbenchContribution(WorkspaceChangeExtHostRelauncher,
|
|
202
|
+
WorkspaceChangeExtHostRelauncher = ( __decorate([
|
|
203
|
+
( __param(0, IWorkspaceContextService)),
|
|
204
|
+
( __param(1, IExtensionService)),
|
|
205
|
+
( __param(2, IHostService)),
|
|
206
|
+
( __param(3, IWorkbenchEnvironmentService))
|
|
207
|
+
], WorkspaceChangeExtHostRelauncher));
|
|
208
|
+
const workbenchRegistry = ( Registry.as(Extensions.Workbench));
|
|
209
|
+
workbenchRegistry.registerWorkbenchContribution(SettingsChangeRelauncher, LifecyclePhase.Restored);
|
|
210
|
+
workbenchRegistry.registerWorkbenchContribution(WorkspaceChangeExtHostRelauncher, LifecyclePhase.Restored);
|
|
207
211
|
|
|
208
212
|
export { SettingsChangeRelauncher, WorkspaceChangeExtHostRelauncher };
|