bump kittycad.rs (#348)
fixups Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
7
src/wasm-lib/Cargo.lock
generated
7
src/wasm-lib/Cargo.lock
generated
@ -947,7 +947,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bson",
|
"bson",
|
||||||
@ -975,9 +975,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.2.20"
|
version = "0.2.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e71916b50966110cb9f70aa6c310748a153fdcb0183a02615324a6f457fd18e8"
|
checksum = "dfeb41d39852f5755cd3f2d1c06059839f268cbc5d0577c2d6a667c6ad5abdcf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.21.2",
|
"base64 0.21.2",
|
||||||
@ -989,6 +989,7 @@ dependencies = [
|
|||||||
"phonenumber",
|
"phonenumber",
|
||||||
"schemars",
|
"schemars",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_bytes",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"url",
|
"url",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
description = "KittyCAD Language"
|
description = "KittyCAD Language"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
@ -71,10 +71,12 @@ impl EngineConnection {
|
|||||||
loop {
|
loop {
|
||||||
match tcp_read.read().await {
|
match tcp_read.read().await {
|
||||||
Ok(ws_resp) => {
|
Ok(ws_resp) => {
|
||||||
if !ws_resp.success {
|
if let Some(success) = ws_resp.success {
|
||||||
println!("got ws errors: {:?}", ws_resp.errors);
|
if !success {
|
||||||
export_notifier.notify_one();
|
println!("got ws errors: {:?}", ws_resp.errors);
|
||||||
continue;
|
export_notifier.notify_one();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(msg) = ws_resp.resp {
|
if let Some(msg) = ws_resp.resp {
|
||||||
|
@ -96,6 +96,7 @@ impl<'a> Args<'a> {
|
|||||||
engine,
|
engine,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_modeling_cmd(&mut self, id: uuid::Uuid, cmd: kittycad::types::ModelingCmd) -> Result<(), KclError> {
|
pub fn send_modeling_cmd(&mut self, id: uuid::Uuid, cmd: kittycad::types::ModelingCmd) -> Result<(), KclError> {
|
||||||
self.engine.send_modeling_cmd(id, self.source_range, cmd)
|
self.engine.send_modeling_cmd(id, self.source_range, cmd)
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,10 @@ pub async fn execute_wasm(
|
|||||||
pub fn deserialize_files(data: &[u8]) -> Result<JsValue, JsError> {
|
pub fn deserialize_files(data: &[u8]) -> Result<JsValue, JsError> {
|
||||||
let ws_resp: kittycad::types::WebSocketResponse = bson::from_slice(data)?;
|
let ws_resp: kittycad::types::WebSocketResponse = bson::from_slice(data)?;
|
||||||
|
|
||||||
if !ws_resp.success {
|
if let Some(success) = ws_resp.success {
|
||||||
return Err(JsError::new(&format!("Server returned error: {:?}", ws_resp.errors)));
|
if !success {
|
||||||
|
return Err(JsError::new(&format!("Server returned error: {:?}", ws_resp.errors)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(kittycad::types::OkWebSocketResponseData::Export { files }) = ws_resp.resp {
|
if let Some(kittycad::types::OkWebSocketResponseData::Export { files }) = ws_resp.resp {
|
||||||
|
Reference in New Issue
Block a user