@cmssy/core 12.8.0 → 12.10.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.
@@ -12,6 +12,7 @@ interface RetryPolicy {
12
12
  maxRetryAfterMs?: number;
13
13
  retryStatuses?: number[];
14
14
  }
15
+ declare const CMSSY_RATE_LIMIT_WINDOW_MS = 60000;
15
16
 
16
17
  declare const DEFAULT_CMSSY_API_URL = "https://api.cmssy.io/graphql";
17
18
  declare function resolveApiUrl(apiUrl: string | undefined): string;
@@ -44,4 +45,4 @@ declare function fetchPages(config: CmssyClientConfig, options?: Pick<FetchPageO
44
45
  declare function fetchPageMeta(config: CmssyClientConfig, path: string | string[] | undefined, options?: Pick<FetchPageOptions, "fetch" | "signal" | "retry">): Promise<CmssyPageMeta | null>;
45
46
  declare function fetchLayouts(config: CmssyClientConfig, path: string | string[] | undefined, options?: FetchPageOptions): Promise<CmssyLayoutGroup[]>;
46
47
 
47
- export { CmssyRequestError as C, DEFAULT_CMSSY_API_URL as D, type FetchLike as F, type RetryPolicy as R, type FetchLikeResponse as a, type FetchPageOptions as b, fetchPage as c, fetchPageById as d, fetchPageMeta as e, fetchLayouts as f, fetchPages as g, resolveApiUrl as r };
48
+ export { CMSSY_RATE_LIMIT_WINDOW_MS as C, DEFAULT_CMSSY_API_URL as D, type FetchLike as F, type RetryPolicy as R, CmssyRequestError as a, type FetchLikeResponse as b, type FetchPageOptions as c, fetchPage as d, fetchPageById as e, fetchLayouts as f, fetchPageMeta as g, fetchPages as h, resolveApiUrl as r };
@@ -12,6 +12,7 @@ interface RetryPolicy {
12
12
  maxRetryAfterMs?: number;
13
13
  retryStatuses?: number[];
14
14
  }
15
+ declare const CMSSY_RATE_LIMIT_WINDOW_MS = 60000;
15
16
 
16
17
  declare const DEFAULT_CMSSY_API_URL = "https://api.cmssy.io/graphql";
17
18
  declare function resolveApiUrl(apiUrl: string | undefined): string;
@@ -44,4 +45,4 @@ declare function fetchPages(config: CmssyClientConfig, options?: Pick<FetchPageO
44
45
  declare function fetchPageMeta(config: CmssyClientConfig, path: string | string[] | undefined, options?: Pick<FetchPageOptions, "fetch" | "signal" | "retry">): Promise<CmssyPageMeta | null>;
45
46
  declare function fetchLayouts(config: CmssyClientConfig, path: string | string[] | undefined, options?: FetchPageOptions): Promise<CmssyLayoutGroup[]>;
46
47
 
47
- export { CmssyRequestError as C, DEFAULT_CMSSY_API_URL as D, type FetchLike as F, type RetryPolicy as R, type FetchLikeResponse as a, type FetchPageOptions as b, fetchPage as c, fetchPageById as d, fetchPageMeta as e, fetchLayouts as f, fetchPages as g, resolveApiUrl as r };
48
+ export { CMSSY_RATE_LIMIT_WINDOW_MS as C, DEFAULT_CMSSY_API_URL as D, type FetchLike as F, type RetryPolicy as R, CmssyRequestError as a, type FetchLikeResponse as b, type FetchPageOptions as c, fetchPage as d, fetchPageById as e, fetchLayouts as f, fetchPageMeta as g, fetchPages as h, resolveApiUrl as r };
@@ -1,5 +1,5 @@
1
1
  import { CmssyClientConfig, BlockRect, BlockSchema, BlockMeta } from '@cmssy/types';
2
- import { G as GraphqlRequestOptions } from './locale-DQZ80cew.js';
2
+ import { G as GraphqlRequestOptions } from './locale-jxsO_8YF.js';
3
3
 
4
4
  declare const DEFAULT_CMSSY_EDITOR_ORIGINS: string[];
5
5
  declare function isDevelopment(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { CmssyClientConfig, BlockRect, BlockSchema, BlockMeta } from '@cmssy/types';
2
- import { G as GraphqlRequestOptions } from './locale-BS61R-fF.cjs';
2
+ import { G as GraphqlRequestOptions } from './locale-BM2fwE3O.cjs';
3
3
 
4
4
  declare const DEFAULT_CMSSY_EDITOR_ORIGINS: string[];
5
5
  declare function isDevelopment(): boolean;
package/dist/index.cjs CHANGED
@@ -85,6 +85,7 @@ var CmssyRequestError = class extends Error {
85
85
  }
86
86
  };
87
87
  var DEFAULT_RETRY_STATUSES = [429, 503];
88
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
88
89
  function retryAfterMs(response) {
89
90
  const raw = response.headers?.get("retry-after");
90
91
  if (!raw) return null;
@@ -118,7 +119,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
118
119
  const maxRetries = retry.maxRetries ?? 3;
119
120
  const baseDelayMs = retry.baseDelayMs ?? 300;
120
121
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
121
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
122
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
122
123
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
123
124
  let response = await doFetch(url, init);
124
125
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -900,6 +901,7 @@ Object.defineProperty(exports, "layoutPositionValues", {
900
901
  exports.CMSSY_EDIT_HEADER = CMSSY_EDIT_HEADER;
901
902
  exports.CMSSY_EDIT_QUERY_PARAM = CMSSY_EDIT_QUERY_PARAM;
902
903
  exports.CMSSY_LOCALE_HEADER = CMSSY_LOCALE_HEADER;
904
+ exports.CMSSY_RATE_LIMIT_WINDOW_MS = CMSSY_RATE_LIMIT_WINDOW_MS;
903
905
  exports.CMSSY_SECRET_QUERY_PARAM = CMSSY_SECRET_QUERY_PARAM;
904
906
  exports.CmssyRequestError = CmssyRequestError;
905
907
  exports.CmssyWebhookError = CmssyWebhookError;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, c as CmssyCspOptions, d as CmssyEnvConfig, e as CmssyTypedDocument, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, f as InvisibleBlocksMessage, P as PROTOCOL_VERSION, g as ParentReadyMessage, h as PatchMessage, i as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, j as SelectMessage, k as ShortcutAction, l as ShortcutMessage, V as ViewportMessage, m as applyCmssyCsp, n as createCmssyClient, o as defineCmssyConfig, p as isProtocolCompatible, q as normalizeOrigin, r as parseEditorMessage, s as postToEditor, t as resolveEditorOrigin } from './csp-DXxz0OdB.cjs';
2
- export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-BS61R-fF.cjs';
3
- export { C as CmssyRequestError, D as DEFAULT_CMSSY_API_URL, F as FetchLike, a as FetchLikeResponse, b as FetchPageOptions, R as RetryPolicy } from './content-client-BPpRfq0h.cjs';
1
+ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, c as CmssyCspOptions, d as CmssyEnvConfig, e as CmssyTypedDocument, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, f as InvisibleBlocksMessage, P as PROTOCOL_VERSION, g as ParentReadyMessage, h as PatchMessage, i as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, j as SelectMessage, k as ShortcutAction, l as ShortcutMessage, V as ViewportMessage, m as applyCmssyCsp, n as createCmssyClient, o as defineCmssyConfig, p as isProtocolCompatible, q as normalizeOrigin, r as parseEditorMessage, s as postToEditor, t as resolveEditorOrigin } from './csp-BMP9bAZ9.cjs';
2
+ export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-BM2fwE3O.cjs';
3
+ export { C as CMSSY_RATE_LIMIT_WINDOW_MS, a as CmssyRequestError, D as DEFAULT_CMSSY_API_URL, F as FetchLike, b as FetchLikeResponse, c as FetchPageOptions, R as RetryPolicy } from './content-client-COeyYJl1.cjs';
4
4
  import * as _cmssy_types from '@cmssy/types';
5
5
  import { FieldOptions, TypedField, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
6
6
  export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, InferBlockContent, LayoutPosition, RawBlock, RawLayoutBlock, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, layoutPositionValues } from '@cmssy/types';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, c as CmssyCspOptions, d as CmssyEnvConfig, e as CmssyTypedDocument, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, f as InvisibleBlocksMessage, P as PROTOCOL_VERSION, g as ParentReadyMessage, h as PatchMessage, i as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, j as SelectMessage, k as ShortcutAction, l as ShortcutMessage, V as ViewportMessage, m as applyCmssyCsp, n as createCmssyClient, o as defineCmssyConfig, p as isProtocolCompatible, q as normalizeOrigin, r as parseEditorMessage, s as postToEditor, t as resolveEditorOrigin } from './csp-DvzJKrwc.js';
2
- export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-DQZ80cew.js';
3
- export { C as CmssyRequestError, D as DEFAULT_CMSSY_API_URL, F as FetchLike, a as FetchLikeResponse, b as FetchPageOptions, R as RetryPolicy } from './content-client-BPpRfq0h.js';
1
+ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, c as CmssyCspOptions, d as CmssyEnvConfig, e as CmssyTypedDocument, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, f as InvisibleBlocksMessage, P as PROTOCOL_VERSION, g as ParentReadyMessage, h as PatchMessage, i as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, j as SelectMessage, k as ShortcutAction, l as ShortcutMessage, V as ViewportMessage, m as applyCmssyCsp, n as createCmssyClient, o as defineCmssyConfig, p as isProtocolCompatible, q as normalizeOrigin, r as parseEditorMessage, s as postToEditor, t as resolveEditorOrigin } from './csp-BDE0cAZL.js';
2
+ export { C as CMSSY_LOCALE_HEADER, G as GraphqlRequestOptions, g as graphqlRequest, l as localizeHref, r as resolveCmssyLocale } from './locale-jxsO_8YF.js';
3
+ export { C as CMSSY_RATE_LIMIT_WINDOW_MS, a as CmssyRequestError, D as DEFAULT_CMSSY_API_URL, F as FetchLike, b as FetchLikeResponse, c as FetchPageOptions, R as RetryPolicy } from './content-client-COeyYJl1.js';
4
4
  import * as _cmssy_types from '@cmssy/types';
5
5
  import { FieldOptions, TypedField, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
6
6
  export { BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookEvent, CmssyWebhookOrder, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, InferBlockContent, LayoutPosition, RawBlock, RawLayoutBlock, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, layoutPositionValues } from '@cmssy/types';
package/dist/index.js CHANGED
@@ -83,6 +83,7 @@ var CmssyRequestError = class extends Error {
83
83
  }
84
84
  };
85
85
  var DEFAULT_RETRY_STATUSES = [429, 503];
86
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
86
87
  function retryAfterMs(response) {
87
88
  const raw = response.headers?.get("retry-after");
88
89
  if (!raw) return null;
@@ -116,7 +117,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
116
117
  const maxRetries = retry.maxRetries ?? 3;
117
118
  const baseDelayMs = retry.baseDelayMs ?? 300;
118
119
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
119
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
120
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
120
121
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
121
122
  let response = await doFetch(url, init);
122
123
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -887,4 +888,4 @@ async function verifyCmssyWebhook(options) {
887
888
  return parsed;
888
889
  }
889
890
 
890
- export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_LOCALE_HEADER, CMSSY_SECRET_QUERY_PARAM, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, SHORTCUT_ACTIONS, applyCmssyCsp, createCmssyClient, defineCmssyConfig, fields, graphqlRequest, isProtocolCompatible, isVerifiedEditUrl, localizeHref, mediaAlt, mediaUrl, mediaUrls, normalizeOrigin, parseEditorMessage, postToEditor, resolveCmssyLocale, resolveEditorOrigin, verifyCmssyWebhook };
891
+ export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_LOCALE_HEADER, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_SECRET_QUERY_PARAM, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, SHORTCUT_ACTIONS, applyCmssyCsp, createCmssyClient, defineCmssyConfig, fields, graphqlRequest, isProtocolCompatible, isVerifiedEditUrl, localizeHref, mediaAlt, mediaUrl, mediaUrls, normalizeOrigin, parseEditorMessage, postToEditor, resolveCmssyLocale, resolveEditorOrigin, verifyCmssyWebhook };
@@ -12,6 +12,7 @@ var CmssyRequestError = class extends Error {
12
12
  }
