@codingame/monaco-vscode-files-service-override 9.0.2 → 9.0.3
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-files-service-override",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
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@9.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.3"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -10,13 +10,13 @@ import { createFileSystemProviderError, FileSystemProviderErrorCode, FileType, F
|
|
|
10
10
|
import { DBClosedError } from 'vscode/vscode/vs/base/browser/indexedDB';
|
|
11
11
|
import { BroadcastDataChannel } from 'vscode/vscode/vs/base/browser/broadcast';
|
|
12
12
|
|
|
13
|
-
const ERR_FILE_NOT_FOUND = createFileSystemProviderError(( localize(
|
|
14
|
-
const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(
|
|
15
|
-
const ERR_FILE_NOT_DIR = createFileSystemProviderError(( localize(
|
|
16
|
-
const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(( localize(
|
|
17
|
-
const ERR_FILE_EXCEEDS_STORAGE_QUOTA = createFileSystemProviderError(( localize(
|
|
13
|
+
const ERR_FILE_NOT_FOUND = createFileSystemProviderError(( localize(728, "File does not exist")), FileSystemProviderErrorCode.FileNotFound);
|
|
14
|
+
const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(729, "File is Directory")), FileSystemProviderErrorCode.FileIsADirectory);
|
|
15
|
+
const ERR_FILE_NOT_DIR = createFileSystemProviderError(( localize(730, "File is not a directory")), FileSystemProviderErrorCode.FileNotADirectory);
|
|
16
|
+
const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(( localize(731, "Directory is not empty")), FileSystemProviderErrorCode.Unknown);
|
|
17
|
+
const ERR_FILE_EXCEEDS_STORAGE_QUOTA = createFileSystemProviderError(( localize(732, "File exceeds available storage quota")), FileSystemProviderErrorCode.FileExceedsStorageQuota);
|
|
18
18
|
const ERR_UNKNOWN_INTERNAL = (message) => createFileSystemProviderError(( localize(
|
|
19
|
-
|
|
19
|
+
733,
|
|
20
20
|
"Internal error occurred in IndexedDB File System Provider. ({0})",
|
|
21
21
|
message
|
|
22
22
|
)), FileSystemProviderErrorCode.Unknown);
|
|
@@ -69,7 +69,7 @@ function throwIfCancelled(token) {
|
|
|
69
69
|
}
|
|
70
70
|
function throwIfTooLarge(totalBytesRead, options) {
|
|
71
71
|
if (typeof options?.limits?.size === 'number' && totalBytesRead > options.limits.size) {
|
|
72
|
-
throw createFileSystemProviderError(localize(
|
|
72
|
+
throw createFileSystemProviderError(localize(4531, "File is too large to open"), FileSystemProviderErrorCode.FileTooLarge);
|
|
73
73
|
}
|
|
74
74
|
return true;
|
|
75
75
|
}
|
|
@@ -53,8 +53,8 @@ import { firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
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(4532, "File Created"))); }
|
|
57
|
+
static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(4533, "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;
|
|
@@ -84,7 +84,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
84
84
|
constructor(files) {
|
|
85
85
|
super();
|
|
86
86
|
this.files = files;
|
|
87
|
-
this.label = ( localize(
|
|
87
|
+
this.label = ( localize(4534, "Text File Model Decorations"));
|
|
88
88
|
this._onDidChange = this._register(( (new Emitter())));
|
|
89
89
|
this.onDidChange = this._onDidChange.event;
|
|
90
90
|
this.registerListeners();
|
|
@@ -111,20 +111,20 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
111
111
|
color: listErrorForeground,
|
|
112
112
|
letter: Codicon.lockSmall,
|
|
113
113
|
strikethrough: true,
|
|
114
|
-
tooltip: ( localize(
|
|
114
|
+
tooltip: ( localize(4535, "Deleted, Read-only")),
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
else if (isReadonly) {
|
|
118
118
|
return {
|
|
119
119
|
letter: Codicon.lockSmall,
|
|
120
|
-
tooltip: ( localize(
|
|
120
|
+
tooltip: ( localize(4536, "Read-only")),
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
else if (isOrphaned) {
|
|
124
124
|
return {
|
|
125
125
|
color: listErrorForeground,
|
|
126
126
|
strikethrough: true,
|
|
127
|
-
tooltip: ( localize(
|
|
127
|
+
tooltip: ( localize(4537, "Deleted")),
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
return undefined;
|
|
@@ -178,7 +178,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
178
178
|
cts.dispose(true);
|
|
179
179
|
if (error.decodeStreamErrorKind === DecodeStreamErrorKind.STREAM_IS_BINARY) {
|
|
180
180
|
throw ( (new TextFileOperationError(
|
|
181
|
-
localize(
|
|
181
|
+
localize(4538, "File seems to be binary and cannot be opened as text"),
|
|
182
182
|
TextFileOperationResult.FILE_IS_BINARY,
|
|
183
183
|
options
|
|
184
184
|
)));
|
|
@@ -396,17 +396,17 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
396
396
|
const { confirmed } = await this.dialogService.confirm({
|
|
397
397
|
type: 'warning',
|
|
398
398
|
message: ( localize(
|
|
399
|
-
|
|
399
|
+
4539,
|
|
400
400
|
"'{0}' already exists. Do you want to replace it?",
|
|
401
401
|
basename(resource)
|
|
402
402
|
)),
|
|
403
403
|
detail: ( localize(
|
|
404
|
-
|
|
404
|
+
4540,
|
|
405
405
|
"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
|
|
406
406
|
basename(resource),
|
|
407
407
|
basename(dirname(resource))
|
|
408
408
|
)),
|
|
409
|
-
primaryButton: ( localize(
|
|
409
|
+
primaryButton: ( localize(4541, "&&Replace")),
|
|
410
410
|
});
|
|
411
411
|
return confirmed;
|
|
412
412
|
}
|
|
@@ -414,12 +414,12 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
|
|
|
414
414
|
const { confirmed } = await this.dialogService.confirm({
|
|
415
415
|
type: 'warning',
|
|
416
416
|
message: ( localize(
|
|
417
|
-
|
|
417
|
+
4542,
|
|
418
418
|
"'{0}' is marked as read-only. Do you want to save anyway?",
|
|
419
419
|
basename(resource)
|
|
420
420
|
)),
|
|
421
|
-
detail: ( localize(
|
|
422
|
-
primaryButton: ( localize(
|
|
421
|
+
detail: ( localize(4543, "Paths can be configured as read-only via settings.")),
|
|
422
|
+
primaryButton: ( localize(4544, "&&Save Anyway"))
|
|
423
423
|
});
|
|
424
424
|
return confirmed;
|
|
425
425
|
}
|