@inf-monkeys-tech/monkeys 1.1.7 → 1.1.8
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/lib/esm/index.mjs +47 -5
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +47 -5
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/runtime/declarative-control-compiler.d.ts +6 -0
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +38 -1
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/package.json +1 -1
|
@@ -19931,6 +19931,27 @@ var compileNavigationRuntimeBundle = (input) => {
|
|
|
19931
19931
|
input.compilerRevisionRef
|
|
19932
19932
|
);
|
|
19933
19933
|
const scope = TenantScopeSchema.parse(navigation.tenantScope);
|
|
19934
|
+
const verifiedKernelPageReferences = [...input.verifiedKernelPageReferences ?? []].map((reference, index) => {
|
|
19935
|
+
const parsed = RevisionRefSchema.parse(reference);
|
|
19936
|
+
if (release.target.surface !== "kernel" || parsed.visibility !== "tenant" || !parsed.tenantScope?.teamRef?.id.startsWith("kernel-page.") || parsed.ownerRepo !== "monkeys-server" || !["page", "page-release"].includes(parsed.kind)) {
|
|
19937
|
+
throw new DeclarativeControlCompilationError(
|
|
19938
|
+
"CROSS_TENANT_REFERENCE",
|
|
19939
|
+
`verifiedKernelPageReferences[${index}]`,
|
|
19940
|
+
"Verified Kernel Page references must be exact tenant-scoped Page and PageRelease revisions from the Kernel page catalog."
|
|
19941
|
+
);
|
|
19942
|
+
}
|
|
19943
|
+
if (scopeKey(parsed.tenantScope) === scopeKey(scope)) {
|
|
19944
|
+
throw new DeclarativeControlCompilationError(
|
|
19945
|
+
"CROSS_TENANT_REFERENCE",
|
|
19946
|
+
`verifiedKernelPageReferences[${index}]`,
|
|
19947
|
+
"Verified Kernel Page references must belong to a different tenant scope."
|
|
19948
|
+
);
|
|
19949
|
+
}
|
|
19950
|
+
return parsed;
|
|
19951
|
+
});
|
|
19952
|
+
const verifiedKernelPageReferenceKeys = new Set(
|
|
19953
|
+
verifiedKernelPageReferences.map(revisionRefKey)
|
|
19954
|
+
);
|
|
19934
19955
|
assertSameTenantScope(release.tenantScope, scope, "release.tenantScope");
|
|
19935
19956
|
if (navigation.nodes.length > input.limits.maxNavigationNodes)
|
|
19936
19957
|
throw new DeclarativeControlCompilationError(
|
|
@@ -20171,11 +20192,32 @@ var compileNavigationRuntimeBundle = (input) => {
|
|
|
20171
20192
|
"Navigation target is active on another surface."
|
|
20172
20193
|
);
|
|
20173
20194
|
}
|
|
20174
|
-
|
|
20175
|
-
|
|
20176
|
-
|
|
20177
|
-
|
|
20178
|
-
|
|
20195
|
+
const targetIsForeignTenant = registration.targetRevisionRef.visibility === "tenant" && scopeKey(registration.targetRevisionRef.tenantScope) !== scopeKey(scope);
|
|
20196
|
+
if (targetIsForeignTenant) {
|
|
20197
|
+
const releaseReference = registration.kind === "route" ? registration.releaseRevisionRef : void 0;
|
|
20198
|
+
if (release.target.surface !== "kernel" || registration.kind !== "route" || registration.targetRevisionRef.kind !== "page" || !releaseReference || !verifiedKernelPageReferenceKeys.has(
|
|
20199
|
+
revisionRefKey(registration.targetRevisionRef)
|
|
20200
|
+
) || !verifiedKernelPageReferenceKeys.has(revisionRefKey(releaseReference))) {
|
|
20201
|
+
throw new DeclarativeControlCompilationError(
|
|
20202
|
+
"CROSS_TENANT_REFERENCE",
|
|
20203
|
+
`nodes[${index}].targetRef`,
|
|
20204
|
+
"Kernel Navigation may retain only Page references independently verified by the authenticated Kernel page catalog."
|
|
20205
|
+
);
|
|
20206
|
+
}
|
|
20207
|
+
if (scopeKey(releaseReference.tenantScope) !== scopeKey(registration.targetRevisionRef.tenantScope)) {
|
|
20208
|
+
throw new DeclarativeControlCompilationError(
|
|
20209
|
+
"CROSS_TENANT_REFERENCE",
|
|
20210
|
+
`nodes[${index}].targetRef`,
|
|
20211
|
+
"Verified Kernel Page and PageRelease references must belong to the same tenant scope."
|
|
20212
|
+
);
|
|
20213
|
+
}
|
|
20214
|
+
} else {
|
|
20215
|
+
assertTenantCompatible(
|
|
20216
|
+
registration.targetRevisionRef,
|
|
20217
|
+
scope,
|
|
20218
|
+
`nodes[${index}].targetRef`
|
|
20219
|
+
);
|
|
20220
|
+
}
|
|
20179
20221
|
if (!accessPolicyChainImplies(
|
|
20180
20222
|
[...ancestors, node.audience],
|
|
20181
20223
|
registration.accessPolicy
|