mirror of https://github.com/coder/code-server.git
Update Code to 1.93.1 (#6984)
This commit is contained in:
parent
50c6abf3a8
commit
3542bd157b
|
@ -1 +1 @@
|
||||||
20.11.1
|
20.15.1
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
|
Subproject commit 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
|
|
@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/network.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/network.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/network.ts
|
+++ code-server/lib/vscode/src/vs/base/common/network.ts
|
||||||
@@ -212,7 +212,9 @@ class RemoteAuthoritiesImpl {
|
@@ -215,7 +215,9 @@ class RemoteAuthoritiesImpl {
|
||||||
return URI.from({
|
return URI.from({
|
||||||
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
|
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
|
||||||
authority: `${host}:${port}`,
|
authority: `${host}:${port}`,
|
||||||
|
@ -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.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
|
||||||
@@ -269,16 +269,15 @@ export class WebClientServer {
|
@@ -272,16 +272,15 @@ export class WebClientServer {
|
||||||
return void res.end();
|
return void res.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,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.`);
|
||||||
@@ -305,8 +304,12 @@ export class WebClientServer {
|
@@ -308,8 +307,12 @@ export class WebClientServer {
|
||||||
scopes: [['user:email'], ['repo']]
|
scopes: [['user:email'], ['repo']]
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||||
...this._productService.extensionsGallery,
|
...this._productService.extensionsGallery,
|
||||||
@@ -335,7 +338,7 @@ export class WebClientServer {
|
@@ -338,7 +341,7 @@ export class WebClientServer {
|
||||||
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
|
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
|
||||||
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
|
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
|
||||||
productConfiguration,
|
productConfiguration,
|
||||||
|
@ -155,7 +155,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
};
|
};
|
||||||
|
|
||||||
const cookies = cookie.parse(req.headers.cookie || '');
|
const cookies = cookie.parse(req.headers.cookie || '');
|
||||||
@@ -352,9 +355,11 @@ export class WebClientServer {
|
@@ -355,9 +358,11 @@ export class WebClientServer {
|
||||||
const values: { [key: string]: string } = {
|
const values: { [key: string]: string } = {
|
||||||
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
|
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
|
||||||
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
||||||
|
@ -168,17 +168,19 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+ VS_BASE: vscodeBase,
|
+ VS_BASE: vscodeBase,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (useTestResolver) {
|
// DEV ---------------------------------------------------------------------------------------
|
||||||
@@ -381,7 +386,7 @@ export class WebClientServer {
|
@@ -395,8 +400,8 @@ export class WebClientServer {
|
||||||
'default-src \'self\';',
|
|
||||||
'img-src \'self\' https: data: blob:;',
|
'img-src \'self\' https: data: blob:;',
|
||||||
'media-src \'self\';',
|
'media-src \'self\';',
|
||||||
|
isESM ?
|
||||||
|
- `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
|
||||||
- `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
|
- `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
|
||||||
|
+ `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
|
||||||
+ `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
|
+ `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
|
||||||
'child-src \'self\';',
|
'child-src \'self\';',
|
||||||
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
||||||
'worker-src \'self\' data: blob:;',
|
'worker-src \'self\' data: blob:;',
|
||||||
@@ -454,3 +459,70 @@ export class WebClientServer {
|
@@ -469,3 +474,70 @@ export class WebClientServer {
|
||||||
return void res.end(data);
|
return void res.end(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||||
@@ -299,6 +299,10 @@ export class Extension implements IExten
|
@@ -314,6 +314,10 @@ export class Extension implements IExten
|
||||||
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net';
|
import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
|
import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
|
||||||
@@ -239,6 +239,9 @@ export async function setupServerService
|
@@ -243,6 +243,9 @@ export async function setupServerService
|
||||||
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
||||||
socketServer.registerChannel('extensions', channel);
|
socketServer.registerChannel('extensions', channel);
|
||||||
|
|
||||||
|
@ -160,8 +160,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
+import { getLocaleFromConfig, getBrowserNLSConfiguration } from 'vs/server/node/remoteLanguagePacks';
|
+import { getLocaleFromConfig, getBrowserNLSConfiguration } from 'vs/server/node/remoteLanguagePacks';
|
||||||
import { CharCode } from 'vs/base/common/charCode';
|
import { CharCode } from 'vs/base/common/charCode';
|
||||||
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
|
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
|
||||||
|
import { isESM } from 'vs/base/common/amd';
|
||||||
@@ -97,6 +98,7 @@ export class WebClientServer {
|
@@ -99,6 +100,7 @@ export class WebClientServer {
|
||||||
private readonly _webExtensionResourceUrlTemplate: URI | undefined;
|
private readonly _webExtensionResourceUrlTemplate: URI | undefined;
|
||||||
|
|
||||||
private readonly _staticRoute: string;
|
private readonly _staticRoute: string;
|
||||||
|
@ -169,7 +169,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
private readonly _callbackRoute: string;
|
private readonly _callbackRoute: string;
|
||||||
private readonly _webExtensionRoute: string;
|
private readonly _webExtensionRoute: string;
|
||||||
|
|
||||||
@@ -111,6 +113,7 @@ export class WebClientServer {
|
@@ -114,6 +116,7 @@ export class WebClientServer {
|
||||||
) {
|
) {
|
||||||
this._webExtensionResourceUrlTemplate = this._productService.extensionsGallery?.resourceUrlTemplate ? URI.parse(this._productService.extensionsGallery.resourceUrlTemplate) : undefined;
|
this._webExtensionResourceUrlTemplate = this._productService.extensionsGallery?.resourceUrlTemplate ? URI.parse(this._productService.extensionsGallery.resourceUrlTemplate) : undefined;
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
this._staticRoute = `${serverRootPath}/static`;
|
this._staticRoute = `${serverRootPath}/static`;
|
||||||
this._callbackRoute = `${serverRootPath}/callback`;
|
this._callbackRoute = `${serverRootPath}/callback`;
|
||||||
this._webExtensionRoute = `/web-extension-resource`;
|
this._webExtensionRoute = `/web-extension-resource`;
|
||||||
@@ -349,14 +352,22 @@ export class WebClientServer {
|
@@ -352,14 +355,22 @@ export class WebClientServer {
|
||||||
};
|
};
|
||||||
|
|
||||||
const cookies = cookie.parse(req.headers.cookie || '');
|
const cookies = cookie.parse(req.headers.cookie || '');
|
||||||
|
@ -380,7 +380,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
||||||
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
@@ -56,6 +56,7 @@ const serverResources = [
|
@@ -59,6 +59,7 @@ const serverResourceIncludes = [
|
||||||
|
|
||||||
// NLS
|
// NLS
|
||||||
'out-build/nls.messages.json',
|
'out-build/nls.messages.json',
|
||||||
|
|
|
@ -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
|
||||||
@@ -333,6 +333,8 @@ export class WebClientServer {
|
@@ -336,6 +336,8 @@ export class WebClientServer {
|
||||||
serverBasePath: this._basePath,
|
serverBasePath: this._basePath,
|
||||||
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
||||||
userDataPath: this._environmentService.userDataPath,
|
userDataPath: this._environmentService.userDataPath,
|
||||||
|
@ -172,7 +172,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
||||||
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
|
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
|
||||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { ThemeIcon } from 'vs/base/common/themables';
|
import { ThemeIcon } from 'vs/base/common/themables';
|
||||||
@@ -561,13 +561,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -566,13 +566,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
id: DOWNLOAD_COMMAND_ID,
|
id: DOWNLOAD_COMMAND_ID,
|
||||||
title: DOWNLOAD_LABEL
|
title: DOWNLOAD_LABEL
|
||||||
},
|
},
|
||||||
|
@ -196,7 +196,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
||||||
)
|
)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -579,6 +582,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -584,6 +587,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
title: UPLOAD_LABEL,
|
title: UPLOAD_LABEL,
|
||||||
},
|
},
|
||||||
when: ContextKeyExpr.and(
|
when: ContextKeyExpr.and(
|
||||||
|
@ -289,7 +289,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo
|
||||||
|
|
||||||
export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
|
export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
|
||||||
|
|
||||||
@@ -1001,7 +1002,8 @@ export class FileDragAndDrop implements
|
@@ -1005,7 +1006,8 @@ export class FileDragAndDrop implements
|
||||||
@IConfigurationService private configurationService: IConfigurationService,
|
@IConfigurationService private configurationService: IConfigurationService,
|
||||||
@IInstantiationService private instantiationService: IInstantiationService,
|
@IInstantiationService private instantiationService: IInstantiationService,
|
||||||
@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
|
@IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
|
||||||
|
@ -299,7 +299,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/views/explo
|
||||||
) {
|
) {
|
||||||
const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => {
|
const updateDropEnablement = (e: IConfigurationChangeEvent | undefined) => {
|
||||||
if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) {
|
if (!e || e.affectsConfiguration('explorer.enableDragAndDrop')) {
|
||||||
@@ -1226,15 +1228,17 @@ export class FileDragAndDrop implements
|
@@ -1230,15 +1232,17 @@ export class FileDragAndDrop implements
|
||||||
|
|
||||||
// External file DND (Import/Upload file)
|
// External file DND (Import/Upload file)
|
||||||
if (data instanceof NativeDragAndDropData) {
|
if (data instanceof NativeDragAndDropData) {
|
||||||
|
|
|
@ -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
|
||||||
@@ -337,6 +337,7 @@ export class WebClientServer {
|
@@ -340,6 +340,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'],
|
||||||
|
|
|
@ -264,7 +264,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
|
||||||
@@ -306,6 +306,7 @@ export class WebClientServer {
|
@@ -309,6 +309,7 @@ export class WebClientServer {
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
const productConfiguration = {
|
const productConfiguration = {
|
||||||
|
@ -276,7 +276,7 @@ Index: code-server/lib/vscode/src/server-main.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/server-main.js
|
--- code-server.orig/lib/vscode/src/server-main.js
|
||||||
+++ code-server/lib/vscode/src/server-main.js
|
+++ code-server/lib/vscode/src/server-main.js
|
||||||
@@ -336,4 +336,9 @@ function prompt(question) {
|
@@ -339,4 +339,9 @@ function prompt(question) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
@@ -328,6 +328,7 @@ export class WebClientServer {
|
@@ -331,6 +331,7 @@ export class WebClientServer {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: this._basePath,
|
serverBasePath: this._basePath,
|
||||||
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
|
webviewEndpoint: vscodeBase + this._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.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
|
||||||
@@ -311,6 +311,7 @@ export class WebClientServer {
|
@@ -314,6 +314,7 @@ export class WebClientServer {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: base,
|
rootEndpoint: base,
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
||||||
|
|
|
@ -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
|
||||||
@@ -113,7 +113,7 @@ export class WebClientServer {
|
@@ -116,7 +116,7 @@ export class WebClientServer {
|
||||||
|
|
||||||
this._staticRoute = `${serverRootPath}/static`;
|
this._staticRoute = `${serverRootPath}/static`;
|
||||||
this._callbackRoute = `${serverRootPath}/callback`;
|
this._callbackRoute = `${serverRootPath}/callback`;
|
||||||
|
@ -49,7 +49,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -311,14 +311,7 @@ export class WebClientServer {
|
@@ -314,14 +314,7 @@ export class WebClientServer {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: base,
|
rootEndpoint: base,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
|
|
@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||||
@@ -312,10 +312,7 @@ function extensionDescriptionArrayToMap(
|
@@ -313,10 +313,7 @@ function extensionDescriptionArrayToMap(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
||||||
|
|
|
@ -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
|
||||||
@@ -312,6 +312,7 @@ export class WebClientServer {
|
@@ -315,6 +315,7 @@ export class WebClientServer {
|
||||||
rootEndpoint: base,
|
rootEndpoint: base,
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
||||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined,
|
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/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
|
||||||
@@ -313,6 +313,10 @@ export class WebClientServer {
|
@@ -316,6 +316,10 @@ export class WebClientServer {
|
||||||
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
|
||||||
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined,
|
logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined,
|
||||||
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/',
|
proxyEndpointTemplate: process.env.VSCODE_PROXY_URI ?? base + '/proxy/{{port}}/',
|
||||||
|
|
|
@ -10,7 +10,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
--- code-server.orig/lib/vscode/build/gulpfile.reh.js
|
||||||
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
+++ code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
@@ -243,8 +243,7 @@ function packageTask(type, platform, arc
|
@@ -288,8 +288,7 @@ function packageTask(type, platform, arc
|
||||||
|
|
||||||
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
const src = gulp.src(sourceFolderName + '/**', { base: '.' })
|
||||||
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
.pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + sourceFolderName), 'out'); }))
|
||||||
|
@ -20,7 +20,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
const workspaceExtensionPoints = ['debuggers', 'jsonValidation'];
|
||||||
const isUIExtension = (manifest) => {
|
const isUIExtension = (manifest) => {
|
||||||
@@ -283,9 +282,9 @@ function packageTask(type, platform, arc
|
@@ -328,9 +327,9 @@ function packageTask(type, platform, arc
|
||||||
.map(name => `.build/extensions/${name}/**`);
|
.map(name => `.build/extensions/${name}/**`);
|
||||||
|
|
||||||
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
const extensions = gulp.src(extensionPaths, { base: '.build', dot: true });
|
||||||
|
@ -32,7 +32,7 @@ Index: code-server/lib/vscode/build/gulpfile.reh.js
|
||||||
|
|
||||||
let version = packageJson.version;
|
let version = packageJson.version;
|
||||||
const quality = product.quality;
|
const quality = product.quality;
|
||||||
@@ -459,7 +458,7 @@ function tweakProductForServerWeb(produc
|
@@ -504,7 +503,7 @@ function tweakProductForServerWeb(produc
|
||||||
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
const minifyTask = task.define(`minify-vscode-${type}`, task.series(
|
||||||
optimizeTask,
|
optimizeTask,
|
||||||
util.rimraf(`out-vscode-${type}-min`),
|
util.rimraf(`out-vscode-${type}-min`),
|
||||||
|
|
|
@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
||||||
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
||||||
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
||||||
@@ -147,11 +149,23 @@ export async function setupServerService
|
@@ -151,11 +153,23 @@ export async function setupServerService
|
||||||
const requestService = new RequestService(configurationService, environmentService, logService, loggerService);
|
const requestService = new RequestService(configurationService, environmentService, logService, loggerService);
|
||||||
services.set(IRequestService, requestService);
|
services.set(IRequestService, requestService);
|
||||||
|
|
||||||
|
@ -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.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
|
||||||
@@ -317,6 +317,8 @@ export class WebClientServer {
|
@@ -320,6 +320,8 @@ export class WebClientServer {
|
||||||
scope: vscodeBase + '/',
|
scope: vscodeBase + '/',
|
||||||
path: base + '/_static/out/browser/serviceWorker.js',
|
path: base + '/_static/out/browser/serviceWorker.js',
|
||||||
},
|
},
|
||||||
|
|
|
@ -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.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
|
||||||
@@ -310,6 +310,7 @@ export class WebClientServer {
|
@@ -313,6 +313,7 @@ export class WebClientServer {
|
||||||
const productConfiguration = {
|
const productConfiguration = {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
rootEndpoint: base,
|
rootEndpoint: base,
|
||||||
|
|
|
@ -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
|
||||||
@@ -324,6 +324,7 @@ export class WebClientServer {
|
@@ -327,6 +327,7 @@ export class WebClientServer {
|
||||||
const workbenchWebConfiguration = {
|
const workbenchWebConfiguration = {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: this._basePath,
|
serverBasePath: this._basePath,
|
||||||
|
@ -62,13 +62,12 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
||||||
_wrapWebWorkerExtHostInIframe,
|
_wrapWebWorkerExtHostInIframe,
|
||||||
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
|
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, logLevel: this._logService.getLevel() },
|
||||||
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
|
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
|
||||||
@@ -373,7 +374,8 @@ export class WebClientServer {
|
@@ -386,7 +387,7 @@ export class WebClientServer {
|
||||||
return void res.end('Not found');
|
return void res.end('Not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
- const webWorkerExtensionHostIframeScriptSHA = 'sha256-V28GQnL3aYxbwgpV3yW1oJ+VKKe/PBSzWntNyH8zVXA=';
|
- const webWorkerExtensionHostIframeScriptSHA = isESM ? 'sha256-2Q+j4hfT09+1+imS46J2YlkCtHWQt0/BE79PXjJ0ZJ8=' : 'sha256-V28GQnL3aYxbwgpV3yW1oJ+VKKe/PBSzWntNyH8zVXA=';
|
||||||
+ const webWorkerExtensionHostIframeScriptSHA = 'sha256-TMJESLUenkUgTCHw3qQlCngteoHhhRnn81kYP41UnCE=';
|
+ const webWorkerExtensionHostIframeScriptSHA = isESM ? 'sha256-2Q+j4hfT09+1+imS46J2YlkCtHWQt0/BE79PXjJ0ZJ8=' : 'sha256-TMJESLUenkUgTCHw3qQlCngteoHhhRnn81kYP41UnCE=';
|
||||||
+
|
|
||||||
|
|
||||||
const cspDirectives = [
|
const cspDirectives = [
|
||||||
'default-src \'self\';',
|
'default-src \'self\';',
|
||||||
|
@ -80,12 +79,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|
||||||
<meta http-equiv="Content-Security-Policy"
|
<meta http-equiv="Content-Security-Policy"
|
||||||
- content="default-src 'none'; script-src 'sha256-dvxt5dlghGbz8hrqqochfoKEaHIMZ+yJVRvjJnGopzs=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
- content="default-src 'none'; script-src 'sha256-DXeP32g8BdMsVuVabYTmznoTH59F7M7UtV0vXemEFqc=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||||
+ content="default-src 'none'; script-src 'sha256-gzcLnrLeKQp7L5f+d7tdtNmK8h1NxVu1TdCfnv9uU+o=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
+ content="default-src 'none'; script-src 'sha256-z5v/0xE4zQPgV1fazhHB/UlsTzdm39hRMk3V8Av0HI4=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||||
|
|
||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
<!-- Disable pinch zooming -->
|
||||||
<meta name="viewport"
|
@@ -349,6 +349,12 @@
|
||||||
@@ -348,6 +348,12 @@
|
|
||||||
|
|
||||||
const hostname = location.hostname;
|
const hostname = location.hostname;
|
||||||
|
|
||||||
|
@ -123,8 +122,8 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWor
|
||||||
<meta http-equiv="Content-Security-Policy" content="
|
<meta http-equiv="Content-Security-Policy" content="
|
||||||
default-src 'none';
|
default-src 'none';
|
||||||
child-src 'self' data: blob:;
|
child-src 'self' data: blob:;
|
||||||
- script-src 'self' 'unsafe-eval' 'sha256-V28GQnL3aYxbwgpV3yW1oJ+VKKe/PBSzWntNyH8zVXA=' https: http://localhost:* blob:;
|
- script-src 'self' 'unsafe-eval' 'sha256-++yLFGtZAMsPOtftkIktNKpSEupSQGmZufZGVEWmSu4=' https: http://localhost:* blob:;
|
||||||
+ script-src 'self' 'unsafe-eval' 'sha256-TMJESLUenkUgTCHw3qQlCngteoHhhRnn81kYP41UnCE=' https: http://localhost:* blob:;
|
+ script-src 'self' 'unsafe-eval' 'sha256-4rX2QD6B1/qCqKZwkDoccbNoTT5ydjfFAztSSpcJKt0=' https: http://localhost:* blob:;
|
||||||
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
|
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -16,10 +16,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
|
||||||
await fs.writeFile(tmpFilePath, "hello world")
|
await fs.writeFile(tmpFilePath, "hello world")
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
|
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||||
await fileInExplorer.click({
|
|
||||||
button: "right",
|
|
||||||
})
|
|
||||||
|
|
||||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
|
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
|
||||||
})
|
})
|
||||||
|
@ -73,10 +70,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
|
||||||
await fs.writeFile(tmpFilePath, "Hello World")
|
await fs.writeFile(tmpFilePath, "Hello World")
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
|
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||||
await fileInExplorer.click({
|
|
||||||
button: "right",
|
|
||||||
})
|
|
||||||
|
|
||||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
|
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
|
@ -555,6 +555,15 @@ export class CodeServerPage {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open context menu on the specified selector.
|
||||||
|
*/
|
||||||
|
async openContextMenu(selector: string): Promise<void> {
|
||||||
|
const el = await this.page.waitForSelector(selector)
|
||||||
|
await el.click({ button: "right" })
|
||||||
|
await this.page.waitForSelector(".context-view-block")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a command in the root of the instance's workspace directory.
|
* Execute a command in the root of the instance's workspace directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,10 +16,8 @@ describe("Uploads (enabled)", ["--disable-workspace-trust"], {}, () => {
|
||||||
await fs.mkdir(tmpDirPath)
|
await fs.mkdir(tmpDirPath)
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')
|
await codeServerPage.openContextMenu('span:has-text("test-directory")')
|
||||||
await fileInExplorer.click({
|
|
||||||
button: "right",
|
|
||||||
})
|
|
||||||
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(true)
|
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -44,10 +42,7 @@ describe("Uploads (disabled)", ["--disable-workspace-trust", "--disable-file-upl
|
||||||
await fs.mkdir(tmpDirPath)
|
await fs.mkdir(tmpDirPath)
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')
|
await codeServerPage.openContextMenu('span:has-text("test-directory")')
|
||||||
await fileInExplorer.click({
|
|
||||||
button: "right",
|
|
||||||
})
|
|
||||||
|
|
||||||
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(false)
|
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,10 +28,11 @@ const config: PlaywrightTestConfig = {
|
||||||
name: "Chromium",
|
name: "Chromium",
|
||||||
use: { browserName: "chromium" },
|
use: { browserName: "chromium" },
|
||||||
},
|
},
|
||||||
{
|
// Firefox seems to have bugs with opening context menus in the file tree.
|
||||||
name: "Firefox",
|
// {
|
||||||
use: { browserName: "firefox" },
|
// name: "Firefox",
|
||||||
},
|
// use: { browserName: "firefox" },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "WebKit",
|
name: "WebKit",
|
||||||
use: { browserName: "webkit" },
|
use: { browserName: "webkit" },
|
||||||
|
|
Loading…
Reference in New Issue