-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Teleport Connect over to Vite (#36921)
* Move Teleport connect over to Vite * Clean up the Electron Vite config * Add mts to prettier/eslint * Add license headers * Dedupe @babel scope * Remove console.log from mainProcess * Set suggestedReviewers on CreateAccessRequestRequest * Remove unneeded code added from strict null checks * Move out dir to build/app On masted it's build/app/dist. We don't want to use build directly, as the app is being packaged in build/release. * Move Node-only deps to dependencies https://electron-vite.org/guide/dev#dependencies-vs-devdependencies cross-env has been removed since it's not needed at all. * Remove eval warning suppression * Fix default path of tsh * Rename dev-term to start-term-skip-native-deps * Use correct `oneofKind` value for `ptyEventOneOfIsStartError` * Undo strict null check changes * Correctly construct env vars struct for shell Based on https://stackoverflow.com/a/66989401 * Allow reloading renderer app * Move JSDoc for TshdEventContextBridgeService to correct position * Remove outdated comment about type casting in tshdEvents/index.ts * Drop type cast for error.cause['message'] * Ignore teleterm's build dir in .eslintignore **/dist/** has been removed from ignorePatterns because it's no longer necessary, neither Web UI nor Connect build in a dir matching this pattern. * Define NODE_ENV for main and renderer * Define only NODE_ENV, not whole process.env Otherwise process.env in the main process is always replaced with an object containing just NODE_ENV. We need process.env to be properly populated since it's then used when spawning tsh daemon and other processes. Using define like this guarantees that only callsites using process.env.NODE_ENV directly will be affected. * Add support for the cluster preferences backend mismatch from the gRPC UserPreferences object * Return resourceIds from preferences, convert preferences before updating * Future proof all of the clusterPreferences object getting converted correctly * Fix cluster preferences for leaf clusters * Use correct `AssistViewMode` enum, remove the old one and unused interface * Lint fix * Add back in JS protobuf stuff, it can be removed in a later PR * Remove `List` from property * Add license header * Remove console.logs --------- Co-authored-by: Rafał Cieślak <[email protected]> Co-authored-by: Grzegorz Zdunek <[email protected]>
- Loading branch information
1 parent
8360fc5
commit 200553c
Showing
108 changed files
with
3,663 additions
and
4,384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
|
||
# Ignore WASM generated files: | ||
web/packages/teleport/src/ironrdp/pkg | ||
|
||
web/packages/teleterm/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Teleport | ||
* Copyright (C) 2023 Gravitational, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import type { Plugin } from 'vite'; | ||
|
||
export function cspPlugin(csp: string): Plugin { | ||
return { | ||
name: 'teleport-connect-html-plugin', | ||
transformIndexHtml(html) { | ||
return { | ||
html, | ||
tags: [ | ||
{ | ||
tag: 'meta', | ||
attrs: { | ||
'http-equiv': 'Content-Security-Policy', | ||
content: csp, | ||
}, | ||
}, | ||
], | ||
}; | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
web/packages/shared/services/unifiedResourcePreferences.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.