@codingame/monaco-vscode-user-data-profile-service-override 13.1.7 → 14.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 +15 -14
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +24 -24
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +80 -80
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +28 -30
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.d.ts +2 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +10 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +40 -40
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.d.ts +1 -15
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +14 -22
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.d.ts +1 -1
package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
4
4
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
5
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
6
6
|
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
7
|
-
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
8
7
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
9
8
|
import { IUserDataProfile, IUserDataProfileOptions, IUserDataProfileUpdateOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
10
9
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
@@ -15,18 +14,6 @@ import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/s
|
|
|
15
14
|
import { IProfileTemplateInfo } from "@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile";
|
|
16
15
|
import { IUserDataProfileManagementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
17
16
|
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
18
|
-
export type ProfileManagementActionExecutedClassification = {
|
|
19
|
-
owner: "sandy081";
|
|
20
|
-
comment: "Logged when profile management action is excuted";
|
|
21
|
-
id: {
|
|
22
|
-
classification: "SystemMetaData";
|
|
23
|
-
purpose: "FeatureInsight";
|
|
24
|
-
comment: "The identifier of the action that was run.";
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export type ProfileManagementActionExecutedEvent = {
|
|
28
|
-
id: string;
|
|
29
|
-
};
|
|
30
17
|
export declare class UserDataProfileManagementService extends Disposable implements IUserDataProfileManagementService {
|
|
31
18
|
private readonly userDataProfilesService;
|
|
32
19
|
private readonly userDataProfileService;
|
|
@@ -35,14 +22,13 @@ export declare class UserDataProfileManagementService extends Disposable impleme
|
|
|
35
22
|
private readonly workspaceContextService;
|
|
36
23
|
private readonly extensionService;
|
|
37
24
|
private readonly environmentService;
|
|
38
|
-
private readonly telemetryService;
|
|
39
25
|
private readonly productService;
|
|
40
26
|
private readonly requestService;
|
|
41
27
|
private readonly configurationService;
|
|
42
28
|
private readonly uriIdentityService;
|
|
43
29
|
private readonly logService;
|
|
44
30
|
readonly _serviceBrand: undefined;
|
|
45
|
-
constructor(userDataProfilesService: IUserDataProfilesService, userDataProfileService: IUserDataProfileService, hostService: IHostService, dialogService: IDialogService, workspaceContextService: IWorkspaceContextService, extensionService: IExtensionService, environmentService: IWorkbenchEnvironmentService,
|
|
31
|
+
constructor(userDataProfilesService: IUserDataProfilesService, userDataProfileService: IUserDataProfileService, hostService: IHostService, dialogService: IDialogService, workspaceContextService: IWorkspaceContextService, extensionService: IExtensionService, environmentService: IWorkbenchEnvironmentService, productService: IProductService, requestService: IRequestService, configurationService: IConfigurationService, uriIdentityService: IUriIdentityService, logService: ILogService);
|
|
46
32
|
private onDidChangeCurrentProfile;
|
|
47
33
|
private getWorkspaceUri;
|
|
48
34
|
private getProfileToUseForCurrentWorkspace;
|
package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js
CHANGED
|
@@ -12,7 +12,6 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
12
12
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
13
13
|
import { asJson } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
|
|
14
14
|
import { IRequestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service';
|
|
15
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
16
15
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
17
16
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
18
17
|
import { toWorkspaceIdentifier, isEmptyWorkspaceIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
@@ -24,7 +23,7 @@ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/s
|
|
|
24
23
|
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
25
24
|
|
|
26
25
|
let UserDataProfileManagementService = class UserDataProfileManagementService extends Disposable {
|
|
27
|
-
constructor(userDataProfilesService, userDataProfileService, hostService, dialogService, workspaceContextService, extensionService, environmentService,
|
|
26
|
+
constructor(userDataProfilesService, userDataProfileService, hostService, dialogService, workspaceContextService, extensionService, environmentService, productService, requestService, configurationService, uriIdentityService, logService) {
|
|
28
27
|
super();
|
|
29
28
|
this.userDataProfilesService = userDataProfilesService;
|
|
30
29
|
this.userDataProfileService = userDataProfileService;
|
|
@@ -33,7 +32,6 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
33
32
|
this.workspaceContextService = workspaceContextService;
|
|
34
33
|
this.extensionService = extensionService;
|
|
35
34
|
this.environmentService = environmentService;
|
|
36
|
-
this.telemetryService = telemetryService;
|
|
37
35
|
this.productService = productService;
|
|
38
36
|
this.requestService = requestService;
|
|
39
37
|
this.configurationService = configurationService;
|
|
@@ -45,7 +43,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
45
43
|
const profileToUse = this.getProfileToUseForCurrentWorkspace();
|
|
46
44
|
this.switchProfile(profileToUse);
|
|
47
45
|
this.changeCurrentProfile(profileToUse, ( localize(
|
|
48
|
-
|
|
46
|
+
12254,
|
|
49
47
|
"The current profile has been removed. Please reload to switch back to default profile"
|
|
50
48
|
)));
|
|
51
49
|
return;
|
|
@@ -56,13 +54,13 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
56
54
|
if (profileToUse?.id !== updatedCurrentProfile.id) {
|
|
57
55
|
this.switchProfile(profileToUse);
|
|
58
56
|
this.changeCurrentProfile(profileToUse, ( localize(
|
|
59
|
-
|
|
57
|
+
12255,
|
|
60
58
|
"The current workspace has been removed from the current profile. Please reload to switch back to the updated profile"
|
|
61
59
|
)));
|
|
62
60
|
}
|
|
63
61
|
else {
|
|
64
62
|
this.changeCurrentProfile(updatedCurrentProfile, ( localize(
|
|
65
|
-
|
|
63
|
+
12256,
|
|
66
64
|
"The current profile has been updated. Please reload to switch back to the updated profile"
|
|
67
65
|
)));
|
|
68
66
|
}
|
|
@@ -110,13 +108,11 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
110
108
|
async createAndEnterProfile(name, options) {
|
|
111
109
|
const profile = await this.userDataProfilesService.createNamedProfile(name, options, toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()));
|
|
112
110
|
await this.changeCurrentProfile(profile);
|
|
113
|
-
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'createAndEnterProfile' });
|
|
114
111
|
return profile;
|
|
115
112
|
}
|
|
116
113
|
async createAndEnterTransientProfile() {
|
|
117
114
|
const profile = await this.userDataProfilesService.createTransientProfile(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()));
|
|
118
115
|
await this.changeCurrentProfile(profile);
|
|
119
|
-
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'createAndEnterTransientProfile' });
|
|
120
116
|
return profile;
|
|
121
117
|
}
|
|
122
118
|
async updateProfile(profile, updateOptions) {
|
|
@@ -124,10 +120,9 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
124
120
|
throw ( new Error(`Profile ${profile.name} does not exist`));
|
|
125
121
|
}
|
|
126
122
|
if (profile.isDefault) {
|
|
127
|
-
throw ( new Error(( localize(
|
|
123
|
+
throw ( new Error(( localize(12257, "Cannot rename the default profile"))));
|
|
128
124
|
}
|
|
129
125
|
const updatedProfile = await this.userDataProfilesService.updateProfile(profile, updateOptions);
|
|
130
|
-
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'updateProfile' });
|
|
131
126
|
return updatedProfile;
|
|
132
127
|
}
|
|
133
128
|
async removeProfile(profile) {
|
|
@@ -135,10 +130,9 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
135
130
|
throw ( new Error(`Profile ${profile.name} does not exist`));
|
|
136
131
|
}
|
|
137
132
|
if (profile.isDefault) {
|
|
138
|
-
throw ( new Error(( localize(
|
|
133
|
+
throw ( new Error(( localize(12258, "Cannot delete the default profile"))));
|
|
139
134
|
}
|
|
140
135
|
await this.userDataProfilesService.removeProfile(profile);
|
|
141
|
-
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'removeProfile' });
|
|
142
136
|
}
|
|
143
137
|
async switchProfile(profile) {
|
|
144
138
|
if (!( this.userDataProfilesService.profiles.some(p => p.id === profile.id))) {
|
|
@@ -153,7 +147,6 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
153
147
|
}
|
|
154
148
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
|
|
155
149
|
await this.userDataProfilesService.setProfileForWorkspace(workspaceIdentifier, profile);
|
|
156
|
-
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'switchProfile' });
|
|
157
150
|
if (isEmptyWorkspaceIdentifier(workspaceIdentifier)) {
|
|
158
151
|
await this.changeCurrentProfile(profile);
|
|
159
152
|
}
|
|
@@ -180,7 +173,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
180
173
|
const shouldRestartExtensionHosts = this.userDataProfileService.currentProfile.id !== profile.id || !equals(this.userDataProfileService.currentProfile.useDefaultFlags, profile.useDefaultFlags);
|
|
181
174
|
if (shouldRestartExtensionHosts) {
|
|
182
175
|
if (!isRemoteWindow) {
|
|
183
|
-
if (!(await this.extensionService.stopExtensionHosts(( localize(
|
|
176
|
+
if (!(await this.extensionService.stopExtensionHosts(( localize(12259, "Switching to a profile"))))) {
|
|
184
177
|
if (( this.userDataProfilesService.profiles.some(p => p.id === this.userDataProfileService.currentProfile.id))) {
|
|
185
178
|
await this.userDataProfilesService.setProfileForWorkspace(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()), this.userDataProfileService.currentProfile);
|
|
186
179
|
}
|
|
@@ -192,8 +185,8 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
192
185
|
if (shouldRestartExtensionHosts) {
|
|
193
186
|
if (isRemoteWindow) {
|
|
194
187
|
const { confirmed } = await this.dialogService.confirm({
|
|
195
|
-
message: reloadMessage ?? ( localize(
|
|
196
|
-
primaryButton: ( localize(
|
|
188
|
+
message: reloadMessage ?? ( localize(12260, "Switching a profile requires reloading VS Code.")),
|
|
189
|
+
primaryButton: ( localize(12261, "&&Reload")),
|
|
197
190
|
});
|
|
198
191
|
if (confirmed) {
|
|
199
192
|
await this.hostService.reload();
|
|
@@ -213,12 +206,11 @@ UserDataProfileManagementService = ( __decorate([
|
|
|
213
206
|
( __param(4, IWorkspaceContextService)),
|
|
214
207
|
( __param(5, IExtensionService)),
|
|
215
208
|
( __param(6, IWorkbenchEnvironmentService)),
|
|
216
|
-
( __param(7,
|
|
217
|
-
( __param(8,
|
|
218
|
-
( __param(9,
|
|
219
|
-
( __param(10,
|
|
220
|
-
( __param(11,
|
|
221
|
-
( __param(12, ILogService))
|
|
209
|
+
( __param(7, IProductService)),
|
|
210
|
+
( __param(8, IRequestService)),
|
|
211
|
+
( __param(9, IConfigurationService)),
|
|
212
|
+
( __param(10, IUriIdentityService)),
|
|
213
|
+
( __param(11, ILogService))
|
|
222
214
|
], UserDataProfileManagementService));
|
|
223
215
|
|
|
224
216
|
export { UserDataProfileManagementService };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
2
2
|
import { IUserDataSyncUtilService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync.service";
|
|
3
3
|
import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
|
|
4
|
-
import { FormattingOptions } from "@codingame/monaco-vscode-
|
|
4
|
+
import { FormattingOptions } from "@codingame/monaco-vscode-407531d3-fdae-5387-8c41-49ba0e9574b5-common/vscode/vs/base/common/jsonFormatter";
|
|
5
5
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
6
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
7
7
|
import { ITextResourcePropertiesService, ITextResourceConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration";
|