@codingame/monaco-vscode-user-data-profile-service-override 5.3.0 → 6.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/common/userDataProfileStorageService.js +7 -9
- package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +21 -20
- package/vscode/src/vs/platform/userDataSync/common/globalStateSync.js +26 -25
- package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +26 -25
- package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +20 -18
- 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 +6 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +91 -25
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +943 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +481 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +2 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +14 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +10 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +5 -4
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +7 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +4 -3
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +5 -4
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +119 -70
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +9 -7
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +4 -3
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +15 -13
package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
4
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
4
5
|
import { AbstractUserDataProfileStorageService } from '../../../../platform/userDataProfile/common/userDataProfileStorageService.js';
|
|
5
6
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
-
import { isProfileUsingDefaultStorage } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
|
+
import { StorageScope, isProfileUsingDefaultStorage } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
8
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
8
9
|
import { IndexedDBStorageDatabase } from 'vscode/vscode/vs/workbench/services/storage/browser/storageService';
|
|
9
10
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
@@ -17,8 +18,8 @@ let UserDataProfileStorageService = class UserDataProfileStorageService extends
|
|
|
17
18
|
this._onDidChange = this._register(( new Emitter()));
|
|
18
19
|
this.onDidChange = this._onDidChange.event;
|
|
19
20
|
const disposables = this._register(( new DisposableStore()));
|
|
20
|
-
this._register(Event.filter(storageService.onDidChangeTarget, e => e.scope ===
|
|
21
|
-
this._register(storageService.onDidChangeValue(
|
|
21
|
+
this._register(Event.filter(storageService.onDidChangeTarget, e => e.scope === StorageScope.PROFILE, disposables)(() => this.onDidChangeStorageTargetInCurrentProfile()));
|
|
22
|
+
this._register(storageService.onDidChangeValue(StorageScope.PROFILE, undefined, disposables)(e => this.onDidChangeStorageValueInCurrentProfile(e)));
|
|
22
23
|
}
|
|
23
24
|
onDidChangeStorageTargetInCurrentProfile() {
|
|
24
25
|
this._onDidChange.fire({ targetChanges: [this.userDataProfileService.currentProfile], valueChanges: [] });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
2
3
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
3
4
|
import { AbstractExtensionsInitializer } from '../../../../platform/userDataSync/common/extensionsSync.js';
|
|
4
5
|
import { UserDataSyncStoreTypeSynchronizer, GlobalStateInitializer } from '../../../../platform/userDataSync/common/globalStateSync.js';
|
|
@@ -10,6 +11,7 @@ import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
|
10
11
|
import { UserDataSyncStoreClient } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSyncStoreService';
|
|
11
12
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
12
13
|
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request.service';
|
|
14
|
+
import { SyncResource } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
13
15
|
import { IUserDataSyncStoreManagementService, IUserDataSyncLogService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
14
16
|
import { getCurrentAuthenticationSessionInfo } from 'vscode/vscode/vs/workbench/services/authentication/browser/authenticationService';
|
|
15
17
|
import { getSyncAreaLabel } from 'vscode/vscode/vs/workbench/services/userDataSync/common/userDataSync';
|
|
@@ -60,11 +62,11 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
60
62
|
this.logService.trace(`Skipping initializing user data in desktop`);
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
|
-
if (!this.storageService.isNew(
|
|
65
|
+
if (!this.storageService.isNew(StorageScope.APPLICATION)) {
|
|
64
66
|
this.logService.trace(`Skipping initializing user data as application was opened before`);
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
|
-
if (!this.storageService.isNew(
|
|
69
|
+
if (!this.storageService.isNew(StorageScope.WORKSPACE)) {
|
|
68
70
|
this.logService.trace(`Skipping initializing user data as workspace was opened before`);
|
|
69
71
|
return;
|
|
70
72
|
}
|
|
@@ -133,7 +135,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
133
135
|
this.storageService
|
|
134
136
|
)));
|
|
135
137
|
userDataSyncStoreClient.setAuthToken(authenticationSession.accessToken, authenticationSession.providerId);
|
|
136
|
-
this.globalStateUserData = await userDataSyncStoreClient.readResource(
|
|
138
|
+
this.globalStateUserData = await userDataSyncStoreClient.readResource(SyncResource.GlobalState, null);
|
|
137
139
|
if (this.globalStateUserData) {
|
|
138
140
|
const userDataSyncStoreType = ( new UserDataSyncStoreTypeSynchronizer(
|
|
139
141
|
userDataSyncStoreClient,
|
|
@@ -165,12 +167,12 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
165
167
|
}
|
|
166
168
|
async initializeRequiredResources() {
|
|
167
169
|
this.logService.trace(`UserDataInitializationService#initializeRequiredResources`);
|
|
168
|
-
return this.initialize([
|
|
170
|
+
return this.initialize([SyncResource.Settings, SyncResource.GlobalState]);
|
|
169
171
|
}
|
|
170
172
|
async initializeOtherResources(instantiationService) {
|
|
171
173
|
try {
|
|
172
174
|
this.logService.trace(`UserDataInitializationService#initializeOtherResources`);
|
|
173
|
-
await Promise.allSettled([this.initialize([
|
|
175
|
+
await Promise.allSettled([this.initialize([SyncResource.Keybindings, SyncResource.Snippets, SyncResource.Tasks]), this.initializeExtensions(instantiationService)]);
|
|
174
176
|
}
|
|
175
177
|
finally {
|
|
176
178
|
this.initializationFinished.open();
|
|
@@ -181,7 +183,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
181
183
|
await Promise.all([this.initializeInstalledExtensions(instantiationService), this.initializeNewExtensions(instantiationService)]);
|
|
182
184
|
}
|
|
183
185
|
finally {
|
|
184
|
-
this.initialized.push(
|
|
186
|
+
this.initialized.push(SyncResource.Extensions);
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
async initializeInstalledExtensions(instantiationService) {
|
|
@@ -215,7 +217,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
215
217
|
if (!userDataSyncStoreClient) {
|
|
216
218
|
return null;
|
|
217
219
|
}
|
|
218
|
-
const userData = await userDataSyncStoreClient.readResource(
|
|
220
|
+
const userData = await userDataSyncStoreClient.readResource(SyncResource.Extensions, null);
|
|
219
221
|
return instantiationService.createInstance(ExtensionsPreviewInitializer, userData);
|
|
220
222
|
})();
|
|
221
223
|
}
|
|
@@ -235,7 +237,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
235
237
|
this.initialized.push(syncResource);
|
|
236
238
|
this.logService.trace(`Initializing ${getSyncAreaLabel(syncResource)}`);
|
|
237
239
|
const initializer = this.createSyncResourceInitializer(syncResource);
|
|
238
|
-
const userData = await userDataSyncStoreClient.readResource(syncResource, syncResource ===
|
|
240
|
+
const userData = await userDataSyncStoreClient.readResource(syncResource, syncResource === SyncResource.GlobalState ? this.globalStateUserData : null);
|
|
239
241
|
await initializer.initialize(userData);
|
|
240
242
|
this.logService.info(`Initialized ${getSyncAreaLabel(syncResource)}`);
|
|
241
243
|
}
|
|
@@ -247,7 +249,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
247
249
|
}
|
|
248
250
|
createSyncResourceInitializer(syncResource) {
|
|
249
251
|
switch (syncResource) {
|
|
250
|
-
case
|
|
252
|
+
case SyncResource.Settings: return ( new SettingsInitializer(
|
|
251
253
|
this.fileService,
|
|
252
254
|
this.userDataProfilesService,
|
|
253
255
|
this.environmentService,
|
|
@@ -255,7 +257,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
255
257
|
this.storageService,
|
|
256
258
|
this.uriIdentityService
|
|
257
259
|
));
|
|
258
|
-
case
|
|
260
|
+
case SyncResource.Keybindings: return ( new KeybindingsInitializer(
|
|
259
261
|
this.fileService,
|
|
260
262
|
this.userDataProfilesService,
|
|
261
263
|
this.environmentService,
|
|
@@ -263,7 +265,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
263
265
|
this.storageService,
|
|
264
266
|
this.uriIdentityService
|
|
265
267
|
));
|
|
266
|
-
case
|
|
268
|
+
case SyncResource.Tasks: return ( new TasksInitializer(
|
|
267
269
|
this.fileService,
|
|
268
270
|
this.userDataProfilesService,
|
|
269
271
|
this.environmentService,
|
|
@@ -271,7 +273,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
271
273
|
this.storageService,
|
|
272
274
|
this.uriIdentityService
|
|
273
275
|
));
|
|
274
|
-
case
|
|
276
|
+
case SyncResource.Snippets: return ( new SnippetsInitializer(
|
|
275
277
|
this.fileService,
|
|
276
278
|
this.userDataProfilesService,
|
|
277
279
|
this.environmentService,
|
|
@@ -279,7 +281,7 @@ let UserDataSyncInitializer = class UserDataSyncInitializer {
|
|
|
279
281
|
this.storageService,
|
|
280
282
|
this.uriIdentityService
|
|
281
283
|
));
|
|
282
|
-
case
|
|
284
|
+
case SyncResource.GlobalState: return ( new GlobalStateInitializer(
|
|
283
285
|
this.storageService,
|
|
284
286
|
this.fileService,
|
|
285
287
|
this.userDataProfilesService,
|