13
13
  };
14
14
  var DEFAULT_RETRY_STATUSES = [429, 503];
15
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
15
16
  function retryAfterMs(response) {
16
17
  const raw = response.headers?.get("retry-after");
17
18
  if (!raw) return null;
@@ -45,7 +46,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
45
46
  const maxRetries = retry.maxRetries ?? 3;
46
47
  const baseDelayMs = retry.baseDelayMs ?? 300;
47
48
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
48
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
49
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
49
50
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
50
51
  let response = await doFetch(url, init);
51
52
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -1,6 +1,6 @@
1
- export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from '../locale-BS61R-fF.cjs';
1
+ export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from '../locale-BM2fwE3O.cjs';
2
2
  export { CmssySiteLocales } from '@cmssy/types';
3
- import '../content-client-BPpRfq0h.cjs';
3
+ import '../content-client-COeyYJl1.cjs';
4
4
 
5
5
  declare function localizedPath(slug: string, locale: string, defaultLocale: string): string;
6
6
 
@@ -1,6 +1,6 @@
1
- export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from '../locale-DQZ80cew.js';
1
+ export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from '../locale-jxsO_8YF.js';
2
2
  export { CmssySiteLocales } from '@cmssy/types';
3
- import '../content-client-BPpRfq0h.js';
3
+ import '../content-client-COeyYJl1.js';
4
4
 
5
5
  declare function localizedPath(slug: string, locale: string, defaultLocale: string): string;
6
6
 
@@ -10,6 +10,7 @@ var CmssyRequestError = class extends Error {
10
10
  }
11
11
  };
