mirror of
https://github.com/coder/code-server.git
synced 2026-04-14 15:19:07 -05:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fe23daf00 | ||
|
|
4d900a307b | ||
|
|
503dfdece5 | ||
|
|
9b001c52fe | ||
|
|
3d999986b2 | ||
|
|
f04fcf2d64 | ||
|
|
7695de2831 | ||
|
|
003480881b | ||
|
|
47f0b6f4fa | ||
|
|
047a4f01f2 | ||
|
|
95d965a27b | ||
|
|
c4c480a068 | ||
|
|
b990dabed1 | ||
|
|
4943e9418d | ||
|
|
f10ef42f04 | ||
|
|
c27dbd0463 | ||
|
|
ec3d9974b3 | ||
|
|
73e0b79d7f | ||
|
|
3059d72a5d | ||
|
|
6e9e411542 | ||
|
|
7561fc4306 | ||
|
|
259363bcdb | ||
|
|
1b796d19bf | ||
|
|
5960a6728c | ||
|
|
18e66c4299 | ||
|
|
c77999bcd3 |
@@ -3,9 +3,4 @@ root = true
|
||||
[*]
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
[{*.yml,*.yaml,package.json}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1,3 +1,3 @@
|
||||
* @cdr/code-server-reviewers
|
||||
* @coder/code-server-reviewers
|
||||
|
||||
ci/helm-chart/ @Matthew-Beckett @alexgorbatchev
|
||||
|
||||
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -428,7 +428,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Run Trivy vulnerability scanner in repo mode
|
||||
#Commit SHA for v0.0.17
|
||||
uses: aquasecurity/trivy-action@0769bbf0d2a77b3c15b3b57fbcdd2edd25a1c3f0
|
||||
uses: aquasecurity/trivy-action@8f4c7160b470bafe4299efdc1c8a1fb495f8325a
|
||||
with:
|
||||
scan-type: "fs"
|
||||
scan-ref: "."
|
||||
|
||||
5
.github/workflows/docs-preview.yaml
vendored
5
.github/workflows/docs-preview.yaml
vendored
@@ -21,6 +21,7 @@ jobs:
|
||||
preview:
|
||||
name: Docs preview
|
||||
runs-on: ubuntu-20.04
|
||||
environment: CI
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.9.1
|
||||
@@ -28,9 +29,9 @@ jobs:
|
||||
- name: Checkout m
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: cdr/m
|
||||
repository: coder/m
|
||||
ref: refs/heads/master
|
||||
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
ssh-key: ${{ secrets.READONLY_M_DEPLOY_KEY }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
26
CHANGELOG.md
26
CHANGELOG.md
@@ -22,6 +22,14 @@ VS Code v99.99.999
|
||||
|
||||
## [Unreleased](https://github.com/cdr/code-server/releases)
|
||||
|
||||
VS Code v0.00.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Add here
|
||||
|
||||
## [4.0.1](https://github.com/cdr/code-server/releases/tag/v4.0.1) - 2022-01-04
|
||||
|
||||
VS Code v1.63.0
|
||||
|
||||
code-server has been rebased on upstream's newly open-sourced server
|
||||
@@ -31,13 +39,21 @@ implementation (#4414).
|
||||
|
||||
- Web socket compression has been made the default (when supported). This means
|
||||
the `--enable` flag will no longer take `permessage-deflate` as an option.
|
||||
- Extra extension directories have been removed. The `--extra-extensions-dir`
|
||||
and `--extra-builtin-extensions-dir` will no longer be accepted.
|
||||
- The `--install-source` and `--locale` flags have been removed.
|
||||
- The static endpoint can no longer reach outside code-server. However the
|
||||
vscode-remote-resource endpoint still can.
|
||||
- OpenVSX has been made the default marketplace. However this means web
|
||||
extensions like Vim may be broken.
|
||||
- OpenVSX has been made the default marketplace.
|
||||
- The last opened folder/workspace is no longer stored separately in the
|
||||
settings file (we rely on the already-existing query object instead).
|
||||
|
||||
### Added
|
||||
|
||||
- `VSCODE_PROXY_URI` env var for use in the terminal and extensions.
|
||||
|
||||
### Removed
|
||||
|
||||
- Extra extension directories have been removed. The `--extra-extensions-dir`
|
||||
and `--extra-builtin-extensions-dir` flags will no longer be accepted.
|
||||
- The `--install-source` flag has been removed.
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
||||
@@ -90,7 +90,8 @@ bundle_vscode() {
|
||||
"enableTelemetry": true,
|
||||
"commit": "$(cd "$VSCODE_SRC_PATH" && git rev-parse HEAD)",
|
||||
"quality": "stable",
|
||||
"date": $(jq -n 'now | todate')
|
||||
"date": $(jq -n 'now | todate'),
|
||||
"codeServerVersion": "$VERSION"
|
||||
}
|
||||
EOF
|
||||
) > "$VSCODE_OUT_PATH/product.json"
|
||||
|
||||
@@ -13,7 +13,7 @@ main() {
|
||||
download_artifact release-packages ./release-packages
|
||||
local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.deb,.rpm})
|
||||
|
||||
EDITOR=true gh release upload "v$VERSION" "${assets[@]}"
|
||||
EDITOR=true gh release upload "v$VERSION" "${assets[@]}" --clobber
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -83,7 +83,7 @@ main() {
|
||||
echo -e "Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE\n"
|
||||
$CMD rg -g '!yarn.lock' -g '!*.svg' -g '!CHANGELOG.md' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE"
|
||||
|
||||
$CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
|
||||
$CMD git commit --no-verify -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
|
||||
|
||||
# This runs from the root so that's why we use this path vs. ../../
|
||||
RELEASE_TEMPLATE_STRING=$(cat ./.github/PULL_REQUEST_TEMPLATE/release_template.md)
|
||||
|
||||
@@ -3,20 +3,30 @@ set -euo pipefail
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/../.."
|
||||
source ./ci/lib.sh
|
||||
|
||||
echo "Installing code-server test dependencies..."
|
||||
pushd test
|
||||
echo "Installing dependencies for $PWD"
|
||||
yarn install
|
||||
popd
|
||||
|
||||
local args=(install)
|
||||
if [[ ${CI-} ]]; then
|
||||
args+=(--frozen-lockfile)
|
||||
fi
|
||||
|
||||
cd test
|
||||
pushd test
|
||||
echo "Installing dependencies for $PWD"
|
||||
yarn "${args[@]}"
|
||||
cd ..
|
||||
popd
|
||||
|
||||
cd vendor
|
||||
echo "Installing vendor dependencies..."
|
||||
pushd test/e2e/extensions/test-extension
|
||||
echo "Installing dependencies for $PWD"
|
||||
yarn "${args[@]}"
|
||||
popd
|
||||
|
||||
pushd vendor
|
||||
echo "Installing dependencies for $PWD"
|
||||
|
||||
# We install in 'modules' instead of 'node_modules' because VS Code's
|
||||
# extensions use a webpack config which cannot differentiate between its own
|
||||
@@ -33,6 +43,8 @@ main() {
|
||||
|
||||
# Finally, run the vendor `postinstall`
|
||||
yarn run postinstall
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -13,6 +13,11 @@ main() {
|
||||
|
||||
source ./ci/lib.sh
|
||||
|
||||
pushd test/e2e/extensions/test-extension
|
||||
echo "Building test extension"
|
||||
yarn build
|
||||
popd
|
||||
|
||||
local dir="$PWD"
|
||||
if [[ ! ${CODE_SERVER_TEST_ENTRY-} ]]; then
|
||||
echo "Set CODE_SERVER_TEST_ENTRY to test another build of code-server"
|
||||
|
||||
@@ -6,6 +6,7 @@ main() {
|
||||
|
||||
source ./ci/lib.sh
|
||||
|
||||
echo "Building test plugin"
|
||||
pushd test/unit/node/test-plugin
|
||||
make -s out/index.js
|
||||
popd
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { spawn, fork, ChildProcess } from "child_process"
|
||||
import { promises as fs } from "fs"
|
||||
import * as path from "path"
|
||||
import { CompilationStats, onLine, OnLineCallback } from "../../src/node/util"
|
||||
import { onLine, OnLineCallback } from "../../src/node/util"
|
||||
|
||||
interface DevelopmentCompilers {
|
||||
[key: string]: ChildProcess | undefined
|
||||
@@ -16,7 +15,6 @@ class Watcher {
|
||||
private readonly paths = {
|
||||
/** Path to uncompiled VS Code source. */
|
||||
vscodeDir: path.join(this.rootPath, "vendor", "modules", "code-oss-dev"),
|
||||
compilationStatsFile: path.join(this.rootPath, "out", "watcher.json"),
|
||||
pluginDir: process.env.PLUGIN_DIR,
|
||||
}
|
||||
|
||||
@@ -88,7 +86,6 @@ class Watcher {
|
||||
|
||||
if (strippedLine.includes("Finished compilation with")) {
|
||||
console.log("[VS Code] ✨ Finished compiling! ✨", "(Refresh your web browser ♻️)")
|
||||
this.emitCompilationStats()
|
||||
this.reloadWebServer()
|
||||
}
|
||||
}
|
||||
@@ -118,19 +115,6 @@ class Watcher {
|
||||
|
||||
//#region Utilities
|
||||
|
||||
/**
|
||||
* Emits a file containing compilation data.
|
||||
* This is especially useful when Express needs to determine if VS Code is still compiling.
|
||||
*/
|
||||
private emitCompilationStats(): Promise<void> {
|
||||
const stats: CompilationStats = {
|
||||
lastCompiledAt: new Date(),
|
||||
}
|
||||
|
||||
console.log("Writing watcher stats...")
|
||||
return fs.writeFile(this.paths.compilationStatsFile, JSON.stringify(stats, null, 2))
|
||||
}
|
||||
|
||||
private dispose(code: number | null): void {
|
||||
for (const [processName, devProcess] of Object.entries(this.compilers)) {
|
||||
console.log(`[${processName}]`, "Killing...\n")
|
||||
|
||||
@@ -15,9 +15,9 @@ type: application
|
||||
# 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.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.0.5
|
||||
version: 2.0.0
|
||||
|
||||
# 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
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 3.12.0
|
||||
appVersion: 4.0.1
|
||||
|
||||
@@ -6,7 +6,7 @@ replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: codercom/code-server
|
||||
tag: '3.12.0'
|
||||
tag: '4.0.1'
|
||||
pullPolicy: Always
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
@@ -10,11 +10,13 @@ RUN apt-get update \
|
||||
man \
|
||||
nano \
|
||||
git \
|
||||
git-lfs \
|
||||
procps \
|
||||
openssh-client \
|
||||
sudo \
|
||||
vim.tiny \
|
||||
lsb-release \
|
||||
&& git lfs install \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# https://wiki.debian.org/Locale#Manually
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# code-server
|
||||
|
||||
[](https://github.com/cdr/code-server/discussions) [](https://cdr.co/join-community) [](https://twitter.com/coderhq) [](https://codecov.io/gh/cdr/code-server) [](https://github.com/cdr/code-server/tree/v3.12.0/docs)
|
||||
[](https://github.com/cdr/code-server/discussions) [](https://cdr.co/join-community) [](https://twitter.com/coderhq) [](https://codecov.io/gh/cdr/code-server) [](https://github.com/cdr/code-server/tree/v4.0.1/docs)
|
||||
|
||||
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and
|
||||
access it in the browser.
|
||||
|
||||
23
docs/android.md
Normal file
23
docs/android.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Running code-server using UserLAnd
|
||||
|
||||
1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US)
|
||||
2. Install an Ubuntu VM
|
||||
3. Start app
|
||||
4. Install Node.js, `curl` and `yarn` using `sudo apt install nodejs npm yarn curl -y`
|
||||
5. Install `nvm`:
|
||||
|
||||
```shell
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
||||
```
|
||||
|
||||
6. Exit the terminal using `exit` and then reopen the terminal
|
||||
7. Install and use Node.js 14:
|
||||
|
||||
```shell
|
||||
nvm install 14
|
||||
nvm use 14
|
||||
```
|
||||
|
||||
8. Install code-server globally on device with: `npm i -g code-server`
|
||||
9. Run code-server with `code-server`
|
||||
10. Access on localhost:8080 in your browser
|
||||
@@ -60,6 +60,6 @@ As `code-server` is based on VS Code, you can follow the steps described on Duck
|
||||
code-server --enable-proposed-api genuitecllc.codetogether
|
||||
```
|
||||
|
||||
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v3.12.0/FAQ#how-does-the-config-file-work).
|
||||
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.0.1/FAQ#how-does-the-config-file-work).
|
||||
|
||||
3. Refresh code-server and navigate to the CodeTogether icon in the sidebar to host or join a coding session.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# code-server Helm Chart
|
||||
|
||||
[](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [](https://img.shields.io/badge/Type-application-informational?style=flat-square) [](https://img.shields.io/badge/AppVersion-3.12.0-informational?style=flat-square)
|
||||
[](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [](https://img.shields.io/badge/Type-application-informational?style=flat-square) [](https://img.shields.io/badge/AppVersion-4.0.1-informational?style=flat-square)
|
||||
|
||||
[code-server](https://github.com/cdr/code-server) code-server is VS Code running
|
||||
on a remote server, accessible through the browser.
|
||||
@@ -73,7 +73,7 @@ and their default values.
|
||||
| hostnameOverride | string | `""` |
|
||||
| image.pullPolicy | string | `"Always"` |
|
||||
| image.repository | string | `"codercom/code-server"` |
|
||||
| image.tag | string | `"3.12.0"` |
|
||||
| image.tag | string | `"4.0.1"` |
|
||||
| imagePullSecrets | list | `[]` |
|
||||
| ingress.enabled | bool | `false` |
|
||||
| nameOverride | string | `""` |
|
||||
|
||||
@@ -30,7 +30,7 @@ operating systems.
|
||||
## install.sh
|
||||
|
||||
The easiest way to install code-server is to use our [install
|
||||
script](../install.sh) for Linux, macOS and FreeBSD. The install script
|
||||
script](https://github.com/cdr/code-server/blob/main/install.sh) for Linux, macOS and FreeBSD. The install script
|
||||
[attempts to use the system package manager](#detection-reference) if possible.
|
||||
|
||||
You can preview what occurs during the install process:
|
||||
@@ -67,7 +67,7 @@ code-server.
|
||||
|
||||
If you prefer to install code-server manually, despite the [detection
|
||||
references](#detection-reference) and `--dry-run` feature, then continue on for
|
||||
information on how to do this. The [`install.sh`](../install.sh) script runs the
|
||||
information on how to do this. The [`install.sh`](https://github.com/cdr/code-server/blob/main/install.sh) script runs the
|
||||
_exact_ same commands presented in the rest of this document.
|
||||
|
||||
### Detection reference
|
||||
|
||||
7
docs/ios.md
Normal file
7
docs/ios.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Using code-server on iOS with iSH
|
||||
|
||||
1. Install iSH from the [App Store](https://apps.apple.com/us/app/ish-shell/id1436902243)
|
||||
2. Install `curl` with `apk add curl`
|
||||
3. Install code-server with `curl -fsSL https://code-server.dev/install.sh | sh`
|
||||
4. Run code-server with `code-server`
|
||||
5. Access on localhost:8080 in your browser
|
||||
@@ -122,8 +122,8 @@ and tricks helpful:
|
||||
[#114009](https://github.com/microsoft/vscode/issues/114009)
|
||||
- See [workaround](#ctrl-c-workaround)
|
||||
|
||||
Additionally, see [issues in the code-server repo that are tagged with the iPad
|
||||
label](https://github.com/cdr/code-server/issues?q=is%3Aopen+is%3Aissue+label%3AiPad)
|
||||
Additionally, see [issues in the code-server repo that are tagged with the `os-ios`
|
||||
label](https://github.com/cdr/code-server/issues?q=is%3Aopen+is%3Aissue+label%3Aos-ios)
|
||||
for more information.
|
||||
|
||||
### Workaround for issue with `ctrl+c` not stopping a running process in the terminal
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"versions": ["v3.12.0"],
|
||||
"versions": ["v4.0.1"],
|
||||
"routes": [
|
||||
{
|
||||
"title": "Home",
|
||||
@@ -51,6 +51,16 @@
|
||||
"title": "Termux",
|
||||
"description": "How to install Termux to run code-server on an Android device.",
|
||||
"path": "./termux.md"
|
||||
},
|
||||
{
|
||||
"title": "iOS",
|
||||
"description": "How to use code-server on iOS with iSH.",
|
||||
"path": "./ios.md"
|
||||
},
|
||||
{
|
||||
"title": "Android",
|
||||
"description": "How to run code-server on an Android device using UserLAnd.",
|
||||
"path": "./android.md"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -63,7 +73,7 @@
|
||||
{
|
||||
"title": "Upgrade",
|
||||
"description": "How to upgrade code-server.",
|
||||
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.8049 2.19795C17.7385 2.1311 17.6587 2.07899 17.5708 2.04504C17.4829 2.01108 17.3889 1.99604 17.2948 2.00089C7.89216 2.49153 4.4188 10.8673 4.38528 10.9517C4.33624 11.0736 4.32406 11.2071 4.35028 11.3358C4.3765 11.4645 4.43995 11.5827 4.53274 11.6756L8.32449 15.4674C8.41787 15.5606 8.53669 15.6242 8.66606 15.6502C8.79543 15.6762 8.92959 15.6634 9.05174 15.6135C9.13552 15.5793 17.4664 12.0671 17.9986 2.7087C18.0039 2.61474 17.9895 2.5207 17.9561 2.4327C17.9227 2.3447 17.8712 2.26471 17.8049 2.19795ZM12.3314 9.56427C12.1439 9.75179 11.9051 9.87951 11.645 9.93126C11.385 9.98302 11.1154 9.9565 10.8704 9.85505C10.6254 9.7536 10.4161 9.58178 10.2687 9.36131C10.1214 9.14085 10.0428 8.88166 10.0428 8.6165C10.0428 8.35135 10.1214 8.09215 10.2687 7.87169C10.4161 7.65123 10.6254 7.47941 10.8704 7.37796C11.1154 7.27651 11.385 7.24998 11.645 7.30174C11.9051 7.3535 12.1439 7.48121 12.3314 7.66873C12.5827 7.92012 12.7239 8.26104 12.7239 8.6165C12.7239 8.97197 12.5827 9.31288 12.3314 9.56427Z\"/><path d=\"M2.74602 14.5444C2.92281 14.3664 3.133 14.2251 3.36454 14.1285C3.59608 14.0319 3.8444 13.9819 4.09529 13.9815C4.34617 13.9811 4.59466 14.0302 4.82653 14.126C5.05839 14.2218 5.26907 14.3624 5.44647 14.5398C5.62386 14.7172 5.7645 14.9279 5.86031 15.1598C5.95612 15.3916 6.00522 15.6401 6.00479 15.891C6.00437 16.1419 5.95442 16.3902 5.85782 16.6218C5.76122 16.8533 5.61987 17.0635 5.44186 17.2403C4.69719 17.985 2 18.0004 2 18.0004C2 18.0004 2 15.2884 2.74602 14.5444Z\"/><path d=\"M8.9416 3.48269C7.99688 3.31826 7.02645 3.38371 6.11237 3.67352C5.19828 3.96332 4.36741 4.46894 3.68999 5.14765C3.33153 5.50944 3.01988 5.91477 2.76233 6.35415C2.68692 6.4822 2.6562 6.63169 2.67501 6.77911C2.69381 6.92652 2.76108 7.06351 2.86623 7.16853L4.1994 8.50238C5.43822 6.53634 7.04911 4.83119 8.9416 3.48269Z\"/><path d=\"M16.5181 11.0585C16.6825 12.0033 16.6171 12.9737 16.3273 13.8878C16.0375 14.8019 15.5318 15.6327 14.8531 16.3101C14.4914 16.6686 14.086 16.9803 13.6466 17.2378C13.5186 17.3132 13.3691 17.3439 13.2217 17.3251C13.0743 17.3063 12.9373 17.2391 12.8323 17.1339L11.4984 15.8007C13.4645 14.5619 15.1696 12.951 16.5181 11.0585Z\"/></svg>",
|
||||
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.8049 2.19795C17.7385 2.1311 17.6587 2.07899 17.5708 2.04504C17.4829 2.01108 17.3889 1.99604 17.2948 2.00089C7.89216 2.49153 4.4188 10.8673 4.38528 10.9517C4.33624 11.0736 4.32406 11.2071 4.35028 11.3358C4.3765 11.4645 4.43995 11.5827 4.53274 11.6756L8.32449 15.4674C8.41787 15.5606 8.53669 15.6242 8.66606 15.6502C8.79543 15.6762 8.92959 15.6634 9.05174 15.6135C9.13552 15.5793 17.4664 12.0671 17.9986 2.7087C18.0039 2.61474 17.9895 2.5207 17.9561 2.4327C17.9227 2.3447 17.8712 2.26471 17.8049 2.19795ZM12.3314 9.56427C12.1439 9.75179 11.9051 9.87951 11.645 9.93126C11.385 9.98302 11.1154 9.9565 10.8704 9.85505C10.6254 9.7536 10.4161 9.58178 10.2687 9.36131C10.1214 9.14085 10.0428 8.88166 10.0428 8.6165C10.0428 8.35135 10.1214 8.09215 10.2687 7.87169C10.4161 7.65123 10.6254 7.47941 10.8704 7.37796C11.1154 7.27651 11.385 7.24998 11.645 7.30174C11.9051 7.3535 12.1439 7.48121 12.3314 7.66873C12.5827 7.92012 12.7239 8.26104 12.7239 8.6165C12.7239 8.97197 12.5827 9.31288 12.3314 9.56427Z\"/><path d=\"M2.74602 14.5444C2.92281 14.3664 3.133 14.2251 3.36454 14.1285C3.59608 14.0319 3.8444 13.9819 4.09529 13.9815C4.34617 13.9811 4.59466 14.0.12 4.82653 14.126C5.05839 14.2218 5.26907 14.3624 5.44647 14.5398C5.62386 14.7172 5.7645 14.9279 5.86031 15.1598C5.95612 15.3916 6.00522 15.6401 6.00479 15.891C6.00437 16.1419 5.95442 16.3902 5.85782 16.6218C5.76122 16.8533 5.61987 17.0635 5.44186 17.2403C4.69719 17.985 2 18.0004 2 18.0004C2 18.0004 2 15.2884 2.74602 14.5444Z\"/><path d=\"M8.9416 3.48269C7.99688 3.31826 7.02645 3.38371 6.11237 3.67352C5.19828 3.96332 4.36741 4.46894 3.68999 5.14765C3.33153 5.50944 3.01988 5.91477 2.76233 6.35415C2.68692 6.4822 2.6562 6.63169 2.67501 6.77911C2.69381 6.92652 2.76108 7.06351 2.86623 7.16853L4.1994 8.50238C5.43822 6.53634 7.04911 4.83119 8.9416 3.48269Z\"/><path d=\"M16.5181 11.0585C16.6825 12.0033 16.6171 12.9737 16.3273 13.8878C16.0375 14.8019 15.5318 15.6327 14.8531 16.3101C14.4914 16.6686 14.086 16.9803 13.6466 17.2378C13.5186 17.3132 13.3691 17.3439 13.2217 17.3251C13.0743 17.3063 12.9373 17.2391 12.8323 17.1339L11.4984 15.8007C13.4645 14.5619 15.1696 12.951 16.5181 11.0585Z\"/></svg>",
|
||||
"path": "./upgrade.md"
|
||||
},
|
||||
{
|
||||
|
||||
25
install.sh
25
install.sh
@@ -23,7 +23,7 @@ The remote host must have internet access.
|
||||
${not_curl_usage-}
|
||||
Usage:
|
||||
|
||||
$arg0 [--dry-run] [--version X.X.X] [--method detect] \
|
||||
$arg0 [--dry-run] [--version X.X.X] [--edge] [--method detect] \
|
||||
[--prefix ~/.local] [--rsh ssh] [user@host]
|
||||
|
||||
--dry-run
|
||||
@@ -32,6 +32,9 @@ Usage:
|
||||
--version X.X.X
|
||||
Install a specific version instead of the latest.
|
||||
|
||||
--edge
|
||||
Install the latest edge version instead of the latest stable version.
|
||||
|
||||
--method [detect | standalone]
|
||||
Choose the installation method. Defaults to detect.
|
||||
- detect detects the system package manager and tries to use it.
|
||||
@@ -71,9 +74,13 @@ EOF
|
||||
}
|
||||
|
||||
echo_latest_version() {
|
||||
# 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="${version#https://github.com/cdr/code-server/releases/tag/}"
|
||||
if [ "${EDGE-}" ]; then
|
||||
version="$(curl -fsSL https://api.github.com/repos/coder/code-server/releases | awk 'match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F '"' '{print $4}')"
|
||||
else
|
||||
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
|
||||
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/coder/code-server/releases/latest)"
|
||||
fi
|
||||
version="${version#https://github.com/coder/code-server/releases/tag/}"
|
||||
version="${version#v}"
|
||||
echo "$version"
|
||||
}
|
||||
@@ -135,6 +142,7 @@ main() {
|
||||
OPTIONAL \
|
||||
ALL_FLAGS \
|
||||
RSH_ARGS \
|
||||
EDGE \
|
||||
RSH
|
||||
|
||||
ALL_FLAGS=""
|
||||
@@ -170,6 +178,9 @@ main() {
|
||||
--version=*)
|
||||
VERSION="$(parse_arg "$@")"
|
||||
;;
|
||||
--edge)
|
||||
EDGE=1
|
||||
;;
|
||||
--rsh)
|
||||
RSH="$(parse_arg "$@")"
|
||||
shift
|
||||
@@ -340,7 +351,7 @@ install_deb() {
|
||||
echoh "Installing v$VERSION of the $ARCH deb package from GitHub."
|
||||
echoh
|
||||
|
||||
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server_${VERSION}_$ARCH.deb" \
|
||||
fetch "https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_$ARCH.deb" \
|
||||
"$CACHE_DIR/code-server_${VERSION}_$ARCH.deb"
|
||||
sudo_sh_c dpkg -i "$CACHE_DIR/code-server_${VERSION}_$ARCH.deb"
|
||||
|
||||
@@ -351,7 +362,7 @@ install_rpm() {
|
||||
echoh "Installing v$VERSION of the $ARCH rpm package from GitHub."
|
||||
echoh
|
||||
|
||||
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-$ARCH.rpm" \
|
||||
fetch "https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-$ARCH.rpm" \
|
||||
"$CACHE_DIR/code-server-$VERSION-$ARCH.rpm"
|
||||
sudo_sh_c rpm -i "$CACHE_DIR/code-server-$VERSION-$ARCH.rpm"
|
||||
|
||||
@@ -377,7 +388,7 @@ install_standalone() {
|
||||
echoh "Installing v$VERSION of the $ARCH release from GitHub."
|
||||
echoh
|
||||
|
||||
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-$OS-$ARCH.tar.gz" \
|
||||
fetch "https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-$OS-$ARCH.tar.gz" \
|
||||
"$CACHE_DIR/code-server-$VERSION-$OS-$ARCH.tar.gz"
|
||||
|
||||
# -w only works if the directory exists so try creating it first. If this
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "code-server",
|
||||
"license": "MIT",
|
||||
"version": "3.12.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Run VS Code on a remote server.",
|
||||
"homepage": "https://github.com/cdr/code-server",
|
||||
"bugs": {
|
||||
@@ -92,7 +92,6 @@
|
||||
"limiter": "^1.1.5",
|
||||
"pem": "^1.14.2",
|
||||
"proxy-agent": "^5.0.0",
|
||||
"proxy-from-env": "^1.1.0",
|
||||
"qs": "6.10.2",
|
||||
"rotating-file-stream": "^3.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
@@ -154,10 +153,12 @@
|
||||
"<rootDir>/release-standalone",
|
||||
"<rootDir>/release-npm-package",
|
||||
"<rootDir>/release-gcp",
|
||||
"<rootDir>/release-images"
|
||||
"<rootDir>/release-images",
|
||||
"<rootDir>/vendor"
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"^.+\\.(css|less)$": "<rootDir>/test/utils/cssStub.ts"
|
||||
}
|
||||
},
|
||||
"globalSetup": "<rootDir>/test/utils/globalUnitSetup.ts"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ export interface UserProvidedArgs {
|
||||
enable?: string[]
|
||||
help?: boolean
|
||||
host?: string
|
||||
locale?: string
|
||||
port?: number
|
||||
json?: boolean
|
||||
log?: LogLevel
|
||||
@@ -163,6 +164,7 @@ const options: Options<Required<UserProvidedArgs>> = {
|
||||
enable: { type: "string[]" },
|
||||
help: { type: "boolean", short: "h", description: "Show this output." },
|
||||
json: { type: "boolean" },
|
||||
locale: { type: "string" }, // The preferred way to set the locale is via the UI.
|
||||
open: { type: "boolean", description: "Open in browser on startup. Does not work remotely." },
|
||||
|
||||
"bind-addr": {
|
||||
|
||||
@@ -25,3 +25,5 @@ export const rootPath = path.resolve(__dirname, "../..")
|
||||
export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev")
|
||||
export const tmpdir = path.join(os.tmpdir(), "code-server")
|
||||
export const isDevMode = commit === "development"
|
||||
export const httpProxyUri =
|
||||
process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy
|
||||
|
||||
@@ -2,12 +2,9 @@ import { logger } from "@coder/logger"
|
||||
import { optionDescriptions, parse, readConfigFile, setDefaults, shouldOpenInExistingInstance } from "./cli"
|
||||
import { commit, version } from "./constants"
|
||||
import { openInExistingInstance, runCodeServer, runVsCodeCli, shouldSpawnCliProcess } from "./main"
|
||||
import { monkeyPatchProxyProtocols } from "./proxy_agent"
|
||||
import { isChild, wrapper } from "./wrapper"
|
||||
|
||||
async function entry(): Promise<void> {
|
||||
monkeyPatchProxyProtocols()
|
||||
|
||||
// There's no need to check flags like --help or to spawn in an existing
|
||||
// instance for the child process because these would have already happened in
|
||||
// the parent and the child wouldn't have been spawned. We also get the
|
||||
|
||||
@@ -10,6 +10,8 @@ import { normalize } from "../common/util"
|
||||
import { AuthType, DefaultedArgs } from "./cli"
|
||||
import { version as codeServerVersion } from "./constants"
|
||||
import { Heart } from "./heart"
|
||||
import { CoderSettings, SettingsProvider } from "./settings"
|
||||
import { UpdateProvider } from "./update"
|
||||
import { getPasswordMethod, IsCookieValidArgs, isCookieValid, sanitizeString, escapeHtml, escapeJSON } from "./util"
|
||||
|
||||
/**
|
||||
@@ -29,6 +31,8 @@ declare global {
|
||||
export interface Request {
|
||||
args: DefaultedArgs
|
||||
heart: Heart
|
||||
settings: SettingsProvider<CoderSettings>
|
||||
updater: UpdateProvider
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,8 +139,8 @@ export const relativeRoot = (originalUrl: string): string => {
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect relatively to `/${to}`. Query variables on the current URI will be preserved.
|
||||
* `to` should be a simple path without any query parameters
|
||||
* Redirect relatively to `/${to}`. Query variables on the current URI will be
|
||||
* preserved. `to` should be a simple path without any query parameters
|
||||
* `override` will merge with the existing query (use `undefined` to unset).
|
||||
*/
|
||||
export const redirect = (
|
||||
@@ -284,3 +288,10 @@ export const getCookieOptions = (req: express.Request): express.CookieOptions =>
|
||||
sameSite: "lax",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full path to the current page, preserving any trailing slash.
|
||||
*/
|
||||
export const self = (req: express.Request): string => {
|
||||
return normalize(`${req.baseUrl}${req.originalUrl.endsWith("/") ? "/" : ""}`, true)
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Coder Technologies. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import ProxyAgent from "proxy-agent"
|
||||
import { getProxyForUrl } from "proxy-from-env"
|
||||
|
||||
/**
|
||||
* This file has nothing to do with the code-server proxy.
|
||||
* It is to support $HTTP_PROXY, $HTTPS_PROXY and $NO_PROXY.
|
||||
*
|
||||
* - https://github.com/cdr/code-server/issues/124
|
||||
* - https://www.npmjs.com/package/proxy-agent
|
||||
* - https://www.npmjs.com/package/proxy-from-env
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* monkeyPatch patches the node http,https modules to route all requests through the
|
||||
* agent we get from the proxy-agent package.
|
||||
*
|
||||
* This approach only works if there is no code specifying an explicit agent when making
|
||||
* a request.
|
||||
*
|
||||
* None of our code ever passes in a explicit agent to the http,https modules.
|
||||
* VS Code's does sometimes but only when a user sets the http.proxy configuration.
|
||||
* See https://code.visualstudio.com/docs/setup/network#_legacy-proxy-server-support
|
||||
*
|
||||
* Even if they do, it's probably the same proxy so we should be fine! And those knobs
|
||||
* are deprecated anyway.
|
||||
*/
|
||||
export function monkeyPatchProxyProtocols(): void {
|
||||
if (!shouldEnableProxy()) {
|
||||
return
|
||||
}
|
||||
|
||||
const http = require("http")
|
||||
const https = require("https")
|
||||
|
||||
// If we do not pass in a proxy URL, proxy-agent will get the URL from the environment.
|
||||
// See https://www.npmjs.com/package/proxy-from-env.
|
||||
// Also see shouldEnableProxy.
|
||||
const pa = new ProxyAgent()
|
||||
http.globalAgent = pa
|
||||
https.globalAgent = pa
|
||||
}
|
||||
|
||||
const sampleUrls = [new URL("http://example.com"), new URL("https://example.com")]
|
||||
|
||||
// If they have $NO_PROXY set to example.com then this check won't work!
|
||||
// But that's drastically unlikely.
|
||||
export function shouldEnableProxy(): boolean {
|
||||
const testedProxyEndpoints = sampleUrls.map((url) => {
|
||||
return {
|
||||
url,
|
||||
proxyUrl: getProxyForUrl(url.toString()),
|
||||
}
|
||||
})
|
||||
|
||||
let shouldEnable = false
|
||||
|
||||
for (const { url, proxyUrl } of testedProxyEndpoints) {
|
||||
if (proxyUrl) {
|
||||
console.debug(`${url.protocol} -- Using "${proxyUrl}"`)
|
||||
shouldEnable = true
|
||||
}
|
||||
}
|
||||
|
||||
return shouldEnable
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Request, Router } from "express"
|
||||
import { HttpCode, HttpError } from "../../common/http"
|
||||
import { normalize } from "../../common/util"
|
||||
import { authenticated, ensureAuthenticated, redirect } from "../http"
|
||||
import { authenticated, ensureAuthenticated, redirect, self } from "../http"
|
||||
import { proxy } from "../proxy"
|
||||
import { Router as WsRouter } from "../wsRouter"
|
||||
|
||||
@@ -56,7 +55,7 @@ router.all("*", async (req, res, next) => {
|
||||
return next()
|
||||
}
|
||||
// Redirect all other pages to the login.
|
||||
const to = normalize(`${req.baseUrl}${req.path}`)
|
||||
const to = self(req)
|
||||
return redirect(req, res, "login", {
|
||||
to: to !== "/" ? to : undefined,
|
||||
})
|
||||
|
||||
@@ -14,6 +14,8 @@ import { commit, rootPath } from "../constants"
|
||||
import { Heart } from "../heart"
|
||||
import { ensureAuthenticated, redirect } from "../http"
|
||||
import { PluginAPI } from "../plugin"
|
||||
import { CoderSettings, SettingsProvider } from "../settings"
|
||||
import { UpdateProvider } from "../update"
|
||||
import { getMediaMime, paths } from "../util"
|
||||
import * as apps from "./apps"
|
||||
import * as domainProxy from "./domainProxy"
|
||||
@@ -47,6 +49,9 @@ export const register = async (app: App, args: DefaultedArgs): Promise<Disposabl
|
||||
app.router.use(cookieParser())
|
||||
app.wsRouter.use(cookieParser())
|
||||
|
||||
const settings = new SettingsProvider<CoderSettings>(path.join(args["user-data-dir"], "coder.json"))
|
||||
const updater = new UpdateProvider("https://api.github.com/repos/coder/code-server/releases/latest", settings)
|
||||
|
||||
const common: express.RequestHandler = (req, _, next) => {
|
||||
// /healthz|/healthz/ needs to be excluded otherwise health checks will make
|
||||
// it look like code-server is always in use.
|
||||
@@ -57,6 +62,8 @@ export const register = async (app: App, args: DefaultedArgs): Promise<Disposabl
|
||||
// Add common variables routes can use.
|
||||
req.args = args
|
||||
req.heart = heart
|
||||
req.settings = settings
|
||||
req.updater = updater
|
||||
|
||||
next()
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import * as path from "path"
|
||||
import * as qs from "qs"
|
||||
import * as pluginapi from "../../../typings/pluginapi"
|
||||
import { HttpCode, HttpError } from "../../common/http"
|
||||
import { normalize } from "../../common/util"
|
||||
import { authenticated, ensureAuthenticated, redirect } from "../http"
|
||||
import { authenticated, ensureAuthenticated, redirect, self } from "../http"
|
||||
import { proxy as _proxy } from "../proxy"
|
||||
|
||||
const getProxyTarget = (req: Request, passthroughPath?: boolean): string => {
|
||||
@@ -25,7 +24,7 @@ export function proxy(
|
||||
if (!authenticated(req)) {
|
||||
// If visiting the root (/:port only) redirect to the login page.
|
||||
if (!req.params[0] || req.params[0] === "/") {
|
||||
const to = normalize(`${req.baseUrl}${req.path}`)
|
||||
const to = self(req)
|
||||
return redirect(req, res, "login", {
|
||||
to: to !== "/" ? to : undefined,
|
||||
})
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
import { Router } from "express"
|
||||
import { version } from "../constants"
|
||||
import { ensureAuthenticated } from "../http"
|
||||
import { UpdateProvider } from "../update"
|
||||
|
||||
export const router = Router()
|
||||
|
||||
const provider = new UpdateProvider()
|
||||
|
||||
router.get("/check", ensureAuthenticated, async (req, res) => {
|
||||
const update = await provider.getUpdate(req.query.force === "true")
|
||||
const update = await req.updater.getUpdate(req.query.force === "true")
|
||||
res.json({
|
||||
checked: update.checked,
|
||||
latest: update.version,
|
||||
current: version,
|
||||
isLatest: provider.isLatestVersion(update),
|
||||
isLatest: req.updater.isLatestVersion(update),
|
||||
})
|
||||
})
|
||||
|
||||
@@ -2,10 +2,10 @@ import { logger } from "@coder/logger"
|
||||
import * as express from "express"
|
||||
import { WebsocketRequest } from "../../../typings/pluginapi"
|
||||
import { logError } from "../../common/util"
|
||||
import { isDevMode } from "../constants"
|
||||
import { toVsCodeArgs } from "../cli"
|
||||
import { ensureAuthenticated, authenticated, redirect } from "../http"
|
||||
import { loadAMDModule, readCompilationStats } from "../util"
|
||||
import { isDevMode } from "../constants"
|
||||
import { authenticated, ensureAuthenticated, redirect, self } from "../http"
|
||||
import { loadAMDModule } from "../util"
|
||||
import { Router as WsRouter } from "../wsRouter"
|
||||
import { errorHandler } from "./errors"
|
||||
|
||||
@@ -25,12 +25,39 @@ export class CodeServerRouteWrapper {
|
||||
const isAuthenticated = await authenticated(req)
|
||||
|
||||
if (!isAuthenticated) {
|
||||
const to = self(req)
|
||||
return redirect(req, res, "login", {
|
||||
// req.baseUrl can be blank if already at the root.
|
||||
to: req.baseUrl && req.baseUrl !== "/" ? req.baseUrl : undefined,
|
||||
to: to !== "/" ? to : undefined,
|
||||
})
|
||||
}
|
||||
|
||||
const { query } = await req.settings.read()
|
||||
if (query) {
|
||||
// Ew means the workspace was closed so clear the last folder/workspace.
|
||||
if (req.query.ew) {
|
||||
delete query.folder
|
||||
delete query.workspace
|
||||
}
|
||||
|
||||
// Redirect to the last folder/workspace if nothing else is opened.
|
||||
if (
|
||||
!req.query.folder &&
|
||||
!req.query.workspace &&
|
||||
(query.folder || query.workspace) &&
|
||||
!req.args["ignore-last-opened"] // This flag disables this behavior.
|
||||
) {
|
||||
const to = self(req)
|
||||
return redirect(req, res, to, {
|
||||
folder: query.folder,
|
||||
workspace: query.workspace,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Store the query parameters so we can use them on the next load. This
|
||||
// also allows users to create functionality around query parameters.
|
||||
await req.settings.write({ query: req.query })
|
||||
|
||||
next()
|
||||
}
|
||||
|
||||
@@ -66,15 +93,6 @@ export class CodeServerRouteWrapper {
|
||||
return next()
|
||||
}
|
||||
|
||||
if (isDevMode) {
|
||||
// Is the development mode file watcher still busy?
|
||||
const compileStats = await readCompilationStats()
|
||||
|
||||
if (!compileStats || !compileStats.lastCompiledAt) {
|
||||
return next(new Error("VS Code may still be compiling..."))
|
||||
}
|
||||
}
|
||||
|
||||
// Create the server...
|
||||
|
||||
const { args } = req
|
||||
@@ -89,9 +107,12 @@ export class CodeServerRouteWrapper {
|
||||
|
||||
try {
|
||||
this._codeServerMain = await createVSServer(null, await toVsCodeArgs(args))
|
||||
} catch (createServerError) {
|
||||
logError(logger, "CodeServerRouteWrapper", createServerError)
|
||||
return next(createServerError)
|
||||
} catch (error) {
|
||||
logError(logger, "CodeServerRouteWrapper", error)
|
||||
if (isDevMode) {
|
||||
return next(new Error((error instanceof Error ? error.message : error) + " (VS Code may still be compiling)"))
|
||||
}
|
||||
return next(error)
|
||||
}
|
||||
|
||||
return next()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import { Query } from "express-serve-static-core"
|
||||
import { promises as fs } from "fs"
|
||||
import * as path from "path"
|
||||
import { paths } from "./util"
|
||||
|
||||
export type Settings = { [key: string]: Settings | string | boolean | number }
|
||||
|
||||
@@ -54,14 +52,5 @@ export interface UpdateSettings {
|
||||
* Global code-server settings.
|
||||
*/
|
||||
export interface CoderSettings extends UpdateSettings {
|
||||
lastVisited: {
|
||||
url: string
|
||||
workspace: boolean
|
||||
}
|
||||
query: Query
|
||||
query?: Query
|
||||
}
|
||||
|
||||
/**
|
||||
* Global code-server settings file.
|
||||
*/
|
||||
export const settings = new SettingsProvider<CoderSettings>(path.join(paths.data, "coder.json"))
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { field, logger } from "@coder/logger"
|
||||
import * as http from "http"
|
||||
import * as https from "https"
|
||||
import ProxyAgent from "proxy-agent"
|
||||
import * as semver from "semver"
|
||||
import * as url from "url"
|
||||
import { version } from "./constants"
|
||||
import { settings as globalSettings, SettingsProvider, UpdateSettings } from "./settings"
|
||||
import { httpProxyUri, version } from "./constants"
|
||||
import { SettingsProvider, UpdateSettings } from "./settings"
|
||||
|
||||
export interface Update {
|
||||
checked: number
|
||||
@@ -27,12 +28,11 @@ export class UpdateProvider {
|
||||
* The URL for getting the latest version of code-server. Should return JSON
|
||||
* that fulfills `LatestResponse`.
|
||||
*/
|
||||
private readonly latestUrl = "https://api.github.com/repos/cdr/code-server/releases/latest",
|
||||
private readonly latestUrl: string,
|
||||
/**
|
||||
* Update information will be stored here. If not provided, the global
|
||||
* settings will be used.
|
||||
* Update information will be stored here.
|
||||
*/
|
||||
private readonly settings: SettingsProvider<UpdateSettings> = globalSettings,
|
||||
private readonly settings: SettingsProvider<UpdateSettings>,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -103,8 +103,10 @@ export class UpdateProvider {
|
||||
return new Promise((resolve, reject) => {
|
||||
const request = (uri: string): void => {
|
||||
logger.debug("Making request", field("uri", uri))
|
||||
const httpx = uri.startsWith("https") ? https : http
|
||||
const client = httpx.get(uri, { headers: { "User-Agent": "code-server" } }, (response) => {
|
||||
const isHttps = uri.startsWith("https")
|
||||
const agent = httpProxyUri ? new ProxyAgent(httpProxyUri) : undefined
|
||||
const httpx = isHttps ? https : http
|
||||
const client = httpx.get(uri, { headers: { "User-Agent": "code-server" }, agent }, (response) => {
|
||||
if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 400) {
|
||||
response.destroy()
|
||||
return reject(new Error(`${uri}: ${response.statusCode || "500"}`))
|
||||
|
||||
@@ -3,15 +3,14 @@ import * as argon2 from "argon2"
|
||||
import * as cp from "child_process"
|
||||
import * as crypto from "crypto"
|
||||
import envPaths from "env-paths"
|
||||
import { promises as fs, Stats } from "fs"
|
||||
import { promises as fs } from "fs"
|
||||
import * as net from "net"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
import safeCompare from "safe-compare"
|
||||
import * as util from "util"
|
||||
import xdgBasedir from "xdg-basedir"
|
||||
import { logError } from "../common/util"
|
||||
import { isDevMode, rootPath, vsRootPath } from "./constants"
|
||||
import { vsRootPath } from "./constants"
|
||||
|
||||
export interface Paths {
|
||||
data: string
|
||||
@@ -523,34 +522,3 @@ export const loadAMDModule = async <T>(amdPath: string, exportName: string): Pro
|
||||
|
||||
return module[exportName] as T
|
||||
}
|
||||
|
||||
export interface CompilationStats {
|
||||
lastCompiledAt: Date
|
||||
}
|
||||
|
||||
export const readCompilationStats = async (): Promise<null | CompilationStats> => {
|
||||
if (!isDevMode) {
|
||||
throw new Error("Compilation stats are only present in development")
|
||||
}
|
||||
|
||||
const filePath = path.join(rootPath, "out/watcher.json")
|
||||
let stat: Stats
|
||||
try {
|
||||
stat = await fs.stat(filePath)
|
||||
} catch (error) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (!stat.isFile()) {
|
||||
return null
|
||||
}
|
||||
|
||||
try {
|
||||
const file = await fs.readFile(filePath)
|
||||
return JSON.parse(file.toString("utf-8"))
|
||||
} catch (error) {
|
||||
logError(logger, "VS Code", error)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
12
test/e2e/extensions.test.ts
Normal file
12
test/e2e/extensions.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { describe, test } from "./baseFixture"
|
||||
|
||||
describe("Extensions", true, () => {
|
||||
// This will only work if the test extension is loaded into code-server.
|
||||
test("should have access to VSCODE_PROXY_URI", async ({ codeServerPage }) => {
|
||||
const address = await codeServerPage.address()
|
||||
|
||||
await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI")
|
||||
|
||||
await codeServerPage.page.waitForSelector(`text=${address}/proxy/{port}`)
|
||||
})
|
||||
})
|
||||
1
test/e2e/extensions/test-extension/.gitignore
vendored
Normal file
1
test/e2e/extensions/test-extension/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/extension.js
|
||||
13
test/e2e/extensions/test-extension/extension.ts
Normal file
13
test/e2e/extensions/test-extension/extension.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as vscode from "vscode"
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand("codeServerTest.proxyUri", () => {
|
||||
if (process.env.VSCODE_PROXY_URI) {
|
||||
vscode.window.showInformationMessage(process.env.VSCODE_PROXY_URI)
|
||||
} else {
|
||||
vscode.window.showErrorMessage("No proxy URI was set")
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
29
test/e2e/extensions/test-extension/package.json
Normal file
29
test/e2e/extensions/test-extension/package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "code-server-extension",
|
||||
"description": "code-server test extension",
|
||||
"version": "0.0.1",
|
||||
"publisher": "cdr",
|
||||
"activationEvents": [
|
||||
"onCommand:codeServerTest.proxyUri"
|
||||
],
|
||||
"engines": {
|
||||
"vscode": "^1.56.0"
|
||||
},
|
||||
"main": "./extension.js",
|
||||
"contributes": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "codeServerTest.proxyUri",
|
||||
"title": "Get proxy URI",
|
||||
"category": "code-server"
|
||||
}
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/vscode": "^1.56.0",
|
||||
"typescript": "^4.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc extension.ts"
|
||||
}
|
||||
}
|
||||
10
test/e2e/extensions/test-extension/tsconfig.json
Normal file
10
test/e2e/extensions/test-extension/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"module": "commonjs",
|
||||
"outDir": ".",
|
||||
"strict": true,
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["./extension.ts"]
|
||||
}
|
||||
13
test/e2e/extensions/test-extension/yarn.lock
Normal file
13
test/e2e/extensions/test-extension/yarn.lock
Normal file
@@ -0,0 +1,13 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/vscode@^1.56.0":
|
||||
version "1.57.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.57.0.tgz#cc648e0573b92f725cd1baf2621f8da9f8bc689f"
|
||||
integrity sha512-FeznBFtIDCWRluojTsi9c3LLcCHOXP5etQfBK42+ixo1CoEAchkw39tuui9zomjZuKfUVL33KZUDIwHZ/xvOkQ==
|
||||
|
||||
typescript@^4.0.5:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
|
||||
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
|
||||
@@ -88,6 +88,8 @@ export class CodeServer {
|
||||
path.join(dir, "config.yaml"),
|
||||
"--user-data-dir",
|
||||
dir,
|
||||
"--extensions-dir",
|
||||
path.join(__dirname, "../extensions"),
|
||||
// The last argument is the workspace to open.
|
||||
dir,
|
||||
],
|
||||
|
||||
@@ -1,29 +1,19 @@
|
||||
import * as cp from "child_process"
|
||||
import * as fs from "fs"
|
||||
import * as path from "path"
|
||||
import util from "util"
|
||||
import { tmpdir } from "../utils/helpers"
|
||||
import { clean, tmpdir } from "../utils/helpers"
|
||||
import { describe, expect, test } from "./baseFixture"
|
||||
|
||||
describe("Integrated Terminal", true, () => {
|
||||
// Create a new context with the saved storage state
|
||||
// so we don't have to logged in
|
||||
const testFileName = "pipe"
|
||||
const testString = "new string test from e2e test"
|
||||
let tmpFolderPath = ""
|
||||
let tmpFile = ""
|
||||
|
||||
const testName = "integrated-terminal"
|
||||
test.beforeAll(async () => {
|
||||
tmpFolderPath = await tmpdir("integrated-terminal")
|
||||
tmpFile = path.join(tmpFolderPath, testFileName)
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
test.afterAll(async () => {
|
||||
// Ensure directory was removed
|
||||
await fs.promises.rmdir(tmpFolderPath, { recursive: true })
|
||||
})
|
||||
test("should have access to VSCODE_PROXY_URI", async ({ codeServerPage }) => {
|
||||
const tmpFolderPath = await tmpdir(testName)
|
||||
const tmpFile = path.join(tmpFolderPath, "pipe")
|
||||
|
||||
test("should echo a string to a file", async ({ codeServerPage }) => {
|
||||
const command = `mkfifo '${tmpFile}' && cat '${tmpFile}'`
|
||||
const exec = util.promisify(cp.exec)
|
||||
const output = exec(command, { encoding: "utf8" })
|
||||
@@ -32,12 +22,12 @@ describe("Integrated Terminal", true, () => {
|
||||
await codeServerPage.focusTerminal()
|
||||
|
||||
await codeServerPage.page.waitForLoadState("load")
|
||||
await codeServerPage.page.keyboard.type(`echo ${testString} > ${tmpFile}`)
|
||||
await codeServerPage.page.keyboard.type(`printenv VSCODE_PROXY_URI > ${tmpFile}`)
|
||||
await codeServerPage.page.keyboard.press("Enter")
|
||||
// It may take a second to process
|
||||
await codeServerPage.page.waitForTimeout(1000)
|
||||
|
||||
const { stdout } = await output
|
||||
expect(stdout).toMatch(testString)
|
||||
expect(stdout).toMatch(await codeServerPage.address())
|
||||
})
|
||||
})
|
||||
|
||||
@@ -12,7 +12,7 @@ const config: PlaywrightTestConfig = {
|
||||
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
|
||||
timeout: 60000, // Each test is given 60 seconds.
|
||||
retries: process.env.CI ? 2 : 1, // Retry in CI due to flakiness.
|
||||
globalSetup: require.resolve("./utils/globalSetup.ts"),
|
||||
globalSetup: require.resolve("./utils/globalE2eSetup.ts"),
|
||||
reporter: "list",
|
||||
// Put any shared options on the top level.
|
||||
use: {
|
||||
@@ -25,12 +25,10 @@ const config: PlaywrightTestConfig = {
|
||||
name: "Chromium",
|
||||
use: { browserName: "chromium" },
|
||||
},
|
||||
|
||||
{
|
||||
name: "Firefox",
|
||||
use: { browserName: "firefox" },
|
||||
},
|
||||
|
||||
{
|
||||
name: "WebKit",
|
||||
use: { browserName: "webkit" },
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
// Note: we need to import logger from the root
|
||||
// because this is the logger used in logError in ../src/common/util
|
||||
import { logger } from "@coder/logger"
|
||||
|
||||
import { Emitter } from "../../../src/common/emitter"
|
||||
import { mockLogger } from "../../utils/helpers"
|
||||
|
||||
describe("emitter", () => {
|
||||
let spy: jest.SpyInstance
|
||||
|
||||
beforeEach(() => {
|
||||
spy = jest.spyOn(logger, "error")
|
||||
mockLogger()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.restoreAllMocks()
|
||||
})
|
||||
|
||||
it("should run the correct callbacks", async () => {
|
||||
const HELLO_WORLD = "HELLO_WORLD"
|
||||
const GOODBYE_WORLD = "GOODBYE_WORLD"
|
||||
@@ -85,8 +77,8 @@ describe("emitter", () => {
|
||||
await emitter.emit({ event: HELLO_WORLD, callback: mockCallback })
|
||||
|
||||
// Check that error was called
|
||||
expect(spy).toHaveBeenCalled()
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(message)
|
||||
expect(logger.error).toHaveBeenCalled()
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(message)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import { JSDOM } from "jsdom"
|
||||
import * as util from "../../../src/common/util"
|
||||
import { createLoggerMock } from "../../utils/helpers"
|
||||
import { mockLogger } from "../../utils/helpers"
|
||||
|
||||
const dom = new JSDOM()
|
||||
global.document = dom.window.document
|
||||
@@ -94,31 +95,29 @@ describe("util", () => {
|
||||
})
|
||||
|
||||
describe("logError", () => {
|
||||
beforeAll(() => {
|
||||
mockLogger()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.restoreAllMocks()
|
||||
})
|
||||
|
||||
const loggerModule = createLoggerMock()
|
||||
|
||||
it("should log an error with the message and stack trace", () => {
|
||||
const message = "You don't have access to that folder."
|
||||
const error = new Error(message)
|
||||
|
||||
util.logError(loggerModule.logger, "ui", error)
|
||||
util.logError(logger, "ui", error)
|
||||
|
||||
expect(loggerModule.logger.error).toHaveBeenCalled()
|
||||
expect(loggerModule.logger.error).toHaveBeenCalledWith(`ui: ${error.message} ${error.stack}`)
|
||||
expect(logger.error).toHaveBeenCalled()
|
||||
expect(logger.error).toHaveBeenCalledWith(`ui: ${error.message} ${error.stack}`)
|
||||
})
|
||||
|
||||
it("should log an error, even if not an instance of error", () => {
|
||||
util.logError(loggerModule.logger, "api", "oh no")
|
||||
util.logError(logger, "api", "oh no")
|
||||
|
||||
expect(loggerModule.logger.error).toHaveBeenCalled()
|
||||
expect(loggerModule.logger.error).toHaveBeenCalledWith("api: oh no")
|
||||
expect(logger.error).toHaveBeenCalled()
|
||||
expect(logger.error).toHaveBeenCalledWith("api: oh no")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { promises as fs } from "fs"
|
||||
import { getAvailablePort, tmpdir, useEnv } from "../../test/utils/helpers"
|
||||
import { clean, getAvailablePort, tmpdir, useEnv } from "../../test/utils/helpers"
|
||||
|
||||
/**
|
||||
* This file is for testing test helpers (not core code).
|
||||
*/
|
||||
describe("test helpers", () => {
|
||||
const testName = "temp-dir"
|
||||
beforeAll(async () => {
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
it("should return a temp directory", async () => {
|
||||
const testName = "temp-dir"
|
||||
const pathToTempDir = await tmpdir(testName)
|
||||
expect(pathToTempDir).toContain(testName)
|
||||
expect(fs.access(pathToTempDir)).resolves.toStrictEqual(undefined)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`handleServerError should log an error if resolved is true 1`] = `"Cannot read property 'handle' of undefined"`;
|
||||
@@ -1,27 +1,29 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import { promises, rmdirSync } from "fs"
|
||||
import { promises } from "fs"
|
||||
import * as http from "http"
|
||||
import * as https from "https"
|
||||
import * as path from "path"
|
||||
import { createApp, ensureAddress, handleArgsSocketCatchError, handleServerError } from "../../../src/node/app"
|
||||
import { OptionalString, setDefaults } from "../../../src/node/cli"
|
||||
import { generateCertificate } from "../../../src/node/util"
|
||||
import { getAvailablePort, tmpdir } from "../../utils/helpers"
|
||||
import { clean, mockLogger, getAvailablePort, tmpdir } from "../../utils/helpers"
|
||||
|
||||
describe("createApp", () => {
|
||||
let spy: jest.SpyInstance
|
||||
let unlinkSpy: jest.SpyInstance
|
||||
let port: number
|
||||
let tmpDirPath: string
|
||||
let tmpFilePath: string
|
||||
|
||||
beforeAll(async () => {
|
||||
tmpDirPath = await tmpdir("unlink-socket")
|
||||
mockLogger()
|
||||
|
||||
const testName = "unlink-socket"
|
||||
await clean(testName)
|
||||
tmpDirPath = await tmpdir(testName)
|
||||
tmpFilePath = path.join(tmpDirPath, "unlink-socket-file")
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
spy = jest.spyOn(logger, "error")
|
||||
// NOTE:@jsjoeio
|
||||
// Be mindful when spying.
|
||||
// You can't spy on fs functions if you do import * as fs
|
||||
@@ -36,12 +38,6 @@ describe("createApp", () => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.restoreAllMocks()
|
||||
// Ensure directory was removed
|
||||
rmdirSync(tmpDirPath, { recursive: true })
|
||||
})
|
||||
|
||||
it("should return an Express app, a WebSockets Express app and an http server", async () => {
|
||||
const defaultArgs = await setDefaults({
|
||||
port,
|
||||
@@ -70,8 +66,8 @@ describe("createApp", () => {
|
||||
// By emitting an error event
|
||||
// Ref: https://stackoverflow.com/a/33872506/3015595
|
||||
app.server.emit("error", testError)
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(`http server error: ${testError.message} ${testError.stack}`)
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(`http server error: ${testError.message} ${testError.stack}`)
|
||||
|
||||
// Cleanup
|
||||
app.dispose()
|
||||
@@ -152,20 +148,14 @@ describe("ensureAddress", () => {
|
||||
})
|
||||
|
||||
describe("handleServerError", () => {
|
||||
let spy: jest.SpyInstance
|
||||
|
||||
beforeEach(() => {
|
||||
spy = jest.spyOn(logger, "error")
|
||||
beforeAll(() => {
|
||||
mockLogger()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.restoreAllMocks()
|
||||
})
|
||||
|
||||
it("should call reject if resolved is false", async () => {
|
||||
const resolved = false
|
||||
const reject = jest.fn((err: Error) => undefined)
|
||||
@@ -184,33 +174,27 @@ describe("handleServerError", () => {
|
||||
|
||||
handleServerError(resolved, error, reject)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toThrowErrorMatchingSnapshot()
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(`http server error: ${error.message} ${error.stack}`)
|
||||
})
|
||||
})
|
||||
|
||||
describe("handleArgsSocketCatchError", () => {
|
||||
let spy: jest.SpyInstance
|
||||
|
||||
beforeEach(() => {
|
||||
spy = jest.spyOn(logger, "error")
|
||||
beforeAll(() => {
|
||||
mockLogger()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
jest.restoreAllMocks()
|
||||
})
|
||||
|
||||
it("should log an error if its not an NodeJS.ErrnoException", () => {
|
||||
const error = new Error()
|
||||
|
||||
handleArgsSocketCatchError(error)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(error)
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(error)
|
||||
})
|
||||
|
||||
it("should log an error if its not an NodeJS.ErrnoException (and the error has a message)", () => {
|
||||
@@ -219,8 +203,8 @@ describe("handleArgsSocketCatchError", () => {
|
||||
|
||||
handleArgsSocketCatchError(error)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(errorMessage)
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(errorMessage)
|
||||
})
|
||||
|
||||
it("should not log an error if its a iNodeJS.ErrnoException", () => {
|
||||
@@ -229,7 +213,7 @@ describe("handleArgsSocketCatchError", () => {
|
||||
|
||||
handleArgsSocketCatchError(error)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(0)
|
||||
expect(logger.error).toHaveBeenCalledTimes(0)
|
||||
})
|
||||
|
||||
it("should log an error if the code is not ENOENT (and the error has a message)", () => {
|
||||
@@ -240,8 +224,8 @@ describe("handleArgsSocketCatchError", () => {
|
||||
|
||||
handleArgsSocketCatchError(error)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(errorMessage)
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(errorMessage)
|
||||
})
|
||||
|
||||
it("should log an error if the code is not ENOENT", () => {
|
||||
@@ -250,7 +234,7 @@ describe("handleArgsSocketCatchError", () => {
|
||||
|
||||
handleArgsSocketCatchError(error)
|
||||
|
||||
expect(spy).toHaveBeenCalledTimes(1)
|
||||
expect(spy).toHaveBeenCalledWith(error)
|
||||
expect(logger.error).toHaveBeenCalledTimes(1)
|
||||
expect(logger.error).toHaveBeenCalledWith(error)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -63,6 +63,8 @@ describe("parser", () => {
|
||||
"--verbose",
|
||||
"2",
|
||||
|
||||
["--locale", "ja"],
|
||||
|
||||
["--log", "error"],
|
||||
|
||||
"--help",
|
||||
@@ -103,6 +105,7 @@ describe("parser", () => {
|
||||
help: true,
|
||||
host: "0.0.0.0",
|
||||
json: true,
|
||||
locale: "ja",
|
||||
log: "error",
|
||||
open: true,
|
||||
port: 8081,
|
||||
@@ -361,13 +364,11 @@ describe("parser", () => {
|
||||
})
|
||||
|
||||
describe("cli", () => {
|
||||
let testDir: string
|
||||
const testName = "cli"
|
||||
const vscodeIpcPath = path.join(os.tmpdir(), "vscode-ipc")
|
||||
|
||||
beforeAll(async () => {
|
||||
testDir = await tmpdir("cli")
|
||||
await fs.rmdir(testDir, { recursive: true })
|
||||
await fs.mkdir(testDir, { recursive: true })
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -416,6 +417,7 @@ describe("cli", () => {
|
||||
args._ = ["./file"]
|
||||
expect(await shouldOpenInExistingInstance(args)).toStrictEqual(undefined)
|
||||
|
||||
const testDir = await tmpdir(testName)
|
||||
const socketPath = path.join(testDir, "socket")
|
||||
await fs.writeFile(vscodeIpcPath, socketPath)
|
||||
expect(await shouldOpenInExistingInstance(args)).toStrictEqual(undefined)
|
||||
@@ -635,14 +637,15 @@ describe("readSocketPath", () => {
|
||||
let tmpDirPath: string
|
||||
let tmpFilePath: string
|
||||
|
||||
beforeEach(async () => {
|
||||
tmpDirPath = await tmpdir("readSocketPath")
|
||||
tmpFilePath = path.join(tmpDirPath, "readSocketPath.txt")
|
||||
await fs.writeFile(tmpFilePath, fileContents)
|
||||
const testName = "readSocketPath"
|
||||
beforeAll(async () => {
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await fs.rmdir(tmpDirPath, { recursive: true })
|
||||
beforeEach(async () => {
|
||||
tmpDirPath = await tmpdir(testName)
|
||||
tmpFilePath = path.join(tmpDirPath, "readSocketPath.txt")
|
||||
await fs.writeFile(tmpFilePath, fileContents)
|
||||
})
|
||||
|
||||
it("should throw an error if it can't read the file", async () => {
|
||||
@@ -677,9 +680,10 @@ describe("toVsCodeArgs", () => {
|
||||
version: false,
|
||||
}
|
||||
|
||||
const testName = "vscode-args"
|
||||
beforeAll(async () => {
|
||||
// Clean up temporary directories from the previous run.
|
||||
await clean("vscode-args")
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
it("should convert empty args", async () => {
|
||||
@@ -691,7 +695,7 @@ describe("toVsCodeArgs", () => {
|
||||
})
|
||||
|
||||
it("should convert with workspace", async () => {
|
||||
const workspace = path.join(await tmpdir("vscode-args"), "test.code-workspace")
|
||||
const workspace = path.join(await tmpdir(testName), "test.code-workspace")
|
||||
await fs.writeFile(workspace, "foobar")
|
||||
expect(await toVsCodeArgs(await setDefaults(parse([workspace])))).toStrictEqual({
|
||||
...vscodeDefaults,
|
||||
@@ -702,7 +706,7 @@ describe("toVsCodeArgs", () => {
|
||||
})
|
||||
|
||||
it("should convert with folder", async () => {
|
||||
const folder = await tmpdir("vscode-args")
|
||||
const folder = await tmpdir(testName)
|
||||
expect(await toVsCodeArgs(await setDefaults(parse([folder])))).toStrictEqual({
|
||||
...vscodeDefaults,
|
||||
folder,
|
||||
@@ -712,7 +716,7 @@ describe("toVsCodeArgs", () => {
|
||||
})
|
||||
|
||||
it("should ignore regular file", async () => {
|
||||
const file = path.join(await tmpdir("vscode-args"), "file")
|
||||
const file = path.join(await tmpdir(testName), "file")
|
||||
await fs.writeFile(file, "foobar")
|
||||
expect(await toVsCodeArgs(await setDefaults(parse([file])))).toStrictEqual({
|
||||
...vscodeDefaults,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createLoggerMock } from "../../utils/helpers"
|
||||
import { logger } from "@coder/logger"
|
||||
import { mockLogger } from "../../utils/helpers"
|
||||
|
||||
describe("constants", () => {
|
||||
let constants: typeof import("../../../src/node/constants")
|
||||
|
||||
describe("with package.json defined", () => {
|
||||
const loggerModule = createLoggerMock()
|
||||
const mockPackageJson = {
|
||||
name: "mock-code-server",
|
||||
description: "Run VS Code on a remote server.",
|
||||
@@ -14,7 +14,7 @@ describe("constants", () => {
|
||||
}
|
||||
|
||||
beforeAll(() => {
|
||||
jest.mock("@coder/logger", () => loggerModule)
|
||||
mockLogger()
|
||||
jest.mock("../../../package.json", () => mockPackageJson, { virtual: true })
|
||||
constants = require("../../../src/node/constants")
|
||||
})
|
||||
@@ -38,8 +38,8 @@ describe("constants", () => {
|
||||
|
||||
constants.getPackageJson("./package.json")
|
||||
|
||||
expect(loggerModule.logger.warn).toHaveBeenCalled()
|
||||
expect(loggerModule.logger.warn).toHaveBeenCalledWith(expectedErrorMessage)
|
||||
expect(logger.warn).toHaveBeenCalled()
|
||||
expect(logger.warn).toHaveBeenCalledWith(expectedErrorMessage)
|
||||
})
|
||||
|
||||
it("should find the package.json", () => {
|
||||
|
||||
@@ -69,7 +69,7 @@ describe("plugin", () => {
|
||||
expect(body).toStrictEqual([
|
||||
{
|
||||
name: "Test App",
|
||||
version: "4.0.0",
|
||||
version: "4.0.1",
|
||||
|
||||
description: "This app does XYZ.",
|
||||
iconPath: "/test-plugin/test-app/icon.svg",
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import { shouldEnableProxy } from "../../../src/node/proxy_agent"
|
||||
import { useEnv } from "../../utils/helpers"
|
||||
|
||||
describe("shouldEnableProxy", () => {
|
||||
const [setHTTPProxy, resetHTTPProxy] = useEnv("HTTP_PROXY")
|
||||
const [setHTTPSProxy, resetHTTPSProxy] = useEnv("HTTPS_PROXY")
|
||||
const [setNoProxy, resetNoProxy] = useEnv("NO_PROXY")
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules() // Most important - it clears the cache
|
||||
resetHTTPProxy()
|
||||
resetNoProxy()
|
||||
resetHTTPSProxy()
|
||||
})
|
||||
|
||||
it("returns true when HTTP_PROXY is set", () => {
|
||||
setHTTPProxy("http://proxy.example.com")
|
||||
expect(shouldEnableProxy()).toBe(true)
|
||||
})
|
||||
it("returns true when HTTPS_PROXY is set", () => {
|
||||
setHTTPSProxy("https://proxy.example.com")
|
||||
expect(shouldEnableProxy()).toBe(true)
|
||||
})
|
||||
it("returns false when NO_PROXY is set", () => {
|
||||
setNoProxy("*")
|
||||
expect(shouldEnableProxy()).toBe(false)
|
||||
})
|
||||
it("should return false when neither HTTP_PROXY nor HTTPS_PROXY is set", () => {
|
||||
expect(shouldEnableProxy()).toBe(false)
|
||||
})
|
||||
it("should return false when NO_PROXY is set to https://example.com", () => {
|
||||
setNoProxy("https://example.com")
|
||||
expect(shouldEnableProxy()).toBe(false)
|
||||
})
|
||||
it("should return false when NO_PROXY is set to http://example.com", () => {
|
||||
setNoProxy("http://example.com")
|
||||
expect(shouldEnableProxy()).toBe(false)
|
||||
})
|
||||
})
|
||||
@@ -1,8 +1,13 @@
|
||||
import { RateLimiter } from "../../../../src/node/routes/login"
|
||||
import { mockLogger } from "../../../utils/helpers"
|
||||
import * as httpserver from "../../../utils/httpserver"
|
||||
import * as integration from "../../../utils/integration"
|
||||
|
||||
describe("login", () => {
|
||||
beforeAll(() => {
|
||||
mockLogger()
|
||||
})
|
||||
|
||||
describe("RateLimiter", () => {
|
||||
it("should allow one try ", () => {
|
||||
const limiter = new RateLimiter()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { promises as fs } from "fs"
|
||||
import * as path from "path"
|
||||
import { rootPath } from "../../../../src/node/constants"
|
||||
import { tmpdir } from "../../../utils/helpers"
|
||||
import { clean, tmpdir } from "../../../utils/helpers"
|
||||
import * as httpserver from "../../../utils/httpserver"
|
||||
import * as integration from "../../../utils/integration"
|
||||
|
||||
@@ -23,8 +23,10 @@ describe("/_static", () => {
|
||||
let testFileContent: string | undefined
|
||||
let nonExistentTestFile: string | undefined
|
||||
|
||||
const testName = "_static"
|
||||
beforeAll(async () => {
|
||||
const testDir = await tmpdir("_static")
|
||||
await clean(testName)
|
||||
const testDir = await tmpdir(testName)
|
||||
testFile = path.join(testDir, "test")
|
||||
testFileContent = "static file contents"
|
||||
nonExistentTestFile = path.join(testDir, "i-am-not-here")
|
||||
|
||||
158
test/unit/node/routes/vscode.test.ts
Normal file
158
test/unit/node/routes/vscode.test.ts
Normal file
@@ -0,0 +1,158 @@
|
||||
import { promises as fs } from "fs"
|
||||
import { Response } from "node-fetch"
|
||||
import * as path from "path"
|
||||
import { clean, tmpdir } from "../../../utils/helpers"
|
||||
import * as httpserver from "../../../utils/httpserver"
|
||||
import * as integration from "../../../utils/integration"
|
||||
|
||||
interface WorkbenchConfig {
|
||||
folderUri?: {
|
||||
path: string
|
||||
}
|
||||
workspaceUri?: {
|
||||
path: string
|
||||
}
|
||||
}
|
||||
|
||||
describe("vscode", () => {
|
||||
let codeServer: httpserver.HttpServer | undefined
|
||||
|
||||
const testName = "vscode"
|
||||
beforeAll(async () => {
|
||||
await clean(testName)
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
if (codeServer) {
|
||||
await codeServer.dispose()
|
||||
codeServer = undefined
|
||||
}
|
||||
})
|
||||
|
||||
const routes = ["/", "/vscode", "/vscode/"]
|
||||
|
||||
it("should load all route variations", async () => {
|
||||
codeServer = await integration.setup(["--auth=none"], "")
|
||||
|
||||
for (const route of routes) {
|
||||
const resp = await codeServer.fetch(route)
|
||||
expect(resp.status).toBe(200)
|
||||
const html = await resp.text()
|
||||
const url = new URL(resp.url) // Check there were no redirections.
|
||||
expect(url.pathname + decodeURIComponent(url.search)).toBe(route)
|
||||
switch (route) {
|
||||
case "/":
|
||||
case "/vscode/":
|
||||
expect(html).toContain(`src="./static/`)
|
||||
break
|
||||
case "/vscode":
|
||||
expect(html).toContain(`src="./vscode/static/`)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Get the workbench config from the provided response.
|
||||
*/
|
||||
const getConfig = async (resp: Response): Promise<WorkbenchConfig> => {
|
||||
expect(resp.status).toBe(200)
|
||||
const html = await resp.text()
|
||||
const match = html.match(/<meta id="vscode-workbench-web-configuration" data-settings="(.+)">/)
|
||||
if (!match || !match[1]) {
|
||||
throw new Error("Unable to find workbench configuration")
|
||||
}
|
||||
const config = match[1].replace(/"/g, '"')
|
||||
try {
|
||||
return JSON.parse(config)
|
||||
} catch (error) {
|
||||
console.error("Failed to parse workbench configuration", config)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
it("should have no default folder or workspace", async () => {
|
||||
codeServer = await integration.setup(["--auth=none"], "")
|
||||
|
||||
const config = await getConfig(await codeServer.fetch("/"))
|
||||
expect(config.folderUri).toBeUndefined()
|
||||
expect(config.workspaceUri).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should have a default folder", async () => {
|
||||
const defaultDir = await tmpdir(testName)
|
||||
codeServer = await integration.setup(["--auth=none", defaultDir], "")
|
||||
|
||||
// At first it will load the directory provided on the command line.
|
||||
const config = await getConfig(await codeServer.fetch("/"))
|
||||
expect(config.folderUri?.path).toBe(defaultDir)
|
||||
expect(config.workspaceUri).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should have a default workspace", async () => {
|
||||
const defaultWorkspace = path.join(await tmpdir(testName), "test.code-workspace")
|
||||
await fs.writeFile(defaultWorkspace, "")
|
||||
codeServer = await integration.setup(["--auth=none", defaultWorkspace], "")
|
||||
|
||||
// At first it will load the workspace provided on the command line.
|
||||
const config = await getConfig(await codeServer.fetch("/"))
|
||||
expect(config.folderUri).toBeUndefined()
|
||||
expect(config.workspaceUri?.path).toBe(defaultWorkspace)
|
||||
})
|
||||
|
||||
it("should redirect to last query folder/workspace", async () => {
|
||||
codeServer = await integration.setup(["--auth=none"], "")
|
||||
|
||||
const folder = await tmpdir(testName)
|
||||
const workspace = path.join(await tmpdir(testName), "test.code-workspace")
|
||||
let resp = await codeServer.fetch("/", undefined, {
|
||||
folder,
|
||||
workspace,
|
||||
})
|
||||
expect(resp.status).toBe(200)
|
||||
await resp.text()
|
||||
|
||||
// If you visit again without query parameters it will re-attach them by
|
||||
// redirecting. It should always redirect to the same route.
|
||||
for (const route of routes) {
|
||||
resp = await codeServer.fetch(route)
|
||||
const url = new URL(resp.url)
|
||||
expect(url.pathname).toBe(route)
|
||||
expect(decodeURIComponent(url.search)).toBe(`?folder=${folder}&workspace=${workspace}`)
|
||||
await resp.text()
|
||||
}
|
||||
|
||||
// Closing the folder should stop the redirecting.
|
||||
resp = await codeServer.fetch("/", undefined, { ew: "true" })
|
||||
let url = new URL(resp.url)
|
||||
expect(url.pathname).toBe("/")
|
||||
expect(decodeURIComponent(url.search)).toBe("?ew=true")
|
||||
await resp.text()
|
||||
|
||||
resp = await codeServer.fetch("/")
|
||||
url = new URL(resp.url)
|
||||
expect(url.pathname).toBe("/")
|
||||
expect(decodeURIComponent(url.search)).toBe("")
|
||||
await resp.text()
|
||||
})
|
||||
|
||||
it("should not redirect when last opened is ignored", async () => {
|
||||
codeServer = await integration.setup(["--auth=none", "--ignore-last-opened"], "")
|
||||
|
||||
const folder = await tmpdir(testName)
|
||||
const workspace = path.join(await tmpdir(testName), "test.code-workspace")
|
||||
let resp = await codeServer.fetch("/", undefined, {
|
||||
folder,
|
||||
workspace,
|
||||
})
|
||||
expect(resp.status).toBe(200)
|
||||
await resp.text()
|
||||
|
||||
// No redirections.
|
||||
resp = await codeServer.fetch("/")
|
||||
const url = new URL(resp.url)
|
||||
expect(url.pathname).toBe("/")
|
||||
expect(decodeURIComponent(url.search)).toBe("")
|
||||
await resp.text()
|
||||
})
|
||||
})
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "test-plugin",
|
||||
"version": "1.0.0",
|
||||
"engines": {
|
||||
"code-server": "^3.7.0"
|
||||
"code-server": "^4.0.1"
|
||||
},
|
||||
"main": "out/index.js",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -40,7 +40,7 @@ export const plugin: cs.Plugin = {
|
||||
return [
|
||||
{
|
||||
name: "Test App",
|
||||
version: "4.0.0",
|
||||
version: "4.0.1",
|
||||
iconPath: "/icon.svg",
|
||||
path: "/test-app",
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { promises as fs } from "fs"
|
||||
import * as http from "http"
|
||||
import * as path from "path"
|
||||
import { tmpdir } from "../../../src/node/constants"
|
||||
import { SettingsProvider, UpdateSettings } from "../../../src/node/settings"
|
||||
import { LatestResponse, UpdateProvider } from "../../../src/node/update"
|
||||
import { clean, mockLogger, tmpdir } from "../../utils/helpers"
|
||||
|
||||
describe("update", () => {
|
||||
let version = "1.0.0"
|
||||
@@ -29,22 +28,31 @@ describe("update", () => {
|
||||
response.end("not found")
|
||||
})
|
||||
|
||||
const jsonPath = path.join(tmpdir, "tests/updates/update.json")
|
||||
const settings = new SettingsProvider<UpdateSettings>(jsonPath)
|
||||
let _settings: SettingsProvider<UpdateSettings> | undefined
|
||||
const settings = (): SettingsProvider<UpdateSettings> => {
|
||||
if (!_settings) {
|
||||
throw new Error("Settings provider has not been created")
|
||||
}
|
||||
return _settings
|
||||
}
|
||||
|
||||
let _provider: UpdateProvider | undefined
|
||||
const provider = (): UpdateProvider => {
|
||||
if (!_provider) {
|
||||
const address = server.address()
|
||||
if (!address || typeof address === "string" || !address.port) {
|
||||
throw new Error("unexpected address")
|
||||
}
|
||||
_provider = new UpdateProvider(`http://${address.address}:${address.port}/latest`, settings)
|
||||
throw new Error("Update provider has not been created")
|
||||
}
|
||||
return _provider
|
||||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
mockLogger()
|
||||
|
||||
const testName = "update"
|
||||
await clean(testName)
|
||||
const testDir = await tmpdir(testName)
|
||||
const jsonPath = path.join(testDir, "update.json")
|
||||
_settings = new SettingsProvider<UpdateSettings>(jsonPath)
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
server.on("error", reject)
|
||||
server.on("listening", resolve)
|
||||
@@ -53,8 +61,13 @@ describe("update", () => {
|
||||
host: "localhost",
|
||||
})
|
||||
})
|
||||
await fs.rmdir(path.join(tmpdir, "tests/updates"), { recursive: true })
|
||||
await fs.mkdir(path.join(tmpdir, "tests/updates"), { recursive: true })
|
||||
|
||||
const address = server.address()
|
||||
if (!address || typeof address === "string" || !address.port) {
|
||||
throw new Error("unexpected address")
|
||||
}
|
||||
|
||||
_provider = new UpdateProvider(`http://${address.address}:${address.port}/latest`, _settings)
|
||||
})
|
||||
|
||||
afterAll(() => {
|
||||
@@ -72,7 +85,7 @@ describe("update", () => {
|
||||
const now = Date.now()
|
||||
const update = await p.getUpdate()
|
||||
|
||||
await expect(settings.read()).resolves.toEqual({ update })
|
||||
await expect(settings().read()).resolves.toEqual({ update })
|
||||
expect(isNaN(update.checked)).toEqual(false)
|
||||
expect(update.checked < Date.now() && update.checked >= now).toEqual(true)
|
||||
expect(update.version).toStrictEqual("2.1.0")
|
||||
@@ -86,7 +99,7 @@ describe("update", () => {
|
||||
const now = Date.now()
|
||||
const update = await p.getUpdate()
|
||||
|
||||
await expect(settings.read()).resolves.toEqual({ update })
|
||||
await expect(settings().read()).resolves.toEqual({ update })
|
||||
expect(isNaN(update.checked)).toStrictEqual(false)
|
||||
expect(update.checked < now).toBe(true)
|
||||
expect(update.version).toStrictEqual("2.1.0")
|
||||
@@ -100,7 +113,7 @@ describe("update", () => {
|
||||
const now = Date.now()
|
||||
const update = await p.getUpdate(true)
|
||||
|
||||
await expect(settings.read()).resolves.toEqual({ update })
|
||||
await expect(settings().read()).resolves.toEqual({ update })
|
||||
expect(isNaN(update.checked)).toStrictEqual(false)
|
||||
expect(update.checked < Date.now() && update.checked >= now).toStrictEqual(true)
|
||||
expect(update.version).toStrictEqual("4.1.1")
|
||||
@@ -113,12 +126,12 @@ describe("update", () => {
|
||||
expect(spy).toEqual([])
|
||||
|
||||
let checked = Date.now() - 1000 * 60 * 60 * 23
|
||||
await settings.write({ update: { checked, version } })
|
||||
await settings().write({ update: { checked, version } })
|
||||
await p.getUpdate()
|
||||
expect(spy).toEqual([])
|
||||
|
||||
checked = Date.now() - 1000 * 60 * 60 * 25
|
||||
await settings.write({ update: { checked, version } })
|
||||
await settings().write({ update: { checked, version } })
|
||||
|
||||
const update = await p.getUpdate()
|
||||
expect(update.checked).not.toStrictEqual(checked)
|
||||
@@ -143,14 +156,14 @@ describe("update", () => {
|
||||
})
|
||||
|
||||
it("should not reject if unable to fetch", async () => {
|
||||
let provider = new UpdateProvider("invalid", settings)
|
||||
let provider = new UpdateProvider("invalid", settings())
|
||||
let now = Date.now()
|
||||
let update = await provider.getUpdate(true)
|
||||
expect(isNaN(update.checked)).toStrictEqual(false)
|
||||
expect(update.checked < Date.now() && update.checked >= now).toEqual(true)
|
||||
expect(update.version).toStrictEqual("unknown")
|
||||
|
||||
provider = new UpdateProvider("http://probably.invalid.dev.localhost/latest", settings)
|
||||
provider = new UpdateProvider("http://probably.invalid.dev.localhost/latest", settings())
|
||||
now = Date.now()
|
||||
update = await provider.getUpdate(true)
|
||||
expect(isNaN(update.checked)).toStrictEqual(false)
|
||||
|
||||
@@ -6,8 +6,8 @@ import { clean } from "./helpers"
|
||||
import * as wtfnode from "./wtfnode"
|
||||
|
||||
/**
|
||||
* Perform workspace cleanup and authenticate. This should be set up to run
|
||||
* before our tests execute.
|
||||
* Perform workspace cleanup and authenticate. This should be ran before e2e
|
||||
* tests execute.
|
||||
*/
|
||||
export default async function () {
|
||||
console.log("\n🚨 Running Global Setup for Playwright End-to-End Tests")
|
||||
9
test/utils/globalUnitSetup.ts
Normal file
9
test/utils/globalUnitSetup.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { workspaceDir } from "./constants"
|
||||
import { clean } from "./helpers"
|
||||
|
||||
/**
|
||||
* Perform workspace cleanup. This should be ran before unit tests execute.
|
||||
*/
|
||||
export default async function () {
|
||||
await clean(workspaceDir)
|
||||
}
|
||||
@@ -1,23 +1,26 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import { promises as fs } from "fs"
|
||||
import * as net from "net"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
|
||||
/**
|
||||
* Return a mock of @coder/logger.
|
||||
* Spy on the logger and console and replace with mock implementations to
|
||||
* suppress the output.
|
||||
*/
|
||||
export function createLoggerMock() {
|
||||
return {
|
||||
field: jest.fn(),
|
||||
level: 2,
|
||||
logger: {
|
||||
debug: jest.fn(),
|
||||
error: jest.fn(),
|
||||
info: jest.fn(),
|
||||
trace: jest.fn(),
|
||||
warn: jest.fn(),
|
||||
},
|
||||
}
|
||||
export function mockLogger() {
|
||||
jest.spyOn(logger, "debug").mockImplementation()
|
||||
jest.spyOn(logger, "error").mockImplementation()
|
||||
jest.spyOn(logger, "info").mockImplementation()
|
||||
jest.spyOn(logger, "trace").mockImplementation()
|
||||
jest.spyOn(logger, "warn").mockImplementation()
|
||||
|
||||
jest.spyOn(console, "log").mockImplementation()
|
||||
jest.spyOn(console, "debug").mockImplementation()
|
||||
jest.spyOn(console, "error").mockImplementation()
|
||||
jest.spyOn(console, "info").mockImplementation()
|
||||
jest.spyOn(console, "trace").mockImplementation()
|
||||
jest.spyOn(console, "warn").mockImplementation()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,6 +34,8 @@ export async function clean(testName: string): Promise<void> {
|
||||
|
||||
/**
|
||||
* Create a uniquely named temporary directory for a test.
|
||||
*
|
||||
* `tmpdir` should usually be preceeded by at least one call to `clean`.
|
||||
*/
|
||||
export async function tmpdir(testName: string): Promise<string> {
|
||||
const dir = path.join(os.tmpdir(), `code-server/tests/${testName}`)
|
||||
|
||||
@@ -59,13 +59,17 @@ export class HttpServer {
|
||||
* fetch fetches the request path.
|
||||
* The request path must be rooted!
|
||||
*/
|
||||
public fetch(requestPath: string, opts?: RequestInit): Promise<Response> {
|
||||
public fetch(requestPath: string, opts?: RequestInit, query?: { [key: string]: string }): Promise<Response> {
|
||||
const address = ensureAddress(this.hs, "http")
|
||||
if (typeof address === "string") {
|
||||
throw new Error("Cannot fetch socket path")
|
||||
}
|
||||
address.pathname = requestPath
|
||||
|
||||
if (query) {
|
||||
Object.keys(query).forEach((key) => {
|
||||
address.searchParams.append(key, query[key])
|
||||
})
|
||||
}
|
||||
return nodeFetch(address.toString(), opts)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
import { promises as fs } from "fs"
|
||||
import * as path from "path"
|
||||
import { parse, parseConfigFile, setDefaults } from "../../src/node/cli"
|
||||
import { runCodeServer } from "../../src/node/main"
|
||||
import { workspaceDir } from "./constants"
|
||||
import { tmpdir } from "./helpers"
|
||||
import * as httpserver from "./httpserver"
|
||||
|
||||
export async function setup(argv: string[], configFile?: string): Promise<httpserver.HttpServer> {
|
||||
argv = ["--bind-addr=localhost:0", "--log=warn", ...argv]
|
||||
// This will be used as the data directory to ensure instances do not bleed
|
||||
// into each other.
|
||||
const dir = await tmpdir(workspaceDir)
|
||||
|
||||
const cliArgs = parse(argv)
|
||||
// VS Code complains if the logs dir is missing which spams the output.
|
||||
// TODO: Does that mean we are not creating it when we should be?
|
||||
await fs.mkdir(path.join(dir, "logs"))
|
||||
|
||||
const cliArgs = parse([
|
||||
`--config=${path.join(dir, "config.yaml")}`,
|
||||
`--user-data-dir=${dir}`,
|
||||
"--bind-addr=localhost:0",
|
||||
"--log=warn",
|
||||
...argv,
|
||||
])
|
||||
const configArgs = parseConfigFile(configFile || "", "test/integration.ts")
|
||||
const args = await setDefaults(cliArgs, configArgs)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"target": "es6",
|
||||
"lib": ["es2020", "dom", "dom.iterable"],
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
|
||||
2
typings/pluginapi.d.ts
vendored
2
typings/pluginapi.d.ts
vendored
@@ -64,7 +64,7 @@ import Websocket from "ws"
|
||||
* [
|
||||
* {
|
||||
* "name": "Test App",
|
||||
* "version": "4.0.0",
|
||||
* "version": "4.0.1",
|
||||
* "iconPath": "/test-plugin/test-app/icon.svg",
|
||||
* "path": "/test-plugin/test-app",
|
||||
* "description": "This app does XYZ.",
|
||||
|
||||
2
vendor/package.json
vendored
2
vendor/package.json
vendored
@@ -7,6 +7,6 @@
|
||||
"postinstall": "./postinstall.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"code-oss-dev": "cdr/vscode#478224aa345e9541f2427b30142dd13ee7e14d39"
|
||||
"code-oss-dev": "cdr/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892"
|
||||
}
|
||||
}
|
||||
|
||||
314
vendor/yarn.lock
vendored
314
vendor/yarn.lock
vendored
@@ -99,6 +99,14 @@
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.4.tgz#40e1c0ad20743fcee1604a7df2c57faf0aa1af87"
|
||||
integrity sha512-Ot53G927ykMF8cQ3/zq4foZtdk+Tt1YpX7aUTHxBU7UHNdkEiBvBfZSq+rnlUmKCJ19VatwPG4mNzvcGpBj4og==
|
||||
|
||||
"@parcel/watcher@2.0.3":
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.3.tgz#2bae7720f2b9c21ea0b89bab55479c7e8937231e"
|
||||
integrity sha512-PHh5PArr3nYGYVj9z/NSfDmmKEBNrg2bzoFgxzjTRBBxPUKx039x3HF6VGLFIfrghjJxcYn/IeSpdVwfob7KFA==
|
||||
dependencies:
|
||||
node-addon-api "^3.2.1"
|
||||
node-gyp-build "^4.3.0"
|
||||
|
||||
"@sindresorhus/is@^0.14.0":
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
|
||||
@@ -128,6 +136,11 @@
|
||||
dependencies:
|
||||
nan "2.14.2"
|
||||
|
||||
"@vscode/sudo-prompt@9.3.1":
|
||||
version "9.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/sudo-prompt/-/sudo-prompt-9.3.1.tgz#c562334bc6647733649fd42afc96c0eea8de3b65"
|
||||
integrity sha512-9ORTwwS74VaTn38tNbQhsA5U44zkJfcb0BdTSyyG6frP4e8KMtHuTXYmwefe5dpL8XB1aGSIVTaLjD3BbWb5iA==
|
||||
|
||||
"@vscode/vscode-languagedetection@1.0.21":
|
||||
version "1.0.21"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz#89b48f293f6aa3341bb888c1118d16ff13b032d3"
|
||||
@@ -162,14 +175,6 @@ ansi-regex@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
anymatch@~3.1.1:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
|
||||
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
|
||||
dependencies:
|
||||
normalize-path "^3.0.0"
|
||||
picomatch "^2.0.4"
|
||||
|
||||
applicationinsights@1.0.8:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5"
|
||||
@@ -197,11 +202,6 @@ base64-js@^1.3.1:
|
||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||
|
||||
binary-extensions@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
|
||||
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
|
||||
|
||||
bindings@^1.2.1, bindings@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
|
||||
@@ -223,13 +223,6 @@ boolean@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.1.4.tgz#f51a2fb5838a99e06f9b6ec1edb674de67026435"
|
||||
integrity sha512-3hx0kwU3uzG6ReQ3pnaFQPSktpBw6RHN3/ivDKEuU8g1XSfafowyvDnadjv1xp8IZqhtSukxlwv9bF6FhX8m0w==
|
||||
|
||||
braces@~3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||
dependencies:
|
||||
fill-range "^7.0.1"
|
||||
|
||||
buffer-crc32@~0.2.3:
|
||||
version "0.2.13"
|
||||
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||
@@ -261,21 +254,6 @@ cacheable-request@^6.0.0:
|
||||
normalize-url "^4.1.0"
|
||||
responselike "^1.0.2"
|
||||
|
||||
chokidar@3.5.1:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
|
||||
integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
|
||||
dependencies:
|
||||
anymatch "~3.1.1"
|
||||
braces "~3.0.2"
|
||||
glob-parent "~5.1.0"
|
||||
is-binary-path "~2.1.0"
|
||||
is-glob "~4.0.1"
|
||||
normalize-path "~3.0.0"
|
||||
readdirp "~3.5.0"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.1"
|
||||
|
||||
chownr@^1.1.1:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
|
||||
@@ -296,50 +274,48 @@ clone-response@^1.0.2:
|
||||
dependencies:
|
||||
mimic-response "^1.0.0"
|
||||
|
||||
code-oss-dev@cdr/vscode#478224aa345e9541f2427b30142dd13ee7e14d39:
|
||||
version "1.61.1"
|
||||
resolved "https://codeload.github.com/cdr/vscode/tar.gz/478224aa345e9541f2427b30142dd13ee7e14d39"
|
||||
code-oss-dev@cdr/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892:
|
||||
version "1.63.0"
|
||||
resolved "https://codeload.github.com/cdr/vscode/tar.gz/d4f09b4df0d23ead4389b4a69c6fad86ac358892"
|
||||
dependencies:
|
||||
"@microsoft/applicationinsights-web" "^2.6.4"
|
||||
"@parcel/watcher" "2.0.3"
|
||||
"@vscode/sqlite3" "4.0.12"
|
||||
"@vscode/sudo-prompt" "9.3.1"
|
||||
"@vscode/vscode-languagedetection" "1.0.21"
|
||||
applicationinsights "1.0.8"
|
||||
chokidar "3.5.1"
|
||||
graceful-fs "4.2.6"
|
||||
handlebars "^4.7.7"
|
||||
cookie "^0.4.1"
|
||||
graceful-fs "4.2.8"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.3"
|
||||
iconv-lite-umd "0.6.8"
|
||||
iconv-lite-umd "0.6.10"
|
||||
jschardet "3.0.0"
|
||||
minimist "^1.2.5"
|
||||
native-is-elevated "0.4.3"
|
||||
native-watchdog "1.3.0"
|
||||
node-pty "0.11.0-beta7"
|
||||
path-to-regexp "^6.2.0"
|
||||
node-pty "0.11.0-beta11"
|
||||
spdlog "^0.13.0"
|
||||
sudo-prompt "9.2.1"
|
||||
tar-stream "^2.2.0"
|
||||
tas-client-umd "0.1.4"
|
||||
v8-inspect-profiler "^0.0.22"
|
||||
vscode-nsfw "2.1.8"
|
||||
vscode-oniguruma "1.5.1"
|
||||
vscode-oniguruma "1.6.1"
|
||||
vscode-proxy-agent "^0.11.0"
|
||||
vscode-regexpp "^3.1.0"
|
||||
vscode-ripgrep "^1.12.1"
|
||||
vscode-textmate "5.4.0"
|
||||
xterm "4.15.0-beta.3"
|
||||
xterm-addon-search "0.9.0-beta.5"
|
||||
xterm-addon-serialize "0.7.0-beta.1"
|
||||
xterm-addon-unicode11 "0.3.0"
|
||||
xterm-addon-webgl "0.12.0-beta.13"
|
||||
xterm-headless "4.15.0-beta.3"
|
||||
vscode-textmate "5.5.0"
|
||||
xterm "4.16.0-beta.2"
|
||||
xterm-addon-search "0.9.0-beta.6"
|
||||
xterm-addon-serialize "0.7.0-beta.3"
|
||||
xterm-addon-unicode11 "0.4.0-beta.1"
|
||||
xterm-addon-webgl "0.12.0-beta.16"
|
||||
xterm-headless "4.16.0-beta.2"
|
||||
yauzl "^2.9.2"
|
||||
yazl "^2.4.3"
|
||||
optionalDependencies:
|
||||
electron "13.5.1"
|
||||
keytar "7.2.0"
|
||||
native-keymap "2.2.1"
|
||||
vscode-windows-registry "1.0.3"
|
||||
native-keymap "3.0.1"
|
||||
vscode-windows-registry "1.0.4"
|
||||
windows-foreground-love "0.4.0"
|
||||
windows-mutex "0.4.1"
|
||||
windows-process-tree "^0.3.2"
|
||||
@@ -377,6 +353,11 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
||||
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
|
||||
|
||||
cookie@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
|
||||
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
|
||||
|
||||
core-js@^3.6.5:
|
||||
version "3.17.3"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.3.tgz#8e8bd20e91df9951e903cabe91f9af4a0895bc1e"
|
||||
@@ -563,13 +544,6 @@ file-uri-to-path@2:
|
||||
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba"
|
||||
integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==
|
||||
|
||||
fill-range@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
fs-constants@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||
@@ -584,11 +558,6 @@ fs-extra@^8.1.0:
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fsevents@~2.3.1:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
ftp@^0.3.10:
|
||||
version "0.3.10"
|
||||
resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d"
|
||||
@@ -642,13 +611,6 @@ github-from-package@0.0.0:
|
||||
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
|
||||
integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=
|
||||
|
||||
glob-parent@~5.1.0:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
|
||||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
global-agent@^2.0.2:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc"
|
||||
@@ -696,28 +658,11 @@ got@^9.6.0:
|
||||
to-readable-stream "^1.0.0"
|
||||
url-parse-lax "^3.0.0"
|
||||
|
||||
graceful-fs@4.2.6:
|
||||
version "4.2.6"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
||||
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
|
||||
|
||||
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||
graceful-fs@4.2.8, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||
version "4.2.8"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
|
||||
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==
|
||||
|
||||
handlebars@^4.7.7:
|
||||
version "4.7.7"
|
||||
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
|
||||
integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
|
||||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
neo-async "^2.6.0"
|
||||
source-map "^0.6.1"
|
||||
wordwrap "^1.0.0"
|
||||
optionalDependencies:
|
||||
uglify-js "^3.1.4"
|
||||
|
||||
has-unicode@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||
@@ -769,10 +714,10 @@ https-proxy-agent@^5.0.0:
|
||||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
iconv-lite-umd@0.6.8:
|
||||
version "0.6.8"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0"
|
||||
integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A==
|
||||
iconv-lite-umd@0.6.10:
|
||||
version "0.6.10"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.10.tgz#faec47521e095b8e3a7175ae08e1b4ae0359a735"
|
||||
integrity sha512-8NtgTa/m1jVq7vdywmD5+SqIlZsB59wtsjaylQuExyCojMq1tHVQxmHjeqVSYwKwnmQbH4mZ1Dxx1eqDkPgaqA==
|
||||
|
||||
ieee754@^1.1.13:
|
||||
version "1.2.1"
|
||||
@@ -794,18 +739,6 @@ ip@^1.1.5:
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
|
||||
integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
|
||||
|
||||
is-binary-path@~2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
|
||||
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
|
||||
dependencies:
|
||||
binary-extensions "^2.0.0"
|
||||
|
||||
is-extglob@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
|
||||
|
||||
is-fullwidth-code-point@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
|
||||
@@ -818,18 +751,6 @@ is-fullwidth-code-point@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
|
||||
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
|
||||
|
||||
is-glob@^4.0.1, is-glob@~4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
|
||||
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
|
||||
dependencies:
|
||||
is-extglob "^2.1.1"
|
||||
|
||||
is-number@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
|
||||
isarray@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||
@@ -968,21 +889,16 @@ native-is-elevated@0.4.3:
|
||||
resolved "https://registry.yarnpkg.com/native-is-elevated/-/native-is-elevated-0.4.3.tgz#f1071c4a821acc71d43f36ff8051d3816d832e1c"
|
||||
integrity sha512-bHS3sCoh+raqFGIxmL/plER3eBQ+IEBy4RH/4uahhToZneTvqNKQrL0PgOTtnpL55XjBd3dy0pNtZMkCk0J48g==
|
||||
|
||||
native-keymap@2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/native-keymap/-/native-keymap-2.2.1.tgz#537023ec6e73591a68659f6a14eba8e1965b0633"
|
||||
integrity sha512-rsEf2gbFFNEy3MxxQocCn9XpNyqBa8kMFFrjXFWCp3lWuhk3svHnWYZOj3Or8lNoAIjVxAPLdMClraLXHz6dnw==
|
||||
native-keymap@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/native-keymap/-/native-keymap-3.0.1.tgz#7cc2d30da1e60cbb7d599423e05cb84845d20a8f"
|
||||
integrity sha512-IeHaz5NM1mF3AKIwBxf4YhgrB/hcctVwIqOXaMrR8Hz8v45dCa364YDvEN0004zSycRyhrXh6cNgCQ/v6QUHkA==
|
||||
|
||||
native-watchdog@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/native-watchdog/-/native-watchdog-1.3.0.tgz#88cee94c9dc766b85c8506eda14c8bd8c9618e27"
|
||||
integrity sha512-WOjGRNGkYZ5MXsntcvCYrKtSYMaewlbCFplbcUVo9bE80LPVt8TAVFHYWB8+a6fWCGYheq21+Wtt6CJrUaCJhw==
|
||||
|
||||
neo-async@^2.6.0:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
|
||||
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
||||
|
||||
node-abi@^2.21.0:
|
||||
version "2.30.1"
|
||||
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf"
|
||||
@@ -990,7 +906,7 @@ node-abi@^2.21.0:
|
||||
dependencies:
|
||||
semver "^5.4.1"
|
||||
|
||||
node-addon-api@^3.0.0, node-addon-api@^3.0.2:
|
||||
node-addon-api@^3.0.0, node-addon-api@^3.0.2, node-addon-api@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
|
||||
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
|
||||
@@ -1000,18 +916,18 @@ node-addon-api@^4.2.0:
|
||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.2.0.tgz#117cbb5a959dff0992e1c586ae0393573e4d2a87"
|
||||
integrity sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q==
|
||||
|
||||
node-pty@0.11.0-beta7:
|
||||
version "0.11.0-beta7"
|
||||
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta7.tgz#aed0888b5032d96c54d8473455e6adfae3bbebbe"
|
||||
integrity sha512-uApPGLglZRiHQcUMWakbZOrBo8HVWvhzIqNnrWvBGJOvc6m/S5lCdbbg93BURyJqHFmBS0GV+4hwiMNDuGRbSA==
|
||||
node-gyp-build@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3"
|
||||
integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==
|
||||
|
||||
node-pty@0.11.0-beta11:
|
||||
version "0.11.0-beta11"
|
||||
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta11.tgz#10843516868129c26a97253903c46fe0e4520eb0"
|
||||
integrity sha512-Gw58duqHle4k/BunssCE1CUKKWipRQZTUFhaTegkKC19fw3IXsvillblLUuD2bQL42+3mQCAFSgTDo+OsJzYCQ==
|
||||
dependencies:
|
||||
nan "^2.14.0"
|
||||
|
||||
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
||||
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
|
||||
|
||||
normalize-url@^4.1.0:
|
||||
version "4.5.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
|
||||
@@ -1062,21 +978,11 @@ p-cancelable@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
|
||||
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
|
||||
|
||||
path-to-regexp@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38"
|
||||
integrity sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==
|
||||
|
||||
pend@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
|
||||
|
||||
picomatch@^2.0.4, picomatch@^2.2.1:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
|
||||
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
|
||||
|
||||
pify@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
||||
@@ -1176,13 +1082,6 @@ readable-stream@^3.1.1, readable-stream@^3.4.0:
|
||||
string_decoder "^1.1.1"
|
||||
util-deprecate "^1.0.1"
|
||||
|
||||
readdirp@~3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e"
|
||||
integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==
|
||||
dependencies:
|
||||
picomatch "^2.2.1"
|
||||
|
||||
responselike@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
||||
@@ -1287,11 +1186,6 @@ socks@^2.3.3:
|
||||
ip "^1.1.5"
|
||||
smart-buffer "^4.1.0"
|
||||
|
||||
source-map@^0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
spdlog@^0.13.0:
|
||||
version "0.13.6"
|
||||
resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.13.6.tgz#26b2e13d46cbf8f2334c12ba2a8cc82de5a28f02"
|
||||
@@ -1361,11 +1255,6 @@ strip-json-comments@~2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
|
||||
|
||||
sudo-prompt@9.2.1:
|
||||
version "9.2.1"
|
||||
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd"
|
||||
integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==
|
||||
|
||||
sumchecker@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||
@@ -1383,7 +1272,7 @@ tar-fs@^2.0.0:
|
||||
pump "^3.0.0"
|
||||
tar-stream "^2.1.4"
|
||||
|
||||
tar-stream@^2.1.4, tar-stream@^2.2.0:
|
||||
tar-stream@^2.1.4:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
|
||||
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
|
||||
@@ -1404,13 +1293,6 @@ to-readable-stream@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
|
||||
integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
||||
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
tunnel-agent@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
|
||||
@@ -1433,11 +1315,6 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
uglify-js@^3.1.4:
|
||||
version "3.14.2"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.2.tgz#d7dd6a46ca57214f54a2d0a43cad0f35db82ac99"
|
||||
integrity sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==
|
||||
|
||||
universalify@^0.1.0:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||
@@ -1469,10 +1346,10 @@ vscode-nsfw@2.1.8:
|
||||
dependencies:
|
||||
node-addon-api "^4.2.0"
|
||||
|
||||
vscode-oniguruma@1.5.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.5.1.tgz#9ca10cd3ada128bd6380344ea28844243d11f695"
|
||||
integrity sha512-JrBZH8DCC262TEYcYdeyZusiETu0Vli0xFgdRwNJjDcObcRjbmJP+IFcA3ScBwIXwgFHYKbAgfxtM/Cl+3Spjw==
|
||||
vscode-oniguruma@1.6.1:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz#2bf4dfcfe3dd2e56eb549a3068c8ee39e6c30ce5"
|
||||
integrity sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==
|
||||
|
||||
vscode-proxy-agent@^0.11.0:
|
||||
version "0.11.0"
|
||||
@@ -1502,10 +1379,10 @@ vscode-ripgrep@^1.12.1:
|
||||
https-proxy-agent "^4.0.0"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
||||
vscode-textmate@5.4.0:
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.4.0.tgz#4b25ffc1f14ac3a90faf9a388c67a01d24257cd7"
|
||||
integrity sha512-c0Q4zYZkcLizeYJ3hNyaVUM2AA8KDhNCA3JvXY8CeZSJuBdAy3bAvSbv46RClC4P3dSO9BdwhnKEx2zOo6vP/w==
|
||||
vscode-textmate@5.5.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.5.0.tgz#d83776562c07d1e3181c2c7f1b3d5f20afcab483"
|
||||
integrity sha512-jToQkPGMNKn0eyKyitYeINJF0NoD240aYyKPIWJv5W2jfPt++jIRg0OSergubtGhbw6SoefkvBYEpX7TsfoSUQ==
|
||||
|
||||
vscode-windows-ca-certs@^0.3.0:
|
||||
version "0.3.0"
|
||||
@@ -1514,10 +1391,10 @@ vscode-windows-ca-certs@^0.3.0:
|
||||
dependencies:
|
||||
node-addon-api "^3.0.2"
|
||||
|
||||
vscode-windows-registry@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.3.tgz#377e9a8bf75c0acac81a188282a4f16f748ecd47"
|
||||
integrity sha512-IXCwNAm+H5yPCn6JBz89T9AAMgy5xEN2LxbxrvHPlErmyQqCYtpCCjvisfgT2dCuaJ2T9FfiqIeIrOpDm2Jc4Q==
|
||||
vscode-windows-registry@1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.4.tgz#9e565a497c84b6b82d200f88930baeff12912079"
|
||||
integrity sha512-vjYaMzEygZrb8bN6I33XTajpF/gtDOk5CtQPPSaxanXg2kkrerEM9qovY6t6FtBGl3oLq6YHytYdYw4IpXgJdA==
|
||||
|
||||
wide-align@^1.1.0:
|
||||
version "1.1.3"
|
||||
@@ -1546,11 +1423,6 @@ windows-process-tree@^0.3.2:
|
||||
dependencies:
|
||||
nan "^2.13.2"
|
||||
|
||||
wordwrap@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
@@ -1566,35 +1438,35 @@ xregexp@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943"
|
||||
integrity sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=
|
||||
|
||||
xterm-addon-search@0.9.0-beta.5:
|
||||
version "0.9.0-beta.5"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.5.tgz#e0e60a203d1c9d6c8af933648a46865dba299302"
|
||||
integrity sha512-ylfqim0ISBvuuX83LQwgu/06p5GC545QsAo9SssXw03TPpIrcd0zwaVMEnhOftSIzM9EKRRsyx3GbBjgUdiF5w==
|
||||
xterm-addon-search@0.9.0-beta.6:
|
||||
version "0.9.0-beta.6"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.6.tgz#8b016baac5580dc0ba93bb52610bc4f5776d3b17"
|
||||
integrity sha512-UAEzas4O+NrF7BSGf0C9N5ngAkmbtr/hSTFvLAM/Rw7EfLUatf8aLMqAWZTggRGMwDjuqR0GXJI4+e5QrJhQfw==
|
||||
|
||||
xterm-addon-serialize@0.7.0-beta.1:
|
||||
version "0.7.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.7.0-beta.1.tgz#0168ae7b07a4ce3c2445fce10efe91848717ca2e"
|
||||
integrity sha512-Qt//GUsTix1FFMWJSFYreppn6nfFqFQaLL9Z9sper62/M3Ip4O+dN/bhrtd5pydBl5iqlHixJls3fu/bj3RHjA==
|
||||
xterm-addon-serialize@0.7.0-beta.3:
|
||||
version "0.7.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.7.0-beta.3.tgz#a8ce52a59685041bd3b6d6a2a77a3df8bc3daf29"
|
||||
integrity sha512-fgB0h8JiSN1cOMh3slenysprnGfFwbDZ/D38WA0Pdjxf3YDy4j2SwoUajlvXpkFWR7sHjVHmgpw/nHggO731KA==
|
||||
|
||||
xterm-addon-unicode11@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0.tgz#e4435c3c91a5294a7eb8b79c380acbb28a659463"
|
||||
integrity sha512-x5fHDZT2j9tlTlHnzPHt++9uKZ2kJ/lYQOj3L6xJA22xoJsS8UQRw/5YIFg2FUHqEAbV77Z1fZij/9NycMSH/A==
|
||||
xterm-addon-unicode11@0.4.0-beta.1:
|
||||
version "0.4.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.1.tgz#aeefd26e87bad15d8dfd8a1e0b804fe408c9b882"
|
||||
integrity sha512-pG8mpxnqpYDry0e20vuEFKhd4kKIcLLNwdNftNvfo+R/EjYRnTYnF+H8L+7eQHq6hqDH61xCEP4H4qR2CyT4pg==
|
||||
|
||||
xterm-addon-webgl@0.12.0-beta.13:
|
||||
version "0.12.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.13.tgz#95ecf99531adcce1349f2ddfc834a40af681780e"
|
||||
integrity sha512-oPQHkFcuCB+x60wilGXFS+viZbOGNFijmuHEWehCUcLFQP5Mph0/6qXLZjgn47728QvCxU7HnXPqcD7JSxe0Tg==
|
||||
xterm-addon-webgl@0.12.0-beta.16:
|
||||
version "0.12.0-beta.16"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.16.tgz#63a0f1f5be9e66286e035448e2011e3065769ad5"
|
||||
integrity sha512-g6v3RegOhSsD9Zt8ArWBMNT30QyPUlIWEIvP/xLHAluUZ1S5sDjFyZDB0nJAyn9MwQozJpwb0ylYO1nznN/TzA==
|
||||
|
||||
xterm-headless@4.15.0-beta.3:
|
||||
version "4.15.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.15.0-beta.3.tgz#b1ba884e2e2feef17d92eaf3ff59b0b20c059dd8"
|
||||
integrity sha512-MmC75/XUz9z1fHBdJV0Mx9Fje+8hegocT1NfWUNLri3+XFvy5/UbLRhrGUw/lxWKgthseV6eqI44QTNh7fVTQg==
|
||||
xterm-headless@4.16.0-beta.2:
|
||||
version "4.16.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.16.0-beta.2.tgz#62e66a655a30c814e3a311f3542d42c87446cecd"
|
||||
integrity sha512-g92HDaIZcu1TQFlrjq2CHtt7A2qAwSD6s8RwncU/7u1kaq2e7rc9O3OKfu5v3QzgaRSKuugtquMr0OTKjkmLUg==
|
||||
|
||||
xterm@4.15.0-beta.3:
|
||||
version "4.15.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.15.0-beta.3.tgz#123ec4303be390e61cd24ae29872b9fa4e73ad30"
|
||||
integrity sha512-CXzu0xDHsrOxzC+Tm9ju+eqq0VFiYZPuzPAtfoKOp2PW+wt4fRkM4kysrdLdfE2kz6qyRckRxl+3l7VzlJHVCA==
|
||||
xterm@4.16.0-beta.2:
|
||||
version "4.16.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.16.0-beta.2.tgz#251beef21a232143f272da74c7005bc4d832ca79"
|
||||
integrity sha512-PD0agueJ7qvbn1/QhZriAQXf+ykaoPKgQN9qiIGf88VMxHs8T47MYHW/+qPsrXagTmbrENtncughTIzOzv8Q5Q==
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
|
||||
40
yarn.lock
40
yarn.lock
@@ -890,6 +890,11 @@ bytes@3.1.0:
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
|
||||
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
|
||||
|
||||
bytes@3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a"
|
||||
integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==
|
||||
|
||||
call-bind@^1.0.0, call-bind@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
|
||||
@@ -2190,7 +2195,18 @@ http-errors@1.7.2:
|
||||
statuses ">= 1.5.0 < 2"
|
||||
toidentifier "1.0.0"
|
||||
|
||||
http-errors@1.7.3, http-errors@~1.7.2:
|
||||
http-errors@1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
|
||||
integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==
|
||||
dependencies:
|
||||
depd "~1.1.2"
|
||||
inherits "2.0.4"
|
||||
setprototypeof "1.2.0"
|
||||
statuses ">= 1.5.0 < 2"
|
||||
toidentifier "1.0.1"
|
||||
|
||||
http-errors@~1.7.2:
|
||||
version "1.7.3"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
|
||||
integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
|
||||
@@ -3459,7 +3475,7 @@ proxy-agent@^5.0.0:
|
||||
proxy-from-env "^1.0.0"
|
||||
socks-proxy-agent "^5.0.0"
|
||||
|
||||
proxy-from-env@^1.0.0, proxy-from-env@^1.1.0:
|
||||
proxy-from-env@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
|
||||
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
|
||||
@@ -3512,12 +3528,12 @@ raw-body@2.4.0:
|
||||
unpipe "1.0.0"
|
||||
|
||||
raw-body@^2.2.0:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c"
|
||||
integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32"
|
||||
integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==
|
||||
dependencies:
|
||||
bytes "3.1.0"
|
||||
http-errors "1.7.3"
|
||||
bytes "3.1.1"
|
||||
http-errors "1.8.1"
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
@@ -3817,6 +3833,11 @@ setprototypeof@1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
|
||||
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
|
||||
|
||||
setprototypeof@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
|
||||
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
|
||||
|
||||
shebang-command@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||
@@ -4238,6 +4259,11 @@ toidentifier@1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
|
||||
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
|
||||
|
||||
toidentifier@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
||||
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
||||
|
||||
traverse@^0.6.6:
|
||||
version "0.6.6"
|
||||
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
|
||||
|
||||
Reference in New Issue
Block a user