@cmssy/core 11.2.0 → 11.3.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/internal.cjs CHANGED
@@ -1111,6 +1111,51 @@ function cmssyCspHeaders(options) {
1111
1111
  };
1112
1112
  }
1113
1113
 
1114
+ // src/data/delivery-operations.ts
1115
+ var CMSSY_DELIVERY_OPERATIONS = [
1116
+ {
1117
+ purpose: "Languages, branding and the 404 page - the workspace's settings.",
1118
+ document: SITE_CONFIG_QUERY
1119
+ },
1120
+ {
1121
+ purpose: "One page with its blocks. `previewSecret` returns the draft.",
1122
+ document: PUBLIC_PAGE_QUERY
1123
+ },
1124
+ {
1125
+ purpose: "One page by id - what the workspace's 404 page setting stores.",
1126
+ document: PUBLIC_PAGE_BY_ID_QUERY
1127
+ },
1128
+ {
1129
+ purpose: "The published page list - sitemaps, and static params.",
1130
+ document: PUBLIC_PAGES_QUERY
1131
+ },
1132
+ {
1133
+ purpose: "SEO fields for one page, without fetching its blocks.",
1134
+ document: PUBLIC_PAGE_META_QUERY
1135
+ },
1136
+ {
1137
+ purpose: "Header, footer and the other layout positions for a page.",
1138
+ document: PUBLIC_PAGE_LAYOUTS_QUERY
1139
+ },
1140
+ {
1141
+ purpose: "Records of one model - the typed half of `cmssy types`.",
1142
+ document: MODEL_RECORDS_QUERY
1143
+ },
1144
+ {
1145
+ purpose: "Records by id - how a relation field resolves to records.",
1146
+ document: RECORDS_BY_IDS_QUERY
1147
+ },
1148
+ {
1149
+ purpose: "A form definition, for rendering and validating it.",
1150
+ document: FORM_QUERY
1151
+ },
1152
+ {
1153
+ purpose: "Submitting that form - rendering one without this is half a feature.",
1154
+ document: SUBMIT_FORM_MUTATION
1155
+ }
1156
+ ];
1157
+
1158
+ exports.CMSSY_DELIVERY_OPERATIONS = CMSSY_DELIVERY_OPERATIONS;
1114
1159
  exports.CMSSY_LOCALE_HEADER = CMSSY_LOCALE_HEADER;
1115
1160
  exports.FORM_QUERY = FORM_QUERY;
1116
1161
  exports.MODEL_DEFINITIONS_QUERY = MODEL_DEFINITIONS_QUERY;
