Compare commits

..

3 Commits

Author SHA1 Message Date
G r e y
f621a74062 Simplify HttpError
This change is cosmetic

* Remove public keyword - public by default
* Remove details - this was unused throughout the entire codebase
2020-08-08 21:55:35 -05:00
G r e y
c78d164948 Fix nfpm typo (#1943) 2020-08-05 12:48:41 -04:00
Anmol Sethi
4dd2c86cca FAQ: Demonstrate how to switch the marketplace 2020-08-04 10:11:55 -04:00
9 changed files with 24 additions and 26 deletions

View File

@@ -1,11 +0,0 @@
[Unit]
Description=code-server
After=network.target
[Service]
Type=exec
ExecStart=/usr/bin/code-server
Restart=always
[Install]
WantedBy=default.target

View File

@@ -6,7 +6,6 @@ After=network.target
Type=exec
ExecStart=/usr/bin/code-server
Restart=always
User=%i
[Install]
WantedBy=default.target

View File

@@ -12,6 +12,5 @@ homepage: "https://github.com/cdr/code-server"
license: "MIT"
files:
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
./ci/build/code-server.service: /usr/lib/systemd/system/code-server.service
./ci/build/code-server-user.service: /usr/lib/systemd/user/code-server.service
./ci/build/code-server.service: /usr/lib/systemd/user/code-server.service
./release-standalone/**/*: "/usr/lib/code-server/"

View File

@@ -19,7 +19,7 @@ Please refer to [VS Code's prerequisites](https://github.com/Microsoft/vscode/wi
Differences:
- We require a minimum of node v12 but later versions should work.
- We use [fnpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
- We use [nfpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
- We use [jq](https://stedolan.github.io/jq/) to build code-server releases.
- The [CI container](../ci/images/debian8/Dockerfile) is a useful reference for all our dependencies.

View File

@@ -86,9 +86,20 @@ If you have your own marketplace that implements the VS Code Extension Gallery A
point code-server to it by setting `$SERVICE_URL` and `$ITEM_URL`. These correspond directly
to `serviceUrl` and `itemUrl` in VS Code's `product.json`.
e.g. to use [open-vsx.org](https://open-vsx.org):
```bash
export SERVICE_URL=https://open-vsx.org/vscode/gallery
export ITEM_URL=https://open-vsx.org/vscode/item
```
While you can technically use Microsoft's marketplace with these, please do not do so as it
is against their terms of use. See [above](#differences-compared-to-vs-code). These variables
are most valuable to our enterprise customers for whom we have a self hosted marketplace product.
is against their terms of use. See [above](#differences-compared-to-vs-code) and this
discussion regarding the use of the Microsoft URLs in forks:
https://github.com/microsoft/vscode/issues/31168#issue-244533026
These variables are most valuable to our enterprise customers for whom we have a self hosted marketplace product.
## Where are extensions stored?

View File

@@ -131,7 +131,7 @@ sed -i.bak 's/auth: password/auth: none/' ~/.config/code-server/config.yaml
Restart `code-server` with (assuming you followed the guide):
```bash
sudo systemctl restart code-server@$USER
systemctl --user restart code-server
```
Now forward local port 8080 to `127.0.0.1:8080` on the remote instance.
@@ -277,7 +277,7 @@ sudo setcap cap_net_bind_service=+ep /usr/lib/code-server/lib/node
Assuming you have been following the guide, restart `code-server` with:
```bash
sudo systemctl restart code-server@$USER
systemctl --user restart code-server
```
Edit your instance and checkmark the allow HTTPS traffic option.
@@ -295,7 +295,7 @@ Edit the `password` field in the `code-server` config file at `~/.config/code-se
and then restart `code-server` with:
```bash
sudo systemctl restart code-server@$USER
systemctl --user restart code-server
```
### How do I securely access development web services?

View File

@@ -81,7 +81,7 @@ commands presented in the rest of this document.
```bash
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server_3.4.1_amd64.deb
sudo dpkg -i code-server_3.4.1_amd64.deb
sudo systemctl enable --now code-server@$USER
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
@@ -90,7 +90,7 @@ sudo systemctl enable --now code-server@$USER
```bash
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-amd64.rpm
sudo rpm -i code-server-3.4.1-amd64.rpm
sudo systemctl enable --now code-server@$USER
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
@@ -99,7 +99,7 @@ sudo systemctl enable --now code-server@$USER
```bash
# Installs code-server from the AUR using yay.
yay -S code-server
sudo systemctl enable --now code-server@$USER
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
@@ -108,7 +108,7 @@ sudo systemctl enable --now code-server@$USER
git clone https://aur.archlinux.org/code-server.git
cd code-server
makepkg -si
sudo systemctl enable --now code-server@$USER
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```

View File

@@ -84,7 +84,7 @@ echo_systemd_postinstall() {
echoh
cath << EOF
To have systemd start code-server now and restart on boot:
sudo systemctl enable --now code-server@$USER
systemctl --user enable --now code-server
Or, if you don't want/need a background service you can run:
code-server
EOF

View File

@@ -9,7 +9,7 @@ export enum HttpCode {
}
export class HttpError extends Error {
public constructor(message: string, public readonly code: number, public readonly details?: object) {
constructor(message: string, public readonly code: number) {
super(message)
this.name = this.constructor.name
}