@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
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
5
7
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
6
8
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
7
10
|
import { IUserDataProfileStorageService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfileStorageService.service';
|
|
8
|
-
import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
11
|
+
import { API_OPEN_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
9
12
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
10
13
|
|
|
11
14
|
let GlobalStateResourceInitializer = class GlobalStateResourceInitializer {
|
|
@@ -14,19 +17,19 @@ let GlobalStateResourceInitializer = class GlobalStateResourceInitializer {
|
|
|
14
17
|
}
|
|
15
18
|
async initialize(content) {
|
|
16
19
|
const globalState = JSON.parse(content);
|
|
17
|
-
const storageKeys = (
|
|
20
|
+
const storageKeys = ( Object.keys(globalState.storage));
|
|
18
21
|
if (storageKeys.length) {
|
|
19
22
|
const storageEntries = [];
|
|
20
23
|
for (const key of storageKeys) {
|
|
21
|
-
storageEntries.push({ key, value: globalState.storage[key], scope:
|
|
24
|
+
storageEntries.push({ key, value: globalState.storage[key], scope: StorageScope.PROFILE, target: StorageTarget.USER });
|
|
22
25
|
}
|
|
23
26
|
this.storageService.storeAll(storageEntries, true);
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
};
|
|
27
|
-
GlobalStateResourceInitializer = (
|
|
28
|
-
(
|
|
29
|
-
], GlobalStateResourceInitializer))
|
|
30
|
+
GlobalStateResourceInitializer = ( __decorate([
|
|
31
|
+
( __param(0, IStorageService))
|
|
32
|
+
], GlobalStateResourceInitializer));
|
|
30
33
|
let GlobalStateResource = class GlobalStateResource {
|
|
31
34
|
constructor(storageService, userDataProfileStorageService, logService) {
|
|
32
35
|
this.storageService = storageService;
|
|
@@ -45,20 +48,20 @@ let GlobalStateResource = class GlobalStateResource {
|
|
|
45
48
|
const storage = {};
|
|
46
49
|
const storageData = await this.userDataProfileStorageService.readStorageData(profile);
|
|
47
50
|
for (const [key, value] of storageData) {
|
|
48
|
-
if (value.value !== undefined && value.target ===
|
|
51
|
+
if (value.value !== undefined && value.target === StorageTarget.USER) {
|
|
49
52
|
storage[key] = value.value;
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
return { storage };
|
|
53
56
|
}
|
|
54
57
|
async writeGlobalState(globalState, profile) {
|
|
55
|
-
const storageKeys = (
|
|
58
|
+
const storageKeys = ( Object.keys(globalState.storage));
|
|
56
59
|
if (storageKeys.length) {
|
|
57
|
-
const updatedStorage = (
|
|
60
|
+
const updatedStorage = ( new Map());
|
|
58
61
|
const nonProfileKeys = [
|
|
59
|
-
...(
|
|
60
|
-
...(
|
|
61
|
-
...(
|
|
62
|
+
...( this.storageService.keys(StorageScope.APPLICATION, StorageTarget.MACHINE)),
|
|
63
|
+
...( this.storageService.keys(StorageScope.WORKSPACE, StorageTarget.USER)),
|
|
64
|
+
...( this.storageService.keys(StorageScope.WORKSPACE, StorageTarget.MACHINE)),
|
|
62
65
|
];
|
|
63
66
|
for (const key of storageKeys) {
|
|
64
67
|
if (nonProfileKeys.includes(key)) {
|
|
@@ -68,27 +71,27 @@ let GlobalStateResource = class GlobalStateResource {
|
|
|
68
71
|
updatedStorage.set(key, globalState.storage[key]);
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
await this.userDataProfileStorageService.updateStorageData(profile, updatedStorage,
|
|
74
|
+
await this.userDataProfileStorageService.updateStorageData(profile, updatedStorage, StorageTarget.USER);
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
};
|
|
75
|
-
GlobalStateResource = (
|
|
76
|
-
(
|
|
77
|
-
(
|
|
78
|
-
(
|
|
79
|
-
], GlobalStateResource))
|
|
78
|
+
GlobalStateResource = ( __decorate([
|
|
79
|
+
( __param(0, IStorageService)),
|
|
80
|
+
( __param(1, IUserDataProfileStorageService)),
|
|
81
|
+
( __param(2, ILogService))
|
|
82
|
+
], GlobalStateResource));
|
|
80
83
|
class GlobalStateResourceTreeItem {
|
|
81
84
|
constructor(resource, uriIdentityService) {
|
|
82
85
|
this.resource = resource;
|
|
83
86
|
this.uriIdentityService = uriIdentityService;
|
|
84
|
-
this.type =
|
|
85
|
-
this.handle =
|
|
86
|
-
this.label = { label: ( localize(
|
|
87
|
+
this.type = ProfileResourceType.GlobalState;
|
|
88
|
+
this.handle = ProfileResourceType.GlobalState;
|
|
89
|
+
this.label = { label: ( localize(11977, "UI State")) };
|
|
87
90
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
88
91
|
}
|
|
89
92
|
async getChildren() {
|
|
90
93
|
return [{
|
|
91
|
-
handle: (
|
|
94
|
+
handle: ( this.resource.toString()),
|
|
92
95
|
resourceUri: this.resource,
|
|
93
96
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
94
97
|
accessibilityInformation: {
|
|
@@ -111,7 +114,7 @@ let GlobalStateResourceExportTreeItem = class GlobalStateResourceExportTreeItem
|
|
|
111
114
|
}
|
|
112
115
|
async hasContent() {
|
|
113
116
|
const globalState = await this.instantiationService.createInstance(GlobalStateResource).getGlobalState(this.profile);
|
|
114
|
-
return (
|
|
117
|
+
return ( Object.keys(globalState.storage)).length > 0;
|
|
115
118
|
}
|
|
116
119
|
async getContent() {
|
|
117
120
|
return this.instantiationService.createInstance(GlobalStateResource).getContent(this.profile);
|
|
@@ -120,9 +123,9 @@ let GlobalStateResourceExportTreeItem = class GlobalStateResourceExportTreeItem
|
|
|
120
123
|
return !this.profile.isDefault && !!this.profile.useDefaultFlags?.globalState;
|
|
121
124
|
}
|
|
122
125
|
};
|
|
123
|
-
GlobalStateResourceExportTreeItem = (
|
|
124
|
-
(
|
|
125
|
-
(
|
|
126
|
-
], GlobalStateResourceExportTreeItem))
|
|
126
|
+
GlobalStateResourceExportTreeItem = ( __decorate([
|
|
127
|
+
( __param(2, IUriIdentityService)),
|
|
128
|
+
( __param(3, IInstantiationService))
|
|
129
|
+
], GlobalStateResourceExportTreeItem));
|
|
127
130
|
|
|
128
131
|
export { GlobalStateResource, GlobalStateResourceExportTreeItem, GlobalStateResourceInitializer, GlobalStateResourceTreeItem };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
2
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { IProfileResource, IProfileResourceChildTreeItem, IProfileResourceInitializer, IProfileResourceTreeItem } from "@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile";
|
|
4
|
+
import { IUserDataProfileService } from "vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
5
|
+
import { Platform } from "vscode/vscode/vs/base/common/platform";
|
|
6
|
+
import { ITreeItemCheckboxState, TreeItemCollapsibleState } from "vscode/vscode/vs/workbench/common/views";
|
|
7
|
+
import { IUserDataProfile, ProfileResourceType } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
8
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
10
|
+
interface IKeybindingsResourceContent {
|
|
11
|
+
platform: Platform;
|
|
12
|
+
keybindings: string | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class KeybindingsResourceInitializer implements IProfileResourceInitializer {
|
|
15
|
+
private readonly userDataProfileService;
|
|
16
|
+
private readonly fileService;
|
|
17
|
+
private readonly logService;
|
|
18
|
+
constructor(userDataProfileService: IUserDataProfileService, fileService: IFileService, logService: ILogService);
|
|
19
|
+
initialize(content: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare class KeybindingsResource implements IProfileResource {
|
|
22
|
+
private readonly fileService;
|
|
23
|
+
private readonly logService;
|
|
24
|
+
constructor(fileService: IFileService, logService: ILogService);
|
|
25
|
+
getContent(profile: IUserDataProfile): Promise<string>;
|
|
26
|
+
getKeybindingsResourceContent(profile: IUserDataProfile): Promise<IKeybindingsResourceContent>;
|
|
27
|
+
apply(content: string, profile: IUserDataProfile): Promise<void>;
|
|
28
|
+
private getKeybindingsContent;
|
|
29
|
+
}
|
|
30
|
+
export declare class KeybindingsResourceTreeItem implements IProfileResourceTreeItem {
|
|
31
|
+
private readonly profile;
|
|
32
|
+
private readonly uriIdentityService;
|
|
33
|
+
private readonly instantiationService;
|
|
34
|
+
readonly type = ProfileResourceType.Keybindings;
|
|
35
|
+
readonly handle = ProfileResourceType.Keybindings;
|
|
36
|
+
readonly label: {
|
|
37
|
+
label: string;
|
|
38
|
+
};
|
|
39
|
+
readonly collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
40
|
+
checkbox: ITreeItemCheckboxState | undefined;
|
|
41
|
+
constructor(profile: IUserDataProfile, uriIdentityService: IUriIdentityService, instantiationService: IInstantiationService);
|
|
42
|
+
isFromDefaultProfile(): boolean;
|
|
43
|
+
getChildren(): Promise<IProfileResourceChildTreeItem[]>;
|
|
44
|
+
hasContent(): Promise<boolean>;
|
|
45
|
+
getContent(): Promise<string>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
5
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
5
6
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
7
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
7
8
|
import { platform } from 'vscode/vscode/vs/base/common/platform';
|
|
8
9
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
9
|
-
import {
|
|
10
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
11
|
+
import { API_OPEN_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
10
12
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
13
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
12
14
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
@@ -26,11 +28,11 @@ let KeybindingsResourceInitializer = class KeybindingsResourceInitializer {
|
|
|
26
28
|
await this.fileService.writeFile(this.userDataProfileService.currentProfile.keybindingsResource, VSBuffer.fromString(keybindingsContent.keybindings));
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
KeybindingsResourceInitializer = (
|
|
30
|
-
(
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
], KeybindingsResourceInitializer))
|
|
31
|
+
KeybindingsResourceInitializer = ( __decorate([
|
|
32
|
+
( __param(0, IUserDataProfileService)),
|
|
33
|
+
( __param(1, IFileService)),
|
|
34
|
+
( __param(2, ILogService))
|
|
35
|
+
], KeybindingsResourceInitializer));
|
|
34
36
|
let KeybindingsResource = class KeybindingsResource {
|
|
35
37
|
constructor(fileService, logService) {
|
|
36
38
|
this.fileService = fileService;
|
|
@@ -55,12 +57,10 @@ let KeybindingsResource = class KeybindingsResource {
|
|
|
55
57
|
async getKeybindingsContent(profile) {
|
|
56
58
|
try {
|
|
57
59
|
const content = await this.fileService.readFile(profile.keybindingsResource);
|
|
58
|
-
return (
|
|
59
|
-
(content.value.toString())
|
|
60
|
-
);
|
|
60
|
+
return ( content.value.toString());
|
|
61
61
|
}
|
|
62
62
|
catch (error) {
|
|
63
|
-
if (error instanceof FileOperationError && error.fileOperationResult ===
|
|
63
|
+
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
@@ -69,18 +69,18 @@ let KeybindingsResource = class KeybindingsResource {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
KeybindingsResource = (
|
|
73
|
-
(
|
|
74
|
-
(
|
|
75
|
-
], KeybindingsResource))
|
|
72
|
+
KeybindingsResource = ( __decorate([
|
|
73
|
+
( __param(0, IFileService)),
|
|
74
|
+
( __param(1, ILogService))
|
|
75
|
+
], KeybindingsResource));
|
|
76
76
|
let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
77
77
|
constructor(profile, uriIdentityService, instantiationService) {
|
|
78
78
|
this.profile = profile;
|
|
79
79
|
this.uriIdentityService = uriIdentityService;
|
|
80
80
|
this.instantiationService = instantiationService;
|
|
81
|
-
this.type =
|
|
82
|
-
this.handle =
|
|
83
|
-
this.label = { label: ( localize(
|
|
81
|
+
this.type = ProfileResourceType.Keybindings;
|
|
82
|
+
this.handle = ProfileResourceType.Keybindings;
|
|
83
|
+
this.label = { label: ( localize(11978, "Keyboard Shortcuts")) };
|
|
84
84
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
85
85
|
}
|
|
86
86
|
isFromDefaultProfile() {
|
|
@@ -88,7 +88,7 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
|
88
88
|
}
|
|
89
89
|
async getChildren() {
|
|
90
90
|
return [{
|
|
91
|
-
handle: (
|
|
91
|
+
handle: ( this.profile.keybindingsResource.toString()),
|
|
92
92
|
resourceUri: this.profile.keybindingsResource,
|
|
93
93
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
94
94
|
parent: this,
|
|
@@ -110,9 +110,9 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
|
110
110
|
return this.instantiationService.createInstance(KeybindingsResource).getContent(this.profile);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
KeybindingsResourceTreeItem = (
|
|
114
|
-
(
|
|
115
|
-
(
|
|
116
|
-
], KeybindingsResourceTreeItem))
|
|
113
|
+
KeybindingsResourceTreeItem = ( __decorate([
|
|
114
|
+
( __param(1, IUriIdentityService)),
|
|
115
|
+
( __param(2, IInstantiationService))
|
|
116
|
+
], KeybindingsResourceTreeItem));
|
|
117
117
|
|
|
118
118
|
export { KeybindingsResource, KeybindingsResourceInitializer, KeybindingsResourceTreeItem };
|
package/vscode/src/vs/workbench/services/userDataProfile/browser/media/userDataProfileView.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css
|
|
1
|
+
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
2
|
|
|
3
3
|
var css = ".profile-view-tree-container .customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .actions{display:inherit}.monaco-workbench .pane>.pane-body>.profile-view-message-container{box-sizing:border-box;display:flex;padding:13px 20px 0}.monaco-workbench .pane>.pane-body>.profile-view-message-container p{margin-block-end:0;margin-block-start:0}.monaco-workbench .pane>.pane-body>.profile-view-message-container a{color:var(--vscode-textLink-foreground)}.monaco-workbench .pane>.pane-body>.profile-view-message-container a:hover{color:var(--vscode-textLink-activeForeground);text-decoration:underline}.monaco-workbench .pane>.pane-body>.profile-view-message-container a:active{color:var(--vscode-textLink-activeForeground)}.monaco-workbench .pane>.pane-body>.profile-view-message-container.hide{display:none}.monaco-workbench .pane>.pane-body>.profile-view-buttons-container{box-sizing:border-box;display:flex;flex-direction:column;padding:13px 20px}.monaco-workbench .pane>.pane-body>.profile-view-buttons-container>.monaco-button,.monaco-workbench .pane>.pane-body>.profile-view-buttons-container>.monaco-button-dropdown{margin-block-start:13px;margin-inline-end:0;margin-inline-start:0;margin-left:auto;margin-right:auto;max-width:260px}.monaco-workbench .pane>.pane-body>.profile-view-buttons-container>.monaco-button-dropdown{width:100%}.monaco-workbench .pane>.pane-body>.profile-view-buttons-container>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.profile-edit-widget{padding:4px 6px 0 11px}.profile-edit-widget>.profile-icon-container{display:flex;margin-bottom:8px}.profile-edit-widget>.profile-icon-container>.profile-icon{border-radius:5px;cursor:pointer;padding:3px}.profile-edit-widget>.profile-icon-container>.profile-icon.codicon{font-size:18px}.profile-edit-widget>.profile-icon-container>.profile-icon:hover{background-color:var(--vscode-toolbar-hoverBackground);outline:1px dashed var(--vscode-toolbar-hoverOutline);outline-offset:-1px}.profile-edit-widget>.profile-type-container{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}.profile-edit-widget>.profile-icon-container>.profile-icon-label,.profile-edit-widget>.profile-type-container>.profile-type-create-label{align-items:center;display:inline-flex;width:90px}.profile-edit-widget>.profile-icon-container:only-child>.profile-icon-label{width:45px}.profile-edit-widget>.profile-icon-container>.profile-icon-id{align-items:center;display:inline-flex;font-size:.9em;margin-left:5px;opacity:.8}.profile-edit-widget>.profile-type-container>.profile-type-select-container{align-items:center;display:flex;flex:1;justify-content:center;overflow:hidden}.profile-edit-widget>.profile-type-container>.profile-type-select-container>.monaco-select-box{border-radius:2px;cursor:pointer;line-height:17px;padding:2px 23px 2px 8px}";
|
|
4
4
|
n(css,{});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
2
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { IProfileResource, IProfileResourceChildTreeItem, IProfileResourceInitializer, IProfileResourceTreeItem } from "@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile";
|
|
4
|
+
import { IUserDataProfileService } from "vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
5
|
+
import { IUserDataSyncUtilService } from "vscode/vscode/vs/platform/userDataSync/common/userDataSync.service";
|
|
6
|
+
import { ITreeItemCheckboxState, TreeItemCollapsibleState } from "vscode/vscode/vs/workbench/common/views";
|
|
7
|
+
import { IUserDataProfile, ProfileResourceType } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
8
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
10
|
+
interface ISettingsContent {
|
|
11
|
+
settings: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare class SettingsResourceInitializer implements IProfileResourceInitializer {
|
|
14
|
+
private readonly userDataProfileService;
|
|
15
|
+
private readonly fileService;
|
|
16
|
+
private readonly logService;
|
|
17
|
+
constructor(userDataProfileService: IUserDataProfileService, fileService: IFileService, logService: ILogService);
|
|
18
|
+
initialize(content: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare class SettingsResource implements IProfileResource {
|
|
21
|
+
private readonly fileService;
|
|
22
|
+
private readonly userDataSyncUtilService;
|
|
23
|
+
private readonly logService;
|
|
24
|
+
constructor(fileService: IFileService, userDataSyncUtilService: IUserDataSyncUtilService, logService: ILogService);
|
|
25
|
+
getContent(profile: IUserDataProfile): Promise<string>;
|
|
26
|
+
getSettingsContent(profile: IUserDataProfile): Promise<ISettingsContent>;
|
|
27
|
+
apply(content: string, profile: IUserDataProfile): Promise<void>;
|
|
28
|
+
private getIgnoredSettings;
|
|
29
|
+
private getLocalFileContent;
|
|
30
|
+
}
|
|
31
|
+
export declare class SettingsResourceTreeItem implements IProfileResourceTreeItem {
|
|
32
|
+
private readonly profile;
|
|
33
|
+
private readonly uriIdentityService;
|
|
34
|
+
private readonly instantiationService;
|
|
35
|
+
readonly type = ProfileResourceType.Settings;
|
|
36
|
+
readonly handle = ProfileResourceType.Settings;
|
|
37
|
+
readonly label: {
|
|
38
|
+
label: string;
|
|
39
|
+
};
|
|
40
|
+
readonly collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
41
|
+
checkbox: ITreeItemCheckboxState | undefined;
|
|
42
|
+
constructor(profile: IUserDataProfile, uriIdentityService: IUriIdentityService, instantiationService: IInstantiationService);
|
|
43
|
+
getChildren(): Promise<IProfileResourceChildTreeItem[]>;
|
|
44
|
+
hasContent(): Promise<boolean>;
|
|
45
|
+
getContent(): Promise<string>;
|
|
46
|
+
isFromDefaultProfile(): boolean;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
|
-
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
+
import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
5
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
6
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
6
7
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
7
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
9
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
9
|
-
import { updateIgnoredSettings } from 'vscode/vscode/vs/platform/userDataSync/common/settingsMerge';
|
|
10
|
+
import { updateIgnoredSettings } from '@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/platform/userDataSync/common/settingsMerge';
|
|
10
11
|
import { IUserDataSyncUtilService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
11
12
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
12
|
-
import {
|
|
13
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
14
|
+
import { API_OPEN_EDITOR_COMMAND_ID } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
13
15
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
16
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
15
17
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
@@ -29,11 +31,11 @@ let SettingsResourceInitializer = class SettingsResourceInitializer {
|
|
|
29
31
|
await this.fileService.writeFile(this.userDataProfileService.currentProfile.settingsResource, VSBuffer.fromString(settingsContent.settings));
|
|
30
32
|
}
|
|
31
33
|
};
|
|
32
|
-
SettingsResourceInitializer = (
|
|
33
|
-
(
|
|
34
|
-
(
|
|
35
|
-
(
|
|
36
|
-
], SettingsResourceInitializer))
|
|
34
|
+
SettingsResourceInitializer = ( __decorate([
|
|
35
|
+
( __param(0, IUserDataProfileService)),
|
|
36
|
+
( __param(1, IFileService)),
|
|
37
|
+
( __param(2, ILogService))
|
|
38
|
+
], SettingsResourceInitializer));
|
|
37
39
|
let SettingsResource = class SettingsResource {
|
|
38
40
|
constructor(fileService, userDataSyncUtilService, logService) {
|
|
39
41
|
this.fileService = fileService;
|
|
@@ -68,19 +70,17 @@ let SettingsResource = class SettingsResource {
|
|
|
68
70
|
await this.fileService.writeFile(profile.settingsResource, VSBuffer.fromString(contentToUpdate));
|
|
69
71
|
}
|
|
70
72
|
getIgnoredSettings() {
|
|
71
|
-
const allSettings = (
|
|
72
|
-
const ignoredSettings = (
|
|
73
|
+
const allSettings = ( Registry.as(Extensions.Configuration)).getConfigurationProperties();
|
|
74
|
+
const ignoredSettings = ( Object.keys(allSettings)).filter(key => allSettings[key]?.scope === ConfigurationScope.MACHINE || allSettings[key]?.scope === ConfigurationScope.MACHINE_OVERRIDABLE);
|
|
73
75
|
return ignoredSettings;
|
|
74
76
|
}
|
|
75
77
|
async getLocalFileContent(profile) {
|
|
76
78
|
try {
|
|
77
79
|
const content = await this.fileService.readFile(profile.settingsResource);
|
|
78
|
-
return (
|
|
79
|
-
(content.value.toString())
|
|
80
|
-
);
|
|
80
|
+
return ( content.value.toString());
|
|
81
81
|
}
|
|
82
82
|
catch (error) {
|
|
83
|
-
if (error instanceof FileOperationError && error.fileOperationResult ===
|
|
83
|
+
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
@@ -89,24 +89,24 @@ let SettingsResource = class SettingsResource {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
SettingsResource = (
|
|
93
|
-
(
|
|
94
|
-
(
|
|
95
|
-
(
|
|
96
|
-
], SettingsResource))
|
|
92
|
+
SettingsResource = ( __decorate([
|
|
93
|
+
( __param(0, IFileService)),
|
|
94
|
+
( __param(1, IUserDataSyncUtilService)),
|
|
95
|
+
( __param(2, ILogService))
|
|
96
|
+
], SettingsResource));
|
|
97
97
|
let SettingsResourceTreeItem = class SettingsResourceTreeItem {
|
|
98
98
|
constructor(profile, uriIdentityService, instantiationService) {
|
|
99
99
|
this.profile = profile;
|
|
100
100
|
this.uriIdentityService = uriIdentityService;
|
|
101
101
|
this.instantiationService = instantiationService;
|
|
102
|
-
this.type =
|
|
103
|
-
this.handle =
|
|
104
|
-
this.label = { label: ( localize(
|
|
102
|
+
this.type = ProfileResourceType.Settings;
|
|
103
|
+
this.handle = ProfileResourceType.Settings;
|
|
104
|
+
this.label = { label: ( localize(11979, "Settings")) };
|
|
105
105
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
106
106
|
}
|
|
107
107
|
async getChildren() {
|
|
108
108
|
return [{
|
|
109
|
-
handle: (
|
|
109
|
+
handle: ( this.profile.settingsResource.toString()),
|
|
110
110
|
resourceUri: this.profile.settingsResource,
|
|
111
111
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
112
112
|
parent: this,
|
|
@@ -131,9 +131,9 @@ let SettingsResourceTreeItem = class SettingsResourceTreeItem {
|
|
|
131
131
|
return !this.profile.isDefault && !!this.profile.useDefaultFlags?.settings;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
SettingsResourceTreeItem = (
|
|
135
|
-
(
|
|
136
|
-
(
|
|
137
|
-
], SettingsResourceTreeItem))
|
|
134
|
+
SettingsResourceTreeItem = ( __decorate([
|
|
135
|
+
( __param(1, IUriIdentityService)),
|
|
136
|
+
( __param(2, IInstantiationService))
|
|
137
|
+
], SettingsResourceTreeItem));
|
|
138
138
|
|
|
139
139
|
export { SettingsResource, SettingsResourceInitializer, SettingsResourceTreeItem };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ResourceSet } from "vscode/vscode/vs/base/common/map";
|
|
2
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
3
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
4
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
6
|
+
import { IUserDataProfile, ProfileResourceType } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
7
|
+
import { ITreeItemCheckboxState, TreeItemCollapsibleState } from "vscode/vscode/vs/workbench/common/views";
|
|
8
|
+
import { IProfileResource, IProfileResourceChildTreeItem, IProfileResourceInitializer, IProfileResourceTreeItem } from "@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile";
|
|
9
|
+
import { IUserDataProfileService } from "vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
10
|
+
export declare class SnippetsResourceInitializer implements IProfileResourceInitializer {
|
|
11
|
+
private readonly userDataProfileService;
|
|
12
|
+
private readonly fileService;
|
|
13
|
+
private readonly uriIdentityService;
|
|
14
|
+
constructor(userDataProfileService: IUserDataProfileService, fileService: IFileService, uriIdentityService: IUriIdentityService);
|
|
15
|
+
initialize(content: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class SnippetsResource implements IProfileResource {
|
|
18
|
+
private readonly fileService;
|
|
19
|
+
private readonly uriIdentityService;
|
|
20
|
+
constructor(fileService: IFileService, uriIdentityService: IUriIdentityService);
|
|
21
|
+
getContent(profile: IUserDataProfile, excluded?: ResourceSet): Promise<string>;
|
|
22
|
+
apply(content: string, profile: IUserDataProfile): Promise<void>;
|
|
23
|
+
private getSnippets;
|
|
24
|
+
getSnippetsResources(profile: IUserDataProfile, excluded?: ResourceSet): Promise<URI[]>;
|
|
25
|
+
}
|
|
26
|
+
export declare class SnippetsResourceTreeItem implements IProfileResourceTreeItem {
|
|
27
|
+
private readonly profile;
|
|
28
|
+
private readonly instantiationService;
|
|
29
|
+
private readonly uriIdentityService;
|
|
30
|
+
readonly type = ProfileResourceType.Snippets;
|
|
31
|
+
readonly handle: string;
|
|
32
|
+
readonly label: {
|
|
33
|
+
label: string;
|
|
34
|
+
};
|
|
35
|
+
readonly collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
36
|
+
checkbox: ITreeItemCheckboxState | undefined;
|
|
37
|
+
private readonly excludedSnippets;
|
|
38
|
+
constructor(profile: IUserDataProfile, instantiationService: IInstantiationService, uriIdentityService: IUriIdentityService);
|
|
39
|
+
getChildren(): Promise<IProfileResourceChildTreeItem[] | undefined>;
|
|
40
|
+
hasContent(): Promise<boolean>;
|
|
41
|
+
getContent(): Promise<string>;
|
|
42
|
+
isFromDefaultProfile(): boolean;
|
|
43
|
+
}
|