@@ -62,4 +62,30 @@ declare function resolveRelationContent(config: CmssyClientConfig, entries: Rela
62
62
 
63
63
  declare function cmssySecretsMatch(a: string, b: string): Promise<boolean>;
64
64
 
65
- export { type BlockSchemaMap, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, type RelationContentEntry, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, cachedWorkspaceId, clearWorkspaceIdCache, cmssySecretsMatch, collectFormIds, fetchSiteConfig, getBlockContentForLanguage, normalizeRelationContent, resolveForms, resolveRelationContent, resolveWorkspaceId };
65
+ interface CmssyDeliveryOperation {
66
+ /** One line, for the generated file - why an app would want this one. */
67
+ purpose: string;
68
+ document: string;
69
+ }
70
+ /**
71
+ * The delivery operations the SDK itself performs, for `cmssy types` to vendor
72
+ * into an app.
73
+ *
74
+ * These reference the runtime constants rather than restating them: a second
75
+ * copy here would be free to drift from the client that actually sends them,
76
+ * which is the problem this list exists to remove. Keep it that way - a literal
77
+ * moved into this file also drops out of `sdl-operations.test.ts`, which
78
+ * validates exported document *strings* in their home modules.
79
+ *
80
+ * Deliberately absent, and why:
81
+ *
82
+ * - `PUBLIC_PAGE_DEV_QUERY` - a second document named `PublicPage`. Two
83
+ * documents cannot share an operation name in graphql-codegen's client
84
+ * preset, so including it would emit a file every consumer's codegen
85
+ * rejects. It is also a dev-preview path an app never calls itself.
86
+ * - `MODEL_DEFINITIONS_QUERY` - `cmssy types` already turns definitions into
87
+ * TypeScript; fetching them at runtime is not something an app does.
88
+ */
89
+ declare const CMSSY_DELIVERY_OPERATIONS: readonly CmssyDeliveryOperation[];
90
+
91
+ export { type BlockSchemaMap, CMSSY_DELIVERY_OPERATIONS, type CmssyDeliveryOperation, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, type RelationContentEntry, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, cachedWorkspaceId, clearWorkspaceIdCache, cmssySecretsMatch, collectFormIds, fetchSiteConfig, getBlockContentForLanguage, normalizeRelationContent, resolveForms, resolveRelationContent, resolveWorkspaceId };
@@ -62,4 +62,30 @@ declare function resolveRelationContent(config: CmssyClientConfig, entries: Rela
62
62
 
63
63
  declare function cmssySecretsMatch(a: string, b: string): Promise<boolean>;
64
64
 
65
- export { type BlockSchemaMap, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, type RelationContentEntry, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, cachedWorkspaceId, clearWorkspaceIdCache, cmssySecretsMatch, collectFormIds, fetchSiteConfig, getBlockContentForLanguage, normalizeRelationContent, resolveForms, resolveRelationContent, resolveWorkspaceId };
65
+ interface CmssyDeliveryOperation {
66
+ /** One line, for the generated file - why an app would want this one. */
67
+ purpose: string;
68
+ document: string;
69
+ }
70
+ /**
71
+ * The delivery operations the SDK itself performs, for `cmssy types` to vendor
72
+ * into an app.
73
+ *
74
+ * These reference the runtime constants rather than restating them: a second
75
+ * copy here would be free to drift from the client that actually sends them,
76
+ * which is the problem this list exists to remove. Keep it that way - a literal
77
+ * moved into this file also drops out of `sdl-operations.test.ts`, which
78
+ * validates exported document *strings* in their home modules.
79
+ *
80
+ * Deliberately absent, and why:
81
+ *
82
+ * - `PUBLIC_PAGE_DEV_QUERY` - a second document named `PublicPage`. Two
83
+ * documents cannot share an operation name in graphql-codegen's client
84
+ * preset, so including it would emit a file every consumer's codegen
85
+ * rejects. It is also a dev-preview path an app never calls itself.
86
+ * - `MODEL_DEFINITIONS_QUERY` - `cmssy types` already turns definitions into
87
+ * TypeScript; fetching them at runtime is not something an app does.
88
+ */
89
+ declare const CMSSY_DELIVERY_OPERATIONS: readonly CmssyDeliveryOperation[];
90
+
91
+ export { type BlockSchemaMap, CMSSY_DELIVERY_OPERATIONS, type CmssyDeliveryOperation, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, type RelationContentEntry, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, cachedWorkspaceId, clearWorkspaceIdCache, cmssySecretsMatch, collectFormIds, fetchSiteConfig, getBlockContentForLanguage, normalizeRelationContent, resolveForms, resolveRelationContent, resolveWorkspaceId };
package/dist/internal.js CHANGED
@@ -1109,4 +1109,48 @@ function cmssyCspHeaders(options) {
1109
1109
  };
1110
1110
  }
1111
1111
 
1112
- export { CMSSY_LOCALE_HEADER, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, buildLocaleSwitchHref, cachedWorkspaceId, clearWorkspaceIdCache, cmssyCspHeaders, cmssySecretsMatch, collectFormIds, fetchLayouts, fetchPage, fetchPageById, fetchPageMeta, fetchPages, fetchSiteConfig, getBlockContentForLanguage, isDevelopment, localeForPath, localeForPathname, localesFromSiteConfig, localizeHref, localizeHtmlLinks, localizedPath, normalizeRelationContent, normalizeSlug, resolveApiUrl, resolveForms, resolveInitialTarget, resolvePublicUrl, resolveRelationContent, resolveSiteLocales, resolveWorkspaceId, splitCmssyLocale, splitLocaleFromPath, toCspOrigin };
1112
+ // src/data/delivery-operations.ts
1113
+ var CMSSY_DELIVERY_OPERATIONS = [
1114
+ {
1115
+ purpose: "Languages, branding and the 404 page - the workspace's settings.",
1116
+ document: SITE_CONFIG_QUERY
1117
+ },
1118
+ {
1119
+ purpose: "One page with its blocks. `previewSecret` returns the draft.",
1120
+ document: PUBLIC_PAGE_QUERY
1121
+ },
1122
+ {
1123
+ purpose: "One page by id - what the workspace's 404 page setting stores.",
1124
+ document: PUBLIC_PAGE_BY_ID_QUERY
1125
+ },
1126
+ {
1127
+ purpose: "The published page list - sitemaps, and static params.",
1128
+ document: PUBLIC_PAGES_QUERY
1129
+ },
1130
+ {
1131
+ purpose: "SEO fields for one page, without fetching its blocks.",
1132
+ document: PUBLIC_PAGE_META_QUERY
1133
+ },
1134
+ {
1135
+ purpose: "Header, footer and the other layout positions for a page.",
1136
+ document: PUBLIC_PAGE_LAYOUTS_QUERY
1137
+ },
1138
+ {
1139
+ purpose: "Records of one model - the typed half of `cmssy types`.",
1140
+ document: MODEL_RECORDS_QUERY
1141
+ },
1142
+ {
1143
+ purpose: "Records by id - how a relation field resolves to records.",
1144
+ document: RECORDS_BY_IDS_QUERY
1145
+ },
1146
+ {
1147
+ purpose: "A form definition, for rendering and validating it.",
1148
+ document: FORM_QUERY
1149
+ },
1150
+ {
1151
+ purpose: "Submitting that form - rendering one without this is half a feature.",
1152
+ document: SUBMIT_FORM_MUTATION
1153
+ }
1154
+ ];
1155
+
1156
+ export { CMSSY_DELIVERY_OPERATIONS, CMSSY_LOCALE_HEADER, FORM_QUERY, MODEL_DEFINITIONS_QUERY, MODEL_RECORDS_QUERY, RECORDS_BY_IDS_QUERY, SITE_CONFIG_QUERY, SUBMIT_FORM_MUTATION, asBucket, buildBlockContext, buildLocaleSwitchHref, cachedWorkspaceId, clearWorkspaceIdCache, cmssyCspHeaders, cmssySecretsMatch, collectFormIds, fetchLayouts, fetchPage, fetchPageById, fetchPageMeta, fetchPages, fetchSiteConfig, getBlockContentForLanguage, isDevelopment, localeForPath, localeForPathname, localesFromSiteConfig, localizeHref, localizeHtmlLinks, localizedPath, normalizeRelationContent, normalizeSlug, resolveApiUrl, resolveForms, resolveInitialTarget, resolvePublicUrl, resolveRelationContent, resolveSiteLocales, resolveWorkspaceId, splitCmssyLocale, splitLocaleFromPath, toCspOrigin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "11.2.0",
3
+ "version": "11.3.1",
4
4
  "description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
5
5
  "keywords": [
6
6
  "cmssy",