@codingame/monaco-vscode-files-service-override 13.0.0 → 13.1.1

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 CHANGED
@@ -1,5 +1,4 @@
1
1
 
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
2
  import { StandaloneServices } from '@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices';
4
3
  import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
5
4
  import { mkdirp, FileService } from './vscode/src/vs/platform/files/common/fileService.js';
@@ -740,8 +739,8 @@ const providers = {
740
739
  [Schemas.tmp]: new InMemoryFileSystemProvider(),
741
740
  [Schemas.file]: overlayFileSystemProvider
742
741
  };
743
- let FileServiceOverride = class FileServiceOverride extends FileService {
744
- constructor(logService, telemetryService) {
742
+ class FileServiceOverride extends FileService {
743
+ constructor(logService) {
745
744
  super(logService);
746
745
  for (const [scheme, provider] of Object.entries(providers)) {
747
746
  let disposable = this.registerProvider(scheme, provider);
@@ -751,18 +750,25 @@ let FileServiceOverride = class FileServiceOverride extends FileService {
751
750
  disposable = this.registerProvider(scheme, provider);
752
751
  });
753
752
  }
753
+ }
754
+ }
755
+ async initialize(telemetryService) {
756
+ for (const { scheme } of this.listCapabilities()) {
757
+ const provider = this.getProvider(scheme);
754
758
  if (provider instanceof IndexedDBFileSystemProvider) {
755
759
  this._register(provider.onReportError((e) => telemetryService.publicLog2('indexedDBFileSystemProviderError', e)));
756
760
  }
757
761
  }
758
762
  }
759
- };
760
- FileServiceOverride = __decorate([
761
- __param(1, ITelemetryService)
762
- ], FileServiceOverride);
763
+ }
764
+ FileServiceOverride.$di$dependencies = [];
763
765
  const fileLogger = new BufferLogger();
764
766
  registerServiceInitializePreParticipant(async (accessor) => {
765
767
  fileLogger.logger = accessor.get(ILogService);
768
+ const fileService = accessor.get(IFileService);
769
+ if (fileService instanceof FileServiceOverride) {
770
+ fileService.initialize(accessor.get(ITelemetryService));
771
+ }
766
772
  });
767
773
  function getServiceOverride() {
768
774
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-files-service-override",
3
- "version": "13.0.0",
3
+ "version": "13.1.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - files service-override",
6
6
  "keywords": [],
@@ -15,26 +15,14 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "13.0.0",
19
- "@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "13.0.0",
20
- "@codingame/monaco-vscode-2e67e044-0db9-5fa6-8bd1-3737a7d586d4-common": "13.0.0",
21
- "@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common": "13.0.0",
22
- "@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "13.0.0",
23
- "@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "13.0.0",
24
- "@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common": "13.0.0"
25
- },
26
- "peerDependencies": {
27
- "@codingame/monaco-vscode-api": "13.0.0",
28
- "@codingame/monaco-vscode-base-service-override": "13.0.0",
29
- "@codingame/monaco-vscode-view-common-service-override": "13.0.0"
30
- },
31
- "peerDependenciesMeta": {
32
- "@codingame/monaco-vscode-base-service-override": {
33
- "optional": true
34
- },
35
- "@codingame/monaco-vscode-view-common-service-override": {
36
- "optional": true
37
- }
18
+ "@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "13.1.1",
19
+ "@codingame/monaco-vscode-15626ec7-b165-51e1-8caf-7bcc2ae9b95a-common": "13.1.1",
20
+ "@codingame/monaco-vscode-2e67e044-0db9-5fa6-8bd1-3737a7d586d4-common": "13.1.1",
21
+ "@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common": "13.1.1",
22
+ "@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "13.1.1",
23
+ "@codingame/monaco-vscode-api": "13.1.1",
24
+ "@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "13.1.1",
25
+ "@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common": "13.1.1"
38
26
  },
39
27
  "main": "index.js",
40
28
  "module": "index.js",
@@ -9,7 +9,7 @@ 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, FileSystemProviderError } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
11
11
  import { DBClosedError } from '@codingame/monaco-vscode-2f06fe84-148e-5e6b-a7ca-c7989c5f128a-common/vscode/vs/base/browser/indexedDB';
