Skip to content

Commit 910a7cd

Browse files
committed
chore(vscode): update to latest fork
1 parent 4805186 commit 910a7cd

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/common/util.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { ClientConfiguration } from "../node/http"
2+
13
/**
24
* Split a string up to the delimiter. If the delimiter doesn't exist the first
35
* item will have all the text and the second item will be an empty string.
@@ -53,7 +55,7 @@ export const resolveBase = (base?: string): string => {
5355
/**
5456
* Get client-side configuration embedded in the HTML or query params.
5557
*/
56-
export const getClientConfiguration = <T extends CodeServerLib.ClientConfiguration>(): T => {
58+
export const getClientConfiguration = <T extends ClientConfiguration>(): T => {
5759
let config: T
5860
try {
5961
config = JSON.parse(document.getElementById("coder-options")!.getAttribute("data-settings")!)

src/node/http.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ import { version as codeServerVersion } from "./constants"
1010
import { Heart } from "./heart"
1111
import { getPasswordMethod, IsCookieValidArgs, isCookieValid, sanitizeString, escapeHtml, escapeJSON } from "./util"
1212

13+
/**
14+
* Base options included on every page.
15+
*/
16+
export interface ClientConfiguration {
17+
codeServerVersion: string
18+
base: string
19+
csStaticBase: string
20+
}
21+
1322
declare global {
1423
// eslint-disable-next-line @typescript-eslint/no-namespace
1524
namespace Express {
@@ -20,7 +29,7 @@ declare global {
2029
}
2130
}
2231

23-
export const createClientConfiguration = (req: express.Request): CodeServerLib.ClientConfiguration => {
32+
export const createClientConfiguration = (req: express.Request): ClientConfiguration => {
2433
const base = relativeRoot(req)
2534

2635
return {
@@ -38,7 +47,7 @@ export const replaceTemplates = <T extends object>(
3847
content: string,
3948
extraOpts?: Omit<T, "base" | "csStaticBase" | "logLevel">,
4049
): string => {
41-
const serverOptions: CodeServerLib.ClientConfiguration = {
50+
const serverOptions: ClientConfiguration = {
4251
...createClientConfiguration(req),
4352
...extraOpts,
4453
}

vendor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"postinstall": "./postinstall.sh"
88
},
99
"devDependencies": {
10-
"code-oss-dev": "cdr/vscode#65b2462c212d415fbf521489307e58e5b691818b"
10+
"code-oss-dev": "cdr/vscode#f976a079199424818f88b70c7a061397d651d569"
1111
}
1212
}

vendor/yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ clone-response@^1.0.2:
296296
dependencies:
297297
mimic-response "^1.0.0"
298298

299-
code-oss-dev@cdr/vscode#65b2462c212d415fbf521489307e58e5b691818b:
299+
code-oss-dev@cdr/vscode#f976a079199424818f88b70c7a061397d651d569:
300300
version "1.60.2"
301-
resolved "https://codeload.github.com/cdr/vscode/tar.gz/65b2462c212d415fbf521489307e58e5b691818b"
301+
resolved "https://codeload.github.com/cdr/vscode/tar.gz/f976a079199424818f88b70c7a061397d651d569"
302302
dependencies:
303303
"@microsoft/applicationinsights-web" "^2.6.4"
304304
"@vscode/sqlite3" "4.0.12"

0 commit comments

Comments
 (0)