@voltro/cms 0.86.0 → 0.87.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.
Files changed (201) hide show
  1. package/CHANGELOG.md +5321 -0
  2. package/README.md +138 -0
  3. package/THIRD-PARTY-NOTICES.md +860 -221
  4. package/dist/RichDocumentView.js +81 -36
  5. package/dist/aiCandidates.js +3 -3
  6. package/dist/applicationBuildSnapshotService.js +101 -0
  7. package/dist/assetRenditions.js +102 -0
  8. package/dist/assetRevision.js +46 -0
  9. package/dist/assetUseRights.js +72 -0
  10. package/dist/availability.js +19 -16
  11. package/dist/blueprint.js +75 -75
  12. package/dist/build.d.ts +3063 -0
  13. package/dist/build.js +37 -0
  14. package/dist/buildApplicationAdmission.js +16 -0
  15. package/dist/buildApplicationCatalog.js +136 -0
  16. package/dist/buildApplicationCatalogTable.js +24 -0
  17. package/dist/buildApplicationRest.js +99 -0
  18. package/dist/buildApplicationUpload.js +111 -0
  19. package/dist/buildSnapshot.js +401 -0
  20. package/dist/buildSnapshotApplicationPin.js +32 -0
  21. package/dist/buildSnapshotRest.js +210 -0
  22. package/dist/buildSnapshotService.js +265 -0
  23. package/dist/buildSnapshotTables.js +25 -0
  24. package/dist/bulk.js +71 -70
  25. package/dist/changes.js +279 -62
  26. package/dist/consent.js +5 -5
  27. package/dist/contentLocations.js +53 -0
  28. package/dist/contentProjection.js +83 -0
  29. package/dist/contentRouteIdentity.js +13 -0
  30. package/dist/contentRouteMaterializer.js +97 -0
  31. package/dist/contentRouteTypes.js +39 -0
  32. package/dist/contentSeo.js +189 -0
  33. package/dist/contentTreePath.js +60 -0
  34. package/dist/contentType.js +117 -100
  35. package/dist/contentValues.js +18 -0
  36. package/dist/copies.js +3 -3
  37. package/dist/domainHost.js +7 -0
  38. package/dist/domains.js +81 -87
  39. package/dist/draftTexts.js +37 -37
  40. package/dist/duplicates.js +23 -23
  41. package/dist/environmentAliases.js +138 -0
  42. package/dist/environments.js +107 -69
  43. package/dist/errors.js +54 -14
  44. package/dist/experiments.js +7 -7
  45. package/dist/frontendBindings.js +99 -0
  46. package/dist/frontendMedia.js +18 -0
  47. package/dist/index.d.ts +760 -47
  48. package/dist/index.js +89 -73
  49. package/dist/initializePublicRoutes.js +28 -0
  50. package/dist/liveContentRouteView.js +76 -0
  51. package/dist/nativeOutputDeploymentService.js +205 -0
  52. package/dist/outputActivation.js +234 -0
  53. package/dist/outputActivationOrigin.js +51 -0
  54. package/dist/outputActivationStore.js +411 -0
  55. package/dist/outputActivationTables.js +11 -0
  56. package/dist/outputActivationTarget.js +81 -0
  57. package/dist/outputActivationTargetTable.js +25 -0
  58. package/dist/outputDeployment.js +174 -0
  59. package/dist/outputDeploymentRest.js +168 -0
  60. package/dist/outputDeploymentService.js +241 -0
  61. package/dist/outputRouteGraph.js +177 -0
  62. package/dist/outputSafetyArtifact.js +147 -0
  63. package/dist/outputTargetRest.js +62 -0
  64. package/dist/pathSegmentEncoding.js +4 -0
  65. package/dist/privateCmsTransport.js +76 -0
  66. package/dist/privateNativeRouteReservation.js +10 -0
  67. package/dist/promotion.js +68 -59
  68. package/dist/publicBuild.js +90 -0
  69. package/dist/publicBuildRest.js +98 -0
  70. package/dist/publicBuildService.js +63 -0
  71. package/dist/publicOutputHttp.js +129 -0
  72. package/dist/publicOutputService.js +287 -0
  73. package/dist/publicPresentation.js +17 -0
  74. package/dist/publicRouteDispositionAdmission.js +38 -0
  75. package/dist/publicRouteHistoryStore.js +12 -0
  76. package/dist/publicRouteHistoryView.js +34 -0
  77. package/dist/publicRouteIntegrity.js +5 -0
  78. package/dist/publicRouteMutation.js +6 -0
  79. package/dist/publicRouteNamespace.js +134 -0
  80. package/dist/publicRoutePublication.js +36 -0
  81. package/dist/publicRouteRegistry.js +17 -0
  82. package/dist/publicRouteRegistryBinding.js +194 -0
  83. package/dist/publicRouteRegistryDefinition.js +76 -0
  84. package/dist/publicRouteSitePublication.js +40 -0
  85. package/dist/publicRouteTables.js +13 -0
  86. package/dist/publicRouteUrl.js +18 -0
  87. package/dist/publicationSeo.js +52 -0
  88. package/dist/publicationState.js +296 -0
  89. package/dist/quality.js +8 -8
  90. package/dist/reconfigurePublicRoutes.js +41 -0
  91. package/dist/redirects.js +104 -73
  92. package/dist/referenceGraph.js +15 -14
  93. package/dist/references.js +2 -2
  94. package/dist/release.js +177 -141
  95. package/dist/renderReadAuthority.js +43 -0
  96. package/dist/renderReadGrant.js +137 -0
  97. package/dist/review.js +28 -28
  98. package/dist/richDocument.js +54 -24
  99. package/dist/routeDispositionGraph.js +44 -0
  100. package/dist/routeDispositionRest.js +51 -0
  101. package/dist/routeDispositionService.js +73 -0
  102. package/dist/routeDispositionStore.js +289 -0
  103. package/dist/routeDispositionTables.js +5 -0
  104. package/dist/routeDispositions.js +91 -0
  105. package/dist/routeHistoryStorage.js +320 -0
  106. package/dist/routeHistoryStore.js +12 -0
  107. package/dist/schedule.js +36 -36
  108. package/dist/seo.js +1 -1
  109. package/dist/series.js +11 -11
  110. package/dist/share.js +13 -13
  111. package/dist/siteBindings.js +159 -0
  112. package/dist/siteBuildCandidate.js +104 -0
  113. package/dist/siteDelivery.js +115 -0
  114. package/dist/siteState.js +47 -0
  115. package/dist/snapshotAddressGraph.js +55 -0
  116. package/dist/snapshotAddressRead.js +73 -0
  117. package/dist/snapshotAppConsumer.js +71 -0
  118. package/dist/snapshotAppExecution.js +102 -0
  119. package/dist/snapshotApplication.js +75 -0
  120. package/dist/snapshotApprovedRouteDispositions.js +44 -0
  121. package/dist/snapshotAssetAssembly.js +70 -0
  122. package/dist/snapshotAssetAssemblyRest.js +50 -0
  123. package/dist/snapshotBindingRead.js +61 -0
  124. package/dist/snapshotCodeSeo.js +29 -0
  125. package/dist/snapshotComponent.js +34 -0
  126. package/dist/snapshotComponentSource.js +24 -0
  127. package/dist/snapshotConsumer.js +87 -0
  128. package/dist/snapshotContentIdentity.js +10 -0
  129. package/dist/snapshotDefinitions.js +264 -0
  130. package/dist/snapshotDocumentAssembly.js +193 -0
  131. package/dist/snapshotDocumentAssemblyRest.js +84 -0
  132. package/dist/snapshotDocumentProjection.js +202 -0
  133. package/dist/snapshotDocumentTransfer.js +35 -0
  134. package/dist/snapshotDocumentTransferRest.js +80 -0
  135. package/dist/snapshotDomains.js +56 -0
  136. package/dist/snapshotEnvironment.js +31 -0
  137. package/dist/snapshotFieldPlan.js +85 -0
  138. package/dist/snapshotFrontend.js +103 -0
  139. package/dist/snapshotLink.js +8 -0
  140. package/dist/snapshotMedia.js +111 -0
  141. package/dist/snapshotMediaCapture.js +246 -0
  142. package/dist/snapshotMediaFields.js +225 -0
  143. package/dist/snapshotMediaRead.js +185 -0
  144. package/dist/snapshotMediaReader.js +13 -0
  145. package/dist/snapshotObservation.js +16 -0
  146. package/dist/snapshotObservedRouteHistory.js +34 -0
  147. package/dist/snapshotOutputTransfer.js +78 -0
  148. package/dist/snapshotPageLoader.js +7 -0
  149. package/dist/snapshotPageSeo.js +59 -0
  150. package/dist/snapshotPathLocale.js +15 -0
  151. package/dist/snapshotPresentation.js +86 -0
  152. package/dist/snapshotPresentationPolicy.js +12 -0
  153. package/dist/snapshotProjection.js +119 -0
  154. package/dist/snapshotPublicAccess.js +161 -0
  155. package/dist/snapshotPublicRouteHistory.js +40 -0
  156. package/dist/snapshotReadAdmission.js +38 -0
  157. package/dist/snapshotRedirectOutput.js +151 -0
  158. package/dist/snapshotRedirectTargets.js +24 -0
  159. package/dist/snapshotRedirects.js +132 -0
  160. package/dist/snapshotReference.js +8 -0
  161. package/dist/snapshotReferenceAddress.js +10 -0
  162. package/dist/snapshotReferenceGraph.js +79 -0
  163. package/dist/snapshotReferenceRead.js +65 -0
  164. package/dist/snapshotRelease.js +99 -0
  165. package/dist/snapshotRender.js +361 -0
  166. package/dist/snapshotRenderDependencies.js +178 -0
  167. package/dist/snapshotRenditions.js +88 -0
  168. package/dist/snapshotRichDocument.js +62 -0
  169. package/dist/snapshotRoleTransfer.js +106 -0
  170. package/dist/snapshotRoleTransferRest.js +99 -0
  171. package/dist/snapshotRouteAdmission.js +71 -0
  172. package/dist/snapshotRouteDispatch.js +111 -0
  173. package/dist/snapshotRouteDispositionPlan.js +73 -0
  174. package/dist/snapshotRouteRead.js +43 -0
  175. package/dist/snapshotRoutes.js +79 -0
  176. package/dist/snapshotRouting.js +113 -0
  177. package/dist/snapshotSeo.js +179 -0
  178. package/dist/snapshotSeoControls.js +101 -0
  179. package/dist/snapshotSeoDocumentInventory.js +115 -0
  180. package/dist/snapshotSeoDocuments.js +129 -0
  181. package/dist/snapshotSeoMerge.js +85 -0
  182. package/dist/snapshotSeoMetadata.js +137 -0
  183. package/dist/snapshotSeoOutput.js +173 -0
  184. package/dist/snapshotSeoPathSets.js +105 -0
  185. package/dist/snapshotSeoRead.js +88 -0
  186. package/dist/snapshotSite.js +128 -0
  187. package/dist/snapshotSitemapFiles.js +36 -0
  188. package/dist/snapshotTreeDependencies.js +58 -0
  189. package/dist/snapshotTreeLoader.js +10 -0
  190. package/dist/snapshotTreeRead.js +158 -0
  191. package/dist/staticPathSet.js +177 -0
  192. package/dist/staticPathSetRest.js +129 -0
  193. package/dist/staticPathSetService.js +249 -0
  194. package/dist/staticPathSetStore.js +338 -0
  195. package/dist/tree.js +9 -9
  196. package/dist/validation.js +53 -53
  197. package/dist/web.d.ts +709 -7
  198. package/dist/web.js +50 -33
  199. package/dist/workflow.js +8 -8
  200. package/dist/write.js +250 -225
  201. package/package.json +20 -6
