@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts
10
10
===================================================================
11
11
--- code-server.orig/lib/vscode/src/vs/base/common/network.ts
12
12
+++ code-server/lib/vscode/src/vs/base/common/network.ts
13
- @@ -215 ,7 +215 ,9 @@ class RemoteAuthoritiesImpl {
13
+ @@ -220 ,7 +220 ,9 @@ class RemoteAuthoritiesImpl {
14
14
return URI.from({
15
15
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
16
16
authority: `${host}:${port}`,
@@ -46,18 +46,18 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
46
46
+ <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
47
47
+ <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
48
48
+ <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
49
- </head >
49
+ <style id="vscode-css-modules" type="text/css" media="screen"></style >
50
50
51
- <body aria-label="" >
51
+ </head >
52
52
@@ -39,7 +39,7 @@
53
- <script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/loader.js"></script>
54
- <script src="{{WORKBENCH_WEB_BASE_URL}}/out/vs/webPackagePaths.js"></ script>
53
+
54
+ <!-- Startup (do not modify order of script tags!) -- >
55
55
<script>
56
56
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
57
57
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
58
- Object.keys(self.webPackagePaths).map(function (key, index) {
59
- self.webPackagePaths[key] = `${baseUrl}/remote/web/node_modules/${key}/${self.webPackagePaths[key]}`;
60
- });
58
+ globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
59
+ </script>
60
+ <script>
61
61
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
62
62
===================================================================
63
63
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
@@ -83,18 +83,18 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
83
83
+ <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
84
84
+ <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
85
85
+ <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
86
- <link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.main .css">
86
+ <link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/ workbench/workbench.css">
87
87
88
88
</head>
89
- @@ -40,7 +40,7 @@
90
- <script>
89
+ @@ -36,7 +36,7 @@
91
90
92
- // Packages
91
+ <!-- Startup (do not modify order of script tags!) -->
92
+ <script>
93
93
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
94
94
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
95
- Object.keys(self.webPackagePaths).map(function (key, index) {
96
- self.webPackagePaths[key] = `${baseUrl}/node_modules/${key}/${self.webPackagePaths[key]}`;
97
- });
95
+ globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
96
+ </script>
97
+ <script>
98
98
Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
99
99
===================================================================
100
100
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
@@ -111,7 +111,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
111
111
===================================================================
112
112
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
113
113
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
114
- @@ -272 ,16 +272 ,15 @@ export class WebClientServer {
114
+ @@ -271 ,16 +271 ,15 @@ export class WebClientServer {
115
115
return void res.end();
116
116
}
117
117
@@ -133,7 +133,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
133
133
);
134
134
if (!remoteAuthority) {
135
135
return serveError(req, res, 400, `Bad request.`);
136
- @@ -308 ,8 +307 ,12 @@ export class WebClientServer {
136
+ @@ -307 ,8 +306 ,12 @@ export class WebClientServer {
137
137
scopes: [['user:email'], ['repo']]
138
138
} : undefined;
139
139
@@ -146,7 +146,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
146
146
embedderIdentifier: 'server-distro',
147
147
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
148
148
...this._productService.extensionsGallery,
149
- @@ -338 ,7 +341 ,7 @@ export class WebClientServer {
149
+ @@ -337 ,7 +340 ,7 @@ export class WebClientServer {
150
150
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
151
151
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
152
152
productConfiguration,
@@ -155,7 +155,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
155
155
};
156
156
157
157
const cookies = cookie.parse(req.headers.cookie || '');
158
- @@ -355 ,9 +358 ,11 @@ export class WebClientServer {
158
+ @@ -354 ,9 +357 ,11 @@ export class WebClientServer {
159
159
const values: { [key: string]: string } = {
160
160
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
161
161
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
@@ -169,18 +169,16 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
169
169
};
170
170
171
171
// DEV ---------------------------------------------------------------------------------------
172
- @@ -395,8 +400,8 @@ export class WebClientServer {
172
+ @@ -393,7 +398,7 @@ export class WebClientServer {
173
+ 'default-src \'self\';',
173
174
'img-src \'self\' https: data: blob:;',
174
175
'media-src \'self\';',
175
- isESM ?
176
- - `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
177
- - `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
178
- + `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
179
- + `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
176
+ - `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.html
177
+ + `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.html
180
178
'child-src \'self\';',
181
179
`frame-src 'self' https://*.vscode-cdn.net data:;`,
182
180
'worker-src \'self\' data: blob:;',
183
- @@ -469 ,3 +474 ,70 @@ export class WebClientServer {
181
+ @@ -466 ,3 +471 ,70 @@ export class WebClientServer {
184
182
return void res.end(data);
185
183
}
186
184
}
@@ -267,7 +265,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
267
265
===================================================================
268
266
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts
269
267
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
270
- @@ -304 ,7 +304 ,8 @@ class LocalStorageURLCallbackProvider ex
268
+ @@ -317 ,7 +317 ,8 @@ class LocalStorageURLCallbackProvider ex
271
269
this.startListening();
272
270
}
273
271
@@ -277,7 +275,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
277
275
}
278
276
279
277
private startListening(): void {
280
- @@ -550 ,17 +551 ,6 @@ class WorkspaceProvider implements IWork
278
+ @@ -563 ,17 +564 ,6 @@ class WorkspaceProvider implements IWork
281
279
}
282
280
}
283
281
@@ -295,7 +293,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
295
293
(function () {
296
294
297
295
// Find config by checking for DOM
298
- @@ -569 ,8 +559 ,8 @@ function readCookie(name: string): strin
296
+ @@ -582 ,8 +572 ,8 @@ function readCookie(name: string): strin
299
297
if (!configElement || !configElementAttribute) {
300
298
throw new Error('Missing web configuration element');
301
299
}
@@ -319,73 +317,3 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
319
317
}
320
318
return undefined;
321
319
}
322
- Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
323
- ===================================================================
324
- --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
325
- +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
326
- @@ -11,7 +11,8 @@
327
- <meta name="mobile-web-app-capable" content="yes" />
328
- <meta name="apple-mobile-web-app-capable" content="yes" />
329
- <meta name="apple-mobile-web-app-title" content="Code">
330
- - <link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
331
- + <link rel="apple-touch-icon" sizes="192x192" href="{{BASE}}/_static/src/browser/media/pwa-icon-192.png" />
332
- + <link rel="apple-touch-icon" sizes="512x512" href="{{BASE}}/_static/src/browser/media/pwa-icon-512.png" />
333
-
334
- <!-- Disable pinch zooming -->
335
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
336
- @@ -26,8 +27,9 @@
337
- <meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">
338
-
339
- <!-- Workbench Icon/Manifest/CSS -->
340
- - <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
341
- - <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/manifest.json" crossorigin="use-credentials" />
342
- + <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
343
- + <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
344
- + <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
345
- <style id="vscode-css-modules" type="text/css" media="screen"></style>
346
-
347
- </head>
348
- @@ -37,7 +39,7 @@
349
-
350
- <!-- Startup (do not modify order of script tags!) -->
351
- <script>
352
- - const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
353
- + const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
354
- globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
355
- </script>
356
- <script>
357
- Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
358
- ===================================================================
359
- --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
360
- +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.esm.html
361
- @@ -11,7 +11,8 @@
362
- <meta name="mobile-web-app-capable" content="yes" />
363
- <meta name="apple-mobile-web-app-capable" content="yes" />
364
- <meta name="apple-mobile-web-app-title" content="Code">
365
- - <link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
366
- + <link rel="apple-touch-icon" sizes="192x192" href="{{BASE}}/_static/src/browser/media/pwa-icon-192.png" />
367
- + <link rel="apple-touch-icon" sizes="512x512" href="{{BASE}}/_static/src/browser/media/pwa-icon-512.png" />
368
-
369
- <!-- Disable pinch zooming -->
370
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
371
- @@ -23,8 +24,9 @@
372
- <meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
373
-
374
- <!-- Workbench Icon/Manifest/CSS -->
375
- - <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
376
- - <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/manifest.json" crossorigin="use-credentials" />
377
- + <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
378
- + <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
379
- + <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
380
- <link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
381
-
382
- </head>
383
- @@ -34,7 +36,7 @@
384
-
385
- <!-- Startup (do not modify order of script tags!) -->
386
- <script>
387
- - const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
388
- + const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
389
- globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
390
- </script>
391
- <script>
0 commit comments