20 Commits
Author SHA1 Message Date
Ryan Clark 26d04f9470 Add the new design system (#61524)
* Add the new design system

* pnpm format

* Fix session recordings not updating on theme changes

* Remove color assertions
2026-06-30 16:25:38 +00:00
ravicious d03f433998 Remove baseUrl from TS config, fix incorrect imports (#62958)
* Remove deprecated baseUrl option

https://devblogs.microsoft.com/typescript/progress-on-typescript-7-december-2025/

* Fix incorrect imports from build package

It's safe to change the paths.build in tsconfig.json – the build package
has no src directory, so there's definitely no imports which utilize
this path.

* Fix remaining incorrect imports

* Remove wildcard path
2026-01-19 15:30:48 +00:00
Ryan ClarkandRafał Cieślak d6fa030c0e Move import sorting over to prettier (#50618)
* Move import sorting over to prettier

* Update import order

* Re-run prettier

---------

Co-authored-by: Rafał Cieślak <[email protected]>
2025-01-02 13:36:46 +00:00
Grzegorz Zdunek 2b7e49296b Specify TS paths per package (#49489)
* Specify TS paths per package

* Remove `gen-proto-js` path
2024-11-27 16:50:08 +00:00
Grzegorz Zdunek a1f309a34d Make web/design a separate TypeScript project (#47694)
* Make `web/design` a separate TypeScript project

* Fix compile errors

It seems that making `web/design` a separate project slightly changes the behavior of type inference
2024-10-25 15:55:02 +00:00
Ryan Clark 994a47344d Remove access-graph path resolution, proxy /enterprise requests (#46541)
* Remove `access-graph` path from tsconfig

* Proxy /enterprise requested in dev
2024-09-18 18:27:48 +00:00
Grzegorz Zdunek c3603e50b4 Clean up styles config (#43850)
* Add types for `css` prop instead of importing it implicitly from `@emotion/core`

* Move `styled-system.d.ts` to `packages/design`

The `styled-system` package is installed there (it has to be reachable from the declaration file).

* Remove `border` from `FeatureHeader`

We don't pass any props that would use it. That's also the only import of `styled-system` outside of `packages/design`.

* Remove `grpc` path, it is used only in one place
2024-07-05 13:50:18 +00:00
Grzegorz Zdunek 089c32094f Remove e-teleterm leftovers (#41208)
* Remove `e-teleterm` leftovers

* Fix tests
2024-05-06 13:58:53 +00:00
Grzegorz Zdunek 784d7ac10c Clone the tshd gRPC client to allow inspecting errors (#39229)
* Add functions to clone every gRPC method, so they can be passed over the context bridge

* Replace `@grpc/grpc-js` interceptors with `@protobuf-ts/runtime-rpc` ones

* Replace string check with check on metadata, add missing `AddMetadataToRetryableError`

* Add `pin` to sensitive properties

It's needed because now we also log a passwordless login stream call.

* Add `cloneClient` method to clone the entire gRPC client

* Switch tests to `TshdRetryableError`

* Improve comments

* Move `cloneClient` and `cloneAbortSignal` to the top of the file

* Simplify condition

* Lowercase logs

* Check if the error is `RpcError` using `instanceof`

* Log error object instead of `[object Object]`

* Do not export call specific types

* Wrap gRPC calls in `createClient` to allow passing the errors over the context bridge (#39230)

* Regenerate protos with the `protobuf-ts` client

* Enable `strictBindCallApply` so `.bind()` results have correct types (instead of `any`)

This is needed for wrapping calls in `createClient`.

* Use `protobuf-ts` client instead of `grpc-js` one

* Convert `createClient` to use `protobuf-ts` response style, clone each call

* Switch callsites to `cloneAbortSignal`

* Replace `error.message` checks with a proper check on the error status code

* Clone the entire client instead of each method separately

* Correct the error `cause` in `ResourceSearchError`

* Remove `params.sortBy` defaults, always set `startKey` to string

* Use a simpler type for `reportUsageEvent`

* Fix interceptor test

* Ignore TS error in `highbar.ts`
2024-03-18 16:33:16 +00:00
Rafał Cieślak 40cfacf601 Update eslint-plugin-jest to 27.9.0, switch to recommended rules only (#39226)
* Update eslint-plugin-jest to 27.9.0

https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md#2600-2022-01-24
https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md#2700-2022-08-28

I switched plugin:jest/all to plugin:jest/recommended, since /all just
activates every rule in the package. This might have been fine when this
package was added a couple of years ago, but it doesn't make sense anymore.

27.0.0 requires parserOptions.project to be set, but this returned an error:

    0:0  error  Parsing error: ESLint was configured to run on
    `<tsconfigRootDir>/web/packages/teleport/vite.config.mts` using `parserOptions.project`:
    /users/rav/src/teleport/tsconfig.json
    However, that TSConfig does not include this file. Either:
    - Change ESLint's list of included files to not include this file
    - Change that TSConfig to include this file
    - Create a new TSConfig that includes this file and include it in your parserOptions.project

I updated tsconfig.node.json so that it applies only to .mts files, as
I understand that was the original intention.

* Autofix jest/valid-title

* Do not set parserOptions.project

It makes ESLint slower by ~20s and it is not needed for recommended rules
from eslint-plugin-jest.
2024-03-13 11:39:11 +00:00
Rafał Cieślak eb897e7f4a Set noEmit in tsconfig.json (#37928)
We use Vite to compile TS files, so tsc is used merely for type-checking.
Setting noEmit to true makes sure that other tools which use tsc (like
editor plugins) do not make tsc compile code.

outDir is removed as it's not needed if we do not use tsc to compile code.
2024-02-09 13:28:55 +00:00
Ryan Clark 921900798e Generate TypeScript protobuf files (#37009)
* Specify the path for protoc-gen-ts so it doesn't use @protobuf-ts/plugin

* Add TypeScript protobuf generation

* Add the TypeScript generated protobufs to gitattributes

* Add the generated TypeScript protobuf files

* Add `gen/proto/ts` everywhere `gen/proto/js` is referenced

* Use npm exec to avoid a hard-coded path

* Add --yes flag to npm exec

* Also update JS generation to use npm exec

* Specify version number in buf config

* Re-run make grpc
2024-01-26 07:50:29 +00:00
Ryan Clark c028c3140b Upgrade Vite to v5 (#35245)
* Upgrade Vite to v5

* Upgrade Vite to 5.0.5
2023-12-06 14:40:06 +00:00
Ryan Clark b32d944934 Point access-graph to the Teleport replacement code (#34882) 2023-11-22 17:28:20 +00:00
Jakub Nyckowski a09bf71b8d Add TAG UI (#34570)
* Add TAG UI

* Add missing license

* Remove elkjs
2023-11-14 16:49:42 +00:00
Rafał Cieślak 27b89c1c83 Ensure Connect My Computer agent is terminated if orphaned (#29896)
* Format tsconfig.json

* Add toEventuallyBeTrue custom matcher

The whole of web/packages/build was ignored in tsconfig.json, but it
turns out we only need to ignore the vite dir to make the type check
pass.

* Add implementation of agent cleanup daemon

* Refactor existing AgentRunner

* Refactor logging in cleanup daemon

* Provide a path to cleanup daemon in dev & prod

* Spawn cleanup daemon after spawning agent

* Add logging to agent cleanup daemon

* Document custom exit codes

* Replace inheritStdio with top level stdio variable

* Remove unnecessary backticks

* Add logsDir to RuntimeSettings

* Refactor how cleanup daemon is included in dev & packaged app
2023-08-17 10:01:36 +00:00
Bartosz Leper 853fb528fd Prevent VS Code from showing errors in tsconfig (#29808)
If tsconfig doesn't have an `outDir` option set, VS Code shows multitude of errors of the following kind:

```
Cannot write file '/Users/bartosz/code/teleport/e/web/teleport/babel.config.js' because it would overwrite input file.
```
2023-08-01 09:58:01 +00:00
Ryan Clark 471a82bd6f Move teleport over to Vite (#21168) 2023-03-21 18:01:53 +00:00
Rafał Cieślak 3ac5a0aedb Refactor prehog & teleterm protos to match project conventions (#20810)
* Adjust go_package of lib/prehog Go protobufs

This makes them follow the pattern set out by api/proto and proto.

* Adjust go_package of lib/teleterm Go protobufs

* Use single buf.gen.yaml to generate JS protos

This also entailed changing the location of lib/teleterm protos and changing
the value of their package specifier to match the conventions in other parts
of the codebase. This is a breaking change but that is fine for Connect
as the protos are used locally only and each build ships with matching
protobufs.

* Make web/packages/teleterm use protobufs from gen-proto-js

We used to copy protobufs over to web/packages/teleterm/src/services/tshd
since webapps used to be in a separate repo.

This is no longer the case, so we can just make teleterm use protobufs
from gen-proto-js.

* Move prehog & teleterm protos into proto/teleport/lib

* Generate JS protos to gen/proto/js

* Move lib/teleterm Go protobufs to gen/proto/go

* Move lib/prehog Go protobufs to gen/proto/go

* Rename lib/teleterm proto package

* Re-enable linter rules for teleterm & prehog

* Update prehogv1 path in usagereporter_test.go

* Use except instead of ignore_only to allow Google API-style responses

* Add UNARY_RPC to api/proto & proto

* Ignore gen/ when running addlicense

* buf-js.gen.yaml: Remove comment about lack of go_package for JS

* Move prehog protos to proto/prehog/v1alpha

* Adjust prehog's go_package to match proto package
2023-02-03 14:47:06 +00:00
Rafał Cieślak b94edcf450 Move tsconfig.json to root dir, remove web Makefile and Dockerfile (#20399)
* Move tsconfig.json to root dir

At the moment, it looks like the TS language server has problems with
recognizing imports when editing files inside e/web.

I figured this is probably because tsconfig.json is in web, so the lang
server doesn't recognize it when editing files from e/web.

* Remove web/Dockerfile and web/Makefile

* Misc updates to readme

* Fix links in readme
2023-01-23 11:50:16 +00:00