mirror of
https://github.com/coder/code-server.git
synced 2026-09-02 08:30:17 +02:00
Compare commits
35 Commits
v4.128.0
...
6f05f399e5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f05f399e5 | ||
|
|
c22dc74d53 | ||
|
|
d2f7a12252 | ||
|
|
596dbf3416 | ||
|
|
51f90a376b | ||
|
|
29785ddfba | ||
|
|
313bf0359b | ||
|
|
41cbd28c44 | ||
|
|
208c81a072 | ||
|
|
f836314954 | ||
|
|
1a370bb606 | ||
|
|
7ff34158a1 | ||
|
|
2a1c2637cd | ||
|
|
4f73664880 | ||
|
|
eb4ba56acb | ||
|
|
924bfac9fd | ||
|
|
4cf9c11e3f | ||
|
|
a3fc2899bd | ||
|
|
b95360f302 | ||
|
|
9edf867909 | ||
|
|
f3aca85d02 | ||
|
|
14bdb36f92 | ||
|
|
197ef3e8da | ||
|
|
5cf68f6241 | ||
|
|
1dabd152be | ||
|
|
3ed5f97448 | ||
|
|
b99ce9a992 | ||
|
|
c2337fec2d | ||
|
|
1e2b734be8 | ||
|
|
31e6279646 | ||
|
|
227d08660b | ||
|
|
22b0a3eeab | ||
|
|
77baee7fe0 | ||
|
|
3e76a04b1b | ||
|
|
421e7eb084 |
4
.github/dependabot.yaml
vendored
4
.github/dependabot.yaml
vendored
@@ -6,6 +6,8 @@ updates:
|
|||||||
interval: "monthly"
|
interval: "monthly"
|
||||||
time: "06:00"
|
time: "06:00"
|
||||||
timezone: "America/Chicago"
|
timezone: "America/Chicago"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
labels: []
|
labels: []
|
||||||
commit-message:
|
commit-message:
|
||||||
prefix: "chore"
|
prefix: "chore"
|
||||||
@@ -16,6 +18,8 @@ updates:
|
|||||||
interval: "monthly"
|
interval: "monthly"
|
||||||
time: "06:00"
|
time: "06:00"
|
||||||
timezone: "America/Chicago"
|
timezone: "America/Chicago"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
labels: []
|
labels: []
|
||||||
ignore:
|
ignore:
|
||||||
# Ignore patch updates for all dependencies
|
# Ignore patch updates for all dependencies
|
||||||
|
|||||||
34
.github/workflows/build.yaml
vendored
34
.github/workflows/build.yaml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
docs: ${{ steps.filter.outputs.docs }}
|
docs: ${{ steps.filter.outputs.docs }}
|
||||||
helm: ${{ steps.filter.outputs.helm }}
|
helm: ${{ steps.filter.outputs.helm }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
name: Run prettier check
|
name: Run prettier check
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.docs == 'true'
|
if: needs.changes.outputs.docs == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -89,13 +89,11 @@ jobs:
|
|||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.helm == 'true'
|
if: needs.changes.outputs.helm == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
|
- uses: bmuschko/setup-kubeconform@e5d264ec1eafe2314e750c429a9da7639dd5a003 # v1.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
kubeconform-version: "0.8.0"
|
||||||
version: "v3.19.2"
|
- run: kubeconform ci/helm-chart
|
||||||
- run: helm plugin install https://github.com/instrumenta/helm-kubeval
|
|
||||||
- run: helm kubeval ci/helm-chart
|
|
||||||
|
|
||||||
lint-ts:
|
lint-ts:
|
||||||
name: Lint TypeScript files
|
name: Lint TypeScript files
|
||||||
@@ -103,7 +101,7 @@ jobs:
|
|||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.code == 'true'
|
if: needs.changes.outputs.code == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -121,7 +119,7 @@ jobs:
|
|||||||
if: needs.changes.outputs.ci == 'true'
|
if: needs.changes.outputs.ci == 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- name: Check workflow files
|
- name: Check workflow files
|
||||||
run: |
|
run: |
|
||||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.9
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.9
|
||||||
@@ -134,7 +132,7 @@ jobs:
|
|||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.code == 'true'
|
if: needs.changes.outputs.code == 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -163,12 +161,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: sudo apt update && sudo apt install -y libkrb5-dev
|
- run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
- uses: awalsh128/cache-apt-pkgs-action@681749ae568c81c2037cb9185e38b709b261bd2f # latest
|
- uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # latest
|
||||||
with:
|
with:
|
||||||
packages: quilt
|
packages: quilt
|
||||||
version: 1.0
|
version: 1.0
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: quilt push -a
|
- run: quilt push -a
|
||||||
@@ -191,7 +189,7 @@ jobs:
|
|||||||
# embedded into the code). Use VSCODE_CACHE_VERSION to force a rebuild.
|
# embedded into the code). Use VSCODE_CACHE_VERSION to force a rebuild.
|
||||||
- name: Fetch prebuilt linux-x64 Code package from cache
|
- name: Fetch prebuilt linux-x64 Code package from cache
|
||||||
id: cache-vscode
|
id: cache-vscode
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||||
with:
|
with:
|
||||||
path: lib/vscode-reh-web-linux-x64
|
path: lib/vscode-reh-web-linux-x64
|
||||||
key: vscode-linux-x64-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
|
key: vscode-linux-x64-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
|
||||||
@@ -219,7 +217,7 @@ jobs:
|
|||||||
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.ci == 'true'
|
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true' || needs.changes.outputs.ci == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -256,7 +254,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cache Caddy
|
- name: Cache Caddy
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||||
id: caddy-cache
|
id: caddy-cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@@ -269,7 +267,7 @@ jobs:
|
|||||||
mkdir -p ~/.cache/caddy
|
mkdir -p ~/.cache/caddy
|
||||||
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
|
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
|||||||
6
.github/workflows/installer.yaml
vendored
6
.github/workflows/installer.yaml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Install code-server
|
- name: Install code-server
|
||||||
run: ./install.sh
|
run: ./install.sh
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
container: "alpine:3.17"
|
container: "alpine:3.17"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Install curl
|
- name: Install curl
|
||||||
run: apk add curl
|
run: apk add curl
|
||||||
@@ -67,7 +67,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Install code-server
|
- name: Install code-server
|
||||||
run: ./install.sh
|
run: ./install.sh
|
||||||
|
|||||||
8
.github/workflows/publish.yaml
vendored
8
.github/workflows/publish.yaml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout code-server-aur repo
|
- name: Checkout code-server-aur repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
repository: "cdrci/code-server-aur"
|
repository: "cdrci/code-server-aur"
|
||||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
||||||
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- run: ./ci/build/update-repo.sh
|
- run: ./ci/build/update-repo.sh
|
||||||
|
|
||||||
|
|||||||
12
.github/workflows/release.yaml
vendored
12
.github/workflows/release.yaml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: sudo apt update && sudo apt install -y libkrb5-dev
|
- run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
- uses: awalsh128/cache-apt-pkgs-action@681749ae568c81c2037cb9185e38b709b261bd2f # latest
|
- uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # latest
|
||||||
with:
|
with:
|
||||||
packages: quilt
|
packages: quilt
|
||||||
version: 1.0
|
version: 1.0
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
version=4${version:1}
|
version=4${version:1}
|
||||||
echo "VERSION=$version" >> $GITHUB_ENV
|
echo "VERSION=$version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: quilt push -a
|
- run: quilt push -a
|
||||||
@@ -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@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
||||||
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@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
@@ -170,7 +170,7 @@ jobs:
|
|||||||
version=4${version:1}
|
version=4${version:1}
|
||||||
echo "VERSION=$version" >> $GITHUB_ENV
|
echo "VERSION=$version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: quilt push -a
|
- run: quilt push -a
|
||||||
@@ -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@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
|
|||||||
4
.github/workflows/scripts.yaml
vendored
4
.github/workflows/scripts.yaml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
container: "alpine:3.17"
|
container: "alpine:3.17"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Install test utilities
|
- name: Install test utilities
|
||||||
run: apk add bats checkbashisms
|
run: apk add bats checkbashisms
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Install lint utilities
|
- name: Install lint utilities
|
||||||
run: sudo apt install shellcheck
|
run: sudo apt install shellcheck
|
||||||
|
|||||||
6
.github/workflows/security.yaml
vendored
6
.github/workflows/security.yaml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
2
.github/workflows/trivy-docker.yaml
vendored
2
.github/workflows/trivy-docker.yaml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner in image mode
|
- name: Run Trivy vulnerability scanner in image mode
|
||||||
uses: aquasecurity/trivy-action@314ff8b43182423b84c50b1670b0e10f858f2d98 # latest
|
uses: aquasecurity/trivy-action@314ff8b43182423b84c50b1670b0e10f858f2d98 # latest
|
||||||
|
|||||||
4
.github/workflows/update.yaml
vendored
4
.github/workflows/update.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
echo done=false >> $GITHUB_OUTPUT
|
echo done=false >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: awalsh128/cache-apt-pkgs-action@681749ae568c81c2037cb9185e38b709b261bd2f # latest
|
- uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # latest
|
||||||
if: steps.check.outputs.done == 'false'
|
if: steps.check.outputs.done == 'false'
|
||||||
with:
|
with:
|
||||||
packages: quilt
|
packages: quilt
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
24.17.0
|
24.18.0
|
||||||
|
|||||||
48
CHANGELOG.md
48
CHANGELOG.md
@@ -22,6 +22,54 @@ Code v99.99.999
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## [4.133.0](https://github.com/coder/code-server/releases/tag/v4.133.0) - 2026-08-17
|
||||||
|
|
||||||
|
Code v1.133.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.133.0
|
||||||
|
|
||||||
|
## [4.132.0](https://github.com/coder/code-server/releases/tag/v4.132.0) - 2026-08-10
|
||||||
|
|
||||||
|
Code v1.132.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.132.0
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- When proxying, cookies were being decoded and re-encoded, which could cause
|
||||||
|
issues for applications that encode differently. Cookies are now passed
|
||||||
|
through unchanged (aside from stripping out code-server's session token).
|
||||||
|
|
||||||
|
## [4.131.0](https://github.com/coder/code-server/releases/tag/v4.131.0) - 2026-07-30
|
||||||
|
|
||||||
|
Code v1.131.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.131.0
|
||||||
|
|
||||||
|
## [4.130.0](https://github.com/coder/code-server/releases/tag/v4.130.0) - 2026-07-24
|
||||||
|
|
||||||
|
Code v1.130.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.130.0
|
||||||
|
|
||||||
|
## [4.129.0](https://github.com/coder/code-server/releases/tag/v4.129.0) - 2026-07-17
|
||||||
|
|
||||||
|
Code v1.129.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.129.0
|
||||||
|
|
||||||
|
## [4.128.0](https://github.com/coder/code-server/releases/tag/v4.128.0) - 2026-07-11
|
||||||
|
|
||||||
Code v1.128.0
|
Code v1.128.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ main() {
|
|||||||
echo "USE AT YOUR OWN RISK!"
|
echo "USE AT YOUR OWN RISK!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-22}" ]; then
|
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then
|
||||||
echo "ERROR: code-server currently requires node v22."
|
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
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ set -Eeuo pipefail
|
|||||||
|
|
||||||
function unapply_patches() {
|
function unapply_patches() {
|
||||||
local -i exit_code=0
|
local -i exit_code=0
|
||||||
quiet quilt pop -af || exit_code=$?
|
quiet quilt pop -af 2>&1 || exit_code=$?
|
||||||
case $exit_code in
|
case $exit_code in
|
||||||
# Sucessfully unapplied.
|
# Sucessfully unapplied.
|
||||||
0) ;;
|
0) ;;
|
||||||
@@ -15,6 +15,19 @@ function unapply_patches() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function apply_patches() {
|
||||||
|
local -i exit_code=0
|
||||||
|
quiet quilt push -a 2>&1 || exit_code=$?
|
||||||
|
case $exit_code in
|
||||||
|
# Sucessfully applied.
|
||||||
|
0) ;;
|
||||||
|
# No more patches to apply.
|
||||||
|
2) ;;
|
||||||
|
# Some error.
|
||||||
|
*) return $exit_code ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
function update_vscode() {
|
function update_vscode() {
|
||||||
pushd lib/vscode
|
pushd lib/vscode
|
||||||
if ! git checkout 2>&1 "$target_vscode_version" ; then
|
if ! git checkout 2>&1 "$target_vscode_version" ; then
|
||||||
@@ -28,8 +41,8 @@ function update_vscode() {
|
|||||||
|
|
||||||
function refresh_patches() {
|
function refresh_patches() {
|
||||||
local -i exit_code=0
|
local -i exit_code=0
|
||||||
while quiet quilt push ; ! (( exit_code=$? )) ; do
|
while quiet quilt push 2>&1 ; ! (( exit_code=$? )) ; do
|
||||||
quilt refresh
|
quilt refresh 2>&1
|
||||||
done
|
done
|
||||||
case $exit_code in
|
case $exit_code in
|
||||||
# No more patches to apply.
|
# No more patches to apply.
|
||||||
@@ -56,50 +69,41 @@ function get-webview-script-hash() {
|
|||||||
local html
|
local html
|
||||||
html=$(<"$1")
|
html=$(<"$1")
|
||||||
local start_tag='<script async type="module">'
|
local start_tag='<script async type="module">'
|
||||||
|
if [[ $file == */webWorkerExtensionHostIframe.html ]] ; then
|
||||||
|
start_tag='<script>'
|
||||||
|
fi
|
||||||
local end_tag="</script>"
|
local end_tag="</script>"
|
||||||
html=${html##*"$start_tag"}
|
html=${html##*"$start_tag"}
|
||||||
html=${html%%"$end_tag"*}
|
html=${html%%"$end_tag"*}
|
||||||
echo -n "$html" | openssl sha256 -binary | openssl base64
|
echo -n "$html" | openssl sha256 -binary | openssl base64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function delete_csp() {
|
||||||
|
quilt delete csp-hashes.diff || true
|
||||||
|
}
|
||||||
|
|
||||||
function update_csp() {
|
function update_csp() {
|
||||||
local current
|
apply_patches
|
||||||
current=$(quilt top 2>/dev/null || echo "")
|
|
||||||
local patch_action=""
|
local files=(
|
||||||
echo "Currently at ${current:-base}"
|
./lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
if [[ $current != */webview.diff ]] ; then
|
./lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
echo "Moving to patches/webview.diff..."
|
)
|
||||||
local -i exit_code=0
|
|
||||||
if quilt applied 2>/dev/null | grep --quiet webview.diff ; then
|
quilt new csp-hashes.diff
|
||||||
quiet quilt pop webview || exit_code=$?
|
|
||||||
patch_action=pop
|
local file
|
||||||
else
|
for file in "${files[@]}" ; do
|
||||||
quiet quilt push webview || exit_code=$?
|
quilt add "$file"
|
||||||
patch_action=push
|
|
||||||
fi
|
local hash
|
||||||
case $exit_code in
|
hash=$(get-webview-script-hash "$file")
|
||||||
# Successfully moved.
|
echo "Calculated hash as $hash"
|
||||||
0) ;;
|
# Use octothorpe as a delimiter since the hash may contain a slash.
|
||||||
# Some error.
|
sed -i.bak "s#'sha256-[^']\+'#'sha256-$hash'#" "$file"
|
||||||
*) return $exit_code ;;
|
done
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
local file=lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
|
||||||
local hash
|
|
||||||
hash=$(get-webview-script-hash "$file")
|
|
||||||
echo "Calculated hash as $hash"
|
|
||||||
# Use octothorpe as a delimiter since the hash may contain a slash.
|
|
||||||
sed -i.bak "s#script-src 'sha256-[^']\+'#script-src 'sha256-$hash'#" "$file"
|
|
||||||
quilt refresh
|
quilt refresh
|
||||||
|
|
||||||
if [[ $patch_action != "" ]] ; then
|
|
||||||
echo "Moving back to ${current:-base}..."
|
|
||||||
case $patch_action in
|
|
||||||
pop) quiet quilt push "$current" ;;
|
|
||||||
push) quiet quilt pop "${current:--a}" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_changelog() {
|
function add_changelog() {
|
||||||
@@ -120,6 +124,9 @@ function main() {
|
|||||||
|
|
||||||
declare -a steps
|
declare -a steps
|
||||||
|
|
||||||
|
# Hashes are always regenerated to avoid having to resolve conflicts..
|
||||||
|
steps+=("Revert CSP hashes" "delete_csp")
|
||||||
|
|
||||||
# If version is not set, assume we are already at the target version and the
|
# If version is not set, assume we are already at the target version and the
|
||||||
# user is just trying to resolve conflics.
|
# user is just trying to resolve conflics.
|
||||||
local target_vscode_version
|
local target_vscode_version
|
||||||
@@ -141,7 +148,7 @@ function main() {
|
|||||||
|
|
||||||
steps+=(
|
steps+=(
|
||||||
"Update Node version" "update_node"
|
"Update Node version" "update_node"
|
||||||
"Update CSP webview hash" "update_csp"
|
"Regenerate CSP hashes" "update_csp"
|
||||||
"Add changelog note" "add_changelog"
|
"Add changelog note" "add_changelog"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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.42.0
|
version: 3.48.0
|
||||||
|
|
||||||
# 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.127.0
|
appVersion: 4.133.0
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: codercom/code-server
|
repository: codercom/code-server
|
||||||
tag: '4.127.0'
|
tag: '4.133.0'
|
||||||
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
|
||||||
@@ -34,6 +34,10 @@ serviceAccount:
|
|||||||
# Specifies annotations for deployment
|
# Specifies annotations for deployment
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
|
# code-server.labels -- The Deployment labels. See:
|
||||||
|
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||||
|
labels: {}
|
||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
|
|||||||
10
ci/lib.sh
10
ci/lib.sh
@@ -85,18 +85,20 @@ run-steps() {
|
|||||||
while (( $# )) ; do
|
while (( $# )) ; do
|
||||||
local name=$1 ; shift
|
local name=$1 ; shift
|
||||||
local fn=$1 ; shift
|
local fn=$1 ; shift
|
||||||
|
echo "$name..."
|
||||||
# Only run if an earlier step has not failed.
|
# Only run if an earlier step has not failed.
|
||||||
|
# For all failed steps, write out an empty checkbox.
|
||||||
if [[ $failed == 0 ]] ; then
|
if [[ $failed == 0 ]] ; then
|
||||||
echo "$name..."
|
|
||||||
if $fn | indent ; then
|
if $fn | indent ; then
|
||||||
echo "- [X] $name" >> .cache/checklist
|
echo "- [X] $name" >> .cache/checklist
|
||||||
else
|
else
|
||||||
((failed++))
|
((failed++))
|
||||||
|
echo "- [ ] $name" >> .cache/checklist
|
||||||
|
echo "Failed" | indent
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
# For all failed steps, write out an empty checkbox.
|
|
||||||
if [[ $failed != 0 ]] ; then
|
|
||||||
echo "- [ ] $name" >> .cache/checklist
|
echo "- [ ] $name" >> .cache/checklist
|
||||||
|
echo "Skipped" | indent
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ $failed != 0 ]] ; then
|
if [[ $failed != 0 ]] ; then
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ The prerequisites for contributing to code-server are almost the same as those
|
|||||||
for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
||||||
Here is what is needed:
|
Here is what is needed:
|
||||||
|
|
||||||
- `node` v22.x
|
- `node` v24.x
|
||||||
- `git` v2.x or greater
|
- `git` v2.x or greater
|
||||||
- [`git-lfs`](https://git-lfs.github.com)
|
- [`git-lfs`](https://git-lfs.github.com)
|
||||||
- [`npm`](https://www.npmjs.com/)
|
- [`npm`](https://www.npmjs.com/)
|
||||||
|
|||||||
34
docs/FAQ.md
34
docs/FAQ.md
@@ -17,6 +17,7 @@
|
|||||||
- [Where is VS Code configuration stored?](#where-is-vs-code-configuration-stored)
|
- [Where is VS Code configuration stored?](#where-is-vs-code-configuration-stored)
|
||||||
- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration)
|
- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration)
|
||||||
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
|
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
|
||||||
|
- [Can I open a file at a specific line from a URL?](#can-i-open-a-file-at-a-specific-line-from-a-url)
|
||||||
- [How do I access my Documents/Downloads/Desktop folders in code-server on macOS?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-macos)
|
- [How do I access my Documents/Downloads/Desktop folders in code-server on macOS?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-macos)
|
||||||
- [How do I direct server-side requests through a proxy?](#how-do-i-direct-server-side-requests-through-a-proxy)
|
- [How do I direct server-side requests through a proxy?](#how-do-i-direct-server-side-requests-through-a-proxy)
|
||||||
- [How do I debug issues with code-server?](#how-do-i-debug-issues-with-code-server)
|
- [How do I debug issues with code-server?](#how-do-i-debug-issues-with-code-server)
|
||||||
@@ -230,6 +231,39 @@ code-server tries the following in this order:
|
|||||||
3. The workspace or directory passed via the command line
|
3. The workspace or directory passed via the command line
|
||||||
4. The last opened workspace or directory
|
4. The last opened workspace or directory
|
||||||
|
|
||||||
|
## Can I open a file at a specific line from a URL?
|
||||||
|
|
||||||
|
Yes. In addition to `workspace` and `folder`, code-server supports VS Code's
|
||||||
|
`payload` query parameter, which can open a specific file — optionally at a
|
||||||
|
line and column — once the workbench loads.
|
||||||
|
|
||||||
|
`payload` is a URL-encoded JSON array of `[key, value]` string pairs. The
|
||||||
|
`openFile` key takes a `vscode-remote://<host>/<absolute path>` URI, where
|
||||||
|
`<host>` is the host you use to reach code-server. Add
|
||||||
|
`["gotoLineMode","true"]` to have a trailing `:line[:column]` suffix on the
|
||||||
|
path interpreted as a cursor position:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://code.example.com/?folder=/home/coder/project&payload=[["gotoLineMode","true"],["openFile","vscode-remote://code.example.com/home/coder/project/src/app.py:10:5"]]
|
||||||
|
```
|
||||||
|
|
||||||
|
(with the `payload` value URL-encoded). Notes:
|
||||||
|
|
||||||
|
- Paths must be absolute; there is no form relative to `folder`.
|
||||||
|
- This is upstream VS Code web behavior (the same mechanism vscode.dev uses),
|
||||||
|
so it works without any code-server-specific configuration.
|
||||||
|
|
||||||
|
For example, to generate links from a shell:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/sh
|
||||||
|
# usage: code-link <absolute-file> [line[:column]]
|
||||||
|
HOST=code.example.com
|
||||||
|
payload="[[\"gotoLineMode\",\"true\"],[\"openFile\",\"vscode-remote://$HOST$1${2:+:$2}\"]]"
|
||||||
|
printf 'https://%s/?folder=%s&payload=%s\n' "$HOST" "$(dirname "$1")" \
|
||||||
|
"$(printf '%s' "$payload" | jq -sRr @uri)"
|
||||||
|
```
|
||||||
|
|
||||||
## How do I access my Documents/Downloads/Desktop folders in code-server on macOS?
|
## How do I access my Documents/Downloads/Desktop folders in code-server on macOS?
|
||||||
|
|
||||||
Newer versions of macOS require permission through a non-UNIX mechanism for
|
Newer versions of macOS require permission through a non-UNIX mechanism for
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
|||||||
```
|
```
|
||||||
|
|
||||||
6. Exit the terminal using `exit` and then reopen the terminal
|
6. Exit the terminal using `exit` and then reopen the terminal
|
||||||
7. Install and use Node.js 22:
|
7. Install and use Node.js 24:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
nvm install 22
|
nvm install 24
|
||||||
nvm use 22
|
nvm use 24
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Install code-server globally on device with: `npm install --global code-server`
|
8. Install code-server globally on device with: `npm install --global code-server`
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ $ helm upgrade --install code-server \
|
|||||||
--set persistence.enabled=false
|
--set persistence.enabled=false
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command sets the the persistence storage to false.
|
The above command sets the persistence storage to false.
|
||||||
|
|
||||||
Alternatively, a YAML file that specifies the values for the above parameters
|
Alternatively, a YAML file that specifies the values for the above parameters
|
||||||
can be provided while installing the chart. For example,
|
can be provided while installing the chart. For example,
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ includes installing instructions based on your operating system.
|
|||||||
|
|
||||||
## Node.js version
|
## Node.js version
|
||||||
|
|
||||||
We use the same major version of Node.js shipped with Code's remote, which is
|
We use Node.js `24.x`. VS Code also [lists Node.js
|
||||||
currently `22.x`. VS Code also [lists Node.js
|
|
||||||
requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites).
|
||||||
|
|
||||||
Using other versions of Node.js [may lead to unexpected
|
Using other versions of Node.js [may lead to unexpected
|
||||||
@@ -78,7 +77,7 @@ Proceed to [installing](#installing)
|
|||||||
## FreeBSD
|
## FreeBSD
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pkg install -y git python npm-node22 pkgconf
|
pkg install -y git python npm-node24 pkgconf
|
||||||
pkg install -y libinotify
|
pkg install -y libinotify
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ npm config set python python3
|
|||||||
node -v
|
node -v
|
||||||
```
|
```
|
||||||
|
|
||||||
you will get Node version `v22`
|
you will get Node version `v24`
|
||||||
|
|
||||||
5. Now install code-server following our guide on [installing with npm](./npm.md)
|
5. Now install code-server following our guide on [installing with npm](./npm.md)
|
||||||
|
|
||||||
|
|||||||
Submodule lib/vscode updated: fc3def6774...a5b5009513
96
package-lock.json
generated
96
package-lock.json
generated
@@ -44,7 +44,7 @@
|
|||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.0",
|
||||||
"@types/http-proxy": "1.17.7",
|
"@types/http-proxy": "1.17.7",
|
||||||
"@types/js-yaml": "^4.0.6",
|
"@types/js-yaml": "^4.0.6",
|
||||||
"@types/node": "22.x",
|
"@types/node": "24.x",
|
||||||
"@types/pem": "^1.14.1",
|
"@types/pem": "^1.14.1",
|
||||||
"@types/proxy-from-env": "^1.0.1",
|
"@types/proxy-from-env": "^1.0.1",
|
||||||
"@types/safe-compare": "^1.1.0",
|
"@types/safe-compare": "^1.1.0",
|
||||||
@@ -58,14 +58,14 @@
|
|||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"globals": "^17.6.0",
|
"globals": "^17.6.0",
|
||||||
"prettier": "3.8.3",
|
"prettier": "3.9.4",
|
||||||
"prettier-plugin-sh": "^0.18.0",
|
"prettier-plugin-sh": "^0.18.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.6.2",
|
"typescript": "^5.6.2",
|
||||||
"typescript-eslint": "^8.8.0"
|
"typescript-eslint": "^8.8.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "22"
|
"node": "24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@coder/logger": {
|
"node_modules/@coder/logger": {
|
||||||
@@ -652,13 +652,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.19.13",
|
"version": "24.13.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz",
|
||||||
"integrity": "sha512-akNQMv0wW5uyRpD2v2IEyRSZiR+BeGuoB6L310EgGObO44HSMNT8z1xzio28V8qOrgYaopIDNA18YgdXd+qTiw==",
|
"integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.21.0"
|
"undici-types": "~7.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/pem": {
|
"node_modules/@types/pem": {
|
||||||
@@ -1633,20 +1633,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/body-parser": {
|
"node_modules/body-parser": {
|
||||||
"version": "2.2.2",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
|
||||||
"integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
|
"integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bytes": "^3.1.2",
|
"bytes": "^3.1.2",
|
||||||
"content-type": "^1.0.5",
|
"content-type": "^2.0.0",
|
||||||
"debug": "^4.4.3",
|
"debug": "^4.4.3",
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.1",
|
||||||
"iconv-lite": "^0.7.0",
|
"iconv-lite": "^0.7.2",
|
||||||
"on-finished": "^2.4.1",
|
"on-finished": "^2.4.1",
|
||||||
"qs": "^6.14.1",
|
"qs": "^6.15.2",
|
||||||
"raw-body": "^3.0.1",
|
"raw-body": "^3.0.2",
|
||||||
"type-is": "^2.0.1"
|
"type-is": "^2.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
@@ -1656,6 +1656,19 @@
|
|||||||
"url": "https://opencollective.com/express"
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/body-parser/node_modules/content-type": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/boundary": {
|
"node_modules/boundary": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz",
|
||||||
@@ -3647,9 +3660,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ip-address": {
|
"node_modules/ip-address": {
|
||||||
"version": "10.2.0",
|
"version": "10.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz",
|
||||||
"integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
|
"integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 12"
|
"node": ">= 12"
|
||||||
@@ -4140,9 +4153,9 @@
|
|||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/js-yaml": {
|
"node_modules/js-yaml": {
|
||||||
"version": "4.2.0",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
|
||||||
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
|
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -5144,9 +5157,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.8.3",
|
"version": "3.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.4.tgz",
|
||||||
"integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==",
|
"integrity": "sha512-yWG/o/4oJfo036EKAfK6ACAoDOfHeRHx4tuxkfBZiauURiaSmYwlpOr5LQqKtIkRD2z1PLteme2WoxEnj4tHTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -6127,17 +6140,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/type-is": {
|
"node_modules/type-is": {
|
||||||
"version": "2.0.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
|
||||||
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
"integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"content-type": "^1.0.5",
|
"content-type": "^2.0.0",
|
||||||
"media-typer": "^1.1.0",
|
"media-typer": "^1.1.0",
|
||||||
"mime-types": "^3.0.0"
|
"mime-types": "^3.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/type-is/node_modules/content-type": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typed-array-buffer": {
|
"node_modules/typed-array-buffer": {
|
||||||
@@ -6276,9 +6306,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "6.21.0",
|
"version": "7.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.0",
|
||||||
"@types/http-proxy": "1.17.7",
|
"@types/http-proxy": "1.17.7",
|
||||||
"@types/js-yaml": "^4.0.6",
|
"@types/js-yaml": "^4.0.6",
|
||||||
"@types/node": "22.x",
|
"@types/node": "24.x",
|
||||||
"@types/pem": "^1.14.1",
|
"@types/pem": "^1.14.1",
|
||||||
"@types/proxy-from-env": "^1.0.1",
|
"@types/proxy-from-env": "^1.0.1",
|
||||||
"@types/safe-compare": "^1.1.0",
|
"@types/safe-compare": "^1.1.0",
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"globals": "^17.6.0",
|
"globals": "^17.6.0",
|
||||||
"prettier": "3.8.3",
|
"prettier": "3.9.4",
|
||||||
"prettier-plugin-sh": "^0.18.0",
|
"prettier-plugin-sh": "^0.18.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.6.2",
|
"typescript": "^5.6.2",
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
"xdg-basedir": "^4.0.0"
|
"xdg-basedir": "^4.0.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/node": "22.x"
|
"@types/node": "24.x"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"code-server": "out/node/entry.js"
|
"code-server": "out/node/entry.js"
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"remote-development"
|
"remote-development"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "22"
|
"node": "24"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"transform": {
|
"transform": {
|
||||||
|
|||||||
@@ -144,9 +144,9 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
codeServerVersion: this._productService.codeServerVersion,
|
codeServerVersion: this._productService.codeServerVersion,
|
||||||
+ rootEndpoint: rootBase,
|
+ rootEndpoint: rootBase,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||||
...this._productService.extensionsGallery,
|
@@ -403,7 +410,9 @@ export class WebClientServer {
|
||||||
@@ -401,7 +408,9 @@ export class WebClientServer {
|
|
||||||
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
|
||||||
WORKBENCH_WEB_BASE_URL: staticRoute,
|
WORKBENCH_WEB_BASE_URL: staticRoute,
|
||||||
WORKBENCH_NLS_URL,
|
WORKBENCH_NLS_URL,
|
||||||
@@ -157,7 +157,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
};
|
};
|
||||||
|
|
||||||
// DEV ---------------------------------------------------------------------------------------
|
// DEV ---------------------------------------------------------------------------------------
|
||||||
@@ -438,7 +447,7 @@ export class WebClientServer {
|
@@ -440,7 +449,7 @@ export class WebClientServer {
|
||||||
'default-src \'self\';',
|
'default-src \'self\';',
|
||||||
'img-src \'self\' https: data: blob:;',
|
'img-src \'self\' https: data: blob:;',
|
||||||
'media-src \'self\';',
|
'media-src \'self\';',
|
||||||
@@ -166,7 +166,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
'child-src \'self\';',
|
'child-src \'self\';',
|
||||||
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
`frame-src 'self' https://*.vscode-cdn.net data:;`,
|
||||||
'worker-src \'self\' data: blob:;',
|
'worker-src \'self\' data: blob:;',
|
||||||
@@ -511,3 +520,70 @@ export class WebClientServer {
|
@@ -513,3 +522,70 @@ export class WebClientServer {
|
||||||
return void res.end(data);
|
return void res.end(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,7 +241,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -85,6 +85,7 @@ export interface IAgentSdkProductConfig
|
@@ -98,6 +98,7 @@ export interface IDictationRuntimeProduc
|
||||||
|
|
||||||
export interface IProductConfiguration {
|
export interface IProductConfiguration {
|
||||||
readonly codeServerVersion?: string
|
readonly codeServerVersion?: string
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Index: code-server/lib/vscode/build/lib/extensions.ts
|
|||||||
import watcher from './watch/index.ts';
|
import watcher from './watch/index.ts';
|
||||||
|
|
||||||
import { createRequire } from 'module';
|
import { createRequire } from 'module';
|
||||||
@@ -483,6 +484,116 @@ export function packageCopilotExtensionS
|
@@ -491,6 +492,116 @@ export function packageCopilotExtensionS
|
||||||
).pipe(util2.setExecutableBit(['**/*.sh']));
|
).pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
patches/csp-hashes.diff
Normal file
26
patches/csp-hashes.diff
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
|
===================================================================
|
||||||
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
|
||||||
|
<meta http-equiv="Content-Security-Policy"
|
||||||
|
- content="default-src 'none'; script-src 'sha256-FFQoOVVa2tOE3uqUvirwaMNT20TZmrHcL2aaOjJ8BUo=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||||
|
+ content="default-src 'none'; script-src 'sha256-24QqbpzqcqSyIGvg/ZwFRy5pPlhmVBa8CkUREEIUnBw=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
||||||
|
|
||||||
|
<!-- Disable pinch zooming -->
|
||||||
|
<meta name="viewport"
|
||||||
|
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
|
===================================================================
|
||||||
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
|
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="
|
||||||
|
default-src 'none';
|
||||||
|
child-src 'self' data: blob:;
|
||||||
|
- script-src 'self' 'unsafe-eval' 'sha256-daEgfo2VIXpx2Np71KqCCbkeQwv+68vPrx54XRcbdcs=' https: http://localhost:* blob:;
|
||||||
|
+ script-src 'self' 'unsafe-eval' 'sha256-gfjiOVjAlxqrivZAfTq2d83mOaz0fnAxbGaFpj5IjD8=' https: http://localhost:* blob:;
|
||||||
|
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
@@ -9,16 +9,16 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
@@ -12,7 +12,7 @@ import * as path from '../../base/common
|
@@ -13,7 +13,7 @@ import { IURITransformer } from '../../b
|
||||||
import { IURITransformer } from '../../base/common/uriIpc.js';
|
import { generateUuid } from '../../base/common/uuid.js';
|
||||||
import { getMachineId, getSqmMachineId, getDevDeviceId } from '../../base/node/id.js';
|
import { getMachineId, getSqmMachineId, getDevDeviceId } from '../../base/node/id.js';
|
||||||
import { Promises } from '../../base/node/pfs.js';
|
import { Promises } from '../../base/node/pfs.js';
|
||||||
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
||||||
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from '../../base/parts/ipc/common/ipc.js';
|
||||||
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 { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
import { ConfigurationService } from '../../platform/configuration/common/configurationService.js';
|
@@ -417,6 +417,9 @@ export async function setupServerService
|
||||||
@@ -358,6 +358,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';
|
||||||
@@ -399,14 +400,22 @@ export class WebClientServer {
|
@@ -401,14 +402,22 @@ export class WebClientServer {
|
||||||
};
|
};
|
||||||
|
|
||||||
const cookies = cookie.parse(req.headers.cookie || '');
|
const cookies = cookie.parse(req.headers.cookie || '');
|
||||||
@@ -272,7 +272,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts
|
||||||
@@ -474,9 +474,6 @@ export class InstallAction extends Exten
|
@@ -475,9 +475,6 @@ export class InstallAction extends Exten
|
||||||
if (this.extension.isBuiltin) {
|
if (this.extension.isBuiltin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -282,7 +282,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
|||||||
if (this.extension.state !== ExtensionState.Uninstalled) {
|
if (this.extension.state !== ExtensionState.Uninstalled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -781,7 +778,7 @@ export abstract class InstallInOtherServ
|
@@ -782,7 +779,7 @@ export abstract class InstallInOtherServ
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLanguagePackExtension(this.extension.local.manifest)) {
|
if (isLanguagePackExtension(this.extension.local.manifest)) {
|
||||||
@@ -291,7 +291,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prefers to run on UI
|
// Prefers to run on UI
|
||||||
@@ -2284,17 +2281,6 @@ export class SetLanguageAction extends E
|
@@ -2281,17 +2278,6 @@ export class SetLanguageAction extends E
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.class = SetLanguageAction.DisabledClass;
|
this.class = SetLanguageAction.DisabledClass;
|
||||||
@@ -309,7 +309,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
|||||||
}
|
}
|
||||||
|
|
||||||
override async run(): Promise<any> {
|
override async run(): Promise<any> {
|
||||||
@@ -2311,7 +2297,6 @@ export class ClearLanguageAction extends
|
@@ -2308,7 +2294,6 @@ export class ClearLanguageAction extends
|
||||||
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
|
private static readonly DisabledClass = `${this.EnabledClass} disabled`;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -317,7 +317,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens
|
|||||||
@ILocaleService private readonly localeService: ILocaleService,
|
@ILocaleService private readonly localeService: ILocaleService,
|
||||||
) {
|
) {
|
||||||
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
|
super(ClearLanguageAction.ID, ClearLanguageAction.TITLE.value, ClearLanguageAction.DisabledClass, false);
|
||||||
@@ -2321,17 +2306,6 @@ export class ClearLanguageAction extends
|
@@ -2318,17 +2303,6 @@ export class ClearLanguageAction extends
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
this.class = ClearLanguageAction.DisabledClass;
|
this.class = ClearLanguageAction.DisabledClass;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -312,6 +312,16 @@ export interface IWorkbenchConstructionO
|
@@ -319,6 +319,16 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly userDataPath?: string
|
readonly userDataPath?: 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
|
||||||
@@ -383,6 +383,8 @@ export class WebClientServer {
|
@@ -384,6 +384,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,
|
||||||
@@ -129,8 +129,8 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
|||||||
import { Disposable } from '../../base/common/lifecycle.js';
|
import { Disposable } from '../../base/common/lifecycle.js';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
||||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||||
-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||||
+import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext, IsEnabledFileDownloads, IsEnabledFileUploads } from '../common/contextkeys.js';
|
+import { IsEnabledFileDownloads, IsEnabledFileUploads, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||||
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
-import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.js';
|
-import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.js';
|
||||||
@@ -138,7 +138,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
|||||||
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from '../../platform/workspace/common/workspace.js';
|
import { WorkbenchState, IWorkspaceContextService, isTemporaryWorkspace } from '../../platform/workspace/common/workspace.js';
|
||||||
import { IWorkbenchLayoutService, Parts, positionToString } from '../services/layout/browser/layoutService.js';
|
import { IWorkbenchLayoutService, Parts, positionToString } from '../services/layout/browser/layoutService.js';
|
||||||
import { getRemoteName } from '../../platform/remote/common/remoteHosts.js';
|
import { getRemoteName } from '../../platform/remote/common/remoteHosts.js';
|
||||||
@@ -69,7 +69,7 @@ export class WorkbenchContextKeysHandler
|
@@ -70,7 +70,7 @@ export class WorkbenchContextKeysHandler
|
||||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@@ -147,7 +147,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
|||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
|
@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
|
||||||
@IEditorService private readonly editorService: IEditorService,
|
@IEditorService private readonly editorService: IEditorService,
|
||||||
@@ -202,6 +202,10 @@ export class WorkbenchContextKeysHandler
|
@@ -205,6 +205,10 @@ export class WorkbenchContextKeysHandler
|
||||||
this.auxiliaryBarMaximizedContext = AuxiliaryBarMaximizedContext.bindTo(this.contextKeyService);
|
this.auxiliaryBarMaximizedContext = AuxiliaryBarMaximizedContext.bindTo(this.contextKeyService);
|
||||||
this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized());
|
this.auxiliaryBarMaximizedContext.set(this.layoutService.isAuxiliaryBarMaximized());
|
||||||
|
|
||||||
@@ -166,12 +166,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
|||||||
import { AutoSaveAfterShortDelayContext } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
|
import { AutoSaveAfterShortDelayContext } from '../../../services/filesConfiguration/common/filesConfigurationService.js';
|
||||||
import { WorkbenchListDoubleSelection } from '../../../../platform/list/browser/listService.js';
|
import { WorkbenchListDoubleSelection } from '../../../../platform/list/browser/listService.js';
|
||||||
import { Schemas } from '../../../../base/common/network.js';
|
import { Schemas } from '../../../../base/common/network.js';
|
||||||
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
|
-import { DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ActiveEditorDirtyContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
|
||||||
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
|
+import { IsEnabledFileDownloads, IsEnabledFileUploads, DirtyWorkingCopiesContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsSessionsWindowContext, WorkbenchStateContext, WorkspaceFolderCountContext, SidebarFocusContext, ActiveEditorCanRevertContext, ActiveEditorContext, ActiveEditorDirtyContext, ResourceContextKey, ActiveEditorAvailableEditorIdsContext, MultipleEditorsSelectedInGroupContext, TwoEditorsSelectedInGroupContext, SelectedEditorsInGroupFileOrUntitledResourceContextKey } from '../../../common/contextkeys.js';
|
||||||
import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';
|
import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js';
|
||||||
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
|
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
|
||||||
import { ThemeIcon } from '../../../../base/common/themables.js';
|
import { ThemeIcon } from '../../../../base/common/themables.js';
|
||||||
@@ -571,13 +571,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -573,13 +573,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
id: DOWNLOAD_COMMAND_ID,
|
id: DOWNLOAD_COMMAND_ID,
|
||||||
title: DOWNLOAD_LABEL
|
title: DOWNLOAD_LABEL
|
||||||
},
|
},
|
||||||
@@ -195,7 +195,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions
|
|||||||
)
|
)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -589,6 +592,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
@@ -591,6 +594,7 @@ MenuRegistry.appendMenuItem(MenuId.Explo
|
||||||
title: UPLOAD_LABEL,
|
title: UPLOAD_LABEL,
|
||||||
},
|
},
|
||||||
when: ContextKeyExpr.and(
|
when: ContextKeyExpr.and(
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -322,6 +322,11 @@ export interface IWorkbenchConstructionO
|
@@ -329,6 +329,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly isEnabledFileUploads?: boolean
|
readonly isEnabledFileUploads?: 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
|
||||||
@@ -387,6 +387,7 @@ export class WebClientServer {
|
@@ -388,6 +388,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'],
|
||||||
@@ -217,12 +217,12 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
|
|||||||
import { Disposable } from '../../base/common/lifecycle.js';
|
import { Disposable } from '../../base/common/lifecycle.js';
|
||||||
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
import { IContextKeyService, IContextKey, setConstant as setConstantContextKey } from '../../platform/contextkey/common/contextkey.js';
|
||||||
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext, ProductQualityContext, IsMobileContext } from '../../platform/contextkey/common/contextkeys.js';
|
||||||
-import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext, IsEnabledFileDownloads, IsEnabledFileUploads } from '../common/contextkeys.js';
|
-import { IsEnabledFileDownloads, IsEnabledFileUploads, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||||
+import { SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext, IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, } from '../common/contextkeys.js';
|
+import { IsEnabledFileDownloads, IsEnabledFileUploads, IsEnabledCoderGettingStarted, SplitEditorsVertically, InEditorZenModeContext, AuxiliaryBarVisibleContext, SecondarySideBarVisibleContext, SideBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelVisibleContext, EmbedderIdentifierContext, EditorTabsVisibleContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, DirtyWorkingCopiesContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, HasWebFileSystemAccess, IsMainWindowFullscreenContext, OpenFolderWorkspaceSupportContext, RemoteNameContext, VirtualWorkspaceContext, WorkbenchStateContext, WorkspaceFolderCountContext, PanelPositionContext, TemporaryWorkspaceContext, TitleBarVisibleContext, TitleBarStyleContext, IsAuxiliaryWindowFocusedContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, AuxiliaryBarMaximizedContext, InAutomationContext, IsSessionsWindowContext } from '../common/contextkeys.js';
|
||||||
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
||||||
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
|
import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService.js';
|
||||||
@@ -205,6 +205,7 @@ export class WorkbenchContextKeysHandler
|
@@ -208,6 +208,7 @@ export class WorkbenchContextKeysHandler
|
||||||
// code-server
|
// code-server
|
||||||
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
|
IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true)
|
||||||
IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true)
|
IsEnabledFileUploads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileUploads ?? true)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
|||||||
import { IProgressService } from '../../platform/progress/common/progress.js';
|
import { IProgressService } from '../../platform/progress/common/progress.js';
|
||||||
import { DelayedLogChannel } from '../services/output/common/delayedLogChannel.js';
|
import { DelayedLogChannel } from '../services/output/common/delayedLogChannel.js';
|
||||||
import { dirname, joinPath } from '../../base/common/resources.js';
|
import { dirname, joinPath } from '../../base/common/resources.js';
|
||||||
@@ -139,6 +140,9 @@ export class BrowserMain extends Disposa
|
@@ -140,6 +141,9 @@ export class BrowserMain extends Disposa
|
||||||
// Startup
|
// Startup
|
||||||
const instantiationService = workbench.startup();
|
const instantiationService = workbench.startup();
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -84,6 +84,8 @@ export interface IAgentSdkProductConfig
|
@@ -97,6 +97,8 @@ export interface IDictationRuntimeProduc
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IProductConfiguration {
|
export interface IProductConfiguration {
|
||||||
@@ -257,8 +257,8 @@ 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,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||||
...this._productService.extensionsGallery,
|
|
||||||
Index: code-server/lib/vscode/src/server-main.ts
|
Index: code-server/lib/vscode/src/server-main.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/server-main.ts
|
--- code-server.orig/lib/vscode/src/server-main.ts
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -378,6 +378,7 @@ export class WebClientServer {
|
@@ -379,6 +379,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',
|
||||||
@@ -30,7 +30,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts
|
||||||
@@ -307,6 +307,11 @@ export interface IWorkbenchConstructionO
|
@@ -314,6 +314,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly configurationDefaults?: Record<string, unknown>;
|
readonly configurationDefaults?: Record<string, unknown>;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -87,6 +87,7 @@ export interface IProductConfiguration {
|
@@ -100,6 +100,7 @@ export interface IProductConfiguration {
|
||||||
readonly codeServerVersion?: string
|
readonly codeServerVersion?: string
|
||||||
readonly rootEndpoint?: string
|
readonly rootEndpoint?: string
|
||||||
readonly updateEndpoint?: string
|
readonly updateEndpoint?: string
|
||||||
@@ -46,8 +46,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
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,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
};
|
|
||||||
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
|
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
||||||
@@ -49,6 +49,17 @@ else if (globalThis._VSCODE_PRODUCT_JSON
|
@@ -65,6 +65,17 @@ else if (globalThis._VSCODE_PRODUCT_JSON
|
||||||
version: pkg.version
|
Object.assign(product, { copilotVersions: { runtime, sdk } });
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ Object.assign(product, {
|
+ Object.assign(product, {
|
||||||
@@ -49,10 +49,10 @@ 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 });
|
||||||
|
|
||||||
@@ -362,14 +361,7 @@ export class WebClientServer {
|
@@ -363,14 +362,7 @@ export class WebClientServer {
|
||||||
codeServerVersion: this._productService.codeServerVersion,
|
|
||||||
rootEndpoint: rootBase,
|
rootEndpoint: rootBase,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
- extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
- extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
|
||||||
- ...this._productService.extensionsGallery,
|
- ...this._productService.extensionsGallery,
|
||||||
- resourceUrlTemplate: this._webExtensionResourceUrlTemplate.with({
|
- resourceUrlTemplate: this._webExtensionResourceUrlTemplate.with({
|
||||||
|
|||||||
@@ -10,18 +10,17 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extens
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensions.ts
|
||||||
@@ -321,10 +321,7 @@ function extensionDescriptionArrayToMap(
|
@@ -324,6 +324,10 @@ function extensionDescriptionArrayToMap(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
||||||
- if (!extension.enabledApiProposals) {
|
+ return true;
|
||||||
- return false;
|
+}
|
||||||
- }
|
+
|
||||||
- return true;// extension.enabledApiProposals.includes(proposal);
|
+export function _isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
||||||
+ return true
|
if (!extension.enabledApiProposals) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
export function checkProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): void {
|
|
||||||
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
|
Index: code-server/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.ts
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -88,6 +88,7 @@ export interface IProductConfiguration {
|
@@ -101,6 +101,7 @@ export interface IProductConfiguration {
|
||||||
readonly rootEndpoint?: string
|
readonly rootEndpoint?: string
|
||||||
readonly updateEndpoint?: string
|
readonly updateEndpoint?: string
|
||||||
readonly logoutEndpoint?: string
|
readonly logoutEndpoint?: string
|
||||||
@@ -77,8 +77,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
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}}/',
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
};
|
|
||||||
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts
|
||||||
@@ -148,7 +148,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExpl
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts
|
||||||
@@ -83,8 +83,8 @@ export class ForwardedPortsView extends
|
@@ -99,8 +99,8 @@ export class ForwardedPortsView extends
|
||||||
private async enableForwardedPortsFeatures() {
|
private async enableForwardedPortsFeatures() {
|
||||||
this.contextKeyListener.clear();
|
this.contextKeyListener.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -24,3 +24,4 @@ trusted-domains.diff
|
|||||||
signature-verification.diff
|
signature-verification.diff
|
||||||
copilot.diff
|
copilot.diff
|
||||||
app-name.diff
|
app-name.diff
|
||||||
|
csp-hashes.diff
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -89,6 +89,10 @@ export interface IProductConfiguration {
|
@@ -102,6 +102,10 @@ export interface IProductConfiguration {
|
||||||
readonly updateEndpoint?: string
|
readonly updateEndpoint?: string
|
||||||
readonly logoutEndpoint?: string
|
readonly logoutEndpoint?: string
|
||||||
readonly proxyEndpointTemplate?: string
|
readonly proxyEndpointTemplate?: string
|
||||||
@@ -63,5 +63,5 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
+ path: rootBase + '/_static/out/browser/serviceWorker.js',
|
+ path: rootBase + '/_static/out/browser/serviceWorker.js',
|
||||||
+ },
|
+ },
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
};
|
|
||||||
|
|||||||
@@ -12,15 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
|
--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
+++ code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
||||||
@@ -4,6 +4,7 @@
|
@@ -68,6 +68,7 @@ import { IExtensionsScannerService } fro
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
import { hostname, release } from 'os';
|
|
||||||
+import { promises as fs } from 'fs';
|
|
||||||
import { Emitter, Event } from '../../base/common/event.js';
|
|
||||||
import { DisposableStore, toDisposable } from '../../base/common/lifecycle.js';
|
|
||||||
import { Schemas } from '../../base/common/network.js';
|
|
||||||
@@ -65,6 +66,7 @@ import { IExtensionsScannerService } fro
|
|
||||||
import { ExtensionsScannerService } from './extensionsScannerService.js';
|
import { ExtensionsScannerService } from './extensionsScannerService.js';
|
||||||
import { IExtensionsProfileScannerService } from '../../platform/extensionManagement/common/extensionsProfileScannerService.js';
|
import { IExtensionsProfileScannerService } from '../../platform/extensionManagement/common/extensionsProfileScannerService.js';
|
||||||
import { IUserDataProfilesService } from '../../platform/userDataProfile/common/userDataProfile.js';
|
import { IUserDataProfilesService } from '../../platform/userDataProfile/common/userDataProfile.js';
|
||||||
@@ -28,18 +20,18 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
import { NullPolicyService } from '../../platform/policy/common/policy.js';
|
import { NullPolicyService } from '../../platform/policy/common/policy.js';
|
||||||
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
|
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
|
||||||
import { LoggerService } from '../../platform/log/node/loggerService.js';
|
import { LoggerService } from '../../platform/log/node/loggerService.js';
|
||||||
@@ -176,11 +178,23 @@ export async function setupServerService
|
@@ -179,11 +180,23 @@ export async function setupServerService
|
||||||
const requestService = new RequestService('remote', configurationService, environmentService, logService);
|
const requestService = new RequestService('remote', configurationService, environmentService, logService);
|
||||||
services.set(IRequestService, requestService);
|
services.set(IRequestService, requestService);
|
||||||
|
|
||||||
+ let isContainer = undefined;
|
+ let isContainer = undefined;
|
||||||
+ try {
|
+ try {
|
||||||
+ await fs.stat('/run/.containerenv');
|
+ await fs.promises.stat('/run/.containerenv');
|
||||||
+ isContainer = true;
|
+ isContainer = true;
|
||||||
+ } catch (error) { /* Does not exist, probably. */ }
|
+ } catch (error) { /* Does not exist, probably. */ }
|
||||||
+ if (!isContainer) {
|
+ if (!isContainer) {
|
||||||
+ try {
|
+ try {
|
||||||
+ const content = await fs.readFile('/proc/self/cgroup', 'utf8')
|
+ const content = await fs.promises.readFile('/proc/self/cgroup', 'utf8')
|
||||||
+ isContainer = content.includes('docker');
|
+ isContainer = content.includes('docker');
|
||||||
+ } catch (error) { /* Permission denied, probably. */ }
|
+ } catch (error) { /* Permission denied, probably. */ }
|
||||||
+ }
|
+ }
|
||||||
@@ -141,13 +133,13 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
+ enableTelemetry: this._productService.enableTelemetry,
|
+ enableTelemetry: this._productService.enableTelemetry,
|
||||||
+ telemetryEndpoint: this._productService.telemetryEndpoint,
|
+ telemetryEndpoint: this._productService.telemetryEndpoint,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
};
|
|
||||||
Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -93,6 +93,7 @@ export interface IProductConfiguration {
|
@@ -106,6 +106,7 @@ export interface IProductConfiguration {
|
||||||
readonly path: string;
|
readonly path: string;
|
||||||
readonly scope: string;
|
readonly scope: string;
|
||||||
}
|
}
|
||||||
@@ -159,7 +151,7 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
+++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
||||||
@@ -58,7 +58,8 @@ else if (globalThis._VSCODE_PRODUCT_JSON
|
@@ -113,7 +113,8 @@ else {
|
||||||
resourceUrlTemplate: "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}",
|
resourceUrlTemplate: "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}",
|
||||||
controlUrl: "",
|
controlUrl: "",
|
||||||
recommendationsUrl: "",
|
recommendationsUrl: "",
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ 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,
|
||||||
@@ -372,6 +380,7 @@ export class WebClientServer {
|
@@ -373,6 +381,7 @@ export class WebClientServer {
|
||||||
telemetryEndpoint: this._productService.telemetryEndpoint,
|
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
+ linkProtectionTrustedDomains,
|
+ linkProtectionTrustedDomains,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageS
|
|||||||
|
|
||||||
export class BrowserStorageService extends AbstractStorageService {
|
export class BrowserStorageService extends AbstractStorageService {
|
||||||
|
|
||||||
@@ -328,7 +329,11 @@ export class IndexedDBStorageDatabase ex
|
@@ -354,7 +355,11 @@ export class IndexedDBStorageDatabase ex
|
||||||
}
|
}
|
||||||
|
|
||||||
static async createWorkspaceStorage(workspaceId: string, logService: ILogService): Promise<IIndexedDBStorageDatabase> {
|
static async createWorkspaceStorage(workspaceId: string, logService: ILogService): Promise<IIndexedDBStorageDatabase> {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
--- code-server.orig/lib/vscode/src/vs/base/common/product.ts
|
||||||
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
+++ code-server/lib/vscode/src/vs/base/common/product.ts
|
||||||
@@ -86,6 +86,7 @@ export interface IAgentSdkProductConfig
|
@@ -99,6 +99,7 @@ export interface IDictationRuntimeProduc
|
||||||
export interface IProductConfiguration {
|
export interface IProductConfiguration {
|
||||||
readonly codeServerVersion?: string
|
readonly codeServerVersion?: string
|
||||||
readonly rootEndpoint?: string
|
readonly rootEndpoint?: string
|
||||||
@@ -101,7 +101,7 @@ Index: code-server/lib/vscode/src/vs/base/common/product.ts
|
|||||||
|
|
||||||
readonly version: string;
|
readonly version: string;
|
||||||
readonly date?: string;
|
readonly date?: string;
|
||||||
@@ -138,6 +139,7 @@ export interface IProductConfiguration {
|
@@ -151,6 +152,7 @@ export interface IProductConfiguration {
|
||||||
readonly resourceUrlTemplate: string;
|
readonly resourceUrlTemplate: string;
|
||||||
readonly nlsBaseUrl: string;
|
readonly nlsBaseUrl: string;
|
||||||
readonly accessSKUs?: string[];
|
readonly accessSKUs?: string[];
|
||||||
@@ -119,8 +119,8 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
|
|||||||
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,
|
||||||
embedderIdentifier: 'server-distro',
|
embedderIdentifier: 'server-distro',
|
||||||
|
voiceWsUrl: this._productService.voiceWsUrl,
|
||||||
extensionsGallery: this._productService.extensionsGallery,
|
extensionsGallery: this._productService.extensionsGallery,
|
||||||
};
|
|
||||||
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
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ Serve webviews from the same origin
|
|||||||
Normally webviews are served from vscode-webview.net but we would rather them be
|
Normally webviews are served from vscode-webview.net but we would rather them be
|
||||||
self-hosted.
|
self-hosted.
|
||||||
|
|
||||||
When doing this CSP will block resources (for example when viewing images) so
|
|
||||||
add 'self' to the CSP to fix that.
|
|
||||||
|
|
||||||
Additionally the service worker defaults to handling *all* requests made to the
|
Additionally the service worker defaults to handling *all* requests made to the
|
||||||
current host but when self-hosting the webview this will end up including the
|
current host but when self-hosting the webview this will end up including the
|
||||||
webview HTML itself which means these requests will fail since the communication
|
webview HTML itself which means these requests will fail since the communication
|
||||||
@@ -20,16 +17,6 @@ webview host is separate by default but we serve on the same host).
|
|||||||
|
|
||||||
To test, open a few types of webviews (images, markdown, extension details, etc).
|
To test, open a few types of webviews (images, markdown, extension details, etc).
|
||||||
|
|
||||||
Make sure to update the hash. To do so:
|
|
||||||
1. run code-server
|
|
||||||
2. open any webview (i.e. preview Markdown)
|
|
||||||
3. see error in console and copy hash
|
|
||||||
|
|
||||||
That will test the hash change in pre/index.html
|
|
||||||
|
|
||||||
Double-check the console to make sure there are no console errors for the webWorkerExtensionHostIframe
|
|
||||||
which also requires a hash change.
|
|
||||||
|
|
||||||
parentOriginHash changes
|
parentOriginHash changes
|
||||||
|
|
||||||
This fixes webviews from not working properly due to a change upstream.
|
This fixes webviews from not working properly due to a change upstream.
|
||||||
@@ -41,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
|
||||||
@@ -226,7 +226,7 @@ export class BrowserWorkbenchEnvironment
|
@@ -234,7 +234,7 @@ export class BrowserWorkbenchEnvironment
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
get webviewExternalEndpoint(): string {
|
get webviewExternalEndpoint(): string {
|
||||||
@@ -54,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
|
||||||
@@ -374,6 +374,7 @@ export class WebClientServer {
|
@@ -375,6 +375,7 @@ export class WebClientServer {
|
||||||
const workbenchWebConfiguration = {
|
const workbenchWebConfiguration = {
|
||||||
remoteAuthority,
|
remoteAuthority,
|
||||||
serverBasePath: basePath,
|
serverBasePath: basePath,
|
||||||
@@ -66,19 +53,10 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
|
|
||||||
<meta http-equiv="Content-Security-Policy"
|
|
||||||
- content="default-src 'none'; script-src 'sha256-nXjtuhBilO++r8hfxl5VjEScSmdm07wDAk6jw228DgM=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
|
||||||
+ content="default-src 'none'; script-src 'sha256-A6/szVNdTzyi4hDa+9OLbzS8tSd2iUV4CqimLNWex2Y=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
|
||||||
|
|
||||||
<!-- Disable pinch zooming -->
|
|
||||||
<meta name="viewport"
|
|
||||||
@@ -253,7 +253,7 @@
|
@@ -253,7 +253,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const swPath = encodeURI(`service-worker.js?v=${expectedWorkerVersion}&vscode-resource-base-authority=${searchParams.get('vscode-resource-base-authority')}&remoteAuthority=${searchParams.get('remoteAuthority') ?? ''}`);
|
const swPath = encodeURI(`service-worker.js?v=${expectedWorkerVersion}&vscode-resource-base-authority=${searchParams.get('vscode-resource-base-authority')}&remoteAuthority=${searchParams.get('remoteAuthority') ?? ''}&platform=${searchParams.get('platform')}`);
|
||||||
- navigator.serviceWorker.register(swPath, { type: 'module', updateViaCache: 'none' })
|
- navigator.serviceWorker.register(swPath, { type: 'module', updateViaCache: 'none' })
|
||||||
+ navigator.serviceWorker.register(swPath)
|
+ navigator.serviceWorker.register(swPath)
|
||||||
.then(async registration => {
|
.then(async registration => {
|
||||||
@@ -101,17 +79,8 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWor
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
--- code-server.orig/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
+++ code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
|
||||||
@@ -4,7 +4,7 @@
|
@@ -34,6 +34,13 @@
|
||||||
<meta http-equiv="Content-Security-Policy" content="
|
}
|
||||||
default-src 'none';
|
|
||||||
child-src 'self' data: blob:;
|
|
||||||
- script-src 'self' 'unsafe-eval' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
|
|
||||||
+ script-src 'self' 'unsafe-eval' 'sha256-yhZXuB8LS6t73dvNg6rtLX8y4PHLnqRm5+6DdOGkOcw=' https: http://localhost:* blob:;
|
|
||||||
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
@@ -25,6 +25,13 @@
|
|
||||||
// validation not requested
|
|
||||||
return start();
|
return start();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -20,17 +20,31 @@ proxy.on("error", (error, _, res) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function identity<T>(val: T): T {
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
|
||||||
// Strip the code-server cookie if it exists to avoid transmitting the cookie
|
// Strip the code-server cookie if it exists to avoid transmitting the cookie
|
||||||
// to potentially malicious local ports.
|
// to potentially malicious local ports.
|
||||||
proxy.on("proxyReq", (preq, req) => {
|
proxy.on("proxyReq", (preq, req) => {
|
||||||
const cookieSessionName = getCookieSessionName((req as Request).args["cookie-suffix"])
|
if (req.headers.cookie) {
|
||||||
preq.setHeader(
|
const cookieSessionName = getCookieSessionName((req as Request).args["cookie-suffix"])
|
||||||
"Cookie",
|
// Encoding and decoding are no-ops; we just want to remove the token
|
||||||
cookie.stringifyCookie({
|
// without changing anything else about the cookies because not all
|
||||||
...(req as Request).cookies,
|
// applications encode/decode the same way `cookie` here does.
|
||||||
[cookieSessionName]: undefined,
|
preq.setHeader(
|
||||||
}),
|
"Cookie",
|
||||||
)
|
cookie.stringifyCookie(
|
||||||
|
{
|
||||||
|
...cookie.parseCookie(req.headers.cookie, { decode: identity }),
|
||||||
|
[cookieSessionName]: undefined,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
encode: identity,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Intercept the response to rewrite absolute redirects against the base path.
|
// Intercept the response to rewrite absolute redirects against the base path.
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ router.get("/manifest.json", async (req, res) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
let mintKeyPromise: Promise<Buffer> | undefined
|
let mintKeyPromise: Promise<Buffer> | undefined
|
||||||
router.post("/mint-key", async (req, res) => {
|
router.post("/mint-key", ensureAuthenticated, async (req, res) => {
|
||||||
if (!mintKeyPromise) {
|
if (!mintKeyPromise) {
|
||||||
mintKeyPromise = new Promise(async (resolve) => {
|
mintKeyPromise = new Promise(async (resolve) => {
|
||||||
const keyPath = path.join(req.args["user-data-dir"], "serve-web-key-half")
|
const keyPath = path.join(req.args["user-data-dir"], "serve-web-key-half")
|
||||||
|
|||||||
6
test/package-lock.json
generated
6
test/package-lock.json
generated
@@ -4937,9 +4937,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ws": {
|
"node_modules/ws": {
|
||||||
"version": "7.5.10",
|
"version": "7.5.13",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz",
|
||||||
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
|
"integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -298,25 +298,44 @@ describe("proxy", () => {
|
|||||||
process.env.HASHED_PASSWORD = token
|
process.env.HASHED_PASSWORD = token
|
||||||
codeServer = await integration.setup(["--auth=password"])
|
codeServer = await integration.setup(["--auth=password"])
|
||||||
|
|
||||||
// Set up a listener that just prints the cookies it got.
|
|
||||||
e.get("/wsup/cookies", (req, res) => {
|
e.get("/wsup/cookies", (req, res) => {
|
||||||
res.writeHead(HttpCode.Ok, { "Content-Type": "text/plain" })
|
res.writeHead(HttpCode.Ok, { "Content-Type": "text/plain" })
|
||||||
res.end(req.headers.cookie)
|
res.end(req.headers.cookie)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Send the token along with other cookies which should be preserved.
|
const cookies = [
|
||||||
// Encode one to make sure they are being re-encoded properly.
|
"cookie2=hello",
|
||||||
const value = "hello=there"
|
// Cookies should pass through unchanged, neither encoded nor decoded.
|
||||||
const encodedValue = encodeURIComponent(value)
|
`cookie1=${encodeURIComponent("hello=there")}`,
|
||||||
const resp = await codeServer.fetch(proxyPath + "/cookies", {
|
"cookie3=foo|bar",
|
||||||
headers: {
|
`cookie4=${encodeURIComponent("foo|bar")}`,
|
||||||
cookie: `cookie1=${encodedValue}; code-server-session=${token}; cookie2=hello;`,
|
`cookie5=${encodeURIComponent("bar;baz")}`,
|
||||||
},
|
]
|
||||||
|
|
||||||
|
// Test each slot to ensure the token is found anywhere.
|
||||||
|
for (let i = 0; i <= cookies.length; ++i) {
|
||||||
|
const left = cookies.slice(0, i)
|
||||||
|
const right = cookies.slice(i)
|
||||||
|
const resp = await codeServer.fetch(proxyPath + "/cookies", {
|
||||||
|
headers: {
|
||||||
|
cookie: [...left, `code-server-session=${token}`, ...right].join("; "),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
expect(resp.status).toBe(200)
|
||||||
|
expect(await resp.text()).toBe(cookies.join("; "))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should proxy when no cookies", async () => {
|
||||||
|
codeServer = await integration.setup(["--auth=none"])
|
||||||
|
|
||||||
|
e.get("/wsup/cookies", (req, res) => {
|
||||||
|
res.writeHead(HttpCode.Ok, { "Content-Type": "text/plain" })
|
||||||
|
res.end(req.headers.cookie || "no cookies")
|
||||||
})
|
})
|
||||||
|
|
||||||
// The proxied listener should not have printed the code-server token.
|
const resp = await codeServer.fetch(proxyPath + "/cookies")
|
||||||
expect(resp.status).toBe(200)
|
expect(resp.status).toBe(200)
|
||||||
const text = await resp.text()
|
expect(await resp.text()).toBe("no cookies")
|
||||||
expect(text).toBe(`cookie1=${encodedValue}; cookie2=hello`)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,11 +4,19 @@ import * as integration from "../../../utils/integration"
|
|||||||
|
|
||||||
describe("vscode", () => {
|
describe("vscode", () => {
|
||||||
let codeServer: httpserver.HttpServer | undefined
|
let codeServer: httpserver.HttpServer | undefined
|
||||||
|
// TODO: Support setting this as an argument for tests.
|
||||||
|
const previousEnvPassword = process.env.PASSWORD
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
process.env.PASSWORD = "test"
|
||||||
mockLogger()
|
mockLogger()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
if (typeof previousEnvPassword !== "undefined") {
|
||||||
|
process.env.PASSWORD = previousEnvPassword
|
||||||
|
} else {
|
||||||
|
delete process.env.PASSWORD
|
||||||
|
}
|
||||||
if (codeServer) {
|
if (codeServer) {
|
||||||
await codeServer.dispose()
|
await codeServer.dispose()
|
||||||
codeServer = undefined
|
codeServer = undefined
|
||||||
@@ -27,4 +35,10 @@ describe("vscode", () => {
|
|||||||
})
|
})
|
||||||
}).rejects.toThrow()
|
}).rejects.toThrow()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should require auth", async () => {
|
||||||
|
codeServer = await integration.setup(["--auth=password"], "")
|
||||||
|
const resp = await codeServer.fetch("/mint-key", { method: "POST" })
|
||||||
|
expect(resp.status).toBe(401)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user