Skip to content

Commit b22d7f4

Browse files
authored
Merge pull request #1 from cdr/master
Master
2 parents 19d14d2 + caee285 commit b22d7f4

File tree

4,821 files changed

+1336964
-8629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,821 files changed

+1336964
-8629
lines changed

.eslintrc.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,23 @@ extends:
1919
- prettier/@typescript-eslint # Remove conflicts again.
2020

2121
rules:
22+
# Sometimes you need to add args to implement a function signature even
23+
# if they are unused.
24+
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }]
2225
# For overloads.
2326
no-dupe-class-members: off
2427
"@typescript-eslint/no-use-before-define": off
2528
"@typescript-eslint/no-non-null-assertion": off
29+
"@typescript-eslint/ban-types": off
30+
"@typescript-eslint/no-var-requires": off
31+
"@typescript-eslint/explicit-module-boundary-types": off
32+
"@typescript-eslint/no-explicit-any": off
33+
eqeqeq: error
34+
import/order:
35+
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
36+
no-async-promise-executor: off
37+
# This isn't a real module, just types, which apparently doesn't resolve.
38+
import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }]
2639

2740
settings:
2841
# Does not work with CommonJS unfortunately.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @code-asher @nhooyr
1+
ci/helm-chart @Matthew-Beckett @alexgorbatchev

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question
4+
url: https://github.com/cdr/code-server/discussions/new?category_id=22503114
5+
about: Ask the community for help on our GitHub Discussions board
6+
- name: Chat
7+
about: Need immediate help or just want to talk? Hop in our Slack
8+
url: https://cdr.co/join-community

.github/ISSUE_TEMPLATE/doc.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Documentation improvement
3+
about: Suggest a documentation improvement
4+
title: ""
5+
labels: "docs"
6+
assignees: ""
7+
---

.github/ISSUE_TEMPLATE/extension-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Extension request
33
about: Request an extension missing from the code-server marketplace
44
title: ""
55
labels: extension-request
6-
assignees: cmoog
6+
assignees: ""
77
---
88

99
<!--

.github/issue_template.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/lock.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
2+
3+
# Number of days of inactivity before a closed issue or pull request is locked
4+
daysUntilLock: 90
5+
6+
# Skip issues and pull requests created before a given timestamp. Timestamp must
7+
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
8+
skipCreatedBefore: false
9+
10+
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
11+
exemptLabels: []
12+
13+
# Label to add before locking, such as `outdated`. Set to `false` to disable
14+
lockLabel: false
15+
16+
# Comment to post before locking. Set to `false` to disable
17+
lockComment: >
18+
This thread has been automatically locked since there has not been
19+
any recent activity after it was closed. Please open a new issue for
20+
related bugs.
21+
22+
# Assign `resolved` as the reason for locking. Set to `false` to disable
23+
setLockReason: true
24+
# Limit to only `issues` or `pulls`
25+
# only: issues
26+
27+
# Optionally, specify configuration settings just for `issues` or `pulls`
28+
# issues:
29+
# exemptLabels:
30+
# - help-wanted
31+
# lockLabel: outdated
32+
33+
# pulls:
34+
# daysUntilLock: 30
35+
36+
# Repository to extend settings from
37+
# _extends: repo

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<!--
22
Please link to the issue this PR solves.
33
If there is no existing issue, please first create one unless the fix is minor.
4+
5+
Please make sure the base of your PR is the master branch!
46
-->

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
steps:
99
- uses: actions/checkout@v1
1010
- name: Run ./ci/steps/fmt.sh
11-
uses: ./ci/images/debian8
11+
uses: ./ci/images/debian10
1212
with:
1313
args: ./ci/steps/fmt.sh
1414

@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v1
1919
- name: Run ./ci/steps/lint.sh
20-
uses: ./ci/images/debian8
20+
uses: ./ci/images/debian10
2121
with:
2222
args: ./ci/steps/lint.sh
2323

@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v1
2828
- name: Run ./ci/steps/test.sh
29-
uses: ./ci/images/debian8
29+
uses: ./ci/images/debian10
3030
with:
3131
args: ./ci/steps/test.sh
3232

