rds_ssm_connect 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/App.svelte CHANGED
@@ -5,7 +5,6 @@ import SavedConnections from './lib/SavedConnections.svelte'
5
5
  import ConnectionForm from './lib/ConnectionForm.svelte'
6
6
  import SessionStatus from './lib/SessionStatus.svelte'
7
7
  import UpdateBanner from './lib/UpdateBanner.svelte'
8
- import PrerequisitesCheck from './lib/PrerequisitesCheck.svelte'
9
8
  import Settings from './lib/Settings.svelte'
10
9
  import ConfirmDialog from './lib/ConfirmDialog.svelte'
11
10
 
@@ -36,9 +35,6 @@ let showCloseConfirm = $state(false)
36
35
  let isCheckingUpdates = $state(false)
37
36
  let updateCheckMessage = $state('')
38
37
 
39
- // Prerequisites and Settings
40
- let showPrerequisites = $state(false)
41
- let prerequisitesData = $state([])
42
38
  let showSettings = $state(false)
43
39
 
44
40
  let invoke = null
@@ -185,9 +181,8 @@ async function initApp() {
185
181
  loadingProjects = false
186
182
  }
187
183
 
188
- // Non-blocking checks
184
+ // Non-blocking update check
189
185
  checkForUpdates()
190
- checkPrerequisites()
191
186
  }
192
187
 
193
188
  function retryInit() {
@@ -245,22 +240,6 @@ async function checkForUpdates() {
245
240
  }
246
241
  }
247
242
 
