@replohq/sdk 1.11.1 → 1.11.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.
@@ -8,7 +8,7 @@ async function CartLoader({
8
8
  country,
9
9
  shouldReconcileSuppliedCart
10
10
  }) {
11
- const cart = false ? null : await getCartAction().catch((error) => {
11
+ const cart = process.env.NODE_ENV === "development" ? null : await getCartAction().catch((error) => {
12
12
  unstable_rethrow(error);
13
13
  console.warn("[Replo] Failed to load cart:", error);
14
14
  return null;
@@ -15,7 +15,7 @@ function getCartCookieOptions() {
15
15
  }
16
16
  return {
17
17
  ...sharedOptions,
18
- secure: true,
18
+ secure: process.env.NODE_ENV === "production",
19
19
  sameSite: "lax"
20
20
  };
21
21
  }
package/content.js CHANGED
@@ -370,7 +370,7 @@ async function getEntryListingStatus({
370
370
  slug,
371
371
  contentSource
372
372
  }) {
373
- if (true) {
373
+ if (process.env.NODE_ENV !== "development") {
374
374
  return "published";
375
375
  }
376
376
  const [draft, publishedCopy] = await Promise.all([
@@ -445,7 +445,7 @@ async function readVisibleEntry({
445
445
  if (getContentEntryFieldValidationIssues({
446
446
  fields: collectionSchema.fields,
447
447
  values,
448
- requireRequiredFields: true
448
+ requireRequiredFields: process.env.NODE_ENV !== "development"
449
449
  }).length > 0) {
450
450
  return null;
451
451
  }
package/env.js CHANGED
@@ -13,7 +13,7 @@ const wranglerConfigSchema = z.object({ vars: envSchema });
13
13
  class MissingWranglerConfigError extends CanopyError {
14
14
  }
15
15
  const isDeployedWorker = () => {
16
- return process.env.BUILD_ENV !== "build" && process.env.NEXT_PHASE !== "phase-production-build";
16
+ return process.env.NODE_ENV === "production" && process.env.BUILD_ENV !== "build" && process.env.NEXT_PHASE !== "phase-production-build";
17
17
  };
18
18
  const getEnv = async () => {
19
19
  if (isDeployedWorker()) {
@@ -78,7 +78,7 @@ class CanopyApiGateway {
78
78
  });
79
79
  } catch (error) {
80
80
  let message = `Failed to POST to canopy-api at ${url}: ${error}`;
81
- if (false) {
81
+ if (process.env.NODE_ENV !== "production") {
82
82
  message += `
83
83
 
84
84
  apiHost: ${this.apiHost}
@@ -98,7 +98,7 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
98
98
  return await fetch(url, { signal: abortController.signal });
99
99
  } catch (error) {
100
100
  let message = `Failed to GET from canopy-api at ${url}: ${error}`;
101
- if (false) {
101
+ if (process.env.NODE_ENV !== "production") {
102
102
  message += `
103
103
 
104
104
  apiHost: ${this.apiHost}
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "branch": "HEAD",
5
- "commit": "2fa39d32578073f6dfa2ad2d093a726cdedeb108",
6
- "builtAt": "2026-09-21T18:23:00.156Z"
5
+ "commit": "f02cf0301b5a644ce494911576c7640be6d43050",
6
+ "builtAt": "2026-09-21T23:29:22.214Z"
7
7
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  const LoaderErrorDetailsContext = React.createContext(false);
5
5
  function LoaderErrorDetailsProvider({
@@ -52,7 +52,7 @@ class LoaderErrorBoundary extends React.Component {
52
52
  if (!this.state.hasError) {
53
53
  return this.props.children;
54
54
  }
55
- if (false) {
55
+ if (process.env.NODE_ENV !== "production" && this.context) {
56
56
  return /* @__PURE__ */ jsxs(Fragment, { children: [
57
57
  this.props.fallback,
58
58
  /* @__PURE__ */ jsx(LoaderErrorDetails, { error: this.state.error })
@@ -1,6 +1,6 @@
1
1
  import "server-only";
2
2
  function shouldShowLoaderErrorDetails() {
3
- return false;
3
+ return process.env.NODE_ENV === "development" && !process.env.IS_REPLO_SANDBOX;
4
4
  }
5
5
  export {
6
6
  shouldShowLoaderErrorDetails
@@ -180,7 +180,7 @@ function resolvePreviewPlaceholderData({
180
180
  return null;
181
181
  }
182
182
  if (typeof window === "undefined") {
183
- return false ? placeholderData : null;
183
+ return process.env.NODE_ENV === "development" ? placeholderData : null;
184
184
  }
185
185
  return window.parent === window ? null : placeholderData;
186
186
  }
@@ -20,7 +20,7 @@ function cloudflareLoader({
20
20
  width,
21
21
  quality
22
22
  }) {
23
- const isDevelopment = false;
23
+ const isDevelopment = process.env.NODE_ENV === "development";
24
24
  const params = [`width=${width}`, `quality=${quality ?? 75}`, "format=auto"];
25
25
  if (/^https:\/\//i.test(src)) {
26
26
  let hostname;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.11.1",
6
+ "version": "1.11.2",
7
7
  "branch": "HEAD",
8
- "commit": "2fa39d32578073f6dfa2ad2d093a726cdedeb108",
9
- "builtAt": "2026-09-21T18:23:00.156Z"
8
+ "commit": "f02cf0301b5a644ce494911576c7640be6d43050",
9
+ "builtAt": "2026-09-21T23:29:22.214Z"
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",