@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.
- package/CHANGELOG.md +5321 -0
- package/README.md +138 -0
- package/THIRD-PARTY-NOTICES.md +860 -221
- package/dist/RichDocumentView.js +81 -36
- package/dist/aiCandidates.js +3 -3
- package/dist/applicationBuildSnapshotService.js +101 -0
- package/dist/assetRenditions.js +102 -0
- package/dist/assetRevision.js +46 -0
- package/dist/assetUseRights.js +72 -0
- package/dist/availability.js +19 -16
- package/dist/blueprint.js +75 -75
- package/dist/build.d.ts +3063 -0
- package/dist/build.js +37 -0
- package/dist/buildApplicationAdmission.js +16 -0
- package/dist/buildApplicationCatalog.js +136 -0
- package/dist/buildApplicationCatalogTable.js +24 -0
- package/dist/buildApplicationRest.js +99 -0
- package/dist/buildApplicationUpload.js +111 -0
- package/dist/buildSnapshot.js +401 -0
- package/dist/buildSnapshotApplicationPin.js +32 -0
- package/dist/buildSnapshotRest.js +210 -0
- package/dist/buildSnapshotService.js +265 -0
- package/dist/buildSnapshotTables.js +25 -0
- package/dist/bulk.js +71 -70
- package/dist/changes.js +279 -62
- package/dist/consent.js +5 -5
- package/dist/contentLocations.js +53 -0
- package/dist/contentProjection.js +83 -0
- package/dist/contentRouteIdentity.js +13 -0
- package/dist/contentRouteMaterializer.js +97 -0
- package/dist/contentRouteTypes.js +39 -0
- package/dist/contentSeo.js +189 -0
- package/dist/contentTreePath.js +60 -0
- package/dist/contentType.js +117 -100
- package/dist/contentValues.js +18 -0
- package/dist/copies.js +3 -3
- package/dist/domainHost.js +7 -0
- package/dist/domains.js +81 -87
- package/dist/draftTexts.js +37 -37
- package/dist/duplicates.js +23 -23
- package/dist/environmentAliases.js +138 -0
- package/dist/environments.js +107 -69
- package/dist/errors.js +54 -14
- package/dist/experiments.js +7 -7
- package/dist/frontendBindings.js +99 -0
- package/dist/frontendMedia.js +18 -0
- package/dist/index.d.ts +760 -47
- package/dist/index.js +89 -73
- package/dist/initializePublicRoutes.js +28 -0
- package/dist/liveContentRouteView.js +76 -0
- package/dist/nativeOutputDeploymentService.js +205 -0
- package/dist/outputActivation.js +234 -0
- package/dist/outputActivationOrigin.js +51 -0
- package/dist/outputActivationStore.js +411 -0
- package/dist/outputActivationTables.js +11 -0
- package/dist/outputActivationTarget.js +81 -0
- package/dist/outputActivationTargetTable.js +25 -0
- package/dist/outputDeployment.js +174 -0
- package/dist/outputDeploymentRest.js +168 -0
- package/dist/outputDeploymentService.js +241 -0
- package/dist/outputRouteGraph.js +177 -0
- package/dist/outputSafetyArtifact.js +147 -0
- package/dist/outputTargetRest.js +62 -0
- package/dist/pathSegmentEncoding.js +4 -0
- package/dist/privateCmsTransport.js +76 -0
- package/dist/privateNativeRouteReservation.js +10 -0
- package/dist/promotion.js +68 -59
- package/dist/publicBuild.js +90 -0
- package/dist/publicBuildRest.js +98 -0
- package/dist/publicBuildService.js +63 -0
- package/dist/publicOutputHttp.js +129 -0
- package/dist/publicOutputService.js +287 -0
- package/dist/publicPresentation.js +17 -0
- package/dist/publicRouteDispositionAdmission.js +38 -0
- package/dist/publicRouteHistoryStore.js +12 -0
- package/dist/publicRouteHistoryView.js +34 -0
- package/dist/publicRouteIntegrity.js +5 -0
- package/dist/publicRouteMutation.js +6 -0
- package/dist/publicRouteNamespace.js +134 -0
- package/dist/publicRoutePublication.js +36 -0
- package/dist/publicRouteRegistry.js +17 -0
- package/dist/publicRouteRegistryBinding.js +194 -0
- package/dist/publicRouteRegistryDefinition.js +76 -0
- package/dist/publicRouteSitePublication.js +40 -0
- package/dist/publicRouteTables.js +13 -0
- package/dist/publicRouteUrl.js +18 -0
- package/dist/publicationSeo.js +52 -0
- package/dist/publicationState.js +296 -0
- package/dist/quality.js +8 -8
- package/dist/reconfigurePublicRoutes.js +41 -0
- package/dist/redirects.js +104 -73
- package/dist/referenceGraph.js +15 -14
- package/dist/references.js +2 -2
- package/dist/release.js +177 -141
- package/dist/renderReadAuthority.js +43 -0
- package/dist/renderReadGrant.js +137 -0
- package/dist/review.js +28 -28
- package/dist/richDocument.js +54 -24
- package/dist/routeDispositionGraph.js +44 -0
- package/dist/routeDispositionRest.js +51 -0
- package/dist/routeDispositionService.js +73 -0
- package/dist/routeDispositionStore.js +289 -0
- package/dist/routeDispositionTables.js +5 -0
- package/dist/routeDispositions.js +91 -0
- package/dist/routeHistoryStorage.js +320 -0
- package/dist/routeHistoryStore.js +12 -0
- package/dist/schedule.js +36 -36
- package/dist/seo.js +1 -1
- package/dist/series.js +11 -11
- package/dist/share.js +13 -13
- package/dist/siteBindings.js +159 -0
- package/dist/siteBuildCandidate.js +104 -0
- package/dist/siteDelivery.js +115 -0
- package/dist/siteState.js +47 -0
- package/dist/snapshotAddressGraph.js +55 -0
- package/dist/snapshotAddressRead.js +73 -0
- package/dist/snapshotAppConsumer.js +71 -0
- package/dist/snapshotAppExecution.js +102 -0
- package/dist/snapshotApplication.js +75 -0
- package/dist/snapshotApprovedRouteDispositions.js +44 -0
- package/dist/snapshotAssetAssembly.js +70 -0
- package/dist/snapshotAssetAssemblyRest.js +50 -0
- package/dist/snapshotBindingRead.js +61 -0
- package/dist/snapshotCodeSeo.js +29 -0
- package/dist/snapshotComponent.js +34 -0
- package/dist/snapshotComponentSource.js +24 -0
- package/dist/snapshotConsumer.js +87 -0
- package/dist/snapshotContentIdentity.js +10 -0
- package/dist/snapshotDefinitions.js +264 -0
- package/dist/snapshotDocumentAssembly.js +193 -0
- package/dist/snapshotDocumentAssemblyRest.js +84 -0
- package/dist/snapshotDocumentProjection.js +202 -0
- package/dist/snapshotDocumentTransfer.js +35 -0
- package/dist/snapshotDocumentTransferRest.js +80 -0
- package/dist/snapshotDomains.js +56 -0
- package/dist/snapshotEnvironment.js +31 -0
- package/dist/snapshotFieldPlan.js +85 -0
- package/dist/snapshotFrontend.js +103 -0
- package/dist/snapshotLink.js +8 -0
- package/dist/snapshotMedia.js +111 -0
- package/dist/snapshotMediaCapture.js +246 -0
- package/dist/snapshotMediaFields.js +225 -0
- package/dist/snapshotMediaRead.js +185 -0
- package/dist/snapshotMediaReader.js +13 -0
- package/dist/snapshotObservation.js +16 -0
- package/dist/snapshotObservedRouteHistory.js +34 -0
- package/dist/snapshotOutputTransfer.js +78 -0
- package/dist/snapshotPageLoader.js +7 -0
- package/dist/snapshotPageSeo.js +59 -0
- package/dist/snapshotPathLocale.js +15 -0
- package/dist/snapshotPresentation.js +86 -0
- package/dist/snapshotPresentationPolicy.js +12 -0
- package/dist/snapshotProjection.js +119 -0
- package/dist/snapshotPublicAccess.js +161 -0
- package/dist/snapshotPublicRouteHistory.js +40 -0
- package/dist/snapshotReadAdmission.js +38 -0
- package/dist/snapshotRedirectOutput.js +151 -0
- package/dist/snapshotRedirectTargets.js +24 -0
- package/dist/snapshotRedirects.js +132 -0
- package/dist/snapshotReference.js +8 -0
- package/dist/snapshotReferenceAddress.js +10 -0
- package/dist/snapshotReferenceGraph.js +79 -0
- package/dist/snapshotReferenceRead.js +65 -0
- package/dist/snapshotRelease.js +99 -0
- package/dist/snapshotRender.js +361 -0
- package/dist/snapshotRenderDependencies.js +178 -0
- package/dist/snapshotRenditions.js +88 -0
- package/dist/snapshotRichDocument.js +62 -0
- package/dist/snapshotRoleTransfer.js +106 -0
- package/dist/snapshotRoleTransferRest.js +99 -0
- package/dist/snapshotRouteAdmission.js +71 -0
- package/dist/snapshotRouteDispatch.js +111 -0
- package/dist/snapshotRouteDispositionPlan.js +73 -0
- package/dist/snapshotRouteRead.js +43 -0
- package/dist/snapshotRoutes.js +79 -0
- package/dist/snapshotRouting.js +113 -0
- package/dist/snapshotSeo.js +179 -0
- package/dist/snapshotSeoControls.js +101 -0
- package/dist/snapshotSeoDocumentInventory.js +115 -0
- package/dist/snapshotSeoDocuments.js +129 -0
- package/dist/snapshotSeoMerge.js +85 -0
- package/dist/snapshotSeoMetadata.js +137 -0
- package/dist/snapshotSeoOutput.js +173 -0
- package/dist/snapshotSeoPathSets.js +105 -0
- package/dist/snapshotSeoRead.js +88 -0
- package/dist/snapshotSite.js +128 -0
- package/dist/snapshotSitemapFiles.js +36 -0
- package/dist/snapshotTreeDependencies.js +58 -0
- package/dist/snapshotTreeLoader.js +10 -0
- package/dist/snapshotTreeRead.js +158 -0
- package/dist/staticPathSet.js +177 -0
- package/dist/staticPathSetRest.js +129 -0
- package/dist/staticPathSetService.js +249 -0
- package/dist/staticPathSetStore.js +338 -0
- package/dist/tree.js +9 -9
- package/dist/validation.js +53 -53
- package/dist/web.d.ts +709 -7
- package/dist/web.js +50 -33
- package/dist/workflow.js +8 -8
- package/dist/write.js +250 -225
- package/package.json +20 -6
package/dist/blueprint.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { applyDerivations as
|
|
5
|
-
import { teamProblems as
|
|
6
|
-
import { reviewRequiredFor as
|
|
7
|
-
import { publish as
|
|
8
|
-
import { and as
|
|
1
|
+
import { ChangeFeedUnavailable as e, ContentIdConflict as t, ContentNotFound as n, ContentValidationFailed as r, ReferenceUnavailable as i, ReviewRequired as a, RevisionMismatch as o } from "./errors.js";
|
|
2
|
+
import { templateValues as s } from "./templates.js";
|
|
3
|
+
import { asTyped as c } from "./effectForm.js";
|
|
4
|
+
import { applyDerivations as l } from "./validation.js";
|
|
5
|
+
import { teamProblems as u } from "./team.js";
|
|
6
|
+
import { reviewRequiredFor as d } from "./review.js";
|
|
7
|
+
import { publish as f, saveDraft as p } from "./write.js";
|
|
8
|
+
import { and as m, eq as h } from "@voltro/database";
|
|
9
9
|
//#region src/blueprint.ts
|
|
10
|
-
var
|
|
10
|
+
var g = class extends Error {
|
|
11
11
|
reason;
|
|
12
12
|
_tag = "BlueprintInvalid";
|
|
13
13
|
constructor(e) {
|
|
14
14
|
super(`blueprint not usable: ${e}`), this.reason = e;
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, _ = "$entry", v = (e) => ({ [_]: e }), y = (e) => {
|
|
17
17
|
if (typeof e != "object" || !e || Array.isArray(e)) return;
|
|
18
|
-
let t = Object.keys(e), n = e[
|
|
18
|
+
let t = Object.keys(e), n = e[_];
|
|
19
19
|
return t.length === 1 && typeof n == "string" ? n : void 0;
|
|
20
|
-
},
|
|
21
|
-
let n =
|
|
20
|
+
}, b = (e, t) => {
|
|
21
|
+
let n = y(e);
|
|
22
22
|
if (n !== void 0) t.add(n);
|
|
23
|
-
else if (Array.isArray(e)) for (let n of e)
|
|
24
|
-
else if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
23
|
+
else if (Array.isArray(e)) for (let n of e) b(n, t);
|
|
24
|
+
else if (typeof e == "object" && e) for (let n of Object.values(e)) b(n, t);
|
|
25
25
|
return t;
|
|
26
|
-
},
|
|
27
|
-
let n =
|
|
28
|
-
return n === void 0 ? Array.isArray(e) ? e.map((e) =>
|
|
29
|
-
},
|
|
30
|
-
let t = e.team === void 0 ? [] :
|
|
31
|
-
if (t.length > 0) throw new
|
|
26
|
+
}, x = (e, t) => {
|
|
27
|
+
let n = y(e);
|
|
28
|
+
return n === void 0 ? Array.isArray(e) ? e.map((e) => x(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, x(n, t)])) : e : t.get(n);
|
|
29
|
+
}, S = (e) => {
|
|
30
|
+
let t = e.team === void 0 ? [] : u(e.team);
|
|
31
|
+
if (t.length > 0) throw new g(t.join("; "));
|
|
32
32
|
let n = /* @__PURE__ */ new Map();
|
|
33
33
|
for (let t of e.entries) {
|
|
34
|
-
if (n.has(t.key)) throw new
|
|
34
|
+
if (n.has(t.key)) throw new g(`the key '${t.key}' is used twice`);
|
|
35
35
|
n.set(t.key, t);
|
|
36
36
|
}
|
|
37
|
-
let r = new Map(e.entries.map((e) => [e.key,
|
|
38
|
-
for (let [e, t] of r) for (let r of t) if (!n.has(r)) throw new
|
|
37
|
+
let r = new Map(e.entries.map((e) => [e.key, b([e.values, e.translations ?? {}], /* @__PURE__ */ new Set())]));
|
|
38
|
+
for (let [e, t] of r) for (let r of t) if (!n.has(r)) throw new g(`'${e}' references '${r}', which is no entry`);
|
|
39
39
|
let i = [], a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
40
40
|
if (a.get(e) !== "done") {
|
|
41
|
-
if (a.get(e) === "visiting") throw new
|
|
41
|
+
if (a.get(e) === "visiting") throw new g(`the entries reference each other in a circle: ${[...t, e].join(" → ")}`);
|
|
42
42
|
a.set(e, "visiting");
|
|
43
43
|
for (let n of r.get(e) ?? []) o(n, [...t, e]);
|
|
44
44
|
a.set(e, "done"), i.push(n.get(e));
|
|
@@ -49,31 +49,31 @@ var h = class extends Error {
|
|
|
49
49
|
...e,
|
|
50
50
|
entries: i
|
|
51
51
|
};
|
|
52
|
-
},
|
|
52
|
+
}, C = (e, t) => {
|
|
53
53
|
let n = e.find((e) => e.name === t.type);
|
|
54
|
-
if (n === void 0) throw new
|
|
55
|
-
if (t.match !== void 0 && n.fields[t.match] === void 0) throw new
|
|
54
|
+
if (n === void 0) throw new g(`'${t.key}' is of type '${t.type}', which this app does not have`);
|
|
55
|
+
if (t.match !== void 0 && n.fields[t.match] === void 0) throw new g(`'${t.key}' matches on '${t.match}', which ${n.name} does not have`);
|
|
56
56
|
return n;
|
|
57
|
-
},
|
|
58
|
-
let
|
|
59
|
-
if (
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
|
|
57
|
+
}, w = (e, t, n, r) => {
|
|
58
|
+
let i = {};
|
|
59
|
+
if (t.template !== void 0) {
|
|
60
|
+
let n = s(e, t.template);
|
|
61
|
+
if (n === null) throw new g(`'${t.key}' is built from the template '${t.template}', which ${e.name} does not have`);
|
|
62
|
+
i = n;
|
|
63
63
|
}
|
|
64
|
-
let
|
|
64
|
+
let a = n === r ? {} : t.translations?.[n] ?? {};
|
|
65
65
|
return {
|
|
66
|
-
...
|
|
67
|
-
...
|
|
68
|
-
...
|
|
66
|
+
...i,
|
|
67
|
+
...t.values,
|
|
68
|
+
...a
|
|
69
69
|
};
|
|
70
|
-
},
|
|
70
|
+
}, T = (e, t) => {
|
|
71
71
|
if (typeof t.title == "string" && t.title !== "") return t.title;
|
|
72
72
|
let n = e.match === void 0 ? void 0 : t[e.match];
|
|
73
73
|
return typeof n == "string" && n !== "" ? n : e.key;
|
|
74
|
-
},
|
|
74
|
+
}, E = (e, t, n, r) => e.query({
|
|
75
75
|
table: `${t.name}_drafts`,
|
|
76
|
-
predicate:
|
|
76
|
+
predicate: m(h("site", n.site), h("environment", n.environment), h("locale", n.locale), ...r === null ? [] : [r]),
|
|
77
77
|
order: [{
|
|
78
78
|
column: "id",
|
|
79
79
|
direction: "asc"
|
|
@@ -81,47 +81,47 @@ var h = class extends Error {
|
|
|
81
81
|
take: 1,
|
|
82
82
|
skip: void 0,
|
|
83
83
|
projection: void 0
|
|
84
|
-
}),
|
|
84
|
+
}), D = async (e, t, n, r, i, a) => {
|
|
85
85
|
if (a !== null) {
|
|
86
|
-
let [n] = await
|
|
86
|
+
let [n] = await E(e, t, r, h("documentId", a));
|
|
87
87
|
if (n !== void 0) return n;
|
|
88
88
|
}
|
|
89
89
|
let o = n.match === void 0 ? void 0 : i[n.match];
|
|
90
90
|
if (n.match !== void 0 && (o == null || o === "")) return null;
|
|
91
|
-
let [s] = await
|
|
91
|
+
let [s] = await E(e, t, r, n.match === void 0 ? null : h(n.match, o));
|
|
92
92
|
return s ?? null;
|
|
93
|
-
},
|
|
93
|
+
}, O = (e, t) => [e.locale, ...Object.keys(t.translations ?? {}).filter((t) => t !== e.locale)], k = async (e, t, n, r, i) => {
|
|
94
94
|
let a = /* @__PURE__ */ new Map(), o = [], s = 0;
|
|
95
|
-
for (let
|
|
96
|
-
let
|
|
97
|
-
for (let t of
|
|
95
|
+
for (let c of n.entries) {
|
|
96
|
+
let u = C(t, c), m = null, h = !1, g = !1;
|
|
97
|
+
for (let t of O(n, c)) {
|
|
98
98
|
if (g) break;
|
|
99
99
|
let _ = {
|
|
100
100
|
site: r.site,
|
|
101
101
|
environment: r.environment,
|
|
102
102
|
locale: t
|
|
103
|
-
}, v =
|
|
104
|
-
if (
|
|
105
|
-
g = t === n.locale, m ??= String(
|
|
106
|
-
key:
|
|
107
|
-
type:
|
|
103
|
+
}, v = w(u, c, t, n.locale), y = l(u, x(v, a)), b = await D(e, u, c, _, y, m);
|
|
104
|
+
if (b !== null) {
|
|
105
|
+
g = t === n.locale, m ??= String(b.documentId), o.push({
|
|
106
|
+
key: c.key,
|
|
107
|
+
type: u.name,
|
|
108
108
|
locale: t,
|
|
109
|
-
label:
|
|
109
|
+
label: T(c, b),
|
|
110
110
|
action: "present",
|
|
111
|
-
documentId: String(
|
|
112
|
-
variantId: String(
|
|
111
|
+
documentId: String(b.documentId),
|
|
112
|
+
variantId: String(b.id),
|
|
113
113
|
outcome: null
|
|
114
114
|
});
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
let S =
|
|
117
|
+
let S = T(c, y);
|
|
118
118
|
m === null && !h && s++, h = !0;
|
|
119
|
-
let
|
|
119
|
+
let C = c.publish === !1 ? "draft" : u.review?.required === !0 || u.review?.required === "workspace" && (n.team?.reviewRequired ?? []).includes(u.name) ? "review" : "live";
|
|
120
120
|
if (!i) {
|
|
121
|
-
let e =
|
|
121
|
+
let e = C;
|
|
122
122
|
o.push({
|
|
123
|
-
key:
|
|
124
|
-
type:
|
|
123
|
+
key: c.key,
|
|
124
|
+
type: u.name,
|
|
125
125
|
locale: t,
|
|
126
126
|
label: S,
|
|
127
127
|
action: "create",
|
|
@@ -131,36 +131,36 @@ var h = class extends Error {
|
|
|
131
131
|
});
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
let
|
|
134
|
+
let E = await p(e, u, {
|
|
135
135
|
...y,
|
|
136
136
|
...m === null ? {} : { documentId: m }
|
|
137
|
-
}, _), O =
|
|
138
|
-
O === "live" && await
|
|
139
|
-
key:
|
|
140
|
-
type:
|
|
137
|
+
}, _), O = C === "live" && await d(e, u, String(E.id)) ? "review" : C;
|
|
138
|
+
O === "live" && await f(e, u, String(E.id), _), m ??= String(E.documentId), o.push({
|
|
139
|
+
key: c.key,
|
|
140
|
+
type: u.name,
|
|
141
141
|
locale: t,
|
|
142
142
|
label: S,
|
|
143
143
|
action: "create",
|
|
144
|
-
documentId: String(
|
|
145
|
-
variantId: String(
|
|
144
|
+
documentId: String(E.documentId),
|
|
145
|
+
variantId: String(E.id),
|
|
146
146
|
outcome: O
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
m !== null && a.set(
|
|
149
|
+
m !== null && a.set(c.key, m);
|
|
150
150
|
}
|
|
151
151
|
return {
|
|
152
152
|
blueprint: n.id,
|
|
153
153
|
steps: o,
|
|
154
154
|
documents: s
|
|
155
155
|
};
|
|
156
|
-
},
|
|
157
|
-
|
|
156
|
+
}, A = (e, t, n, r) => k(e, t, n, r, !1), j = (e, t, n, r) => k(e, t, n, r, !0), M = [
|
|
157
|
+
g,
|
|
158
|
+
t,
|
|
158
159
|
n,
|
|
159
160
|
r,
|
|
160
161
|
i,
|
|
161
162
|
a,
|
|
162
|
-
o
|
|
163
|
-
|
|
164
|
-
], M = (...e) => t(() => A(...e), ...j), N = (...e) => t(() => k(...e), ...j);
|
|
163
|
+
o
|
|
164
|
+
], N = (...t) => c(() => j(...t), ...M, e), P = (...e) => c(() => A(...e), ...M);
|
|
165
165
|
//#endregion
|
|
166
|
-
export {
|
|
166
|
+
export { g as BlueprintInvalid, j as applyBlueprint, N as applyBlueprintEffect, v as blueprintRef, S as defineBlueprint, A as planBlueprint, P as planBlueprintEffect };
|