mirror of
https://github.com/coder/code-server.git
synced 2025-07-24 10:08:20 +08:00
Update Code to 1.101.0 (#7376)
This commit is contained in:
@ -1 +1 @@
|
||||
20.19.0
|
||||
22.15.1
|
||||
|
@ -76,8 +76,8 @@ main() {
|
||||
echo "USE AT YOUR OWN RISK!"
|
||||
fi
|
||||
|
||||
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-20}" ]; then
|
||||
echo "ERROR: code-server currently requires node v20."
|
||||
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-22}" ]; then
|
||||
echo "ERROR: code-server currently requires node v22."
|
||||
if [ -n "$FORCE_NODE_VERSION" ]; then
|
||||
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
|
||||
fi
|
||||
|
@ -32,7 +32,7 @@ The prerequisites for contributing to code-server are almost the same as those
|
||||
for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
||||
Here is what is needed:
|
||||
|
||||
- `node` v20.x
|
||||
- `node` v22.x
|
||||
- `git` v2.x or greater
|
||||
- [`git-lfs`](https://git-lfs.github.com)
|
||||
- [`npm`](https://www.npmjs.com/)
|
||||
|
@ -11,7 +11,7 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
||||
```
|
||||
|
||||
6. Exit the terminal using `exit` and then reopen the terminal
|
||||
7. Install and use Node.js 20:
|
||||
7. Install and use Node.js 22:
|
||||
|
||||
```shell
|
||||
nvm install 18
|
||||
|
@ -30,7 +30,7 @@ includes installing instructions based on your operating system.
|
||||
## Node.js version
|
||||
|
||||
We use the same major version of Node.js shipped with Code's remote, which is
|
||||
currently `20.x`. VS Code also [lists Node.js
|
||||
currently `22.x`. VS Code also [lists Node.js
|
||||
requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
||||
|
||||
Using other versions of Node.js [may lead to unexpected
|
||||
@ -78,7 +78,7 @@ Proceed to [installing](#installing)
|
||||
## FreeBSD
|
||||
|
||||
```sh
|
||||
pkg install -y git python npm-node20 pkgconf
|
||||
pkg install -y git python npm-node22 pkgconf
|
||||
pkg install -y libinotify
|
||||
```
|
||||
|
||||
|
@ -57,7 +57,7 @@ npm config set python python3
|
||||
node -v
|
||||
```
|
||||
|
||||
you will get Node version `v20`
|
||||
you will get Node version `v22`
|
||||
|
||||
5. Now install code-server following our guide on [installing with npm](./npm.md)
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
nodejs = pkgs.nodejs_20;
|
||||
nodejs = pkgs.nodejs_22;
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
|
Submodule lib/vscode updated: 258e40fedc...dfaf44141e
21
package-lock.json
generated
21
package-lock.json
generated
@ -45,7 +45,7 @@
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/http-proxy": "1.17.7",
|
||||
"@types/js-yaml": "^4.0.6",
|
||||
"@types/node": "20.x",
|
||||
"@types/node": "22.x",
|
||||
"@types/pem": "^1.14.1",
|
||||
"@types/proxy-from-env": "^1.0.1",
|
||||
"@types/safe-compare": "^1.1.0",
|
||||
@ -66,7 +66,7 @@
|
||||
"typescript-eslint": "^8.8.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20"
|
||||
"node": "22"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
@ -632,13 +632,13 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.17.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.17.tgz",
|
||||
"integrity": "sha512-/WndGO4kIfMicEQLTi/mDANUu/iVUhT7KboZPdEqqHQ4aTS+3qT3U5gIqWDFV+XouorjfgGqvKILJeHhuQgFYg==",
|
||||
"version": "22.15.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz",
|
||||
"integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/pem": {
|
||||
@ -6080,10 +6080,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"dev": true
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/unified": {
|
||||
"version": "9.2.2",
|
||||
|
@ -47,7 +47,7 @@
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/http-proxy": "1.17.7",
|
||||
"@types/js-yaml": "^4.0.6",
|
||||
"@types/node": "20.x",
|
||||
"@types/node": "22.x",
|
||||
"@types/pem": "^1.14.1",
|
||||
"@types/proxy-from-env": "^1.0.1",
|
||||
"@types/safe-compare": "^1.1.0",
|
||||
@ -90,7 +90,7 @@
|
||||
"xdg-basedir": "^4.0.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/node": "20.x"
|
||||
"@types/node": "22.x"
|
||||
},
|
||||
"bin": {
|
||||
"code-server": "out/node/entry.js"
|
||||
@ -105,7 +105,7 @@
|
||||
"remote-development"
|
||||
],
|
||||
"engines": {
|
||||
"node": "20"
|
||||
"node": "22"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
|
@ -111,7 +111,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
|
||||
@@ -246,7 +246,9 @@ export class WebClientServer {
|
||||
@@ -245,7 +245,9 @@ export class WebClientServer {
|
||||
};
|
||||
|
||||
// Prefix routes with basePath for clients
|
||||
@ -122,7 +122,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
|
||||
const queryConnectionToken = parsedUrl.query[connectionTokenQueryName];
|
||||
if (typeof queryConnectionToken === 'string') {
|
||||
@@ -285,10 +287,14 @@ export class WebClientServer {
|
||||
@@ -284,10 +286,14 @@ export class WebClientServer {
|
||||
};
|
||||
|
||||
const useTestResolver = (!this._environmentService.isBuilt && this._environmentService.args['use-test-resolver']);
|
||||
@ -138,7 +138,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
);
|
||||
if (!remoteAuthority) {
|
||||
return serveError(req, res, 400, `Bad request.`);
|
||||
@@ -335,6 +341,7 @@ export class WebClientServer {
|
||||
@@ -334,6 +340,7 @@ export class WebClientServer {
|
||||
|
||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||
codeServerVersion: this._productService.codeServerVersion,
|
||||
@ -146,7 +146,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
embedderIdentifier: 'server-distro',
|
||||
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||
...this._productService.extensionsGallery,
|
||||
@@ -388,7 +395,9 @@ export class WebClientServer {
|
||||
@@ -387,7 +394,9 @@ export class WebClientServer {
|
||||
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
||||
WORKBENCH_WEB_BASE_URL: staticRoute,
|
||||
WORKBENCH_NLS_URL,
|
||||
@ -157,7 +157,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
};
|
||||
|
||||
// DEV ---------------------------------------------------------------------------------------
|
||||
@@ -425,7 +434,7 @@ export class WebClientServer {
|
||||
@@ -424,7 +433,7 @@ export class WebClientServer {
|
||||
'default-src \'self\';',
|
||||
'img-src \'self\' https: data: blob:;',
|
||||
'media-src \'self\';',
|
||||
@ -166,7 +166,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
'child-src \'self\';',
|
||||
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
||||
'worker-src \'self\' data: blob:;',
|
||||
@@ -498,3 +507,70 @@ export class WebClientServer {
|
||||
@@ -497,3 +506,70 @@ export class WebClientServer {
|
||||
return void res.end(data);
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||
+ 'stdin-to-clipboard'?: boolean;
|
||||
'unresponsive-sample-interval'?: string;
|
||||
'unresponsive-sample-period'?: string;
|
||||
|
||||
'enable-rdp-display-tracking'?: boolean;
|
||||
Index: code-server/lib/vscode/src/vs/platform/environment/node/argv.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/platform/environment/node/argv.ts
|
||||
|
@ -7,7 +7,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||
@@ -332,6 +332,10 @@ export class Extension implements IExten
|
||||
@@ -340,6 +340,10 @@ export class Extension implements IExten
|
||||
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
||||
return false;
|
||||
}
|
||||
|
@ -153,7 +153,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
|
||||
@@ -26,6 +26,7 @@ import { URI } from '../../base/common/u
|
||||
@@ -25,6 +25,7 @@ import { URI } from '../../base/common/u
|
||||
import { streamToBuffer } from '../../base/common/buffer.js';
|
||||
import { IProductConfiguration } from '../../base/common/product.js';
|
||||
import { isString, Mutable } from '../../base/common/types.js';
|
||||
@ -161,7 +161,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
import { CharCode } from '../../base/common/charCode.js';
|
||||
import { IExtensionManifest } from '../../platform/extensions/common/extensions.js';
|
||||
import { ICSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
|
||||
@@ -386,14 +387,22 @@ export class WebClientServer {
|
||||
@@ -385,14 +386,22 @@ export class WebClientServer {
|
||||
};
|
||||
|
||||
const cookies = cookie.parse(req.headers.cookie || '');
|
||||
@ -272,7 +272,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
||||
@@ -474,9 +474,6 @@ export class InstallAction extends Exten
|
||||
@@ -475,9 +475,6 @@ export class InstallAction extends Exten
|
||||
if (this.extension.isBuiltin) {
|
||||
return;
|
||||
}
|
||||
@ -282,7 +282,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
if (this.extension.state !== ExtensionState.Uninstalled) {
|
||||
return;
|
||||
}
|
||||
@@ -781,7 +778,7 @@ export abstract class InstallInOtherServ
|
||||
@@ -782,7 +779,7 @@ export abstract class InstallInOtherServ
|
||||
}
|
||||
|
||||
if (isLanguagePackExtension(this.extension.local.manifest)) {
|
||||
@ -291,7 +291,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
}
|
||||
|
||||
// Prefers to run on UI
|
||||
@@ -2071,17 +2068,6 @@ export class SetLanguageAction extends E
|
||||
@@ -2073,17 +2070,6 @@ export class SetLanguageAction extends E
|
||||
update(): void {
|
||||
this.enabled = false;
|
||||
this.class = SetLanguageAction.DisabledClass;
|
||||
@ -309,7 +309,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
}
|
||||
|
||||
override async run(): Promise<any> {
|
||||
@@ -2098,7 +2084,6 @@ export class ClearLanguageAction extends
|
||||
@@ -2100,7 +2086,6 @@ export class ClearLanguageAction extends
|
||||
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
|
||||
|
||||
constructor(
|
||||
@ -317,7 +317,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
||||
@ILocaleService private readonly localeService: ILocaleService,
|
||||
) {
|
||||
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
|
||||
@@ -2108,17 +2093,6 @@ export class ClearLanguageAction extends
|
||||
@@ -2110,17 +2095,6 @@ export class ClearLanguageAction extends
|
||||
update(): void {
|
||||
this.enabled = false;
|
||||
this.class = ClearLanguageAction.DisabledClass;
|
||||
|
@ -112,7 +112,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
|
||||
@@ -370,6 +370,8 @@ export class WebClientServer {
|
||||
@@ -369,6 +369,8 @@ export class WebClientServer {
|
||||
serverBasePath: basePath,
|
||||
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
||||
userDataPath: this._environmentService.userDataPath,
|
||||
@ -208,7 +208,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
@@ -40,6 +40,9 @@ export const HasWebFileSystemAccess = ne
|
||||
@@ -36,6 +36,9 @@ export const HasWebFileSystemAccess = ne
|
||||
|
||||
export const EmbedderIdentifierContext = new RawContextKey<string | undefined>('embedderIdentifier', undefined, localize('embedderIdentifier', 'The identifier of the embedder according to the product service, if one is defined'));
|
||||
|
||||
@ -217,7 +217,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
+
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region < --- Window --- >
|
||||
Index: code-server/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
|
||||
|
@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
||||
import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js';
|
||||
import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js';
|
||||
import './gettingStartedColors.js';
|
||||
@@ -874,6 +874,72 @@ export class GettingStartedPage extends
|
||||
@@ -876,6 +876,72 @@ export class GettingStartedPage extends
|
||||
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
|
||||
);
|
||||
|
||||
@ -101,7 +101,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
||||
const leftColumn = $('.categories-column.categories-column-left', {},);
|
||||
const rightColumn = $('.categories-column.categories-column-right', {},);
|
||||
|
||||
@@ -909,6 +975,9 @@ export class GettingStartedPage extends
|
||||
@@ -911,6 +977,9 @@ export class GettingStartedPage extends
|
||||
recentList.setLimit(5);
|
||||
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||
}
|
||||
@ -201,7 +201,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
|
||||
@@ -374,6 +374,7 @@ export class WebClientServer {
|
||||
@@ -373,6 +373,7 @@ export class WebClientServer {
|
||||
userDataPath: this._environmentService.userDataPath,
|
||||
isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
|
||||
isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'],
|
||||
@ -234,7 +234,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||
@@ -42,6 +42,7 @@ export const EmbedderIdentifierContext =
|
||||
@@ -38,6 +38,7 @@ export const EmbedderIdentifierContext =
|
||||
|
||||
export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
|
||||
export const IsEnabledFileUploads = new RawContextKey<boolean>('isEnabledFileUploads', true, true);
|
||||
|
@ -269,7 +269,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
|
||||
@@ -334,6 +334,7 @@ export class WebClientServer {
|
||||
@@ -333,6 +333,7 @@ export class WebClientServer {
|
||||
} : undefined;
|
||||
|
||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||
|
@ -18,7 +18,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
|
||||
@@ -365,6 +365,7 @@ export class WebClientServer {
|
||||
@@ -364,6 +364,7 @@ export class WebClientServer {
|
||||
remoteAuthority,
|
||||
serverBasePath: basePath,
|
||||
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
||||
|
@ -40,7 +40,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
|
||||
@@ -342,6 +342,7 @@ export class WebClientServer {
|
||||
@@ -341,6 +341,7 @@ export class WebClientServer {
|
||||
codeServerVersion: this._productService.codeServerVersion,
|
||||
rootEndpoint: rootBase,
|
||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||
|
@ -40,15 +40,15 @@ 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
|
||||
@@ -327,7 +327,6 @@ export class WebClientServer {
|
||||
@@ -326,7 +326,6 @@ export class WebClientServer {
|
||||
|
||||
const staticRoute = posix.join(basePath, this._productPath, STATIC_PATH);
|
||||
const callbackRoute = posix.join(basePath, this._productPath, CALLBACK_PATH);
|
||||
- const webExtensionRoute = posix.join(basePath, this._productPath, WEB_EXTENSION_PATH);
|
||||
|
||||
const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(path.resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority });
|
||||
const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority });
|
||||
|
||||
@@ -343,14 +342,7 @@ export class WebClientServer {
|
||||
@@ -342,14 +341,7 @@ export class WebClientServer {
|
||||
codeServerVersion: this._productService.codeServerVersion,
|
||||
rootEndpoint: rootBase,
|
||||
embedderIdentifier: 'server-distro',
|
||||
|
@ -71,7 +71,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
|
||||
@@ -343,6 +343,7 @@ export class WebClientServer {
|
||||
@@ -342,6 +342,7 @@ export class WebClientServer {
|
||||
rootEndpoint: rootBase,
|
||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
|
||||
|
@ -54,7 +54,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
|
||||
@@ -344,6 +344,10 @@ export class WebClientServer {
|
||||
@@ -343,6 +343,10 @@ export class WebClientServer {
|
||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
|
||||
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/',
|
||||
|
@ -22,7 +22,7 @@ Index: code-server/lib/vscode/src/vs/platform/extensionManagement/node/extension
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IExtensionGalleryManifestService protected readonly extensionGalleryManifestService: IExtensionGalleryManifestService,
|
||||
@IProductService productService: IProductService,
|
||||
@@ -331,8 +333,7 @@ export class ExtensionManagementService
|
||||
@@ -339,8 +341,7 @@ export class ExtensionManagementService
|
||||
|
||||
private async downloadExtension(extension: IGalleryExtension, operation: InstallOperation, verifySignature: boolean, clientTargetPlatform?: TargetPlatform): Promise<{ readonly location: URI; readonly verificationStatus: ExtensionSignatureVerificationCode | undefined }> {
|
||||
if (verifySignature) {
|
||||
|
@ -96,7 +96,7 @@ Index: code-server/lib/vscode/src/vs/workbench/api/node/extensionHostProcess.ts
|
||||
import minimist from 'minimist';
|
||||
import * as nativeWatchdog from 'native-watchdog';
|
||||
import * as net from 'net';
|
||||
@@ -423,7 +424,28 @@ async function startExtensionHostProcess
|
||||
@@ -437,7 +438,28 @@ async function startExtensionHostProcess
|
||||
);
|
||||
|
||||
// rewrite onTerminate-function to be a proper shutdown
|
||||
|
@ -134,7 +134,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
|
||||
@@ -348,6 +348,8 @@ export class WebClientServer {
|
||||
@@ -347,6 +347,8 @@ export class WebClientServer {
|
||||
scope: vscodeBase + '/',
|
||||
path: rootBase + '/_static/out/browser/serviceWorker.js',
|
||||
},
|
||||
|
@ -24,7 +24,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
|
||||
@@ -339,6 +339,14 @@ export class WebClientServer {
|
||||
@@ -338,6 +338,14 @@ export class WebClientServer {
|
||||
scopes: [['user:email'], ['repo']]
|
||||
} : undefined;
|
||||
|
||||
@ -39,7 +39,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||
codeServerVersion: this._productService.codeServerVersion,
|
||||
rootEndpoint: rootBase,
|
||||
@@ -353,6 +361,7 @@ export class WebClientServer {
|
||||
@@ -352,6 +360,7 @@ export class WebClientServer {
|
||||
telemetryEndpoint: this._productService.telemetryEndpoint,
|
||||
embedderIdentifier: 'server-distro',
|
||||
extensionsGallery: this._productService.extensionsGallery,
|
||||
|
@ -105,7 +105,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
|
||||
@@ -341,6 +341,7 @@ export class WebClientServer {
|
||||
@@ -340,6 +340,7 @@ export class WebClientServer {
|
||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||
codeServerVersion: this._productService.codeServerVersion,
|
||||
rootEndpoint: rootBase,
|
||||
|
@ -54,7 +54,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
|
||||
@@ -361,6 +361,7 @@ export class WebClientServer {
|
||||
@@ -360,6 +360,7 @@ export class WebClientServer {
|
||||
const workbenchWebConfiguration = {
|
||||
remoteAuthority,
|
||||
serverBasePath: basePath,
|
||||
@ -70,29 +70,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
- content="default-src 'none'; script-src 'sha256-nlLyDpnjtftJG2xvXh2vuy77l7xFTjfOz7Jnj1iXNmA=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||
+ content="default-src 'none'; script-src 'sha256-ap/AtocvSWp0rrxaO19DJy/nOpazT6M5Cv9utUWe7MA=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||
|
||||
- content="default-src 'none'; script-src 'sha256-gEAyFzmkyqMoTTnN+3KReFUYoHsK4RAJEb+6eiul+UY=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||
+ content="default-src 'none'; script-src 'sha256-1qYtPnTQa4VwKNJO61EOhs2agF9TvuQSYIJ27OgzZqI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||
|
||||
<!-- Disable pinch zooming -->
|
||||
@@ -349,6 +349,12 @@
|
||||
|
||||
const hostname = location.hostname;
|
||||
|
||||
+ // It is safe to run if we are on the same host.
|
||||
+ const parent = new URL(parentOrigin)
|
||||
+ if (parent.hostname === hostname) {
|
||||
+ return start(parentOrigin)
|
||||
+ }
|
||||
+
|
||||
if (!crypto.subtle) {
|
||||
// cannot validate, not running in a secure context
|
||||
throw new Error(`'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).`);
|
||||
Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html
|
||||
===================================================================
|
||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html
|
||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html
|
||||
@@ -343,6 +343,12 @@
|
||||
<meta name="viewport"
|
||||
@@ -351,6 +351,12 @@
|
||||
|
||||
const hostname = location.hostname;
|
||||
|
||||
|
Reference in New Issue
Block a user