@codingame/monaco-vscode-files-service-override 11.0.1 → 11.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-files-service-override",
3
- "version": "11.0.1",
3
+ "version": "11.1.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@11.0.1"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@11.1.0"
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(736, "File does not exist")), FileSystemProviderErrorCode.FileNotFound);
14
- const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(737, "File is Directory")), FileSystemProviderErrorCode.FileIsADirectory);
15
- const ERR_FILE_NOT_DIR = createFileSystemProviderError(( localize(738, "File is not a directory")), FileSystemProviderErrorCode.FileNotADirectory);
16
- const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(( localize(739, "Directory is not empty")), FileSystemProviderErrorCode.Unknown);
17
- const ERR_FILE_EXCEEDS_STORAGE_QUOTA = createFileSystemProviderError(( localize(740, "File exceeds available storage quota")), FileSystemProviderErrorCode.FileExceedsStorageQuota);
13
+ const ERR_FILE_NOT_FOUND = createFileSystemProviderError(( localize(767, "File does not exist")), FileSystemProviderErrorCode.FileNotFound);
14
+ const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(768, "File is Directory")), FileSystemProviderErrorCode.FileIsADirectory);
15
+ const ERR_FILE_NOT_DIR = createFileSystemProviderError(( localize(769, "File is not a directory")), FileSystemProviderErrorCode.FileNotADirectory);
16
+ const ERR_DIR_NOT_EMPTY = createFileSystemProviderError(( localize(770, "Directory is not empty")), FileSystemProviderErrorCode.Unknown);
17
+ const ERR_FILE_EXCEEDS_STORAGE_QUOTA = createFileSystemProviderError(( localize(771, "File exceeds available storage quota")), FileSystemProviderErrorCode.FileExceedsStorageQuota);
18
18
  const ERR_UNKNOWN_INTERNAL = (message) => createFileSystemProviderError(( localize(
19
- 741,
19
+ 772,
20
20
  "Internal error occurred in IndexedDB File System Provider. ({0})",
21
21
  message
22
22
  )), FileSystemProviderErrorCode.Unknown);
