mirror of
https://github.com/coder/code-server.git
synced 2026-09-09 11:27:24 +02:00
Compare commits
27 Commits
v4.134.0
...
update/1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a29914d973 | ||
|
|
8ab0bec5f3 | ||
|
|
8604302ded | ||
|
|
9219c40229 | ||
|
|
ca7a314339 | ||
|
|
0bb6a31fb0 | ||
|
|
0e439cb9dc | ||
|
|
75d7e662b4 | ||
|
|
716a4eedbe | ||
|
|
577da3111f | ||
|
|
8f2983bab5 | ||
|
|
6f23ab892b | ||
|
|
76f7789303 | ||
|
|
9d72dceac6 | ||
|
|
53692fd9fd | ||
|
|
f1dde9b093 | ||
|
|
8c8476eb76 | ||
|
|
322f065cf0 | ||
|
|
8d5f383f30 | ||
|
|
c9b1fa2e16 | ||
|
|
00672a5522 | ||
|
|
62284ed549 | ||
|
|
11699e6cd7 | ||
|
|
2b2f8b3d5c | ||
|
|
de89acbcdc | ||
|
|
e08e907889 | ||
|
|
92f44d9c7b |
2
.github/dependabot.yaml
vendored
2
.github/dependabot.yaml
vendored
@@ -9,8 +9,6 @@ updates:
|
|||||||
cooldown:
|
cooldown:
|
||||||
default-days: 7
|
default-days: 7
|
||||||
labels: []
|
labels: []
|
||||||
commit-message:
|
|
||||||
prefix: "chore"
|
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
|
|||||||
66
.github/semantic.yaml
vendored
66
.github/semantic.yaml
vendored
@@ -1,66 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# This file configures "Semantic Pull Requests", which is documented here:
|
|
||||||
# https://github.com/zeke/semantic-pull-requests
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# Scopes are optionally supplied after a 'type'. For example, in
|
|
||||||
#
|
|
||||||
# feat(docs): autostart ui
|
|
||||||
#
|
|
||||||
# '(docs)' is the scope. Scopes are used to signify where the change occurred.
|
|
||||||
scopes:
|
|
||||||
# docs: changes to the code-server documentation.
|
|
||||||
- docs
|
|
||||||
|
|
||||||
# vendor: changes to vendored dependencies.
|
|
||||||
- vendor
|
|
||||||
|
|
||||||
# deps: changes to code-server's dependencies.
|
|
||||||
- deps
|
|
||||||
|
|
||||||
# cs: changes to code specific to code-server.
|
|
||||||
- cs
|
|
||||||
|
|
||||||
# cli: changes to the command-line interface.
|
|
||||||
- cli
|
|
||||||
|
|
||||||
# We only check that the PR title is semantic. The PR title is automatically
|
|
||||||
# applied to the "Squash & Merge" flow as the suggested commit message, so this
|
|
||||||
# should suffice unless someone drastically alters the message in that flow.
|
|
||||||
titleOnly: true
|
|
||||||
|
|
||||||
# Types are the 'tag' types in a commit or PR title. For example, in
|
|
||||||
#
|
|
||||||
# chore: fix thing
|
|
||||||
#
|
|
||||||
# 'chore' is the type.
|
|
||||||
types:
|
|
||||||
# A build of any kind.
|
|
||||||
- build
|
|
||||||
|
|
||||||
# A user-facing change that corrects a defect in code-server.
|
|
||||||
- fix
|
|
||||||
|
|
||||||
# Any code task that is ignored for changelog purposes. Examples include
|
|
||||||
# devbin scripts and internal-only configurations.
|
|
||||||
- chore
|
|
||||||
|
|
||||||
# Any work performed on CI.
|
|
||||||
- ci
|
|
||||||
|
|
||||||
# Work that directly implements or supports the implementation of a feature.
|
|
||||||
- feat
|
|
||||||
|
|
||||||
# A refactor changes code structure without any behavioral change.
|
|
||||||
- refactor
|
|
||||||
|
|
||||||
# A git revert for any style of commit.
|
|
||||||
- revert
|
|
||||||
|
|
||||||
# Adding tests of any kind. Should be separate from feature or fix
|
|
||||||
# implementations. For example, if a commit adds a fix + test, it's a fix
|
|
||||||
# commit. If a commit is simply bumping coverage, it's a test commit.
|
|
||||||
- test
|
|
||||||
|
|
||||||
# A new release.
|
|
||||||
- release
|
|
||||||
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@@ -101,7 +101,7 @@ jobs:
|
|||||||
name: Lint TypeScript files
|
name: Lint TypeScript files
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.code == 'true'
|
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.ci == 'true' || needs.changes.outputs.npm == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
|
||||||
|
|||||||
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@@ -83,7 +83,7 @@ jobs:
|
|||||||
git push --force
|
git push --force
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: heyhusen/archlinux-package-action@c9f94059ccbebe8710d31d582f33ef4e84fe575c # v3.0.0
|
uses: heyhusen/archlinux-package-action@3f7aaada28c782497bfe02d6d6ea365b25fdea12 # v3.0.1
|
||||||
with:
|
with:
|
||||||
pkgver: ${{ env.VERSION }}
|
pkgver: ${{ env.VERSION }}
|
||||||
updpkgsums: true
|
updpkgsums: true
|
||||||
@@ -109,7 +109,7 @@ jobs:
|
|||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
- uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
|
||||||
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||||
|
|
||||||
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
|
|||||||
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@@ -110,7 +110,7 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
sed "/^## Unreleased/,/^## / ! d" CHANGELOG.md | head -n -2 | tail -n +3 > .cache/release-notes
|
sed "/^## Unreleased/,/^## / ! d" CHANGELOG.md | head -n -2 | tail -n +3 > .cache/release-notes
|
||||||
if: ${{ matrix.vscode_arch == 'x64' }}
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
||||||
if: ${{ matrix.vscode_arch == 'x64' }}
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
# Platform-specific release.
|
# Platform-specific release.
|
||||||
- run: KEEP_MODULES=1 npm run release
|
- run: KEEP_MODULES=1 npm run release
|
||||||
- run: npm run package
|
- run: npm run package
|
||||||
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
@@ -189,7 +189,7 @@ jobs:
|
|||||||
- run: npm run test:native
|
- run: npm run test:native
|
||||||
|
|
||||||
- run: npm run package
|
- run: npm run package
|
||||||
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
|
|||||||
4
.github/workflows/security.yaml
vendored
4
.github/workflows/security.yaml
vendored
@@ -80,13 +80,13 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
|
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||||
with:
|
with:
|
||||||
config-file: ./.github/codeql-config.yml
|
config-file: ./.github/codeql-config.yml
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
|
uses: github/codeql-action/autobuild@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
|
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
|
||||||
|
|||||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -22,6 +22,35 @@ Code v99.99.999
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
Code v1.136.2
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.136.2
|
||||||
|
|
||||||
|
## [4.136.2](https://github.com/coder/code-server/releases/tag/v4.136.2) - 2026-09-08
|
||||||
|
|
||||||
|
Code v1.136.1
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.136.1
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 4.136.2 replaces a removed 4.136.1 release that had the data path incorrectly
|
||||||
|
being set to `~/.vscode-server-oss/data`.
|
||||||
|
|
||||||
|
## [4.135.0](https://github.com/coder/code-server/releases/tag/v4.135.0) - 2026-08-27
|
||||||
|
|
||||||
|
Code v1.135.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.135.0
|
||||||
|
|
||||||
|
## [4.134.0](https://github.com/coder/code-server/releases/tag/v4.134.0) - 2026-08-24
|
||||||
|
|
||||||
Code v1.134.0
|
Code v1.134.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@@ -32,8 +61,8 @@ Code v1.134.0
|
|||||||
to VS Code. It requires `flag=value` or simply `flag` for booleans. For
|
to VS Code. It requires `flag=value` or simply `flag` for booleans. For
|
||||||
example: `--vscode-option enable-sandbox --vscode-option agents=true`. The
|
example: `--vscode-option enable-sandbox --vscode-option agents=true`. The
|
||||||
`VSCODE_OPTIONS` environment variable may also be used. For example:
|
`VSCODE_OPTIONS` environment variable may also be used. For example:
|
||||||
`VSCODE_OPTIONS="enable-sandbox agents=true"`. Note that this code-server
|
`VSCODE_OPTIONS="enable-sandbox agents=true"`. Note that code-server simply
|
||||||
simply splits this variable on spaces and is not aware of quoting.
|
splits this variable on spaces and is not aware of quoting.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ main() {
|
|||||||
|
|
||||||
release_archive() {
|
release_archive() {
|
||||||
local release_name="code-server-$VERSION-$OS-$ARCH"
|
local release_name="code-server-$VERSION-$OS-$ARCH"
|
||||||
if [[ $OS == "linux" ]]; then
|
if [[ $OS == "linux" || $OS == "windows" ]]; then
|
||||||
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
||||||
else
|
else
|
||||||
tar -czf "release-packages/$release_name.tar.gz" -s "/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
tar -czf "release-packages/$release_name.tar.gz" -s "/^$RELEASE_PATH/$release_name/" "$RELEASE_PATH"
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ main() {
|
|||||||
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
||||||
chmod 755 "$RELEASE_PATH/bin/code-server"
|
chmod 755 "$RELEASE_PATH/bin/code-server"
|
||||||
|
|
||||||
|
# Windows cannot run the shell launcher, so it gets one of its own.
|
||||||
|
if [ "$OS" = windows ]; then
|
||||||
|
rsync ./ci/build/code-server.cmd "$RELEASE_PATH/bin/code-server.cmd"
|
||||||
|
fi
|
||||||
|
|
||||||
# Delete the extra bin scripts.
|
# Delete the extra bin scripts.
|
||||||
rm "$RELEASE_PATH/lib/vscode/bin/remote-cli/code-darwin.sh"
|
rm "$RELEASE_PATH/lib/vscode/bin/remote-cli/code-darwin.sh"
|
||||||
rm "$RELEASE_PATH/lib/vscode/bin/remote-cli/code-linux.sh"
|
rm "$RELEASE_PATH/lib/vscode/bin/remote-cli/code-linux.sh"
|
||||||
@@ -111,6 +116,7 @@ bundle_vscode() {
|
|||||||
|
|
||||||
# Exclude Node since we want to place it in a directory above.
|
# Exclude Node since we want to place it in a directory above.
|
||||||
rsync_opts+=(--exclude /node)
|
rsync_opts+=(--exclude /node)
|
||||||
|
rsync_opts+=(--exclude /node.exe)
|
||||||
|
|
||||||
# Exclude Node modules. Note that these will already only include production
|
# Exclude Node modules. Note that these will already only include production
|
||||||
# dependencies, so if we do keep them there is no need to do any
|
# dependencies, so if we do keep them there is no need to do any
|
||||||
@@ -123,8 +129,12 @@ bundle_vscode() {
|
|||||||
|
|
||||||
# Copy the Node binary.
|
# Copy the Node binary.
|
||||||
if [[ $KEEP_MODULES = 1 ]]; then
|
if [[ $KEEP_MODULES = 1 ]]; then
|
||||||
|
if [ "$OS" = windows ]; then
|
||||||
|
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node.exe" "$RELEASE_PATH/lib"
|
||||||
|
else
|
||||||
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
|
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Merge the package.json for the web/remote server so we can include
|
# Merge the package.json for the web/remote server so we can include
|
||||||
# dependencies, since we want to ship this via NPM.
|
# dependencies, since we want to ship this via NPM.
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ fix-bin-script() {
|
|||||||
# Fix Node path on Windows.
|
# Fix Node path on Windows.
|
||||||
sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$script"
|
sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$script"
|
||||||
sed -i.bak 's/%ROOT_DIR%\\out/%VSROOT_DIR%\\out/g' "$script"
|
sed -i.bak 's/%ROOT_DIR%\\out/%VSROOT_DIR%\\out/g' "$script"
|
||||||
|
sed -i.bak 's/%ROOT_DIR%\\node.exe/%ROOT_DIR%\\lib\\node.exe/g' "$script"
|
||||||
|
|
||||||
chmod +x "$script"
|
chmod +x "$script"
|
||||||
rm "$script.bak"
|
rm "$script.bak"
|
||||||
@@ -132,7 +133,7 @@ EOF
|
|||||||
# Set vars and fix paths.
|
# Set vars and fix paths.
|
||||||
case $OS in
|
case $OS in
|
||||||
windows)
|
windows)
|
||||||
fix-bin-script remote-cli/code.cmd
|
fix-bin-script remote-cli/code-server.cmd
|
||||||
fix-bin-script helpers/browser.cmd
|
fix-bin-script helpers/browser.cmd
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
8
ci/build/code-server.cmd
Normal file
8
ci/build/code-server.cmd
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
rem This script is intended to be bundled into the standalone releases.
|
||||||
|
rem Runs code-server with the bundled node binary.
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
set "ROOT=%~dp0.."
|
||||||
|
"%ROOT%\lib\node.exe" "%ROOT%" %*
|
||||||
@@ -18,7 +18,7 @@ symlink() {
|
|||||||
dest="$2"
|
dest="$2"
|
||||||
rm -rf "$dest"
|
rm -rf "$dest"
|
||||||
case $OS in
|
case $OS in
|
||||||
windows) mklink /J "$dest" "$source" ;;
|
windows) cmd //c mklink //J "$dest" "$source" ;;
|
||||||
*) ln -s "$source" "$dest" ;;
|
*) ln -s "$source" "$dest" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ main() {
|
|||||||
|
|
||||||
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then
|
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then
|
||||||
echo "ERROR: code-server currently requires node v24."
|
echo "ERROR: code-server currently requires node v24."
|
||||||
if [ -n "$FORCE_NODE_VERSION" ]; then
|
if [ -n "${FORCE_NODE_VERSION:-}" ]; then
|
||||||
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
|
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
|
||||||
fi
|
fi
|
||||||
echo "We have detected that you are on node v$major_node_version"
|
echo "We have detected that you are on node v$major_node_version"
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 3.48.0
|
version: 3.51.1
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 4.133.0
|
appVersion: 4.136.2
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: codercom/code-server
|
repository: codercom/code-server
|
||||||
tag: '4.133.0'
|
tag: '4.136.2'
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
# Specifies one or more secrets to be used when pulling images from a
|
# Specifies one or more secrets to be used when pulling images from a
|
||||||
|
|||||||
@@ -49,7 +49,10 @@ if [[ ! ${ARCH-} ]]; then
|
|||||||
export ARCH
|
export ARCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! ${OS-} ]]; then
|
# Windows predefines OS as Windows_NT for every process, so on a windows shell
|
||||||
|
# the check below would always find a value and never call os(). That is not a
|
||||||
|
# name this build knows, so it does not count as one the caller chose.
|
||||||
|
if [[ ! ${OS-} || ${OS-} == "Windows_NT" ]]; then
|
||||||
OS=$(os)
|
OS=$(os)
|
||||||
export OS
|
export OS
|
||||||
fi
|
fi
|
||||||
|
|||||||
Submodule lib/vscode updated: 474a349ad5...88e44fa0e0
55
package-lock.json
generated
55
package-lock.json
generated
@@ -329,29 +329,43 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanfs/core": {
|
"node_modules/@humanfs/core": {
|
||||||
"version": "0.19.1",
|
"version": "0.19.2",
|
||||||
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
|
||||||
"integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
|
"integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@humanfs/types": "^0.15.0"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.18.0"
|
"node": ">=18.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanfs/node": {
|
"node_modules/@humanfs/node": {
|
||||||
"version": "0.16.7",
|
"version": "0.16.8",
|
||||||
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
|
"resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
|
||||||
"integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
|
"integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanfs/core": "^0.19.1",
|
"@humanfs/core": "^0.19.2",
|
||||||
|
"@humanfs/types": "^0.15.0",
|
||||||
"@humanwhocodes/retry": "^0.4.0"
|
"@humanwhocodes/retry": "^0.4.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.18.0"
|
"node": ">=18.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@humanfs/types": {
|
||||||
|
"version": "0.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
|
||||||
|
"integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.18.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@humanwhocodes/module-importer": {
|
"node_modules/@humanwhocodes/module-importer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
|
||||||
@@ -5277,12 +5291,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.15.2",
|
"version": "6.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz",
|
||||||
"integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==",
|
"integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"side-channel": "^1.1.0"
|
"es-define-property": "^1.0.1",
|
||||||
|
"side-channel": "^1.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.6"
|
"node": ">=0.6"
|
||||||
@@ -5750,14 +5765,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/side-channel": {
|
"node_modules/side-channel": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
|
||||||
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
"integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es-errors": "^1.3.0",
|
"es-errors": "^1.3.0",
|
||||||
"object-inspect": "^1.13.3",
|
"object-inspect": "^1.13.4",
|
||||||
"side-channel-list": "^1.0.0",
|
"side-channel-list": "^1.0.1",
|
||||||
"side-channel-map": "^1.0.1",
|
"side-channel-map": "^1.0.1",
|
||||||
"side-channel-weakmap": "^1.0.2"
|
"side-channel-weakmap": "^1.0.2"
|
||||||
},
|
},
|
||||||
@@ -5769,13 +5784,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/side-channel-list": {
|
"node_modules/side-channel-list": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
|
||||||
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
"integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es-errors": "^1.3.0",
|
"es-errors": "^1.3.0",
|
||||||
"object-inspect": "^1.13.3"
|
"object-inspect": "^1.13.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -363,8 +363,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
|
||||||
@@ -264,7 +264,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) {
|
||||||
@@ -301,10 +303,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.`);
|
||||||
@@ -351,6 +357,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 ? {
|
||||||
@@ -400,7 +407,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 ---------------------------------------------------------------------------------------
|
||||||
@@ -437,7 +446,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:;',
|
|
||||||
@@ -510,3 +519,70 @@ export class WebClientServer {
|
|
||||||
return void res.end(data);
|
return void res.end(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/server.cli.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/server.cli.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
+++ code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
||||||
@@ -77,6 +77,7 @@ const isSupportedForPipe = (optionId: ke
|
@@ -78,6 +78,7 @@ const isSupportedForPipe = (optionId: ke
|
||||||
case 'verbose':
|
case 'verbose':
|
||||||
case 'remote':
|
case 'remote':
|
||||||
case 'locate-shell-integration-path':
|
case 'locate-shell-integration-path':
|
||||||
@@ -110,7 +110,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
|||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@@ -300,6 +301,22 @@ export async function main(desc: Product
|
@@ -307,6 +308,22 @@ export async function main(desc: Product
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -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';
|
||||||
@@ -398,14 +399,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
|
||||||
@@ -381,6 +381,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
|
||||||
@@ -385,6 +385,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,6 +51,10 @@ 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'] || args['user-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 = args['user-data-dir'] || join(REMOTE_DATA_FOLDER, 'data');
|
||||||
@@ -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
|
||||||
@@ -350,6 +350,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
|
||||||
@@ -376,6 +376,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
|
||||||
@@ -358,6 +358,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
|
||||||
@@ -343,7 +343,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 });
|
||||||
|
|
||||||
@@ -360,14 +359,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
|
||||||
@@ -359,6 +359,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
|
||||||
@@ -360,6 +360,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
|
||||||
@@ -364,6 +364,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
|
||||||
@@ -355,6 +355,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,
|
||||||
@@ -370,6 +378,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
|
||||||
@@ -357,6 +357,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
|
||||||
@@ -372,6 +372,7 @@ export class WebClientServer {
|
@@ -416,6 +416,7 @@ export class WebClientServer {
|
||||||
const workbenchWebConfiguration = {
|
const workbenchWebConfiguration = {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: basePath,
|
serverBasePath: basePath,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { field, Level, logger } from "@coder/logger"
|
import { field, Level, logger } from "@coder/logger"
|
||||||
|
import * as crypto from "crypto"
|
||||||
import { promises as fs } from "fs"
|
import { promises as fs } from "fs"
|
||||||
import { load } from "js-yaml"
|
import { load } from "js-yaml"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
@@ -561,7 +562,7 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!args["session-socket"]) {
|
if (!args["session-socket"]) {
|
||||||
args["session-socket"] = path.join(args["user-data-dir"], "code-server-ipc.sock")
|
args["session-socket"] = defaultSessionSocket(args["user-data-dir"])
|
||||||
}
|
}
|
||||||
process.env.CODE_SERVER_SESSION_SOCKET = args["session-socket"]
|
process.env.CODE_SERVER_SESSION_SOCKET = args["session-socket"]
|
||||||
|
|
||||||
@@ -710,6 +711,25 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
|
|||||||
} as DefaultedArgs // TODO: Technically no guarantee this is fulfilled.
|
} as DefaultedArgs // TODO: Technically no guarantee this is fulfilled.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The session socket to use when one was not given.
|
||||||
|
*
|
||||||
|
* Windows has no Unix sockets, so there it is a named pipe, which lives in its
|
||||||
|
* own namespace rather than on disk and so cannot be placed inside the user
|
||||||
|
* data directory. The name is derived from that directory anyway, so that two
|
||||||
|
* instances with separate data directories do not collide and a later
|
||||||
|
* invocation with the same one finds the first. Windows paths are compared
|
||||||
|
* without regard to case, so the name is folded before it is hashed; otherwise
|
||||||
|
* the same directory typed two ways would produce two pipes.
|
||||||
|
*/
|
||||||
|
export function defaultSessionSocket(userDataDir: string, platform: NodeJS.Platform = process.platform): string {
|
||||||
|
if (platform !== "win32") {
|
||||||
|
return path.join(userDataDir, "code-server-ipc.sock")
|
||||||
|
}
|
||||||
|
const name = crypto.createHash("sha256").update(path.resolve(userDataDir).toLowerCase()).digest("hex").slice(0, 16)
|
||||||
|
return String.raw`\\.\pipe\code-server-ipc-${name}`
|
||||||
|
}
|
||||||
|
|
||||||
export function getResolvedPathsFromArgs(args: UserProvidedArgs): string[] {
|
export function getResolvedPathsFromArgs(args: UserProvidedArgs): string[] {
|
||||||
return (args._ ?? []).map((p) => path.resolve(p))
|
return (args._ ?? []).map((p) => path.resolve(p))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
19
test/e2e/settings.test.ts
Normal file
19
test/e2e/settings.test.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { promises as fs } from "fs"
|
||||||
|
import * as path from "path"
|
||||||
|
import { clean } from "../utils/helpers"
|
||||||
|
import { describe, test, expect } from "./baseFixture"
|
||||||
|
|
||||||
|
describe("settings", ["--disable-workspace-trust"], {}, () => {
|
||||||
|
const testName = "settings-local"
|
||||||
|
test.beforeAll(async () => {
|
||||||
|
await clean(testName)
|
||||||
|
})
|
||||||
|
|
||||||
|
test("should see startup editor set to none", async ({ codeServerPage }) => {
|
||||||
|
await codeServerPage.navigateMenus(["File", "Preferences", "Settings"])
|
||||||
|
await codeServerPage.page.waitForSelector(".settings-editor")
|
||||||
|
await codeServerPage.page.keyboard.type("startupEditor")
|
||||||
|
const el = codeServerPage.page.getByLabel("workbench.startupEditor")
|
||||||
|
await expect(el).toHaveValue("none")
|
||||||
|
})
|
||||||
|
})
|
||||||
65
test/package-lock.json
generated
65
test/package-lock.json
generated
@@ -1497,6 +1497,19 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/baseline-browser-mapping": {
|
||||||
|
"version": "2.11.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz",
|
||||||
|
"integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bin": {
|
||||||
|
"baseline-browser-mapping": "dist/cli.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "1.1.18",
|
"version": "1.1.18",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
|
||||||
@@ -1529,9 +1542,9 @@
|
|||||||
"license": "BSD-2-Clause"
|
"license": "BSD-2-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.24.0",
|
"version": "4.28.9",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz",
|
||||||
"integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
|
"integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1549,10 +1562,11 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"caniuse-lite": "^1.0.30001663",
|
"baseline-browser-mapping": "^2.11.20",
|
||||||
"electron-to-chromium": "^1.5.28",
|
"caniuse-lite": "^1.0.30001810",
|
||||||
"node-releases": "^2.0.18",
|
"electron-to-chromium": "^1.5.420",
|
||||||
"update-browserslist-db": "^1.1.0"
|
"node-releases": "^2.0.54",
|
||||||
|
"update-browserslist-db": "^1.3.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"browserslist": "cli.js"
|
"browserslist": "cli.js"
|
||||||
@@ -1636,9 +1650,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001667",
|
"version": "1.0.30001810",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
|
||||||
"integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
|
"integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1980,9 +1994,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.32",
|
"version": "1.5.422",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.422.tgz",
|
||||||
"integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==",
|
"integrity": "sha512-UvA/32XqrLDdZSn7Jllo1AYNcWji/G0d5M0GTViE7KoGBiMunw3a34Sb2KO4ZZyrSEhqsxFoVhWWJshdyfKqJA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@@ -3852,11 +3866,14 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.18",
|
"version": "2.0.54",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
|
||||||
"integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==",
|
"integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/normalize-path": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@@ -4024,9 +4041,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@@ -4740,9 +4757,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.1.1",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
|
||||||
"integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==",
|
"integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -4761,7 +4778,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"escalade": "^3.2.0",
|
"escalade": "^3.2.0",
|
||||||
"picocolors": "^1.1.0"
|
"picocolors": "^1.1.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"update-browserslist-db": "cli.js"
|
"update-browserslist-db": "cli.js"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
UserProvidedArgs,
|
UserProvidedArgs,
|
||||||
bindAddrFromArgs,
|
bindAddrFromArgs,
|
||||||
defaultConfigFile,
|
defaultConfigFile,
|
||||||
|
defaultSessionSocket,
|
||||||
parse,
|
parse,
|
||||||
parseConfigFile,
|
parseConfigFile,
|
||||||
setDefaults,
|
setDefaults,
|
||||||
@@ -37,7 +38,7 @@ const defaults = {
|
|||||||
usingEnvHashedPassword: false,
|
usingEnvHashedPassword: false,
|
||||||
"extensions-dir": path.join(paths.data, "extensions"),
|
"extensions-dir": path.join(paths.data, "extensions"),
|
||||||
"user-data-dir": paths.data,
|
"user-data-dir": paths.data,
|
||||||
"session-socket": path.join(paths.data, "code-server-ipc.sock"),
|
"session-socket": defaultSessionSocket(paths.data),
|
||||||
"app-name": "code-server",
|
"app-name": "code-server",
|
||||||
_: [],
|
_: [],
|
||||||
}
|
}
|
||||||
@@ -977,6 +978,26 @@ describe("bindAddrFromArgs", () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe("defaultSessionSocket", () => {
|
||||||
|
const dataDir = path.join("/home/coder/.local/share", "code-server")
|
||||||
|
|
||||||
|
it("should put the socket in the user data directory", () => {
|
||||||
|
expect(defaultSessionSocket(dataDir, "linux")).toBe(path.join(dataDir, "code-server-ipc.sock"))
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should use a named pipe on windows", () => {
|
||||||
|
expect(defaultSessionSocket(dataDir, "win32")).toMatch(/^\\\\\.\\pipe\\code-server-ipc-[0-9a-f]{16}$/)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should give separate data directories separate pipes", () => {
|
||||||
|
expect(defaultSessionSocket(dataDir, "win32")).not.toBe(defaultSessionSocket(dataDir + "-other", "win32"))
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should give one data directory one pipe however it is spelled", () => {
|
||||||
|
expect(defaultSessionSocket(dataDir.toUpperCase(), "win32")).toBe(defaultSessionSocket(dataDir, "win32"))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe("defaultConfigFile", () => {
|
describe("defaultConfigFile", () => {
|
||||||
it("should return the default config file as a string", async () => {
|
it("should return the default config file as a string", async () => {
|
||||||
const password = await generatePassword()
|
const password = await generatePassword()
|
||||||
|
|||||||
Reference in New Issue
Block a user