Commit Graph

23 Commits

Author SHA1 Message Date
Kyle Carberry d3790bb5be
fix: use provided username when fetching workspaces (#12955) 2024-04-13 14:39:57 -04:00
Colin Adler 4d5a7b2d56
chore(codersdk): move all tailscale imports out of `codersdk` (#12735)
Currently, importing `codersdk` just to interact with the API requires
importing tailscale, which causes builds to fail unless manually using
our fork.
2024-03-26 12:44:31 -05:00
Kyle Carberry 03ab37b343
chore: remove middleware to request version and entitlement warnings (#12750)
This cleans up `root.go` a bit, adds tests for middleware HTTP transport
functions, and removes two HTTP requests we always always performed previously
when executing *any* client command.

It should improve CLI performance (especially for users with higher latency).
2024-03-25 15:01:42 -04:00
Ammar Bandukwala b4c0fa80d8
chore(cli): rename Cmd to Command (#12616)
I think Command is cleaner and my original decision to use "Cmd"
a mistake.

Plus this creates better parity with cobra.
2024-03-17 09:45:26 -05:00
Ammar Bandukwala 496232446d
chore(cli): replace clibase with external `coder/serpent` (#12252) 2024-03-15 11:24:38 -05:00
Mathias Fredriksson bddea7bcf9
feat(cli/vscodessh): add support for --wait and scripts that block login (#10473) 2024-02-02 13:18:26 +02:00
Spike Curtis 4894eda711
feat: capture cli logs in tests (#10669)
Adds a Logger to cli Invocation and standardizes CLI commands to use it.  clitest creates a test logger by default so that CLI command logs are captured in the test logs.

CLI commands that do their own log configuration are modified to add sinks to the existing logger, rather than create a new one.  This ensures we still capture logs in CLI tests.
2023-11-14 22:56:27 +04:00
Spike Curtis dc4b1ef406
fix: lock log sink against concurrent write and close (#10668)
fixes #10663
2023-11-14 16:38:34 +04:00
Kyle Carberry 21dc93c8a3
feat: add `log-dir` flag to vscodessh for debuggability (#10514) 2023-11-03 16:21:31 +00:00
Marcin Tojek ad23075e1b
refactor: build application URL (#9601)
* refactor: build application URL

* fix
2023-09-08 14:01:57 +00:00
Kyle Carberry 22e781eced
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path

go mod requires semantic versioning with versions greater than 1.x

This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```

Migrate generated files to import /v2

* Fix gen
2023-08-18 18:55:43 +00:00
Asher 37f9d4b783
feat: add --header-command flag (#9059)
This allows specifying a command to run that can output headers for
cases where users require dynamic headers (like to authenticate to their
VPN).

The primary use case is to add this flag in SSH configs created by the
VS Code plugin, although maybe config-ssh should do the same.
2023-08-14 12:12:17 -08:00
Dean Sheather 6ea32e4e80
fix: show current DERP name correctly in vscode (#8856) 2023-08-03 01:30:43 +10:00
Dean Sheather 24b95e16c4
feat: add --disable-direct flag to CLI (#8131) 2023-06-21 20:22:43 +00:00
Ammar Bandukwala 43eee35ae8
chore(cli): correctly report telemetry even when transport replaced (#7670)
By introducing the "ExtraHeaders" map, we can apply headers even when
handlers replace the transport, as in the case of our scaletests.

Also, only send telemetry header when it's small.
2023-05-31 00:11:56 +00:00
Ammar Bandukwala ec117e841a
chore: add CLI invokation telemetry (#7589) 2023-05-24 11:08:03 -05:00
Kyle Carberry 693e5d94bc
fix: add global headers to `vscodessh` command (#7181) 2023-04-18 08:07:10 -05:00
Ammar Bandukwala 2bd6d2908e
feat: convert entire CLI to clibase (#6491)
I'm sorry.
2023-03-23 17:42:20 -05:00
Ammar Bandukwala f05609b4da
chore: format Go more aggressively 2023-02-18 18:32:09 -06:00
Colin Adler a54de6093b
feat: add `coder ping` (#6161) 2023-02-13 10:38:00 -06:00
Colin Adler 4432cd08d6
chore: update tailscale (#6091) 2023-02-09 21:43:18 -06:00
Kyle Carberry 7ad87505c8
chore: move agent functions from `codersdk` into `agentsdk` (#5903)
* chore: rename `AgentConn` to `WorkspaceAgentConn`

The codersdk was becoming bloated with consts for the workspace
agent that made no sense to a reader. `Tailnet*` is an example
of these consts.

* chore: remove `Get` prefix from *Client functions

* chore: remove `BypassRatelimits` option in `codersdk.Client`

It feels wrong to have this as a direct option because it's so infrequently
needed by API callers. It's better to directly modify headers in the two
places that we actually use it.

* Merge `appearance.go` and `buildinfo.go` into `deployment.go`

* Merge `experiments.go` and `features.go` into `deployment.go`

* Fix `make gen` referencing old type names

* Merge `error.go` into `client.go`

`codersdk.Response` lived in `error.go`, which is wrong.

* chore: refactor workspace agent functions into agentsdk

It was odd conflating the codersdk that clients should use
with functions that only the agent should use. This separates
them into two SDKs that are closely coupled, but separate.

* Merge `insights.go` into `deployment.go`

* Merge `organizationmember.go` into `organizations.go`

* Merge `quota.go` into `workspaces.go`

* Rename `sse.go` to `serversentevents.go`

* Rename `codersdk.WorkspaceAppHostResponse` to `codersdk.AppHostResponse`

* Format `.vscode/settings.json`

* Fix outdated naming in `api.ts`

* Fix app host response

* Fix unsupported type

* Fix imported type
2023-01-29 15:47:24 -06:00
Kyle Carberry 9f6edab53b
feat: replace vscodeipc with vscodessh (#5645)
The VS Code extension has been refactored to use VS Code
Remote SSH instead of using the private API.

This changes the structure to continue using SSH, but
output network information periodically to a file.
2023-01-10 04:23:17 +00:00