@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,47 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { IDisposable, Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
4
|
+
import { IWorkspace, ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from "vscode/vscode/vs/platform/workspace/common/workspace";
|
|
5
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
import { ResourceLabelFormatter, ResourceLabelFormatting, IFormatterChangeEvent, Verbosity } from "@codingame/monaco-vscode-82e231ca-6ed7-5920-b2b8-1874ccc0be07-common/vscode/vs/platform/label/common/label";
|
|
7
|
+
import { ILabelService } from "vscode/vscode/vs/platform/label/common/label.service";
|
|
8
|
+
import { ILifecycleService } from "vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
9
|
+
import { IPathService } from "vscode/vscode/vs/workbench/services/path/common/pathService.service";
|
|
10
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
11
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
12
|
+
export declare class LabelService extends Disposable implements ILabelService {
|
|
13
|
+
private readonly environmentService;
|
|
14
|
+
private readonly contextService;
|
|
15
|
+
private readonly pathService;
|
|
16
|
+
private readonly remoteAgentService;
|
|
17
|
+
readonly _serviceBrand: undefined;
|
|
18
|
+
private formatters;
|
|
19
|
+
private readonly _onDidChangeFormatters;
|
|
20
|
+
readonly onDidChangeFormatters: import("vscode/vscode/vs/base/common/event").Event<IFormatterChangeEvent>;
|
|
21
|
+
private readonly storedFormattersMemento;
|
|
22
|
+
private readonly storedFormatters;
|
|
23
|
+
private os;
|
|
24
|
+
private userHome;
|
|
25
|
+
constructor(environmentService: IWorkbenchEnvironmentService, contextService: IWorkspaceContextService, pathService: IPathService, remoteAgentService: IRemoteAgentService, storageService: IStorageService, lifecycleService: ILifecycleService);
|
|
26
|
+
private resolveRemoteEnvironment;
|
|
27
|
+
findFormatting(resource: URI): ResourceLabelFormatting | undefined;
|
|
28
|
+
getUriLabel(resource: URI, options?: {
|
|
29
|
+
relative?: boolean;
|
|
30
|
+
noPrefix?: boolean;
|
|
31
|
+
separator?: "/" | "\\";
|
|
32
|
+
}): string;
|
|
33
|
+
private doGetUriLabel;
|
|
34
|
+
getUriBasenameLabel(resource: URI): string;
|
|
35
|
+
getWorkspaceLabel(workspace: IWorkspace | IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI, options?: {
|
|
36
|
+
verbose: Verbosity;
|
|
37
|
+
}): string;
|
|
38
|
+
private doGetWorkspaceLabel;
|
|
39
|
+
private doGetSingleFolderWorkspaceLabel;
|
|
40
|
+
getSeparator(scheme: string, authority?: string): "/" | "\\";
|
|
41
|
+
getHostLabel(scheme: string, authority?: string): string;
|
|
42
|
+
getHostTooltip(scheme: string, authority?: string): string | undefined;
|
|
43
|
+
registerCachedFormatter(formatter: ResourceLabelFormatter): IDisposable;
|
|
44
|
+
registerFormatter(formatter: ResourceLabelFormatter): IDisposable;
|
|
45
|
+
private formatUri;
|
|
46
|
+
private appendWorkspaceSuffix;
|
|
47
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
5
|
import { dispose, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -11,22 +12,26 @@ import { isWorkspace, toWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier,
|
|
|
11
12
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
12
13
|
import { basenameOrAuthority, basename, joinPath, dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
13
14
|
import { getPathLabel, tildify } from 'vscode/vscode/vs/base/common/labels';
|
|
15
|
+
import { Verbosity } from '@codingame/monaco-vscode-82e231ca-6ed7-5920-b2b8-1874ccc0be07-common/vscode/vs/platform/label/common/label';
|
|
14
16
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
15
17
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
16
18
|
import { match } from 'vscode/vscode/vs/base/common/glob';
|
|
19
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
17
20
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
21
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
18
22
|
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
|
|
19
23
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
20
|
-
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
24
|
+
import { OS, OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
21
25
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
22
26
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
27
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
23
28
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
24
|
-
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
29
|
+
import { Memento } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/common/memento';
|
|
25
30
|
|
|
26
31
|
const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
27
32
|
extensionPoint: 'resourceLabelFormatters',
|
|
28
33
|
jsonSchema: {
|
|
29
|
-
description: ( localize(
|
|
34
|
+
description: ( localize(11615, 'Contributes resource label formatting rules.')),
|
|
30
35
|
type: 'array',
|
|
31
36
|
items: {
|
|
32
37
|
type: 'object',
|
|
@@ -35,52 +40,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
|
|
|
35
40
|
scheme: {
|
|
36
41
|
type: 'string',
|
|
37
42
|
description: ( localize(
|
|
38
|
-
|
|
43
|
+
11616,
|
|
39
44
|
'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
|
|
40
45
|
)),
|
|
41
46
|
},
|
|
42
47
|
authority: {
|
|
43
48
|
type: 'string',
|
|
44
49
|
description: ( localize(
|
|
45
|
-
|
|
50
|
+
11617,
|
|
46
51
|
'URI authority on which to match the formatter on. Simple glob patterns are supported.'
|
|
47
52
|
)),
|
|
48
53
|
},
|
|
49
54
|
formatting: {
|
|
50
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(11618, "Rules for formatting uri resource labels.")),
|
|
51
56
|
type: 'object',
|
|
52
57
|
properties: {
|
|
53
58
|
label: {
|
|
54
59
|
type: 'string',
|
|
55
60
|
description: ( localize(
|
|
56
|
-
|
|
61
|
+
11619,
|
|
57
62
|
"Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
|
|
58
63
|
))
|
|
59
64
|
},
|
|
60
65
|
separator: {
|
|
61
66
|
type: 'string',
|
|
62
67
|
description: ( localize(
|
|
63
|
-
|
|
68
|
+
11620,
|
|
64
69
|
"Separator to be used in the uri label display. '/' or '\' as an example."
|
|
65
70
|
))
|
|
66
71
|
},
|
|
67
72
|
stripPathStartingSeparator: {
|
|
68
73
|
type: 'boolean',
|
|
69
74
|
description: ( localize(
|
|
70
|
-
|
|
75
|
+
11621,
|
|
71
76
|
"Controls whether `${path}` substitutions should have starting separator characters stripped."
|
|
72
77
|
))
|
|
73
78
|
},
|
|
74
79
|
tildify: {
|
|
75
80
|
type: 'boolean',
|
|
76
81
|
description: ( localize(
|
|
77
|
-
|
|
82
|
+
11622,
|
|
78
83
|
"Controls if the start of the uri label should be tildified when possible."
|
|
79
84
|
))
|
|
80
85
|
},
|
|
81
86
|
workspaceSuffix: {
|
|
82
87
|
type: 'string',
|
|
83
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(11623, "Suffix appended to the workspace label."))
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
}
|
|
@@ -95,7 +100,7 @@ function hasDriveLetterIgnorePlatform(path) {
|
|
|
95
100
|
}
|
|
96
101
|
let ResourceLabelFormattersHandler = class ResourceLabelFormattersHandler {
|
|
97
102
|
constructor(labelService) {
|
|
98
|
-
this.formattersDisposables = (
|
|
103
|
+
this.formattersDisposables = ( new Map());
|
|
99
104
|
resourceLabelFormattersExtPoint.setHandler((extensions, delta) => {
|
|
100
105
|
for (const added of delta.added) {
|
|
101
106
|
for (const untrustedFormatter of added.value) {
|
|
@@ -120,10 +125,10 @@ let ResourceLabelFormattersHandler = class ResourceLabelFormattersHandler {
|
|
|
120
125
|
});
|
|
121
126
|
}
|
|
122
127
|
};
|
|
123
|
-
ResourceLabelFormattersHandler = (
|
|
124
|
-
(
|
|
125
|
-
], ResourceLabelFormattersHandler))
|
|
126
|
-
(
|
|
128
|
+
ResourceLabelFormattersHandler = ( __decorate([
|
|
129
|
+
( __param(0, ILabelService))
|
|
130
|
+
], ResourceLabelFormattersHandler));
|
|
131
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(ResourceLabelFormattersHandler, LifecyclePhase.Restored);
|
|
127
132
|
const FORMATTER_CACHE_SIZE = 50;
|
|
128
133
|
let LabelService = class LabelService extends Disposable {
|
|
129
134
|
constructor(environmentService, contextService, pathService, remoteAgentService, storageService, lifecycleService) {
|
|
@@ -132,12 +137,12 @@ let LabelService = class LabelService extends Disposable {
|
|
|
132
137
|
this.contextService = contextService;
|
|
133
138
|
this.pathService = pathService;
|
|
134
139
|
this.remoteAgentService = remoteAgentService;
|
|
135
|
-
this._onDidChangeFormatters = this._register((
|
|
140
|
+
this._onDidChangeFormatters = this._register(( new Emitter({ leakWarningThreshold: 400 })));
|
|
136
141
|
this.onDidChangeFormatters = this._onDidChangeFormatters.event;
|
|
137
142
|
this.os = OS;
|
|
138
143
|
this.userHome = pathService.defaultUriScheme === Schemas.file ? this.pathService.userHome({ preferLocal: true }) : undefined;
|
|
139
|
-
const memento = this.storedFormattersMemento = (
|
|
140
|
-
this.storedFormatters = memento.getMemento(
|
|
144
|
+
const memento = this.storedFormattersMemento = ( new Memento('cachedResourceLabelFormatters2', storageService));
|
|
145
|
+
this.storedFormatters = memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
141
146
|
this.formatters = this.storedFormatters?.formatters?.slice() || [];
|
|
142
147
|
this.resolveRemoteEnvironment();
|
|
143
148
|
}
|
|
@@ -234,7 +239,7 @@ let LabelService = class LabelService extends Disposable {
|
|
|
234
239
|
pathLib = posix;
|
|
235
240
|
}
|
|
236
241
|
else {
|
|
237
|
-
pathLib = (
|
|
242
|
+
pathLib = (this.os === OperatingSystem.Windows) ? win32 : posix;
|
|
238
243
|
}
|
|
239
244
|
return pathLib.basename(label);
|
|
240
245
|
}
|
|
@@ -259,10 +264,10 @@ let LabelService = class LabelService extends Disposable {
|
|
|
259
264
|
}
|
|
260
265
|
doGetWorkspaceLabel(workspaceUri, options) {
|
|
261
266
|
if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
|
|
262
|
-
return
|
|
267
|
+
return localize(11624, "Untitled (Workspace)");
|
|
263
268
|
}
|
|
264
269
|
if (isTemporaryWorkspace(workspaceUri)) {
|
|
265
|
-
return
|
|
270
|
+
return localize(11625, "Workspace");
|
|
266
271
|
}
|
|
267
272
|
let filename = basename(workspaceUri);
|
|
268
273
|
if (filename.endsWith(WORKSPACE_EXTENSION)) {
|
|
@@ -270,22 +275,22 @@ let LabelService = class LabelService extends Disposable {
|
|
|
270
275
|
}
|
|
271
276
|
let label;
|
|
272
277
|
switch (options?.verbose) {
|
|
273
|
-
case
|
|
278
|
+
case Verbosity.SHORT:
|
|
274
279
|
label = filename;
|
|
275
280
|
break;
|
|
276
|
-
case
|
|
281
|
+
case Verbosity.LONG:
|
|
277
282
|
label = ( localize(
|
|
278
|
-
|
|
283
|
+
11626,
|
|
279
284
|
"{0} (Workspace)",
|
|
280
285
|
this.getUriLabel(joinPath(dirname(workspaceUri), filename))
|
|
281
286
|
));
|
|
282
287
|
break;
|
|
283
|
-
case
|
|
288
|
+
case Verbosity.MEDIUM:
|
|
284
289
|
default:
|
|
285
|
-
label = ( localize(
|
|
290
|
+
label = ( localize(11627, "{0} (Workspace)", filename));
|
|
286
291
|
break;
|
|
287
292
|
}
|
|
288
|
-
if (options?.verbose ===
|
|
293
|
+
if (options?.verbose === Verbosity.SHORT) {
|
|
289
294
|
return label;
|
|
290
295
|
}
|
|
291
296
|
return this.appendWorkspaceSuffix(label, workspaceUri);
|
|
@@ -293,30 +298,30 @@ let LabelService = class LabelService extends Disposable {
|
|
|
293
298
|
doGetSingleFolderWorkspaceLabel(folderUri, options) {
|
|
294
299
|
let label;
|
|
295
300
|
switch (options?.verbose) {
|
|
296
|
-
case
|
|
301
|
+
case Verbosity.LONG:
|
|
297
302
|
label = this.getUriLabel(folderUri);
|
|
298
303
|
break;
|
|
299
|
-
case
|
|
300
|
-
case
|
|
304
|
+
case Verbosity.SHORT:
|
|
305
|
+
case Verbosity.MEDIUM:
|
|
301
306
|
default:
|
|
302
307
|
label = basename(folderUri) || posix.sep;
|
|
303
308
|
break;
|
|
304
309
|
}
|
|
305
|
-
if (options?.verbose ===
|
|
310
|
+
if (options?.verbose === Verbosity.SHORT) {
|
|
306
311
|
return label;
|
|
307
312
|
}
|
|
308
313
|
return this.appendWorkspaceSuffix(label, folderUri);
|
|
309
314
|
}
|
|
310
315
|
getSeparator(scheme, authority) {
|
|
311
|
-
const formatter = this.findFormatting((
|
|
316
|
+
const formatter = this.findFormatting(( URI.from({ scheme, authority })));
|
|
312
317
|
return formatter?.separator || posix.sep;
|
|
313
318
|
}
|
|
314
319
|
getHostLabel(scheme, authority) {
|
|
315
|
-
const formatter = this.findFormatting((
|
|
320
|
+
const formatter = this.findFormatting(( URI.from({ scheme, authority })));
|
|
316
321
|
return formatter?.workspaceSuffix || authority || '';
|
|
317
322
|
}
|
|
318
323
|
getHostTooltip(scheme, authority) {
|
|
319
|
-
const formatter = this.findFormatting((
|
|
324
|
+
const formatter = this.findFormatting(( URI.from({ scheme, authority })));
|
|
320
325
|
return formatter?.workspaceTooltip;
|
|
321
326
|
}
|
|
322
327
|
registerCachedFormatter(formatter) {
|
|
@@ -393,13 +398,13 @@ let LabelService = class LabelService extends Disposable {
|
|
|
393
398
|
return suffix ? `${label} [${suffix}]` : label;
|
|
394
399
|
}
|
|
395
400
|
};
|
|
396
|
-
LabelService = (
|
|
397
|
-
(
|
|
398
|
-
(
|
|
399
|
-
(
|
|
400
|
-
(
|
|
401
|
-
(
|
|
402
|
-
(
|
|
403
|
-
], LabelService))
|
|
401
|
+
LabelService = ( __decorate([
|
|
402
|
+
( __param(0, IWorkbenchEnvironmentService)),
|
|
403
|
+
( __param(1, IWorkspaceContextService)),
|
|
404
|
+
( __param(2, IPathService)),
|
|
405
|
+
( __param(3, IRemoteAgentService)),
|
|
406
|
+
( __param(4, IStorageService)),
|
|
407
|
+
( __param(5, ILifecycleService))
|
|
408
|
+
], LabelService));
|
|
404
409
|
|
|
405
410
|
export { LabelService };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
2
|
+
import { AbstractPathService } from "../common/pathService.js";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
5
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
export declare class BrowserPathService extends AbstractPathService {
|
|
7
|
+
constructor(remoteAgentService: IRemoteAgentService, environmentService: IWorkbenchEnvironmentService, contextService: IWorkspaceContextService);
|
|
8
|
+
}
|
|
9
|
+
export declare function guessLocalUserHome(environmentService: IWorkbenchEnvironmentService, contextService: IWorkspaceContextService): URI;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IPath } from "vscode/vscode/vs/base/common/path";
|
|
2
|
+
import { OperatingSystem } from "vscode/vscode/vs/base/common/platform";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
5
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
6
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
7
|
+
import { IPathService } from "vscode/vscode/vs/workbench/services/path/common/pathService.service";
|
|
8
|
+
export declare abstract class AbstractPathService implements IPathService {
|
|
9
|
+
private localUserHome;
|
|
10
|
+
private readonly remoteAgentService;
|
|
11
|
+
private readonly environmentService;
|
|
12
|
+
private contextService;
|
|
13
|
+
readonly _serviceBrand: undefined;
|
|
14
|
+
private resolveOS;
|
|
15
|
+
private resolveUserHome;
|
|
16
|
+
private maybeUnresolvedUserHome;
|
|
17
|
+
constructor(localUserHome: URI, remoteAgentService: IRemoteAgentService, environmentService: IWorkbenchEnvironmentService, contextService: IWorkspaceContextService);
|
|
18
|
+
hasValidBasename(resource: URI, basename?: string): Promise<boolean>;
|
|
19
|
+
hasValidBasename(resource: URI, os: OperatingSystem, basename?: string): boolean;
|
|
20
|
+
private doHasValidBasename;
|
|
21
|
+
get defaultUriScheme(): string;
|
|
22
|
+
static findDefaultUriScheme(environmentService: IWorkbenchEnvironmentService, contextService: IWorkspaceContextService): string;
|
|
23
|
+
userHome(options?: {
|
|
24
|
+
preferLocal: boolean;
|
|
25
|
+
}): Promise<URI>;
|
|
26
|
+
userHome(options: {
|
|
27
|
+
preferLocal: true;
|
|
28
|
+
}): URI;
|
|
29
|
+
get resolvedUserHome(): URI | undefined;
|
|
30
|
+
get path(): Promise<IPath>;
|
|
31
|
+
fileURI(_path: string): Promise<URI>;
|
|
32
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { isValidBasename } from 'vscode/vscode/vs/base/common/extpath';
|
|
3
4
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
5
|
import { win32, posix } from 'vscode/vscode/vs/base/common/path';
|
|
5
|
-
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
6
|
+
import { OS, OperatingSystem } from 'vscode/vscode/vs/base/common/platform';
|
|
6
7
|
import { basename } from 'vscode/vscode/vs/base/common/resources';
|
|
7
8
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
|
-
import { getVirtualWorkspaceScheme } from 'vscode/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
9
|
+
import { getVirtualWorkspaceScheme } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/workspace/common/virtualWorkspace';
|
|
9
10
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
10
11
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
11
12
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
@@ -35,7 +36,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
35
36
|
}
|
|
36
37
|
doHasValidBasename(resource, os, name) {
|
|
37
38
|
if (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeRemote) {
|
|
38
|
-
return isValidBasename(name ?? basename(resource), os ===
|
|
39
|
+
return isValidBasename(name ?? basename(resource), os === OperatingSystem.Windows);
|
|
39
40
|
}
|
|
40
41
|
return true;
|
|
41
42
|
}
|
|
@@ -68,7 +69,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
68
69
|
}
|
|
69
70
|
get path() {
|
|
70
71
|
return this.resolveOS.then(os => {
|
|
71
|
-
return os ===
|
|
72
|
+
return os === OperatingSystem.Windows ?
|
|
72
73
|
win32 :
|
|
73
74
|
posix;
|
|
74
75
|
});
|
|
@@ -76,7 +77,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
76
77
|
async fileURI(_path) {
|
|
77
78
|
let authority = '';
|
|
78
79
|
const os = await this.resolveOS;
|
|
79
|
-
if (os ===
|
|
80
|
+
if (os === OperatingSystem.Windows) {
|
|
80
81
|
_path = _path.replace(/\\/g, '/');
|
|
81
82
|
}
|
|
82
83
|
if (_path[0] === '/' && _path[1] === '/') {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IRequestOptions, IRequestContext } from "@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common/vscode/vs/base/parts/request/common/request";
|
|
2
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
3
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IRemoteAgentService } from "vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
5
|
+
import { AbstractRequestService, AuthInfo, Credentials } from "vscode/vscode/vs/platform/request/common/request";
|
|
6
|
+
import { IRequestService } from "vscode/vscode/vs/platform/request/common/request.service";
|
|
7
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
8
|
+
export declare class BrowserRequestService extends AbstractRequestService implements IRequestService {
|
|
9
|
+
private readonly remoteAgentService;
|
|
10
|
+
private readonly configurationService;
|
|
11
|
+
readonly _serviceBrand: undefined;
|
|
12
|
+
constructor(remoteAgentService: IRemoteAgentService, configurationService: IConfigurationService, logService: ILogService);
|
|
13
|
+
request(options: IRequestOptions, token: CancellationToken): Promise<IRequestContext>;
|
|
14
|
+
resolveProxy(url: string): Promise<string | undefined>;
|
|
15
|
+
lookupAuthorization(authInfo: AuthInfo): Promise<Credentials | undefined>;
|
|
16
|
+
lookupKerberosAuthorization(url: string): Promise<string | undefined>;
|
|
17
|
+
loadCertificates(): Promise<string[]>;
|
|
18
|
+
private _makeRemoteRequest;
|
|
19
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
3
4
|
import { RequestChannelClient } from '../../../../platform/request/common/requestIpc.js';
|
|
4
5
|
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
5
6
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
6
7
|
import { AbstractRequestService } from 'vscode/vscode/vs/platform/request/common/request';
|
|
7
|
-
import { request } from '../../../../base/parts/request/
|
|
8
|
+
import { request } from '../../../../base/parts/request/common/requestImpl.js';
|
|
8
9
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
9
10
|
|
|
10
11
|
let BrowserRequestService = class BrowserRequestService extends AbstractRequestService {
|
|
@@ -18,7 +19,7 @@ let BrowserRequestService = class BrowserRequestService extends AbstractRequestS
|
|
|
18
19
|
if (!options.proxyAuthorization) {
|
|
19
20
|
options.proxyAuthorization = this.configurationService.getValue('http.proxyAuthorization');
|
|
20
21
|
}
|
|
21
|
-
const context = await this.logAndRequest(options, () => request(options, token));
|
|
22
|
+
const context = await this.logAndRequest(options, () => request(options, token, () => navigator.onLine));
|
|
22
23
|
const connection = this.remoteAgentService.getConnection();
|
|
23
24
|
if (connection && context.res.statusCode === 405) {
|
|
24
25
|
return this._makeRemoteRequest(connection, options, token);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { URI, UriComponents } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { AbstractURLService } from "../../../../platform/url/common/urlService.js";
|
|
3
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
4
|
+
import { IBrowserWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
5
|
+
import { IOpenerService } from "vscode/vscode/vs/platform/opener/common/opener.service";
|
|
6
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
7
|
+
export interface IURLCallbackProvider {
|
|
8
|
+
readonly onCallback: Event<URI>;
|
|
9
|
+
create(options?: Partial<UriComponents>): URI;
|
|
10
|
+
}
|
|
11
|
+
export declare class BrowserURLService extends AbstractURLService {
|
|
12
|
+
private provider;
|
|
13
|
+
constructor(environmentService: IBrowserWorkbenchEnvironmentService, openerService: IOpenerService, productService: IProductService);
|
|
14
|
+
create(options?: Partial<UriComponents>): URI;
|
|
15
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
4
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
4
6
|
import { AbstractURLService } from '../../../../platform/url/common/urlService.js';
|
|
5
7
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
6
8
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IUserActivityService } from "vscode/vscode/vs/workbench/services/userActivity/common/userActivityService.service";
|
|
3
|
+
declare class UserActivityRegistry {
|
|
4
|
+
private todo;
|
|
5
|
+
add: (ctor: {
|
|
6
|
+
new (s: IUserActivityService, ...args: any[]): unknown;
|
|
7
|
+
}) => void;
|
|
8
|
+
take(userActivityService: IUserActivityService, instantiation: IInstantiationService): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const userActivityRegistry: UserActivityRegistry;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IUserActivityService } from "vscode/vscode/vs/workbench/services/userActivity/common/userActivityService.service";
|
|
5
|
+
export interface IMarkActiveOptions {
|
|
6
|
+
whenHeldFor?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class UserActivityService extends Disposable implements IUserActivityService {
|
|
9
|
+
readonly _serviceBrand: undefined;
|
|
10
|
+
private readonly markInactive;
|
|
11
|
+
private readonly changeEmitter;
|
|
12
|
+
private active;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
onDidChangeIsActive: Event<boolean>;
|
|
15
|
+
constructor(instantiationService: IInstantiationService);
|
|
16
|
+
markActive(opts?: IMarkActiveOptions): IDisposable;
|
|
17
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { RunOnceScheduler, runWhenGlobalIdle, disposableTimeout } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
5
|
import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
8
|
import { userActivityRegistry } from './userActivityRegistry.js';
|
|
7
9
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { IProgress, IProgressStep } from "vscode/vscode/vs/platform/progress/common/progress";
|
|
4
|
+
import { IProgressService } from "vscode/vscode/vs/platform/progress/common/progress.service";
|
|
5
|
+
import { IDisposable, Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
6
|
+
import { IStoredFileWorkingCopySaveParticipant, IStoredFileWorkingCopySaveParticipantContext } from "./workingCopyFileService.js";
|
|
7
|
+
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-99f24462-c56d-5407-83fb-2ea9dd33cc8c-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
8
|
+
export declare class StoredFileWorkingCopySaveParticipant extends Disposable {
|
|
9
|
+
private readonly logService;
|
|
10
|
+
private readonly progressService;
|
|
11
|
+
private readonly saveParticipants;
|
|
12
|
+
get length(): number;
|
|
13
|
+
constructor(logService: ILogService, progressService: IProgressService);
|
|
14
|
+
addSaveParticipant(participant: IStoredFileWorkingCopySaveParticipant): IDisposable;
|
|
15
|
+
participate(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: IStoredFileWorkingCopySaveParticipantContext, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
4
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
5
7
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
6
8
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
9
|
import { LinkedList } from 'vscode/vscode/vs/base/common/linkedList';
|
|
@@ -15,23 +17,23 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
15
17
|
super();
|
|
16
18
|
this.logService = logService;
|
|
17
19
|
this.progressService = progressService;
|
|
18
|
-
this.saveParticipants = (
|
|
20
|
+
this.saveParticipants = ( new LinkedList());
|
|
19
21
|
}
|
|
20
22
|
addSaveParticipant(participant) {
|
|
21
23
|
const remove = this.saveParticipants.push(participant);
|
|
22
24
|
return toDisposable(() => remove());
|
|
23
25
|
}
|
|
24
26
|
async participate(workingCopy, context, progress, token) {
|
|
25
|
-
const cts = (
|
|
27
|
+
const cts = ( new CancellationTokenSource(token));
|
|
26
28
|
workingCopy.model?.pushStackElement();
|
|
27
29
|
progress.report({
|
|
28
|
-
message: ( localize(
|
|
30
|
+
message: ( localize(12108, "Running Code Actions and Formatters..."))
|
|
29
31
|
});
|
|
30
32
|
let bubbleCancel = false;
|
|
31
33
|
await this.progressService.withProgress({
|
|
32
34
|
priority: NotificationPriority.URGENT,
|
|
33
|
-
location:
|
|
34
|
-
cancellable: ( localize(
|
|
35
|
+
location: ProgressLocation.Notification,
|
|
36
|
+
cancellable: ( localize(12109, "Skip")),
|
|
35
37
|
delay: workingCopy.isDirty() ? 5000 : 3000
|
|
36
38
|
}, async (progress) => {
|
|
37
39
|
for (const saveParticipant of this.saveParticipants) {
|
|
@@ -58,7 +60,7 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
58
60
|
workingCopy.model?.pushStackElement();
|
|
59
61
|
cts.dispose();
|
|
60
62
|
if (bubbleCancel) {
|
|
61
|
-
throw (
|
|
63
|
+
throw ( new CancellationError());
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
dispose() {
|
|
@@ -66,9 +68,9 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
|
|
|
66
68
|
super.dispose();
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
|
-
StoredFileWorkingCopySaveParticipant = (
|
|
70
|
-
(
|
|
71
|
-
(
|
|
72
|
-
], StoredFileWorkingCopySaveParticipant))
|
|
71
|
+
StoredFileWorkingCopySaveParticipant = ( __decorate([
|
|
72
|
+
( __param(0, ILogService)),
|
|
73
|
+
( __param(1, IProgressService))
|
|
74
|
+
], StoredFileWorkingCopySaveParticipant));
|
|
73
75
|
|
|
74
76
|
export { StoredFileWorkingCopySaveParticipant };
|
package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { IDisposable, Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IWorkingCopyFileOperationParticipant, SourceTargetPair, IFileOperationUndoRedoInfo } from "./workingCopyFileService.js";
|
|
5
|
+
import { FileOperation } from "vscode/vscode/vs/platform/files/common/files";
|
|
6
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
|
+
export declare class WorkingCopyFileOperationParticipant extends Disposable {
|
|
8
|
+
private readonly logService;
|
|
9
|
+
private readonly configurationService;
|
|
10
|
+
private readonly participants;
|
|
11
|
+
constructor(logService: ILogService, configurationService: IConfigurationService);
|
|
12
|
+
addFileOperationParticipant(participant: IWorkingCopyFileOperationParticipant): IDisposable;
|
|
13
|
+
participate(files: SourceTargetPair[], operation: FileOperation, undoInfo: IFileOperationUndoRedoInfo | undefined, token: CancellationToken): Promise<void>;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
3
4
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|