@codingame/monaco-vscode-base-service-override 15.0.2 → 16.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/package.json +12 -9
- package/vscode/src/vs/platform/request/common/requestIpc.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchEditorWorkerService.js +3 -2
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.d.ts +3 -1
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +20 -10
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +1 -1
- package/vscode/src/vs/workbench/services/label/common/labelService.js +13 -13
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.d.ts +0 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - base service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common": "
|
|
19
|
-
"@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "
|
|
20
|
-
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-api": "
|
|
25
|
-
"@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "
|
|
18
|
+
"@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common": "16.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "16.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "16.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common": "16.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common": "16.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common": "16.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-api": "16.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "16.0.0"
|
|
26
26
|
},
|
|
27
27
|
"main": "index.js",
|
|
28
28
|
"module": "index.js",
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
".": {
|
|
32
32
|
"default": "./index.js"
|
|
33
33
|
},
|
|
34
|
+
"./vscode/*.css": {
|
|
35
|
+
"default": "./vscode/src/*.css"
|
|
36
|
+
},
|
|
34
37
|
"./vscode/*": {
|
|
35
38
|
"types": "./vscode/src/*.d.ts",
|
|
36
39
|
"default": "./vscode/src/*.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
-
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common/vscode/vs/base/parts/ipc/common/ipc";
|
|
4
4
|
import { IRequestContext, IRequestOptions } from "@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common/vscode/vs/base/parts/request/common/request";
|
|
5
5
|
import { AuthInfo, Credentials } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request";
|
|
6
6
|
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import {
|
|
3
|
+
import { WebWorkerDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/webWorkerFactory';
|
|
4
|
+
import { FileAccess } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
4
5
|
import { EditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/editorWorkerService';
|
|
5
6
|
import { ILanguageConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/languageConfigurationRegistry.service';
|
|
6
7
|
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
@@ -10,7 +11,7 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
10
11
|
|
|
11
12
|
let WorkbenchEditorWorkerService = class WorkbenchEditorWorkerService extends EditorWorkerService {
|
|
12
13
|
constructor(modelService, configurationService, logService, languageConfigurationService, languageFeaturesService) {
|
|
13
|
-
const workerDescriptor = ( new
|
|
14
|
+
const workerDescriptor = ( new WebWorkerDescriptor(( FileAccess.asBrowserUri('vs/editor/common/services/editorWebWorkerMain.js')), 'TextEditorWorker'));
|
|
14
15
|
super(workerDescriptor, modelService, configurationService, logService, languageConfigurationService, languageFeaturesService);
|
|
15
16
|
}
|
|
16
17
|
};
|
|
@@ -4,13 +4,15 @@ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/fi
|
|
|
4
4
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
5
5
|
import { IJSONValue } from "@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common/vscode/vs/workbench/services/configuration/common/jsonEditing";
|
|
6
6
|
import { IJSONEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/jsonEditing.service";
|
|
7
|
+
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
7
8
|
export declare class JSONEditingService implements IJSONEditingService {
|
|
8
9
|
private readonly fileService;
|
|
9
10
|
private readonly textModelResolverService;
|
|
10
11
|
private readonly textFileService;
|
|
12
|
+
private readonly filesConfigurationService;
|
|
11
13
|
_serviceBrand: undefined;
|
|
12
14
|
private queue;
|
|
13
|
-
constructor(fileService: IFileService, textModelResolverService: ITextModelService, textFileService: ITextFileService);
|
|
15
|
+
constructor(fileService: IFileService, textModelResolverService: ITextModelService, textFileService: ITextFileService, filesConfigurationService: IFilesConfigurationService);
|
|
14
16
|
write(resource: URI, values: IJSONValue[]): Promise<void>;
|
|
15
17
|
private doWriteConfiguration;
|
|
16
18
|
private writeToBuffer;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
5
|
-
import { setProperty } from '@codingame/monaco-vscode-
|
|
5
|
+
import { setProperty } from '@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common/vscode/vs/base/common/jsonEdit';
|
|
6
6
|
import { Queue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
7
7
|
import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
|
|
8
8
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
@@ -13,12 +13,14 @@ import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor
|
|
|
13
13
|
import { JSONEditingErrorCode, JSONEditingError } from '@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common/vscode/vs/workbench/services/configuration/common/jsonEditing';
|
|
14
14
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
16
|
+
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
16
17
|
|
|
17
18
|
let JSONEditingService = class JSONEditingService {
|
|
18
|
-
constructor(fileService, textModelResolverService, textFileService) {
|
|
19
|
+
constructor(fileService, textModelResolverService, textFileService, filesConfigurationService) {
|
|
19
20
|
this.fileService = fileService;
|
|
20
21
|
this.textModelResolverService = textModelResolverService;
|
|
21
22
|
this.textFileService = textFileService;
|
|
23
|
+
this.filesConfigurationService = filesConfigurationService;
|
|
22
24
|
this.queue = ( new Queue());
|
|
23
25
|
}
|
|
24
26
|
write(resource, values) {
|
|
@@ -34,13 +36,20 @@ let JSONEditingService = class JSONEditingService {
|
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
async writeToBuffer(model, values) {
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
hasEdits =
|
|
39
|
+
let disposable;
|
|
40
|
+
try {
|
|
41
|
+
disposable = this.filesConfigurationService.enableAutoSaveAfterShortDelay(model.uri);
|
|
42
|
+
let hasEdits = false;
|
|
43
|
+
for (const value of values) {
|
|
44
|
+
const edit = this.getEdits(model, value)[0];
|
|
45
|
+
hasEdits = (!!edit && this.applyEditsToBuffer(edit, model)) || hasEdits;
|
|
46
|
+
}
|
|
47
|
+
if (hasEdits) {
|
|
48
|
+
return this.textFileService.save(model.uri);
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
finally {
|
|
52
|
+
disposable?.dispose();
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
applyEditsToBuffer(edit, model) {
|
|
@@ -108,7 +117,7 @@ let JSONEditingService = class JSONEditingService {
|
|
|
108
117
|
switch (error) {
|
|
109
118
|
case JSONEditingErrorCode.ERROR_INVALID_FILE: {
|
|
110
119
|
return localize(
|
|
111
|
-
|
|
120
|
+
11971,
|
|
112
121
|
"Unable to write into the file. Please open the file to correct errors/warnings in the file and try again."
|
|
113
122
|
);
|
|
114
123
|
}
|
|
@@ -118,7 +127,8 @@ let JSONEditingService = class JSONEditingService {
|
|
|
118
127
|
JSONEditingService = ( __decorate([
|
|
119
128
|
( __param(0, IFileService)),
|
|
120
129
|
( __param(1, ITextModelService)),
|
|
121
|
-
( __param(2, ITextFileService))
|
|
130
|
+
( __param(2, ITextFileService)),
|
|
131
|
+
( __param(3, IFilesConfigurationService))
|
|
122
132
|
], JSONEditingService));
|
|
123
133
|
|
|
124
134
|
export { JSONEditingService };
|
|
@@ -161,7 +161,7 @@ class DecorationStyles {
|
|
|
161
161
|
const strikethrough = ( data.some(d => d.strikethrough));
|
|
162
162
|
if (onlyChildren) {
|
|
163
163
|
badgeClassName = rule.bubbleBadgeClassName;
|
|
164
|
-
tooltip = ( localize(
|
|
164
|
+
tooltip = ( localize(12010, "Contains emphasized items"));
|
|
165
165
|
}
|
|
166
166
|
return {
|
|
167
167
|
labelClassName,
|
|
@@ -31,7 +31,7 @@ import { Memento } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7a
|
|
|
31
31
|
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
32
32
|
extensionPoint: 'resourceLabelFormatters',
|
|
33
33
|
jsonSchema: {
|
|
34
|
-
description: ( localize(
|
|
34
|
+
description: ( localize(12307, 'Contributes resource label formatting rules.')),
|
|
35
35
|
type: 'array',
|
|
36
36
|
items: {
|
|
37
37
|
type: 'object',
|
|
@@ -40,52 +40,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
|
|
|
40
40
|
scheme: {
|
|
41
41
|
type: 'string',
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
12308,
|
|
44
44
|
'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
|
|
45
45
|
)),
|
|
46
46
|
},
|
|
47
47
|
authority: {
|
|
48
48
|
type: 'string',
|
|
49
49
|
description: ( localize(
|
|
50
|
-
|
|
50
|
+
12309,
|
|
51
51
|
'URI authority on which to match the formatter on. Simple glob patterns are supported.'
|
|
52
52
|
)),
|
|
53
53
|
},
|
|
54
54
|
formatting: {
|
|
55
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(12310, "Rules for formatting uri resource labels.")),
|
|
56
56
|
type: 'object',
|
|
57
57
|
properties: {
|
|
58
58
|
label: {
|
|
59
59
|
type: 'string',
|
|
60
60
|
description: ( localize(
|
|
61
|
-
|
|
61
|
+
12311,
|
|
62
62
|
"Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
|
|
63
63
|
))
|
|
64
64
|
},
|
|
65
65
|
separator: {
|
|
66
66
|
type: 'string',
|
|
67
67
|
description: ( localize(
|
|
68
|
-
|
|
68
|
+
12312,
|
|
69
69
|
"Separator to be used in the uri label display. '/' or '\' as an example."
|
|
70
70
|
))
|
|
71
71
|
},
|
|
72
72
|
stripPathStartingSeparator: {
|
|
73
73
|
type: 'boolean',
|
|
74
74
|
description: ( localize(
|
|
75
|
-
|
|
75
|
+
12313,
|
|
76
76
|
"Controls whether `${path}` substitutions should have starting separator characters stripped."
|
|
77
77
|
))
|
|
78
78
|
},
|
|
79
79
|
tildify: {
|
|
80
80
|
type: 'boolean',
|
|
81
81
|
description: ( localize(
|
|
82
|
-
|
|
82
|
+
12314,
|
|
83
83
|
"Controls if the start of the uri label should be tildified when possible."
|
|
84
84
|
))
|
|
85
85
|
},
|
|
86
86
|
workspaceSuffix: {
|
|
87
87
|
type: 'string',
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(12315, "Suffix appended to the workspace label."))
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -267,10 +267,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
267
267
|
}
|
|
268
268
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
269
269
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
270
|
-
return localize(
|
|
270
|
+
return localize(12316, "Untitled (Workspace)");
|
|
271
271
|
}
|
|
272
272
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
273
|
-
return localize(
|
|
273
|
+
return localize(12317, "Workspace");
|
|
274
274
|
}
|
|
275
275
|
let filename = basename(workspaceUri);
|
|
276
276
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -283,14 +283,14 @@ let LabelService = class LabelService extends Disposable {
|
|
|
283
283
|
break;
|
|
284
284
|
case Verbosity.LONG:
|
|
285
285
|
label = ( localize(
|
|
286
|
-
|
|
286
|
+
12318,
|
|
287
287
|
"{0} (Workspace)",
|
|
288
288
|
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
289
289
|
));
|
|
290
290
|
break;
|
|
291
291
|
case Verbosity.MEDIUM:
|
|
292
292
|
default:
|
|
293
|
-
label = ( localize(
|
|
293
|
+
label = ( localize(12319, "{0} (Workspace)", filename));
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
296
296
|
if (options?.verbose === Verbosity.SHORT) {
|
|
@@ -13,7 +13,7 @@ import { windowLogGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
13
13
|
|
|
14
14
|
let BrowserRequestService = class BrowserRequestService extends AbstractRequestService {
|
|
15
15
|
constructor(remoteAgentService, configurationService, loggerService) {
|
|
16
|
-
const logger = loggerService.createLogger(`network`, { name: ( localize(
|
|
16
|
+
const logger = loggerService.createLogger(`network`, { name: ( localize(12423, "Network")), group: windowLogGroup });
|
|
17
17
|
const logService = ( new LogService(logger));
|
|
18
18
|
super(logService);
|
|
19
19
|
this.remoteAgentService = remoteAgentService;
|
package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js
CHANGED
|
@@ -27,13 +27,13 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
27
27
|
const cts = ( new CancellationTokenSource(token));
|
|
28
28
|
workingCopy.model?.pushStackElement();
|
|
29
29
|
progress.report({
|
|
30
|
-
message: ( localize(
|
|
30
|
+
message: ( localize(12808, "Running Code Actions and Formatters..."))
|
|
31
31
|
});
|
|
32
32
|
let bubbleCancel = false;
|
|
33
33
|
await this.progressService.withProgress({
|
|
34
34
|
priority: NotificationPriority.URGENT,
|
|
35
35
|
location: ProgressLocation.Notification,
|
|
36
|
-
cancellable: ( localize(
|
|
36
|
+
cancellable: ( localize(12809, "Skip")),
|
|
37
37
|
delay: workingCopy.isDirty() ? 5000 : 3000
|
|
38
38
|
}, async (progress) => {
|
|
39
39
|
const participants = Array.from(this.saveParticipants).sort((a, b) => {
|
|
@@ -59,7 +59,6 @@ export type WorkingCopyProvider = (resourceOrFolder: URI) => IWorkingCopy[];
|
|
|
59
59
|
export declare class WorkingCopyFileService extends Disposable implements IWorkingCopyFileService {
|
|
60
60
|
private readonly fileService;
|
|
61
61
|
private readonly workingCopyService;
|
|
62
|
-
private readonly instantiationService;
|
|
63
62
|
private readonly uriIdentityService;
|
|
64
63
|
readonly _serviceBrand: undefined;
|
|
65
64
|
private readonly _onWillRunWorkingCopyFileOperation;
|
|
@@ -19,7 +19,6 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
19
19
|
super();
|
|
20
20
|
this.fileService = fileService;
|
|
21
21
|
this.workingCopyService = workingCopyService;
|
|
22
|
-
this.instantiationService = instantiationService;
|
|
23
22
|
this.uriIdentityService = uriIdentityService;
|
|
24
23
|
this._onWillRunWorkingCopyFileOperation = this._register(( new AsyncEmitter()));
|
|
25
24
|
this.onWillRunWorkingCopyFileOperation = this._onWillRunWorkingCopyFileOperation.event;
|
|
@@ -28,9 +27,9 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
28
27
|
this._onDidRunWorkingCopyFileOperation = this._register(( new AsyncEmitter()));
|
|
29
28
|
this.onDidRunWorkingCopyFileOperation = this._onDidRunWorkingCopyFileOperation.event;
|
|
30
29
|
this.correlationIds = 0;
|
|
31
|
-
this.fileOperationParticipants = this._register(this.instantiationService.createInstance(WorkingCopyFileOperationParticipant));
|
|
32
|
-
this.saveParticipants = this._register(this.instantiationService.createInstance(StoredFileWorkingCopySaveParticipant));
|
|
33
30
|
this.workingCopyProviders = [];
|
|
31
|
+
this.fileOperationParticipants = this._register(instantiationService.createInstance(WorkingCopyFileOperationParticipant));
|
|
32
|
+
this.saveParticipants = this._register(instantiationService.createInstance(StoredFileWorkingCopySaveParticipant));
|
|
34
33
|
this._register(this.registerWorkingCopyProvider(resource => {
|
|
35
34
|
return this.workingCopyService.workingCopies.filter(workingCopy => {
|
|
36
35
|
if (this.fileService.hasProvider(resource)) {
|