@voltro/cms 0.86.0 → 0.88.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 +5484 -0
- package/README.md +138 -0
- package/THIRD-PARTY-NOTICES.md +1511 -276
- package/dist/ContentForm.js +1 -2
- package/dist/RichDocumentEditor.js +1 -2
- package/dist/RichDocumentView.js +82 -38
- package/dist/RichTextSurface.js +1 -2
- package/dist/aiCandidates.js +4 -5
- package/dist/aiOperations.js +1 -2
- package/dist/applicationBuildSnapshotService.js +100 -0
- package/dist/assetRenditions.js +101 -0
- package/dist/assetRevision.js +45 -0
- package/dist/assetUseRights.js +71 -0
- package/dist/audiences.js +1 -2
- package/dist/availability.js +20 -18
- package/dist/blueprint.js +76 -77
- package/dist/build.d.ts +3063 -0
- package/dist/build.js +37 -0
- package/dist/buildApplicationAdmission.js +15 -0
- package/dist/buildApplicationCatalog.js +135 -0
- package/dist/buildApplicationCatalogTable.js +23 -0
- package/dist/buildApplicationRest.js +98 -0
- package/dist/buildApplicationUpload.js +110 -0
- package/dist/buildSnapshot.js +400 -0
- package/dist/buildSnapshotApplicationPin.js +31 -0
- package/dist/buildSnapshotRest.js +209 -0
- package/dist/buildSnapshotService.js +264 -0
- package/dist/buildSnapshotTables.js +24 -0
- package/dist/bulk.js +72 -72
- package/dist/cacheIdentity.js +1 -2
- package/dist/changes.js +280 -64
- package/dist/cmsContext.js +1 -2
- package/dist/collections.js +1 -2
- package/dist/consent.js +6 -7
- package/dist/contentLocations.js +52 -0
- package/dist/contentProjection.js +82 -0
- package/dist/contentRouteIdentity.js +12 -0
- package/dist/contentRouteMaterializer.js +96 -0
- package/dist/contentRouteTypes.js +38 -0
- package/dist/contentSeo.js +188 -0
- package/dist/contentTreePath.js +59 -0
- package/dist/contentType.js +121 -105
- package/dist/contentValues.js +17 -0
- package/dist/contentfulImport.js +1 -2
- package/dist/copies.js +4 -5
- package/dist/cutover.js +1 -2
- package/dist/deliveryChecks.js +1 -2
- package/dist/domainHost.js +6 -0
- package/dist/domains.js +82 -89
- package/dist/draftTexts.js +38 -39
- package/dist/duplicates.js +24 -25
- package/dist/edgePurge.js +1 -2
- package/dist/editHistory.js +1 -2
- package/dist/effectForm.js +1 -2
- package/dist/environmentAliases.js +137 -0
- package/dist/environments.js +108 -71
- package/dist/errors.js +55 -16
- package/dist/experiments.js +8 -9
- package/dist/exposure.js +1 -2
- package/dist/extensionManifest.js +2 -3
- package/dist/extensions.js +1 -2
- package/dist/fieldSchema.js +1 -2
- package/dist/formStrings.js +1 -2
- package/dist/frontendBindings.js +98 -0
- package/dist/frontendMedia.js +17 -0
- package/dist/glossary.js +1 -2
- package/dist/history.js +1 -2
- package/dist/htmlImport.js +1 -2
- package/dist/index.d.ts +760 -47
- package/dist/index.js +89 -73
- package/dist/initializePublicRoutes.js +27 -0
- package/dist/liveContentRouteView.js +75 -0
- package/dist/media.js +1 -2
- package/dist/metrics.js +1 -2
- package/dist/migration.js +1 -2
- package/dist/migrationStages.js +1 -2
- package/dist/nativeOutputDeploymentService.js +204 -0
- package/dist/outputActivation.js +233 -0
- package/dist/outputActivationOrigin.js +50 -0
- package/dist/outputActivationStore.js +410 -0
- package/dist/outputActivationTables.js +10 -0
- package/dist/outputActivationTarget.js +80 -0
- package/dist/outputActivationTargetTable.js +24 -0
- package/dist/outputDeployment.js +173 -0
- package/dist/outputDeploymentRest.js +167 -0
- package/dist/outputDeploymentService.js +240 -0
- package/dist/outputRouteGraph.js +176 -0
- package/dist/outputSafetyArtifact.js +146 -0
- package/dist/outputTargetRest.js +61 -0
- package/dist/pathSegmentEncoding.js +3 -0
- package/dist/presenceAnchors.js +1 -2
- package/dist/preview.js +1 -2
- package/dist/privateCmsTransport.js +75 -0
- package/dist/privateNativeRouteReservation.js +9 -0
- package/dist/promotion.js +69 -61
- package/dist/publicBuild.js +89 -0
- package/dist/publicBuildRest.js +97 -0
- package/dist/publicBuildService.js +62 -0
- package/dist/publicOutputHttp.js +128 -0
- package/dist/publicOutputService.js +286 -0
- package/dist/publicPresentation.js +16 -0
- package/dist/publicRouteDispositionAdmission.js +37 -0
- package/dist/publicRouteHistoryStore.js +11 -0
- package/dist/publicRouteHistoryView.js +33 -0
- package/dist/publicRouteIntegrity.js +4 -0
- package/dist/publicRouteMutation.js +5 -0
- package/dist/publicRouteNamespace.js +133 -0
- package/dist/publicRoutePublication.js +35 -0
- package/dist/publicRouteRegistry.js +16 -0
- package/dist/publicRouteRegistryBinding.js +193 -0
- package/dist/publicRouteRegistryDefinition.js +75 -0
- package/dist/publicRouteSitePublication.js +39 -0
- package/dist/publicRouteTables.js +12 -0
- package/dist/publicRouteUrl.js +17 -0
- package/dist/publicationSeo.js +51 -0
- package/dist/publicationState.js +295 -0
- package/dist/quality.js +9 -10
- package/dist/reconfigurePublicRoutes.js +40 -0
- package/dist/recurrence.js +1 -2
- package/dist/redirects.js +105 -75
- package/dist/referenceGraph.js +16 -16
- package/dist/references.js +3 -4
- package/dist/release.js +178 -143
- package/dist/renderReadAuthority.js +42 -0
- package/dist/renderReadGrant.js +136 -0
- package/dist/rest.js +1 -2
- package/dist/review.js +29 -30
- package/dist/richDocument.js +56 -27
- package/dist/richInline.js +1 -2
- package/dist/routeDispositionGraph.js +43 -0
- package/dist/routeDispositionRest.js +50 -0
- package/dist/routeDispositionService.js +72 -0
- package/dist/routeDispositionStore.js +288 -0
- package/dist/routeDispositionTables.js +4 -0
- package/dist/routeDispositions.js +90 -0
- package/dist/routeHistoryStorage.js +319 -0
- package/dist/routeHistoryStore.js +11 -0
- package/dist/schedule.js +37 -38
- package/dist/search.js +1 -2
- package/dist/selectionIntent.js +1 -2
- package/dist/seo.js +2 -3
- package/dist/series.js +12 -13
- package/dist/share.js +14 -15
- package/dist/siteBindings.js +158 -0
- package/dist/siteBuildCandidate.js +103 -0
- package/dist/siteDelivery.js +114 -0
- package/dist/siteState.js +46 -0
- package/dist/snapshotAddressGraph.js +54 -0
- package/dist/snapshotAddressRead.js +72 -0
- package/dist/snapshotAppConsumer.js +70 -0
- package/dist/snapshotAppExecution.js +101 -0
- package/dist/snapshotApplication.js +74 -0
- package/dist/snapshotApprovedRouteDispositions.js +43 -0
- package/dist/snapshotAssetAssembly.js +69 -0
- package/dist/snapshotAssetAssemblyRest.js +49 -0
- package/dist/snapshotBindingRead.js +60 -0
- package/dist/snapshotCodeSeo.js +28 -0
- package/dist/snapshotComponent.js +33 -0
- package/dist/snapshotComponentSource.js +23 -0
- package/dist/snapshotConsumer.js +86 -0
- package/dist/snapshotContentIdentity.js +9 -0
- package/dist/snapshotDefinitions.js +263 -0
- package/dist/snapshotDocumentAssembly.js +192 -0
- package/dist/snapshotDocumentAssemblyRest.js +83 -0
- package/dist/snapshotDocumentProjection.js +201 -0
- package/dist/snapshotDocumentTransfer.js +34 -0
- package/dist/snapshotDocumentTransferRest.js +79 -0
- package/dist/snapshotDomains.js +55 -0
- package/dist/snapshotEnvironment.js +30 -0
- package/dist/snapshotFieldPlan.js +84 -0
- package/dist/snapshotFrontend.js +102 -0
- package/dist/snapshotLink.js +7 -0
- package/dist/snapshotMedia.js +110 -0
- package/dist/snapshotMediaCapture.js +245 -0
- package/dist/snapshotMediaFields.js +224 -0
- package/dist/snapshotMediaRead.js +184 -0
- package/dist/snapshotMediaReader.js +12 -0
- package/dist/snapshotObservation.js +15 -0
- package/dist/snapshotObservedRouteHistory.js +33 -0
- package/dist/snapshotOutputTransfer.js +77 -0
- package/dist/snapshotPageLoader.js +6 -0
- package/dist/snapshotPageSeo.js +58 -0
- package/dist/snapshotPathLocale.js +14 -0
- package/dist/snapshotPresentation.js +85 -0
- package/dist/snapshotPresentationPolicy.js +11 -0
- package/dist/snapshotProjection.js +118 -0
- package/dist/snapshotPublicAccess.js +160 -0
- package/dist/snapshotPublicRouteHistory.js +39 -0
- package/dist/snapshotReadAdmission.js +37 -0
- package/dist/snapshotRedirectOutput.js +150 -0
- package/dist/snapshotRedirectTargets.js +23 -0
- package/dist/snapshotRedirects.js +131 -0
- package/dist/snapshotReference.js +7 -0
- package/dist/snapshotReferenceAddress.js +9 -0
- package/dist/snapshotReferenceGraph.js +78 -0
- package/dist/snapshotReferenceRead.js +64 -0
- package/dist/snapshotRelease.js +98 -0
- package/dist/snapshotRender.js +360 -0
- package/dist/snapshotRenderDependencies.js +177 -0
- package/dist/snapshotRenditions.js +87 -0
- package/dist/snapshotRichDocument.js +61 -0
- package/dist/snapshotRoleTransfer.js +105 -0
- package/dist/snapshotRoleTransferRest.js +98 -0
- package/dist/snapshotRouteAdmission.js +70 -0
- package/dist/snapshotRouteDispatch.js +110 -0
- package/dist/snapshotRouteDispositionPlan.js +72 -0
- package/dist/snapshotRouteRead.js +42 -0
- package/dist/snapshotRoutes.js +78 -0
- package/dist/snapshotRouting.js +112 -0
- package/dist/snapshotSeo.js +178 -0
- package/dist/snapshotSeoControls.js +100 -0
- package/dist/snapshotSeoDocumentInventory.js +114 -0
- package/dist/snapshotSeoDocuments.js +128 -0
- package/dist/snapshotSeoMerge.js +84 -0
- package/dist/snapshotSeoMetadata.js +136 -0
- package/dist/snapshotSeoOutput.js +172 -0
- package/dist/snapshotSeoPathSets.js +104 -0
- package/dist/snapshotSeoRead.js +87 -0
- package/dist/snapshotSite.js +127 -0
- package/dist/snapshotSitemapFiles.js +35 -0
- package/dist/snapshotTreeDependencies.js +57 -0
- package/dist/snapshotTreeLoader.js +9 -0
- package/dist/snapshotTreeRead.js +157 -0
- package/dist/staticPathSet.js +176 -0
- package/dist/staticPathSetRest.js +128 -0
- package/dist/staticPathSetService.js +248 -0
- package/dist/staticPathSetStore.js +337 -0
- package/dist/stewardship.js +2 -3
- package/dist/taxonomy.js +1 -2
- package/dist/team.js +1 -2
- package/dist/templates.js +2 -3
- package/dist/trackChanges.js +1 -2
- package/dist/translation.js +1 -2
- package/dist/tree.js +10 -11
- package/dist/usage.js +1 -2
- package/dist/validation.js +54 -55
- package/dist/visualEditing.js +1 -2
- package/dist/web.d.ts +709 -7
- package/dist/web.js +50 -33
- package/dist/workflow.js +9 -10
- package/dist/write.js +251 -227
- package/dist/xliff.js +1 -2
- package/package.json +21 -7
package/dist/errors.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { Schema as e } from "effect";
|
|
2
|
-
|
|
3
|
-
var t = e.
|
|
2
|
+
// src/errors.ts
|
|
3
|
+
var t = class extends e.TaggedError()("EnvironmentAliasUnavailable", { reason: e.Literals([
|
|
4
|
+
"scope",
|
|
5
|
+
"name",
|
|
6
|
+
"target",
|
|
7
|
+
"missing",
|
|
8
|
+
"conflict",
|
|
9
|
+
"revision",
|
|
10
|
+
"state"
|
|
11
|
+
]) }) {}, n = e.Struct({
|
|
4
12
|
field: e.String,
|
|
5
13
|
rule: e.String,
|
|
6
14
|
message: e.String
|
|
7
|
-
}),
|
|
15
|
+
}), r = class extends e.TaggedError()("ContentValidationFailed", {
|
|
8
16
|
contentType: e.String,
|
|
9
|
-
violations: e.Array(
|
|
10
|
-
}) {},
|
|
17
|
+
violations: e.Array(n)
|
|
18
|
+
}) {}, i = class extends e.TaggedError()("ContentNotFound", {
|
|
11
19
|
contentType: e.String,
|
|
12
20
|
id: e.String,
|
|
13
21
|
stage: e.Literals([
|
|
@@ -16,25 +24,25 @@ var t = e.Struct({
|
|
|
16
24
|
"revision",
|
|
17
25
|
"share"
|
|
18
26
|
])
|
|
19
|
-
}) {},
|
|
27
|
+
}) {}, a = class extends e.TaggedError()("ContentGone", {
|
|
20
28
|
contentType: e.String,
|
|
21
29
|
path: e.String
|
|
22
|
-
}) {},
|
|
30
|
+
}) {}, o = class extends e.TaggedError()("ContentIdConflict", {
|
|
23
31
|
contentType: e.String,
|
|
24
32
|
id: e.String
|
|
25
|
-
}) {},
|
|
33
|
+
}) {}, s = class extends e.TaggedError()("RevisionMismatch", {
|
|
26
34
|
contentType: e.String,
|
|
27
35
|
id: e.String,
|
|
28
36
|
expected: e.String,
|
|
29
37
|
actual: e.String
|
|
30
|
-
}) {},
|
|
38
|
+
}) {}, c = class extends e.TaggedError()("ReleaseNotEditable", {
|
|
31
39
|
id: e.String,
|
|
32
40
|
status: e.String
|
|
33
|
-
}) {},
|
|
41
|
+
}) {}, l = class extends e.TaggedError()("PreviewShareRejected", { reason: e.Literals(["expiryInPast", "expiryTooFar"]) }) {}, u = class extends e.TaggedError()("ReviewRequired", {
|
|
34
42
|
contentType: e.String,
|
|
35
43
|
id: e.String,
|
|
36
44
|
revisionId: e.String
|
|
37
|
-
}) {},
|
|
45
|
+
}) {}, d = class extends e.TaggedError()("ReviewStepRefused", {
|
|
38
46
|
contentType: e.String,
|
|
39
47
|
id: e.String,
|
|
40
48
|
reason: e.Literals([
|
|
@@ -42,7 +50,7 @@ var t = e.Struct({
|
|
|
42
50
|
"selfApproval",
|
|
43
51
|
"ambiguousOrder"
|
|
44
52
|
])
|
|
45
|
-
}) {},
|
|
53
|
+
}) {}, f = class extends e.TaggedError()("ReferenceUnavailable", {
|
|
46
54
|
contentType: e.String,
|
|
47
55
|
id: e.String,
|
|
48
56
|
targets: e.Array(e.Struct({
|
|
@@ -58,10 +66,41 @@ var t = e.Struct({
|
|
|
58
66
|
"purpose"
|
|
59
67
|
])
|
|
60
68
|
}))
|
|
61
|
-
}) {},
|
|
69
|
+
}) {}, p = class extends e.TaggedError()("QuotaExceeded", {
|
|
62
70
|
quota: e.String,
|
|
63
71
|
limit: e.Number,
|
|
64
72
|
used: e.Number
|
|
65
|
-
}) {}
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
}) {}, m = class extends e.TaggedError()("ChangeFeedUnavailable", { reason: e.Literals([
|
|
74
|
+
"scope",
|
|
75
|
+
"cursor",
|
|
76
|
+
"migration",
|
|
77
|
+
"exhausted"
|
|
78
|
+
]) }) {}, h = class extends e.TaggedError()("SiteStateUnavailable", { reason: e.Literals(["scope", "state"]) }) {}, g = class extends e.TaggedError()("SiteBindingUnavailable", { reason: e.Literals([
|
|
79
|
+
"scope",
|
|
80
|
+
"name",
|
|
81
|
+
"target",
|
|
82
|
+
"missing",
|
|
83
|
+
"conflict",
|
|
84
|
+
"revision",
|
|
85
|
+
"state"
|
|
86
|
+
]) }) {}, _ = class extends e.TaggedError()("SiteDeliveryUnavailable", { reason: e.Literals([
|
|
87
|
+
"definition",
|
|
88
|
+
"environment",
|
|
89
|
+
"locale",
|
|
90
|
+
"fallback",
|
|
91
|
+
"prefix",
|
|
92
|
+
"binding"
|
|
93
|
+
]) }) {}, v = class extends e.TaggedError()("ContentLocationUnavailable", { reason: e.Literals([
|
|
94
|
+
"definition",
|
|
95
|
+
"field",
|
|
96
|
+
"tree",
|
|
97
|
+
"path",
|
|
98
|
+
"bounds"
|
|
99
|
+
]) }) {}, y = class extends e.TaggedError()("ContentSeoUnavailable", { reason: e.Literals([
|
|
100
|
+
"definition",
|
|
101
|
+
"field",
|
|
102
|
+
"defaults",
|
|
103
|
+
"values",
|
|
104
|
+
"scope"
|
|
105
|
+
]) }) {};
|
|
106
|
+
export { m as ChangeFeedUnavailable, a as ContentGone, o as ContentIdConflict, v as ContentLocationUnavailable, i as ContentNotFound, y as ContentSeoUnavailable, r as ContentValidationFailed, t as EnvironmentAliasUnavailable, l as PreviewShareRejected, p as QuotaExceeded, f as ReferenceUnavailable, c as ReleaseNotEditable, u as ReviewRequired, d as ReviewStepRefused, s as RevisionMismatch, g as SiteBindingUnavailable, _ as SiteDeliveryUnavailable, h as SiteStateUnavailable };
|
package/dist/experiments.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ContentIdConflict as e, ContentNotFound as t, ContentValidationFailed as n, ReleaseNotEditable as r, RevisionMismatch as i } from "./errors.js";
|
|
2
|
+
import { asTyped as a } from "./effectForm.js";
|
|
3
3
|
import { saveDraft as o } from "./write.js";
|
|
4
4
|
import { CMS_RELEASE_ITEMS_TABLE as s, addToRelease as c, createRelease as l, releaseStatusOf as u } from "./release.js";
|
|
5
5
|
import { and as d, eq as f, id as p, integer as m, json as h, table as g, text as _, timestamp as v } from "@voltro/database";
|
|
6
6
|
import { tenant as y } from "@voltro/plugin-multitenancy/mixin";
|
|
7
|
-
|
|
7
|
+
// src/experiments.ts
|
|
8
8
|
var b = "cms_experiments", x = "cms_experiment_events", S = g(b, {
|
|
9
9
|
id: p({ prefix: "cexp" }),
|
|
10
10
|
site: _().maxLength(64),
|
|
@@ -518,11 +518,10 @@ var b = "cms_experiments", x = "cms_experiment_events", S = g(b, {
|
|
|
518
518
|
adopted: i
|
|
519
519
|
};
|
|
520
520
|
}, Y = [
|
|
521
|
-
r,
|
|
522
|
-
t,
|
|
523
521
|
n,
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
522
|
+
e,
|
|
523
|
+
t,
|
|
524
|
+
i,
|
|
525
|
+
r
|
|
526
|
+
], X = (...e) => a(() => V(...e)), Z = (...e) => a(() => K(...e)), Q = (...e) => a(() => H(...e)), $ = (...e) => a(() => U(...e)), ee = (...e) => a(() => B(...e)), te = (...e) => a(() => P(...e)), ne = (...e) => a(() => z(...e)), re = (...e) => a(() => q(...e), ...Y), ie = (...e) => a(() => L(...e)), ae = (...e) => a(() => J(...e));
|
|
528
527
|
export { b as CMS_EXPERIMENTS_TABLE, x as CMS_EXPERIMENT_EVENTS_TABLE, W as MIN_READERS, q as adoptWinner, re as adoptWinnerEffect, A as applyVariant, O as assignVariant, C as cmsExperimentEventsTable, S as cmsExperimentsTable, V as experimentById, X as experimentByIdEffect, j as experimentFields, J as experimentLineage, ae as experimentLineageEffect, M as experimentOverrideKeys, R as experimentReleaseHook, K as experimentResults, Z as experimentResultsEffect, H as listExperiments, Q as listExperimentsEffect, L as planExperiment, ie as planExperimentEffect, U as recordExperimentEvent, $ as recordExperimentEventEffect, B as runningExperiment, ee as runningExperimentEffect, P as startExperiment, te as startExperimentEffect, z as stopExperiment, ne as stopExperimentEffect };
|
package/dist/exposure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/exposure.ts
|
|
2
2
|
var e = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], t = (t) => {
|
|
3
3
|
let n = new Map(t.ceiling.map((e) => [e, {
|
|
4
4
|
tool: e,
|
|
@@ -24,5 +24,4 @@ var e = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], t
|
|
|
24
24
|
explained: r
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { t as effectiveExposure };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema as e } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/extensionManifest.ts
|
|
3
3
|
var t = [
|
|
4
4
|
"dashboard",
|
|
5
5
|
"sidebar",
|
|
@@ -12,7 +12,7 @@ var t = [
|
|
|
12
12
|
let n = new Map((e.settings ?? []).map((e) => [e.key, e])), r = [];
|
|
13
13
|
for (let [i, a] of Object.entries(t)) {
|
|
14
14
|
let t = n.get(i);
|
|
15
|
-
t === void 0 ? r.push(`"${i}" is not a setting of ${e.id}`) : t.kind === "number" ? typeof a != "number" || !Number.isFinite(a) ? r.push(`"${i}" is a number`) : (t.min !== void 0 && a < t.min || t.max !== void 0 && a > t.max) && r.push(`"${i}" is between ${t.min ?? "…"} and ${t.max ?? "…"}`) : t.kind === "boolean" ? typeof a != "boolean" && r.push(`"${i}" is true or false`) :
|
|
15
|
+
t === void 0 ? r.push(`"${i}" is not a setting of ${e.id}`) : t.kind === "number" ? typeof a != "number" || !Number.isFinite(a) ? r.push(`"${i}" is a number`) : (t.min !== void 0 && a < t.min || t.max !== void 0 && a > t.max) && r.push(`"${i}" is between ${t.min ?? "…"} and ${t.max ?? "…"}`) : t.kind === "boolean" ? typeof a != "boolean" && r.push(`"${i}" is true or false`) : typeof a == "string" && t.options.includes(a) || r.push(`"${i}" is one of ${t.options.join(", ")}`);
|
|
16
16
|
}
|
|
17
17
|
return r;
|
|
18
18
|
}, r = (e, t) => Object.fromEntries((e.settings ?? []).map((r) => {
|
|
@@ -77,5 +77,4 @@ var t = [
|
|
|
77
77
|
})
|
|
78
78
|
])))
|
|
79
79
|
});
|
|
80
|
-
//#endregion
|
|
81
80
|
export { t as EXTENSION_SLOTS, p as ExtensionAccessDenied, m as ExtensionManifestSchema, d as compareVersions, l as isExtensionCapability, u as manifestProblems, f as newCapabilities, n as settingsProblems, r as settingsWithDefaults };
|
package/dist/extensions.js
CHANGED
|
@@ -2,7 +2,7 @@ import { asTyped as e } from "./effectForm.js";
|
|
|
2
2
|
import { ExtensionAccessDenied as t, compareVersions as n, manifestProblems as r, newCapabilities as i, settingsProblems as a, settingsWithDefaults as o } from "./extensionManifest.js";
|
|
3
3
|
import { and as s, eq as c, id as l, json as u, table as d, text as f } from "@voltro/database";
|
|
4
4
|
import { tenant as p } from "@voltro/plugin-multitenancy/mixin";
|
|
5
|
-
|
|
5
|
+
// src/extensions.ts
|
|
6
6
|
var m = "cms_extensions", h = "cms_extension_data", g = "cms_extension_secrets", _ = d(m, {
|
|
7
7
|
id: l({ prefix: "cext" }),
|
|
8
8
|
extensionId: f(),
|
|
@@ -310,5 +310,4 @@ var m = "cms_extensions", h = "cms_extension_data", g = "cms_extension_secrets",
|
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
312
|
}, R = (...t) => e(() => F(...t)), z = (...t) => e(() => D(...t)), B = (...t) => e(() => I(...t)), V = (...t) => e(() => M(...t)), H = (...t) => e(() => N(...t)), U = (...t) => e(() => T(...t)), W = (...t) => e(() => w(...t)), G = (...t) => e(() => C(...t)), K = (...t) => e(() => A(...t)), q = (...t) => e(() => k(...t)), J = (...t) => e(() => O(...t)), Y = (...t) => e(() => P(...t)), X = (...t) => e(() => E(...t));
|
|
313
|
-
//#endregion
|
|
314
313
|
export { m as CMS_EXTENSIONS_TABLE, h as CMS_EXTENSION_DATA_TABLE, g as CMS_EXTENSION_SECRETS_TABLE, F as bindExtensionSecret, R as bindExtensionSecretEffect, v as cmsExtensionDataTable, y as cmsExtensionSecretsTable, _ as cmsExtensionsTable, D as consentToUpgrade, z as consentToUpgradeEffect, L as extensionSandbox, I as extensionSecret, B as extensionSecretEffect, M as extensionSettings, V as extensionSettingsEffect, T as installExtension, U as installExtensionEffect, w as installedExtension, W as installedExtensionEffect, C as installedExtensions, G as installedExtensionsEffect, A as regrantExtension, K as regrantExtensionEffect, k as revokeExtension, q as revokeExtensionEffect, O as rollbackExtension, J as rollbackExtensionEffect, N as setExtensionSettings, H as setExtensionSettingsEffect, P as uninstallExtension, Y as uninstallExtensionEffect, E as upgradeExtension, X as upgradeExtensionEffect };
|
package/dist/fieldSchema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/fieldSchema.ts
|
|
2
2
|
var e = (t) => ({
|
|
3
3
|
...t,
|
|
4
4
|
pipe(...n) {
|
|
@@ -195,5 +195,4 @@ var e = (t) => ({
|
|
|
195
195
|
đ: "d",
|
|
196
196
|
þ: "th"
|
|
197
197
|
}, m = (e) => String(e).normalize("NFC").toLowerCase().trim().replace(/[äöüßæœøåłđþ]/g, (e) => p[e] ?? e).normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
198
|
-
//#endregion
|
|
199
198
|
export { a as Schema, c as componentFingerprint, d as defineComponent, l as defineDesignTokens, u as defineRichTextProfile, f as derivedFrom, s as fnv1a, t as maxLength, n as pattern, m as slugify, r as unique };
|
package/dist/formStrings.js
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createFrontendMediaReader as e } from "./frontendMedia.js";
|
|
2
|
+
import { admitSnapshotPresentation as t } from "./snapshotPresentation.js";
|
|
3
|
+
import { Schema as n } from "effect";
|
|
4
|
+
// src/frontendBindings.ts
|
|
5
|
+
var r = [
|
|
6
|
+
"empty",
|
|
7
|
+
"loading",
|
|
8
|
+
"error"
|
|
9
|
+
], i = class extends n.TaggedError()("FrontendBindingUnavailable", { reason: n.Literals([
|
|
10
|
+
"definition",
|
|
11
|
+
"missing",
|
|
12
|
+
"schema",
|
|
13
|
+
"implementation",
|
|
14
|
+
"context"
|
|
15
|
+
]) }) {}, a = (e) => {
|
|
16
|
+
throw new i({ reason: e });
|
|
17
|
+
}, o = (e) => typeof e == "string" && /^[A-Za-z][A-Za-z0-9_.:-]{0,127}$/.test(e), s = (e) => {
|
|
18
|
+
if (typeof e != "object" || !e || Array.isArray(e) || ![Object.prototype, null].includes(Object.getPrototypeOf(e)) || Object.getOwnPropertySymbols(e).length) return a("definition");
|
|
19
|
+
let t = Object.getOwnPropertyDescriptors(e);
|
|
20
|
+
return Object.values(t).some((e) => !e.enumerable || !("value" in e)) ? a("definition") : Object.fromEntries(Object.entries(t).map(([e, t]) => [e, t.value]));
|
|
21
|
+
}, c = (e) => {
|
|
22
|
+
let t = s(e);
|
|
23
|
+
return Object.keys(t).length !== 2 || !o(t.channel) || !o(t.theme) ? a("definition") : Object.freeze({
|
|
24
|
+
channel: t.channel,
|
|
25
|
+
theme: t.theme
|
|
26
|
+
});
|
|
27
|
+
}, l = (e) => {
|
|
28
|
+
let t = s(e), n = c({
|
|
29
|
+
channel: t.channel,
|
|
30
|
+
theme: t.theme
|
|
31
|
+
});
|
|
32
|
+
return Object.keys(t).length !== 6 || typeof t.localeId != "string" || !/^[a-z][a-z0-9_-]{0,63}$/.test(t.localeId) || typeof t.contentLocale != "string" || t.contentLocale.length === 0 || t.contentLocale.length > 64 || t.contentLocale.trim() !== t.contentLocale || typeof t.languageTag != "string" || t.languageTag.length > 128 || !/^[A-Za-z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)*$/.test(t.languageTag) || t.direction !== "ltr" && t.direction !== "rtl" ? a("definition") : Object.freeze({
|
|
33
|
+
...n,
|
|
34
|
+
localeId: t.localeId,
|
|
35
|
+
contentLocale: t.contentLocale,
|
|
36
|
+
languageTag: t.languageTag,
|
|
37
|
+
direction: t.direction
|
|
38
|
+
});
|
|
39
|
+
}, u = (e) => JSON.stringify(l(e)), d = (e) => {
|
|
40
|
+
if (!Array.isArray(e) || e.length === 0 || e.length > 1024 || Object.getOwnPropertySymbols(e).length || Object.keys(e).length !== e.length || Object.keys(e).some((e, t) => e !== String(t))) return a("definition");
|
|
41
|
+
let t = Object.getOwnPropertyDescriptors(e);
|
|
42
|
+
if (Object.entries(t).some(([e, t]) => e !== "length" && (!t.enumerable || !("value" in t)))) return a("definition");
|
|
43
|
+
let n = Array.from({ length: e.length }, (e, n) => l(t[String(n)].value)).map((e) => [u(e), e]).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
44
|
+
return new Set(n.map(([e]) => e)).size === n.length ? Object.freeze(n.map(([, e]) => e)) : a("definition");
|
|
45
|
+
}, f = (e, t) => e.some((e) => u(e) === u(t)), p = (e) => {
|
|
46
|
+
let t = s(e), n = /* @__PURE__ */ new Map();
|
|
47
|
+
return Object.keys(t).length > 4096 ? a("definition") : Object.freeze(Object.fromEntries(Object.keys(t).sort().map((e) => {
|
|
48
|
+
let i = s(t[e]), c = s(i.schema);
|
|
49
|
+
if (c.id !== e || !/^[a-z][a-zA-Z0-9]*$/.test(e) || Object.keys(i).some((e) => ![
|
|
50
|
+
"schema",
|
|
51
|
+
"renderer",
|
|
52
|
+
"contexts",
|
|
53
|
+
"render",
|
|
54
|
+
"restricted",
|
|
55
|
+
...r
|
|
56
|
+
].includes(e)) || !o(i.renderer)) return a("definition");
|
|
57
|
+
if (typeof i.render != "function" || r.some((e) => typeof i[e] != "function") || i.restricted !== void 0 && typeof i.restricted != "function" || c.consent !== void 0 && typeof i.restricted != "function") return a("implementation");
|
|
58
|
+
if (c.consent !== void 0 && (typeof c.consent != "string" || c.consent.length === 0)) return a("definition");
|
|
59
|
+
let l = d(i.contexts), u = [
|
|
60
|
+
"render",
|
|
61
|
+
...r,
|
|
62
|
+
"restricted"
|
|
63
|
+
].map((e) => i[e]), f = n.get(i.renderer);
|
|
64
|
+
return f !== void 0 && f.some((e, t) => e !== u[t]) ? a("implementation") : (n.set(i.renderer, u), [e, Object.freeze({
|
|
65
|
+
schema: i.schema,
|
|
66
|
+
renderer: i.renderer,
|
|
67
|
+
contexts: l,
|
|
68
|
+
render: i.render,
|
|
69
|
+
empty: i.empty,
|
|
70
|
+
loading: i.loading,
|
|
71
|
+
error: i.error,
|
|
72
|
+
...i.restricted === void 0 ? {} : { restricted: i.restricted }
|
|
73
|
+
})]);
|
|
74
|
+
})));
|
|
75
|
+
}, m = (n, i) => {
|
|
76
|
+
let o = p(n);
|
|
77
|
+
if (!Object.hasOwn(o, i.componentId)) return a("missing");
|
|
78
|
+
let s = o[i.componentId], c = l(i.context);
|
|
79
|
+
if (!f(s.contexts, c)) return a("context");
|
|
80
|
+
if (i.state !== "content" && !r.includes(i.state)) return a("definition");
|
|
81
|
+
let u = t(i.consentPurposes, i.presentation), d = s.schema.consent !== void 0 && !u.granted.some((e) => e.id === s.schema.consent), m = {
|
|
82
|
+
componentId: i.componentId,
|
|
83
|
+
context: c,
|
|
84
|
+
...i.source === void 0 ? {} : { source: i.source }
|
|
85
|
+
};
|
|
86
|
+
return i.observe?.({
|
|
87
|
+
componentId: i.componentId,
|
|
88
|
+
renderer: s.renderer,
|
|
89
|
+
handler: d ? "restricted" : i.state === "content" ? "render" : i.state
|
|
90
|
+
}), d ? s.restricted({
|
|
91
|
+
...m,
|
|
92
|
+
purpose: s.schema.consent
|
|
93
|
+
}) : i.state === "content" ? s.render(i.props, c, {
|
|
94
|
+
media: e(i.media?.entries ?? [], i.media?.fieldPath ?? [], i.media?.observe),
|
|
95
|
+
...i.source === void 0 ? {} : { source: i.source }
|
|
96
|
+
}) : s[i.state](m);
|
|
97
|
+
};
|
|
98
|
+
export { i as FrontendBindingUnavailable, d as copyFrontendContexts, l as copyFrontendOutputContext, c as copyFrontendOutputSelection, p as defineFrontendBindings, u as frontendContextKey, o as frontendRendererId, r as frontendStates, m as renderCapturedFrontendComponent, f as supportsFrontendContext };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/frontendMedia.ts
|
|
2
|
+
var e = (e, t = [], n) => {
|
|
3
|
+
let r = [...t];
|
|
4
|
+
return (t, i = { kind: "original" }) => {
|
|
5
|
+
let a = [...r, ...t], o = e.filter((e) => e.fieldPath.length === a.length && e.fieldPath.every((e, t) => e === a[t]) && e.output.kind === i.kind && (i.kind !== "rendition" || e.output.kind === "rendition" && e.output.slot === i.slot));
|
|
6
|
+
if (o.length > 1) throw Error("Ambiguous rendered media selection");
|
|
7
|
+
let s = o[0];
|
|
8
|
+
return s !== void 0 && n?.({
|
|
9
|
+
fieldPath: [...a],
|
|
10
|
+
output: { ...s.output }
|
|
11
|
+
}), s === void 0 ? null : {
|
|
12
|
+
url: s.url,
|
|
13
|
+
contentType: s.contentType
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export { e as createFrontendMediaReader };
|
package/dist/glossary.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { asTyped as e } from "./effectForm.js";
|
|
2
2
|
import { and as t, eq as n, id as r, json as i, table as a, text as o } from "@voltro/database";
|
|
3
3
|
import { tenant as s } from "@voltro/plugin-multitenancy/mixin";
|
|
4
|
-
|
|
4
|
+
// src/glossary.ts
|
|
5
5
|
var c = "cms_glossary", l = a(c, {
|
|
6
6
|
id: r({ prefix: "cgl" }),
|
|
7
7
|
term: o(),
|
|
@@ -69,5 +69,4 @@ var c = "cms_glossary", l = a(c, {
|
|
|
69
69
|
found: e,
|
|
70
70
|
use: t.translation
|
|
71
71
|
}))), b = (...t) => e(() => h(...t)), x = (...t) => e(() => m(...t)), S = (...t) => e(() => p(...t));
|
|
72
|
-
//#endregion
|
|
73
72
|
export { c as CMS_GLOSSARY_TABLE, l as cmsGlossaryTable, h as glossary, b as glossaryEffect, f as glossaryInputProblems, y as glossaryProblems, m as removeGlossaryTerm, x as removeGlossaryTermEffect, p as setGlossaryTerm, S as setGlossaryTermEffect, v as termsIn };
|
package/dist/history.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { plainTextOf as e } from "./richDocument.js";
|
|
2
|
-
|
|
2
|
+
// src/history.ts
|
|
3
3
|
var t = (e) => Array.isArray(e) ? e.map(t) : typeof e == "object" && e && !(e instanceof Date) ? Object.fromEntries(Object.keys(e).sort().map((n) => [n, t(e[n])])) : e instanceof Date ? e.toISOString() : e === void 0 ? null : e, n = (e, n, r) => Object.keys(e).filter((e) => JSON.stringify(t(n[e])) !== JSON.stringify(t(r[e]))), r = (e, n) => {
|
|
4
4
|
let r = [...e].sort((e, t) => Number(e.number) - Number(t.number)), i = [], a;
|
|
5
5
|
for (let e of r) {
|
|
@@ -50,5 +50,4 @@ var t = (e) => Array.isArray(e) ? e.map(t) : typeof e == "object" && e && !(e in
|
|
|
50
50
|
field: e,
|
|
51
51
|
segments: o(c(t[e]), c(r[e]))
|
|
52
52
|
}));
|
|
53
|
-
//#endregion
|
|
54
53
|
export { n as changedFields, o as diffWords, l as fieldDiffs, r as fieldVersions, c as valueText };
|
package/dist/htmlImport.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { contactLiteralProblem as e } from "./richDocument.js";
|
|
2
|
-
|
|
2
|
+
// src/htmlImport.ts
|
|
3
3
|
var t = {
|
|
4
4
|
amp: "&",
|
|
5
5
|
lt: "<",
|
|
@@ -293,5 +293,4 @@ var t = {
|
|
|
293
293
|
findings: d
|
|
294
294
|
};
|
|
295
295
|
};
|
|
296
|
-
//#endregion
|
|
297
296
|
export { n as decodeEntities, c as richDocumentFromHtml };
|