From bd6864658133e0ca03e436bc0d8e6bdb8ae5d8a5 Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 1 Nov 2024 09:28:58 -0800 Subject: [PATCH] Fix mangled exports --- patches/integration.diff | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/patches/integration.diff b/patches/integration.diff index 4428faa05..2a9fa1a48 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -24,7 +24,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts import product from '../../platform/product/common/product.js'; import * as perf from '../../base/common/performance.js'; -@@ -34,38 +34,43 @@ const errorReporter: ErrorReporter = { +@@ -34,38 +34,47 @@ const errorReporter: ErrorReporter = { } }; @@ -80,7 +80,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts */ -export function spawnCli() { - runCli(args, REMOTE_DATA_FOLDER, serverOptions); -+export function spawnCli(args = parse()): Promise { ++function spawnCli(args = parse()): Promise { + return runCli(args, createDirs(args), serverOptions); } @@ -89,9 +89,13 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts */ -export function createServer(address: string | net.AddressInfo | null): Promise { - return doCreateServer(address, args, REMOTE_DATA_FOLDER); -+export function createServer(address: string | net.AddressInfo | null, args = parse()): Promise { ++function createServer(address: string | net.AddressInfo | null, args = parse()): Promise { + return doCreateServer(address, args, createDirs(args)); } ++ ++// The aliases prevent the names getting mangled during minification which would ++// make it difficult to import. ++export { spawnCli as spawnCli, createServer as createServer }; Index: code-server/lib/vscode/src/vs/base/common/processes.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/processes.ts @@ -319,7 +323,7 @@ Index: code-server/lib/vscode/src/server-main.ts + return loadCode(nlsConfiguration); +} + -+// This alias prevents the name getting mangled during obfuscation which would ++// This alias prevents the name getting mangled during minification which would +// make it difficult to import. +export { loadCodeWithNls as loadCodeWithNls }; +