Skip to content

Commit 11b2f16

Browse files
committed
chore: refresh/update patches for 1.65
1 parent e6a4601 commit 11b2f16

14 files changed

+30
-54
lines changed

patches/base-path.diff

+6-6
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
185185
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
186186
productConfiguration: <Partial<IProductConfiguration>>{
187187
+ rootEndpoint: base,
188+
embedderIdentifier: 'server-distro',
188189
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
189190
...this._productService.extensionsGallery,
190-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({
191-
@@ -289,7 +295,9 @@ export class WebClientServer {
191+
@@ -290,7 +296,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-
@@ -368,3 +376,70 @@ export class WebClientServer {
202+
@@ -369,3 +377,70 @@ export class WebClientServer {
203203
return res.end(data);
204204
}
205205
}
@@ -286,19 +286,19 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
286286
===================================================================
287287
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
288288
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
289-
@@ -504,6 +504,7 @@ function doCreateUri(path: string, query
289+
@@ -482,6 +482,7 @@ function doCreateUri(path: string, query
290290
});
291291
}
292292

293293
+ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/")
294294
return URI.parse(window.location.href).with({ path, query });
295295
}
296296

297-
@@ -515,7 +516,7 @@ function doCreateUri(path: string, query
297+
@@ -493,7 +494,7 @@ function doCreateUri(path: string, query
298298
if (!configElement || !configElementAttribute) {
299299
throw new Error('Missing web configuration element');
300300
}
301-
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
301+
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents } = JSON.parse(configElementAttribute);
302302
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host }
303303

304304
// Create workbench

patches/integration.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
174174
===================================================================
175175
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
176176
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
177-
@@ -69,6 +69,7 @@ import { ICredentialsService } from 'vs/
178-
import { IndexedDB } from 'vs/base/browser/indexedDB';
177+
@@ -69,6 +69,7 @@ import { IndexedDB } from 'vs/base/brows
179178
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService';
180179
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
180+
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
181181
+import { CodeServerClient } from 'vs/workbench/browser/client';
182182

183183
export class BrowserMain extends Disposable {

patches/last-opened.diff

-24
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,3 @@ respect it here then remove our own redirction code that handles this.
66

77
Our version might be better anyway since it puts the workspace in the URL.
88

9-
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
10-
===================================================================
11-
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
12-
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
13-
@@ -410,19 +410,6 @@ class WorkspaceProvider implements IWork
14-
workspace = { folderUri: URI.revive(config.folderUri) };
15-
} else if (config.workspaceUri) {
16-
workspace = { workspaceUri: URI.revive(config.workspaceUri) };
17-
- } else {
18-
- workspace = (() => {
19-
- const lastWorkspaceRaw = window.localStorage.getItem(WorkspaceProvider.LAST_WORKSPACE_STORAGE_KEY);
20-
- if (lastWorkspaceRaw) {
21-
- try {
22-
- return parse(lastWorkspaceRaw); // use marshalling#parse() to revive potential URIs
23-
- } catch (error) {
24-
- // Ignore
25-
- }
26-
- }
27-
-
28-
- return undefined;
29-
- })();
30-
}
31-
}
32-

patches/local-storage.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -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-
@@ -126,7 +126,14 @@ export class BrowserWorkbenchEnvironment
51+
@@ -52,7 +52,14 @@ export class BrowserWorkbenchEnvironment
5252
get logFile(): URI { return joinPath(this.logsHome, 'window.log'); }
5353

5454
@memoize

patches/logout.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
4545
rootEndpoint: base,
4646
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
4747
+ logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
48+
embedderIdentifier: 'server-distro',
4849
extensionsGallery: {
4950
...this._productService.extensionsGallery,
50-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
5151
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
5252
===================================================================
5353
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts

patches/marketplace.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ 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-
@@ -285,14 +285,14 @@ export class WebClientServer {
36-
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
35+
@@ -286,14 +286,14 @@ export class WebClientServer {
3736
productConfiguration: <Partial<IProductConfiguration>>{
3837
rootEndpoint: base,
38+
embedderIdentifier: 'server-distro',
3939
- extensionsGallery: this._webExtensionResourceUrlTemplate ? {
4040
+ extensionsGallery: {
4141
...this._productService.extensionsGallery,

patches/node-version.diff

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
1111
===================================================================
1212
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
1313
+++ code-server/lib/vscode/build/gulpfile.reh.js
14-
@@ -122,9 +122,7 @@ const serverWithWebEntryPoints = [
14+
@@ -124,9 +124,7 @@ const serverWithWebEntryPoints = [
1515
];
1616

1717
function getNodeVersion() {
@@ -71,7 +71,7 @@ Index: code-server/lib/vscode/build/lib/util.ts
7171
===================================================================
7272
--- code-server.orig/lib/vscode/build/lib/util.ts
7373
+++ code-server/lib/vscode/build/lib/util.ts
74-
@@ -371,9 +371,7 @@ export function streamToPromise(stream:
74+
@@ -371,9 +371,7 @@ export function streamToPromise(stream:
7575
}
7676

7777
export function getElectronVersion(): string {
@@ -91,10 +91,11 @@ Index: code-server/lib/vscode/remote/.yarnrc
9191
===================================================================
9292
--- code-server.orig/lib/vscode/remote/.yarnrc
9393
+++ /dev/null
94-
@@ -1,3 +0,0 @@
94+
@@ -1,4 +0,0 @@
9595
-disturl "http://nodejs.org/dist"
9696
-target "14.16.0"
9797
-runtime "node"
98+
-build_from_source "true"
9899
Index: code-server/lib/vscode/.yarnrc
99100
===================================================================
100101
--- code-server.orig/lib/vscode/.yarnrc

patches/proxy-uri.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
7373
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
7474
logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
7575
+ proxyEndpointTemplate: base + '/proxy/{{port}}',
76+
embedderIdentifier: 'server-distro',
7677
extensionsGallery: {
7778
...this._productService.extensionsGallery,
78-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
7979
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
@@ -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+
@@ -390,7 +390,7 @@ export function createTerminalEnvironmen
9797

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

patches/series

-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ post-install.diff
1616
log-level.diff
1717
local-storage.diff
1818
service-worker.diff
19-
last-opened.diff
2019
connection-type.diff
2120
sourcemaps.diff

patches/service-worker.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
2121
===================================================================
2222
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
2323
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
24-
@@ -296,6 +296,10 @@ export class WebClientServer {
25-
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
24+
@@ -297,6 +297,10 @@ export class WebClientServer {
2625
logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined,
2726
proxyEndpointTemplate: base + '/proxy/{{port}}',
27+
embedderIdentifier: 'server-distro',
2828
+ serviceWorker: {
2929
+ scope: vscodeBase + '/',
3030
+ path: base + '/_static/out/browser/serviceWorker.js',

patches/sourcemaps.diff

+3-3
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-
@@ -195,8 +195,7 @@ function packageTask(type, platform, arc
13+
@@ -197,8 +197,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-
@@ -235,9 +234,9 @@ function packageTask(type, platform, arc
23+
@@ -237,9 +236,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-
@@ -363,7 +362,7 @@ function packageTask(type, platform, arc
35+
@@ -374,7 +373,7 @@ function tweakProductForServerWeb(produc
3636
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
3737
optimizeTask,
3838
util.rimraf(`out-vscode-${type}-min`),

patches/unique-db.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Index: code-server/lib/vscode/src/vs/platform/storage/browser/storageService.ts
2121
@@ -13,6 +13,7 @@ import { InMemoryStorageDatabase, isStor
2222
import { ILogService } from 'vs/platform/log/common/log';
2323
import { AbstractStorageService, IS_NEW_KEY, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
24-
import { IWorkspaceInitializationPayload } from 'vs/platform/workspaces/common/workspaces';
24+
import { IAnyWorkspaceIdentifier } from 'vs/platform/workspace/common/workspace';
2525
+import { hash } from 'vs/base/common/hash';
2626

2727
export class BrowserStorageService extends AbstractStorageService {

patches/update-check.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
105105
productConfiguration: <Partial<IProductConfiguration>>{
106106
rootEndpoint: base,
107107
+ updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
108+
embedderIdentifier: 'server-distro',
108109
extensionsGallery: {
109110
...this._productService.extensionsGallery,
110-
'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
111111
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
112112
===================================================================
113113
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts

patches/webview.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
1010
===================================================================
1111
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
1212
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
13-
@@ -240,7 +240,7 @@ export class BrowserWorkbenchEnvironment
13+
@@ -176,7 +176,7 @@ export class BrowserWorkbenchEnvironment
1414

1515
@memoize
1616
get webviewExternalEndpoint(): string {
@@ -31,11 +31,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
3131
_wrapWebWorkerExtHostInIframe,
3232
developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined },
3333
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
34-
Index: code-server/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
34+
Index: code-server/lib/vscode/src/vs/workbench/common/webview.ts
3535
===================================================================
36-
--- code-server.orig/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
37-
+++ code-server/lib/vscode/src/vs/workbench/api/common/shared/webview.ts
38-
@@ -25,7 +25,7 @@ export const webviewResourceBaseHost = '
36+
--- code-server.orig/lib/vscode/src/vs/workbench/common/webview.ts
37+
+++ code-server/lib/vscode/src/vs/workbench/common/webview.ts
38+
@@ -24,7 +24,7 @@ export const webviewResourceBaseHost = '
3939

4040
export const webviewRootResourceAuthority = `vscode-resource.${webviewResourceBaseHost}`;
4141

0 commit comments

Comments
 (0)