Honor workspace connection settings in CLI sends (#537)

This commit is contained in:
Gregory Schier
2026-08-14 10:38:47 -07:00
committed by GitHub
parent 912aaeb7a7
commit d3055c64b3
6 changed files with 29 additions and 44 deletions
+1 -1
View File
@@ -585,7 +585,7 @@ async fn send_http_request_by_id(
encryption_manager: ctx.encryption_manager.clone(),
plugin_context: &plugin_context,
cancelled_rx: None,
connection_manager: None,
connection_manager: ctx.connection_manager(),
})
.await;
+8
View File
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;
use tokio::sync::Mutex;
use yaak_crypto::manager::EncryptionManager;
use yaak_http::manager::HttpConnectionManager;
use yaak_models::blob_manager::BlobManager;
use yaak_models::client_db::ClientDb;
use yaak_models::query_manager::QueryManager;
@@ -31,6 +32,7 @@ pub struct CliContext {
query_manager: QueryManager,
blob_manager: BlobManager,
pub encryption_manager: Arc<EncryptionManager>,
connection_manager: Arc<HttpConnectionManager>,
plugin_manager: Option<Arc<PluginManager>>,
plugin_event_bridge: Mutex<Option<CliPluginEventBridge>>,
}
@@ -54,6 +56,7 @@ impl CliContext {
query_manager,
blob_manager,
encryption_manager,
connection_manager: Arc::new(HttpConnectionManager::new()),
plugin_manager: None,
plugin_event_bridge: Mutex::new(None),
}
@@ -91,6 +94,7 @@ impl CliContext {
self.query_manager.clone(),
self.blob_manager.clone(),
self.encryption_manager.clone(),
self.connection_manager.clone(),
self.data_dir.clone(),
execution_context,
)
@@ -120,6 +124,10 @@ impl CliContext {
&self.blob_manager
}
pub fn connection_manager(&self) -> &HttpConnectionManager {
&self.connection_manager
}
pub fn plugin_manager(&self) -> Arc<PluginManager> {
self.plugin_manager.clone().expect("Plugin manager was not initialized for this command")
}
+5 -1
View File
@@ -15,6 +15,7 @@ use yaak::render::{render_grpc_request, render_http_request};
use yaak::send::{SendHttpRequestWithPluginsParams, send_http_request_with_plugins};
use yaak_crypto::manager::EncryptionManager;
use yaak_http::cookies::get_cookie_value_from_jar;
use yaak_http::manager::HttpConnectionManager;
use yaak_models::blob_manager::BlobManager;
use yaak_models::models::Environment;
use yaak_models::queries::any_request::AnyRequest;
@@ -42,6 +43,7 @@ struct CliHostContext {
blob_manager: BlobManager,
plugin_manager: Arc<PluginManager>,
encryption_manager: Arc<EncryptionManager>,
connection_manager: Arc<HttpConnectionManager>,
response_dir: PathBuf,
execution_context: CliExecutionContext,
}
@@ -52,6 +54,7 @@ impl CliPluginEventBridge {
query_manager: QueryManager,
blob_manager: BlobManager,
encryption_manager: Arc<EncryptionManager>,
connection_manager: Arc<HttpConnectionManager>,
data_dir: PathBuf,
execution_context: CliExecutionContext,
) -> Self {
@@ -63,6 +66,7 @@ impl CliPluginEventBridge {
blob_manager,
plugin_manager,
encryption_manager,
connection_manager,
response_dir: data_dir.join("responses"),
execution_context,
});
@@ -214,7 +218,7 @@ async fn build_plugin_reply(
encryption_manager: host_context.encryption_manager.clone(),
plugin_context: &plugin_context,
cancelled_rx: None,
connection_manager: None,
connection_manager: &host_context.connection_manager,
})
.await
{