Archived
1
0

Add vscode via vendor package.

- Use yarn for vscode vendoring.
- Grab hash from package.
This commit is contained in:
Teffen Ellis
2021-09-08 15:05:49 -04:00
committed by Teffen Ellis
parent 28ba59ab3c
commit f885b29675
32 changed files with 1544 additions and 251 deletions

View File

@ -49,7 +49,7 @@ async function entry(): Promise<void> {
console.log({
codeServer: version,
commit,
vscode: require("../../lib/vscode/package.json").version,
vscode: require("../../vendor/modules/code-oss-dev/package.json").version,
})
} else {
console.log(version, commit)

View File

@ -13,7 +13,7 @@ import { humanPath, isFile, open } from "./util"
export const runVsCodeCli = (args: DefaultedArgs): void => {
logger.debug("forking vs code cli...")
const vscode = cp.fork(path.resolve(__dirname, "../../lib/vscode/out/vs/server/fork"), [], {
const vscode = cp.fork(path.resolve(__dirname, "../../vendor/modules/code-oss-dev/out/vs/server/fork"), [], {
env: {
...process.env,
CODE_SERVER_PARENT_PID: process.pid.toString(),

View File

@ -166,7 +166,7 @@ router.get("/callback", ensureAuthenticated, async (req, res) => {
callbacks.set(id, callback)
callbackEmitter.emit({ id, callback })
res.sendFile(path.join(rootPath, "lib/vscode/resources/web/callback.html"))
res.sendFile(path.join(rootPath, "vendor/modules/code-oss-dev/resources/web/callback.html"))
})
router.get("/fetch-callback", ensureAuthenticated, async (req, res) => {

View File

@ -17,7 +17,7 @@ export class VscodeProvider {
private readonly socketProvider = new SocketProxyProvider()
public constructor() {
this.vsRootPath = path.resolve(rootPath, "lib/vscode")
this.vsRootPath = path.resolve(rootPath, "vendor/modules/code-oss-dev")
this.serverRootPath = path.join(this.vsRootPath, "out/vs/server")
wrapper.onDispose(() => this.dispose())
}