12
12
  var DEFAULT_RETRY_STATUSES = [429, 503];
13
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
13
14
  function retryAfterMs(response) {
14
15
  const raw = response.headers?.get("retry-after");
15
16
  if (!raw) return null;
@@ -43,7 +44,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
43
44
  const maxRetries = retry.maxRetries ?? 3;
44
45
  const baseDelayMs = retry.baseDelayMs ?? 300;
45
46
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
46
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
47
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
47
48
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
48
49
  let response = await doFetch(url, init);
49
50
  for (let attempt = 0; attempt < maxRetries; attempt++) {
package/dist/internal.cjs CHANGED
@@ -12,6 +12,7 @@ var CmssyRequestError = class extends Error {
12
12
  }
13
13
  };
14
14
  var DEFAULT_RETRY_STATUSES = [429, 503];
15
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
15
16
  function retryAfterMs(response) {
16
17
  const raw = response.headers?.get("retry-after");
17
18
  if (!raw) return null;
@@ -45,7 +46,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
45
46
  const maxRetries = retry.maxRetries ?? 3;
46
47
  const baseDelayMs = retry.baseDelayMs ?? 300;
47
48
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
48
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
49
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
49
50
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
50
51
  let response = await doFetch(url, init);
51
52
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -1,10 +1,10 @@
1
- export { f as fetchLayouts, c as fetchPage, d as fetchPageById, e as fetchPageMeta, g as fetchPages, r as resolveApiUrl } from './content-client-BPpRfq0h.cjs';
1
+ export { f as fetchLayouts, d as fetchPage, e as fetchPageById, g as fetchPageMeta, h as fetchPages, r as resolveApiUrl } from './content-client-COeyYJl1.cjs';
2
2
  import { CmssyFormDefinition, BuildBlockContextExtra, CmssyBlockContext, CmssyClientConfig, CmssySiteConfig, FieldDefinition, RawBlock } from '@cmssy/types';
3
3
  export { CmssySiteLocales } from '@cmssy/types';
4
- import { G as GraphqlRequestOptions } from './locale-BS61R-fF.cjs';
5
- export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from './locale-BS61R-fF.cjs';
6
- import { Q as QueryScopedOptions } from './csp-DXxz0OdB.cjs';
7
- export { u as cmssyCspHeaders, v as isDevelopment, w as resolveInitialTarget, x as toCspOrigin } from './csp-DXxz0OdB.cjs';
4
+ import { G as GraphqlRequestOptions } from './locale-BM2fwE3O.cjs';
5
+ export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from './locale-BM2fwE3O.cjs';
6
+ import { Q as QueryScopedOptions } from './csp-BMP9bAZ9.cjs';
7
+ export { u as cmssyCspHeaders, v as isDevelopment, w as resolveInitialTarget, x as toCspOrigin } from './csp-BMP9bAZ9.cjs';
8
8
  export { localizedPath } from './internal/locale.cjs';
9
9
 
10
10
  declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n public {\n siteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n branding {\n brandName\n logoUrl\n logoDarkUrl\n faviconUrl\n ogImageUrl\n }\n }\n }\n}";
