@codingame/monaco-vscode-explorer-service-override 9.0.3 → 10.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-explorer-service-override",
3
- "version": "9.0.3",
3
+ "version": "10.0.1",
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.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.1"
30
30
  }
31
31
  }
@@ -2,9 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Event } from 'vscode/vscode/vs/base/common/event';
3
3
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
4
4
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
5
- import { SortOrder, LexicographicOptions } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
6
5
  import { ExplorerModel, ExplorerItem } from 'vscode/vscode/vs/workbench/contrib/files/common/explorerModel';
7
- import { FileChangeType, FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
8
6
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
9
7
  import { dirname, basename } from 'vscode/vscode/vs/base/common/resources';
10
8
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -13,7 +11,6 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
13
11
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
14
12
  import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
15
13
  import { UndoRedoSource } from 'vscode/vscode/vs/platform/undoRedo/common/undoRedo';
16
- import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
17
14
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
18
15
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
19
16
  import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
@@ -53,9 +50,9 @@ let ExplorerService = class ExplorerService {
53
50
  this.onFileChangesScheduler = ( new RunOnceScheduler(async () => {
54
51
  const events = this.fileChangeEvents;
55
52
  this.fileChangeEvents = [];
56
- const types = [FileChangeType.DELETED];
57
- if (this.config.sortOrder === SortOrder.Modified) {
58
- types.push(FileChangeType.UPDATED);
53
+ const types = [2 ];
54
+ if (this.config.sortOrder === "modified" ) {
55
+ types.push(0 );
59
56
  }
60
57
  let shouldRefresh = false;
61
58
  this.roots.forEach(r => {
@@ -152,9 +149,9 @@ let ExplorerService = class ExplorerService {
152
149
  }
153
150
  async applyBulkEdit(edit, options) {
154
151
  const cancellationTokenSource = ( new CancellationTokenSource());
155
- const location = options.progressLocation ?? ProgressLocation.Window;
152
+ const location = options.progressLocation ?? 10 ;
156
153
  let progressOptions;
157
- if (location === ProgressLocation.Window) {
154
+ if (location === 10 ) {
158
155
  progressOptions = {
159
156
  location: location,
160
157
  title: options.progressLabel,
@@ -179,7 +176,7 @@ let ExplorerService = class ExplorerService {
179
176
  confirmBeforeUndo: options.confirmBeforeUndo
180
177
  });
181
178
  }, () => cancellationTokenSource.cancel());
182
- await this.progressService.withProgress({ location: ProgressLocation.Explorer, delay: 500 }, () => promise);
179
+ await this.progressService.withProgress({ location: 1 , delay: 500 }, () => promise);
183
180
  cancellationTokenSource.dispose();
184
181
  }
185
182
  hasViewFocus() {
@@ -259,7 +256,7 @@ let ExplorerService = class ExplorerService {
259
256
  await this.view.selectResource(fileStat.resource, reveal);
260
257
  return Promise.resolve(undefined);
261
258
  }
262
- const options = { resolveTo: [resource], resolveMetadata: this.config.sortOrder === SortOrder.Modified };
259
+ const options = { resolveTo: [resource], resolveMetadata: this.config.sortOrder === "modified" };
263
260
  const root = this.findClosestRoot(resource);
264
261
  if (!root) {
265
262
  return undefined;
@@ -293,7 +290,7 @@ let ExplorerService = class ExplorerService {
293
290
  }
294
291
  async onDidRunOperation(e) {
295
292
  const shouldDeepRefresh = this.config.fileNesting.enabled;
296
- if (e.isOperation(FileOperation.CREATE) || e.isOperation(FileOperation.COPY)) {
293
+ if (e.isOperation(0 ) || e.isOperation(3 )) {
297
294
  const addedElement = e.target;
298
295
  const parentResource = dirname(addedElement.resource);
299
296
  const parents = this.model.findAll(parentResource);
@@ -314,7 +311,7 @@ let ExplorerService = class ExplorerService {
314
311
  })));
315
312
  }
316
313
  }
317
- else if (e.isOperation(FileOperation.MOVE)) {
314
+ else if (e.isOperation(2 )) {
318
315
  const oldResource = e.resource;
319
316
  const newElement = e.target;
320
317
  const oldParentResource = dirname(oldResource);
@@ -343,7 +340,7 @@ let ExplorerService = class ExplorerService {
343
340
  }
344
341
  }
345
342
  }
346
- else if (e.isOperation(FileOperation.DELETE)) {
343
+ else if (e.isOperation(1 )) {
347
344
  const modelElements = this.model.findAll(e.resource);
348
345
  await Promise.all(( modelElements.map(async (modelElement) => {
349
346
  if (modelElement.parent) {
@@ -392,11 +389,11 @@ let ExplorerService = class ExplorerService {
392
389
  shouldRefresh = true;
393
390
  }
394
391
  const configuration = this.configurationService.getValue();
395
- const configSortOrder = configuration?.explorer?.sortOrder || SortOrder.Default;
392
+ const configSortOrder = configuration?.explorer?.sortOrder || "default" ;
396
393
  if (this.config.sortOrder !== configSortOrder) {
397
394
  shouldRefresh = this.config.sortOrder !== undefined;
398
395
  }
399
- const configLexicographicOptions = configuration?.explorer?.sortOrderLexicographicOptions || LexicographicOptions.Default;
396
+ const configLexicographicOptions = configuration?.explorer?.sortOrderLexicographicOptions || "default" ;
400
397
  if (this.config.sortOrderLexicographicOptions !== configLexicographicOptions) {
401
398
  shouldRefresh = shouldRefresh || this.config.sortOrderLexicographicOptions !== undefined;
402
399
  }