Skip to content

Commit 40ba2b9

Browse files
author
Joe Previte
committed
chore: bulk refresh patches
1 parent ed37849 commit 40ba2b9

11 files changed

+40
-40
lines changed

patches/base-path.diff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ 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-
@@ -252,7 +252,10 @@ export class WebClientServer {
162+
@@ -253,7 +253,10 @@ export class WebClientServer {
163163
return res.end();
164164
}
165165

@@ -171,7 +171,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
171171

172172
function escapeAttribute(value: string): string {
173173
return value.replace(/"/g, '"');
174-
@@ -272,6 +275,8 @@ export class WebClientServer {
174+
@@ -275,6 +278,8 @@ export class WebClientServer {
175175
accessToken: this._environmentService.args['github-auth'],
176176
scopes: [['user:email'], ['repo']]
177177
} : undefined;
@@ -180,15 +180,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
180180
const data = (await util.promisify(fs.readFile)(filePath)).toString()
181181
.replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({
182182
remoteAuthority,
183-
@@ -279,6 +284,7 @@ export class WebClientServer {
184-
developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined },
185-
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
183+
@@ -285,6 +290,7 @@ export class WebClientServer {
184+
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
185+
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
186186
productConfiguration: <Partial<IProductConfiguration>>{
187187
+ rootEndpoint: base,
188188
codeServerVersion: this._productService.codeServerVersion,
189189
embedderIdentifier: 'server-distro',
190190
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
191-
@@ -291,7 +297,9 @@ export class WebClientServer {
191+
@@ -297,7 +303,9 @@ export class WebClientServer {
192192
} : undefined
193193
}
194194
})))
@@ -199,7 +199,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
199199

200200
const cspDirectives = [
201201
'default-src \'self\';',
202-
@@ -370,3 +378,70 @@ export class WebClientServer {
202+
@@ -376,3 +384,70 @@ export class WebClientServer {
203203
return res.end(data);
204204
}
205205
}

patches/disable-downloads.diff

Lines changed: 7 additions & 7 deletions
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-
@@ -210,6 +210,11 @@ export interface IWorkbenchConstructionO
15+
@@ -215,6 +215,11 @@ export interface IWorkbenchConstructionO
1616
*/
1717
readonly userDataPath?: string
1818

@@ -66,7 +66,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
6666

6767
/* ----- server setup ----- */
6868

69-
@@ -92,6 +93,7 @@ export interface ServerParsedArgs {
69+
@@ -96,6 +97,7 @@ export interface ServerParsedArgs {
7070
'disable-update-check'?: boolean;
7171
'auth'?: string
7272
'locale'?: string
@@ -78,14 +78,14 @@ 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-
@@ -290,6 +290,7 @@ export class WebClientServer {
81+
@@ -293,6 +293,7 @@ export class WebClientServer {
8282
logLevel: this._logService.getLevel(),
8383
},
8484
userDataPath: this._environmentService.userDataPath,
8585
+ isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
8686
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
87-
productConfiguration: <Partial<IProductConfiguration>>{
88-
rootEndpoint: base,
87+
enableWorkspaceTrust: !this._environmentService.args['disable-workspace-trust'],
88+
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
8989
Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
9090
===================================================================
9191
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
@@ -135,7 +135,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
135135
===================================================================
136136
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
137137
+++ code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
138-
@@ -21,7 +21,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
138+
@@ -22,7 +22,7 @@ import { CLOSE_SAVED_EDITORS_COMMAND_ID,
139139
import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
140140
import { WorkbenchListDoubleSelection } from 'vs/platform/list/browser/listService';
141141
import { Schemas } from 'vs/base/common/network';
@@ -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-
@@ -475,13 +475,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
147+
@@ -476,13 +476,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
148148
id: DOWNLOAD_COMMAND_ID,
149149
title: DOWNLOAD_LABEL
150150
},

patches/display-language.diff

Lines changed: 7 additions & 7 deletions
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-
@@ -188,6 +188,9 @@ export async function setupServerService
9+
@@ -192,6 +192,9 @@ export async function setupServerService
1010
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
1111
socketServer.registerChannel('extensions', channel);
1212

@@ -94,7 +94,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentServ
9494
===================================================================
9595
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts
9696
+++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
97-
@@ -105,7 +105,7 @@ export abstract class AbstractNativeEnvi
97+
@@ -108,7 +108,7 @@ export abstract class AbstractNativeEnvi
9898
return URI.file(join(vscodePortable, 'argv.json'));
9999
}
100100

@@ -168,15 +168,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
168168
===================================================================
169169
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
170170
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
171-
@@ -26,6 +26,7 @@ import { URI } from 'vs/base/common/uri'
171+
@@ -27,6 +27,7 @@ import { URI } from 'vs/base/common/uri'
172172
import { streamToBuffer } from 'vs/base/common/buffer';
173173
import { IProductConfiguration } from 'vs/base/common/product';
174174
import { isString } from 'vs/base/common/types';
175175
+import { getLocaleFromConfig, getNLSConfiguration } from 'vs/server/node/remoteLanguagePacks';
176176

177177
const textMimeType = {
178178
'.html': 'text/html',
179-
@@ -277,6 +278,8 @@ export class WebClientServer {
179+
@@ -280,6 +281,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-
@@ -303,7 +306,8 @@ export class WebClientServer {
188+
@@ -309,7 +312,8 @@ export class WebClientServer {
189189
})))
190190
.replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : '')
191191
.replace(/{{BASE}}/g, base)
@@ -207,7 +207,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
207207

208208
/* ----- server setup ----- */
209209

210-
@@ -90,6 +91,7 @@ export interface ServerParsedArgs {
210+
@@ -94,6 +95,7 @@ export interface ServerParsedArgs {
211211
/* ----- code-server ----- */
212212
'disable-update-check'?: boolean;
213213
'auth'?: string
@@ -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-
@@ -111,6 +111,10 @@ registerSingleton(IDiagnosticsService, N
255+
@@ -112,6 +112,10 @@ registerSingleton(IDiagnosticsService, N
256256

257257
//#region --- workbench contributions
258258

patches/log-level.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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-
@@ -285,7 +285,10 @@ export class WebClientServer {
10+
@@ -288,7 +288,10 @@ export class WebClientServer {
1111
remoteAuthority,
1212
webviewEndpoint: vscodeBase + '/static/out/vs/workbench/contrib/webview/browser/pre',
1313
_wrapWebWorkerExtHostInIframe,
@@ -17,5 +17,5 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
1717
+ logLevel: this._logService.getLevel(),
1818
+ },
1919
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
20-
productConfiguration: <Partial<IProductConfiguration>>{
21-
rootEndpoint: base,
20+
enableWorkspaceTrust: !this._environmentService.args['disable-workspace-trust'],
21+
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),

patches/logout.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
2828

2929
/* ----- server setup ----- */
3030

31-
@@ -88,6 +89,7 @@ export const serverOptions: OptionDescri
31+
@@ -92,6 +93,7 @@ export const serverOptions: OptionDescri
3232
export interface ServerParsedArgs {
3333
/* ----- code-server ----- */
3434
'disable-update-check'?: boolean;
@@ -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-
@@ -287,6 +287,7 @@ export class WebClientServer {
43+
@@ -293,6 +293,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

Lines changed: 1 addition & 1 deletion
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-
@@ -287,14 +287,14 @@ export class WebClientServer {
35+
@@ -293,14 +293,14 @@ export class WebClientServer {
3636
rootEndpoint: base,
3737
codeServerVersion: this._productService.codeServerVersion,
3838
embedderIdentifier: 'server-distro',

patches/proposed-api.diff

Lines changed: 2 additions & 2 deletions
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-
@@ -1163,7 +1163,7 @@ class ProposedApiController {
12+
@@ -1471,7 +1471,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-
@@ -134,10 +134,7 @@ export interface IExtensionHost {
25+
@@ -163,10 +163,7 @@ export interface IExtensionHost {
2626
}
2727

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

patches/proxy-uri.diff

Lines changed: 2 additions & 2 deletions
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-
@@ -288,6 +288,7 @@ export class WebClientServer {
71+
@@ -294,6 +294,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,
@@ -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-
@@ -390,7 +390,7 @@ export function createTerminalEnvironmen
96+
@@ -388,7 +388,7 @@ export function createTerminalEnvironmen
9797

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

patches/sourcemaps.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
1010
===================================================================
1111
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
1212
+++ code-server/lib/vscode/build/gulpfile.reh.js
13-
@@ -197,8 +197,7 @@ function packageTask(type, platform, arc
13+
@@ -189,8 +189,7 @@ function packageTask(type, platform, arc
1414

1515
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
1616
.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
2020

2121
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
2222
const isUIExtension = (manifest) => {
23-
@@ -237,9 +236,9 @@ function packageTask(type, platform, arc
23+
@@ -229,9 +228,9 @@ function packageTask(type, platform, arc
2424
.map(name => `.build/extensions/${name}/**`);
2525

2626
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
3232

3333
let version = packageJson.version;
3434
const quality = product.quality;
35-
@@ -374,7 +373,7 @@ function tweakProductForServerWeb(produc
35+
@@ -366,7 +365,7 @@ function tweakProductForServerWeb(produc
3636
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
3737
optimizeTask,
3838
util.rimraf(`out-vscode-${type}-min`),

patches/update-check.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
100100
===================================================================
101101
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
102102
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
103-
@@ -286,6 +286,7 @@ export class WebClientServer {
104-
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
103+
@@ -292,6 +292,7 @@ export class WebClientServer {
104+
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
105105
productConfiguration: <Partial<IProductConfiguration>>{
106106
rootEndpoint: base,
107107
+ updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
@@ -121,7 +121,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
121121

122122
/* ----- server setup ----- */
123123

124-
@@ -84,6 +86,8 @@ export const serverOptions: OptionDescri
124+
@@ -88,6 +90,8 @@ export const serverOptions: OptionDescri
125125
};
126126

127127
export interface ServerParsedArgs {

0 commit comments

Comments
 (0)