@codingame/monaco-vscode-files-service-override 23.1.0 → 23.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/index.js +1 -1
- package/package.json +8 -8
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +13 -13
- 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/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { IndexedDB } from '@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c798
|
|
|
22
22
|
import { BufferLogger } from '@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common/vscode/vs/platform/log/common/bufferLog';
|
|
23
23
|
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
24
24
|
import { BrowserTextFileService } from './vscode/src/vs/workbench/services/textfile/browser/browserTextFileService.js';
|
|
25
|
-
import { FilesConfigurationService } from '@codingame/monaco-vscode-
|
|
25
|
+
import { FilesConfigurationService } from '@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
|
26
26
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
27
27
|
import { BrowserElevatedFileService } from './vscode/src/vs/workbench/services/files/browser/elevatedFileService.js';
|
|
28
28
|
import { IElevatedFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/files/common/elevatedFileService.service';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-files-service-override",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - files service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "23.
|
|
19
|
-
"@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "23.
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "23.2.0",
|
|
19
|
+
"@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "23.2.0",
|
|
20
|
+
"@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common": "23.2.0",
|
|
21
|
+
"@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common": "23.2.0",
|
|
22
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.2.0",
|
|
23
|
+
"@codingame/monaco-vscode-api": "23.2.0",
|
|
24
|
+
"@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "23.2.0"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"module": "index.js",
|
|
@@ -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(14100, "File Created"))); }
|
|
57
|
+
static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(14101, "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(14102, "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(14103, "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(14104, "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(14105, "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(14106, "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;
|
|
@@ -423,17 +423,17 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
423
423
|
const { confirmed } = await this.dialogService.confirm({
|
|
424
424
|
type: 'warning',
|
|
425
425
|
message: ( localize(
|
|
426
|
-
|
|
426
|
+
14107,
|
|
427
427
|
"'{0}' already exists. Do you want to replace it?",
|
|
428
428
|
basename(resource)
|
|
429
429
|
)),
|
|
430
430
|
detail: ( localize(
|
|
431
|
-
|
|
431
|
+
14108,
|
|
432
432
|
"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
|
|
433
433
|
basename(resource),
|
|
434
434
|
basename(dirname(resource))
|
|
435
435
|
)),
|
|
436
|
-
primaryButton: ( localize(
|
|
436
|
+
primaryButton: ( localize(14109, "&&Replace")),
|
|
437
437
|
});
|
|
438
438
|
return confirmed;
|
|
439
439
|
}
|
|
@@ -441,12 +441,12 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
441
441
|
const { confirmed } = await this.dialogService.confirm({
|
|
442
442
|
type: 'warning',
|
|
443
443
|
message: ( localize(
|
|
444
|
-
|
|
444
|
+
14110,
|
|
445
445
|
"'{0}' is marked as read-only. Do you want to save anyway?",
|
|
446
446
|
basename(resource)
|
|
447
447
|
)),
|
|
448
|
-
detail: ( localize(
|
|
449
|
-
primaryButton: ( localize(
|
|
448
|
+
detail: ( localize(14111, "Paths can be configured as read-only via settings.")),
|
|
449
|
+
primaryButton: ( localize(14112, "&&Save Anyway"))
|
|
450
450
|
});
|
|
451
451
|
return confirmed;
|
|
452
452
|
}
|
|
@@ -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
|
+
14116,
|
|
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(14117, "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(14118, "Skip")),
|
|
36
36
|
delay: model.isDirty() ? 5000 : 3000
|
|
37
37
|
}, async (progress) => {
|
|
38
38
|
const participants = Array.from(this.saveParticipants).sort((a, b) => {
|