From 00c8e04a98492d2ea8500222b1afd69772c01c80 Mon Sep 17 00:00:00 2001 From: Emile Fugulin Date: Mon, 28 Oct 2024 11:06:37 -0400 Subject: [PATCH] Make modules public in http --- modules/llrt_http/src/blob.rs | 2 +- modules/llrt_http/src/fetch.rs | 2 +- modules/llrt_http/src/lib.rs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/llrt_http/src/blob.rs b/modules/llrt_http/src/blob.rs index 75b2583435..7fe307677d 100644 --- a/modules/llrt_http/src/blob.rs +++ b/modules/llrt_http/src/blob.rs @@ -211,7 +211,7 @@ fn bytes_from_parts<'js>( Ok(data) } -pub(crate) fn init<'js>(ctx: &Ctx<'js>, globals: &Object<'js>) -> Result<()> { +pub fn init<'js>(ctx: &Ctx<'js>, globals: &Object<'js>) -> Result<()> { if let Some(constructor) = Class::::create_constructor(ctx)? { constructor.prop( PredefinedAtom::SymbolHasInstance, diff --git a/modules/llrt_http/src/fetch.rs b/modules/llrt_http/src/fetch.rs index ff1f02d32a..a6671072e1 100644 --- a/modules/llrt_http/src/fetch.rs +++ b/modules/llrt_http/src/fetch.rs @@ -24,7 +24,7 @@ use super::{blob::Blob, headers::Headers, response::Response, security::ensure_u const MAX_REDIRECT_COUNT: u32 = 20; -pub(crate) fn init(client: Client>, globals: &Object) -> Result<()> +pub fn init(client: Client>, globals: &Object) -> Result<()> where C: Clone + Send + Sync + Connect + 'static, { diff --git a/modules/llrt_http/src/lib.rs b/modules/llrt_http/src/lib.rs index 314bdc3645..9712b88671 100644 --- a/modules/llrt_http/src/lib.rs +++ b/modules/llrt_http/src/lib.rs @@ -22,14 +22,14 @@ use webpki_roots::TLS_SERVER_ROOTS; pub use self::security::{get_allow_list, get_deny_list, set_allow_list, set_deny_list}; use self::{file::File, headers::Headers, request::Request, response::Response}; -mod blob; +pub mod blob; mod body; -mod fetch; -mod file; -mod headers; +pub mod fetch; +pub mod file; +pub mod headers; mod incoming; -mod request; -mod response; +pub mod request; +pub mod response; mod security; const DEFAULT_CONNECTION_POOL_IDLE_TIMEOUT: Duration = Duration::from_secs(15);