@codingame/monaco-vscode-working-copy-service-override 20.1.1 → 20.2.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-working-copy-service-override",
3
- "version": "20.1.1",
3
+ "version": "20.2.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - working-copy service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common": "20.1.1",
19
- "@codingame/monaco-vscode-api": "20.1.1",
20
- "@codingame/monaco-vscode-caeb744c-8e3f-5c11-80fb-0f057d24d544-common": "20.1.1",
21
- "@codingame/monaco-vscode-files-service-override": "20.1.1"
18
+ "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common": "20.2.1",
19
+ "@codingame/monaco-vscode-api": "20.2.1",
20
+ "@codingame/monaco-vscode-caeb744c-8e3f-5c11-80fb-0f057d24d544-common": "20.2.1",
21
+ "@codingame/monaco-vscode-files-service-override": "20.2.1"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -10,6 +10,13 @@ import { IWorkingCopyEditorHandler } from "./workingCopyEditorService.js";
10
10
  import { IWorkingCopyEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service";
11
11
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
12
12
  import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
13
+ /**
14
+ * The working copy backup tracker deals with:
15
+ * - restoring backups that exist
16
+ * - creating backups for modified working copies
17
+ * - deleting backups for saved working copies
18
+ * - handling backups on shutdown
19
+ */
13
20
  export declare abstract class WorkingCopyBackupTracker extends Disposable {
14
21
  protected readonly workingCopyBackupService: IWorkingCopyBackupService;
15
22
  protected readonly workingCopyService: IWorkingCopyService;
@@ -5,8 +5,18 @@ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/
5
5
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
6
6
  import { IWorkingCopyEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service";
7
7
  export interface IWorkingCopyEditorHandler {
8
+ /**
9
+ * Whether the handler is capable of opening the specific backup in
10
+ * an editor.
11
+ */
8
12
  handles(workingCopy: IWorkingCopyIdentifier): boolean | Promise<boolean>;
13
+ /**
14
+ * Whether the provided working copy is opened in the provided editor.
15
+ */
9
16
  isOpen(workingCopy: IWorkingCopyIdentifier, editor: EditorInput): boolean;
17
+ /**
18
+ * Create an editor that is suitable of opening the provided working copy.
19
+ */
10
20
  createEditor(workingCopy: IWorkingCopyIdentifier): EditorInput | Promise<EditorInput>;
11
21
  }
12
22
  export declare class WorkingCopyEditorService extends Disposable implements IWorkingCopyEditorService {
@@ -1,22 +1,60 @@
1
1
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
2
  import { SaveSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
3
3
  export interface IWorkingCopyHistoryEvent {
4
+ /**
5
+ * The entry this event is about.
6
+ */
4
7
  readonly entry: IWorkingCopyHistoryEntry;
5
8
  }
6
9
  export interface IWorkingCopyHistoryEntry {
10
+ /**
11
+ * Unique identifier of this entry for the working copy.
12
+ */
7
13
  readonly id: string;
14
+ /**
15
+ * The associated working copy of this entry.
16
+ */
8
17
  readonly workingCopy: {
9
18
  readonly resource: URI;
10
19
  readonly name: string;
11
20
  };
21
+ /**
22
+ * The location on disk of this history entry.
23
+ */
12
24
  readonly location: URI;
25
+ /**
26
+ * The time when this history entry was created.
27
+ */
13
28
  timestamp: number;
29
+ /**
30
+ * Associated source with the history entry.
31
+ */
14
32
  source: SaveSource;
33
+ /**
34
+ * Optional additional metadata associated with the
35
+ * source that can help to describe the source.
36
+ */
15
37
  sourceDescription: string | undefined;
16
38
  }
17
39
  export interface IWorkingCopyHistoryEntryDescriptor {
40
+ /**
41
+ * The associated resource of this history entry.
42
+ */
18
43
  readonly resource: URI;
44
+ /**
45
+ * Optional associated timestamp to use for the
46
+ * history entry. If not provided, the current
47
+ * time will be used.
48
+ */
19
49
  readonly timestamp?: number;
50
+ /**
51
+ * Optional source why the entry was added.
52
+ */
20
53
  readonly source?: SaveSource;
21
54
  }
55
+ /**
56
+ * A limit on how many I/O operations we allow to run in parallel.
57
+ * We do not want to spam the file system with too many requests
58
+ * at the same time, so we limit to a maximum degree of parallellism.
59
+ */
22
60
  export declare const MAX_PARALLEL_HISTORY_IO_OPS = 20;
@@ -15,6 +15,11 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log
15
15
  import { SaveSource } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
16
16
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
17
17
  export interface IWorkingCopyHistoryModelOptions {
18
+ /**
19
+ * Whether to flush when the model changes. If not
20
+ * configured, `model.store()` has to be called
21
+ * explicitly.
22
+ */
18
23
  flushOnChange: boolean;
19
24
  }
20
25
  export declare class WorkingCopyHistoryModel {
@@ -3,6 +3,9 @@ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/
3
3
  import { IWorkingCopy, IWorkingCopyIdentifier, IWorkingCopySaveEvent as IBaseWorkingCopySaveEvent } from "@codingame/monaco-vscode-caeb744c-8e3f-5c11-80fb-0f057d24d544-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
4
4
  import { IWorkingCopyService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service";
5
5
  export interface IWorkingCopySaveEvent extends IBaseWorkingCopySaveEvent {
6
+ /**
7
+ * The working copy that was saved.
8
+ */
6
9
  readonly workingCopy: IWorkingCopy;
7
10
  }
8
11
  export declare class WorkingCopyService extends Disposable implements IWorkingCopyService {