@@ -1,10 +1,10 @@
1
- export { f as fetchLayouts, c as fetchPage, d as fetchPageById, e as fetchPageMeta, g as fetchPages, r as resolveApiUrl } from './content-client-BPpRfq0h.js';
1
+ export { f as fetchLayouts, d as fetchPage, e as fetchPageById, g as fetchPageMeta, h as fetchPages, r as resolveApiUrl } from './content-client-COeyYJl1.js';
2
2
  import { CmssyFormDefinition, BuildBlockContextExtra, CmssyBlockContext, CmssyClientConfig, CmssySiteConfig, FieldDefinition, RawBlock } from '@cmssy/types';
3
3
  export { CmssySiteLocales } from '@cmssy/types';
4
- import { G as GraphqlRequestOptions } from './locale-DQZ80cew.js';
5
- export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from './locale-DQZ80cew.js';
6
- import { Q as QueryScopedOptions } from './csp-DvzJKrwc.js';
7
- export { u as cmssyCspHeaders, v as isDevelopment, w as resolveInitialTarget, x as toCspOrigin } from './csp-DvzJKrwc.js';
4
+ import { G as GraphqlRequestOptions } from './locale-jxsO_8YF.js';
5
+ export { C as CMSSY_LOCALE_HEADER, a as localeForPath, b as localeForPathname, l as localizeHref, c as resolveSiteLocales, s as splitCmssyLocale, d as splitLocaleFromPath } from './locale-jxsO_8YF.js';
6
+ import { Q as QueryScopedOptions } from './csp-BDE0cAZL.js';
7
+ export { u as cmssyCspHeaders, v as isDevelopment, w as resolveInitialTarget, x as toCspOrigin } from './csp-BDE0cAZL.js';
8
8
  export { localizedPath } from './internal/locale.js';
