Merge from vscode merge-base (#22769)

* Merge from vscode merge-base

* Turn off basic checks

* Enable compilation, unit, and integration tests
This commit is contained in:
Lewis Sanchez
2023-04-18 18:28:58 -07:00
committed by GitHub
parent 6186358001
commit 6bd0a17d3c
2389 changed files with 92183 additions and 42601 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { Disposable } from 'vscode';
import { ITerminalEnvironmentProvider } from '../terminal';
import { toDisposable } from '../util';
import * as path from 'path';
import * as http from 'http';
@@ -27,7 +28,7 @@ export interface IIPCHandler {
handle(request: any): Promise<any>;
}
export async function createIPCServer(context?: string): Promise<IIPCServer> {
export async function createIPCServer(context?: string): Promise<IPCServer> {
const server = http.createServer();
const hash = crypto.createHash('sha1');
@@ -65,7 +66,7 @@ export interface IIPCServer extends Disposable {
registerHandler(name: string, handler: IIPCHandler): Disposable;
}
class IPCServer implements IIPCServer, Disposable {
export class IPCServer implements IIPCServer, ITerminalEnvironmentProvider, Disposable {
private handlers = new Map<string, IIPCHandler>();
get ipcHandlePath(): string { return this._ipcHandlePath; }
@@ -110,6 +111,10 @@ class IPCServer implements IIPCServer, Disposable {
return { VSCODE_GIT_IPC_HANDLE: this.ipcHandlePath };
}
getTerminalEnv(): { [key: string]: string } {
return { VSCODE_GIT_IPC_HANDLE: this.ipcHandlePath };
}
dispose(): void {
this.handlers.clear();
this.server.close();