@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
@@ -0,0 +1,12 @@
1
+ import { copyObservedRoutes as e, createRouteHistoryStore as t } from "./routeHistoryStorage.js";
2
+ //#region src/routeHistoryStore.ts
3
+ var n = "_voltro_cms_route_history_heads", r = "_voltro_cms_route_history", { routeHistoryTables: i, routeHistoryHeadsTable: a, routeHistoryEntriesTable: o, readRouteHistoryPage: s, readRouteHistoryUrl: c, replaceRouteHistory: l, iterateRouteHistory: u } = t({
4
+ heads: n,
5
+ entries: r,
6
+ headPrefix: "crhh",
7
+ entryPrefix: "crhe",
8
+ headIndex: "cms_route_history_head_scope",
9
+ entryIndex: "cms_route_history_url_scope"
10
+ });
11
+ //#endregion
12
+ export { r as ROUTE_HISTORY_ENTRIES, n as ROUTE_HISTORY_HEADS, e as copyObservedRoutes, u as iterateRouteHistory, s as readRouteHistoryPage, c as readRouteHistoryUrl, l as replaceRouteHistory, i as routeHistoryTables };
package/dist/schedule.js CHANGED
@@ -1,64 +1,64 @@
1
- import { asTyped as e } from "./effectForm.js";
2
- import { ContentNotFound as t, ReferenceUnavailable as n, ReviewRequired as r } from "./errors.js";
3
- import { publish as i, revalidateContent as a, scopeColumns as o, unpublish as s } from "./write.js";
4
- import { and as c, eq as l, lte as u } from "@voltro/database";
1
+ import { ChangeFeedUnavailable as e, ContentNotFound as t, ContentValidationFailed as n, ReferenceUnavailable as r, ReviewRequired as i } from "./errors.js";
2
+ import { asTyped as a } from "./effectForm.js";
3
+ import { publish as o, revalidateContent as s, scopeColumns as c, unpublish as l } from "./write.js";
4
+ import { and as u, eq as d, lte as f } from "@voltro/database";
5
5
  //#region src/schedule.ts
