@codingame/monaco-vscode-user-data-profile-service-override 9.0.3 → 10.0.0
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/_virtual/semver.js +5 -0
- package/package.json +2 -2
- package/userDataProfile.js +10 -5
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +10 -8
- package/vscode/src/vs/platform/userDataSync/common/extensionsMerge.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +20 -20
- package/vscode/src/vs/platform/userDataSync/common/globalStateSync.js +25 -26
- package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +27 -28
- package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +21 -24
- package/vscode/src/vs/platform/userDataSync/common/snippetsSync.js +40 -40
- package/vscode/src/vs/platform/userDataSync/common/tasksSync.js +14 -14
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +26 -24
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +577 -138
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +242 -103
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +1 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +11 -11
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +9 -11
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +5 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +7 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +5 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +5 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +44 -46
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +7 -9
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +75 -34
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +3 -4
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +13 -15
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js +0 -1
|
@@ -3,13 +3,10 @@ import { distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
3
3
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
4
4
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
5
5
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
6
|
-
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
7
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
7
|
import { ConfigurationModelParser } from 'vscode/vscode/vs/platform/configuration/common/configurationModels';
|
|
9
8
|
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
|
|
10
9
|
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
11
|
-
import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
12
|
-
import { FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
13
10
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
14
11
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
15
12
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
@@ -17,7 +14,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
|
|
|
17
14
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
18
15
|
import { AbstractJsonFileSynchroniser, AbstractInitializer } from 'vscode/vscode/vs/platform/userDataSync/common/abstractSynchronizer';
|
|
19
16
|
import { merge, updateIgnoredSettings, isEmpty, getIgnoredSettings } from 'vscode/vscode/vs/platform/userDataSync/common/settingsMerge';
|
|
20
|
-
import {
|
|
17
|
+
import { USER_DATA_SYNC_SCHEME, USER_DATA_SYNC_CONFIGURATION_SCOPE, getIgnoredSettingsForExtension, UserDataSyncError } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
21
18
|
import { IUserDataSyncStoreService, IUserDataSyncLocalStoreService, IUserDataSyncLogService, IUserDataSyncUtilService, IUserDataSyncEnablementService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
22
19
|
|
|
23
20
|
function isSettingsSyncContent(thing) {
|
|
@@ -31,7 +28,7 @@ function parseSettingsSyncContent(syncContent) {
|
|
|
31
28
|
}
|
|
32
29
|
let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSynchroniser {
|
|
33
30
|
constructor(profile, collection, fileService, environmentService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, logService, userDataSyncUtilService, configurationService, userDataSyncEnablementService, telemetryService, extensionManagementService, uriIdentityService) {
|
|
34
|
-
super(profile.settingsResource, { syncResource:
|
|
31
|
+
super(profile.settingsResource, { syncResource: "settings" , profile }, collection, fileService, environmentService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, userDataSyncEnablementService, telemetryService, logService, userDataSyncUtilService, configurationService, uriIdentityService);
|
|
35
32
|
this.profile = profile;
|
|
36
33
|
this.extensionManagementService = extensionManagementService;
|
|
37
34
|
this.version = 2;
|
|
@@ -86,8 +83,8 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
86
83
|
const baseContent = lastSettingsSyncContent?.settings ?? null;
|
|
87
84
|
const previewResult = {
|
|
88
85
|
content: hasConflicts ? baseContent : mergedContent,
|
|
89
|
-
localChange: hasLocalChanged ?
|
|
90
|
-
remoteChange: hasRemoteChanged ?
|
|
86
|
+
localChange: hasLocalChanged ? 2 : 0 ,
|
|
87
|
+
remoteChange: hasRemoteChanged ? 2 : 0 ,
|
|
91
88
|
hasConflicts
|
|
92
89
|
};
|
|
93
90
|
return [{
|
|
@@ -131,15 +128,15 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
131
128
|
if (this.extUri.isEqual(resource, this.localResource)) {
|
|
132
129
|
return {
|
|
133
130
|
content: resourcePreview.fileContent ? updateIgnoredSettings(( resourcePreview.fileContent.value.toString()), '{}', ignoredSettings, formattingOptions) : null,
|
|
134
|
-
localChange:
|
|
135
|
-
remoteChange:
|
|
131
|
+
localChange: 0 ,
|
|
132
|
+
remoteChange: 2 ,
|
|
136
133
|
};
|
|
137
134
|
}
|
|
138
135
|
if (this.extUri.isEqual(resource, this.remoteResource)) {
|
|
139
136
|
return {
|
|
140
137
|
content: resourcePreview.remoteContent !== null ? updateIgnoredSettings(resourcePreview.remoteContent, resourcePreview.fileContent ? ( resourcePreview.fileContent.value.toString()) : '{}', ignoredSettings, formattingOptions) : null,
|
|
141
|
-
localChange:
|
|
142
|
-
remoteChange:
|
|
138
|
+
localChange: 2 ,
|
|
139
|
+
remoteChange: 0 ,
|
|
143
140
|
};
|
|
144
141
|
}
|
|
145
142
|
if (this.extUri.isEqual(resource, this.previewResource)) {
|
|
@@ -153,8 +150,8 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
153
150
|
else {
|
|
154
151
|
return {
|
|
155
152
|
content: content !== null ? updateIgnoredSettings(content, resourcePreview.fileContent ? ( resourcePreview.fileContent.value.toString()) : '{}', ignoredSettings, formattingOptions) : null,
|
|
156
|
-
localChange:
|
|
157
|
-
remoteChange:
|
|
153
|
+
localChange: 2 ,
|
|
154
|
+
remoteChange: 2 ,
|
|
158
155
|
};
|
|
159
156
|
}
|
|
160
157
|
}
|
|
@@ -163,22 +160,22 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
163
160
|
async applyResult(remoteUserData, lastSyncUserData, resourcePreviews, force) {
|
|
164
161
|
const { fileContent } = resourcePreviews[0][0];
|
|
165
162
|
let { content, localChange, remoteChange } = resourcePreviews[0][1];
|
|
166
|
-
if (localChange ===
|
|
163
|
+
if (localChange === 0 && remoteChange === 0 ) {
|
|
167
164
|
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing settings.`);
|
|
168
165
|
}
|
|
169
166
|
content = content ? content.trim() : '{}';
|
|
170
167
|
content = content || '{}';
|
|
171
168
|
this.validateContent(content);
|
|
172
|
-
if (localChange !==
|
|
169
|
+
if (localChange !== 0 ) {
|
|
173
170
|
this.logService.trace(`${this.syncResourceLogLabel}: Updating local settings...`);
|
|
174
171
|
if (fileContent) {
|
|
175
172
|
await this.backupLocal(JSON.stringify(this.toSettingsSyncContent(( fileContent.value.toString()))));
|
|
176
173
|
}
|
|
177
174
|
await this.updateLocalFileContent(content, fileContent, force);
|
|
178
|
-
await this.configurationService.reloadConfiguration(
|
|
175
|
+
await this.configurationService.reloadConfiguration(3 );
|
|
179
176
|
this.logService.info(`${this.syncResourceLogLabel}: Updated local settings`);
|
|
180
177
|
}
|
|
181
|
-
if (remoteChange !==
|
|
178
|
+
if (remoteChange !== 0 ) {
|
|
182
179
|
const formatUtils = await this.getFormattingOptions();
|
|
183
180
|
const remoteSettingsSyncContent = this.getSettingsSyncContent(remoteUserData);
|
|
184
181
|
const ignoredSettings = await this.getIgnoredSettings(content);
|
|
@@ -205,7 +202,7 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
204
|
catch (error) {
|
|
208
|
-
if (error.fileOperationResult !==
|
|
205
|
+
if (error.fileOperationResult !== 1 ) {
|
|
209
206
|
return true;
|
|
210
207
|
}
|
|
211
208
|
}
|
|
@@ -262,19 +259,19 @@ let SettingsSynchroniser = class SettingsSynchroniser extends AbstractJsonFileSy
|
|
|
262
259
|
return getIgnoredSettings(defaultIgnoredSettings, this.configurationService, content);
|
|
263
260
|
}
|
|
264
261
|
async getIgnoredSettingForSystemExtensions() {
|
|
265
|
-
const systemExtensions = await this.extensionManagementService.getInstalled(
|
|
262
|
+
const systemExtensions = await this.extensionManagementService.getInstalled(0 );
|
|
266
263
|
return distinct(( systemExtensions.map(e => getIgnoredSettingsForExtension(e.manifest))).flat());
|
|
267
264
|
}
|
|
268
265
|
async getIgnoredSettingForUserExtensions() {
|
|
269
|
-
const userExtensions = await this.extensionManagementService.getInstalled(
|
|
266
|
+
const userExtensions = await this.extensionManagementService.getInstalled(1 , this.profile.extensionsResource);
|
|
270
267
|
return distinct(( userExtensions.map(e => getIgnoredSettingsForExtension(e.manifest))).flat());
|
|
271
268
|
}
|
|
272
269
|
validateContent(content) {
|
|
273
270
|
if (this.hasErrors(content, false)) {
|
|
274
271
|
throw ( new UserDataSyncError(localize(
|
|
275
|
-
|
|
272
|
+
8565,
|
|
276
273
|
"Unable to sync settings as there are errors/warning in settings file."
|
|
277
|
-
),
|
|
274
|
+
), "LocalInvalidContent" , this.resource));
|
|
278
275
|
}
|
|
279
276
|
}
|
|
280
277
|
};
|
|
@@ -294,7 +291,7 @@ SettingsSynchroniser = ( __decorate([
|
|
|
294
291
|
], SettingsSynchroniser));
|
|
295
292
|
let SettingsInitializer = class SettingsInitializer extends AbstractInitializer {
|
|
296
293
|
constructor(fileService, userDataProfilesService, environmentService, logService, storageService, uriIdentityService) {
|
|
297
|
-
super(
|
|
294
|
+
super("settings" , userDataProfilesService, environmentService, logService, fileService, storageService, uriIdentityService);
|
|
298
295
|
}
|
|
299
296
|
async doInitialize(remoteUserData) {
|
|
300
297
|
const settingsSyncContent = remoteUserData.syncData ? this.parseSettingsSyncContent(remoteUserData.syncData.content) : null;
|
|
@@ -316,7 +313,7 @@ let SettingsInitializer = class SettingsInitializer extends AbstractInitializer
|
|
|
316
313
|
return isEmpty(( fileContent.value.toString()).trim());
|
|
317
314
|
}
|
|
318
315
|
catch (error) {
|
|
319
|
-
return error.fileOperationResult ===
|
|
316
|
+
return error.fileOperationResult === 1 ;
|
|
320
317
|
}
|
|
321
318
|
}
|
|
322
319
|
parseSettingsSyncContent(syncContent) {
|
|
@@ -4,7 +4,7 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
4
4
|
import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
5
5
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
6
|
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
|
|
7
|
-
import { FileOperationError
|
|
7
|
+
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
8
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
9
9
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
10
10
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
@@ -12,7 +12,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
|
|
|
12
12
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
13
13
|
import { AbstractSynchroniser, AbstractInitializer } from 'vscode/vscode/vs/platform/userDataSync/common/abstractSynchronizer';
|
|
14
14
|
import { merge, areSame } from './snippetsMerge.js';
|
|
15
|
-
import {
|
|
15
|
+
import { USER_DATA_SYNC_SCHEME } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
16
16
|
import { IUserDataSyncStoreService, IUserDataSyncLocalStoreService, IUserDataSyncLogService, IUserDataSyncEnablementService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
17
17
|
|
|
18
18
|
function parseSnippets(syncData) {
|
|
@@ -20,7 +20,7 @@ function parseSnippets(syncData) {
|
|
|
20
20
|
}
|
|
21
21
|
let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchroniser {
|
|
22
22
|
constructor(profile, collection, environmentService, fileService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, logService, configurationService, userDataSyncEnablementService, telemetryService, uriIdentityService) {
|
|
23
|
-
super({ syncResource:
|
|
23
|
+
super({ syncResource: "snippets" , profile }, collection, fileService, environmentService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, userDataSyncEnablementService, telemetryService, logService, configurationService, uriIdentityService);
|
|
24
24
|
this.version = 1;
|
|
25
25
|
this.snippetsFolder = profile.snippetsHome;
|
|
26
26
|
this._register(this.fileService.watch(environmentService.userRoamingDataHome));
|
|
@@ -59,19 +59,19 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
59
59
|
if (this.extUri.isEqualOrParent(resource, this.syncPreviewFolder.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'local' }))) {
|
|
60
60
|
return {
|
|
61
61
|
content: resourcePreview.fileContent ? ( resourcePreview.fileContent.value.toString()) : null,
|
|
62
|
-
localChange:
|
|
62
|
+
localChange: 0 ,
|
|
63
63
|
remoteChange: resourcePreview.fileContent
|
|
64
|
-
? resourcePreview.remoteContent !== null ?
|
|
65
|
-
:
|
|
64
|
+
? resourcePreview.remoteContent !== null ? 2 : 1
|
|
65
|
+
: 3
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
if (this.extUri.isEqualOrParent(resource, this.syncPreviewFolder.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'remote' }))) {
|
|
69
69
|
return {
|
|
70
70
|
content: resourcePreview.remoteContent,
|
|
71
71
|
localChange: resourcePreview.remoteContent !== null
|
|
72
|
-
? resourcePreview.fileContent ?
|
|
73
|
-
:
|
|
74
|
-
remoteChange:
|
|
72
|
+
? resourcePreview.fileContent ? 2 : 1
|
|
73
|
+
: 3 ,
|
|
74
|
+
remoteChange: 0 ,
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
if (this.extUri.isEqualOrParent(resource, this.syncPreviewFolder)) {
|
|
@@ -86,11 +86,11 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
86
86
|
return {
|
|
87
87
|
content,
|
|
88
88
|
localChange: content === null
|
|
89
|
-
? resourcePreview.fileContent !== null ?
|
|
90
|
-
:
|
|
89
|
+
? resourcePreview.fileContent !== null ? 3 : 0
|
|
90
|
+
: 2 ,
|
|
91
91
|
remoteChange: content === null
|
|
92
|
-
? resourcePreview.remoteContent !== null ?
|
|
93
|
-
:
|
|
92
|
+
? resourcePreview.remoteContent !== null ? 3 : 0
|
|
93
|
+
: 2
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -100,14 +100,14 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
100
100
|
const accptedResourcePreviews = ( resourcePreviews.map(
|
|
101
101
|
([resourcePreview, acceptResult]) => ({ ...resourcePreview, acceptResult })
|
|
102
102
|
));
|
|
103
|
-
if (accptedResourcePreviews.every(({ localChange, remoteChange }) => localChange ===
|
|
103
|
+
if (accptedResourcePreviews.every(({ localChange, remoteChange }) => localChange === 0 && remoteChange === 0 )) {
|
|
104
104
|
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing snippets.`);
|
|
105
105
|
}
|
|
106
|
-
if (( accptedResourcePreviews.some(({ localChange }) => localChange !==
|
|
106
|
+
if (( accptedResourcePreviews.some(({ localChange }) => localChange !== 0 ))) {
|
|
107
107
|
await this.updateLocalBackup(accptedResourcePreviews);
|
|
108
108
|
await this.updateLocalSnippets(accptedResourcePreviews, force);
|
|
109
109
|
}
|
|
110
|
-
if (( accptedResourcePreviews.some(({ remoteChange }) => remoteChange !==
|
|
110
|
+
if (( accptedResourcePreviews.some(({ remoteChange }) => remoteChange !== 0 ))) {
|
|
111
111
|
remoteUserData = await this.updateRemoteSnippets(accptedResourcePreviews, remoteUserData, force);
|
|
112
112
|
}
|
|
113
113
|
if (lastSyncUserData?.ref !== remoteUserData.ref) {
|
|
@@ -128,8 +128,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
128
128
|
const previewResult = {
|
|
129
129
|
content: snippetsMergeResult.local.added[key],
|
|
130
130
|
hasConflicts: false,
|
|
131
|
-
localChange:
|
|
132
|
-
remoteChange:
|
|
131
|
+
localChange: 1 ,
|
|
132
|
+
remoteChange: 0 ,
|
|
133
133
|
};
|
|
134
134
|
resourcePreviews.set(key, {
|
|
135
135
|
baseResource: this.extUri.joinPath(this.syncPreviewFolder, key).with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'base' }),
|
|
@@ -150,8 +150,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
150
150
|
const previewResult = {
|
|
151
151
|
content: snippetsMergeResult.local.updated[key],
|
|
152
152
|
hasConflicts: false,
|
|
153
|
-
localChange:
|
|
154
|
-
remoteChange:
|
|
153
|
+
localChange: 2 ,
|
|
154
|
+
remoteChange: 0 ,
|
|
155
155
|
};
|
|
156
156
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
157
157
|
resourcePreviews.set(key, {
|
|
@@ -173,8 +173,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
173
173
|
const previewResult = {
|
|
174
174
|
content: null,
|
|
175
175
|
hasConflicts: false,
|
|
176
|
-
localChange:
|
|
177
|
-
remoteChange:
|
|
176
|
+
localChange: 3 ,
|
|
177
|
+
remoteChange: 0 ,
|
|
178
178
|
};
|
|
179
179
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
180
180
|
resourcePreviews.set(key, {
|
|
@@ -196,8 +196,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
196
196
|
const previewResult = {
|
|
197
197
|
content: snippetsMergeResult.remote.added[key],
|
|
198
198
|
hasConflicts: false,
|
|
199
|
-
localChange:
|
|
200
|
-
remoteChange:
|
|
199
|
+
localChange: 0 ,
|
|
200
|
+
remoteChange: 1 ,
|
|
201
201
|
};
|
|
202
202
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
203
203
|
resourcePreviews.set(key, {
|
|
@@ -219,8 +219,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
219
219
|
const previewResult = {
|
|
220
220
|
content: snippetsMergeResult.remote.updated[key],
|
|
221
221
|
hasConflicts: false,
|
|
222
|
-
localChange:
|
|
223
|
-
remoteChange:
|
|
222
|
+
localChange: 0 ,
|
|
223
|
+
remoteChange: 2 ,
|
|
224
224
|
};
|
|
225
225
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
226
226
|
resourcePreviews.set(key, {
|
|
@@ -242,8 +242,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
242
242
|
const previewResult = {
|
|
243
243
|
content: null,
|
|
244
244
|
hasConflicts: false,
|
|
245
|
-
localChange:
|
|
246
|
-
remoteChange:
|
|
245
|
+
localChange: 0 ,
|
|
246
|
+
remoteChange: 3 ,
|
|
247
247
|
};
|
|
248
248
|
resourcePreviews.set(key, {
|
|
249
249
|
baseResource: this.extUri.joinPath(this.syncPreviewFolder, key).with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'base' }),
|
|
@@ -264,8 +264,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
264
264
|
const previewResult = {
|
|
265
265
|
content: baseSnippets[key] ?? null,
|
|
266
266
|
hasConflicts: true,
|
|
267
|
-
localChange: localFileContent[key] ?
|
|
268
|
-
remoteChange: remoteSnippets[key] ?
|
|
267
|
+
localChange: localFileContent[key] ? 2 : 1 ,
|
|
268
|
+
remoteChange: remoteSnippets[key] ? 2 : 1
|
|
269
269
|
};
|
|
270
270
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
271
271
|
resourcePreviews.set(key, {
|
|
@@ -288,8 +288,8 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
288
288
|
const previewResult = {
|
|
289
289
|
content: localFileContent[key] ? ( localFileContent[key].value.toString()) : null,
|
|
290
290
|
hasConflicts: false,
|
|
291
|
-
localChange:
|
|
292
|
-
remoteChange:
|
|
291
|
+
localChange: 0 ,
|
|
292
|
+
remoteChange: 0
|
|
293
293
|
};
|
|
294
294
|
const localContent = localFileContent[key] ? ( localFileContent[key].value.toString()) : null;
|
|
295
295
|
resourcePreviews.set(key, {
|
|
@@ -341,15 +341,15 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
341
341
|
}
|
|
342
342
|
async updateLocalSnippets(resourcePreviews, force) {
|
|
343
343
|
for (const { fileContent, acceptResult, localResource, remoteResource, localChange } of resourcePreviews) {
|
|
344
|
-
if (localChange !==
|
|
344
|
+
if (localChange !== 0 ) {
|
|
345
345
|
const key = remoteResource ? this.extUri.basename(remoteResource) : this.extUri.basename(localResource);
|
|
346
346
|
const resource = this.extUri.joinPath(this.snippetsFolder, key);
|
|
347
|
-
if (localChange ===
|
|
347
|
+
if (localChange === 3 ) {
|
|
348
348
|
this.logService.trace(`${this.syncResourceLogLabel}: Deleting snippet...`, this.extUri.basename(resource));
|
|
349
349
|
await this.fileService.del(resource);
|
|
350
350
|
this.logService.info(`${this.syncResourceLogLabel}: Deleted snippet`, this.extUri.basename(resource));
|
|
351
351
|
}
|
|
352
|
-
else if (localChange ===
|
|
352
|
+
else if (localChange === 1 ) {
|
|
353
353
|
this.logService.trace(`${this.syncResourceLogLabel}: Creating snippet...`, this.extUri.basename(resource));
|
|
354
354
|
await this.fileService.createFile(resource, VSBuffer.fromString(acceptResult.content), { overwrite: force });
|
|
355
355
|
this.logService.info(`${this.syncResourceLogLabel}: Created snippet`, this.extUri.basename(resource));
|
|
@@ -366,9 +366,9 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
366
366
|
const currentSnippets = remoteUserData.syncData ? this.parseSnippets(remoteUserData.syncData) : {};
|
|
367
367
|
const newSnippets = deepClone(currentSnippets);
|
|
368
368
|
for (const { acceptResult, localResource, remoteResource, remoteChange } of resourcePreviews) {
|
|
369
|
-
if (remoteChange !==
|
|
369
|
+
if (remoteChange !== 0 ) {
|
|
370
370
|
const key = localResource ? this.extUri.basename(localResource) : this.extUri.basename(remoteResource);
|
|
371
|
-
if (remoteChange ===
|
|
371
|
+
if (remoteChange === 3 ) {
|
|
372
372
|
delete newSnippets[key];
|
|
373
373
|
}
|
|
374
374
|
else {
|
|
@@ -400,7 +400,7 @@ let SnippetsSynchroniser = class SnippetsSynchroniser extends AbstractSynchronis
|
|
|
400
400
|
stat = await this.fileService.resolve(this.snippetsFolder);
|
|
401
401
|
}
|
|
402
402
|
catch (e) {
|
|
403
|
-
if (e instanceof FileOperationError && e.fileOperationResult ===
|
|
403
|
+
if (e instanceof FileOperationError && e.fileOperationResult === 1 ) {
|
|
404
404
|
return snippets;
|
|
405
405
|
}
|
|
406
406
|
else {
|
|
@@ -433,7 +433,7 @@ SnippetsSynchroniser = ( __decorate([
|
|
|
433
433
|
], SnippetsSynchroniser));
|
|
434
434
|
let SnippetsInitializer = class SnippetsInitializer extends AbstractInitializer {
|
|
435
435
|
constructor(fileService, userDataProfilesService, environmentService, logService, storageService, uriIdentityService) {
|
|
436
|
-
super(
|
|
436
|
+
super("snippets" , userDataProfilesService, environmentService, logService, fileService, storageService, uriIdentityService);
|
|
437
437
|
}
|
|
438
438
|
async doInitialize(remoteUserData) {
|
|
439
439
|
const remoteSnippets = remoteUserData.syncData ? JSON.parse(remoteUserData.syncData.content) : null;
|
|
@@ -462,7 +462,7 @@ let SnippetsInitializer = class SnippetsInitializer extends AbstractInitializer
|
|
|
462
462
|
return !stat.children?.length;
|
|
463
463
|
}
|
|
464
464
|
catch (error) {
|
|
465
|
-
return error.fileOperationResult ===
|
|
465
|
+
return error.fileOperationResult === 1 ;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
};
|
|
@@ -8,7 +8,7 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
8
8
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
9
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
10
10
|
import { AbstractFileSynchroniser, AbstractInitializer } from 'vscode/vscode/vs/platform/userDataSync/common/abstractSynchronizer';
|
|
11
|
-
import {
|
|
11
|
+
import { USER_DATA_SYNC_SCHEME } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
12
12
|
import { IUserDataSyncStoreService, IUserDataSyncLocalStoreService, IUserDataSyncLogService, IUserDataSyncEnablementService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
13
13
|
|
|
14
14
|
function getTasksContentFromSyncContent(syncContent, logService) {
|
|
@@ -23,7 +23,7 @@ function getTasksContentFromSyncContent(syncContent, logService) {
|
|
|
23
23
|
}
|
|
24
24
|
let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser {
|
|
25
25
|
constructor(profile, collection, userDataSyncStoreService, userDataSyncLocalStoreService, logService, configurationService, userDataSyncEnablementService, fileService, environmentService, storageService, telemetryService, uriIdentityService) {
|
|
26
|
-
super(profile.tasksResource, { syncResource:
|
|
26
|
+
super(profile.tasksResource, { syncResource: "tasks" , profile }, collection, fileService, environmentService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, userDataSyncEnablementService, telemetryService, logService, configurationService, uriIdentityService);
|
|
27
27
|
this.version = 1;
|
|
28
28
|
this.previewResource = this.extUri.joinPath(this.syncPreviewFolder, 'tasks.json');
|
|
29
29
|
this.baseResource = this.previewResource.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'base' });
|
|
@@ -61,8 +61,8 @@ let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser
|
|
|
61
61
|
}
|
|
62
62
|
const previewResult = {
|
|
63
63
|
content: hasConflicts ? lastSyncContent : content,
|
|
64
|
-
localChange: hasLocalChanged ? fileContent ?
|
|
65
|
-
remoteChange: hasRemoteChanged ?
|
|
64
|
+
localChange: hasLocalChanged ? fileContent ? 2 : 1 : 0 ,
|
|
65
|
+
remoteChange: hasRemoteChanged ? 2 : 0 ,
|
|
66
66
|
hasConflicts
|
|
67
67
|
};
|
|
68
68
|
const localContent = fileContent ? ( fileContent.value.toString()) : null;
|
|
@@ -98,15 +98,15 @@ let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser
|
|
|
98
98
|
if (this.extUri.isEqual(resource, this.localResource)) {
|
|
99
99
|
return {
|
|
100
100
|
content: resourcePreview.fileContent ? ( resourcePreview.fileContent.value.toString()) : null,
|
|
101
|
-
localChange:
|
|
102
|
-
remoteChange:
|
|
101
|
+
localChange: 0 ,
|
|
102
|
+
remoteChange: 2 ,
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
if (this.extUri.isEqual(resource, this.remoteResource)) {
|
|
106
106
|
return {
|
|
107
107
|
content: resourcePreview.remoteContent,
|
|
108
|
-
localChange:
|
|
109
|
-
remoteChange:
|
|
108
|
+
localChange: 2 ,
|
|
109
|
+
remoteChange: 0 ,
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
if (this.extUri.isEqual(resource, this.previewResource)) {
|
|
@@ -120,8 +120,8 @@ let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser
|
|
|
120
120
|
else {
|
|
121
121
|
return {
|
|
122
122
|
content,
|
|
123
|
-
localChange:
|
|
124
|
-
remoteChange:
|
|
123
|
+
localChange: 2 ,
|
|
124
|
+
remoteChange: 2 ,
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
}
|
|
@@ -130,10 +130,10 @@ let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser
|
|
|
130
130
|
async applyResult(remoteUserData, lastSyncUserData, resourcePreviews, force) {
|
|
131
131
|
const { fileContent } = resourcePreviews[0][0];
|
|
132
132
|
const { content, localChange, remoteChange } = resourcePreviews[0][1];
|
|
133
|
-
if (localChange ===
|
|
133
|
+
if (localChange === 0 && remoteChange === 0 ) {
|
|
134
134
|
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing tasks.`);
|
|
135
135
|
}
|
|
136
|
-
if (localChange !==
|
|
136
|
+
if (localChange !== 0 ) {
|
|
137
137
|
this.logService.trace(`${this.syncResourceLogLabel}: Updating local tasks...`);
|
|
138
138
|
if (fileContent) {
|
|
139
139
|
await this.backupLocal(JSON.stringify(this.toTasksSyncContent(( fileContent.value.toString()))));
|
|
@@ -146,7 +146,7 @@ let TasksSynchroniser = class TasksSynchroniser extends AbstractFileSynchroniser
|
|
|
146
146
|
}
|
|
147
147
|
this.logService.info(`${this.syncResourceLogLabel}: Updated local tasks`);
|
|
148
148
|
}
|
|
149
|
-
if (remoteChange !==
|
|
149
|
+
if (remoteChange !== 0 ) {
|
|
150
150
|
this.logService.trace(`${this.syncResourceLogLabel}: Updating remote tasks...`);
|
|
151
151
|
const remoteContents = JSON.stringify(this.toTasksSyncContent(content));
|
|
152
152
|
remoteUserData = await this.updateRemoteUserData(remoteContents, force ? null : remoteUserData.ref);
|
|
@@ -192,7 +192,7 @@ TasksSynchroniser = ( __decorate([
|
|
|
192
192
|
], TasksSynchroniser));
|
|
193
193
|
let TasksInitializer = class TasksInitializer extends AbstractInitializer {
|
|
194
194
|
constructor(fileService, userDataProfilesService, environmentService, logService, storageService, uriIdentityService) {
|
|
195
|
-
super(
|
|
195
|
+
super("tasks" , userDataProfilesService, environmentService, logService, fileService, storageService, uriIdentityService);
|
|
196
196
|
this.tasksResource = this.userDataProfilesService.defaultProfile.tasksResource;
|
|
197
197
|
}
|
|
198
198
|
async doInitialize(remoteUserData) {
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".profiles-editor{height:100%;margin:20px auto 0;max-width:1000px;overflow:hidden}.profiles-editor .contents-view,.profiles-editor .sidebar-view{height:100%}.profiles-editor .monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before,.profiles-editor .monaco-split-view2>.sash-container{top:55px}.profiles-editor .contents-container{height:100%}.profiles-editor .sidebar-container{height:100%;padding-left:20px}.profiles-editor .sidebar-container .new-profile-button{align-items:center;display:flex;height:40px;padding:0 20px 0 18px}.profiles-editor .sidebar-container .new-profile-button>.monaco-button-dropdown{flex-grow:1}.profiles-editor .monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.profiles-editor .monaco-list-row .profile-tree-item-actions-container{align-items:center;display:none}.profiles-editor .monaco-list-row.focused .profile-tree-item-actions-container,.profiles-editor .monaco-list-row.selected .profile-tree-item-actions-container,.profiles-editor .monaco-list-row:hover .profile-tree-item-actions-container{display:flex}.profiles-editor .sidebar-container .profiles-list{margin-top:15px}.profiles-editor .sidebar-container .profiles-list .profile-list-item{align-items:center;display:flex;padding-left:20px}.profiles-editor .sidebar-container .profiles-list .profile-list-item>*{margin-right:5px}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-label{overflow:hidden;text-overflow:ellipsis}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-label.new-profile{font-style:italic}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-description{align-items:center;display:flex;font-size:.9em;margin-left:2px;opacity:.7}.profiles-editor .sidebar-container .profiles-list .profile-list-item .profile-tree-item-actions-container{flex:1;justify-content:flex-end;margin-right:10px}.profiles-editor .hide{display:none!important}.profiles-editor .contents-container .profile-header{align-items:center;display:flex;height:40px;margin-left:27px}.profiles-editor .contents-container .profile-header .profile-title-container{font-size:26px;font-weight:600}.profiles-editor .contents-container .profile-title-container .monaco-inputbox{flex:1;margin-right:10px}.profiles-editor .contents-container .profile-header .profile-actions-container .actions-container .action-label{padding:6px}.profiles-editor .contents-container .profile-body{margin:15px 0 0 1px}.profiles-editor .contents-container .profile-body .profile-row-container{padding:12px 0}.profiles-editor .contents-container .profile-body .profile-row-container.no-padding-bottom{padding-bottom:0}.profiles-editor .contents-container .profile-body .profile-row-container .profile-label-element{font-weight:600;padding-bottom:5px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element{color:var(--vscode-foreground);opacity:.9}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element p,.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul{margin:0}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul{padding-inline-start:28px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul li{padding-left:2px}.profiles-editor .contents-container .profile-body .profile-row-container .monaco-inputbox{width:400px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container{align-items:center;display:flex;line-height:22px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container .codicon{border-radius:5px;cursor:pointer;margin-right:4px;padding:2px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container .codicon:hover{background-color:var(--vscode-toolbar-hoverBackground);outline:1px dashed var(--vscode-toolbar-hoverOutline)}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container .profile-description-element{margin-top:-1px}.profiles-editor .contents-container .profile-select-container{align-items:center;display:flex;justify-content:center;overflow:hidden}.profiles-editor .contents-container .profile-select-container>.monaco-select-box{border-radius:2px;cursor:pointer;line-height:18px;padding:0 23px 0 8px}.profiles-editor .contents-container .profile-copy-from-container .profile-select-container{margin-top:5px;width:250px}.profiles-editor .contents-container .profile-use-as-default-container,.profiles-editor .contents-container .profile-use-for-current-container{align-items:center;display:flex;line-height:22px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-use-as-default-container .profile-description-element,.profiles-editor .contents-container .profile-body .profile-row-container .profile-use-for-current-container .profile-description-element{margin-top:-1px}.profiles-editor .contents-container .profile-use-as-default-container .profile-use-as-default-label,.profiles-editor .contents-container .profile-use-for-current-container .profile-use-as-default-label{margin-left:2px}.profiles-editor .contents-container .profile-contents-container{margin:0 0 10px 20px}.profiles-editor .contents-container .profile-content-tree-header{align-items:center;background-color:var(--vscode-keybindingTable-headerBackground);display:grid;font-weight:700;grid-template-columns:30px repeat(1,1fr) 200px 80px;line-height:22px;margin:5px 0 2px}.profiles-editor .contents-container .profile-content-tree-header>.actions-header,.profiles-editor .contents-container .profile-content-tree-header>.options-header{align-items:center;display:flex;justify-self:center}.profiles-editor .contents-container .profile-content-tree-header>.options-header .codicon{cursor:pointer;padding-left:2px}.profiles-editor .contents-container .profile-content-tree-header.default-profile{grid-template-columns:30px repeat(1,1fr) 80px}.profiles-editor .contents-container .profile-content-tree-header.default-profile>.options-header{display:none}.profiles-editor .contents-container .profile-tree-item-container{align-items:center;display:grid;grid-template-columns:repeat(1,1fr) 200px 80px}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree-header{margin-right:1px}.profiles-editor .contents-container .profile-tree-item-container.default-profile,.profiles-editor .contents-container .profile-tree-item-container.profile-resource-child-container{grid-template-columns:repeat(1,1fr) 80px}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-type-description{font-size:.9em;margin-left:10px;opacity:.7}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-options-container{height:fit-content;justify-self:center;width:fit-content}.profiles-editor .contents-container .profile-tree-item-container .monaco-custom-radio .monaco-button{outline-offset:-1px!important}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-actions-container{justify-self:center}.profiles-editor .contents-container .profile-body .profile-row-container.profile-button-container{align-items:center;display:flex;margin-left:30px;margin-top:10px}.profiles-editor .contents-container .profile-body .profile-row-container.profile-button-container .monaco-button{margin-right:10px;padding:4px 10px;width:inherit}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row.focused{background-color:var(--vscode-settings-focusedRowBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row:not(.focused):hover{background-color:var(--vscode-settings-rowHoverBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-settings-focusedRowBorder)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row{cursor:default}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.focused,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:focus,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:not(:focus){background-color:inherit!important;color:inherit!important}.monaco-workbench:not(.hc-black):not(.hc-light) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected.focused:hover,.monaco-workbench:not(.hc-black):not(.hc-light) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row:hover{background-color:var(--vscode-list-hoverBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.focused,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row:hover,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list:before{outline:none!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row .monaco-tl-twistie.collapsible{cursor:pointer}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .codicon,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row .codicon{color:inherit!important}";
|
|
3
|
+
var css = ".profiles-editor{height:100%;margin:20px auto 0;max-width:1200px;overflow:hidden}.profiles-editor .contents-view,.profiles-editor .sidebar-view{height:100%}.profiles-editor>.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before,.profiles-editor>.monaco-split-view2>.sash-container{top:55px}.profiles-editor .contents-container{height:100%}.profiles-editor .sidebar-container{height:100%;padding-left:20px}.profiles-editor .sidebar-container .new-profile-button{align-items:center;display:flex;height:40px;padding:0 20px 0 18px}.profiles-editor .sidebar-container .new-profile-button>.monaco-button-dropdown{flex-grow:1}.profiles-editor .monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.profiles-editor .monaco-list-row .profile-tree-item-actions-container{align-items:center;display:none}.profiles-editor .monaco-list-row.focused .profile-tree-item-actions-container,.profiles-editor .monaco-list-row.selected .profile-tree-item-actions-container,.profiles-editor .monaco-list-row:hover .profile-tree-item-actions-container{display:flex}.profiles-editor .sidebar-container .profiles-list{margin-top:15px}.profiles-editor .sidebar-container .profiles-list .profile-list-item{align-items:center;display:flex;padding-left:20px}.profiles-editor .sidebar-container .profiles-list .profile-list-item>*{margin-right:5px}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-label{overflow:hidden;text-overflow:ellipsis}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-label.new-profile{font-style:italic}.profiles-editor .sidebar-container .profiles-list .profile-list-item>.profile-list-item-description{align-items:center;display:flex;font-size:.9em;margin-left:2px;opacity:.7}.profiles-editor .sidebar-container .profiles-list .profile-list-item .profile-tree-item-actions-container{flex:1;justify-content:flex-end;margin-right:10px}.profiles-editor .hide{display:none!important}.profiles-editor .contents-container .profile-header{align-items:center;display:flex;height:40px;margin-left:27px}.profiles-editor .contents-container .profile-header .profile-title-container{font-size:26px;font-weight:600}.profiles-editor .contents-container .profile-title-container .monaco-inputbox{flex:1;margin-right:10px}.profiles-editor .contents-container .profile-header .profile-actions-container .actions-container .action-label{padding:6px}.profiles-editor .contents-container .profile-body{margin:15px 0 0 1px}.profiles-editor .contents-container .profile-body .profile-row-container{padding:12px 0}.profiles-editor .contents-container .profile-body .profile-row-container.no-padding-bottom{padding-bottom:0}.profiles-editor .contents-container .profile-body .profile-row-container .profile-label-element{font-weight:600;padding-bottom:5px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element{color:var(--vscode-foreground);opacity:.9}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element p,.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul{margin:0}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul{padding-inline-start:28px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-description-element ul li{padding-left:2px}.profiles-editor .contents-container .profile-body .profile-row-container .monaco-inputbox{width:400px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container{align-items:center;display:flex;line-height:22px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container.disabled .codicon{cursor:default}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container .codicon{border-radius:5px;cursor:pointer;margin-right:4px;padding:2px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container:not(.disabled) .codicon:hover{background-color:var(--vscode-toolbar-hoverBackground);outline:1px dashed var(--vscode-toolbar-hoverOutline)}.profiles-editor .contents-container .profile-body .profile-row-container .profile-icon-container .profile-description-element{margin-top:-1px}.profiles-editor .contents-container .profile-select-container{align-items:center;display:flex;justify-content:center;overflow:hidden}.profiles-editor .contents-container .profile-select-container>.monaco-select-box{border-radius:2px;cursor:pointer;line-height:18px;padding:0 23px 0 8px}.profiles-editor .contents-container .profile-copy-from-container .profile-select-container{margin-top:5px;width:250px}.profiles-editor .contents-container .profile-use-as-default-container,.profiles-editor .contents-container .profile-use-for-current-container{align-items:center;display:flex;line-height:22px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-use-as-default-container .profile-description-element,.profiles-editor .contents-container .profile-body .profile-row-container .profile-use-for-current-container .profile-description-element{margin-top:-1px}.profiles-editor .contents-container .profile-use-as-default-container .profile-use-as-default-label,.profiles-editor .contents-container .profile-use-for-current-container .profile-use-as-default-label{margin-left:2px}.profiles-editor .contents-container .profile-contents-container{margin:0 0 10px 20px}.profiles-editor .contents-container .profile-content-tree-header{align-items:center;border-bottom:1px solid transparent;display:grid;font-weight:700;grid-template-columns:30px repeat(2,1fr) 80px;height:30px;line-height:22px;margin:5px 0 2px}.profiles-editor .contents-container .profile-content-tree-header,.profiles-editor .profile-associations-table .monaco-table-th{background-color:var(--vscode-keybindingTable-headerBackground)}.profiles-editor .contents-container .profile-content-tree-header>.options-header{align-items:center;display:flex}.profiles-editor .contents-container .profile-content-tree-header>.options-header .codicon{cursor:pointer;padding-left:2px}.profiles-editor .contents-container .profile-content-tree-header.default-profile{grid-template-columns:30px repeat(1,1fr) 80px}.profiles-editor .contents-container .profile-content-tree-header.default-profile>.options-header{display:none}.profiles-editor .contents-container .profile-tree-item-container{align-items:center;display:grid;grid-template-columns:repeat(2,1fr) 80px}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree-header{margin-right:1px}.profiles-editor .contents-container .profile-tree-item-container.default-profile,.profiles-editor .contents-container .profile-tree-item-container.profile-resource-child-container{grid-template-columns:repeat(1,1fr) 80px}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-type-description{font-size:.9em;margin-left:10px;opacity:.7}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-options-container{height:fit-content;width:fit-content}.profiles-editor .contents-container .profile-tree-item-container .monaco-custom-radio .monaco-button{outline-offset:-1px!important}.profiles-editor .contents-container .profile-tree-item-container .profile-resource-actions-container{display:none;justify-self:end;padding-right:10px}.profiles-editor .contents-container .profile-content-tree .monaco-list-row.focused .profile-resource-actions-container,.profiles-editor .contents-container .profile-content-tree .monaco-list-row.selected .profile-resource-actions-container,.profiles-editor .contents-container .profile-content-tree .monaco-list-row:hover .profile-resource-actions-container{display:flex}.profiles-editor .contents-container .profile-body .profile-row-container.profile-button-container{align-items:center;display:flex;margin-left:30px;margin-top:10px}.profiles-editor .contents-container .profile-body .profile-row-container.profile-button-container .monaco-button{margin-right:10px;padding:4px 10px;width:inherit}.profiles-editor .profile-associations-table{margin-top:5px}.profiles-editor .profile-associations-table .monaco-table-td,.profiles-editor .profile-associations-table .monaco-table-th{padding:0 5px}.profiles-editor .profile-associations-table .monaco-table-td{align-items:center;display:flex;overflow:hidden}.profiles-editor .profile-associations-table .monaco-list-row .monaco-table-tr .monaco-table-td .profile-workspaces-actions-container{display:none;justify-content:flex-end;padding-right:5px}.profiles-editor .profile-associations-table .monaco-list-row.focused .monaco-table-tr .monaco-table-td .profile-workspaces-actions-container,.profiles-editor .profile-associations-table .monaco-list-row.selected .monaco-table-tr .monaco-table-td .profile-workspaces-actions-container,.profiles-editor .profile-associations-table .monaco-list-row:hover .monaco-table-tr .monaco-table-td .profile-workspaces-actions-container{display:flex}.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .host,.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .path{width:100%}.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .host .host-label,.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .path .path-label{overflow:hidden;text-overflow:ellipsis}.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .current-workspace .host-label,.profiles-editor .profile-associations-table .monaco-table-tr .monaco-table-td .current-workspace .path-label{font-style:italic;font-weight:700}.profiles-editor .contents-container .profile-body .profile-row-container .profile-workspaces-button-container{display:flex;margin:8px 4px}.profiles-editor .contents-container .profile-body .profile-row-container .profile-workspaces-button-container .monaco-button{padding:2px 14px;width:inherit}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row.focused{background-color:var(--vscode-settings-focusedRowBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row[data-parity=odd] .monaco-table-tr{background-color:transparent!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row:not(.focused):hover{background-color:var(--vscode-settings-rowHoverBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-settings-focusedRowBorder)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row{cursor:default}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row.focused,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row.selected:focus,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row.selected:not(:focus),.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.focused,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:focus,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:not(:focus){background-color:inherit!important;color:inherit!important}.monaco-workbench:not(.hc-black):not(.hc-light) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row:hover:not(.selected),.monaco-workbench:not(.hc-black):not(.hc-light) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row:hover:not(.selected){background-color:var(--vscode-list-hoverBackground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row.selected:focus,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:focus{background-color:var(--vscode-list-activeSelectionBackground)!important;color:var(--vscode-list-activeSelectionForeground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-associations-table .monaco-list-row.selected:not(:focus),.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row.selected:not(:focus){background-color:var(--vscode-list-inactiveSelectionBackground)!important;color:var(--vscode-list-inactiveSelectionForeground)!important}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row .monaco-tl-twistie.collapsible{cursor:pointer}.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .codicon,.profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row .profile-content-tree .monaco-list-row .codicon{color:inherit!important}.monaco-workbench:not(.reduce-motion) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row:hover .profile-associations-table .monaco-table>.monaco-split-view2,.monaco-workbench:not(.reduce-motion) .profiles-editor .contents-container .profile-body .profile-tree .monaco-list-row:hover .profile-content-tree-header{border-color:var(--vscode-tree-tableColumnsBorder)!important}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerWorkbenchContribution2
|
|
1
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
2
2
|
import { UserDataProfilesWorkbenchContribution } from './userDataProfile.js';
|
|
3
3
|
import './userDataProfileActions.js';
|
|
4
4
|
|
|
5
|
-
registerWorkbenchContribution2(UserDataProfilesWorkbenchContribution.ID, UserDataProfilesWorkbenchContribution,
|
|
5
|
+
registerWorkbenchContribution2(UserDataProfilesWorkbenchContribution.ID, UserDataProfilesWorkbenchContribution, 2 );
|