@codingame/monaco-vscode-user-data-profile-service-override 11.1.2 → 12.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/index.d.ts +2 -1
- package/index.js +126 -1
- package/package.json +31 -8
- package/vscode/src/vs/base/browser/ui/radio/radio.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/radio/radio.d.ts +37 -0
- package/vscode/src/vs/base/browser/ui/radio/radio.js +1 -0
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.d.ts +16 -0
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +3 -2
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.d.ts +42 -0
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +10 -11
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +65 -63
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +5 -4
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +298 -307
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.d.ts +236 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +168 -166
- package/vscode/src/vs/workbench/contrib/userDataProfile/common/userDataProfile.d.ts +7 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.d.ts +19 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +4 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.d.ts +77 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +83 -82
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.d.ts +58 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +31 -28
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.d.ts +47 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/browser/media/userDataProfileView.css.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.d.ts +48 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +29 -29
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.d.ts +43 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +54 -54
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.d.ts +45 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.d.ts +63 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +106 -111
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.d.ts +32 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +11 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.d.ts +58 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +35 -33
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.d.ts +18 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +7 -5
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.d.ts +45 -0
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +25 -22
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.d.ts +18 -0
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js +3 -1
- package/userDataProfile.js +0 -125
package/userDataProfile.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
3
|
-
import { IUserDataSyncStoreManagementService, IUserDataSyncUtilService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
4
|
-
import { BrowserUserDataProfilesService } from './vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js';
|
|
5
|
-
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
6
|
-
import { UserDataInitializationService } from './vscode/src/vs/workbench/services/userData/browser/userDataInit.js';
|
|
7
|
-
import { IUserDataInitializationService } from 'vscode/vscode/vs/workbench/services/userData/browser/userDataInit.service';
|
|
8
|
-
import { UserDataSyncInitializer } from './vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js';
|
|
9
|
-
import { UserDataProfileInitializer } from './vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js';
|
|
10
|
-
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
11
|
-
import { ISecretStorageService } from 'vscode/vscode/vs/platform/secrets/common/secrets.service';
|
|
12
|
-
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
13
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
14
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
15
|
-
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request.service';
|
|
16
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
17
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
18
|
-
import { IUserDataProfileService, IUserDataProfileImportExportService, IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
19
|
-
import { mark } from 'vscode/vscode/vs/base/common/performance';
|
|
20
|
-
import { timeout } from 'vscode/vscode/vs/base/common/async';
|
|
21
|
-
import { IWorkbenchConfigurationService } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration.service';
|
|
22
|
-
import { UserDataProfileImportExportService } from './vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js';
|
|
23
|
-
import { UserDataProfileManagementService } from './vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js';
|
|
24
|
-
import { IUserDataProfileStorageService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfileStorageService.service';
|
|
25
|
-
import { UserDataProfileStorageService } from './vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js';
|
|
26
|
-
import { UserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfileService';
|
|
27
|
-
import { UserDataSyncUtilService } from './vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js';
|
|
28
|
-
import { registerServiceInitializePostParticipant } from 'vscode/lifecycle';
|
|
29
|
-
import { getWorkspaceIdentifier } from 'vscode/workbench';
|
|
30
|
-
import './vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js';
|
|
31
|
-
|
|
32
|
-
function isWorkspaceService(configurationService) {
|
|
33
|
-
return 'reloadLocalUserConfiguration' in configurationService;
|
|
34
|
-
}
|
|
35
|
-
async function initializeUserData(userDataInitializationService, configurationService) {
|
|
36
|
-
if (await userDataInitializationService.requiresInitialization()) {
|
|
37
|
-
mark('code/willInitRequiredUserData');
|
|
38
|
-
await userDataInitializationService.initializeRequiredResources();
|
|
39
|
-
if (isWorkspaceService(configurationService)) {
|
|
40
|
-
await configurationService.reloadLocalUserConfiguration();
|
|
41
|
-
}
|
|
42
|
-
mark('code/didInitRequiredUserData');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
registerServiceInitializePostParticipant(async (accessor) => {
|
|
46
|
-
try {
|
|
47
|
-
await Promise.race([
|
|
48
|
-
timeout(5000),
|
|
49
|
-
initializeUserData(accessor.get(IUserDataInitializationService), accessor.get(IWorkbenchConfigurationService))
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
accessor.get(ILogService).error(error);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
let InjectedUserDataInitializationService = class InjectedUserDataInitializationService extends UserDataInitializationService {
|
|
57
|
-
constructor(environmentService, secretStorageService, userDataSyncStoreManagementService, fileService, userDataProfilesService, storageService, productService, requestService, logService, uriIdentityService, userDataProfileService) {
|
|
58
|
-
const userDataInitializers = [];
|
|
59
|
-
userDataInitializers.push(new UserDataSyncInitializer(environmentService, secretStorageService, userDataSyncStoreManagementService, fileService, userDataProfilesService, storageService, productService, requestService, logService, uriIdentityService));
|
|
60
|
-
if (environmentService.options?.profile != null) {
|
|
61
|
-
userDataInitializers.push(new UserDataProfileInitializer(environmentService, fileService, userDataProfileService, storageService, logService, uriIdentityService, requestService));
|
|
62
|
-
}
|
|
63
|
-
super(userDataInitializers);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
InjectedUserDataInitializationService = __decorate([
|
|
67
|
-
( __param(0, IBrowserWorkbenchEnvironmentService)),
|
|
68
|
-
( __param(1, ISecretStorageService)),
|
|
69
|
-
( __param(2, IUserDataSyncStoreManagementService)),
|
|
70
|
-
( __param(3, IFileService)),
|
|
71
|
-
( __param(4, IUserDataProfilesService)),
|
|
72
|
-
( __param(5, IStorageService)),
|
|
73
|
-
( __param(6, IProductService)),
|
|
74
|
-
( __param(7, IRequestService)),
|
|
75
|
-
( __param(8, ILogService)),
|
|
76
|
-
( __param(9, IUriIdentityService)),
|
|
77
|
-
( __param(10, IUserDataProfileService))
|
|
78
|
-
], InjectedUserDataInitializationService);
|
|
79
|
-
function getCurrentProfile(workspace, userDataProfilesService, environmentService) {
|
|
80
|
-
if (environmentService.options?.profile != null) {
|
|
81
|
-
const profile = userDataProfilesService.profiles.find((p) => p.name === environmentService.options?.profile?.name);
|
|
82
|
-
if (profile != null) {
|
|
83
|
-
return profile;
|
|
84
|
-
}
|
|
85
|
-
return userDataProfilesService.defaultProfile;
|
|
86
|
-
}
|
|
87
|
-
return (userDataProfilesService.getProfileForWorkspace(workspace) ??
|
|
88
|
-
userDataProfilesService.defaultProfile);
|
|
89
|
-
}
|
|
90
|
-
let InjectedUserDataProfileService = class InjectedUserDataProfileService extends UserDataProfileService {
|
|
91
|
-
constructor(environmentService, userDataProfilesService, logService) {
|
|
92
|
-
const workspace = getWorkspaceIdentifier();
|
|
93
|
-
const profile = getCurrentProfile(workspace, userDataProfilesService, environmentService);
|
|
94
|
-
super(profile);
|
|
95
|
-
if (profile === userDataProfilesService.defaultProfile &&
|
|
96
|
-
environmentService.options?.profile != null) {
|
|
97
|
-
userDataProfilesService
|
|
98
|
-
.createNamedProfile(environmentService.options.profile.name, undefined, workspace)
|
|
99
|
-
.then(async (profile) => {
|
|
100
|
-
await this.updateCurrentProfile(profile);
|
|
101
|
-
})
|
|
102
|
-
.catch((err) => {
|
|
103
|
-
logService.error(err);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
InjectedUserDataProfileService = __decorate([
|
|
109
|
-
( __param(0, IBrowserWorkbenchEnvironmentService)),
|
|
110
|
-
( __param(1, IUserDataProfilesService)),
|
|
111
|
-
( __param(2, ILogService))
|
|
112
|
-
], InjectedUserDataProfileService);
|
|
113
|
-
function getServiceOverride() {
|
|
114
|
-
return {
|
|
115
|
-
[( IUserDataProfileService.toString())]: new SyncDescriptor(InjectedUserDataProfileService, [], true),
|
|
116
|
-
[( IUserDataProfilesService.toString())]: new SyncDescriptor(BrowserUserDataProfilesService, [], true),
|
|
117
|
-
[( IUserDataInitializationService.toString())]: new SyncDescriptor(InjectedUserDataInitializationService, [], true),
|
|
118
|
-
[( IUserDataProfileImportExportService.toString())]: new SyncDescriptor(UserDataProfileImportExportService, [], true),
|
|
119
|
-
[( IUserDataProfileManagementService.toString())]: new SyncDescriptor(UserDataProfileManagementService, [], true),
|
|
120
|
-
[( IUserDataProfileStorageService.toString())]: new SyncDescriptor(UserDataProfileStorageService, [], true),
|
|
121
|
-
[( IUserDataSyncUtilService.toString())]: new SyncDescriptor(UserDataSyncUtilService, [], true)
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export { getServiceOverride as default };
|