Refactor vscode endpoints to use fork directly.

This commit is contained in:
Teffen Ellis
2021-09-29 23:14:56 -04:00
committed by Teffen
parent beebf53adc
commit d8c344beda
52 changed files with 502 additions and 3406 deletions

View File

@@ -9,11 +9,11 @@ import {
} from "./cli"
import { commit, version } from "./constants"
import { openInExistingInstance, runCodeServer, runVsCodeCli } from "./main"
import * as proxyAgent from "./proxy_agent"
import { monkeyPatchProxyProtocols } from "./proxy_agent"
import { isChild, wrapper } from "./wrapper"
async function entry(): Promise<void> {
proxyAgent.monkeyPatch(false)
monkeyPatchProxyProtocols()
// There's no need to check flags like --help or to spawn in an existing
// instance for the child process because these would have already happened in
@@ -46,11 +46,13 @@ async function entry(): Promise<void> {
if (args.version) {
if (args.json) {
console.log({
codeServer: version,
commit,
vscode: require("../../vendor/modules/code-oss-dev/package.json").version,
})
console.log(
JSON.stringify({
codeServer: version,
commit,
vscode: require("../../vendor/modules/code-oss-dev/package.json").version,
}),
)
} else {
console.log(version, commit)
}