diff --git a/lib/vscode b/lib/vscode index 129500ee4..8fa188b2b 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit 129500ee4c8ab7263461ffe327268ba56b9f210d +Subproject commit 8fa188b2b301d36553cbc9ce1b0a146ccb93351f diff --git a/patches/base-path.diff b/patches/base-path.diff index 1d29f7ccf..98b4c4104 100644 --- a/patches/base-path.diff +++ b/patches/base-path.diff @@ -119,7 +119,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 @@ -267,12 +267,11 @@ export class WebClientServer { - return res.end(); + return void res.end(); } - const getFirstHeader = (headerName: string) => { @@ -176,7 +176,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts `frame-src 'self' https://*.vscode-cdn.net data:;`, 'worker-src \'self\' data:;', @@ -417,3 +421,70 @@ export class WebClientServer { - return res.end(data); + return void res.end(data); } } + @@ -279,10 +279,10 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts // Create workbench create(document.body, { -Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts =================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts -+++ code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts ++++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts @@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/ import { IStorageService } from 'vs/platform/storage/common/storage'; import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index 070b37443..2b4cb2942 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { return false; } -@@ -1234,6 +1238,10 @@ export class ExtensionsWorkbenchService +@@ -1237,6 +1241,10 @@ export class ExtensionsWorkbenchService // Skip if check updates only for builtin extensions and current extension is not builtin. continue; } diff --git a/patches/disable-downloads.diff b/patches/disable-downloads.diff index 5969911b9..450510340 100644 --- a/patches/disable-downloads.diff +++ b/patches/disable-downloads.diff @@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -31,6 +31,11 @@ export interface IBrowserWorkbenchEnviro +@@ -32,6 +32,11 @@ export interface IBrowserWorkbenchEnviro * Options used to configure the workbench. */ readonly options?: IWorkbenchConstructionOptions; @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -62,6 +67,13 @@ export class BrowserWorkbenchEnvironment +@@ -87,6 +92,13 @@ export class BrowserWorkbenchEnvironment return this.options.userDataPath; } @@ -135,16 +135,16 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts -@@ -22,7 +22,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID, +@@ -20,7 +20,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID, import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService'; import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService'; import { Schemas } from 'vs/base/common/network'; --import { DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey } from 'vs/workbench/common/contextkeys'; -+import { DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; +-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext } from 'vs/workbench/common/contextkeys'; ++import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, IsEnabledFileDownloads } from 'vs/workbench/common/contextkeys'; import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; -@@ -477,13 +477,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -483,13 +483,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, diff --git a/patches/display-language.diff b/patches/display-language.diff index a7c73efb7..120c1674d 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -209,6 +209,9 @@ export async function setupServerService +@@ -216,6 +216,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); @@ -125,7 +125,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentServ =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts +++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts -@@ -105,7 +105,7 @@ export abstract class AbstractNativeEnvi +@@ -110,7 +110,7 @@ export abstract class AbstractNativeEnvi return URI.file(join(vscodePortable, 'argv.json')); } @@ -248,7 +248,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts +++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts -@@ -123,8 +123,9 @@ import 'vs/workbench/contrib/logs/browse +@@ -119,8 +119,9 @@ import 'vs/workbench/contrib/logs/browse // Explorer import 'vs/workbench/contrib/files/browser/files.web.contribution'; @@ -264,27 +264,35 @@ Index: code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePack =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts +++ code-server/lib/vscode/src/vs/platform/languagePacks/browser/languagePacks.ts -@@ -4,10 +4,23 @@ - *--------------------------------------------------------------------------------------------*/ - - import { ILanguagePackItem, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks'; +@@ -6,18 +6,24 @@ + import { CancellationTokenSource } from 'vs/base/common/cancellation'; + import { Language } from 'vs/base/common/platform'; + import { URI } from 'vs/base/common/uri'; +import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc'; -+import { ILanguagePackService } from 'vs/platform/languagePacks/common/languagePacks'; + import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; + import { IExtensionResourceLoaderService } from 'vs/platform/extensionResourceLoader/common/extensionResourceLoader'; +-import { ILanguagePackItem, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks'; ++import { ILanguagePackItem, ILanguagePackService, LanguagePackBaseService } from 'vs/platform/languagePacks/common/languagePacks'; + import { ILogService } from 'vs/platform/log/common/log'; +import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -+import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; export class WebLanguagePacksService extends LanguagePackBaseService { -- // Web doesn't have a concept of language packs, so we just return an empty array + private readonly languagePackService: ILanguagePackService; + -+ constructor( + constructor( + @IRemoteAgentService remoteAgentService: IRemoteAgentService, -+ @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService -+ ) { -+ super(extensionGalleryService) -+ this.languagePackService = ProxyChannel.toService(remoteAgentService.getConnection()!.getChannel('languagePacks')); -+ } -+ + @IExtensionResourceLoaderService private readonly extensionResourceLoaderService: IExtensionResourceLoaderService, + @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService, + @ILogService private readonly logService: ILogService + ) { + super(extensionGalleryService); ++ this.languagePackService = ProxyChannel.toService(remoteAgentService.getConnection()!.getChannel('languagePacks')) + } + + async getBuiltInExtensionTranslationsUri(id: string): Promise { +@@ -73,6 +79,6 @@ export class WebLanguagePacksService ext + + // Web doesn't have a concept of language packs, so we just return an empty array getInstalledLanguages(): Promise { - return Promise.resolve([]); + return this.languagePackService.getInstalledLanguages() diff --git a/patches/exec-argv.diff b/patches/exec-argv.diff deleted file mode 100644 index 3e8237a11..000000000 --- a/patches/exec-argv.diff +++ /dev/null @@ -1,24 +0,0 @@ -Preserve process.execArgv - -This ensures flags like `--prof` are passed down to the code-server process so -we can profile everything. - -To test this: -1. run `./lib/node --prof .` -2. in another terminal, run `ps -ejww` - -You should see `--prof` next to every code-server process. - -Index: code-server/lib/vscode/src/vs/server/node/extensionHostConnection.ts -=================================================================== ---- code-server.orig/lib/vscode/src/vs/server/node/extensionHostConnection.ts -+++ code-server/lib/vscode/src/vs/server/node/extensionHostConnection.ts -@@ -228,7 +228,7 @@ export class ExtensionHostConnection { - - public async start(startParams: IRemoteExtensionHostStartParams): Promise { - try { -- let execArgv: string[] = []; -+ let execArgv: string[] = process.execArgv ? process.execArgv.filter(a => !/^--inspect(-brk)?=/.test(a)) : []; - if (startParams.port && !(process).pkg) { - execArgv = [`--inspect${startParams.break ? '-brk' : ''}=${startParams.port}`]; - } diff --git a/patches/getting-started.diff b/patches/getting-started.diff index fb6c0a882..8ec6510f5 100644 --- a/patches/getting-started.diff +++ b/patches/getting-started.diff @@ -159,7 +159,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -36,6 +36,11 @@ export interface IBrowserWorkbenchEnviro +@@ -37,6 +37,11 @@ export interface IBrowserWorkbenchEnviro * Enable downloading files via menu actions. */ readonly isEnabledFileDownloads?: boolean; @@ -171,7 +171,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -74,6 +79,13 @@ export class BrowserWorkbenchEnvironment +@@ -99,6 +104,13 @@ export class BrowserWorkbenchEnvironment return this.options.isEnabledFileDownloads; } diff --git a/patches/integration.diff b/patches/integration.diff index 3916af325..dc585f4ed 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -184,7 +184,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel'; -@@ -116,6 +117,9 @@ export class BrowserMain extends Disposa +@@ -117,6 +118,9 @@ export class BrowserMain extends Disposa // Startup const instantiationService = workbench.startup(); diff --git a/patches/local-storage.diff b/patches/local-storage.diff index f9aca09e5..53df41580 100644 --- a/patches/local-storage.diff +++ b/patches/local-storage.diff @@ -48,8 +48,8 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -53,7 +53,14 @@ export class BrowserWorkbenchEnvironment - get logFile(): URI { return joinPath(this.logsHome, 'window.log'); } +@@ -78,7 +78,14 @@ export class BrowserWorkbenchEnvironment + get logFile(): URI { return joinPath(this.windowLogsPath, 'window.log'); } @memoize - get userRoamingDataHome(): URI { return URI.file('/User').with({ scheme: Schemas.vscodeUserData }); } diff --git a/patches/logout.diff b/patches/logout.diff index 01eddce29..ff47ebd34 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -21,7 +21,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts @@ -13,6 +13,7 @@ import { IEnvironmentService, INativeEnv - export const serverOptions: OptionDescriptions = { + export const serverOptions: OptionDescriptions> = { /* ----- code-server ----- */ 'disable-update-check': { type: 'boolean' }, + 'auth': { type: 'string' }, diff --git a/patches/marketplace.diff b/patches/marketplace.diff index 4056dcd3f..72e652bbd 100644 --- a/patches/marketplace.diff +++ b/patches/marketplace.diff @@ -65,10 +65,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts }, callbackRoute: this._callbackRoute }; -Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts =================================================================== ---- code-server.orig/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts -+++ code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts ++++ code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts @@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/ import { IStorageService } from 'vs/platform/storage/common/storage'; import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; diff --git a/patches/proposed-api.diff b/patches/proposed-api.diff index ca6282313..cb6eb782a 100644 --- a/patches/proposed-api.diff +++ b/patches/proposed-api.diff @@ -1,6 +1,7 @@ Unconditionally enable the proposed API -To test run an extension that uses the proposed API. +To test run an extension that uses the proposed API (i.e. +https://github.com/microsoft/vscode-extension-samples/tree/ddae6c0c9ff203b4ed6f6b43bfacdd0834215f83/proposed-api-sample) We also override isProposedApiEnabled in case an extension does not declare the APIs it needs correctly (the Jupyter extension had this issue). @@ -9,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstra =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts -@@ -1462,7 +1462,7 @@ class ProposedApiController { +@@ -1482,7 +1482,7 @@ class ProposedApiController { this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id))); @@ -22,7 +23,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 -@@ -359,10 +359,7 @@ function extensionDescriptionArrayToMap( +@@ -364,10 +364,7 @@ function extensionDescriptionArrayToMap( } export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean { diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index 59092f607..1ae84e63f 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -92,7 +92,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts -@@ -247,7 +247,7 @@ export class BrowserMain extends Disposa +@@ -248,7 +248,7 @@ export class BrowserMain extends Disposa // Remote const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName); @@ -105,7 +105,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalE =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts -@@ -392,7 +392,7 @@ export async function createTerminalEnvi +@@ -381,7 +381,7 @@ export async function createTerminalEnvi // Sanitize the environment, removing any undesirable VS Code and Electron environment // variables diff --git a/patches/series b/patches/series index adab5b615..1b11c07a1 100644 --- a/patches/series +++ b/patches/series @@ -18,5 +18,4 @@ disable-downloads.diff telemetry.diff display-language.diff cli-window-open.diff -exec-argv.diff getting-started.diff diff --git a/patches/sourcemaps.diff b/patches/sourcemaps.diff index ddd227d3a..a992ea55b 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 -@@ -191,8 +191,7 @@ function packageTask(type, platform, arc +@@ -192,8 +192,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) => { -@@ -231,9 +230,9 @@ function packageTask(type, platform, arc +@@ -232,9 +231,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; -@@ -387,7 +386,7 @@ function tweakProductForServerWeb(produc +@@ -388,7 +387,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 8d2938ee7..8a8297a38 100644 --- a/patches/telemetry.diff +++ b/patches/telemetry.diff @@ -4,6 +4,7 @@ To test: 1. Create a RequestBin - https://requestbin.io/ 2. Run code-server with `CS_TELEMETRY_URL` set: i.e. `CS_TELEMETRY_URL="https://requestbin.io/1ebub9z1" ./code-server--macos-amd64/bin/code-server` + NOTE: it has to be a production build. 3. Load code-server in browser an do things (i.e. open a file) 4. Refresh RequestBin and you should see logs @@ -18,8 +19,8 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts +import { TelemetryClient } from "vs/server/node/telemetryClient"; import { NullPolicyService } from 'vs/platform/policy/common/policy'; import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender'; - -@@ -133,10 +134,13 @@ export async function setupServerService + import { LoggerService } from 'vs/platform/log/node/loggerService'; +@@ -139,10 +140,13 @@ export async function setupServerService const machineId = await getMachineId(); const isInternal = isInternalTelemetry(productService, configurationService); if (supportsTelemetry(productService, environmentService)) { diff --git a/patches/update-check.diff b/patches/update-check.diff index 86edbce37..c3cc59b45 100644 --- a/patches/update-check.diff +++ b/patches/update-check.diff @@ -120,7 +120,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts @@ -11,6 +11,8 @@ import { refineServiceDecorator } from ' import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; - export const serverOptions: OptionDescriptions = { + export const serverOptions: OptionDescriptions> = { + /* ----- code-server ----- */ + 'disable-update-check': { type: 'boolean' }, diff --git a/patches/webview.diff b/patches/webview.diff index 0e03b2581..246070045 100644 --- a/patches/webview.diff +++ b/patches/webview.diff @@ -41,7 +41,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -177,7 +177,7 @@ export class BrowserWorkbenchEnvironment +@@ -210,7 +210,7 @@ export class BrowserWorkbenchEnvironment @memoize get webviewExternalEndpoint(): string { @@ -70,8 +70,8 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index -+ content="default-src 'none'; script-src 'sha256-IZkGO4jZeUn7pzM6pBZCZc9bUYm8oVNV3z8zEa8gxlk=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> +- content="default-src 'none'; script-src 'sha256-lC8sxUeeYqUtmkCpPt/OX/HQdE0JbHG1Z3dzrilsRU0=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> ++ content="default-src 'none'; script-src 'sha256-/9/YQU12wvTeVXCsIGB4shLwdWrMceCpKojfkloNjPU=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> => { help: !!args.help, version: !!args.version, port: args.port?.toString(), + log: args.log ? [args.log] : undefined, } } diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index afa8edefb..93124f933 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -795,6 +795,7 @@ describe("toCodeArgs", () => { help: false, port: "8080", version: false, + log: undefined, } const testName = "vscode-args"