From da3ba19dabfe75ae7a8ab062131aa8d460b40e2f Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Fri, 6 Sep 2024 15:35:45 +0200 Subject: [PATCH] Update Code to 1.93.0 --- .node-version | 2 +- lib/vscode | 2 +- patches/base-path.diff | 24 +++++++++++++----------- patches/disable-builtin-ext-update.diff | 2 +- patches/display-language.diff | 12 ++++++------ patches/external-file-actions.diff | 10 +++++----- patches/getting-started.diff | 2 +- patches/integration.diff | 4 ++-- patches/local-storage.diff | 2 +- patches/logout.diff | 2 +- patches/marketplace.diff | 4 ++-- patches/proposed-api.diff | 2 +- patches/proxy-uri.diff | 2 +- patches/service-worker.diff | 2 +- patches/sourcemaps.diff | 6 +++--- patches/telemetry.diff | 4 ++-- patches/update-check.diff | 2 +- patches/webview.diff | 21 ++++++++++----------- 18 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.node-version b/.node-version index 2dbbe00e6..b8e593f52 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.11.1 +20.15.1 diff --git a/lib/vscode b/lib/vscode index fee1edb8d..4849ca9bd 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit fee1edb8d6d72a0ddff41e5f71a671c23ed924b9 +Subproject commit 4849ca9bdf9666755eb463db297b69e5385090e3 diff --git a/patches/base-path.diff b/patches/base-path.diff index 05bfbbf4a..ee52e5352 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/network.ts +++ code-server/lib/vscode/src/vs/base/common/network.ts -@@ -212,7 +212,9 @@ class RemoteAuthoritiesImpl { +@@ -215,7 +215,9 @@ class RemoteAuthoritiesImpl { return URI.from({ scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource, authority: `${host}:${port}`, @@ -111,7 +111,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -269,16 +269,15 @@ export class WebClientServer { +@@ -272,16 +272,15 @@ export class WebClientServer { return void res.end(); } @@ -133,7 +133,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts ); if (!remoteAuthority) { return serveError(req, res, 400, `Bad request.`); -@@ -305,8 +304,12 @@ export class WebClientServer { +@@ -308,8 +307,12 @@ export class WebClientServer { scopes: [['user:email'], ['repo']] } : undefined; @@ -146,7 +146,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts embedderIdentifier: 'server-distro', extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? { ...this._productService.extensionsGallery, -@@ -335,7 +338,7 @@ export class WebClientServer { +@@ -338,7 +341,7 @@ export class WebClientServer { folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']), workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']), productConfiguration, @@ -155,7 +155,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts }; const cookies = cookie.parse(req.headers.cookie || ''); -@@ -352,9 +355,11 @@ export class WebClientServer { +@@ -355,9 +358,11 @@ export class WebClientServer { const values: { [key: string]: string } = { WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration), WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '', @@ -168,17 +168,19 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts + VS_BASE: vscodeBase, }; - if (useTestResolver) { -@@ -381,7 +386,7 @@ export class WebClientServer { - 'default-src \'self\';', + // DEV --------------------------------------------------------------------------------------- +@@ -395,8 +400,8 @@ export class WebClientServer { 'img-src \'self\' https: data: blob:;', 'media-src \'self\';', -- `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html -+ `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : ``};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html + isESM ? +- `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} blob: 'nonce-1nline-m4p' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : `http://${remoteAuthority}`};` : // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html +- `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html ++ `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} blob: 'nonce-1nline-m4p' ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : ``};` : // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html ++ `script-src 'self' 'unsafe-eval' ${WORKBENCH_NLS_BASE_URL ?? ''} ${this._getScriptCspHashes(data).join(' ')} '${webWorkerExtensionHostIframeScriptSHA}' ${useTestResolver ? '' : ``};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html 'child-src \'self\';', `frame-src 'self' https://*.vscode-cdn.net data:;`, 'worker-src \'self\' data: blob:;', -@@ -454,3 +459,70 @@ export class WebClientServer { +@@ -469,3 +474,70 @@ export class WebClientServer { return void res.end(data); } } diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index f7c6ad138..145aad2d5 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -@@ -299,6 +299,10 @@ export class Extension implements IExten +@@ -314,6 +314,10 @@ export class Extension implements IExten if (this.type === ExtensionType.System && this.productService.quality === 'stable') { return false; } diff --git a/patches/display-language.diff b/patches/display-language.diff index db66ca265..fb58e2f81 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ConfigurationService } from 'vs/platform/configuration/common/configurationService'; -@@ -239,6 +239,9 @@ export async function setupServerService +@@ -243,6 +243,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); @@ -160,8 +160,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts +import { getLocaleFromConfig, getBrowserNLSConfiguration } from 'vs/server/node/remoteLanguagePacks'; import { CharCode } from 'vs/base/common/charCode'; import { IExtensionManifest } from 'vs/platform/extensions/common/extensions'; - -@@ -97,6 +98,7 @@ export class WebClientServer { + import { isESM } from 'vs/base/common/amd'; +@@ -99,6 +100,7 @@ export class WebClientServer { private readonly _webExtensionResourceUrlTemplate: URI | undefined; private readonly _staticRoute: string; @@ -169,7 +169,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts private readonly _callbackRoute: string; private readonly _webExtensionRoute: string; -@@ -111,6 +113,7 @@ export class WebClientServer { +@@ -114,6 +116,7 @@ export class WebClientServer { ) { this._webExtensionResourceUrlTemplate = this._productService.extensionsGallery?.resourceUrlTemplate ? URI.parse(this._productService.extensionsGallery.resourceUrlTemplate) : undefined; @@ -177,7 +177,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts this._staticRoute = `${serverRootPath}/static`; this._callbackRoute = `${serverRootPath}/callback`; this._webExtensionRoute = `/web-extension-resource`; -@@ -349,14 +352,22 @@ export class WebClientServer { +@@ -352,14 +355,22 @@ export class WebClientServer { }; const cookies = cookie.parse(req.headers.cookie || ''); @@ -380,7 +380,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js =================================================================== --- code-server.orig/lib/vscode/build/gulpfile.reh.js +++ code-server/lib/vscode/build/gulpfile.reh.js -@@ -56,6 +56,7 @@ const serverResources = [ +@@ -59,6 +59,7 @@ const serverResourceIncludes = [ // NLS 'out-build/nls.messages.json', diff --git a/patches/external-file-actions.diff b/patches/external-file-actions.diff index 5e7011e4c..e869cf963 100644 --- a/patches/external-file-actions.diff +++ b/patches/external-file-actions.diff @@ -112,7 +112,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -333,6 +333,8 @@ export class WebClientServer { +@@ -336,6 +336,8 @@ export class WebClientServer { serverBasePath: this._basePath, webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', userDataPath: this._environmentService.userDataPath, @@ -172,7 +172,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/base/common/themables'; -@@ -561,13 +561,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -566,13 +566,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, @@ -196,7 +196,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions ) })); -@@ -579,6 +582,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -584,6 +587,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo title: UPLOAD_LABEL, }, when: ContextKeyExpr.and( @@ -289,7 +289,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo export class ExplorerDelegate implements IListVirtualDelegate { -@@ -1001,7 +1002,8 @@ export class FileDragAndDrop implements +@@ -1005,7 +1006,8 @@ export class FileDragAndDrop implements @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @@ -299,7 +299,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo ) { const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => { if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) { -@@ -1226,15 +1228,17 @@ export class FileDragAndDrop implements +@@ -1230,15 +1232,17 @@ export class FileDragAndDrop implements // External file DND (Import/Upload file) if (data instanceof NativeDragAndDropData) { diff --git a/patches/getting-started.diff b/patches/getting-started.diff index d89cb3a47..cca715535 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -201,7 +201,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -337,6 +337,7 @@ export class WebClientServer { +@@ -340,6 +340,7 @@ export class WebClientServer { userDataPath: this._environmentService.userDataPath, isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'], isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'], diff --git a/patches/integration.diff b/patches/integration.diff index ae514489b..e29b4b035 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -264,7 +264,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -306,6 +306,7 @@ export class WebClientServer { +@@ -309,6 +309,7 @@ export class WebClientServer { } : undefined; const productConfiguration = { @@ -276,7 +276,7 @@ Index: code-server/lib/vscode/src/server-main.js =================================================================== --- code-server.orig/lib/vscode/src/server-main.js +++ code-server/lib/vscode/src/server-main.js -@@ -336,4 +336,9 @@ function prompt(question) { +@@ -339,4 +339,9 @@ function prompt(question) { }); } diff --git a/patches/local-storage.diff b/patches/local-storage.diff index e98652a3c..a051dee29 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -328,6 +328,7 @@ export class WebClientServer { +@@ -331,6 +331,7 @@ export class WebClientServer { remoteAuthority, serverBasePath: this._basePath, webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', diff --git a/patches/logout.diff b/patches/logout.diff index 444efa9f5..01b4a9593 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -311,6 +311,7 @@ export class WebClientServer { +@@ -314,6 +314,7 @@ export class WebClientServer { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, diff --git a/patches/marketplace.diff b/patches/marketplace.diff index 68326a3a0..b27abf5cd 100644 --- a/patches/marketplace.diff +++ b/patches/marketplace.diff @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -113,7 +113,7 @@ export class WebClientServer { +@@ -116,7 +116,7 @@ export class WebClientServer { this._staticRoute = `${serverRootPath}/static`; this._callbackRoute = `${serverRootPath}/callback`; @@ -49,7 +49,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts } /** -@@ -311,14 +311,7 @@ export class WebClientServer { +@@ -314,14 +314,7 @@ export class WebClientServer { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, embedderIdentifier: 'server-distro', diff --git a/patches/proposed-api.diff b/patches/proposed-api.diff index 78eda7572..8e6d60f64 100644 --- a/patches/proposed-api.diff +++ b/patches/proposed-api.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts +++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts -@@ -312,10 +312,7 @@ function extensionDescriptionArrayToMap( +@@ -313,10 +313,7 @@ function extensionDescriptionArrayToMap( } export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean { diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index 9d35e6057..92db29e25 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -71,7 +71,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -312,6 +312,7 @@ export class WebClientServer { +@@ -315,6 +315,7 @@ export class WebClientServer { rootEndpoint: base, updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, diff --git a/patches/service-worker.diff b/patches/service-worker.diff index e73cf5937..9421774fd 100644 --- a/patches/service-worker.diff +++ b/patches/service-worker.diff @@ -54,7 +54,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -313,6 +313,10 @@ export class WebClientServer { +@@ -316,6 +316,10 @@ export class WebClientServer { updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/', diff --git a/patches/sourcemaps.diff b/patches/sourcemaps.diff index 7bdd57051..db2266d29 100644 --- a/patches/sourcemaps.diff +++ b/patches/sourcemaps.diff @@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js =================================================================== --- code-server.orig/lib/vscode/build/gulpfile.reh.js +++ code-server/lib/vscode/build/gulpfile.reh.js -@@ -243,8 +243,7 @@ function packageTask(type, platform, arc +@@ -288,8 +288,7 @@ function packageTask(type, platform, arc const src = gulp.src(sourceFolderName + '/**', { base: '.' }) .pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); })) @@ -20,7 +20,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js const workspaceExtensionPoints = ['debuggers', 'jsonValidation']; const isUIExtension = (manifest) => { -@@ -283,9 +282,9 @@ function packageTask(type, platform, arc +@@ -328,9 +327,9 @@ function packageTask(type, platform, arc .map(name => `.build/extensions/${name}/**`); const extensions = gulp.src(extensionPaths, { base: '.build', dot: true }); @@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js let version = packageJson.version; const quality = product.quality; -@@ -459,7 +458,7 @@ function tweakProductForServerWeb(produc +@@ -504,7 +503,7 @@ function tweakProductForServerWeb(produc const minifyTask = task.define(`minify-vscode-${type}`, task.series( optimizeTask, util.rimraf(`out-vscode-${type}-min`), diff --git a/patches/telemetry.diff b/patches/telemetry.diff index f7377369e..a45f6b758 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; import { LoggerService } from 'vs/platform/log/node/loggerService'; -@@ -147,11 +149,23 @@ export async function setupServerService +@@ -151,11 +153,23 @@ export async function setupServerService const requestService = new RequestService(configurationService, environmentService, logService, loggerService); services.set(IRequestService, requestService); @@ -134,7 +134,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -317,6 +317,8 @@ export class WebClientServer { +@@ -320,6 +320,8 @@ export class WebClientServer { scope: vscodeBase + '/', path: base + '/_static/out/browser/serviceWorker.js', }, diff --git a/patches/update-check.diff b/patches/update-check.diff index e3402574f..351c9130d 100644 --- a/patches/update-check.diff +++ b/patches/update-check.diff @@ -105,7 +105,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -310,6 +310,7 @@ export class WebClientServer { +@@ -313,6 +313,7 @@ export class WebClientServer { const productConfiguration = { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, diff --git a/patches/webview.diff b/patches/webview.diff index 7e880697c..05a881d1a 100644 --- a/patches/webview.diff +++ b/patches/webview.diff @@ -54,7 +54,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -324,6 +324,7 @@ export class WebClientServer { +@@ -327,6 +327,7 @@ export class WebClientServer { const workbenchWebConfiguration = { remoteAuthority, serverBasePath: this._basePath, @@ -62,13 +62,12 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts _wrapWebWorkerExtHostInIframe, developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() }, settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined, -@@ -373,7 +374,8 @@ export class WebClientServer { +@@ -386,7 +387,7 @@ export class WebClientServer { return void res.end('Not found'); } -- const webWorkerExtensionHostIframeScriptSHA = 'sha256-V28GQnL3aYxbwgpV3yW1oJ+VKKe/PBSzWntNyH8zVXA='; -+ const webWorkerExtensionHostIframeScriptSHA = 'sha256-TMJESLUenkUgTCHw3qQlCngteoHhhRnn81kYP41UnCE='; -+ +- const webWorkerExtensionHostIframeScriptSHA = isESM ? 'sha256-2Q+j4hfT09+1+imS46J2YlkCtHWQt0/BE79PXjJ0ZJ8=' : 'sha256-V28GQnL3aYxbwgpV3yW1oJ+VKKe/PBSzWntNyH8zVXA='; ++ const webWorkerExtensionHostIframeScriptSHA = isESM ? 'sha256-2Q+j4hfT09+1+imS46J2YlkCtHWQt0/BE79PXjJ0ZJ8=' : 'sha256-TMJESLUenkUgTCHw3qQlCngteoHhhRnn81kYP41UnCE='; const cspDirectives = [ 'default-src \'self\';', @@ -80,12 +79,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index -+ content="default-src 'none'; script-src 'sha256-gzcLnrLeKQp7L5f+d7tdtNmK8h1NxVu1TdCfnv9uU+o=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> +- content="default-src 'none'; script-src 'sha256-DXeP32g8BdMsVuVabYTmznoTH59F7M7UtV0vXemEFqc=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> ++ content="default-src 'none'; script-src 'sha256-z5v/0xE4zQPgV1fazhHB/UlsTzdm39hRMk3V8Av0HI4=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> + -