Compare commits

...

82 Commits

Author SHA1 Message Date
Kyle Carberry
2169045377 Fix debugging 2019-03-19 12:53:05 -04:00
Kyle Carberry
277c6cb690 Fix failure to resolve arrays error 2019-03-18 21:05:21 -04:00
Moien Tajik
91a98b8082 Fixed documentation download links based on latest version (#130)
* Fixed documentation based on latest release

* Fixed google-cloud documentation steps order

* Edited docs based on the latest release versions

* Make docs more dynamic based on Releases

* Changed ordered list to unordered list
2019-03-18 10:45:20 -05:00
Steve Sloka
6028a8b1a8 Add support for Kubernetes by deploying code-server. Also includes AWS (#146)
example which persists data to a Persistent Volume / Claim.

Signed-off-by: Steve Sloka <slokas@vmware.com>
2019-03-18 10:44:08 -05:00
Jim Tittsler
6749f25bbf Doc: fix typo (#277) 2019-03-17 22:35:29 -05:00
Sean Smith
f6b96e3778 Fix security links in cloud setup guides (#260) 2019-03-15 15:32:24 -04:00
Kyle Carberry
3b8cd0a3cd Fix docker cmd in readme 2019-03-15 01:24:44 -04:00
Kyle Carberry
2f27b5df8c Fix #251 2019-03-15 00:51:05 -04:00
Kyle Carberry
400fba7f6f Fix type import not resolving properly 2019-03-15 00:48:39 -04:00
Kyle Carberry
bfaadd4e51 Merge branch 'master' of github.com:codercom/code-server 2019-03-14 22:58:21 +00:00
Kyle Carberry
d16b35ed0b Remove sourcemaps for production 2019-03-14 22:58:12 +00:00
Dafydd
633f8dcd72 Fixing broken syntax in the run command (#238) 2019-03-14 18:32:40 -04:00
Mike Hatch
98cad8ae69 Fixed a couple of typos (#243) 2019-03-14 18:32:18 -04:00
Kyle Carberry
2e53bb6690 Automatically target production for client-side builds 2019-03-14 22:29:19 +00:00
Anmol Sethi
e3d9716607 Merge pull request #231 from nhooyr/docker
Dockerfile: include git
2019-03-13 15:38:55 -04:00
Anmol Sethi
862c94401a Dockerfile: include git
Closes #221
Closes #230
Closes #203
2019-03-13 15:19:38 -04:00
Sandro Jäckel
3a6e27bc87 Combine apt-get in final docker image and remove cache 2019-03-13 15:13:24 -04:00
pokemonlover1234
ec2d01ab40 Add git to docker container
Install git in the docker container, proposed by #203. While it is possible that issue requires further discussion, this is just a proposal pull request. If that proposal is accepted, here's the pull request.
2019-03-13 15:12:18 -04:00
Asher
e4ff723895 Fix race with watcher & stat
There is a window between when the stat is made and the result makes it
back to the client where a file is created or deleted and it won't be a
part of that stat.

To fix it, I added a new property signaling that we got some changes
since starting the stat and should run the stat again because we have no
way of knowing whether the currently running stat will include the new
changes or not.
2019-03-13 14:04:40 -05:00
Sandro Jäckel
f9448c6cd4 [ImgBot] Optimize images (#222)
*Total -- 1,393.88kb -> 908.68kb (34.81%)

/doc/assets/chrome_confirm.png -- 34.10kb -> 18.95kb (44.43%)
/doc/assets/server-password-modal.png -- 96.67kb -> 58.14kb (39.86%)
/doc/assets/ide.png -- 984.53kb -> 603.38kb (38.71%)
/doc/assets/chrome_warning.png -- 44.25kb -> 30.03kb (32.14%)
/doc/assets/logo-horizontal.png -- 22.00kb -> 17.48kb (20.55%)
/doc/assets/aws_ubuntu.png -- 51.62kb -> 43.93kb (14.91%)
/doc/assets/cli.png -- 160.70kb -> 136.78kb (14.89%)
2019-03-13 14:45:52 -04:00
Michael Desantis
0efae1fcb6 Add error message for incorrect password. Fix issue #55 (#201) 2019-03-12 19:19:32 -04:00
Kyle Carberry
7cc7aa51aa Add additional ide-api events 2019-03-12 17:43:53 -04:00
Asher
6c8e513e71 Fill remainder of graceful-fs
It's just fs. Used by fs-extra.
2019-03-12 15:50:41 -05:00
Asher
f7c1ebf667 Fix moving data directory across devices 2019-03-12 15:45:44 -05:00
Asher
ba37a34fa2 Create data directory path before moving old directory there 2019-03-12 15:05:47 -05:00
Asher
e1dc6967ed Fix trash 2019-03-12 14:04:17 -05:00
Asher
3155eb76f5 Allow webview iframe to load styles 2019-03-12 12:55:43 -05:00
Asher
e597d49912 Fix issues with configuration directories
- Move the old data directory if possible.
- Fix extension path to not use a hard-coded path and instead use the
  data directory.
- Create every part of the path during startup.
- Create each path when a connection is made as well in case they are
  deleted while the server is running.
- Create every part of the path before saving settings or writing a file
  using the resource endpoint.
2019-03-12 11:44:56 -05:00
Asher
0a9f5d8eee Pass env as actual env instead of as a flag 2019-03-11 17:50:35 -05:00
Asher
736feaba51 Add proper version to --version 2019-03-11 17:38:11 -05:00
Asher
307aa4ae7f Fix READMEs not loading 2019-03-11 16:20:13 -05:00
Andrey Esin
1df352fe26 Adding minus to flag '-i' (#198) 2019-03-11 13:59:07 -05:00
Asher
8aff206538 Fix some dialog styling issues
- Fix black text caused by 1.32.0 upgrade.
- Fix various alignment and padding issues (a few elements with more
  space below than above).
2019-03-11 11:29:24 -05:00
Anmol Sethi
03c0bde3a9 Another fix for the Dockerfile and build (#188)
* Dockerfile: fix

ENTRYPOINT must be provided in exec form for args
from docker run to be passed correctly.

See https://docs.docker.com/engine/reference/builder/#cmd

* build: fix reuse of vscode repository regression

See #167
2019-03-11 09:47:41 -05:00
Anmol Sethi
a36476df21 Merge pull request #193 from netchampfaris/patch-1
fix: missing word
2019-03-11 01:29:07 -04:00
Faris Ansari
25c46bea32 fix: missing word 2019-03-11 10:27:42 +05:30
Anmol Sethi
60937c604e Merge pull request #179 from codercom/anmol
Update docker oneliner and fix clone task
2019-03-10 11:39:27 -04:00
Anmol Sethi
449d51d24d Dockerfile: use relative path instead of $PWD for CMD
Thanks @ay-b
2019-03-10 11:39:18 -04:00
Anmol Sethi
26edea5098 Update docker oneliner and fix clone task 2019-03-10 11:39:17 -04:00
Anmol Sethi
8527d10033 Merge pull request #172 from korzq/patch-1
Add nginx reverse proxy guide for selfhosted
2019-03-10 11:36:56 -04:00
赵吉彤
4387fdfb9e Clone exact vscode release branch when build task (#167)
* chore: clone exactly release branch when build

* fix: clone params
2019-03-10 10:02:08 -05:00
Khải
41d1be9205 Add -t flag to docker example (#181)
It is quite annoying when Ctrl-C does not stop the container
2019-03-10 08:28:25 -05:00
Anmol Sethi
76e0338d7f Reverts parts of my last PR (#177)
Cannot mount data directory at the moment, we need to make code-server
override all binaries in there instead of reusing and will wait
until the new Dockerfile is pushed before removing the default
entrypoint from README.md
2019-03-09 16:01:53 -07:00
Anmol Sethi
f37533579d Fix build and Dockerfile issues (#176)
* build: fix yarn corruption issues

Closes #100

Thanks @zerdos

* Dockerfile: add default Entrypoint and mount data dir

Closes #170
Closes #78

Thanks @ay-b
2019-03-09 14:51:51 -08:00
Eric Zhu
438808573d Add nginx reverse proxy guide for selfhosted
#80
2019-03-09 14:17:21 -05:00
Michael
c471babc69 Use a timing-safe equality check for passwords (#133) 2019-03-09 09:24:36 -08:00
David Bushong
d7a66e4f15 Open websocket on same path as page (#149)
This is the critical piece to let you serve code-server proxied under a
path.  Otherwise if you proxy e.g. `/editor/` thru to
`http://localhost:8000`, everything works fine except the websocket
connection is still opened to `/`
2019-03-09 09:23:51 -08:00
Forest Hoffman
30d14eeab4 Adhere to XDG base directory spec for dataDir and logDir (#156) 2019-03-09 09:11:30 -08:00
Avelino
e22e2c8b67 Improve github issue template (#162)
- Simplify the user by opening an issue (giving direction)
- Mark issue label
- Markdown lint

Signed-off-by: Avelino <t@avelino.xxx>
2019-03-09 09:07:43 -08:00
Aidan Fitzgerald
ffb75b6801 Fix typo: environemnt -> environment (#159)
Signed-off-by: Aidan Fitzgerald <acf67@cornell.edu>
2019-03-09 09:06:47 -08:00
Asher
cded51f650 Add back web class
Forgot to move this to the new file when upgrading to 1.32.0.
2019-03-08 12:45:20 -06:00
Asher
8bab787804 Move upx compression behind an env flag 2019-03-08 12:01:27 -06:00
Anmol Sethi
3e9d86ee91 ci: enable travis npm cache (#110)
* ci: enable travis npm cache

* ci: upgrade travis version

Thanks @zerdos

* ci: switch to using yarn cache
2019-03-08 09:21:11 -08:00
Philipp Molitor
e418ecf653 Improve .dockerignore (#111)
* impove .dockerignore

* impove .dockerignore
2019-03-08 09:13:25 -08:00
Asher
36c05ed335 Feature/1.32.0 update (#117)
* Update VS Code to 1.32.0

* Update patch

Most changes are moved files, most notably shell.contribution.ts which
is now main.contribution.ts.

Also:
- repl.ts no longer uses isMacintosh
- shell.ts doesn't exist
- added back the commented-out CSP headers

* Use es6 target for bootstrap-fork

* Directly reference cross-env binary

yarn and npm find the binary just fine when running the tasks from the
root but it doesn't work if you run one of those tasks directly from
within those directories.

* Update import paths and bootstrap-fork ignores

* Increase memory limit for building default extensions

* Fix invalid regex in Firefox

* Update startup function

* Fix global.require error

* Update zip extract arguments

* Update travis to minimum required Node version

* Always chmod executable dependencies

Fixes EACCESS errors for users that had the files unpacked before we
added the chmod call.

* Remove unused var declaration
2019-03-08 08:37:03 -08:00
Jeremy Pinnix
5c435a3b6c Update grammar on README (#139) 2019-03-08 08:34:31 -08:00
Semen Zhydenko
9f4212eace inital -> initial (#135) 2019-03-08 08:10:50 -08:00
Anmol Sethi
96175d36ea Handle arch in dockerfile and add PR template (#109)
* repo: add a pull request template

* Dockerfile: include arch when copying

Thanks @yush1ga and @zerdos
2019-03-07 13:48:11 -08:00
Kyle Carberry
c8afb7908e Merge branch 'master' of github.com:codercom/code-server 2019-03-07 21:23:25 +00:00
Kyle Carberry
231cdec7fb Update known issues in readme with better wording 2019-03-07 21:23:16 +00:00
Elizabeth
8e5f288459 Updated current args available for passing in docs (#105) 2019-03-07 13:19:00 -08:00
Anmol Sethi
14f1230bed Merge pull request #98 from nhooyr/docker
Dockerfile: cleanup and add en_US.UTF-8 locale
2019-03-07 14:08:09 -05:00
Anmol Sethi
fba3fe5609 Dockerfile: cleanup and add en_US.UTF-8 locale
Closes #84
Closes #83

Thanks @xMrWhite, @frol and @sr229.
2019-03-07 13:55:13 -05:00
Elizabeth
8e68411174 Update example docker command port bind options (#88)
must use 127.0.0.1 and not `localhost`
2019-03-07 09:31:01 -08:00
Asher
3d654a8df7 Resolve paths
Fixes #19.
2019-03-07 11:25:26 -06:00
Takayosi Amagi
87d2e22a6b Open localhost URL with --open (#28)
* Open localhost URL with --open

* Catch errors on opn

Co-Authored-By: fand <fand@users.noreply.github.com>
2019-03-07 09:23:54 -08:00
Anmol Sethi
17267bd801 Add Dockerfile and some cleanup (#57) 2019-03-06 18:59:43 -08:00
Michael Desantis
ac56fcaafc Remove unused markup from password page (#49) 2019-03-06 18:47:05 -08:00
Michael Desantis
e20b79b5cc Generate secure passwords, fixes issue #26 (#51) 2019-03-06 16:25:44 -08:00
Philipp Gillé
e99f8abc3c Fix spelling error (#46) 2019-03-06 16:21:33 -08:00
Asher
994531d8bb Add task for packaging release (#6)
* Add task for packaging release

* Modify package task to package a single binary

This is so it can be used as part of the build/release script.

* Package release as part of Travis deploy

* Set platform env var

* Add arch env var

* Make version available to the code

* Use tar for Linux and zip for Mac & Windows
2019-03-06 18:15:52 -06:00
Kyle Carberry
8916cb9bb2 Update to vscode 1.31.1 (#45) 2019-03-06 11:10:23 -08:00
Ammar Bandukwala
d4867ca430 Cleanup English in README (#21) 2019-03-06 10:11:27 -08:00
Icebob
3fbdb2e46c Implement #4 - fix password via CLI (#5) 2019-03-06 00:08:43 -08:00
Ammar Bandukwala
1d8da2161f Add value props to readme (#20) 2019-03-05 17:45:21 -08:00
Kyle Carberry
414eb7076f Update element fill to replace file URIs in image tags 2019-03-06 00:06:44 +00:00
Asher
2b3d2933eb Updated binary name in issue templates 2019-03-05 17:23:13 -06:00
Andrew Grekov
14ead1a62f Fixes calculating number of threads for HappyPack (#10) 2019-03-05 15:02:49 -08:00
John McCambridge
3b48c57861 Fix port number in docs (#12) 2019-03-05 13:53:35 -08:00
Colin
c772e920cd Add Discord widget to README (#16) 2019-03-05 13:53:05 -08:00
Ammar Bandukwala
e6aa74c412 Merge pull request #7 from codercom/fix-doc
Clarify that cloud offering is seperate from the open source
2019-03-05 10:52:43 -08:00
Ammar Bandukwala
838c8a6f2c Clarify that the cloud offering is seperate from the open source 2019-03-05 12:51:34 -06:00
75 changed files with 1584 additions and 861 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
Dockerfile
# Docs
doc/
# GitHub stuff
.github
.gitignore
.travis.yml
LICENSE
README.md

3
.github/CODEOWNERS vendored
View File

@@ -1 +1,2 @@
* @coderasher @kylecarbs
* @coderasher @kylecarbs
Dockerfile @nhooyr

View File

@@ -2,17 +2,21 @@
name: Bug Report
about: Report problems and unexpected behavior.
title: ''
labels: ''
labels: 'bug'
assignees: ''
---
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- All extension-specific issues should be created with the `Extension Bug` template. -->
- `vscode-remote` version: <!-- The version of vscode-remote -->
- `code-server` version: <!-- The version of code-server -->
- OS Version: <!-- OS version, cloud provider, -->
#### Steps to Reproduce
## Description
1.
2.
<!-- Describes the problem here -->
## Steps to Reproduce
1. <!-- step 1: click ... -->
1. <!-- step 2: ... -->

View File

@@ -8,11 +8,15 @@ assignees: ''
<!-- Please search existing issues to avoid creating duplicates. -->
- `vscode-remote` version: <!-- The version of vscode-remote -->
- `code-server` version: <!-- The version of code-server -->
- OS Version: <!-- OS version, cloud provider, -->
- Extension: <!-- Link to extension -->
#### Steps to Reproduce
## Description
1.
2.
<!-- Describes the problem here -->
## Steps to Reproduce
1. <!-- step 1: click ... -->
1. <!-- step 2: ... -->

View File

@@ -2,7 +2,7 @@
name: Feature Request
about: Suggest an idea for this project.
title: ''
labels: ''
labels: 'feature'
assignees: ''
---

View File

@@ -2,16 +2,16 @@
name: Question
about: Ask a question.
title: ''
labels: ''
labels: 'question'
assignees: ''
---
<!-- Please search existing issues to avoid creating duplicates. -->
#### Description
## Description
<!-- A description of the the question. -->
#### Related Issues
## Related Issues
<!-- Any issues related to your question. -->

6
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,6 @@
<!-- Please answer these questions before submitting your PR. Thanks! -->
### Describe in detail the problem you had and how this PR fixes it
### Is there an open issue you can link to?

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ node_modules
dist
out
.DS_Store
release

View File

@@ -1,6 +1,8 @@
language: node_js
node_js:
- 8.9.3
- 8.15.0
env:
- VERSION="1.32.0-$TRAVIS_BUILD_NUMBER"
matrix:
include:
- os: linux
@@ -12,22 +14,25 @@ before_install:
script:
- scripts/build.sh
before_deploy:
- export TRAVIS_TAG="1.31.0-$TRAVIS_BUILD_NUMBER"
- echo "$TRAVIS_TAG" "$TRAVIS_COMMIT"
- echo "$VERSION" "$TRAVIS_COMMIT"
- git config --local user.name "$USER_NAME"
- git config --local user.email "$USER_EMAIL"
- git tag "$TRAVIS_TAG" "$TRAVIS_COMMIT"
- git tag "$VERSION" "$TRAVIS_COMMIT"
- yarn task package "$VERSION"
deploy:
provider: releases
file_glob: true
draft: true
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
name: $TRAVIS_TAG
tag_name: "$VERSION"
target_commitish: "$TRAVIS_COMMIT"
name: "$VERSION"
skip_cleanup: true
api_key:
secure: YL/x24KjYjgYXPcJWk3FV7FGxI79Mh6gBECQEcdlf3fkLEoKFVgzHBoUNWrFPzyR4tgLyWNAgcpD9Lkme1TRWTom7UPjXcwMNyLcLa+uec7ciSAnYD9ntLTpiCuPDD1u0LtRGclSi/EHQ+F8YVq+HZJpXTsJeAmOmihma3GVbGKSZr+BRum+0YZSG4w+o4TOlYzw/4bLWS52MogZcwpjd+hemBbgXLuGU2ziKv2vEKCZFbEeA16II4x1WLI4mutDdCeh7+3aLzGLwDa49NxtsVYNjyNFF75JhCTCNA55e2YMiLz9Uq69IXe/mi5F7xUaFfhIqqLNyKBnKeEOzu3dYnc+8n3LjnQ+00PmkF05nx9kBn3UfV1kwQGh6QbyDmTtBP07rtUMyI14aeQqHjxsaVRdMnwj9Q2DjXRr8UDqESZF0rmK3pHCXS2fBhIzLE8tLVW5Heiba2pQRFMHMZW+KBE97FzcFh7is90Ait3T8enfcd/PWFPYoBejDAdjwxwOkezh5N5ZkYquEfDYuWrFi6zRFCktsruaAcA+xGtTf9oilBBzUqu8Ie+YFWH5me83xakcblJWdaW/D2rLJAJH3m6LFm8lBqyUgDX5t/etob6CpDuYHu5D1J3XINOj/+aLAcadq6qlh70PMZS3zYffUu3JlzaD2amlSHIT8b5YXFc=
file: packages/server/cli-*
file:
- release/*.tar.gz
- release/*.zip
on:
repo: codercom/code-server
branch: master
cache: yarn

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM node:8.15.0
# Install VS Code's deps. These are the only two it seems we need.
RUN apt-get update && apt-get install -y \
libxkbfile-dev \
libsecret-1-dev
# Ensure latest yarn.
RUN npm install -g yarn@1.13
WORKDIR /src
COPY . .
# In the future, we can use https://github.com/yarnpkg/rfcs/pull/53 to make yarn use the node_modules
# directly which should be fast as it is slow because it populates its own cache every time.
RUN yarn && yarn task build:server:binary
# We deploy with ubuntu so that devs have a familiar environment.
FROM ubuntu:18.10
WORKDIR /root/project
COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
EXPOSE 8443
RUN apt-get update && apt-get install -y \
openssl \
net-tools \
git \
locales
RUN locale-gen en_US.UTF-8
# We unfortunately cannot use update-locale because docker will not use the env variables
# configured in /etc/default/locale so we need to set it manually.
ENV LANG=en_US.UTF-8
ENTRYPOINT ["code-server"]

View File

@@ -3,20 +3,41 @@
[!["Open Issues"](https://img.shields.io/github/issues-raw/codercom/code-server.svg)](https://github.com/codercom/code-server/issues)
[!["Latest Release"](https://img.shields.io/github/release/codercom/code-server.svg)](https://github.com/codercom/code-server/releases/latest)
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](#)
[![Discord](https://discordapp.com/api/guilds/463752820026376202/widget.png)](https://discord.gg/zxSwN8Z)
`code-server` is VS Code running on a remote server, accessible through the browser.
`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a remote server, accessible through the browser.
Try it out:
```bash
docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth
```
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
- If you have a Windows or Mac workstation, more easily develop for Linux.
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
- Preserve battery life when you're on the go.
- All intensive computation runs on your server.
- You're no longer running excess instances of Chrome.
![Screenshot](/doc/assets/ide.png)
## Getting Started
### Hosted
[Try `code-server` now](https://coder.com/signup) for free at coder.com.
1. [Download a binary](https://github.com/codercom/code-server/releases) (Linux and OSX supported. Windows coming soon)
### Docker
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).
### Binaries
1. [Download a binary](https://github.com/codercom/code-server/releases) (Linux and OS X supported. Windows coming soon)
2. Start the binary with the project directory as the first argument
```
code-server <inital directory to open>
code-server <initial directory to open>
```
> You will be prompted to enter the password shown in the CLI
`code-server` should now be running at https://localhost:8443.
@@ -33,17 +54,17 @@ How to [secure your setup](/doc/security/ssl.md).
### Known Issues
- Debugging extensions doesnt work.
- Creating custom VS Code extensions and debugging them doesn't work.
### Future
- Windows support.
- Electron and ChromeOS applications to bridge the gap between local<->remote.
- Electron and Chrome OS applications to bridge the gap between local<->remote.
- Run VS Code unit tests against our builds to ensure features work as expected.
## Contributing
Guides on setup for development will be coming soon. :)
Development guides are coming soon.
## License
@@ -51,7 +72,7 @@ Guides on setup for development will be coming soon. :)
## Enterprise
Visit [our enterprise page](https://coder.com/enterprise) for more information on our enterprise offering.
Visit [our enterprise page](https://coder.com/enterprise) for more information about our enterprise offering.
## Commercialization

View File

@@ -10,6 +10,7 @@ const libPath = path.join(__dirname, "../lib");
const vscodePath = path.join(libPath, "vscode");
const pkgsPath = path.join(__dirname, "../packages");
const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions");
const vscodeVersion = "1.32.0";
const buildServerBinary = register("build:server:binary", async (runner) => {
await ensureInstalled();
@@ -40,22 +41,24 @@ const buildServerBinaryPackage = register("build:server:binary:package", async (
});
const dependencyNexeBinary = register("dependency:nexe", async (runner) => {
if (os.platform() === "linux") {
if (os.platform() === "linux" && process.env.COMPRESS === "true") {
// Download the nexe binary so we can compress it before nexe runs. If we
// don't want compression we don't need to do anything since nexe will take
// care of getting the binary.
const nexeDir = path.join(os.homedir(), ".nexe");
const targetBinaryName = `${os.platform()}-${os.arch()}-${process.version.substr(1)}`;
const targetBinaryPath = path.join(nexeDir, targetBinaryName);
if (!fs.existsSync(targetBinaryPath)) {
/**
* We create a binary with nexe
* so we can compress it
*/
fse.mkdirpSync(nexeDir);
runner.cwd = nexeDir;
await runner.execute("wget", [`https://github.com/nexe/nexe/releases/download/v3.0.0-beta.15/${targetBinaryName}`]);
await runner.execute("chmod", ["+x", targetBinaryPath]);
}
// Compress with upx if it doesn't already look compressed.
if (fs.statSync(targetBinaryPath).size >= 20000000) {
// Compress w/ upx
// It needs to be executable for upx to work, which it might not be if
// nexe downloaded it.
fs.chmodSync(targetBinaryPath, "755");
const upxFolder = path.join(os.tmpdir(), "upx");
const upxBinary = path.join(upxFolder, "upx");
if (!fs.existsSync(upxBinary)) {
@@ -194,7 +197,7 @@ const buildDefaultExtensions = register("build:default-extensions", async (runne
if (!fs.existsSync(defaultExtensionsPath)) {
await copyForDefaultExtensions();
runner.cwd = extDirPath;
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64"]);
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64", "--max-old-space-size=32384"]);
if (resp.exitCode !== 0) {
throw new Error(`Failed to build default extensions: ${resp.stderr}`);
}
@@ -217,14 +220,14 @@ const ensureCloned = register("vscode:clone", async (runner) => {
} else {
fse.mkdirpSync(libPath);
runner.cwd = libPath;
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode"]);
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", vscodeVersion, "--single-branch", "--depth=1"]);
if (clone.exitCode !== 0) {
throw new Error(`Failed to clone: ${clone.exitCode}`);
}
}
runner.cwd = vscodePath;
const checkout = await runner.execute("git", ["checkout", "tags/1.31.0"]);
const checkout = await runner.execute("git", ["checkout", vscodeVersion]);
if (checkout.exitCode !== 0) {
throw new Error(`Failed to checkout: ${checkout.stderr}`);
}
@@ -244,6 +247,10 @@ const ensureClean = register("vscode:clean", async (runner) => {
throw new Error(`Failed to remove unstaged files: ${removeUnstaged.stderr}`);
}
}
const fetch = await runner.execute("git", ["fetch", "--prune"]);
if (fetch.exitCode !== 0) {
throw new Error(`Failed to fetch latest changes: ${fetch.stderr}`);
}
});
const ensurePatched = register("vscode:patch", async (runner) => {
@@ -260,4 +267,30 @@ const ensurePatched = register("vscode:patch", async (runner) => {
}
});
register("package", async (runner, releaseTag) => {
if (!releaseTag) {
throw new Error("Please specify the release tag.");
}
const releasePath = path.resolve(__dirname, "../release");
const archiveName = `code-server-${releaseTag}-${os.platform()}-${os.arch()}`;
const archiveDir = path.join(releasePath, archiveName);
fse.removeSync(archiveDir);
fse.mkdirpSync(archiveDir);
const binaryPath = path.join(__dirname, `../packages/server/cli-${os.platform()}-${os.arch()}`);
const binaryDestination = path.join(archiveDir, "code-server");
fse.copySync(binaryPath, binaryDestination);
fs.chmodSync(binaryDestination, "755");
["README.md", "LICENSE"].forEach((fileName) => {
fse.copySync(path.resolve(__dirname, `../${fileName}`), path.join(archiveDir, fileName));
});
runner.cwd = releasePath;
await os.platform() === "linux"
? runner.execute("tar", ["-cvzf", `${archiveName}.tar.gz`, `${archiveName}`])
: runner.execute("zip", ["-r", `${archiveName}.zip`, `${archiveName}`]);
});
run();

View File

@@ -0,0 +1,74 @@
apiVersion: v1
kind: Namespace
metadata:
name: code-server
---
apiVersion: v1
kind: Service
metadata:
name: code-server
namespace: code-server
spec:
ports:
- port: 8443
name: https
protocol: TCP
selector:
app: code-server
type: ClusterIP
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gp2
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
fsType: ext4
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: code-store
namespace: code-server
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 60Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: code-server
name: code-server
namespace: code-server
spec:
selector:
matchLabels:
app: code-server
replicas: 1
template:
metadata:
labels:
app: code-server
spec:
containers:
- image: codercom/code-server
imagePullPolicy: Always
name: code-servery
ports:
- containerPort: 8443
name: https
volumeMounts:
- name: code-server-storage
mountPath: /go/src
volumes:
- name: code-server-storage
persistentVolumeClaim:
claimName: code-store

View File

@@ -0,0 +1,43 @@
apiVersion: v1
kind: Namespace
metadata:
name: code-server
---
apiVersion: v1
kind: Service
metadata:
name: code-server
namespace: code-server
spec:
ports:
- port: 8443
name: https
protocol: TCP
selector:
app: code-server
type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: code-server
name: code-server
namespace: code-server
spec:
selector:
matchLabels:
app: code-server
replicas: 1
template:
metadata:
labels:
app: code-server
spec:
containers:
- image: codercom/code-server
imagePullPolicy: Always
name: code-server
ports:
- containerPort: 8443
name: https

View File

@@ -28,20 +28,32 @@ If you're just starting out, we recommend [installing code-server locally](../..
- In the description of your EC2 instance copy the public DNS (iPv4) address using the copy to clipboard button
- Open a terminal on your computer and use the following command to SSH into your EC2 instance
```
ssh i "path/to/your/keypair.pem" ubuntu@(paste the public DNS here)
ssh -i "path/to/your/keypair.pem" ubuntu@(paste the public DNS here)
```
>example: `ssh -i "/Users/John/Downloads/TestInstance.pem" ubuntu@ec2-3-45-678-910.compute-1.amazonaws.co`
- You should see a prompt for your EC2 instance like so<img src="../../assets/aws_ubuntu.png">
- At this point it is time to download the `code-server` binary. We will of course want the linux version. Make sure you copy the link for the latest linux version on our [releases page](https://github.com/codercom/code-server/releases)
- With the URL in the clipboard, run:
- At this point it is time to download the `code-server` binary. We will of course want the linux version.
- Find the latest Linux release from this URL:
```
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
https://github.com/codercom/code-server/releases/latest
```
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```
- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```
- Navigate to extracted directory with this command:
```
cd code-server-{version}-linux-x64
```
- If you run into any permission errors, make the binary executable by running:
```
chmod +x code-server-linux
chmod +x code-server
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
- Finally, run
```
sudo ./code-server-linux -p 80
@@ -54,4 +66,4 @@ If you're just starting out, we recommend [installing code-server locally](../..
> The `-p 80` flag is necessary in order to make the IDE accessible from the public IP of your instance (also available from the description in the instances page.
---
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).

View File

@@ -16,22 +16,34 @@ If you're just starting out, we recommend [installing code-server locally](../..
- Open a terminal on your computer and SSH into your instance
> example: ssh root@203.0.113.0
- Once in the SSH session, visit code-server [releases page](https://github.com/codercom/code-server/releases/) and copy the link to the download for the latest linux release
- In the shell run the below command with the URL from your clipboard
- Find the latest Linux release from this URL:
```
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
https://github.com/codercom/code-server/releases/latest
```
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```
- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```
- Navigate to extracted directory with this command:
```
cd code-server-{version}-linux-x64
```
- If you run into any permission errors when attempting to run the binary:
```
chmod +x code-server-linux
chmod +x code-server
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
- Finally start the code-server
```
sudo ./code-server-linux -p80
sudo ./code-server-linux -p 80
```
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
- When you visit the public IP for your Digital Ocean instance, you will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
- Then click **"proceed anyway"**<img src="../../assets/chrome_confirm.png">
---
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).

View File

@@ -13,34 +13,59 @@ If you're just starting out, we recommend [installing code-server locally](../..
- Choose an appropriate machine type (we recommend 2 vCPU and 7.5 GB RAM, more depending on team size and number of repositories/languages enabled)
- Choose Ubuntu 16.04 LTS as your boot disk
- Check the boxes for **Allow HTTP traffic** and **Allow HTTPS traffic** in the **Firewall** section
- Create your VM, and **take note** of it's public IP address.
- Create your VM, and **take note** of its public IP address.
- Copy the link to download the latest Linux binary from our [releases page](https://github.com/codercom/code-server/releases)
---
## Final Steps
1. SSH into your Google Cloud VM
- SSH into your Google Cloud VM
```
gcloud compute ssh --zone [region] [instance name]
```
2. Download the binary using the link we copied to clipboard
- Find the latest Linux release from this URL:
```
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
https://github.com/codercom/code-server/releases/latest
```
3. Make the binary executable if you run into any errors regarding permission:
```
chmod +x code-server-linux
```
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```
- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```
- Navigate to extracted directory with this command:
```
cd code-server-{version}-linux-x64
```
- Make the binary executable if you run into any errors regarding permission:
```
chmod +x code-server
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
4. Start the code-server
- Start the code-server
```
sudo ./code-server-linux -p 80
```
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
5. Access code-server from the public IP of your Google Cloud instance we noted earlier in your browser.
- Access code-server from the public IP of your Google Cloud instance we noted earlier in your browser.
> example: 32.32.32.234
6. You will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
7. Then click **"proceed anyway"**<img src="../../assets/chrome_confirm.png">
- You will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
- Then click **"proceed anyway"**<img src="../../assets/chrome_confirm.png">
---
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 KiB

After

Width:  |  Height:  |  Size: 603 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -1,6 +1,6 @@
# Generate a self-signed certificate 🔒
code-server has the ability to secure your connection between client and server using SSL/TSL certificates. By default, the server will start with an unencrypted connection. We recommend Self-signed TLS/SSL certificates for personal of code-server or within an organization.
code-server has the ability to secure your connection between client and server using SSL/TSL certificates. By default, the server will start with an unencrypted connection. We recommend Self-signed TLS/SSL certificates for personal use of code-server or within an organization.
This guide will show you how to create a self-signed certificate and start code-server using your certificate/key.

View File

@@ -8,7 +8,7 @@
This document pertains to Coder specific implementations of VS Code. For documentation on how to use VS Code itself, please refer to the official [documentation for VS Code](https://code.visualstudio.com/docs)
It takes just a few minutes to get your own self-hosted server running. If you've got a machine running macOS, Windows, or Linux, you're ready to start the binary which listens on port `8080` by default.
It takes just a few minutes to get your own self-hosted server running. If you've got a machine running macOS, Windows, or Linux, you're ready to start the binary which listens on port `8443` by default.
<!--
DO NOT CHANGE THIS TO A CODEBLOCK.
@@ -20,7 +20,7 @@ It takes just a few minutes to get your own self-hosted server running. If you'v
1. Visit [the releases](https://github.com/codercom/code-server/releases) page and download the latest cli for your operating system
2. Double click the executable to run in the current directory
3. Copy the password that appears in the cli<img src="../assets/cli.png">
4. In your browser navigate to `localhost:8080`
4. In your browser navigate to `localhost:8443`
5. Paste the password from the cli into the login window<img src="../assets/server-password-modal.png">
> NOTE: Be careful with your password as sharing it will grant those users access to your server's file system
@@ -44,25 +44,28 @@ OPTIONS
-d, --data-dir=data-dir
-h, --host=host [default: 0.0.0.0]
-o, --open Open in browser on startup
-p, --port=port [default: 8080] Port to bind on
-p, --port=port [default: 8443] Port to bind on
-v, --version show CLI version
--allow-http
--cert=cert
--cert-key=cert-key
--help show CLI help
--no-auth
--password=password
```
### Data directory
Use `code-server -d (path/to/directory)` or `code-server --data-dir=(path/to/directory)`, excluding the parentheses to specify the root folder that VS Code will start in
### Host
By default, code-server will use `0.0.0.0` as it's address. This can be changed by using `code-server -h` or `code-server --host=` followed by the address you want to use.
By default, code-server will use `0.0.0.0` as its address. This can be changed by using `code-server -h` or `code-server --host=` followed by the address you want to use.
> Example: `code-server -h 127.0.0.1`
### Open
You can have the server automatically open the VS Code in your browser on startup by using the `code server -o` or `code-server --open` flags
### Port
By default, code-server will use `8080` as it's port. This can be changed by using `code-server -p` or `code-server --port=` followed by the port you want to use.
By default, code-server will use `8443` as its port. This can be changed by using `code-server -p` or `code-server --port=` followed by the port you want to use.
> Example: `code-server -p 9000`
### Cert and Cert Key
@@ -71,5 +74,20 @@ OPTIONS
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
### Nginx Reverse Proxy
Nginx is for reverse proxy. Here is a example virtual host that works with code-server. Please also pass --allow-http. You can also use certbot by EFF to get a ssl certificates for free.
```
server {
listen 80;
listen [::]:80;
server_name code.example.com code.example.org;
location / {
proxy_pass http://localhost:8443/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
}
```
### Help
Use `code-server -h` or `code-server --help` to view the usage for the cli. This is also shown at the beginning of this section.
Use `code-server -h` or `code-server --help` to view the usage for the cli. This is also shown at the beginning of this section.

View File

@@ -51,7 +51,6 @@
},
"dependencies": {
"node-loader": "^0.6.0",
"trash": "^4.3.0",
"webpack-merge": "^4.2.1"
}
}

View File

@@ -8,36 +8,20 @@
<body>
<div class="login">
<div class="back">
<- Back </div>
<h4 class="title">code-server</h4>
<h2 class="subtitle">
Enter server password
</h2>
<div class="mdc-text-field">
<input type="password" id="password" class="mdc-text-field__input" required>
<label class="mdc-floating-label" for="password">Password</label>
<div class="mdc-line-ripple"></div>
</div>
<div class="mdc-text-field-helper-line">
<div class="mdc-text-field-helper-text">helper text</div>
</div>
<div class="mdc-form-field">
<div class="mdc-checkbox">
<input type="checkbox" class="mdc-checkbox__native-control" id="remember" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
</div>
<label for="remember">Remember Me</label>
</div>
<button id="submit" class="mdc-button mdc-button--unelevated">
<span class="mdc-button__label">Enter IDE</span>
</button>
<div class="back"> <- Back </div>
<h4 class="title">code-server</h4>
<h2 class="subtitle">
Enter server password
</h2>
<div class="mdc-text-field">
<input type="password" id="password" class="mdc-text-field__input" required>
<label class="mdc-floating-label" for="password">Password</label>
<div class="mdc-line-ripple"></div>
</div>
<button id="submit" class="mdc-button mdc-button--unelevated">
<span class="mdc-button__label">Enter IDE</span>
</button>
<div id="error-display"></div>
</div>
</body>

View File

@@ -106,3 +106,16 @@ body {
// transition: 500ms opacity ease;
}
#error-display {
box-sizing: border-box;
color: #bb2d0f;
font-size: 14px;
font-weight: 400;
letter-spacing: 0.3px;
line-height: 12px;
padding: 8px;
padding-bottom: 0;
padding-top: 20px;
text-align: center;
}

View File

@@ -28,3 +28,14 @@ submit.addEventListener("click", () => {
document.cookie = `password=${password.value}`;
location.reload();
});
/**
* Notify user on load of page if previous password was unsuccessful
*/
const reg = new RegExp(`password=(\\w+);?`);
const matches = document.cookie.match(reg);
const errorDisplay = document.getElementById("error-display") as HTMLDivElement;
if (document.referrer === document.location.href && matches) {
errorDisplay.innerText = "Password is incorrect!";
}

View File

@@ -258,7 +258,7 @@ export class Server extends React.Component<ServerProps, {
if (xhr.status === 200) {
this.setState({
status: "Online",
version: "v1.31.0",
version: process.env.VERSION,
});
} else {
this.setState({

View File

@@ -158,6 +158,19 @@ declare namespace ide {
readonly notificationService: INotificationService;
readonly menuRegistry: IMenuRegistry;
readonly commandRegistry: ICommandRegistry;
onFileCreate(cb: (path: string) => void): void;
onFileMove(cb: (path: string, target: string) => void): void;
onFileDelete(cb: (path: string) => void): void;
onFileSaved(cb: (path: string) => void): void;
onFileCopy(cb: (path: string, target: string) => void): void;
onModelAdded(cb: (path: string, languageId: string) => void): void;
onModelRemoved(cb: (path: string, languageId: string) => void): void;
onModelLanguageChange(cb: (path: string, languageId: string, oldLanguageId: string) => void): void;
onTerminalAdded(cb: () => void): void;
onTerminalRemoved(cb: () => void): void;
};
export enum Severity {

View File

@@ -1,6 +1,6 @@
{
"name": "@coder/ide-api",
"version": "1.0.2",
"version": "1.0.3",
"typings": "api.d.ts",
"author": "Coder",
"license": "MIT",

View File

@@ -91,8 +91,9 @@ class WebsocketConnection implements ReadWriteConnection {
*/
private async openSocket(): Promise<WebSocket> {
this.dispose();
const wsProto = location.protocol === "https:" ? "wss" : "ws";
const socket = new WebSocket(
`${location.protocol === "https:" ? "wss" : "ws"}://${location.host}`,
`${wsProto}://${location.host}${location.pathname}`,
);
socket.binaryType = "arraybuffer";
this.activeSocket = socket;

View File

@@ -19,7 +19,6 @@
background: #141414;
border: none;
box-sizing: border-box;
margin-bottom: 25px;
padding: 10px;
width: 100%;
}
@@ -31,11 +30,11 @@
.msgbox > .detail {
font-size: 14px;
margin-top: 5px;
margin: 5px 0;
}
.msgbox > .errors {
margin-bottom: 25px;
margin-top: 20px;
}
.msgbox > .errors {
@@ -46,6 +45,7 @@
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 20px;
}
.msgbox > .button-wrapper > button {

View File

@@ -31,30 +31,31 @@ export class Dialog {
private input: HTMLInputElement | undefined;
private errors: HTMLElement;
private buttons: HTMLElement[] | undefined;
private readonly msgBox: HTMLElement;
private actionEmitter = new Emitter<IDialogAction>();
public onAction = this.actionEmitter.event;
public constructor(private readonly options: IDialogOptions) {
const msgBox = document.createElement("div");
msgBox.classList.add("msgbox");
this.msgBox = document.createElement("div");
this.msgBox.classList.add("msgbox");
if (this.options.message) {
const messageDiv = document.createElement("div");
messageDiv.classList.add("msg");
messageDiv.innerText = this.options.message;
msgBox.appendChild(messageDiv);
this.msgBox.appendChild(messageDiv);
}
if (this.options.detail) {
const detailDiv = document.createElement("div");
detailDiv.classList.add("detail");
detailDiv.innerText = this.options.detail;
msgBox.appendChild(detailDiv);
this.msgBox.appendChild(detailDiv);
}
if (this.options.input) {
msgBox.classList.add("input");
this.msgBox.classList.add("input");
this.input = document.createElement("input");
this.input.classList.add("input");
this.input.value = this.options.input.value;
@@ -67,12 +68,11 @@ export class Dialog {
});
}
});
msgBox.appendChild(this.input);
this.msgBox.appendChild(this.input);
}
this.errors = document.createElement("div");
this.errors.classList.add("errors");
msgBox.appendChild(this.errors);
if (this.options.buttons && this.options.buttons.length > 0) {
this.buttons = this.options.buttons.map((buttonText, buttonIndex) => {
@@ -92,12 +92,12 @@ export class Dialog {
const buttonWrapper = document.createElement("div");
buttonWrapper.classList.add("button-wrapper");
this.buttons.forEach((b) => buttonWrapper.appendChild(b));
msgBox.appendChild(buttonWrapper);
this.msgBox.appendChild(buttonWrapper);
}
this.overlay = document.createElement("div");
this.overlay.className = "msgbox-overlay";
this.overlay.appendChild(msgBox);
this.overlay.appendChild(this.msgBox);
setTimeout(() => {
this.overlay.style.opacity = "1";
@@ -122,6 +122,7 @@ export class Dialog {
const errorDiv = document.createElement("error");
errorDiv.innerText = error;
this.errors.appendChild(errorDiv);
this.msgBox.appendChild(this.errors);
}
}
@@ -131,7 +132,7 @@ export class Dialog {
public show(): void {
if (!this.cachedActiveElement) {
this.cachedActiveElement = document.activeElement as HTMLElement;
document.body.appendChild(this.overlay);
(document.getElementById("workbench.main.container") || document.body).appendChild(this.overlay);
document.addEventListener("keydown", this.onKeydown);
if (this.input) {
this.input.focus();

View File

@@ -25,18 +25,39 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
// tslint:disable-next-line:no-any
return oldCreateElement.call(document, tagName as any);
};
// tslint:disable-next-line:no-any
const getPropertyDescriptor = (object: any, id: string): PropertyDescriptor | undefined => {
let op = Object.getPrototypeOf(object);
while (!Object.getOwnPropertyDescriptor(op, id)) {
op = Object.getPrototypeOf(op);
}
return Object.getOwnPropertyDescriptor(op, id);
};
if (tagName === "img") {
const img = createElement("img");
const oldSrc = getPropertyDescriptor(img, "src");
if (!oldSrc) {
throw new Error("Failed to find src property");
}
Object.defineProperty(img, "src", {
get: (): string => {
return oldSrc!.get!.call(img);
},
set: (value: string): void => {
if (value) {
value = value.replace(/file:\/\//g, "/resource");
}
oldSrc!.set!.call(img, value);
},
});
return img;
}
if (tagName === "style") {
const style = createElement("style");
// tslint:disable-next-line:no-any
const getPropertyDescriptor = (object: any, id: string): PropertyDescriptor | undefined => {
let op = Object.getPrototypeOf(object);
while (!Object.getOwnPropertyDescriptor(op, id)) {
op = Object.getPrototypeOf(op);
}
return Object.getOwnPropertyDescriptor(op, id);
};
const oldInnerHtml = getPropertyDescriptor(style, "innerHTML");
if (!oldInnerHtml) {
throw new Error("Failed to find innerHTML property");
@@ -46,7 +67,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
return oldInnerHtml!.get!.call(style);
},
set: (value: string): void => {
value = value.replace(/file:\/\//g, "/resource");
if (value) {
value = value.replace(/file:\/\//g, "/resource");
}
oldInnerHtml!.set!.call(style, value);
},
});
@@ -122,6 +145,7 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
// TODO
args[0].contents = (args[0].contents as string).replace(/"(file:\/\/[^"]*)"/g, (m1) => `"/resource${m1}"`);
args[0].contents = (args[0].contents as string).replace(/"vscode-resource:([^"]*)"/g, (m, m1) => `"/resource${m1}"`);
args[0].contents = (args[0].contents as string).replace(/style-src vscode-core-resource:/g, "style-src 'self'");
}
if (view.contentWindow) {
view.contentWindow.postMessage({
@@ -160,10 +184,8 @@ class Clipboard {
class Shell {
public async moveItemToTrash(path: string): Promise<void> {
await client.evaluate((_helper, path) => {
const trash = __non_webpack_require__("trash") as typeof import("trash");
return trash(path);
await client.evaluate((helper, path) => {
return helper.modules.trash(path);
}, path);
}
}

View File

@@ -6,6 +6,7 @@
"google-protobuf": "^3.6.1",
"node-pty-prebuilt": "^0.7.6",
"spdlog": "^0.7.2",
"trash": "^4.3.0",
"tslib": "^1.9.3",
"ws": "^6.1.2"
},

View File

@@ -1,4 +1,5 @@
/// <reference path="../../../../lib/vscode/src/typings/spdlog.d.ts" />
/// <reference path="../../node_modules/node-pty-prebuilt/typings/node-pty.d.ts" />
import { ChildProcess, SpawnOptions, ForkOptions } from "child_process";
import { EventEmitter } from "events";
import { Socket } from "net";
@@ -20,22 +21,25 @@ interface ActiveEvalEmitter {
on(event: string, cb: (...args: any[]) => void): void;
}
/**
* For any non-external modules that are not built in, we need to require and
* access them server-side. A require on the client-side won't work since that
* code won't exist on the server (and bloat the client with an unused import),
* and we can't manually import on the server-side and then call
* `__webpack_require__` on the client-side because Webpack stores modules by
* their paths which would require us to hard-code the path.
*/
export interface Modules {
pty: typeof import("node-pty");
spdlog: typeof import("spdlog");
trash: typeof import("trash");
}
/**
* Helper class for server-side evaluations.
*/
export class EvalHelper {
// For any non-external modules that are not built in, we need to require and
// access them here. A require on the client-side won't work since that code
// won't exist on the server (and bloat the client with an unused import), and
// we can't manually import on the server-side and then call
// `__webpack_require__` on the client-side because Webpack stores modules by
// their paths which would require us to hard-code the path. These aren't
// required immediately so we have a chance to unpack the .node files and set
// their locations.
public modules = {
spdlog: require("spdlog") as typeof import("spdlog"),
pty: require("node-pty-prebuilt") as typeof import("node-pty"),
};
public constructor(public modules: Modules) {}
/**
* Some spawn code tries to preserve the env (the debug adapter for instance)
@@ -113,11 +117,11 @@ export class ActiveEvalHelper implements ActiveEvalEmitter {
* Helper class for server-side active evaluations.
*/
export class ServerActiveEvalHelper extends ActiveEvalHelper implements EvalHelper {
private readonly evalHelper = new EvalHelper();
public modules = this.evalHelper.modules;
private readonly evalHelper: EvalHelper;
public constructor(emitter: ActiveEvalEmitter, public readonly fork: ForkProvider) {
public constructor(public modules: Modules, emitter: ActiveEvalEmitter, public readonly fork: ForkProvider) {
super(emitter);
this.evalHelper = new EvalHelper(modules);
}
public preserveEnv(options: SpawnOptions | ForkOptions): void {
@@ -208,7 +212,7 @@ export class ServerActiveEvalHelper extends ActiveEvalHelper implements EvalHelp
}
public createUnique(id: number | "stdout" | "stderr" | "stdin"): ServerActiveEvalHelper {
return new ServerActiveEvalHelper(this.createUniqueEmitter(id), this.fork);
return new ServerActiveEvalHelper(this.modules, this.createUniqueEmitter(id), this.fork);
}
}

View File

@@ -4,7 +4,7 @@ import * as vm from "vm";
import { logger, field } from "@coder/logger";
import { NewEvalMessage, EvalFailedMessage, EvalDoneMessage, ServerMessage, EvalEventMessage } from "../proto";
import { SendableConnection } from "../common/connection";
import { ServerActiveEvalHelper, EvalHelper, ForkProvider } from "../common/helpers";
import { ServerActiveEvalHelper, EvalHelper, ForkProvider, Modules } from "../common/helpers";
import { stringify, parse } from "../common/util";
export interface ActiveEvaluation {
@@ -57,9 +57,15 @@ export const evaluate = (connection: SendableConnection, message: NewEvalMessage
onDispose();
};
const modules: Modules = {
spdlog: require("spdlog"),
pty: require("node-pty-prebuilt"),
trash: require("trash"),
};
let eventEmitter = message.getActive() ? new EventEmitter(): undefined;
const sandbox = {
helper: eventEmitter ? new ServerActiveEvalHelper({
helper: eventEmitter ? new ServerActiveEvalHelper(modules, {
removeAllListeners: (event?: string): void => {
eventEmitter!.removeAllListeners(event);
},
@@ -89,7 +95,7 @@ export const evaluate = (connection: SendableConnection, message: NewEvalMessage
connection.send(serverMsg.serializeBinary());
},
// tslint:enable no-any
}, fork || cpFork) : new EvalHelper(),
}, fork || cpFork) : new EvalHelper(modules),
_Buffer: Buffer,
// When the client is ran from Webpack, it will replace
// __non_webpack_require__ with require, which we then need to provide to

View File

@@ -1,7 +1,5 @@
import { mkdirp } from "fs-extra";
import * as os from "os";
import * as path from "path";
import { mkdir } from "fs";
import { promisify } from "util";
import { logger, field } from "@coder/logger";
import { Pong, ClientMessage, WorkingInitMessage, ServerMessage } from "../proto";
import { evaluate, ActiveEvaluation } from "./evaluate";
@@ -11,6 +9,7 @@ import { ReadWriteConnection } from "../common/connection";
export interface ServerOptions {
readonly workingDirectory: string;
readonly dataDirectory: string;
readonly cacheDirectory: string;
readonly builtInExtensionsDirectory: string;
readonly fork?: ForkProvider;
}
@@ -42,24 +41,11 @@ export class Server {
return;
}
// Ensure the data directory exists.
const mkdirP = async (path: string): Promise<void> => {
const split = path.replace(/^\/*|\/*$/g, "").split("/");
let dir = "";
while (split.length > 0) {
dir += "/" + split.shift();
try {
await promisify(mkdir)(dir);
} catch (error) {
if (error.code !== "EEXIST" && error.code !== "EISDIR") {
throw error;
}
}
}
};
Promise.all([ mkdirP(path.join(this.options.dataDirectory, "User", "workspaceStorage")) ]).then(() => {
logger.info("Created data directory");
}).catch((error) => {
Promise.all([
mkdirp(this.options.cacheDirectory),
mkdirp(this.options.dataDirectory),
mkdirp(this.options.workingDirectory),
]).catch((error) => {
logger.error(error.message, field("error", error));
});

View File

@@ -4,10 +4,12 @@ describe("Server", () => {
const dataDirectory = "/tmp/example";
const workingDirectory = "/working/dir";
const builtInExtensionsDirectory = "/tmp/example";
const cacheDirectory = "/tmp/cache";
const client = createClient({
builtInExtensionsDirectory,
cacheDirectory,
dataDirectory,
workingDirectory,
builtInExtensionsDirectory,
});
it("should get init msg", (done) => {

View File

@@ -2,6 +2,18 @@
# yarn lockfile v1
"@sindresorhus/df@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d"
integrity sha1-xptm9S9vzdKHyAffIQMF2694UA0=
"@sindresorhus/df@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-2.1.0.tgz#d208cf27e06f0bb476d14d7deccd7d726e9aa389"
integrity sha1-0gjPJ+BvC7R20U197M19cm6ao4k=
dependencies:
execa "^0.2.2"
"@types/google-protobuf@^3.2.7":
version "3.2.7"
resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.2.7.tgz#9576ed5dd62cdb1c9f952522028a03b7cb2b69b5"
@@ -48,15 +60,32 @@ array-flatten@1.1.1:
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
dependencies:
array-uniq "^1.0.1"
array-uniq@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=
async-limiter@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
bindings@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.4.0.tgz#909efa49f2ebe07ecd3cb136778f665052040127"
integrity sha512-7znEVX22Djn+nYjxCWKDne0RRloa9XfYa84yk3s+HkE3LpDYZmhArYr9O9huBoHY3/oXispx5LorIX7Sl2CgSQ==
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"
@@ -84,6 +113,14 @@ body-parser@1.18.3:
raw-body "2.3.3"
type-is "~1.6.16"
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
buffer-alloc-unsafe@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
@@ -117,6 +154,11 @@ code-point-at@^1.0.0:
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
concat-map@0.0.1:
version "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"
@@ -147,6 +189,25 @@ core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
cross-spawn-async@^2.1.1:
version "2.2.5"
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
integrity sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=
dependencies:
lru-cache "^4.0.0"
which "^1.2.8"
cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
dependencies:
nice-try "^1.0.4"
path-key "^2.0.1"
semver "^5.5.0"
shebang-command "^1.2.0"
which "^1.2.9"
debug@2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -186,6 +247,13 @@ detect-libc@^1.0.3:
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
dir-glob@^2.0.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
dependencies:
path-type "^3.0.0"
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -208,11 +276,40 @@ escape-html@~1.0.3:
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-applescript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-applescript/-/escape-string-applescript-2.0.0.tgz#760bca838668e408fe5ee52ce42caf7cb46c5273"
integrity sha1-dgvKg4Zo5Aj+XuUs5CyvfLRsUnM=
etag@~1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
execa@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==
dependencies:
cross-spawn "^6.0.0"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"
execa@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.2.2.tgz#e2ead472c2c31aad6f73f1ac956eef45e12320cb"
integrity sha1-4urUcsLDGq1vc/GslW7vReEjIMs=
dependencies:
cross-spawn-async "^2.1.1"
npm-run-path "^1.0.0"
object-assign "^4.0.1"
path-key "^1.0.0"
strip-eof "^1.0.0"
expand-template@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
@@ -287,6 +384,22 @@ fs-constants@^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@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@@ -301,16 +414,50 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
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=
glob@^7.1.2, glob@^7.1.3:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA=
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
google-protobuf@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.6.1.tgz#7ef58e2bea137a93cdaf5cfd5afa5f6abdd92025"
integrity sha512-SJYemeX5GjDLPnadcmCNQePQHCS4Hl5fOcI/JawqDIYFhCmrtYAjcx/oTQx/Wi8UuCuZQhfvftbmPePPAYHFtA==
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
@@ -333,7 +480,20 @@ iconv-lite@0.4.23:
dependencies:
safer-buffer ">= 2.1.2 < 3"
inherits@2.0.3, inherits@~2.0.3:
ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@2.0.3, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
@@ -360,11 +520,43 @@ is-fullwidth-code-point@^2.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug=
optionalDependencies:
graceful-fs "^4.1.6"
klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk=
optionalDependencies:
graceful-fs "^4.1.9"
lru-cache@^4.0.0:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -402,6 +594,13 @@ mimic-response@^1.0.0:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
dependencies:
brace-expansion "^1.1.7"
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
@@ -419,6 +618,15 @@ mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"
mount-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mount-point/-/mount-point-3.0.0.tgz#665cb9edebe80d110e658db56c31d0aef51a8f97"
integrity sha1-Zly57evoDREOZY21bDHQrvUaj5c=
dependencies:
"@sindresorhus/df" "^1.0.1"
pify "^2.3.0"
pinkie-promise "^2.0.1"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -444,6 +652,11 @@ negotiator@0.6.1:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
node-abi@^2.7.0:
version "2.7.1"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.7.1.tgz#a8997ae91176a5fbaa455b194976e32683cda643"
@@ -464,6 +677,20 @@ noop-logger@^0.1.1:
resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2"
integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=
npm-run-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f"
integrity sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=
dependencies:
path-key "^1.0.0"
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
dependencies:
path-key "^2.0.0"
npmlog@^4.0.1:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -479,7 +706,7 @@ number-is-nan@^1.0.0:
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
object-assign@^4.1.0:
object-assign@^4.0.1, 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=
@@ -491,32 +718,91 @@ on-finished@~2.3.0:
dependencies:
ee-first "1.1.1"
once@^1.3.1, once@^1.4.0:
once@^1.3.0, 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"
os-homedir@^1.0.1:
os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
p-map@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
parseurl@~1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
path-key@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-1.0.0.tgz#5d53d578019646c0d68800db4e146e6bdc2ac7af"
integrity sha1-XVPVeAGWRsDWiADbThRua9wqx68=
path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
dependencies:
pify "^3.0.0"
pify@^2.2.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
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=
pinkie-promise@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
dependencies:
pinkie "^2.0.0"
pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
prebuild-install@^5.0.0:
version "5.2.4"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.2.4.tgz#8cc41a217ef778a31d3a876fe6668d05406db750"
integrity sha512-CG3JnpTZXdmr92GW4zbcba4jkDha6uHraJ7hW4Fn8j0mExxwOKK20hqho8ZuBDCKYCHYIkFM1P2jhtG+KpP4fg==
version "5.2.5"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.2.5.tgz#c7485911fe98950b7f7cd15bb9daee11b875cc44"
integrity sha512-6uZgMVg7yDfqlP5CPurVhtq3hUKBFNufiar4J5hZrlHTo59DDBEtyxw01xCdFss9j0Zb9+qzFVf/s4niayba3w==
dependencies:
detect-libc "^1.0.3"
expand-template "^2.0.3"
@@ -548,6 +834,11 @@ proxy-addr@~2.0.4:
forwarded "~0.1.2"
ipaddr.js "1.8.0"
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
pump@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954"
@@ -607,6 +898,20 @@ readable-stream@^2.0.6, readable-stream@^2.3.0, readable-stream@^2.3.5:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
rimraf@^2.2.8:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
dependencies:
glob "^7.1.3"
run-applescript@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-3.2.0.tgz#73fb34ce85d3de8076d511ea767c30d4fdfc918b"
integrity sha512-Ep0RsvAjnRcBX1p5vogbaBdAGu/8j/ewpvGqnQYunnLd9SM0vWcPJewPKNnWFggf0hF0pwIgwV5XK7qQ7UZ8Qg==
dependencies:
execa "^0.10.0"
safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, 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"
@@ -617,7 +922,7 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, s
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
semver@^5.4.1:
semver@^5.4.1, semver@^5.5.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
@@ -661,6 +966,18 @@ setprototypeof@1.1.0:
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
dependencies:
shebang-regex "^1.0.0"
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
signal-exit@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
@@ -680,6 +997,11 @@ simple-get@^2.7.0:
once "^1.3.1"
simple-concat "^1.0.0"
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
spdlog@^0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.7.2.tgz#9298753d7694b9ee9bbfd7e01ea1e4c6ace1e64d"
@@ -737,6 +1059,11 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
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"
@@ -775,6 +1102,21 @@ to-buffer@^1.1.1:
resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
trash@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/trash/-/trash-4.3.0.tgz#6ebeecdea4d666b06e389b47d135ea88e1de5075"
integrity sha512-f36TKwIaBiXm63xSrn8OTNghg5CYHBsFVJvcObMo76LRpgariuRi2CqXQHw1VzfeximD0igdGaonOG6N760BtQ==
dependencies:
escape-string-applescript "^2.0.0"
fs-extra "^0.30.0"
globby "^7.1.1"
p-map "^1.2.0"
p-try "^1.0.0"
pify "^3.0.0"
run-applescript "^3.0.0"
uuid "^3.1.0"
xdg-trashdir "^2.1.1"
ts-protoc-gen@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/ts-protoc-gen/-/ts-protoc-gen-0.8.0.tgz#2a9a31ee8a4d4760c484f1d0c7199633afaa5e3e"
@@ -807,6 +1149,13 @@ unpipe@1.0.0, unpipe@~1.0.0:
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
user-home@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8=
dependencies:
os-homedir "^1.0.0"
util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
@@ -817,6 +1166,11 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
uuid@^3.1.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
@@ -827,6 +1181,13 @@ which-pm-runs@^1.0.0:
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
which@^1.2.8, which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
dependencies:
isexe "^2.0.0"
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@@ -846,7 +1207,30 @@ ws@^6.1.2:
dependencies:
async-limiter "~1.0.0"
xdg-basedir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2"
integrity sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=
dependencies:
os-homedir "^1.0.0"
xdg-trashdir@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/xdg-trashdir/-/xdg-trashdir-2.1.1.tgz#59a60aaf8e6f9240c1daed9a0944b2f514c27d8e"
integrity sha512-KcVhPaOu2ZurYNHSRTf1+ZHORkTZGCQ+u0JHN17QixRISJq4pXOnjt/lQcehvtHL5QAKhSzKgyjrcNnPdkPBHA==
dependencies:
"@sindresorhus/df" "^2.1.0"
mount-point "^3.0.0"
pify "^2.2.0"
user-home "^2.0.0"
xdg-basedir "^2.0.0"
xtend@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=

View File

@@ -1,5 +1,5 @@
import * as cp from "child_process";
import { logger, Logger, field, time } from "@coder/logger";
import {field, Logger, logger, time} from "@coder/logger";
export interface CommandResult {
readonly exitCode: number;
@@ -9,7 +9,9 @@ export interface CommandResult {
const execute = (command: string, args: string[] = [], options: cp.SpawnOptions, logger: Logger): Promise<CommandResult> => {
let resolve: (result: CommandResult) => void;
const prom = new Promise<CommandResult>(res => resolve = res);
const prom = new Promise<CommandResult>((res): void => {
resolve = res;
});
const stdout: string[] = [];
const stderr: string[] = [];
@@ -40,10 +42,12 @@ const execute = (command: string, args: string[] = [], options: cp.SpawnOptions,
return prom;
};
export type TaskFunction = (runner: Runner) => void | Promise<void>;
// tslint:disable-next-line no-any
export type TaskFunction = (runner: Runner, ...args: any[]) => void | Promise<void>;
export interface Runner {
cwd: string;
execute(command: string, args?: string[], env?: object): Promise<CommandResult>;
}
@@ -90,12 +94,24 @@ export const run = (name: string = process.argv[2]): void | Promise<void> => {
cwd = path;
},
execute(command: string, args: string[] = [], env?: object): Promise<CommandResult> {
return execute(command, args, {
const prom = execute(command, args, {
cwd,
env: env as NodeJS.ProcessEnv,
}, log);
return prom.then((result: CommandResult) => {
if (result.exitCode != 0) {
log.error("failed",
field("exitCode", result.exitCode),
field("stdout", result.stdout),
field("stderr", result.stderr)
);
}
return result;
});
},
});
}, ...process.argv.slice(3));
if (prom) {
activated.set(name, prom);

View File

@@ -5,7 +5,7 @@
"files": [],
"scripts": {
"start": "node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts",
"build": "rm -rf ./out && cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
"build": "rm -rf ./out && ../../node_modules/.bin/cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
"build:nexe": "node scripts/nexe.js"
},
"dependencies": {
@@ -19,6 +19,7 @@
"node-netstat": "^1.6.0",
"pem": "^1.14.1",
"promise.prototype.finally": "^3.1.0",
"safe-compare": "^1.1.4",
"ws": "^6.1.2",
"xhr2": "^0.1.4"
},
@@ -26,10 +27,13 @@
"@types/express": "^4.16.0",
"@types/fs-extra": "^5.0.4",
"@types/mime-types": "^2.1.0",
"@types/opn": "^5.1.0",
"@types/pem": "^1.9.4",
"@types/safe-compare": "^1.1.0",
"@types/ws": "^6.0.1",
"fs-extra": "^7.0.1",
"nexe": "^2.0.0-rc.34",
"opn": "^5.4.0",
"string-replace-webpack-plugin": "^0.1.3",
"ts-node": "^7.0.1",
"tsconfig-paths": "^3.7.0",

View File

@@ -14,16 +14,17 @@ fs.writeFileSync(shimPath, shimContent);
const nexe = require("nexe");
const target = `${os.platform()}-${os.arch()}`;
nexe.compile({
debugBundle: true,
input: path.join(__dirname, "../out/cli.js"),
output: `cli-${process.env.TRAVIS_OS_NAME || os.platform()}`,
targets: [os.platform()],
output: `cli-${target}`,
targets: [target],
/**
* To include native extensions, do NOT install node_modules for each one. They
* are not required as each extension is built using webpack.
*/
resources: [
resources: [
path.join(__dirname, "../package.json"),
path.join(__dirname, "../build/**/*"),
],

View File

@@ -1,17 +1,20 @@
import { field, logger } from "@coder/logger";
import { ServerMessage, SharedProcessActiveMessage } from "@coder/protocol/src/proto";
import { Command, flags } from "@oclif/command";
import { fork, ForkOptions, ChildProcess } from "child_process";
import { ChildProcess, fork, ForkOptions, spawn } from "child_process";
import { randomFillSync } from "crypto";
import * as fs from "fs";
import * as fse from "fs-extra";
import * as os from "os";
import * as path from "path";
import * as WebSocket from "ws";
import { createApp } from "./server";
import { requireModule, requireFork, forkModule } from "./vscode/bootstrapFork";
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
import { setup as setupNativeModules } from "./modules";
import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants";
import { fillFs } from "./fill";
import { isCli, serveStatic, buildDir } from "./constants";
import { setup as setupNativeModules } from "./modules";
import { createApp } from "./server";
import { forkModule, requireFork, requireModule } from "./vscode/bootstrapFork";
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
import opn = require("opn");
export class Entry extends Command {
public static description = "Start your own self-hosted browser-accessible VS Code";
@@ -26,12 +29,12 @@ export class Entry extends Command {
version: flags.version({ char: "v" }),
"no-auth": flags.boolean({ default: false }),
"allow-http": flags.boolean({ default: false }),
password: flags.string(),
// Dev flags
"bootstrap-fork": flags.string({ hidden: true }),
"fork": flags.string({ hidden: true }),
env: flags.string({ hidden: true }),
args: flags.string({ hidden: true }),
};
public static args = [{
@@ -46,11 +49,25 @@ export class Entry extends Command {
}
const { args, flags } = this.parse(Entry);
const dataDir = flags["data-dir"] || path.join(os.homedir(), ".code-server");
const workingDir = args["workdir"];
const dataDir = path.resolve(flags["data-dir"] || path.join(dataHome, "code-server"));
const workingDir = path.resolve(args["workdir"]);
if (!fs.existsSync(dataDir)) {
const oldDataDir = path.resolve(path.join(os.homedir(), ".code-server"));
if (fs.existsSync(oldDataDir)) {
await fse.move(oldDataDir, dataDir);
logger.info(`Moved data directory from ${oldDataDir} to ${dataDir}`);
}
}
await Promise.all([
fse.mkdirp(cacheHome),
fse.mkdirp(dataDir),
fse.mkdirp(workingDir),
]);
setupNativeModules(dataDir);
const builtInExtensionsDir = path.join(buildDir || path.join(__dirname, ".."), "build/extensions");
const builtInExtensionsDir = path.resolve(buildDir || path.join(__dirname, ".."), "build/extensions");
if (flags["bootstrap-fork"]) {
const modulePath = flags["bootstrap-fork"];
if (!modulePath) {
@@ -58,7 +75,6 @@ export class Entry extends Command {
process.exit(1);
}
Object.assign(process.env, flags.env ? JSON.parse(flags.env) : {});
((flags.args ? JSON.parse(flags.args) : []) as string[]).forEach((arg, i) => {
// [0] contains the binary running the script (`node` for example) and
// [1] contains the script name, so the arguments come after that.
@@ -74,15 +90,11 @@ export class Entry extends Command {
return requireFork(modulePath, JSON.parse(flags.args!), builtInExtensionsDir);
}
if (!fs.existsSync(dataDir)) {
fs.mkdirSync(dataDir);
}
const logDir = path.join(dataDir, "logs", new Date().toISOString().replace(/[-:.TZ]/g, ""));
const logDir = path.join(cacheHome, "code-server/logs", new Date().toISOString().replace(/[-:.TZ]/g, ""));
process.env.VSCODE_LOGS = logDir;
const certPath = flags.cert;
const certKeyPath = flags["cert-key"];
const certPath = flags.cert ? path.resolve(flags.cert) : undefined;
const certKeyPath = flags["cert-key"] ? path.resolve(flags["cert-key"]) : undefined;
if (certPath && !certKeyPath) {
logger.error("'--cert-key' flag is required when specifying a certificate!");
@@ -113,7 +125,7 @@ export class Entry extends Command {
}
}
logger.info("\u001B[1mcode-server v1.0.0");
logger.info(`\u001B[1mcode-server ${process.env.VERSION ? `v${process.env.VERSION}` : "development"}`);
// TODO: fill in appropriate doc url
logger.info("Additional documentation: http://github.com/codercom/code-server");
logger.info("Initializing", field("data-dir", dataDir), field("working-dir", workingDir), field("log-dir", logDir));
@@ -132,13 +144,13 @@ export class Entry extends Command {
}
});
const passwordLength = 12;
const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const chars = [];
for (let i = 0; i < passwordLength; i++) {
chars.push(possible[Math.floor(Math.random() * possible.length)]);
let password = flags.password;
if (!password) {
// Generate a random password with a length of 24.
const buffer = Buffer.alloc(12);
randomFillSync(buffer);
password = buffer.toString("hex");
}
const password = chars.join("");
const hasCustomHttps = certData && certKeyData;
const app = await createApp({
@@ -155,7 +167,7 @@ export class Entry extends Command {
// If we're not running from the binary and we aren't serving the static
// pre-built version, use webpack to serve the web files.
if (!isCli && !serveStatic) {
const webpackConfig = require(path.join(__dirname, "..", "..", "web", "webpack.config.js"));
const webpackConfig = require(path.resolve(__dirname, "..", "..", "web", "webpack.config.js"));
const compiler = require("webpack")(webpackConfig);
app.use(require("webpack-dev-middleware")(compiler, {
logger,
@@ -169,12 +181,20 @@ export class Entry extends Command {
builtInExtensionsDirectory: builtInExtensionsDir,
dataDirectory: dataDir,
workingDirectory: workingDir,
cacheDirectory: cacheHome,
fork: (modulePath: string, args: string[], options: ForkOptions): ChildProcess => {
if (options && options.env && options.env.AMD_ENTRYPOINT) {
return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir);
}
return fork(modulePath, args, options);
if (isCli) {
return spawn(process.execPath, ["--fork", modulePath, "--args", JSON.stringify(args), "--data-dir", dataDir], {
...options,
stdio: [null, null, null, "ipc"],
});
} else {
return fork(modulePath, args, options);
}
},
},
password,
@@ -184,11 +204,6 @@ export class Entry extends Command {
} : undefined,
});
if (!fs.existsSync(workingDir)) {
logger.info("Creating working directory", field("working-dir", workingDir));
fs.mkdirSync(workingDir);
}
logger.info("Starting webserver...", field("host", flags.host), field("port", flags.port));
app.server.listen(flags.port, flags.host);
let clientId = 1;
@@ -218,14 +233,25 @@ export class Entry extends Command {
} else {
logger.warn("Launched without authentication.");
}
const url = `http://localhost:${flags.port}/`;
logger.info(" ");
logger.info("Started (click the link below to open):");
logger.info(`http://localhost:${flags.port}/`);
logger.info(url);
logger.info(" ");
if (flags.open) {
try {
await opn(url);
} catch (e) {
logger.warn("Url couldn't be opened automatically.", field("url", url), field("exception", e));
}
}
}
}
Entry.run(undefined, {
root: buildDir || __dirname,
version: process.env.VERSION || "development",
//@ts-ignore
}).catch(require("@oclif/errors/handle"));

View File

@@ -1,3 +1,11 @@
import * as path from "path";
import * as os from "os";
export const isCli = typeof process.env.CLI !== "undefined" && process.env.CLI !== "false";
export const serveStatic = typeof process.env.SERVE_STATIC !== "undefined" && process.env.SERVE_STATIC !== "false";
export const buildDir = process.env.BUILD_DIR;
export const buildDir = process.env.BUILD_DIR ? path.resolve(process.env.BUILD_DIR) : "";
const xdgResolve = (primary: string | undefined, fallback: string): string => {
return primary ? path.resolve(primary) : path.resolve(process.env.HOME || os.homedir(), fallback);
};
export const dataHome = xdgResolve(process.env.XDG_DATA_HOME, ".local/share");
export const cacheHome = xdgResolve(process.env.XDG_CACHE_HOME, ".cache");

View File

@@ -3,8 +3,6 @@ import * as path from "path";
import * as os from "os";
import { isCli, buildDir } from "./constants";
declare var __non_webpack_require__: typeof require;
/**
* Handling of native modules within the CLI
*/
@@ -27,10 +25,9 @@ export const setup = (dataDirectory: string): void => {
const diskFile = path.join(dataDirectory, "dependencies", moduleName);
if (!fs.existsSync(diskFile)) {
fs.writeFileSync(diskFile, fs.readFileSync(memFile));
if (markExecutable) {
fs.chmodSync(diskFile, "755");
}
}
if (markExecutable) {
fs.chmodSync(diskFile, "755");
}
};

View File

@@ -1,3 +1,4 @@
import { mkdirp } from "fs-extra";
import { logger, field } from "@coder/logger";
import { ReadWriteConnection } from "@coder/protocol";
import { Server, ServerOptions } from "@coder/protocol/src/node/server";
@@ -16,10 +17,11 @@ import * as path from "path";
import * as pem from "pem";
import * as util from "util";
import * as ws from "ws";
import safeCompare = require("safe-compare");
import { TunnelCloseCode } from "@coder/tunnel/src/common";
import { handle as handleTunnel } from "@coder/tunnel/src/server";
import { createPortScanner } from "./portScanner";
import { buildDir, isCli } from "./constants";
import { buildDir } from "./constants";
interface CreateAppOptions {
registerMiddleware?: (app: express.Application) => void;
@@ -67,7 +69,7 @@ export const createApp = async (options: CreateAppOptions): Promise<{
// Try/catch placed here just in case
const cookies = parseCookies(req);
if (cookies.password && cookies.password === options.password) {
if (cookies.password && safeCompare(cookies.password, options.password)) {
return true;
}
} catch (ex) {
@@ -256,8 +258,9 @@ export const createApp = async (options: CreateAppOptions): Promise<{
req.on("data", (chunk) => {
data.push(chunk);
});
req.on("end", () => {
req.on("end", async () => {
const body = data.join("");
await mkdirp(path.dirname(fullPath));
fs.writeFileSync(fullPath, body);
logger.debug("Wrote resource", field("path", fullPath), field("content-length", body.length));
res.status(200);

View File

@@ -46,12 +46,13 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
const Module = require("module") as typeof import("module");
const oldRequire = Module.prototype.require;
// tslint:disable-next-line:no-any
Module.prototype.require = (id: string): any => {
Module.prototype.require = function (id: string): any {
if (id === "typescript") {
return require("typescript");
}
return oldRequire(id);
// tslint:disable-next-line:no-any
return oldRequire.call(this, id as any);
};
if (!process.send) {
@@ -59,7 +60,6 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
}
process.argv = ["", "", ...args];
requireFilesystemModule(modulePath, builtInExtensionsDir);
if (ipcMsgBuffer && ipcMsgListener) {
@@ -125,21 +125,21 @@ export const requireModule = (modulePath: string, dataDir: string, builtInExtens
*/
export const forkModule = (modulePath: string, args: string[], options: cp.ForkOptions, dataDir?: string): cp.ChildProcess => {
let proc: cp.ChildProcess;
const forkOptions: cp.ForkOptions = {
stdio: [null, null, null, "ipc"],
};
if (options.env) {
// This prevents vscode from trying to load original-fs from electron.
delete options.env.ELECTRON_RUN_AS_NODE;
forkOptions.env = options.env;
}
const forkArgs = ["--bootstrap-fork", modulePath];
if (args) {
forkArgs.push("--args", JSON.stringify(args));
}
if (options.env) {
// This prevents vscode from trying to load original-fs from electron.
delete options.env.ELECTRON_RUN_AS_NODE;
forkArgs.push("--env", JSON.stringify(options.env));
}
if (dataDir) {
forkArgs.push("--data-dir", dataDir);
}
const forkOptions: cp.ForkOptions = {
stdio: [null, null, null, "ipc"],
};
if (isCli) {
proc = cp.spawn(process.execPath, forkArgs, forkOptions);
} else {

View File

@@ -24,10 +24,10 @@ module.exports = merge(
},
resolve: {
alias: {
"node-pty": "node-pty-prebuilt",
"node-pty": "node-pty-prebuilt",
},
},
externals: ["tslib", "trash"],
externals: ["tslib"],
entry: "./packages/server/src/cli.ts",
plugins: [
new webpack.DefinePlugin({

View File

@@ -129,6 +129,13 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
"@types/opn@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@types/opn/-/opn-5.1.0.tgz#bff7bc371677f4bdbb37884400e03fd81f743927"
integrity sha512-TNPrB7Y1xl06zDI0aGyqkgxjhIev3oJ+cdqlZ52MTAHauWpEL/gIUdHebIfRHFZk9IqSBpE2ci1DT48iZH81yg==
dependencies:
"@types/node" "*"
"@types/pem@^1.9.4":
version "1.9.4"
resolved "https://registry.yarnpkg.com/@types/pem/-/pem-1.9.4.tgz#9ef9302dc5f0352503e193003b208cddef4ffa45"
@@ -141,6 +148,11 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
"@types/safe-compare@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@types/safe-compare/-/safe-compare-1.1.0.tgz#47ed9b9ca51a3a791b431cd59b28f47fa9bf1224"
integrity sha512-1ri+LJhh0gRxIa37IpGytdaW7yDEHeJniBSMD1BmitS07R1j63brcYCzry+l0WJvGdEKQNQ7DYXO2epgborWPw==
"@types/serve-static@*":
version "1.13.2"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.2.tgz#f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48"
@@ -2668,6 +2680,13 @@ onetime@^2.0.0:
dependencies:
mimic-fn "^1.0.0"
opn@^5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==
dependencies:
is-wsl "^1.1.0"
optionator@^0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
@@ -3141,6 +3160,13 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, s
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
safe-compare@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/safe-compare/-/safe-compare-1.1.4.tgz#5e0128538a82820e2e9250cd78e45da6786ba593"
integrity sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ==
dependencies:
buffer-alloc "^1.2.0"
safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"

View File

@@ -3,7 +3,7 @@
"description": "VS Code implementation of the browser-based IDE client.",
"main": "src/index.ts",
"scripts": {
"build:bootstrap-fork": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
"build:bootstrap-fork": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
},
"dependencies": {
"iconv-lite": "^0.4.24",

View File

@@ -4,9 +4,14 @@ import Severity from "vs/base/common/severity";
import { INotificationService } from "vs/platform/notification/common/notification";
import { IStatusbarService, StatusbarAlignment } from "vs/platform/statusbar/common/statusbar";
import * as paths from "./fill/paths";
import product from "./fill/product";
import "./vscode.scss";
import { MenuId, MenuRegistry } from "vs/platform/actions/common/actions";
import { CommandsRegistry } from "vs/platform/commands/common/commands";
import { IFileService, FileOperation } from "vs/platform/files/common/files";
import { ITextFileService } from "vs/workbench/services/textfile/common/textfiles";
import { IModelService } from "vs/editor/common/services/modelService";
import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal";
// NOTE: shouldn't import anything from VS Code here or anything that will
// depend on a synchronous fill like `os`.
@@ -14,6 +19,7 @@ class VSClient extends IdeClient {
protected initialize(): Promise<void> {
return this.task("Start workbench", 1000, async (data, sharedData) => {
paths._paths.initialize(data, sharedData);
product.initialize(data);
process.env.SHELL = data.shell;
// At this point everything should be filled, including `os`. `os` also
// relies on `initData` but it listens first so it initialize before this
@@ -32,6 +38,63 @@ class VSClient extends IdeClient {
// tslint:disable-next-line:no-any
statusbarService: getService<IStatusbarService>(IStatusbarService) as any,
notificationService: getService<INotificationService>(INotificationService),
onFileCreate: (cb): void => {
getService<IFileService>(IFileService).onAfterOperation((e) => {
if (e.operation === FileOperation.CREATE) {
cb(e.resource.path);
}
});
},
onFileMove: (cb): void => {
getService<IFileService>(IFileService).onAfterOperation((e) => {
if (e.operation === FileOperation.MOVE) {
cb(e.resource.path, e.target ? e.target.resource.path : undefined!);
}
});
},
onFileDelete: (cb): void => {
getService<IFileService>(IFileService).onAfterOperation((e) => {
if (e.operation === FileOperation.DELETE) {
cb(e.resource.path);
}
});
},
onFileSaved: (cb): void => {
getService<ITextFileService>(ITextFileService).models.onModelSaved((e) => {
cb(e.resource.path);
});
},
onFileCopy: (cb): void => {
getService<IFileService>(IFileService).onAfterOperation((e) => {
if (e.operation === FileOperation.COPY) {
cb(e.resource.path, e.target ? e.target.resource.path : undefined!);
}
});
},
onModelAdded: (cb): void => {
getService<IModelService>(IModelService).onModelAdded((e) => {
cb(e.uri.path, e.getLanguageIdentifier().language);
});
},
onModelRemoved: (cb): void => {
getService<IModelService>(IModelService).onModelRemoved((e) => {
cb(e.uri.path, e.getLanguageIdentifier().language);
});
},
onModelLanguageChange: (cb): void => {
getService<IModelService>(IModelService).onModelModeChanged((e) => {
cb(e.model.uri.path, e.model.getLanguageIdentifier().language, e.oldModeId);
});
},
onTerminalAdded: (cb): void => {
getService<ITerminalService>(ITerminalService).onInstanceCreated(() => cb());
},
onTerminalRemoved: (cb): void => {
getService<ITerminalService>(ITerminalService).onInstanceDisposed(() => cb());
},
},
// @ts-ignore

View File

@@ -28,17 +28,14 @@
font-weight: normal;
text-transform: uppercase;
white-space: nowrap;
padding-left: 10px;
padding: 5px 10px;
}
.nav {
display: flex;
flex-direction: row;
padding: 4px;
padding-top: 8px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border);
min-height: 32px;
}
.path {
@@ -48,7 +45,7 @@
.path-part {
padding: 5px;
border-radius: 3px;
font-size: 1.2em;
font-size: 1.02em;
cursor: pointer;
&:not(:first-child) {
@@ -80,7 +77,7 @@
.dialog-entry {
cursor: pointer;
font-size: 1.2em;
font-size: 1.02em;
padding: 0px;
padding-left: 8px;
padding-right: 8px;

View File

@@ -110,7 +110,7 @@ class Dialog {
this.root.style.width = "850px";
this.root.style.height = "600px";
this.background.appendChild(this.root);
document.body.appendChild(this.background);
(document.getElementById("workbench.main.container") || document.body).appendChild(this.background);
this.root.classList.add("dialog");
const setProperty = (vari: string, id: string): void => {

View File

@@ -1,3 +1,4 @@
import * as path from "path";
import * as paths from "./paths";
import * as environment from "vs/platform/environment/node/environmentService";
@@ -5,6 +6,10 @@ export class EnvironmentService extends environment.EnvironmentService {
public get sharedIPCHandle(): string {
return paths.getSocketPath() || super.sharedIPCHandle;
}
public get extensionsPath(): string {
return path.join(paths.getAppDataPath(), "extensions");
}
}
const target = environment as typeof environment;

View File

@@ -1 +1,3 @@
export const gracefulify = (): void => undefined;
export * from "fs";

View File

@@ -1,10 +1,11 @@
import * as labels from "vs/base/common/labels";
// Here we simply disable translation of mnemonics and leave everything as &&.
// Since we're in the browser, we can handle all platforms in the same way.
// Disable all mnemonics for now until we implement it.
const target = labels as typeof labels;
target.mnemonicMenuLabel = (label: string, forceDisable?: boolean): string => {
return forceDisable ? label.replace(/\(&&\w\)|&&/g, "") : label;
return label.replace(/\(&&\w\)|&&/g, "");
};
target.mnemonicButtonLabel = (label: string): string => {
return label.replace(/\(&&\w\)|&&/g, "");
};
target.mnemonicButtonLabel = (label: string): string => { return label; };
target.unmnemonicLabel = (label: string): string => { return label; };

View File

@@ -1,9 +1,9 @@
import * as nls from "vs/nls";
import { Action } from "vs/base/common/actions";
import { TERMINAL_COMMAND_ID } from "vs/workbench/parts/terminal/common/terminalCommands";
import { ITerminalService } from "vs/workbench/parts/terminal/common/terminal";
import * as actions from "vs/workbench/parts/terminal/electron-browser/terminalActions";
import * as instance from "vs/workbench/parts/terminal/electron-browser/terminalInstance";
import { TERMINAL_COMMAND_ID } from "vs/workbench/contrib/terminal/common/terminalCommands";
import { ITerminalService } from "vs/workbench/contrib/terminal/common/terminal";
import * as actions from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
import * as instance from "vs/workbench/contrib/terminal/electron-browser/terminalInstance";
import { client } from "../client";
const getLabel = (key: string, enabled: boolean): string => {

View File

@@ -1,26 +1,37 @@
import { IProductConfiguration } from "vs/platform/node/product";
import { InitData } from "@coder/protocol";
import { IProductConfiguration } from "vs/platform/product/node/product";
const product = {
nameShort: "code-server",
nameLong: "code-server",
dataFolderName: ".code-server",
extensionsGallery: {
class Product implements IProductConfiguration {
public nameShort = "code-server";
public nameLong = "code-server";
private _dataFolderName: string | undefined;
public get dataFolderName(): string {
if (!this._dataFolderName) {
throw new Error("trying to access data folder name before it has been set");
}
return this._dataFolderName;
}
public extensionsGallery = {
serviceUrl: global && global.process && global.process.env.SERVICE_URL
|| process.env.SERVICE_URL
|| "https://v1.extapi.coder.com",
},
extensionExecutionEnvironments: {
};
public extensionExecutionEnvironments = {
"wayou.vscode-todo-highlight": "worker",
"vscodevim.vim": "worker",
"coenraads.bracket-pair-colorizer": "worker",
},
fetchUrl: "",
} as IProductConfiguration;
};
if (process.env['VSCODE_DEV']) {
product.nameShort += ' Dev';
product.nameLong += ' Dev';
product.dataFolderName += '-dev';
public fetchUrl = "";
public initialize(_data: InitData): void {
// Nothing at the moment; dataFolderName isn't used since we override the
// extension path.
}
}
export default product;
export default new Product();

View File

@@ -1,4 +1,5 @@
import { readFile, writeFile, mkdir } from "fs";
import { readFile, writeFile } from "fs";
import { mkdirp } from "fs-extra";
import * as path from "path";
import { promisify } from "util";
import { IDisposable } from "@coder/disposable";
@@ -77,9 +78,7 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
}
private async save(): Promise<void> {
try {
await promisify(mkdir)(path.dirname(this.path));
} catch (ex) {}
await mkdirp(path.dirname(this.path));
return promisify(writeFile)(this.path, this.content);
}

View File

@@ -5,8 +5,8 @@ import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/action
import { SyncActionDescriptor } from "vs/platform/actions/common/actions";
import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey";
import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/developerActions";
import { TerminalPasteAction } from "vs/workbench/parts/terminal/electron-browser/terminalActions";
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/parts/terminal/common/terminal";
import { TerminalPasteAction } from "vs/workbench/contrib/terminal/electron-browser/terminalActions";
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/contrib/terminal/common/terminal";
import { KeyCode, KeyMod } from "vs/base/common/keyCodes";
import { workbench } from "../workbench";

View File

@@ -58,7 +58,7 @@ export function zip(tarPath: string, files: IFile[]): Promise<string> {
});
}
export async function extract(tarPath: string, targetPath: string, options: IExtractOptions = {}, logService: ILogService, token: CancellationToken): Promise<void> {
export async function extract(tarPath: string, targetPath: string, options: IExtractOptions = {}, token: CancellationToken): Promise<void> {
const sourcePathRegex = new RegExp(options.sourcePath ? `^${options.sourcePath}` : '');
return new Promise<void>(async (c, e) => {

View File

@@ -17,8 +17,8 @@ import "./fill/workspacesService";
import * as paths from "./fill/paths";
import { PasteAction } from "./fill/paste";
import { ExplorerItem, ExplorerModel } from "vs/workbench/parts/files/common/explorerModel";
import { IEditorGroup } from "vs/workbench/services/group/common/editorGroupsService";
import { ExplorerItem, ExplorerModel } from "vs/workbench/contrib/files/common/explorerModel";
import { IEditorGroup } from "vs/workbench/services/editor/common/editorGroupsService";
import { IEditorService, IResourceEditor } from "vs/workbench/services/editor/common/editorService";
import { INotificationService } from "vs/platform/notification/common/notification";
import { IProgressService2, ProgressLocation } from "vs/platform/progress/common/progress";
@@ -171,7 +171,7 @@ export class Workbench {
// If we try to import this above, workbench will be undefined due to
// circular imports.
require("vs/workbench/workbench.main");
const { startup } = require("vs/workbench/electron-browser/main");
const { main } = require("vs/workbench/electron-browser/main");
const config: IWindowConfiguration = {
machineId: "1",
windowId: this.windowId,
@@ -189,7 +189,7 @@ export class Workbench {
} else {
config.folderUri = workspace as URI;
}
await startup(config);
await main(config);
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
const bounded = this.clipboardContextKey.bindTo(contextKeys);
client.clipboard.onPermissionChange((enabled) => {

View File

@@ -8,7 +8,7 @@ const vsFills = path.join(root, "packages/vscode/src/fill");
module.exports = merge(
require(path.join(root, "scripts/webpack.node.config.js"))({
typescriptCompilerOptions: {
target: "es5",
target: "es6",
},
}), {
entry: path.join(root, "lib/vscode/src/bootstrap-fork.js"),
@@ -36,7 +36,7 @@ module.exports = merge(
loader: "ignore-loader",
}],
}, {
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|(\.(test\.ts|test\.js|d\.ts|qwoff|node|html|txt|exe|wuff|md|sh|scpt|less)$)/,
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|\/browser\//,
use: [{
loader: "ignore-loader",
}],
@@ -49,6 +49,8 @@ module.exports = merge(
"node-pty": path.resolve(fills, "empty.ts"),
"windows-mutex": path.resolve(fills, "empty.ts"),
"windows-process-tree": path.resolve(fills, "empty.ts"),
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
"vscode-sqlite3": path.resolve(fills, "empty.ts"),
"vs/base/browser/browser": path.resolve(fills, "empty.ts"),
"electron": path.join(vsFills, "stdioElectron.ts"),
@@ -57,9 +59,9 @@ module.exports = merge(
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
"vs/base/common/amd": path.resolve(vsFills, "amd.ts"),
"vs/base/node/paths": path.resolve(vsFills, "paths.ts"),
"vs/platform/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/node/product": path.resolve(vsFills, "product.ts"),
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
"vs": path.resolve(root, "lib/vscode/src/vs"),
},
},

View File

@@ -1,6 +1,6 @@
{
"name": "@coder/web",
"scripts": {
"build": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
"build": "../../node_modules/.bin/cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
}
}
}

View File

@@ -32,6 +32,7 @@ module.exports = merge(
"selenium-webdriver": path.join(fills, "empty.ts"),
"vscode": path.join(fills, "empty.ts"),
"vscode-fsevents": path.join(fills, "empty.ts"),
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
"vsda": path.join(fills, "empty.ts"),
"windows-foreground-love": path.join(fills, "empty.ts"),
"windows-mutex": path.join(fills, "empty.ts"),
@@ -66,11 +67,14 @@ module.exports = merge(
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
"iconv-lite": path.join(vsFills, "iconv-lite.ts"),
// This seems to be in the wrong place?
"vs/workbench/contrib/codeEditor/electron-browser/media/WordWrap_16x.svg": "vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/WordWrap_16x.svg",
"vs/base/node/paths": path.join(vsFills, "paths.ts"),
"vs/base/common/amd": path.join(vsFills, "amd.ts"),
"vs/platform/node/product": path.join(vsFills, "product.ts"),
"vs/platform/node/package": path.join(vsFills, "package.ts"),
"vs/platform/node/zip": path.resolve(vsFills, "zip.ts"),
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
"vs": path.join(root, "lib", "vscode", "src", "vs"),
},
},

View File

@@ -1,5 +1,4 @@
#!/bin/bash
set -e
npm install -g cross-env
yarn task build:server:binary

View File

@@ -41,10 +41,7 @@ const handlePackages = async (dir: string): Promise<void> => {
const pkgDir = join(dir, pkg);
const pkgJsonPath = join(pkgDir, "package.json");
if (existsSync(pkgJsonPath)) {
const ip = doInstall(pkg, pkgDir);
if (os.platform() === "win32") {
await ip;
}
const ip = await doInstall(pkg, pkgDir);
}
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -7,11 +7,11 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
// const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const root = path.join(__dirname, "..");
const prod = process.env.NODE_ENV === "production";
const prod = process.env.NODE_ENV === "production" || process.env.CI === "true";
module.exports = (options = {}) => merge(
require("./webpack.general.config")(options), {
devtool: prod ? "source-map" : "cheap-module-eval-source-map",
devtool: prod ? "none" : "cheap-module-eval-source-map",
mode: prod ? "production" : "development",
entry: prod ? options.entry : [
"webpack-hot-middleware/client?reload=true&quiet=true",

View File

@@ -105,7 +105,7 @@ module.exports = (options = {}) => ({
plugins: [
new HappyPack({
id: "ts",
threads: os.cpus().length - 1,
threads: Math.max(os.cpus().length - 1, 1),
loaders: [{
path: "ts-loader",
query: {
@@ -118,6 +118,7 @@ module.exports = (options = {}) => ({
"process.env.NODE_ENV": `"${environment}"`,
"process.env.LOG_LEVEL": `"${process.env.LOG_LEVEL || ""}"`,
"process.env.SERVICE_URL": `"${process.env.SERVICE_URL || ""}"`,
"process.env.VERSION": `"${process.env.VERSION || ""}"`,
}),
],
stats: {

177
yarn.lock
View File

@@ -2,18 +2,6 @@
# yarn lockfile v1
"@sindresorhus/df@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d"
integrity sha1-xptm9S9vzdKHyAffIQMF2694UA0=
"@sindresorhus/df@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-2.1.0.tgz#d208cf27e06f0bb476d14d7deccd7d726e9aa389"
integrity sha1-0gjPJ+BvC7R20U197M19cm6ao4k=
dependencies:
execa "^0.2.2"
"@types/fs-extra@^5.0.4":
version "5.0.5"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.5.tgz#080d90a792f3fa2c5559eb44bd8ef840aae9104b"
@@ -1081,14 +1069,6 @@ cross-env@^5.2.0:
cross-spawn "^6.0.5"
is-windows "^1.0.0"
cross-spawn-async@^2.1.1:
version "2.2.5"
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
integrity sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=
dependencies:
lru-cache "^4.0.0"
which "^1.2.8"
cross-spawn@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
@@ -1360,13 +1340,6 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0"
randombytes "^2.0.0"
dir-glob@^2.0.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
dependencies:
path-type "^3.0.0"
dns-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
@@ -1556,11 +1529,6 @@ escape-html@~1.0.3:
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-applescript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-applescript/-/escape-string-applescript-2.0.0.tgz#760bca838668e408fe5ee52ce42caf7cb46c5273"
integrity sha1-dgvKg4Zo5Aj+XuUs5CyvfLRsUnM=
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -1639,17 +1607,6 @@ execa@^0.10.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
execa@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.2.2.tgz#e2ead472c2c31aad6f73f1ac956eef45e12320cb"
integrity sha1-4urUcsLDGq1vc/GslW7vReEjIMs=
dependencies:
cross-spawn-async "^2.1.1"
npm-run-path "^1.0.0"
object-assign "^4.0.1"
path-key "^1.0.0"
strip-eof "^1.0.0"
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
@@ -1950,17 +1907,6 @@ from2@^2.1.0:
inherits "^2.0.1"
readable-stream "^2.0.0"
fs-extra@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
@@ -2126,18 +2072,6 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA=
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
globule@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
@@ -2147,7 +2081,7 @@ globule@^1.0.0:
lodash "~4.17.10"
minimatch "~3.0.2"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
@@ -2455,11 +2389,6 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"
ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
import-local@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
@@ -2855,13 +2784,6 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug=
optionalDependencies:
graceful-fs "^4.1.6"
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
@@ -2913,13 +2835,6 @@ kind-of@^6.0.0, kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk=
optionalDependencies:
graceful-fs "^4.1.9"
lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
@@ -3049,7 +2964,7 @@ lower-case@^1.1.1:
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
lru-cache@^4.0.0, lru-cache@^4.0.1:
lru-cache@^4.0.1:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
@@ -3319,15 +3234,6 @@ moment@^2.22.1:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225"
integrity sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA==
mount-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mount-point/-/mount-point-3.0.0.tgz#665cb9edebe80d110e658db56c31d0aef51a8f97"
integrity sha1-Zly57evoDREOZY21bDHQrvUaj5c=
dependencies:
"@sindresorhus/df" "^1.0.1"
pify "^2.3.0"
pinkie-promise "^2.0.1"
move-concurrently@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
@@ -3574,13 +3480,6 @@ npm-run-all@^4.1.5:
shell-quote "^1.6.1"
string.prototype.padend "^3.0.0"
npm-run-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f"
integrity sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=
dependencies:
path-key "^1.0.0"
npm-run-path@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@@ -3767,16 +3666,11 @@ p-locate@^3.0.0:
dependencies:
p-limit "^2.0.0"
p-map@^1.1.1, p-map@^1.2.0:
p-map@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
p-try@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
@@ -3881,11 +3775,6 @@ path-is-inside@^1.0.1:
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=
path-key@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-1.0.0.tgz#5d53d578019646c0d68800db4e146e6bdc2ac7af"
integrity sha1-XVPVeAGWRsDWiADbThRua9wqx68=
path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
@@ -3938,7 +3827,7 @@ pidtree@^0.3.0:
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b"
integrity sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==
pify@^2.0.0, pify@^2.2.0, pify@^2.3.0:
pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
@@ -3948,7 +3837,7 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
pinkie-promise@^2.0.0, pinkie-promise@^2.0.1:
pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
@@ -4433,13 +4322,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"
run-applescript@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-3.2.0.tgz#73fb34ce85d3de8076d511ea767c30d4fdfc918b"
integrity sha512-Ep0RsvAjnRcBX1p5vogbaBdAGu/8j/ewpvGqnQYunnLd9SM0vWcPJewPKNnWFggf0hF0pwIgwV5XK7qQ7UZ8Qg==
dependencies:
execa "^0.10.0"
run-queue@^1.0.0, run-queue@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47"
@@ -4669,11 +4551,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
snapdragon-node@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
@@ -5146,21 +5023,6 @@ tough-cookie@~2.4.3:
psl "^1.1.24"
punycode "^1.4.1"
trash@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/trash/-/trash-4.3.0.tgz#6ebeecdea4d666b06e389b47d135ea88e1de5075"
integrity sha512-f36TKwIaBiXm63xSrn8OTNghg5CYHBsFVJvcObMo76LRpgariuRi2CqXQHw1VzfeximD0igdGaonOG6N760BtQ==
dependencies:
escape-string-applescript "^2.0.0"
fs-extra "^0.30.0"
globby "^7.1.1"
p-map "^1.2.0"
p-try "^1.0.0"
pify "^3.0.0"
run-applescript "^3.0.0"
uuid "^3.1.0"
xdg-trashdir "^2.1.1"
trim-newlines@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
@@ -5395,13 +5257,6 @@ use@^3.1.0:
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
user-home@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8=
dependencies:
os-homedir "^1.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"
@@ -5439,7 +5294,7 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2:
uuid@^3.0.1, uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
@@ -5704,7 +5559,7 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
which@1, which@^1.2.14, which@^1.2.8, which@^1.2.9:
which@1, which@^1.2.14, which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
@@ -5767,24 +5622,6 @@ ws@^6.0.0:
dependencies:
async-limiter "~1.0.0"
xdg-basedir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2"
integrity sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=
dependencies:
os-homedir "^1.0.0"
xdg-trashdir@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/xdg-trashdir/-/xdg-trashdir-2.1.1.tgz#59a60aaf8e6f9240c1daed9a0944b2f514c27d8e"
integrity sha512-KcVhPaOu2ZurYNHSRTf1+ZHORkTZGCQ+u0JHN17QixRISJq4pXOnjt/lQcehvtHL5QAKhSzKgyjrcNnPdkPBHA==
dependencies:
"@sindresorhus/df" "^2.1.0"
mount-point "^3.0.0"
pify "^2.2.0"
user-home "^2.0.0"
xdg-basedir "^2.0.0"
xregexp@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"