diff --git a/src/wasm-lib/Cargo.lock b/src/wasm-lib/Cargo.lock index 34b3d2836..360dc5708 100644 --- a/src/wasm-lib/Cargo.lock +++ b/src/wasm-lib/Cargo.lock @@ -1417,6 +1417,7 @@ dependencies = [ "futures", "git_rev", "gltf-json", + "http 0.2.12", "iai", "image", "insta", @@ -1481,9 +1482,9 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.3.14" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce5e9c51976882cdf6777557fd8c3ee68b00bb53e9307fc1721acb397f2ece9a" +checksum = "1a9621df809fa105ae28b01586c52ce46561e166702babb50e5bcc5097a8ce62" dependencies = [ "anyhow", "async-trait", @@ -1869,7 +1870,7 @@ dependencies = [ "bincode", "either", "fnv", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "nom", "quick-xml", diff --git a/src/wasm-lib/Cargo.toml b/src/wasm-lib/Cargo.toml index cd68fcee4..fa7e13048 100644 --- a/src/wasm-lib/Cargo.toml +++ b/src/wasm-lib/Cargo.toml @@ -70,7 +70,8 @@ members = [ ] [workspace.dependencies] -kittycad = { version = "0.3.14", default-features = false, features = ["js", "requests"] } +http = "0.2.12" +kittycad = { version = "0.3.16", default-features = false, features = ["js", "requests"] } kittycad-modeling-session = "0.1.4" [[test]] diff --git a/src/wasm-lib/kcl/Cargo.toml b/src/wasm-lib/kcl/Cargo.toml index 7d5857bf0..8939b732d 100644 --- a/src/wasm-lib/kcl/Cargo.toml +++ b/src/wasm-lib/kcl/Cargo.toml @@ -25,6 +25,7 @@ form_urlencoded = "1.2.1" futures = { version = "0.3.30" } git_rev = "0.1.0" gltf-json = "1.4.1" +http = { workspace = true } image = { version = "0.25.1", default-features = false, features = ["png"] } kittycad = { workspace = true, features = ["clap"] } lazy_static = "1.5.0" diff --git a/src/wasm-lib/kcl/src/executor.rs b/src/wasm-lib/kcl/src/executor.rs index e7f7c81f5..1759c9191 100644 --- a/src/wasm-lib/kcl/src/executor.rs +++ b/src/wasm-lib/kcl/src/executor.rs @@ -1663,9 +1663,13 @@ impl From for ExecutorSettings { impl ExecutorContext { /// Create a new default executor context. + /// Also returns the response HTTP headers from the server. #[cfg(not(target_arch = "wasm32"))] - pub async fn new(client: &kittycad::Client, settings: ExecutorSettings) -> Result { - let ws = client + pub async fn new_with_headers( + client: &kittycad::Client, + settings: ExecutorSettings, + ) -> Result<(Self, http::HeaderMap)> { + let (ws, headers) = client .modeling() .commands_ws( None, @@ -1697,13 +1701,21 @@ impl ExecutorContext { ) .await?; - Ok(Self { + let slf = Self { engine, fs: Arc::new(FileManager::new()), stdlib: Arc::new(StdLib::new()), settings, is_mock: false, - }) + }; + Ok((slf, headers)) + } + + #[cfg(not(target_arch = "wasm32"))] + /// Create a new default executor context. + pub async fn new(client: &kittycad::Client, settings: ExecutorSettings) -> Result { + let (slf, _headers) = Self::new_with_headers(client, settings).await?; + Ok(slf) } /// For executing unit tests. diff --git a/src/wasm-lib/kcl/src/std/shell.rs b/src/wasm-lib/kcl/src/std/shell.rs index f43e32ff3..64e8fbe2b 100644 --- a/src/wasm-lib/kcl/src/std/shell.rs +++ b/src/wasm-lib/kcl/src/std/shell.rs @@ -119,6 +119,7 @@ async fn inner_shell( args.batch_modeling_cmd( uuid::Uuid::new_v4(), ModelingCmd::Solid3DShellFace { + hollow: false, face_ids, object_id: extrude_group.id, shell_thickness: data.thickness,