Skip to content

Commit 320559f

Browse files
authored
Merge branch 'main' into main
2 parents 9b2c85b + a6fad66 commit 320559f

File tree

8 files changed

+25
-17
lines changed

8 files changed

+25
-17
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ jobs:
188188
run: npm run test:unit
189189

190190
- name: Upload coverage report to Codecov
191-
uses: codecov/codecov-action@v4
191+
uses: codecov/codecov-action@v5
192192
with:
193193
token: ${{ secrets.CODECOV_TOKEN }}
194194
if: success()

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- run: npm run test:integration
7272

7373
- name: Upload coverage report to Codecov
74-
uses: codecov/codecov-action@v4
74+
uses: codecov/codecov-action@v5
7575
with:
7676
token: ${{ secrets.CODECOV_TOKEN }}
7777
if: success()

.github/workflows/security.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
fetch-depth: 0
5252

5353
- name: Run Trivy vulnerability scanner in repo mode
54-
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
54+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0
5555
with:
5656
scan-type: "fs"
5757
scan-ref: "."

.github/workflows/trivy-docker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v4
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
54+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

docs/guide.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ should see OSSStatus: 9836 in the browser console.
271271
If you want to use external authentication mechanism (e.g., Sign in with
272272
Google), you can do this with a reverse proxy such as:
273273

274-
- [Pomerium](https://www.pomerium.io/guides/code-server.html)
275-
- [oauth2_proxy](https://github.com/pusher/oauth2_proxy)
276-
- [Cloudflare Access](https://teams.cloudflare.com/access)
274+
- [Pomerium](https://www.pomerium.com/docs/guides/code-server.html)
275+
- [oauth2-proxy](https://oauth2-proxy.github.io/oauth2-proxy/)
276+
- [Cloudflare Access](https://www.cloudflare.com/zero-trust/products/access/)
277277

278278
## HTTPS and self-signed certificates
279279

package-lock.json

+6-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node/main.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { commit, version, vsRootPath } from "./constants"
99
import { register } from "./routes"
1010
import { VSCodeModule } from "./routes/vscode"
1111
import { isDirectory, open } from "./util"
12+
import * as os from "os"
1213

1314
/**
1415
* Return true if the user passed an extension-related VS Code flag.
@@ -51,7 +52,11 @@ export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
5152
try {
5253
// See vscode.loadVSCode for more on this jank.
5354
process.env.CODE_SERVER_PARENT_PID = process.pid.toString()
54-
const modPath = path.join(vsRootPath, "out/server-main.js")
55+
let modPath = path.join(vsRootPath, "out/server-main.js")
56+
if (os.platform() === "win32") {
57+
// On Windows, absolute paths of ESM modules must be a valid file URI.
58+
modPath = "file:///" + modPath.replace(/\\/g, "/")
59+
}
5560
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
5661
const serverModule = await mod.loadCodeWithNls()
5762
await serverModule.spawnCli(await toCodeArgs(args))

src/node/routes/vscode.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { promises as fs } from "fs"
55
import * as http from "http"
66
import * as net from "net"
77
import * as path from "path"
8+
import * as os from "os"
89
import { WebsocketRequest } from "../../../typings/pluginapi"
910
import { logError } from "../../common/util"
1011
import { CodeArgs, toCodeArgs } from "../cli"
@@ -58,7 +59,11 @@ async function loadVSCode(req: express.Request): Promise<IVSCodeServerAPI> {
5859
// which will also require that we switch to ESM, since a hybrid approach
5960
// breaks importing `rotating-file-stream` for some reason. To work around
6061
// this, use `eval` for now, but we should consider switching to ESM.
61-
const modPath = path.join(vsRootPath, "out/server-main.js")
62+
let modPath = path.join(vsRootPath, "out/server-main.js")
63+
if (os.platform() === "win32") {
64+
// On Windows, absolute paths of ESM modules must be a valid file URI.
65+
modPath = "file:///" + modPath.replace(/\\/g, "/")
66+
}
6267
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
6368
const serverModule = await mod.loadCodeWithNls()
6469
return serverModule.createServer(null, {

0 commit comments

Comments
 (0)