From 10f57bac65f9aa5938df4e495da39c608fbf7798 Mon Sep 17 00:00:00 2001 From: LG <76845820+im-coder-lg@users.noreply.github.com> Date: Tue, 1 Feb 2022 22:15:19 +0530 Subject: [PATCH 001/760] docs: Update some more links (#4806) * Update links in package.json I will try checking the docs too * docs: Update links in triage.md * docs: Update links in npm.md * docs: Update links in whatever files that have `cdr` * Replace globally, thanks @bpmct! * fix: coderer instead of coder I should've used all three toggles in the Search/Replace tab in the GItHub.dev editor. * Code Formatting --- .github/workflows/ci.yaml | 2 +- .tours/contributing.tour | 10 ++++----- .tours/start-development.tour | 2 +- CHANGELOG.md | 20 ++++++++--------- ci/build/build-code-server.sh | 2 +- ci/build/code-server.sh | 4 ++-- ci/build/nfpm.yaml | 2 +- ci/build/npm-postinstall.sh | 4 ++-- ci/build/release-prep.sh | 2 +- ci/helm-chart/Chart.yaml | 2 +- ci/steps/brew-bump.sh | 10 ++++----- ci/steps/publish-npm.sh | 2 +- docs/CONTRIBUTING.md | 14 ++++++------ docs/FAQ.md | 16 +++++++------- docs/MAINTAINING.md | 10 ++++----- docs/README.md | 2 +- docs/SECURITY.md | 6 ++--- docs/guide.md | 6 ++--- docs/helm.md | 6 ++--- docs/install.md | 22 +++++++++---------- docs/ipad.md | 12 +++++----- docs/link.md | 2 +- docs/npm.md | 6 ++--- docs/triage.md | 4 ++-- package.json | 6 ++--- src/node/cli.ts | 2 +- src/node/coder_cloud.ts | 2 +- .../extensions/test-extension/package.json | 2 +- test/unit/node/constants.test.ts | 2 +- typings/pluginapi.d.ts | 2 +- vendor/package.json | 2 +- vendor/yarn.lock | 4 ++-- 32 files changed, 95 insertions(+), 95 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aed480e3c417..7d18ada077a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,7 +34,7 @@ jobs: # NOTE@jsjoeio # disabling this until we can audit the build process # and the usefulness of this step - # See: https://github.com/cdr/code-server/issues/4287 + # See: https://github.com/coder/code-server/issues/4287 # - name: Fetch dependencies from cache # id: cache-yarn # uses: actions/cache@v2 diff --git a/.tours/contributing.tour b/.tours/contributing.tour index 53befe2000e1..95799b6abb7e 100644 --- a/.tours/contributing.tour +++ b/.tours/contributing.tour @@ -50,7 +50,7 @@ { "file": "src/node/heart.ts", "line": 7, - "description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file)" + "description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#heartbeat-file](https://github.com/coder/code-server/blob/master/docs/FAQ.md#heartbeat-file)" }, { "file": "src/node/socket.ts", @@ -80,12 +80,12 @@ { "file": "src/node/routes/domainProxy.ts", "line": 18, - "description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" + "description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" }, { "file": "src/node/routes/pathProxy.ts", "line": 19, - "description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" + "description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/coder/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" }, { "file": "src/node/proxy.ts", @@ -95,7 +95,7 @@ { "file": "src/node/routes/health.ts", "line": 5, - "description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint)" + "description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/coder/code-server/blob/master/docs/FAQ.md#healthz-endpoint](https://github.com/coder/code-server/blob/master/docs/FAQ.md#healthz-endpoint)" }, { "file": "src/node/routes/login.ts", @@ -145,7 +145,7 @@ { "directory": "vendor/modules/code-oss-dev", "line": 1, - "description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible." + "description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible." } ] } diff --git a/.tours/start-development.tour b/.tours/start-development.tour index 03f32927ebbc..168dce2411ec 100644 --- a/.tours/start-development.tour +++ b/.tours/start-development.tour @@ -20,7 +20,7 @@ { "file": "src/node/app.ts", "line": 62, - "description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\")\n- [Docs: FAQ.md](https://github.com/cdr/code-server/blob/master/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/cdr/code-server/discussions)\n- [Community: Slack](https://community.coder.com)" + "description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\")\n- [Docs: FAQ.md](https://github.com/coder/code-server/blob/master/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/coder/code-server/discussions)\n- [Community: Slack](https://community.coder.com)" } ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dfcee073e0d..9c4d25b71382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ VS Code v99.99.999 --> -## [Unreleased](https://github.com/cdr/code-server/releases) +## [Unreleased](https://github.com/coder/code-server/releases) VS Code v0.00.0 @@ -28,7 +28,7 @@ VS Code v0.00.0 - Add here -## [4.0.2](https://github.com/cdr/code-server/releases/tag/v4.0.2) - 2022-01-27 +## [4.0.2](https://github.com/coder/code-server/releases/tag/v4.0.2) - 2022-01-27 VS Code v1.63.0 @@ -39,7 +39,7 @@ VS Code v1.63.0 file is missing. While we do include the script now we are leaving the variable omitted because the script does not work yet. -## [4.0.1](https://github.com/cdr/code-server/releases/tag/v4.0.1) - 2022-01-04 +## [4.0.1](https://github.com/coder/code-server/releases/tag/v4.0.1) - 2022-01-04 VS Code v1.63.0 @@ -77,7 +77,7 @@ implementation (#4414). - We fixed a XSS vulnerability by escaping HTML from messages in the error page (#4430). -## [3.12.0](https://github.com/cdr/code-server/releases/tag/v3.12.0) - 2021-09-15 +## [3.12.0](https://github.com/coder/code-server/releases/tag/v3.12.0) - 2021-09-15 VS Code v1.60.0 @@ -89,15 +89,15 @@ VS Code v1.60.0 - Fix logout when using a base path (#3608). -## [3.11.1](https://github.com/cdr/code-server/releases/tag/v3.11.1) - 2021-08-06 +## [3.11.1](https://github.com/coder/code-server/releases/tag/v3.11.1) - 2021-08-06 Undocumented (see releases page). -## [3.11.0](https://github.com/cdr/code-server/releases/tag/v3.11.0) - 2021-06-14 +## [3.11.0](https://github.com/coder/code-server/releases/tag/v3.11.0) - 2021-06-14 Undocumented (see releases page). -## [3.10.2](https://github.com/cdr/code-server/releases/tag/v3.10.2) - 2021-05-21 +## [3.10.2](https://github.com/coder/code-server/releases/tag/v3.10.2) - 2021-05-21 VS Code v1.56.1 @@ -113,7 +113,7 @@ VS Code v1.56.1 - Fix "Open Folder" on welcome page (#3437). -## [3.10.1](https://github.com/cdr/code-server/releases/tag/v3.10.1) - 2021-05-17 +## [3.10.1](https://github.com/coder/code-server/releases/tag/v3.10.1) - 2021-05-17 VS Code v1.56.1 @@ -127,7 +127,7 @@ VS Code v1.56.1 - Use xdgBasedir.runtime instead of tmp (#3304). -## [3.10.0](https://github.com/cdr/code-server/releases/tag/v3.10.0) - 2021-05-10 +## [3.10.0](https://github.com/coder/code-server/releases/tag/v3.10.0) - 2021-05-10 VS Code v1.56.0 @@ -158,4 +158,4 @@ VS Code v1.56.0 This was added with `3.10.0`, which means any previous versions are not documented in the changelog. -To see those, please visit the [Releases page](https://github.com/cdr/code-server/releases). +To see those, please visit the [Releases page](https://github.com/coder/code-server/releases). diff --git a/ci/build/build-code-server.sh b/ci/build/build-code-server.sh index 99f0df6921cd..01b34885898a 100755 --- a/ci/build/build-code-server.sh +++ b/ci/build/build-code-server.sh @@ -26,7 +26,7 @@ main() { echo "Downloading the cloud agent..." set +e - curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent + curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent chmod +x ./lib/coder-cloud-agent set -e fi diff --git a/ci/build/code-server.sh b/ci/build/code-server.sh index cb71c182775a..c2bdfc89236b 100755 --- a/ci/build/code-server.sh +++ b/ci/build/code-server.sh @@ -5,7 +5,7 @@ set -eu # Runs code-server with the bundled node binary. _realpath() { - # See https://github.com/cdr/code-server/issues/1537 on why no realpath or readlink -f. + # See https://github.com/coder/code-server/issues/1537 on why no realpath or readlink -f. script="$1" cd "$(dirname "$script")" @@ -16,7 +16,7 @@ _realpath() { && cat package.json | grep -q '^ "name": "code-server",$'; then echo "***** Please use the script in bin/code-server instead!" >&2 echo "***** This script will soon be removed!" >&2 - echo "***** See the release notes at https://github.com/cdr/code-server/releases/tag/v3.4.0" >&2 + echo "***** See the release notes at https://github.com/coder/code-server/releases/tag/v3.4.0" >&2 fi script="$(readlink "$(basename "$script")")" diff --git a/ci/build/nfpm.yaml b/ci/build/nfpm.yaml index 93142d198879..ae9d69c35328 100644 --- a/ci/build/nfpm.yaml +++ b/ci/build/nfpm.yaml @@ -8,7 +8,7 @@ maintainer: "Anmol Sethi " description: | Run VS Code in the browser. vendor: "Coder" -homepage: "https://github.com/cdr/code-server" +homepage: "https://github.com/coder/code-server" license: "MIT" contents: diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index e84b97ce40c5..2b9b0a68d9df 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -57,7 +57,7 @@ main() { mkdir -p ./lib - if curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then + if curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent; then chmod +x ./lib/coder-cloud-agent else echo "Failed to download cloud agent; --link will not work" @@ -65,7 +65,7 @@ main() { if ! vscode_yarn; then echo "You may not have the required dependencies to build the native modules." - echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md" + echo "Please see https://github.com/coder/code-server/blob/master/docs/npm.md" exit 1 fi diff --git a/ci/build/release-prep.sh b/ci/build/release-prep.sh index 671791e5ce38..a7f9967a5474 100755 --- a/ci/build/release-prep.sh +++ b/ci/build/release-prep.sh @@ -90,7 +90,7 @@ main() { echo -e "\nOpening a draft PR on GitHub" # To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create - $CMD gh pr create --base main --title "release: $CODE_SERVER_VERSION_TO_UPDATE" --body "$RELEASE_TEMPLATE_STRING" --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft --assignee "@me" + $CMD gh pr create --base main --title "release: $CODE_SERVER_VERSION_TO_UPDATE" --body "$RELEASE_TEMPLATE_STRING" --reviewer @coder/code-server-reviewers --repo coder/code-server --draft --assignee "@me" # Open PR in browser $CMD gh pr view --web diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index 29e5dd1d1a0d..233e71c58b49 100644 --- a/ci/helm-chart/Chart.yaml +++ b/ci/helm-chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: code-server -description: A Helm chart for cdr/code-server +description: A Helm chart for coder/code-server # A chart can be either an 'application' or a 'library' chart. # diff --git a/ci/steps/brew-bump.sh b/ci/steps/brew-bump.sh index 1e62113544b1..7df17da92431 100755 --- a/ci/steps/brew-bump.sh +++ b/ci/steps/brew-bump.sh @@ -21,12 +21,12 @@ main() { exit 1 fi - # NOTE: we need to make sure cdrci/homebrew-core + # NOTE: we need to make sure coderci/homebrew-core # is up-to-date # otherwise, brew bump-formula-pr will use an # outdated base - echo "Cloning cdrci/homebrew-core" - git clone https://github.com/cdrci/homebrew-core.git + echo "Cloning coderci/homebrew-core" + git clone https://github.com/coderci/homebrew-core.git # Make sure the git clone step is successful if directory_exists "homebrew-core"; then @@ -57,7 +57,7 @@ main() { echo "Merging in latest Homebrew/homebrew-core changes" git merge upstream/master - echo "Pushing changes to cdrci/homebrew-core fork on GitHub" + echo "Pushing changes to coderci/homebrew-core fork on GitHub" # GIT_ASKPASS lets us use the password when pushing without revealing it in the process list # See: https://serverfault.com/a/912788 @@ -86,7 +86,7 @@ main() { # Export the variables so git sees them export HOMEBREW_GITHUB_API_TOKEN="$HOMEBREW_GITHUB_API_TOKEN" export GIT_ASKPASS="$PATH_TO_ASKPASS" - git push https://cdr-oss@github.com/cdr-oss/homebrew-core.git --all + git push https://coder-oss@github.com/coder-oss/homebrew-core.git --all # Find the docs for bump-formula-pr here # https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18 diff --git a/ci/steps/publish-npm.sh b/ci/steps/publish-npm.sh index a4636db5a36e..5b494a2f2b90 100755 --- a/ci/steps/publish-npm.sh +++ b/ci/steps/publish-npm.sh @@ -67,7 +67,7 @@ main() { tar -xzf release-npm-package/package.tar.gz # Ignore symlink when publishing npm package - # See: https://github.com/cdr/code-server/pull/3935 + # See: https://github.com/coder/code-server/pull/3935 echo "node_modules.asar" > release/.npmignore # NOTES:@jsjoeio diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 0920c91c625b..3e01c6d0a67a 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -61,7 +61,7 @@ These are required by VS Code. See [their Wiki](https://github.com/microsoft/vsc ## Creating pull requests -Please create a [GitHub Issue](https://github.com/cdr/code-server/issues) that +Please create a [GitHub Issue](https://github.com/coder/code-server/issues) that includes context for issues that you see. You can skip this if the proposed fix is minor. @@ -78,12 +78,12 @@ we'll guide you. ## Development workflow -The current development workflow is a bit tricky because we have this repo and we use our `cdr/vscode` fork inside it with [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/). +The current development workflow is a bit tricky because we have this repo and we use our `coder/vscode` fork inside it with [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/). Here are these steps you should follow to get your dev environment setup: -1. `git clone https://github.com/cdr/code-server.git` - Clone `code-server` -2. `git clone https://github.com/cdr/vscode.git` - Clone `vscode` +1. `git clone https://github.com/coder/code-server.git` - Clone `code-server` +2. `git clone https://github.com/coder/vscode.git` - Clone `vscode` 3. `cd vscode && yarn install` - install the dependencies in the `vscode` repo 4. `cd code-server && yarn install` - install the dependencies in the `code-server` repo 5. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package) @@ -92,14 +92,14 @@ Here are these steps you should follow to get your dev environment setup: ### Updates to VS Code -If changes are made and merged into `main` in the [`cdr/vscode`](https://github.com/cdr/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps: +If changes are made and merged into `main` in the [`coder/vscode`](https://github.com/coder/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps: 1. Update the package tag listed in `vendor/package.json`: ```json { "devDependencies": { - "vscode": "cdr/vscode#" + "vscode": "coder/vscode#" } } ``` @@ -148,7 +148,7 @@ yarn package ### Help -If you get stuck or need help, you can always start a new GitHub Discussion [here](https://github.com/cdr/code-server/discussions). One of the maintainers will respond and help you out. +If you get stuck or need help, you can always start a new GitHub Discussion [here](https://github.com/coder/code-server/discussions). One of the maintainers will respond and help you out. ## Test diff --git a/docs/FAQ.md b/docs/FAQ.md index 7e6156302c8b..ed1c51a08b4e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -37,7 +37,7 @@ ## Questions? Please file all questions and support requests at -. +. ## How should I expose code-server to the internet? @@ -111,11 +111,11 @@ These are the closed-source extensions that are presently unavailable: 1. [Live Share](https://visualstudio.microsoft.com/services/live-share). We may implement something similar (see - [#33](https://github.com/cdr/code-server/issues/33)) + [#33](https://github.com/coder/code-server/issues/33)) 1. [Remote Extensions (SSH, Containers, WSL)](https://github.com/microsoft/vscode-remote-release). We may implement these again at some point, see - ([#1315](https://github.com/cdr/code-server/issues/1315)). + ([#1315](https://github.com/coder/code-server/issues/1315)). For more about the closed source portions of VS Code, see [vscodium/vscodium](https://github.com/VSCodium/vscodium#why-does-this-exist). @@ -222,7 +222,7 @@ You may have to give Node.js full disk access, since it doesn't implement any of Privacy** > **Privacy** > **Full Disk Access**. Then, click the 🔒 to unlock, click **+**, and select the Node.js binary you located in the previous step. -See [#2794](https://github.com/cdr/code-server/issues/2794) for additional context. +See [#2794](https://github.com/coder/code-server/issues/2794) for additional context. ## How do I direct server-side requests through a proxy? @@ -302,7 +302,7 @@ after a predetermined amount of time, you can do so by checking continuously for the last modified time on the heartbeat file. If it is older than X minutes (or whatever amount of time you'd like), you can kill code-server. -Eventually, [#1636](https://github.com/cdr/code-server/issues/1636) will make +Eventually, [#1636](https://github.com/coder/code-server/issues/1636) will make this process better. ## How do I change the password? @@ -376,7 +376,7 @@ Theia doesn't allow you to reuse your existing VS Code config. ## What's the difference between code-server and OpenVSCode-Server? code-server and OpenVSCode-Server both allow you to access VS Code via a -browser. The two projects also use their own [forks of VS Code](https://github.com/cdr/vscode) to +browser. The two projects also use their own [forks of VS Code](https://github.com/coder/vscode) to leverage modern VS Code APIs and stay up to date with the upsteam version. However, OpenVSCode-Server is scoped at only making VS Code available in the web browser. @@ -388,7 +388,7 @@ code-server includes some other features: - plugin API - settings sync (coming soon) -For more details, see [this discussion post](https://github.com/cdr/code-server/discussions/4267#discussioncomment-1411583). +For more details, see [this discussion post](https://github.com/coder/code-server/discussions/4267#discussioncomment-1411583). ## What's the difference between code-server and GitHub Codespaces? @@ -406,7 +406,7 @@ minute plus an additional twelve per hour. ## Are there community projects involving code-server? -Visit the [awesome-code-server](https://github.com/cdr/awesome-code-server) +Visit the [awesome-code-server](https://github.com/coder/awesome-code-server) repository to view community projects and guides with code-server! Feel free to add your own! diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index fd10de9ab861..5f02c260c742 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -185,12 +185,12 @@ If you're the current release manager, follow these steps: artifacts, publish the NPM package from `npm-package`, and publish the Docker Hub image from `release-images`. 1. Update the AUR package. Instructions for updating the AUR package are at - [cdr/code-server-aur](https://github.com/cdr/code-server-aur). + [coder/code-server-aur](https://github.com/coder/code-server-aur). 1. Wait for the npm package to be published. #### AUR -We publish to AUR as a package [here](https://aur.archlinux.org/packages/code-server/). This process is manual and can be done by following the steps in [this repo](https://github.com/cdr/code-server-aur). +We publish to AUR as a package [here](https://aur.archlinux.org/packages/code-server/). This process is manual and can be done by following the steps in [this repo](https://github.com/coder/code-server-aur). #### Docker @@ -217,7 +217,7 @@ This is currently automated with the release process. ## Syncing with Upstream VS Code -The VS Code portion of code-server lives under [`cdr/vscode`](https://github.com/cdr/vscode). To update VS Code for code-server, follow these steps: +The VS Code portion of code-server lives under [`coder/vscode`](https://github.com/coder/vscode). To update VS Code for code-server, follow these steps: 1. `git checkout -b vscode-update` - Create a new branch locally based off `main` 2. `git fetch upstream` - Fetch upstream (VS Code)'s latest `main` branch @@ -225,7 +225,7 @@ The VS Code portion of code-server lives under [`cdr/vscode`](https://github.com 1. If there are merge conflicts, fix them locally 4. Open a PR merging your branch (`vscode-update`) into `main` and add the code-server review team -Ideally, our fork stays as close to upstream as possible. See the differences between our fork and upstream [here](https://github.com/microsoft/vscode/compare/main...cdr:main). +Ideally, our fork stays as close to upstream as possible. See the differences between our fork and upstream [here](https://github.com/microsoft/vscode/compare/main...coder:main). ## Testing @@ -247,7 +247,7 @@ Otherwise, talk to a current maintainer and ask which part of the codebase is la Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it. -Taking a real scenario, let's say you wanted to troubleshoot [this docs change](https://github.com/cdr/code-server/pull/4042). Here is how you would do it: +Taking a real scenario, let's say you wanted to troubleshoot [this docs change](https://github.com/coder/code-server/pull/4042). Here is how you would do it: 1. Go to https://vercel.com/codercom/codercom 2. Click "View Function Logs" diff --git a/docs/README.md b/docs/README.md index f8f5eecece97..2ee9f42f7796 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # code-server -[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://cdr.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs) +[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs) Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. diff --git a/docs/SECURITY.md b/docs/SECURITY.md index bb7fc71790e4..6857d251e38b 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -26,9 +26,9 @@ We use the following tools to help us stay on top of vulnerability mitigation. Coder sponsors the development and maintenance of the code-server project. We will fix security issues within 90 days of receiving a report and publish the fix in a subsequent release. The code-server project does not provide backports or patch releases for security issues at this time. -| Version | Supported | -| ----------------------------------------------------- | ------------------ | -| [Latest](https://github.com/cdr/code-server/releases) | :white_check_mark: | +| Version | Supported | +| ------------------------------------------------------- | ------------------ | +| [Latest](https://github.com/coder/code-server/releases) | :white_check_mark: | ## Reporting a Vulnerability diff --git a/docs/guide.md b/docs/guide.md index cf024d1b5cc9..81e37d7d148d 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -345,8 +345,8 @@ instead and the path will be passed as is (e.g., `/absproxy/3000/my-app-path`). ### Proxying to create a React app You must use `/absproxy/` with `create-react-app` (see -[#2565](https://github.com/cdr/code-server/issues/2565) and -[#2222](https://github.com/cdr/code-server/issues/2222) for more information). +[#2565](https://github.com/coder/code-server/issues/2565) and +[#2222](https://github.com/coder/code-server/issues/2222) for more information). You will need to inform `create-react-app` of the path at which you are serving via `$PUBLIC_URL` and webpack via `$WDS_SOCKET_PATH`: @@ -396,7 +396,7 @@ sudo apt update sudo apt install wget unzip openssh-server ``` -2. Start the SSH server and set the password for your user, if you haven't already. If you use [deploy-code-server](https://github.com/cdr/deploy-code-server), +2. Start the SSH server and set the password for your user, if you haven't already. If you use [deploy-code-server](https://github.com/coder/deploy-code-server), ```bash sudo service ssh start diff --git a/docs/helm.md b/docs/helm.md index 5f3f26fabb7b..b404919c5917 100644 --- a/docs/helm.md +++ b/docs/helm.md @@ -2,7 +2,7 @@ [![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.0.2](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square) -[code-server](https://github.com/cdr/code-server) code-server is VS Code running +[code-server](https://github.com/coder/code-server) code-server is VS Code running on a remote server, accessible through the browser. This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev) @@ -10,7 +10,7 @@ This chart is community maintained by [@Matthew-Beckett](https://github.com/Matt ## Quickstart ```console -$ git clone https://github.com/cdr/code-server +$ git clone https://github.com/coder/code-server $ cd code-server $ helm upgrade --install code-server ci/helm-chart ``` @@ -30,7 +30,7 @@ package manager. To install the chart with the release name `code-server`: ```console -$ git clone https://github.com/cdr/code-server +$ git clone https://github.com/coder/code-server $ cd code-server $ helm upgrade --install code-server ci/helm-chart ``` diff --git a/docs/install.md b/docs/install.md index 83c0cbb19a89..64c35ddbecf2 100644 --- a/docs/install.md +++ b/docs/install.md @@ -30,7 +30,7 @@ operating systems. ## install.sh The easiest way to install code-server is to use our [install -script](https://github.com/cdr/code-server/blob/main/install.sh) for Linux, macOS and FreeBSD. The install script +script](https://github.com/coder/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`](https://github.com/cdr/code-server/blob/main/install.sh) script runs the +information on how to do this. The [`install.sh`](https://github.com/coder/code-server/blob/main/install.sh) script runs the _exact_ same commands presented in the rest of this document. ### Detection reference @@ -104,7 +104,7 @@ We recommend installing with `yarn` or `npm` when: 1. You're on Linux with `glibc` < v2.17, `glibcxx` < v3.4.18 on `amd64`, `glibc` < v2.23, or `glibcxx` < v3.4.21 on `arm64`. 1. You're running Alpine Linux or are using a non-glibc libc. See - [#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198) + [#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198) for more information. Installing code-server with `yarn` or `npm` builds native modules on install. @@ -114,7 +114,7 @@ This process requires C dependencies; see our guide on [installing with yarn and ## Standalone releases We publish self-contained `.tar.gz` archives for every release on -[GitHub](https://github.com/cdr/code-server/releases). The archives bundle the +[GitHub](https://github.com/coder/code-server/releases). The archives bundle the node binary and node modules. We create the standalone releases using the [npm package](#yarn-npm), and we @@ -127,7 +127,7 @@ requirement). To use a standalone release: 1. Download the latest release archive for your system from - [GitHub](https://github.com/cdr/code-server/releases). + [GitHub](https://github.com/coder/code-server/releases). 2. Unpack the release. 3. Run code-server by executing `./bin/code-server`. @@ -139,7 +139,7 @@ release on Linux: ```bash mkdir -p ~/.local/lib ~/.local/bin -curl -fL https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-linux-amd64.tar.gz \ +curl -fL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-linux-amd64.tar.gz \ | tar -C ~/.local/lib -xz mv ~/.local/lib/code-server-$VERSION-linux-amd64 ~/.local/lib/code-server-$VERSION ln -s ~/.local/lib/code-server-$VERSION/bin/code-server ~/.local/bin/code-server @@ -154,7 +154,7 @@ code-server > upgrade or [build with yarn](#yarn-npm). ```bash -curl -fOL https://github.com/cdr/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb +curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb sudo dpkg -i code-server_$VERSION_amd64.deb sudo systemctl enable --now code-server@$USER # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml @@ -166,7 +166,7 @@ sudo systemctl enable --now code-server@$USER > with yarn](#yarn-npm). ```bash -curl -fOL https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm +curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm sudo rpm -i code-server-$VERSION-amd64.rpm sudo systemctl enable --now code-server@$USER # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml @@ -228,9 +228,9 @@ You can install code-server using the [Helm package manager](https://coder.com/d ## Windows -We currently [do not publish Windows releases](https://github.com/cdr/code-server/issues/1397). We recommend installing code-server onto Windows with [`yarn` or `npm`](#yarn-npm). +We currently [do not publish Windows releases](https://github.com/coder/code-server/issues/1397). We recommend installing code-server onto Windows with [`yarn` or `npm`](#yarn-npm). -> Note: You will also need to [build cdr/cloud-agent manually](https://github.com/cdr/cloud-agent/issues/17) if you would like to use `code-server --link` on Windows. +> Note: You will also need to [build coder/cloud-agent manually](https://github.com/coder/cloud-agent/issues/17) if you would like to use `code-server --link` on Windows. ## Raspberry Pi @@ -245,7 +245,7 @@ information. ## Cloud providers We maintain [one-click apps and install scripts for cloud -providers](https://github.com/cdr/deploy-code-server) such as DigitalOcean, +providers](https://github.com/coder/deploy-code-server) such as DigitalOcean, Railway, Heroku, and Azure. ## Uninstall diff --git a/docs/ipad.md b/docs/ipad.md index 061d8a8fd4f3..3d6ac2b8f464 100644 --- a/docs/ipad.md +++ b/docs/ipad.md @@ -104,7 +104,7 @@ and tricks helpful: process](#access-code-server-with-a-self-signed-certificate-on-an-ipad) - Keyboard issues: - The keyboard disappear sometimes - [#979](https://github.com/cdr/code-server/issues/979) + [#979](https://github.com/coder/code-server/issues/979) - Some expectations regarding shortcuts may not be met: - `cmd + n` opens new browser window instead of new file, and it's difficult to set alternative as a workaround @@ -112,18 +112,18 @@ and tricks helpful: - There's no escape key by default on the Magic Keyboard, so most users set the globe key to be an escape key - Trackpad scrolling does not work on iPadOS < 14.5 - ([#1455](https://github.com/cdr/code-server/issues/1455)) + ([#1455](https://github.com/coder/code-server/issues/1455)) - [WebKit fix](https://bugs.webkit.org/show_bug.cgi?id=210071#c13) -- Keyboard may lose focus in Safari / split view [#4182](https://github.com/cdr/code-server/issues/4182) -- Terminal text does not appear by default [#3824](https://github.com/cdr/code-server/issues/3824) -- Copy & paste in terminal does not work well with keyboard shortcuts [#3491](https://github.com/cdr/code-server/issues/3491) +- Keyboard may lose focus in Safari / split view [#4182](https://github.com/coder/code-server/issues/4182) +- Terminal text does not appear by default [#3824](https://github.com/coder/code-server/issues/3824) +- Copy & paste in terminal does not work well with keyboard shortcuts [#3491](https://github.com/coder/code-server/issues/3491) - `ctrl+c` does not stop a long-running process in the browser - Tracking upstream issue here: [#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 `os-ios` -label](https://github.com/cdr/code-server/issues?q=is%3Aopen+is%3Aissue+label%3Aos-ios) +label](https://github.com/coder/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 diff --git a/docs/link.md b/docs/link.md index 8bef6bb69121..2ca9b4f6c362 100644 --- a/docs/link.md +++ b/docs/link.md @@ -7,5 +7,5 @@ for accessing your IDE out of the box. ```console $ code-server --link -Proxying code-server, you can access your IDE at https://example.cdr.co +Proxying code-server, you can access your IDE at https://example.coder.co ``` diff --git a/docs/npm.md b/docs/npm.md index f02cec569cba..27ceaf22f813 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -27,7 +27,7 @@ which is currently `14.x`. VS Code also [lists Node.js requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites). Using other versions of Node.js [may lead to unexpected -behavior](https://github.com/cdr/code-server/issues/1633). +behavior](https://github.com/coder/code-server/issues/1633). ## Ubuntu, Debian @@ -100,7 +100,7 @@ yarn global bin # Or: npm config get prefix ``` -For help and additional troubleshooting, see [#1397](https://github.com/cdr/code-server/issues/1397). +For help and additional troubleshooting, see [#1397](https://github.com/coder/code-server/issues/1397). ## Installing @@ -116,7 +116,7 @@ code-server ## Troubleshooting If you need further assistance, post on our [GitHub Discussions -page](https://github.com/cdr/code-server/discussions). +page](https://github.com/coder/code-server/discussions). ### Issues with Node.js after version upgrades diff --git a/docs/triage.md b/docs/triage.md index 5717c5eb2adc..6d4120f97209 100644 --- a/docs/triage.md +++ b/docs/triage.md @@ -28,8 +28,8 @@ This will show issues that: 1. If more information is required, please ask the submitter and tag as `waiting-for-info` and wait. 1. Finally, the issue should be moved into the - [code-server](https://github.com/cdr/code-server/projects/1) project where we + [code-server](https://github.com/coder/code-server/projects/1) project where we pick out issues to fix and track their progress. -We also use [milestones](https://github.com/cdr/code-server/milestones) to track +We also use [milestones](https://github.com/coder/code-server/milestones) to track what issues are planned/or were closed for what release. diff --git a/package.json b/package.json index dca9fc207943..a028ab0162ad 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,11 @@ "license": "MIT", "version": "4.0.2", "description": "Run VS Code on a remote server.", - "homepage": "https://github.com/cdr/code-server", + "homepage": "https://github.com/coder/code-server", "bugs": { - "url": "https://github.com/cdr/code-server/issues" + "url": "https://github.com/coder/code-server/issues" }, - "repository": "https://github.com/cdr/code-server", + "repository": "https://github.com/coder/code-server", "scripts": { "clean": "./ci/build/clean.sh", "build": "./ci/build/build-code-server.sh", diff --git a/src/node/cli.ts b/src/node/cli.ts index 6565fbc9aea6..854ea2fc291b 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -229,7 +229,7 @@ const options: Options> = { type: OptionalString, description: ` Securely bind code-server via our cloud service with the passed name. You'll get a URL like - https://hostname-username.cdr.co at which you can easily access your code-server instance. + https://hostname-username.coder.co at which you can easily access your code-server instance. Authorization is done via GitHub. `, deprecated: true, diff --git a/src/node/coder_cloud.ts b/src/node/coder_cloud.ts index fe9d30f727dc..e34b6f317c54 100644 --- a/src/node/coder_cloud.ts +++ b/src/node/coder_cloud.ts @@ -3,7 +3,7 @@ import { spawn } from "child_process" import path from "path" import split2 from "split2" -// https://github.com/cdr/coder-cloud +// https://github.com/coder/coder-cloud const coderCloudAgent = path.resolve(__dirname, "../../lib/coder-cloud-agent") function runAgent(...args: string[]): Promise { diff --git a/test/e2e/extensions/test-extension/package.json b/test/e2e/extensions/test-extension/package.json index 06e5ae92b8d4..5d32de7ac65b 100644 --- a/test/e2e/extensions/test-extension/package.json +++ b/test/e2e/extensions/test-extension/package.json @@ -2,7 +2,7 @@ "name": "code-server-extension", "description": "code-server test extension", "version": "0.0.1", - "publisher": "cdr", + "publisher": "coder", "activationEvents": [ "onCommand:codeServerTest.proxyUri" ], diff --git a/test/unit/node/constants.test.ts b/test/unit/node/constants.test.ts index 8a41583da798..34156dc94aec 100644 --- a/test/unit/node/constants.test.ts +++ b/test/unit/node/constants.test.ts @@ -8,7 +8,7 @@ describe("constants", () => { const mockPackageJson = { name: "mock-code-server", description: "Run VS Code on a remote server.", - repository: "https://github.com/cdr/code-server", + repository: "https://github.com/coder/code-server", version: "1.0.0", commit: "f6b2be2838f4afb217c2fd8f03eafedd8d55ef9b", } diff --git a/typings/pluginapi.d.ts b/typings/pluginapi.d.ts index 641476fcb28f..2397d668e106 100644 --- a/typings/pluginapi.d.ts +++ b/typings/pluginapi.d.ts @@ -72,7 +72,7 @@ import Websocket from "ws" * "plugin": { * "name": "test-plugin", * "version": "1.0.0", - * "modulePath": "/Users/nhooyr/src/cdr/code-server/test/test-plugin", + * "modulePath": "/Users/nhooyr/src/coder/code-server/test/test-plugin", * "displayName": "Test Plugin", * "description": "Plugin used in code-server tests.", * "routerPath": "/test-plugin", diff --git a/vendor/package.json b/vendor/package.json index 0c5cf1df0367..fb8d1302fae2 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "cdr/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892" + "code-oss-dev": "coder/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index f14e5e09e132..0a5687da4ac5 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@cdr/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892: +code-oss-dev@coder/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892: version "1.63.0" - resolved "https://codeload.github.com/cdr/vscode/tar.gz/d4f09b4df0d23ead4389b4a69c6fad86ac358892" + resolved "https://codeload.github.com/coder/vscode/tar.gz/d4f09b4df0d23ead4389b4a69c6fad86ac358892" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From 79412eb1372195812f1175790c5560060bb2491b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 12:43:31 -0700 Subject: [PATCH 002/760] chore(deps): update aquasecurity/trivy-action commit hash to a7a829a (#4821) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d18ada077a9..0f33d241db06 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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@9c21d3ca2c14eb35419e2a8b66d1195946d579b8 + uses: aquasecurity/trivy-action@a7a829a4345428ddd92ca57b18257440f6a18c90 with: scan-type: "fs" scan-ref: "." From fd643dcbc32d5780d51bce828a76a6df4d315ec3 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 3 Feb 2022 13:54:36 -0700 Subject: [PATCH 003/760] refactor(ci): fix npm workflows (#4797) * feat: refactor npm workflows to use download-artifact This refactors the npm workflows to use the download-artifact GitHub Action. We had problems in the past with our download_artifact custom bash function. This also fixes an issue where we weren't downloading the correct artifacts when publishing beta and dev tags to npm. * fixup: remove unused env var * fixup! add download-artifcat to npm-brew" * fixup! remove unnecessary code comment * fixup! move NPM_ENVIRONMENT logic to script --- .github/workflows/ci.yaml | 27 ++++++++++ .github/workflows/npm-beta.yaml | 29 ----------- .github/workflows/npm-brew.yaml | 9 +++- .github/workflows/npm-dev.yaml | 30 ----------- ci/steps/publish-npm.sh | 88 +++++++++++++++++++++++---------- 5 files changed, 95 insertions(+), 88 deletions(-) delete mode 100644 .github/workflows/npm-beta.yaml delete mode 100644 .github/workflows/npm-dev.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f33d241db06..d8af65da133f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -177,6 +177,33 @@ jobs: name: npm-package path: ./package.tar.gz + npm: + # the npm-package gets uploaded as an artifact in Build + # so we need that to complete before this runs + needs: build + # This environment "npm" requires someone from + # coder/code-server-reviewers to approve the PR before this job runs. + environment: npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + id: download + with: + name: "npm-package" + path: release-npm-package + + - name: Run ./ci/steps/publish-npm.sh + run: yarn publish:npm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # NOTE@jsjoeio + # NPM_ENVIRONMENT intentionally not set here. + # Instead, itis determined in publish-npm.sh script + # using GITHUB environment variables + # TODO: cache building yarn --production # possibly 2m30s of savings(?) # this requires refactoring our release scripts diff --git a/.github/workflows/npm-beta.yaml b/.github/workflows/npm-beta.yaml deleted file mode 100644 index 4ed59e4adbb7..000000000000 --- a/.github/workflows/npm-beta.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Publish on npm and tag with "beta" - -on: - # Shows the manual trigger in GitHub UI - # helpful as a back-up in case the GitHub Actions Workflow fails - workflow_dispatch: - - push: - branches: - - main - -jobs: - # NOTE: this job requires curl, jq and yarn - # All of them are included in ubuntu-latest. - npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Publish npm package and tag "beta" - run: yarn publish:npm - env: - ENVIRONMENT: "staging" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_TAG: "beta" - # Since this only runs on a merge into main, we can't use github.event.number - # so we instead use the word "beta" and the PR merge commit SHA - PR_NUMBER_AND_COMMIT_SHA: beta-${{ github.sha }} diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index c0fdcc50a187..a515e423e1ff 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -16,13 +16,18 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + id: download + with: + name: "npm-package" + path: release-npm-package + - name: Publish npm package and tag with "latest" run: yarn publish:npm env: - ENVIRONMENT: "production" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_TAG: "latest" + NPM_ENVIRONMENT: "production" homebrew: # The newest version of code-server needs to be available on npm when this runs diff --git a/.github/workflows/npm-dev.yaml b/.github/workflows/npm-dev.yaml deleted file mode 100644 index 4c120284a2b9..000000000000 --- a/.github/workflows/npm-dev.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Publish on npm and tag with PR number - -on: - # Shows the manual trigger in GitHub UI - # helpful as a back-up in case the GitHub Actions Workflow fails - workflow_dispatch: - - pull_request: - branches: - - main - -jobs: - # NOTE: this job requires curl, jq and yarn - # All of them are included in ubuntu-latest. - npm: - # This environment "npm" requires someone from - # coder/code-server-reviewers to approve the PR before this job runs. - environment: npm - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Run ./ci/steps/publish-npm.sh - run: yarn publish:npm - env: - ENVIRONMENT: "development" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_TAG: ${{ github.event.number }} - PR_NUMBER_AND_COMMIT_SHA: ${{ github.event.number }}-${{ github.event.pull_request.head.sha }} diff --git a/ci/steps/publish-npm.sh b/ci/steps/publish-npm.sh index 5b494a2f2b90..7ba3a0f97d2f 100755 --- a/ci/steps/publish-npm.sh +++ b/ci/steps/publish-npm.sh @@ -21,20 +21,6 @@ main() { exit 1 fi - ## Environment - # This string is used to determine how we should tag the npm release. - # Environment can be one of three choices: - # "development" - this means we tag with the PR number, allowing - # a developer to install this version with `yarn add code-server@` - # "staging" - this means we tag with `beta`, allowing - # a developer to install this version with `yarn add code-server@beta` - # "production" - this means we tag with `latest` (default), allowing - # a developer to install this version with `yarn add code-server@latest` - if ! is_env_var_set "ENVIRONMENT"; then - echo "ENVIRONMENT is not set. Cannot determine npm tag without ENVIRONMENT." - exit 1 - fi - ## Publishing Information # All the variables below are used to determine how we should publish # the npm package. We also use this information for bumping the version. @@ -47,22 +33,52 @@ main() { exit 1 fi - # We need TAG to know what to publish under on npm - # Options are "latest", "beta", or "" - # See Environment comments above to know when each is used. - if ! is_env_var_set "NPM_TAG"; then - echo "NPM_TAG is not set. This is needed for tagging the npm release." + # We use this to grab the PR_NUMBER + if ! is_env_var_set "GITHUB_REF"; then + echo "GITHUB_REF is not set. Are you running this locally? We rely on values provided by GitHub." + exit 1 + fi + + # We use this when setting NPM_VERSION + if ! is_env_var_set "GITHUB_SHA"; then + echo "GITHUB_SHA is not set. Are you running this locally? We rely on values provided by GitHub." exit 1 fi - echo "using tag: $NPM_TAG" + # We use this to determine the NPM_ENVIRONMENT + if ! is_env_var_set "GITHUB_EVENT_NAME"; then + echo "GITHUB_EVENT_NAME is not set. Are you running this locally? We rely on values provided by GitHub." + exit 1 + fi # This allows us to publish to npm in CI workflows if [[ ${CI-} ]]; then echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc fi - download_artifact npm-package ./release-npm-package + ## Environment + # This string is used to determine how we should tag the npm release. + # Environment can be one of three choices: + # "development" - this means we tag with the PR number, allowing + # a developer to install this version with `yarn add code-server@` + # "staging" - this means we tag with `beta`, allowing + # a developer to install this version with `yarn add code-server@beta` + # "production" - this means we tag with `latest` (default), allowing + # a developer to install this version with `yarn add code-server@latest` + if ! is_env_var_set "NPM_ENVIRONMENT"; then + echo "NPM_ENVIRONMENT is not set. Determining in script based on GITHUB environment variables." + + if [[ "$GITHUB_EVENT_NAME" == 'push' && "$GITHUB_REF" == 'refs/heads/main' ]]; then + NPM_ENVIRONMENT="staging" + else + NPM_ENVIRONMENT="development" + fi + + echo "Using npm environment: $NPM_ENVIRONMENT" + fi + + # NOTE@jsjoeio - this script assumes we have the artifact downloaded on disk + # That happens in CI as a step before we run this. # https://github.com/actions/upload-artifact/issues/38 tar -xzf release-npm-package/package.tar.gz @@ -74,22 +90,40 @@ main() { # We only need to run npm version for "development" and "staging". # This is because our release:prep script automatically bumps the version # in the package.json and we commit it as part of the release PR. - if [[ "$ENVIRONMENT" == "production" ]]; then + if [[ "$NPM_ENVIRONMENT" == "production" ]]; then NPM_VERSION="$VERSION" + # This means the npm version will be published as "stable" + # and installed when a user runs `yarn install code-server` + NPM_TAG="latest" else + COMMIT_SHA="$GITHUB_SHA" echo "Not a production environment" - echo "Found environment: $ENVIRONMENT" + echo "Found environment: $NPM_ENVIRONMENT" echo "Manually bumping npm version..." - if ! is_env_var_set "PR_NUMBER_AND_COMMIT_SHA"; then - echo "PR_NUMBER_AND_COMMIT_SHA is not set. This is needed for setting the npm version in non-production environments." - exit 1 + if [[ "$NPM_ENVIRONMENT" == "staging" ]]; then + NPM_VERSION="$VERSION-beta-$COMMIT_SHA" + # This means the npm version will be tagged with "beta" + # and installed when a user runs `yarn install code-server@beta` + NPM_TAG="beta" + fi + + if [[ "$NPM_ENVIRONMENT" == "development" ]]; then + # Source: https://github.com/actions/checkout/issues/58#issuecomment-614041550 + PR_NUMBER=$(echo "$GITHUB_REF" | awk 'BEGIN { FS = "/" } ; { print $3 }') + NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA" + # This means the npm version will be tagged with "" + # and installed when a user runs `yarn install code-server@` + NPM_TAG="$PR_NUMBER" fi + echo "using tag: $NPM_TAG" + # We modify the version in the package.json # to be the current version + the PR number + commit SHA + # or we use current version + beta + commit SHA # Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040" - NPM_VERSION="$VERSION-$PR_NUMBER_AND_COMMIT_SHA" + # Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040" pushd release # NOTE:@jsjoeio # I originally tried to use `yarn version` but ran into issues and abandoned it. From 00224fa73a8907e6478ebeda6049f85711dbd1b4 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 3 Feb 2022 14:22:16 -0700 Subject: [PATCH 004/760] feat: add test for hash when error (#4814) --- src/node/util.ts | 7 +------ test/unit/node/util.test.ts | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/node/util.ts b/src/node/util.ts index a926838e0bc1..a56d6615c222 100644 --- a/src/node/util.ts +++ b/src/node/util.ts @@ -157,12 +157,7 @@ export const generatePassword = async (length = 24): Promise => { * Used to hash the password. */ export const hash = async (password: string): Promise => { - try { - return await argon2.hash(password) - } catch (error: any) { - logger.error(error) - return "" - } + return await argon2.hash(password) } /** diff --git a/test/unit/node/util.test.ts b/test/unit/node/util.test.ts index a236bfca6a7f..e5c50b4bdf9d 100644 --- a/test/unit/node/util.test.ts +++ b/test/unit/node/util.test.ts @@ -104,6 +104,10 @@ describe("hash", () => { const hashed = await util.hash(plainTextPassword) expect(hashed).not.toBe(plainTextPassword) }) + it("should return a hash for an empty string", async () => { + const hashed = await util.hash("") + expect(hashed).not.toBe("") + }) }) describe("isHashMatch", () => { From 25b1340771e0faa04ec33a8551f7d8a218d00989 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 4 Feb 2022 15:52:42 -0700 Subject: [PATCH 005/760] revert: @node-rs/argon2 -> node-argon2 (#4829) * revert: partial revert of 723469ab5bed3ba9fbb3e8d5ecbfcd9a3bee2d88 This reverts part of the changes introduced in refactor: migrate from argon2 -> @node-rs/argon2 (#4733) Switching to @node-rs/argon2 introduced bugs that we couldn't solve due to limitations in npm. see here https://github.com/coder/code-server/issues/4804#issuecomment-1030338395 --- ci/build/build-standalone-release.sh | 4 + ci/build/npm-postinstall.sh | 3 + package.json | 2 +- src/node/util.ts | 10 +- test/package.json | 2 + test/unit/node/util.test.ts | 8 +- test/yarn.lock | 192 +++++++++++++++++++- yarn.lock | 250 +++++++++++++++++---------- 8 files changed, 369 insertions(+), 102 deletions(-) diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh index f3c61f8f0b45..481110b47b39 100755 --- a/ci/build/build-standalone-release.sh +++ b/ci/build/build-standalone-release.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 +# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 +export npm_config_build_from_source=true + main() { cd "$(dirname "${0}")/../.." diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 2b9b0a68d9df..43c3262ec341 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -18,6 +18,9 @@ detect_arch() { } ARCH="${NPM_CONFIG_ARCH:-$(detect_arch)}" +# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2 +# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057 +export npm_config_build_from_source=true main() { # Grabs the major version of node from $npm_config_user_agent which looks like diff --git a/package.json b/package.json index a028ab0162ad..37fb629c7fe8 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ }, "dependencies": { "@coder/logger": "1.1.16", - "@node-rs/argon2": "^1.0.5", + "argon2": "^0.28.0", "compression": "^1.7.4", "cookie-parser": "^1.4.5", "env-paths": "^2.2.0", diff --git a/src/node/util.ts b/src/node/util.ts index a56d6615c222..b53a4ecf6182 100644 --- a/src/node/util.ts +++ b/src/node/util.ts @@ -1,5 +1,4 @@ -import { logger } from "@coder/logger" -import * as argon2 from "@node-rs/argon2" +import * as argon2 from "argon2" import * as cp from "child_process" import * as crypto from "crypto" import envPaths from "env-paths" @@ -167,12 +166,7 @@ export const isHashMatch = async (password: string, hash: string) => { if (password === "" || hash === "" || !hash.startsWith("$")) { return false } - try { - return await argon2.verify(hash, password) - } catch (error: any) { - logger.error(error) - return false - } + return await argon2.verify(hash, password) } /** diff --git a/test/package.json b/test/package.json index 9aa4ed6552f8..d50371666ba4 100644 --- a/test/package.json +++ b/test/package.json @@ -8,6 +8,7 @@ "@types/node-fetch": "^2.5.8", "@types/supertest": "^2.0.11", "@types/wtfnode": "^0.7.0", + "argon2": "^0.28.0", "jest": "^27.3.1", "jest-fetch-mock": "^3.0.3", "jsdom": "^16.4.0", @@ -19,6 +20,7 @@ }, "resolutions": { "ansi-regex": "^5.0.1", + "argon2/@mapbox/node-pre-gyp/tar": "^6.1.9", "set-value": "^4.0.1", "tmpl": "^1.0.5", "path-parse": "^1.0.7", diff --git a/test/unit/node/util.test.ts b/test/unit/node/util.test.ts index e5c50b4bdf9d..a86e9d066cef 100644 --- a/test/unit/node/util.test.ts +++ b/test/unit/node/util.test.ts @@ -141,16 +141,16 @@ describe("isHashMatch", () => { const actual = await util.isHashMatch(password, _hash) expect(actual).toBe(false) }) - it("should return false if the hash doesn't start with a $", async () => { + it("should return false and not throw an error if the hash doesn't start with a $", async () => { const password = "hellowpasssword" const _hash = "n2i$v=19$m=4096,t=3,p=1$EAoczTxVki21JDfIZpTUxg$rkXgyrW4RDGoDYrxBFD4H2DlSMEhP4h+Api1hXnGnFY" + expect(async () => await util.isHashMatch(password, _hash)).not.toThrow() expect(await util.isHashMatch(password, _hash)).toBe(false) }) - it("should return false if the password and hash don't match", async () => { + it("should reject the promise and throw if error", async () => { const password = "hellowpasssword" const _hash = "$ar2i" - const actual = await util.isHashMatch(password, _hash) - expect(actual).toBe(false) + expect(async () => await util.isHashMatch(password, _hash)).rejects.toThrow() }) }) diff --git a/test/yarn.lock b/test/yarn.lock index ef444cbdc2a3..35377913d710 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -647,6 +647,26 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@mapbox/node-pre-gyp@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz#32abc8a5c624bc4e46c43d84dfb8b26d33a96f58" + integrity sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg== + dependencies: + detect-libc "^1.0.3" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.5" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + +"@phc/format@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@phc/format/-/format-1.0.0.tgz#b5627003b3216dc4362125b13f48a4daa76680e4" + integrity sha512-m7X9U6BG2+J+R1lSOdCiITLLrxm+cWlNI3HUFA92oLO77ObGNzaKdh8pMLqdZcshtkKuV84olNNXDfMc4FezBQ== + "@playwright/test@^1.16.3": version "1.17.2" resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.17.2.tgz#0c67e329a28ffe43a79dc15a0e139dadd9cb250f" @@ -865,6 +885,11 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -934,6 +959,29 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + +argon2@^0.28.0: + version "0.28.4" + resolved "https://registry.yarnpkg.com/argon2/-/argon2-0.28.4.tgz#af6df523b839a78b3cfbfdbfa789ffa2c6672d9f" + integrity sha512-WsfqiDp/tf5+eieLc1+S7RtO7Y3cAiZQ1F6GIaskENoJy/6xuCN5WGBIc8dG7QVPDavy6jUSads8zwZTtrHVag== + dependencies: + "@mapbox/node-pre-gyp" "^1.0.8" + "@phc/format" "^1.0.0" + node-addon-api "^4.3.0" + opencollective-postinstall "^2.0.3" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1129,6 +1177,11 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + ci-info@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" @@ -1182,6 +1235,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + colors@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -1209,6 +1267,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +console-control-strings@^1.0.0, console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" @@ -1307,6 +1370,16 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -1521,6 +1594,13 @@ formidable@^2.0.1: once "1.4.0" qs "6.9.3" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1536,6 +1616,21 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -1609,6 +1704,11 @@ has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -2338,7 +2438,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -2409,6 +2509,26 @@ minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minipass@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -2424,6 +2544,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +node-addon-api@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" + integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== + node-fetch@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" @@ -2436,6 +2561,13 @@ node-fetch@^2.6.1: dependencies: whatwg-url "^5.0.0" +node-fetch@^2.6.5: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -2446,6 +2578,13 @@ node-releases@^2.0.1: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -2458,11 +2597,26 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + object-inspect@^1.9.0: version "1.12.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" @@ -2506,6 +2660,11 @@ open@^8.3.0: is-docker "^2.1.1" is-wsl "^2.2.0" +opencollective-postinstall@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -2802,6 +2961,11 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + set-value@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-4.1.0.tgz#aa433662d87081b75ad88a4743bd450f044e7d09" @@ -2831,6 +2995,11 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +signal-exit@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.6" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" @@ -2918,7 +3087,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@^4.1.0, string-width@^4.2.0: +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3015,6 +3184,18 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tar@^6.1.11, tar@^6.1.9: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -3204,6 +3385,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" diff --git a/yarn.lock b/yarn.lock index b681265355f3..49869f2fc530 100644 --- a/yarn.lock +++ b/yarn.lock @@ -235,89 +235,20 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== -"@node-rs/argon2-android-arm-eabi@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-android-arm-eabi/-/argon2-android-arm-eabi-1.0.5.tgz#3e290b1ed5c403f98059bee0380394a915c6020d" - integrity sha512-gRRQGxo/k4sYpybFP5Ss79KfIkspqeC2EdicGfl1Kpd/h3YSH+32QL1UNPzeHPx00MCjFeefnt1bI/hocND22w== - -"@node-rs/argon2-android-arm64@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-android-arm64/-/argon2-android-arm64-1.0.5.tgz#72c5c6cdb5ba8c73438ac1bf0ad6a9da9bf8b15a" - integrity sha512-f4kLb4BW8cTbde64BEEfSGL5febnsrD+zfPkSgWYRfaiKrGbp0O8DT2KICL+Jkh/4lMRRsgS8n8+pcp68dZK0A== - -"@node-rs/argon2-darwin-arm64@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-darwin-arm64/-/argon2-darwin-arm64-1.0.5.tgz#2c04416956789538f413458154076b0a9516bd11" - integrity sha512-QwK8RJscTK09r+mB/QEMxvtkEIjWxfx7p7rW7xFAEYWUEt3ztClEDcKqReFJN9EidNBaANMIzmMLwd5GVCxqNg== - -"@node-rs/argon2-darwin-x64@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-darwin-x64/-/argon2-darwin-x64-1.0.5.tgz#ef68ba7939344c441249f6d42b4821901b9280f2" - integrity sha512-P2fDqZU6isyEK7HviC22ccriGP5t2yWZ9jJtkPCyTj0JJooEUwdJDcPezIzJPYoiiV/gMS2LIyAVCWaqG05FEQ== - -"@node-rs/argon2-freebsd-x64@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-freebsd-x64/-/argon2-freebsd-x64-1.0.5.tgz#e2f72e655f955c75a2900182fd533eecdcbb68ad" - integrity sha512-nMp+XoA9Me0/JMP3zN7+XUlmVVaMx1fjR6sVIqnswBAHk9WkUBA2mTTleyXroTFXifnsu7o7K4cOZq1bNap1VA== - -"@node-rs/argon2-linux-arm-gnueabihf@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-linux-arm-gnueabihf/-/argon2-linux-arm-gnueabihf-1.0.5.tgz#2823d42a093194a920870a18f40375db6064b903" - integrity sha512-mpyUFFze0WhV6FP5Ms1mFL8ABhoVeEw/a2AquTNtwQgMzWvp4Jcjo81fXZ+LP3pzgcrQUQqyDosf7EKC6BnPCA== - -"@node-rs/argon2-linux-arm64-gnu@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-linux-arm64-gnu/-/argon2-linux-arm64-gnu-1.0.5.tgz#0f3799dca9b4cae7757f8241fd9b36f05762aa0c" - integrity sha512-XRVEX5/WHGN2UxSvBDi0pAQxZ7q5oCvyb9aDJBjmEcXvwwnm+292N6NKG0suC6N4nmGoy1iy5EWvZnnDecU1tg== - -"@node-rs/argon2-linux-arm64-musl@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-linux-arm64-musl/-/argon2-linux-arm64-musl-1.0.5.tgz#a1e3a9a0d949c008734f5e51c4be0e6fd9a315d8" - integrity sha512-kciIicrBlPaCwlOabTuCgbAMtHnGNi4Tdf4tVhx+NtdC8elZYa4yzRXZQhPTkekM06bmHCh/qIlB+herVe8fWw== - -"@node-rs/argon2-linux-x64-gnu@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-linux-x64-gnu/-/argon2-linux-x64-gnu-1.0.5.tgz#aa1b9c4eb90807cf6cce5939de58a22a5fe325c4" - integrity sha512-uKIL5qap0YyYXTJAbHcuHFMvNHQF8F4tE00B/dlRQNjQl/FurXvBtzE3aN77zMIMI2bEMsG9OKEGD9JzDEhKVw== - -"@node-rs/argon2-linux-x64-musl@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-linux-x64-musl/-/argon2-linux-x64-musl-1.0.5.tgz#ac3b075911ef9489f4d487014801cda26171bcb8" - integrity sha512-KFkHW1slATnnfH5fHuryOhJS2k7aU9hwb5oZlwVoUHrQ9SE5leXcbgaTDyq1+uu4zE21nPB499EOXFxkKLdQWA== - -"@node-rs/argon2-win32-arm64-msvc@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-win32-arm64-msvc/-/argon2-win32-arm64-msvc-1.0.5.tgz#9fcb64dd936306d637e460433321d8af8a618243" - integrity sha512-tL/ClEzxAGOAu1ItiUV5zAnkRk8QcNKjLke85Rm7VxANoOQoM+nVtpV9KUdXHHBbTwucBkoJKZiklNyoT0GWrA== - -"@node-rs/argon2-win32-ia32-msvc@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-win32-ia32-msvc/-/argon2-win32-ia32-msvc-1.0.5.tgz#3289a3777ca3584a71a1e0436d7011cb9bbb734d" - integrity sha512-GFPmzdIBBPhdC8QJtO07vi9J/fAnF+W+4VhBpmdo370FWgD6jXJZV6X6Zj/v14suG2DsJrP5JAq6/iT4NM9piA== - -"@node-rs/argon2-win32-x64-msvc@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2-win32-x64-msvc/-/argon2-win32-x64-msvc-1.0.5.tgz#6a05e9fd5926a6faa99374ad4fce3fec5f887b2e" - integrity sha512-bao8NPLd8/49jROzl0g8cH//oP4nKk3lwhhWJ8entz1c6Gm49oAKSeGEzjnh9bUCJXLTkwqxgvlkw30QgMeqHA== - -"@node-rs/argon2@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@node-rs/argon2/-/argon2-1.0.5.tgz#d864c2801447a5e1125a470b36a702730c65816f" - integrity sha512-lWnG4nNEGMosKbEuhZzHIS/S4tanxVkBXDlEslMj5gx4ibIcpxklJZKD6hUEdBp8YnIfiyzA340bWVbD4SPhbg== - optionalDependencies: - "@node-rs/argon2-android-arm-eabi" "1.0.5" - "@node-rs/argon2-android-arm64" "1.0.5" - "@node-rs/argon2-darwin-arm64" "1.0.5" - "@node-rs/argon2-darwin-x64" "1.0.5" - "@node-rs/argon2-freebsd-x64" "1.0.5" - "@node-rs/argon2-linux-arm-gnueabihf" "1.0.5" - "@node-rs/argon2-linux-arm64-gnu" "1.0.5" - "@node-rs/argon2-linux-arm64-musl" "1.0.5" - "@node-rs/argon2-linux-x64-gnu" "1.0.5" - "@node-rs/argon2-linux-x64-musl" "1.0.5" - "@node-rs/argon2-win32-arm64-msvc" "1.0.5" - "@node-rs/argon2-win32-ia32-msvc" "1.0.5" - "@node-rs/argon2-win32-x64-msvc" "1.0.5" +"@mapbox/node-pre-gyp@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz#32abc8a5c624bc4e46c43d84dfb8b26d33a96f58" + integrity sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg== + dependencies: + detect-libc "^1.0.3" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.5" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" "@nodelib/fs.scandir@2.1.4": version "2.1.4" @@ -340,6 +271,11 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" +"@phc/format@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@phc/format/-/format-1.0.0.tgz#b5627003b3216dc4362125b13f48a4daa76680e4" + integrity sha512-m7X9U6BG2+J+R1lSOdCiITLLrxm+cWlNI3HUFA92oLO77ObGNzaKdh8pMLqdZcshtkKuV84olNNXDfMc4FezBQ== + "@schemastore/package@^0.0.6": version "0.0.6" resolved "https://registry.yarnpkg.com/@schemastore/package/-/package-0.0.6.tgz#9a76713da1c7551293b7e72e4f387f802bfd5d81" @@ -649,6 +585,11 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -725,11 +666,34 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +argon2@^0.28.0: + version "0.28.4" + resolved "https://registry.yarnpkg.com/argon2/-/argon2-0.28.4.tgz#af6df523b839a78b3cfbfdbfa789ffa2c6672d9f" + integrity sha512-WsfqiDp/tf5+eieLc1+S7RtO7Y3cAiZQ1F6GIaskENoJy/6xuCN5WGBIc8dG7QVPDavy6jUSads8zwZTtrHVag== + dependencies: + "@mapbox/node-pre-gyp" "^1.0.8" + "@phc/format" "^1.0.0" + node-addon-api "^4.3.0" + opencollective-postinstall "^2.0.3" + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1066,6 +1030,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + colorette@^1.2.1, colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" @@ -1096,6 +1065,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +console-control-strings@^1.0.0, console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -1253,6 +1227,11 @@ degenerator@^3.0.1: esprima "^4.0.0" vm2 "^3.9.3" +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -1263,6 +1242,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -1959,6 +1943,21 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -2140,6 +2139,11 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -2726,6 +2730,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +make-dir@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -2955,7 +2966,12 @@ netmask@^2.0.1: resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== -node-fetch@^2.6.1, node-fetch@^2.6.7: +node-addon-api@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" + integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== + +node-fetch@^2.6.1, node-fetch@^2.6.5, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -2967,6 +2983,13 @@ node-releases@^1.1.71: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-package-data@^2.3.2, normalize-package-data@^2.5.0, normalize-package-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.1.tgz#98dc56dfe6755d99b1c53f046e1e3d2dde55a1c7" @@ -2987,11 +3010,26 @@ normalize-selector@^0.2.0: resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03" integrity sha1-0LFF62kRicY6eNIB3E/bEpPvDAM= +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + object-inspect@^1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -3046,6 +3084,11 @@ once@^1.3.0: dependencies: wrappy "1" +opencollective-postinstall@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -3516,7 +3559,7 @@ readable-stream@1.1.x: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^3.1.1: +readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -3697,7 +3740,7 @@ safe-compare@^1.1.4: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@^6.3.0: +semver@^6.0.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -3738,6 +3781,11 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" @@ -3779,6 +3827,11 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +signal-exit@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -3911,6 +3964,15 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" @@ -3955,6 +4017,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -4086,7 +4155,7 @@ table@^6.0.9, table@^6.6.0: string-width "^4.2.0" strip-ansi "^6.0.0" -tar@^6.1.9: +tar@^6.1.11, tar@^6.1.9: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== @@ -4503,6 +4572,13 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" From 177f0ed1630b8bd759374ac5da10560fc6a297dd Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Thu, 10 Feb 2022 17:16:35 -0600 Subject: [PATCH 006/760] feat: support ingressClassName in Helm Chart (#4844) Allow configuring the ingress class via a value. --- ci/helm-chart/Chart.yaml | 2 +- ci/helm-chart/templates/ingress.yaml | 3 +++ ci/helm-chart/values.yaml | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index 233e71c58b49..c68fb2b20c4e 100644 --- a/ci/helm-chart/Chart.yaml +++ b/ci/helm-chart/Chart.yaml @@ -15,7 +15,7 @@ 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: 2.0.1 +version: 2.1.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 diff --git a/ci/helm-chart/templates/ingress.yaml b/ci/helm-chart/templates/ingress.yaml index d0a552cdfd99..1da432074b29 100644 --- a/ci/helm-chart/templates/ingress.yaml +++ b/ci/helm-chart/templates/ingress.yaml @@ -18,6 +18,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index 9dfc948138f9..19c6a5eaef49 100644 --- a/ci/helm-chart/values.yaml +++ b/ci/helm-chart/values.yaml @@ -35,13 +35,12 @@ service: ingress: enabled: false #annotations: - # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" #hosts: # - host: code-server.example.loc # paths: # - / - + ingressClassName: "" #tls: # - secretName: code-server # hosts: From 8135d2ecc3a4cd8b4d42989ee32c4d6b745d4d20 Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Thu, 10 Feb 2022 17:40:41 -0800 Subject: [PATCH 007/760] chore: update Docker image publish workflow (#4847) * Use official action to log in to Docker Hub * Run using pinned ubuntu-20.04 environment --- .github/workflows/docker.yaml | 18 ++++++++++++------ ci/steps/docker-buildx-push.sh | 5 ----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index fe3cfee53c52..ec1792b27be8 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -6,13 +6,15 @@ on: workflow_dispatch: release: - types: [released] + types: + - released jobs: docker-images: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -20,9 +22,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Run ./ci/steps/docker-buildx-push.sh run: ./ci/steps/docker-buildx-push.sh env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + GITHUB_TOKEN: ${{ github.token }} diff --git a/ci/steps/docker-buildx-push.sh b/ci/steps/docker-buildx-push.sh index 79b205580291..75688cb568f4 100755 --- a/ci/steps/docker-buildx-push.sh +++ b/ci/steps/docker-buildx-push.sh @@ -26,11 +26,6 @@ main() { # Download the release-packages artifact download_artifact release-packages ./release-packages - # Login to Docker - if [[ ${CI-} ]]; then - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - fi - docker buildx bake -f ci/release-image/docker-bake.hcl --push } From 03c62242ee2a60d1eb61b46335916dd34a95b48e Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Fri, 11 Feb 2022 09:32:02 -0800 Subject: [PATCH 008/760] chore: allow overwriting Docker images (#4850) Allow Docker images to be overwritten, which is required to update dependencies in the base image when the upstream vendor resolves security issues. --- ci/steps/docker-buildx-push.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ci/steps/docker-buildx-push.sh b/ci/steps/docker-buildx-push.sh index 75688cb568f4..c3bb0579635a 100755 --- a/ci/steps/docker-buildx-push.sh +++ b/ci/steps/docker-buildx-push.sh @@ -1,28 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -# See if this version already exists on Docker Hub. -function version_exists() { - local output - output=$(curl --silent "https://index.docker.io/v1/repositories/codercom/code-server/tags/$VERSION") - if [[ $output == "Tag not found" ]]; then - return 1 - else - return 0 - fi -} - main() { cd "$(dirname "$0")/../.." # ci/lib.sh sets VERSION and provides download_artifact here source ./ci/lib.sh - if version_exists; then - echo "$VERSION is already pushed" - return - fi - # Download the release-packages artifact download_artifact release-packages ./release-packages From 102478bdea61bb8374bd1e05e50581a05268ad38 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Fri, 11 Feb 2022 20:44:01 +0100 Subject: [PATCH 009/760] fix: ensure dumb-init is PID 1 (#4846) Exec to dumb-init in entrypoint script, so that it can handle signals and reap subprocesses. --- ci/release-image/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release-image/entrypoint.sh b/ci/release-image/entrypoint.sh index 770232d7e30f..9af98fbc3dc9 100755 --- a/ci/release-image/entrypoint.sh +++ b/ci/release-image/entrypoint.sh @@ -18,4 +18,4 @@ if [ "${DOCKER_USER-}" ]; then fi fi -dumb-init /usr/bin/code-server "$@" +exec dumb-init /usr/bin/code-server "$@" From c9c5c54cdae508acf8821e1a019287b9e9fdd887 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 14 Feb 2022 13:53:28 -0700 Subject: [PATCH 010/760] feat: add tests for update.ts (#4835) * feat: add isAddressInfo helper function * feat(update): add test for rejection UpdateProvider * feat: add more tests for UpdateProvider * fixup! move isAddressInfo, add .address check * fixup! remove extra writeHead * fixup! use -1 in redirect logic * fixup! remove unnecessary String call * fixup! use /latest for redirect * fixup! use match group for regex * fixup!: replace match/split logic --- test/unit/node/update.test.ts | 109 ++++++++++++++++++++++++++++++++-- test/utils/helpers.ts | 14 +++++ 2 files changed, 119 insertions(+), 4 deletions(-) diff --git a/test/unit/node/update.test.ts b/test/unit/node/update.test.ts index 49c938b125a0..b900d8ae7c0d 100644 --- a/test/unit/node/update.test.ts +++ b/test/unit/node/update.test.ts @@ -1,8 +1,10 @@ import * as http from "http" +import { logger } from "@coder/logger" +import { AddressInfo } from "net" import * as path from "path" import { SettingsProvider, UpdateSettings } from "../../../src/node/settings" import { LatestResponse, UpdateProvider } from "../../../src/node/update" -import { clean, mockLogger, tmpdir } from "../../utils/helpers" +import { clean, isAddressInfo, mockLogger, tmpdir } from "../../utils/helpers" describe("update", () => { let version = "1.0.0" @@ -23,6 +25,46 @@ describe("update", () => { return response.end(JSON.stringify(latest)) } + if (request.url === "/reject-status-code") { + response.writeHead(500) + return response.end("rejected status code test") + } + + if (request.url === "/no-location-header") { + response.writeHead(301, "testing", { + location: "", + }) + return response.end("rejected status code test") + } + + if (request.url === "/with-location-header") { + response.writeHead(301, "testing", { + location: "/latest", + }) + + return response.end() + } + + // Checks if url matches /redirect/${number} + // with optional trailing slash + const match = request.url.match(/\/redirect\/([0-9]+)\/?$/) + if (match) { + if (request.url === "/redirect/0") { + response.writeHead(200) + return response.end("done") + } + + // Subtract 1 from the current redirect number + // i.e. /redirect/10 -> /redirect/9 -> /redirect/8 + const currentRedirectNumber = parseInt(match[1]) + const newRedirectNumber = currentRedirectNumber - 1 + + response.writeHead(302, "testing", { + location: `/redirect/${String(newRedirectNumber)}`, + }) + return response.end("") + } + // Anything else is a 404. response.writeHead(404) response.end("not found") @@ -37,6 +79,7 @@ describe("update", () => { } let _provider: UpdateProvider | undefined + let _address: string | AddressInfo | null const provider = (): UpdateProvider => { if (!_provider) { throw new Error("Update provider has not been created") @@ -62,12 +105,12 @@ describe("update", () => { }) }) - const address = server.address() - if (!address || typeof address === "string" || !address.port) { + _address = server.address() + if (!isAddressInfo(_address)) { throw new Error("unexpected address") } - _provider = new UpdateProvider(`http://${address.address}:${address.port}/latest`, _settings) + _provider = new UpdateProvider(`http://${_address?.address}:${_address?.port}/latest`, _settings) }) afterAll(() => { @@ -75,6 +118,7 @@ describe("update", () => { }) beforeEach(() => { + jest.clearAllMocks() spy = [] }) @@ -170,4 +214,61 @@ describe("update", () => { expect(update.checked < Date.now() && update.checked >= now).toEqual(true) expect(update.version).toStrictEqual("unknown") }) + + it("should reject if response has status code 500", async () => { + if (isAddressInfo(_address)) { + const mockURL = `http://${_address.address}:${_address.port}/reject-status-code` + let provider = new UpdateProvider(mockURL, settings()) + let update = await provider.getUpdate(true) + + expect(update.version).toBe("unknown") + expect(logger.error).toHaveBeenCalled() + expect(logger.error).toHaveBeenCalledWith("Failed to get latest version", { + identifier: "error", + value: `${mockURL}: 500`, + }) + } + }) + + it("should reject if no location header provided", async () => { + if (isAddressInfo(_address)) { + const mockURL = `http://${_address.address}:${_address.port}/no-location-header` + let provider = new UpdateProvider(mockURL, settings()) + let update = await provider.getUpdate(true) + + expect(update.version).toBe("unknown") + expect(logger.error).toHaveBeenCalled() + expect(logger.error).toHaveBeenCalledWith("Failed to get latest version", { + identifier: "error", + value: `received redirect with no location header`, + }) + } + }) + + it("should resolve the request with response.headers.location", async () => { + version = "4.1.1" + if (isAddressInfo(_address)) { + const mockURL = `http://${_address.address}:${_address.port}/with-location-header` + let provider = new UpdateProvider(mockURL, settings()) + let update = await provider.getUpdate(true) + + expect(logger.error).not.toHaveBeenCalled() + expect(update.version).toBe("4.1.1") + } + }) + + it("should reject if more than 10 redirects", async () => { + if (isAddressInfo(_address)) { + const mockURL = `http://${_address.address}:${_address.port}/redirect/11` + let provider = new UpdateProvider(mockURL, settings()) + let update = await provider.getUpdate(true) + + expect(update.version).toBe("unknown") + expect(logger.error).toHaveBeenCalled() + expect(logger.error).toHaveBeenCalledWith("Failed to get latest version", { + identifier: "error", + value: `reached max redirects`, + }) + } + }) }) diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index 92e06fbcf204..be8f3a90da4d 100644 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -105,3 +105,17 @@ export function idleTimer(message: string, reject: (error: Error) => void, delay }, } } + +/** + * A helper function which returns a boolean indicating whether + * the given address is AddressInfo and has .address + * and a .port property. + */ +export function isAddressInfo(address: unknown): address is net.AddressInfo { + return ( + address !== null && + typeof address !== "string" && + (address as net.AddressInfo).port !== undefined && + (address as net.AddressInfo).address !== undefined + ) +} From 3ad618db97408e8c076e7a9562c5107e95e187bd Mon Sep 17 00:00:00 2001 From: Thomas John Wesolowski Date: Mon, 14 Feb 2022 16:34:07 -0600 Subject: [PATCH 011/760] feat: Add support for imagePullSecrets to Helm chart (#4838) * add support for imagePullSecrets * Add doc and example value for imagePullSecrets * simplify syntax for imagePullSecrets Co-authored-by: Joe Previte --- ci/helm-chart/templates/deployment.yaml | 1 + ci/helm-chart/values.yaml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ci/helm-chart/templates/deployment.yaml b/ci/helm-chart/templates/deployment.yaml index 3f0d11d5c600..f137a9d2a8b6 100644 --- a/ci/helm-chart/templates/deployment.yaml +++ b/ci/helm-chart/templates/deployment.yaml @@ -21,6 +21,7 @@ spec: app.kubernetes.io/name: {{ include "code-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} {{- if .Values.hostnameOverride }} hostname: {{ .Values.hostnameOverride }} {{- end }} diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index 19c6a5eaef49..f37771999fe2 100644 --- a/ci/helm-chart/values.yaml +++ b/ci/helm-chart/values.yaml @@ -9,7 +9,12 @@ image: tag: '4.0.2' pullPolicy: Always +# Specifies one or more secrets to be used when pulling images from a +# private container repository +# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry imagePullSecrets: [] +# - name: registry-creds + nameOverride: "" fullnameOverride: "" hostnameOverride: "" From 36eae3b9f22dd2a49ac4f148d6f1507d37e18dfe Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Mon, 14 Feb 2022 18:23:20 -0600 Subject: [PATCH 012/760] fix: Slack community link (#4864) resolves #4843 Co-authored-by: Joe Previte --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 2ee9f42f7796..f02649af76c6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # code-server -[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs) +[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs) Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. From 8fc4832722890ffb71ef74273e464bd9f9955cec Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 15 Feb 2022 13:40:53 -0700 Subject: [PATCH 013/760] chore: update follow-redirects resolution (#4868) * chore: update follow-redirects resolution * chore: update vm2 resolution --- package.json | 4 ++-- yarn.lock | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 37fb629c7fe8..9f7558bcbd0c 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "vfile-message": "^2.0.2", "tar": "^6.1.9", "path-parse": "^1.0.7", - "vm2": "^3.9.4", - "follow-redirects": "^1.14.7", + "vm2": "^3.9.6", + "follow-redirects": "^1.14.8", "node-fetch": "^2.6.7", "nanoid": "^3.1.31" }, diff --git a/yarn.lock b/yarn.lock index 49869f2fc530..b025e7d24b51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -603,11 +603,21 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== +acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + agent-base@6, agent-base@^6.0.0, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -1879,10 +1889,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== -follow-redirects@^1.0.0, follow-redirects@^1.14.7: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== +follow-redirects@^1.0.0, follow-redirects@^1.14.8: + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== format@^0.2.0: version "0.2.2" @@ -4529,10 +4539,13 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -vm2@^3.9.3, vm2@^3.9.4: - version "3.9.5" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.5.tgz#5288044860b4bbace443101fcd3bddb2a0aa2496" - integrity sha512-LuCAHZN75H9tdrAiLFf030oW7nJV5xwNMuk1ymOZwopmuK3d2H4L1Kv4+GFHgarKiLfXXLFU+7LDABHnwOkWng== +vm2@^3.9.3, vm2@^3.9.6: + version "3.9.7" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.7.tgz#bb87aa677c97c61e23a6cb6547e44e990517a6f6" + integrity sha512-g/GZ7V0Mlmch3eDVOATvAXr1GsJNg6kQ5PjvYy3HbJMCRn5slNbo/u73Uy7r5yUej1cRa3ZjtoVwcWSQuQ/fow== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" webidl-conversions@^3.0.0: version "3.0.1" From b26cce589f10a67b7b59a30e3725cf13bcde5d9c Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 15 Feb 2022 14:15:53 -0700 Subject: [PATCH 014/760] chore: update vscode commit (#4857) * chore: update vscode commit This includes two fixes from coder/vscode: - https://github.com/coder/vscode/pull/43 - https://github.com/coder/vscode/pull/42 * fix: use double-bracket in ext. e2e test --- test/e2e/extensions.test.ts | 2 +- vendor/package.json | 2 +- vendor/yarn.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/extensions.test.ts b/test/e2e/extensions.test.ts index f83e8e031692..f458ac29d4f9 100644 --- a/test/e2e/extensions.test.ts +++ b/test/e2e/extensions.test.ts @@ -7,6 +7,6 @@ describe("Extensions", true, () => { await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI") - await codeServerPage.page.waitForSelector(`text=${address}/proxy/{port}`) + await codeServerPage.page.waitForSelector(`text=${address}/proxy/{{port}}`) }) }) diff --git a/vendor/package.json b/vendor/package.json index fb8d1302fae2..c1414d98ffbc 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892" + "code-oss-dev": "coder/vscode#96e241330d9c44b64897c1e5031e00aa894103db" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index 0a5687da4ac5..98921a1b6c47 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#d4f09b4df0d23ead4389b4a69c6fad86ac358892: +code-oss-dev@coder/vscode#96e241330d9c44b64897c1e5031e00aa894103db: version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/d4f09b4df0d23ead4389b4a69c6fad86ac358892" + resolved "https://codeload.github.com/coder/vscode/tar.gz/96e241330d9c44b64897c1e5031e00aa894103db" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From e3e9f052c48c85a2b562ae0d5de57d09ae8f1d35 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 15 Feb 2022 14:51:42 -0700 Subject: [PATCH 015/760] fix: wrap socket in proxy before passing to vscode (#4840) * chore: add ipc hook to e2e script * refactor: allow codeServerArgs in e2e tests * feat: add --cert e2e extension test * fix: wrap websocket in proxy * fixup: remvoe ignoreHTTPSErrors * fixup: make codeServerArgs readonly * fixup! add back ignoreHTTPSErrors --- package.json | 2 +- src/node/routes/vscode.ts | 8 ++++++-- test/e2e/baseFixture.ts | 12 ++++++++++-- test/e2e/codeServer.test.ts | 2 +- test/e2e/extensions.test.ts | 10 +++++++++- test/e2e/globalSetup.test.ts | 2 +- test/e2e/login.test.ts | 2 +- test/e2e/logout.test.ts | 2 +- test/e2e/models/CodeServer.ts | 3 ++- test/e2e/openHelpAbout.test.ts | 2 +- test/e2e/terminal.test.ts | 2 +- 11 files changed, 34 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 9f7558bcbd0c..cd01d123ae95 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "release:github-draft": "./ci/build/release-github-draft.sh", "release:github-assets": "./ci/build/release-github-assets.sh", "release:prep": "./ci/build/release-prep.sh", - "test:e2e": "./ci/dev/test-e2e.sh", + "test:e2e": "VSCODE_IPC_HOOK_CLI= ./ci/dev/test-e2e.sh", "test:standalone-release": "./ci/build/test-standalone-release.sh", "test:unit": "./ci/dev/test-unit.sh --forceExit --detectOpenHandles", "test:scripts": "./ci/dev/test-scripts.sh", diff --git a/src/node/routes/vscode.ts b/src/node/routes/vscode.ts index 4b1d16a4eb5e..fe9c441813b9 100644 --- a/src/node/routes/vscode.ts +++ b/src/node/routes/vscode.ts @@ -5,6 +5,7 @@ import { logError } from "../../common/util" import { toVsCodeArgs } from "../cli" import { isDevMode } from "../constants" import { authenticated, ensureAuthenticated, redirect, self } from "../http" +import { SocketProxyProvider } from "../socket" import { loadAMDModule } from "../util" import { Router as WsRouter } from "../wsRouter" import { errorHandler } from "./errors" @@ -13,6 +14,7 @@ export class CodeServerRouteWrapper { /** Assigned in `ensureCodeServerLoaded` */ private _codeServerMain!: CodeServerLib.IServerAPI private _wsRouterWrapper = WsRouter() + private _socketProxyProvider = new SocketProxyProvider() public router = express.Router() public get wsRouter() { @@ -77,9 +79,10 @@ export class CodeServerRouteWrapper { } private $proxyWebsocket = async (req: WebsocketRequest) => { - this._codeServerMain.handleUpgrade(req, req.socket) + const wrappedSocket = await this._socketProxyProvider.createProxy(req.ws) + this._codeServerMain.handleUpgrade(req, wrappedSocket) - req.socket.resume() + req.ws.resume() } //#endregion @@ -130,5 +133,6 @@ export class CodeServerRouteWrapper { dispose() { this._codeServerMain?.dispose() + this._socketProxyProvider.stop() } } diff --git a/test/e2e/baseFixture.ts b/test/e2e/baseFixture.ts index a18722ed4bca..5cf0dd6a4c7f 100644 --- a/test/e2e/baseFixture.ts +++ b/test/e2e/baseFixture.ts @@ -9,10 +9,15 @@ import { CodeServer, CodeServerPage } from "./models/CodeServer" * * If `includeCredentials` is `true` page requests will be authenticated. */ -export const describe = (name: string, includeCredentials: boolean, fn: (codeServer: CodeServer) => void) => { +export const describe = ( + name: string, + includeCredentials: boolean, + codeServerArgs: string[], + fn: (codeServer: CodeServer) => void, +) => { test.describe(name, () => { // This will spawn on demand so nothing is necessary on before. - const codeServer = new CodeServer(name) + const codeServer = new CodeServer(name, codeServerArgs) // Kill code-server after the suite has ended. This may happen even without // doing it explicitly but it seems prudent to be sure. @@ -36,6 +41,9 @@ export const describe = (name: string, includeCredentials: boolean, fn: (codeSer authenticated: includeCredentials, // This provides a cookie that authenticates with code-server. storageState: includeCredentials ? storageState : {}, + // NOTE@jsjoeio some tests use --cert which uses a self-signed certificate + // without this option, those tests will fail. + ignoreHTTPSErrors: true, }) fn(codeServer) diff --git a/test/e2e/codeServer.test.ts b/test/e2e/codeServer.test.ts index cfac6f74ceac..06eaaea0d8b9 100644 --- a/test/e2e/codeServer.test.ts +++ b/test/e2e/codeServer.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from "./baseFixture" -describe("CodeServer", true, () => { +describe("CodeServer", true, [], () => { test("should navigate to home page", async ({ codeServerPage }) => { // We navigate codeServer before each test // and we start the test with a storage state diff --git a/test/e2e/extensions.test.ts b/test/e2e/extensions.test.ts index f458ac29d4f9..3fbf3eaea839 100644 --- a/test/e2e/extensions.test.ts +++ b/test/e2e/extensions.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "./baseFixture" -describe("Extensions", true, () => { +function runTestExtensionTests() { // 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() @@ -9,4 +9,12 @@ describe("Extensions", true, () => { await codeServerPage.page.waitForSelector(`text=${address}/proxy/{{port}}`) }) +} + +describe("Extensions", true, [], () => { + runTestExtensionTests() +}) + +describe("Extensions with --cert", true, ["--cert"], () => { + runTestExtensionTests() }) diff --git a/test/e2e/globalSetup.test.ts b/test/e2e/globalSetup.test.ts index 8b4589b15349..554eb945f2f5 100644 --- a/test/e2e/globalSetup.test.ts +++ b/test/e2e/globalSetup.test.ts @@ -2,7 +2,7 @@ import { describe, test, expect } from "./baseFixture" // This test is to make sure the globalSetup works as expected // meaning globalSetup ran and stored the storageState -describe("globalSetup", true, () => { +describe("globalSetup", true, [], () => { test("should keep us logged in using the storageState", async ({ codeServerPage }) => { // Make sure the editor actually loaded expect(await codeServerPage.isEditorVisible()).toBe(true) diff --git a/test/e2e/login.test.ts b/test/e2e/login.test.ts index bc9d5e8e9df3..3462286f4577 100644 --- a/test/e2e/login.test.ts +++ b/test/e2e/login.test.ts @@ -1,7 +1,7 @@ import { PASSWORD } from "../utils/constants" import { describe, test, expect } from "./baseFixture" -describe("login", false, () => { +describe("login", false, [], () => { test("should see the login page", async ({ codeServerPage }) => { // It should send us to the login page expect(await codeServerPage.page.title()).toBe("code-server login") diff --git a/test/e2e/logout.test.ts b/test/e2e/logout.test.ts index 70c26160c712..b9c71a4466e8 100644 --- a/test/e2e/logout.test.ts +++ b/test/e2e/logout.test.ts @@ -1,7 +1,7 @@ // NOTE@jsjoeio commenting out until we can figure out what's wrong // import { describe, test, expect } from "./baseFixture" -// describe("logout", true, () => { +// describe("logout", true, [], () => { // test("should be able logout", async ({ codeServerPage }) => { // // Recommended by Playwright for async navigation // // https://github.com/microsoft/playwright/issues/1987#issuecomment-620182151 diff --git a/test/e2e/models/CodeServer.ts b/test/e2e/models/CodeServer.ts index 7ae8f5b76b00..62d0218e3a53 100644 --- a/test/e2e/models/CodeServer.ts +++ b/test/e2e/models/CodeServer.ts @@ -31,7 +31,7 @@ export class CodeServer { public readonly logger: Logger private closed = false - constructor(name: string) { + constructor(name: string, private readonly codeServerArgs: string[]) { this.logger = logger.named(name) } @@ -78,6 +78,7 @@ export class CodeServer { "node", [ process.env.CODE_SERVER_TEST_ENTRY || ".", + ...this.codeServerArgs, // Using port zero will spawn on a random port. "--bind-addr", "127.0.0.1:0", diff --git a/test/e2e/openHelpAbout.test.ts b/test/e2e/openHelpAbout.test.ts index 3caa10c0c214..0b7ed9fea540 100644 --- a/test/e2e/openHelpAbout.test.ts +++ b/test/e2e/openHelpAbout.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from "./baseFixture" -describe("Open Help > About", true, () => { +describe("Open Help > About", true, [], () => { test("should see code-server version in about dialog", async ({ codeServerPage }) => { // Open using the menu. await codeServerPage.navigateMenus(["Help", "About"]) diff --git a/test/e2e/terminal.test.ts b/test/e2e/terminal.test.ts index b5b2d90c9b48..90ea880a4782 100644 --- a/test/e2e/terminal.test.ts +++ b/test/e2e/terminal.test.ts @@ -4,7 +4,7 @@ import util from "util" import { clean, tmpdir } from "../utils/helpers" import { describe, expect, test } from "./baseFixture" -describe("Integrated Terminal", true, () => { +describe("Integrated Terminal", true, [], () => { const testName = "integrated-terminal" test.beforeAll(async () => { await clean(testName) From 94f378c1960a2b8df4da70fb900f6cfec0191982 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 15 Feb 2022 16:19:22 -0700 Subject: [PATCH 016/760] feat(testing): add test for `parse` when error in args + config (#4866) * chore: fmt cleanup * feat(parse): add test error w/config --- test/unit/node/cli.test.ts | 10 ++++++++++ test/unit/node/update.test.ts | 18 +++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index a4cffb9a6bca..57d19317ded4 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -361,6 +361,16 @@ describe("parser", () => { "$argon2i$v=19$m=4096,t=3,p=1$0qr/o+0t00hsbjfqcksfdq$ofcm4rl6o+b7oxpua4qlxubypbbpsf+8l531u7p9hyy", }) }) + it("should throw an error for invalid config values", async () => { + const fakePath = "/fake-config-path" + const expectedErrMsg = `error reading ${fakePath}: ` + + expect(() => + parse(["--foo"], { + configFile: fakePath, + }), + ).toThrowError(expectedErrMsg) + }) }) describe("cli", () => { diff --git a/test/unit/node/update.test.ts b/test/unit/node/update.test.ts index b900d8ae7c0d..d2f62531a73c 100644 --- a/test/unit/node/update.test.ts +++ b/test/unit/node/update.test.ts @@ -1,5 +1,5 @@ -import * as http from "http" import { logger } from "@coder/logger" +import * as http from "http" import { AddressInfo } from "net" import * as path from "path" import { SettingsProvider, UpdateSettings } from "../../../src/node/settings" @@ -218,8 +218,8 @@ describe("update", () => { it("should reject if response has status code 500", async () => { if (isAddressInfo(_address)) { const mockURL = `http://${_address.address}:${_address.port}/reject-status-code` - let provider = new UpdateProvider(mockURL, settings()) - let update = await provider.getUpdate(true) + const provider = new UpdateProvider(mockURL, settings()) + const update = await provider.getUpdate(true) expect(update.version).toBe("unknown") expect(logger.error).toHaveBeenCalled() @@ -233,8 +233,8 @@ describe("update", () => { it("should reject if no location header provided", async () => { if (isAddressInfo(_address)) { const mockURL = `http://${_address.address}:${_address.port}/no-location-header` - let provider = new UpdateProvider(mockURL, settings()) - let update = await provider.getUpdate(true) + const provider = new UpdateProvider(mockURL, settings()) + const update = await provider.getUpdate(true) expect(update.version).toBe("unknown") expect(logger.error).toHaveBeenCalled() @@ -249,8 +249,8 @@ describe("update", () => { version = "4.1.1" if (isAddressInfo(_address)) { const mockURL = `http://${_address.address}:${_address.port}/with-location-header` - let provider = new UpdateProvider(mockURL, settings()) - let update = await provider.getUpdate(true) + const provider = new UpdateProvider(mockURL, settings()) + const update = await provider.getUpdate(true) expect(logger.error).not.toHaveBeenCalled() expect(update.version).toBe("4.1.1") @@ -260,8 +260,8 @@ describe("update", () => { it("should reject if more than 10 redirects", async () => { if (isAddressInfo(_address)) { const mockURL = `http://${_address.address}:${_address.port}/redirect/11` - let provider = new UpdateProvider(mockURL, settings()) - let update = await provider.getUpdate(true) + const provider = new UpdateProvider(mockURL, settings()) + const update = await provider.getUpdate(true) expect(update.version).toBe("unknown") expect(logger.error).toHaveBeenCalled() From 01a0e95174accaa786991306bf2a370f302b36a5 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 17 Feb 2022 15:18:17 -0700 Subject: [PATCH 017/760] docs: update sync vscode instructions (#4879) * docs: update sync vscode instructions * fixup! * fixup: formatting --- docs/MAINTAINING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index 5f02c260c742..8bec1e9c4d7f 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -220,9 +220,10 @@ This is currently automated with the release process. The VS Code portion of code-server lives under [`coder/vscode`](https://github.com/coder/vscode). To update VS Code for code-server, follow these steps: 1. `git checkout -b vscode-update` - Create a new branch locally based off `main` -2. `git fetch upstream` - Fetch upstream (VS Code)'s latest `main` branch -3. `git merge upstream/main` - Merge it locally - 1. If there are merge conflicts, fix them locally +2. `git fetch upstream` - Fetch upstream (VS Code)'s latest branches +3. `git merge upstream/release/1.64` - Merge it locally + 1. replace `1.64` with the version you're upgrading to + 1. If there are merge conflicts, commit first, then fix them locally. 4. Open a PR merging your branch (`vscode-update`) into `main` and add the code-server review team Ideally, our fork stays as close to upstream as possible. See the differences between our fork and upstream [here](https://github.com/microsoft/vscode/compare/main...coder:main). From d7c1894fb4ceebbc6ff6f69b854d4623c97bc485 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 18 Feb 2022 10:06:58 -0800 Subject: [PATCH 018/760] Update requirements.md (#4882) Grammar/typo correction. Co-authored-by: Joe Previte --- docs/requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.md b/docs/requirements.md index 128e18fd6b88..363b67623ca5 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -33,7 +33,7 @@ new Compute Engine VM instance: 4. Choose the **region** that's closest to you based on [GCP ping](https://gcping.com/). 5. Choose a **zone** (any option is fine). -6. We recommend choose an **E2 series instance** from the [general-purpose +6. We recommend choosing an **E2 series instance** from the [general-purpose family](https://cloud.google.com/compute/docs/machine-types#general_purpose). 7. Change the instance type to **custom** and set at least **2 cores** and **2 GB of RAM**. You can add more resources if desired, though you can also edit From 23734d356a82e9b78530bd043398d7e95ee2e614 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 22 Feb 2022 10:13:20 -0700 Subject: [PATCH 019/760] fix: skip docs/npm workflows on forks (#4875) Co-authored-by: Asher --- .github/workflows/ci.yaml | 3 +++ .github/workflows/docs-preview.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d8af65da133f..8889b79603a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -184,6 +184,9 @@ jobs: # This environment "npm" requires someone from # coder/code-server-reviewers to approve the PR before this job runs. environment: npm + # Only run if PR comes from base repo + # Reason: forks cannot access secrets and this will always fail + if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index 21451e5f5979..b4b36baa48ec 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -22,6 +22,9 @@ jobs: name: Docs preview runs-on: ubuntu-20.04 environment: CI + # Only run if PR comes from base repo + # Reason: forks cannot access secrets and this will always fail + if: github.event.pull_request.head.repo.full_name == github.repository steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 From f9402a63180741e8f85271181568004015f950fc Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 22 Feb 2022 12:43:13 -0600 Subject: [PATCH 020/760] fix: state collision (#4881) * Add helper for navigating the quick picker This has problems similar to the menu except instead of closing it gets re-created which interrupts the hover call and causes the test to fail. Now it will keep trying just like the menu. * Add a test for opening a file * Add test for colliding state * Update VS Code This contains the colliding state fix. --- test/e2e/codeServer.test.ts | 30 ++++++ test/e2e/models/CodeServer.ts | 191 ++++++++++++++++++++++++++-------- vendor/package.json | 2 +- vendor/yarn.lock | 4 +- 4 files changed, 183 insertions(+), 44 deletions(-) diff --git a/test/e2e/codeServer.test.ts b/test/e2e/codeServer.test.ts index 06eaaea0d8b9..1f712f913a0e 100644 --- a/test/e2e/codeServer.test.ts +++ b/test/e2e/codeServer.test.ts @@ -1,3 +1,5 @@ +import { promises as fs } from "fs" +import * as path from "path" import { describe, test, expect } from "./baseFixture" describe("CodeServer", true, [], () => { @@ -24,4 +26,32 @@ describe("CodeServer", true, [], () => { await codeServerPage.focusTerminal() expect(await codeServerPage.page.isVisible("#terminal")).toBe(true) }) + + test("should open a file", async ({ codeServerPage }) => { + const dir = await codeServerPage.workspaceDir + const file = path.join(dir, "foo") + await fs.writeFile(file, "bar") + await codeServerPage.openFile(file) + }) + + test("should not share state with other paths", async ({ codeServerPage }) => { + const dir = await codeServerPage.workspaceDir + const file = path.join(dir, "foo") + await fs.writeFile(file, "bar") + + await codeServerPage.openFile(file) + + // If we reload now VS Code will be unable to save the state changes so wait + // until those have been written to the database. It flushes every five + // seconds so we need to wait at least that long. + await codeServerPage.page.waitForTimeout(5500) + + // The tab should re-open on refresh. + await codeServerPage.page.reload() + await codeServerPage.waitForTab(file) + + // The tab should not re-open on a different path. + await codeServerPage.setup(true, "/vscode") + expect(await codeServerPage.tabIsVisible(file)).toBe(false) + }) }) diff --git a/test/e2e/models/CodeServer.ts b/test/e2e/models/CodeServer.ts index 62d0218e3a53..e8fff0716300 100644 --- a/test/e2e/models/CodeServer.ts +++ b/test/e2e/models/CodeServer.ts @@ -3,7 +3,7 @@ import * as cp from "child_process" import { promises as fs } from "fs" import * as path from "path" import { Page } from "playwright" -import { logError } from "../../../src/common/util" +import { logError, plural } from "../../../src/common/util" import { onLine } from "../../../src/node/util" import { PASSWORD, workspaceDir } from "../../utils/constants" import { idleTimer, tmpdir } from "../../utils/helpers" @@ -13,14 +13,21 @@ interface CodeServerProcess { address: string } -class CancelToken { +class Context { private _canceled = false + private _done = false public canceled(): boolean { return this._canceled } + public done(): void { + this._done = true + } public cancel(): void { this._canceled = true } + public finish(): boolean { + return this._done + } } /** @@ -30,6 +37,7 @@ export class CodeServer { private process: Promise | undefined public readonly logger: Logger private closed = false + private _workspaceDir: Promise | undefined constructor(name: string, private readonly codeServerArgs: string[]) { this.logger = logger.named(name) @@ -47,11 +55,21 @@ export class CodeServer { return address } + /** + * The workspace directory code-server opens with. + */ + get workspaceDir(): Promise { + if (!this._workspaceDir) { + this._workspaceDir = tmpdir(workspaceDir) + } + return this._workspaceDir + } + /** * Create a random workspace and seed it with settings. */ private async createWorkspace(): Promise { - const dir = await tmpdir(workspaceDir) + const dir = await this.workspaceDir await fs.mkdir(path.join(dir, "User")) await fs.writeFile( path.join(dir, "User/settings.json"), @@ -184,11 +202,18 @@ export class CodeServerPage { } /** - * Navigate to code-server. + * The workspace directory code-server opens with. + */ + get workspaceDir() { + return this.codeServer.workspaceDir + } + + /** + * Navigate to a code-server endpoint. By default go to the root. */ - async navigate() { - const address = await this.codeServer.address() - await this.page.goto(address, { waitUntil: "networkidle" }) + async navigate(endpoint = "/") { + const to = new URL(endpoint, await this.codeServer.address()) + await this.page.goto(to.toString(), { waitUntil: "networkidle" }) } /** @@ -273,6 +298,29 @@ export class CodeServerPage { await this.page.waitForSelector("textarea.xterm-helper-textarea") } + /** + * Open a file by using menus. + */ + async openFile(file: string) { + await this.navigateMenus(["File", "Open File"]) + await this.navigateQuickInput([path.basename(file)]) + await this.waitForTab(file) + } + + /** + * Wait for a tab to open for the specified file. + */ + async waitForTab(file: string): Promise { + return this.page.waitForSelector(`.tab :text("${path.basename(file)}")`) + } + + /** + * See if the specified tab is open. + */ + async tabIsVisible(file: string): Promise { + return this.page.isVisible(`.tab :text("${path.basename(file)}")`) + } + /** * Navigate to the command palette via menus then execute a command by typing * it then clicking the match from the results. @@ -287,13 +335,45 @@ export class CodeServerPage { } /** - * Navigate through the specified set of menus. If it fails it will keep - * trying. + * Navigate through the items in the selector. `open` is a function that will + * open the menu/popup containing the items through which to navigation. */ - async navigateMenus(menus: string[]) { - const navigate = async (cancelToken: CancelToken) => { - const steps: Array<() => Promise> = [() => this.page.waitForSelector(`${menuSelector}:focus-within`)] - for (const menu of menus) { + async navigateItems(items: string[], selector: string, open?: (selector: string) => void): Promise { + const logger = this.codeServer.logger.named(selector) + + /** + * If the selector loses focus or gets removed this will resolve with false, + * signaling we need to try again. + */ + const openThenWaitClose = async (ctx: Context) => { + if (open) { + await open(selector) + } + this.codeServer.logger.debug(`watching ${selector}`) + try { + await this.page.waitForSelector(`${selector}:not(:focus-within)`) + } catch (error) { + if (!ctx.done()) { + this.codeServer.logger.debug(`${selector} navigation: ${error.message || error}`) + } + } + return false + } + + /** + * This will step through each item, aborting and returning false if + * canceled or if any navigation step has an error which signals we need to + * try again. + */ + const navigate = async (ctx: Context) => { + const steps: Array<{ fn: () => Promise; name: string }> = [ + { + fn: () => this.page.waitForSelector(`${selector}:focus-within`), + name: "focus", + }, + ] + + for (const item of items) { // Normally these will wait for the item to be visible and then execute // the action. The problem is that if the menu closes these will still // be waiting and continue to execute once the menu is visible again, @@ -301,43 +381,72 @@ export class CodeServerPage { // if the old promise clicks logout before the new one can). By // splitting them into two steps each we can cancel before running the // action. - steps.push(() => this.page.hover(`text=${menu}`, { trial: true })) - steps.push(() => this.page.hover(`text=${menu}`, { force: true })) - steps.push(() => this.page.click(`text=${menu}`, { trial: true })) - steps.push(() => this.page.click(`text=${menu}`, { force: true })) + steps.push({ + fn: () => this.page.hover(`${selector} :text("${item}")`, { trial: true }), + name: `${item}:hover:trial`, + }) + steps.push({ + fn: () => this.page.hover(`${selector} :text("${item}")`, { force: true }), + name: `${item}:hover:force`, + }) + steps.push({ + fn: () => this.page.click(`${selector} :text("${item}")`, { trial: true }), + name: `${item}:click:trial`, + }) + steps.push({ + fn: () => this.page.click(`${selector} :text("${item}")`, { force: true }), + name: `${item}:click:force`, + }) } + for (const step of steps) { - await step() - if (cancelToken.canceled()) { - this.codeServer.logger.debug("menu navigation canceled") + try { + logger.debug(`navigation step: ${step.name}`) + await step.fn() + if (ctx.canceled()) { + logger.debug("navigation canceled") + return false + } + } catch (error) { + logger.debug(`navigation: ${error.message || error}`) return false } } return true } - const menuSelector = '[aria-label="Application Menu"]' - const open = async () => { - await this.page.click(menuSelector) - await this.page.waitForSelector(`${menuSelector}:not(:focus-within)`) - return false + // We are seeing the menu closing after opening if we open it too soon and + // the picker getting recreated in the middle of trying to select an item. + // To counter this we will keep trying to navigate through the items every + // time we lose focus or there is an error. + let attempts = 1 + let context = new Context() + while (!(await Promise.race([openThenWaitClose(), navigate(context)]))) { + ++attempts + logger.debug("closed, retrying (${attempt}/∞)") + context.cancel() + context = new Context() } - // TODO: Starting in 1.57 something closes the menu after opening it if we - // open it too soon. To counter that we'll watch for when the menu loses - // focus and when/if it does we'll try again. - // I tried using the classic menu but it doesn't show up at all for some - // reason. I also tried toggle but the menu disappears after toggling. - let retryCount = 0 - let cancelToken = new CancelToken() - while (!(await Promise.race([open(), navigate(cancelToken)]))) { - this.codeServer.logger.debug("menu was closed, retrying") - ++retryCount - cancelToken.cancel() - cancelToken = new CancelToken() - } + context.finish() + logger.debug(`navigation took ${attempts} ${plural(attempts, "attempt")}`) + } + + /** + * Navigate through a currently opened "quick input" widget, retrying on + * failure. + */ + async navigateQuickInput(items: string[]): Promise { + await this.navigateItems(items, ".quick-input-widget") + } - this.codeServer.logger.debug(`menu navigation retries: ${retryCount}`) + /** + * Navigate through the menu, retrying on failure. + */ + async navigateMenus(menus: string[]): Promise { + await this.navigateItems(menus, '[aria-label="Application Menu"]', async (selector) => { + await this.page.click(selector) + }) } /** @@ -345,8 +454,8 @@ export class CodeServerPage { * * It is recommended to run setup before using this model in any tests. */ - async setup(authenticated: boolean) { - await this.navigate() + async setup(authenticated: boolean, endpoint = "/") { + await this.navigate(endpoint) // If we aren't authenticated we'll see a login page so we can't wait until // the editor is ready. if (authenticated) { diff --git a/vendor/package.json b/vendor/package.json index c1414d98ffbc..cb8e1098bae4 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#96e241330d9c44b64897c1e5031e00aa894103db" + "code-oss-dev": "coder/vscode#6337ee490d16b7dfd8854d22c998f58d6cd21ef5" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index 98921a1b6c47..7ad95d8805cd 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#96e241330d9c44b64897c1e5031e00aa894103db: +code-oss-dev@coder/vscode#6337ee490d16b7dfd8854d22c998f58d6cd21ef5: version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/96e241330d9c44b64897c1e5031e00aa894103db" + resolved "https://codeload.github.com/coder/vscode/tar.gz/6337ee490d16b7dfd8854d22c998f58d6cd21ef5" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From 793e4d35ec038321c06bac8d6a5d18073e70c6e8 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 24 Feb 2022 11:07:42 -0700 Subject: [PATCH 021/760] feat(testing): add new test for cli.ts (#4898) * feat(testing): add new test for cli.ts * fixup!: update parse test --- test/unit/node/cli.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index 57d19317ded4..e8e2c85b2947 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -371,6 +371,9 @@ describe("parser", () => { }), ).toThrowError(expectedErrMsg) }) + it("should ignore optional strings set to false", async () => { + expect(parse(["--cert=false"])).toEqual({}) + }) }) describe("cli", () => { From 769aceacc3cad406a98618824f39da983ff85121 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 09:09:09 -0700 Subject: [PATCH 022/760] chore(deps): update actions/setup-node action to v3 (#4908) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 14 +++++++------- .github/workflows/docs-preview.yaml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8889b79603a9..867426d9e02c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -66,7 +66,7 @@ jobs: uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -100,7 +100,7 @@ jobs: fetch-depth: 0 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -221,7 +221,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -310,7 +310,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -359,7 +359,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" @@ -404,7 +404,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Node.js v14 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "14" diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index b4b36baa48ec..6eb4fcaef509 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -39,7 +39,7 @@ jobs: fetch-depth: 0 - name: Install Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 14 From a989e0c3879e5a7cd52011a4de929e4d1e3faad3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:53:58 -0700 Subject: [PATCH 023/760] chore(deps): update aquasecurity/trivy-action commit hash to 2962126 (#4907) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 867426d9e02c..9f3bb7d53bb4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -458,7 +458,7 @@ jobs: uses: actions/checkout@v2 - name: Run Trivy vulnerability scanner in repo mode #Commit SHA for v0.0.17 - uses: aquasecurity/trivy-action@a7a829a4345428ddd92ca57b18257440f6a18c90 + uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18 with: scan-type: "fs" scan-ref: "." From 44d74c170f4891da669b2dfef75cf1ad4118483d Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Mon, 28 Feb 2022 13:55:47 -0800 Subject: [PATCH 024/760] feat: add version string functions to constants (#4920) Introduce helper functions for getting human- and machine-readable version strings from the constants package, and cover it in unit tests. This is a first step to resolving #4874. --- src/node/constants.ts | 22 +++++++++++ test/unit/node/constants.test.ts | 64 ++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/src/node/constants.ts b/src/node/constants.ts index 4e46849fc3dc..b3c84048cc38 100644 --- a/src/node/constants.ts +++ b/src/node/constants.ts @@ -17,13 +17,35 @@ export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJso } const pkg = getPackageJson("../../package.json") +const codePkg = getPackageJson("../../vendor/modules/code-oss-dev/package.json") export const pkgName = pkg.name || "code-server" export const version = pkg.version || "development" export const commit = pkg.commit || "development" export const rootPath = path.resolve(__dirname, "../..") export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev") +export const codeVersion = codePkg.version || "development" 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 + +/** + * getVersionString returns a human-readable version string suitable + * for outputting to the console. + */ +export function getVersionString(): string { + return [version, commit].join(" ") +} + +/** + * getVersionJsonString returns a machine-readable version string + * suitable for outputting to the console. + */ +export function getVersionJsonString(): string { + return JSON.stringify({ + codeServer: version, + commit, + vscode: codeVersion, + }) +} diff --git a/test/unit/node/constants.test.ts b/test/unit/node/constants.test.ts index 34156dc94aec..70192d70ca50 100644 --- a/test/unit/node/constants.test.ts +++ b/test/unit/node/constants.test.ts @@ -1,5 +1,6 @@ import { logger } from "@coder/logger" import { mockLogger } from "../../utils/helpers" +import * as semver from "semver" describe("constants", () => { let constants: typeof import("../../../src/node/constants") @@ -13,9 +14,15 @@ describe("constants", () => { commit: "f6b2be2838f4afb217c2fd8f03eafedd8d55ef9b", } + const mockCodePackageJson = { + name: "mock-code-oss-dev", + version: "1.2.3", + } + beforeAll(() => { mockLogger() jest.mock("../../../package.json", () => mockPackageJson, { virtual: true }) + jest.mock("../../../vendor/modules/code-oss-dev/package.json", () => mockCodePackageJson, { virtual: true }) constants = require("../../../src/node/constants") }) @@ -24,12 +31,46 @@ describe("constants", () => { jest.resetModules() }) + it("should provide the package name", () => { + expect(constants.pkgName).toBe(mockPackageJson.name) + }) + it("should provide the commit", () => { expect(constants.commit).toBe(mockPackageJson.commit) }) it("should return the package.json version", () => { expect(constants.version).toBe(mockPackageJson.version) + + // Ensure the version is parseable as semver and equal + const actual = semver.parse(constants.version) + const expected = semver.parse(mockPackageJson.version) + expect(actual).toBeTruthy() + expect(actual).toStrictEqual(expected) + }) + + it("should include embedded Code version information", () => { + expect(constants.codeVersion).toBe(mockCodePackageJson.version) + + // Ensure the version is parseable as semver and equal + const actual = semver.parse(constants.codeVersion) + const expected = semver.parse(mockCodePackageJson.version) + expect(actual).toBeTruthy() + expect(actual).toStrictEqual(expected) + }) + + it("should return a human-readable version string", () => { + expect(constants.getVersionString()).toStrictEqual(`${mockPackageJson.version} ${mockPackageJson.commit}`) + }) + + it("should return a machine-readable version string", () => { + expect(constants.getVersionJsonString()).toStrictEqual( + JSON.stringify({ + codeServer: mockPackageJson.version, + commit: mockPackageJson.commit, + vscode: mockCodePackageJson.version, + }), + ) }) describe("getPackageJson", () => { @@ -47,6 +88,9 @@ describe("constants", () => { // so to get the root package.json we need to use ../../ const packageJson = constants.getPackageJson("../../package.json") expect(packageJson).toStrictEqual(mockPackageJson) + + const codePackageJson = constants.getPackageJson("../../vendor/modules/code-oss-dev/package.json") + expect(codePackageJson).toStrictEqual(mockCodePackageJson) }) }) }) @@ -55,9 +99,13 @@ describe("constants", () => { const mockPackageJson = { name: "mock-code-server", } + const mockCodePackageJson = { + name: "mock-code-oss-dev", + } beforeAll(() => { jest.mock("../../../package.json", () => mockPackageJson, { virtual: true }) + jest.mock("../../../vendor/modules/code-oss-dev/package.json", () => mockCodePackageJson, { virtual: true }) constants = require("../../../src/node/constants") }) @@ -69,8 +117,24 @@ describe("constants", () => { it("version should return 'development'", () => { expect(constants.version).toBe("development") }) + it("commit should return 'development'", () => { expect(constants.commit).toBe("development") }) + + it("should return a human-readable version string", () => { + // this string is not super useful + expect(constants.getVersionString()).toStrictEqual("development development") + }) + + it("should return a machine-readable version string", () => { + expect(constants.getVersionJsonString()).toStrictEqual( + JSON.stringify({ + codeServer: "development", + commit: "development", + vscode: "development", + }), + ) + }) }) }) From b3cf4c32ffc431d1f7c1c63178ca11ffc74aaa3e Mon Sep 17 00:00:00 2001 From: Edouard Vincent Date: Tue, 1 Mar 2022 07:43:41 -0800 Subject: [PATCH 025/760] style: cookie doman => cookie domain (#4919) Co-authored-by: Joe Previte --- src/node/http.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/http.ts b/src/node/http.ts index dbd72d84eae8..f006036d3924 100644 --- a/src/node/http.ts +++ b/src/node/http.ts @@ -196,7 +196,7 @@ export const getCookieDomain = (host: string, proxyDomains: string[]): string | // default NGINX does this). !host.includes(".") ) { - logger.debug("no valid cookie doman", field("host", host)) + logger.debug("no valid cookie domain", field("host", host)) return undefined } @@ -206,7 +206,7 @@ export const getCookieDomain = (host: string, proxyDomains: string[]): string | } }) - logger.debug("got cookie doman", field("host", host)) + logger.debug("got cookie domain", field("host", host)) return host || undefined } From 1465d8d51071c89aacdf08f0bc8a7cf2c7278174 Mon Sep 17 00:00:00 2001 From: Edouard Vincent Date: Tue, 1 Mar 2022 10:24:06 -0800 Subject: [PATCH 026/760] fix: Pin express to 5.0.0-alpha.8 (#4918) Co-authored-by: Joe Previte --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cd01d123ae95..759cfe0236f9 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "compression": "^1.7.4", "cookie-parser": "^1.4.5", "env-paths": "^2.2.0", - "express": "^5.0.0-alpha.8", + "express": "5.0.0-alpha.8", "http-proxy": "^1.18.0", "httpolyglot": "^0.1.2", "js-yaml": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index b025e7d24b51..0ee80b17610a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1729,7 +1729,7 @@ execall@^2.0.0: dependencies: clone-regexp "^2.1.0" -express@^5.0.0-alpha.8: +express@5.0.0-alpha.8: version "5.0.0-alpha.8" resolved "https://registry.yarnpkg.com/express/-/express-5.0.0-alpha.8.tgz#b9dd3a568eab791e3391db47f9e6ab91e61b13fe" integrity sha512-PL8wTLgaNOiq7GpXt187/yWHkrNSfbr4H0yy+V0fpqJt5wpUzBi9DprAkwGKBFOqWHylJ8EyPy34V5u9YArfng== From 506d3f43ed86dab20f9c7ab2e2e3b8713827dbe4 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 1 Mar 2022 12:11:56 -0700 Subject: [PATCH 027/760] feat(http): keep slashes in queryParams in redirects (#4928) * refactor(http): extract logic into constructRedirectPath This allows us to easily test our redirect path construction logic where we get the relative path, the query string and construct a redirect path. By extracting this from `redirect`, we can easily test this logic in a unit test. I did this so we could test some logic where slashes in query strings should be made human-friendly for users. * feat(testing): add tests for constructRedirectPath Co-authored-by: Asher --- src/node/http.ts | 19 ++++++++++++--- test/package.json | 1 + test/unit/node/http.test.ts | 46 ++++++++++++++++++++++++++++++++++++- test/yarn.lock | 5 ++++ 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/src/node/http.ts b/src/node/http.ts index f006036d3924..fa9a84255191 100644 --- a/src/node/http.ts +++ b/src/node/http.ts @@ -138,6 +138,21 @@ export const relativeRoot = (originalUrl: string): string => { return normalize("./" + (depth > 1 ? "../".repeat(depth - 1) : "")) } +/** + * A helper function to construct a redirect path based on + * an Express Request, query and a path to redirect to. + * + * Redirect path is relative to `/${to}`. + */ +export const constructRedirectPath = (req: express.Request, query: qs.ParsedQs, to: string): string => { + const relativePath = normalize(`${relativeRoot(req.originalUrl)}/${to}`, true) + // %2f or %2F are both equalivent to an encoded slash / + const queryString = qs.stringify(query).replace(/%2[fF]/g, "/") + const redirectPath = `${relativePath}${queryString ? `?${queryString}` : ""}` + + return redirectPath +} + /** * Redirect relatively to `/${to}`. Query variables on the current URI will be * preserved. `to` should be a simple path without any query parameters @@ -156,9 +171,7 @@ export const redirect = ( } }) - const relativePath = normalize(`${relativeRoot(req.originalUrl)}/${to}`, true) - const queryString = qs.stringify(query) - const redirectPath = `${relativePath}${queryString ? `?${queryString}` : ""}` + const redirectPath = constructRedirectPath(req, query, to) logger.debug(`redirecting from ${req.originalUrl} to ${redirectPath}`) res.redirect(redirectPath) } diff --git a/test/package.json b/test/package.json index d50371666ba4..726251353eee 100644 --- a/test/package.json +++ b/test/package.json @@ -2,6 +2,7 @@ "license": "MIT", "#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.", "devDependencies": { + "@jest-mock/express": "^1.4.5", "@playwright/test": "^1.16.3", "@types/jest": "^27.0.2", "@types/jsdom": "^16.2.13", diff --git a/test/unit/node/http.test.ts b/test/unit/node/http.test.ts index 87e8e04199b1..b5dc20402d67 100644 --- a/test/unit/node/http.test.ts +++ b/test/unit/node/http.test.ts @@ -1,4 +1,5 @@ -import { relativeRoot } from "../../../src/node/http" +import { getMockReq } from "@jest-mock/express" +import { constructRedirectPath, relativeRoot } from "../../../src/node/http" describe("http", () => { it("should construct a relative path to the root", () => { @@ -9,3 +10,46 @@ describe("http", () => { expect(relativeRoot("/foo/bar/")).toStrictEqual("./../..") }) }) + +describe("constructRedirectPath", () => { + it("should preserve slashes in queryString so they are human-readable", () => { + const mockReq = getMockReq({ + originalUrl: "localhost:8080", + }) + const mockQueryParams = { folder: "/Users/jp/dev/coder" } + const mockTo = "" + const actual = constructRedirectPath(mockReq, mockQueryParams, mockTo) + const expected = "./?folder=/Users/jp/dev/coder" + expect(actual).toBe(expected) + }) + it("should use an empty string if no query params", () => { + const mockReq = getMockReq({ + originalUrl: "localhost:8080", + }) + const mockQueryParams = {} + const mockTo = "" + const actual = constructRedirectPath(mockReq, mockQueryParams, mockTo) + const expected = "./" + expect(actual).toBe(expected) + }) + it("should append the 'to' path relative to the originalUrl", () => { + const mockReq = getMockReq({ + originalUrl: "localhost:8080", + }) + const mockQueryParams = {} + const mockTo = "vscode" + const actual = constructRedirectPath(mockReq, mockQueryParams, mockTo) + const expected = "./vscode" + expect(actual).toBe(expected) + }) + it("should append append queryParams after 'to' path", () => { + const mockReq = getMockReq({ + originalUrl: "localhost:8080", + }) + const mockQueryParams = { folder: "/Users/jp/dev/coder" } + const mockTo = "vscode" + const actual = constructRedirectPath(mockReq, mockQueryParams, mockTo) + const expected = "./vscode?folder=/Users/jp/dev/coder" + expect(actual).toBe(expected) + }) +}) diff --git a/test/yarn.lock b/test/yarn.lock index 35377913d710..38e8e7cd93aa 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -478,6 +478,11 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== +"@jest-mock/express@^1.4.5": + version "1.4.5" + resolved "https://registry.yarnpkg.com/@jest-mock/express/-/express-1.4.5.tgz#437db24ccd505d88f8c0d73e8593fa3cd6eb273b" + integrity sha512-bERM1jnutyH7VMahdaOHAKy7lgX47zJ7+RTz2eMz0wlCttd9CkhsKFEyoWmJBSz/ow0nVj3lCuRqLem4QDYFkQ== + "@jest/console@^27.4.6": version "27.4.6" resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.4.6.tgz#0742e6787f682b22bdad56f9db2a8a77f6a86107" From 2c785779b58230ee05c9accdeb70aa14325d956c Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Tue, 1 Mar 2022 12:20:43 -0800 Subject: [PATCH 028/760] feat: add version of Code OSS to output (#4925) Show the bundled version of Code OSS in the text-based output for --version and --help, in addition to the JSON output (--version --json) Closes: #4874 --- src/node/constants.ts | 2 +- src/node/entry.ts | 14 ++++---------- test/unit/node/constants.test.ts | 6 ++++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/node/constants.ts b/src/node/constants.ts index b3c84048cc38..e27e9a4d8ce7 100644 --- a/src/node/constants.ts +++ b/src/node/constants.ts @@ -35,7 +35,7 @@ export const httpProxyUri = * for outputting to the console. */ export function getVersionString(): string { - return [version, commit].join(" ") + return [version, commit, "with Code", codeVersion].join(" ") } /** diff --git a/src/node/entry.ts b/src/node/entry.ts index 92fd8a8e78e5..010f18b76fd0 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -1,6 +1,6 @@ import { logger } from "@coder/logger" import { optionDescriptions, parse, readConfigFile, setDefaults, shouldOpenInExistingInstance } from "./cli" -import { commit, version } from "./constants" +import { getVersionString, getVersionJsonString } from "./constants" import { openInExistingInstance, runCodeServer, runVsCodeCli, shouldSpawnCliProcess } from "./main" import { isChild, wrapper } from "./wrapper" @@ -24,7 +24,7 @@ async function entry(): Promise { const args = await setDefaults(cliArgs, configArgs) if (args.help) { - console.log("code-server", version, commit) + console.log("code-server", getVersionString()) console.log("") console.log(`Usage: code-server [options] [path]`) console.log(` - Opening a directory: code-server ./path/to/your/project`) @@ -39,15 +39,9 @@ async function entry(): Promise { if (args.version) { if (args.json) { - console.log( - JSON.stringify({ - codeServer: version, - commit, - vscode: require("../../vendor/modules/code-oss-dev/package.json").version, - }), - ) + console.log(getVersionJsonString()) } else { - console.log(version, commit) + console.log(getVersionString()) } return } diff --git a/test/unit/node/constants.test.ts b/test/unit/node/constants.test.ts index 70192d70ca50..24501cbd2be8 100644 --- a/test/unit/node/constants.test.ts +++ b/test/unit/node/constants.test.ts @@ -60,7 +60,9 @@ describe("constants", () => { }) it("should return a human-readable version string", () => { - expect(constants.getVersionString()).toStrictEqual(`${mockPackageJson.version} ${mockPackageJson.commit}`) + expect(constants.getVersionString()).toStrictEqual( + `${mockPackageJson.version} ${mockPackageJson.commit} with Code ${mockCodePackageJson.version}`, + ) }) it("should return a machine-readable version string", () => { @@ -124,7 +126,7 @@ describe("constants", () => { it("should return a human-readable version string", () => { // this string is not super useful - expect(constants.getVersionString()).toStrictEqual("development development") + expect(constants.getVersionString()).toStrictEqual("development development with Code development") }) it("should return a machine-readable version string", () => { From 83269ba658555c067b4194b04e8e7f16dd068c0d Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Tue, 1 Mar 2022 15:03:39 -0800 Subject: [PATCH 029/760] chore: limit concurrency for build jobs (#4929) * Configure build jobs to cancel previous builds when new changes are pushed to a pull request branch, and serialize builds when running in a branch from a push event * Reduce privileges of GitHub token for scripts workflow --- .github/workflows/ci.yaml | 7 +++++++ .github/workflows/codeql-analysis.yml | 7 +++++++ .github/workflows/docker.yaml | 7 +++++++ .github/workflows/docs-preview.yaml | 7 +++++++ .github/workflows/installer.yml | 7 +++++++ .github/workflows/npm-brew.yaml | 7 +++++++ .github/workflows/scripts.yml | 19 +++++++++++++++++++ 7 files changed, 61 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f3bb7d53bb4..985a248b29f6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,13 @@ on: branches: - main +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + # Note: if: success() is used in several jobs - # this ensures that it only executes if all previous jobs succeeded. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3b41e3d9b2ad..d9ab78ab3e7e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -10,6 +10,13 @@ on: # Runs every Monday morning PST - cron: "17 15 * * 1" +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: analyze: name: Analyze diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index ec1792b27be8..c31577d573b1 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -9,6 +9,13 @@ on: types: - released +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: docker-images: runs-on: ubuntu-20.04 diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index 6eb4fcaef509..e56acf5c4a65 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -17,6 +17,13 @@ permissions: security-events: none statuses: none +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: preview: name: Docs preview diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index cba880cf9b4d..761e1047cbcb 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -12,6 +12,13 @@ on: paths: - "install.sh" +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: ubuntu: name: Test installer on Ubuntu diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index a515e423e1ff..7f9648d038df 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -8,6 +8,13 @@ on: release: types: [released] +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: # NOTE: this job requires curl, jq and yarn # All of them are included in ubuntu-latest. diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 197d74ef885e..cf6d18caa2b0 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -14,6 +14,25 @@ on: - "**.sh" - "**.bats" +permissions: + actions: none + checks: none + contents: read + deployments: none + issues: none + packages: none + pull-requests: none + repository-projects: none + security-events: none + statuses: none + +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: name: Run script unit tests From 3f3a489f33cd5e023bf2d2ea5ab22a0d0b50de53 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 16:31:32 -0700 Subject: [PATCH 030/760] chore(deps): update actions/checkout action to v3 (#4931) Co-authored-by: Renovate Bot Co-authored-by: Jonathan Yu --- .github/workflows/ci.yaml | 18 +++++++++--------- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docker.yaml | 2 +- .github/workflows/docs-preview.yaml | 2 +- .github/workflows/installer.yml | 6 +++--- .github/workflows/npm-brew.yaml | 4 ++-- .github/workflows/scripts.yml | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 985a248b29f6..84697eec6cb0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: timeout-minutes: 15 steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -70,7 +70,7 @@ jobs: timeout-minutes: 15 steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -102,7 +102,7 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -196,7 +196,7 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/download-artifact@v2 id: download @@ -225,7 +225,7 @@ jobs: container: "centos:7" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -314,7 +314,7 @@ jobs: NODE_VERSION: v14.17.4 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -363,7 +363,7 @@ jobs: runs-on: macos-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -408,7 +408,7 @@ jobs: # since VS Code will load faster due to the bundling. CODE_SERVER_TEST_ENTRY: "./release-packages/code-server-linux-amd64" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -462,7 +462,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Trivy vulnerability scanner in repo mode #Commit SHA for v0.0.17 uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d9ab78ab3e7e..e4b02aaa0cdb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c31577d573b1..7cc0c1e27e11 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index e56acf5c4a65..df149117578d 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -37,7 +37,7 @@ jobs: uses: styfle/cancel-workflow-action@0.9.1 - name: Checkout m - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: coder/m ref: refs/heads/master diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 761e1047cbcb..5002c3e814a5 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install code-server run: ./install.sh @@ -39,7 +39,7 @@ jobs: container: "alpine:3.14" steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install curl run: apk add curl @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install code-server run: ./install.sh diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index 7f9648d038df..cf71cc42dc82 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -21,7 +21,7 @@ jobs: npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/download-artifact@v2 id: download @@ -49,7 +49,7 @@ jobs: id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Configure git run: | git config user.name github-actions diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index cf6d18caa2b0..15c00284e1be 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -41,7 +41,7 @@ jobs: container: "alpine:3.14" steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install test utilities run: apk add bats checkbashisms From 0e78a147b6135bf1725c952cb2e0277344c26161 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 2 Mar 2022 14:02:51 -0600 Subject: [PATCH 031/760] feat: github-auth flag (#4926) * feat: github-auth flag This will allow injecting credentials into code-server if you already have them. * Update Code Contains the GitHub auth changes. * Add e2e test for GitHub token --- src/node/cli.ts | 21 ++++++++++++++++++- test/e2e/baseFixture.ts | 3 ++- test/e2e/codeServer.test.ts | 2 +- test/e2e/extensions.test.ts | 7 +++++-- test/e2e/github.test.ts | 38 ++++++++++++++++++++++++++++++++++ test/e2e/globalSetup.test.ts | 2 +- test/e2e/login.test.ts | 2 +- test/e2e/logout.test.ts | 2 +- test/e2e/models/CodeServer.ts | 32 +++++++++++++++++++++++++--- test/e2e/openHelpAbout.test.ts | 2 +- test/e2e/terminal.test.ts | 2 +- test/unit/node/cli.test.ts | 24 +++++++++++++++++++++ vendor/package.json | 2 +- vendor/yarn.lock | 4 ++-- 14 files changed, 127 insertions(+), 16 deletions(-) create mode 100644 test/e2e/github.test.ts diff --git a/src/node/cli.ts b/src/node/cli.ts index 854ea2fc291b..e996f34125b6 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -87,6 +87,7 @@ export interface UserProvidedArgs { "locate-extension"?: string[] "show-versions"?: boolean category?: string + "github-auth"?: string } interface Option { @@ -205,6 +206,10 @@ const options: Options> = { }, "uninstall-extension": { type: "string[]", description: "Uninstall a VS Code extension by id." }, "show-versions": { type: "boolean", description: "Show VS Code extension versions." }, + "github-auth": { + type: "string", + description: "GitHub authentication token (can only be passed in via $GITHUB_TOKEN or the config file).", + }, "proxy-domain": { type: "string[]", description: "Domain used for proxying ports." }, "ignore-last-opened": { type: "boolean", @@ -336,6 +341,10 @@ export const parse = ( throw new Error("--hashed-password can only be set in the config file or passed in via $HASHED_PASSWORD") } + if (key === "github-auth" && !opts?.configFile) { + throw new Error("--github-auth can only be set in the config file or passed in via $GITHUB_TOKEN") + } + const option = options[key] if (option.type === "boolean") { ;(args[key] as boolean) = true @@ -409,7 +418,12 @@ export const parse = ( logger.debug(() => [ `parsed ${opts?.configFile ? "config" : "command line"}`, - field("args", { ...args, password: undefined }), + field("args", { + ...args, + password: args.password ? "" : undefined, + "hashed-password": args["hashed-password"] ? "" : undefined, + "github-auth": args["github-auth"] ? "" : undefined, + }), ]) return args @@ -530,9 +544,14 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config usingEnvPassword = false } + if (process.env.GITHUB_TOKEN) { + args["github-auth"] = process.env.GITHUB_TOKEN + } + // Ensure they're not readable by child processes. delete process.env.PASSWORD delete process.env.HASHED_PASSWORD + delete process.env.GITHUB_TOKEN // Filter duplicate proxy domains and remove any leading `*.`. const proxyDomains = new Set((args["proxy-domain"] || []).map((d) => d.replace(/^\*\./, ""))) diff --git a/test/e2e/baseFixture.ts b/test/e2e/baseFixture.ts index 5cf0dd6a4c7f..3778593d6ee7 100644 --- a/test/e2e/baseFixture.ts +++ b/test/e2e/baseFixture.ts @@ -13,11 +13,12 @@ export const describe = ( name: string, includeCredentials: boolean, codeServerArgs: string[], + codeServerEnv: NodeJS.ProcessEnv, fn: (codeServer: CodeServer) => void, ) => { test.describe(name, () => { // This will spawn on demand so nothing is necessary on before. - const codeServer = new CodeServer(name, codeServerArgs) + const codeServer = new CodeServer(name, codeServerArgs, codeServerEnv) // Kill code-server after the suite has ended. This may happen even without // doing it explicitly but it seems prudent to be sure. diff --git a/test/e2e/codeServer.test.ts b/test/e2e/codeServer.test.ts index 1f712f913a0e..5d09f3331cff 100644 --- a/test/e2e/codeServer.test.ts +++ b/test/e2e/codeServer.test.ts @@ -2,7 +2,7 @@ import { promises as fs } from "fs" import * as path from "path" import { describe, test, expect } from "./baseFixture" -describe("CodeServer", true, [], () => { +describe("CodeServer", true, [], {}, () => { test("should navigate to home page", async ({ codeServerPage }) => { // We navigate codeServer before each test // and we start the test with a storage state diff --git a/test/e2e/extensions.test.ts b/test/e2e/extensions.test.ts index 3fbf3eaea839..72734c9f534b 100644 --- a/test/e2e/extensions.test.ts +++ b/test/e2e/extensions.test.ts @@ -1,3 +1,4 @@ +import * as path from "path" import { describe, test } from "./baseFixture" function runTestExtensionTests() { @@ -11,10 +12,12 @@ function runTestExtensionTests() { }) } -describe("Extensions", true, [], () => { +const flags = ["--extensions-dir", path.join(__dirname, "./extensions")] + +describe("Extensions", true, flags, {}, () => { runTestExtensionTests() }) -describe("Extensions with --cert", true, ["--cert"], () => { +describe("Extensions with --cert", true, [...flags, "--cert"], {}, () => { runTestExtensionTests() }) diff --git a/test/e2e/github.test.ts b/test/e2e/github.test.ts new file mode 100644 index 000000000000..f45c9e714928 --- /dev/null +++ b/test/e2e/github.test.ts @@ -0,0 +1,38 @@ +import { test as base } from "@playwright/test" +import { describe, expect, test } from "./baseFixture" + +if (process.env.GITHUB_TOKEN) { + describe("GitHub token", true, [], {}, () => { + test("should be logged in to pull requests extension", async ({ codeServerPage }) => { + await codeServerPage.exec("git init") + await codeServerPage.exec("git remote add origin https://github.com/coder/code-server") + await codeServerPage.installExtension("GitHub.vscode-pull-request-github") + await codeServerPage.executeCommandViaMenus("View: Show Github") + await codeServerPage.page.click("text=Sign in") + await codeServerPage.page.click("text=Allow") + // It should ask to select an account, one of which will be the one we + // pre-injected. + expect(await codeServerPage.page.isVisible("text=Select an account")).toBe(false) + }) + }) + + describe("No GitHub token", true, [], { GITHUB_TOKEN: "" }, () => { + test("should not be logged in to pull requests extension", async ({ codeServerPage }) => { + await codeServerPage.exec("git init") + await codeServerPage.exec("git remote add origin https://github.com/coder/code-server") + await codeServerPage.installExtension("GitHub.vscode-pull-request-github") + await codeServerPage.executeCommandViaMenus("View: Show Github") + await codeServerPage.page.click("text=Sign in") + await codeServerPage.page.click("text=Allow") + // Since there is no account it will ask directly for the token (because + // we are on localhost; otherwise it would initiate the oauth flow). + expect(await codeServerPage.page.isVisible("text=GitHub Personal Access Token")).toBe(false) + }) + }) +} else { + base.describe("GitHub token", () => { + base.skip("skipped because GITHUB_TOKEN is not set", () => { + // Playwright will not show this without a function. + }) + }) +} diff --git a/test/e2e/globalSetup.test.ts b/test/e2e/globalSetup.test.ts index 554eb945f2f5..ba1cf03e3a27 100644 --- a/test/e2e/globalSetup.test.ts +++ b/test/e2e/globalSetup.test.ts @@ -2,7 +2,7 @@ import { describe, test, expect } from "./baseFixture" // This test is to make sure the globalSetup works as expected // meaning globalSetup ran and stored the storageState -describe("globalSetup", true, [], () => { +describe("globalSetup", true, [], {}, () => { test("should keep us logged in using the storageState", async ({ codeServerPage }) => { // Make sure the editor actually loaded expect(await codeServerPage.isEditorVisible()).toBe(true) diff --git a/test/e2e/login.test.ts b/test/e2e/login.test.ts index 3462286f4577..9506e7063639 100644 --- a/test/e2e/login.test.ts +++ b/test/e2e/login.test.ts @@ -1,7 +1,7 @@ import { PASSWORD } from "../utils/constants" import { describe, test, expect } from "./baseFixture" -describe("login", false, [], () => { +describe("login", false, [], {}, () => { test("should see the login page", async ({ codeServerPage }) => { // It should send us to the login page expect(await codeServerPage.page.title()).toBe("code-server login") diff --git a/test/e2e/logout.test.ts b/test/e2e/logout.test.ts index b9c71a4466e8..f9bf8454ac10 100644 --- a/test/e2e/logout.test.ts +++ b/test/e2e/logout.test.ts @@ -1,7 +1,7 @@ // NOTE@jsjoeio commenting out until we can figure out what's wrong // import { describe, test, expect } from "./baseFixture" -// describe("logout", true, [], () => { +// describe("logout", true, [], {}, () => { // test("should be able logout", async ({ codeServerPage }) => { // // Recommended by Playwright for async navigation // // https://github.com/microsoft/playwright/issues/1987#issuecomment-620182151 diff --git a/test/e2e/models/CodeServer.ts b/test/e2e/models/CodeServer.ts index e8fff0716300..f6c55cb67ed9 100644 --- a/test/e2e/models/CodeServer.ts +++ b/test/e2e/models/CodeServer.ts @@ -3,6 +3,7 @@ import * as cp from "child_process" import { promises as fs } from "fs" import * as path from "path" import { Page } from "playwright" +import util from "util" import { logError, plural } from "../../../src/common/util" import { onLine } from "../../../src/node/util" import { PASSWORD, workspaceDir } from "../../utils/constants" @@ -39,7 +40,11 @@ export class CodeServer { private closed = false private _workspaceDir: Promise | undefined - constructor(name: string, private readonly codeServerArgs: string[]) { + constructor( + name: string, + private readonly codeServerArgs: string[], + private readonly codeServerEnv: NodeJS.ProcessEnv, + ) { this.logger = logger.named(name) } @@ -96,6 +101,8 @@ export class CodeServer { "node", [ process.env.CODE_SERVER_TEST_ENTRY || ".", + "--extensions-dir", + path.join(dir, "extensions"), ...this.codeServerArgs, // Using port zero will spawn on a random port. "--bind-addr", @@ -107,8 +114,6 @@ 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, ], @@ -116,6 +121,7 @@ export class CodeServer { cwd: path.join(__dirname, "../../.."), env: { ...process.env, + ...this.codeServerEnv, PASSWORD, }, }, @@ -462,4 +468,24 @@ export class CodeServerPage { await this.reloadUntilEditorIsReady() } } + + /** + * Execute a command in t root of the instance's workspace directory. + */ + async exec(command: string): Promise { + await util.promisify(cp.exec)(command, { + cwd: await this.workspaceDir, + }) + } + + /** + * Install an extension by ID to the instance's temporary extension + * directory. + */ + async installExtension(id: string): Promise { + const dir = path.join(await this.workspaceDir, "extensions") + await util.promisify(cp.exec)(`node . --install-extension ${id} --extensions-dir ${dir}`, { + cwd: path.join(__dirname, "../../.."), + }) + } } diff --git a/test/e2e/openHelpAbout.test.ts b/test/e2e/openHelpAbout.test.ts index 0b7ed9fea540..3720828bc5e6 100644 --- a/test/e2e/openHelpAbout.test.ts +++ b/test/e2e/openHelpAbout.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from "./baseFixture" -describe("Open Help > About", true, [], () => { +describe("Open Help > About", true, [], {}, () => { test("should see code-server version in about dialog", async ({ codeServerPage }) => { // Open using the menu. await codeServerPage.navigateMenus(["Help", "About"]) diff --git a/test/e2e/terminal.test.ts b/test/e2e/terminal.test.ts index 90ea880a4782..ae55b0670365 100644 --- a/test/e2e/terminal.test.ts +++ b/test/e2e/terminal.test.ts @@ -4,7 +4,7 @@ import util from "util" import { clean, tmpdir } from "../utils/helpers" import { describe, expect, test } from "./baseFixture" -describe("Integrated Terminal", true, [], () => { +describe("Integrated Terminal", true, [], {}, () => { const testName = "integrated-terminal" test.beforeAll(async () => { await clean(testName) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index e8e2c85b2947..327219ea4be3 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -313,6 +313,19 @@ describe("parser", () => { }) }) + it("should use env var github token", async () => { + process.env.GITHUB_TOKEN = "ga-foo" + const args = parse([]) + expect(args).toEqual({}) + + const defaultArgs = await setDefaults(args) + expect(defaultArgs).toEqual({ + ...defaults, + "github-auth": "ga-foo", + }) + expect(process.env.GITHUB_TOKEN).toBe(undefined) + }) + it("should error if password passed in", () => { expect(() => parse(["--password", "supersecret123"])).toThrowError( "--password can only be set in the config file or passed in via $PASSWORD", @@ -325,6 +338,12 @@ describe("parser", () => { ) }) + it("should error if github-auth passed in", () => { + expect(() => parse(["--github-auth", "fdas423fs8a"])).toThrowError( + "--github-auth can only be set in the config file or passed in via $GITHUB_TOKEN", + ) + }) + it("should filter proxy domains", async () => { const args = parse(["--proxy-domain", "*.coder.com", "--proxy-domain", "coder.com", "--proxy-domain", "coder.org"]) expect(args).toEqual({ @@ -374,6 +393,11 @@ describe("parser", () => { it("should ignore optional strings set to false", async () => { expect(parse(["--cert=false"])).toEqual({}) }) + it("should use last flag", async () => { + expect(parse(["--port", "8081", "--port", "8082"])).toEqual({ + port: 8082, + }) + }) }) describe("cli", () => { diff --git a/vendor/package.json b/vendor/package.json index cb8e1098bae4..82feee23eb18 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#6337ee490d16b7dfd8854d22c998f58d6cd21ef5" + "code-oss-dev": "coder/vscode#0fd21e4078ac1dddb26be024f5d4224a4b86da93" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index 7ad95d8805cd..abfb361b769c 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#6337ee490d16b7dfd8854d22c998f58d6cd21ef5: +code-oss-dev@coder/vscode#0fd21e4078ac1dddb26be024f5d4224a4b86da93: version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/6337ee490d16b7dfd8854d22c998f58d6cd21ef5" + resolved "https://codeload.github.com/coder/vscode/tar.gz/0fd21e4078ac1dddb26be024f5d4224a4b86da93" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From b0181120d4d44cc6b99a4fedb8cf4cec482a0540 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 14:31:21 -0700 Subject: [PATCH 032/760] chore(deps): update actions/download-artifact action to v3 (#4937) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 10 +++++----- .github/workflows/npm-brew.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84697eec6cb0..6906cc145647 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -198,7 +198,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 id: download with: name: "npm-package" @@ -249,7 +249,7 @@ jobs: run: npm install -g yarn - name: Download npm package - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: npm-package @@ -332,7 +332,7 @@ jobs: PACKAGE: ${{ format('g++-{0}', matrix.prefix) }} - name: Download npm package - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: npm-package @@ -376,7 +376,7 @@ jobs: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Download npm package - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: npm-package @@ -425,7 +425,7 @@ jobs: yarn-build- - name: Download release packages - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: release-packages path: ./release-packages diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index cf71cc42dc82..8c8b84fe2c38 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 id: download with: name: "npm-package" From 78658f1cf48a5e019a82cde937cfa8feed8b986b Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 2 Mar 2022 15:36:38 -0700 Subject: [PATCH 033/760] refactor: remove folder/workspace from vsCodeCliArgs (#4932) * refactor: remove folder/workspace from vsCodeCliArgs Since we handle this in the vscode.ts route, we no longer need to pass it to VS Code as a CLI arg since it's deprecated on that side. * feat(vscode): redirect to folder from cli * Update src/node/routes/vscode.ts Co-authored-by: Asher * fixup!: update _: type * fixup!: move vars to lower if block * fixup!: share redirect block * fixup!: mmove req.query.ew block into if * fixup!: refactor vscode tests * refactor: make vscode.ts logic easier to read * fixup!: fix broken tests and clean up logic * chore: upgrade vscode version * fixup!: delete unnecessary if closed block * Update src/node/routes/vscode.ts Co-authored-by: Asher * fixup!: rename to FOLDER_OR_WORKSPACE_WAS_CLOSED Co-authored-by: Asher --- src/node/cli.ts | 28 +-------- src/node/routes/vscode.ts | 51 ++++++++++------ test/unit/node/cli.test.ts | 25 -------- test/unit/node/routes/vscode.test.ts | 91 +++++++++++----------------- vendor/package.json | 2 +- vendor/yarn.lock | 4 +- 6 files changed, 73 insertions(+), 128 deletions(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index e996f34125b6..9928db1c68d6 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -3,15 +3,7 @@ import { promises as fs } from "fs" import yaml from "js-yaml" import * as os from "os" import * as path from "path" -import { - canConnect, - generateCertificate, - generatePassword, - humanPath, - paths, - isNodeJSErrnoException, - isFile, -} from "./util" +import { canConnect, generateCertificate, generatePassword, humanPath, paths, isNodeJSErrnoException } from "./util" const DEFAULT_SOCKET_PATH = path.join(os.tmpdir(), "vscode-ipc") @@ -448,7 +440,7 @@ export interface DefaultedArgs extends ConfigArgs { "extensions-dir": string "user-data-dir": string /* Positional arguments. */ - _: [] + _: string[] } /** @@ -770,25 +762,9 @@ export const shouldOpenInExistingInstance = async (args: UserProvidedArgs): Prom * Convert our arguments to VS Code server arguments. */ export const toVsCodeArgs = async (args: DefaultedArgs): Promise => { - let workspace = "" - let folder = "" - if (args._.length) { - const lastEntry = path.resolve(args._[args._.length - 1]) - const entryIsFile = await isFile(lastEntry) - if (entryIsFile && path.extname(lastEntry) === ".code-workspace") { - workspace = lastEntry - } else if (!entryIsFile) { - folder = lastEntry - } - // Otherwise it is a regular file. Spawning VS Code with a file is not yet - // supported but it can be done separately after code-server spawns. - } - return { "connection-token": "0000", ...args, - workspace, - folder, "accept-server-license-terms": true, /** Type casting. */ help: !!args.help, diff --git a/src/node/routes/vscode.ts b/src/node/routes/vscode.ts index fe9c441813b9..b137bfcd5373 100644 --- a/src/node/routes/vscode.ts +++ b/src/node/routes/vscode.ts @@ -1,12 +1,13 @@ import { logger } from "@coder/logger" import * as express from "express" +import * as path from "path" import { WebsocketRequest } from "../../../typings/pluginapi" import { logError } from "../../common/util" import { toVsCodeArgs } from "../cli" import { isDevMode } from "../constants" import { authenticated, ensureAuthenticated, redirect, self } from "../http" import { SocketProxyProvider } from "../socket" -import { loadAMDModule } from "../util" +import { isFile, loadAMDModule } from "../util" import { Router as WsRouter } from "../wsRouter" import { errorHandler } from "./errors" @@ -25,6 +26,9 @@ export class CodeServerRouteWrapper { private $root: express.Handler = async (req, res, next) => { const isAuthenticated = await authenticated(req) + const NO_FOLDER_OR_WORKSPACE_QUERY = !req.query.folder && !req.query.workspace + // Ew means the workspace was closed so clear the last folder/workspace. + const FOLDER_OR_WORKSPACE_WAS_CLOSED = req.query.ew if (!isAuthenticated) { const to = self(req) @@ -33,25 +37,38 @@ export class CodeServerRouteWrapper { }) } - 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 - } + if (NO_FOLDER_OR_WORKSPACE_QUERY && !FOLDER_OR_WORKSPACE_WAS_CLOSED) { + const settings = await req.settings.read() + const lastOpened = settings.query || {} + // This flag disables the last opened behavior + const IGNORE_LAST_OPENED = req.args["ignore-last-opened"] + const HAS_LAST_OPENED_FOLDER_OR_WORKSPACE = lastOpened.folder || lastOpened.workspace + const HAS_FOLDER_OR_WORKSPACE_FROM_CLI = req.args._.length > 0 + const to = self(req) + + let folder = undefined + let workspace = undefined // 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) + if (HAS_LAST_OPENED_FOLDER_OR_WORKSPACE && !IGNORE_LAST_OPENED) { + folder = lastOpened.folder + workspace = lastOpened.workspace + } else if (HAS_FOLDER_OR_WORKSPACE_FROM_CLI) { + const lastEntry = path.resolve(req.args._[req.args._.length - 1]) + const entryIsFile = await isFile(lastEntry) + const IS_WORKSPACE_FILE = entryIsFile && path.extname(lastEntry) === ".code-workspace" + + if (IS_WORKSPACE_FILE) { + workspace = lastEntry + } else if (!entryIsFile) { + folder = lastEntry + } + } + + if (folder || workspace) { return redirect(req, res, to, { - folder: query.folder, - workspace: query.workspace, + folder, + workspace, }) } } diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index 327219ea4be3..108f2e841bef 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -726,29 +726,6 @@ describe("toVsCodeArgs", () => { it("should convert empty args", async () => { expect(await toVsCodeArgs(await setDefaults(parse([])))).toStrictEqual({ ...vscodeDefaults, - folder: "", - workspace: "", - }) - }) - - it("should convert with workspace", async () => { - const workspace = path.join(await tmpdir(testName), "test.code-workspace") - await fs.writeFile(workspace, "foobar") - expect(await toVsCodeArgs(await setDefaults(parse([workspace])))).toStrictEqual({ - ...vscodeDefaults, - workspace, - folder: "", - _: [workspace], - }) - }) - - it("should convert with folder", async () => { - const folder = await tmpdir(testName) - expect(await toVsCodeArgs(await setDefaults(parse([folder])))).toStrictEqual({ - ...vscodeDefaults, - folder, - workspace: "", - _: [folder], }) }) @@ -757,8 +734,6 @@ describe("toVsCodeArgs", () => { await fs.writeFile(file, "foobar") expect(await toVsCodeArgs(await setDefaults(parse([file])))).toStrictEqual({ ...vscodeDefaults, - folder: "", - workspace: "", _: [file], }) }) diff --git a/test/unit/node/routes/vscode.test.ts b/test/unit/node/routes/vscode.test.ts index d896f846762c..a4c0ba13abca 100644 --- a/test/unit/node/routes/vscode.test.ts +++ b/test/unit/node/routes/vscode.test.ts @@ -1,19 +1,9 @@ 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 @@ -39,7 +29,7 @@ describe("vscode", () => { 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) + expect(url.pathname + url.search).toBe(route) switch (route) { case "/": case "/vscode/": @@ -52,52 +42,25 @@ describe("vscode", () => { } }) - /** - * Get the workbench config from the provided response. - */ - const getConfig = async (resp: Response): Promise => { - expect(resp.status).toBe(200) - const html = await resp.text() - const match = html.match(//) - 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("https://github.com/")) - 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], "") + it("should redirect to the passed in workspace using human-readable query", async () => { + const workspace = path.join(await tmpdir(testName), "test.code-workspace") + await fs.writeFile(workspace, "") + codeServer = await integration.setup(["--auth=none", workspace], "") - // At first it will load the directory provided on the command line. - const config = await getConfig(await codeServer.fetch("https://github.com/")) - expect(config.folderUri?.path).toBe(defaultDir) - expect(config.workspaceUri).toBeUndefined() + const resp = await codeServer.fetch("https://github.com/") + const url = new URL(resp.url) + expect(url.pathname).toBe("/") + expect(url.search).toBe(`?workspace=${workspace}`) }) - 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], "") + it("should redirect to the passed in folder using human-readable query", async () => { + const folder = await tmpdir(testName) + codeServer = await integration.setup(["--auth=none", folder], "") - // At first it will load the workspace provided on the command line. - const config = await getConfig(await codeServer.fetch("https://github.com/")) - expect(config.folderUri).toBeUndefined() - expect(config.workspaceUri?.path).toBe(defaultWorkspace) + const resp = await codeServer.fetch("https://github.com/") + const url = new URL(resp.url) + expect(url.pathname).toBe("/") + expect(url.search).toBe(`?folder=${folder}`) }) it("should redirect to last query folder/workspace", async () => { @@ -105,6 +68,7 @@ describe("vscode", () => { const folder = await tmpdir(testName) const workspace = path.join(await tmpdir(testName), "test.code-workspace") + await fs.writeFile(workspace, "") let resp = await codeServer.fetch("https://github.com/", undefined, { folder, workspace, @@ -118,7 +82,7 @@ describe("vscode", () => { 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}`) + expect(url.search).toBe(`?folder=${folder}&workspace=${workspace}`) await resp.text() } @@ -126,13 +90,24 @@ describe("vscode", () => { resp = await codeServer.fetch("https://github.com/", undefined, { ew: "true" }) let url = new URL(resp.url) expect(url.pathname).toBe("/") - expect(decodeURIComponent(url.search)).toBe("?ew=true") + expect(url.search).toBe("?ew=true") await resp.text() resp = await codeServer.fetch("https://github.com/") url = new URL(resp.url) expect(url.pathname).toBe("/") - expect(decodeURIComponent(url.search)).toBe("") + expect(url.search).toBe("") + await resp.text() + }) + + it("should do nothing when nothing is passed in", async () => { + codeServer = await integration.setup(["--auth=none"], "") + + let resp = await codeServer.fetch("https://github.com/", undefined) + + expect(resp.status).toBe(200) + const url = new URL(resp.url) + expect(url.search).toBe("") await resp.text() }) @@ -141,6 +116,8 @@ describe("vscode", () => { const folder = await tmpdir(testName) const workspace = path.join(await tmpdir(testName), "test.code-workspace") + await fs.writeFile(workspace, "") + let resp = await codeServer.fetch("https://github.com/", undefined, { folder, workspace, @@ -152,7 +129,7 @@ describe("vscode", () => { resp = await codeServer.fetch("https://github.com/") const url = new URL(resp.url) expect(url.pathname).toBe("/") - expect(decodeURIComponent(url.search)).toBe("") + expect(url.search).toBe("") await resp.text() }) }) diff --git a/vendor/package.json b/vendor/package.json index 82feee23eb18..9d00927be932 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#0fd21e4078ac1dddb26be024f5d4224a4b86da93" + "code-oss-dev": "coder/vscode#bd734e3d9f21b1bce4dabab2514177e90c090ee6" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index abfb361b769c..9a5eff2e1988 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#0fd21e4078ac1dddb26be024f5d4224a4b86da93: +code-oss-dev@coder/vscode#bd734e3d9f21b1bce4dabab2514177e90c090ee6: version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/0fd21e4078ac1dddb26be024f5d4224a4b86da93" + resolved "https://codeload.github.com/coder/vscode/tar.gz/bd734e3d9f21b1bce4dabab2514177e90c090ee6" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From c4d87580efc50c1f9902b35ff24f677b1e0d3af4 Mon Sep 17 00:00:00 2001 From: Ciel Date: Fri, 4 Mar 2022 00:54:35 +0800 Subject: [PATCH 034/760] feat: cli arg for file permission of socket (#4923) --- src/node/app.ts | 15 ++++++++++++--- src/node/cli.ts | 3 +++ test/unit/node/app.test.ts | 12 ++++++++++++ test/unit/node/cli.test.ts | 8 +++++++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/node/app.ts b/src/node/app.ts index 1387135583d5..7c868c2bc6df 100644 --- a/src/node/app.ts +++ b/src/node/app.ts @@ -11,7 +11,7 @@ import { disposer } from "./http" import { isNodeJSErrnoException } from "./util" import { handleUpgrade } from "./wsRouter" -type ListenOptions = Pick +type ListenOptions = Pick export interface App extends Disposable { /** Handles regular HTTP requests. */ @@ -22,7 +22,7 @@ export interface App extends Disposable { server: http.Server } -const listen = (server: http.Server, { host, port, socket }: ListenOptions) => { +const listen = (server: http.Server, { host, port, socket, "socket-mode": mode }: ListenOptions) => { return new Promise(async (resolve, reject) => { server.on("error", reject) @@ -31,7 +31,16 @@ const listen = (server: http.Server, { host, port, socket }: ListenOptions) => { server.off("error", reject) server.on("error", (err) => util.logError(logger, "http server error", err)) - resolve() + if (socket && mode) { + fs.chmod(socket, mode) + .then(resolve) + .catch((err) => { + util.logError(logger, "socket chmod", err) + reject(err) + }) + } else { + resolve() + } } if (socket) { diff --git a/src/node/cli.ts b/src/node/cli.ts index 9928db1c68d6..503c9cf79a66 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -56,6 +56,7 @@ export interface UserProvidedArgs { open?: boolean "bind-addr"?: string socket?: string + "socket-mode"?: string version?: boolean "proxy-domain"?: string[] "reuse-window"?: boolean @@ -175,6 +176,7 @@ const options: Options> = { port: { type: "number", description: "" }, socket: { type: "string", path: true, description: "Path to a socket (bind-addr will be ignored)." }, + "socket-mode": { type: "string", description: "File mode of the socket." }, version: { type: "boolean", short: "v", description: "Display version information." }, _: { type: "string[]" }, @@ -513,6 +515,7 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config args.host = "localhost" args.port = 0 args.socket = undefined + args["socket-mode"] = undefined args.cert = undefined args.auth = AuthType.None } diff --git a/test/unit/node/app.test.ts b/test/unit/node/app.test.ts index 79279ceb29a8..29811d4f940f 100644 --- a/test/unit/node/app.test.ts +++ b/test/unit/node/app.test.ts @@ -107,6 +107,18 @@ describe("createApp", () => { app.dispose() }) + it("should change the file mode of a socket", async () => { + const defaultArgs = await setDefaults({ + socket: tmpFilePath, + "socket-mode": "777", + }) + + const app = await createApp(defaultArgs) + + expect((await promises.stat(tmpFilePath)).mode & 0o777).toBe(0o777) + app.dispose() + }) + it("should create an https server if args.cert exists", async () => { const testCertificate = await generateCertificate("localhost") const cert = new OptionalString(testCertificate.cert) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index 108f2e841bef..ec3f5ab6279c 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -73,6 +73,8 @@ describe("parser", () => { "--socket=mumble", + "--socket-mode=777", + "3", ["--user-data-dir", "path/to/user/dir"], @@ -110,6 +112,7 @@ describe("parser", () => { open: true, port: 8081, socket: path.resolve("mumble"), + "socket-mode": "777", verbose: true, version: true, "bind-addr": "192.169.0.1:8080", @@ -269,7 +272,9 @@ describe("parser", () => { }) it("should override with --link", async () => { - const args = parse("--cert test --cert-key test --socket test --host 0.0.0.0 --port 8888 --link test".split(" ")) + const args = parse( + "--cert test --cert-key test --socket test --socket-mode 777 --host 0.0.0.0 --port 8888 --link test".split(" "), + ) const defaultArgs = await setDefaults(args) expect(defaultArgs).toEqual({ ...defaults, @@ -282,6 +287,7 @@ describe("parser", () => { cert: undefined, "cert-key": path.resolve("test"), socket: undefined, + "socket-mode": undefined, }) }) From b61a8addcf186e38bc0d6e44d475af4ddd73b826 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 3 Mar 2022 12:32:43 -0600 Subject: [PATCH 035/760] feat: migrate state to new database name (#4938) * Merge setup and navigate functions Whenever we navigate we probably want to make sure the editor is ready so might as well just have one function. * Add customizable entry and workspace directory * Add test for state db migration * Update Code This contains the state migrations. --- test/e2e/baseFixture.ts | 4 +- test/e2e/codeServer.test.ts | 93 +++++++++++++++++++++++----- test/e2e/models/CodeServer.ts | 112 ++++++++++++++++++---------------- vendor/package.json | 2 +- vendor/yarn.lock | 4 +- 5 files changed, 142 insertions(+), 73 deletions(-) diff --git a/test/e2e/baseFixture.ts b/test/e2e/baseFixture.ts index 3778593d6ee7..1efad7f7ac68 100644 --- a/test/e2e/baseFixture.ts +++ b/test/e2e/baseFixture.ts @@ -70,8 +70,8 @@ export const test = base.extend({ // made too). In these cases just accept. page.on("dialog", (d) => d.accept()) - const codeServerPage = new CodeServerPage(codeServer, page) - await codeServerPage.setup(authenticated) + const codeServerPage = new CodeServerPage(codeServer, page, authenticated) + await codeServerPage.navigate() await use(codeServerPage) }, }) diff --git a/test/e2e/codeServer.test.ts b/test/e2e/codeServer.test.ts index 5d09f3331cff..30e8cc6c5b9c 100644 --- a/test/e2e/codeServer.test.ts +++ b/test/e2e/codeServer.test.ts @@ -1,8 +1,45 @@ +import * as cp from "child_process" import { promises as fs } from "fs" +import * as os from "os" import * as path from "path" +import * as util from "util" import { describe, test, expect } from "./baseFixture" +import { CodeServer } from "./models/CodeServer" + +describe("code-server", true, [], {}, () => { + // TODO@asher: Generalize this? Could be nice if we were to ever need + // multiple migration tests in other suites. + const instances = new Map() + test.afterAll(async () => { + const procs = Array.from(instances.values()) + instances.clear() + await Promise.all(procs.map((cs) => cs.close())) + }) + + /** + * Spawn a specific version of code-server using the install script. + */ + const spawn = async (version: string, dir?: string): Promise => { + let instance = instances.get(version) + if (!instance) { + await util.promisify(cp.exec)(`./install.sh --method standalone --version ${version}`, { + cwd: path.join(__dirname, "../.."), + }) + + instance = new CodeServer( + "code-server@" + version, + ["--auth=none"], + { VSCODE_DEV: "" }, + dir, + `${os.homedir()}/.local/lib/code-server-${version}`, + ) + + instances.set(version, instance) + } + + return instance + } -describe("CodeServer", true, [], {}, () => { test("should navigate to home page", async ({ codeServerPage }) => { // We navigate codeServer before each test // and we start the test with a storage state @@ -34,24 +71,50 @@ describe("CodeServer", true, [], {}, () => { await codeServerPage.openFile(file) }) - test("should not share state with other paths", async ({ codeServerPage }) => { + test("should migrate state to avoid collisions", async ({ codeServerPage }) => { + // This can take a very long time in development because of how long pages + // take to load and we are doing a lot of that here. + test.slow() + const dir = await codeServerPage.workspaceDir - const file = path.join(dir, "foo") - await fs.writeFile(file, "bar") + const files = [path.join(dir, "foo"), path.join(dir, "bar")] + await Promise.all( + files.map((file) => { + return fs.writeFile(file, path.basename(file)) + }), + ) - await codeServerPage.openFile(file) + // Open a file in the latest instance. + await codeServerPage.openFile(files[0]) + await codeServerPage.stateFlush() - // If we reload now VS Code will be unable to save the state changes so wait - // until those have been written to the database. It flushes every five - // seconds so we need to wait at least that long. - await codeServerPage.page.waitForTimeout(5500) + // Open a file in an older version of code-server. It should not see the + // file opened in the new instance since the database has a different + // name. This must be accessed through the proxy so it shares the same + // domain and can write to the same database. + const cs = await spawn("4.0.2", dir) + const address = new URL(await cs.address()) + await codeServerPage.navigate("/proxy/" + address.port + "/") + await codeServerPage.openFile(files[1]) + expect(await codeServerPage.tabIsVisible(files[0])).toBe(false) + await codeServerPage.stateFlush() - // The tab should re-open on refresh. - await codeServerPage.page.reload() - await codeServerPage.waitForTab(file) + // Move back to latest code-server. We should see the file we previously + // opened with it but not the old code-server file because the new instance + // already created its own database on this path and will avoid migrating. + await codeServerPage.navigate() + await codeServerPage.waitForTab(files[0]) + expect(await codeServerPage.tabIsVisible(files[1])).toBe(false) - // The tab should not re-open on a different path. - await codeServerPage.setup(true, "/vscode") - expect(await codeServerPage.tabIsVisible(file)).toBe(false) + // Open a new path in latest code-server. This one should migrate the + // database from old code-server but see nothing from the new database + // created on the root. + await codeServerPage.navigate("/vscode") + await codeServerPage.waitForTab(files[1]) + expect(await codeServerPage.tabIsVisible(files[0])).toBe(false) + // Should still be open after a reload. + await codeServerPage.navigate("/vscode") + await codeServerPage.waitForTab(files[1]) + expect(await codeServerPage.tabIsVisible(files[0])).toBe(false) }) }) diff --git a/test/e2e/models/CodeServer.ts b/test/e2e/models/CodeServer.ts index f6c55cb67ed9..004fd99f06d5 100644 --- a/test/e2e/models/CodeServer.ts +++ b/test/e2e/models/CodeServer.ts @@ -3,7 +3,7 @@ import * as cp from "child_process" import { promises as fs } from "fs" import * as path from "path" import { Page } from "playwright" -import util from "util" +import * as util from "util" import { logError, plural } from "../../../src/common/util" import { onLine } from "../../../src/node/util" import { PASSWORD, workspaceDir } from "../../utils/constants" @@ -38,12 +38,13 @@ export class CodeServer { private process: Promise | undefined public readonly logger: Logger private closed = false - private _workspaceDir: Promise | undefined constructor( name: string, - private readonly codeServerArgs: string[], - private readonly codeServerEnv: NodeJS.ProcessEnv, + private readonly args: string[], + private readonly env: NodeJS.ProcessEnv, + private readonly _workspaceDir: Promise | string | undefined, + private readonly entry = process.env.CODE_SERVER_TEST_ENTRY || ".", ) { this.logger = logger.named(name) } @@ -75,7 +76,7 @@ export class CodeServer { */ private async createWorkspace(): Promise { const dir = await this.workspaceDir - await fs.mkdir(path.join(dir, "User")) + await fs.mkdir(path.join(dir, "User"), { recursive: true }) await fs.writeFile( path.join(dir, "User/settings.json"), JSON.stringify({ @@ -96,36 +97,33 @@ export class CodeServer { const dir = await this.createWorkspace() return new Promise((resolve, reject) => { - this.logger.debug("spawning") - const proc = cp.spawn( - "node", - [ - process.env.CODE_SERVER_TEST_ENTRY || ".", - "--extensions-dir", - path.join(dir, "extensions"), - ...this.codeServerArgs, - // Using port zero will spawn on a random port. - "--bind-addr", - "127.0.0.1:0", - // Setting the XDG variables would be easier and more thorough but the - // modules we import ignores those variables for non-Linux operating - // systems so use these flags instead. - "--config", - path.join(dir, "config.yaml"), - "--user-data-dir", - dir, - // The last argument is the workspace to open. - dir, - ], - { - cwd: path.join(__dirname, "../../.."), - env: { - ...process.env, - ...this.codeServerEnv, - PASSWORD, - }, + const args = [ + this.entry, + "--extensions-dir", + path.join(dir, "extensions"), + ...this.args, + // Using port zero will spawn on a random port. + "--bind-addr", + "127.0.0.1:0", + // Setting the XDG variables would be easier and more thorough but the + // modules we import ignores those variables for non-Linux operating + // systems so use these flags instead. + "--config", + path.join(dir, "config.yaml"), + "--user-data-dir", + dir, + // The last argument is the workspace to open. + dir, + ] + this.logger.debug("spawning `node " + args.join(" ") + "`") + const proc = cp.spawn("node", args, { + cwd: path.join(__dirname, "../../.."), + env: { + ...process.env, + ...this.env, + PASSWORD, }, - ) + }) const timer = idleTimer("Failed to extract address; did the format change?", reject) @@ -136,7 +134,7 @@ export class CodeServer { }) proc.on("close", (code) => { - const error = new Error("closed unexpectedly") + const error = new Error("code-server closed unexpectedly") if (!this.closed) { this.logger.error(error.message, field("code", code)) } @@ -153,7 +151,7 @@ export class CodeServer { timer.reset() // Log the line without the timestamp. - this.logger.trace(line.replace(/\[.+\]/, "")) + this.logger.debug(line.replace(/\[.+\]/, "")) if (resolved) { return } @@ -194,7 +192,11 @@ export class CodeServer { export class CodeServerPage { private readonly editorSelector = "div.monaco-workbench" - constructor(private readonly codeServer: CodeServer, public readonly page: Page) { + constructor( + private readonly codeServer: CodeServer, + public readonly page: Page, + private readonly authenticated: boolean, + ) { this.page.on("console", (message) => { this.codeServer.logger.debug(message) }) @@ -215,11 +217,18 @@ export class CodeServerPage { } /** - * Navigate to a code-server endpoint. By default go to the root. + * Navigate to a code-server endpoint (root by default). Then wait for the + * editor to become available. */ async navigate(endpoint = "/") { const to = new URL(endpoint, await this.codeServer.address()) await this.page.goto(to.toString(), { waitUntil: "networkidle" }) + + // Only reload editor if authenticated. Otherwise we'll get stuck + // reloading the login page. + if (this.authenticated) { + await this.reloadUntilEditorIsReady() + } } /** @@ -456,21 +465,7 @@ export class CodeServerPage { } /** - * Navigates to code-server then reloads until the editor is ready. - * - * It is recommended to run setup before using this model in any tests. - */ - async setup(authenticated: boolean, endpoint = "/") { - await this.navigate(endpoint) - // If we aren't authenticated we'll see a login page so we can't wait until - // the editor is ready. - if (authenticated) { - await this.reloadUntilEditorIsReady() - } - } - - /** - * Execute a command in t root of the instance's workspace directory. + * Execute a command in the root of the instance's workspace directory. */ async exec(command: string): Promise { await util.promisify(cp.exec)(command, { @@ -488,4 +483,15 @@ export class CodeServerPage { cwd: path.join(__dirname, "../../.."), }) } + + /** + * Wait for state to be flushed to the database. + */ + async stateFlush(): Promise { + // If we reload too quickly VS Code will be unable to save the state changes + // so wait until those have been written to the database. It flushes every + // five seconds so we need to wait at least that long. + // TODO@asher: There must be a better way. + await this.page.waitForTimeout(5500) + } } diff --git a/vendor/package.json b/vendor/package.json index 9d00927be932..86f905adf1f1 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#bd734e3d9f21b1bce4dabab2514177e90c090ee6" + "code-oss-dev": "coder/vscode#94384412221f432c15bb679315c49964925090be" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index 9a5eff2e1988..14b8b6f42202 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -274,9 +274,9 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#bd734e3d9f21b1bce4dabab2514177e90c090ee6: +code-oss-dev@coder/vscode#94384412221f432c15bb679315c49964925090be: version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/bd734e3d9f21b1bce4dabab2514177e90c090ee6" + resolved "https://codeload.github.com/coder/vscode/tar.gz/94384412221f432c15bb679315c49964925090be" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" "@parcel/watcher" "2.0.3" From 7aa087ae34d323a88df9517f1cd1f577095f1a7b Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 3 Mar 2022 14:46:17 -0600 Subject: [PATCH 036/760] release: v4.1.0 (#4946) * release: bump version to 4.1.0 * Rename VS Code to Code in changelog * Catch up changelog * Add release as valid semantic tag --- .github/semantic.yaml | 3 ++ CHANGELOG.md | 61 ++++++++++++++++++++++++++++++++------- ci/helm-chart/Chart.yaml | 4 +-- ci/helm-chart/values.yaml | 2 +- docs/MAINTAINING.md | 1 - docs/README.md | 2 +- docs/collaboration.md | 2 +- docs/helm.md | 4 +-- docs/manifest.json | 2 +- package.json | 2 +- 10 files changed, 62 insertions(+), 21 deletions(-) diff --git a/.github/semantic.yaml b/.github/semantic.yaml index 27a663ed5662..55d345cc2ac9 100644 --- a/.github/semantic.yaml +++ b/.github/semantic.yaml @@ -61,3 +61,6 @@ types: # implementations. For example, if a commit adds a fix + test, it's a fix # commit. If a commit is simply bumping coverage, it's a test commit. - test + + # A new release. + - release diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4d25b71382..93e10f48249e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,15 +22,54 @@ VS Code v99.99.999 ## [Unreleased](https://github.com/coder/code-server/releases) -VS Code v0.00.0 +Code v0.00.0 ### Changed - Add here +## [4.1.0](https://github.com/coder/code-server/releases/tag/v4.1.0) - 2022-03-03 + +Code v1.63.0 + +### Added + +- Support for injecting GitHub token into Code so extensions can make use of it. + This can be done with the `GITHUB_TOKEN` environment variable or `github-auth` + in the config file. +- New flag `--socket-mode` allows setting the mode (file permissions) of the + socket created when using `--socket`. +- The version of Code bundled with code-server now appears when using the + `--version` flag. For example: `4.0.2 5cdfe74686aa73e023f8354a9a6014eb30caa7dd with Code 1.63.0`. + If you have been parsing this flag for the version you might want to use + `--version --json` instead as doing that will be more stable. + +### Changed + +- The workspace or folder passed on the CLI will now use the same redirect + method that the last opened workspace or folder uses. This means if you use + something like `code-server /path/to/dir` you will now get a query parameter + added (like so: `my-domain.tld?folder=/path/to/dir`), making it easier to edit + by hand and making it consistent with the last opened and menu open behaviors. +- The folder/workspace query parameter no longer has encoded slashes, making + them more readable and editable by hand. This was only affecting the last + opened behavior, not opens from the menu. + +### Fixed + +- Fix web sockets not connecting when using `--cert`. +- Prevent workspace state collisions when opening a workspace that shares the + same file path with another workspace on a different machine that shares the + same domain. This was causing files opened in one workspace to be "re-"opened + in the other workspace when the other workspace is opened. +- Pin the Express version which should make installing from npm work again. +- Propagate signals to code-server in the Docker image which means it should + stop more quickly and gracefully. +- Fix missing argon binaries in the standalone releases on arm machines. + ## [4.0.2](https://github.com/coder/code-server/releases/tag/v4.0.2) - 2022-01-27 -VS Code v1.63.0 +Code v1.63.0 ### Fixed @@ -41,7 +80,7 @@ VS Code v1.63.0 ## [4.0.1](https://github.com/coder/code-server/releases/tag/v4.0.1) - 2022-01-04 -VS Code v1.63.0 +Code v1.63.0 code-server has been rebased on upstream's newly open-sourced server implementation (#4414). @@ -57,7 +96,7 @@ implementation (#4414). settings file (we rely on the already-existing query object instead). - The marketplace override environment variables `SERVICE_URL` and `ITEM_URL` have been replaced with a single `EXTENSIONS_GALLERY` variable that - corresponds to `extensionsGallery` in VS Code's `product.json`. + corresponds to `extensionsGallery` in Code's `product.json`. ### Added @@ -79,11 +118,11 @@ implementation (#4414). ## [3.12.0](https://github.com/coder/code-server/releases/tag/v3.12.0) - 2021-09-15 -VS Code v1.60.0 +Code v1.60.0 ### Changed -- Upgrade VS Code to 1.60.0. +- Upgrade Code to 1.60.0. ### Fixed @@ -99,7 +138,7 @@ Undocumented (see releases page). ## [3.10.2](https://github.com/coder/code-server/releases/tag/v3.10.2) - 2021-05-21 -VS Code v1.56.1 +Code v1.56.1 ### Added @@ -115,7 +154,7 @@ VS Code v1.56.1 ## [3.10.1](https://github.com/coder/code-server/releases/tag/v3.10.1) - 2021-05-17 -VS Code v1.56.1 +Code v1.56.1 ### Fixed @@ -129,13 +168,13 @@ VS Code v1.56.1 ## [3.10.0](https://github.com/coder/code-server/releases/tag/v3.10.0) - 2021-05-10 -VS Code v1.56.0 +Code v1.56.0 ### Changed -- Update to VS Code 1.56.0 (#3269). +- Update to Code 1.56.0 (#3269). - Minor connections refactor (#3178). Improves connection stability. -- Use ptyHostService (#3308). This brings us closer to upstream VS Code. +- Use ptyHostService (#3308). This brings us closer to upstream Code. ### Added diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml index c68fb2b20c4e..814d53e3adb0 100644 --- a/ci/helm-chart/Chart.yaml +++ b/ci/helm-chart/Chart.yaml @@ -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: 2.1.0 +version: 2.2.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: 4.0.2 +appVersion: 4.1.0 diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml index f37771999fe2..91df6bc8a0e2 100644 --- a/ci/helm-chart/values.yaml +++ b/ci/helm-chart/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: codercom/code-server - tag: '4.0.2' + tag: '4.1.0' pullPolicy: Always # Specifies one or more secrets to be used when pulling images from a diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index 8bec1e9c4d7f..7e0c0c24812a 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -34,7 +34,6 @@ as well as share our workflow for maintaining the project. Current maintainers: - @code-asher -- @TeffenEllis - @jsjoeio Occasionally, other Coder employees may step in time to time to assist with code-server. diff --git a/docs/README.md b/docs/README.md index f02649af76c6..ef4ba16cd65a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # code-server -[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.0.2 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.0.2%20&color=blue)](https://github.com/coder/code-server/tree/v4.0.2/docs) +[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See v4.1.0 docs](https://img.shields.io/static/v1?label=Docs&message=see%20v4.1.0%20&color=blue)](https://github.com/coder/code-server/tree/v4.1.0/docs) Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. diff --git a/docs/collaboration.md b/docs/collaboration.md index 5ae803d5b937..170de027ba1a 100644 --- a/docs/collaboration.md +++ b/docs/collaboration.md @@ -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/v4.0.2/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.1.0/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. diff --git a/docs/helm.md b/docs/helm.md index b404919c5917..17d99f3a77a7 100644 --- a/docs/helm.md +++ b/docs/helm.md @@ -1,6 +1,6 @@ # code-server Helm Chart -[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.0.2](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.0.2-informational?style=flat-square) +[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.1.0](https://img.shields.io/badge/AppVersion-4.1.0-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.1.0-informational?style=flat-square) [code-server](https://github.com/coder/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 | `"4.0.2"` | +| image.tag | string | `"4.1.0"` | | imagePullSecrets | list | `[]` | | ingress.enabled | bool | `false` | | nameOverride | string | `""` | diff --git a/docs/manifest.json b/docs/manifest.json index 8f0265078ddd..875fd90497c3 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1,5 +1,5 @@ { - "versions": ["v4.0.2"], + "versions": ["v4.1.0"], "routes": [ { "title": "Home", diff --git a/package.json b/package.json index 759cfe0236f9..d279add6f8e3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-server", "license": "MIT", - "version": "4.0.2", + "version": "4.1.0", "description": "Run VS Code on a remote server.", "homepage": "https://github.com/coder/code-server", "bugs": { From f0faa22ee98cc80c0530638cba92cdcb9f10fc56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Mar 2022 09:25:12 -0700 Subject: [PATCH 037/760] chore(deps): update actions/upload-artifact action to v3 (#4944) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6906cc145647..81e0330adcb6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -179,7 +179,7 @@ jobs: run: tar -czf package.tar.gz release - name: Upload npm package artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: npm-package path: ./package.tar.gz @@ -268,7 +268,7 @@ jobs: run: yarn package - name: Upload release artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: release-packages path: ./release-packages @@ -352,7 +352,7 @@ jobs: run: yarn package ${NPM_CONFIG_ARCH} - name: Upload release artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: release-packages path: ./release-packages @@ -393,7 +393,7 @@ jobs: run: yarn package - name: Upload release artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: release-packages path: ./release-packages @@ -450,7 +450,7 @@ jobs: - name: Upload test artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: failed-test-videos path: ./test/test-results From 3c6f85c282c53fbd264d03013bae3652b4a63421 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 4 Mar 2022 15:59:29 -0700 Subject: [PATCH 038/760] fix: re-enable trivvy docker scan (#4943) * fix: re-enable trivvy docker scan * wip * fixup * fixup * fixup --- .github/workflows/ci.yaml | 1 - .github/workflows/trivy-docker.yaml | 65 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/trivy-docker.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81e0330adcb6..22ebdc2d2b33 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -464,7 +464,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - name: Run Trivy vulnerability scanner in repo mode - #Commit SHA for v0.0.17 uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18 with: scan-type: "fs" diff --git a/.github/workflows/trivy-docker.yaml b/.github/workflows/trivy-docker.yaml new file mode 100644 index 000000000000..ae5c266659fd --- /dev/null +++ b/.github/workflows/trivy-docker.yaml @@ -0,0 +1,65 @@ +name: Trivy Nightly Docker Scan + +on: + # Run scans if the workflow is modified, in order to test the + # workflow itself. This results in some spurious notifications, + # but seems okay for testing. + pull_request: + branches: + - main + paths: + - .github/workflows/trivy-docker.yaml + + # Run scans against master whenever changes are merged. + push: + branches: + - main + paths: + - .github/workflows/trivy-docker.yaml + + schedule: + # Run at 10:15 am UTC (3:15am PT/5:15am CT) + # Run at 0 minutes 0 hours of every day. + - cron: "15 10 * * *" + + workflow_dispatch: + +permissions: + actions: none + checks: none + contents: read + deployments: none + issues: none + packages: none + pull-requests: none + repository-projects: none + security-events: none + statuses: none + +# Cancel in-progress runs for pull requests when developers push +# additional changes, and serialize builds in branches. +# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +jobs: + trivy-scan-image: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run Trivy vulnerability scanner in image mode + uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18 + with: + image-ref: "docker.io/codercom/code-server:latest" + ignore-unfixed: true + format: "sarif" + output: "trivy-image-results.sarif" + severity: "HIGH,CRITICAL" + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: "trivy-image-results.sarif" From 643ef1392f8b1f8b6601dbac8224834b00d0d9c7 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 7 Mar 2022 16:08:07 -0700 Subject: [PATCH 039/760] testing: add new test for logLevels (#4953) * feat: add new test for logLevels * wip * feat: add test for valid log level env var --- test/unit/node/cli.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index ec3f5ab6279c..47d02aece847 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -194,6 +194,15 @@ describe("parser", () => { expect(logger.level).toEqual(Level.Trace) }) + it("should set valid log level env var", async () => { + process.env.LOG_LEVEL = "error" + const defaults = await setDefaults(parse([])) + expect(defaults).toEqual({ + ...defaults, + log: "error", + }) + }) + it("should ignore invalid log level env var", async () => { process.env.LOG_LEVEL = "bogus" const defaults = await setDefaults(parse([])) From 3b93a86f25a783faabf700d51ba5dd6d078c0741 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 8 Mar 2022 13:19:57 -0700 Subject: [PATCH 040/760] chore: add permissions trivy-docker (#4957) * chore: add permissions trivy-docker * Update .github/workflows/trivy-docker.yaml --- .github/workflows/trivy-docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trivy-docker.yaml b/.github/workflows/trivy-docker.yaml index ae5c266659fd..827a9905ab2f 100644 --- a/.github/workflows/trivy-docker.yaml +++ b/.github/workflows/trivy-docker.yaml @@ -33,7 +33,7 @@ permissions: packages: none pull-requests: none repository-projects: none - security-events: none + security-events: write statuses: none # Cancel in-progress runs for pull requests when developers push From 03e0bdac0391a7103ce1edda95c5d2149229a252 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 9 Mar 2022 14:28:52 -0700 Subject: [PATCH 041/760] chore: update vscode to 1.64 (#4902) * chore: update vscode server files * chore: update code to 1.64 * refactor: clean up code in constants.ts * chore: keep package.json vscode cache * fixup!: formatting * feat(ci): add VSCODE_CACHE_VERSION * fix(ci): add package.json for e2e tests * fix: TS errors * refactor: remove isConnected e2e tests --- .github/workflows/ci.yaml | 13 +- src/node/constants.ts | 10 +- src/node/main.ts | 4 +- src/node/routes/vscode.ts | 7 +- test/e2e/codeServer.test.ts | 4 - test/e2e/models/CodeServer.ts | 48 +++---- vendor/package.json | 2 +- vendor/yarn.lock | 235 +++++++++++++++++++--------------- 8 files changed, 165 insertions(+), 158 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 22ebdc2d2b33..54381c20b4e6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -143,18 +143,19 @@ jobs: run: echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' vendor/package.json | sed -r 's|.*#(.*)$|\1|')" - name: Attempt to fetch vscode build from cache - id: cache-vscode + id: cache-vscode-2 uses: actions/cache@v2 with: path: | vendor/modules/code-oss-dev/.build + vendor/modules/code-oss-dev/package.json vendor/modules/code-oss-dev/out-build vendor/modules/code-oss-dev/out-vscode-reh-web vendor/modules/code-oss-dev/out-vscode-reh-web-min - key: vscode-reh-build-${{ steps.vscode-rev.outputs.rev }} + key: vscode-reh-build-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }} - name: Build vscode - if: steps.cache-vscode.outputs.cache-hit != 'true' + if: steps.cache-vscode-2.outputs.cache-hit != 'true' run: yarn build:vscode # Our code imports code from VS Code's `out` directory meaning VS Code @@ -445,6 +446,12 @@ jobs: ./test/node_modules/.bin/playwright install-deps ./test/node_modules/.bin/playwright install + # TODO@jsjoeio - remove once we switch to submodules. + - name: Create package.json for testing + run: | + mkdir -p ./vendor/modules/code-oss-dev + echo '{ "version": "test" }' > ./vendor/modules/code-oss-dev/package.json + - name: Run end-to-end tests run: yarn test:e2e diff --git a/src/node/constants.ts b/src/node/constants.ts index e27e9a4d8ce7..1670d858b843 100644 --- a/src/node/constants.ts +++ b/src/node/constants.ts @@ -16,14 +16,14 @@ export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJso return pkg } -const pkg = getPackageJson("../../package.json") -const codePkg = getPackageJson("../../vendor/modules/code-oss-dev/package.json") - +export const rootPath = path.resolve(__dirname, "../..") +export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev") +const PACKAGE_JSON = "package.json" +const pkg = getPackageJson(`${rootPath}/${PACKAGE_JSON}`) +const codePkg = getPackageJson(`${vsRootPath}/${PACKAGE_JSON}`) || { version: "0.0.0" } export const pkgName = pkg.name || "code-server" export const version = pkg.version || "development" export const commit = pkg.commit || "development" -export const rootPath = path.resolve(__dirname, "../..") -export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev") export const codeVersion = codePkg.version || "development" export const tmpdir = path.join(os.tmpdir(), "code-server") export const isDevMode = commit === "development" diff --git a/src/node/main.ts b/src/node/main.ts index eb5a5be0450d..55ca2c4a4533 100644 --- a/src/node/main.ts +++ b/src/node/main.ts @@ -31,8 +31,8 @@ export const shouldSpawnCliProcess = (args: UserProvidedArgs): boolean => { export const runVsCodeCli = async (args: DefaultedArgs): Promise => { logger.debug("Running VS Code CLI") - // See ../../vendor/modules/code-oss-dev/src/vs/server/main.js. - const spawnCli = await loadAMDModule("vs/server/remoteExtensionHostAgent", "spawnCli") + // See ../../vendor/modules/code-oss-dev/src/vs/server/node/server.main.js. + const spawnCli = await loadAMDModule("vs/server/node/server.main", "spawnCli") try { await spawnCli(await toVsCodeArgs(args)) diff --git a/src/node/routes/vscode.ts b/src/node/routes/vscode.ts index b137bfcd5373..f03324c42608 100644 --- a/src/node/routes/vscode.ts +++ b/src/node/routes/vscode.ts @@ -118,12 +118,9 @@ export class CodeServerRouteWrapper { const { args } = req /** - * @file ../../../vendor/modules/code-oss-dev/src/vs/server/main.js + * @file ../../../vendor/modules/code-oss-dev/src/vs/server/node/server.main.js */ - const createVSServer = await loadAMDModule( - "vs/server/remoteExtensionHostAgent", - "createServer", - ) + const createVSServer = await loadAMDModule("vs/server/node/server.main", "createServer") try { this._codeServerMain = await createVSServer(null, { diff --git a/test/e2e/codeServer.test.ts b/test/e2e/codeServer.test.ts index 30e8cc6c5b9c..0dcbbce130b0 100644 --- a/test/e2e/codeServer.test.ts +++ b/test/e2e/codeServer.test.ts @@ -55,10 +55,6 @@ describe("code-server", true, [], {}, () => { expect(await codeServerPage.isEditorVisible()).toBe(true) }) - test("should always have a connection", async ({ codeServerPage }) => { - expect(await codeServerPage.isConnected()).toBe(true) - }) - test("should show the Integrated Terminal", async ({ codeServerPage }) => { await codeServerPage.focusTerminal() expect(await codeServerPage.page.isVisible("#terminal")).toBe(true) diff --git a/test/e2e/models/CodeServer.ts b/test/e2e/models/CodeServer.ts index 004fd99f06d5..e2bbdc1d6920 100644 --- a/test/e2e/models/CodeServer.ts +++ b/test/e2e/models/CodeServer.ts @@ -20,14 +20,14 @@ class Context { public canceled(): boolean { return this._canceled } - public done(): void { - this._done = true + public finished(): boolean { + return this._done } public cancel(): void { this._canceled = true } - public finish(): boolean { - return this._done + public finish(): void { + this._done = true } } @@ -43,7 +43,7 @@ export class CodeServer { name: string, private readonly args: string[], private readonly env: NodeJS.ProcessEnv, - private readonly _workspaceDir: Promise | string | undefined, + private _workspaceDir: Promise | string | undefined, private readonly entry = process.env.CODE_SERVER_TEST_ENTRY || ".", ) { this.logger = logger.named(name) @@ -64,7 +64,7 @@ export class CodeServer { /** * The workspace directory code-server opens with. */ - get workspaceDir(): Promise { + get workspaceDir(): Promise | string { if (!this._workspaceDir) { this._workspaceDir = tmpdir(workspaceDir) } @@ -198,7 +198,7 @@ export class CodeServerPage { private readonly authenticated: boolean, ) { this.page.on("console", (message) => { - this.codeServer.logger.debug(message) + this.codeServer.logger.debug(message.text()) }) this.page.on("pageerror", (error) => { logError(this.codeServer.logger, "page", error) @@ -241,14 +241,13 @@ export class CodeServerPage { this.codeServer.logger.debug("Waiting for editor to be ready...") const editorIsVisible = await this.isEditorVisible() - const editorIsConnected = await this.isConnected() let reloadCount = 0 // Occassionally code-server timeouts in Firefox // we're not sure why // but usually a reload or two fixes it // TODO@jsjoeio @oxy look into Firefox reconnection/timeout issues - while (!editorIsVisible && !editorIsConnected) { + while (!editorIsVisible) { // When a reload happens, we want to wait for all resources to be // loaded completely. Hence why we use that instead of DOMContentLoaded // Read more: https://thisthat.dev/dom-content-loaded-vs-load/ @@ -256,7 +255,7 @@ export class CodeServerPage { // Give it an extra second just in case it's feeling extra slow await this.page.waitForTimeout(1000) reloadCount += 1 - if ((await this.isEditorVisible()) && (await this.isConnected())) { + if (await this.isEditorVisible()) { this.codeServer.logger.debug(`editor became ready after ${reloadCount} reloads`) break } @@ -280,23 +279,6 @@ export class CodeServerPage { return visible } - /** - * Checks if the editor is visible - */ - async isConnected() { - this.codeServer.logger.debug("Waiting for network idle...") - - await this.page.waitForLoadState("networkidle") - - const host = new URL(await this.codeServer.address()).host - // NOTE: This seems to be pretty brittle between version changes. - const hostSelector = `[aria-label="remote ${host}"]` - this.codeServer.logger.debug(`Waiting selector: ${hostSelector}`) - await this.page.waitForSelector(hostSelector) - - return await this.page.isVisible(hostSelector) - } - /** * Focuses Integrated Terminal * by using "Terminal: Focus Terminal" @@ -326,13 +308,13 @@ export class CodeServerPage { * Wait for a tab to open for the specified file. */ async waitForTab(file: string): Promise { - return this.page.waitForSelector(`.tab :text("${path.basename(file)}")`) + await this.page.waitForSelector(`.tab :text("${path.basename(file)}")`) } /** * See if the specified tab is open. */ - async tabIsVisible(file: string): Promise { + async tabIsVisible(file: string): Promise { return this.page.isVisible(`.tab :text("${path.basename(file)}")`) } @@ -368,8 +350,8 @@ export class CodeServerPage { try { await this.page.waitForSelector(`${selector}:not(:focus-within)`) } catch (error) { - if (!ctx.done()) { - this.codeServer.logger.debug(`${selector} navigation: ${error.message || error}`) + if (!ctx.finished()) { + this.codeServer.logger.debug(`${selector} navigation: ${(error as any).message || error}`) } } return false @@ -423,7 +405,7 @@ export class CodeServerPage { return false } } catch (error) { - logger.debug(`navigation: ${error.message || error}`) + logger.debug(`navigation: ${(error as any).message || error}`) return false } } @@ -436,7 +418,7 @@ export class CodeServerPage { // time we lose focus or there is an error. let attempts = 1 let context = new Context() - while (!(await Promise.race([openThenWaitClose(), navigate(context)]))) { + while (!(await Promise.race([openThenWaitClose(context), navigate(context)]))) { ++attempts logger.debug("closed, retrying (${attempt}/∞)") context.cancel() diff --git a/vendor/package.json b/vendor/package.json index 86f905adf1f1..1deddd2c8864 100644 --- a/vendor/package.json +++ b/vendor/package.json @@ -7,6 +7,6 @@ "postinstall": "./postinstall.sh" }, "devDependencies": { - "code-oss-dev": "coder/vscode#94384412221f432c15bb679315c49964925090be" + "code-oss-dev": "coder/vscode#a13f6e1434ad6ab820eef0ecca5b923b3e275667" } } diff --git a/vendor/yarn.lock b/vendor/yarn.lock index 14b8b6f42202..ac088bb7a8a3 100644 --- a/vendor/yarn.lock +++ b/vendor/yarn.lock @@ -99,10 +99,10 @@ 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== +"@parcel/watcher@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.5.tgz#f913a54e1601b0aac972803829b0eece48de215b" + integrity sha512-x0hUbjv891omnkcHD7ZOhiyyUqUUR6MNjq89JhEI3BxppeKWAm6NPQsqqRrAkCJBogdT/o/My21sXtTI9rJIsw== dependencies: node-addon-api "^3.2.1" node-gyp-build "^4.3.0" @@ -129,6 +129,24 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.17.tgz#4ec7b71bbcb01a4e55455b60b18b1b6a783fe31d" integrity sha512-niAjcewgEYvSPCZm3OaM9y6YQrL2SEPH9PymtE6fuZAvFiP6ereCcvApGl2jKTq7copTIguX3PBvfP08LN4LvQ== +"@vscode/debugprotocol@1.51.0": + version "1.51.0" + resolved "https://registry.yarnpkg.com/@vscode/debugprotocol/-/debugprotocol-1.51.0.tgz#1d28a8581f8ea74b8e2fd465d4448717589a0ae3" + integrity sha512-39ShbKzI+0r53haLZQVEhY4XhdMJVSqfcliaDFigQjqiWattno5Ex0jXq2WRHrAtPf+W5Un9/HtED0K3pAiqZg== + +"@vscode/iconv-lite-umd@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48" + integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg== + +"@vscode/ripgrep@^1.14.1": + version "1.14.2" + resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.14.2.tgz#47c0eec2b64f53d8f7e1b5ffd22a62e229191c34" + integrity sha512-KDaehS8Jfdg1dqStaIPDKYh66jzKd5jy5aYEPzIv0JYFLADPsCSQPBUdsJVXnr0t72OlDcj96W05xt/rSnNFFQ== + dependencies: + https-proxy-agent "^5.0.0" + proxy-from-env "^1.1.0" + "@vscode/sqlite3@4.0.12": version "4.0.12" resolved "https://registry.yarnpkg.com/@vscode/sqlite3/-/sqlite3-4.0.12.tgz#50b36c788b5d130c02612b27eaf6905dc2156a43" @@ -146,6 +164,11 @@ resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz#89b48f293f6aa3341bb888c1118d16ff13b032d3" integrity sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g== +"@vscode/windows-registry@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.0.5.tgz#a6c463ac123ee7b23f9b90935aea086a97a778dc" + integrity sha512-xEA/L3ki8qMSer3hwdm590G43YCjpMb7evqS5aSPFFAhAYepvVr12/szKFgx1v1aQHOcR2riWg5YqBLajOZoaw== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -153,11 +176,6 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -175,14 +193,15 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -applicationinsights@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5" - integrity sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg== +applicationinsights@1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.4.2.tgz#2f25f7a3f3e5bf0ab4486b63e42a48a9ec321d52" + integrity sha512-1wE37G9zEMZTsPJVQ8BDrQtsGgG3DGMActLHwPAF8TYHAXkfqqpeZYCH0XV4lUZ7H4MffRMwN2Ln2nEtUmT8HQ== dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" diagnostic-channel "0.2.0" - diagnostic-channel-publishers "0.2.1" - zone.js "0.7.6" + diagnostic-channel-publishers "^0.3.3" aproba@^1.0.3: version "1.2.0" @@ -197,6 +216,21 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -274,21 +308,31 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -code-oss-dev@coder/vscode#94384412221f432c15bb679315c49964925090be: - version "1.63.0" - resolved "https://codeload.github.com/coder/vscode/tar.gz/94384412221f432c15bb679315c49964925090be" +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +code-oss-dev@coder/vscode#a13f6e1434ad6ab820eef0ecca5b923b3e275667: + version "1.64.2" + resolved "https://codeload.github.com/coder/vscode/tar.gz/a13f6e1434ad6ab820eef0ecca5b923b3e275667" dependencies: "@microsoft/applicationinsights-web" "^2.6.4" - "@parcel/watcher" "2.0.3" + "@parcel/watcher" "2.0.5" + "@vscode/debugprotocol" "1.51.0" + "@vscode/iconv-lite-umd" "0.7.0" + "@vscode/ripgrep" "^1.14.1" "@vscode/sqlite3" "4.0.12" "@vscode/sudo-prompt" "9.3.1" "@vscode/vscode-languagedetection" "1.0.21" - applicationinsights "1.0.8" - cookie "^0.4.1" + applicationinsights "1.4.2" graceful-fs "4.2.8" http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.3" - iconv-lite-umd "0.6.10" jschardet "3.0.0" minimist "^1.2.5" native-is-elevated "0.4.3" @@ -296,22 +340,21 @@ code-oss-dev@coder/vscode#94384412221f432c15bb679315c49964925090be: node-pty "0.11.0-beta11" spdlog "^0.13.0" tas-client-umd "0.1.4" - v8-inspect-profiler "^0.0.22" - vscode-nsfw "2.1.8" + v8-inspect-profiler "^0.1.0" vscode-oniguruma "1.6.1" vscode-proxy-agent "^0.11.0" vscode-regexpp "^3.1.0" - vscode-ripgrep "^1.12.1" - 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" + vscode-textmate "6.0.0" + xterm "4.17.0-beta.7" + xterm-addon-search "0.9.0-beta.8" + xterm-addon-serialize "0.7.0-beta.6" xterm-addon-unicode11 "0.4.0-beta.1" - xterm-addon-webgl "0.12.0-beta.16" - xterm-headless "4.16.0-beta.2" + xterm-addon-webgl "0.12.0-beta.21" + xterm-headless "4.17.0-beta.7" yauzl "^2.9.2" yazl "^2.4.3" optionalDependencies: + "@vscode/windows-registry" "1.0.5" electron "13.5.1" keytar "7.2.0" native-keymap "3.0.1" @@ -353,10 +396,13 @@ 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== +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" core-js@^3.6.5: version "3.17.3" @@ -447,10 +493,10 @@ detect-node@^2.0.4: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== -diagnostic-channel-publishers@0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3" - integrity sha1-ji1geottef6IC1SLxYzGvrKIxPM= +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== diagnostic-channel@0.2.0: version "0.2.0" @@ -473,6 +519,13 @@ electron@13.5.1: "@types/node" "^14.6.2" extract-zip "^1.0.3" +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + encodeurl@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -698,14 +751,6 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== - dependencies: - agent-base "5" - debug "4" - https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -714,11 +759,6 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -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" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -911,11 +951,6 @@ node-addon-api@^3.0.0, node-addon-api@^3.0.2, node-addon-api@^3.2.1: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-addon-api@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.2.0.tgz#117cbb5a959dff0992e1c586ae0393573e4d2a87" - integrity sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q== - 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" @@ -1145,6 +1180,11 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + signal-exit@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -1200,6 +1240,11 @@ sprintf-js@^1.1.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -1332,20 +1377,13 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -v8-inspect-profiler@^0.0.22: - version "0.0.22" - resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.0.22.tgz#34d3ba35a965c437ed28279d31cd42d7698a4002" - integrity sha512-r2p7UkbFlFopAWUVprbECP+EpdjuEKPFQLhqpnHx9KxeTTLVaHuGpUNHye53MtYMoJFl9nJiMyIM7J2yY+dTQg== +v8-inspect-profiler@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.1.0.tgz#0d3f80e2dc878f737c31ae7ff4c033425a33a724" + integrity sha512-K7RyY4p59+rIPvgcTN/Oo7VU9cJ68LOl+dz8RCh/M4VwbZ9yS3Ci+qajbMDojW207anNn7CehkLvqpSIrNT9oA== dependencies: chrome-remote-interface "0.28.2" -vscode-nsfw@2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/vscode-nsfw/-/vscode-nsfw-2.1.8.tgz#88f5e56b22b2fd0be582e73eb1158ea8257f6c6c" - integrity sha512-tFnxPIuM65czw/Kjz8KXD88fIJtnCjzQ0ighS0a1yasVv6jKkANAlGffiOitTLMkDjvFCY8OyP6xjarTkpu/VQ== - dependencies: - node-addon-api "^4.2.0" - vscode-oniguruma@1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz#2bf4dfcfe3dd2e56eb549a3068c8ee39e6c30ce5" @@ -1371,18 +1409,10 @@ vscode-regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f" integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg== -vscode-ripgrep@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.12.1.tgz#4a319809d4010ea230659ce605fddacd1e36a589" - integrity sha512-4edKlcXNSKdC9mIQmQ9Wl25v0SF5DOK31JlvKHKHYV4co0V2MjI9pbDPdmogwbtiykz+kFV/cKnZH2TgssEasQ== - dependencies: - https-proxy-agent "^4.0.0" - proxy-from-env "^1.1.0" - -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-textmate@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz#a3777197235036814ac9a92451492f2748589210" + integrity sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ== vscode-windows-ca-certs@^0.3.0: version "0.3.0" @@ -1438,35 +1468,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.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-search@0.9.0-beta.8: + version "0.9.0-beta.8" + resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.8.tgz#b3cbe364e24ea5765c36cba47c78a14acbe69062" + integrity sha512-FCv5zo6BVc7DaG3kLEOskKDCns7y2fRHqmZDrSmyfCd1lPmm9OA3UYdxZy5BtNkn6bc8amwpB7J2bIdu8VV7Qg== -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-serialize@0.7.0-beta.6: + version "0.7.0-beta.6" + resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.7.0-beta.6.tgz#f1512f0690821d0c2a88700fb706c1212f69a39a" + integrity sha512-tP/larcKOQaCgfq5XlQT8plTRwi2fZHqy8UqbMnZ6LQZajvc01oGp5njaasfXu5vyIFhugp5fgH5vy5zgspbwg== 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.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-addon-webgl@0.12.0-beta.21: + version "0.12.0-beta.21" + resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.21.tgz#8c476d25ec40b7535dedbd87b9cdf5eeeb41fc93" + integrity sha512-aeZcjxbtPfkVutNnXqCv9E5V4DoYecUFztWOjBzI/dgC1xfMOMVWzsymK9H1EUfd6u0ymEIeOjvX9bHsXNUzdA== -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-headless@4.17.0-beta.7: + version "4.17.0-beta.7" + resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.17.0-beta.7.tgz#6ae3f5436a29f7e4554c6d9d7f4f3eb958d18240" + integrity sha512-1JoKhlsENqWqDIKNHxm5jBQj3Es3gHHM+wDi9ESyodn6J+FpTkM5859wnL+/rEm7PKKvahPICqjTSjdXq5Jv9g== -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== +xterm@4.17.0-beta.7: + version "4.17.0-beta.7" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.17.0-beta.7.tgz#c11d52403a8d6456b92f2086e1797c64018328d6" + integrity sha512-FhC12WUljy8pTWr0oquVE0U567H1ZPAREKkN+wWLSZODNJwc8/txP2Ajg9byG++bkxfBP3CNEmDzaP0hoall8Q== yallist@^4.0.0: version "4.0.0" @@ -1487,8 +1517,3 @@ yazl@^2.4.3: integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== dependencies: buffer-crc32 "~0.2.3" - -zone.js@0.7.6: - version "0.7.6" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.6.tgz#fbbc39d3e0261d0986f1ba06306eb3aeb0d22009" - integrity sha1-+7w50+AmHQmG8boGMG6zrrDSIAk= From 52eaea9f7af559113de361d6959dec796e571feb Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Thu, 10 Mar 2022 17:44:27 -0300 Subject: [PATCH 042/760] docs: update docs preview (#4968) * docs: update docs preview * Fix Ubuntu deps * Fix formatting --- .github/workflows/docs-preview.yaml | 79 +++-------------------------- 1 file changed, 7 insertions(+), 72 deletions(-) diff --git a/.github/workflows/docs-preview.yaml b/.github/workflows/docs-preview.yaml index df149117578d..42021b5400ae 100644 --- a/.github/workflows/docs-preview.yaml +++ b/.github/workflows/docs-preview.yaml @@ -17,89 +17,24 @@ permissions: security-events: none statuses: none -# Cancel in-progress runs for pull requests when developers push -# additional changes, and serialize builds in branches. -# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - jobs: preview: name: Docs preview runs-on: ubuntu-20.04 - environment: CI - # Only run if PR comes from base repo - # Reason: forks cannot access secrets and this will always fail - if: github.event.pull_request.head.repo.full_name == github.repository steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - - - name: Checkout m - uses: actions/checkout@v3 - with: - repository: coder/m - ref: refs/heads/master - ssh-key: ${{ secrets.READONLY_M_DEPLOY_KEY }} - submodules: true - fetch-depth: 0 - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 14 - - - name: Cache Node Modules - uses: actions/cache@v2 - with: - path: "/node_modules" - key: node-${{ hashFiles('yarn.lock') }} - - - name: Create Deployment - id: deployment - run: ./ci/scripts/github_deployment.sh create - env: - GITHUB_TOKEN: ${{ github.token }} - DEPLOY_ENVIRONMENT: codercom-preview-docs - - - name: Deploy Preview to Vercel - id: preview - run: ./ci/scripts/deploy_vercel.sh - env: - VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r - VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - CODE_SERVER_DOCS_MAIN_BRANCH: ${{ github.event.pull_request.head.sha }} + - uses: actions/checkout@v3 - - name: Install node_modules - run: yarn install - - - name: Check docs - run: yarn ts-node ./product/coder.com/site/scripts/checkDocs.ts - env: - BASE_URL: ${{ steps.preview.outputs.url }} - - - name: Update Deployment - # If we don't specify always, it won't run this check if failed. - # This means the deployment would be stuck pending. - if: always() - run: ./ci/scripts/github_deployment.sh update - env: - GITHUB_DEPLOYMENT: ${{ steps.deployment.outputs.id }} - GITHUB_TOKEN: ${{ github.token }} - DEPLOY_STATUS: ${{ steps.preview.outcome }} - DEPLOY_URL: ${{ steps.preview.outputs.url }} + - name: Set outputs + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Comment Credentials uses: marocchino/sticky-pull-request-comment@v2 - if: always() with: header: codercom-preview-docs message: | - ✨ Coder.com for PR #${{ github.event.number }} deployed! It will be updated on every commit. - - * _Host_: ${{ steps.preview.outputs.url }}/docs/code-server - * _Last deploy status_: ${{ steps.preview.outcome }} + ✨ code-server docs for PR #${{ github.event.number }} is ready! It will be updated on every commit. + * _Host_: https://coder.com/docs/code-server/${{ steps.vars.outputs.sha_short }} + * _Last deploy status_: success * _Commit_: ${{ github.event.pull_request.head.sha }} * _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} From 77296c7187998408a7cfc793974494262aa4a634 Mon Sep 17 00:00:00 2001 From: azriel-stephen <85186840+azriel-stephen@users.noreply.github.com> Date: Fri, 11 Mar 2022 22:19:12 +0530 Subject: [PATCH 043/760] Update guide.md (#4981) Grammatical mistake --- docs/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index 81e37d7d148d..b08a3ed17208 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -52,7 +52,7 @@ There are several approaches to operating and exposing code-server securely: We highly recommend using [port forwarding via SSH](https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding) to access code-server. If you have an SSH server on your remote machine, this approach -doesn't required additional setup. +doesn't require any additional setup at all. The downside to SSH forwarding, however, is that you can't access code-server when using machines without SSH clients (such as iPads). If this applies to you, From 91cabbc246e57ff9ef54ef7e4ef83359ebe84ec6 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 11 Mar 2022 13:27:19 -0700 Subject: [PATCH 044/760] feat(testing): add test for optionDescriptions (#4970) * feat(testing): add test for optionDescriptions * refactor(cli): optional arg in optionDescriptions * feat: add more tests for optionDescriptions --- src/node/cli.ts | 8 +-- test/unit/node/cli.test.ts | 99 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index 503c9cf79a66..2e638c8cf2de 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -120,11 +120,11 @@ type OptionType = T extends boolean ? "string[]" : "unknown" -type Options = { +export type Options = { [P in keyof T]: Option> } -const options: Options> = { +export const options: Options> = { auth: { type: AuthType, description: "The type of authentication to use." }, password: { type: "string", @@ -235,8 +235,8 @@ const options: Options> = { }, } -export const optionDescriptions = (): string[] => { - const entries = Object.entries(options).filter(([, v]) => !!v.description) +export const optionDescriptions = (opts: Partial>> = options): string[] => { + const entries = Object.entries(opts).filter(([, v]) => !!v.description) const widths = entries.reduce( (prev, [k, v]) => ({ long: k.length > prev.long ? k.length : prev.long, diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index 47d02aece847..73cbea17d4b8 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -13,6 +13,11 @@ import { shouldOpenInExistingInstance, splitOnFirstEquals, toVsCodeArgs, + optionDescriptions, + options, + Options, + AuthType, + OptionalString, } from "../../../src/node/cli" import { shouldSpawnCliProcess } from "../../../src/node/main" import { generatePassword, paths } from "../../../src/node/util" @@ -753,3 +758,97 @@ describe("toVsCodeArgs", () => { }) }) }) + +describe("optionDescriptions", () => { + it("should return the descriptions of all the available options", () => { + const expectedOptionDescriptions = Object.entries(options) + .flat() + .filter((item: any) => { + if (item.description) { + return item.description + } + }) + .map((item: any) => item.description) + const actualOptionDescriptions = optionDescriptions() + // We need both the expected and the actual + // Both of these are string[] + // We then loop through the expectedOptionDescriptions + // and check that this expectedDescription exists in the + // actualOptionDescriptions + + // To do that we need to loop through actualOptionDescriptions + // and make sure we have a substring match + expectedOptionDescriptions.forEach((expectedDescription) => { + const exists = actualOptionDescriptions.find((desc) => { + if ( + desc.replace(/\n/g, " ").replace(/ /g, "").includes(expectedDescription.replace(/\n/g, " ").replace(/ /g, "")) + ) { + return true + } + return false + }) + expect(exists).toBeTruthy() + }) + }) + it("should visually align multiple options", () => { + const opts: Partial>> = { + "cert-key": { type: "string", path: true, description: "Path to certificate key when using non-generated cert." }, + "cert-host": { + type: "string", + description: "Hostname to use when generating a self signed certificate.", + }, + "disable-update-check": { + type: "boolean", + description: + "Disable update check. Without this flag, code-server checks every 6 hours against the latest github release and \n" + + "then notifies you once every week that a new release is available.", + }, + } + expect(optionDescriptions(opts)).toStrictEqual([ + " --cert-key Path to certificate key when using non-generated cert.", + " --cert-host Hostname to use when generating a self signed certificate.", + ` --disable-update-check Disable update check. Without this flag, code-server checks every 6 hours against the latest github release and + then notifies you once every week that a new release is available.`, + ]) + }) + it("should add all valid options for enumerated types", () => { + const opts: Partial>> = { + auth: { type: AuthType, description: "The type of authentication to use." }, + } + expect(optionDescriptions(opts)).toStrictEqual([" --auth The type of authentication to use. [password, none]"]) + }) + + it("should show if an option is deprecated", () => { + const opts: Partial>> = { + link: { + type: OptionalString, + description: ` + Securely bind code-server via our cloud service with the passed name. You'll get a URL like + https://hostname-username.coder.co at which you can easily access your code-server instance. + Authorization is done via GitHub. + `, + deprecated: true, + }, + } + expect(optionDescriptions(opts)).toStrictEqual([ + ` --link (deprecated) Securely bind code-server via our cloud service with the passed name. You'll get a URL like + https://hostname-username.coder.co at which you can easily access your code-server instance. + Authorization is done via GitHub.`, + ]) + }) + + it("should show newlines in description", () => { + const opts: Partial>> = { + "install-extension": { + type: "string[]", + description: + "Install or update a VS Code extension by id or vsix. The identifier of an extension is `${publisher}.${name}`.\n" + + "To install a specific version provide `@${version}`. For example: 'vscode.csharp@1.2.3'.", + }, + } + expect(optionDescriptions(opts)).toStrictEqual([ + ` --install-extension Install or update a VS Code extension by id or vsix. The identifier of an extension is \`\${publisher}.\${name}\`. + To install a specific version provide \`@\${version}\`. For example: 'vscode.csharp@1.2.3'.`, + ]) + }) +}) From 86c8590bd590dcc4fb72dc7361ffba960af84694 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 11 Mar 2022 16:54:59 -0700 Subject: [PATCH 045/760] feat(testing): add test for app > listen (#4971) * feat(testing): add test for app > listen * Update test/unit/node/app.test.ts * refactor: modernize listen fn in app * wip * fix: update error message * fixup: remove console.log * fixup: use clearAllMocks once in beforeAll * fix: move chmod after socket listen * fixup: formatting * Update src/node/app.ts Co-authored-by: Jonathan Yu * Update src/node/app.ts Co-authored-by: Asher Co-authored-by: Jonathan Yu Co-authored-by: Asher --- src/node/app.ts | 39 +++++++--------- test/unit/node/app.test.ts | 79 ++++++++++++++++++++++---------- test/unit/node/constants.test.ts | 21 ++++++--- 3 files changed, 88 insertions(+), 51 deletions(-) diff --git a/src/node/app.ts b/src/node/app.ts index 7c868c2bc6df..c1b1006dfecb 100644 --- a/src/node/app.ts +++ b/src/node/app.ts @@ -22,40 +22,35 @@ export interface App extends Disposable { server: http.Server } -const listen = (server: http.Server, { host, port, socket, "socket-mode": mode }: ListenOptions) => { - return new Promise(async (resolve, reject) => { +export const listen = async (server: http.Server, { host, port, socket, "socket-mode": mode }: ListenOptions) => { + if (socket) { + try { + await fs.unlink(socket) + } catch (error: any) { + handleArgsSocketCatchError(error) + } + } + await new Promise(async (resolve, reject) => { server.on("error", reject) - const onListen = () => { // Promise resolved earlier so this is an unrelated error. server.off("error", reject) server.on("error", (err) => util.logError(logger, "http server error", err)) - - if (socket && mode) { - fs.chmod(socket, mode) - .then(resolve) - .catch((err) => { - util.logError(logger, "socket chmod", err) - reject(err) - }) - } else { - resolve() - } + resolve() } - if (socket) { - try { - await fs.unlink(socket) - } catch (error: any) { - handleArgsSocketCatchError(error) - } - server.listen(socket, onListen) } else { // [] is the correct format when using :: but Node errors with them. server.listen(port, host.replace(/^\[|\]$/g, ""), onListen) } }) + + // NOTE@jsjoeio: we need to chmod after the server is finished + // listening. Otherwise, the socket may not have been created yet. + if (socket && mode) { + await fs.chmod(socket, mode) + } } /** @@ -138,6 +133,6 @@ export const handleServerError = (resolved: boolean, err: Error, reject: (err: E */ export const handleArgsSocketCatchError = (error: any) => { if (!isNodeJSErrnoException(error) || error.code !== "ENOENT") { - logger.error(error.message ? error.message : error) + throw Error(error.message ? error.message : error) } } diff --git a/test/unit/node/app.test.ts b/test/unit/node/app.test.ts index 29811d4f940f..62b2887f665c 100644 --- a/test/unit/node/app.test.ts +++ b/test/unit/node/app.test.ts @@ -3,7 +3,7 @@ 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 { createApp, ensureAddress, handleArgsSocketCatchError, handleServerError, listen } from "../../../src/node/app" import { OptionalString, setDefaults } from "../../../src/node/cli" import { generateCertificate } from "../../../src/node/util" import { clean, mockLogger, getAvailablePort, tmpdir } from "../../utils/helpers" @@ -201,31 +201,33 @@ describe("handleArgsSocketCatchError", () => { }) it("should log an error if its not an NodeJS.ErrnoException", () => { - const error = new Error() + const message = "other message" + const error = new Error(message) - handleArgsSocketCatchError(error) - - expect(logger.error).toHaveBeenCalledTimes(1) - expect(logger.error).toHaveBeenCalledWith(error) + expect(() => { + handleArgsSocketCatchError(error) + }).toThrowError(error) }) it("should log an error if its not an NodeJS.ErrnoException (and the error has a message)", () => { const errorMessage = "handleArgsSocketCatchError Error" const error = new Error(errorMessage) - handleArgsSocketCatchError(error) - - expect(logger.error).toHaveBeenCalledTimes(1) - expect(logger.error).toHaveBeenCalledWith(errorMessage) + expect(() => { + handleArgsSocketCatchError(error) + }).toThrowError(error) }) - it("should not log an error if its a iNodeJS.ErrnoException", () => { - const error: NodeJS.ErrnoException = new Error() - error.code = "ENOENT" + it("should not log an error if its a NodeJS.ErrnoException", () => { + const code = "ENOENT" + const error: NodeJS.ErrnoException = new Error(code) + error.code = code handleArgsSocketCatchError(error) - expect(logger.error).toHaveBeenCalledTimes(0) + expect(() => { + handleArgsSocketCatchError(error) + }).not.toThrowError() }) it("should log an error if the code is not ENOENT (and the error has a message)", () => { @@ -234,19 +236,50 @@ describe("handleArgsSocketCatchError", () => { error.code = "EACCESS" error.message = errorMessage - handleArgsSocketCatchError(error) - - expect(logger.error).toHaveBeenCalledTimes(1) - expect(logger.error).toHaveBeenCalledWith(errorMessage) + expect(() => { + handleArgsSocketCatchError(error) + }).toThrowError(error) }) it("should log an error if the code is not ENOENT", () => { - const error: NodeJS.ErrnoException = new Error() - error.code = "EACCESS" + const code = "EACCESS" + const error: NodeJS.ErrnoException = new Error(code) + error.code = code - handleArgsSocketCatchError(error) + expect(() => { + handleArgsSocketCatchError(error) + }).toThrowError(error) + }) +}) - expect(logger.error).toHaveBeenCalledTimes(1) - expect(logger.error).toHaveBeenCalledWith(error) +describe("listen", () => { + let tmpDirPath: string + let mockServer: http.Server + + const testName = "listen" + + beforeEach(async () => { + await clean(testName) + mockLogger() + tmpDirPath = await tmpdir(testName) + mockServer = http.createServer() + }) + + afterEach(() => { + mockServer.close() + jest.clearAllMocks() + }) + + it("should throw an error if a directory is passed in instead of a file", async () => { + const errorMessage = "EISDIR: illegal operation on a directory, unlink" + const port = await getAvailablePort() + const mockArgs = { port, host: "0.0.0.0", socket: tmpDirPath } + + try { + await listen(mockServer, mockArgs) + } catch (error) { + expect(error).toBeInstanceOf(Error) + expect((error as any).message).toMatch(errorMessage) + } }) }) diff --git a/test/unit/node/constants.test.ts b/test/unit/node/constants.test.ts index 24501cbd2be8..d2aa68ab51ca 100644 --- a/test/unit/node/constants.test.ts +++ b/test/unit/node/constants.test.ts @@ -1,6 +1,7 @@ import { logger } from "@coder/logger" import { mockLogger } from "../../utils/helpers" import * as semver from "semver" +import path from "path" describe("constants", () => { let constants: typeof import("../../../src/node/constants") @@ -20,14 +21,18 @@ describe("constants", () => { } beforeAll(() => { + jest.clearAllMocks() mockLogger() - jest.mock("../../../package.json", () => mockPackageJson, { virtual: true }) - jest.mock("../../../vendor/modules/code-oss-dev/package.json", () => mockCodePackageJson, { virtual: true }) + jest.mock(path.resolve(__dirname, "../../../package.json"), () => mockPackageJson, { virtual: true }) + jest.mock( + path.resolve(__dirname, "../../../vendor/modules/code-oss-dev/package.json"), + () => mockCodePackageJson, + { virtual: true }, + ) constants = require("../../../src/node/constants") }) afterAll(() => { - jest.clearAllMocks() jest.resetModules() }) @@ -106,13 +111,17 @@ describe("constants", () => { } beforeAll(() => { - jest.mock("../../../package.json", () => mockPackageJson, { virtual: true }) - jest.mock("../../../vendor/modules/code-oss-dev/package.json", () => mockCodePackageJson, { virtual: true }) + jest.clearAllMocks() + jest.mock(path.resolve(__dirname, "../../../package.json"), () => mockPackageJson, { virtual: true }) + jest.mock( + path.resolve(__dirname, "../../../vendor/modules/code-oss-dev/package.json"), + () => mockCodePackageJson, + { virtual: true }, + ) constants = require("../../../src/node/constants") }) afterAll(() => { - jest.clearAllMocks() jest.resetModules() }) From 184ef681478703fae0ea518664e4c24ece9c9078 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 14:48:12 -0700 Subject: [PATCH 046/760] chore(deps): update dependency audit-ci to v6 (#4986) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 133 +++++++-------------------------------------------- 2 files changed, 19 insertions(+), 116 deletions(-) diff --git a/package.json b/package.json index d279add6f8e3..65a6786e9b08 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/ws": "^8.0.0", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", - "audit-ci": "^5.0.0", + "audit-ci": "^6.0.0", "codecov": "^3.8.3", "doctoc": "^2.0.0", "eslint": "^7.7.0", diff --git a/yarn.lock b/yarn.lock index 0ee80b17610a..f235c181d8ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -751,15 +751,6 @@ array.prototype.flat@^1.2.4: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" -array.prototype.flatmap@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz#908dc82d8a406930fdf38598d51e7411d18d4446" - integrity sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.19.0" - arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -777,20 +768,19 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -audit-ci@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/audit-ci/-/audit-ci-5.1.2.tgz#2e9a6c23c8511d8f79f6fde18d042ebc1bdec881" - integrity sha512-FNBbo4ycoHxcS7ruNNkq3LB+fZ4UWDd0QUNAva7Ae/F/Y45BBA7ZfHPSr5Fr+tS2+eqSwxToeFRRnw2Tp2PE8Q== +audit-ci@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/audit-ci/-/audit-ci-6.0.0.tgz#78b71ac2aa754218b16e224ef3aa649cfe3063f8" + integrity sha512-ZoJxM4FQvaWdabQvqA44PTg64Bm/a8B9dnL/ft33lygoQuKh+Oa0hwdc/VLsq/zrhNCC12uSUnnfYvgxgZLurw== dependencies: JSONStream "^1.3.5" - array.prototype.flatmap "^1.2.5" cross-spawn "^7.0.3" escape-string-regexp "^4.0.0" event-stream "4.0.1" jju "^1.4.0" readline-transform "1.0.0" semver "^7.0.0" - yargs "^16.0.0" + yargs "^17.0.0" autoprefixer@^9.8.6: version "9.8.6" @@ -1441,32 +1431,6 @@ es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.0" -es-abstract@^1.19.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" - integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" - is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -1978,7 +1942,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -1992,14 +1956,6 @@ get-stdin@^8.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - get-uri@3: version "3.0.2" resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" @@ -2142,13 +2098,6 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2329,15 +2278,6 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -2393,11 +2333,6 @@ is-callable@^1.1.4, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== -is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== - is-core-module@^2.2.0, is-core-module@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" @@ -2477,36 +2412,16 @@ is-regex@^1.1.2: call-bind "^1.0.2" has-symbols "^1.0.1" -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-regexp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-2.1.0.tgz#cd734a56864e23b956bf4e7c66c396a4c0b22c2d" integrity sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA== -is-shared-array-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" - integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== - is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== -is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -2524,13 +2439,6 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-weakref@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" - integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== - dependencies: - call-bind "^1.0.0" - is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -3040,11 +2948,6 @@ object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== - object-inspect@^1.9.0: version "1.10.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.2.tgz#b6385a3e2b7cae0b5eafcf90cddf85d128767f30" @@ -4347,7 +4250,7 @@ typescript@^4.4.0-dev.20210528: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== -unbox-primitive@^1.0.0, unbox-primitive@^1.0.1: +unbox-primitive@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== @@ -4666,28 +4569,28 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - yargs-parser@^20.2.3: version "20.2.7" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== -yargs@^16.0.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs-parser@^21.0.0: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== + +yargs@^17.0.0: + version "17.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9" + integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA== dependencies: cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.0.0" yarn@^1.22.4: version "1.22.11" From 21c74802e8defeb8eedf5b56385bdb787d4b1ff5 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 14 Mar 2022 21:37:29 -0500 Subject: [PATCH 047/760] chore: move Code to a submodule (#4990) * Move Code to a submodule Closes #4901. * Base Code cache on hash and re-enable node_modules cache The current setup appears to only rebuild VS Code if the dependencies change but we need to rebuild it if anything changes. I also re-enabled the commented out node_modules caches. They look like they should work to me with the submodule method. I think the problem occurred because Code itself was being installed in the yarn step. --- .github/workflows/ci.yaml | 117 +- .gitmodules | 3 + .prettierrc.yaml | 2 +- .tours/contributing.tour | 2 +- ci/build/build-release.sh | 6 +- ci/build/build-standalone-release.sh | 3 +- ci/build/build-vscode.sh | 4 +- ci/build/npm-postinstall.sh | 4 +- ci/dev/fmt.sh | 2 +- ci/dev/lint.sh | 6 +- ci/dev/postinstall.sh | 52 +- ci/dev/test-e2e.sh | 2 +- ci/dev/test-unit.sh | 2 +- ci/dev/watch.ts | 2 +- ci/lib.sh | 2 +- docs/CONTRIBUTING.md | 119 +- lib/vscode | 1 + package.json | 3 +- src/node/constants.ts | 2 +- src/node/main.ts | 2 +- src/node/routes/vscode.ts | 2 +- test/unit/node/constants.test.ts | 26 +- test/unit/node/routes/vscode.test.ts | 2 +- tsconfig.json | 2 +- vendor/package.json | 12 - vendor/postinstall.sh | 10 - vendor/yarn.lock | 1519 -------------------------- 27 files changed, 171 insertions(+), 1738 deletions(-) create mode 100644 .gitmodules create mode 160000 lib/vscode delete mode 100644 vendor/package.json delete mode 100755 vendor/postinstall.sh delete mode 100644 vendor/yarn.lock diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 54381c20b4e6..9b7450d23b4f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -38,21 +41,17 @@ jobs: - name: Install helm uses: azure/setup-helm@v1.1 - # NOTE@jsjoeio - # disabling this until we can audit the build process - # and the usefulness of this step - # See: https://github.com/coder/code-server/issues/4287 - # - name: Fetch dependencies from cache - # id: cache-yarn - # uses: actions/cache@v2 - # with: - # path: "**/node_modules" - # key: yarn-build-${{ hashFiles('**/yarn.lock') }} - # restore-keys: | - # yarn-build- + - name: Fetch dependencies from cache + id: cache-yarn + uses: actions/cache@v2 + with: + path: "**/node_modules" + key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Install dependencies - # if: steps.cache-yarn.outputs.cache-hit != 'true' + if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn --frozen-lockfile - name: Run yarn fmt @@ -71,6 +70,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -102,56 +104,49 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 with: fetch-depth: 0 + submodules: true - name: Install Node.js v14 uses: actions/setup-node@v3 with: node-version: "14" - # TODO@Teffen investigate why this omits code-oss-dev/node_modules - # - name: Fetch dependencies from cache - # id: cache-yarn - # uses: actions/cache@v2 - # with: - # path: | - # "**/node_modules" - # "**/vendor/modules" - # "**/vendor/modules/code-oss-dev/node_modules" - # key: yarn-build-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/vendor/yarn.lock') }} - # restore-keys: | - # yarn-build- + - name: Fetch dependencies from cache + id: cache-yarn + uses: actions/cache@v2 + with: + path: "**/node_modules" + key: yarn-build-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-build- - name: Install dependencies - # if: steps.cache-yarn.outputs.cache-hit != 'true' + if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn --frozen-lockfile - name: Build code-server run: yarn build - # Parse the hash of the latest commit inside vendor/modules/code-oss-dev - # use this to avoid rebuilding it if nothing changed - # How it works: the `git log` command fetches the hash of the last commit - # that changed a file inside `vendor/modules/code-oss-dev`. If a commit changes any file in there, - # the hash returned will change, and we rebuild vscode. If the hash did not change, - # (for example, a change to `src/` or `docs/`), we reuse the same build as last time. - # This saves a lot of time in CI, as compiling VSCode can take anywhere from 5-10 minutes. - - name: Get latest vendor/modules/code-oss-dev rev + # Get Code's git hash. When this changes it means the content is + # different and we need to rebuild. Use VSCODE_CACHE_VERSION to force a + # rebuild. + - name: Get latest lib/vscode rev id: vscode-rev - run: echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' vendor/package.json | sed -r 's|.*#(.*)$|\1|')" + run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)" - - name: Attempt to fetch vscode build from cache + - name: Fetch Code build from cache id: cache-vscode-2 uses: actions/cache@v2 with: path: | - vendor/modules/code-oss-dev/.build - vendor/modules/code-oss-dev/package.json - vendor/modules/code-oss-dev/out-build - vendor/modules/code-oss-dev/out-vscode-reh-web - vendor/modules/code-oss-dev/out-vscode-reh-web-min + lib/vscode/.build + lib/vscode/out-build + lib/vscode/out-vscode-reh-web + lib/vscode/out-vscode-reh-web-min key: vscode-reh-build-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }} - name: Build vscode @@ -197,7 +192,10 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 - uses: actions/download-artifact@v3 id: download @@ -226,7 +224,10 @@ jobs: container: "centos:7" steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -315,7 +316,10 @@ jobs: NODE_VERSION: v14.17.4 steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -364,7 +368,10 @@ jobs: runs-on: macos-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -409,7 +416,11 @@ jobs: # since VS Code will load faster due to the bundling. CODE_SERVER_TEST_ENTRY: "./release-packages/code-server-linux-amd64" steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true - name: Install Node.js v14 uses: actions/setup-node@v3 @@ -446,12 +457,6 @@ jobs: ./test/node_modules/.bin/playwright install-deps ./test/node_modules/.bin/playwright install - # TODO@jsjoeio - remove once we switch to submodules. - - name: Create package.json for testing - run: | - mkdir -p ./vendor/modules/code-oss-dev - echo '{ "version": "test" }' > ./vendor/modules/code-oss-dev/package.json - - name: Run end-to-end tests run: yarn test:e2e @@ -468,8 +473,11 @@ jobs: trivy-scan-repo: runs-on: ubuntu-20.04 steps: - - name: Checkout code + - name: Checkout repo uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Run Trivy vulnerability scanner in repo mode uses: aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18 with: @@ -480,6 +488,7 @@ jobs: template: "@/contrib/sarif.tpl" output: "trivy-repo-results.sarif" severity: "HIGH,CRITICAL" + - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..a185a80e1fd7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/vscode"] + path = lib/vscode + url = https://github.com/coder/vscode diff --git a/.prettierrc.yaml b/.prettierrc.yaml index bf4b4a7d239b..a58621d69ead 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -7,7 +7,7 @@ useTabs: false overrides: # Attempt to keep VScode's existing code style intact. - - files: "vendor/modules/code-oss-dev/**/*.ts" + - files: "lib/vscode/**/*.ts" options: # No limit defined upstream. printWidth: 10000 diff --git a/.tours/contributing.tour b/.tours/contributing.tour index 95799b6abb7e..970543343632 100644 --- a/.tours/contributing.tour +++ b/.tours/contributing.tour @@ -143,7 +143,7 @@ "description": "Static images and the manifest live here in `src/browser/media` (see the explorer)." }, { - "directory": "vendor/modules/code-oss-dev", + "directory": "lib/vscode", "line": 1, "description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/coder/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible." } diff --git a/ci/build/build-release.sh b/ci/build/build-release.sh index 7f152e1701f9..a720b2804df6 100755 --- a/ci/build/build-release.sh +++ b/ci/build/build-release.sh @@ -15,8 +15,8 @@ main() { source ./ci/lib.sh - VSCODE_SRC_PATH="vendor/modules/code-oss-dev" - VSCODE_OUT_PATH="$RELEASE_PATH/vendor/modules/code-oss-dev" + VSCODE_SRC_PATH="lib/vscode" + VSCODE_OUT_PATH="$RELEASE_PATH/lib/vscode" mkdir -p "$RELEASE_PATH" @@ -25,7 +25,7 @@ main() { rsync ./docs/README.md "$RELEASE_PATH" rsync LICENSE.txt "$RELEASE_PATH" - rsync ./vendor/modules/code-oss-dev/ThirdPartyNotices.txt "$RELEASE_PATH" + rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH" } bundle_code_server() { diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh index 481110b47b39..cba139947163 100755 --- a/ci/build/build-standalone-release.sh +++ b/ci/build/build-standalone-release.sh @@ -33,8 +33,7 @@ main() { # HACK: the version of Typescript vscode 1.57 uses in extensions/ # leaves a few stray symlinks. Clean them up so nfpm does not fail. # Remove this line when its no longer needed. - - rm -fr "$RELEASE_PATH/vendor/modules/code-oss-dev/extensions/node_modules/.bin" + rm -fr "$RELEASE_PATH/lib/vscode/extensions/node_modules/.bin" } main "$@" diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh index be996fceef56..bb3225a2b517 100755 --- a/ci/build/build-vscode.sh +++ b/ci/build/build-vscode.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -# Builds vscode into vendor/modules/code-oss-dev/out-vscode. +# Builds vscode into lib/vscode/out-vscode. # MINIFY controls whether a minified version of vscode is built. MINIFY=${MINIFY-true} @@ -9,7 +9,7 @@ MINIFY=${MINIFY-true} main() { cd "$(dirname "${0}")/../.." - cd vendor/modules/code-oss-dev + cd lib/vscode # Any platform works since we have our own packaging step (for now). yarn gulp "vscode-reh-web-linux-x64${MINIFY:+-min}" diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 43c3262ec341..123b56dfbb48 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -90,8 +90,8 @@ symlink_asar() { } vscode_yarn() { - echo 'Installing vendor dependencies...' - cd vendor/modules/code-oss-dev + echo 'Installing Code dependencies...' + cd lib/vscode yarn --production --frozen-lockfile symlink_asar diff --git a/ci/dev/fmt.sh b/ci/dev/fmt.sh index d5d7ffeed9c7..447186212d2f 100755 --- a/ci/dev/fmt.sh +++ b/ci/dev/fmt.sh @@ -19,7 +19,7 @@ main() { "*.sh" ) prettier --write --loglevel=warn $( - git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v "vendor/modules/code-oss-dev" | grep -v 'helm-chart' + git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v 'helm-chart' ) doctoc --title '# FAQ' docs/FAQ.md > /dev/null diff --git a/ci/dev/lint.sh b/ci/dev/lint.sh index 34b2e8f78fd9..58a999c4f2f0 100755 --- a/ci/dev/lint.sh +++ b/ci/dev/lint.sh @@ -4,10 +4,10 @@ set -euo pipefail main() { cd "$(dirname "$0")/../.." - eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode") - stylelint $(git ls-files "*.css" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode") + eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js" | grep -v "lib/vscode") + stylelint $(git ls-files "*.css" | grep -v "lib/vscode") tsc --noEmit --skipLibCheck - shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh" | grep -v "vendor/modules/code-oss-dev" | grep -v "lib/vscode") + shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh" | grep -v "lib/vscode") if command -v helm && helm kubeval --help > /dev/null; then helm kubeval ci/helm-chart fi diff --git a/ci/dev/postinstall.sh b/ci/dev/postinstall.sh index 78f26cc631bd..170cdb46fd66 100755 --- a/ci/dev/postinstall.sh +++ b/ci/dev/postinstall.sh @@ -1,50 +1,32 @@ #!/usr/bin/env bash set -euo pipefail -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - pushd test - echo "Installing dependencies for $PWD" - yarn install - popd - +# Install dependencies in $1. +install-deps() { local args=(install) if [[ ${CI-} ]]; then args+=(--frozen-lockfile) fi - - pushd test - echo "Installing dependencies for $PWD" - yarn "${args[@]}" - popd - - pushd test/e2e/extensions/test-extension + # If there is no package.json then yarn will look upward and end up installing + # from the root resulting in an infinite loop (this can happen if you have not + # checked out the submodule yet for example). + if [[ ! -f "$1/package.json" ]]; then + echo "$1/package.json is missing; did you run git submodule update --init?" + exit 1 + fi + pushd "$1" 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 - # node_modules and itself being in a directory with the same name. - args+=(--modules-folder modules) - - # We ignore scripts because NPM/Yarn's default behavior is to assume that - # devDependencies are not needed, and that even git repo based packages are - # assumed to be compiled. Because the default behavior for VS Code's - # `postinstall` assumes we're also compiled, this needs to be ignored. - args+=(--ignore-scripts) - - yarn "${args[@]}" - - # Finally, run the vendor `postinstall` - yarn run postinstall +main() { + cd "$(dirname "$0")/../.." + source ./ci/lib.sh - popd + install-deps test + install-deps test/e2e/extensions/test-extension + install-deps lib/vscode } main "$@" diff --git a/ci/dev/test-e2e.sh b/ci/dev/test-e2e.sh index cf3e53d118e9..00724ac2b5f2 100755 --- a/ci/dev/test-e2e.sh +++ b/ci/dev/test-e2e.sh @@ -37,7 +37,7 @@ main() { exit 1 fi - if [[ ! -d $dir/vendor/modules/code-oss-dev/out ]]; then + if [[ ! -d $dir/lib/vscode/out ]]; then echo >&2 "No VS Code build detected" help exit 1 diff --git a/ci/dev/test-unit.sh b/ci/dev/test-unit.sh index 3578d87e647d..e1fd2ec7136e 100755 --- a/ci/dev/test-unit.sh +++ b/ci/dev/test-unit.sh @@ -14,7 +14,7 @@ main() { # Our code imports from `out` in order to work during development but if you # have only built for production you will have not have this directory. In # that case symlink `out` to a production build directory. - local vscode="vendor/modules/code-oss-dev" + local vscode="lib/vscode" local link="$vscode/out" local target="out-build" if [[ ! -e $link ]] && [[ -d $vscode/$target ]]; then diff --git a/ci/dev/watch.ts b/ci/dev/watch.ts index 55a5b14d1f4c..66480b29e7e5 100644 --- a/ci/dev/watch.ts +++ b/ci/dev/watch.ts @@ -14,7 +14,7 @@ class Watcher { private rootPath = path.resolve(process.cwd()) private readonly paths = { /** Path to uncompiled VS Code source. */ - vscodeDir: path.join(this.rootPath, "vendor", "modules", "code-oss-dev"), + vscodeDir: path.join(this.rootPath, "lib/vscode"), pluginDir: process.env.PLUGIN_DIR, } diff --git a/ci/lib.sh b/ci/lib.sh index 0e357986153f..c7b5a420aca6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -14,7 +14,7 @@ pkg_json_version() { } vscode_version() { - jq -r .version vendor/modules/code-oss-dev/package.json + jq -r .version lib/vscode/package.json } os() { diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 3e01c6d0a67a..c047fa6b960c 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -83,36 +83,21 @@ The current development workflow is a bit tricky because we have this repo and w Here are these steps you should follow to get your dev environment setup: 1. `git clone https://github.com/coder/code-server.git` - Clone `code-server` -2. `git clone https://github.com/coder/vscode.git` - Clone `vscode` -3. `cd vscode && yarn install` - install the dependencies in the `vscode` repo -4. `cd code-server && yarn install` - install the dependencies in the `code-server` repo -5. `cd vscode && yarn link` - use `yarn` to create a symlink to the `vscode` repo (`code-oss-dev` package) -6. `cd code-server && yarn link code-oss-dev --modules-folder vendor/modules` - links your local `vscode` repo (`code-oss-dev` package) inside your local version of code-server -7. `cd code-server && yarn watch` - this will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source. +2. `git submodule update --init` - Clone `vscode` submodule +3. `yarn` - Install dependencies +4. `yarn watch` - This will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source. ### Updates to VS Code If changes are made and merged into `main` in the [`coder/vscode`](https://github.com/coder/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps: -1. Update the package tag listed in `vendor/package.json`: - -```json -{ - "devDependencies": { - "vscode": "coder/vscode#" - } -} -``` - +1. Update the `lib/vscode` submodule to the latest `main`. 2. From the code-server **project root**, run `yarn install`. - Then, test code-server locally to make sure everything works. -3. Check the Node.js version that's used by Electron (which is shipped with VS +3. Test code-server locally to make sure everything works. +4. Check the Node.js version that's used by Electron (which is shipped with VS Code. If necessary, update your version of Node.js to match. -4. Open a PR - -> Watch for updates to -> `vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.html`. You may need to -> make changes to `src/browser/pages/vscode.html`. +5. Commit the updated submodule to `code-server`. +6. Open a PR. ### Build @@ -215,7 +200,7 @@ The CLI code is in [src/node](../src/node) and the HTTP routes are implemented in [src/node/routes](../src/node/routes). Most of the meaty parts are in the VS Code portion of the codebase under -[vendor/modules/code-oss-dev](../vendor/modules/code-oss-dev), which we describe next. +[lib/vscode](../lib/vscode), which we describe next. ### Modifications to VS Code @@ -228,66 +213,66 @@ Over time, Microsoft added support to VS Code to run it on the web. They have made the front-end open source, but not the server. As such, code-server v2 (and later) uses the VS Code front-end and implements the server. We do this by using a Git subtree to fork and modify VS Code. This code lives under -[vendor/modules/code-oss-dev](../vendor/modules/code-oss-dev). +[lib/vscode](../lib/vscode). Some noteworthy changes in our version of VS Code include: -- Adding our build file, [`vendor/modules/code-oss-dev/coder.js`](../vendor/modules/code-oss-dev/coder.js), which includes build steps specific to code-server -- Node.js version detection changes in [`build/lib/node.ts`](../vendor/modules/code-oss-dev/build/lib/node.ts) and [`build/lib/util.ts`](../vendor/modules/code-oss-dev/build/lib/util.ts) +- Adding our build file, [`lib/vscode/coder.js`](../lib/vscode/coder.js), which includes build steps specific to code-server +- Node.js version detection changes in [`build/lib/node.ts`](../lib/vscode/build/lib/node.ts) and [`build/lib/util.ts`](../lib/vscode/build/lib/util.ts) - Allowing extra extension directories - - Added extra arguments to [`src/vs/platform/environment/common/argv.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/argv.ts) and to [`src/vs/platform/environment/node/argv.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/node/argv.ts) - - Added extra environment state to [`src/vs/platform/environment/common/environment.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/environment.ts); - - Added extra getters to [`src/vs/platform/environment/common/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/platform/environment/common/environmentService.ts) - - Added extra scanning paths to [`src/vs/platform/extensionManagement/node/extensionsScanner.ts`](../vendor/modules/code-oss-dev/src/vs/platform/extensionManagement/node/extensionsScanner.ts) -- Additions/removals from [`package.json`](../vendor/modules/code-oss-dev/package.json): + - Added extra arguments to [`src/vs/platform/environment/common/argv.ts`](../lib/vscode/src/vs/platform/environment/common/argv.ts) and to [`src/vs/platform/environment/node/argv.ts`](../lib/vscode/src/vs/platform/environment/node/argv.ts) + - Added extra environment state to [`src/vs/platform/environment/common/environment.ts`](../lib/vscode/src/vs/platform/environment/common/environment.ts); + - Added extra getters to [`src/vs/platform/environment/common/environmentService.ts`](../lib/vscode/src/vs/platform/environment/common/environmentService.ts) + - Added extra scanning paths to [`src/vs/platform/extensionManagement/node/extensionsScanner.ts`](../lib/vscode/src/vs/platform/extensionManagement/node/extensionsScanner.ts) +- Additions/removals from [`package.json`](../lib/vscode/package.json): - Removing `electron`, `keytar` and `native-keymap` to avoid pulling in desktop dependencies during build on Linux - Removing `gulp-azure-storage` and `gulp-tar` (unsued in our build process, may pull in outdated dependencies) - Adding `proxy-agent`, `proxy-from-env` (for proxying) and `rimraf` (used during build/install steps) - Adding our branding/custom URLs/version: - - [`product.json`](../vendor/modules/code-oss-dev/product.json) - - [`src/vs/base/common/product.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/product.ts) - - [`src/vs/workbench/browser/parts/dialogs/dialogHandler.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts) - - [`src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts) - - [`src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts) -- Removing azure/macOS signing related dependencies from [`build/package.json`](../vendor/modules/code-oss-dev/build/package.json) + - [`product.json`](../lib/vscode/product.json) + - [`src/vs/base/common/product.ts`](../lib/vscode/src/vs/base/common/product.ts) + - [`src/vs/workbench/browser/parts/dialogs/dialogHandler.ts`](../lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts) + - [`src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts`](../lib/vscode/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts) + - [`src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts`](../lib/vscode/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts) +- Removing azure/macOS signing related dependencies from [`build/package.json`](../lib/vscode/build/package.json) - Modifying `.gitignore` to allow us to add files to `src/vs/server` and modifying `.eslintignore` to ignore lint on the shared files below (we use different formatter settings than VS Code). - Sharing some files with our codebase via symlinks: - - [`src/vs/base/common/ipc.d.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/ipc.d.ts) points to [`typings/ipc.d.ts`](../typings/ipc.d.ts) - - [`src/vs/base/common/util.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/util.ts) points to [`src/common/util.ts`](../src/common/util.ts) - - [`src/vs/base/node/proxy_agent.ts`](../vendor/modules/code-oss-dev/src/vs/base/node/proxy_agent.ts) points to [`src/node/proxy_agent.ts`](../src/node/proxy_agent.ts) -- Allowing socket changes by adding `setSocket` in [`src/vs/base/parts/ipc/common/ipc.net.ts`](../vendor/modules/code-oss-dev/src/vs/base/parts/ipc/common/ipc.net.ts) + - [`src/vs/base/common/ipc.d.ts`](../lib/vscode/src/vs/base/common/ipc.d.ts) points to [`typings/ipc.d.ts`](../typings/ipc.d.ts) + - [`src/vs/base/common/util.ts`](../lib/vscode/src/vs/base/common/util.ts) points to [`src/common/util.ts`](../src/common/util.ts) + - [`src/vs/base/node/proxy_agent.ts`](../lib/vscode/src/vs/base/node/proxy_agent.ts) points to [`src/node/proxy_agent.ts`](../src/node/proxy_agent.ts) +- Allowing socket changes by adding `setSocket` in [`src/vs/base/parts/ipc/common/ipc.net.ts`](../lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts) - We use this for connection persistence in our server-side code. - Added our server-side Node.JS code to `src/vs/server`. - This code includes the logic to spawn the various services (extension host, terminal, etc.) and some glue -- Added [`src/vs/workbench/browser/client.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/client.ts) to hold some server customizations. +- Added [`src/vs/workbench/browser/client.ts`](../lib/vscode/src/vs/workbench/browser/client.ts) to hold some server customizations. - Includes the functionality for the Log Out command and menu item - - Also, imported and called `initialize` from the main web file, [`src/vs/workbench/browser/web.main.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/browser/web.main.ts) -- Added a (hopefully temporary) hotfix to [`src/vs/workbench/common/resources.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/common/resources.ts) to get context menu actions working for the Git integration. -- Added connection type to WebSocket query parameters in [`src/vs/platform/remote/common/remoteAgentConnection.ts`](../vendor/modules/code-oss-dev/src/vs/platform/remote/common/remoteAgentConnection.ts) -- Added `CODE_SERVER*` variables to the sanitization list in [`src/vs/base/common/processes.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/processes.ts) + - Also, imported and called `initialize` from the main web file, [`src/vs/workbench/browser/web.main.ts`](../lib/vscode/src/vs/workbench/browser/web.main.ts) +- Added a (hopefully temporary) hotfix to [`src/vs/workbench/common/resources.ts`](../lib/vscode/src/vs/workbench/common/resources.ts) to get context menu actions working for the Git integration. +- Added connection type to WebSocket query parameters in [`src/vs/platform/remote/common/remoteAgentConnection.ts`](../lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts) +- Added `CODE_SERVER*` variables to the sanitization list in [`src/vs/base/common/processes.ts`](../lib/vscode/src/vs/base/common/processes.ts) - Fix localization support: - - Added file [`src/vs/workbench/services/localizations/browser/localizationsService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/localizations/browser/localizationsService.ts). - - Modified file [`src/vs/base/common/platform.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/platform.ts) - - Modified file [`src/vs/base/node/languagePacks.js`](../vendor/modules/code-oss-dev/src/vs/base/node/languagePacks.js) -- Added code to allow server to inject settings to [`src/vs/platform/product/common/product.ts`](../vendor/modules/code-oss-dev/src/vs/platform/product/common/product.ts) + - Added file [`src/vs/workbench/services/localizations/browser/localizationsService.ts`](../lib/vscode/src/vs/workbench/services/localizations/browser/localizationsService.ts). + - Modified file [`src/vs/base/common/platform.ts`](../lib/vscode/src/vs/base/common/platform.ts) + - Modified file [`src/vs/base/node/languagePacks.js`](../lib/vscode/src/vs/base/node/languagePacks.js) +- Added code to allow server to inject settings to [`src/vs/platform/product/common/product.ts`](../lib/vscode/src/vs/platform/product/common/product.ts) - Extension fixes: - - Avoid disabling extensions by extensionKind in [`src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts) (Needed for vscode-icons) - - Remove broken symlinks in [`extensions/postinstall.js`](../vendor/modules/code-oss-dev/extensions/postinstall.js) - - Add tip about extension gallery in [`src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts) - - Use our own server for GitHub authentication in [`extensions/github-authentication/src/githubServer.ts`](../vendor/modules/code-oss-dev/extensions/github-authentication/src/githubServer.ts) - - Settings persistence on the server in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/environment/browser/environmentService.ts) - - Add extension install fallback in [`src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts) - - Add proxy-agent monkeypatch and keep extension host indefinitely running in [`src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts) - - Patch build system to avoid removing extension dependencies for `yarn global add` users in [`build/lib/extensions.ts`](../vendor/modules/code-oss-dev/build/lib/extensions.ts) - - Allow all extensions to use proposed APIs in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/services/environment/browser/environmentService.ts) - - Make storage writes async to allow extensions to wait for them to complete in [`src/vs/platform/storage/common/storage.ts`](../vendor/modules/code-oss-dev/src/vs/platform/storage/common/storage.ts) -- Specify webview path in [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts) -- URL readability improvements for folder/workspace in [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts) + - Avoid disabling extensions by extensionKind in [`src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts`](../lib/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts) (Needed for vscode-icons) + - Remove broken symlinks in [`extensions/postinstall.js`](../lib/vscode/extensions/postinstall.js) + - Add tip about extension gallery in [`src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts`](../lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts) + - Use our own server for GitHub authentication in [`extensions/github-authentication/src/githubServer.ts`](../lib/vscode/extensions/github-authentication/src/githubServer.ts) + - Settings persistence on the server in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts) + - Add extension install fallback in [`src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts`](../lib/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts) + - Add proxy-agent monkeypatch and keep extension host indefinitely running in [`src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts`](../lib/vscode/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts) + - Patch build system to avoid removing extension dependencies for `yarn global add` users in [`build/lib/extensions.ts`](../lib/vscode/build/lib/extensions.ts) + - Allow all extensions to use proposed APIs in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts) + - Make storage writes async to allow extensions to wait for them to complete in [`src/vs/platform/storage/common/storage.ts`](../lib/vscode/src/vs/platform/storage/common/storage.ts) +- Specify webview path in [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) +- URL readability improvements for folder/workspace in [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) - Socket/Authority-related fixes (for remote proxying etc.): - - [`src/vs/code/browser/workbench/workbench.ts`](../vendor/modules/code-oss-dev/src/vs/code/browser/workbench/workbench.ts) - - [`src/vs/platform/remote/browser/browserSocketFactory.ts`](../vendor/modules/code-oss-dev/src/vs/platform/remote/browser/browserSocketFactory.ts) - - [`src/vs/base/common/network.ts`](../vendor/modules/code-oss-dev/src/vs/base/common/network.ts) -- Added code to write out IPC path in [`src/vs/workbench/api/node/extHostCLIServer.ts`](../vendor/modules/code-oss-dev/src/vs/workbench/api/node/extHostCLIServer.ts) + - [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) + - [`src/vs/platform/remote/browser/browserSocketFactory.ts`](../lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts) + - [`src/vs/base/common/network.ts`](../lib/vscode/src/vs/base/common/network.ts) +- Added code to write out IPC path in [`src/vs/workbench/api/node/extHostCLIServer.ts`](../lib/vscode/src/vs/workbench/api/node/extHostCLIServer.ts) As the web portion of VS Code matures, we'll be able to shrink and possibly eliminate our modifications. In the meantime, upgrading the VS Code version requires diff --git a/lib/vscode b/lib/vscode new file mode 160000 index 000000000000..a13f6e1434ad --- /dev/null +++ b/lib/vscode @@ -0,0 +1 @@ +Subproject commit a13f6e1434ad6ab820eef0ecca5b923b3e275667 diff --git a/package.json b/package.json index 65a6786e9b08..1396d65a1a65 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,6 @@ "testEnvironment": "node", "testPathIgnorePatterns": [ "/node_modules/", - "/vendor/", "/lib/", "/out/", "test/e2e" @@ -158,7 +157,7 @@ "/release-npm-package", "/release-gcp", "/release-images", - "/vendor" + "/lib" ], "moduleNameMapper": { "^.+\\.(css|less)$": "/test/utils/cssStub.ts" diff --git a/src/node/constants.ts b/src/node/constants.ts index 1670d858b843..c85e0a7b0cdf 100644 --- a/src/node/constants.ts +++ b/src/node/constants.ts @@ -17,7 +17,7 @@ export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJso } export const rootPath = path.resolve(__dirname, "../..") -export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev") +export const vsRootPath = path.join(rootPath, "lib/vscode") const PACKAGE_JSON = "package.json" const pkg = getPackageJson(`${rootPath}/${PACKAGE_JSON}`) const codePkg = getPackageJson(`${vsRootPath}/${PACKAGE_JSON}`) || { version: "0.0.0" } diff --git a/src/node/main.ts b/src/node/main.ts index 55ca2c4a4533..fc4bfe83f832 100644 --- a/src/node/main.ts +++ b/src/node/main.ts @@ -31,7 +31,7 @@ export const shouldSpawnCliProcess = (args: UserProvidedArgs): boolean => { export const runVsCodeCli = async (args: DefaultedArgs): Promise => { logger.debug("Running VS Code CLI") - // See ../../vendor/modules/code-oss-dev/src/vs/server/node/server.main.js. + // See ../../lib/vscode/src/vs/server/node/server.main.js. const spawnCli = await loadAMDModule("vs/server/node/server.main", "spawnCli") try { diff --git a/src/node/routes/vscode.ts b/src/node/routes/vscode.ts index f03324c42608..ba67426ecaef 100644 --- a/src/node/routes/vscode.ts +++ b/src/node/routes/vscode.ts @@ -118,7 +118,7 @@ export class CodeServerRouteWrapper { const { args } = req /** - * @file ../../../vendor/modules/code-oss-dev/src/vs/server/node/server.main.js + * @file ../../../lib/vscode/src/vs/server/node/server.main.js */ const createVSServer = await loadAMDModule("vs/server/node/server.main", "createServer") diff --git a/test/unit/node/constants.test.ts b/test/unit/node/constants.test.ts index d2aa68ab51ca..38affbb874d9 100644 --- a/test/unit/node/constants.test.ts +++ b/test/unit/node/constants.test.ts @@ -1,7 +1,7 @@ import { logger } from "@coder/logger" -import { mockLogger } from "../../utils/helpers" -import * as semver from "semver" import path from "path" +import * as semver from "semver" +import { mockLogger } from "../../utils/helpers" describe("constants", () => { let constants: typeof import("../../../src/node/constants") @@ -16,7 +16,7 @@ describe("constants", () => { } const mockCodePackageJson = { - name: "mock-code-oss-dev", + name: "mock-vscode", version: "1.2.3", } @@ -24,11 +24,9 @@ describe("constants", () => { jest.clearAllMocks() mockLogger() jest.mock(path.resolve(__dirname, "../../../package.json"), () => mockPackageJson, { virtual: true }) - jest.mock( - path.resolve(__dirname, "../../../vendor/modules/code-oss-dev/package.json"), - () => mockCodePackageJson, - { virtual: true }, - ) + jest.mock(path.resolve(__dirname, "../../../lib/vscode/package.json"), () => mockCodePackageJson, { + virtual: true, + }) constants = require("../../../src/node/constants") }) @@ -96,7 +94,7 @@ describe("constants", () => { const packageJson = constants.getPackageJson("../../package.json") expect(packageJson).toStrictEqual(mockPackageJson) - const codePackageJson = constants.getPackageJson("../../vendor/modules/code-oss-dev/package.json") + const codePackageJson = constants.getPackageJson("../../lib/vscode/package.json") expect(codePackageJson).toStrictEqual(mockCodePackageJson) }) }) @@ -107,17 +105,15 @@ describe("constants", () => { name: "mock-code-server", } const mockCodePackageJson = { - name: "mock-code-oss-dev", + name: "mock-vscode", } beforeAll(() => { jest.clearAllMocks() jest.mock(path.resolve(__dirname, "../../../package.json"), () => mockPackageJson, { virtual: true }) - jest.mock( - path.resolve(__dirname, "../../../vendor/modules/code-oss-dev/package.json"), - () => mockCodePackageJson, - { virtual: true }, - ) + jest.mock(path.resolve(__dirname, "../../../lib/vscode/package.json"), () => mockCodePackageJson, { + virtual: true, + }) constants = require("../../../src/node/constants") }) diff --git a/test/unit/node/routes/vscode.test.ts b/test/unit/node/routes/vscode.test.ts index a4c0ba13abca..88b2c4b2d852 100644 --- a/test/unit/node/routes/vscode.test.ts +++ b/test/unit/node/routes/vscode.test.ts @@ -103,7 +103,7 @@ describe("vscode", () => { it("should do nothing when nothing is passed in", async () => { codeServer = await integration.setup(["--auth=none"], "") - let resp = await codeServer.fetch("https://github.com/", undefined) + const resp = await codeServer.fetch("https://github.com/", undefined) expect(resp.status).toBe(200) const url = new URL(resp.url) diff --git a/tsconfig.json b/tsconfig.json index 993c916919f1..3a591aac2d3f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "./node_modules/@types", "./typings", "./test/node_modules/@types", - "./vendor/modules/code-oss-dev/src/vs/server/@types" + "./lib/vscode/src/vs/server/@types" ], "downlevelIteration": true }, diff --git a/vendor/package.json b/vendor/package.json deleted file mode 100644 index 1deddd2c8864..000000000000 --- a/vendor/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "vendor", - "version": "1.0.0", - "license": "MIT", - "private": true, - "scripts": { - "postinstall": "./postinstall.sh" - }, - "devDependencies": { - "code-oss-dev": "coder/vscode#a13f6e1434ad6ab820eef0ecca5b923b3e275667" - } -} diff --git a/vendor/postinstall.sh b/vendor/postinstall.sh deleted file mode 100755 index 809b8a439e0a..000000000000 --- a/vendor/postinstall.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - echo 'Installing VS Code dependencies...' - cd modules/code-oss-dev - yarn install --frozen-lockfile -} - -main "$@" diff --git a/vendor/yarn.lock b/vendor/yarn.lock deleted file mode 100644 index ac088bb7a8a3..000000000000 --- a/vendor/yarn.lock +++ /dev/null @@ -1,1519 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@electron/get@^1.0.1": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.13.0.tgz#95c6bcaff4f9a505ea46792424f451efea89228c" - integrity sha512-+SjZhRuRo+STTO1Fdhzqnv9D2ZhjxXP6egsJ9kiO8dtP68cDx7dFCwWi64dlMQV7sWcfW1OYCW4wviEBzmRsfQ== - dependencies: - debug "^4.1.1" - env-paths "^2.2.0" - fs-extra "^8.1.0" - got "^9.6.0" - progress "^2.0.3" - semver "^6.2.0" - sumchecker "^3.0.1" - optionalDependencies: - global-agent "^2.0.2" - global-tunnel-ng "^2.7.1" - -"@microsoft/applicationinsights-analytics-js@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.7.0.tgz#0ecb1f845252f0d7cb183bf5e609568ec4290f9c" - integrity sha512-NIqvhkaiKTOfqIWAlmhWgFzXOR8jXGruF2AKQN/8cRRPxvLYAqtVdZTmcY/gl9RZfiNMvsUEj0JwXnpyGuwpLA== - dependencies: - "@microsoft/applicationinsights-common" "2.7.0" - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-channel-js@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.7.0.tgz#8b8eedda05827037a81de9af32e2f9ebc9c8a70e" - integrity sha512-Fj7NufVntao++qE9W1VhNNZTMhS6bhDvwYqw1jIXiUthQ0i3KVSvqcR+8JrErib3P3CA1nGckR9ZeCsNSAaknQ== - dependencies: - "@microsoft/applicationinsights-common" "2.7.0" - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-common@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-common/-/applicationinsights-common-2.7.0.tgz#8946bd3c78b97216cc180dae930b5cf3e14935c7" - integrity sha512-UpDPXkJekKqo415RAbnr3cc6SiteflNdZZ8WgsKj2z2z3Qpo+lz5e72mB+XR1YcNPIw1ovL/QdxvrOPZZbKUIg== - dependencies: - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-core-js@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.7.0.tgz#4d53ffd0f836d4a03fa5ccf6c4f4651b31f32544" - integrity sha512-B21/5mbFIYpGo5YK6twRBV5NyJEZw3vMOGz3wzs5qKHi8q8+X/F6jp4evG5n2p40281oE3548v6HBgXmPpdwYQ== - dependencies: - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-dependencies-js@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.7.0.tgz#f45f3b574f333fd8aa427ff2035e3394f06d7b03" - integrity sha512-57L4OK2bj4Z074KRAJuzXqBOHgVIUNl0f6q4FNTSqZ/JKeEx8qorxc8b7Z1LUe7n4MPYlyAVV53TGnBMz+M93Q== - dependencies: - "@microsoft/applicationinsights-common" "2.7.0" - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-properties-js@2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.7.0.tgz#0e6e4abb379397c13a234f398c88ade762b1a7f9" - integrity sha512-+m6VTdjvswC/ShGGcWokmPFTXNhJ4zfOTNsTdpRt0AylZfATTOMuaA+pwr/wOS5qyJG4zxieHj95JAVo+1lzIw== - dependencies: - "@microsoft/applicationinsights-common" "2.7.0" - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/applicationinsights-shims@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.0.tgz#ee622588f14e58ae3c055b12431da8ed55d71991" - integrity sha512-OaKew7f7acuNFgKYjMSPrRTRQi93xUyONWeeCeBlJSx7oRNJaL0TqbTvW6j5GHnSr3mhinPtAQ+rCQWASBnOrg== - -"@microsoft/applicationinsights-web@^2.6.4": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@microsoft/applicationinsights-web/-/applicationinsights-web-2.7.0.tgz#e4312736dba723e1d4854a31abf080ec915b4eaf" - integrity sha512-rG3Lx+Hvj9B78FYhN8kcWjzQnRePXiL2jHKqd8JWBIXThp3akQCx95Xu6z9gy4frADS/R/12I9bpwwyTIe4QYA== - dependencies: - "@microsoft/applicationinsights-analytics-js" "2.7.0" - "@microsoft/applicationinsights-channel-js" "2.7.0" - "@microsoft/applicationinsights-common" "2.7.0" - "@microsoft/applicationinsights-core-js" "2.7.0" - "@microsoft/applicationinsights-dependencies-js" "2.7.0" - "@microsoft/applicationinsights-properties-js" "2.7.0" - "@microsoft/applicationinsights-shims" "2.0.0" - "@microsoft/dynamicproto-js" "^1.1.4" - -"@microsoft/dynamicproto-js@^1.1.4": - version "1.1.4" - 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.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.5.tgz#f913a54e1601b0aac972803829b0eece48de215b" - integrity sha512-x0hUbjv891omnkcHD7ZOhiyyUqUUR6MNjq89JhEI3BxppeKWAm6NPQsqqRrAkCJBogdT/o/My21sXtTI9rJIsw== - 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" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@tootallnate/once@1", "@tootallnate/once@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/node@^14.6.2": - version "14.17.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.17.tgz#4ec7b71bbcb01a4e55455b60b18b1b6a783fe31d" - integrity sha512-niAjcewgEYvSPCZm3OaM9y6YQrL2SEPH9PymtE6fuZAvFiP6ereCcvApGl2jKTq7copTIguX3PBvfP08LN4LvQ== - -"@vscode/debugprotocol@1.51.0": - version "1.51.0" - resolved "https://registry.yarnpkg.com/@vscode/debugprotocol/-/debugprotocol-1.51.0.tgz#1d28a8581f8ea74b8e2fd465d4448717589a0ae3" - integrity sha512-39ShbKzI+0r53haLZQVEhY4XhdMJVSqfcliaDFigQjqiWattno5Ex0jXq2WRHrAtPf+W5Un9/HtED0K3pAiqZg== - -"@vscode/iconv-lite-umd@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48" - integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg== - -"@vscode/ripgrep@^1.14.1": - version "1.14.2" - resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.14.2.tgz#47c0eec2b64f53d8f7e1b5ffd22a62e229191c34" - integrity sha512-KDaehS8Jfdg1dqStaIPDKYh66jzKd5jy5aYEPzIv0JYFLADPsCSQPBUdsJVXnr0t72OlDcj96W05xt/rSnNFFQ== - dependencies: - https-proxy-agent "^5.0.0" - proxy-from-env "^1.1.0" - -"@vscode/sqlite3@4.0.12": - version "4.0.12" - resolved "https://registry.yarnpkg.com/@vscode/sqlite3/-/sqlite3-4.0.12.tgz#50b36c788b5d130c02612b27eaf6905dc2156a43" - integrity sha512-45Nbq4vgUhcejdDkX/G9K5BMMgRkBqtHtbChbvXHesMfk88USt4i94i9EM0DfHO7ijl3oIwGqzIob6lgeYi41w== - 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" - integrity sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g== - -"@vscode/windows-registry@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.0.5.tgz#a6c463ac123ee7b23f9b90935aea086a97a778dc" - integrity sha512-xEA/L3ki8qMSer3hwdm590G43YCjpMb7evqS5aSPFFAhAYepvVr12/szKFgx1v1aQHOcR2riWg5YqBLajOZoaw== - -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@6, agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -applicationinsights@1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.4.2.tgz#2f25f7a3f3e5bf0ab4486b63e42a48a9ec321d52" - integrity sha512-1wE37G9zEMZTsPJVQ8BDrQtsGgG3DGMActLHwPAF8TYHAXkfqqpeZYCH0XV4lUZ7H4MffRMwN2Ln2nEtUmT8HQ== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bindings@^1.2.1, bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -boolean@^3.0.1: - version "3.1.4" - resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.1.4.tgz#f51a2fb5838a99e06f9b6ec1edb674de67026435" - integrity sha512-3hx0kwU3uzG6ReQ3pnaFQPSktpBw6RHN3/ivDKEuU8g1XSfafowyvDnadjv1xp8IZqhtSukxlwv9bF6FhX8m0w== - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chrome-remote-interface@0.28.2: - version "0.28.2" - resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.28.2.tgz#6be3554d2c227ff07eb74baa7e5d4911da12a5a6" - integrity sha512-F7mjof7rWvRNsJqhVXuiFU/HWySCxTA9tzpLxUJxVfdLkljwFJ1aMp08AnwXRmmP7r12/doTDOMwaNhFCJsacw== - dependencies: - commander "2.11.x" - ws "^7.2.0" - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -code-oss-dev@coder/vscode#a13f6e1434ad6ab820eef0ecca5b923b3e275667: - version "1.64.2" - resolved "https://codeload.github.com/coder/vscode/tar.gz/a13f6e1434ad6ab820eef0ecca5b923b3e275667" - dependencies: - "@microsoft/applicationinsights-web" "^2.6.4" - "@parcel/watcher" "2.0.5" - "@vscode/debugprotocol" "1.51.0" - "@vscode/iconv-lite-umd" "0.7.0" - "@vscode/ripgrep" "^1.14.1" - "@vscode/sqlite3" "4.0.12" - "@vscode/sudo-prompt" "9.3.1" - "@vscode/vscode-languagedetection" "1.0.21" - applicationinsights "1.4.2" - graceful-fs "4.2.8" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.3" - jschardet "3.0.0" - minimist "^1.2.5" - native-is-elevated "0.4.3" - native-watchdog "1.3.0" - node-pty "0.11.0-beta11" - spdlog "^0.13.0" - tas-client-umd "0.1.4" - v8-inspect-profiler "^0.1.0" - vscode-oniguruma "1.6.1" - vscode-proxy-agent "^0.11.0" - vscode-regexpp "^3.1.0" - vscode-textmate "6.0.0" - xterm "4.17.0-beta.7" - xterm-addon-search "0.9.0-beta.8" - xterm-addon-serialize "0.7.0-beta.6" - xterm-addon-unicode11 "0.4.0-beta.1" - xterm-addon-webgl "0.12.0-beta.21" - xterm-headless "4.17.0-beta.7" - yauzl "^2.9.2" - yazl "^2.4.3" - optionalDependencies: - "@vscode/windows-registry" "1.0.5" - electron "13.5.1" - keytar "7.2.0" - 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" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -commander@2.11.x: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== - -concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -config-chain@^1.1.11: - version "1.1.13" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" - integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -core-js@^3.6.5: - version "3.17.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.3.tgz#8e8bd20e91df9951e903cabe91f9af4a0895bc1e" - integrity sha512-lyvajs+wd8N1hXfzob1LdOCCHFU4bGMbqqmLn1Q4QlCpDqWPpGf+p0nj+LNrvDDG33j0hZXw2nsvvVpHysxyNw== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -data-uri-to-buffer@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" - integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - -debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detect-node@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" - integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -electron@13.5.1: - version "13.5.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-13.5.1.tgz#76c02c39be228532f886a170b472cbd3d93f0d0f" - integrity sha512-ZyxhIhmdaeE3xiIGObf0zqEyCyuIDqZQBv9NKX8w5FNzGm87j4qR0H1+GQg6vz+cA1Nnv1x175Zvimzc0/UwEQ== - dependencies: - "@electron/get" "^1.0.1" - "@types/node" "^14.6.2" - extract-zip "^1.0.3" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -encodeurl@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -es6-error@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - -extract-zip@^1.0.3: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== - dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" - yauzl "^2.10.0" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -file-uri-to-path@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" - integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -ftp@^0.3.10: - version "0.3.10" - resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" - integrity sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0= - dependencies: - readable-stream "1.1.x" - xregexp "2.0.0" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" - integrity sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg== - dependencies: - "@tootallnate/once" "1" - data-uri-to-buffer "3" - debug "4" - file-uri-to-path "2" - fs-extra "^8.1.0" - ftp "^0.3.10" - -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= - -global-agent@^2.0.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc" - integrity sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg== - dependencies: - boolean "^3.0.1" - core-js "^3.6.5" - es6-error "^4.1.1" - matcher "^3.0.0" - roarr "^2.15.3" - semver "^7.3.2" - serialize-error "^7.0.1" - -global-tunnel-ng@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz#d03b5102dfde3a69914f5ee7d86761ca35d57d8f" - integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg== - dependencies: - encodeurl "^1.0.2" - lodash "^4.17.10" - npm-conf "^1.1.3" - tunnel "^0.0.6" - -globalthis@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b" - integrity sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ== - dependencies: - define-properties "^1.1.3" - -got@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.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== - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.4, ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -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" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "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= - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -jschardet@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-3.0.0.tgz#898d2332e45ebabbdb6bf2feece9feea9a99e882" - integrity sha512-lJH6tJ77V8Nzd5QWRkFYCLc13a3vADkh3r/Fi8HupZGWk2OVVDfnZP8V/VgQgZ+lzW0kG2UGb5hFgt3V3ndotQ== - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -keytar@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.2.0.tgz#4db2bec4f9700743ffd9eda22eebb658965c8440" - integrity sha512-ECSaWvoLKI5SI0pGpZQeUV1/lpBYfkaxvoSp3zkiPOz05VavwSfLi8DdEaa9N2ekQZv3Chy+o7aP6n9mairBgw== - dependencies: - node-addon-api "^3.0.0" - prebuild-install "^6.0.0" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -lodash@^4.17.10: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -matcher@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" - integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng== - dependencies: - escape-string-regexp "^4.0.0" - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - -minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - -mkdirp@^0.5.4, mkdirp@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nan@2.14.2: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nan@^2.13.2, nan@^2.14.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" - integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== - -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - -native-is-elevated@0.4.3: - version "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@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== - -node-abi@^2.21.0: - version "2.30.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" - integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== - dependencies: - semver "^5.4.1" - -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== - -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-url@^4.1.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" - integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== - -npm-conf@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - -npmlog@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-keys@^1.0.12: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -prebuild-install@^6.0.0: - version "6.1.4" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" - integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^2.21.0" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -progress@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - -proxy-from-env@^1.1.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== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -readable-stream@1.1.x: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.6, readable-stream@^2.2.2: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.1, readable-stream@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -roarr@^2.15.3: - version "2.15.4" - resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd" - integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A== - dependencies: - boolean "^3.0.1" - detect-node "^2.0.4" - globalthis "^1.0.1" - json-stringify-safe "^5.0.1" - semver-compare "^1.0.0" - sprintf-js "^1.1.2" - -safe-buffer@^5.0.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver@^5.3.0, semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -serialize-error@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" - integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== - dependencies: - type-fest "^0.13.1" - -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -signal-exit@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - dependencies: - decompress-response "^4.2.0" - once "^1.3.1" - simple-concat "^1.0.0" - -smart-buffer@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socks-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" - integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== - dependencies: - agent-base "^6.0.2" - debug "4" - socks "^2.3.3" - -socks@^2.3.3: - version "2.6.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" - integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== - dependencies: - ip "^1.1.5" - smart-buffer "^4.1.0" - -spdlog@^0.13.0: - version "0.13.6" - resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.13.6.tgz#26b2e13d46cbf8f2334c12ba2a8cc82de5a28f02" - integrity sha512-iGqDoA88G3Rv3lkbVQglTulp3nv12FzND6LDC7cOZ+OoFvWnXVb3+Ebhed60oZ6+IWWGwDtjXK6ympwr7C1XmQ== - dependencies: - bindings "^1.5.0" - mkdirp "^0.5.5" - nan "^2.14.0" - -sprintf-js@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -sumchecker@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42" - integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg== - dependencies: - debug "^4.1.0" - -tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -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== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tas-client-umd@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/tas-client-umd/-/tas-client-umd-0.1.4.tgz#49db4130dd63a8342fabf77185a740fc6a7bea80" - integrity sha512-1hFqJeLD3ryNikniIaO7TItlXhS5vx7bJ+wbPDf8o+IifgwwOWK2ARisdEM9SnJd0ccfcwNPG6Po+RiKn5L2hg== - -to-readable-stream@^1.0.0: - version "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== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -v8-inspect-profiler@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.1.0.tgz#0d3f80e2dc878f737c31ae7ff4c033425a33a724" - integrity sha512-K7RyY4p59+rIPvgcTN/Oo7VU9cJ68LOl+dz8RCh/M4VwbZ9yS3Ci+qajbMDojW207anNn7CehkLvqpSIrNT9oA== - dependencies: - chrome-remote-interface "0.28.2" - -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" - resolved "https://registry.yarnpkg.com/vscode-proxy-agent/-/vscode-proxy-agent-0.11.0.tgz#9dc8d2bb9d448f1e33bb1caef97a741289660f2f" - integrity sha512-Y5mHjDGq/OKOvKG0IwCYfj25cvQ2cLEil8ce8n55IZHRAP9RF3e1sKU4ZUNDB8X2NIpKwyltrWpK9tFFE/kc3g== - dependencies: - "@tootallnate/once" "^1.1.2" - agent-base "^6.0.2" - debug "^4.3.1" - get-uri "^3.0.2" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - socks-proxy-agent "^5.0.0" - optionalDependencies: - vscode-windows-ca-certs "^0.3.0" - -vscode-regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f" - integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg== - -vscode-textmate@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz#a3777197235036814ac9a92451492f2748589210" - integrity sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ== - -vscode-windows-ca-certs@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/vscode-windows-ca-certs/-/vscode-windows-ca-certs-0.3.0.tgz#324e1f8ba842bbf048a39e7c0ee8fe655e9adfcc" - integrity sha512-CYrpCEKmAFQJoZNReOrelNL+VKyebOVRCqL9evrBlVcpWQDliliJgU5RggGS8FPGtQ3jAKLQt9frF0qlxYYPKA== - dependencies: - node-addon-api "^3.0.2" - -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" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -windows-foreground-love@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/windows-foreground-love/-/windows-foreground-love-0.4.0.tgz#79b628ba0ffc0436fa8066da8f85db042e431976" - integrity sha512-IPv60/Z6pJE8AQEBLzYWFfCVh6Z5G6qCrysbJzXYCKFkQY3XivsePdbZ0C0wqRNqsFjpVr06vnIdKfIcZFgDXQ== - -windows-mutex@0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/windows-mutex/-/windows-mutex-0.4.1.tgz#2eccdfc312e15e7f212fb16280f060fc6b5f00cd" - integrity sha512-RW1xN6yzw8hAcfy1BKVClhJZg/PzuNz4Qz+CNhYmmdzJiwKSU9CqvVcmAvNrtdinNkXfSqTZVBVh5kUATg6xOA== - dependencies: - bindings "^1.2.1" - nan "^2.14.0" - -windows-process-tree@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/windows-process-tree/-/windows-process-tree-0.3.2.tgz#8c39f39e7707e09fd74638a7ef644b5f389096d3" - integrity sha512-x8Y4KOV8tUhhPiO0TH7wOMTZ677rw7VEwq+dTuHHiLTClkrNXWSY3XzP6ez3fs2Cab4FajrtmiqRs0jTMZHfyw== - dependencies: - nan "^2.13.2" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@^7.2.0: - version "7.5.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" - integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== - -xregexp@2.0.0: - version "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.8: - version "0.9.0-beta.8" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.8.tgz#b3cbe364e24ea5765c36cba47c78a14acbe69062" - integrity sha512-FCv5zo6BVc7DaG3kLEOskKDCns7y2fRHqmZDrSmyfCd1lPmm9OA3UYdxZy5BtNkn6bc8amwpB7J2bIdu8VV7Qg== - -xterm-addon-serialize@0.7.0-beta.6: - version "0.7.0-beta.6" - resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.7.0-beta.6.tgz#f1512f0690821d0c2a88700fb706c1212f69a39a" - integrity sha512-tP/larcKOQaCgfq5XlQT8plTRwi2fZHqy8UqbMnZ6LQZajvc01oGp5njaasfXu5vyIFhugp5fgH5vy5zgspbwg== - -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.21: - version "0.12.0-beta.21" - resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.21.tgz#8c476d25ec40b7535dedbd87b9cdf5eeeb41fc93" - integrity sha512-aeZcjxbtPfkVutNnXqCv9E5V4DoYecUFztWOjBzI/dgC1xfMOMVWzsymK9H1EUfd6u0ymEIeOjvX9bHsXNUzdA== - -xterm-headless@4.17.0-beta.7: - version "4.17.0-beta.7" - resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.17.0-beta.7.tgz#6ae3f5436a29f7e4554c6d9d7f4f3eb958d18240" - integrity sha512-1JoKhlsENqWqDIKNHxm5jBQj3Es3gHHM+wDi9ESyodn6J+FpTkM5859wnL+/rEm7PKKvahPICqjTSjdXq5Jv9g== - -xterm@4.17.0-beta.7: - version "4.17.0-beta.7" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.17.0-beta.7.tgz#c11d52403a8d6456b92f2086e1797c64018328d6" - integrity sha512-FhC12WUljy8pTWr0oquVE0U567H1ZPAREKkN+wWLSZODNJwc8/txP2Ajg9byG++bkxfBP3CNEmDzaP0hoall8Q== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yauzl@^2.10.0, yauzl@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yazl@^2.4.3: - version "2.5.1" - resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" - integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== - dependencies: - buffer-crc32 "~0.2.3" From d22f312cab0e1f6d0770ec5a0e2af727bf6742ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 09:27:04 -0700 Subject: [PATCH 048/760] chore(deps): update dependency normalize-package-data to v4 (#4991) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 44 ++++++++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 1396d65a1a65..4d65eaf48b25 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ }, "resolutions": { "ansi-regex": "^5.0.1", - "normalize-package-data": "^3.0.0", + "normalize-package-data": "^4.0.0", "doctoc/underscore": "^1.13.1", "doctoc/**/trim": "^1.0.0", "postcss": "^8.2.1", diff --git a/yarn.lock b/yarn.lock index f235c181d8ee..0c55017b43cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2110,12 +2110,12 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hosted-git-info@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.0.tgz#9f06639a90beff66cacae6e77f8387b431d61ddc" - integrity sha512-fqhGdjk4av7mT9fU/B01dUtZ+WZSc/XEXMoLXDVZukiQRXxeHSSz3AqbeWRJHtF8EQYHlAgB1NSAHU0Cm7aqZA== +hosted-git-info@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-5.0.0.tgz#df7a06678b4ebd722139786303db80fdf302ea56" + integrity sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q== dependencies: - lru-cache "^6.0.0" + lru-cache "^7.5.1" html-tags@^3.1.0: version "3.1.0" @@ -2340,6 +2340,13 @@ is-core-module@^2.2.0, is-core-module@^2.4.0: dependencies: has "^1.0.3" +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" @@ -2648,6 +2655,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.5.1: + version "7.5.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.5.1.tgz#660a134c2c3c015aa453b03df55d2a9f0c216a0f" + integrity sha512-q1TS8IqKvcg3aScamKCHpepSrHF537Ww7nHahBOxhDu9D2YoBXAsj/7uFdZFj1xJr9LmyeJ62AdyofCHafUbIA== + make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -2908,15 +2920,15 @@ nopt@^5.0.0: dependencies: abbrev "1" -normalize-package-data@^2.3.2, normalize-package-data@^2.5.0, normalize-package-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.1.tgz#98dc56dfe6755d99b1c53f046e1e3d2dde55a1c7" - integrity sha512-D/ttLdxo71msR4FF3VgSwK4blHfE3/vGByz1NCeE7/Dh8reQOKNJJjk5L10mLq9jxa+ZHzT1/HLgxljzbXE7Fw== +normalize-package-data@^2.3.2, normalize-package-data@^2.5.0, normalize-package-data@^3.0.0, normalize-package-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-4.0.0.tgz#1122d5359af21d4cd08718b92b058a658594177c" + integrity sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g== dependencies: - hosted-git-info "^4.0.0" - resolve "^1.17.0" - semver "^7.3.2" - validate-npm-package-license "^3.0.1" + hosted-git-info "^5.0.0" + is-core-module "^2.8.1" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" normalize-range@^0.1.2: version "0.1.2" @@ -3591,7 +3603,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: +resolve@^1.13.1, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -3658,7 +3670,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5: +semver@^7.0.0, semver@^7.1.3, semver@^7.2.1, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -4396,7 +4408,7 @@ v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -validate-npm-package-license@^3.0.1: +validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== From a0561c7685d316bd66582632beb6872c5c8fbaf1 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 15 Mar 2022 16:59:40 -0700 Subject: [PATCH 049/760] feat(ci): publish dev builds to @coder/code-server-pr (#4972) * feat(npm): use DEV_PACKAGE_NAME for development * feat(ci): use npm v7 in npm job * fixup: add npm version * fixup: always set package name * wip * fix: check for npm and npm v7 * fixup * fixup: move after release dir created * fixup: use jq * fixup: use jq correctly --- ci/steps/publish-npm.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/ci/steps/publish-npm.sh b/ci/steps/publish-npm.sh index 7ba3a0f97d2f..b2d87e51e04c 100755 --- a/ci/steps/publish-npm.sh +++ b/ci/steps/publish-npm.sh @@ -51,6 +51,13 @@ main() { exit 1 fi + # Check that we're using at least v7 of npm CLI + if ! command -v jq &> /dev/null; then + echo "Couldn't find jq" + echo "We need this in order to modify the package.json for dev builds." + exit 1 + fi + # This allows us to publish to npm in CI workflows if [[ ${CI-} ]]; then echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc @@ -86,6 +93,10 @@ main() { # See: https://github.com/coder/code-server/pull/3935 echo "node_modules.asar" > release/.npmignore + # We use this to set the name of the package in the + # package.json + PACKAGE_NAME="code-server" + # NOTES:@jsjoeio # We only need to run npm version for "development" and "staging". # This is because our release:prep script automatically bumps the version @@ -112,12 +123,14 @@ main() { # Source: https://github.com/actions/checkout/issues/58#issuecomment-614041550 PR_NUMBER=$(echo "$GITHUB_REF" | awk 'BEGIN { FS = "/" } ; { print $3 }') NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA" + PACKAGE_NAME="@coder/code-server-pr" # This means the npm version will be tagged with "" # and installed when a user runs `yarn install code-server@` NPM_TAG="$PR_NUMBER" fi echo "using tag: $NPM_TAG" + echo "using package name: $PACKAGE_NAME" # We modify the version in the package.json # to be the current version + the PR number + commit SHA @@ -125,9 +138,14 @@ main() { # Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040" # Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040" pushd release - # NOTE:@jsjoeio + # NOTE@jsjoeio # I originally tried to use `yarn version` but ran into issues and abandoned it. npm version "$NPM_VERSION" + # NOTE@jsjoeio + # Use the development package name + # This is so we don't clutter the code-server versions on npm + # with development versions. + jq ".name |= \"$PACKAGE_NAME\"" package.json popd fi @@ -141,7 +159,10 @@ main() { return fi - yarn publish --non-interactive release --tag "$NPM_TAG" + # NOTE@jsjoeio + # Since the dev builds are scoped to @coder + # We pass --access public to ensure npm knows it's not private. + yarn publish --non-interactive release --tag "$NPM_TAG" --access public } main "$@" From 5afb26fb6076e52a76fe2780f2eab4769475d35e Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Thu, 17 Mar 2022 11:52:39 -0700 Subject: [PATCH 050/760] fix(ci): correctly download npm/docker artifacts (#4995) * fix(ci): correctly download npm artifact * fixup! fix(ci): correctly download npm artifact * docs: update MAINTAINING * fixup! docs: update MAINTAINING * fixup! Merge branch 'main' into 4949-chore-fix-npm-workflow * chore: get ci to run * refactor: use vVERSION branch name instead of release * refactor: use new download artifact in docker workflow * refactor: clean up release-github-assets script * fixup: remove extra v * fixup! fixup: remove extra v --- .github/workflows/ci.yaml | 3 ++- .github/workflows/docker.yaml | 13 +++++++++++++ .github/workflows/npm-brew.yaml | 9 ++++++++- ci/build/release-github-assets.sh | 9 +++++++++ ci/steps/docker-buildx-push.sh | 9 +++------ ci/steps/publish-npm.sh | 8 -------- docs/MAINTAINING.md | 2 +- 7 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b7450d23b4f..32e2ead383d3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -197,7 +197,8 @@ jobs: with: fetch-depth: 0 - - uses: actions/download-artifact@v3 + - name: Download artifact + uses: actions/download-artifact@v3 id: download with: name: "npm-package" diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 7cc0c1e27e11..d622e2c73fae 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -35,6 +35,19 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get version + id: version + run: echo "::set-output name=version::$(jq .version package.json)" + + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 + id: download + with: + branch: v${{ steps.version.outputs.version }} + workflow_conclusion: completed + name: "release-packages" + path: release-packages + - name: Run ./ci/steps/docker-buildx-push.sh run: ./ci/steps/docker-buildx-push.sh env: diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index 8c8b84fe2c38..785f427c4a83 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -23,9 +23,16 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - name: Get version + id: version + run: echo "::set-output name=version::$(jq .version package.json)" + + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 id: download with: + branch: v${{ steps.version.outputs.version }} + workflow_conclusion: completed name: "npm-package" path: release-npm-package diff --git a/ci/build/release-github-assets.sh b/ci/build/release-github-assets.sh index 29f27566816a..6395adcb7eec 100755 --- a/ci/build/release-github-assets.sh +++ b/ci/build/release-github-assets.sh @@ -9,6 +9,15 @@ set -euo pipefail main() { cd "$(dirname "$0")/../.." source ./ci/lib.sh + source ./ci/steps/steps-lib.sh + + # NOTE@jsjoeio - only needed if we use the download_artifact + # because we talk to the GitHub API. + # Needed to use GitHub API + if ! is_env_var_set "GITHUB_TOKEN"; then + echo "GITHUB_TOKEN is not set. Cannot download npm release-packages without GitHub credentials." + exit 1 + fi download_artifact release-packages ./release-packages local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.deb,.rpm}) diff --git a/ci/steps/docker-buildx-push.sh b/ci/steps/docker-buildx-push.sh index c3bb0579635a..ba09cd76a115 100755 --- a/ci/steps/docker-buildx-push.sh +++ b/ci/steps/docker-buildx-push.sh @@ -4,12 +4,9 @@ set -euo pipefail main() { cd "$(dirname "$0")/../.." - # ci/lib.sh sets VERSION and provides download_artifact here - source ./ci/lib.sh - - # Download the release-packages artifact - download_artifact release-packages ./release-packages - + # NOTE@jsjoeio - this script assumes that you've downloaded + # the release-packages artifact to ./release-packages before + # running this docker buildx step docker buildx bake -f ci/release-image/docker-bake.hcl --push } diff --git a/ci/steps/publish-npm.sh b/ci/steps/publish-npm.sh index b2d87e51e04c..36ca0773b3f5 100755 --- a/ci/steps/publish-npm.sh +++ b/ci/steps/publish-npm.sh @@ -13,14 +13,6 @@ main() { exit 1 fi - # NOTE@jsjoeio - only needed if we use the download_artifact - # because we talk to the GitHub API. - # Needed to use GitHub API - if ! is_env_var_set "GITHUB_TOKEN"; then - echo "GITHUB_TOKEN is not set. Cannot download npm release artifact without GitHub credentials." - exit 1 - fi - ## Publishing Information # All the variables below are used to determine how we should publish # the npm package. We also use this information for bumping the version. diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index 7e0c0c24812a..07699ec25a2d 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -164,7 +164,7 @@ If you're the current release manager, follow these steps: ### Publishing a release -1. Create a release branch called `v0.0.0` but replace with new version +1. Create a new branch called `v0.0.0` (replace 0s with actual version aka v4.1.0) 1. Run `yarn release:prep` and type in the new version (e.g., `3.8.1`) 1. GitHub Actions will generate the `npm-package`, `release-packages` and `release-images` artifacts. You do not have to wait for this step to complete From 815c4cf1f0a126e7d326f2882efde3d527a1165e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:31:02 -0700 Subject: [PATCH 051/760] chore(deps): update actions/cache action to v3 (#5003) Co-authored-by: Renovate Bot --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 32e2ead383d3..433132b37b27 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,7 +43,7 @@ jobs: - name: Fetch dependencies from cache id: cache-yarn - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} @@ -81,7 +81,7 @@ jobs: - name: Fetch dependencies from cache id: cache-yarn - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} @@ -117,7 +117,7 @@ jobs: - name: Fetch dependencies from cache id: cache-yarn - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} @@ -140,7 +140,7 @@ jobs: - name: Fetch Code build from cache id: cache-vscode-2 - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | lib/vscode/.build @@ -430,7 +430,7 @@ jobs: - name: Fetch dependencies from cache id: cache-yarn - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "**/node_modules" key: yarn-build-${{ hashFiles('**/yarn.lock') }} From 60ebf2f8511c37fbb8e999338e30b07c6c430fbe Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 21 Mar 2022 16:18:32 -0700 Subject: [PATCH 052/760] chore: update to minimist-list (#5006) --- package.json | 3 ++- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4d65eaf48b25..80a79f0b1abe 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,8 @@ "vm2": "^3.9.6", "follow-redirects": "^1.14.8", "node-fetch": "^2.6.7", - "nanoid": "^3.1.31" + "nanoid": "^3.1.31", + "minimist": "npm:minimist-lite@2.2.0" }, "dependencies": { "@coder/logger": "1.1.16", diff --git a/yarn.lock b/yarn.lock index 0c55017b43cf..d654870946d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2826,10 +2826,10 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.0, minimist@^1.2.5, "minimist@npm:minimist-lite@2.2.0", minimist@~1.2.5: + version "2.2.0" + resolved "https://registry.yarnpkg.com/minimist-lite/-/minimist-lite-2.2.0.tgz#43992acac6bb17e78acb6eee784d1da2f7cc3216" + integrity sha512-o9M0Iz5ELqCT4NzeaZHBBlV4+ruOGGWV6lVxFoghC6Wvp4W6ECbBBpmDRHdk72O/sMh3QT0c/0XDKhtGlztRZw== minipass@^3.0.0: version "3.1.3" From be727871f6f7f0af48e9e3d0039d59aa46c855b5 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 21 Mar 2022 16:57:36 -0700 Subject: [PATCH 053/760] refactor: checkout homebrew-core in action instead of script (#4996) * refactor: checkout homebrew-core in action instead of script This moves the git clone step from the `brew-bump.sh` script into the `npm-brew.yaml` as part of the job using actions/checkout instead. * refactor: clean up brew-bump.sh script * fixup * fixup!: remove step to clean up homebrew repo * fixup!: use correct ./ci path steps-lib.sh * fixup!: add exit code 0 for duplicate PRs --- .github/workflows/npm-brew.yaml | 11 ++++++- ci/steps/brew-bump.sh | 56 +++++++++++++-------------------- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/.github/workflows/npm-brew.yaml b/.github/workflows/npm-brew.yaml index 785f427c4a83..60b3208b5ff3 100644 --- a/.github/workflows/npm-brew.yaml +++ b/.github/workflows/npm-brew.yaml @@ -56,11 +56,20 @@ jobs: id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master - - uses: actions/checkout@v3 + - name: Checkout code-server + uses: actions/checkout@v3 + + - name: Checkout cdrci/homebrew-core + uses: actions/checkout@v3 + with: + repository: cdrci/homebrew-core + path: homebrew-core + - name: Configure git run: | git config user.name github-actions git config user.email github-actions@github.com + - name: Bump code-server homebrew version env: HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} diff --git a/ci/steps/brew-bump.sh b/ci/steps/brew-bump.sh index 7df17da92431..68ae26de2ef7 100755 --- a/ci/steps/brew-bump.sh +++ b/ci/steps/brew-bump.sh @@ -2,7 +2,9 @@ set -euo pipefail main() { - cd "$(dirname "$0")/../.." + REPO="homebrew-core" + GITHUB_USERNAME="cdrci" + UPSTREAM_USERNAME_AND_REPO="Homebrew/$REPO" # Only sourcing this so we get access to $VERSION source ./ci/lib.sh source ./ci/steps/steps-lib.sh @@ -21,25 +23,18 @@ main() { exit 1 fi - # NOTE: we need to make sure coderci/homebrew-core - # is up-to-date - # otherwise, brew bump-formula-pr will use an - # outdated base - echo "Cloning coderci/homebrew-core" - git clone https://github.com/coderci/homebrew-core.git - # Make sure the git clone step is successful - if directory_exists "homebrew-core"; then - echo "git clone failed. Cannot find homebrew-core directory." + if ! directory_exists "$REPO"; then + echo "git clone failed. Cannot find $REPO directory." ls -la exit 1 fi - echo "Changing into homebrew-core directory" - pushd homebrew-core && pwd + echo "Changing into $REPO directory" + pushd "$REPO" && pwd - echo "Adding Homebrew/homebrew-core" - git remote add upstream https://github.com/Homebrew/homebrew-core.git + echo "Adding $UPSTREAM_USERNAME_AND_REPO" + git remote add upstream "https://github.com/$UPSTREAM_USERNAME_AND_REPO.git" # Make sure the git remote step is successful if ! git config remote.upstream.url > /dev/null; then @@ -50,24 +45,22 @@ main() { fi # TODO@jsjoeio - can I somehow check that this succeeded? - echo "Fetching upstream Homebrew/hombrew-core commits" - git fetch upstream + echo "Fetching upstream $UPSTREAM_USERNAME_AND_REPO commits" + git fetch upstream master # TODO@jsjoeio - can I somehow check that this succeeded? - echo "Merging in latest Homebrew/homebrew-core changes" + echo "Merging in latest $UPSTREAM_USERNAME_AND_REPO changes branch master" git merge upstream/master - echo "Pushing changes to coderci/homebrew-core fork on GitHub" - # GIT_ASKPASS lets us use the password when pushing without revealing it in the process list # See: https://serverfault.com/a/912788 PATH_TO_GIT_ASKPASS="$HOME/git-askpass.sh" # Source: https://serverfault.com/a/912788 # shellcheck disable=SC2016,SC2028 - echo 'echo $HOMEBREW_GITHUB_API_TOKEN' > "$PATH_TO_ASKPASS" + echo 'echo $HOMEBREW_GITHUB_API_TOKEN' > "$PATH_TO_GIT_ASKPASS" # Make sure the git-askpass.sh file creation is successful - if file_exists "$PATH_TO_GIT_ASKPASS"; then + if ! file_exists "$PATH_TO_GIT_ASKPASS"; then echo "git-askpass.sh not found in $HOME." ls -la "$HOME" exit 1 @@ -77,16 +70,20 @@ main() { chmod +x "$PATH_TO_GIT_ASKPASS" # Make sure the git-askpass.sh file is executable - if is_executable "$PATH_TO_GIT_ASKPASS"; then + if ! is_executable "$PATH_TO_GIT_ASKPASS"; then echo "$PATH_TO_GIT_ASKPASS is not executable." ls -la "$PATH_TO_GIT_ASKPASS" exit 1 fi + # NOTE: we need to make sure our fork is up-to-date + # otherwise, brew bump-formula-pr will use an + # outdated base + echo "Pushing changes to $GITHUB_USERNAME/$REPO fork on GitHub" # Export the variables so git sees them export HOMEBREW_GITHUB_API_TOKEN="$HOMEBREW_GITHUB_API_TOKEN" - export GIT_ASKPASS="$PATH_TO_ASKPASS" - git push https://coder-oss@github.com/coder-oss/homebrew-core.git --all + export GIT_ASKPASS="$PATH_TO_GIT_ASKPASS" + git push "https://$GITHUB_USERNAME@github.com/$GITHUB_USERNAME/$REPO.git" --all # Find the docs for bump-formula-pr here # https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18 @@ -94,21 +91,12 @@ main() { if ! output=$(brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit 2>&1); then if [[ $output == *"Duplicate PRs should not be opened"* ]]; then echo "$VERSION is already submitted" + exit 0 else echo "$output" exit 1 fi fi - - # Clean up and remove homebrew-core - popd - rm -rf homebrew-core - - # Make sure homebrew-core is removed - if directory_exists "homebrew-core"; then - echo "rm -rf homebrew-core failed." - ls -la - fi } main "$@" From a1af9e2a5646df1a587f73fbe1455ca28824aeee Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 22 Mar 2022 15:07:14 -0500 Subject: [PATCH 054/760] chore: move to patches (#4997) * Move integration types into code-server This will be easier to maintain than to have it as a patch. * Disable connection token Using a flag means we will not need to patch it out. I think this is new from 1.64? * Add product.json to build process This way we do not have to patch it. * Ship with remote agent package.json Instead of the root one. This contains fewer dependencies. * Let Code handle errors This way we will not have to patch Code to make this work and I think it makes sense to let Code handle the request. If we do want to handle errors we can do it cleanly by patching their error handler to throw instead. * Move manifest override into code-server This way we will not have to patch it. * Move to patches - Switch submodule to track upstream - Add quilt to the process - Add patches The node-* ignore was ignoring one of the diffs so I removed it. This was added when we were curling Node as node-v{version}-darwin-x64 for the macOS build but this no longer happens (we use the Node action to install a specific version now so we just use the system-wide Node). * Use pre-packaged Code --- .github/workflows/ci.yaml | 25 ++- .gitignore | 9 +- .gitmodules | 2 +- ci/build/build-packages.sh | 5 + ci/build/build-release.sh | 70 +++--- ci/build/build-standalone-release.sh | 5 - ci/dev/test-unit.sh | 16 +- docs/CONTRIBUTING.md | 162 ++++++-------- lib/vscode | 2 +- patches/base-path.diff | 305 +++++++++++++++++++++++++++ patches/connection-type.diff | 19 ++ patches/display-language.diff | 265 +++++++++++++++++++++++ patches/github-auth.diff | 118 +++++++++++ patches/insecure-notification.diff | 57 +++++ patches/integration.diff | 269 +++++++++++++++++++++++ patches/last-opened.diff | 32 +++ patches/local-storage.diff | 66 ++++++ patches/log-level.diff | 21 ++ patches/logout.diff | 107 ++++++++++ patches/marketplace.diff | 53 +++++ patches/node-version.diff | 106 ++++++++++ patches/post-install.diff | 26 +++ patches/proposed-api.diff | 36 ++++ patches/proxy-uri.diff | 104 +++++++++ patches/series | 20 ++ patches/service-worker.diff | 67 ++++++ patches/store-socket.diff | 31 +++ patches/unique-db.diff | 63 ++++++ patches/update-check.diff | 132 ++++++++++++ patches/webview.diff | 46 ++++ src/browser/serviceWorker.ts | 14 ++ src/node/cli.ts | 65 ++++-- src/node/entry.ts | 4 +- src/node/main.ts | 45 ++-- src/node/routes/index.ts | 8 + src/node/routes/vscode.ts | 70 ++++-- test/unit/node/cli.test.ts | 10 +- 37 files changed, 2245 insertions(+), 210 deletions(-) create mode 100644 patches/base-path.diff create mode 100644 patches/connection-type.diff create mode 100644 patches/display-language.diff create mode 100644 patches/github-auth.diff create mode 100644 patches/insecure-notification.diff create mode 100644 patches/integration.diff create mode 100644 patches/last-opened.diff create mode 100644 patches/local-storage.diff create mode 100644 patches/log-level.diff create mode 100644 patches/logout.diff create mode 100644 patches/marketplace.diff create mode 100644 patches/node-version.diff create mode 100644 patches/post-install.diff create mode 100644 patches/proposed-api.diff create mode 100644 patches/proxy-uri.diff create mode 100644 patches/series create mode 100644 patches/service-worker.diff create mode 100644 patches/store-socket.diff create mode 100644 patches/unique-db.diff create mode 100644 patches/update-check.diff create mode 100644 patches/webview.diff create mode 100644 src/browser/serviceWorker.ts diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 433132b37b27..cb7a4e87e1a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -110,6 +110,12 @@ jobs: fetch-depth: 0 submodules: true + - name: Install quilt + run: sudo apt update && sudo apt install quilt + + - name: Patch Code + run: quilt push -a + - name: Install Node.js v14 uses: actions/setup-node@v3 with: @@ -132,25 +138,22 @@ jobs: run: yarn build # Get Code's git hash. When this changes it means the content is - # different and we need to rebuild. Use VSCODE_CACHE_VERSION to force a - # rebuild. + # different and we need to rebuild. - name: Get latest lib/vscode rev id: vscode-rev run: echo "::set-output name=rev::$(git rev-parse HEAD:./lib/vscode)" - - name: Fetch Code build from cache - id: cache-vscode-2 + # We need to rebuild when we have a new version of Code or when any of + # the patches changed. Use VSCODE_CACHE_VERSION to force a rebuild. + - name: Fetch prebuilt Code package from cache + id: cache-vscode uses: actions/cache@v3 with: - path: | - lib/vscode/.build - lib/vscode/out-build - lib/vscode/out-vscode-reh-web - lib/vscode/out-vscode-reh-web-min - key: vscode-reh-build-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }} + path: lib/vscode-reh-web-* + key: vscode-reh-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff') }} - name: Build vscode - if: steps.cache-vscode-2.outputs.cache-hit != 'true' + if: steps.cache-vscode.outputs.cache-hit != 'true' run: yarn build:vscode # Our code imports code from VS Code's `out` directory meaning VS Code diff --git a/.gitignore b/.gitignore index 3cc6e31d7af3..e615ec464617 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,17 @@ release-packages/ release-gcp/ release-images/ node_modules -vendor/modules -node-* /plugins /lib/coder-cloud-agent .home coverage **/.DS_Store + +# Code packages itself here. +/lib/vscode-reh-web-* + # Failed e2e test videos are saved here test/test-results + +# Quilt's internal data. +/.pc diff --git a/.gitmodules b/.gitmodules index a185a80e1fd7..9854a1b1dd30 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "lib/vscode"] path = lib/vscode - url = https://github.com/coder/vscode + url = https://github.com/microsoft/vscode diff --git a/ci/build/build-packages.sh b/ci/build/build-packages.sh index 8da6aec38332..6c85ccd33cde 100755 --- a/ci/build/build-packages.sh +++ b/ci/build/build-packages.sh @@ -50,6 +50,11 @@ release_nfpm() { export NFPM_ARCH + # Code deletes some files from the extension node_modules directory which + # leaves broken symlinks in the corresponding .bin directory. nfpm will fail + # on these broken symlinks so clean them up. + rm -fr "./release-standalone/lib/vscode/extensions/node_modules/.bin" + PKG_FORMAT="deb" NFPM_ARCH="$(get_nfpm_arch $PKG_FORMAT "$ARCH")" nfpm_config="$(envsubst < ./ci/build/nfpm.yaml)" diff --git a/ci/build/build-release.sh b/ci/build/build-release.sh index a720b2804df6..88dc26febb63 100755 --- a/ci/build/build-release.sh +++ b/ci/build/build-release.sh @@ -66,31 +66,10 @@ EOF bundle_vscode() { mkdir -p "$VSCODE_OUT_PATH" - rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH" - rsync "$VSCODE_SRC_PATH/out-vscode-reh-web${MINIFY:+-min}/" "$VSCODE_OUT_PATH/out" + rsync ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH" - rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions" - if [ "$KEEP_MODULES" = 0 ]; then - rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules" - else - rsync "$VSCODE_SRC_PATH/node_modules/" "$VSCODE_OUT_PATH/node_modules" - fi - rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions" - rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions" - rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions" - - mkdir -p "$VSCODE_OUT_PATH/resources/" - rsync "$VSCODE_SRC_PATH/resources/" "$VSCODE_OUT_PATH/resources/" - - # TODO: We should look into using VS Code's packaging task (see - # gulpfile.reh.js). For now copy this directory into the right spot (for some - # reason VS Code uses a different path in production). - mkdir -p "$VSCODE_OUT_PATH/bin/helpers" - rsync "$VSCODE_SRC_PATH/resources/server/bin/helpers/" "$VSCODE_OUT_PATH/bin/helpers" - chmod +x "$VSCODE_OUT_PATH/bin/helpers/browser.sh" - - # Add the commit and date and enable telemetry. This just makes telemetry - # available; telemetry can still be disabled by flag or setting. + # Add the commit, date, our name, links, and enable telemetry. This just makes + # telemetry available; telemetry can still be disabled by flag or setting. jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <( cat << EOF { @@ -98,15 +77,48 @@ bundle_vscode() { "commit": "$(cd "$VSCODE_SRC_PATH" && git rev-parse HEAD)", "quality": "stable", "date": $(jq -n 'now | todate'), - "codeServerVersion": "$VERSION" + "codeServerVersion": "$VERSION", + "nameShort": "code-server", + "nameLong": "code-server", + "applicationName": "code-server", + "dataFolderName": ".code-server", + "win32MutexName": "codeserver", + "licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE.txt", + "win32DirName": "code-server", + "win32NameVersion": "code-server", + "win32AppUserModelId": "coder.code-server", + "win32ShellNameShort": "c&ode-server", + "darwinBundleIdentifier": "com.coder.code.server", + "linuxIconName": "com.coder.code.server", + "reportIssueUrl": "https://github.com/coder/code-server/issues/new", + "documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484#vscode", + "keyboardShortcutsUrlMac": "https://go.microsoft.com/fwlink/?linkid=832143", + "keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144", + "keyboardShortcutsUrlWin": "https://go.microsoft.com/fwlink/?linkid=832145", + "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146", + "tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118", + "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter", + "linkProtectionTrustedDomains": [ + "https://open-vsx.org/" + ] } EOF ) > "$VSCODE_OUT_PATH/product.json" - # We remove the scripts field so that later on we can run - # yarn to fetch node_modules if necessary without build scripts running. - # We cannot use --no-scripts because we still want dependent package scripts to run. - jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json" + # Use the package.json for the web/remote server. It does not have the right + # version though so pull that from the main package.json. Also remove keytar + # since the web does not rely on it and that removes the dependency on + # libsecret. + jq --slurp '.[0] * {version: .[1].version} | del(.dependencies.keytar)' \ + "$VSCODE_SRC_PATH/remote/package.json" \ + "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json" + + rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock" + + if [ "$KEEP_MODULES" = 0 ]; then + rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules" + rm -Rf "$VSCODE_OUT_PATH/node_modules" + fi pushd "$VSCODE_OUT_PATH" symlink_asar diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh index cba139947163..2bc553a619ce 100755 --- a/ci/build/build-standalone-release.sh +++ b/ci/build/build-standalone-release.sh @@ -29,11 +29,6 @@ main() { cd "$RELEASE_PATH" yarn --production --frozen-lockfile - - # HACK: the version of Typescript vscode 1.57 uses in extensions/ - # leaves a few stray symlinks. Clean them up so nfpm does not fail. - # Remove this line when its no longer needed. - rm -fr "$RELEASE_PATH/lib/vscode/extensions/node_modules/.bin" } main "$@" diff --git a/ci/dev/test-unit.sh b/ci/dev/test-unit.sh index e1fd2ec7136e..f2dbf41b5159 100755 --- a/ci/dev/test-unit.sh +++ b/ci/dev/test-unit.sh @@ -14,11 +14,17 @@ main() { # Our code imports from `out` in order to work during development but if you # have only built for production you will have not have this directory. In # that case symlink `out` to a production build directory. - local vscode="lib/vscode" - local link="$vscode/out" - local target="out-build" - if [[ ! -e $link ]] && [[ -d $vscode/$target ]]; then - ln -s "$target" "$link" + if [[ ! -e lib/vscode/out ]]; then + pushd lib + local out=(vscode-reh-web-*) + if [[ -d "${out[0]}" ]]; then + ln -s "../${out[0]}/out" ./vscode/out + else + echo "Could not find lib/vscode/out or lib/vscode-reh-web-*" + echo "Code must be built before running unit tests" + exit 1 + fi + popd fi # We must keep jest in a sub-directory. See ../../test/package.json for more diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index c047fa6b960c..205311558019 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -7,7 +7,8 @@ - [Creating pull requests](#creating-pull-requests) - [Commits and commit history](#commits-and-commit-history) - [Development workflow](#development-workflow) - - [Updates to VS Code](#updates-to-vs-code) + - [Version updates to Code](#version-updates-to-code) + - [Patching Code](#patching-code) - [Build](#build) - [Help](#help) - [Test](#test) @@ -16,7 +17,7 @@ - [Integration tests](#integration-tests) - [End-to-end tests](#end-to-end-tests) - [Structure](#structure) - - [Modifications to VS Code](#modifications-to-vs-code) + - [Modifications to Code](#modifications-to-code) - [Currently Known Issues](#currently-known-issues) @@ -44,6 +45,8 @@ Here is what is needed: signature verification](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification) or follow [this tutorial](https://joeprevite.com/verify-commits-on-github) +- `quilt` + - Used to manage patches to Code - `rsync` and `unzip` - Used for code-server releases - `bats` @@ -57,7 +60,7 @@ If you're developing code-server on Linux, make sure you have installed or insta sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 ``` -These are required by VS Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for more information. +These are required by Code. See [their Wiki](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for more information. ## Creating pull requests @@ -78,26 +81,44 @@ we'll guide you. ## Development workflow -The current development workflow is a bit tricky because we have this repo and we use our `coder/vscode` fork inside it with [`yarn link`](https://classic.yarnpkg.com/lang/en/docs/cli/link/). - -Here are these steps you should follow to get your dev environment setup: - 1. `git clone https://github.com/coder/code-server.git` - Clone `code-server` 2. `git submodule update --init` - Clone `vscode` submodule -3. `yarn` - Install dependencies -4. `yarn watch` - This will spin up code-server on localhost:8080 which you can start developing. It will live reload changes to the source. +3. `quilt push -a` - Apply patches to the `vscode` submodule. +4. `yarn` - Install dependencies +5. `yarn watch` - Launch code-server localhost:8080. code-server will be live + reloaded when changes are made; the browser needs to be refreshed manually. -### Updates to VS Code +When pulling down changes that include modifications to the patches you will +need to apply them with `quilt`. If you pull down changes that update the +`vscode` submodule you will need to run `git submodule update --init` and +re-apply the patches. -If changes are made and merged into `main` in the [`coder/vscode`](https://github.com/coder/vscode) repo, then you'll need to update the version in the `code-server` repo by following these steps: +### Version updates to Code -1. Update the `lib/vscode` submodule to the latest `main`. +1. Update the `lib/vscode` submodule to the desired upstream version branch. 2. From the code-server **project root**, run `yarn install`. -3. Test code-server locally to make sure everything works. -4. Check the Node.js version that's used by Electron (which is shipped with VS +3. Apply the patches (`quilt push -a`) or restore your stashed changes. At this + stage you may need to resolve conflicts. For example use `quilt push -f`, + manually apply the rejected portions, then `quilt refresh`. +4. Test code-server locally to make sure everything works. +5. Check the Node.js version that's used by Electron (which is shipped with VS Code. If necessary, update your version of Node.js to match. -5. Commit the updated submodule to `code-server`. -6. Open a PR. +6. Commit the updated submodule and patches to `code-server`. +7. Open a PR. + +### Patching Code + +0. You can go through the patch stack with `quilt push` and `quilt pop`. +1. Create a new patch (`quilt new {name}.diff`) or use an existing patch. +2. Add the file(s) you are patching (`quilt add [-P patch] {file}`). A file + **must** be added before you make changes to it. +3. Make your changes. Patches do not need to be independent of each other but + each patch must result in a working code-server without any broken in-between + states otherwise they are difficult to test and modify. +4. Add your changes to the patch (`quilt refresh`) +5. Add a comment in the patch about the reason for the patch and how to + reproduce the behavior it fixes or adds. Every patch should have an e2e test + as well. ### Build @@ -193,99 +214,46 @@ code-server running locally. In CI, this is taken care of for you. ## Structure -The `code-server` script serves as an HTTP API for login and starting a remote VS +The `code-server` script serves as an HTTP API for login and starting a remote Code process. The CLI code is in [src/node](../src/node) and the HTTP routes are implemented in [src/node/routes](../src/node/routes). -Most of the meaty parts are in the VS Code portion of the codebase under +Most of the meaty parts are in the Code portion of the codebase under [lib/vscode](../lib/vscode), which we describe next. -### Modifications to VS Code - -In v1 of code-server, we had a patch of VS Code that split the codebase into a -front-end and a server. The front-end consisted of the UI code, while the server -ran the extensions and exposed an API to the front-end for file access and all -UI needs. - -Over time, Microsoft added support to VS Code to run it on the web. They have -made the front-end open source, but not the server. As such, code-server v2 (and -later) uses the VS Code front-end and implements the server. We do this by using -a Git subtree to fork and modify VS Code. This code lives under -[lib/vscode](../lib/vscode). - -Some noteworthy changes in our version of VS Code include: - -- Adding our build file, [`lib/vscode/coder.js`](../lib/vscode/coder.js), which includes build steps specific to code-server -- Node.js version detection changes in [`build/lib/node.ts`](../lib/vscode/build/lib/node.ts) and [`build/lib/util.ts`](../lib/vscode/build/lib/util.ts) -- Allowing extra extension directories - - Added extra arguments to [`src/vs/platform/environment/common/argv.ts`](../lib/vscode/src/vs/platform/environment/common/argv.ts) and to [`src/vs/platform/environment/node/argv.ts`](../lib/vscode/src/vs/platform/environment/node/argv.ts) - - Added extra environment state to [`src/vs/platform/environment/common/environment.ts`](../lib/vscode/src/vs/platform/environment/common/environment.ts); - - Added extra getters to [`src/vs/platform/environment/common/environmentService.ts`](../lib/vscode/src/vs/platform/environment/common/environmentService.ts) - - Added extra scanning paths to [`src/vs/platform/extensionManagement/node/extensionsScanner.ts`](../lib/vscode/src/vs/platform/extensionManagement/node/extensionsScanner.ts) -- Additions/removals from [`package.json`](../lib/vscode/package.json): - - Removing `electron`, `keytar` and `native-keymap` to avoid pulling in desktop dependencies during build on Linux - - Removing `gulp-azure-storage` and `gulp-tar` (unsued in our build process, may pull in outdated dependencies) - - Adding `proxy-agent`, `proxy-from-env` (for proxying) and `rimraf` (used during build/install steps) -- Adding our branding/custom URLs/version: - - [`product.json`](../lib/vscode/product.json) - - [`src/vs/base/common/product.ts`](../lib/vscode/src/vs/base/common/product.ts) - - [`src/vs/workbench/browser/parts/dialogs/dialogHandler.ts`](../lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts) - - [`src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts`](../lib/vscode/src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts) - - [`src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts`](../lib/vscode/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts) -- Removing azure/macOS signing related dependencies from [`build/package.json`](../lib/vscode/build/package.json) -- Modifying `.gitignore` to allow us to add files to `src/vs/server` and modifying `.eslintignore` to ignore lint on the shared files below (we use different formatter settings than VS Code). -- Sharing some files with our codebase via symlinks: - - [`src/vs/base/common/ipc.d.ts`](../lib/vscode/src/vs/base/common/ipc.d.ts) points to [`typings/ipc.d.ts`](../typings/ipc.d.ts) - - [`src/vs/base/common/util.ts`](../lib/vscode/src/vs/base/common/util.ts) points to [`src/common/util.ts`](../src/common/util.ts) - - [`src/vs/base/node/proxy_agent.ts`](../lib/vscode/src/vs/base/node/proxy_agent.ts) points to [`src/node/proxy_agent.ts`](../src/node/proxy_agent.ts) -- Allowing socket changes by adding `setSocket` in [`src/vs/base/parts/ipc/common/ipc.net.ts`](../lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts) - - We use this for connection persistence in our server-side code. -- Added our server-side Node.JS code to `src/vs/server`. - - This code includes the logic to spawn the various services (extension host, terminal, etc.) and some glue -- Added [`src/vs/workbench/browser/client.ts`](../lib/vscode/src/vs/workbench/browser/client.ts) to hold some server customizations. - - Includes the functionality for the Log Out command and menu item - - Also, imported and called `initialize` from the main web file, [`src/vs/workbench/browser/web.main.ts`](../lib/vscode/src/vs/workbench/browser/web.main.ts) -- Added a (hopefully temporary) hotfix to [`src/vs/workbench/common/resources.ts`](../lib/vscode/src/vs/workbench/common/resources.ts) to get context menu actions working for the Git integration. -- Added connection type to WebSocket query parameters in [`src/vs/platform/remote/common/remoteAgentConnection.ts`](../lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts) -- Added `CODE_SERVER*` variables to the sanitization list in [`src/vs/base/common/processes.ts`](../lib/vscode/src/vs/base/common/processes.ts) -- Fix localization support: - - Added file [`src/vs/workbench/services/localizations/browser/localizationsService.ts`](../lib/vscode/src/vs/workbench/services/localizations/browser/localizationsService.ts). - - Modified file [`src/vs/base/common/platform.ts`](../lib/vscode/src/vs/base/common/platform.ts) - - Modified file [`src/vs/base/node/languagePacks.js`](../lib/vscode/src/vs/base/node/languagePacks.js) -- Added code to allow server to inject settings to [`src/vs/platform/product/common/product.ts`](../lib/vscode/src/vs/platform/product/common/product.ts) -- Extension fixes: - - Avoid disabling extensions by extensionKind in [`src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts`](../lib/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts) (Needed for vscode-icons) - - Remove broken symlinks in [`extensions/postinstall.js`](../lib/vscode/extensions/postinstall.js) - - Add tip about extension gallery in [`src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts`](../lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts) - - Use our own server for GitHub authentication in [`extensions/github-authentication/src/githubServer.ts`](../lib/vscode/extensions/github-authentication/src/githubServer.ts) - - Settings persistence on the server in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts) - - Add extension install fallback in [`src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts`](../lib/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts) - - Add proxy-agent monkeypatch and keep extension host indefinitely running in [`src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts`](../lib/vscode/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts) - - Patch build system to avoid removing extension dependencies for `yarn global add` users in [`build/lib/extensions.ts`](../lib/vscode/build/lib/extensions.ts) - - Allow all extensions to use proposed APIs in [`src/vs/workbench/services/environment/browser/environmentService.ts`](../lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts) - - Make storage writes async to allow extensions to wait for them to complete in [`src/vs/platform/storage/common/storage.ts`](../lib/vscode/src/vs/platform/storage/common/storage.ts) -- Specify webview path in [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) -- URL readability improvements for folder/workspace in [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) -- Socket/Authority-related fixes (for remote proxying etc.): - - [`src/vs/code/browser/workbench/workbench.ts`](../lib/vscode/src/vs/code/browser/workbench/workbench.ts) - - [`src/vs/platform/remote/browser/browserSocketFactory.ts`](../lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts) - - [`src/vs/base/common/network.ts`](../lib/vscode/src/vs/base/common/network.ts) -- Added code to write out IPC path in [`src/vs/workbench/api/node/extHostCLIServer.ts`](../lib/vscode/src/vs/workbench/api/node/extHostCLIServer.ts) - -As the web portion of VS Code matures, we'll be able to shrink and possibly -eliminate our modifications. In the meantime, upgrading the VS Code version requires -us to ensure that our changes are still applied and work as intended. In the future, -we'd like to run VS Code unit tests against our builds to ensure that features -work as expected. +### Modifications to Code + +Our modifications to Code can be found in the [patches](../patches) directory. +We pull in Code as a submodule pointing to an upstream release branch. + +In v1 of code-server, we had Code as a submodule and used a single massive patch +that split the codebase into a front-end and a server. The front-end consisted +of the UI code, while the server ran the extensions and exposed an API to the +front-end for file access and all UI needs. + +Over time, Microsoft added support to Code to run it on the web. They had made +the front-end open source, but not the server. As such, code-server v2 (and +later) uses the Code front-end and implements the server. We did this by using a +Git subtree to fork and modify Code. + +Microsoft eventually made the server open source and we were able to reduce our +changes significantly. Some time later we moved back to a submodule and patches +(managed by `quilt` this time instead of the mega-patch). + +As the web portion of Code continues to mature, we'll be able to shrink and +possibly eliminate our patches. In the meantime, upgrading the Code version +requires us to ensure that our changes are still applied correctly and work as +intended. In the future, we'd like to run Code unit tests against our builds to +ensure that features work as expected. > We have [extension docs](../ci/README.md) on the CI and build system. -If the functionality you're working on does NOT depend on code from VS Code, please +If the functionality you're working on does NOT depend on code from Code, please move it out and into code-server. ### Currently Known Issues -- Creating custom VS Code extensions and debugging them doesn't work +- Creating custom Code extensions and debugging them doesn't work - Extension profiling and tips are currently disabled diff --git a/lib/vscode b/lib/vscode index a13f6e1434ad..f80445acd5a3 160000 --- a/lib/vscode +++ b/lib/vscode @@ -1 +1 @@ -Subproject commit a13f6e1434ad6ab820eef0ecca5b923b3e275667 +Subproject commit f80445acd5a3dadef24aa209168452a3d97cc326 diff --git a/patches/base-path.diff b/patches/base-path.diff new file mode 100644 index 000000000000..715f8a2150a9 --- /dev/null +++ b/patches/base-path.diff @@ -0,0 +1,305 @@ +Add base path support + +Some users will host code-server behind a path-rewriting reverse proxy, for +example domain.tld/my/base/path. This patch adds support for that since Code +assumes everything is on / by default. + +To test this serve code-server behind a reverse proxy with a path like /code. + +Index: code-server/lib/vscode/src/vs/base/common/network.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/base/common/network.ts ++++ code-server/lib/vscode/src/vs/base/common/network.ts +@@ -151,8 +151,10 @@ class RemoteAuthoritiesImpl { + } + return URI.from({ + scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource, +- authority: `${host}:${port}`, +- path: `/vscode-remote-resource`, ++ authority: platform.isWeb ? window.location.host : `${host}:${port}`, ++ path: platform.isWeb ++ ? URI.joinPath(URI.parse(window.location.href), `/vscode-remote-resource`).path ++ : `/vscode-remote-resource`, + query + }); + } +Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html +=================================================================== +--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html ++++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.html +@@ -11,8 +11,8 @@ + + + +- +- ++ ++ + + + +@@ -27,23 +27,26 @@ + + + +- +- +- ++ ++ ++ + + + + + + +- +- ++ ++ + +- ++ ++ + +- +- +- ++ ++ ++ + +Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts ++++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts +@@ -274,7 +274,7 @@ export class BrowserSocketFactory implem + + connect(host: string, port: number, query: string, debugLabel: string, callback: IConnectCallback): void { + const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws'); +- const socket = this._webSocketFactory.create(`${webSocketSchema}://${/:/.test(host) ? `[${host}]` : host}:${port}/?${query}&skipWebSocketFrames=false`, debugLabel); ++ const socket = this._webSocketFactory.create(`${webSocketSchema}://${window.location.host}${window.location.pathname}?${query}&skipWebSocketFrames=false`, debugLabel); + const errorListener = socket.onError((err) => callback(err, undefined)); + socket.onOpen(() => { + errorListener.dispose(); +@@ -282,6 +282,3 @@ export class BrowserSocketFactory implem + }); + } + } +- +- +- +Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts ++++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts +@@ -252,7 +252,10 @@ export class WebClientServer { + return res.end(); + } + +- const remoteAuthority = req.headers.host; ++ // It is not possible to reliably detect the remote authority on the server ++ // in all cases. Set this to something invalid to make sure we catch code ++ // that is using this when it should not. ++ const remoteAuthority = 'remote'; + + function escapeAttribute(value: string): string { + return value.replace(/"/g, '"'); +@@ -272,6 +275,8 @@ export class WebClientServer { + accessToken: this._environmentService.args['github-auth'], + scopes: [['user:email'], ['repo']] + } : undefined; ++ const base = relativeRoot(getOriginalUrl(req)) ++ const vscodeBase = relativePath(getOriginalUrl(req)) + const data = (await util.promisify(fs.readFile)(filePath)).toString() + .replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({ + remoteAuthority, +@@ -279,6 +284,7 @@ export class WebClientServer { + developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined }, + settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined, + productConfiguration: >{ ++ rootEndpoint: base, + extensionsGallery: this._webExtensionResourceUrlTemplate ? { + ...this._productService.extensionsGallery, + 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({ +@@ -289,7 +295,9 @@ export class WebClientServer { + } : undefined + } + }))) +- .replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : ''); ++ .replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : '') ++ .replace(/{{BASE}}/g, base) ++ .replace(/{{VS_BASE}}/g, vscodeBase); + + const cspDirectives = [ + 'default-src \'self\';', +@@ -368,3 +376,70 @@ export class WebClientServer { + return res.end(data); + } + } ++ ++/** ++ * Remove extra slashes in a URL. ++ * ++ * This is meant to fill the job of `path.join` so you can concatenate paths and ++ * then normalize out any extra slashes. ++ * ++ * If you are using `path.join` you do not need this but note that `path` is for ++ * file system paths, not URLs. ++ */ ++export const normalizeUrlPath = (url: string, keepTrailing = false): string => { ++ return url.replace(/\/\/+/g, "/").replace(/\/+$/, keepTrailing ? "/" : "") ++} ++ ++/** ++ * Get the relative path that will get us to the root of the page. For each ++ * slash we need to go up a directory. Will not have a trailing slash. ++ * ++ * For example: ++ * ++ * / => . ++ * /foo => . ++ * /foo/ => ./.. ++ * /foo/bar => ./.. ++ * /foo/bar/ => ./../.. ++ * ++ * All paths must be relative in order to work behind a reverse proxy since we ++ * we do not know the base path. Anything that needs to be absolute (for ++ * example cookies) must get the base path from the frontend. ++ * ++ * All relative paths must be prefixed with the relative root to ensure they ++ * work no matter the depth at which they happen to appear. ++ * ++ * For Express `req.originalUrl` should be used as they remove the base from the ++ * standard `url` property making it impossible to get the true depth. ++ */ ++export const relativeRoot = (originalUrl: string): string => { ++ const depth = (originalUrl.split("?", 1)[0].match(/\//g) || []).length ++ return normalizeUrlPath("./" + (depth > 1 ? "../".repeat(depth - 1) : "")) ++} ++ ++/** ++ * Get the relative path to the current resource. ++ * ++ * For example: ++ * ++ * / => . ++ * /foo => ./foo ++ * /foo/ => . ++ * /foo/bar => ./bar ++ * /foo/bar/ => . ++ */ ++export const relativePath = (originalUrl: string): string => { ++ const parts = originalUrl.split("?", 1)[0].split("/") ++ return normalizeUrlPath("./" + parts[parts.length - 1]) ++} ++ ++/** ++ * code-server serves Code using Express. Express removes the base from the url ++ * and puts the original in `originalUrl` so we must use this to get the correct ++ * depth. Code is not aware it is behind Express so the types do not match. We ++ * may want to continue moving code into Code and eventually remove the Express ++ * wrapper or move the web server back into code-server. ++ */ ++export const getOriginalUrl = (req: http.IncomingMessage): string => { ++ return (req as any).originalUrl || req.url ++} +Index: code-server/lib/vscode/src/vs/base/common/product.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/base/common/product.ts ++++ code-server/lib/vscode/src/vs/base/common/product.ts +@@ -32,6 +32,7 @@ export type ExtensionVirtualWorkspaceSup + + export interface IProductConfiguration { + readonly codeServerVersion?: string ++ readonly rootEndpoint?: string + + readonly version: string; + readonly date?: string; +Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts ++++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts +@@ -504,6 +504,7 @@ function doCreateUri(path: string, query + }); + } + ++ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/") + return URI.parse(window.location.href).with({ path, query }); + } + +@@ -515,7 +516,7 @@ function doCreateUri(path: string, query + if (!configElement || !configElementAttribute) { + throw new Error('Missing web configuration element'); + } +- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute); ++ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host } + + // Create workbench + create(document.body, { diff --git a/patches/connection-type.diff b/patches/connection-type.diff new file mode 100644 index 000000000000..9f04bc29918d --- /dev/null +++ b/patches/connection-type.diff @@ -0,0 +1,19 @@ +Add connection type to web sockets + +This allows the backend to distinguish them. In our case we use them to count a +single "open" of Code so we need to be able to distinguish between web sockets +from two instances and two web sockets used in a single instance. + +Index: code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts ++++ code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts +@@ -231,7 +231,7 @@ async function connectToRemoteExtensionH + + let socket: ISocket; + try { +- socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); ++ socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); + } catch (error) { + options.logService.error(`${logPrefix} socketFactory.connect() failed or timed out. Error:`); + options.logService.error(error); diff --git a/patches/display-language.diff b/patches/display-language.diff new file mode 100644 index 000000000000..d5ddfa785a52 --- /dev/null +++ b/patches/display-language.diff @@ -0,0 +1,265 @@ +Add display language support + +This likely needs tweaking if we want to upstream. + +Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts ++++ code-server/lib/vscode/src/vs/server/node/serverServices.ts +@@ -198,6 +198,9 @@ export async function setupServerService + const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); + socketServer.registerChannel('extensions', channel); + ++ const localizationsChannel = ProxyChannel.fromService(accessor.get(ILocalizationsService)); ++ socketServer.registerChannel('localizations', localizationsChannel); ++ + const encryptionChannel = ProxyChannel.fromService(accessor.get(IEncryptionMainService)); + socketServer.registerChannel('encryption', encryptionChannel); + +Index: code-server/lib/vscode/src/vs/base/common/platform.ts +=================================================================== +--- code-server.orig/lib/vscode/src/vs/base/common/platform.ts ++++ code-server/lib/vscode/src/vs/base/common/platform.ts +@@ -83,6 +83,17 @@ if (typeof navigator === 'object' && !is + _isWeb = true; + _locale = navigator.language; + _language = _locale; ++ ++ const el = typeof document !== 'undefined' && document.getElementById('vscode-remote-nls-configuration'); ++ const rawNlsConfig = el && el.getAttribute('data-settings'); ++ if (rawNlsConfig) { ++ try { ++ const nlsConfig: NLSConfig = JSON.parse(rawNlsConfig); ++ _locale = nlsConfig.locale; ++ _translationsConfigFile = nlsConfig._translationsConfigFile; ++ _language = nlsConfig.availableLanguages['*'] || LANGUAGE_DEFAULT; ++ } catch (error) { /* Oh well. */ } ++ } + } + + // Native environment +Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html +=================================================================== +--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html ++++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html +@@ -23,6 +23,9 @@ + + + ++ ++ ++ + + + +@@ -38,6 +41,27 @@ + + + + -- -+ -+ +@@ -39,7 +39,7 @@ + + -- -+ -+ - -- -- -- -+ -+ -+ - Index: code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts +++ code-server/lib/vscode/src/vs/platform/remote/browser/browserSocketFactory.ts -@@ -274,7 +274,7 @@ export class BrowserSocketFactory implem +@@ -274,6 +274,7 @@ export class BrowserSocketFactory implem - connect(host: string, port: number, query: string, debugLabel: string, callback: IConnectCallback): void { + connect(host: string, port: number, path: string, query: string, debugLabel: string, callback: IConnectCallback): void { const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws'); -- const socket = this._webSocketFactory.create(`${webSocketSchema}://${/:/.test(host) ? `[${host}]` : host}:${port}/?${query}&skipWebSocketFrames=false`, debugLabel); -+ const socket = this._webSocketFactory.create(`${webSocketSchema}://${window.location.host}${window.location.pathname}?${query}&skipWebSocketFrames=false`, debugLabel); ++ path = (window.location.pathname + "/" + path).replace(/\/\/+/g, "/") + const socket = this._webSocketFactory.create(`${webSocketSchema}://${/:/.test(host) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel); const errorListener = socket.onError((err) => callback(err, undefined)); socket.onOpen(() => { - errorListener.dispose(); -@@ -282,6 +282,3 @@ export class BrowserSocketFactory implem +@@ -282,6 +283,3 @@ export class BrowserSocketFactory implem }); } } @@ -159,47 +109,56 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -253,7 +253,10 @@ export class WebClientServer { +@@ -267,14 +267,10 @@ export class WebClientServer { return res.end(); } -- const remoteAuthority = req.headers.host; +- let originalHost = req.headers['x-original-host']; +- if (Array.isArray(originalHost)) { +- originalHost = originalHost[0]; +- } +- const remoteAuthority = originalHost || req.headers.host; +- if (!remoteAuthority) { +- return serveError(req, res, 400, `Bad request.`); +- } + // It is not possible to reliably detect the remote authority on the server + // in all cases. Set this to something invalid to make sure we catch code + // that is using this when it should not. + const remoteAuthority = 'remote'; - function escapeAttribute(value: string): string { - return value.replace(/"/g, '"'); -@@ -275,6 +278,8 @@ export class WebClientServer { - accessToken: this._environmentService.args['github-auth'], + function asJSON(value: unknown): string { + return JSON.stringify(value).replace(/"/g, '"'); +@@ -297,6 +293,8 @@ export class WebClientServer { scopes: [['user:email'], ['repo']] } : undefined; + + const base = relativeRoot(getOriginalUrl(req)) + const vscodeBase = relativePath(getOriginalUrl(req)) - const data = (await util.promisify(fs.readFile)(filePath)).toString() - .replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({ - remoteAuthority, -@@ -285,6 +290,7 @@ export class WebClientServer { - folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']), - workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']), - productConfiguration: >{ -+ rootEndpoint: base, - codeServerVersion: this._productService.codeServerVersion, - embedderIdentifier: 'server-distro', - extensionsGallery: this._webExtensionResourceUrlTemplate ? { -@@ -297,7 +303,9 @@ export class WebClientServer { - } : undefined - } - }))) -- .replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : ''); -+ .replace('{{WORKBENCH_AUTH_SESSION}}', () => authSessionInfo ? escapeAttribute(JSON.stringify(authSessionInfo)) : '') -+ .replace(/{{BASE}}/g, base) -+ .replace(/{{VS_BASE}}/g, vscodeBase); - const cspDirectives = [ - 'default-src \'self\';', -@@ -376,3 +384,70 @@ export class WebClientServer { + const workbenchWebConfiguration = { + remoteAuthority, +@@ -308,6 +306,7 @@ export class WebClientServer { + workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']), + productConfiguration: >{ + codeServerVersion: this._productService.codeServerVersion, ++ rootEndpoint: base, + embedderIdentifier: 'server-distro', + extensionsGallery: this._webExtensionResourceUrlTemplate ? { + ...this._productService.extensionsGallery, +@@ -328,8 +327,10 @@ export class WebClientServer { + const values: { [key: string]: string } = { + WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration), + WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '', +- WORKBENCH_WEB_BASE_URL: this._staticRoute, +- WORKBENCH_NLS_BASE_URL: nlsBaseUrl ? `${nlsBaseUrl}${this._productService.commit}/${this._productService.version}/` : '', ++ WORKBENCH_WEB_BASE_URL: vscodeBase + this._staticRoute, ++ WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${this._productService.commit}/${this._productService.version}/` : ''), ++ BASE: base, ++ VS_BASE: vscodeBase, + }; + + +@@ -419,3 +420,70 @@ export class WebClientServer { return res.end(data); } } @@ -286,7 +245,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.ts +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts -@@ -482,6 +482,7 @@ function doCreateUri(path: string, query +@@ -485,6 +485,7 @@ function doCreateUri(path: string, query }); } @@ -294,12 +253,12 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts return URI.parse(window.location.href).with({ path, query }); } -@@ -493,7 +494,7 @@ function doCreateUri(path: string, query +@@ -496,7 +497,7 @@ function doCreateUri(path: string, query if (!configElement || !configElementAttribute) { throw new Error('Missing web configuration element'); } -- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents } = JSON.parse(configElementAttribute); -+ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host } +- const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = JSON.parse(configElementAttribute); ++ const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = { ...JSON.parse(configElementAttribute), remoteAuthority: location.host } // Create workbench create(document.body, { @@ -312,10 +271,10 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensionResourceLoader/ import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; -import { RemoteAuthorities } from 'vs/base/common/network'; + import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts'; export const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource'; - -@@ -72,7 +71,7 @@ export abstract class AbstractExtensionR +@@ -75,7 +74,7 @@ export abstract class AbstractExtensionR public getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined { if (this._extensionGalleryResourceUrlTemplate) { const uri = URI.parse(format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' })); diff --git a/patches/connection-type.diff b/patches/connection-type.diff index 050715c90ff5..7ea29cd0764f 100644 --- a/patches/connection-type.diff +++ b/patches/connection-type.diff @@ -14,12 +14,13 @@ Index: code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnectio =================================================================== --- code-server.orig/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts +++ code-server/lib/vscode/src/vs/platform/remote/common/remoteAgentConnection.ts -@@ -231,7 +231,7 @@ async function connectToRemoteExtensionH - +@@ -233,7 +233,8 @@ async function connectToRemoteExtensionH + let socket: ISocket; try { -- socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); -+ socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); +- socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, getRemoteServerRootPath(options), `reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); ++ ++ socket = await createSocket(options.logService, options.socketFactory, options.host, options.port, getRemoteServerRootPath(options), `type=${connectionTypeToString(connectionType)}&reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`, `renderer-${connectionTypeToString(connectionType)}-${options.reconnectionToken}`, timeoutCancellationToken); } catch (error) { options.logService.error(`${logPrefix} socketFactory.connect() failed or timed out. Error:`); options.logService.error(error); diff --git a/patches/disable-builtin-ext-update.diff b/patches/disable-builtin-ext-update.diff index 4cee1361abe8..cbfd77406428 100644 --- a/patches/disable-builtin-ext-update.diff +++ b/patches/disable-builtin-ext-update.diff @@ -7,17 +7,18 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -@@ -206,6 +206,9 @@ export class Extension implements IExten - if (!this.gallery || !this.local) { - return false; - } -+ if (this.type !== ExtensionType.User) { -+ return false; -+ } - if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { - return false; - } -@@ -1057,6 +1060,10 @@ export class ExtensionsWorkbenchService +@@ -234,6 +234,10 @@ export class Extension implements IExten + if (this.type === ExtensionType.System && this.productService.quality === 'stable') { + return false; + } ++ // Do not update builtin extensions. ++ if (this.type !== ExtensionType.User) { ++ return false; ++ } + if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { + return false; + } +@@ -1088,6 +1092,10 @@ export class ExtensionsWorkbenchService // Skip if check updates only for builtin extensions and current extension is not builtin. continue; } @@ -25,6 +26,6 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens + // Never update builtin extensions. + continue; + } - if (installed.isBuiltin && !installed.local?.identifier.uuid) { - // Skip if the builtin extension does not have Marketplace id + if (installed.isBuiltin && (!installed.local?.identifier.uuid || (!isWeb && this.productService.quality === 'stable'))) { + // Skip checking updates for a builtin extension if it does not has Marketplace identifier or the current product is VS Code Desktop stable. continue; diff --git a/patches/disable-downloads.diff b/patches/disable-downloads.diff index 7568fcd0b6e5..b5f7dc7233e9 100644 --- a/patches/disable-downloads.diff +++ b/patches/disable-downloads.diff @@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.api.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/web.api.ts +++ code-server/lib/vscode/src/vs/workbench/browser/web.api.ts -@@ -215,6 +215,11 @@ export interface IWorkbenchConstructionO +@@ -250,6 +250,11 @@ export interface IWorkbenchConstructionO */ readonly userDataPath?: string @@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts +++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts -@@ -30,6 +30,11 @@ export interface IBrowserWorkbenchEnviro +@@ -31,6 +31,11 @@ export interface IBrowserWorkbenchEnviro * Options used to configure the workbench. */ readonly options?: IWorkbenchConstructionOptions; @@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi } export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService { -@@ -61,6 +66,13 @@ export class BrowserWorkbenchEnvironment +@@ -62,6 +67,13 @@ export class BrowserWorkbenchEnvironment return this.options.userDataPath; } @@ -58,18 +58,18 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts -@@ -15,6 +15,7 @@ export const serverOptions: OptionDescri +@@ -14,6 +14,7 @@ export const serverOptions: OptionDescri + /* ----- code-server ----- */ 'disable-update-check': { type: 'boolean' }, 'auth': { type: 'string' }, - 'locale': { type: 'string' }, + 'disable-file-downloads': { type: 'boolean' }, /* ----- server setup ----- */ -@@ -96,6 +97,7 @@ export interface ServerParsedArgs { +@@ -94,6 +95,7 @@ export interface ServerParsedArgs { + /* ----- code-server ----- */ 'disable-update-check'?: boolean; 'auth'?: string - 'locale'?: string + 'disable-file-downloads'?: boolean; /* ----- server setup ----- */ @@ -78,14 +78,14 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts -@@ -293,6 +293,7 @@ export class WebClientServer { - logLevel: this._logService.getLevel(), - }, - userDataPath: this._environmentService.userDataPath, -+ isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'], - settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined, - enableWorkspaceTrust: !this._environmentService.args['disable-workspace-trust'], - folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']), +@@ -300,6 +300,7 @@ export class WebClientServer { + remoteAuthority, + webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre', + userDataPath: this._environmentService.userDataPath, ++ isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'], + _wrapWebWorkerExtHostInIframe, + developmentOptions: { + enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined, Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts @@ -144,7 +144,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; -@@ -476,13 +476,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo +@@ -477,13 +477,16 @@ MenuRegistry.appendMenuItem(MenuId.Explo id: DOWNLOAD_COMMAND_ID, title: DOWNLOAD_LABEL }, diff --git a/patches/display-language.diff b/patches/display-language.diff index aad709545fb5..c3de5a83ff88 100644 --- a/patches/display-language.diff +++ b/patches/display-language.diff @@ -1,17 +1,28 @@ Add display language support -This likely needs tweaking if we want to upstream. +We can remove this once upstream supports all language packs. + +1. Proxies language packs to the service on the backend. +2. NLS configuration is embedded into the HTML for the browser to pick up. This + code to generate this configuration is copied from the native portion. +3. Remove navigator.language default since that will prevent the argv file from + being created if you are changing the language to whatever your browser + default happens to be. +4. Move the argv.json file to the server instead of in-browser storage. This is + where the current locale is stored and currently the server needs to be able + to read it. +5. Add the locale flag. Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts -@@ -192,6 +192,9 @@ export async function setupServerService +@@ -202,6 +202,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); -+ const localizationsChannel = ProxyChannel.fromService(accessor.get(ILocalizationsService)); -+ socketServer.registerChannel('localizations', localizationsChannel); ++ const languagePackChannel = ProxyChannel.fromService(accessor.get(ILanguagePackService)); ++ socketServer.registerChannel('languagePacks', languagePackChannel); + const encryptionChannel = ProxyChannel.fromService(accessor.get(IEncryptionMainService)); socketServer.registerChannel('encryption', encryptionChannel); @@ -20,9 +31,12 @@ Index: code-server/lib/vscode/src/vs/base/common/platform.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/platform.ts +++ code-server/lib/vscode/src/vs/base/common/platform.ts -@@ -84,6 +84,17 @@ if (typeof navigator === 'object' && !is +@@ -80,8 +80,19 @@ if (typeof navigator === 'object' && !is + _isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; + _isLinux = _userAgent.indexOf('Linux') >= 0; _isWeb = true; - _locale = navigator.language; +- _locale = navigator.language; ++ _locale = LANGUAGE_DEFAULT; _language = _locale; + + const el = typeof document !== 'undefined' && document.getElementById('vscode-remote-nls-configuration'); @@ -51,23 +65,33 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html + - -@@ -38,6 +41,27 @@ - - - - + + - +@@ -40,7 +40,7 @@ + + - + + + + - -