@@ -34,7 +34,7 @@ async function mkdirp(providerExtUri, provider, directory) {
34
34
  const stat = await provider.stat(directory);
35
35
  if ((stat.type & FileType.Directory) === 0) {
36
36
  throw ( (new Error(localize(
37
- 708,
37
+ 739,
38
38
  "Unable to create folder '{0}' that already exists but is not a directory",
39
39
  resourceForError(directory)
40
40
  ))));
@@ -149,7 +149,7 @@ let FileService = class FileService extends Disposable {
149
149
  async withProvider(resource) {
150
150
  if (!isAbsolutePath(resource)) {
151
151
  throw ( (new FileOperationError(localize(
152
- 709,
152
+ 740,
153
153
  "Unable to resolve filesystem provider with relative file path '{0}'",
154
154
  this.resourceForError(resource)
155
155
  ), 8 )));
@@ -159,7 +159,7 @@ let FileService = class FileService extends Disposable {
159
159
  if (!provider) {
160
160
  const error = ( (new ErrorNoTelemetry()));
161
161
  error.message = ( localize(
162
- 710,
162
+ 741,
163
163
  "ENOPRO: No file system provider found for resource '{0}'",
164
164
  (resource.toString())
165
165
  ));
@@ -192,7 +192,7 @@ let FileService = class FileService extends Disposable {
192
192
  catch (error) {
193
193
  if (toFileSystemProviderErrorCode(error) === FileSystemProviderErrorCode.FileNotFound) {
194
194
  throw ( (new FileOperationError(localize(
195
- 711,
195
+ 742,
196
196
  "Unable to resolve nonexistent file '{0}'",
197
197
  this.resourceForError(resource)
198
198
  ), 1 )));
@@ -303,7 +303,7 @@ let FileService = class FileService extends Disposable {
303
303
  async doValidateCreateFile(resource, options) {
304
304
  if (!options?.overwrite && (await this.exists(resource))) {
305
305
  throw ( (new FileOperationError(localize(
306
- 712,
306
+ 743,
307
307
  "Unable to create file '{0}' that already exists when overwrite flag is not set",
308
308
  this.resourceForError(resource)
309
309
  ), 3 , options)));
@@ -361,7 +361,7 @@ let FileService = class FileService extends Disposable {
361
361
  }
362
362
  catch (error) {
363
363
  throw ( (new FileOperationError(localize(
364
- 713,
364
+ 744,
365
365
  "Unable to write file '{0}' ({1})",
366
366
  this.resourceForError(resource),
367
367
  ( (ensureFileSystemProviderError(error).toString()))
@@ -373,7 +373,7 @@ let FileService = class FileService extends Disposable {
373
373
  const unlock = !!options?.unlock;
374
374
  if (unlock && !((provider.capabilities & 8192) )) {
375
375
  throw ( (new Error(localize(
376
- 714,
376
+ 745,
377
377
  "Unable to unlock file '{0}' because provider does not support it.",
378
378
  this.resourceForError(resource)
379
379
  ))));
@@ -382,21 +382,21 @@ let FileService = class FileService extends Disposable {
382
382
  if (atomic) {
383
383
  if (!((provider.capabilities & 32768) )) {
384
384
  throw ( (new Error(localize(
385
- 715,
385
+ 746,
386
386
  "Unable to atomically write file '{0}' because provider does not support it.",
387
387
  this.resourceForError(resource)
388
388
  ))));
389
389
  }
390
390
  if (!((provider.capabilities & 2) )) {
391
391
  throw ( (new Error(localize(
392
- 716,
392
+ 747,
393
393
  "Unable to atomically write file '{0}' because provider does not support unbuffered writes.",
394
394
  this.resourceForError(resource)
395
395
  ))));
396
396
  }
397
397
  if (unlock) {
398
398
  throw ( (new Error(localize(
399
- 717,
399
+ 748,
400
400
  "Unable to unlock file '{0}' because atomic write is enabled.",
401
401
  this.resourceForError(resource)
402
402
  ))));
@@ -411,7 +411,7 @@ let FileService = class FileService extends Disposable {
411
411
  }
412
412
  if ((stat.type & FileType.Directory) !== 0) {
413
413
  throw ( (new FileOperationError(localize(
414
- 718,
414
+ 749,
415
415
  "Unable to write file '{0}' that is actually a directory",
416
416
  this.resourceForError(resource)
417
417
  ), 0 , options)));
@@ -421,7 +421,7 @@ let FileService = class FileService extends Disposable {
421
421
  typeof stat.mtime === 'number' && typeof stat.size === 'number' &&
422
422
  options.mtime < stat.mtime && options.etag !== etag({ mtime: options.mtime , size: stat.size })) {
423
423
  throw ( (new FileOperationError(
424
- localize(719, "File Modified Since"),
424
+ localize(750, "File Modified Since"),
425
425
  3 ,
426
426
  options
427
427
  )));
@@ -508,7 +508,7 @@ let FileService = class FileService extends Disposable {
508
508
  }
509
509
  restoreReadError(error, resource, options) {
510
510
  const message = ( localize(
511
- 720,
511
+ 751,
512
512
  "Unable to read file '{0}' ({1})",
513
513
  this.resourceForError(resource),
514
514
  (ensureFileSystemProviderError(error).toString())
@@ -574,13 +574,13 @@ let FileService = class FileService extends Disposable {
574
574
  const stat = await this.resolve(resource, { resolveMetadata: true });
575
575
  if (stat.isDirectory) {
576
576
  throw ( (new FileOperationError(localize(
577
- 721,
577
+ 752,
578
578
  "Unable to read file '{0}' that is actually a directory",
579
579
  this.resourceForError(resource)
580
580
  ), 0 , options)));
581
581
  }
582
582
  if (typeof options?.etag === 'string' && options.etag !== ETAG_DISABLED && options.etag === stat.etag) {
583
- throw ( (new NotModifiedSinceFileOperationError(localize(722, "File not modified since"), stat, options)));
583
+ throw ( (new NotModifiedSinceFileOperationError(localize(753, "File not modified since"), stat, options)));
584
584
  }
585
585
  this.validateReadFileLimits(resource, stat.size, options);
586
586
  return stat;
@@ -588,7 +588,7 @@ let FileService = class FileService extends Disposable {
588
588
  validateReadFileLimits(resource, size, options) {
589
589
  if (typeof options?.limits?.size === 'number' && size > options.limits.size) {
590
590
  throw ( (new TooLargeFileOperationError(localize(
591
- 723,
591
+ 754,
592
592
  "Unable to read file '{0}' that is too large to open",
593
593
  this.resourceForError(resource)
594
594
  ), 7 , size, options)));
@@ -710,7 +710,7 @@ let FileService = class FileService extends Disposable {
710
710
  }
711
711
  if (isSameResourceWithDifferentPathCase && mode === 'copy') {
712
712
  throw ( (new Error(localize(
713
- 724,
713
+ 755,
714
714
  "Unable to copy when source '{0}' is same as target '{1}' with different path case on a case insensitive file system",
715
715
  this.resourceForError(source),
716
716
  this.resourceForError(target)
@@ -718,7 +718,7 @@ let FileService = class FileService extends Disposable {
718
718
  }
719
719
  if (!isSameResourceWithDifferentPathCase && providerExtUri.isEqualOrParent(target, source)) {
720
720
  throw ( (new Error(localize(
721
- 725,
721
+ 756,
722
722
  "Unable to move/copy when source '{0}' is parent of target '{1}'.",
723
723
  this.resourceForError(source),
724
724
  this.resourceForError(target)
@@ -729,7 +729,7 @@ let FileService = class FileService extends Disposable {
729
729
  if (exists && !isSameResourceWithDifferentPathCase) {
730
730
  if (!overwrite) {
731
731
  throw ( (new FileOperationError(localize(
732
- 726,
732
+ 757,
733
733
  "Unable to move/copy '{0}' because target '{1}' already exists at destination.",
734
734
  this.resourceForError(source),
735
735
  this.resourceForError(target)
@@ -739,7 +739,7 @@ let FileService = class FileService extends Disposable {
739
739
  const { providerExtUri } = this.getExtUri(sourceProvider);
740
740
  if (providerExtUri.isEqualOrParent(source, target)) {
741
741
  throw ( (new Error(localize(
742
- 727,
742
+ 758,
743
743
  "Unable to move/copy '{0}' into '{1}' since a file would replace the folder it is contained in.",
744
744
  this.resourceForError(source),
745
745
  this.resourceForError(target)
@@ -784,7 +784,7 @@ let FileService = class FileService extends Disposable {
784
784
  const useTrash = !!options?.useTrash;
785
785
  if (useTrash && !((provider.capabilities & 4096) )) {
786
786
  throw ( (new Error(localize(
787
- 728,
787
+ 759,
788
788
  "Unable to delete file '{0}' via trash because provider does not support it.",
789
789
  this.resourceForError(resource)
790
790
  ))));
@@ -792,14 +792,14 @@ let FileService = class FileService extends Disposable {
792
792
  const atomic = options?.atomic;
793
793
  if (atomic && !((provider.capabilities & 65536) )) {
794
794
  throw ( (new Error(localize(
795
- 729,
795
+ 760,
796
796
  "Unable to delete file '{0}' atomically because provider does not support it.",
797
797
  this.resourceForError(resource)
798
798
  ))));
799
799
  }
800
800
  if (useTrash && atomic) {
801
801
  throw ( (new Error(localize(
802
- 730,
802
+ 761,
803
803
  "Unable to atomically delete file '{0}' because using trash is enabled.",
804
804
  this.resourceForError(resource)
805
805
  ))));
@@ -815,7 +815,7 @@ let FileService = class FileService extends Disposable {
815
815
  }
816
816
  else {
817
817
  throw ( (new FileOperationError(localize(
818
- 731,
818
+ 762,
819
819
  "Unable to delete nonexistent file '{0}'",
820
820
  this.resourceForError(resource)
821
821
  ), 1 )));
@@ -825,7 +825,7 @@ let FileService = class FileService extends Disposable {
825
825
  const stat = await this.resolve(resource);
826
826
  if (stat.isDirectory && Array.isArray(stat.children) && stat.children.length > 0) {
827
827
  throw ( (new Error(localize(
828
- 732,
828
+ 763,
829
829
  "Unable to delete non-empty folder '{0}'.",
830
830
  this.resourceForError(resource)
831
831
  ))));
@@ -1086,7 +1086,7 @@ let FileService = class FileService extends Disposable {
1086
1086
  throwIfFileSystemIsReadonly(provider, resource) {
1087
1087
  if (provider.capabilities & 2048 ) {
1088
1088
  throw ( (new FileOperationError(localize(
1089
- 733,
1089
+ 764,
1090
1090
  "Unable to modify read-only file '{0}'",
1091
1091
  this.resourceForError(resource)
1092
1092
  ), 6 )));
@@ -1096,7 +1096,7 @@ let FileService = class FileService extends Disposable {
1096
1096
  throwIfFileIsReadonly(resource, stat) {
1097
1097
  if ((stat.permissions ?? 0) & FilePermission.Readonly) {
1098
1098
  throw ( (new FileOperationError(localize(
1099
- 733,
1099
+ 764,
1100
1100
  "Unable to modify read-only file '{0}'",
1101
1101
  this.resourceForError(resource)
1102
1102
  ), 6 )));
@@ -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(4558, "File is too large to open"), FileSystemProviderErrorCode.FileTooLarge);
72
+ throw createFileSystemProviderError(localize(4630, "File is too large to open"), FileSystemProviderErrorCode.FileTooLarge);
73
73
  }
74
74
  return true;
75
75
  }
@@ -51,8 +51,8 @@ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
51
51
  var AbstractTextFileService_1;
52
52
  let AbstractTextFileService = class AbstractTextFileService extends Disposable {
53
53
  static { AbstractTextFileService_1 = this; }
54
- static { this.TEXTFILE_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('textFileCreate.source', ( localize(4559, "File Created"))); }
55
- static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(4560, "File Replaced"))); }
54
+ static { this.TEXTFILE_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('textFileCreate.source', ( localize(4631, "File Created"))); }
55
+ static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(4632, "File Replaced"))); }
56
56
  constructor(fileService, untitledTextEditorService, lifecycleService, instantiationService, modelService, environmentService, dialogService, fileDialogService, textResourceConfigurationService, filesConfigurationService, codeEditorService, pathService, workingCopyFileService, uriIdentityService, languageService, logService, elevatedFileService, decorationsService) {
57
57
  super();
58
58
  this.fileService = fileService;
@@ -82,7 +82,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
82
82
  constructor(files) {
83
83
  super();
84
84
  this.files = files;
85
- this.label = ( localize(4561, "Text File Model Decorations"));
85
+ this.label = ( localize(4633, "Text File Model Decorations"));
86
86
  this._onDidChange = this._register(( (new Emitter())));
87
87
  this.onDidChange = this._onDidChange.event;
88
88
  this.registerListeners();
@@ -109,20 +109,20 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
109
109
  color: listErrorForeground,
110
110
  letter: Codicon.lockSmall,
111
111
  strikethrough: true,
112
- tooltip: ( localize(4562, "Deleted, Read-only")),
112
+ tooltip: ( localize(4634, "Deleted, Read-only")),
113
113
  };
114
114
  }
115
115
  else if (isReadonly) {
116
116
  return {
117
117
  letter: Codicon.lockSmall,
118
- tooltip: ( localize(4563, "Read-only")),
118
+ tooltip: ( localize(4635, "Read-only")),
119
119
  };
120
120
  }
121
121
  else if (isOrphaned) {
122
122
  return {
123
123
  color: listErrorForeground,
124
124
  strikethrough: true,
125
- tooltip: ( localize(4564, "Deleted")),
125
+ tooltip: ( localize(4636, "Deleted")),
126
126
  };
127
127
  }
128
128
  return undefined;
@@ -176,7 +176,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
176
176
  cts.dispose(true);
177
177
  if (error.decodeStreamErrorKind === 1 ) {
178
178
  throw ( (new TextFileOperationError(
179
- localize(4565, "File seems to be binary and cannot be opened as text"),
179
+ localize(4637, "File seems to be binary and cannot be opened as text"),
180
180
  0 ,
181
181
  options
182
182
  )));
@@ -394,17 +394,17 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
394
394
  const { confirmed } = await this.dialogService.confirm({
395
395
  type: 'warning',
396
396
  message: ( localize(
397
- 4566,
397
+ 4638,
398
398
  "'{0}' already exists. Do you want to replace it?",
399
399
  basename(resource)
400
400
  )),
401
401
  detail: ( localize(
402
- 4567,
402
+ 4639,
403
403
  "A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
404
404
  basename(resource),
405
405
  basename(dirname(resource))
406
406
  )),
407
- primaryButton: ( localize(4568, "&&Replace")),
407
+ primaryButton: ( localize(4640, "&&Replace")),
408
408
  });
409
409
  return confirmed;
410
410
  }
@@ -412,12 +412,12 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
412
412
  const { confirmed } = await this.dialogService.confirm({
413
413
  type: 'warning',
414
414
  message: ( localize(
415
- 4569,
415
+ 4641,
416
416
  "'{0}' is marked as read-only. Do you want to save anyway?",
417
417
  basename(resource)
418
418
  )),
419
- detail: ( localize(4570, "Paths can be configured as read-only via settings.")),
420
- primaryButton: ( localize(4571, "&&Save Anyway"))
419
+ detail: ( localize(4642, "Paths can be configured as read-only via settings.")),
420
+ primaryButton: ( localize(4643, "&&Save Anyway"))
421
421
  });
422
422
  return confirmed;
423
423
  }
@@ -61,7 +61,7 @@ let TextFileEditorModelManager = class TextFileEditorModelManager extends Dispos
61
61
  return {
62
62
  onSaveError(error, model) {
63
63
  notificationService.error(( localize(
64
- 9982,
64
+ 10037,
65
65
  "Failed to save '{0}': {1}",
66
66
  model.name,
67
67
  toErrorMessage(error, false)
@@ -24,13 +24,13 @@ let TextFileSaveParticipant = class TextFileSaveParticipant extends Disposable {
24
24
  const cts = ( (new CancellationTokenSource(token)));
25
25
  model.textEditorModel?.pushStackElement();
26
26
  progress.report({
27
- message: ( localize(11518, "Running Code Actions and Formatters..."))
27
+ message: ( localize(11519, "Running Code Actions and Formatters..."))
28
28
  });
29
29
  let bubbleCancel = false;
30
30
  await this.progressService.withProgress({
31
31
  priority: NotificationPriority.URGENT,
32
32
  location: 15 ,
33
- cancellable: ( localize(11519, "Skip")),
33
+ cancellable: ( localize(11520, "Skip")),
34
34
  delay: model.isDirty() ? 5000 : 3000
35
35
  }, async (progress) => {
36
36
  for (const saveParticipant of this.saveParticipants) {