Rebase of a number of incremental changes listed below
Move first level dispatchMessage into ForkedTsServerProcess
Goal is to move callbacks and other per-server state into `ForkedTsServerProcess`
Create forked ts server object syncrounously
There is no reason for this to be async anymore. Making this object sync reduces complexity and makes the code easier to reason about
Moving server relate functions into ForkedTSServer object
The goal here is to have a single "server" object that keeps track of all its relevant state. The service client would manage one of these servers at a time, starting new ones if needed and dispatching to old ones
Split server into own file
Use switch case instead of conditionals
Make pendingResponses readonly
Add typings for callback item
Improve naming
- Use more descriptive names
- Preview private vars with _
Use passed in version for getting command line args
Attach webview click handler to window instead of to document body
Fixes#48926
Change error handling for ts server exit and error
- Don't fire twice on error (once for the `once` and once for the `onError`)
- Flush callbacks on both exit and error.
Remove cancellationPipeName as state
Remove obsolete comment
Move all env generation into generatePatchedEnv
Extract server spawn into static method
Move spawn from static to be own factory class
Move providers from arguments to state on the spawner
Update js/ts grammar
Remove duplicate error handler
Cleaning up server fork
- Standarize names
- Extract methods
- Move some function to be private statics
- Move logging out of electron and into server.ts
Use undefined instead of null for optional value
* Test #57299 - script to stage test data.
* Fix#57299 - improve git rebase detection
* Revert "Test #57299 - script to stage test data."
This reverts commit 5f7142c25a.