diff --git a/deno.json b/deno.json index 2e19c9230..571c78b0a 100644 --- a/deno.json +++ b/deno.json @@ -62,5 +62,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "version": "0.62.3" + "version": "0.62.5" } diff --git a/shopify/loaders/proxy.ts b/shopify/loaders/proxy.ts index c334e3a53..740962a0b 100644 --- a/shopify/loaders/proxy.ts +++ b/shopify/loaders/proxy.ts @@ -40,9 +40,9 @@ const buildProxyRoutes = ( ctx: AppContext; }, ) => { - const urlToUse = publicUrl ? - new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) : - new URL(`https://${storeName}.myshopify.com`); + const urlToUse = publicUrl + ? new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) + : new URL(`https://${storeName}.myshopify.com`); const hostname = urlToUse.hostname; diff --git a/vtex/actions/cart/updateItems.ts b/vtex/actions/cart/updateItems.ts index 6bcc59613..8ad1ce477 100644 --- a/vtex/actions/cart/updateItems.ts +++ b/vtex/actions/cart/updateItems.ts @@ -12,6 +12,7 @@ export interface Item { export interface Props { orderItems: Item[]; allowedOutdatedData?: Array<"paymentData">; + noSplitItem?: boolean; } /** @@ -26,6 +27,7 @@ const action = async ( const { orderItems, allowedOutdatedData = ["paymentData"], + noSplitItem, } = props; const { orderFormId } = parseCookie(req.headers); const cookie = req.headers.get("cookie") ?? ""; @@ -37,7 +39,7 @@ const action = async ( allowedOutdatedData, sc: segment?.payload.channel, }, { - body: { orderItems }, + body: { orderItems, noSplitItem: Boolean(noSplitItem) }, headers: { "content-type": "application/json", accept: "application/json", diff --git a/vtex/actions/wishlist/addItem.ts b/vtex/actions/wishlist/addItem.ts index 66de71dfd..fdc2ce1d2 100644 --- a/vtex/actions/wishlist/addItem.ts +++ b/vtex/actions/wishlist/addItem.ts @@ -1,4 +1,3 @@ -import wishlistLoader from "../../loaders/wishlist.ts"; import { AppContext } from "../../mod.ts"; import type { WishlistItem } from "../../utils/types.ts"; import { parseCookie } from "../../utils/vtexId.ts"; @@ -32,7 +31,7 @@ const action = async ( `mutation AddToWishlist($listItem: ListItemInputType!, $shopperId: String!, $name: String!, $public: Boolean) { addToList(listItem: $listItem, shopperId: $shopperId, name: $name, public: $public) @context(provider: "vtex.wish-list@1.x") }`, }, { headers: { cookie } }); - return wishlistLoader({ count: Infinity }, req, ctx); + return ctx.invoke.vtex.loaders.wishlist({ allRecords: true }); }; export default action;