@codingame/monaco-vscode-remote-agent-service-override 11.1.2 → 12.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/index.d.ts +9 -2
- package/index.js +103 -1
- package/package.json +28 -8
- package/vscode/src/vs/platform/download/common/downloadIpc.d.ts +18 -0
- package/vscode/src/vs/platform/download/common/downloadIpc.js +1 -0
- package/vscode/src/vs/platform/files/common/diskFileSystemProviderClient.d.ts +43 -0
- package/vscode/src/vs/platform/files/common/diskFileSystemProviderClient.js +13 -12
- package/vscode/src/vs/platform/log/common/logIpc.d.ts +32 -0
- package/vscode/src/vs/platform/log/common/logIpc.js +1 -0
- package/vscode/src/vs/platform/remote/browser/browserSocketFactory.d.ts +29 -0
- package/vscode/src/vs/platform/remote/browser/browserSocketFactory.js +11 -10
- package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.d.ts +27 -0
- package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +4 -3
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.d.ts +1 -0
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.js +2 -0
- package/vscode/src/vs/platform/remote/common/remoteSocketFactoryService.d.ts +15 -0
- package/vscode/src/vs/platform/remote/common/remoteSocketFactoryService.js +1 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/explorerViewItems.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/explorerViewItems.js +19 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/media/remoteViewlet.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.js +13 -11
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remote.js +130 -137
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteConnectionHealth.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteConnectionHealth.js +37 -29
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIndicator.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIndicator.js +79 -78
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.js +3 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.js +13 -12
- package/vscode/src/vs/workbench/contrib/remote/browser/showCandidate.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/showCandidate.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelFactory.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelFactory.js +13 -14
- package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +103 -101
- package/vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.d.ts +8 -0
- package/vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.js +4 -3
- package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.d.ts +12 -0
- package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +23 -22
- package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.d.ts +35 -0
- package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.js +3 -2
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.d.ts +47 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.js +1 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentService.d.ts +40 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteAgentService.js +1 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.d.ts +23 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js +3 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.d.ts +10 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.js +3 -1
- package/vscode/src/vs/workbench/services/tunnel/browser/tunnelService.d.ts +13 -0
- package/vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js +3 -1
- package/remoteAgent.js +0 -100
package/index.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import type { IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
export interface RemoteAgentServiceOverrideParams {
|
|
3
|
+
/**
|
|
4
|
+
* if true, the default extensions on the remote agent will be scanned and added
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
scanRemoteExtensions?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function getServiceOverride({ scanRemoteExtensions }?: RemoteAgentServiceOverrideParams): IEditorOverrideServices;
|
package/index.js
CHANGED
|
@@ -1 +1,103 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
3
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
+
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
5
|
+
import { RemoteAgentService } from './vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js';
|
|
6
|
+
import { RemoteSocketFactoryService } from './vscode/src/vs/platform/remote/common/remoteSocketFactoryService.js';
|
|
7
|
+
import { IRemoteSocketFactoryService } from 'vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
|
|
8
|
+
import { RemoteConnectionType } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
9
|
+
import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver.service';
|
|
10
|
+
import { RemoteAuthorityResolverService } from './vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js';
|
|
11
|
+
import { BrowserSocketFactory } from './vscode/src/vs/platform/remote/browser/browserSocketFactory.js';
|
|
12
|
+
import { RemoteFileSystemProviderClient } from './vscode/src/vs/workbench/services/remote/common/remoteFileSystemProviderClient.js';
|
|
13
|
+
import '@codingame/monaco-vscode-abed5a84-8a82-5f84-9412-88a736235bae-common/vscode/vs/workbench/services/environment/browser/environmentService';
|
|
14
|
+
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
15
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
16
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
17
|
+
import { RemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService';
|
|
18
|
+
import { IRemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService.service';
|
|
19
|
+
import { ExternalUriOpenerService } from '@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
|
|
20
|
+
import { IExternalUriOpenerService } from 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.service';
|
|
21
|
+
import { RemoteExtensionsScannerService } from './vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js';
|
|
22
|
+
import { IRemoteExtensionsScannerService } from 'vscode/vscode/vs/platform/remote/common/remoteExtensionsScanner.service';
|
|
23
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
24
|
+
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
|
|
25
|
+
import { BrowserRemoteResourceLoader } from './vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.js';
|
|
26
|
+
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
27
|
+
import { IRemoteUserDataProfilesService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.service';
|
|
28
|
+
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
29
|
+
import { IActiveLanguagePackService } from 'vscode/vscode/vs/workbench/services/localization/common/locale.service';
|
|
30
|
+
import { ITunnelService } from 'vscode/vscode/vs/platform/tunnel/common/tunnel.service';
|
|
31
|
+
import { TunnelService } from './vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js';
|
|
32
|
+
import { IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
33
|
+
import getServiceOverride$1 from '@codingame/monaco-vscode-environment-service-override';
|
|
34
|
+
import { getWorkbenchConstructionOptions } from 'vscode/workbench';
|
|
35
|
+
import { registerServiceInitializePreParticipant } from 'vscode/lifecycle';
|
|
36
|
+
import './vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js';
|
|
37
|
+
import './vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.js';
|
|
38
|
+
import './vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.js';
|
|
39
|
+
|
|
40
|
+
let CustomRemoteSocketFactoryService = class CustomRemoteSocketFactoryService extends RemoteSocketFactoryService {
|
|
41
|
+
constructor(browserWorkbenchEnvironmentService) {
|
|
42
|
+
super();
|
|
43
|
+
this.register(RemoteConnectionType.WebSocket, new BrowserSocketFactory(browserWorkbenchEnvironmentService.options?.webSocketFactory));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
CustomRemoteSocketFactoryService = __decorate([
|
|
47
|
+
__param(0, IBrowserWorkbenchEnvironmentService)
|
|
48
|
+
], CustomRemoteSocketFactoryService);
|
|
49
|
+
let InjectedRemoteAuthorityResolverService = class InjectedRemoteAuthorityResolverService extends RemoteAuthorityResolverService {
|
|
50
|
+
constructor(environmentService, productService, logService, fileService) {
|
|
51
|
+
const configuration = getWorkbenchConstructionOptions();
|
|
52
|
+
const connectionToken = environmentService.options.connectionToken;
|
|
53
|
+
const remoteResourceLoader = configuration.remoteResourceProvider != null
|
|
54
|
+
? new BrowserRemoteResourceLoader(fileService, configuration.remoteResourceProvider)
|
|
55
|
+
: undefined;
|
|
56
|
+
const resourceUriProvider = configuration.resourceUriProvider ?? remoteResourceLoader?.getResourceUriProvider();
|
|
57
|
+
super(!environmentService.expectsResolverExtension, connectionToken, resourceUriProvider, configuration.serverBasePath, productService, logService);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
InjectedRemoteAuthorityResolverService = __decorate([
|
|
61
|
+
__param(0, IEnvironmentService),
|
|
62
|
+
__param(1, IProductService),
|
|
63
|
+
__param(2, ILogService),
|
|
64
|
+
__param(3, IFileService)
|
|
65
|
+
], InjectedRemoteAuthorityResolverService);
|
|
66
|
+
let CustomRemoteExtensionsScannerService = class CustomRemoteExtensionsScannerService extends RemoteExtensionsScannerService {
|
|
67
|
+
constructor(scanRemoteExtensions, remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, activeLanguagePackService, extensionManagementService, logService) {
|
|
68
|
+
super(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, activeLanguagePackService, extensionManagementService, logService);
|
|
69
|
+
this.scanRemoteExtensions = scanRemoteExtensions;
|
|
70
|
+
}
|
|
71
|
+
async scanExtensions() {
|
|
72
|
+
if (!this.scanRemoteExtensions) {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
return await super.scanExtensions();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
CustomRemoteExtensionsScannerService = __decorate([
|
|
79
|
+
__param(1, IRemoteAgentService),
|
|
80
|
+
__param(2, IWorkbenchEnvironmentService),
|
|
81
|
+
__param(3, IUserDataProfileService),
|
|
82
|
+
__param(4, IRemoteUserDataProfilesService),
|
|
83
|
+
__param(5, IActiveLanguagePackService),
|
|
84
|
+
__param(6, IWorkbenchExtensionManagementService),
|
|
85
|
+
__param(7, ILogService)
|
|
86
|
+
], CustomRemoteExtensionsScannerService);
|
|
87
|
+
registerServiceInitializePreParticipant(async (serviceAccessor) => {
|
|
88
|
+
RemoteFileSystemProviderClient.register(serviceAccessor.get(IRemoteAgentService), serviceAccessor.get(IFileService), serviceAccessor.get(ILogService));
|
|
89
|
+
});
|
|
90
|
+
function getServiceOverride({ scanRemoteExtensions = false } = {}) {
|
|
91
|
+
return {
|
|
92
|
+
...getServiceOverride$1(),
|
|
93
|
+
[IRemoteAgentService.toString()]: new SyncDescriptor(RemoteAgentService, [], true),
|
|
94
|
+
[IRemoteSocketFactoryService.toString()]: new SyncDescriptor(CustomRemoteSocketFactoryService, [], true),
|
|
95
|
+
[IRemoteAuthorityResolverService.toString()]: new SyncDescriptor(InjectedRemoteAuthorityResolverService, []),
|
|
96
|
+
[IRemoteExplorerService.toString()]: new SyncDescriptor(RemoteExplorerService, [], true),
|
|
97
|
+
[IExternalUriOpenerService.toString()]: new SyncDescriptor(ExternalUriOpenerService, [], true),
|
|
98
|
+
[IRemoteExtensionsScannerService.toString()]: new SyncDescriptor(CustomRemoteExtensionsScannerService, [scanRemoteExtensions], true),
|
|
99
|
+
[ITunnelService.toString()]: new SyncDescriptor(TunnelService, [], true)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { getServiceOverride as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-remote-agent-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - remote-agent service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,25 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common": "12.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common": "12.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-2a94c04a-b85b-5669-b06b-89c1bfa11cb9-common": "12.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common": "12.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "12.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-abed5a84-8a82-5f84-9412-88a736235bae-common": "12.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common": "12.0.1",
|
|
25
|
+
"@codingame/monaco-vscode-environment-service-override": "12.0.1",
|
|
26
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.1"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "12.0.1"
|
|
30
|
+
},
|
|
31
|
+
"peerDependenciesMeta": {
|
|
32
|
+
"@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": {
|
|
33
|
+
"optional": true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
17
36
|
"main": "index.js",
|
|
18
37
|
"module": "index.js",
|
|
19
38
|
"types": "index.d.ts",
|
|
@@ -22,11 +41,12 @@
|
|
|
22
41
|
"default": "./index.js"
|
|
23
42
|
},
|
|
24
43
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
44
|
+
"default": "./vscode/src/*.js",
|
|
45
|
+
"types": "./vscode/src/*.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./*": {
|
|
48
|
+
"default": "./*.js",
|
|
49
|
+
"types": "./*.d.ts"
|
|
26
50
|
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.2",
|
|
30
|
-
"@codingame/monaco-vscode-environment-service-override": "11.1.2"
|
|
31
51
|
}
|
|
32
52
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
3
|
+
import { IURITransformer } from "vscode/vscode/vs/base/common/uriIpc";
|
|
4
|
+
import { IChannel, IServerChannel } from "vscode/vscode/vs/base/parts/ipc/common/ipc";
|
|
5
|
+
import { IDownloadService } from "vscode/vscode/vs/platform/download/common/download.service";
|
|
6
|
+
export declare class DownloadServiceChannel implements IServerChannel {
|
|
7
|
+
private readonly service;
|
|
8
|
+
constructor(service: IDownloadService);
|
|
9
|
+
listen(_: unknown, event: string, arg?: any): Event<any>;
|
|
10
|
+
call(context: any, command: string, args?: any): Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
export declare class DownloadServiceChannelClient implements IDownloadService {
|
|
13
|
+
private channel;
|
|
14
|
+
private getUriTransformer;
|
|
15
|
+
readonly _serviceBrand: undefined;
|
|
16
|
+
constructor(channel: IChannel, getUriTransformer: () => IURITransformer | null);
|
|
17
|
+
download(from: URI, to: URI): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { ReadableStreamEvents } from "vscode/vscode/vs/base/common/stream";
|
|
5
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
6
|
+
import { IChannel } from "vscode/vscode/vs/base/parts/ipc/common/ipc";
|
|
7
|
+
import { IFileAtomicReadOptions, IFileDeleteOptions, IFileOpenOptions, IFileOverwriteOptions, IFileReadStreamOptions, FileSystemProviderCapabilities, FileType, IFileWriteOptions, IFileChange, IFileSystemProviderWithFileAtomicReadCapability, IFileSystemProviderWithFileCloneCapability, IFileSystemProviderWithFileFolderCopyCapability, IFileSystemProviderWithFileReadStreamCapability, IFileSystemProviderWithFileReadWriteCapability, IFileSystemProviderWithOpenReadWriteCloseCapability, IStat, IWatchOptions } from "vscode/vscode/vs/platform/files/common/files";
|
|
8
|
+
export declare const LOCAL_FILE_SYSTEM_CHANNEL_NAME = "localFilesystem";
|
|
9
|
+
export declare class DiskFileSystemProviderClient extends Disposable implements IFileSystemProviderWithFileReadWriteCapability, IFileSystemProviderWithOpenReadWriteCloseCapability, IFileSystemProviderWithFileReadStreamCapability, IFileSystemProviderWithFileFolderCopyCapability, IFileSystemProviderWithFileAtomicReadCapability, IFileSystemProviderWithFileCloneCapability {
|
|
10
|
+
private readonly channel;
|
|
11
|
+
private readonly extraCapabilities;
|
|
12
|
+
constructor(channel: IChannel, extraCapabilities: {
|
|
13
|
+
trash?: boolean;
|
|
14
|
+
pathCaseSensitive?: boolean;
|
|
15
|
+
});
|
|
16
|
+
readonly onDidChangeCapabilities: Event<void>;
|
|
17
|
+
private _capabilities;
|
|
18
|
+
get capabilities(): FileSystemProviderCapabilities;
|
|
19
|
+
stat(resource: URI): Promise<IStat>;
|
|
20
|
+
readdir(resource: URI): Promise<[
|
|
21
|
+
string,
|
|
22
|
+
FileType
|
|
23
|
+
][]>;
|
|
24
|
+
readFile(resource: URI, opts?: IFileAtomicReadOptions): Promise<Uint8Array>;
|
|
25
|
+
readFileStream(resource: URI, opts: IFileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array>;
|
|
26
|
+
writeFile(resource: URI, content: Uint8Array, opts: IFileWriteOptions): Promise<void>;
|
|
27
|
+
open(resource: URI, opts: IFileOpenOptions): Promise<number>;
|
|
28
|
+
close(fd: number): Promise<void>;
|
|
29
|
+
read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
30
|
+
write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
31
|
+
mkdir(resource: URI): Promise<void>;
|
|
32
|
+
delete(resource: URI, opts: IFileDeleteOptions): Promise<void>;
|
|
33
|
+
rename(resource: URI, target: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
34
|
+
copy(resource: URI, target: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
35
|
+
cloneFile(resource: URI, target: URI): Promise<void>;
|
|
36
|
+
private readonly _onDidChange;
|
|
37
|
+
readonly onDidChangeFile: Event<readonly IFileChange[]>;
|
|
38
|
+
private readonly _onDidWatchError;
|
|
39
|
+
readonly onDidWatchError: Event<string>;
|
|
40
|
+
private readonly sessionId;
|
|
41
|
+
private registerFileChangeListeners;
|
|
42
|
+
watch(resource: URI, opts: IWatchOptions): IDisposable;
|
|
43
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
2
3
|
import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
|
|
3
4
|
import { canceled } from 'vscode/vscode/vs/base/common/errors';
|
|
@@ -5,7 +6,7 @@ import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
|
5
6
|
import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { newWriteableStream } from 'vscode/vscode/vs/base/common/stream';
|
|
7
8
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
8
|
-
import { createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
|
+
import { FileSystemProviderCapabilities, createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
10
|
import { reviveFileChanges } from 'vscode/vscode/vs/platform/files/common/watcher';
|
|
10
11
|
|
|
11
12
|
class DiskFileSystemProviderClient extends Disposable {
|
|
@@ -24,20 +25,20 @@ class DiskFileSystemProviderClient extends Disposable {
|
|
|
24
25
|
get capabilities() {
|
|
25
26
|
if (!this._capabilities) {
|
|
26
27
|
this._capabilities =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
FileSystemProviderCapabilities.FileReadWrite |
|
|
29
|
+
FileSystemProviderCapabilities.FileOpenReadWriteClose |
|
|
30
|
+
FileSystemProviderCapabilities.FileReadStream |
|
|
31
|
+
FileSystemProviderCapabilities.FileFolderCopy |
|
|
32
|
+
FileSystemProviderCapabilities.FileWriteUnlock |
|
|
33
|
+
FileSystemProviderCapabilities.FileAtomicRead |
|
|
34
|
+
FileSystemProviderCapabilities.FileAtomicWrite |
|
|
35
|
+
FileSystemProviderCapabilities.FileAtomicDelete |
|
|
36
|
+
FileSystemProviderCapabilities.FileClone;
|
|
36
37
|
if (this.extraCapabilities.pathCaseSensitive) {
|
|
37
|
-
this._capabilities |=
|
|
38
|
+
this._capabilities |= FileSystemProviderCapabilities.PathCaseSensitive;
|
|
38
39
|
}
|
|
39
40
|
if (this.extraCapabilities.trash) {
|
|
40
|
-
this._capabilities |=
|
|
41
|
+
this._capabilities |= FileSystemProviderCapabilities.Trash;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
return this._capabilities;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { IChannel, IServerChannel } from "vscode/vscode/vs/base/parts/ipc/common/ipc";
|
|
4
|
+
import { AbstractLoggerService, ILogger, ILoggerOptions, ILoggerResource, LogLevel } from "vscode/vscode/vs/platform/log/common/log";
|
|
5
|
+
import { ILoggerService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
7
|
+
import { IURITransformer } from "vscode/vscode/vs/base/common/uriIpc";
|
|
8
|
+
export declare class LoggerChannelClient extends AbstractLoggerService implements ILoggerService {
|
|
9
|
+
private readonly windowId;
|
|
10
|
+
private readonly channel;
|
|
11
|
+
constructor(windowId: number | undefined, logLevel: LogLevel, logsHome: URI, loggers: ILoggerResource[], channel: IChannel);
|
|
12
|
+
createConsoleMainLogger(): ILogger;
|
|
13
|
+
registerLogger(logger: ILoggerResource): void;
|
|
14
|
+
deregisterLogger(resource: URI): void;
|
|
15
|
+
setLogLevel(logLevel: LogLevel): void;
|
|
16
|
+
setLogLevel(resource: URI, logLevel: LogLevel): void;
|
|
17
|
+
setVisibility(resourceOrId: URI | string, visibility: boolean): void;
|
|
18
|
+
protected doCreateLogger(file: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger;
|
|
19
|
+
static setLogLevel(channel: IChannel, level: LogLevel): Promise<void>;
|
|
20
|
+
static setLogLevel(channel: IChannel, resource: URI, level: LogLevel): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare class LoggerChannel implements IServerChannel {
|
|
23
|
+
private readonly loggerService;
|
|
24
|
+
private getUriTransformer;
|
|
25
|
+
constructor(loggerService: ILoggerService, getUriTransformer: (requestContext: any) => IURITransformer);
|
|
26
|
+
listen(context: any, event: string): Event<any>;
|
|
27
|
+
call(context: any, command: string, arg?: any): Promise<any>;
|
|
28
|
+
private transformLogger;
|
|
29
|
+
}
|
|
30
|
+
export declare class RemoteLoggerChannelClient extends Disposable {
|
|
31
|
+
constructor(loggerService: ILoggerService, channel: IChannel);
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VSBuffer } from "vscode/vscode/vs/base/common/buffer";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { ISocket, SocketDiagnosticsEventType } from "vscode/vscode/vs/base/parts/ipc/common/ipc.net";
|
|
4
|
+
import { ISocketFactory } from "../common/remoteSocketFactoryService.js";
|
|
5
|
+
import { RemoteConnectionType, WebSocketRemoteConnection } from "vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver";
|
|
6
|
+
export interface IWebSocketFactory {
|
|
7
|
+
create(url: string, debugLabel: string): IWebSocket;
|
|
8
|
+
}
|
|
9
|
+
export interface IWebSocketCloseEvent {
|
|
10
|
+
readonly code: number;
|
|
11
|
+
readonly reason: string;
|
|
12
|
+
readonly wasClean: boolean;
|
|
13
|
+
readonly event: any | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface IWebSocket {
|
|
16
|
+
readonly onData: Event<ArrayBuffer>;
|
|
17
|
+
readonly onOpen: Event<void>;
|
|
18
|
+
readonly onClose: Event<IWebSocketCloseEvent | void>;
|
|
19
|
+
readonly onError: Event<any>;
|
|
20
|
+
traceSocketEvent?(type: SocketDiagnosticsEventType, data?: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView | any): void;
|
|
21
|
+
send(data: ArrayBuffer | ArrayBufferView): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class BrowserSocketFactory implements ISocketFactory<RemoteConnectionType.WebSocket> {
|
|
25
|
+
private readonly _webSocketFactory;
|
|
26
|
+
constructor(webSocketFactory: IWebSocketFactory | null | undefined);
|
|
27
|
+
supports(connectTo: WebSocketRemoteConnection): boolean;
|
|
28
|
+
connect({ host, port }: WebSocketRemoteConnection, path: string, query: string, debugLabel: string): Promise<ISocket>;
|
|
29
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
|
|
1
2
|
import { addDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
4
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
6
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { SocketDiagnostics } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
7
|
+
import { SocketDiagnostics, SocketDiagnosticsEventType, SocketCloseEventType } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
7
8
|
import { RemoteAuthorityResolverError, RemoteAuthorityResolverErrorCode } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
8
9
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
9
10
|
|
|
@@ -23,7 +24,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
23
24
|
this.onError = this._onError.event;
|
|
24
25
|
this._debugLabel = debugLabel;
|
|
25
26
|
this._socket = ( new WebSocket(url));
|
|
26
|
-
this.traceSocketEvent(
|
|
27
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Created, { type: 'BrowserWebSocket', url });
|
|
27
28
|
this._fileReader = ( new FileReader());
|
|
28
29
|
this._queue = [];
|
|
29
30
|
this._isReading = false;
|
|
@@ -31,7 +32,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
31
32
|
this._fileReader.onload = (event) => {
|
|
32
33
|
this._isReading = false;
|
|
33
34
|
const buff = event.target.result;
|
|
34
|
-
this.traceSocketEvent(
|
|
35
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Read, buff);
|
|
35
36
|
this._onData.fire(buff);
|
|
36
37
|
if (this._queue.length > 0) {
|
|
37
38
|
enqueue(this._queue.shift());
|
|
@@ -47,12 +48,12 @@ class BrowserWebSocket extends Disposable {
|
|
|
47
48
|
};
|
|
48
49
|
this._socketMessageListener = (ev) => {
|
|
49
50
|
const blob = ev.data;
|
|
50
|
-
this.traceSocketEvent(
|
|
51
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.BrowserWebSocketBlobReceived, { type: blob.type, size: blob.size });
|
|
51
52
|
enqueue(blob);
|
|
52
53
|
};
|
|
53
54
|
this._socket.addEventListener('message', this._socketMessageListener);
|
|
54
55
|
this._register(addDisposableListener(this._socket, 'open', (e) => {
|
|
55
|
-
this.traceSocketEvent(
|
|
56
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Open);
|
|
56
57
|
this._onOpen.fire();
|
|
57
58
|
}));
|
|
58
59
|
let pendingErrorEvent = null;
|
|
@@ -73,7 +74,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
73
74
|
sendPendingErrorNow();
|
|
74
75
|
};
|
|
75
76
|
this._register(addDisposableListener(this._socket, 'close', (e) => {
|
|
76
|
-
this.traceSocketEvent(
|
|
77
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Close, { code: e.code, reason: e.reason, wasClean: e.wasClean });
|
|
77
78
|
this._isClosed = true;
|
|
78
79
|
if (pendingErrorEvent) {
|
|
79
80
|
if (!navigator.onLine) {
|
|
@@ -100,7 +101,7 @@ class BrowserWebSocket extends Disposable {
|
|
|
100
101
|
this._onClose.fire({ code: e.code, reason: e.reason, wasClean: e.wasClean, event: e });
|
|
101
102
|
}));
|
|
102
103
|
this._register(addDisposableListener(this._socket, 'error', (err) => {
|
|
103
|
-
this.traceSocketEvent(
|
|
104
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Error, { message: err?.message });
|
|
104
105
|
sendErrorSoon(err);
|
|
105
106
|
}));
|
|
106
107
|
}
|
|
@@ -108,12 +109,12 @@ class BrowserWebSocket extends Disposable {
|
|
|
108
109
|
if (this._isClosed) {
|
|
109
110
|
return;
|
|
110
111
|
}
|
|
111
|
-
this.traceSocketEvent(
|
|
112
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Write, data);
|
|
112
113
|
this._socket.send(data);
|
|
113
114
|
}
|
|
114
115
|
close() {
|
|
115
116
|
this._isClosed = true;
|
|
116
|
-
this.traceSocketEvent(
|
|
117
|
+
this.traceSocketEvent(SocketDiagnosticsEventType.Close);
|
|
117
118
|
this._socket.close();
|
|
118
119
|
this._socket.removeEventListener('message', this._socketMessageListener);
|
|
119
120
|
this.dispose();
|
|
@@ -150,7 +151,7 @@ class BrowserSocket {
|
|
|
150
151
|
}
|
|
151
152
|
else {
|
|
152
153
|
listener({
|
|
153
|
-
type:
|
|
154
|
+
type: SocketCloseEventType.WebSocketCloseEvent,
|
|
154
155
|
code: e.code,
|
|
155
156
|
reason: e.reason,
|
|
156
157
|
wasClean: e.wasClean,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
3
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
5
|
+
import { IRemoteConnectionData, ResolvedAuthority, ResolvedOptions, ResolverResult } from "vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver";
|
|
6
|
+
import { IRemoteAuthorityResolverService } from "vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver.service";
|
|
7
|
+
export declare class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService {
|
|
8
|
+
private readonly _logService;
|
|
9
|
+
readonly _serviceBrand: undefined;
|
|
10
|
+
private readonly _onDidChangeConnectionData;
|
|
11
|
+
readonly onDidChangeConnectionData: import("vscode/vscode/vs/base/common/event").Event<void>;
|
|
12
|
+
private readonly _resolveAuthorityRequests;
|
|
13
|
+
private readonly _cache;
|
|
14
|
+
private readonly _connectionToken;
|
|
15
|
+
private readonly _connectionTokens;
|
|
16
|
+
private readonly _isWorkbenchOptionsBasedResolution;
|
|
17
|
+
constructor(isWorkbenchOptionsBasedResolution: boolean, connectionToken: Promise<string> | string | undefined, resourceUriProvider: ((uri: URI) => URI) | undefined, serverBasePath: string | undefined, productService: IProductService, _logService: ILogService);
|
|
18
|
+
resolveAuthority(authority: string): Promise<ResolverResult>;
|
|
19
|
+
getCanonicalURI(uri: URI): Promise<URI>;
|
|
20
|
+
getConnectionData(authority: string): IRemoteConnectionData | null;
|
|
21
|
+
private _doResolveAuthority;
|
|
22
|
+
_clearResolvedAuthority(authority: string): void;
|
|
23
|
+
_setResolvedAuthority(resolvedAuthority: ResolvedAuthority, options?: ResolvedOptions): void;
|
|
24
|
+
_setResolvedAuthorityError(authority: string, err: any): void;
|
|
25
|
+
_setAuthorityConnectionToken(authority: string, connectionToken: string): void;
|
|
26
|
+
_setCanonicalURIProvider(provider: (uri: URI) => Promise<URI>): void;
|
|
27
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
3
4
|
import { DeferredPromise } from 'vscode/vscode/vs/base/common/async';
|
|
4
5
|
import { ErrorNoTelemetry } from 'vscode/vscode/vs/base/common/errors';
|
|
@@ -9,7 +10,7 @@ import { mark } from 'vscode/vscode/vs/base/common/performance';
|
|
|
9
10
|
import { StopWatch } from 'vscode/vscode/vs/base/common/stopwatch';
|
|
10
11
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
12
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
12
|
-
import { getRemoteAuthorityPrefix, WebSocketRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
13
|
+
import { getRemoteAuthorityPrefix, WebSocketRemoteConnection, RemoteConnectionType } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
13
14
|
import { parseAuthorityWithOptionalPort } from 'vscode/vscode/vs/platform/remote/common/remoteHosts';
|
|
14
15
|
|
|
15
16
|
let RemoteAuthorityResolverService = class RemoteAuthorityResolverService extends Disposable {
|
|
@@ -78,7 +79,7 @@ let RemoteAuthorityResolverService = class RemoteAuthorityResolverService extend
|
|
|
78
79
|
_setResolvedAuthority(resolvedAuthority, options) {
|
|
79
80
|
if (( this._resolveAuthorityRequests.has(resolvedAuthority.authority))) {
|
|
80
81
|
const request = this._resolveAuthorityRequests.get(resolvedAuthority.authority);
|
|
81
|
-
if (resolvedAuthority.connectTo.type ===
|
|
82
|
+
if (resolvedAuthority.connectTo.type === RemoteConnectionType.WebSocket) {
|
|
82
83
|
RemoteAuthorities.set(resolvedAuthority.authority, resolvedAuthority.connectTo.host, resolvedAuthority.connectTo.port);
|
|
83
84
|
}
|
|
84
85
|
if (resolvedAuthority.connectionToken) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RemoteExtensionsScannerChannelName = "remoteExtensionsScanner";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ISocket } from "vscode/vscode/vs/base/parts/ipc/common/ipc.net";
|
|
3
|
+
import { RemoteConnectionOfType, RemoteConnectionType, RemoteConnection } from "vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver";
|
|
4
|
+
import { IRemoteSocketFactoryService } from "vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService.service";
|
|
5
|
+
export interface ISocketFactory<T extends RemoteConnectionType> {
|
|
6
|
+
supports(connectTo: RemoteConnectionOfType<T>): boolean;
|
|
7
|
+
connect(connectTo: RemoteConnectionOfType<T>, path: string, query: string, debugLabel: string): Promise<ISocket>;
|
|
8
|
+
}
|
|
9
|
+
export declare class RemoteSocketFactoryService implements IRemoteSocketFactoryService {
|
|
10
|
+
readonly _serviceBrand: undefined;
|
|
11
|
+
private readonly factories;
|
|
12
|
+
register<T extends RemoteConnectionType>(type: T, factory: ISocketFactory<T>): IDisposable;
|
|
13
|
+
private getSocketFactory;
|
|
14
|
+
connect(connectTo: RemoteConnection, path: string, query: string, debugLabel: string): Promise<ISocket>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IRemoteExplorerService } from "vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService.service";
|
|
2
|
+
import { IViewDescriptor } from "vscode/vscode/vs/workbench/common/views";
|
|
3
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
4
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
5
|
+
import { RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
|
|
6
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
8
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
9
|
+
export declare const SELECTED_REMOTE_IN_EXPLORER: RawContextKey<string>;
|
|
10
|
+
export declare class SwitchRemoteViewItem extends Disposable {
|
|
11
|
+
private readonly contextKeyService;
|
|
12
|
+
private remoteExplorerService;
|
|
13
|
+
private environmentService;
|
|
14
|
+
private readonly storageService;
|
|
15
|
+
private readonly workspaceContextService;
|
|
16
|
+
private switchRemoteMenu;
|
|
17
|
+
private completedRemotes;
|
|
18
|
+
private readonly selectedRemoteContext;
|
|
19
|
+
constructor(contextKeyService: IContextKeyService, remoteExplorerService: IRemoteExplorerService, environmentService: IWorkbenchEnvironmentService, storageService: IStorageService, workspaceContextService: IWorkspaceContextService);
|
|
20
|
+
setSelectionForConnection(): boolean;
|
|
21
|
+
private select;
|
|
22
|
+
private getAuthorityForExplorerType;
|
|
23
|
+
removeOptionItems(views: IViewDescriptor[]): void;
|
|
24
|
+
createOptionItems(views: IViewDescriptor[]): void;
|
|
25
|
+
}
|