@codingame/monaco-vscode-user-data-profile-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 +2 -2
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +18 -15
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +31 -19
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css +9 -4
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +144 -115
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +16 -10
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +889 -623
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +449 -296
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +6 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +135 -77
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +33 -32
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +33 -34
- package/vscode/src/vs/workbench/services/userDataProfile/browser/mcpProfileResource.js +28 -33
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +42 -40
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +23 -28
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +28 -33
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +209 -153
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +28 -25
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +55 -41
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +20 -9
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +111 -73
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js +20 -15
- package/vscode/src/vs/base/browser/ui/radio/radio.css +0 -69
- package/vscode/src/vs/base/browser/ui/radio/radio.d.ts +0 -37
- package/vscode/src/vs/base/browser/ui/radio/radio.js +0 -72
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-profile-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - user-data-profile 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",
|
|
@@ -18,15 +18,18 @@ let BrowserUserDataProfilesService = class BrowserUserDataProfilesService extend
|
|
|
18
18
|
const added = ( changes.added.map(p => reviveProfile(p, this.profilesHome.scheme)));
|
|
19
19
|
const removed = ( changes.removed.map(p => reviveProfile(p, this.profilesHome.scheme)));
|
|
20
20
|
const updated = ( changes.updated.map(p => reviveProfile(p, this.profilesHome.scheme)));
|
|
21
|
-
this.updateTransientProfiles(
|
|
21
|
+
this.updateTransientProfiles(
|
|
22
|
+
added.filter(a => a.isTransient),
|
|
23
|
+
removed.filter(a => a.isTransient),
|
|
24
|
+
updated.filter(a => a.isTransient)
|
|
25
|
+
);
|
|
22
26
|
this._onDidChangeProfiles.fire({
|
|
23
27
|
added,
|
|
24
28
|
removed,
|
|
25
29
|
updated,
|
|
26
30
|
all: this.profiles
|
|
27
31
|
});
|
|
28
|
-
}
|
|
29
|
-
catch (error) { }
|
|
32
|
+
} catch (error) {}
|
|
30
33
|
}));
|
|
31
34
|
}
|
|
32
35
|
updateTransientProfiles(added, removed, updated) {
|
|
@@ -50,15 +53,18 @@ let BrowserUserDataProfilesService = class BrowserUserDataProfilesService extend
|
|
|
50
53
|
if (value) {
|
|
51
54
|
return revive(JSON.parse(value));
|
|
52
55
|
}
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
56
|
+
} catch (error) {
|
|
55
57
|
this.logService.error(error);
|
|
56
58
|
}
|
|
57
59
|
return [];
|
|
58
60
|
}
|
|
59
61
|
triggerProfilesChanges(added, removed, updated) {
|
|
60
62
|
super.triggerProfilesChanges(added, removed, updated);
|
|
61
|
-
this.changesBroadcastChannel.postData({
|
|
63
|
+
this.changesBroadcastChannel.postData({
|
|
64
|
+
added,
|
|
65
|
+
removed,
|
|
66
|
+
updated
|
|
67
|
+
});
|
|
62
68
|
}
|
|
63
69
|
saveStoredProfiles(storedProfiles) {
|
|
64
70
|
localStorage.setItem(UserDataProfilesService.PROFILES_KEY, JSON.stringify(storedProfiles));
|
|
@@ -69,21 +75,18 @@ let BrowserUserDataProfilesService = class BrowserUserDataProfilesService extend
|
|
|
69
75
|
if (value) {
|
|
70
76
|
return JSON.parse(value);
|
|
71
77
|
}
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
78
|
+
} catch (error) {
|
|
74
79
|
this.logService.error(error);
|
|
75
80
|
}
|
|
76
81
|
return {};
|
|
77
82
|
}
|
|
78
83
|
saveStoredProfileAssociations(storedProfileAssociations) {
|
|
79
|
-
localStorage.setItem(
|
|
84
|
+
localStorage.setItem(
|
|
85
|
+
UserDataProfilesService.PROFILE_ASSOCIATIONS_KEY,
|
|
86
|
+
JSON.stringify(storedProfileAssociations)
|
|
87
|
+
);
|
|
80
88
|
}
|
|
81
89
|
};
|
|
82
|
-
BrowserUserDataProfilesService = ( __decorate([
|
|
83
|
-
( __param(0, IEnvironmentService)),
|
|
84
|
-
( __param(1, IFileService)),
|
|
85
|
-
( __param(2, IUriIdentityService)),
|
|
86
|
-
( __param(3, ILogService))
|
|
87
|
-
], BrowserUserDataProfilesService));
|
|
90
|
+
BrowserUserDataProfilesService = ( __decorate([( __param(0, IEnvironmentService)), ( __param(1, IFileService)), ( __param(2, IUriIdentityService)), ( __param(3, ILogService))], BrowserUserDataProfilesService));
|
|
88
91
|
|
|
89
92
|
export { BrowserUserDataProfilesService };
|
|
@@ -16,10 +16,13 @@ let AbstractUserDataProfileStorageService = class AbstractUserDataProfileStorage
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
async readStorageData(profile) {
|
|
19
|
-
return this.withProfileScopedStorageService(profile, async
|
|
19
|
+
return this.withProfileScopedStorageService(profile, async storageService => this.getItems(storageService));
|
|
20
20
|
}
|
|
21
21
|
async updateStorageData(profile, data, target) {
|
|
22
|
-
return this.withProfileScopedStorageService(
|
|
22
|
+
return this.withProfileScopedStorageService(
|
|
23
|
+
profile,
|
|
24
|
+
async storageService => this.writeItems(storageService, data, target)
|
|
25
|
+
);
|
|
23
26
|
}
|
|
24
27
|
async withProfileScopedStorageService(profile, fn) {
|
|
25
28
|
if (this.storageService.hasScope(profile)) {
|
|
@@ -31,12 +34,10 @@ let AbstractUserDataProfileStorageService = class AbstractUserDataProfileStorage
|
|
|
31
34
|
this.storageServicesMap?.set(profile.id, storageService);
|
|
32
35
|
try {
|
|
33
36
|
await storageService.initialize();
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
37
|
+
} catch (error) {
|
|
36
38
|
if (this.storageServicesMap?.has(profile.id)) {
|
|
37
39
|
this.storageServicesMap.deleteAndDispose(profile.id);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
+
} else {
|
|
40
41
|
storageService.dispose();
|
|
41
42
|
}
|
|
42
43
|
throw error;
|
|
@@ -46,8 +47,7 @@ let AbstractUserDataProfileStorageService = class AbstractUserDataProfileStorage
|
|
|
46
47
|
const result = await fn(storageService);
|
|
47
48
|
await storageService.flush();
|
|
48
49
|
return result;
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
50
|
+
} finally {
|
|
51
51
|
if (!this.storageServicesMap?.has(profile.id)) {
|
|
52
52
|
storageService.dispose();
|
|
53
53
|
}
|
|
@@ -55,9 +55,12 @@ let AbstractUserDataProfileStorageService = class AbstractUserDataProfileStorage
|
|
|
55
55
|
}
|
|
56
56
|
getItems(storageService) {
|
|
57
57
|
const result = ( new Map());
|
|
58
|
-
const populate =
|
|
58
|
+
const populate = target => {
|
|
59
59
|
for (const key of ( storageService.keys(StorageScope.PROFILE, target))) {
|
|
60
|
-
result.set(key, {
|
|
60
|
+
result.set(key, {
|
|
61
|
+
value: storageService.get(key, StorageScope.PROFILE),
|
|
62
|
+
target
|
|
63
|
+
});
|
|
61
64
|
}
|
|
62
65
|
};
|
|
63
66
|
populate(StorageTarget.USER);
|
|
@@ -65,15 +68,20 @@ let AbstractUserDataProfileStorageService = class AbstractUserDataProfileStorage
|
|
|
65
68
|
return result;
|
|
66
69
|
}
|
|
67
70
|
writeItems(storageService, items, target) {
|
|
68
|
-
storageService.storeAll(( Array.from(items.entries()).map(([key, value]) => ({
|
|
71
|
+
storageService.storeAll(( Array.from(items.entries()).map(([key, value]) => ({
|
|
72
|
+
key,
|
|
73
|
+
value,
|
|
74
|
+
scope: StorageScope.PROFILE,
|
|
75
|
+
target
|
|
76
|
+
}))), true);
|
|
69
77
|
}
|
|
70
78
|
};
|
|
71
|
-
AbstractUserDataProfileStorageService = ( __decorate([
|
|
72
|
-
( __param(1, IStorageService))
|
|
73
|
-
], AbstractUserDataProfileStorageService));
|
|
79
|
+
AbstractUserDataProfileStorageService = ( __decorate([( __param(1, IStorageService))], AbstractUserDataProfileStorageService));
|
|
74
80
|
class StorageService extends AbstractStorageService {
|
|
75
81
|
constructor(profileStorageDatabase) {
|
|
76
|
-
super({
|
|
82
|
+
super({
|
|
83
|
+
flushInterval: 100
|
|
84
|
+
});
|
|
77
85
|
this.profileStorageDatabase = profileStorageDatabase;
|
|
78
86
|
}
|
|
79
87
|
async doInitialize() {
|
|
@@ -95,10 +103,14 @@ class StorageService extends AbstractStorageService {
|
|
|
95
103
|
getStorage(scope) {
|
|
96
104
|
return scope === StorageScope.PROFILE ? this.profileStorage : undefined;
|
|
97
105
|
}
|
|
98
|
-
getLogDetails() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
getLogDetails() {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
async switchToProfile() {}
|
|
110
|
+
async switchToWorkspace() {}
|
|
111
|
+
hasScope() {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
export { AbstractUserDataProfileStorageService };
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css
CHANGED
|
@@ -106,13 +106,19 @@
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.profiles-editor .contents-container .profile-header .profile-title-container {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: baseline;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.profiles-editor .contents-container .profile-header .profile-title-container .profile-title {
|
|
109
114
|
font-size: 26px;
|
|
110
115
|
font-weight: 600;
|
|
111
116
|
}
|
|
112
117
|
|
|
113
|
-
.profiles-editor .contents-container .profile-title-container .
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
.profiles-editor .contents-container .profile-header .profile-title-container .profile-built-in-label {
|
|
119
|
+
font-size: 16px;
|
|
120
|
+
font-style: italic;
|
|
121
|
+
margin-left: 10px;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
.profiles-editor .contents-container .profile-header .profile-actions-container .actions-container .action-label {
|
|
@@ -365,7 +371,6 @@
|
|
|
365
371
|
|
|
366
372
|
.profiles-editor .contents-container .profile-body .profile-row-container .profile-workspaces-button-container .monaco-button {
|
|
367
373
|
width: inherit;
|
|
368
|
-
padding: 2px 14px;
|
|
369
374
|
}
|
|
370
375
|
|
|
371
376
|
/* Profile Editor Tree Theming */
|