Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3773c11f1 | ||
|
|
48f7c27248 | ||
|
|
06b387fe98 | ||
|
|
4cf81d88a7 | ||
|
|
79d1e179f8 | ||
|
|
c00f931500 | ||
|
|
fd5c5960c2 | ||
|
|
ab081cd522 | ||
|
|
e2789608b2 | ||
|
|
85ad7e4fb4 | ||
|
|
cb9c5b2d49 | ||
|
|
d4ef7c1412 | ||
|
|
5815b4a0c0 | ||
|
|
bdb670e852 | ||
|
|
11d7932968 | ||
|
|
02a77b528b | ||
|
|
206f195c1c | ||
|
|
2c2a6498af | ||
|
|
7ab47b3d83 | ||
|
|
9a3b9fcac2 | ||
|
|
b88163392c | ||
|
|
c7cad402b4 | ||
|
|
8dfac0fb65 | ||
|
|
90caca3336 | ||
|
|
80bcfd918b |
2
.github/issue_template.md
vendored
2
.github/issue_template.md
vendored
@@ -1,4 +1,4 @@
|
|||||||
<!--
|
<!--
|
||||||
Please file all questions and support requests at https://www.reddit.com/r/codeserver/
|
Please file all questions and support requests at https://www.reddit.com/r/codeserver/
|
||||||
The issue tracker is only for bugs.
|
The issue tracker is only for bugs and features.
|
||||||
-->
|
-->
|
||||||
|
|||||||
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/fmt.sh
|
- name: Run ./ci/steps/fmt.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/fmt.sh
|
args: ./ci/steps/fmt.sh
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/lint.sh
|
- name: Run ./ci/steps/lint.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/lint.sh
|
args: ./ci/steps/lint.sh
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/test.sh
|
- name: Run ./ci/steps/test.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/test.sh
|
args: ./ci/steps/test.sh
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/release.sh
|
- name: Run ./ci/steps/release.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/release.sh
|
args: ./ci/steps/release.sh
|
||||||
- name: Upload npm package artifact
|
- name: Upload npm package artifact
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release-npm-package
|
path: ./release-npm-package
|
||||||
- name: Run ./ci/steps/release-packages.sh
|
- name: Run ./ci/steps/release-packages.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/centos7
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/release-packages.sh
|
args: ./ci/steps/release-packages.sh
|
||||||
- name: Upload release artifacts
|
- name: Upload release artifacts
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release-npm-package
|
path: ./release-npm-package
|
||||||
- name: Run ./ci/steps/release-packages.sh
|
- name: Run ./ci/steps/release-packages.sh
|
||||||
uses: ./ci/container/arm64
|
uses: ./ci/images/centos7
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/release-packages.sh
|
args: ./ci/steps/release-packages.sh
|
||||||
- name: Upload release artifacts
|
- name: Upload release artifacts
|
||||||
@@ -94,8 +94,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release-npm-package
|
path: ./release-npm-package
|
||||||
- run: brew unlink node@12
|
|
||||||
- run: brew install node
|
|
||||||
- run: ./ci/steps/release-packages.sh
|
- run: ./ci/steps/release-packages.sh
|
||||||
env:
|
env:
|
||||||
# Otherwise we get rate limited when fetching the ripgrep binary.
|
# Otherwise we get rate limited when fetching the ripgrep binary.
|
||||||
@@ -118,7 +116,7 @@ jobs:
|
|||||||
name: release-packages
|
name: release-packages
|
||||||
path: ./release-packages
|
path: ./release-packages
|
||||||
- name: Run ./ci/steps/build-docker-image.sh
|
- name: Run ./ci/steps/build-docker-image.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/build-docker-image.sh
|
args: ./ci/steps/build-docker-image.sh
|
||||||
- name: Upload release image
|
- name: Upload release image
|
||||||
@@ -138,7 +136,7 @@ jobs:
|
|||||||
name: release-packages
|
name: release-packages
|
||||||
path: ./release-packages
|
path: ./release-packages
|
||||||
- name: Run ./ci/steps/build-docker-image.sh
|
- name: Run ./ci/steps/build-docker-image.sh
|
||||||
uses: ./ci/container/arm64
|
uses: ./ci/images/centos7
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/build-docker-image.sh
|
args: ./ci/steps/build-docker-image.sh
|
||||||
- name: Upload release image
|
- name: Upload release image
|
||||||
|
|||||||
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/publish-npm.sh
|
- name: Run ./ci/steps/publish-npm.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/publish-npm.sh
|
args: ./ci/steps/publish-npm.sh
|
||||||
env:
|
env:
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Run ./ci/steps/push-docker-manifest.sh
|
- name: Run ./ci/steps/push-docker-manifest.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/images/debian8
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/push-docker-manifest.sh
|
args: ./ci/steps/push-docker-manifest.sh
|
||||||
env:
|
env:
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@ release-packages/
|
|||||||
release-gcp/
|
release-gcp/
|
||||||
release-images/
|
release-images/
|
||||||
node_modules
|
node_modules
|
||||||
|
node-*
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ If you believe an install script used with `curl | sh` is insecure, please give
|
|||||||
|
|
||||||
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
|
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
|
||||||
|
|
||||||
|
We also highly recommend reading the [FAQ](./doc/FAQ.md) on the [Differences compared to VS Code](./doc/FAQ.md#differences-compared-to-vs-code).
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
See [./doc/FAQ.md](./doc/FAQ.md).
|
See [./doc/FAQ.md](./doc/FAQ.md).
|
||||||
|
|||||||
15
ci/README.md
15
ci/README.md
@@ -16,7 +16,7 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub)
|
|||||||
|
|
||||||
1. Update the version of code-server and make a PR.
|
1. Update the version of code-server and make a PR.
|
||||||
1. Update in `package.json`
|
1. Update in `package.json`
|
||||||
2. Update in [install.sh](../install.sh)
|
2. Update in [./doc/install.md](../doc/install.md)
|
||||||
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
|
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
|
||||||
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
|
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
|
||||||
the updated version.
|
the updated version.
|
||||||
@@ -35,12 +35,13 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub)
|
|||||||
10. Wait for the npm package to be published.
|
10. Wait for the npm package to be published.
|
||||||
11. Update the homebrew package.
|
11. Update the homebrew package.
|
||||||
- Send a pull request to [homebrew-core](https://github.com/Homebrew/homebrew-core) with the URL in the [formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/code-server.rb) updated.
|
- Send a pull request to [homebrew-core](https://github.com/Homebrew/homebrew-core) with the URL in the [formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/code-server.rb) updated.
|
||||||
|
12. Make sure to add a release without the `v` prefix for autoupdate from `3.2.0`.
|
||||||
|
|
||||||
## dev
|
## dev
|
||||||
|
|
||||||
This directory contains scripts used for the development of code-server.
|
This directory contains scripts used for the development of code-server.
|
||||||
|
|
||||||
- [./ci/dev/container](./dev/container)
|
- [./ci/dev/image](./dev/image)
|
||||||
- See [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container.
|
- See [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container.
|
||||||
- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`)
|
- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`)
|
||||||
- Runs formatters.
|
- Runs formatters.
|
||||||
@@ -104,17 +105,17 @@ You can disable minification by setting `MINIFY=`.
|
|||||||
- Post install script for the npm package.
|
- Post install script for the npm package.
|
||||||
- Bundled by`yarn release`.
|
- Bundled by`yarn release`.
|
||||||
|
|
||||||
## release-container
|
## release-image
|
||||||
|
|
||||||
This directory contains the release docker container.
|
This directory contains the release docker container image.
|
||||||
|
|
||||||
- [./release-container/build.sh](./release-container/build.sh)
|
- [./release-image/build.sh](./release-image/build.sh)
|
||||||
- Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`.
|
- Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`.
|
||||||
- Assumes debian releases are ready in `./release-packages`.
|
- Assumes debian releases are ready in `./release-packages`.
|
||||||
|
|
||||||
## container
|
## images
|
||||||
|
|
||||||
This directory contains the container for CI.
|
This directory contains the images for CI.
|
||||||
|
|
||||||
## steps
|
## steps
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,16 @@ 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" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
|
||||||
|
elif [[ $OS == "darwin" && $ARCH == "x86_64" ]]; then
|
||||||
|
# Just exists to make autoupdating from 3.2.0 work again.
|
||||||
|
mv ./release-standalone "./$release_name"
|
||||||
|
zip -r "release-packages/$release_name.zip" "./$release_name"
|
||||||
|
mv "./$release_name" ./release-standalone
|
||||||
|
return
|
||||||
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
|
||||||
|
|
||||||
echo "done (release-packages/$release_name)"
|
echo "done (release-packages/$release_name)"
|
||||||
|
|
||||||
release_gcp
|
release_gcp
|
||||||
|
|||||||
@@ -17,14 +17,6 @@ main() {
|
|||||||
mkdir -p "$RELEASE_PATH/bin"
|
mkdir -p "$RELEASE_PATH/bin"
|
||||||
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
||||||
rsync "$node_path" "$RELEASE_PATH/lib/node"
|
rsync "$node_path" "$RELEASE_PATH/lib/node"
|
||||||
if [[ $OS == "linux" ]]; then
|
|
||||||
bundle_dynamic_lib libstdc++
|
|
||||||
bundle_dynamic_lib libgcc_s
|
|
||||||
elif [[ $OS == "macos" ]]; then
|
|
||||||
bundle_dynamic_lib libicui18n
|
|
||||||
bundle_dynamic_lib libicuuc
|
|
||||||
bundle_dynamic_lib libicudata
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
|
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
|
||||||
ln -s "./lib/node" "$RELEASE_PATH/node"
|
ln -s "./lib/node" "$RELEASE_PATH/node"
|
||||||
@@ -33,17 +25,4 @@ main() {
|
|||||||
yarn --production --frozen-lockfile
|
yarn --production --frozen-lockfile
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle_dynamic_lib() {
|
|
||||||
local lib_name="$1"
|
|
||||||
local lib_path
|
|
||||||
|
|
||||||
if [[ $OS == "linux" ]]; then
|
|
||||||
lib_path="$(ldd "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $3 }')"
|
|
||||||
elif [[ $OS == "macos" ]]; then
|
|
||||||
lib_path="$(otool -L "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $1 }')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp "$lib_path" "$RELEASE_PATH/lib"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -1,25 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
# This script is intended to be bundled into the standalone releases.
|
# This script is intended to be bundled into the standalone releases.
|
||||||
# Runs code-server with the bundled node binary.
|
# Runs code-server with the bundled node binary.
|
||||||
|
|
||||||
# More complicated than readlink -f or realpath to support macOS.
|
_realpath() {
|
||||||
# See https://github.com/cdr/code-server/issues/1537
|
# See https://github.com/cdr/code-server/issues/1537 on why no realpath or readlink -f.
|
||||||
bin_dir() {
|
|
||||||
# We read the symlink, which may be relative from $0.
|
script="$1"
|
||||||
dst="$(readlink "$0")"
|
cd "$(dirname "$script")"
|
||||||
# We cd into the $0 directory.
|
|
||||||
cd "$(dirname "$0")" || exit 1
|
while [ -L "$(basename "$script")" ]; do
|
||||||
# Now we can cd into the dst directory.
|
if [ -L "./node" ] && [ -L "./code-server" ] &&
|
||||||
cd "$(dirname "$dst")" || exit 1
|
[ -f "package.json" ] &&
|
||||||
# Finally we use pwd -P to print the absolute path of the directory of $dst.
|
cat package.json | grep -q '^ "name": "code-server",$'; then
|
||||||
pwd -P || exit 1
|
echo "***** Please use the script in bin/code-server instead!" >&2
|
||||||
|
echo "***** This script will soon be removed!" >&2
|
||||||
|
echo "***** See the release notes at https://github.com/cdr/code-server/releases/tag/v3.4.0" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
script="$(readlink "$(basename "$script")")"
|
||||||
|
cd "$(dirname "$script")"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "$PWD/$(basename "$script")"
|
||||||
}
|
}
|
||||||
|
|
||||||
BIN_DIR=$(bin_dir)
|
root() {
|
||||||
if [ "$(uname)" = "Linux" ]; then
|
script="$(_realpath "$0")"
|
||||||
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
bin_dir="$(dirname "$script")"
|
||||||
elif [ "$(uname)" = "Darwin" ]; then
|
dirname "$bin_dir"
|
||||||
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}"
|
}
|
||||||
fi
|
|
||||||
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"
|
ROOT="$(root)"
|
||||||
|
exec "$ROOT/lib/node" "$ROOT" "$@"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ main() {
|
|||||||
source ./ci/lib.sh
|
source ./ci/lib.sh
|
||||||
|
|
||||||
download_artifact release-packages ./release-packages
|
download_artifact release-packages ./release-packages
|
||||||
local assets=(./release-packages/*)
|
local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.deb,.rpm})
|
||||||
for i in "${!assets[@]}"; do
|
for i in "${!assets[@]}"; do
|
||||||
assets[$i]="--attach=${assets[$i]}"
|
assets[$i]="--attach=${assets[$i]}"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ main() {
|
|||||||
./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
|
./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
|
||||||
local installed_extensions
|
local installed_extensions
|
||||||
installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
|
installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
|
||||||
if [[ $installed_extensions != "ms-python.python" ]]; then
|
if [[ $installed_extensions != "info Using config file ~/.config/code-server/config.yaml
|
||||||
|
ms-python.python" ]]; then
|
||||||
echo "Unexpected output from listing extensions:"
|
echo "Unexpected output from listing extensions:"
|
||||||
echo "$installed_extensions"
|
echo "$installed_extensions"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
FROM debian:9
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
# Needed for debian repositories added below.
|
|
||||||
RUN apt-get install -y curl gnupg
|
|
||||||
|
|
||||||
# Installs node.
|
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
||||||
apt-get install -y nodejs
|
|
||||||
|
|
||||||
# Installs yarn.
|
|
||||||
RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
||||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
|
||||||
apt-get update && apt-get install -y yarn
|
|
||||||
|
|
||||||
# Installs VS Code build deps.
|
|
||||||
RUN apt-get install -y build-essential \
|
|
||||||
libsecret-1-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxkbfile-dev
|
|
||||||
|
|
||||||
# Installs envsubst.
|
|
||||||
RUN apt-get install -y gettext-base
|
|
||||||
|
|
||||||
# Misc build dependencies.
|
|
||||||
RUN apt-get install -y git rsync unzip
|
|
||||||
|
|
||||||
# We need latest jq from debian buster for date support.
|
|
||||||
RUN ARCH="$(dpkg --print-architecture)" && \
|
|
||||||
curl -fsSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
|
|
||||||
dpkg -i libonig*.deb && \
|
|
||||||
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
|
|
||||||
dpkg -i libjq*.deb && \
|
|
||||||
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
|
|
||||||
dpkg -i jq*.deb && rm *.deb
|
|
||||||
|
|
||||||
# Installs shellcheck.
|
|
||||||
# Unfortunately coredumps on debian:8 so disabled for now.
|
|
||||||
#RUN curl -fsSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
|
|
||||||
# tar -xJ && \
|
|
||||||
# mv shellcheck*/shellcheck /usr/local/bin && \
|
|
||||||
# rm -R shellcheck*
|
|
||||||
|
|
||||||
# Install Go dependencies
|
|
||||||
RUN ARCH="$(dpkg --print-architecture)" && \
|
|
||||||
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
|
||||||
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
|
|
||||||
ENV GO111MODULE=on
|
|
||||||
RUN go get mvdan.cc/sh/v3/cmd/shfmt
|
|
||||||
RUN go get github.com/goreleaser/nfpm/cmd/nfpm
|
|
||||||
|
|
||||||
RUN curl -fsSL https://get.docker.com | sh
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# arm64
|
|
||||||
|
|
||||||
Unfortunately there is no arm64 build of `debian:8` so
|
|
||||||
we need to use `debian:9` instead.
|
|
||||||
|
|
||||||
This is just an exact copy of [../Dockerfile](../Dockerfile) with the base image change.
|
|
||||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
|||||||
main() {
|
main() {
|
||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
|
|
||||||
shfmt -i 2 -w -s -sr $(git ls-files "*.sh")
|
shfmt -i 2 -w -sr $(git ls-files "*.sh")
|
||||||
|
|
||||||
local prettierExts
|
local prettierExts
|
||||||
prettierExts=(
|
prettierExts=(
|
||||||
@@ -24,6 +24,8 @@ main() {
|
|||||||
doctoc --title '# FAQ' doc/FAQ.md > /dev/null
|
doctoc --title '# FAQ' doc/FAQ.md > /dev/null
|
||||||
doctoc --title '# Setup Guide' doc/guide.md > /dev/null
|
doctoc --title '# Setup Guide' doc/guide.md > /dev/null
|
||||||
doctoc --title '# Install' doc/install.md > /dev/null
|
doctoc --title '# Install' doc/install.md > /dev/null
|
||||||
|
doctoc --title '# npm Install Requirements' doc/npm.md > /dev/null
|
||||||
|
doctoc --title '# Contributing' doc/CONTRIBUTING.md > /dev/null
|
||||||
|
|
||||||
if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
|
if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
|
||||||
echo "Files need generation or are formatted incorrectly:"
|
echo "Files need generation or are formatted incorrectly:"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ run() {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
echo "--- Building $container_name"
|
echo "--- Building $container_name"
|
||||||
docker build -t $container_name ./ci/dev/container > /dev/null
|
docker build -t $container_name ./ci/dev/image > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
@@ -7,9 +7,9 @@ main() {
|
|||||||
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
|
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
|
||||||
stylelint $(git ls-files "*.css")
|
stylelint $(git ls-files "*.css")
|
||||||
tsc --noEmit
|
tsc --noEmit
|
||||||
# See comment in ./ci/container/Dockerfile
|
# See comment in ./ci/image/debian8
|
||||||
if [[ ! ${CI-} ]]; then
|
if [[ ! ${CI-} ]]; then
|
||||||
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090 $(git ls-files "*.sh")
|
shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ index 0000000000..0170b47241
|
|||||||
+ common.minifyTask("out-vscode")
|
+ common.minifyTask("out-vscode")
|
||||||
+));
|
+));
|
||||||
diff --git a/package.json b/package.json
|
diff --git a/package.json b/package.json
|
||||||
index 4c7342cbd8..4c287f6c1a 100644
|
index d150d539ae..33078416d9 100644
|
||||||
--- a/package.json
|
--- a/package.json
|
||||||
+++ b/package.json
|
+++ b/package.json
|
||||||
@@ -37,6 +37,9 @@
|
@@ -37,6 +37,9 @@
|
||||||
@@ -226,7 +226,7 @@ index 4c7342cbd8..4c287f6c1a 100644
|
|||||||
"chokidar": "3.2.3",
|
"chokidar": "3.2.3",
|
||||||
"graceful-fs": "4.2.3",
|
"graceful-fs": "4.2.3",
|
||||||
diff --git a/product.json b/product.json
|
diff --git a/product.json b/product.json
|
||||||
index 91b3b92678..f76f2c1548 100644
|
index 335caa71f6..47607a3eb8 100644
|
||||||
--- a/product.json
|
--- a/product.json
|
||||||
+++ b/product.json
|
+++ b/product.json
|
||||||
@@ -18,7 +18,7 @@
|
@@ -18,7 +18,7 @@
|
||||||
@@ -2532,12 +2532,13 @@ index 0000000000..3c74512192
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
|
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..8abb9a8e31
|
index 0000000000..8b82854426
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/vs/server/node/server.ts
|
+++ b/src/vs/server/node/server.ts
|
||||||
@@ -0,0 +1,273 @@
|
@@ -0,0 +1,277 @@
|
||||||
+import * as net from 'net';
|
+import * as net from 'net';
|
||||||
+import * as path from 'path';
|
+import * as path from 'path';
|
||||||
|
+import * as fs from 'fs';
|
||||||
+import { Emitter } from 'vs/base/common/event';
|
+import { Emitter } from 'vs/base/common/event';
|
||||||
+import { Schemas } from 'vs/base/common/network';
|
+import { Schemas } from 'vs/base/common/network';
|
||||||
+import { URI } from 'vs/base/common/uri';
|
+import { URI } from 'vs/base/common/uri';
|
||||||
@@ -2737,6 +2738,9 @@ index 0000000000..8abb9a8e31
|
|||||||
+
|
+
|
||||||
+ private async initializeServices(args: ParsedArgs): Promise<void> {
|
+ private async initializeServices(args: ParsedArgs): Promise<void> {
|
||||||
+ const environmentService = new EnvironmentService(args, process.execPath);
|
+ const environmentService = new EnvironmentService(args, process.execPath);
|
||||||
|
+ // https://github.com/cdr/code-server/issues/1693
|
||||||
|
+ fs.mkdirSync(environmentService.globalStorageHome, { recursive: true });
|
||||||
|
+
|
||||||
+ const logService = new SpdLogService(RemoteExtensionLogFileName, environmentService.logsPath, getLogLevel(environmentService));
|
+ const logService = new SpdLogService(RemoteExtensionLogFileName, environmentService.logsPath, getLogLevel(environmentService));
|
||||||
+ const fileService = new FileService(logService);
|
+ const fileService = new FileService(logService);
|
||||||
+ fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(logService));
|
+ fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(logService));
|
||||||
@@ -2841,7 +2845,7 @@ index 3f2de2c738..a967d8df69 100644
|
|||||||
import './mainThreadAuthentication';
|
import './mainThreadAuthentication';
|
||||||
import './mainThreadTimeline';
|
import './mainThreadTimeline';
|
||||||
diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts
|
diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts
|
||||||
index db72957372..4514a56754 100644
|
index 260b6468e9..882d3e442f 100644
|
||||||
--- a/src/vs/workbench/api/common/extHost.api.impl.ts
|
--- a/src/vs/workbench/api/common/extHost.api.impl.ts
|
||||||
+++ b/src/vs/workbench/api/common/extHost.api.impl.ts
|
+++ b/src/vs/workbench/api/common/extHost.api.impl.ts
|
||||||
@@ -68,6 +68,7 @@ import { IURITransformerService } from 'vs/workbench/api/common/extHostUriTransf
|
@@ -68,6 +68,7 @@ import { IURITransformerService } from 'vs/workbench/api/common/extHostUriTransf
|
||||||
@@ -2869,7 +2873,7 @@ index db72957372..4514a56754 100644
|
|||||||
|
|
||||||
// automatically create and register addressable instances
|
// automatically create and register addressable instances
|
||||||
diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts
|
diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts
|
||||||
index c6b3c31999..08e413e7d1 100644
|
index 7e1233484e..0f36de9496 100644
|
||||||
--- a/src/vs/workbench/api/common/extHost.protocol.ts
|
--- a/src/vs/workbench/api/common/extHost.protocol.ts
|
||||||
+++ b/src/vs/workbench/api/common/extHost.protocol.ts
|
+++ b/src/vs/workbench/api/common/extHost.protocol.ts
|
||||||
@@ -748,6 +748,16 @@ export interface MainThreadLabelServiceShape extends IDisposable {
|
@@ -748,6 +748,16 @@ export interface MainThreadLabelServiceShape extends IDisposable {
|
||||||
@@ -3093,13 +3097,13 @@ index 4781f22676..86c9246f51 100644
|
|||||||
+import { joinPath } from 'vs/base/common/resources';
|
+import { joinPath } from 'vs/base/common/resources';
|
||||||
+import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
+import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||||
+import { loadCommonJSModule } from 'vs/server/browser/worker';
|
+import { loadCommonJSModule } from 'vs/server/browser/worker';
|
||||||
|
|
||||||
class WorkerRequireInterceptor extends RequireInterceptor {
|
class WorkerRequireInterceptor extends RequireInterceptor {
|
||||||
|
|
||||||
@@ -41,7 +44,14 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
@@ -41,7 +44,14 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||||
await this._fakeModules.install();
|
await this._fakeModules.install();
|
||||||
}
|
}
|
||||||
|
|
||||||
- protected async _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
- protected async _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
||||||
+ protected async _loadCommonJSModule<T>(module: URI | IExtensionDescription, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
+ protected async _loadCommonJSModule<T>(module: URI | IExtensionDescription, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
||||||
+ if (!URI.isUri(module) && module.extensionKind !== 'web') {
|
+ if (!URI.isUri(module) && module.extensionKind !== 'web') {
|
||||||
@@ -3109,7 +3113,7 @@ index 4781f22676..86c9246f51 100644
|
|||||||
+ if (!URI.isUri(module)) {
|
+ if (!URI.isUri(module)) {
|
||||||
+ module = joinPath(module.extensionLocation, module.main!);
|
+ module = joinPath(module.extensionLocation, module.main!);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
module = module.with({ path: ensureSuffix(module.path, '.js') });
|
module = module.with({ path: ensureSuffix(module.path, '.js') });
|
||||||
const response = await fetch(module.toString(true));
|
const response = await fetch(module.toString(true));
|
||||||
@@ -57,7 +67,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
@@ -57,7 +67,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||||
@@ -3184,10 +3188,10 @@ index 5ea3fd924b..de61b7fd17 100644
|
|||||||
.scm-viewlet .monaco-list .monaco-list-row .resource-group > .actions,
|
.scm-viewlet .monaco-list .monaco-list-row .resource-group > .actions,
|
||||||
.scm-viewlet .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions {
|
.scm-viewlet .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions {
|
||||||
diff --git a/src/vs/workbench/contrib/webview/browser/pre/main.js b/src/vs/workbench/contrib/webview/browser/pre/main.js
|
diff --git a/src/vs/workbench/contrib/webview/browser/pre/main.js b/src/vs/workbench/contrib/webview/browser/pre/main.js
|
||||||
index f2ca5011dd..4683e80a68 100644
|
index e21d86575c..22aa99c0f8 100644
|
||||||
--- a/src/vs/workbench/contrib/webview/browser/pre/main.js
|
--- a/src/vs/workbench/contrib/webview/browser/pre/main.js
|
||||||
+++ b/src/vs/workbench/contrib/webview/browser/pre/main.js
|
+++ b/src/vs/workbench/contrib/webview/browser/pre/main.js
|
||||||
@@ -364,7 +364,8 @@
|
@@ -351,7 +351,8 @@
|
||||||
if (data.endpoint) {
|
if (data.endpoint) {
|
||||||
try {
|
try {
|
||||||
const endpointUrl = new URL(data.endpoint);
|
const endpointUrl = new URL(data.endpoint);
|
||||||
@@ -3478,7 +3482,7 @@ index 2fda5eddd8..721cfdfd3e 100644
|
|||||||
import 'vs/workbench/services/credentials/browser/credentialsService';
|
import 'vs/workbench/services/credentials/browser/credentialsService';
|
||||||
import 'vs/workbench/services/url/browser/urlService';
|
import 'vs/workbench/services/url/browser/urlService';
|
||||||
diff --git a/yarn.lock b/yarn.lock
|
diff --git a/yarn.lock b/yarn.lock
|
||||||
index 458909e2b2..68f1a7e609 100644
|
index 1bc94693ea..afd34e6b80 100644
|
||||||
--- a/yarn.lock
|
--- a/yarn.lock
|
||||||
+++ b/yarn.lock
|
+++ b/yarn.lock
|
||||||
@@ -140,6 +140,23 @@
|
@@ -140,6 +140,23 @@
|
||||||
|
|||||||
26
ci/images/centos7/Dockerfile
Normal file
26
ci/images/centos7/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
FROM centos:7
|
||||||
|
|
||||||
|
RUN ARCH="$(uname -m | sed 's/86_64/64/; s/aarch64/arm64/')" && \
|
||||||
|
curl -fsSL "https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-$ARCH.tar.xz" | tar -C /usr/local -xJ && \
|
||||||
|
mv /usr/local/node-v14.4.0-linux-$ARCH /usr/local/node-v14.4.0
|
||||||
|
ENV PATH=/usr/local/node-v14.4.0/bin:$PATH
|
||||||
|
RUN npm install -g yarn
|
||||||
|
|
||||||
|
RUN yum groupinstall -y 'Development Tools'
|
||||||
|
RUN yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
|
||||||
|
|
||||||
|
RUN npm config set python python2
|
||||||
|
|
||||||
|
RUN yum install -y epel-release && yum install -y jq
|
||||||
|
RUN yum install -y rsync
|
||||||
|
|
||||||
|
# Copied from ../debian8/Dockerfile
|
||||||
|
# Install Go dependencies
|
||||||
|
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')" && \
|
||||||
|
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
||||||
|
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
RUN go get mvdan.cc/sh/v3/cmd/shfmt
|
||||||
|
RUN go get github.com/goreleaser/nfpm/cmd/nfpm
|
||||||
|
|
||||||
|
RUN curl -fsSL https://get.docker.com | sh
|
||||||
@@ -43,7 +43,7 @@ RUN ARCH="$(dpkg --print-architecture)" && \
|
|||||||
# rm -R shellcheck*
|
# rm -R shellcheck*
|
||||||
|
|
||||||
# Install Go dependencies
|
# Install Go dependencies
|
||||||
RUN ARCH="$(dpkg --print-architecture)" && \
|
RUN ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')" && \
|
||||||
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
||||||
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
|
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
@@ -5,7 +5,7 @@ main() {
|
|||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
source ./ci/lib.sh
|
source ./ci/lib.sh
|
||||||
|
|
||||||
docker build -t "codercom/code-server-$ARCH:$VERSION" -f ./ci/release-container/Dockerfile .
|
docker build -t "codercom/code-server-$ARCH:$VERSION" -f ./ci/release-image/Dockerfile .
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
@@ -5,7 +5,7 @@ main() {
|
|||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
source ./ci/lib.sh
|
source ./ci/lib.sh
|
||||||
|
|
||||||
./ci/release-container/build.sh
|
./ci/release-image/build.sh
|
||||||
|
|
||||||
mkdir -p release-images
|
mkdir -p release-images
|
||||||
docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH-$VERSION.tar"
|
docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH-$VERSION.tar"
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ set -euo pipefail
|
|||||||
main() {
|
main() {
|
||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
|
|
||||||
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
|
curl -L https://nodejs.org/dist/v14.4.0/node-v14.4.0-darwin-x64.tar.gz | tar -xz
|
||||||
|
PATH="$PATH:node-v14.4.0-darwin-x64/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
# https://github.com/actions/upload-artifact/issues/38
|
# https://github.com/actions/upload-artifact/issues/38
|
||||||
tar -xzf release-npm-package/package.tar.gz
|
tar -xzf release-npm-package/package.tar.gz
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
|
- [Requirements](#requirements)
|
||||||
|
- [Development Workflow](#development-workflow)
|
||||||
|
- [Build](#build)
|
||||||
|
- [Structure](#structure)
|
||||||
|
- [VS Code Patch](#vs-code-patch)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
- [Detailed CI and build process docs](../ci)
|
- [Detailed CI and build process docs](../ci)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -11,7 +21,7 @@ Differences:
|
|||||||
- We require a minimum of node v12 but later versions should work.
|
- We require a minimum of node v12 but later versions should work.
|
||||||
- We use [fnpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
|
- We use [fnpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
|
||||||
- We use [jq](https://stedolan.github.io/jq/) to build code-server releases.
|
- We use [jq](https://stedolan.github.io/jq/) to build code-server releases.
|
||||||
- The [CI container](../ci/container/Dockerfile) is a useful reference for all our dependencies.
|
- The [CI container](../ci/images/debian8/Dockerfile) is a useful reference for all our dependencies.
|
||||||
|
|
||||||
## Development Workflow
|
## Development Workflow
|
||||||
|
|
||||||
@@ -25,7 +35,7 @@ yarn watch
|
|||||||
To develop inside of an isolated docker container:
|
To develop inside of an isolated docker container:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./ci/dev/container/exec.sh
|
./ci/dev/image/exec.sh
|
||||||
|
|
||||||
root@12345:/code-server# yarn
|
root@12345:/code-server# yarn
|
||||||
root@12345:/code-server# yarn vscode
|
root@12345:/code-server# yarn vscode
|
||||||
|
|||||||
63
doc/FAQ.md
63
doc/FAQ.md
@@ -3,7 +3,9 @@
|
|||||||
# FAQ
|
# FAQ
|
||||||
|
|
||||||
- [Questions?](#questions)
|
- [Questions?](#questions)
|
||||||
- [What's the deal with extensions?](#whats-the-deal-with-extensions)
|
- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration)
|
||||||
|
- [Differences compared to VS Code?](#differences-compared-to-vs-code)
|
||||||
|
- [How can I request a missing extension?](#how-can-i-request-a-missing-extension)
|
||||||
- [Where are extensions stored?](#where-are-extensions-stored)
|
- [Where are extensions stored?](#where-are-extensions-stored)
|
||||||
- [How is this different from VS Code Codespaces?](#how-is-this-different-from-vs-code-codespaces)
|
- [How is this different from VS Code Codespaces?](#how-is-this-different-from-vs-code-codespaces)
|
||||||
- [How should I expose code-server to the internet?](#how-should-i-expose-code-server-to-the-internet)
|
- [How should I expose code-server to the internet?](#how-should-i-expose-code-server-to-the-internet)
|
||||||
@@ -12,7 +14,6 @@
|
|||||||
- [Sub-domains](#sub-domains)
|
- [Sub-domains](#sub-domains)
|
||||||
- [Multi-tenancy](#multi-tenancy)
|
- [Multi-tenancy](#multi-tenancy)
|
||||||
- [Docker in code-server container?](#docker-in-code-server-container)
|
- [Docker in code-server container?](#docker-in-code-server-container)
|
||||||
- [Collaboration](#collaboration)
|
|
||||||
- [How can I disable telemetry?](#how-can-i-disable-telemetry)
|
- [How can I disable telemetry?](#how-can-i-disable-telemetry)
|
||||||
- [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)
|
||||||
- [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)
|
||||||
@@ -21,7 +22,6 @@
|
|||||||
- [Blank screen on iPad?](#blank-screen-on-ipad)
|
- [Blank screen on iPad?](#blank-screen-on-ipad)
|
||||||
- [Isn't an install script piped into sh insecure?](#isnt-an-install-script-piped-into-sh-insecure)
|
- [Isn't an install script piped into sh insecure?](#isnt-an-install-script-piped-into-sh-insecure)
|
||||||
- [How do I make my keyboard shortcuts work?](#how-do-i-make-my-keyboard-shortcuts-work)
|
- [How do I make my keyboard shortcuts work?](#how-do-i-make-my-keyboard-shortcuts-work)
|
||||||
- [Why can't I use VS Code's Remote extensions?](#why-cant-i-use-vs-codes-remote-extensions)
|
|
||||||
- [Enterprise](#enterprise)
|
- [Enterprise](#enterprise)
|
||||||
|
|
||||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
@@ -30,28 +30,47 @@
|
|||||||
|
|
||||||
Please file all questions and support requests at https://www.reddit.com/r/codeserver/.
|
Please file all questions and support requests at https://www.reddit.com/r/codeserver/.
|
||||||
|
|
||||||
The issue tracker is **only** for bugs.
|
The issue tracker is **only** for bugs and features.
|
||||||
|
|
||||||
## What's the deal with extensions?
|
## How can I reuse my VS Code configuration?
|
||||||
|
|
||||||
Unfortunately, the Microsoft VS Code Marketplace license prohibits use with any non Microsoft
|
The very popular [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) extension works.
|
||||||
product.
|
|
||||||
|
|
||||||
See https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf
|
You can also pass `--data-dir ~/.vscode` to reuse your existing VS Code extensions and configuration.
|
||||||
|
|
||||||
|
Or copy `~/.vscode` into `~/.local/share/code-server`.
|
||||||
|
|
||||||
|
## Differences compared to VS Code?
|
||||||
|
|
||||||
|
`code-server` takes the open source core of VS Code and allows you to run it in the browser.
|
||||||
|
However, it is not entirely equivalent to Microsoft's VS Code.
|
||||||
|
|
||||||
|
While the core of VS Code is open source, the marketplace and many published Microsoft extensions are not.
|
||||||
|
|
||||||
|
Furthermore, Microsoft prohibits the use of any non-Microsoft VS Code from accessing their marketplace.
|
||||||
|
|
||||||
|
See the [TOS](https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf).
|
||||||
|
|
||||||
> Marketplace Offerings are intended for use only with Visual Studio Products and Services
|
> Marketplace Offerings are intended for use only with Visual Studio Products and Services
|
||||||
> and you may only install and use Marketplace Offerings with Visual Studio Products and Services.
|
> and you may only install and use Marketplace Offerings with Visual Studio Products and Services.
|
||||||
|
|
||||||
As a result, we have created our own marketplace for open source extensions.
|
As a result, we cannot offer any extensions on the Microsoft marketplace. Instead,
|
||||||
|
we have created our own marketplace for open source extensions.
|
||||||
It works by scraping GitHub for VS Code extensions and building them. It's not perfect but getting
|
It works by scraping GitHub for VS Code extensions and building them. It's not perfect but getting
|
||||||
better by the day with more and more extensions.
|
better by the day with more and more extensions.
|
||||||
|
|
||||||
Issue [#1299](https://github.com/cdr/code-server/issues/1299) is a big one in making the experience here
|
These are the closed source extensions presently unavailable:
|
||||||
better by allowing the community to submit extensions and repos to avoid waiting until the scraper finds
|
|
||||||
an extension.
|
|
||||||
|
|
||||||
To request an extension for the code-server marketplace, please open a new issue
|
1. [Live Share](https://visualstudio.microsoft.com/services/live-share)
|
||||||
and select the `Extension request` template.
|
- We may implement something similar, see [#33](https://github.com/cdr/code-server/issues/33)
|
||||||
|
1. [Remote Extensions (SSH, Containers, WSL)](https://github.com/microsoft/vscode-remote-release)
|
||||||
|
- We may reimplement these at some point, see [#1315](https://github.com/cdr/code-server/issues/1315)
|
||||||
|
|
||||||
|
For more about the closed source parts of VS Code, see [vscodium/vscodium](https://github.com/VSCodium/vscodium#why-does-this-exist).
|
||||||
|
|
||||||
|
## How can I request a missing extension?
|
||||||
|
|
||||||
|
Please open a new issue and select the `Extension request` template.
|
||||||
|
|
||||||
If an extension is not available or does not work, you can grab its VSIX from its Github releases or
|
If an extension is not available or does not work, you can grab its VSIX from its Github releases or
|
||||||
build it yourself. Then run the `Extensions: Install from VSIX` command in the Command Palette and
|
build it yourself. Then run the `Extensions: Install from VSIX` command in the Command Palette and
|
||||||
@@ -160,12 +179,6 @@ You can even make volume mounts work. Lets say you want to run a container and m
|
|||||||
the docker daemon's `/home/coder/myproject` is the same as the one mounted inside the `code-server`
|
the docker daemon's `/home/coder/myproject` is the same as the one mounted inside the `code-server`
|
||||||
container and the mount will just work.
|
container and the mount will just work.
|
||||||
|
|
||||||
## Collaboration
|
|
||||||
|
|
||||||
We understand the high demand but the team is swamped right now.
|
|
||||||
|
|
||||||
You can subscribe to [#33](https://github.com/cdr/code-server/issues/33) for updates.
|
|
||||||
|
|
||||||
## How can I disable telemetry?
|
## How can I disable telemetry?
|
||||||
|
|
||||||
Use the `--disable-telemetry` flag to completely disable telemetry. We use the
|
Use the `--disable-telemetry` flag to completely disable telemetry. We use the
|
||||||
@@ -259,16 +272,6 @@ This will install a Chrome PWA and now all keybindings will work!
|
|||||||
|
|
||||||
For other browsers you'll have to remap keybindings unfortunately.
|
For other browsers you'll have to remap keybindings unfortunately.
|
||||||
|
|
||||||
## Why can't I use VS Code's Remote extensions?
|
|
||||||
|
|
||||||
Unfortunately, Microsoft has opted to make [VS Code's Remote SSH and Container
|
|
||||||
extensions closed source](https://github.com/microsoft/vscode-remote-release) and
|
|
||||||
it is against their TOS to use the published extensions so we are unable to
|
|
||||||
add them to our marketplace.
|
|
||||||
|
|
||||||
We may reimplement them at some point.
|
|
||||||
You can subscribe to [#1315](https://github.com/cdr/code-server/issues/1315) for updates.
|
|
||||||
|
|
||||||
## Enterprise
|
## Enterprise
|
||||||
|
|
||||||
Visit [our enterprise page](https://coder.com) for more information about our
|
Visit [our enterprise page](https://coder.com) for more information about our
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ commands presented in the rest of this document.
|
|||||||
## Debian, Ubuntu
|
## Debian, Ubuntu
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.0/code-server_3.4.0_amd64.deb
|
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server_3.4.1_amd64.deb
|
||||||
sudo dpkg -i code-server_3.4.0_amd64.deb
|
sudo dpkg -i code-server_3.4.1_amd64.deb
|
||||||
systemctl --user enable --now code-server
|
systemctl --user enable --now code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
@@ -86,8 +86,8 @@ systemctl --user enable --now code-server
|
|||||||
## Fedora, CentOS, RHEL, SUSE
|
## Fedora, CentOS, RHEL, SUSE
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-3.4.0-amd64.rpm
|
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-amd64.rpm
|
||||||
sudo rpm -i code-server-3.4.0-amd64.rpm
|
sudo rpm -i code-server-3.4.1-amd64.rpm
|
||||||
systemctl --user enable --now code-server
|
systemctl --user enable --now code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
@@ -115,7 +115,7 @@ systemctl --user enable --now code-server
|
|||||||
We recommend installing with `yarn` or `npm` when:
|
We recommend installing with `yarn` or `npm` when:
|
||||||
|
|
||||||
1. You aren't on `amd64` or `arm64`.
|
1. You aren't on `amd64` or `arm64`.
|
||||||
2. If you're on Linux with glibc < v2.17
|
2. If you're on Linux with glibc < v2.17 or glibcxx < v3.4.18
|
||||||
|
|
||||||
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.
|
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.
|
||||||
See [./npm.md](./npm.md) for installing these dependencies.
|
See [./npm.md](./npm.md) for installing these dependencies.
|
||||||
@@ -143,7 +143,7 @@ We publish self contained `.tar.gz` archives for every release on [github](https
|
|||||||
They bundle the node binary and `node_modules`.
|
They bundle the node binary and `node_modules`.
|
||||||
|
|
||||||
These are created from the [npm package](#yarn-npm) and the rest of the releases are created from these.
|
These are created from the [npm package](#yarn-npm) and the rest of the releases are created from these.
|
||||||
Only requirement is glibc >= 2.17 on Linux and for macOS there is no minimum system requirement.
|
Only requirement is glibc >= 2.17 && glibcxx >= v3.4.18 on Linux and for macOS there is no minimum system requirement.
|
||||||
|
|
||||||
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
|
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
|
||||||
2. Unpack the release.
|
2. Unpack the release.
|
||||||
@@ -156,10 +156,10 @@ Here is an example script for installing and using a standalone `code-server` re
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.local/lib ~/.local/bin
|
mkdir -p ~/.local/lib ~/.local/bin
|
||||||
curl -fL https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-3.4.0-linux-amd64.tar.gz \
|
curl -fL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-linux-amd64.tar.gz \
|
||||||
| tar -C ~/.local/lib -xz
|
| tar -C ~/.local/lib -xz
|
||||||
mv ~/.local/lib/code-server-3.4.0-linux-amd64 ~/.local/lib/code-server-3.4.0
|
mv ~/.local/lib/code-server-3.4.1-linux-amd64 ~/.local/lib/code-server-3.4.1
|
||||||
ln -s ~/.local/lib/code-server-3.4.0/bin/code-server ~/.local/bin/code-server
|
ln -s ~/.local/lib/code-server-3.4.1/bin/code-server ~/.local/bin/code-server
|
||||||
PATH="~/.local/bin:$PATH"
|
PATH="~/.local/bin:$PATH"
|
||||||
code-server
|
code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
|
|||||||
10
doc/npm.md
10
doc/npm.md
@@ -1,5 +1,13 @@
|
|||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
# npm Install Requirements
|
# npm Install Requirements
|
||||||
|
|
||||||
|
- [Ubuntu, Debian](#ubuntu-debian)
|
||||||
|
- [Fedora, CentOS, RHEL](#fedora-centos-rhel)
|
||||||
|
- [macOS](#macos)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
If you're installing the npm module you'll need certain dependencies to build
|
If you're installing the npm module you'll need certain dependencies to build
|
||||||
the native modules used by VS Code.
|
the native modules used by VS Code.
|
||||||
|
|
||||||
@@ -20,7 +28,7 @@ sudo apt-get install -y \
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo yum groupinstall -y 'Development Tools'
|
sudo yum groupinstall -y 'Development Tools'
|
||||||
sudo yum config-manager --set-enabled PowerTools
|
sudo yum config-manager --set-enabled PowerTools # unnecessary on CentOS 7
|
||||||
sudo yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
|
sudo yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
|
||||||
npm config set python python2
|
npm config set python python2
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ EOF
|
|||||||
echo_latest_version() {
|
echo_latest_version() {
|
||||||
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
|
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
|
||||||
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
|
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
|
||||||
version="${version#https://github.com/cdr/code-server/releases/tag/v}"
|
version="${version#https://github.com/cdr/code-server/releases/tag/}"
|
||||||
|
version="${version#v}"
|
||||||
echo "$version"
|
echo "$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +299,7 @@ install_aur() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_standalone() {
|
install_standalone() {
|
||||||
echoh "Installing standalone release archive v$VERSION"
|
echoh "Installing standalone release archive v$VERSION from GitHub releases."
|
||||||
echoh
|
echoh
|
||||||
|
|
||||||
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-$OS-$ARCH.tar.gz" \
|
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-$OS-$ARCH.tar.gz" \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "code-server",
|
"name": "code-server",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "3.4.0",
|
"version": "3.4.1",
|
||||||
"description": "Run VS Code on a remote server.",
|
"description": "Run VS Code on a remote server.",
|
||||||
"homepage": "https://github.com/cdr/code-server",
|
"homepage": "https://github.com/cdr/code-server",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
},
|
},
|
||||||
"main": "out/node/entry.js",
|
"main": "out/node/entry.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/adm-zip": "^0.4.32",
|
|
||||||
"@types/fs-extra": "^8.0.1",
|
"@types/fs-extra": "^8.0.1",
|
||||||
"@types/http-proxy": "^1.17.4",
|
"@types/http-proxy": "^1.17.4",
|
||||||
"@types/js-yaml": "^3.12.3",
|
"@types/js-yaml": "^3.12.3",
|
||||||
@@ -66,7 +65,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coder/logger": "1.1.11",
|
"@coder/logger": "1.1.11",
|
||||||
"adm-zip": "^0.4.14",
|
|
||||||
"env-paths": "^2.2.0",
|
"env-paths": "^2.2.0",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"http-proxy": "^1.18.0",
|
"http-proxy": "^1.18.0",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { field, logger } from "@coder/logger"
|
import { field, logger } from "@coder/logger"
|
||||||
import zip from "adm-zip"
|
|
||||||
import * as cp from "child_process"
|
import * as cp from "child_process"
|
||||||
import * as fs from "fs-extra"
|
import * as fs from "fs-extra"
|
||||||
import * as http from "http"
|
import * as http from "http"
|
||||||
@@ -213,11 +212,7 @@ export class UpdateHttpProvider extends HttpProvider {
|
|||||||
const response = await this.requestResponse(url)
|
const response = await this.requestResponse(url)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (downloadPath.endsWith(".tar.gz")) {
|
downloadPath = await this.extractTar(response, downloadPath)
|
||||||
downloadPath = await this.extractTar(response, downloadPath)
|
|
||||||
} else {
|
|
||||||
downloadPath = await this.extractZip(response, downloadPath)
|
|
||||||
}
|
|
||||||
logger.debug("Downloaded update", field("path", downloadPath))
|
logger.debug("Downloaded update", field("path", downloadPath))
|
||||||
|
|
||||||
// The archive should have a directory inside at the top level with the
|
// The archive should have a directory inside at the top level with the
|
||||||
@@ -275,40 +270,6 @@ export class UpdateHttpProvider extends HttpProvider {
|
|||||||
return downloadPath
|
return downloadPath
|
||||||
}
|
}
|
||||||
|
|
||||||
private async extractZip(response: Readable, downloadPath: string): Promise<string> {
|
|
||||||
logger.debug("Downloading zip", field("path", downloadPath))
|
|
||||||
|
|
||||||
response.pause()
|
|
||||||
await fs.remove(downloadPath)
|
|
||||||
|
|
||||||
const write = fs.createWriteStream(downloadPath)
|
|
||||||
response.pipe(write)
|
|
||||||
response.on("error", (error) => write.destroy(error))
|
|
||||||
response.on("close", () => write.end())
|
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
|
||||||
write.on("error", reject)
|
|
||||||
write.on("close", resolve)
|
|
||||||
response.resume
|
|
||||||
})
|
|
||||||
|
|
||||||
const zipPath = downloadPath
|
|
||||||
downloadPath = downloadPath.replace(/\.zip$/, "")
|
|
||||||
await fs.remove(downloadPath)
|
|
||||||
|
|
||||||
logger.debug("Extracting zip", field("path", zipPath))
|
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
|
||||||
new zip(zipPath).extractAllToAsync(downloadPath, true, (error) => {
|
|
||||||
return error ? reject(error) : resolve()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
await fs.remove(zipPath)
|
|
||||||
|
|
||||||
return downloadPath
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an update return the name for the packaged archived.
|
* Given an update return the name for the packaged archived.
|
||||||
*/
|
*/
|
||||||
@@ -329,7 +290,7 @@ export class UpdateHttpProvider extends HttpProvider {
|
|||||||
if (arch === "x64") {
|
if (arch === "x64") {
|
||||||
arch = "x86_64"
|
arch = "x86_64"
|
||||||
}
|
}
|
||||||
return `code-server-${update.version}-${target}-${arch}.${target === "darwin" ? "zip" : "tar.gz"}`
|
return `code-server-${update.version}-${target}-${arch}.tar.gz`
|
||||||
}
|
}
|
||||||
|
|
||||||
private async request(uri: string): Promise<Buffer> {
|
private async request(uri: string): Promise<Buffer> {
|
||||||
|
|||||||
@@ -348,7 +348,9 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
|
|||||||
logger.info(`Wrote default config file to ${humanPath(configPath)}`)
|
logger.info(`Wrote default config file to ${humanPath(configPath)}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`Using config file ${humanPath(configPath)}`)
|
if (!process.env.CODE_SERVER_PARENT_PID) {
|
||||||
|
logger.info(`Using config file ${humanPath(configPath)}`)
|
||||||
|
}
|
||||||
|
|
||||||
const configFile = await fs.readFile(configPath)
|
const configFile = await fs.readFile(configPath)
|
||||||
const config = yaml.safeLoad(configFile.toString(), {
|
const config = yaml.safeLoad(configFile.toString(), {
|
||||||
|
|||||||
@@ -31,11 +31,7 @@ try {
|
|||||||
const version = pkg.version || "development"
|
const version = pkg.version || "development"
|
||||||
const commit = pkg.commit || "development"
|
const commit = pkg.commit || "development"
|
||||||
|
|
||||||
const main = async (cliArgs: Args): Promise<void> => {
|
const main = async (args: Args, cliArgs: Args, configArgs: Args): Promise<void> => {
|
||||||
const configArgs = await readConfigFile(cliArgs.config)
|
|
||||||
// This prioritizes the flags set in args over the ones in the config file.
|
|
||||||
let args = Object.assign(configArgs, cliArgs)
|
|
||||||
|
|
||||||
if (!args.auth) {
|
if (!args.auth) {
|
||||||
args = {
|
args = {
|
||||||
...args,
|
...args,
|
||||||
@@ -127,18 +123,21 @@ const main = async (cliArgs: Args): Promise<void> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function entry(): Promise<void> {
|
async function entry(): Promise<void> {
|
||||||
const tryParse = async (): Promise<Args> => {
|
const tryParse = async (): Promise<[Args, Args, Args]> => {
|
||||||
try {
|
try {
|
||||||
let args = parse(process.argv.slice(2))
|
const cliArgs = parse(process.argv.slice(2))
|
||||||
|
const configArgs = await readConfigFile(cliArgs.config)
|
||||||
|
// This prioritizes the flags set in args over the ones in the config file.
|
||||||
|
let args = Object.assign(configArgs, cliArgs)
|
||||||
args = await setDefaults(args)
|
args = await setDefaults(args)
|
||||||
return args
|
return [args, cliArgs, configArgs]
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error.message)
|
console.error(error.message)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const args = await tryParse()
|
const [args, cliArgs, configArgs] = await tryParse()
|
||||||
if (args.help) {
|
if (args.help) {
|
||||||
console.log("code-server", version, commit)
|
console.log("code-server", version, commit)
|
||||||
console.log("")
|
console.log("")
|
||||||
@@ -182,7 +181,7 @@ async function entry(): Promise<void> {
|
|||||||
})
|
})
|
||||||
vscode.on("exit", (code) => process.exit(code || 0))
|
vscode.on("exit", (code) => process.exit(code || 0))
|
||||||
} else {
|
} else {
|
||||||
wrap(() => main(args))
|
wrap(() => main(args, cliArgs, configArgs))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import zip from "adm-zip"
|
|
||||||
import * as assert from "assert"
|
import * as assert from "assert"
|
||||||
import * as fs from "fs-extra"
|
import * as fs from "fs-extra"
|
||||||
import * as http from "http"
|
import * as http from "http"
|
||||||
import * as os from "os"
|
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import * as tar from "tar-fs"
|
import * as tar from "tar-fs"
|
||||||
import * as zlib from "zlib"
|
import * as zlib from "zlib"
|
||||||
@@ -88,28 +86,18 @@ describe("update", () => {
|
|||||||
fs.writeFile(path.join(archivePath, archiveName, "node"), `NODE BINARY`),
|
fs.writeFile(path.join(archivePath, archiveName, "node"), `NODE BINARY`),
|
||||||
])
|
])
|
||||||
|
|
||||||
if (os.platform() === "darwin") {
|
await new Promise((resolve, reject) => {
|
||||||
await new Promise((resolve, reject) => {
|
const write = fs.createWriteStream(archivePath + ".tar.gz")
|
||||||
const zipFile = new zip()
|
const compress = zlib.createGzip()
|
||||||
zipFile.addLocalFolder(archivePath)
|
compress.pipe(write)
|
||||||
zipFile.writeZip(archivePath + ".zip", (error) => {
|
compress.on("error", (error) => compress.destroy(error))
|
||||||
return error ? reject(error) : resolve(error)
|
compress.on("close", () => write.end())
|
||||||
})
|
tar.pack(archivePath).pipe(compress)
|
||||||
|
write.on("close", reject)
|
||||||
|
write.on("finish", () => {
|
||||||
|
resolve()
|
||||||
})
|
})
|
||||||
} else {
|
})
|
||||||
await new Promise((resolve, reject) => {
|
|
||||||
const write = fs.createWriteStream(archivePath + ".tar.gz")
|
|
||||||
const compress = zlib.createGzip()
|
|
||||||
compress.pipe(write)
|
|
||||||
compress.on("error", (error) => compress.destroy(error))
|
|
||||||
compress.on("close", () => write.end())
|
|
||||||
tar.pack(archivePath).pipe(compress)
|
|
||||||
write.on("close", reject)
|
|
||||||
write.on("finish", () => {
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
after(() => {
|
after(() => {
|
||||||
|
|||||||
12
yarn.lock
12
yarn.lock
@@ -910,13 +910,6 @@
|
|||||||
traverse "^0.6.6"
|
traverse "^0.6.6"
|
||||||
unified "^6.1.6"
|
unified "^6.1.6"
|
||||||
|
|
||||||
"@types/adm-zip@^0.4.32":
|
|
||||||
version "0.4.33"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/adm-zip/-/adm-zip-0.4.33.tgz#ea5b94f771443f655613b64f920c0555867200dd"
|
|
||||||
integrity sha512-WM0DCWFLjXtddl0fu0+iN2ZF+qz8RF9RddG5OSy/S90AQz01Fu8lHn/3oTIZDxvG8gVcnBLAHMHOdBLbV6m6Mw==
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/color-name@^1.1.1":
|
"@types/color-name@^1.1.1":
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
||||||
@@ -1130,11 +1123,6 @@ acorn@^7.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
|
||||||
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
|
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
|
||||||
|
|
||||||
adm-zip@^0.4.14:
|
|
||||||
version "0.4.14"
|
|
||||||
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9"
|
|
||||||
integrity sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g==
|
|
||||||
|
|
||||||
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
|
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
|
||||||
version "6.12.2"
|
version "6.12.2"
|
||||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
|
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
|
||||||
|
|||||||
Reference in New Issue
Block a user