Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			secrets-pr
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c5f46d676b | 
							
								
								
									
										1
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -3124,6 +3124,7 @@ dependencies = [ | ||||
|  "fxhash", | ||||
|  "newline-converter", | ||||
|  "once_cell", | ||||
|  "tempfile", | ||||
|  "unicode-segmentation", | ||||
|  "unicode-width 0.1.14", | ||||
| ] | ||||
|  | ||||
							
								
								
									
										15
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Cargo.toml
									
									
									
									
									
								
							| @ -14,7 +14,8 @@ members = [ | ||||
|   "harmony_composer", | ||||
|   "harmony_inventory_agent", | ||||
|   "harmony_secret_derive", | ||||
|   "harmony_secret", "adr/agent_discovery/mdns", | ||||
|   "harmony_secret", | ||||
|   "adr/agent_discovery/mdns", | ||||
| ] | ||||
| 
 | ||||
| [workspace.package] | ||||
| @ -50,7 +51,7 @@ k8s-openapi = { version = "0.25", features = ["v1_30"] } | ||||
| serde_yaml = "0.9" | ||||
| serde-value = "0.7" | ||||
| http = "1.2" | ||||
| inquire = "0.7" | ||||
| inquire = { version = "0.7", features = ["editor"] } | ||||
| convert_case = "0.8" | ||||
| chrono = "0.4" | ||||
| similar = "2" | ||||
| @ -66,5 +67,11 @@ thiserror = "2.0.14" | ||||
| serde = { version = "1.0.209", features = ["derive", "rc"] } | ||||
| serde_json = "1.0.127" | ||||
| askama = "0.14" | ||||
| sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite" ] } | ||||
| reqwest = { version = "0.12", features = ["blocking", "stream", "rustls-tls", "http2", "json"], default-features = false } | ||||
| sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } | ||||
| reqwest = { version = "0.12", features = [ | ||||
|   "blocking", | ||||
|   "stream", | ||||
|   "rustls-tls", | ||||
|   "http2", | ||||
|   "json", | ||||
| ], default-features = false } | ||||
|  | ||||
| @ -120,10 +120,26 @@ impl SecretManager { | ||||
| 
 | ||||
|             let ns = &manager.namespace; | ||||
|             let key = T::KEY; | ||||
|             let secret_json = inquire::Text::new(&format!( | ||||
|                 "Secret not found for {} {}, paste the JSON here :", | ||||
|                 ns, key | ||||
|             let secret_json = inquire::Editor::new(&format!( | ||||
|                 "Secret not found for {ns} {key}, paste the JSON here :", | ||||
|             )) | ||||
|             .with_formatter(&|data| { | ||||
|                 let char_count = data.chars().count(); | ||||
|                 if char_count == 0 { | ||||
|                     String::from("<skipped>") | ||||
|                 } else if char_count <= 20 { | ||||
|                     data.into() | ||||
|                 } else { | ||||
|                     let mut substr: String = data.chars().take(17).collect(); | ||||
|                     substr.push_str("..."); | ||||
|                     substr | ||||
|                 } | ||||
|             }) | ||||
|             .with_render_config( | ||||
|                 inquire::ui::RenderConfig::default().with_canceled_prompt_indicator( | ||||
|                     inquire::ui::Styled::new("<skipped>").with_fg(inquire::ui::Color::DarkYellow), | ||||
|                 ), | ||||
|             ) | ||||
|             .prompt() | ||||
|             .map_err(|e| { | ||||
|                 SecretStoreError::Store(format!("Failed to prompt secret {ns} {key} : {e}").into()) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user