@codingame/monaco-vscode-files-service-override 18.1.2 → 18.2.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 +10 -9
- package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +1 -1
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +14 -14
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-files-service-override",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - files service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,14 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "18.
|
|
19
|
-
"@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "18.
|
|
20
|
-
"@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common": "18.
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "18.
|
|
24
|
-
"@codingame/monaco-vscode-api": "18.
|
|
25
|
-
"@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "18.
|
|
18
|
+
"@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "18.2.0",
|
|
19
|
+
"@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "18.2.0",
|
|
20
|
+
"@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common": "18.2.0",
|
|
21
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "18.2.0",
|
|
22
|
+
"@codingame/monaco-vscode-8a9062f2-d169-567b-848e-a2530c97ea18-common": "18.2.0",
|
|
23
|
+
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "18.2.0",
|
|
24
|
+
"@codingame/monaco-vscode-api": "18.2.0",
|
|
25
|
+
"@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "18.2.0",
|
|
26
|
+
"@codingame/monaco-vscode-ed7f2efb-131f-5ae8-b8fe-f20867e14c58-common": "18.2.0"
|
|
26
27
|
},
|
|
27
28
|
"main": "index.js",
|
|
28
29
|
"module": "index.js",
|
|
@@ -8,7 +8,7 @@ import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/typ
|
|
|
8
8
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
9
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
10
|
import { createFileSystemProviderError, FileSystemProviderErrorCode, FileType, FileSystemProviderCapabilities, FileChangeType } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
11
|
-
import { BroadcastDataChannel } from '@codingame/monaco-vscode-
|
|
11
|
+
import { BroadcastDataChannel } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/base/browser/broadcast';
|
|
12
12
|
|
|
13
13
|
const ERR_FILE_NOT_FOUND = createFileSystemProviderError(( localize(1851, "File does not exist")), FileSystemProviderErrorCode.FileNotFound);
|
|
14
14
|
const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(1852, "File is Directory")), FileSystemProviderErrorCode.FileIsADirectory);
|
|
@@ -22,7 +22,7 @@ import { bufferToStream } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
22
22
|
import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
|
|
23
23
|
import { PLAINTEXT_LANGUAGE_ID } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/modesRegistry';
|
|
24
24
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
25
|
-
import { BaseTextEditorModel } from '@codingame/monaco-vscode-
|
|
25
|
+
import { BaseTextEditorModel } from '@codingame/monaco-vscode-ed7f2efb-131f-5ae8-b8fe-f20867e14c58-common/vscode/vs/workbench/common/editor/textEditorModel';
|
|
26
26
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
27
27
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
28
28
|
import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
@@ -53,8 +53,8 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
53
53
|
var AbstractTextFileService_1;
|
|
54
54
|
let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
55
55
|
static { AbstractTextFileService_1 = this; }
|
|
56
|
-
static { this.TEXTFILE_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('textFileCreate.source', ( localize(
|
|
57
|
-
static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(
|
|
56
|
+
static { this.TEXTFILE_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('textFileCreate.source', ( localize(12888, "File Created"))); }
|
|
57
|
+
static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(12889, "File Replaced"))); }
|
|
58
58
|
constructor(fileService, untitledTextEditorService, lifecycleService, instantiationService, modelService, environmentService, dialogService, fileDialogService, textResourceConfigurationService, filesConfigurationService, codeEditorService, pathService, workingCopyFileService, uriIdentityService, languageService, logService, elevatedFileService, decorationsService) {
|
|
59
59
|
super();
|
|
60
60
|
this.fileService = fileService;
|
|
@@ -83,7 +83,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
83
83
|
constructor(files) {
|
|
84
84
|
super();
|
|
85
85
|
this.files = files;
|
|
86
|
-
this.label = ( localize(
|
|
86
|
+
this.label = ( localize(12890, "Text File Model Decorations"));
|
|
87
87
|
this._onDidChange = this._register(( new Emitter()));
|
|
88
88
|
this.onDidChange = this._onDidChange.event;
|
|
89
89
|
this.registerListeners();
|
|
@@ -110,20 +110,20 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
110
110
|
color: listErrorForeground,
|
|
111
111
|
letter: Codicon.lockSmall,
|
|
112
112
|
strikethrough: true,
|
|
113
|
-
tooltip: ( localize(
|
|
113
|
+
tooltip: ( localize(12891, "Deleted, Read-only")),
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
else if (isReadonly) {
|
|
117
117
|
return {
|
|
118
118
|
letter: Codicon.lockSmall,
|
|
119
|
-
tooltip: ( localize(
|
|
119
|
+
tooltip: ( localize(12892, "Read-only")),
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
else if (isOrphaned) {
|
|
123
123
|
return {
|
|
124
124
|
color: listErrorForeground,
|
|
125
125
|
strikethrough: true,
|
|
126
|
-
tooltip: ( localize(
|
|
126
|
+
tooltip: ( localize(12893, "Deleted")),
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
return undefined;
|
|
@@ -176,7 +176,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
176
176
|
catch (error) {
|
|
177
177
|
cts.dispose(true);
|
|
178
178
|
if (error.decodeStreamErrorKind === DecodeStreamErrorKind.STREAM_IS_BINARY) {
|
|
179
|
-
throw ( new TextFileOperationError(( localize(
|
|
179
|
+
throw ( new TextFileOperationError(( localize(12894, "File seems to be binary and cannot be opened as text")), TextFileOperationResult.FILE_IS_BINARY, options));
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
throw error;
|
|
@@ -411,17 +411,17 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
411
411
|
const { confirmed } = await this.dialogService.confirm({
|
|
412
412
|
type: 'warning',
|
|
413
413
|
message: ( localize(
|
|
414
|
-
|
|
414
|
+
12895,
|
|
415
415
|
"'{0}' already exists. Do you want to replace it?",
|
|
416
416
|
basename(resource)
|
|
417
417
|
)),
|
|
418
418
|
detail: ( localize(
|
|
419
|
-
|
|
419
|
+
12896,
|
|
420
420
|
"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
|
|
421
421
|
basename(resource),
|
|
422
422
|
basename(dirname(resource))
|
|
423
423
|
)),
|
|
424
|
-
primaryButton: ( localize(
|
|
424
|
+
primaryButton: ( localize(12897, "&&Replace")),
|
|
425
425
|
});
|
|
426
426
|
return confirmed;
|
|
427
427
|
}
|
|
@@ -429,12 +429,12 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
429
429
|
const { confirmed } = await this.dialogService.confirm({
|
|
430
430
|
type: 'warning',
|
|
431
431
|
message: ( localize(
|
|
432
|
-
|
|
432
|
+
12898,
|
|
433
433
|
"'{0}' is marked as read-only. Do you want to save anyway?",
|
|
434
434
|
basename(resource)
|
|
435
435
|
)),
|
|
436
|
-
detail: ( localize(
|
|
437
|
-
primaryButton: ( localize(
|
|
436
|
+
detail: ( localize(12899, "Paths can be configured as read-only via settings.")),
|
|
437
|
+
primaryButton: ( localize(12900, "&&Save Anyway"))
|
|
438
438
|
});
|
|
439
439
|
return confirmed;
|
|
440
440
|
}
|
|
@@ -63,7 +63,7 @@ let TextFileEditorModelManager = class TextFileEditorModelManager extends Dispos
|
|
|
63
63
|
return {
|
|
64
64
|
onSaveError(error, model) {
|
|
65
65
|
notificationService.error(( localize(
|
|
66
|
-
|
|
66
|
+
12904,
|
|
67
67
|
"Failed to save '{0}': {1}",
|
|
68
68
|
model.name,
|
|
69
69
|
toErrorMessage(error, false)
|
|
@@ -26,13 +26,13 @@ let TextFileSaveParticipant = class TextFileSaveParticipant extends Disposable {
|
|
|
26
26
|
const cts = ( new CancellationTokenSource(token));
|
|
27
27
|
model.textEditorModel?.pushStackElement();
|
|
28
28
|
progress.report({
|
|
29
|
-
message: ( localize(
|
|
29
|
+
message: ( localize(12905, "Running Code Actions and Formatters..."))
|
|
30
30
|
});
|
|
31
31
|
let bubbleCancel = false;
|
|
32
32
|
await this.progressService.withProgress({
|
|
33
33
|
priority: NotificationPriority.URGENT,
|
|
34
34
|
location: ProgressLocation.Notification,
|
|
35
|
-
cancellable: ( localize(
|
|
35
|
+
cancellable: ( localize(12906, "Skip")),
|
|
36
36
|
delay: model.isDirty() ? 5000 : 3000
|
|
37
37
|
}, async (progress) => {
|
|
38
38
|
const participants = Array.from(this.saveParticipants).sort((a, b) => {
|