@replohq/sdk 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { unstable_rethrow } from "next/navigation";
2
3
  import { getCartAction } from "./cart-actions";
3
4
  import { CartProvider } from "./cart-provider";
4
5
  async function CartLoader({ children }) {
5
- const cart = process.env.NODE_ENV === "development" ? null : await getCartAction();
6
+ const cart = process.env.NODE_ENV === "development" ? null : await getCartAction().catch((error) => {
7
+ unstable_rethrow(error);
8
+ console.warn("[Replo] Failed to load cart:", error);
9
+ return null;
10
+ });
6
11
  return /* @__PURE__ */ jsx(CartProvider, { cart, children });
7
12
  }
8
13
  export {
@@ -223,7 +223,7 @@ function CartProvider({
223
223
  setIsCartOpen(false);
224
224
  }, []);
225
225
  const refreshCart = React.useCallback(async () => {
226
- const refreshedCart = await getCartAction();
226
+ const refreshedCart = await getCartAction().catch(() => null);
227
227
  if (!isMounted.current || !refreshedCart || pendingMutations.current !== 0) {
228
228
  return;
229
229
  }
@@ -5,13 +5,8 @@ class ResolverCartGateway {
5
5
  return cart;
6
6
  }
7
7
  async getCart(cartId) {
8
- try {
9
- const gateway = await getCanopyApiGateway();
10
- return await gateway.cartGet({ cartId });
11
- } catch (error) {
12
- console.warn(`Cart ${cartId} not found via canopy-api:`, error);
13
- return null;
14
- }
8
+ const gateway = await getCanopyApiGateway();
9
+ return await gateway.cartGet({ cartId });
15
10
  }
16
11
  async createCart(lines, discountCodes) {
17
12
  try {
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "branch": "HEAD",
5
- "commit": "769a5347144bb3d6c77b6f06b075c8f6ad45a6b3",
6
- "builtAt": "2026-09-16T18:01:00.137Z"
5
+ "commit": "7407a78e134aa5a47d0a2f79e9a559ace18e6b9a",
6
+ "builtAt": "2026-09-16T19:55:10.518Z"
7
7
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.8.1",
6
+ "version": "1.8.2",
7
7
  "branch": "HEAD",
8
- "commit": "769a5347144bb3d6c77b6f06b075c8f6ad45a6b3",
9
- "builtAt": "2026-09-16T18:01:00.137Z"
8
+ "commit": "7407a78e134aa5a47d0a2f79e9a559ace18e6b9a",
9
+ "builtAt": "2026-09-16T19:55:10.518Z"
10
10
  },
11
11
  "description": "Replo SDK — cart, analytics, and data loaders for agent-built Next.js sites.",
12
12
  "license": "SEE LICENSE IN LICENSE",