mirror of
https://github.com/coder/code-server.git
synced 2026-09-09 11:27:24 +02:00
Update Code to 1.136.1 (#7981)
* Update Code to 1.136.1 * Do not click on tab during test file opens It will already be the selected tab, and if any other tab is already open (like the welcome tab), it will click that instead. We disable the welcome page so this is not supposed to actually matter, but that Setting appears not to be working. Also add the quick input widget selector in the disabled downloads test, since if the widget never shows up it would mistakenly pass.
This commit is contained in:
@@ -22,6 +22,12 @@ Code v99.99.999
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
Code v1.136.1
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.136.1
|
||||||
|
|
||||||
## [4.135.0](https://github.com/coder/code-server/releases/tag/v4.135.0) - 2026-08-27
|
## [4.135.0](https://github.com/coder/code-server/releases/tag/v4.135.0) - 2026-08-27
|
||||||
|
|
||||||
Code v1.135.0
|
Code v1.135.0
|
||||||
|
|||||||
Submodule lib/vscode updated: 08d4889f9e...a44adf7f53
@@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -24,6 +24,7 @@ export const serverOptions: OptionDescri
|
@@ -40,6 +40,7 @@ export const serverOptions: OptionDescri
|
||||||
'disable-getting-started-override': { type: 'boolean' },
|
'disable-getting-started-override': { type: 'boolean' },
|
||||||
'locale': { type: 'string' },
|
'locale': { type: 'string' },
|
||||||
'link-protection-trusted-domains': { type: 'string[]' },
|
'link-protection-trusted-domains': { type: 'string[]' },
|
||||||
@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -124,6 +125,7 @@ export interface ServerParsedArgs {
|
@@ -140,6 +141,7 @@ export interface ServerParsedArgs {
|
||||||
'disable-getting-started-override'?: boolean,
|
'disable-getting-started-override'?: boolean,
|
||||||
'locale'?: string
|
'locale'?: string
|
||||||
'link-protection-trusted-domains'?: string[],
|
'link-protection-trusted-domains'?: string[],
|
||||||
@@ -32,7 +32,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -362,8 +362,11 @@ export class WebClientServer {
|
@@ -407,8 +407,11 @@ export class WebClientServer {
|
||||||
linkProtectionTrustedDomains.push(...this._productService.linkProtectionTrustedDomains);
|
linkProtectionTrustedDomains.push(...this._productService.linkProtectionTrustedDomains);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
|
|||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
<!-- Disable pinch zooming -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||||
@@ -27,9 +27,9 @@
|
@@ -29,9 +29,9 @@
|
||||||
<meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">
|
<meta id="vscode-workbench-css-modules" data-settings="{{WORKBENCH_DEV_CSS_MODULES}}">
|
||||||
|
|
||||||
<!-- Workbench Icon/Manifest/CSS -->
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
- <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" />
|
- <link rel="icon" href="/_static/src/browser/media/favicon-dark-support.svg" />
|
||||||
@@ -49,15 +49,15 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
|
|||||||
<style id="vscode-css-modules" type="text/css" media="screen"></style>
|
<style id="vscode-css-modules" type="text/css" media="screen"></style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -39,7 +39,7 @@
|
@@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<!-- Startup (do not modify order of script tags!) -->
|
<!-- Startup (do not modify order of script tags!) -->
|
||||||
<script>
|
<script nonce="{{WORKBENCH_SCRIPT_NONCE}}">
|
||||||
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
|
- const baseUrl = new URL(document.getElementById('vscode-workbench-web-base-url').getAttribute('data-settings'), window.location.origin).toString();
|
||||||
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
|
+ const baseUrl = new URL(document.getElementById('vscode-workbench-web-base-url').getAttribute('data-settings'), window.location).toString();
|
||||||
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script nonce="{{WORKBENCH_SCRIPT_NONCE}}">
|
||||||
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
||||||
@@ -73,7 +73,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
|||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
<!-- Disable pinch zooming -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||||
@@ -24,9 +24,9 @@
|
@@ -25,9 +25,9 @@
|
||||||
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
|
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
|
||||||
|
|
||||||
<!-- Workbench Icon/Manifest/CSS -->
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
@@ -86,15 +86,15 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
|||||||
<link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
|
<link rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/code/browser/workbench/workbench.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -36,7 +36,7 @@
|
@@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<!-- Startup (do not modify order of script tags!) -->
|
<!-- Startup (do not modify order of script tags!) -->
|
||||||
<script>
|
<script nonce="{{WORKBENCH_SCRIPT_NONCE}}">
|
||||||
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
|
- const baseUrl = new URL(document.getElementById('vscode-workbench-web-base-url').getAttribute('data-settings'), window.location.origin).toString();
|
||||||
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
|
+ const baseUrl = new URL(document.getElementById('vscode-workbench-web-base-url').getAttribute('data-settings'), window.location).toString();
|
||||||
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script nonce="{{WORKBENCH_SCRIPT_NONCE}}">
|
||||||
Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts
|
||||||
@@ -111,21 +111,31 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/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
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -263,7 +263,9 @@ export class WebClientServer {
|
@@ -146,7 +146,7 @@ export function createWorkbenchContentSe
|
||||||
|
'default-src \'self\';',
|
||||||
|
'img-src \'self\' https: data: blob:;',
|
||||||
|
'media-src \'self\';',
|
||||||
|
- `script-src 'self' 'unsafe-eval' ${nlsBaseUrl ?? ''} blob: 'nonce-${scriptNonce}' '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : `http://${remoteAuthority}`};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
|
+ `script-src 'self' 'unsafe-eval' ${nlsBaseUrl ?? ''} blob: 'nonce-${scriptNonce}' '${webWorkerExtensionHostIframeScriptSHA}' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' ${useTestResolver ? '' : ``};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
|
'child-src \'self\';',
|
||||||
|
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
||||||
|
'worker-src \'self\' data: blob:;',
|
||||||
|
@@ -307,8 +307,10 @@ export class WebClientServer {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prefix routes with basePath for clients
|
// Prefix routes with basePath for clients
|
||||||
- const basePath = getFirstHeader('x-forwarded-prefix') || this._basePath;
|
|
||||||
+ const rootBase = relativeRoot(getOriginalUrl(req))
|
+ const rootBase = relativeRoot(getOriginalUrl(req))
|
||||||
+ const vscodeBase = relativePath(getOriginalUrl(req))
|
+ const vscodeBase = relativePath(getOriginalUrl(req))
|
||||||
+ const basePath = vscodeBase || getFirstHeader('x-forwarded-prefix') || this._basePath;
|
const forwardedPrefix = getFirstHeader('x-forwarded-prefix');
|
||||||
|
- const basePath = forwardedPrefix && isSafeBasePath(forwardedPrefix) ? forwardedPrefix : this._basePath;
|
||||||
|
+ const basePath = vscodeBase || (forwardedPrefix && isSafeBasePath(forwardedPrefix) ? forwardedPrefix : this._basePath);
|
||||||
|
|
||||||
const queryConnectionTokens = parsedUrl.searchParams.getAll(connectionTokenQueryName);
|
const queryConnectionTokens = parsedUrl.searchParams.getAll(connectionTokenQueryName);
|
||||||
if (queryConnectionTokens.length === 1) {
|
if (queryConnectionTokens.length === 1) {
|
||||||
@@ -300,10 +302,14 @@ export class WebClientServer {
|
@@ -345,10 +347,14 @@ export class WebClientServer {
|
||||||
};
|
};
|
||||||
|
|
||||||
const useTestResolver = (!this._environmentService.isBuilt && this._environmentService.args['use-test-resolver']);
|
const useTestResolver = (!this._environmentService.isBuilt && !!this._environmentService.args['use-test-resolver']);
|
||||||
+ // For now we are getting the remote authority from the client to avoid
|
+ // For now we are getting the remote authority from the client to avoid
|
||||||
+ // needing specific configuration for reverse proxies to work. Set this to
|
+ // needing specific configuration for reverse proxies to work. Set this to
|
||||||
+ // something invalid to make sure we catch code that is using this value
|
+ // something invalid to make sure we catch code that is using this value
|
||||||
@@ -138,7 +148,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
);
|
);
|
||||||
if (!remoteAuthority) {
|
if (!remoteAuthority) {
|
||||||
return serveError(req, res, 400, `Bad request.`);
|
return serveError(req, res, 400, `Bad request.`);
|
||||||
@@ -350,6 +356,7 @@ export class WebClientServer {
|
@@ -395,6 +401,7 @@ export class WebClientServer {
|
||||||
|
|
||||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
@@ -146,27 +156,18 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
voiceWsUrl: this._productService.voiceWsUrl,
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||||
@@ -399,7 +406,9 @@ export class WebClientServer {
|
@@ -446,7 +453,9 @@ export class WebClientServer {
|
||||||
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
|
||||||
WORKBENCH_WEB_BASE_URL: staticRoute,
|
WORKBENCH_WEB_BASE_URL: staticRoute,
|
||||||
WORKBENCH_NLS_URL,
|
WORKBENCH_NLS_URL,
|
||||||
- WORKBENCH_NLS_FALLBACK_URL: `${staticRoute}/out/nls.messages.js`
|
WORKBENCH_NLS_FALLBACK_URL: `${staticRoute}/out/nls.messages.js`,
|
||||||
+ WORKBENCH_NLS_FALLBACK_URL: `${staticRoute}/out/nls.messages.js`,
|
- WORKBENCH_SCRIPT_NONCE: scriptNonce
|
||||||
|
+ WORKBENCH_SCRIPT_NONCE: scriptNonce,
|
||||||
+ BASE: rootBase,
|
+ BASE: rootBase,
|
||||||
+ VS_BASE: basePath,
|
+ VS_BASE: basePath,
|
||||||
};
|
};
|
||||||
|
|
||||||
// DEV ---------------------------------------------------------------------------------------
|
// DEV ---------------------------------------------------------------------------------------
|
||||||
@@ -436,7 +445,7 @@ export class WebClientServer {
|
@@ -542,3 +551,70 @@ export class WebClientServer {
|
||||||
'default-src \'self\';',
|
|
||||||
'img-src \'self\' https: data: blob:;',
|
|
||||||
'media-src \'self\';',
|
|
||||||
- `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
|
|
||||||
+ `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
|
|
||||||
'child-src \'self\';',
|
|
||||||
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
|
||||||
'worker-src \'self\' data: blob:;',
|
|
||||||
@@ -509,3 +518,70 @@ export class WebClientServer {
|
|
||||||
return void res.end(data);
|
return void res.end(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
||||||
import { createRandomIPCHandle } from '../../base/parts/ipc/node/ipc.net.js';
|
import { createRandomIPCHandle } from '../../base/parts/ipc/node/ipc.net.js';
|
||||||
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
@@ -417,6 +417,9 @@ export async function setupServerService
|
@@ -418,6 +418,9 @@ export async function setupServerService
|
||||||
|
|
||||||
socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));
|
socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
import { CharCode } from '../../base/common/charCode.js';
|
import { CharCode } from '../../base/common/charCode.js';
|
||||||
import { IExtensionManifest } from '../../platform/extensions/common/extensions.js';
|
import { IExtensionManifest } from '../../platform/extensions/common/extensions.js';
|
||||||
import { ICSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
|
import { ICSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
|
||||||
@@ -397,14 +398,22 @@ export class WebClientServer {
|
@@ -442,14 +443,22 @@ export class WebClientServer {
|
||||||
};
|
};
|
||||||
|
|
||||||
const cookies = cookie.parse(req.headers.cookie || '');
|
const cookies = cookie.parse(req.headers.cookie || '');
|
||||||
@@ -171,7 +171,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
let WORKBENCH_NLS_URL: string;
|
let WORKBENCH_NLS_URL: string;
|
||||||
if (!locale.startsWith('en') && this._productService.nlsCoreBaseUrl) {
|
if (!locale.startsWith('en') && this._productService.nlsCoreBaseUrl) {
|
||||||
WORKBENCH_NLS_BASE_URL = this._productService.nlsCoreBaseUrl;
|
WORKBENCH_NLS_BASE_URL = this._productService.nlsCoreBaseUrl;
|
||||||
WORKBENCH_NLS_URL = `${WORKBENCH_NLS_BASE_URL}${this._productService.commit}/${this._productService.version}/${locale}/nls.messages.js`;
|
WORKBENCH_NLS_URL = createNlsUrl(WORKBENCH_NLS_BASE_URL, this._productService.commit, this._productService.version, locale);
|
||||||
} else {
|
} else {
|
||||||
- WORKBENCH_NLS_URL = ''; // fallback will apply
|
- WORKBENCH_NLS_URL = ''; // fallback will apply
|
||||||
+ try {
|
+ try {
|
||||||
@@ -181,16 +181,16 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
+ : '';
|
+ : '';
|
||||||
+ } catch (error) {
|
+ } catch (error) {
|
||||||
+ console.error("Failed to generate translations", error);
|
+ console.error("Failed to generate translations", error);
|
||||||
+ WORKBENCH_NLS_URL = '';
|
+ WORKBENCH_NLS_URL = ''; // fallback will apply
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
const values: { [key: string]: string } = {
|
const scriptNonce = createScriptNonce();
|
||||||
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -22,6 +22,7 @@ export const serverOptions: OptionDescri
|
@@ -38,6 +38,7 @@ export const serverOptions: OptionDescri
|
||||||
'disable-file-downloads': { type: 'boolean' },
|
'disable-file-downloads': { type: 'boolean' },
|
||||||
'disable-file-uploads': { type: 'boolean' },
|
'disable-file-uploads': { type: 'boolean' },
|
||||||
'disable-getting-started-override': { type: 'boolean' },
|
'disable-getting-started-override': { type: 'boolean' },
|
||||||
@@ -198,7 +198,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ export interface ServerParsedArgs {
|
@@ -136,6 +137,7 @@ export interface ServerParsedArgs {
|
||||||
'disable-file-downloads'?: boolean;
|
'disable-file-downloads'?: boolean;
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
'disable-getting-started-override'?: boolean,
|
'disable-getting-started-override'?: boolean,
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -19,6 +19,8 @@ export const serverOptions: OptionDescri
|
@@ -35,6 +35,8 @@ export const serverOptions: OptionDescri
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check': { type: 'boolean' },
|
'disable-update-check': { type: 'boolean' },
|
||||||
'auth': { type: 'string' },
|
'auth': { type: 'string' },
|
||||||
@@ -99,7 +99,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -114,6 +116,8 @@ export interface ServerParsedArgs {
|
@@ -130,6 +132,8 @@ export interface ServerParsedArgs {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check'?: boolean;
|
'disable-update-check'?: boolean;
|
||||||
'auth'?: string;
|
'auth'?: string;
|
||||||
@@ -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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -380,6 +380,8 @@ export class WebClientServer {
|
@@ -425,6 +425,8 @@ export class WebClientServer {
|
||||||
serverBasePath: basePath,
|
serverBasePath: basePath,
|
||||||
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
||||||
userDataPath: this._environmentService.userDataPath,
|
userDataPath: this._environmentService.userDataPath,
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -21,6 +21,7 @@ export const serverOptions: OptionDescri
|
@@ -37,6 +37,7 @@ export const serverOptions: OptionDescri
|
||||||
'auth': { type: 'string' },
|
'auth': { type: 'string' },
|
||||||
'disable-file-downloads': { type: 'boolean' },
|
'disable-file-downloads': { type: 'boolean' },
|
||||||
'disable-file-uploads': { type: 'boolean' },
|
'disable-file-uploads': { type: 'boolean' },
|
||||||
@@ -189,7 +189,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -118,6 +119,7 @@ export interface ServerParsedArgs {
|
@@ -134,6 +135,7 @@ export interface ServerParsedArgs {
|
||||||
'auth'?: string;
|
'auth'?: string;
|
||||||
'disable-file-downloads'?: boolean;
|
'disable-file-downloads'?: boolean;
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
@@ -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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -384,6 +384,7 @@ export class WebClientServer {
|
@@ -429,6 +429,7 @@ export class WebClientServer {
|
||||||
userDataPath: this._environmentService.userDataPath,
|
userDataPath: this._environmentService.userDataPath,
|
||||||
isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
|
isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],
|
||||||
isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'],
|
isEnabledFileUploads: !this._environmentService.args['disable-file-uploads'],
|
||||||
|
|||||||
@@ -19,20 +19,19 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
|
|||||||
import { parseArgs, ErrorReporter } from '../../platform/environment/node/argv.js';
|
import { parseArgs, ErrorReporter } from '../../platform/environment/node/argv.js';
|
||||||
import { join, dirname } from '../../base/common/path.js';
|
import { join, dirname } from '../../base/common/path.js';
|
||||||
import { performance } from 'perf_hooks';
|
import { performance } from 'perf_hooks';
|
||||||
-import { serverOptions } from './serverEnvironmentService.js';
|
-import { agentHostBridgeConnectionTokenEnvironmentVariable, serverOptions } from './serverEnvironmentService.js';
|
||||||
+import { serverOptions, ServerParsedArgs } from './serverEnvironmentService.js';
|
+import { agentHostBridgeConnectionTokenEnvironmentVariable, serverOptions, ServerParsedArgs } from './serverEnvironmentService.js';
|
||||||
import product from '../../platform/product/common/product.js';
|
import product from '../../platform/product/common/product.js';
|
||||||
import * as perf from '../../base/common/performance.js';
|
import * as perf from '../../base/common/performance.js';
|
||||||
|
|
||||||
@@ -34,38 +34,47 @@ const errorReporter: ErrorReporter = {
|
@@ -34,40 +34,49 @@ const errorReporter: ErrorReporter = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
-const args = parseArgs(process.argv.slice(2), serverOptions, errorReporter);
|
-const args = parseArgs(process.argv.slice(2), serverOptions, errorReporter);
|
||||||
+function parse(): ServerParsedArgs {
|
-const agentHostBridgeConnectionToken = process.env[agentHostBridgeConnectionTokenEnvironmentVariable];
|
||||||
+ return parseArgs(process.argv.slice(2), serverOptions, errorReporter);
|
-delete process.env[agentHostBridgeConnectionTokenEnvironmentVariable];
|
||||||
+}
|
-
|
||||||
|
|
||||||
-const REMOTE_DATA_FOLDER = args['server-data-dir'] || process.env['VSCODE_AGENT_FOLDER'] || join(os.homedir(), product.serverDataFolderName || '.vscode-remote');
|
-const REMOTE_DATA_FOLDER = args['server-data-dir'] || process.env['VSCODE_AGENT_FOLDER'] || join(os.homedir(), product.serverDataFolderName || '.vscode-remote');
|
||||||
-const USER_DATA_PATH = join(REMOTE_DATA_FOLDER, 'data');
|
-const USER_DATA_PATH = join(REMOTE_DATA_FOLDER, 'data');
|
||||||
-const APP_SETTINGS_HOME = join(USER_DATA_PATH, 'User');
|
-const APP_SETTINGS_HOME = join(USER_DATA_PATH, 'User');
|
||||||
@@ -52,16 +51,20 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
|
|||||||
- }
|
- }
|
||||||
- } catch (err) { console.error(err); }
|
- } catch (err) { console.error(err); }
|
||||||
-});
|
-});
|
||||||
|
+function parse(): ServerParsedArgs {
|
||||||
|
+ return parseArgs(process.argv.slice(2), serverOptions, errorReporter);
|
||||||
|
+}
|
||||||
|
+
|
||||||
+function createDirs(args: ServerParsedArgs): string {
|
+function createDirs(args: ServerParsedArgs): string {
|
||||||
+ const REMOTE_DATA_FOLDER = args['server-data-dir'] || args['user-data-dir'] || process.env['VSCODE_AGENT_FOLDER'] || join(os.homedir(), product.serverDataFolderName || '.vscode-remote');
|
+ const REMOTE_DATA_FOLDER = args['server-data-dir'] || process.env['VSCODE_AGENT_FOLDER'] || join(os.homedir(), product.serverDataFolderName || '.vscode-remote');
|
||||||
+ const USER_DATA_PATH = args['user-data-dir'] || join(REMOTE_DATA_FOLDER, 'data');
|
+ const USER_DATA_PATH = join(REMOTE_DATA_FOLDER, 'data');
|
||||||
+ const APP_SETTINGS_HOME = join(USER_DATA_PATH, 'User');
|
+ const APP_SETTINGS_HOME = join(USER_DATA_PATH, 'User');
|
||||||
+ const GLOBAL_STORAGE_HOME = join(APP_SETTINGS_HOME, 'globalStorage');
|
+ const GLOBAL_STORAGE_HOME = join(APP_SETTINGS_HOME, 'globalStorage');
|
||||||
+ const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History');
|
+ const LOCAL_HISTORY_HOME = join(APP_SETTINGS_HOME, 'History');
|
||||||
+ const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine');
|
+ const MACHINE_SETTINGS_HOME = join(USER_DATA_PATH, 'Machine');
|
||||||
+ args['user-data-dir'] = USER_DATA_PATH;
|
+ args['user-data-dir'] = USER_DATA_PATH;
|
||||||
+ const APP_ROOT = dirname(FileAccess.asFileUri('').fsPath);
|
+ const APP_ROOT = dirname(FileAccess.asFileUri('').fsPath);
|
||||||
+ const BUILTIN_EXTENSIONS_FOLDER_PATH = args['builtin-extensions-dir'] || join(APP_ROOT, 'extensions');
|
+ const BUILTIN_EXTENSIONS_FOLDER_PATH = join(APP_ROOT, 'extensions');
|
||||||
+ args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH;
|
+ args['builtin-extensions-dir'] = BUILTIN_EXTENSIONS_FOLDER_PATH;
|
||||||
+ args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions');
|
+ args['extensions-dir'] = args['extensions-dir'] || join(REMOTE_DATA_FOLDER, 'extensions');
|
||||||
+
|
+
|
||||||
@@ -80,7 +83,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
|
|||||||
*/
|
*/
|
||||||
-export function spawnCli() {
|
-export function spawnCli() {
|
||||||
- runCli(args, REMOTE_DATA_FOLDER, serverOptions);
|
- runCli(args, REMOTE_DATA_FOLDER, serverOptions);
|
||||||
+function spawnCli(args = parse()): Promise<void> {
|
+function spawnCli(args = parse()) {
|
||||||
+ return runCli(args, createDirs(args), serverOptions);
|
+ return runCli(args, createDirs(args), serverOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,9 +91,11 @@ Index: code-server/lib/vscode/src/vs/server/node/server.main.ts
|
|||||||
* invoked by server-main.js
|
* invoked by server-main.js
|
||||||
*/
|
*/
|
||||||
-export function createServer(address: string | net.AddressInfo | null): Promise<IServerAPI> {
|
-export function createServer(address: string | net.AddressInfo | null): Promise<IServerAPI> {
|
||||||
- return doCreateServer(address, args, REMOTE_DATA_FOLDER);
|
- return doCreateServer(address, args, REMOTE_DATA_FOLDER, agentHostBridgeConnectionToken);
|
||||||
+function createServer(address: string | net.AddressInfo | null, args = parse()): Promise<IServerAPI> {
|
+function createServer(address: string | net.AddressInfo | null, args = parse()): Promise<IServerAPI> {
|
||||||
+ return doCreateServer(address, args, createDirs(args));
|
+ const agentHostBridgeConnectionToken = process.env[agentHostBridgeConnectionTokenEnvironmentVariable];
|
||||||
|
+ delete process.env[agentHostBridgeConnectionTokenEnvironmentVariable];
|
||||||
|
+ return doCreateServer(address, args, createDirs(args), agentHostBridgeConnectionToken);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+// The aliases prevent the names getting mangled during minification which would
|
+// The aliases prevent the names getting mangled during minification which would
|
||||||
@@ -209,8 +214,8 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html
|
|||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
<!-- Disable pinch zooming -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||||
@@ -26,8 +27,9 @@
|
@@ -28,8 +29,9 @@
|
||||||
<meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">
|
<meta id="vscode-workbench-css-modules" data-settings="{{WORKBENCH_DEV_CSS_MODULES}}">
|
||||||
|
|
||||||
<!-- Workbench Icon/Manifest/CSS -->
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
- <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
|
- <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
|
||||||
@@ -235,7 +240,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html
|
|||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
<!-- Disable pinch zooming -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||||
@@ -23,8 +24,9 @@
|
@@ -24,8 +25,9 @@
|
||||||
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
|
<meta id="vscode-workbench-auth-session" data-settings="{{WORKBENCH_AUTH_SESSION}}">
|
||||||
|
|
||||||
<!-- Workbench Icon/Manifest/CSS -->
|
<!-- Workbench Icon/Manifest/CSS -->
|
||||||
@@ -251,7 +256,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -349,6 +349,7 @@ export class WebClientServer {
|
@@ -394,6 +394,7 @@ export class WebClientServer {
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -375,6 +375,7 @@ export class WebClientServer {
|
@@ -420,6 +420,7 @@ export class WebClientServer {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: basePath,
|
serverBasePath: basePath,
|
||||||
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
webviewEndpoint: staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -18,6 +18,7 @@ import { ProtocolConstants } from '../..
|
@@ -34,6 +34,7 @@ export function getRedactedServerParsedA
|
||||||
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check': { type: 'boolean' },
|
'disable-update-check': { type: 'boolean' },
|
||||||
@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -112,6 +113,7 @@ export const serverOptions: OptionDescri
|
@@ -128,6 +129,7 @@ export const serverOptions: OptionDescri
|
||||||
export interface ServerParsedArgs {
|
export interface ServerParsedArgs {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check'?: boolean;
|
'disable-update-check'?: boolean;
|
||||||
@@ -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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -357,6 +357,7 @@ export class WebClientServer {
|
@@ -402,6 +402,7 @@ export class WebClientServer {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||||
|
|||||||
@@ -41,7 +41,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -342,7 +342,6 @@ export class WebClientServer {
|
@@ -387,7 +387,6 @@ export class WebClientServer {
|
||||||
|
|
||||||
const staticRoute = posix.join(basePath, this._productPath, STATIC_PATH);
|
const staticRoute = posix.join(basePath, this._productPath, STATIC_PATH);
|
||||||
const callbackRoute = posix.join(basePath, this._productPath, CALLBACK_PATH);
|
const callbackRoute = posix.join(basePath, this._productPath, CALLBACK_PATH);
|
||||||
@@ -49,7 +49,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
|
|
||||||
const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority });
|
const resolveWorkspaceURI = (defaultLocation?: string) => defaultLocation && URI.file(resolve(defaultLocation)).with({ scheme: Schemas.vscodeRemote, authority: remoteAuthority });
|
||||||
|
|
||||||
@@ -359,14 +358,7 @@ export class WebClientServer {
|
@@ -404,14 +403,7 @@ export class WebClientServer {
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
voiceWsUrl: this._productService.voiceWsUrl,
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
|
|||||||
@@ -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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -358,6 +358,7 @@ export class WebClientServer {
|
@@ -403,6 +403,7 @@ export class WebClientServer {
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : 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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -359,6 +359,10 @@ export class WebClientServer {
|
@@ -404,6 +404,10 @@ export class WebClientServer {
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? rootBase + '/update/check' : undefined,
|
||||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
|
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? rootBase + '/logout' : undefined,
|
||||||
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/',
|
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? rootBase + '/proxy/{{port}}/',
|
||||||
|
|||||||
@@ -126,7 +126,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -363,6 +363,8 @@ export class WebClientServer {
|
@@ -408,6 +408,8 @@ export class WebClientServer {
|
||||||
scope: vscodeBase + '/',
|
scope: vscodeBase + '/',
|
||||||
path: rootBase + '/_static/out/browser/serviceWorker.js',
|
path: rootBase + '/_static/out/browser/serviceWorker.js',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -23,6 +23,7 @@ export const serverOptions: OptionDescri
|
@@ -39,6 +39,7 @@ export const serverOptions: OptionDescri
|
||||||
'disable-file-uploads': { type: 'boolean' },
|
'disable-file-uploads': { type: 'boolean' },
|
||||||
'disable-getting-started-override': { type: 'boolean' },
|
'disable-getting-started-override': { type: 'boolean' },
|
||||||
'locale': { type: 'string' },
|
'locale': { type: 'string' },
|
||||||
@@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -122,6 +123,7 @@ export interface ServerParsedArgs {
|
@@ -138,6 +139,7 @@ export interface ServerParsedArgs {
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
'disable-getting-started-override'?: boolean,
|
'disable-getting-started-override'?: boolean,
|
||||||
'locale'?: string
|
'locale'?: string
|
||||||
@@ -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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -354,6 +354,14 @@ export class WebClientServer {
|
@@ -399,6 +399,14 @@ export class WebClientServer {
|
||||||
scopes: [['user:email'], ['repo']]
|
scopes: [['user:email'], ['repo']]
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
@@ -369,6 +377,7 @@ export class WebClientServer {
|
@@ -414,6 +422,7 @@ export class WebClientServer {
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
voiceWsUrl: this._productService.voiceWsUrl,
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
|
|||||||
@@ -113,7 +113,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -356,6 +356,7 @@ export class WebClientServer {
|
@@ -401,6 +401,7 @@ export class WebClientServer {
|
||||||
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
const productConfiguration: Partial<Mutable<IProductConfiguration>> = {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
@@ -125,8 +125,8 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
||||||
@@ -16,6 +16,8 @@ import { join } from '../../base/common/
|
@@ -32,6 +32,8 @@ export function getRedactedServerParsedA
|
||||||
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
}
|
||||||
|
|
||||||
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
export const serverOptions: OptionDescriptions<Required<ServerParsedArgs>> = {
|
||||||
+ /* ----- code-server ----- */
|
+ /* ----- code-server ----- */
|
||||||
@@ -134,7 +134,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -108,6 +110,8 @@ export const serverOptions: OptionDescri
|
@@ -124,6 +126,8 @@ export const serverOptions: OptionDescri
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ServerParsedArgs {
|
export interface ServerParsedArgs {
|
||||||
|
|||||||
@@ -41,7 +41,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.orig/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
@@ -371,6 +371,7 @@ export class WebClientServer {
|
@@ -416,6 +416,7 @@ export class WebClientServer {
|
||||||
const workbenchWebConfiguration = {
|
const workbenchWebConfiguration = {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: basePath,
|
serverBasePath: basePath,
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
|
|||||||
await codeServerPage.page.waitForSelector(`text=${fileName}`)
|
await codeServerPage.page.waitForSelector(`text=${fileName}`)
|
||||||
|
|
||||||
await codeServerPage.openFile(fileName)
|
await codeServerPage.openFile(fileName)
|
||||||
await codeServerPage.page.click(".tab")
|
|
||||||
await codeServerPage.navigateMenus(["File", "Auto Save"])
|
await codeServerPage.navigateMenus(["File", "Auto Save"])
|
||||||
await codeServerPage.page.keyboard.type("Making some edits.")
|
await codeServerPage.page.keyboard.type("Making some edits.")
|
||||||
await codeServerPage.navigateMenus(["File", "Save As..."])
|
await codeServerPage.navigateMenus(["File", "Save As..."])
|
||||||
@@ -85,8 +84,8 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
|
|||||||
// Action
|
// Action
|
||||||
await codeServerPage.page.waitForSelector(`text=${fileName}`)
|
await codeServerPage.page.waitForSelector(`text=${fileName}`)
|
||||||
await codeServerPage.openFile(fileName)
|
await codeServerPage.openFile(fileName)
|
||||||
await codeServerPage.page.click(".tab")
|
|
||||||
await codeServerPage.navigateMenus(["File", "Save As..."])
|
await codeServerPage.navigateMenus(["File", "Save As..."])
|
||||||
|
await codeServerPage.page.waitForSelector(".quick-input-widget")
|
||||||
await expect(codeServerPage.page.locator("text=Show Local")).not.toBeVisible()
|
await expect(codeServerPage.page.locator("text=Show Local")).not.toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user