@cmssy/core 19.27.0 → 19.28.1
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/locale.cjs +1 -1
- package/dist/internal/locale.js +1 -1
- package/dist/internal.cjs +14 -2
- package/dist/internal.js +14 -2
- package/dist/preflight.cjs +2 -2
- package/dist/preflight.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/internal/locale.cjs
CHANGED
package/dist/internal/locale.js
CHANGED
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.
|
|
157
|
+
var CMSSY_CORE_VERSION = "19.28.1" ;
|
|
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
|
|
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.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.28.1" ;
|
|
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
|
|
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,
|
package/dist/preflight.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function documentText(document) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/version.ts
|
|
155
|
-
var CMSSY_CORE_VERSION = "19.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.28.1" ;
|
|
156
156
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
157
157
|
|
|
158
158
|
// src/content/content-client.ts
|
|
@@ -181,7 +181,7 @@ var REQUIRED_ENV = [
|
|
|
181
181
|
["workspaceSlug", "CMSSY_WORKSPACE_SLUG"],
|
|
182
182
|
["draftSecret", "CMSSY_DRAFT_SECRET"]
|
|
183
183
|
];
|
|
184
|
-
var SETTINGS_FIX = "copy the values from Settings \u2192 Headless in the cmssy dashboard, or run npx @cmssy/cli link";
|
|
184
|
+
var SETTINGS_FIX = "copy the values from Settings \u2192 Headless in the cmssy dashboard, or run npx @cmssy/cli@latest link";
|
|
185
185
|
async function collectEditDiagnostics(input) {
|
|
186
186
|
const { config } = input;
|
|
187
187
|
const checks = [];
|
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.
|
|
153
|
+
var CMSSY_CORE_VERSION = "19.28.1" ;
|
|
154
154
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
155
155
|
|
|
156
156
|
// src/content/content-client.ts
|
|
@@ -179,7 +179,7 @@ var REQUIRED_ENV = [
|
|
|
179
179
|
["workspaceSlug", "CMSSY_WORKSPACE_SLUG"],
|
|
180
180
|
["draftSecret", "CMSSY_DRAFT_SECRET"]
|
|
181
181
|
];
|
|
182
|
-
var SETTINGS_FIX = "copy the values from Settings \u2192 Headless in the cmssy dashboard, or run npx @cmssy/cli link";
|
|
182
|
+
var SETTINGS_FIX = "copy the values from Settings \u2192 Headless in the cmssy dashboard, or run npx @cmssy/cli@latest link";
|
|
183
183
|
async function collectEditDiagnostics(input) {
|
|
184
184
|
const { config } = input;
|
|
185
185
|
const checks = [];
|