@cmssy/core 19.27.0 → 19.28.0

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.
package/dist/index.cjs CHANGED
@@ -225,7 +225,7 @@ function documentText(document2) {
225
225
  }
226
226
 
227
227
  // src/version.ts
228
- var CMSSY_CORE_VERSION = "19.27.0" ;
228
+ var CMSSY_CORE_VERSION = "19.28.0" ;
229
229
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
230
230
 
231
231
  // src/data/http.ts
package/dist/index.js CHANGED
@@ -224,7 +224,7 @@ function documentText(document2) {
224
224
  }
225
225
 
226
226
  // src/version.ts
227
- var CMSSY_CORE_VERSION = "19.27.0" ;
227
+ var CMSSY_CORE_VERSION = "19.28.0" ;
228
228
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
229
229
 
230
230
  // src/data/http.ts
@@ -154,7 +154,7 @@ function documentText(document) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.27.0" ;
157
+ var CMSSY_CORE_VERSION = "19.28.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.27.0" ;
155
+ var CMSSY_CORE_VERSION = "19.28.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
package/dist/internal.cjs CHANGED
@@ -154,7 +154,7 @@ function documentText(document2) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.27.0" ;
157
+ var CMSSY_CORE_VERSION = "19.28.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -384,6 +384,7 @@ var PUBLIC_PAGE_DEV_QUERY = typedOperation(`query PublicPage($workspaceSlug: Str
384
384
  id
385
385
  slug
386
386
  pageType
387
+ devPreviewApplied
387
388
  blocks { id type content style advanced }
388
389
  publishedBlocks { id type content style advanced }
389
390
  }
@@ -446,6 +447,15 @@ function normalizeSlug(path) {
446
447
  if (!path || path === "/") return "/";
447
448
  return path.startsWith("/") ? path : `/${path}`;
448
449
  }
450
+ var devPreviewRefusalsWarned = /* @__PURE__ */ new Set();
451
+ function warnDevPreviewRefused(config) {
452
+ const key = `${config.org}/${config.workspaceSlug}`;
453
+ if (devPreviewRefusalsWarned.has(key)) return;
454
+ devPreviewRefusalsWarned.add(key);
455
+ console.warn(
456
+ `cmssy: devToken was not accepted for dev preview on ${key} - its user must own the workspace or hold site:preview_dev there. Rendering published content; the editor's dev draft will not show on this host until the token is fixed.`
457
+ );
458
+ }
449
459
  async function fetchPage(config, path, options = {}) {
450
460
  const slug = normalizeSlug(path);
451
461
  const trimmedSecret = options.previewSecret?.trim();
@@ -485,7 +495,9 @@ async function fetchPage(config, path, options = {}) {
485
495
  );
486
496
  const page = data?.public?.page?.get;
487
497
  if (!page) return null;
488
- const draft = previewSecret !== null || devPreview;
498
+ const devApplied = devPreview && page.devPreviewApplied === true;
499
+ if (devPreview && !devApplied) warnDevPreviewRefused(config);
500
+ const draft = previewSecret !== null || devApplied;
489
501
  const blocks = (draft ? page.blocks : page.publishedBlocks) ?? [];
490
502
  return {
491
503
  id: page.id,
package/dist/internal.js CHANGED
@@ -152,7 +152,7 @@ function documentText(document2) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.27.0" ;
155
+ var CMSSY_CORE_VERSION = "19.28.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
@@ -382,6 +382,7 @@ var PUBLIC_PAGE_DEV_QUERY = typedOperation(`query PublicPage($workspaceSlug: Str
382
382
  id
383
383
  slug
384
384
  pageType
385
+ devPreviewApplied
385
386
  blocks { id type content style advanced }
386
387
  publishedBlocks { id type content style advanced }
387
388
  }
@@ -444,6 +445,15 @@ function normalizeSlug(path) {
444
445
  if (!path || path === "/") return "/";
445
446
  return path.startsWith("/") ? path : `/${path}`;
446
447
  }
448
+ var devPreviewRefusalsWarned = /* @__PURE__ */ new Set();
449
+ function warnDevPreviewRefused(config) {
450
+ const key = `${config.org}/${config.workspaceSlug}`;
451
+ if (devPreviewRefusalsWarned.has(key)) return;
452
+ devPreviewRefusalsWarned.add(key);
453
+ console.warn(
454
+ `cmssy: devToken was not accepted for dev preview on ${key} - its user must own the workspace or hold site:preview_dev there. Rendering published content; the editor's dev draft will not show on this host until the token is fixed.`
455
+ );
456
+ }
447
457
  async function fetchPage(config, path, options = {}) {
448
458
  const slug = normalizeSlug(path);
449
459
  const trimmedSecret = options.previewSecret?.trim();
@@ -483,7 +493,9 @@ async function fetchPage(config, path, options = {}) {
483
493
  );
484
494
  const page = data?.public?.page?.get;
485
495
  if (!page) return null;
486
- const draft = previewSecret !== null || devPreview;
496
+ const devApplied = devPreview && page.devPreviewApplied === true;
497
+ if (devPreview && !devApplied) warnDevPreviewRefused(config);
498
+ const draft = previewSecret !== null || devApplied;
487
499
  const blocks = (draft ? page.blocks : page.publishedBlocks) ?? [];
488
500
  return {
489
501
  id: page.id,
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.27.0" ;
155
+ var CMSSY_CORE_VERSION = "19.28.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/content/content-client.ts
package/dist/preflight.js CHANGED
@@ -150,7 +150,7 @@ function documentText(document) {
150
150
  }
151
151
 
152
152
  // src/version.ts
153
- var CMSSY_CORE_VERSION = "19.27.0" ;
153
+ var CMSSY_CORE_VERSION = "19.28.0" ;
154
154
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
155
155
 
156
156
  // src/content/content-client.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "19.27.0",
3
+ "version": "19.28.0",
4
4
  "description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
5
5
  "keywords": [
6
6
  "cmssy",