@velastack/cms 0.2.5 → 0.2.6

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.
@@ -56,6 +56,13 @@ export type MockAdapterOptions = {
56
56
  * pending edits onto published content.
57
57
  */
58
58
  resolvePreview?: (previewKey: string) => ReleaseSnapshot | null | undefined;
59
+ /**
60
+ * Surfaced as `CmsPayload.endpoint` so the admin bar signs in against a
61
+ * hosted CMS even when content is served from memory — a static site built
62
+ * offline (`VELA_CMS_OFFLINE=1`) with fallbacks, whose editors still need
63
+ * somewhere to sign in. Unset, the loader falls back to `/api/cms`.
64
+ */
65
+ endpoint?: string;
59
66
  };
60
67
  /**
61
68
  * In-memory {@link CmsAdapter} useful for tests, demos, and local development
@@ -62,6 +62,7 @@ export const mockAdapter = (options = {}) => {
62
62
  const pageDocs = options.pageDocs ?? {};
63
63
  const resolvePreview = options.resolvePreview;
64
64
  return {
65
+ ...(options.endpoint ? { endpoint: options.endpoint } : {}),
65
66
  fetchDocs(queries, context) {
66
67
  const previewKey = context.previewKey;
67
68
  const release = previewKey && resolvePreview ? resolvePreview(previewKey) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velastack/cms",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "A scope-aware CMS for SvelteKit, for static or dynamic sites.",
5
5
  "keywords": [
6
6
  "svelte",