@voltro/cms 0.85.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 +5987 -0
- package/README.md +138 -0
- package/THIRD-PARTY-NOTICES.md +864 -253
- package/dist/ContentForm.js +282 -0
- package/dist/RichDocumentEditor.js +550 -0
- package/dist/RichDocumentView.js +177 -0
- package/dist/RichTextSurface.js +135 -0
- package/dist/aiCandidates.js +199 -0
- package/dist/aiOperations.js +152 -0
- 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/audiences.js +31 -0
- package/dist/availability.js +124 -0
- package/dist/blueprint.js +166 -0
- 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 +282 -0
- package/dist/cacheIdentity.js +152 -0
- package/dist/changes.js +307 -0
- package/dist/cmsContext.js +229 -0
- package/dist/collections.js +224 -0
- package/dist/consent.js +29 -0
- 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 +208 -0
- package/dist/contentValues.js +18 -0
- package/dist/contentfulImport.js +162 -0
- package/dist/copies.js +89 -0
- package/dist/cutover.js +202 -0
- package/dist/deliveryChecks.js +138 -0
- package/dist/domainHost.js +7 -0
- package/dist/domains.js +139 -0
- package/dist/draftTexts.js +164 -0
- package/dist/duplicates.js +78 -0
- package/dist/edgePurge.js +69 -0
- package/dist/editHistory.js +113 -0
- package/dist/effectForm.js +11 -0
- package/dist/environmentAliases.js +138 -0
- package/dist/environments.js +147 -0
- package/dist/errors.js +107 -0
- package/dist/experiments.js +528 -0
- package/dist/exposure.js +28 -0
- package/dist/extensionManifest.js +81 -0
- package/dist/extensions.js +314 -0
- package/dist/fieldSchema.js +199 -0
- package/dist/formStrings.js +74 -0
- package/dist/frontendBindings.js +99 -0
- package/dist/frontendMedia.js +18 -0
- package/dist/glossary.js +73 -0
- package/dist/history.js +54 -0
- package/dist/htmlImport.js +297 -0
- package/dist/index.d.ts +771 -54
- package/dist/index.js +89 -6082
- package/dist/initializePublicRoutes.js +28 -0
- package/dist/liveContentRouteView.js +76 -0
- package/dist/media.js +29 -0
- package/dist/metrics.js +46 -0
- package/dist/migration.js +193 -0
- package/dist/migrationStages.js +13 -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/presenceAnchors.js +68 -0
- package/dist/preview.js +31 -0
- package/dist/privateCmsTransport.js +76 -0
- package/dist/privateNativeRouteReservation.js +10 -0
- package/dist/promotion.js +116 -0
- 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 +188 -0
- package/dist/reconfigurePublicRoutes.js +41 -0
- package/dist/recurrence.js +78 -0
- package/dist/redirects.js +130 -0
- package/dist/referenceGraph.js +224 -0
- package/dist/references.js +173 -0
- package/dist/release.js +241 -0
- package/dist/renderReadAuthority.js +43 -0
- package/dist/renderReadGrant.js +137 -0
- package/dist/rest.js +52 -0
- package/dist/review.js +160 -0
- package/dist/richDocument.js +521 -0
- package/dist/richInline.js +100 -0
- 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 +80 -0
- package/dist/search.js +148 -0
- package/dist/selectionIntent.js +164 -0
- package/dist/seo.js +31 -0
- package/dist/series.js +105 -0
- package/dist/share.js +112 -0
- 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/stewardship.js +146 -0
- package/dist/taxonomy.js +36 -0
- package/dist/team.js +103 -0
- package/dist/templates.js +106 -0
- package/dist/trackChanges.js +197 -0
- package/dist/translation.js +64 -0
- package/dist/tree.js +87 -0
- package/dist/usage.js +50 -0
- package/dist/validation.js +192 -0
- package/dist/visualEditing.js +60 -0
- package/dist/web.d.ts +709 -7
- package/dist/web.js +50 -2
- package/dist/workflow.js +322 -0
- package/dist/write.js +419 -0
- package/dist/xliff.js +325 -0
- package/package.json +20 -6
- package/dist/presenceAnchors-4iHAVQB3.js +0 -4367
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { SiteBindingUnavailable as e } from "./errors.js";
|
|
2
|
+
import { compileSiteDelivery as t } from "./siteDelivery.js";
|
|
3
|
+
import { readPublicationBoundary as n } from "./changes.js";
|
|
4
|
+
import { readCapturedDocument as r, verifyPublicationState as i } from "./publicationState.js";
|
|
5
|
+
import { copySnapshotResource as a } from "./buildSnapshot.js";
|
|
6
|
+
import { copySnapshotAppCodePin as o } from "./snapshotDefinitions.js";
|
|
7
|
+
import { lockSiteContentBinding as s, siteContentBindingRevision as c } from "./siteBindings.js";
|
|
8
|
+
import { createHash as l } from "node:crypto";
|
|
9
|
+
import { canonicalJson as u } from "@voltro/runtime";
|
|
10
|
+
//#region src/snapshotSite.ts
|
|
11
|
+
var d = (n, r, i) => {
|
|
12
|
+
let s = {
|
|
13
|
+
tenantId: n.tenantId,
|
|
14
|
+
site: n.site,
|
|
15
|
+
environment: n.environment
|
|
16
|
+
}, c = t(r), d = c.definition, f = o(i);
|
|
17
|
+
if (d.id !== s.site || !d.environments.includes(s.environment)) throw new e({ reason: "scope" });
|
|
18
|
+
let p = l("sha256").update(u(d)).digest("hex");
|
|
19
|
+
return {
|
|
20
|
+
compiled: c,
|
|
21
|
+
definitionDigest: p,
|
|
22
|
+
site: a({
|
|
23
|
+
key: "configuration",
|
|
24
|
+
value: {
|
|
25
|
+
version: 3,
|
|
26
|
+
...s,
|
|
27
|
+
app: f,
|
|
28
|
+
definitionDigest: p,
|
|
29
|
+
definition: {
|
|
30
|
+
id: d.id,
|
|
31
|
+
version: d.version,
|
|
32
|
+
environments: d.environments,
|
|
33
|
+
defaultEnvironment: d.defaultEnvironment,
|
|
34
|
+
bindings: d.bindings,
|
|
35
|
+
...d.seo === void 0 ? {} : { seo: d.seo }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
locales: a({
|
|
40
|
+
key: "policy",
|
|
41
|
+
value: {
|
|
42
|
+
version: 1,
|
|
43
|
+
...s,
|
|
44
|
+
app: f,
|
|
45
|
+
definitionDigest: p,
|
|
46
|
+
definition: {
|
|
47
|
+
version: d.version,
|
|
48
|
+
defaultLocale: d.defaultLocale,
|
|
49
|
+
sourceLocale: d.sourceLocale,
|
|
50
|
+
locales: d.locales
|
|
51
|
+
},
|
|
52
|
+
compiled: {
|
|
53
|
+
contentLocales: c.contentLocales,
|
|
54
|
+
defaultLocale: c.defaultLocale,
|
|
55
|
+
sourceLocale: c.sourceLocale,
|
|
56
|
+
fallback: c.fallback,
|
|
57
|
+
prefixes: c.prefixes,
|
|
58
|
+
tags: c.tags,
|
|
59
|
+
directions: c.directions
|
|
60
|
+
},
|
|
61
|
+
resolution: "per-node"
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
}, f = (t, o, l, u, f = Date.now()) => {
|
|
66
|
+
let p = {
|
|
67
|
+
tenantId: o.tenantId,
|
|
68
|
+
site: o.site,
|
|
69
|
+
environment: o.environment
|
|
70
|
+
}, m = d(p, l, u), { compiled: h, definitionDigest: g } = m, _ = h.definition, v = h.contentLocales, y = async (r) => {
|
|
71
|
+
let a = await n(t, p);
|
|
72
|
+
if (a.generation !== r.generation || a.releaseId !== r.releaseId || a.checkpoint !== r.checkpoint) throw new e({ reason: "state" });
|
|
73
|
+
let o = await i(t, p, r, f);
|
|
74
|
+
if (o.locales.length !== v.length || o.locales.some((e) => !v.includes(e))) throw new e({ reason: "scope" });
|
|
75
|
+
return o;
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
site: {
|
|
79
|
+
format: "voltro.cms.site/v3",
|
|
80
|
+
entries: async function* (n) {
|
|
81
|
+
let i = await y(n);
|
|
82
|
+
yield a(m.site);
|
|
83
|
+
for (let [o, l] of Object.entries(_.bindings).sort(([e], [t]) => e < t ? -1 : +(e > t))) {
|
|
84
|
+
let u = await s(t, p, o);
|
|
85
|
+
if (u.contentType !== l || !i.types.includes(l)) throw new e({ reason: "target" });
|
|
86
|
+
let d = await c(t, p, o, u.revisionId);
|
|
87
|
+
if (d.contentType !== u.contentType || d.documentId !== u.documentId) throw new e({ reason: "state" });
|
|
88
|
+
yield a({
|
|
89
|
+
key: `binding:${o}`,
|
|
90
|
+
value: {
|
|
91
|
+
version: 3,
|
|
92
|
+
...p,
|
|
93
|
+
binding: { ...u },
|
|
94
|
+
locales: v,
|
|
95
|
+
definitionDigest: g
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
let m = !1;
|
|
99
|
+
for (let e of v) {
|
|
100
|
+
let i = await r(t, p, n.id, u.contentType, e, u.documentId, f);
|
|
101
|
+
m ||= i !== null, yield a({
|
|
102
|
+
key: `binding:${o}:locale:${e}`,
|
|
103
|
+
value: {
|
|
104
|
+
version: 3,
|
|
105
|
+
locale: e,
|
|
106
|
+
documentId: u.documentId,
|
|
107
|
+
variant: i === null ? null : {
|
|
108
|
+
id: i.id,
|
|
109
|
+
revisionId: i.revisionId,
|
|
110
|
+
revision: i.revision
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (!m) throw new e({ reason: "target" });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
locales: {
|
|
120
|
+
format: "voltro.cms.locales/v1",
|
|
121
|
+
entries: async function* (e) {
|
|
122
|
+
await y(e), yield a(m.locales);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { d as snapshotSiteConfiguration, f as snapshotSiteSources };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { sitemapXml as e } from "./seo.js";
|
|
2
|
+
import { SnapshotSeoReadUnavailable as t } from "./snapshotSeoRead.js";
|
|
3
|
+
//#region src/snapshotSitemapFiles.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
throw new t({ reason: "binding" });
|
|
6
|
+
}, r = 5e4, i = 52428800, a = (e) => e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'"), o = (t, o, s) => {
|
|
7
|
+
let c = new URL(o);
|
|
8
|
+
if (c.protocol !== "https:" || c.origin !== o) return n();
|
|
9
|
+
let l = e([], (e, t) => t, s), u = l.slice(0, l.indexOf(">\n", l.indexOf("<urlset")) + 2), d = "\n</urlset>\n", f = Buffer.byteLength(u + d), p = [], m = [], h = f, g = () => {
|
|
10
|
+
p.push(u + m.join("\n") + d), m = [], h = f;
|
|
11
|
+
};
|
|
12
|
+
for (let a of t) {
|
|
13
|
+
for (let e of [a.path, ...a.alternates.map((e) => e.path)]) if (e.length >= 2048 || /[\x00-\x20\x7f]/.test(e) || new URL(e).origin !== o) return n();
|
|
14
|
+
let t = e([a], (e, t) => t, s).slice(u.length, -11), c = Buffer.byteLength(t);
|
|
15
|
+
if (c + f > i) return n();
|
|
16
|
+
(m.length === r || h + c + (m.length === 0 ? 0 : 1) > i) && g(), h += c + (m.length === 0 ? 0 : 1), m.push(t);
|
|
17
|
+
}
|
|
18
|
+
if ((m.length > 0 || p.length === 0) && g(), p.length === 1) return [{
|
|
19
|
+
path: "/sitemap.xml",
|
|
20
|
+
contentType: "application/xml",
|
|
21
|
+
text: p[0]
|
|
22
|
+
}];
|
|
23
|
+
if (p.length > r) return n();
|
|
24
|
+
let _ = p.map((e, t) => ({
|
|
25
|
+
path: `/sitemaps/sitemap-${String(t + 1).padStart(5, "0")}.xml`,
|
|
26
|
+
contentType: "application/xml",
|
|
27
|
+
text: e
|
|
28
|
+
})), v = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n" + _.map((e) => ` <sitemap><loc>${a(o + e.path)}</loc></sitemap>`).join("\n") + "\n</sitemapindex>\n";
|
|
29
|
+
return Buffer.byteLength(v) > i ? n() : [{
|
|
30
|
+
path: "/sitemap.xml",
|
|
31
|
+
contentType: "application/xml",
|
|
32
|
+
text: v
|
|
33
|
+
}, ..._];
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as snapshotSitemapFiles };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createHash as e } from "node:crypto";
|
|
2
|
+
import { canonicalJson as t } from "@voltro/runtime";
|
|
3
|
+
//#region src/snapshotTreeDependencies.ts
|
|
4
|
+
var n = () => {
|
|
5
|
+
throw Error("Snapshot tree dependencies unavailable");
|
|
6
|
+
}, r = (n) => e("sha256").update(t(n)).digest("hex"), i = (e) => {
|
|
7
|
+
if (!Array.isArray(e.reads) || e.reads.length > 4112) return n();
|
|
8
|
+
let t = new Map(Object.entries(e.trees).map(([t, n]) => [r({
|
|
9
|
+
path: e.path,
|
|
10
|
+
name: t
|
|
11
|
+
}), {
|
|
12
|
+
name: t,
|
|
13
|
+
data: n
|
|
14
|
+
}])), i = [], a = [], o = "";
|
|
15
|
+
for (let s of e.reads) {
|
|
16
|
+
if (typeof s != "object" || !s || Array.isArray(s)) return n();
|
|
17
|
+
let c = s;
|
|
18
|
+
if (Object.keys(c).sort().join(",") !== "inputDigest,tag,valueDigest" || typeof c.inputDigest != "string" || !/^[a-f0-9]{64}$/.test(c.inputDigest) || typeof c.valueDigest != "string" || !/^[a-f0-9]{64}$/.test(c.valueDigest)) return n();
|
|
19
|
+
if (c.tag === "cms.snapshot.reference" || c.tag === "cms.snapshot.link") {
|
|
20
|
+
if (e.owner !== "cms") return n();
|
|
21
|
+
i.push(s);
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (c.tag !== "cms.snapshot.tree") return n();
|
|
25
|
+
let l = t.get(c.inputDigest);
|
|
26
|
+
if (l === void 0 || l.name <= o || c.valueDigest !== r(l.data)) return n();
|
|
27
|
+
o = l.name, a.push({
|
|
28
|
+
name: l.name,
|
|
29
|
+
inputDigest: c.inputDigest,
|
|
30
|
+
valueDigest: c.valueDigest
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
references: i,
|
|
35
|
+
graph: {
|
|
36
|
+
version: 1,
|
|
37
|
+
coverage: "captured-queries",
|
|
38
|
+
selectiveReuse: !1,
|
|
39
|
+
inputs: {
|
|
40
|
+
owner: e.owner,
|
|
41
|
+
snapshotDigest: e.snapshotDigest,
|
|
42
|
+
inputsId: e.inputsId,
|
|
43
|
+
executionId: e.executionId,
|
|
44
|
+
routeId: e.routeId,
|
|
45
|
+
path: e.path,
|
|
46
|
+
contextDigest: r(e.context),
|
|
47
|
+
trees: Object.fromEntries(Object.entries(e.trees).map(([e, t]) => [e, {
|
|
48
|
+
contentType: t.contentType,
|
|
49
|
+
localeId: t.localeId,
|
|
50
|
+
valueDigest: r(t)
|
|
51
|
+
}]))
|
|
52
|
+
},
|
|
53
|
+
reads: a
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { i as snapshotTreeDependencies };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/snapshotTreeLoader.ts
|
|
2
|
+
var e = async (e, t) => {
|
|
3
|
+
if (e.query === void 0) throw Error("Snapshot tree unavailable");
|
|
4
|
+
return e.query("cms.snapshot.tree", {
|
|
5
|
+
path: e.pathname,
|
|
6
|
+
name: t
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as snapshotTreeLoader };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { compileSiteDelivery as e, defineSiteDelivery as t } from "./siteDelivery.js";
|
|
2
|
+
import { buildTree as n } from "./tree.js";
|
|
3
|
+
import { pageCapturedPublications as r, readCapturedPublication as i, verifyPublicationState as a } from "./publicationState.js";
|
|
4
|
+
import { readVerifiedSnapshotResource as o } from "./buildSnapshot.js";
|
|
5
|
+
import { verifySnapshotRouteOwnership as s } from "./snapshotRouting.js";
|
|
6
|
+
import { admitVerifiedSnapshotPublicDocument as c } from "./snapshotPublicAccess.js";
|
|
7
|
+
import { projectContentValues as l } from "./contentProjection.js";
|
|
8
|
+
import { copySnapshotTrees as u } from "./snapshotProjection.js";
|
|
9
|
+
import { readSnapshotAppExecution as d } from "./snapshotAppExecution.js";
|
|
10
|
+
import { SnapshotRouteReadUnavailable as f, readSnapshotRouteAdmission as p } from "./snapshotRouteAdmission.js";
|
|
11
|
+
import { readAdmittedCapturedAddress as m } from "./snapshotAddressRead.js";
|
|
12
|
+
import { snapshotPathLocale as h } from "./snapshotPathLocale.js";
|
|
13
|
+
import { createHash as g } from "node:crypto";
|
|
14
|
+
import { canonicalJson as _ } from "@voltro/runtime";
|
|
15
|
+
//#region src/snapshotTreeRead.ts
|
|
16
|
+
var v = (e) => {
|
|
17
|
+
throw new f({ reason: e });
|
|
18
|
+
}, y = (e) => g("sha256").update(_(e)).digest("hex"), b = (e) => typeof e != "object" || !e || Array.isArray(e) ? v("definition") : e, x = async (e, n, r, i, a) => {
|
|
19
|
+
let o = { ...i }, c = await p(e, n, r, o, a);
|
|
20
|
+
if (typeof o.name != "string" || !/^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(o.name)) return v("definition");
|
|
21
|
+
let l = t(c.configuration.site), u = h(l, o.path);
|
|
22
|
+
await d(e, c.place, c.snapshot, void 0, [], {
|
|
23
|
+
id: u.id,
|
|
24
|
+
contentLocale: u.contentLocale
|
|
25
|
+
});
|
|
26
|
+
let f = c.route;
|
|
27
|
+
if (f !== void 0 && f.definitionDigest !== c.configuration.definitionDigest) return v("binding");
|
|
28
|
+
let m = f !== void 0 && s(c.configuration, f).owner === "cms" ? {
|
|
29
|
+
contentType: String(f.contentType),
|
|
30
|
+
documentId: String(f.documentId)
|
|
31
|
+
} : null, g = await S(e, c.place, c.snapshot, u.id, m, c.now);
|
|
32
|
+
return Object.hasOwn(g, o.name) ? g[o.name] : v("definition");
|
|
33
|
+
}, S = async (t, s, d, f, p, h) => {
|
|
34
|
+
let g = (await o(t, s, d, "projection", "registry")).value;
|
|
35
|
+
if (g.trees === void 0) return {};
|
|
36
|
+
if (!Array.isArray(g.types) || !g.types.every((e) => typeof e == "string")) return v("binding");
|
|
37
|
+
let x = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
|
|
38
|
+
for (let e of Object.values(b(g.trees))) {
|
|
39
|
+
let n = b(e).contentType;
|
|
40
|
+
if (typeof n != "string" || !g.types.includes(n)) return v("definition");
|
|
41
|
+
if (S.has(n)) continue;
|
|
42
|
+
let r = (await o(t, s, d, "schema", `type:${n}`)).value, i = b(r.definition);
|
|
43
|
+
if (r.version !== 1 || i.name !== n || _(r.app) !== _(g.app)) return v("binding");
|
|
44
|
+
S.set(n, r), x.set(n, i);
|
|
45
|
+
}
|
|
46
|
+
let C = u(g.trees, [...x.values()]), w = (await o(t, s, d, "routes", "configuration")).value, T = e(w.site), E = T.definition.locales.find((e) => e.id === f && e.enabled), D = (await o(t, s, d, "site", "configuration")).value;
|
|
47
|
+
if (E === void 0 || T.definition.id !== s.site || !T.definition.environments.includes(s.environment) || w.tenantId !== s.tenantId || w.environment !== s.environment || _(w.app) !== _(g.app) || D.definitionDigest !== y(T.definition)) return v("binding");
|
|
48
|
+
let O = await a(t, s, d.manifest.publication, h), k = Object.create(null), A = 0, j = 0, M = 0, N = 0;
|
|
49
|
+
for (let [e, a] of Object.entries(C)) {
|
|
50
|
+
let o = x.get(a.contentType).tree, u = [
|
|
51
|
+
"id",
|
|
52
|
+
"documentId",
|
|
53
|
+
"revisionId",
|
|
54
|
+
"status",
|
|
55
|
+
"locale",
|
|
56
|
+
o.parent,
|
|
57
|
+
o.segment,
|
|
58
|
+
...o.order === void 0 ? [] : [o.order],
|
|
59
|
+
...a.includeField === void 0 ? [] : [a.includeField]
|
|
60
|
+
], g = /* @__PURE__ */ new Map();
|
|
61
|
+
for (let e of [E.contentLocale, ...T.fallback[E.contentLocale]]) {
|
|
62
|
+
let n;
|
|
63
|
+
do {
|
|
64
|
+
let i = await r(t, s, d.manifest.publication.id, a.contentType, e, {
|
|
65
|
+
limit: 200,
|
|
66
|
+
now: h,
|
|
67
|
+
...n === void 0 ? {} : { after: n }
|
|
68
|
+
});
|
|
69
|
+
for (let t of i.items) {
|
|
70
|
+
if (++A > 5e4) return v("bounds");
|
|
71
|
+
if (typeof t.documentId != "string" || t.status !== "published" || t.locale !== e) return v("publication");
|
|
72
|
+
if (!g.has(t.documentId)) {
|
|
73
|
+
let n = Object.fromEntries(u.filter((e) => Object.hasOwn(t, e)).map((e) => [e, t[e]]));
|
|
74
|
+
if (Object.values(n).some((e) => e !== null && typeof e != "string" && typeof e != "boolean" && !(typeof e == "number" && Number.isFinite(e)))) return v("publication");
|
|
75
|
+
if (N += Buffer.byteLength(_(n)), N > 16777216) return v("bounds");
|
|
76
|
+
g.set(t.documentId, {
|
|
77
|
+
row: n,
|
|
78
|
+
locale: e,
|
|
79
|
+
fallback: e !== E.contentLocale
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
n = i.next ?? void 0;
|
|
84
|
+
} while (n !== void 0);
|
|
85
|
+
}
|
|
86
|
+
for (let e of g.values()) {
|
|
87
|
+
let t = /* @__PURE__ */ new Set(), n = e;
|
|
88
|
+
for (; n !== void 0;) {
|
|
89
|
+
let e = String(n.row.documentId);
|
|
90
|
+
if (t.has(e)) break;
|
|
91
|
+
if (t.size >= 128) return v("bounds");
|
|
92
|
+
t.add(e);
|
|
93
|
+
let r = n.row[o.parent];
|
|
94
|
+
n = typeof r == "string" ? g.get(r) : void 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let y = n([...g.values()], o), b = new Map(y.nodes.map((e) => [e.documentId, e])), S = /* @__PURE__ */ new Map(), C = async (e) => {
|
|
98
|
+
if (S.has(e.documentId)) return S.get(e.documentId);
|
|
99
|
+
if (++M > 4096) return v("bounds");
|
|
100
|
+
let n = await c(t, s, d, O, a.contentType, f, e.documentId, h);
|
|
101
|
+
if (n === null) return S.set(e.documentId, null), null;
|
|
102
|
+
let r = await m(t, s, d, {
|
|
103
|
+
contentType: a.contentType,
|
|
104
|
+
documentId: e.documentId,
|
|
105
|
+
localeId: f,
|
|
106
|
+
mappingId: a.mappingId
|
|
107
|
+
}, n, h);
|
|
108
|
+
if (r === null) return S.set(e.documentId, null), null;
|
|
109
|
+
if (r.document.variantId !== e.row.id || r.document.revisionId !== e.row.revisionId || r.document.locale !== e.locale) return v("binding");
|
|
110
|
+
let o = await i(t, s, d.manifest.publication.id, a.contentType, r.document.locale, r.document.variantId, h);
|
|
111
|
+
if (o === null || o.documentId !== e.documentId || o.revisionId !== r.document.revisionId) return v("publication");
|
|
112
|
+
let u = l({
|
|
113
|
+
version: 1,
|
|
114
|
+
fields: Object.fromEntries(a.fields.map((e) => [e, !0]))
|
|
115
|
+
}, o);
|
|
116
|
+
if (Object.values(u).some((e) => e !== null && typeof e != "string" && typeof e != "boolean" && !(typeof e == "number" && Number.isFinite(e)))) return v("publication");
|
|
117
|
+
let p = {
|
|
118
|
+
documentId: e.documentId,
|
|
119
|
+
parent: e.parent,
|
|
120
|
+
depth: e.depth,
|
|
121
|
+
path: r.output.path,
|
|
122
|
+
sourceLocale: e.locale,
|
|
123
|
+
fallback: e.fallback,
|
|
124
|
+
values: u
|
|
125
|
+
};
|
|
126
|
+
return S.set(e.documentId, p), p;
|
|
127
|
+
}, w = [], D = /* @__PURE__ */ new Set();
|
|
128
|
+
for (let e of y.nodes) {
|
|
129
|
+
if (a.includeField !== void 0 && (e.row[a.includeField] !== !0 || e.parent !== null && !D.has(e.parent))) continue;
|
|
130
|
+
let t = await C(e);
|
|
131
|
+
if (t !== null) {
|
|
132
|
+
if (++j > 4096) return v("bounds");
|
|
133
|
+
w.push(t), D.add(e.documentId);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
let P = p?.contentType === a.contentType ? b.get(p.documentId) : void 0, F = P === void 0 ? null : await C(P), I = [];
|
|
137
|
+
if (F !== null) for (let e = P.parent; e !== null;) {
|
|
138
|
+
let t = b.get(e);
|
|
139
|
+
if (t === void 0) return v("binding");
|
|
140
|
+
let n = await C(t);
|
|
141
|
+
if (n === null) return v("binding");
|
|
142
|
+
if (++j > 4096) return v("bounds");
|
|
143
|
+
I.unshift(n), e = t.parent;
|
|
144
|
+
}
|
|
145
|
+
k[e] = {
|
|
146
|
+
version: 1,
|
|
147
|
+
contentType: a.contentType,
|
|
148
|
+
localeId: f,
|
|
149
|
+
requestedLocale: E.contentLocale,
|
|
150
|
+
currentDocumentId: F?.documentId ?? null,
|
|
151
|
+
nodes: w,
|
|
152
|
+
ancestors: I
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return Buffer.byteLength(_(k)) > 4194304 ? v("bounds") : k;
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
export { S as readAdmittedSnapshotTrees, x as readSnapshotTree };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { normalizeHost as e } from "./domainHost.js";
|
|
2
|
+
import { canonicalCmsPublicPath as t } from "./publicBuild.js";
|
|
3
|
+
import { Schema as n } from "effect";
|
|
4
|
+
import { createHash as r, createHmac as i, timingSafeEqual as a } from "node:crypto";
|
|
5
|
+
import { canonicalJson as o } from "@voltro/runtime";
|
|
6
|
+
//#region src/staticPathSet.ts
|
|
7
|
+
var s = class extends n.TaggedError()("StaticPathSetUnavailable", { reason: n.Literals([
|
|
8
|
+
"input",
|
|
9
|
+
"bounds",
|
|
10
|
+
"integrity",
|
|
11
|
+
"key",
|
|
12
|
+
"cursor",
|
|
13
|
+
"state",
|
|
14
|
+
"changed"
|
|
15
|
+
]) }) {}, c = class extends n.TaggedError()("StaticPathSetConflict", {
|
|
16
|
+
url: n.String,
|
|
17
|
+
owners: n.Array(n.String),
|
|
18
|
+
repair: n.String
|
|
19
|
+
}) {}, l = (e) => r("sha256").update(o(e)).digest("hex"), u = (e) => {
|
|
20
|
+
throw new s({ reason: e });
|
|
21
|
+
}, d = (e) => typeof e == "string" && /^[a-f0-9]{64}$/.test(e), f = (e) => typeof e == "string" && /^[A-Za-z0-9_-]{1,64}$/.test(e), p = (e) => typeof e != "object" || !e || Array.isArray(e) ? u("input") : e, m = (e, t) => {
|
|
22
|
+
if (Object.keys(e).sort().join(",") !== [...t].sort().join(",")) return u("input");
|
|
23
|
+
}, h = (e) => typeof e == "string" && e.length > 0 && e.length <= 1024 && !/[\\\x00-\x1f\x7f:]/.test(e) && e.split("/").every((e) => e !== "" && e !== "." && e !== ".." && e.toLowerCase() !== ".git"), g = (n, r) => {
|
|
24
|
+
if (e(n) !== n) return u("input");
|
|
25
|
+
try {
|
|
26
|
+
return `https://${n}${t(r)}`;
|
|
27
|
+
} catch {
|
|
28
|
+
return u("input");
|
|
29
|
+
}
|
|
30
|
+
}, _ = (e) => {
|
|
31
|
+
let t = p(e);
|
|
32
|
+
if (m(t, [
|
|
33
|
+
"host",
|
|
34
|
+
"path",
|
|
35
|
+
"localeId",
|
|
36
|
+
"routeId",
|
|
37
|
+
"owner",
|
|
38
|
+
"file",
|
|
39
|
+
"sourceDigest",
|
|
40
|
+
"parameters"
|
|
41
|
+
]), typeof t.host != "string" || typeof t.path != "string" || !f(t.localeId) || typeof t.routeId != "string" || !/^(route_|native_)[a-f0-9]{64}$/.test(t.routeId) || typeof t.owner != "string" || !["cms", "code"].includes(t.owner) || !(t.file === null && t.sourceDigest === null || h(t.file) && d(t.sourceDigest)) || t.owner === "code" && t.file === null) return u("input");
|
|
42
|
+
g(t.host, t.path);
|
|
43
|
+
let n = p(t.parameters);
|
|
44
|
+
return Object.keys(n).length > 64 || Object.entries(n).some(([e, t]) => !/^[A-Za-z_][A-Za-z0-9_]{0,127}$/.test(e) || typeof t != "string" || t.length > 4096) ? u("input") : {
|
|
45
|
+
host: t.host,
|
|
46
|
+
path: t.path,
|
|
47
|
+
localeId: t.localeId,
|
|
48
|
+
routeId: t.routeId,
|
|
49
|
+
owner: t.owner,
|
|
50
|
+
file: t.file,
|
|
51
|
+
sourceDigest: t.sourceDigest,
|
|
52
|
+
parameters: Object.fromEntries(Object.keys(n).sort().map((e) => [e, n[e]]))
|
|
53
|
+
};
|
|
54
|
+
}, v = (e) => {
|
|
55
|
+
if (!Array.isArray(e) || e.length === 0 || e.length > 2 || e.some((e) => typeof e != "string" || !["cms", "code"].includes(e))) return u("input");
|
|
56
|
+
let t = [...e].sort();
|
|
57
|
+
return new Set(t).size === t.length ? t : u("input");
|
|
58
|
+
}, y = (t) => {
|
|
59
|
+
let n = p(t), r = [
|
|
60
|
+
"tenantId",
|
|
61
|
+
"site",
|
|
62
|
+
"environment",
|
|
63
|
+
"snapshotId",
|
|
64
|
+
"consumerId",
|
|
65
|
+
"buildId"
|
|
66
|
+
], i = [
|
|
67
|
+
"snapshotDigest",
|
|
68
|
+
"inputsId",
|
|
69
|
+
"executionId",
|
|
70
|
+
"routesDigest",
|
|
71
|
+
"domainsDigest",
|
|
72
|
+
"localesDigest",
|
|
73
|
+
"policyDigest",
|
|
74
|
+
"projectionDigest"
|
|
75
|
+
];
|
|
76
|
+
if (m(n, [
|
|
77
|
+
...r,
|
|
78
|
+
...i,
|
|
79
|
+
"releaseId",
|
|
80
|
+
"host",
|
|
81
|
+
"localeIds",
|
|
82
|
+
"owners"
|
|
83
|
+
]), !r.every((e) => f(n[e])) || !i.every((e) => d(n[e])) || !(n.releaseId === null || f(n.releaseId)) || typeof n.host != "string" || e(n.host) !== n.host || !Array.isArray(n.localeIds) || n.localeIds.length === 0 || n.localeIds.length > 64 || n.localeIds.some((e, t, n) => !f(e) || t > 0 && n[t - 1] >= e)) return u("input");
|
|
84
|
+
let a = v(n.owners);
|
|
85
|
+
return o(a) === o(n.owners) ? {
|
|
86
|
+
...n,
|
|
87
|
+
localeIds: [...n.localeIds],
|
|
88
|
+
owners: a
|
|
89
|
+
} : u("input");
|
|
90
|
+
}, b = (e) => !f(e.id) || !(e.material instanceof Uint8Array) || e.material.byteLength < 32 ? u("key") : {
|
|
91
|
+
id: e.id,
|
|
92
|
+
material: new Uint8Array(e.material)
|
|
93
|
+
}, x = (e, t) => i("sha256", t.material).update(o({
|
|
94
|
+
purpose: "voltro.cms.static-path-set/v1",
|
|
95
|
+
id: e,
|
|
96
|
+
keyId: t.id
|
|
97
|
+
})).digest("hex"), S = (e) => {
|
|
98
|
+
let t = p(e);
|
|
99
|
+
if (m(t, [
|
|
100
|
+
"version",
|
|
101
|
+
"context",
|
|
102
|
+
"sort",
|
|
103
|
+
"pageSize",
|
|
104
|
+
"count",
|
|
105
|
+
"sources",
|
|
106
|
+
"pages"
|
|
107
|
+
]), t.version !== 1 || t.sort !== "host-nfc-path/v1" || t.pageSize !== 200 || typeof t.count != "number" || !Number.isSafeInteger(t.count) || t.count < 0 || t.count > 1e5 || !Array.isArray(t.pages) || t.pages.length !== Math.ceil(t.count / 200)) return u("bounds");
|
|
108
|
+
let n = p(t.sources);
|
|
109
|
+
if (m(n, ["count", "digest"]), typeof n.count != "number" || !Number.isSafeInteger(n.count) || n.count < 1 || n.count > 1e5 || !d(n.digest)) return u("integrity");
|
|
110
|
+
let r = 0, i = "", a = t.pages.map((e, n) => {
|
|
111
|
+
let a = p(e);
|
|
112
|
+
return m(a, [
|
|
113
|
+
"count",
|
|
114
|
+
"digest",
|
|
115
|
+
"first",
|
|
116
|
+
"last"
|
|
117
|
+
]), typeof a.count != "number" || a.count !== Math.min(200, Number(t.count) - n * 200) || !d(a.digest) || typeof a.first != "string" || typeof a.last != "string" || a.first > a.last || a.first <= i || a.last.length > 8192 ? u("integrity") : (r += a.count, i = a.last, {
|
|
118
|
+
count: a.count,
|
|
119
|
+
digest: a.digest,
|
|
120
|
+
first: a.first,
|
|
121
|
+
last: a.last
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
return r === t.count ? {
|
|
125
|
+
version: 1,
|
|
126
|
+
context: y(t.context),
|
|
127
|
+
sort: "host-nfc-path/v1",
|
|
128
|
+
pageSize: 200,
|
|
129
|
+
count: r,
|
|
130
|
+
sources: {
|
|
131
|
+
count: n.count,
|
|
132
|
+
digest: n.digest
|
|
133
|
+
},
|
|
134
|
+
pages: a
|
|
135
|
+
} : u("integrity");
|
|
136
|
+
}, C = (e, t) => {
|
|
137
|
+
let n = b(t), r = S(e), i = l(r);
|
|
138
|
+
return {
|
|
139
|
+
id: i,
|
|
140
|
+
manifest: r,
|
|
141
|
+
keyId: n.id,
|
|
142
|
+
signature: x(i, n)
|
|
143
|
+
};
|
|
144
|
+
}, w = (e, t) => {
|
|
145
|
+
let n = p(e);
|
|
146
|
+
m(n, [
|
|
147
|
+
"id",
|
|
148
|
+
"manifest",
|
|
149
|
+
"keyId",
|
|
150
|
+
"signature"
|
|
151
|
+
]);
|
|
152
|
+
let r = t.map(b);
|
|
153
|
+
if (r.length === 0 || new Set(r.map((e) => e.id)).size !== r.length) return u("key");
|
|
154
|
+
let i = r.find((e) => e.id === n.keyId);
|
|
155
|
+
if (i === void 0 || !d(n.id) || !d(n.signature)) return u("integrity");
|
|
156
|
+
let o = S(n.manifest);
|
|
157
|
+
return l(o) !== n.id || !a(Buffer.from(x(n.id, i), "hex"), Buffer.from(n.signature, "hex")) ? u("integrity") : {
|
|
158
|
+
id: n.id,
|
|
159
|
+
manifest: o,
|
|
160
|
+
keyId: i.id,
|
|
161
|
+
signature: n.signature
|
|
162
|
+
};
|
|
163
|
+
}, T = (e, t, n) => {
|
|
164
|
+
if (e.manifest.count === 0 && e.manifest.pages.length === 0 && t === 0 && Array.isArray(n) && n.length === 0) return [];
|
|
165
|
+
if (!Number.isSafeInteger(t) || t < 0 || t >= e.manifest.pages.length || !Array.isArray(n)) return u("bounds");
|
|
166
|
+
let r = e.manifest.pages[t];
|
|
167
|
+
if (n.length !== r.count || l(n) !== r.digest) return u("integrity");
|
|
168
|
+
let i = n.map(_), a = "";
|
|
169
|
+
for (let t of i) {
|
|
170
|
+
let n = g(t.host, t.path);
|
|
171
|
+
if (t.host !== e.manifest.context.host || !e.manifest.context.localeIds.includes(t.localeId) || !e.manifest.context.owners.includes(t.owner) || n <= a) return u("integrity");
|
|
172
|
+
a = n;
|
|
173
|
+
}
|
|
174
|
+
return g(i[0].host, i[0].path) !== r.first || a !== r.last ? u("integrity") : i;
|
|
175
|
+
};
|
|
176
|
+
//#endregion
|
|
177
|
+
export { c as StaticPathSetConflict, s as StaticPathSetUnavailable, y as copyStaticPathContext, _ as copyStaticPathEntry, S as copyStaticPathManifest, v as copyStaticPathOwners, C as signStaticPathSet, l as staticPathHash, g as staticPathUrl, T as verifyStaticPathPage, w as verifyStaticPathSet };
|