Commit Graph

25 Commits

Author SHA1 Message Date
Connor Peet
8a74ad8ff5 cli: show service status in tunnel log
Fixes #183714
2023-06-16 10:42:13 -07:00
Connor Peet
75c2f321b2 cli: update dependencies (#184189)
Up all the dependencies! Notably:

- russh to the latest main now that tunnel changes are merged
- secret-service-rs to 3.x and dropping our custom fork
- which also fixes SDL pings

Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4328
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4077
2023-06-02 10:27:47 -07:00
Connor Peet
679bb967c3 cli: add stdio control server
* signing: implement signing service on the web

* wip

* cli: implement stdio service

This is used to implement the exec server for WSL. Guarded behind a signed handshake.

* update distro

* rm debug

* address pr comments
2023-05-19 17:19:52 +02:00
Benjamin Pasero
6d5b85427d debt - remove unsupported max_old_space_size option (#180183) 2023-04-17 22:32:23 -07:00
Connor Peet
eab8ba65bf cli: add tunnel status command (#177381)
Fixes #177372
2023-03-16 12:26:56 -07:00
Connor Peet
025e3194e1 fix: missing accept server license terms arg in service install (#177366)
Fixes #177351
2023-03-16 11:23:35 -07:00
Connor Peet
0e1ec3e87d fix: not installing extensions in the directory that is being passed (#177303)
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/3595
2023-03-16 00:14:53 +01:00
Connor Peet
abab52dd94 cli: add tunnel kill/restart subcommands (#177286) 2023-03-15 15:09:12 -07:00
Connor Peet
4cf496e905 cli: add --no-sleep flag, implementation for macos (#171885)
First part of https://github.com/microsoft/vscode-remote-release/issues/7127
2023-01-20 15:42:09 -08:00
Connor Peet
2c2ead679b cli: initial wsl control server
Adds an stdin/out json rpc server for wsl.

Exposes a singular install_local command to install+boot the vscode server on a port from a local archive.

Also refines the common rpc layer some more. I'm decently happy with it now.
2023-01-18 08:23:04 -08:00
Connor Peet
2aecc85c22 cli: update help text of cli for standalone differentiation 2023-01-17 08:19:36 -08:00
Connor Peet
84d2eac2fc cli: output full version (#170057)
Fixes #169635
2022-12-26 20:47:13 +01:00
Connor Peet
25cfb20ec9 tunnels: add preview dialog for turning on tunnel access 2022-12-02 09:36:23 -08:00
Connor Peet
796ee2bf3c chore: pull more strings from the product.json (#166769)
Fixes the bulk of https://github.com/microsoft/vscode-cli/issues/560
2022-11-18 18:52:52 -08:00
Connor Peet
1bf3323015 cli: add service integration for macos, observability
Adds support for running the tunnel as a service on macOS via launchservices.

It also hooks up observability (`code tunnel service log`) on macOS and Linux.
On macOS--and later Windows, hence the manual implementation of `tail`--it
saves output to a log file and watches it. On Linux, it simply delegates to
journalctl.

The "tailing" is implemented via simple polling of the file size. I didn't want
to pull in a giant set of dependencies for inotify/kqueue/etc just for this use
case; performance when polling a single log file is not a huge concern.
2022-11-15 15:39:58 -08:00
Martin Aeschlimann
f10e84118b ci: use tunnelApplicationName (#164257)
fix location of tunnel command in CI and in code
2022-10-23 20:12:23 +03:00
Martin Aeschlimann
66953830a2 tunnel cli: fix windows build (#164141)
* tunnel cli: fix windows build

* remove async
2022-10-23 15:44:56 +02:00
Connor Peet
6c5803b59b Merge pull request #164160 from microsoft/connor4312/standalone-cli-to-deskop
cli: fallback to system installs in the standalone CLI
2022-10-20 14:39:45 -07:00
Connor Peet
c536595a7f cli: fallback to system installs in the standalone CLI
The standalone CLI should detect and fall back to using and
system-installed VS Code instance, rather than trying to download zips
and manage its own VS Code instances.

There are three approaches used for discovery:

- On Windows, we can easily and quickly read the register to find
  installed versions based on their app ID.
- On macOS, we initially look in `/Applications` and fall back to the
  slow `system_profiler` command to list app .app's if that fails.
- On Linux, we just look in the PATH. I believe all Linux installers
  (snap, dep, rpm) automatically add VS Code to the user's PATH.

Failing this, the user can also manually specify their installation dir,
using the command `code version use stable --install-dir /path/to/vscode`.

Fixes #164159
2022-10-20 10:54:13 -07:00
Martin Aeschlimann
1b3bf4a550 Support starting tunnel with a given name (#163818)
* Support starting tunnel with a given name

* improve error message
2022-10-19 23:26:20 +02:00
Martin Aeschlimann
c6188602f4 tunnel cli: add --parent-process-id option (#163935)
* tunnel cli: add --parent-process-id option

* Update cli/src/commands/args.rs

Co-authored-by: Connor Peet <connor@peet.io>

* Change parent process check interval to 2s

Co-authored-by: Connor Peet <connor@peet.io>
2022-10-18 11:52:10 -07:00
Connor Peet
07453efc00 cli: implement better self-updating
- Start separating a "standalone" CLI. This is a little awkward with clap-
  derive, but I got it working. Detection of whether the CLI _is_
  standalone is still todo.
- Remove the old ad-hoc update code for code-server, and use the update
  service instead.
- Fix some of the "permission denied" errors people got while updating
  before. We need to rename the old running binary, not just overwrite it.
2022-09-23 17:47:39 -07:00
Connor Peet
b784bcdd32 cli: use hard tabs to align with vscode style 2022-09-23 14:17:01 -07:00
Connor Peet
9bcc88eafe cli: get builds in order 2022-09-23 13:28:26 -07:00
Connor Peet
3762635fe1 move cli to top level 2022-09-20 08:42:44 -07:00