@sprintup-cms/sdk 1.8.74 → 1.8.75

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.
@@ -169,13 +169,16 @@ function createCMSClient(options) {
169
169
  }
170
170
  async function getPreviewPage(token) {
171
171
  const { baseUrl, appId } = cfg();
172
+ console.log("[sprintup-cms] getPreviewPage called: baseUrl=", baseUrl, "appId=", appId, "tokenLength=", token?.length);
172
173
  if (!baseUrl || !appId) {
173
174
  console.warn("[sprintup-cms] getPreviewPage: Missing baseUrl or appId \u2014 returning null");
174
175
  return null;
175
176
  }
176
177
  try {
177
178
  const url = `${baseUrl}/api/v1/${appId}/preview?token=${encodeURIComponent(token)}`;
179
+ console.log("[sprintup-cms] getPreviewPage fetching:", url);
178
180
  const res = await fetch(url, { cache: "no-store" });
181
+ console.log("[sprintup-cms] getPreviewPage response:", res.status);
179
182
  if (!res.ok) {
180
183
  const errorText = await res.text().catch(() => "");
181
184
  console.error(`[sprintup-cms] getPreviewPage failed (${res.status}): ${errorText}`);