248
- async function checkPrerequisites() {
249
- try {
250
- const result = await invoke('check_prerequisites')
251
- if (!result.allInstalled) {
252
- prerequisitesData = result.prerequisites
253
- showPrerequisites = true
254
- }
255
- } catch (_err) {}
256
- }
257
-
258
- async function openUrl(url) {
259
- try {
260
- await invoke('open_url', { url })
261
- } catch (_err) {}
262
- }
263
-
264
243
  async function loadProfiles() {
265
244
  if (!selectedProject) return
266
245
  try {
@@ -667,14 +646,6 @@ const isAlreadySaved = $derived(
667
646
  />
668
647
  {/if}
669
648
 
670
- {#if showPrerequisites}
671
- <PrerequisitesCheck
672
- prerequisites={prerequisitesData}
673
- onDismiss={() => showPrerequisites = false}
674
- onOpenUrl={openUrl}
675
- />
676
- {/if}
677
-
678
649
  {#if showSettings}
679
650
  <Settings
680
651
  onClose={() => showSettings = false}
@@ -3050,7 +3050,7 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
3050
3050
 
3051
3051
  [[package]]
3052
3052
  name = "rds-ssm-connect"
3053
- version = "1.8.6"
3053
+ version = "2.0.2"
3054
3054
  dependencies = [
3055
3055
  "reqwest 0.12.28",
3056
3056
  "semver",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "rds-ssm-connect"
3
- version = "2.0.0"
3
+ version = "2.0.2"
4
4
  description = "Secure RDS connections through AWS SSM"
5
5
  authors = ["Iaroslav Pyrogov"]
6
6
  edition = "2024"
@@ -913,135 +913,6 @@ async fn quit_app(
913
913
  Ok(())
914
914
  }
915
915
 
916
- // ========================
917
- // PREREQUISITES CHECK
918
- // ========================
919
-
920
- #[derive(Serialize, Deserialize, Debug, Clone)]
921
- pub struct PrerequisiteStatus {
922
- pub name: String,
923
- pub installed: bool,
924
- pub version: Option<String>,
925
- #[serde(rename = "installUrl")]
926
- pub install_url: String,
927
- #[serde(rename = "installCommand")]
928
- pub install_command: Option<String>,
929
- }
930
-
931
- #[derive(Serialize, Deserialize, Debug, Clone)]
932
- pub struct PrerequisitesResult {
933
- #[serde(rename = "allInstalled")]
934
- pub all_installed: bool,
935
- pub prerequisites: Vec<PrerequisiteStatus>,
936
- }
937
-
938
- #[tauri::command]
939
- async fn check_prerequisites() -> Result<PrerequisitesResult, String> {
940
- // Run all blocking I/O on a dedicated thread to avoid starving the Tokio runtime
941
- tokio::task::spawn_blocking(move || {
942
- use std::process::Command;
943
-
944
- // Common paths where tools might be installed
945
- let home = std::env::var("HOME").unwrap_or_default();
946
- let local_bin = format!("{}/.local/bin", home);
947
- let search_paths: Vec<&str> = vec![
948
- "/usr/local/bin",
949
- "/opt/homebrew/bin",
950
- "/usr/bin",
951
- "/bin",
952
- &local_bin,
953
- ];
954
-
955
- fn find_command(name: &str, search_paths: &[&str]) -> Option<std::path::PathBuf> {
956
- // First try PATH
957
- if let Ok(output) = std::process::Command::new("which").arg(name).output()
958
- && output.status.success() {
959
- let path = String::from_utf8_lossy(&output.stdout).trim().to_string();
960
- if !path.is_empty() {
961
- return Some(std::path::PathBuf::from(path));
962
- }
963
- }
964
- // Then search common paths
965
- for dir in search_paths {
966
- let path = std::path::Path::new(dir).join(name);
967
- if path.exists() {
968
- return Some(path);
969
- }
970
- }
971
- None
972
- }
973
-
974
- let mut prerequisites = Vec::new();
975
-
976
- // aws-vault and AWS CLI are no longer required — the app uses
977
- // AWS SDK v3 natively for all API calls and credential resolution.
978
- // Only the Session Manager Plugin is still needed for port forwarding.
979
-
980
- // Check Session Manager Plugin — also check the app bundle directory
981
- // (Tauri places externalBin entries next to the main binary at runtime)
982
- let exe_dir = std::env::current_exe()
983
- .ok()
984
- .and_then(|p| p.parent().map(|d| d.to_path_buf()));
985
-
986
- let bundled_plugin = exe_dir.as_ref().and_then(|dir| {
987
- let candidate = dir.join("session-manager-plugin");
988
- if candidate.exists() { Some(candidate) } else { None }
989
- });
990
-
991
- let ssm_plugin = if let Some(ref bundled_path) = bundled_plugin {
992
- // Plugin is bundled with the app
993
- let version = Command::new(bundled_path).arg("--version").output()
994
- .ok()
995
- .filter(|o| o.status.success())
996
- .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string());
997
- PrerequisiteStatus {
998
- name: "Session Manager Plugin".to_string(),
999
- installed: true,
1000
- version: version.or_else(|| Some("bundled".to_string())),
1001
- install_url: "https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html".to_string(),
1002
- install_command: None,
1003
- }
1004
- } else {
1005
- // Not bundled — check system PATH and known paths
1006
- match find_command("session-manager-plugin", &search_paths) {
1007
- Some(path) => match Command::new(&path).arg("--version").output() {
1008
- Ok(output) if output.status.success() => PrerequisiteStatus {
1009
- name: "Session Manager Plugin".to_string(),
1010
- installed: true,
1011
- version: Some(String::from_utf8_lossy(&output.stdout).trim().to_string()),
1012
- install_url: "https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html".to_string(),
1013
- install_command: None,
1014
- },
1015
- _ => PrerequisiteStatus {
1016
- name: "Session Manager Plugin".to_string(),
1017
- installed: false,
1018
- version: None,
1019
- install_url: "https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html".to_string(),
1020
- install_command: None,
1021
- },
1022
- },
1023
- None => PrerequisiteStatus {
1024
- name: "Session Manager Plugin".to_string(),
1025
- installed: false,
1026
- version: None,
1027
- install_url: "https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html".to_string(),
1028
- install_command: None,
1029
- },
1030
- }
1031
- };
1032
- prerequisites.push(ssm_plugin);
1033
-
1034
- let all_installed = prerequisites.iter().all(|p| p.installed);
1035
-
1036
- Ok(PrerequisitesResult {
1037
- all_installed,
1038
- prerequisites,
1039
- })
1040
- })
1041
- .await
1042
- .map_err(|e| format!("Prerequisites check task failed: {}", e))?
1043
- }
1044
-
1045
916
  // ========================
1046
917
  // AWS CONFIG MANAGEMENT
1047
918
  // ========================
@@ -1358,8 +1229,6 @@ pub fn run() {
1358
1229
  get_current_version,
1359
1230
  open_url,
1360
1231
  quit_app,
1361
- // Prerequisites commands
1362
- check_prerequisites,
1363
1232
  // AWS config commands
1364
1233
  read_aws_config,
1365
1234
  save_aws_profile,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://schema.tauri.app/config/2",
3
3
  "productName": "RDS SSM Connect",
4
- "version": "2.0.0",
4
+ "version": "2.0.2",
5
5
  "identifier": "com.rds-ssm-connect.desktop",
6
6
  "build": {
7
7
  "beforeDevCommand": "npm run dev:vite",