@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v1
3737
- name: Run ./ci/steps/release.sh
38-
uses: ./ci/images/debian8
38+
uses: ./ci/images/debian10
3939
with:
4040
args: ./ci/steps/release.sh
4141
- name: Upload npm package artifact
@@ -116,7 +116,7 @@ jobs:
116116
name: release-packages
117117
path: ./release-packages
118118
- name: Run ./ci/steps/build-docker-image.sh
119-
uses: ./ci/images/debian8
119+
uses: ./ci/images/debian10
120120
with:
121121
args: ./ci/steps/build-docker-image.sh
122122
- name: Upload release image

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v1
1212
- name: Run ./ci/steps/publish-npm.sh
13-
uses: ./ci/images/debian8
13+
uses: ./ci/images/debian10
1414
with:
1515
args: ./ci/steps/publish-npm.sh
1616
env:
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v1
2424
- name: Run ./ci/steps/push-docker-manifest.sh
25-
uses: ./ci/images/debian8
25+
uses: ./ci/images/debian10
2626
with:
2727
args: ./ci/steps/push-docker-manifest.sh
2828
env:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ release-packages/
99
release-gcp/
1010
release-images/
1111
node_modules
12+
/lib/vscode/node_modules.asar
1213
node-*
14+
/plugins
15+
/lib/coder-cloud-agent
16+
.home

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.tours/contributing.tour

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"$schema": "https://aka.ms/codetour-schema",
3+
"title": "Contributing",
4+
"steps": [
5+
{
6+
"directory": "src",
7+
"line": 1,
8+
"description": "Hello world! code-server's source code lives here in `src` (see the explorer). It's broadly arranged into browser code, Node code, and code shared between both."
9+
},
10+
{
11+
"file": "src/node/entry.ts",
12+
"line": 157,
13+
"description": "code-server begins execution here. CLI arguments are parsed, special flags like --help are handled, then the HTTP server is started."
14+
},
15+
{
16+
"file": "src/node/cli.ts",
17+
"line": 28,
18+
"description": "This describes all of the code-server CLI options and how they will be parsed."
19+
},
20+
{
21+
"file": "src/node/cli.ts",
22+
"line": 233,
23+
"description": "Here's the actual CLI parser."
24+
},
25+
{
26+
"file": "src/node/settings.ts",
27+
"line": 1,
28+
"description": "code-server maintains a settings file that is read and written here."
29+
},
30+
{
31+
"file": "src/node/app.ts",
32+
"line": 11,
33+
"description": "The core of code-server are HTTP and web socket servers which are created here. They provide authentication, file access, an API, and serve web-based applications like VS Code."
34+
},
35+
{
36+
"file": "src/node/wsRouter.ts",
37+
"line": 38,
38+
"description": "This is an analog to Express's Router that handles web socket routes."
39+
},
40+
{
41+
"file": "src/node/http.ts",
42+
"line": 1,
43+
"description": "This file provides various HTTP utility functions."
44+
},
45+
{
46+
"file": "src/node/coder_cloud.ts",
47+
"line": 9,
48+
"description": "The cloud agent spawned here provides the --link functionality."
49+
},
50+
{
51+
"file": "src/node/heart.ts",
52+
"line": 7,
53+
"description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/doc/FAQ.md#heartbeat-file](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#heartbeat-file)"
54+
},
55+
{
56+
"file": "src/node/socket.ts",
57+
"line": 13,
58+
"description": "We pass sockets to child processes, however we can't pass TLS sockets so when code-server is handling TLS (via --cert) we use this to create a proxy that can be passed to the child."
59+
},
60+
{
61+
"directory": "src/node/routes",
62+
"line": 1,
63+
"description": "code-server's routes live here in `src/node/routes` (see the explorer)."
64+
},
65+
{
66+
"file": "src/node/routes/index.ts",
67+
"line": 123,
68+
"description": "The architecture of code-server allows it to be extended with applications via plugins. Each application is registered at its own route and handles requests at and below that route. Currently we have only VS Code (although it is not yet actually split out into a plugin)."
69+
},
70+
{
71+
"file": "src/node/plugin.ts",
72+
"line": 103,
73+
"description": "The previously mentioned plugins are loaded here."
74+
},
75+
{
76+
"file": "src/node/routes/apps.ts",
77+
"line": 12,
78+
"description": "This provides a list of the applications registered with code-server."
79+
},
80+
{
81+
"file": "src/node/routes/domainProxy.ts",
82+
"line": 18,
83+
"description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-securely-access-web-services)"
84+
},
85+
{
86+
"file": "src/node/routes/pathProxy.ts",
87+
"line": 19,
88+
"description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#how-do-i-securely-access-web-services)"
89+
},
90+
{
91+
"file": "src/node/proxy.ts",
92+
"line": 4,
93+
"description": "Both the domain and path proxy use the single proxy instance created here."
94+
},
95+
{
96+
"file": "src/node/routes/health.ts",
97+
"line": 5,
98+
"description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/doc/FAQ.md#healthz-endpoint](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#healthz-endpoint)"
99+
},
100+
{
101+
"file": "src/node/routes/login.ts",
102+
"line": 46,
103+
"description": "code-server supports a password-based login here."
104+
},
105+
{
106+
"file": "src/node/routes/static.ts",
107+
"line": 16,
108+
"description": "This serves static assets. Anything under the code-server directory can be fetched. Anything outside requires authentication."
109+
},
110+
{
111+
"file": "src/node/routes/update.ts",
112+
"line": 10,
113+
"description": "This endpoint lets you query for the latest code-server version. It's used to power the update popup you see in VS Code."
114+
},
115+
{
116+
"file": "src/node/routes/vscode.ts",
117+
"line": 15,
118+
"description": "This is the endpoint that serves VS Code's HTML, handles VS Code's websockets, and handles a few VS Code-specific endpoints for fetching static files."
119+
},
120+
{
121+
"file": "src/node/vscode.ts",
122+
"line": 13,
123+
"description": "The actual VS Code spawn and initialization is handled here. VS Code runs in a separate child process. We communicate via IPC and by passing it web sockets."
124+
},
125+
{
126+
"file": "src/browser/serviceWorker.ts",
127+
"line": 1,
128+
"description": "The service worker only exists to provide PWA functionality."
129+
},
130+
{
131+
"directory": "src/browser/pages",
132+
"line": 1,
133+
"description": "HTML, CSS, and JavaScript for each page lives in here `src/browser/pages` (see the explorer). Currently our HTML uses a simple search and replace template system with variables that {{LOOK_LIKE_THIS}}."
134+
},
135+
{
136+
"file": "src/browser/pages/vscode.html",
137+
"line": 1,
138+
"description": "The VS Code HTML is based off VS Code's own `workbench.html`."
139+
},
140+
{
141+
"directory": "src/browser/media",
142+
"line": 1,
143+
"description": "Static images and the manifest live here in `src/browser/media` (see the explorer)."
144+
},
145+
{
146+
"directory": "lib/vscode",
147+
"line": 1,
148+
"description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/cdr/code-server/blob/master/doc/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/cdr/code-server/blob/master/doc/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible."
149+
}
150+
]
151+
}

