Split child and parent wrappers

I think having them combined and relying on if statements was getting
confusing especially if we want to add additional messages with
different payloads (which will soon be the case).
This commit is contained in:
Asher
2020-11-18 11:43:25 -06:00
parent 2a3608df53
commit d55e06936b
3 changed files with 146 additions and 103 deletions

View File

@ -8,7 +8,7 @@ import { rootPath } from "./constants"
import { settings } from "./settings"
import { SocketProxyProvider } from "./socket"
import { isFile } from "./util"
import { ipcMain } from "./wrapper"
import { wrapper } from "./wrapper"
export class VscodeProvider {
public readonly serverRootPath: string
@ -20,7 +20,7 @@ export class VscodeProvider {
public constructor() {
this.vsRootPath = path.resolve(rootPath, "lib/vscode")
this.serverRootPath = path.join(this.vsRootPath, "out/vs/server")
ipcMain.onDispose(() => this.dispose())
wrapper.onDispose(() => this.dispose())
}
public async dispose(): Promise<void> {