@@ -1,6 +1,6 @@
1
- import { normalizeRichDocument as e, richDocumentProblems as t } from "./richDocument.js";
2
- import { normalizeTerms as n, taxonomyValue as r } from "./taxonomy.js";
3
- import { ContentValidationFailed as i } from "./errors.js";
1
+ import { ContentValidationFailed as e } from "./errors.js";
2
+ import { normalizeRichDocument as t, richDocumentProblems as n } from "./richDocument.js";
3
+ import { normalizeTerms as r, taxonomyValue as i } from "./taxonomy.js";
4
4
  import { documentHasChanges as a } from "./trackChanges.js";
5
5
  //#region src/validation.ts
6
6
  var o = /* @__PURE__ */ new Set([
@@ -25,54 +25,54 @@ var o = /* @__PURE__ */ new Set([
25
25
  }), c = (e) => typeof e == "object" && !!e && !Array.isArray(e), l = (e) => e instanceof Date ? !Number.isNaN(e.getTime()) : typeof e == "string" && !Number.isNaN(new Date(e).getTime()), u = (e, t, n) => {
26
26
  let r = [];
27
27
  return t.maxLength !== void 0 && n.length > t.maxLength && r.push(s(e, "maxLength", `exceeds maxLength(${t.maxLength}) — got ${n.length} characters`)), t.pattern !== void 0 && !new RegExp(t.pattern).test(n) && r.push(s(e, "pattern", `does not match pattern /${t.pattern}/`)), r;
28
- }, d = (n, r, i) => {
28
+ }, d = (e, r, i) => {
29
29
  switch (r.kind) {
30
30
  case "string":
31
31
  case "media":
32
- case "reference": return typeof i == "string" ? u(n, r, i) : [s(n, "type", `expected a string, got ${typeof i}`)];
33
- case "number": return typeof i != "number" || !Number.isFinite(i) ? [s(n, "type", "expected a finite number")] : r.fraction !== !0 && !Number.isInteger(i) ? [s(n, "integer", "expected a whole number (declare Schema.Fraction for fractions)")] : [];
34
- case "boolean": return typeof i == "boolean" ? [] : [s(n, "type", `expected a boolean, got ${typeof i}`)];
32
+ case "reference": return typeof i == "string" ? u(e, r, i) : [s(e, "type", `expected a string, got ${typeof i}`)];
33
+ case "number": return typeof i != "number" || !Number.isFinite(i) ? [s(e, "type", "expected a finite number")] : r.fraction !== !0 && !Number.isInteger(i) ? [s(e, "integer", "expected a whole number (declare Schema.Fraction for fractions)")] : [];
34
+ case "boolean": return typeof i == "boolean" ? [] : [s(e, "type", `expected a boolean, got ${typeof i}`)];
35
35
  case "date":
36
- case "datetime": return l(i) ? [] : [s(n, "type", "expected a Date or a parseable date string")];
36
+ case "datetime": return l(i) ? [] : [s(e, "type", "expected a Date or a parseable date string")];
37
37
  case "literal": {
38
- let e = r.literals ?? [];
39
- return typeof i != "string" || !e.includes(i) ? [s(n, "literal", `expected one of: ${e.join(", ")}`)] : [];
38
+ let t = r.literals ?? [];
39
+ return typeof i != "string" || !t.includes(i) ? [s(e, "literal", `expected one of: ${t.join(", ")}`)] : [];
40
40
  }
41
41
  case "richText": {
42
- let a = r.richText ?? {}, o = e(i), l = t(n, o, a).map((e) => s(e.path, e.rule, e.message)), u = new Map((a.profile?.components ?? []).map((e) => [e.id, e]));
43
- return (c(o) && Array.isArray(o.blocks) ? o.blocks : []).forEach((e, t) => {
44
- if (!c(e) || e.type !== "component" || !c(e.props)) return;
45
- let r = u.get(String(e.componentId));
46
- r !== void 0 && l.push(...f(`${n}.blocks[${t}].props`, r.props, e.props, `component '${r.id}'`, !0));
42
+ let a = r.richText ?? {}, o = t(i), l = n(e, o, a).map((e) => s(e.path, e.rule, e.message)), u = new Map((a.profile?.components ?? []).map((e) => [e.id, e]));
43
+ return (c(o) && Array.isArray(o.blocks) ? o.blocks : []).forEach((t, n) => {
44
+ if (!c(t) || t.type !== "component" || !c(t.props)) return;
45
+ let r = u.get(String(t.componentId));
46
+ r !== void 0 && l.push(...f(`${e}.blocks[${n}].props`, r.props, t.props, `component '${r.id}'`, !0));
47
47
  }), l;
48
48
  }
49
49
  case "array": {
50
- if (!Array.isArray(i)) return [s(n, "type", "expected an array")];
51
- let e = r.element;
52
- if (e === void 0) return [];
53
- let t = [];
54
- return i.forEach((r, i) => t.push(...d(`${n}[${i}]`, e, r))), t;
50
+ if (!Array.isArray(i)) return [s(e, "type", "expected an array")];
51
+ let t = r.element;
52
+ if (t === void 0) return [];
53
+ let n = [];
54
+ return i.forEach((r, i) => n.push(...d(`${e}[${i}]`, t, r))), n;
55
55
  }
56
- case "struct": return c(i) ? f(n, r.struct ?? {}, i, "struct", !1) : [s(n, "type", "expected an object")];
56
+ case "struct": return c(i) ? f(e, r.struct ?? {}, i, "struct", !1) : [s(e, "type", "expected an object")];
57
57
  case "components": {
58
- if (!Array.isArray(i)) return [s(n, "type", "expected a list of components")];
59
- let e = new Map((r.components ?? []).map((e) => [e.id, e])), t = [], a = /* @__PURE__ */ new Set();
58
+ if (!Array.isArray(i)) return [s(e, "type", "expected a list of components")];
59
+ let t = new Map((r.components ?? []).map((e) => [e.id, e])), n = [], a = /* @__PURE__ */ new Set();
60
60
  return i.forEach((r, i) => {
61
- let o = `${n}[${i}]`;
61
+ let o = `${e}[${i}]`;
62
62
  if (!c(r)) {
63
- t.push(s(o, "type", "expected a component instance"));
63
+ n.push(s(o, "type", "expected a component instance"));
64
64
  return;
65
65
  }
66
66
  let l = r.instanceId;
67
- typeof l != "string" || l === "" ? t.push(s(`${o}.instanceId`, "required", "missing instance id")) : a.has(l) ? t.push(s(`${o}.instanceId`, "unique", `instance '${l}' appears twice`)) : a.add(l);
68
- let u = e.get(String(r.componentId));
67
+ typeof l != "string" || l === "" ? n.push(s(`${o}.instanceId`, "required", "missing instance id")) : a.has(l) ? n.push(s(`${o}.instanceId`, "unique", `instance '${l}' appears twice`)) : a.add(l);
68
+ let u = t.get(String(r.componentId));
69
69
  if (u === void 0) {
70
- t.push(s(`${o}.componentId`, "unknown", `'${String(r.componentId)}' is not a component this field allows`));
70
+ n.push(s(`${o}.componentId`, "unknown", `'${String(r.componentId)}' is not a component this field allows`));
71
71
  return;
72
72
  }
73
73
  let d = r.props;
74
- c(d) ? t.push(...f(`${o}.props`, u.props, d, `component '${u.id}'`, !0)) : t.push(s(`${o}.props`, "type", "expected an object"));
75
- }), t;
74
+ c(d) ? n.push(...f(`${o}.props`, u.props, d, `component '${u.id}'`, !0)) : n.push(s(`${o}.props`, "type", "expected an object"));
75
+ }), n;
76
76
  }
77
77
  }
78
78
  }, f = (e, t, n, r, i) => {
@@ -84,42 +84,42 @@ var o = /* @__PURE__ */ new Set([
84
84
  for (let i of Object.keys(n)) i in t || a.push(s(`${e}.${i}`, "unknown", `not a declared field of this ${r}`));
85
85
  return a;
86
86
  }, p = (e, t) => {
87
- let r = [];
88
- for (let [n, i] of Object.entries(e.fields)) {
89
- let e = t[n];
90
- e == null ? i.isOptional || r.push(s(n, "required", "missing required field")) : r.push(...d(n, i, e));
87
+ let n = [];
88
+ for (let [r, i] of Object.entries(e.fields)) {
89
+ let e = t[r];
90
+ e == null ? i.isOptional || n.push(s(r, "required", "missing required field")) : n.push(...d(r, i, e));
91
91
  }
92
92
  let i = t.id;
93
- i !== void 0 && typeof i != "string" && r.push(s("id", "type", "expected a string id"));
94
- for (let n of Object.keys(t)) n === "id" || n in e.fields || o.has(n) || r.push(s(n, "unknown", `'${n}' is not a declared field of '${e.name}'`));
93
+ i !== void 0 && typeof i != "string" && n.push(s("id", "type", "expected a string id"));
94
+ for (let r of Object.keys(t)) r === "id" || r in e.fields || o.has(r) || n.push(s(r, "unknown", `'${r}' is not a declared field of '${e.name}'`));
95
95
  let a = e.taxonomy;
96
96
  if (a !== void 0 && (a.unknown ?? "refuse") === "refuse" && Array.isArray(t[a.field])) {
97
- let { unknown: e } = n(a, t[a.field]);
98
- e.length > 0 && r.push(s(a.field, "taxonomy", `not in the vocabulary: ${e.join(", ")}`));
97
+ let { unknown: e } = r(a, t[a.field]);
98
+ e.length > 0 && n.push(s(a.field, "taxonomy", `not in the vocabulary: ${e.join(", ")}`));
99
99
  }
100
- return r;
100
+ return n;
101
101
  }, m = (e, t) => [...Object.entries(e.fields).filter(([e, n]) => {
102
102
  let r = t[e];
103
103
  return n.publishRequired === !0 && (r == null || typeof r == "string" && r.trim() === "");
104
104
  }).map(([e]) => s(e, "requiredToPublish", "needed before publishing")), ...Object.entries(e.fields).filter(([e, n]) => {
105
105
  let r = t[e];
106
106
  return n.kind === "richText" && c(r) && Array.isArray(r.blocks) && a(r);
107
- }).map(([e]) => s(e, "pendingChanges", "accept or reject the suggested changes first"))], h = (e, t) => {
108
- let n = p(e, t);
109
- if (n.length > 0) throw new i({
110
- contentType: e.name,
111
- violations: n
107
+ }).map(([e]) => s(e, "pendingChanges", "accept or reject the suggested changes first"))], h = (t, n) => {
108
+ let r = p(t, n);
109
+ if (r.length > 0) throw new e({
110
+ contentType: t.name,
111
+ violations: r
112
112
  });
113
- }, g = (t, n) => {
114
- let i = { ...n }, a = t.taxonomy;
115
- a !== void 0 && Array.isArray(i[a.field]) && (i[a.field] = r(a, i[a.field]));
116
- for (let e of t.derivedFields) {
117
- let n = t.fields[e]?.derived;
118
- n !== void 0 && (i[e] = n.transform(i[n.source], i));
113
+ }, g = (e, n) => {
114
+ let r = { ...n }, a = e.taxonomy;
115
+ a !== void 0 && Array.isArray(r[a.field]) && (r[a.field] = i(a, r[a.field]));
116
+ for (let t of e.derivedFields) {
117
+ let n = e.fields[t]?.derived;
118
+ n !== void 0 && (r[t] = n.transform(r[n.source], r));
119
119
  }
120
- for (let [n, r] of Object.entries(t.fields)) r.kind === "richText" && i[n] !== void 0 && i[n] !== null && (i[n] = _(r, e(i[n], r.richText?.profile)));
121
- for (let [e, n] of Object.entries(t.fields)) n.kind === "components" && Array.isArray(i[e]) && (i[e] = v(n.components ?? [], i[e]));
122
- return i;
120
+ for (let [n, i] of Object.entries(e.fields)) i.kind === "richText" && r[n] !== void 0 && r[n] !== null && (r[n] = _(i, t(r[n], i.richText?.profile)));
121
+ for (let [t, n] of Object.entries(e.fields)) n.kind === "components" && Array.isArray(r[t]) && (r[t] = v(n.components ?? [], r[t]));
122
+ return r;
123
123
  }, _ = (e, t) => {
124
124
  let n = e.richText?.profile?.components ?? [];
125
125
  return n.length === 0 || !c(t) || !Array.isArray(t.blocks) ? t : {