mirror of
https://github.com/coder/code-server.git
synced 2026-05-12 23:37:25 +02:00
chore(vscode): update to 1.56.0
This commit is contained in:
@@ -20,6 +20,7 @@ export interface IRemoteAgentEnvironment {
|
||||
userHome: URI;
|
||||
os: OperatingSystem;
|
||||
marks: performance.PerformanceMark[];
|
||||
useHostProxy: boolean;
|
||||
}
|
||||
|
||||
export interface RemoteAgentConnectionContext {
|
||||
|
||||
@@ -15,8 +15,15 @@ export interface ResolvedAuthority {
|
||||
readonly connectionToken: string | undefined;
|
||||
}
|
||||
|
||||
export enum RemoteTrustOption {
|
||||
Unknown = 0,
|
||||
DisableTrust = 1,
|
||||
MachineTrusted = 2
|
||||
}
|
||||
|
||||
export interface ResolvedOptions {
|
||||
readonly extensionHostEnv?: { [key: string]: string | null };
|
||||
readonly trust?: RemoteTrustOption;
|
||||
}
|
||||
|
||||
export interface TunnelDescription {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { IWorkspace } from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
export function getRemoteAuthority(uri: URI): string | undefined {
|
||||
return uri.scheme === Schemas.vscodeRemote ? uri.authority : undefined;
|
||||
@@ -24,3 +25,20 @@ export function getRemoteName(authority: string | undefined): string | undefined
|
||||
}
|
||||
return authority.substr(0, pos);
|
||||
}
|
||||
|
||||
function isVirtualResource(resource: URI) {
|
||||
return resource.scheme !== Schemas.file && resource.scheme !== Schemas.vscodeRemote;
|
||||
}
|
||||
|
||||
export function getVirtualWorkspaceLocation(workspace: IWorkspace): { scheme: string, authority: string } | undefined {
|
||||
if (workspace.folders.length) {
|
||||
return workspace.folders.every(f => isVirtualResource(f.uri)) ? workspace.folders[0].uri : undefined;
|
||||
} else if (workspace.configuration && isVirtualResource(workspace.configuration)) {
|
||||
return workspace.configuration;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function getVirtualWorkspaceScheme(workspace: IWorkspace): string | undefined {
|
||||
return getVirtualWorkspaceLocation(workspace)?.scheme;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ export abstract class AbstractTunnelService implements ITunnelService {
|
||||
localAddress: tunnel.localAddress,
|
||||
public: tunnel.public,
|
||||
dispose: async () => {
|
||||
this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${tunnel.tunnelRemotePort} `);
|
||||
this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${tunnel.tunnelRemoteHost}:${tunnel.tunnelRemotePort} `);
|
||||
const existingHost = this._tunnels.get(tunnel.tunnelRemoteHost);
|
||||
if (existingHost) {
|
||||
const existing = existingHost.get(tunnel.tunnelRemotePort);
|
||||
@@ -267,7 +267,7 @@ export abstract class AbstractTunnelService implements ITunnelService {
|
||||
}
|
||||
|
||||
async closeTunnel(remoteHost: string, remotePort: number): Promise<void> {
|
||||
this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${remotePort} `);
|
||||
this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${remoteHost}:${remotePort} `);
|
||||
const portMap = this._tunnels.get(remoteHost);
|
||||
if (portMap && portMap.has(remotePort)) {
|
||||
const value = portMap.get(remotePort)!;
|
||||
|
||||
Reference in New Issue
Block a user