* Add --repo flag to commands
* Example of using common args
* Add -r to stop
* Add validation to the add helper
* Skip prompt for single option
* Migrate (mostly) everything to addGetOrChooseCodespaceCommandArgs
* Fix typo in logsCmd
* Use R instead of r
* Update a couple -r usages
* Refactor to codespace_selector
* Clean up selector, apply it in a couple examples
* Use apiClient instead in constructor
* Restore addDeprecatedRepoShorthand
* Finish implementing the commands
* Update existing tests to use the selector
* Add tests for selector
* linter
* Catch case where there's no conflict
* Make the flag persistent for ports
* Add support to stop
Since the API already disallows this, this pretty much just cleans up
the error reporting to the user.
Example of old error:
```
$ gh cs logs -c cwndrws-redacted
Starting codespace ⣽connecting to codespace: error starting codespace: HTTP 422: your codespace has an operation pending: updating to a sku with a different amount of storage; please wait until this operation is complete (https://api.github.com/user/codespaces/cwndrws-redacted/start)
exit status 1
```
Example of new error:
```
$ gh cs logs -c cwndrws-redacted
codespace is disabled while it has a pending operation: Changing machine types...
exit status 1
```
* Rework logging, showing progress, and printing from `codespace` commands
* Change rendering of the general progress indicator so that it's visible on both dark and light backgrounds
* The progress indicator now "spins" faster
Co-authored-by: Mislav Marohnić <mislav@github.com>
- Session now accepts two new options: ClientName and Logger
- Port forwarder now supports a keepAlive parameter which when true,
instructs the PF to call the session's keepAlive method.
- Port forwarder uses a new traffic monitor to detect I/O traffic and
notify the session when applicable.
- The SSH command introduces a new debug flag which enables the command
to log to a new temporary file. The file path is printed to the user.
- Drop GetCodespaceToken as it is no longer necessary
- Introduces new behavior with the API to optionally include connection
details in the GET request. Ommitting to do so results in a faster
response