Skip to content

Commit 5a05cec

Browse files
committed
chore: update Code to 1.67
Was able to remove our changes to common/webview.ts since they are upstream now. Other than that no serious changes, just context diffs.
1 parent d75883b commit 5a05cec

18 files changed

+85
-107
lines changed

lib/vscode

Submodule vscode updated 1306 files

patches/base-path.diff

+15-8
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,26 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
159159
===================================================================
160160
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
161161
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
162-
@@ -253,7 +253,10 @@ export class WebClientServer {
162+
@@ -250,14 +250,10 @@ export class WebClientServer {
163163
return res.end();
164164
}
165165

166-
- const remoteAuthority = req.headers.host;
166+
- let originalHost = req.headers['x-original-host'];
167+
- if (Array.isArray(originalHost)) {
168+
- originalHost = originalHost[0];
169+
- }
170+
- const remoteAuthority = originalHost || req.headers.host;
171+
- if (!remoteAuthority) {
172+
- return serveError(req, res, 400, `Bad request.`);
173+
- }
167174
+ // It is not possible to reliably detect the remote authority on the server
168175
+ // in all cases. Set this to something invalid to make sure we catch code
169176
+ // that is using this when it should not.
170177
+ const remoteAuthority = 'remote';
171178

172179
function escapeAttribute(value: string): string {
173180
return value.replace(/"/g, '"');
174-
@@ -275,6 +278,8 @@ export class WebClientServer {
181+
@@ -279,6 +275,8 @@ export class WebClientServer {
175182
accessToken: this._environmentService.args['github-auth'],
176183
scopes: [['user:email'], ['repo']]
177184
} : undefined;
@@ -180,15 +187,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
180187
const data = (await util.promisify(fs.readFile)(filePath)).toString()
181188
.replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({
182189
remoteAuthority,
183-
@@ -285,6 +290,7 @@ export class WebClientServer {
190+
@@ -289,6 +287,7 @@ export class WebClientServer {
184191
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
185192
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
186193
productConfiguration: <Partial<IProductConfiguration>>{
187194
+ rootEndpoint: base,
188195
codeServerVersion: this._productService.codeServerVersion,
189196
embedderIdentifier: 'server-distro',
190197
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
191-
@@ -297,7 +303,9 @@ export class WebClientServer {
198+
@@ -301,7 +300,9 @@ export class WebClientServer {
192199
} : undefined
193200
}
194201
})))
@@ -199,7 +206,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
199206

200207
const cspDirectives = [
201208
'default-src \'self\';',
202-
@@ -376,3 +384,70 @@ export class WebClientServer {
209+
@@ -380,3 +381,70 @@ export class WebClientServer {
203210
return res.end(data);
204211
}
205212
}
@@ -286,15 +293,15 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
286293
===================================================================
287294
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
288295
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
289-
@@ -482,6 +482,7 @@ function doCreateUri(path: string, query
296+
@@ -481,6 +481,7 @@ function doCreateUri(path: string, query
290297
});
291298
}
292299

293300
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
294301
return URI.parse(window.location.href).with({ path, query });
295302
}
296303

297-
@@ -493,7 +494,7 @@ function doCreateUri(path: string, query
304+
@@ -492,7 +493,7 @@ function doCreateUri(path: string, query
298305
if (!configElement || !configElementAttribute) {
299306
throw new Error('Missing web configuration element');
300307
}

patches/disable-builtin-ext-update.diff

+14-13
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
77
===================================================================
88
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
99
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
10-
@@ -206,6 +206,9 @@ export class Extension implements IExten
11-
if (!this.gallery || !this.local) {
12-
return false;
13-
}
14-
+ if (this.type !== ExtensionType.User) {
15-
+ return false;
16-
+ }
17-
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
18-
return false;
19-
}
20-
@@ -1057,6 +1060,10 @@ export class ExtensionsWorkbenchService
10+
@@ -211,6 +211,10 @@ export class Extension implements IExten
11+
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
12+
return false;
13+
}
14+
+ // Do not update builtin extensions.
15+
+ if (this.type !== ExtensionType.User) {
16+
+ return false;
17+
+ }
18+
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
19+
return false;
20+
}
21+
@@ -1065,6 +1069,10 @@ export class ExtensionsWorkbenchService
2122
// Skip if check updates only for builtin extensions and current extension is not builtin.
2223
continue;
2324
}
2425
+ if (installed.type !== ExtensionType.User) {
2526
+ // Never update builtin extensions.
2627
+ continue;
2728
+ }
28-
if (installed.isBuiltin && !installed.local?.identifier.uuid) {
29-
// Skip if the builtin extension does not have Marketplace id
29+
if (installed.isBuiltin && (!installed.local?.identifier.uuid || this.productService.quality !== 'stable')) {
30+
// Skip if the builtin extension does not have Marketplace identifier or the current quality is not stable.
3031
continue;

patches/disable-downloads.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
1212
===================================================================
1313
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
1414
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
15-
@@ -215,6 +215,11 @@ export interface IWorkbenchConstructionO
15+
@@ -238,6 +238,11 @@ export interface IWorkbenchConstructionO
1616
*/
1717
readonly userDataPath?: string
1818

@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
2828
===================================================================
2929
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
3030
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
31-
@@ -30,6 +30,11 @@ export interface IBrowserWorkbenchEnviro
31+
@@ -31,6 +31,11 @@ export interface IBrowserWorkbenchEnviro
3232
* Options used to configure the workbench.
3333
*/
3434
readonly options?: IWorkbenchConstructionOptions;
@@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
4040
}
4141

4242
export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
43-
@@ -61,6 +66,13 @@ export class BrowserWorkbenchEnvironment
43+
@@ -62,6 +67,13 @@ export class BrowserWorkbenchEnvironment
4444
return this.options.userDataPath;
4545
}
4646

@@ -78,7 +78,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
7878
===================================================================
7979
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
8080
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
81-
@@ -293,6 +293,7 @@ export class WebClientServer {
81+
@@ -290,6 +290,7 @@ export class WebClientServer {
8282
logLevel: this._logService.getLevel(),
8383
},
8484
userDataPath: this._environmentService.userDataPath,
@@ -144,7 +144,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
144144
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
145145
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
146146
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
147-
@@ -476,13 +476,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
147+
@@ -477,13 +477,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
148148
id: DOWNLOAD_COMMAND_ID,
149149
title: DOWNLOAD_LABEL
150150
},

patches/display-language.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
66
===================================================================
77
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
88
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
9-
@@ -192,6 +192,9 @@ export async function setupServerService
9+
@@ -196,6 +196,9 @@ export async function setupServerService
1010
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
1111
socketServer.registerChannel('extensions', channel);
1212

@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts
2020
===================================================================
2121
--- code-server.orig/lib/vscode/src/vs/base/common/platform.ts
2222
+++ code-server/lib/vscode/src/vs/base/common/platform.ts
23-
@@ -84,6 +84,17 @@ if (typeof navigator === 'object' && !is
23+
@@ -82,6 +82,17 @@ if (typeof navigator === 'object' && !is
2424
_isWeb = true;
2525
_locale = navigator.language;
2626
_language = _locale;
@@ -176,7 +176,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
176176

177177
const textMimeType = {
178178
'.html': 'text/html',
179-
@@ -280,6 +281,8 @@ export class WebClientServer {
179+
@@ -277,6 +278,8 @@ export class WebClientServer {
180180
} : undefined;
181181
const base = relativeRoot(getOriginalUrl(req))
182182
const vscodeBase = relativePath(getOriginalUrl(req))
@@ -185,7 +185,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
185185
const data = (await util.promisify(fs.readFile)(filePath)).toString()
186186
.replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({
187187
remoteAuthority,
188-
@@ -309,7 +312,8 @@ export class WebClientServer {
188+
@@ -306,7 +309,8 @@ export class WebClientServer {
189189
})))
190190
.replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : '')
191191
.replace(/{{BASE}}/g, base)
@@ -252,7 +252,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
252252
===================================================================
253253
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
254254
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
255-
@@ -112,6 +112,10 @@ registerSingleton(IDiagnosticsService, N
255+
@@ -109,6 +109,10 @@ registerSingleton(IDiagnosticsService, N
256256

257257
//#region --- workbench contributions
258258

patches/github-auth.diff

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainSe
77
===================================================================
88
--- code-server.orig/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
99
+++ code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
10-
@@ -5,18 +5,32 @@
10+
@@ -5,9 +5,18 @@
1111

1212
import { InMemoryCredentialsProvider } from 'vs/platform/credentials/common/credentials';
1313
import { ILogService } from 'vs/platform/log/common/log';
@@ -26,6 +26,8 @@ Index: code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainSe
2626
+}
2727

2828
export class CredentialsWebMainService extends BaseCredentialsMainService {
29+
// Since we fallback to the in-memory credentials provider, we do not need to surface any Keytar load errors
30+
@@ -16,10 +25,15 @@ export class CredentialsWebMainService e
2931

3032
constructor(
3133
@ILogService logService: ILogService,
@@ -42,7 +44,7 @@ Index: code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainSe
4244
}
4345

4446
// If the credentials service is running on the server, we add a suffix -server to differentiate from the location that the
45-
@@ -45,4 +59,59 @@ export class CredentialsWebMainService e
47+
@@ -48,4 +62,59 @@ export class CredentialsWebMainService e
4648
}
4749
return this._keytarCache;
4850
}

patches/integration.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
185185
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
186186
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
187187
+import { CodeServerClient } from 'vs/workbench/browser/client';
188+
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
189+
import { IProgressService } from 'vs/platform/progress/common/progress';
188190

189-
export class BrowserMain extends Disposable {
190-
191-
@@ -103,6 +104,9 @@ export class BrowserMain extends Disposa
191+
@@ -105,6 +106,9 @@ export class BrowserMain extends Disposa
192192
// Startup
193193
const instantiationService = workbench.startup();
194194

@@ -263,7 +263,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
263263
===================================================================
264264
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
265265
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
266-
@@ -285,6 +285,7 @@ export class WebClientServer {
266+
@@ -289,6 +289,7 @@ export class WebClientServer {
267267
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
268268
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
269269
productConfiguration: <Partial<IProductConfiguration>>{

patches/local-storage.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
2020
===================================================================
2121
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
2222
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
23-
@@ -292,6 +292,7 @@ export class WebClientServer {
24-
enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined,
23+
@@ -289,6 +289,7 @@ export class WebClientServer {
24+
enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined,
2525
logLevel: this._logService.getLevel(),
2626
},
2727
+ userDataPath: this._environmentService.userDataPath,
@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
3232
===================================================================
3333
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
3434
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
35-
@@ -210,6 +210,11 @@ export interface IWorkbenchConstructionO
35+
@@ -233,6 +233,11 @@ export interface IWorkbenchConstructionO
3636
*/
3737
readonly configurationDefaults?: Record<string, any>;
3838

@@ -48,7 +48,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
4848
===================================================================
4949
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
5050
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
51-
@@ -52,7 +52,14 @@ export class BrowserWorkbenchEnvironment
51+
@@ -53,7 +53,14 @@ export class BrowserWorkbenchEnvironment
5252
get logFile(): URI { return joinPath(this.logsHome, 'window.log'); }
5353

5454
@memoize

patches/log-level.diff

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
77
===================================================================
88
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
99
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
10-
@@ -288,7 +288,10 @@ export class WebClientServer {
10+
@@ -285,7 +285,10 @@ export class WebClientServer {
1111
remoteAuthority,
1212
webviewEndpoint: vscodeBase + '/static/out/vs/workbench/contrib/webview/browser/pre',
1313
_wrapWebWorkerExtHostInIframe,
14-
- developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined },
14+
- developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined },
1515
+ developmentOptions: {
16-
+ enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined,
16+
+ enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined,
1717
+ logLevel: this._logService.getLevel(),
1818
+ },
1919
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,

patches/logout.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
4040
===================================================================
4141
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
4242
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
43-
@@ -293,6 +293,7 @@ export class WebClientServer {
43+
@@ -290,6 +290,7 @@ export class WebClientServer {
4444
productConfiguration: <Partial<IProductConfiguration>>{
4545
rootEndpoint: base,
4646
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,

patches/marketplace.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
3232
===================================================================
3333
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
3434
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
35-
@@ -293,14 +293,14 @@ export class WebClientServer {
35+
@@ -290,14 +290,14 @@ export class WebClientServer {
3636
rootEndpoint: base,
3737
codeServerVersion: this._productService.codeServerVersion,
3838
embedderIdentifier: 'server-distro',

patches/proposed-api.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstra
99
===================================================================
1010
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
1111
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.ts
12-
@@ -1471,7 +1471,7 @@ class ProposedApiController {
12+
@@ -1447,7 +1447,7 @@ class ProposedApiController {
1313

1414
this._envEnabledExtensions = new Set((_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)));
1515

@@ -22,7 +22,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
2222
===================================================================
2323
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
2424
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
25-
@@ -163,10 +163,7 @@ export interface IExtensionHost {
25+
@@ -359,10 +359,7 @@ function extensionDescriptionArrayToMap(
2626
}
2727

2828
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {

patches/proxy-uri.diff

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
6868
===================================================================
6969
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
7070
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
71-
@@ -294,6 +294,7 @@ export class WebClientServer {
71+
@@ -291,6 +291,7 @@ export class WebClientServer {
7272
rootEndpoint: base,
7373
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
7474
logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
@@ -80,7 +80,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
8080
===================================================================
8181
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
8282
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
83-
@@ -179,7 +179,7 @@ export class BrowserMain extends Disposa
83+
@@ -189,7 +189,7 @@ export class BrowserMain extends Disposa
8484

8585
// Remote
8686
const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName);
@@ -93,7 +93,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalE
9393
===================================================================
9494
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
9595
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
96-
@@ -388,7 +388,7 @@ export function createTerminalEnvironmen
96+
@@ -388,7 +388,7 @@ export async function createTerminalEnvi
9797

9898
// Sanitize the environment, removing any undesirable VS Code and Electron environment
9999
// variables

0 commit comments

Comments
 (0)