-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update rust functions #600
Conversation
10da959
to
6a86cbc
Compare
@@ -19,6 +19,8 @@ description = "t:description" | |||
|
|||
[extensions.build] | |||
command = "cargo build --target=wasm32-wasip1 --release" | |||
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm" | |||
path = "target/wasm32-wasip1/release/discount-function-rust.wasm/{{handle | replace: " ", "-" | downcase}}.wasm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems wrong
watch = [ "src/**/*.rs" ] | ||
|
||
[extensions.ui] | ||
handle = "{{handle}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this in default? I don't think so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use the handle from the extension generate command.
#[serde(default)] | ||
add_product_discounts: Option<ProductDiscounts>, | ||
#[serde(default)] | ||
add_order_discounts: Option<OrderDiscounts>, | ||
#[serde(default)] | ||
add_discount_code_validations: Option<ValidDiscountCodes>, | ||
// Ignore other operation types that might be in the response but we don't use in cart context | ||
#[serde(flatten)] | ||
_other: std::collections::HashMap<String, serde_json::Value>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. Left some notes cause I think some of the changes are wrong (some I had to manually change after the script). I also made the change to 2025-04 thinking that this is what we wanted, as we generally don't ask devs to use unstable, but I guess that is our only option until this api is released.
We should update to 2025-04 as soon as we're ready to release, but I wanted the template to still work for our internal testing. 🙇♂️ |
Updating rust functions to match mock-http-server.