mirror of
https://github.com/coder/code-server.git
synced 2026-05-08 13:27:25 +02:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7a2b4936a | ||
|
|
c2d79d94f9 | ||
|
|
9fec2d7cad | ||
|
|
80dfb2b2a9 | ||
|
|
27e7b931e7 | ||
|
|
db9f678477 | ||
|
|
c095c26dbc | ||
|
|
262f66abf6 | ||
|
|
8ee45686b0 | ||
|
|
512d97f22f | ||
|
|
897e0ae1da | ||
|
|
f4bf492051 | ||
|
|
2eba7af117 | ||
|
|
0dc59c0da2 | ||
|
|
6275520348 | ||
|
|
2bb51a25a9 | ||
|
|
7a213161f2 | ||
|
|
a1131fadf2 | ||
|
|
468cf5c6ce | ||
|
|
800bf364d6 |
6
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
6
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -75,10 +75,10 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: Are you accessing code-server over HTTPS?
|
label: Are you accessing code-server over a secure context?
|
||||||
description: code-server relies on service workers for many features. Double-check that you are using HTTPS.
|
description: code-server relies on service workers (which only work in secure contexts) for many features. Double-check that you are using a secure context like HTTPS or localhost.
|
||||||
options:
|
options:
|
||||||
- label: I am using HTTPS.
|
- label: I am using a secure context.
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
26
.github/workflows/build.yaml
vendored
26
.github/workflows/build.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run prettier with actionsx/prettier
|
- name: Run prettier with actionsx/prettier
|
||||||
uses: actionsx/prettier@v3
|
uses: actionsx/prettier@v3
|
||||||
@@ -41,11 +41,11 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v38
|
uses: tj-actions/changed-files@v39
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
docs/**
|
docs/**
|
||||||
@@ -70,13 +70,13 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v38
|
uses: tj-actions/changed-files@v39
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
ci/helm-chart/**
|
ci/helm-chart/**
|
||||||
@@ -101,13 +101,13 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v38
|
uses: tj-actions/changed-files@v39
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
**/*.ts
|
**/*.ts
|
||||||
@@ -144,7 +144,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Check workflow files
|
- name: Check workflow files
|
||||||
run: |
|
run: |
|
||||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash)
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash)
|
||||||
@@ -157,13 +157,13 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v38
|
uses: tj-actions/changed-files@v39
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
**/*.ts
|
**/*.ts
|
||||||
@@ -208,7 +208,7 @@ jobs:
|
|||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ jobs:
|
|||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: sudo apt update && sudo apt install -y libkrb5-dev
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
@@ -352,7 +352,7 @@ jobs:
|
|||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: sudo apt update && sudo apt install -y libkrb5-dev
|
run: sudo apt update && sudo apt install -y libkrb5-dev
|
||||||
|
|||||||
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@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- 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@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- 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@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install code-server
|
- name: Install code-server
|
||||||
run: ./install.sh
|
run: ./install.sh
|
||||||
|
|||||||
16
.github/workflows/publish.yaml
vendored
16
.github/workflows/publish.yaml
vendored
@@ -27,12 +27,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code-server
|
- name: Checkout code-server
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v16
|
- name: Install Node.js v18
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
node-version: "18"
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Download npm package from release artifacts
|
- name: Download npm package from release artifacts
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
|
|
||||||
- name: Checkout code-server
|
- name: Checkout code-server
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
run: |
|
run: |
|
||||||
@@ -101,13 +101,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# We need to checkout code-server so we can get the version
|
# We need to checkout code-server so we can get the version
|
||||||
- name: Checkout code-server
|
- name: Checkout code-server
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
path: "./code-server"
|
path: "./code-server"
|
||||||
|
|
||||||
- name: Checkout code-server-aur repo
|
- name: Checkout code-server-aur repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: "cdrci/code-server-aur"
|
repository: "cdrci/code-server-aur"
|
||||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
@@ -155,13 +155,13 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code-server
|
- name: Checkout code-server
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|||||||
66
.github/workflows/release.yaml
vendored
66
.github/workflows/release.yaml
vendored
@@ -33,12 +33,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js v18
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18.15.0"
|
||||||
|
|
||||||
- name: Install development tools
|
- name: Install development tools
|
||||||
run: |
|
run: |
|
||||||
@@ -100,61 +100,67 @@ jobs:
|
|||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
files: ./release-packages/*
|
files: ./release-packages/*
|
||||||
|
|
||||||
# TODO: We should use the same CentOS image to cross-compile if possible?
|
|
||||||
package-linux-cross:
|
package-linux-cross:
|
||||||
name: Linux cross-compile builds
|
name: Linux cross-compile builds
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
needs: npm-version
|
needs: npm-version
|
||||||
|
container: "debian:buster"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- prefix: aarch64-linux-gnu
|
- prefix: aarch64-linux-gnu
|
||||||
arch: arm64
|
npm_arch: arm64
|
||||||
|
apt_arch: arm64
|
||||||
- prefix: arm-linux-gnueabihf
|
- prefix: arm-linux-gnueabihf
|
||||||
arch: armv7l
|
npm_arch: armv7l
|
||||||
|
apt_arch: armhf
|
||||||
|
|
||||||
env:
|
env:
|
||||||
AR: ${{ format('{0}-ar', matrix.prefix) }}
|
AR: ${{ format('{0}-ar', matrix.prefix) }}
|
||||||
|
AS: ${{ format('{0}-as', matrix.prefix) }}
|
||||||
CC: ${{ format('{0}-gcc', matrix.prefix) }}
|
CC: ${{ format('{0}-gcc', matrix.prefix) }}
|
||||||
|
CPP: ${{ format('{0}-cpp', matrix.prefix) }}
|
||||||
CXX: ${{ format('{0}-g++', matrix.prefix) }}
|
CXX: ${{ format('{0}-g++', matrix.prefix) }}
|
||||||
LINK: ${{ format('{0}-g++', matrix.prefix) }}
|
FC: ${{ format('{0}-gfortran', matrix.prefix) }}
|
||||||
npm_config_arch: ${{ matrix.arch }}
|
LD: ${{ format('{0}-ld', matrix.prefix) }}
|
||||||
|
STRIP: ${{ format('{0}-strip', matrix.prefix) }}
|
||||||
|
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
|
||||||
|
TARGET_ARCH: ${{ matrix.apt_arch }}
|
||||||
|
npm_config_arch: ${{ matrix.npm_arch }}
|
||||||
NODE_VERSION: v18.15.0
|
NODE_VERSION: v18.15.0
|
||||||
|
# Not building from source results in an x86_64 argon2, as if
|
||||||
|
# npm_config_arch is being ignored.
|
||||||
|
npm_config_build_from_source: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js v18
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18.15.0"
|
node-version: "18.15.0"
|
||||||
|
|
||||||
|
- name: Install cross-compiler and system dependencies
|
||||||
|
run: |
|
||||||
|
dpkg --add-architecture $TARGET_ARCH
|
||||||
|
apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
crossbuild-essential-$TARGET_ARCH \
|
||||||
|
libx11-dev:$TARGET_ARCH \
|
||||||
|
libx11-xcb-dev:$TARGET_ARCH \
|
||||||
|
libxkbfile-dev:$TARGET_ARCH \
|
||||||
|
libsecret-1-dev:$TARGET_ARCH \
|
||||||
|
libkrb5-dev:$TARGET_ARCH \
|
||||||
|
ca-certificates \
|
||||||
|
curl wget rsync gettext-base
|
||||||
|
|
||||||
- name: Install nfpm
|
- name: Install nfpm
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.local/bin
|
mkdir -p ~/.local/bin
|
||||||
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install cross-compiler and system dependencies (arm64)
|
|
||||||
if: ${{ matrix.arch != 'armv7l' }}
|
|
||||||
run: sudo apt update && sudo apt install -y $PACKAGE libkrb5-dev
|
|
||||||
env:
|
|
||||||
PACKAGE: ${{ format('g++-{0}', matrix.prefix) }}
|
|
||||||
|
|
||||||
- name: Install cross-compiler and system dependencies (armv7l)
|
|
||||||
if: ${{ matrix.arch == 'armv7l' }}
|
|
||||||
run: |
|
|
||||||
sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list
|
|
||||||
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c) main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
|
|
||||||
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c)-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
|
|
||||||
sudo dpkg --add-architecture armhf
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y $PACKAGE libkrb5-dev:armhf
|
|
||||||
env:
|
|
||||||
PACKAGE: ${{ format('g++-{0}', matrix.prefix) }}
|
|
||||||
|
|
||||||
- name: Download npm package
|
- name: Download npm package
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -182,7 +188,7 @@ jobs:
|
|||||||
- name: Build packages with nfpm
|
- name: Build packages with nfpm
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ env.VERSION }}
|
VERSION: ${{ env.VERSION }}
|
||||||
run: yarn package ${npm_config_arch}
|
run: npm run package ${npm_config_arch}
|
||||||
|
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
@@ -197,12 +203,12 @@ jobs:
|
|||||||
needs: npm-version
|
needs: npm-version
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js v18
|
- name: Install Node.js v18
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18"
|
node-version: "18.15.0"
|
||||||
|
|
||||||
- name: Install nfpm
|
- name: Install nfpm
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
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@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- 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@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install lint utilities
|
- name: Install lint utilities
|
||||||
run: sudo apt install shellcheck
|
run: sudo apt install shellcheck
|
||||||
|
|||||||
8
.github/workflows/security.yaml
vendored
8
.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@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -50,12 +50,12 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner in repo mode
|
- name: Run Trivy vulnerability scanner in repo mode
|
||||||
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54
|
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f
|
||||||
with:
|
with:
|
||||||
scan-type: "fs"
|
scan-type: "fs"
|
||||||
scan-ref: "."
|
scan-ref: "."
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
4
.github/workflows/trivy-docker.yaml
vendored
4
.github/workflows/trivy-docker.yaml
vendored
@@ -48,10 +48,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner in image mode
|
- name: Run Trivy vulnerability scanner in image mode
|
||||||
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54
|
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f
|
||||||
with:
|
with:
|
||||||
image-ref: "docker.io/codercom/code-server:latest"
|
image-ref: "docker.io/codercom/code-server:latest"
|
||||||
ignore-unfixed: true
|
ignore-unfixed: true
|
||||||
|
|||||||
36
CHANGELOG.md
36
CHANGELOG.md
@@ -22,6 +22,40 @@ Code v99.99.999
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## [4.17.1](https://github.com/coder/code-server/releases/tag/v4.17.1) - 2023-09-29
|
||||||
|
|
||||||
|
Code v1.82.2
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Make secret storage persistent. For example, logging in with GitHub should
|
||||||
|
persist between browser refreshes and code-server restarts.
|
||||||
|
- Issues with argon2 on arm builds should be fixed now.
|
||||||
|
|
||||||
|
## [4.17.0](https://github.com/coder/code-server/releases/tag/v4.17.0) - 2023-09-22
|
||||||
|
|
||||||
|
Code v1.82.2
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Japanese locale.
|
||||||
|
- `CODE_SERVER_HOST` environment variable.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.82.2. This includes an update to Node 18, which also means
|
||||||
|
that the minimum glibc is now 2.28. If you need to maintain a lower glibc then
|
||||||
|
you can take a version of Node 18 that is compiled with a lower glibc and use
|
||||||
|
that to build code-server (or at a minimum rebuild the native modules).
|
||||||
|
- Display paths to config files in full rather than abbreviated. If you have
|
||||||
|
trouble with the password not working please update and make sure the
|
||||||
|
displayed config paths are what you expect.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix some dependency issues for the standalone arm64 and armv7l releases. If
|
||||||
|
you had issues with missing or failing modules please try these new builds.
|
||||||
|
|
||||||
## [4.16.1](https://github.com/coder/code-server/releases/tag/v4.16.1) - 2023-07-31
|
## [4.16.1](https://github.com/coder/code-server/releases/tag/v4.16.1) - 2023-07-31
|
||||||
|
|
||||||
Code v1.80.2
|
Code v1.80.2
|
||||||
@@ -274,7 +308,7 @@ Code v1.71.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Add flags --unsafe-perm --legacy-peer-deps in `npm-postinstsall.sh` which ensures installing with npm works correctly
|
- Add flags --unsafe-perm --legacy-peer-deps in `npm-postinstall.sh` which ensures installing with npm works correctly
|
||||||
|
|
||||||
## [4.6.1](https://github.com/coder/code-server/releases/tag/v4.6.1) - 2022-09-31
|
## [4.6.1](https://github.com/coder/code-server/releases/tag/v4.6.1) - 2022-09-31
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ main() {
|
|||||||
release_archive() {
|
release_archive() {
|
||||||
local release_name="code-server-$VERSION-$OS-$ARCH"
|
local release_name="code-server-$VERSION-$OS-$ARCH"
|
||||||
if [[ $OS == "linux" ]]; then
|
if [[ $OS == "linux" ]]; then
|
||||||
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
|
tar -czf "release-packages/$release_name.tar.gz" --owner=0 --group=0 --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
|
||||||
else
|
else
|
||||||
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone
|
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ main() {
|
|||||||
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
|
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
|
||||||
RELEASE_PATH+=-standalone
|
RELEASE_PATH+=-standalone
|
||||||
|
|
||||||
# We cannot find the path to node from $PATH because yarn shims a script to ensure
|
# We cannot get the path to Node from $PATH (for example via `which node`)
|
||||||
# we use the same version it's using so we instead run a script with yarn that
|
# because Yarn shims a script called `node` and we would end up just copying
|
||||||
# will print the path to node.
|
# that script. Instead we run Node and have it print its actual path.
|
||||||
local node_path
|
local node_path
|
||||||
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
|
node_path="$(node <<< 'console.info(process.execPath)')"
|
||||||
|
|
||||||
mkdir -p "$RELEASE_PATH/bin"
|
mkdir -p "$RELEASE_PATH/bin"
|
||||||
mkdir -p "$RELEASE_PATH/lib"
|
mkdir -p "$RELEASE_PATH/lib"
|
||||||
|
|||||||
@@ -40,6 +40,16 @@ main() {
|
|||||||
|
|
||||||
source ./ci/lib.sh
|
source ./ci/lib.sh
|
||||||
|
|
||||||
|
# Set the commit Code will embed into the product.json. We need to do this
|
||||||
|
# since Code tries to get the commit from the `.git` directory which will fail
|
||||||
|
# as it is a submodule.
|
||||||
|
#
|
||||||
|
# Also, we use code-server's commit rather than VS Code's otherwise it would
|
||||||
|
# not update when only our patch files change, and that will cause caching
|
||||||
|
# issues where the browser keeps using outdated code.
|
||||||
|
export BUILD_SOURCEVERSION
|
||||||
|
BUILD_SOURCEVERSION=$(git rev-parse HEAD)
|
||||||
|
|
||||||
pushd lib/vscode
|
pushd lib/vscode
|
||||||
|
|
||||||
if [[ ! ${VERSION-} ]]; then
|
if [[ ! ${VERSION-} ]]; then
|
||||||
@@ -48,14 +58,11 @@ main() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the commit Code will embed into the product.json. We need to do this
|
# Add the date, our name, links, enable telemetry (this just makes telemetry
|
||||||
# since Code tries to get the commit from the `.git` directory which will fail
|
# available; telemetry can still be disabled by flag or setting), and
|
||||||
# as it is a submodule.
|
# configure trusted extensions (since some, like github.copilot-chat, never
|
||||||
export BUILD_SOURCEVERSION
|
# ask to be trusted and this is the only way to get auth working).
|
||||||
BUILD_SOURCEVERSION=$(git rev-parse HEAD)
|
#
|
||||||
|
|
||||||
# Add the date, our name, links, and enable telemetry (this just makes
|
|
||||||
# telemetry available; telemetry can still be disabled by flag or setting).
|
|
||||||
# This needs to be done before building as Code will read this file and embed
|
# This needs to be done before building as Code will read this file and embed
|
||||||
# it into the client-side code.
|
# it into the client-side code.
|
||||||
git checkout product.json # Reset in case the script exited early.
|
git checkout product.json # Reset in case the script exited early.
|
||||||
@@ -89,6 +96,11 @@ main() {
|
|||||||
"linkProtectionTrustedDomains": [
|
"linkProtectionTrustedDomains": [
|
||||||
"https://open-vsx.org"
|
"https://open-vsx.org"
|
||||||
],
|
],
|
||||||
|
"trustedExtensionAuthAccess": [
|
||||||
|
"vscode.git", "vscode.github",
|
||||||
|
"github.vscode-pull-request-github",
|
||||||
|
"github.copilot", "github.copilot-chat"
|
||||||
|
],
|
||||||
"aiConfig": {
|
"aiConfig": {
|
||||||
"ariaKey": "code-server"
|
"ariaKey": "code-server"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.12.1
|
version: 3.13.1
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 4.16.1
|
appVersion: 4.17.1
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: codercom/code-server
|
repository: codercom/code-server
|
||||||
tag: '4.16.1'
|
tag: '4.17.1'
|
||||||
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
|
||||||
|
|||||||
@@ -177,10 +177,10 @@ If you own a marketplace that implements the VS Code Extension Gallery API, you
|
|||||||
can point code-server to it by setting `$EXTENSIONS_GALLERY`.
|
can point code-server to it by setting `$EXTENSIONS_GALLERY`.
|
||||||
This corresponds directly with the `extensionsGallery` entry in in VS Code's `product.json`.
|
This corresponds directly with the `extensionsGallery` entry in in VS Code's `product.json`.
|
||||||
|
|
||||||
For example, to use the legacy Coder extensions marketplace:
|
For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export EXTENSIONS_GALLERY='{"serviceUrl": "https://extensions.coder.com/api"}'
|
export EXTENSIONS_GALLERY='{"serviceUrl": "https://my-extensions/api"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
Though you can technically use Microsoft's marketplace in this manner, we
|
Though you can technically use Microsoft's marketplace in this manner, we
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ At this point, you should be able to access code-server via
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:8080/;
|
proxy_pass http://localhost:8080/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection upgrade;
|
proxy_set_header Connection upgrade;
|
||||||
proxy_set_header Accept-Encoding gzip;
|
proxy_set_header Accept-Encoding gzip;
|
||||||
|
|||||||
Submodule lib/vscode updated: abd2f3db4b...f1b07bd25d
@@ -265,15 +265,35 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
|||||||
}
|
}
|
||||||
|
|
||||||
private startListening(): void {
|
private startListening(): void {
|
||||||
@@ -569,7 +570,7 @@ function readCookie(name: string): strin
|
@@ -550,17 +551,6 @@ class WorkspaceProvider implements IWork
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-function readCookie(name: string): string | undefined {
|
||||||
|
- const cookies = document.cookie.split('; ');
|
||||||
|
- for (const cookie of cookies) {
|
||||||
|
- if (cookie.startsWith(name + '=')) {
|
||||||
|
- return cookie.substring(name.length + 1);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return undefined;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
// Find config by checking for DOM
|
||||||
|
@@ -569,8 +559,8 @@ function readCookie(name: string): strin
|
||||||
if (!configElement || !configElementAttribute) {
|
if (!configElement || !configElementAttribute) {
|
||||||
throw new Error('Missing web configuration element');
|
throw new Error('Missing web configuration element');
|
||||||
}
|
}
|
||||||
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute);
|
- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute);
|
||||||
|
- const secretStorageKeyPath = readCookie('vscode-secret-key-path');
|
||||||
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host }
|
+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host }
|
||||||
const secretStorageKeyPath = readCookie('vscode-secret-key-path');
|
+ const secretStorageKeyPath = (window.location.pathname + "/mint-key").replace(/\/\/+/g, "/");
|
||||||
const secretStorageCrypto = secretStorageKeyPath && ServerKeyedAESCrypto.supported()
|
const secretStorageCrypto = secretStorageKeyPath && ServerKeyedAESCrypto.supported()
|
||||||
? new ServerKeyedAESCrypto(secretStorageKeyPath) : new TransparentCrypto();
|
? new ServerKeyedAESCrypto(secretStorageKeyPath) : new TransparentCrypto();
|
||||||
|
|
||||||
Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
|
Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
Modify VS Code dependencies
|
|
||||||
|
|
||||||
1. Kerberos: this is not building in our cross-compile step. It does not look
|
|
||||||
like something code-server uses right now anyway.
|
|
||||||
|
|
||||||
Index: code-server/lib/vscode/remote/package.json
|
|
||||||
===================================================================
|
|
||||||
--- code-server.orig/lib/vscode/remote/package.json
|
|
||||||
+++ code-server/lib/vscode/remote/package.json
|
|
||||||
@@ -18,7 +18,6 @@
|
|
||||||
"http-proxy-agent": "^2.1.0",
|
|
||||||
"https-proxy-agent": "^2.2.3",
|
|
||||||
"jschardet": "3.0.0",
|
|
||||||
- "kerberos": "^2.0.1",
|
|
||||||
"keytar": "7.9.0",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"native-watchdog": "^1.4.1",
|
|
||||||
Index: code-server/lib/vscode/remote/yarn.lock
|
|
||||||
===================================================================
|
|
||||||
--- code-server.orig/lib/vscode/remote/yarn.lock
|
|
||||||
+++ code-server/lib/vscode/remote/yarn.lock
|
|
||||||
@@ -454,15 +454,6 @@ jschardet@3.0.0:
|
|
||||||
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-3.0.0.tgz#898d2332e45ebabbdb6bf2feece9feea9a99e882"
|
|
||||||
integrity sha512-lJH6tJ77V8Nzd5QWRkFYCLc13a3vADkh3r/Fi8HupZGWk2OVVDfnZP8V/VgQgZ+lzW0kG2UGb5hFgt3V3ndotQ==
|
|
||||||
|
|
||||||
-kerberos@^2.0.1:
|
|
||||||
- version "2.0.1"
|
|
||||||
- resolved "https://registry.yarnpkg.com/kerberos/-/kerberos-2.0.1.tgz#663b0b46883b4da84495f60f2e9e399a43a33ef5"
|
|
||||||
- integrity sha512-O/jIgbdGK566eUhFwIcgalbqirYU/r76MW7/UFw06Fd9x5bSwgyZWL/Vm26aAmezQww/G9KYkmmJBkEkPk5HLw==
|
|
||||||
- dependencies:
|
|
||||||
- bindings "^1.5.0"
|
|
||||||
- node-addon-api "^4.3.0"
|
|
||||||
- prebuild-install "7.1.1"
|
|
||||||
-
|
|
||||||
keytar@7.9.0:
|
|
||||||
version "7.9.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.9.0.tgz#4c6225708f51b50cbf77c5aae81721964c2918cb"
|
|
||||||
@@ -604,24 +595,6 @@ picomatch@^2.3.1:
|
|
||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
|
||||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
|
||||||
|
|
||||||
-prebuild-install@7.1.1:
|
|
||||||
- version "7.1.1"
|
|
||||||
- resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
|
|
||||||
- integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==
|
|
||||||
- dependencies:
|
|
||||||
- detect-libc "^2.0.0"
|
|
||||||
- expand-template "^2.0.3"
|
|
||||||
- github-from-package "0.0.0"
|
|
||||||
- minimist "^1.2.3"
|
|
||||||
- mkdirp-classic "^0.5.3"
|
|
||||||
- napi-build-utils "^1.0.1"
|
|
||||||
- node-abi "^3.3.0"
|
|
||||||
- pump "^3.0.0"
|
|
||||||
- rc "^1.2.7"
|
|
||||||
- simple-get "^4.0.0"
|
|
||||||
- tar-fs "^2.0.0"
|
|
||||||
- tunnel-agent "^0.6.0"
|
|
||||||
-
|
|
||||||
prebuild-install@^7.0.1:
|
|
||||||
version "7.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.0.1.tgz#c10075727c318efe72412f333e0ef625beaf3870"
|
|
||||||
@@ -12,7 +12,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
|
||||||
@@ -288,6 +288,11 @@ export interface IWorkbenchConstructionO
|
@@ -281,6 +281,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly userDataPath?: string
|
readonly userDataPath?: string
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,24 @@ 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
|
||||||
@@ -231,6 +231,9 @@ export async function setupServerService
|
@@ -11,7 +11,7 @@ import * as path from 'vs/base/common/pa
|
||||||
|
import { IURITransformer } from 'vs/base/common/uriIpc';
|
||||||
|
import { getMachineId } from 'vs/base/node/id';
|
||||||
|
import { Promises } from 'vs/base/node/pfs';
|
||||||
|
-import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from 'vs/base/parts/ipc/common/ipc';
|
||||||
|
+import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, ProxyChannel, StaticRouter } from 'vs/base/parts/ipc/common/ipc';
|
||||||
|
import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net';
|
||||||
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
|
import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
|
||||||
|
@@ -227,6 +227,9 @@ export async function setupServerService
|
||||||
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority));
|
||||||
socketServer.registerChannel('extensions', channel);
|
socketServer.registerChannel('extensions', channel);
|
||||||
|
|
||||||
+ const languagePackChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(ILanguagePackService));
|
+ const languagePackChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(ILanguagePackService), disposables);
|
||||||
+ socketServer.registerChannel('languagePacks', languagePackChannel);
|
+ socketServer.registerChannel('languagePacks', languagePackChannel);
|
||||||
+
|
+
|
||||||
const credentialsChannel = ProxyChannel.fromService<RemoteAgentConnectionContext>(accessor.get(ICredentialsMainService));
|
// clean up extensions folder
|
||||||
socketServer.registerChannel('credentials', credentialsChannel);
|
remoteExtensionsScanner.whenExtensionsReady().then(() => extensionManagementService.cleanUp());
|
||||||
|
|
||||||
Index: code-server/lib/vscode/src/vs/base/common/platform.ts
|
Index: code-server/lib/vscode/src/vs/base/common/platform.ts
|
||||||
===================================================================
|
===================================================================
|
||||||
@@ -252,7 +261,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
+++ code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
||||||
@@ -52,7 +52,7 @@ import 'vs/workbench/services/dialogs/br
|
@@ -50,7 +50,7 @@ import 'vs/workbench/services/dialogs/br
|
||||||
import 'vs/workbench/services/host/browser/browserHostService';
|
import 'vs/workbench/services/host/browser/browserHostService';
|
||||||
import 'vs/workbench/services/lifecycle/browser/lifecycleService';
|
import 'vs/workbench/services/lifecycle/browser/lifecycleService';
|
||||||
import 'vs/workbench/services/clipboard/browser/clipboardService';
|
import 'vs/workbench/services/clipboard/browser/clipboardService';
|
||||||
@@ -261,7 +270,7 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
|
|||||||
import 'vs/workbench/services/path/browser/pathService';
|
import 'vs/workbench/services/path/browser/pathService';
|
||||||
import 'vs/workbench/services/themes/browser/browserHostColorSchemeService';
|
import 'vs/workbench/services/themes/browser/browserHostColorSchemeService';
|
||||||
import 'vs/workbench/services/encryption/browser/encryptionService';
|
import 'vs/workbench/services/encryption/browser/encryptionService';
|
||||||
@@ -117,8 +117,9 @@ registerSingleton(ILanguagePackService,
|
@@ -115,8 +115,9 @@ registerSingleton(ILanguagePackService,
|
||||||
// Logs
|
// Logs
|
||||||
import 'vs/workbench/contrib/logs/browser/logs.contribution';
|
import 'vs/workbench/contrib/logs/browser/logs.contribution';
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -293,6 +293,11 @@ export interface IWorkbenchConstructionO
|
@@ -286,6 +286,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly isEnabledFileDownloads?: boolean
|
readonly isEnabledFileDownloads?: boolean
|
||||||
|
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
Add the ability to provide a GitHub token
|
|
||||||
|
|
||||||
To test install the GitHub PR extension and start code-server with GITHUB_TOKEN
|
|
||||||
or set github-auth in the config file. The extension should be authenticated.
|
|
||||||
|
|
||||||
Index: code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
|
|
||||||
===================================================================
|
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
|
|
||||||
+++ code-server/lib/vscode/src/vs/platform/credentials/node/credentialsMainService.ts
|
|
||||||
@@ -5,9 +5,18 @@
|
|
||||||
|
|
||||||
import { InMemoryCredentialsProvider } from 'vs/platform/credentials/common/credentials';
|
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
|
||||||
-import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
|
|
||||||
+import { IServerEnvironmentService } from 'vs/server/node/serverEnvironmentService';
|
|
||||||
import { IProductService } from 'vs/platform/product/common/productService';
|
|
||||||
import { BaseCredentialsMainService, KeytarModule } from 'vs/platform/credentials/common/credentialsMainService';
|
|
||||||
+import { generateUuid } from 'vs/base/common/uuid';
|
|
||||||
+import { equals as arrayEquals } from 'vs/base/common/arrays';
|
|
||||||
+
|
|
||||||
+interface IToken {
|
|
||||||
+ accessToken: string
|
|
||||||
+ account?: { label: string }
|
|
||||||
+ id: string
|
|
||||||
+ scopes: string[]
|
|
||||||
+}
|
|
||||||
|
|
||||||
export class CredentialsWebMainService extends BaseCredentialsMainService {
|
|
||||||
// Since we fallback to the in-memory credentials provider, we do not need to surface any Keytar load errors
|
|
||||||
@@ -16,10 +25,15 @@ export class CredentialsWebMainService e
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
@ILogService logService: ILogService,
|
|
||||||
- @INativeEnvironmentService private readonly environmentMainService: INativeEnvironmentService,
|
|
||||||
+ @IServerEnvironmentService private readonly environmentMainService: IServerEnvironmentService,
|
|
||||||
@IProductService private readonly productService: IProductService,
|
|
||||||
) {
|
|
||||||
super(logService);
|
|
||||||
+ if (this.environmentMainService.args["github-auth"]) {
|
|
||||||
+ this.storeGitHubToken(this.environmentMainService.args["github-auth"]).catch((error) => {
|
|
||||||
+ this.logService.error('Failed to store provided GitHub token', error)
|
|
||||||
+ })
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the credentials service is running on the server, we add a suffix -server to differentiate from the location that the
|
|
||||||
@@ -48,4 +62,59 @@ export class CredentialsWebMainService e
|
|
||||||
}
|
|
||||||
return this._keytarCache;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ private async storeGitHubToken(githubToken: string): Promise<void> {
|
|
||||||
+ const extensionId = 'vscode.github-authentication';
|
|
||||||
+ const service = `${await this.getSecretStoragePrefix()}${extensionId}`;
|
|
||||||
+ const account = 'github.auth';
|
|
||||||
+ const scopes = [['read:user', 'user:email', 'repo']]
|
|
||||||
+
|
|
||||||
+ // Oddly the scopes need to match exactly so we cannot just have one token
|
|
||||||
+ // with all the scopes, instead we have to duplicate the token for each
|
|
||||||
+ // expected set of scopes.
|
|
||||||
+ const tokens: IToken[] = scopes.map((scopes) => ({
|
|
||||||
+ id: generateUuid(),
|
|
||||||
+ scopes: scopes.sort(), // Sort for comparing later.
|
|
||||||
+ accessToken: githubToken,
|
|
||||||
+ }));
|
|
||||||
+
|
|
||||||
+ const raw = await this.getPassword(service, account)
|
|
||||||
+
|
|
||||||
+ let existing: {
|
|
||||||
+ content: IToken[]
|
|
||||||
+ } | undefined;
|
|
||||||
+
|
|
||||||
+ if (raw) {
|
|
||||||
+ try {
|
|
||||||
+ const json = JSON.parse(raw);
|
|
||||||
+ json.content = JSON.parse(json.content);
|
|
||||||
+ existing = json;
|
|
||||||
+ } catch (error) {
|
|
||||||
+ this.logService.error('Failed to parse existing GitHub credentials', error)
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // Keep tokens for account and scope combinations we do not have in case
|
|
||||||
+ // there is an extension that uses scopes we have not accounted for (in
|
|
||||||
+ // these cases the user will need to manually authenticate the extension
|
|
||||||
+ // through the UI) or the user has tokens for other accounts.
|
|
||||||
+ if (existing?.content) {
|
|
||||||
+ existing.content = existing.content.filter((existingToken) => {
|
|
||||||
+ const scopes = existingToken.scopes.sort();
|
|
||||||
+ return !(tokens.find((token) => {
|
|
||||||
+ return arrayEquals(scopes, token.scopes)
|
|
||||||
+ && token.account?.label === existingToken.account?.label;
|
|
||||||
+ }))
|
|
||||||
+ })
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return this.setPassword(service, account, JSON.stringify({
|
|
||||||
+ extensionId,
|
|
||||||
+ ...(existing || {}),
|
|
||||||
+ content: JSON.stringify([
|
|
||||||
+ ...tokens,
|
|
||||||
+ ...(existing?.content || []),
|
|
||||||
+ ])
|
|
||||||
+ }));
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
@@ -176,15 +176,15 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
+++ code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
|
||||||
@@ -67,6 +67,7 @@ import { IndexedDB } from 'vs/base/brows
|
@@ -65,6 +65,7 @@ import { mixin, safeStringify } from 'vs
|
||||||
import { BrowserCredentialsService } from 'vs/workbench/services/credentials/browser/credentialsService';
|
import { IndexedDB } from 'vs/base/browser/indexedDB';
|
||||||
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
import { IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
|
||||||
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
|
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
|
||||||
+import { CodeServerClient } from 'vs/workbench/browser/client';
|
+import { CodeServerClient } from 'vs/workbench/browser/client';
|
||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||||
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
|
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
|
||||||
@@ -132,6 +133,9 @@ export class BrowserMain extends Disposa
|
@@ -130,6 +131,9 @@ export class BrowserMain extends Disposa
|
||||||
// Startup
|
// Startup
|
||||||
const instantiationService = workbench.startup();
|
const instantiationService = workbench.startup();
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,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
|
||||||
@@ -283,6 +283,11 @@ export interface IWorkbenchConstructionO
|
@@ -276,6 +276,11 @@ export interface IWorkbenchConstructionO
|
||||||
*/
|
*/
|
||||||
readonly configurationDefaults?: Record<string, any>;
|
readonly configurationDefaults?: Record<string, any>;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ in-between and has web extensions install directly from the marketplace.
|
|||||||
|
|
||||||
This can be tested by setting EXTENSIONS_GALLERY set to:
|
This can be tested by setting EXTENSIONS_GALLERY set to:
|
||||||
|
|
||||||
'{"serviceUrl": "https://extensions.coder.com/api"}'
|
'{"serviceUrl": "https://my-extensions/api"}'
|
||||||
|
|
||||||
|
|
||||||
Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ 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
|
||||||
@@ -260,10 +260,7 @@ function extensionDescriptionArrayToMap(
|
@@ -282,10 +282,7 @@ function extensionDescriptionArrayToMap(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
export function isProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): boolean {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
|
|||||||
import type { IURLCallbackProvider } from 'vs/workbench/services/url/browser/urlService';
|
import type { IURLCallbackProvider } from 'vs/workbench/services/url/browser/urlService';
|
||||||
import { create } from 'vs/workbench/workbench.web.main';
|
import { create } from 'vs/workbench/workbench.web.main';
|
||||||
|
|
||||||
@@ -582,6 +583,39 @@ function readCookie(name: string): strin
|
@@ -571,6 +572,39 @@ class WorkspaceProvider implements IWork
|
||||||
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
|
||||||
workspaceProvider: WorkspaceProvider.create(config),
|
workspaceProvider: WorkspaceProvider.create(config),
|
||||||
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
|
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
|
||||||
|
|||||||
@@ -66,3 +66,17 @@ Index: code-server/lib/vscode/build/lib/tsb/transpiler.ts
|
|||||||
loose: false,
|
loose: false,
|
||||||
minify: {
|
minify: {
|
||||||
compress: false,
|
compress: false,
|
||||||
|
Index: code-server/lib/vscode/src/vs/base/common/tfIdf.ts
|
||||||
|
===================================================================
|
||||||
|
--- code-server.orig/lib/vscode/src/vs/base/common/tfIdf.ts
|
||||||
|
+++ code-server/lib/vscode/src/vs/base/common/tfIdf.ts
|
||||||
|
@@ -88,8 +88,7 @@ export class TfIdfCalculator {
|
||||||
|
for (const [word] of input.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)) {
|
||||||
|
yield normalize(word);
|
||||||
|
|
||||||
|
- // eslint-disable-next-line local/code-no-look-behind-regex
|
||||||
|
- const camelParts = word.split(/(?<=[a-z])(?=[A-Z])/g);
|
||||||
|
+ const camelParts = word.split(/(?=[A-Z])/g);
|
||||||
|
if (camelParts.length > 1) {
|
||||||
|
for (const part of camelParts) {
|
||||||
|
// Require at least 3 letters in the parts of a camel case word
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ update-check.diff
|
|||||||
logout.diff
|
logout.diff
|
||||||
store-socket.diff
|
store-socket.diff
|
||||||
proxy-uri.diff
|
proxy-uri.diff
|
||||||
github-auth.diff
|
|
||||||
unique-db.diff
|
unique-db.diff
|
||||||
local-storage.diff
|
local-storage.diff
|
||||||
service-worker.diff
|
service-worker.diff
|
||||||
|
|||||||
@@ -12,23 +12,23 @@ 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
|
||||||
@@ -67,6 +67,7 @@ import { IExtensionsScannerService } fro
|
@@ -65,6 +65,7 @@ import { IExtensionsScannerService } fro
|
||||||
import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService';
|
import { ExtensionsScannerService } from 'vs/server/node/extensionsScannerService';
|
||||||
import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService';
|
import { IExtensionsProfileScannerService } from 'vs/platform/extensionManagement/common/extensionsProfileScannerService';
|
||||||
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
|
import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
|
||||||
+import { TelemetryClient } from "vs/server/node/telemetryClient";
|
+import { TelemetryClient } from 'vs/server/node/telemetryClient';
|
||||||
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
import { NullPolicyService } from 'vs/platform/policy/common/policy';
|
||||||
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
|
||||||
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
import { LoggerService } from 'vs/platform/log/node/loggerService';
|
||||||
@@ -150,7 +151,10 @@ export async function setupServerService
|
@@ -148,7 +149,10 @@ export async function setupServerService
|
||||||
let oneDsAppender: ITelemetryAppender = NullAppender;
|
let oneDsAppender: ITelemetryAppender = NullAppender;
|
||||||
const isInternal = isInternalTelemetry(productService, configurationService);
|
const isInternal = isInternalTelemetry(productService, configurationService);
|
||||||
if (supportsTelemetry(productService, environmentService)) {
|
if (supportsTelemetry(productService, environmentService)) {
|
||||||
- if (productService.aiConfig && productService.aiConfig.ariaKey) {
|
- if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
|
||||||
+ const telemetryEndpoint = process.env.CS_TELEMETRY_URL || "https://v1.telemetry.coder.com/track";
|
+ const telemetryEndpoint = process.env.CS_TELEMETRY_URL || "https://v1.telemetry.coder.com/track";
|
||||||
+ if (telemetryEndpoint) {
|
+ if (telemetryEndpoint) {
|
||||||
+ oneDsAppender = new OneDataSystemAppender(requestService, false, eventPrefix, null, () => new TelemetryClient(telemetryEndpoint));
|
+ oneDsAppender = new OneDataSystemAppender(requestService, false, eventPrefix, null, () => new TelemetryClient(telemetryEndpoint));
|
||||||
+ } else if (productService.aiConfig && productService.aiConfig.ariaKey) {
|
+ } else if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
|
||||||
oneDsAppender = new OneDataSystemAppender(requestService, isInternal, eventPrefix, null, productService.aiConfig.ariaKey);
|
oneDsAppender = new OneDataSystemAppender(requestService, isInternal, eventPrefix, null, productService.aiConfig.ariaKey);
|
||||||
disposables.add(toDisposable(() => oneDsAppender?.flush())); // Ensure the AI appender is disposed so that it flushes remaining data
|
disposables.add(toDisposable(() => oneDsAppender?.flush())); // Ensure the AI appender is disposed so that it flushes remaining data
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { logger } from "@coder/logger"
|
import { logger } from "@coder/logger"
|
||||||
|
import * as crypto from "crypto"
|
||||||
import * as express from "express"
|
import * as express from "express"
|
||||||
|
import { promises as fs } from "fs"
|
||||||
import * as http from "http"
|
import * as http from "http"
|
||||||
import * as net from "net"
|
import * as net from "net"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
@@ -32,6 +34,7 @@ export class CodeServerRouteWrapper {
|
|||||||
private _wsRouterWrapper = WsRouter()
|
private _wsRouterWrapper = WsRouter()
|
||||||
private _socketProxyProvider = new SocketProxyProvider()
|
private _socketProxyProvider = new SocketProxyProvider()
|
||||||
public router = express.Router()
|
public router = express.Router()
|
||||||
|
private mintKeyPromise: Promise<Buffer> | undefined
|
||||||
|
|
||||||
public get wsRouter() {
|
public get wsRouter() {
|
||||||
return this._wsRouterWrapper.router
|
return this._wsRouterWrapper.router
|
||||||
@@ -52,6 +55,7 @@ export class CodeServerRouteWrapper {
|
|||||||
short_name: appName,
|
short_name: appName,
|
||||||
start_url: ".",
|
start_url: ".",
|
||||||
display: "fullscreen",
|
display: "fullscreen",
|
||||||
|
display_override: ["window-controls-overlay"],
|
||||||
description: "Run Code on a remote server.",
|
description: "Run Code on a remote server.",
|
||||||
icons: [192, 512].map((size) => ({
|
icons: [192, 512].map((size) => ({
|
||||||
src: `{{BASE}}/_static/src/browser/media/pwa-icon-${size}.png`,
|
src: `{{BASE}}/_static/src/browser/media/pwa-icon-${size}.png`,
|
||||||
@@ -66,6 +70,33 @@ export class CodeServerRouteWrapper {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private mintKey: express.Handler = async (req, res, next) => {
|
||||||
|
if (!this.mintKeyPromise) {
|
||||||
|
this.mintKeyPromise = new Promise(async (resolve) => {
|
||||||
|
const keyPath = path.join(req.args["user-data-dir"], "serve-web-key-half")
|
||||||
|
logger.debug(`Reading server web key half from ${keyPath}`)
|
||||||
|
try {
|
||||||
|
resolve(await fs.readFile(keyPath))
|
||||||
|
return
|
||||||
|
} catch (error: any) {
|
||||||
|
if (error.code !== "ENOENT") {
|
||||||
|
logError(logger, `read ${keyPath}`, error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// VS Code wants 256 bits.
|
||||||
|
const key = crypto.randomBytes(32)
|
||||||
|
try {
|
||||||
|
await fs.writeFile(keyPath, key)
|
||||||
|
} catch (error: any) {
|
||||||
|
logError(logger, `write ${keyPath}`, error)
|
||||||
|
}
|
||||||
|
resolve(key)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const key = await this.mintKeyPromise
|
||||||
|
res.end(key)
|
||||||
|
}
|
||||||
|
|
||||||
private $root: express.Handler = async (req, res, next) => {
|
private $root: express.Handler = async (req, res, next) => {
|
||||||
const isAuthenticated = await authenticated(req)
|
const isAuthenticated = await authenticated(req)
|
||||||
const NO_FOLDER_OR_WORKSPACE_QUERY = !req.query.folder && !req.query.workspace
|
const NO_FOLDER_OR_WORKSPACE_QUERY = !req.query.folder && !req.query.workspace
|
||||||
@@ -173,6 +204,7 @@ export class CodeServerRouteWrapper {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.router.get("/", this.ensureCodeServerLoaded, this.$root)
|
this.router.get("/", this.ensureCodeServerLoaded, this.$root)
|
||||||
this.router.get("/manifest.json", this.manifest)
|
this.router.get("/manifest.json", this.manifest)
|
||||||
|
this.router.post("/mint-key", this.mintKey)
|
||||||
this.router.all("*", ensureAuthenticated, this.ensureCodeServerLoaded, this.$proxyRequest)
|
this.router.all("*", ensureAuthenticated, this.ensureCodeServerLoaded, this.$proxyRequest)
|
||||||
this._wsRouterWrapper.ws("*", ensureOrigin, ensureAuthenticated, this.ensureCodeServerLoaded, this.$proxyWebsocket)
|
this._wsRouterWrapper.ws("*", ensureOrigin, ensureAuthenticated, this.ensureCodeServerLoaded, this.$proxyWebsocket)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,9 +292,9 @@
|
|||||||
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
|
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
|
||||||
|
|
||||||
"@types/node@*", "@types/node@^18.0.0":
|
"@types/node@*", "@types/node@^18.0.0":
|
||||||
version "18.17.18"
|
version "18.18.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.18.tgz#acae19ad9011a2ab3d792232501c95085ba1838f"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.1.tgz#80b22f3df719f15c9736207980e95f35d01ec1aa"
|
||||||
integrity sha512-/4QOuy3ZpV7Ya1GTRz5CYSz3DgkKpyUptXuQ5PPce7uuyJAOR7r9FhkmxJfvcNUXyklbC63a+YvB3jxy7s9ngw==
|
integrity sha512-3G42sxmm0fF2+Vtb9TJQpnjmP+uKlWvFa8KoEGquh4gqRmoUG/N0ufuhikw6HEsdG2G2oIKhog1GCTfz9v5NdQ==
|
||||||
|
|
||||||
"@types/pem@^1.14.1":
|
"@types/pem@^1.14.1":
|
||||||
version "1.14.1"
|
version "1.14.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user