6
- var d = (e) => `${e.name}_drafts`, f = async (e, t, n, r, i) => m(e, t, n, { publishAt: r }, i), p = async (e, t, n, r, i) => m(e, t, n, { unpublishAt: r }, i), m = async (e, n, r, i, a) => {
7
- let s = d(n), u = await e.query({
8
- table: s,
9
- predicate: c(l("id", r), ...Object.entries(o(a)).map(([e, t]) => l(e, t))),
6
+ var p = (e) => `${e.name}_drafts`, m = async (e, t, n, r, i) => g(e, t, n, { publishAt: r }, i), h = async (e, t, n, r, i) => g(e, t, n, { unpublishAt: r }, i), g = async (e, n, r, i, a) => {
7
+ let o = p(n), s = await e.query({
8
+ table: o,
9
+ predicate: u(d("id", r), ...Object.entries(c(a)).map(([e, t]) => d(e, t))),
10
10
  order: [],
11
11
  take: 1,
12
12
  skip: void 0,
13
13
  projection: void 0
14
14
  });
15
- if (u[0] === void 0) throw new t({
15
+ if (s[0] === void 0) throw new t({
16
16
  contentType: n.name,
17
17
  id: r,
18
18
  stage: "draft"
19
19
  });
20
- return await e.update(s, r, i) ?? u[0];
21
- }, h = (e, t) => ({
22
- table: d(e),
23
- predicate: c(u("publishAt", t), l("status", "draft")),
20
+ return await e.update(o, r, i) ?? s[0];
21
+ }, _ = (e, t) => ({
22
+ table: p(e),
23
+ predicate: u(f("publishAt", t), d("status", "draft")),
24
24
  order: [],
25
25
  take: void 0,
26
26
  skip: void 0,
27
27
  projection: void 0
28
- }), g = async (e, t, o = /* @__PURE__ */ new Date()) => {
29
- let s = await e.query(h(t, o)), c = [];
30
- for (let a of s) {
31
- let o = a.id;
32
- if (typeof o != "string") continue;
28
+ }), v = async (e, t, n = /* @__PURE__ */ new Date()) => {
29
+ let a = await e.query(_(t, n)), c = [];
30
+ for (let n of a) {
31
+ let a = n.id;
32
+ if (typeof a != "string") continue;
33
33
  let s = {
34
- site: String(a.site),
35
- environment: String(a.environment),
36
- locale: String(a.locale)
34
+ site: String(n.site),
35
+ environment: String(n.environment),
36
+ locale: String(n.locale)
37
37
  };
38
38
  try {
39
39
  await e.transactional(async (e) => {
40
- await i(e, t, o, s), await e.update(d(t), o, { publishAt: null });
40
+ await o(e, t, a, s), await e.update(p(t), a, { publishAt: null });
41
41
  });
42
42
  } catch (e) {
43
- if (e instanceof r || e instanceof n) continue;
43
+ if (e instanceof i || e instanceof r) continue;
44
44
  throw e;
45
45
  }
46
- c.push(o);
46
+ c.push(a);
47
47
  }
48
- return c.length > 0 && a(t), c;
49
- }, _ = async (e, n, r = /* @__PURE__ */ new Date()) => {
48
+ return c.length > 0 && s(t), c;
49
+ }, y = async (e, n, r = /* @__PURE__ */ new Date()) => {
50
50
  let i = await e.query({
51
- table: d(n),
52
- predicate: u("unpublishAt", r),
51
+ table: p(n),
52
+ predicate: f("unpublishAt", r),
53
53
  order: [],
54
54
  take: void 0,
55
55
  skip: void 0,
56
56
  projection: void 0
57
- }), o = [];
57
+ }), a = [];
58
58
  for (let r of i) {
59
59
  let i = r.id;
60
60
  if (typeof i != "string") continue;
61
- let a = {
61
+ let o = {
62
62
  site: String(r.site),
63
63
  environment: String(r.environment),
64
64
  locale: String(r.locale)
@@ -66,15 +66,15 @@ var d = (e) => `${e.name}_drafts`, f = async (e, t, n, r, i) => m(e, t, n, { pub
66
66
  await e.transactional(async (e) => {
67
67
  let r = !0;
68
68
  try {
69
- await s(e, n, i, a);
69
+ await l(e, n, i, o);
70
70
  } catch (e) {
71
71
  if (!(e instanceof t)) throw e;
72
72
  r = !1;
73
73
  }
74
- return await e.update(d(n), i, { unpublishAt: null }), r;
75
- }) && o.push(i);
74
+ return await e.update(p(n), i, { unpublishAt: null }), r;
75
+ }) && a.push(i);
76
76
  }
77
- return o.length > 0 && a(n), o;
78
- }, v = (...n) => e(() => f(...n), t), y = (...n) => e(() => p(...n), t), b = (...t) => e(() => g(...t)), x = (...t) => e(() => _(...t));
77
+ return a.length > 0 && s(n), a;
78
+ }, b = (...e) => a(() => m(...e), t), x = (...e) => a(() => h(...e), t), S = (...t) => a(() => v(...t), e, n), C = (...t) => a(() => y(...t), e);
79
79
  //#endregion
80
- export { g as publishDue, b as publishDueEffect, f as schedulePublish, v as schedulePublishEffect, p as scheduleUnpublish, y as scheduleUnpublishEffect, _ as unpublishDue, x as unpublishDueEffect };
80
+ export { v as publishDue, S as publishDueEffect, m as schedulePublish, b as schedulePublishEffect, h as scheduleUnpublish, x as scheduleUnpublishEffect, y as unpublishDue, C as unpublishDueEffect };
package/dist/seo.js CHANGED
@@ -18,7 +18,7 @@ var e = (e, t) => e.nodes.find((e) => e.documentId === t && !e.fallback), t = (t
18
18
  return n !== void 0 && r(n);
19
19
  })
20
20
  }))), i = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;"), a = (e, t, n) => `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">\n${e.map((e) => {
21
- let r = e.alternates.length > 1 ? [...e.alternates.map((e) => ` <xhtml:link rel="alternate" hreflang="${i(e.locale)}" href="${i(t(e.locale, e.path))}" />`), ...e.alternates.filter((e) => e.locale === n).map((e) => ` <xhtml:link rel="alternate" hreflang="x-default" href="${i(t(e.locale, e.path))}" />`)] : [], a = e.lastmod === null ? [] : [` <lastmod>${e.lastmod}</lastmod>`];
21
+ let r = e.alternates.length > 1 || e.alternates.some((e) => e.locale === "x-default") ? [...e.alternates.map((e) => ` <xhtml:link rel="alternate" hreflang="${i(e.locale)}" href="${i(t(e.locale, e.path))}" />`), ...e.alternates.filter((t) => t.locale === n && !e.alternates.some((e) => e.locale === "x-default")).map((e) => ` <xhtml:link rel="alternate" hreflang="x-default" href="${i(t(e.locale, e.path))}" />`)] : [], a = e.lastmod === null ? [] : [` <lastmod>${e.lastmod}</lastmod>`];
22
22
  return [
23
23
  " <url>",
24
24
  ` <loc>${i(t(e.locale, e.path))}</loc>`,
package/dist/series.js CHANGED
@@ -1,5 +1,5 @@
1
- import { asTyped as e } from "./effectForm.js";
2
- import { ContentNotFound as t, ContentValidationFailed as n } from "./errors.js";
1
+ import { ContentNotFound as e, ContentValidationFailed as t } from "./errors.js";
2
+ import { asTyped as n } from "./effectForm.js";
3
3
  import { scopeColumns as r } from "./write.js";
4
4
  import { occurrencesOf as i, recurrenceProblems as a } from "./recurrence.js";
5
5
  import { and as o, eq as s, id as c, integer as l, json as u, table as d, text as f } from "@voltro/database";
@@ -39,9 +39,9 @@ var m = "cms_publish_series", h = d(m, {
39
39
  publishAt: s.startsAt,
40
40
  unpublishAt: s.endsAt
41
41
  }), o;
42
- }, x = async (e, c, l, u, d, f = /* @__PURE__ */ new Date()) => {
42
+ }, x = async (n, c, l, u, d, f = /* @__PURE__ */ new Date()) => {
43
43
  let p = a(d);
44
- if (p.length > 0) throw new n({
44
+ if (p.length > 0) throw new t({
45
45
  contentType: c.name,
46
46
  violations: p.map((e) => ({
47
47
  field: "repeat",
@@ -49,14 +49,14 @@ var m = "cms_publish_series", h = d(m, {
49
49
  message: e
50
50
  }))
51
51
  });
52
- let [h] = await g(e, _(c), o(s("id", l), ...Object.entries(r(u)).map(([e, t]) => s(e, t))));
53
- if (h === void 0) throw new t({
52
+ let [h] = await g(n, _(c), o(s("id", l), ...Object.entries(r(u)).map(([e, t]) => s(e, t))));
53
+ if (h === void 0) throw new e({
54
54
  contentType: c.name,
55
55
  id: l,
56
56
  stage: "draft"
57
57
  });
58
- let y = await b(e, c, l, i(d), -1, f);
59
- if (y === -1) throw new n({
58
+ let y = await b(n, c, l, i(d), -1, f);
59
+ if (y === -1) throw new t({
60
60
  contentType: c.name,
61
61
  violations: [{
62
62
  field: "repeat",
@@ -64,9 +64,9 @@ var m = "cms_publish_series", h = d(m, {
64
64
  message: "every occurrence of this series is over"
65
65
  }]
66
66
  });
67
- for (let t of await g(e, m, s("draftId", l))) await e.delete(m, String(t.id));
67
+ for (let e of await g(n, m, s("draftId", l))) await n.delete(m, String(e.id));
68
68
  let x = h.tenantId !== void 0 && h.tenantId !== null ? { tenantId: h.tenantId } : {};
69
- return v(await e.insert(m, {
69
+ return v(await n.insert(m, {
70
70
  contentType: c.name,
71
71
  draftId: l,
72
72
  rule: d,
@@ -100,6 +100,6 @@ var m = "cms_publish_series", h = d(m, {
100
100
  });
101
101
  }
102
102
  return r;
103
- }, w = [t, n], T = (...t) => e(() => C(...t), ...w), E = (...t) => e(() => S(...t), ...w), D = (...t) => e(() => x(...t), ...w), O = (...t) => e(() => y(...t), ...w);
103
+ }, w = [e, t], T = (...e) => n(() => C(...e), ...w), E = (...e) => n(() => S(...e), ...w), D = (...e) => n(() => x(...e), ...w), O = (...e) => n(() => y(...e), ...w);
104
104
  //#endregion
105
105
  export { m as CMS_PUBLISH_SERIES_TABLE, C as advanceSeries, T as advanceSeriesEffect, S as cancelSeries, E as cancelSeriesEffect, h as cmsPublishSeriesTable, x as scheduleSeries, D as scheduleSeriesEffect, y as seriesOf, O as seriesOfEffect };
package/dist/share.js CHANGED
@@ -1,5 +1,5 @@
1
- import { asTyped as e } from "./effectForm.js";
2
- import { ContentNotFound as t, PreviewShareRejected as n } from "./errors.js";
1
+ import { ContentNotFound as e, PreviewShareRejected as t } from "./errors.js";
2
+ import { asTyped as n } from "./effectForm.js";
3
3
  import { CMS_REVISIONS_TABLE as r } from "./contentType.js";
4
4
  import { and as i, eq as a, id as o, table as s, text as c, timestamp as l } from "@voltro/database";
5
5
  import { tenant as u } from "@voltro/plugin-multitenancy/mixin";
@@ -26,19 +26,19 @@ var p = "cms_preview_shares", m = 30, h = s(p, {
26
26
  skip: void 0,
27
27
  projection: void 0,
28
28
  ...r ? { crossTenant: !0 } : {}
29
- }))[0], v = async (e, r, o, s, c) => {
29
+ }))[0], v = async (n, r, o, s, c) => {
30
30
  let l = c.now ?? /* @__PURE__ */ new Date();
31
- if (c.expiresAt.getTime() <= l.getTime()) throw new n({ reason: "expiryInPast" });
32
- if (c.expiresAt.getTime() > l.getTime() + 2592e6) throw new n({ reason: "expiryTooFar" });
33
- let u = await _(e, `${r.name}_drafts`, i(a("id", o), a("site", s.site), a("environment", s.environment), a("locale", s.locale)));
34
- if (u === void 0) throw new t({
31
+ if (c.expiresAt.getTime() <= l.getTime()) throw new t({ reason: "expiryInPast" });
32
+ if (c.expiresAt.getTime() > l.getTime() + 2592e6) throw new t({ reason: "expiryTooFar" });
33
+ let u = await _(n, `${r.name}_drafts`, i(a("id", o), a("site", s.site), a("environment", s.environment), a("locale", s.locale)));
34
+ if (u === void 0) throw new e({
35
35
  contentType: r.name,
36
36
  id: o,
37
37
  stage: "draft"
38
38
  });
39
39
  let d = f(32).toString("base64url");
40
40
  return {
41
- share: await e.insert(p, {
41
+ share: await n.insert(p, {
42
42
  contentType: r.name,
43
43
  variantId: o,
44
44
  documentId: u.documentId,
@@ -89,14 +89,14 @@ var p = "cms_preview_shares", m = 30, h = s(p, {
89
89
  revision: u.number,
90
90
  values: u.values ?? {}
91
91
  };
92
- }, b = async (e, n, r = /* @__PURE__ */ new Date()) => {
93
- let i = await _(e, p, a("id", n));
94
- if (i === void 0) throw new t({
92
+ }, b = async (t, n, r = /* @__PURE__ */ new Date()) => {
93
+ let i = await _(t, p, a("id", n));
94
+ if (i === void 0) throw new e({
95
95
  contentType: p,
96
96
  id: n,
97
97
  stage: "share"
98
98
  });
99
- (i.revokedAt === null || i.revokedAt === void 0) && await e.update(p, n, { revokedAt: r });
99
+ (i.revokedAt === null || i.revokedAt === void 0) && await t.update(p, n, { revokedAt: r });
100
100
  }, x = (e, t, n) => e.query({
101
101
  table: p,
102
102
  predicate: i(a("contentType", t.name), a("documentId", n)),
@@ -107,6 +107,6 @@ var p = "cms_preview_shares", m = 30, h = s(p, {
107
107
  take: void 0,
108
108
  skip: void 0,
109
109
  projection: void 0
110
- }), S = [t, n], C = (...t) => e(() => v(...t), ...S), w = (...t) => e(() => x(...t), ...S), T = (...t) => e(() => y(...t), ...S), E = (...t) => e(() => b(...t), ...S);
110
+ }), S = [e, t], C = (...e) => n(() => v(...e), ...S), w = (...e) => n(() => x(...e), ...S), T = (...e) => n(() => y(...e), ...S), E = (...e) => n(() => b(...e), ...S);
111
111
  //#endregion
112
112
  export { p as CMS_PREVIEW_SHARES_TABLE, m as MAX_PREVIEW_SHARE_DAYS, h as cmsPreviewSharesTable, v as createPreviewShare, C as createPreviewShareEffect, x as listPreviewShares, w as listPreviewSharesEffect, y as resolvePreviewShare, T as resolvePreviewShareEffect, b as revokePreviewShare, E as revokePreviewShareEffect };
@@ -0,0 +1,159 @@
1
+ import { ChangeFeedUnavailable as e, SiteBindingUnavailable as t } from "./errors.js";
2
+ import { asTyped as n } from "./effectForm.js";
3
+ import { invalidatePublicationRelease as r, lockPublicationStream as i } from "./changes.js";
4
+ import { and as a, eq as o, generateId as s, id as c, table as l, text as u } from "@voltro/database";
5
+ import { tenant as d } from "@voltro/plugin-multitenancy/mixin";
6
+ //#region src/siteBindings.ts
7
+ var f = "cms_site_bindings", p = "cms_site_binding_revisions", m = l(f, {
8
+ id: c({ prefix: "csbi" }),
9
+ site: u().maxLength(64),
10
+ environment: u().maxLength(64),
11
+ name: u().maxLength(64),
12
+ contentType: u().maxLength(64),
13
+ documentId: u().maxLength(64),
14
+ revisionId: u().maxLength(64)
15
+ }).with(d()).unique("cms_site_binding_scope", [
16
+ "tenantId",
17
+ "site",
18
+ "environment",
19
+ "name"
20
+ ]), h = l(p, {
21
+ id: c({ prefix: "csbr" }),
22
+ site: u().maxLength(64),
23
+ environment: u().maxLength(64),
24
+ bindingId: u().maxLength(64),
25
+ contentType: u().maxLength(64),
26
+ documentId: u().maxLength(64),
27
+ previousRevisionId: u().maxLength(64).nullable(),
28
+ sourceRevisionId: u().maxLength(64).nullable()
29
+ }).with(d()), g = (e) => {
30
+ throw new t({ reason: e });
31
+ }, _ = (e) => typeof e == "string" && e.length > 0 && e.length <= 64 && e.trim() === e, v = (e) => typeof e == "string" && /^[a-z][a-z0-9_-]{0,63}$/.test(e), y = (e) => e === null || _(e), b = (e) => [
32
+ e.tenantId,
33
+ e.site,
34
+ e.environment
35
+ ].every(_) ? {
36
+ tenantId: e.tenantId,
37
+ site: e.site,
38
+ environment: e.environment
39
+ } : g("scope"), x = (e) => a(o("tenantId", e.tenantId), o("site", e.site), o("environment", e.environment)), S = (e, t) => {
40
+ let n = s({
41
+ kind: "typeid",
42
+ prefix: e
43
+ }, t);
44
+ return n === null ? g("state") : String(n);
45
+ }, C = (e) => ![
46
+ e.id,
47
+ e.contentType,
48
+ e.documentId,
49
+ e.revisionId
50
+ ].every(_) || !v(e.name) ? g("state") : {
51
+ id: String(e.id),
52
+ name: e.name,
53
+ contentType: String(e.contentType),
54
+ documentId: String(e.documentId),
55
+ revisionId: String(e.revisionId)
56
+ }, w = async (e, t, n, r) => {
57
+ let i = b(t);
58
+ if (!v(n)) return g("name");
59
+ let [s] = await e.query({
60
+ table: f,
61
+ predicate: a(x(i), o("name", n)),
62
+ ...r === void 0 ? {} : { lock: r },
63
+ order: [],
64
+ take: 1,
65
+ skip: void 0,
66
+ projection: void 0
67
+ });
68
+ return s;
69
+ }, T = async (e, t, n) => {
70
+ let r = await w(e, t, n);
71
+ return r === void 0 ? null : C(r);
72
+ }, E = async (e, t, n) => {
73
+ let r = b(t);
74
+ await i(e, r);
75
+ let a = await w(e, r, n, "update");
76
+ return a === void 0 ? g("missing") : C(a);
77
+ }, D = async (e, t, n, r, i) => {
78
+ let s = t.filter((e) => e.name === r);
79
+ if (s.length !== 1 || !_(r) || !_(i)) return g("target");
80
+ let [c] = await e.query({
81
+ table: `${s[0].name}_published`,
82
+ predicate: a(x(n), o("documentId", i), o("status", "published")),
83
+ lock: "update",
84
+ order: [],
85
+ take: 1,
86
+ skip: void 0,
87
+ projection: ["id"]
88
+ });
89
+ if (c === void 0) return g("target");
90
+ }, O = async (e, t, n, i, a, o) => {
91
+ let s = {
92
+ id: i?.id ?? S("csbi", "cms_site_bindings"),
93
+ name: n,
94
+ contentType: a.contentType,
95
+ documentId: a.documentId,
96
+ revisionId: S("csbr", p)
97
+ };
98
+ return await e.insert(p, {
99
+ id: s.revisionId,
100
+ ...t,
101
+ bindingId: s.id,
102
+ contentType: s.contentType,
103
+ documentId: s.documentId,
104
+ previousRevisionId: i?.revisionId ?? null,
105
+ sourceRevisionId: o
106
+ }), i === null ? await e.insert(f, {
107
+ ...t,
108
+ ...s
109
+ }) : await e.update(f, i.id, {
110
+ contentType: s.contentType,
111
+ documentId: s.documentId,
112
+ revisionId: s.revisionId
113
+ }), await r(e, t), s;
114
+ }, k = async (e, t, n, r, a) => {
115
+ let o = b(n), s = a.expectedRevisionId, c = {
116
+ contentType: a.contentType,
117
+ documentId: a.documentId
118
+ };
119
+ if (!y(s)) return g("conflict");
120
+ await i(e, o);
121
+ let l = await w(e, o, r, "update"), u = l === void 0 ? null : C(l);
122
+ return (u?.revisionId ?? null) === s ? (await D(e, t, o, c.contentType, c.documentId), u?.contentType === c.contentType && u.documentId === c.documentId ? u : O(e, o, r, u, c, null)) : g("conflict");
123
+ }, A = async (e, t, n, r) => {
124
+ let i = b(t);
125
+ if (!_(r)) return g("revision");
126
+ let s = await w(e, i, n);
127
+ if (s === void 0) return g("missing");
128
+ let [c] = await e.query({
129
+ table: p,
130
+ predicate: a(x(i), o("bindingId", String(s.id)), o("id", r)),
131
+ lock: "update",
132
+ order: [],
133
+ take: 1,
134
+ skip: void 0,
135
+ projection: void 0
136
+ });
137
+ return c === void 0 ? g("revision") : ![
138
+ c.id,
139
+ c.bindingId,
140
+ c.contentType,
141
+ c.documentId
142
+ ].every(_) || !y(c.previousRevisionId) || !y(c.sourceRevisionId) ? g("state") : {
143
+ id: String(c.id),
144
+ bindingId: String(c.bindingId),
145
+ contentType: String(c.contentType),
146
+ documentId: String(c.documentId),
147
+ previousRevisionId: c.previousRevisionId,
148
+ sourceRevisionId: c.sourceRevisionId
149
+ };
150
+ }, j = async (e, t, n, r, a) => {
151
+ let o = b(n), s = a.expectedRevisionId, c = a.revisionId;
152
+ await i(e, o);
153
+ let l = await w(e, o, r, "update"), u = l === void 0 ? g("missing") : C(l);
154
+ if (!_(s) || u.revisionId !== s) return g("conflict");
155
+ let d = await A(e, o, r, c);
156
+ return await D(e, t, o, d.contentType, d.documentId), O(e, o, r, u, d, d.id);
157
+ }, M = (...e) => n(() => T(...e), t), N = (...r) => n(() => k(...r), t, e), P = (...e) => n(() => A(...e), t), F = (...r) => n(() => j(...r), t, e);
158
+ //#endregion
159
+ export { f as CMS_SITE_BINDINGS_TABLE, p as CMS_SITE_BINDING_REVISIONS_TABLE, k as bindSiteContent, N as bindSiteContentEffect, h as cmsSiteBindingRevisionsTable, m as cmsSiteBindingsTable, E as lockSiteContentBinding, j as rollbackSiteContentBinding, F as rollbackSiteContentBindingEffect, T as siteContentBinding, M as siteContentBindingEffect, A as siteContentBindingRevision, P as siteContentBindingRevisionEffect };
@@ -0,0 +1,104 @@
1
+ import { compileSiteDelivery as e } from "./siteDelivery.js";
2
+ import { copySiteScope as t, lockSiteState as n } from "./siteState.js";
3
+ import { captureBuildSnapshot as r, copySnapshotResource as i } from "./buildSnapshot.js";
4
+ import { compileSnapshotRouting as a } from "./snapshotRouting.js";
5
+ import { copySnapshotAppCodePin as o, snapshotDefinitionSources as s } from "./snapshotDefinitions.js";
6
+ import { snapshotPublicAccessSource as c } from "./snapshotPublicAccess.js";
7
+ import { snapshotProjectionSource as l } from "./snapshotProjection.js";
8
+ import { snapshotRenditionsSource as u } from "./snapshotRenditions.js";
9
+ import { snapshotSiteSources as d } from "./snapshotSite.js";
10
+ import { snapshotCaptureApplicationPins as f } from "./snapshotApplication.js";
11
+ import { snapshotEnvironmentSource as p } from "./snapshotEnvironment.js";
12
+ import { snapshotDomainSource as m } from "./snapshotDomains.js";
13
+ import { snapshotReleaseSource as h } from "./snapshotRelease.js";
14
+ import { snapshotContentRoutesSource as g } from "./snapshotRoutes.js";
15
+ import { lockOutputRouteHistoryCapture as _ } from "./outputActivationStore.js";
16
+ import { snapshotRedirectSource as v } from "./snapshotRedirects.js";
17
+ import { snapshotMediaUsesSource as y } from "./snapshotMedia.js";
18
+ import { snapshotMediaSelectionSource as b } from "./snapshotMediaCapture.js";
19
+ import { deriveSnapshotSeoMetadata as x } from "./snapshotSeoMetadata.js";
20
+ import { Schema as S } from "effect";
21
+ import { canonicalJson as C } from "@voltro/runtime";
22
+ //#region src/siteBuildCandidate.ts
23
+ var w = class extends S.TaggedError()("SiteBuildCandidateUnavailable", { reason: S.Literals(["scope", "app"]) }) {}, T = (e) => {
24
+ throw new w({ reason: e });
25
+ }, E = (e, t, n, r) => {
26
+ if (e.format !== "voltro.app.build-inputs/v1") return T("app");
27
+ let a = e.entries;
28
+ return {
29
+ format: e.format,
30
+ entries: async function* (e) {
31
+ let o, s = 0;
32
+ for await (let c of a(e)) {
33
+ let e = i(c);
34
+ if (o === void 0) {
35
+ if (e.key !== "configuration" || e.value.version !== 1 || C(e.value.app) !== C(t) || typeof e.value.inputsId != "string" || !/^[a-f0-9]{64}$/.test(e.value.inputsId) || !Number.isSafeInteger(e.value.files) || Number(e.value.files) < 0) return T("app");
36
+ o = Number(e.value.files);
37
+ let i = e.value.execution, a = i?.definitions;
38
+ if (a !== void 0 && (typeof a != "object" || !a || Array.isArray(a) || !("value" in a) || C(a.value) !== C(n))) return T("app");
39
+ let s = i?.routes;
40
+ if (s !== void 0 && (typeof s != "object" || !s || Array.isArray(s) || !("value" in s) || C(s.value) !== C(r)) || r !== null && s === void 0) return T("app");
41
+ } else if (!/^file:[a-f0-9]{64}$/.test(e.key) || ++s > o) return T("app");
42
+ yield e;
43
+ }
44
+ if (o === void 0 || s !== o) return T("app");
45
+ }
46
+ };
47
+ }, D = async (i, S) => {
48
+ let C = {
49
+ ...t(S.scope),
50
+ environment: S.scope.environment
51
+ }, w = e(S.site), D = o(S.code), O = S.now ?? Date.now(), { alias: k, releaseId: A, expiresAt: j, xDefault: M, custody: N } = S;
52
+ if (C.site !== w.definition.id || !w.definition.environments.includes(C.environment)) return T("scope");
53
+ let P = S.types.map((e) => ({
54
+ ...e,
55
+ fields: { ...e.fields }
56
+ })), F = s(P, D), I = l(P, D, S.projection), L = c(P, D, S.access, S.consentPurposes), R = a(S.routing, S.routeDiscovery, D), z = E(S.app, D, f({
57
+ ...S,
58
+ types: P,
59
+ site: w.definition
60
+ }, D, S.frontendManifest), R.discovery), B = h(i, C, A, O), V = d(i, C, w.definition, D, O), H = g(i, C, P, w.definition, D, O, R), U = b(i, N, C, u(i, C, y(i, C, P, D, O), S.renditions)), W = await _(i, C);
61
+ await n(i, C);
62
+ let G = await p(i, C, w.definition.environments, k, O);
63
+ if (G.scope.environment !== C.environment) return T("scope");
64
+ let K = await m(i, C, O), q = await r(i, P, C, {
65
+ now: O,
66
+ expiresAt: j,
67
+ locales: w.contentLocales,
68
+ sources: {
69
+ release: B,
70
+ environment: G.source,
71
+ ...V,
72
+ domains: K,
73
+ routes: H,
74
+ ...F,
75
+ assets: U,
76
+ redirects: v(i, C, W, {
77
+ types: P,
78
+ site: w.definition,
79
+ code: D,
80
+ routing: S.routing,
81
+ routeDiscovery: S.routeDiscovery
82
+ }, O),
83
+ policies: L,
84
+ projection: I,
85
+ app: z,
86
+ seo: {
87
+ format: "voltro.cms.seo-pending/v1",
88
+ entries: () => [{
89
+ key: "configuration",
90
+ value: {
91
+ version: 1,
92
+ state: "pending"
93
+ }
94
+ }]
95
+ }
96
+ }
97
+ });
98
+ return x(i, C, q, {
99
+ now: O,
100
+ xDefault: M
101
+ });
102
+ };
103
+ //#endregion
104
+ export { w as SiteBuildCandidateUnavailable, D as captureSiteBuildCandidate };
@@ -0,0 +1,115 @@
1
+ import { SiteDeliveryUnavailable as e } from "./errors.js";
2
+ import { defineContentSeoDefaults as t } from "./contentSeo.js";
3
+ //#region src/siteDelivery.ts
4
+ var n = (t) => {
5
+ throw new e({ reason: t });
6
+ }, r = (e) => typeof e == "string" && e.length > 0 && e.length <= 64 && e.trim() === e, i = (e) => typeof e == "string" && /^[a-z][a-z0-9_-]{0,63}$/.test(e), a = (e, t) => {
7
+ if (typeof e != "object" || !e || Array.isArray(e) || ![Object.prototype, null].includes(Object.getPrototypeOf(e)) || Object.getOwnPropertySymbols(e).length !== 0) return n("definition");
8
+ let r = Object.getOwnPropertyDescriptors(e);
9
+ return Object.values(r).some((e) => !e.enumerable || !("value" in e)) || t !== void 0 && (Object.keys(r).length !== t.length || t.some((e) => !Object.hasOwn(r, e))) ? n("definition") : Object.fromEntries(Object.entries(r).map(([e, t]) => [e, t.value]));
10
+ }, o = (e, t) => {
11
+ if (!Array.isArray(e) || e.length > t || Object.getOwnPropertySymbols(e).length !== 0 || Object.keys(e).length !== e.length || Object.keys(e).some((e, t) => e !== String(t))) return n("definition");
12
+ let r = Object.getOwnPropertyDescriptors(e);
13
+ return Object.entries(r).some(([e, t]) => e !== "length" && (!t.enumerable || !("value" in t))) ? n("definition") : Array.from({ length: e.length }, (e, t) => r[String(t)].value);
14
+ }, s = (e, t, r) => {
15
+ let i = o(e, t);
16
+ return !i.every(r) || new Set(i).size !== i.length ? n("definition") : Object.freeze([...i]);
17
+ }, c = (e) => typeof e == "string" && e.length <= 256 && (e === "" || /^(?:\/[\p{L}\p{N}_~-]+)+$/u.test(e) && e.normalize("NFC") === e), l = (e) => {
18
+ let l = a(e), u = [
19
+ "id",
20
+ "version",
21
+ "environments",
22
+ "defaultEnvironment",
23
+ "locales",
24
+ "defaultLocale",
25
+ "sourceLocale",
26
+ "bindings"
27
+ ];
28
+ if (u.some((e) => !Object.hasOwn(l, e)) || Object.keys(l).some((e) => ![...u, "seo"].includes(e)) || !r(l.id) || !Number.isSafeInteger(l.version) || Number(l.version) < 1) return n("definition");
29
+ let d = s(l.environments, 128, i);
30
+ if (d.length === 0 || !i(l.defaultEnvironment) || !d.includes(l.defaultEnvironment)) return n("environment");
31
+ let f = o(l.locales, 128).map((e) => {
32
+ let t = a(e, [
33
+ "id",
34
+ "tag",
35
+ "contentLocale",
36
+ "direction",
37
+ "enabled",
38
+ "prefix",
39
+ "fallback"
40
+ ]);
41
+ return !i(t.id) || !r(t.contentLocale) || typeof t.tag != "string" || t.tag.length > 128 || !/^[A-Za-z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)*$/.test(t.tag) || t.direction !== "ltr" && t.direction !== "rtl" || typeof t.enabled != "boolean" ? n("locale") : c(t.prefix) ? Object.freeze({
42
+ id: t.id,
43
+ tag: t.tag,
44
+ contentLocale: t.contentLocale,
45
+ direction: t.direction,
46
+ enabled: t.enabled,
47
+ prefix: t.prefix,
48
+ fallback: s(t.fallback, 128, i)
49
+ }) : n("prefix");
50
+ });
51
+ for (let e of [
52
+ "id",
53
+ "contentLocale",
54
+ "tag",
55
+ "prefix"
56
+ ]) {
57
+ let t = f.map((t) => e === "tag" ? t.tag.toLowerCase() : t[e]);
58
+ if (new Set(t).size !== t.length) return n(e === "prefix" ? "prefix" : "locale");
59
+ }
60
+ let p = new Map(f.map((e) => [e.id, e]));
61
+ if (!i(l.defaultLocale) || !i(l.sourceLocale) || p.get(l.defaultLocale)?.enabled !== !0 || p.get(l.sourceLocale)?.enabled !== !0) return n("locale");
62
+ let m = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), g = (e) => {
63
+ if (m.has(e.id)) return n("fallback");
64
+ if (!h.has(e.id)) {
65
+ m.add(e.id);
66
+ for (let t of e.fallback) {
67
+ let r = p.get(t);
68
+ if (r === void 0 || e.enabled && !r.enabled) return n("fallback");
69
+ g(r);
70
+ }
71
+ m.delete(e.id), h.add(e.id);
72
+ }
73
+ };
74
+ for (let e of f) g(e);
75
+ let _ = a(l.bindings);
76
+ if (Object.keys(_).length > 64 || Object.entries(_).some(([e, t]) => !i(e) || !r(t))) return n("binding");
77
+ let v = l.seo === void 0 ? void 0 : a(l.seo);
78
+ if (v !== void 0 && (Object.keys(v).length > 128 || Object.keys(v).some((e) => !p.has(e)))) return n("locale");
79
+ let y = v === void 0 ? void 0 : Object.freeze(Object.fromEntries(Object.entries(v).map(([e, n]) => [e, t(n)])));
80
+ return Object.freeze({
81
+ ...y === void 0 ? {} : { seo: y },
82
+ id: l.id,
83
+ version: l.version,
84
+ environments: d,
85
+ defaultEnvironment: l.defaultEnvironment,
86
+ locales: Object.freeze(f),
87
+ defaultLocale: l.defaultLocale,
88
+ sourceLocale: l.sourceLocale,
89
+ bindings: Object.freeze(_)
90
+ });
91
+ }, u = (e) => {
92
+ let t = l(e), n = new Map(t.locales.map((e) => [e.id, e])), r = Object.fromEntries(t.locales.map((e) => {
93
+ let t = /* @__PURE__ */ new Set([e.id]), r = [], i = (e) => {
94
+ if (t.has(e)) return;
95
+ t.add(e);
96
+ let a = n.get(e);
97
+ r.push(a.contentLocale);
98
+ for (let e of a.fallback) i(e);
99
+ };
100
+ for (let t of e.fallback) i(t);
101
+ return [e.contentLocale, Object.freeze(r)];
102
+ })), i = (e) => Object.freeze(Object.fromEntries(t.locales.map((t) => [t.contentLocale, e(t)])));
103
+ return Object.freeze({
104
+ definition: t,
105
+ contentLocales: Object.freeze(t.locales.filter((e) => e.enabled).map((e) => e.contentLocale)),
106
+ defaultLocale: n.get(t.defaultLocale).contentLocale,
107
+ sourceLocale: n.get(t.sourceLocale).contentLocale,
108
+ fallback: Object.freeze(r),
109
+ prefixes: i((e) => e.prefix),
110
+ tags: i((e) => e.tag),
111
+ directions: i((e) => e.direction)
112
+ });
113
+ };
114
+ //#endregion
115
+ export { u as compileSiteDelivery, l as defineSiteDelivery };