9
9
 
10
10
  declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n public {\n siteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n branding {\n brandName\n logoUrl\n logoDarkUrl\n faviconUrl\n ogImageUrl\n }\n }\n }\n}";
package/dist/internal.js CHANGED
@@ -10,6 +10,7 @@ var CmssyRequestError = class extends Error {
10
10
  }
11
11
  };
12
12
  var DEFAULT_RETRY_STATUSES = [429, 503];
13
+ var CMSSY_RATE_LIMIT_WINDOW_MS = 6e4;
13
14
  function retryAfterMs(response) {
14
15
  const raw = response.headers?.get("retry-after");
15
16
  if (!raw) return null;
@@ -43,7 +44,7 @@ async function fetchWithRetry(doFetch, url, init, retry) {
43
44
  const maxRetries = retry.maxRetries ?? 3;
44
45
  const baseDelayMs = retry.baseDelayMs ?? 300;
45
46
  const maxDelayMs = retry.maxDelayMs ?? 3e3;
46
- const maxRetryAfterMs = retry.maxRetryAfterMs ?? 1e4;
47
+ const maxRetryAfterMs = retry.maxRetryAfterMs ?? CMSSY_RATE_LIMIT_WINDOW_MS;
47
48
  const retryStatuses = retry.retryStatuses ?? DEFAULT_RETRY_STATUSES;
48
49
  let response = await doFetch(url, init);
49
50
  for (let attempt = 0; attempt < maxRetries; attempt++) {
@@ -1,5 +1,5 @@
1
1
  import { CmssyClientConfig, CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
- import { F as FetchLike, R as RetryPolicy } from './content-client-BPpRfq0h.cjs';
2
+ import { F as FetchLike, R as RetryPolicy } from './content-client-COeyYJl1.cjs';
3
3
 
4
4
  interface GraphqlRequestOptions {
5
5
  fetch?: FetchLike;
@@ -1,5 +1,5 @@
1
1
  import { CmssyClientConfig, CmssyLocaleContext, CmssySiteLocales } from '@cmssy/types';
2
- import { F as FetchLike, R as RetryPolicy } from './content-client-BPpRfq0h.js';
2
+ import { F as FetchLike, R as RetryPolicy } from './content-client-COeyYJl1.js';
3
3
 
4
4
  interface GraphqlRequestOptions {
5
5
  fetch?: FetchLike;
@@ -1,4 +1,4 @@
1
- import { F as FetchLike } from './content-client-BPpRfq0h.cjs';
1
+ import { F as FetchLike } from './content-client-COeyYJl1.cjs';
2
2
  import { CmssyClientConfig } from '@cmssy/types';
3
3
 
4
4
  interface EditDiagnosticsConfig {
@@ -1,4 +1,4 @@
1
- import { F as FetchLike } from './content-client-BPpRfq0h.js';
1
+ import { F as FetchLike } from './content-client-COeyYJl1.js';
2
2
  import { CmssyClientConfig } from '@cmssy/types';
3
3
 
4
4
  interface EditDiagnosticsConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "12.8.0",
3
+ "version": "12.10.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",