@codingame/monaco-vscode-base-service-override 11.1.2 → 12.0.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/index.d.ts +2 -1
- package/index.js +65 -1
- package/package.json +31 -7
- package/vscode/src/vs/base/parts/request/common/requestImpl.d.ts +3 -0
- package/vscode/src/vs/base/parts/request/{browser/request.js → common/requestImpl.js} +11 -6
- package/vscode/src/vs/platform/download/common/downloadService.d.ts +12 -0
- package/vscode/src/vs/platform/download/common/downloadService.js +2 -1
- package/vscode/src/vs/platform/request/common/requestIpc.d.ts +22 -0
- package/vscode/src/vs/platform/request/common/requestIpc.js +1 -0
- package/vscode/src/vs/platform/url/common/urlService.d.ts +17 -0
- package/vscode/src/vs/platform/url/common/urlService.js +3 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchEditorWorkerService.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchEditorWorkerService.js +2 -1
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.d.ts +24 -0
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +21 -19
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.d.ts +24 -0
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +29 -27
- package/vscode/src/vs/workbench/services/label/common/labelService.d.ts +47 -0
- package/vscode/src/vs/workbench/services/label/common/labelService.js +49 -44
- package/vscode/src/vs/workbench/services/path/browser/pathService.d.ts +9 -0
- package/vscode/src/vs/workbench/services/path/browser/pathService.js +2 -0
- package/vscode/src/vs/workbench/services/path/common/pathService.d.ts +32 -0
- package/vscode/src/vs/workbench/services/path/common/pathService.js +7 -6
- package/vscode/src/vs/workbench/services/request/browser/requestService.d.ts +19 -0
- package/vscode/src/vs/workbench/services/request/browser/requestService.js +4 -3
- package/vscode/src/vs/workbench/services/url/browser/urlService.d.ts +15 -0
- package/vscode/src/vs/workbench/services/url/browser/urlService.js +3 -1
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityRegistry.d.ts +11 -0
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityRegistry.js +2 -0
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.d.ts +17 -0
- package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +3 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.d.ts +17 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +13 -11
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.d.ts +15 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.d.ts +89 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js +10 -7
- package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.d.ts +11 -0
- package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js +2 -0
- package/base.js +0 -63
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditing.js +0 -8
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IWaitUntil } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
5
|
+
import { FileOperation, IFileStatWithMetadata } from "vscode/vscode/vs/platform/files/common/files";
|
|
6
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
7
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
8
|
+
import { IWorkingCopyService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service";
|
|
9
|
+
import { IWorkingCopy } from "@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
10
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
11
|
+
import { VSBuffer, VSBufferReadable, VSBufferReadableStream } from "vscode/vscode/vs/base/common/buffer";
|
|
12
|
+
import { SaveReason } from "vscode/vscode/vs/workbench/common/editor";
|
|
13
|
+
import { IProgress, IProgressStep } from "vscode/vscode/vs/platform/progress/common/progress";
|
|
14
|
+
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-99f24462-c56d-5407-83fb-2ea9dd33cc8c-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
15
|
+
import { IWorkingCopyFileService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
16
|
+
export interface SourceTargetPair {
|
|
17
|
+
readonly source?: URI;
|
|
18
|
+
readonly target: URI;
|
|
19
|
+
}
|
|
20
|
+
export interface IFileOperationUndoRedoInfo {
|
|
21
|
+
undoRedoGroupId?: number;
|
|
22
|
+
isUndoing?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkingCopyFileEvent extends IWaitUntil {
|
|
25
|
+
readonly correlationId: number;
|
|
26
|
+
readonly operation: FileOperation;
|
|
27
|
+
readonly files: readonly SourceTargetPair[];
|
|
28
|
+
}
|
|
29
|
+
export interface IWorkingCopyFileOperationParticipant {
|
|
30
|
+
participate(files: SourceTargetPair[], operation: FileOperation, undoInfo: IFileOperationUndoRedoInfo | undefined, timeout: number, token: CancellationToken): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export interface IStoredFileWorkingCopySaveParticipantContext {
|
|
33
|
+
readonly reason: SaveReason;
|
|
34
|
+
readonly savedFrom?: URI;
|
|
35
|
+
}
|
|
36
|
+
export interface IStoredFileWorkingCopySaveParticipant {
|
|
37
|
+
participate(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: IStoredFileWorkingCopySaveParticipantContext, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface ICreateOperation {
|
|
40
|
+
resource: URI;
|
|
41
|
+
overwrite?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface ICreateFileOperation extends ICreateOperation {
|
|
44
|
+
contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream;
|
|
45
|
+
}
|
|
46
|
+
export interface IDeleteOperation {
|
|
47
|
+
resource: URI;
|
|
48
|
+
useTrash?: boolean;
|
|
49
|
+
recursive?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IMoveOperation {
|
|
52
|
+
file: Required<SourceTargetPair>;
|
|
53
|
+
overwrite?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface ICopyOperation extends IMoveOperation {
|
|
56
|
+
}
|
|
57
|
+
export type WorkingCopyProvider = (resourceOrFolder: URI) => IWorkingCopy[];
|
|
58
|
+
export declare class WorkingCopyFileService extends Disposable implements IWorkingCopyFileService {
|
|
59
|
+
private readonly fileService;
|
|
60
|
+
private readonly workingCopyService;
|
|
61
|
+
private readonly instantiationService;
|
|
62
|
+
private readonly uriIdentityService;
|
|
63
|
+
readonly _serviceBrand: undefined;
|
|
64
|
+
private readonly _onWillRunWorkingCopyFileOperation;
|
|
65
|
+
readonly onWillRunWorkingCopyFileOperation: import("vscode/vscode/vs/base/common/event").Event<WorkingCopyFileEvent>;
|
|
66
|
+
private readonly _onDidFailWorkingCopyFileOperation;
|
|
67
|
+
readonly onDidFailWorkingCopyFileOperation: import("vscode/vscode/vs/base/common/event").Event<WorkingCopyFileEvent>;
|
|
68
|
+
private readonly _onDidRunWorkingCopyFileOperation;
|
|
69
|
+
readonly onDidRunWorkingCopyFileOperation: import("vscode/vscode/vs/base/common/event").Event<WorkingCopyFileEvent>;
|
|
70
|
+
private correlationIds;
|
|
71
|
+
constructor(fileService: IFileService, workingCopyService: IWorkingCopyService, instantiationService: IInstantiationService, uriIdentityService: IUriIdentityService);
|
|
72
|
+
create(operations: ICreateFileOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<IFileStatWithMetadata[]>;
|
|
73
|
+
createFolder(operations: ICreateOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<IFileStatWithMetadata[]>;
|
|
74
|
+
doCreateFileOrFolder(operations: (ICreateFileOperation | ICreateOperation)[], isFile: boolean, token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<IFileStatWithMetadata[]>;
|
|
75
|
+
move(operations: IMoveOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<IFileStatWithMetadata[]>;
|
|
76
|
+
copy(operations: ICopyOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<IFileStatWithMetadata[]>;
|
|
77
|
+
private doMoveOrCopy;
|
|
78
|
+
delete(operations: IDeleteOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<void>;
|
|
79
|
+
private readonly fileOperationParticipants;
|
|
80
|
+
addFileOperationParticipant(participant: IWorkingCopyFileOperationParticipant): IDisposable;
|
|
81
|
+
private runFileOperationParticipants;
|
|
82
|
+
private readonly saveParticipants;
|
|
83
|
+
get hasSaveParticipants(): boolean;
|
|
84
|
+
addSaveParticipant(participant: IStoredFileWorkingCopySaveParticipant): IDisposable;
|
|
85
|
+
runSaveParticipants(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: IStoredFileWorkingCopySaveParticipantContext, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
|
|
86
|
+
private readonly workingCopyProviders;
|
|
87
|
+
registerWorkingCopyProvider(provider: WorkingCopyProvider): IDisposable;
|
|
88
|
+
getDirty(resource: URI): IWorkingCopy[];
|
|
89
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
5
|
import { AsyncEmitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
6
|
import { Promises } from 'vscode/vscode/vs/base/common/async';
|
|
5
7
|
import { insert } from 'vscode/vscode/vs/base/common/arrays';
|
|
6
8
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
7
10
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
8
11
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
9
12
|
import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
@@ -57,8 +60,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
const files = ( operations.map(operation => ({ target: operation.resource })));
|
|
60
|
-
await this.runFileOperationParticipants(files,
|
|
61
|
-
const event = { correlationId: this.correlationIds++, operation:
|
|
63
|
+
await this.runFileOperationParticipants(files, FileOperation.CREATE, undoInfo, token);
|
|
64
|
+
const event = { correlationId: this.correlationIds++, operation: FileOperation.CREATE, files };
|
|
62
65
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
63
66
|
let stats;
|
|
64
67
|
try {
|
|
@@ -93,8 +96,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
const files = ( operations.map(o => o.file));
|
|
96
|
-
await this.runFileOperationParticipants(files, move ?
|
|
97
|
-
const event = { correlationId: this.correlationIds++, operation: move ?
|
|
99
|
+
await this.runFileOperationParticipants(files, move ? FileOperation.MOVE : FileOperation.COPY, undoInfo, token);
|
|
100
|
+
const event = { correlationId: this.correlationIds++, operation: move ? FileOperation.MOVE : FileOperation.COPY, files };
|
|
98
101
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
99
102
|
try {
|
|
100
103
|
for (const { file: { source, target }, overwrite } of operations) {
|
|
@@ -125,8 +128,8 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
|
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
const files = ( operations.map(operation => ({ target: operation.resource })));
|
|
128
|
-
await this.runFileOperationParticipants(files,
|
|
129
|
-
const event = { correlationId: this.correlationIds++, operation:
|
|
131
|
+
await this.runFileOperationParticipants(files, FileOperation.DELETE, undoInfo, token);
|
|
132
|
+
const event = { correlationId: this.correlationIds++, operation: FileOperation.DELETE, files };
|
|
130
133
|
await this._onWillRunWorkingCopyFileOperation.fireAsync(event, CancellationToken.None );
|
|
131
134
|
for (const operation of operations) {
|
|
132
135
|
const dirtyWorkingCopies = this.getDirty(operation.resource);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { ICanonicalUriProvider } from "vscode/vscode/vs/platform/workspace/common/canonicalUri";
|
|
5
|
+
import { ICanonicalUriService } from "vscode/vscode/vs/platform/workspace/common/canonicalUri.service";
|
|
6
|
+
export declare class CanonicalUriService implements ICanonicalUriService {
|
|
7
|
+
readonly _serviceBrand: undefined;
|
|
8
|
+
private readonly _providers;
|
|
9
|
+
registerCanonicalUriProvider(provider: ICanonicalUriProvider): IDisposable;
|
|
10
|
+
provideCanonicalUri(uri: URI, targetScheme: string, token: CancellationToken): Promise<URI | undefined>;
|
|
11
|
+
}
|
package/base.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
3
|
-
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request.service';
|
|
4
|
-
import { IDecorationsService } from 'vscode/vscode/vs/workbench/services/decorations/common/decorations.service';
|
|
5
|
-
import { IJSONEditingService } from 'vscode/vscode/vs/workbench/services/configuration/common/jsonEditing.service';
|
|
6
|
-
import { ITreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDndService';
|
|
7
|
-
import { TreeViewsDnDService } from 'vscode/vscode/vs/editor/common/services/treeViewsDnd';
|
|
8
|
-
import { IURLService } from 'vscode/vscode/vs/platform/url/common/url.service';
|
|
9
|
-
import { JSONEditingService } from './vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js';
|
|
10
|
-
import { DecorationsService } from './vscode/src/vs/workbench/services/decorations/browser/decorationsService.js';
|
|
11
|
-
import { BrowserRequestService } from './vscode/src/vs/workbench/services/request/browser/requestService.js';
|
|
12
|
-
import { BrowserURLService } from './vscode/src/vs/workbench/services/url/browser/urlService.js';
|
|
13
|
-
import { CanonicalUriService } from './vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js';
|
|
14
|
-
import { ICanonicalUriService } from 'vscode/vscode/vs/platform/workspace/common/canonicalUri.service';
|
|
15
|
-
import { IUserActivityService } from 'vscode/vscode/vs/workbench/services/userActivity/common/userActivityService.service';
|
|
16
|
-
import { IDownloadService } from 'vscode/vscode/vs/platform/download/common/download.service';
|
|
17
|
-
import { DownloadService } from './vscode/src/vs/platform/download/common/downloadService.js';
|
|
18
|
-
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
|
|
19
|
-
import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
20
|
-
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
21
|
-
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
22
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
23
|
-
import { guessLocalUserHome } from './vscode/src/vs/workbench/services/path/browser/pathService.js';
|
|
24
|
-
import { AbstractPathService } from './vscode/src/vs/workbench/services/path/common/pathService.js';
|
|
25
|
-
import { UserActivityService } from './vscode/src/vs/workbench/services/userActivity/common/userActivityService.js';
|
|
26
|
-
import { WorkingCopyFileService } from './vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js';
|
|
27
|
-
import { ITrustedDomainService } from 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomainService.service';
|
|
28
|
-
import { TrustedDomainService } from 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomainService';
|
|
29
|
-
import { LabelService } from './vscode/src/vs/workbench/services/label/common/labelService.js';
|
|
30
|
-
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
31
|
-
import { IEditorWorkerService } from 'vscode/vscode/vs/editor/common/services/editorWorker';
|
|
32
|
-
import { WorkbenchEditorWorkerService } from './vscode/src/vs/workbench/contrib/codeEditor/browser/workbenchEditorWorkerService.js';
|
|
33
|
-
import { getEnvironmentOverride } from 'vscode/workbench';
|
|
34
|
-
|
|
35
|
-
let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
|
|
36
|
-
constructor(remoteAgentService, environmentService, contextService) {
|
|
37
|
-
super(getEnvironmentOverride().userHome ?? guessLocalUserHome(environmentService, contextService), remoteAgentService, environmentService, contextService);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
BrowserPathServiceOverride = __decorate([
|
|
41
|
-
( __param(0, IRemoteAgentService)),
|
|
42
|
-
( __param(1, IWorkbenchEnvironmentService)),
|
|
43
|
-
( __param(2, IWorkspaceContextService))
|
|
44
|
-
], BrowserPathServiceOverride);
|
|
45
|
-
function getServiceOverride() {
|
|
46
|
-
return {
|
|
47
|
-
[( IRequestService.toString())]: new SyncDescriptor(BrowserRequestService, [], true),
|
|
48
|
-
[( IDownloadService.toString())]: new SyncDescriptor(DownloadService, [], true),
|
|
49
|
-
[( IDecorationsService.toString())]: new SyncDescriptor(DecorationsService, [], true),
|
|
50
|
-
[( IJSONEditingService.toString())]: new SyncDescriptor(JSONEditingService, [], true),
|
|
51
|
-
[( ITreeViewsDnDService.toString())]: new SyncDescriptor(TreeViewsDnDService, [], true),
|
|
52
|
-
[( IURLService.toString())]: new SyncDescriptor(BrowserURLService, [], true),
|
|
53
|
-
[( ICanonicalUriService.toString())]: new SyncDescriptor(CanonicalUriService, [], false),
|
|
54
|
-
[( IUserActivityService.toString())]: new SyncDescriptor(UserActivityService, [], true),
|
|
55
|
-
[( IWorkingCopyFileService.toString())]: new SyncDescriptor(WorkingCopyFileService, [], false),
|
|
56
|
-
[( IPathService.toString())]: new SyncDescriptor(BrowserPathServiceOverride, [], true),
|
|
57
|
-
[( ITrustedDomainService.toString())]: new SyncDescriptor(TrustedDomainService, [], true),
|
|
58
|
-
[( ILabelService.toString())]: new SyncDescriptor(LabelService, [], true),
|
|
59
|
-
[( IEditorWorkerService.toString())]: new SyncDescriptor(WorkbenchEditorWorkerService, [], true)
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { getServiceOverride as default };
|