.tours/start-development.tour

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://aka.ms/codetour-schema",
3+
"title": "Start Development",
4+
"steps": [
5+
{
6+
"file": "package.json",
7+
"line": 31,
8+
"description": "## Commands\n\nTo start developing, make sure you have Node 12+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch"
9+
},
10+
{
11+
"file": "src/node/app.ts",
12+
"line": 68,
13+
"description": "## Visit the web server\n\nIf all goes well, you should see something like this in your terminal. code-server should be live in development mode.\n\n---\n```bash\n[2020-12-09T21:03:37.156Z] info code-server 3.7.4 development\n[2020-12-09T21:03:37.157Z] info Using user-data-dir ~/.local/share/code-server\n[2020-12-09T21:03:37.165Z] info Using config file ~/.config/code-server/config.yaml\n[2020-12-09T21:03:37.165Z] info HTTP server listening on http://127.0.0.1:8080 \n[2020-12-09T21:03:37.165Z] info - Authentication is enabled\n[2020-12-09T21:03:37.165Z] info - Using password from ~/.config/code-server/config.yaml\n[2020-12-09T21:03:37.165Z] info - Not serving HTTPS\n```\n\n---\n\nIf you have the default configuration, you can access it at [http://localhost:8080](http://localhost:8080)."
14+
},
15+
{
16+
"file": "src/browser/pages/login.html",
17+
"line": 26,
18+
"description": "## Make a change\n\nThis is the login page, let's make a change and see it update on our web server! Perhaps change the text :)\n\n```html\n<div class=\"sub\">Modifying the login page 👨🏼‍💻</div>\n```\n\nReminder, you can likely preview at [http://localhost:8080](http://localhost:8080)"
19+
},
20+
{
21+
"file": "src/node/app.ts",
22+
"line": 62,
23+
"description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\")\n- [Docs: FAQ.md](https://github.com/cdr/code-server/blob/master/doc/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/cdr/code-server/blob/master/doc/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/cdr/code-server/discussions)\n- [Community: Slack](https://community.coder.com)"
24+
}
25+
]
26+
}

0 commit comments

Comments
 (0)