12
- import { BroadcastDataChannel } from '@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/base/browser/broadcast';
12
+ import { BroadcastDataChannel } from '@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common/vscode/vs/base/browser/broadcast';
13
13
 
14
14
  const ERR_FILE_NOT_FOUND = createFileSystemProviderError(( localize(1741, "File does not exist")), FileSystemProviderErrorCode.FileNotFound);
15
15
  const ERR_FILE_IS_DIR = createFileSystemProviderError(( localize(1742, "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';
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-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common/vscode/vs/workbench/common/editor/textEditorModel';
25
+ import { BaseTextEditorModel } from '@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common/vscode/vs/workbench/common/editor/textEditorModel';
26
26
  import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService';
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(11758, "File Created"))); }
57
- static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(11759, "File Replaced"))); }
56
+ static { this.TEXTFILE_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('textFileCreate.source', ( localize(11776, "File Created"))); }
57
+ static { this.TEXTFILE_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('textFileOverwrite.source', ( localize(11777, "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(11760, "Text File Model Decorations"));
87
+ this.label = ( localize(11778, "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(11761, "Deleted, Read-only")),
114
+ tooltip: ( localize(11779, "Deleted, Read-only")),
115
115
  };
116
116
  }
117
117
  else if (isReadonly) {
118
118
  return {
119
119
  letter: Codicon.lockSmall,
120
- tooltip: ( localize(11762, "Read-only")),
120
+ tooltip: ( localize(11780, "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(11763, "Deleted")),
127
+ tooltip: ( localize(11781, "Deleted")),
128
128
  };
129
129
  }
130
130
  return undefined;
@@ -177,7 +177,7 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
177
177
  catch (error) {
178
178
  cts.dispose(true);
179
179
  if (error.decodeStreamErrorKind === DecodeStreamErrorKind.STREAM_IS_BINARY) {
180
- throw ( new TextFileOperationError(( localize(11764, "File seems to be binary and cannot be opened as text")), TextFileOperationResult.FILE_IS_BINARY, options));
180
+ throw ( new TextFileOperationError(( localize(11782, "File seems to be binary and cannot be opened as text")), TextFileOperationResult.FILE_IS_BINARY, options));
181
181
  }
182
182
  else {
183
183
  throw error;
@@ -392,17 +392,17 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
392
392
  const { confirmed } = await this.dialogService.confirm({
393
393
  type: 'warning',
394
394
  message: ( localize(
395
- 11765,
395
+ 11783,
396
396
  "'{0}' already exists. Do you want to replace it?",
397
397
  basename(resource)
398
398
  )),
399
399
  detail: ( localize(
400
- 11766,
400
+ 11784,
401
401
  "A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
402
402
  basename(resource),
403
403
  basename(dirname(resource))
404
404
  )),
405
- primaryButton: ( localize(11767, "&&Replace")),
405
+ primaryButton: ( localize(11785, "&&Replace")),
406
406
  });
407
407
  return confirmed;
408
408
  }
@@ -410,12 +410,12 @@ let AbstractTextFileService = class AbstractTextFileService extends Disposable {
410
410
  const { confirmed } = await this.dialogService.confirm({
411
411
  type: 'warning',
412
412
  message: ( localize(
413
- 11768,
413
+ 11786,
414
414
  "'{0}' is marked as read-only. Do you want to save anyway?",
415
415
  basename(resource)
416
416
  )),
417
- detail: ( localize(11769, "Paths can be configured as read-only via settings.")),
418
- primaryButton: ( localize(11770, "&&Save Anyway"))
417
+ detail: ( localize(11787, "Paths can be configured as read-only via settings.")),
418
+ primaryButton: ( localize(11788, "&&Save Anyway"))
419
419
  });
420
420
  return confirmed;
421
421
  }
@@ -63,7 +63,7 @@ let TextFileEditorModelManager = class TextFileEditorModelManager extends Dispos
63
63
  return {
64
64
  onSaveError(error, model) {
65
65
  notificationService.error(( localize(
66
- 11774,
66
+ 11792,
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(11775, "Running Code Actions and Formatters..."))
29
+ message: ( localize(11793, "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(11776, "Skip")),
35
+ cancellable: ( localize(11794, "Skip")),
36
36
  delay: model.isDirty() ? 5000 : 3000
37
37
  }, async (progress) => {
38
38
  for (const saveParticipant of this.saveParticipants) {