1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 04:14:29 +00:00
code-server-2/.tours/contributing.tour

151 lines
6.8 KiB
Plaintext
Raw Normal View History

2020-12-07 14:38:17 +00:00
{
"$schema": "https://aka.ms/codetour-schema",
"title": "Contributing",
"steps": [
2020-12-08 22:57:48 +00:00
{
2020-12-10 06:02:07 +00:00
"directory": "src",
2020-12-08 22:57:48 +00:00
"line": 1,
"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."
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/entry.ts",
"line": 157,
"description": "code-server begins execution here. CLI arguments are parsed, special flags like --help are handled, then the HTTP server is started."
},
{
"file": "src/node/cli.ts",
"line": 28,
"description": "This describes all of the code-server CLI options and how they will be parsed."
},
{
"file": "src/node/cli.ts",
"line": 233,
"description": "Here's the actual CLI parser."
},
{
"file": "src/node/settings.ts",
"line": 1,
"description": "code-server maintains a settings file that is read and written here."
},
2020-12-07 14:38:17 +00:00
{
"file": "src/node/app.ts",
"line": 11,
2020-12-08 22:57:48 +00:00
"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."
},
{
"file": "src/node/wsRouter.ts",
"line": 38,
"description": "This is an analog to Express's Router that handles web socket routes."
},
{
"file": "src/node/http.ts",
"line": 1,
"description": "This file provides various HTTP utility functions."
},
{
"file": "src/node/coder_cloud.ts",
"line": 9,
"description": "The cloud agent spawned here provides the --link functionality."
},
{
"file": "src/node/heart.ts",
"line": 7,
2021-02-03 16:32:35 +00:00
"description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file)"
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/socket.ts",
"line": 13,
"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."
},
{
"directory": "src/node/routes",
2020-12-08 22:57:48 +00:00
"line": 1,
"description": "code-server's routes live here in `src/node/routes` (see the explorer)."
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/routes/index.ts",
"line": 123,
"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)."
},
{
"file": "src/node/plugin.ts",
"line": 103,
"description": "The previously mentioned plugins are loaded here."
2020-12-07 14:38:17 +00:00
},
{
"file": "src/node/routes/apps.ts",
2020-12-08 22:57:48 +00:00
"line": 12,
"description": "This provides a list of the applications registered with code-server."
},
{
"file": "src/node/routes/domainProxy.ts",
"line": 18,
2021-02-03 16:32:35 +00:00
"description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)"
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/routes/pathProxy.ts",
"line": 19,
2021-02-03 16:32:35 +00:00
"description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)"
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/proxy.ts",
"line": 4,
"description": "Both the domain and path proxy use the single proxy instance created here."
},
{
"file": "src/node/routes/health.ts",
"line": 5,
2021-02-03 16:32:35 +00:00
"description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint)"
2020-12-08 22:57:48 +00:00
},
{
"file": "src/node/routes/login.ts",
"line": 46,
"description": "code-server supports a password-based login here."
},
{
"file": "src/node/routes/static.ts",
"line": 16,
"description": "This serves static assets. Anything under the code-server directory can be fetched. Anything outside requires authentication."
},
{
"file": "src/node/routes/update.ts",
"line": 10,
"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."
2020-12-07 14:38:17 +00:00
},
{
"file": "src/node/routes/vscode.ts",
2020-12-08 22:57:48 +00:00
"line": 15,
"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."
2020-12-07 14:38:17 +00:00
},
{
2020-12-08 22:57:48 +00:00
"file": "src/node/vscode.ts",
"line": 13,
"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."
},
{
"file": "src/browser/serviceWorker.ts",
"line": 1,
"description": "The service worker only exists to provide PWA functionality."
},
{
"directory": "src/browser/pages",
2020-12-08 22:57:48 +00:00
"line": 1,
"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}}."
2020-12-08 22:57:48 +00:00
},
{
"file": "src/browser/pages/vscode.html",
"line": 1,
"description": "The VS Code HTML is based off VS Code's own `workbench.html`."
},
{
"directory": "src/browser/media",
2020-12-08 22:57:48 +00:00
"line": 1,
"description": "Static images and the manifest live here in `src/browser/media` (see the explorer)."
2020-12-07 14:38:17 +00:00
},
{
2020-12-16 21:56:14 +00:00
"directory": "lib/vscode",
2020-12-07 14:38:17 +00:00
"line": 1,
2021-02-03 16:32:35 +00:00
"description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible."
2020-12-07 14:38:17 +00:00
}
2020-12-09 17:22:19 +00:00
]
2020-12-16 21:56:14 +00:00
}