@codingame/monaco-vscode-base-service-override 5.3.0 → 6.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/base.js +4 -4
- package/package.json +2 -2
- package/vscode/src/vs/platform/url/common/urlService.js +2 -0
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditing.js +5 -1
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +4 -3
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +1 -0
- package/vscode/src/vs/workbench/services/path/browser/pathService.js +1 -0
- package/vscode/src/vs/workbench/services/path/common/pathService.js +4 -4
- package/vscode/src/vs/workbench/services/url/browser/urlService.js +1 -0
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +1 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js +8 -6
- package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js +1 -0
- package/vscode/src/vs/workbench/services/views/common/treeViewsService.js +0 -21
package/base.js
CHANGED
|
@@ -4,14 +4,12 @@ import { IRequestService } from 'vscode/vscode/vs/platform/request/common/reques
|
|
|
4
4
|
import { IDecorationsService } from 'vscode/vscode/vs/workbench/services/decorations/common/decorations.service';
|
|
5
5
|
import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing.service';
|
|
6
6
|
import { ITreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDndService';
|
|
7
|
-
import { ITreeViewsService } from 'vscode/vscode/vs/workbench/services/views/browser/treeViewsService.service';
|
|
8
7
|
import { TreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDnd';
|
|
9
8
|
import { IURLService } from 'vscode/vscode/vs/platform/url/common/url.service';
|
|
10
9
|
import { JSONEditingService } from './vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js';
|
|
11
10
|
import { DecorationsService } from './vscode/src/vs/workbench/services/decorations/browser/decorationsService.js';
|
|
12
11
|
import { BrowserRequestService } from './vscode/src/vs/workbench/services/request/browser/requestService.js';
|
|
13
12
|
import { BrowserURLService } from './vscode/src/vs/workbench/services/url/browser/urlService.js';
|
|
14
|
-
import { TreeviewsService } from './vscode/src/vs/workbench/services/views/common/treeViewsService.js';
|
|
15
13
|
import { CanonicalUriService } from './vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js';
|
|
16
14
|
import { ICanonicalUriService } from 'vscode/vscode/vs/platform/workspace/common/canonicalUri.service';
|
|
17
15
|
import { IUserActivityService } from 'vscode/vscode/vs/workbench/services/userActivity/common/userActivityService.service';
|
|
@@ -26,6 +24,8 @@ import { guessLocalUserHome } from './vscode/src/vs/workbench/services/path/brow
|
|
|
26
24
|
import { AbstractPathService } from './vscode/src/vs/workbench/services/path/common/pathService.js';
|
|
27
25
|
import { UserActivityService } from './vscode/src/vs/workbench/services/userActivity/common/userActivityService.js';
|
|
28
26
|
import { WorkingCopyFileService } from './vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js';
|
|
27
|
+
import { ITrustedDomainService } from 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomainService.service';
|
|
28
|
+
import { TrustedDomainService } from 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomainService';
|
|
29
29
|
import { getEnvironmentOverride } from 'vscode/workbench';
|
|
30
30
|
|
|
31
31
|
let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
|
|
@@ -45,12 +45,12 @@ function getServiceOverride() {
|
|
|
45
45
|
[( IDecorationsService.toString())]: new SyncDescriptor(DecorationsService, [], true),
|
|
46
46
|
[( IJSONEditingService.toString())]: new SyncDescriptor(JSONEditingService, [], true),
|
|
47
47
|
[( ITreeViewsDnDService.toString())]: new SyncDescriptor(TreeViewsDnDService, [], true),
|
|
48
|
-
[( ITreeViewsService.toString())]: new SyncDescriptor(TreeviewsService, [], true),
|
|
49
48
|
[( IURLService.toString())]: new SyncDescriptor(BrowserURLService, [], true),
|
|
50
49
|
[( ICanonicalUriService.toString())]: new SyncDescriptor(CanonicalUriService, [], false),
|
|
51
50
|
[( IUserActivityService.toString())]: new SyncDescriptor(UserActivityService, [], true),
|
|
52
51
|
[( IWorkingCopyFileService.toString())]: new SyncDescriptor(WorkingCopyFileService, [], false),
|
|
53
|
-
[( IPathService.toString())]: new SyncDescriptor(BrowserPathServiceOverride, [], true)
|
|
52
|
+
[( IPathService.toString())]: new SyncDescriptor(BrowserPathServiceOverride, [], true),
|
|
53
|
+
[( ITrustedDomainService.toString())]: new SyncDescriptor(TrustedDomainService, [], true)
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { first } from 'vscode/vscode/vs/base/common/async';
|
|
2
2
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import 'vscode/vscode/vs/base/common/charCode';
|
|
4
|
+
import 'vscode/vscode/vs/base/common/marshallingIds';
|
|
3
5
|
import 'vscode/vscode/vs/base/common/path';
|
|
4
6
|
import 'vscode/vscode/vs/base/common/platform';
|
|
5
7
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var JSONEditingErrorCode;
|
|
2
|
+
( (function(JSONEditingErrorCode) {
|
|
3
|
+
JSONEditingErrorCode[JSONEditingErrorCode["ERROR_INVALID_FILE"] = 0] = "ERROR_INVALID_FILE";
|
|
4
|
+
})(JSONEditingErrorCode || (JSONEditingErrorCode = {})));
|
|
1
5
|
class JSONEditingError extends Error {
|
|
2
6
|
constructor(message, code) {
|
|
3
7
|
super(message);
|
|
@@ -5,4 +9,4 @@ class JSONEditingError extends Error {
|
|
|
5
9
|
}
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
export { JSONEditingError };
|
|
12
|
+
export { JSONEditingError, JSONEditingErrorCode };
|
|
@@ -9,8 +9,9 @@ import { Selection } from 'vscode/vscode/vs/editor/common/core/selection';
|
|
|
9
9
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
10
10
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
11
11
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
12
|
-
import { JSONEditingError } from './jsonEditing.js';
|
|
12
|
+
import { JSONEditingErrorCode, JSONEditingError } from './jsonEditing.js';
|
|
13
13
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
14
15
|
|
|
15
16
|
const _moduleId = "vs/workbench/services/configuration/common/jsonEditingService";
|
|
16
17
|
let JSONEditingService = class JSONEditingService {
|
|
@@ -95,7 +96,7 @@ let JSONEditingService = class JSONEditingService {
|
|
|
95
96
|
const model = reference.object.textEditorModel;
|
|
96
97
|
if (this.hasParseErrors(model)) {
|
|
97
98
|
reference.dispose();
|
|
98
|
-
return this.reject(
|
|
99
|
+
return this.reject(JSONEditingErrorCode.ERROR_INVALID_FILE);
|
|
99
100
|
}
|
|
100
101
|
return reference;
|
|
101
102
|
}
|
|
@@ -105,7 +106,7 @@ let JSONEditingService = class JSONEditingService {
|
|
|
105
106
|
}
|
|
106
107
|
toErrorMessage(error) {
|
|
107
108
|
switch (error) {
|
|
108
|
-
case
|
|
109
|
+
case JSONEditingErrorCode.ERROR_INVALID_FILE: {
|
|
109
110
|
return ( localizeWithPath(
|
|
110
111
|
_moduleId,
|
|
111
112
|
0,
|
|
@@ -12,6 +12,7 @@ import { isFalsyOrWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
|
12
12
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
13
13
|
import { isCancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
14
14
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
15
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
15
16
|
import { hash } from 'vscode/vscode/vs/base/common/hash';
|
|
16
17
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
17
18
|
import { distinct, asArray } from 'vscode/vscode/vs/base/common/arrays';
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { isValidBasename } from 'vscode/vscode/vs/base/common/extpath';
|
|
3
3
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
4
|
import { win32, posix } from 'vscode/vscode/vs/base/common/path';
|
|
5
|
-
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
5
|
+
import { OS, OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
6
6
|
import { basename } from 'vscode/vscode/vs/base/common/resources';
|
|
7
7
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
8
|
import { getVirtualWorkspaceScheme } from 'vscode/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
@@ -35,7 +35,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
35
35
|
}
|
|
36
36
|
doHasValidBasename(resource, os, name) {
|
|
37
37
|
if (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeRemote) {
|
|
38
|
-
return isValidBasename(name ?? basename(resource), os ===
|
|
38
|
+
return isValidBasename(name ?? basename(resource), os === OperatingSystem.Windows);
|
|
39
39
|
}
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
@@ -68,7 +68,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
68
68
|
}
|
|
69
69
|
get path() {
|
|
70
70
|
return this.resolveOS.then(os => {
|
|
71
|
-
return os ===
|
|
71
|
+
return os === OperatingSystem.Windows ?
|
|
72
72
|
win32 :
|
|
73
73
|
posix;
|
|
74
74
|
});
|
|
@@ -76,7 +76,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
76
76
|
async fileURI(_path) {
|
|
77
77
|
let authority = '';
|
|
78
78
|
const os = await this.resolveOS;
|
|
79
|
-
if (os ===
|
|
79
|
+
if (os === OperatingSystem.Windows) {
|
|
80
80
|
_path = _path.replace(/\\/g, '/');
|
|
81
81
|
}
|
|
82
82
|
if (_path[0] === '/' && _path[1] === '/') {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
3
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
4
5
|
import { AbstractURLService } from '../../../../platform/url/common/urlService.js';
|
|
5
6
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
6
7
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -2,6 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { RunOnceScheduler, runWhenGlobalIdle } from 'vscode/vscode/vs/base/common/async';
|
|
3
3
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
7
|
import { userActivityRegistry } from './userActivityRegistry.js';
|
|
7
8
|
|
package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js
CHANGED
|
@@ -3,6 +3,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
4
4
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
6
7
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
7
8
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
9
|
import { insert } from 'vscode/vscode/vs/base/common/arrays';
|
|
@@ -24,7 +25,7 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
24
25
|
const cts = ( (new CancellationTokenSource(token)));
|
|
25
26
|
return this.progressService.withProgress({
|
|
26
27
|
title: ( localizeWithPath(_moduleId, 0, "Saving '{0}'", workingCopy.name)),
|
|
27
|
-
location:
|
|
28
|
+
location: ProgressLocation.Notification,
|
|
28
29
|
cancellable: true,
|
|
29
30
|
delay: workingCopy.isDirty() ? 3000 : 5000
|
|
30
31
|
}, async (progress) => {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
4
|
import { AsyncEmitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
5
|
import { Promises } from 'vscode/vscode/vs/base/common/async';
|
|
5
6
|
import { insert } from 'vscode/vscode/vs/base/common/arrays';
|
|
6
7
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
7
9
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
8
10
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
9
11
|
import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
@@ -57,8 +59,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
const files = ( operations.map(operation => ({ target: operation.resource })));
|
|
60
|
-
await this.runFileOperationParticipants(files,
|
|
61
|
-
const event = { correlationId: this.correlationIds++, operation:
|
|
62
|
+
await this.runFileOperationParticipants(files, FileOperation.CREATE, undoInfo, token);
|
|
63
|
+
const event = { correlationId: this.correlationIds++, operation: FileOperation.CREATE, files };
|
|
62
64
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
63
65
|
let stats;
|
|
64
66
|
try {
|
|
@@ -93,8 +95,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
const files = ( operations.map(o => o.file));
|
|
96
|
-
await this.runFileOperationParticipants(files, move ?
|
|
97
|
-
const event = { correlationId: this.correlationIds++, operation: move ?
|
|
98
|
+
await this.runFileOperationParticipants(files, move ? FileOperation.MOVE : FileOperation.COPY, undoInfo, token);
|
|
99
|
+
const event = { correlationId: this.correlationIds++, operation: move ? FileOperation.MOVE : FileOperation.COPY, files };
|
|
98
100
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
99
101
|
try {
|
|
100
102
|
for (const { file: { source, target }, overwrite } of operations) {
|
|
@@ -125,8 +127,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
const files = ( operations.map(operation => ({ target: operation.resource })));
|
|
128
|
-
await this.runFileOperationParticipants(files,
|
|
129
|
-
const event = { correlationId: this.correlationIds++, operation:
|
|
130
|
+
await this.runFileOperationParticipants(files, FileOperation.DELETE, undoInfo, token);
|
|
131
|
+
const event = { correlationId: this.correlationIds++, operation: FileOperation.DELETE, files };
|
|
130
132
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
131
133
|
for (const operation of operations) {
|
|
132
134
|
const dirtyWorkingCopies = this.getDirty(operation.resource);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
class TreeviewsService {
|
|
2
|
-
constructor() {
|
|
3
|
-
this._renderedElements = ( new Map());
|
|
4
|
-
}
|
|
5
|
-
getRenderedTreeElement(node) {
|
|
6
|
-
if (( this._renderedElements.has(node))) {
|
|
7
|
-
return this._renderedElements.get(node);
|
|
8
|
-
}
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
addRenderedTreeItemElement(node, element) {
|
|
12
|
-
this._renderedElements.set(node, element);
|
|
13
|
-
}
|
|
14
|
-
removeRenderedTreeItemElement(node) {
|
|
15
|
-
if (( this._renderedElements.has(node))) {
|
|
16
|
-
this._renderedElements.delete(node);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { TreeviewsService };
|