-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Convert code-server http code to use Express #2238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
dcb303a
Move argument defaults into setDefaults
code-asher 2928d36
Move heart and AuthType out of http
code-asher 6000e38
Add Express as a dep and regenerate lockfile
code-asher 9f25cc6
Move providers from `app` to `routes`
code-asher 8e93e28
Strip config file password from debug log
code-asher 71dc5c7
Switch to Express
code-asher 4b6cbac
Add file for global constants
code-asher 112eda4
Convert routes to Express
code-asher 257d9a4
Make authentication work with sub-domain proxy
code-asher 6422a8d
Fix webview resource path
code-asher 6ab6cb4
Fix error handler types
code-asher 305348f
Improve proxy fallthrough logic
code-asher cde94d5
Remove redundant serverAddress check
code-asher dc177ab
Unambiguify address replacement
code-asher 504d896
Fix open line being printed when open fails
code-asher f2f1fee
Short-circuit heartbeat when alive
code-asher 1067507
Proxy to 0.0.0.0 instead of localhost
code-asher 8a9e61d
Use Addr interface everywhere and loop over arg sources
code-asher 3a074fd
Skip unnecessary auth type check when using --link
code-asher f4e5855
Simplify update request
code-asher c72c53f
Fix not being able to dispose vscode after failed disposal
code-asher c10450c
Move isFile into util
code-asher e243f6e
Return early when forking to reduce indentation
code-asher 03e0013
Unbind error/exit events once handshakes resolve
code-asher 8066da1
Remove unused Locals interface
code-asher 75b93f9
Fix bind address priority
code-asher e2c35fa
Remove invalid comment on maybeProxy
code-asher a653b93
Include protocol on printed address
code-asher c5ce365
Use query variable to force update check
code-asher e5c8e0a
Remove useless ||
code-asher 210fc04
Document VS Code endpoints
code-asher 476379a
Fix cookie domain
code-asher 34225e2
Use ensureAuthenticated as middleware
code-asher 396af23
Kill VS Code when process exits
code-asher 8252c37
Provide a way to tell when event handlers are finished
code-asher 9e09c1f
Upgrade to Express 5
code-asher 7b2752a
Move websocket routes into a separate app
code-asher 3f1750c
Fix destroying response in update again
code-asher cb991a9
Handle errors for JSON requests
code-asher f6c4434
Tweak proxy fallthrough behavior
code-asher f707624
Move domain proxy to routes
code-asher 9594970
Document HttpError
code-asher aa2cfa2
typings/plugin.d.ts: Create
nhooyr 481df70
ci/dev/test.sh: Pass through args
nhooyr e08a55d
src/node/plugin.ts: Implement new plugin API
nhooyr bea185b
plugin: Add basic loading test
nhooyr 82e8a00
Fix CI
nhooyr 30d2962
src/node/plugin.ts: Warn on duplicate plugin and only load first
nhooyr ef97100
plugin.test.ts: Make it clear iconPath is a path
nhooyr f4d7f00
plugin.ts: Fixes for @wbobeirne
nhooyr 75e52a3
plugin.ts: Fixes for @code-asher
nhooyr 8d3a772
plugin.d.ts: Document plugin priority correctly
nhooyr 6638daf
plugin.d.ts: Add explicit path field and adjust types to reflect
nhooyr fed545e
plugin.d.ts -> pluginapi.d.ts
nhooyr afff86a
plugin.ts: Adjust to implement pluginapi.d.ts correctly
nhooyr e03bbe3
routes/apps.ts: Implement /api/applications endpoint
nhooyr 139a28e
plugin.ts: Describe private counterpart functions
nhooyr 6870948
plugin.ts: Make application endpoint paths absolute
nhooyr 2a13d00
plugin.ts: Add homepageURL to plugin and application
nhooyr af73b96
routes/apps.ts: Add example output
nhooyr 706bc23
plugin: Fixes for CI
nhooyr 8a8159c
plugin: More review fixes
nhooyr 14f408a
plugin: Plugin modules now export a single top level identifier
nhooyr 9453f89
plugin.ts: Fix usage of routerPath in mount
nhooyr 197a09f
plugin: Test endpoints via supertest
nhooyr 9d39c53
plugin: Give test-plugin some html to test overlay
nhooyr 277211c
plugin: Make init and applications callbacks optional
nhooyr fe399ff
Fix formatting
nhooyr d969a5b
Merge pull request #2252 from cdr/plugin-5d60
nhooyr 0a01338
Deduplicate child process message dance
code-asher de49495
Document getFirstPath better
code-asher f706039
Re-add TLS socket proxy
code-asher b8340a2
Close sockets correctly
code-asher 71850e3
Avoid setting ?to=/
code-asher 4574593
Refactor vscode init to use async
code-asher 79478eb
Clarify some points around the cookie domain
code-asher 72931ed
Fix cleanup after getting message from vscode
code-asher 31b6706
Remove <type> from onMessage
code-asher 5499a3d
Use baseUrl when redirecting from domain proxy
code-asher e1702a1
Merge branch master into code-asher/ch1385
code-asher b73ea2f
Unbind message handler itself after getting message
code-asher 6f14b8b
Add separate handler for error
code-asher 96995b7
Update cert flag test
code-asher 9889f30
Remove unused ts-expect-error from VS Code
code-asher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Deduplicate child process message dance
- Loading branch information
commit 0a01338edd3a618a943567b8b95c7fce37890f9c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would a parallel init occur?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading the page in two separate tabs is the main way I think. If we had some sort of collaborative mode it would probably be a bigger problem then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess in theory it could also happen if you refresh a page before it finishes loading to send off two almost-parallel requests although I don't think I've hit it that way before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we prevent sending parallel
init
's at the same time?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or actually, doesn't each websocket get it's own vscode process? Or is that only its own extension host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a single VS Code process for all websockets and an extension host for each websocket. Each page also gets its own "management" websocket where we initialize all the services VS Code uses (like the file service, environment service, language initialization, and so on).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The services are shared too actually, come to think. Language stuff isn't though, and there are some other differences in the initialization like which folder to open up (depending on the query parameter for example).