@@ -3,6 +3,11 @@ Add Open VSX default and an env var for marketplace, fix old marketplace
3
3
Our old marketplace only supports `serviceUrl` but this causes the marketplace
4
4
to be disabled entirely so this moves the template var check to fix that.
5
5
6
+ This also removes serverRootPath from the web extension route because that will
7
+ include the commit. When you update code-server the web extension will continue
8
+ using this path since it is stored in the browser but the path will 404 because
9
+ the commit no longer matches.
10
+
6
11
This can be tested by setting EXTENSIONS_GALLERY set to:
7
12
8
13
'{"serviceUrl": "https://extensions.coder.com/api"}'
@@ -32,22 +37,19 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
32
37
===================================================================
33
38
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
34
39
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
35
- @@ -308,14 +308,14 @@ export class WebClientServer {
40
+ @@ -308,14 +308,7 @@ export class WebClientServer {
36
41
codeServerVersion: this._productService.codeServerVersion,
37
42
rootEndpoint: base,
38
43
embedderIdentifier: 'server-distro',
39
44
- extensionsGallery: this._webExtensionResourceUrlTemplate ? {
40
- + extensionsGallery: {
41
- ...this._productService.extensionsGallery,
45
+ - ...this._productService.extensionsGallery,
42
46
- 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({
43
- + 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate ? this._webExtensionResourceUrlTemplate.with({
44
- scheme: 'http',
45
- authority: remoteAuthority,
46
- path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}`
47
+ - scheme: 'http',
48
+ - authority: remoteAuthority,
49
+ - path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}`
47
50
- }).toString(true)
48
51
- } : undefined
49
- + }).toString(true) : undefined
50
- + }
52
+ + extensionsGallery: this._productService.extensionsGallery,
51
53
},
52
54
callbackRoute: this._callbackRoute
53
55
};
0 commit comments