@replohq/sdk 1.13.5 → 1.13.6-beta.pr-27483-proof.8.1.gfe0053a

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.
@@ -142,4 +142,8 @@ export declare function coerceNumberToString(value: string | number | null): str
142
142
  */
143
143
  export declare function formatFileSize(byteCount: number, decimalPlaces?: number): string;
144
144
  export declare const sleep: (ms: number) => Promise<unknown>;
145
+ export declare function sleepWithSignal({ delayMs, signal, }: {
146
+ delayMs: number;
147
+ signal: AbortSignal | null;
148
+ }): Promise<unknown>;
145
149
  export declare function errorMessage(error: unknown): string;
@@ -1,4 +1,4 @@
1
- export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, warning } from '../../../chunk-ZKAX2FW3.mjs';
1
+ export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning } from '../../../chunk-HFKL4ZR5.mjs';
2
2
  export { isNumber_default as isNumber, isString_default as isString } from '../../../chunk-EUIVDITZ.mjs';
3
3
  export { isFunction_default as isFunction } from '../../../chunk-SSBIMQES.mjs';
4
4
  import '../../../chunk-UJCSKKID.mjs';
@@ -1,5 +1,5 @@
1
1
  import { ReploError } from '../../chunk-Y3AYABMK.mjs';
2
- import '../../chunk-ZKAX2FW3.mjs';
2
+ import '../../chunk-HFKL4ZR5.mjs';
3
3
  import '../../chunk-EUIVDITZ.mjs';
4
4
  import '../../chunk-SSBIMQES.mjs';
5
5
  import { __commonJS, __toESM } from '../../chunk-UJCSKKID.mjs';
@@ -1,5 +1,5 @@
1
1
  import { ReploError } from '../../../chunk-Y3AYABMK.mjs';
2
- import '../../../chunk-ZKAX2FW3.mjs';
2
+ import '../../../chunk-HFKL4ZR5.mjs';
3
3
  import '../../../chunk-EUIVDITZ.mjs';
4
4
  import '../../../chunk-SSBIMQES.mjs';
5
5
  import '../../../chunk-UJCSKKID.mjs';
@@ -1,6 +1,6 @@
1
1
  import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
2
2
  import { ReploError } from '../../../chunk-Y3AYABMK.mjs';
3
- import '../../../chunk-ZKAX2FW3.mjs';
3
+ import '../../../chunk-HFKL4ZR5.mjs';
4
4
  import '../../../chunk-EUIVDITZ.mjs';
5
5
  import '../../../chunk-SSBIMQES.mjs';
6
6
  import '../../../chunk-UJCSKKID.mjs';
@@ -1,11 +1,10 @@
1
1
  import type { StorefrontCountryCode } from "../loaders/markets";
2
2
  /**
3
- * Server component that loads the cart and provides it to child components
4
- * through the CartProvider context. In development mode, skips initial
5
- * cart loading to avoid cookie issues during development.
3
+ * Server component that provides the cart context to child components. The
4
+ * provider loads any persisted cart in the browser after hydration.
6
5
  *
7
6
  * @param children - Child components that will have access to the cart
8
- * @returns A CartProvider component wrapping the children with cart data
7
+ * @returns A CartProvider component wrapping the children
9
8
  */
10
9
  export declare function CartLoader({ children, country, shouldReconcileSuppliedCart, }: React.PropsWithChildren<{
11
10
  country?: StorefrontCountryCode;
@@ -1,6 +1,4 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { unstable_rethrow } from "next/navigation";
3
- import { getCartAction } from "./cart-actions";
4
2
  import { CartProvider } from "./cart-provider";
5
3
  import { SuppliedCartReconciliationBoundary } from "./supplied-cart-reconciliation";
6
4
  async function CartLoader({
@@ -8,12 +6,7 @@ async function CartLoader({
8
6
  country,
9
7
  shouldReconcileSuppliedCart
10
8
  }) {
11
- const cart = process.env.NODE_ENV === "development" ? null : await getCartAction().catch((error) => {
12
- unstable_rethrow(error);
13
- console.warn("[Replo] Failed to load cart:", error);
14
- return null;
15
- });
16
- return /* @__PURE__ */ jsx(SuppliedCartReconciliationBoundary, { enabled: shouldReconcileSuppliedCart, children: /* @__PURE__ */ jsx(CartProvider, { cart, country, children }) });
9
+ return /* @__PURE__ */ jsx(SuppliedCartReconciliationBoundary, { enabled: shouldReconcileSuppliedCart, children: /* @__PURE__ */ jsx(CartProvider, { cart: null, country, children }) });
17
10
  }
18
11
  export {
19
12
  CartLoader
@@ -689,6 +689,26 @@ function formatFileSize(byteCount, decimalPlaces = 0) {
689
689
  var sleep = async (ms) => {
690
690
  return await new Promise((resolve) => setTimeout(resolve, ms));
691
691
  };
692
+ function sleepWithSignal({
693
+ delayMs,
694
+ signal
695
+ }) {
696
+ if (signal === null) {
697
+ return sleep(delayMs);
698
+ }
699
+ signal.throwIfAborted();
700
+ return new Promise((resolve, reject) => {
701
+ const onAbort = () => {
702
+ clearTimeout(timeoutId);
703
+ reject(signal.reason);
704
+ };
705
+ const timeoutId = setTimeout(() => {
706
+ signal.removeEventListener("abort", onAbort);
707
+ resolve();
708
+ }, delayMs);
709
+ signal.addEventListener("abort", onAbort, { once: true });
710
+ });
711
+ }
692
712
  function errorMessage(error) {
693
713
  if (error instanceof Error) {
694
714
  return error.message;
@@ -700,4 +720,4 @@ function errorMessage(error) {
700
720
  return String(error);
701
721
  }
702
722
 
703
- export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty4 as hasOwnProperty, invariant, isEmpty2 as isEmpty, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, warning };
723
+ export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty4 as hasOwnProperty, invariant, isEmpty2 as isEmpty, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning };
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.13.5",
3
+ "version": "1.13.6",
4
4
  "branch": "HEAD",
5
- "commit": "478717af374584697f8e305ab76117c4aa95f444",
6
- "builtAt": "2026-09-25T08:34:14.026Z"
5
+ "commit": "fe0053a00bb3468932593a9cd60f637a58a55491",
6
+ "builtAt": "2026-10-02T15:54:20.457Z"
7
7
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.13.5",
3
+ "version": "1.13.6-beta.pr-27483-proof.8.1.gfe0053a",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.13.5",
6
+ "version": "1.13.6",
7
7
  "branch": "HEAD",
8
- "commit": "478717af374584697f8e305ab76117c4aa95f444",
9
- "builtAt": "2026-09-25T08:34:14.026Z"
8
+ "commit": "fe0053a00bb3468932593a9cd60f637a58a55491",
9
+ "builtAt": "2026-10-02T15:54:20.457Z"
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",