@inf-monkeys-tech/monkeys 1.1.4 → 1.1.6
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/README.md +7 -0
- package/lib/contracts/declarative-control-http.d.ts +109122 -68294
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control-http.js +14 -6
- package/lib/contracts/declarative-control-http.js.map +1 -1
- package/lib/contracts/declarative-control.d.ts +2237 -1743
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +89 -6
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/page-expression.d.ts +1 -0
- package/lib/contracts/page-expression.d.ts.map +1 -1
- package/lib/contracts/page-expression.js +1 -1
- package/lib/contracts/page-expression.js.map +1 -1
- package/lib/contracts/semantic.d.ts +68 -0
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/semantic.js +3 -1
- package/lib/contracts/semantic.js.map +1 -1
- package/lib/esm/contracts/index.mjs +96 -9
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +184 -61
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +178 -61
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +95 -9
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/navigation-release.schema.json +1 -0
- package/lib/json-schema/navigation-runtime-bundle.schema.json +1 -0
- package/lib/json-schema/overlay-node.schema.json +2 -1
- package/lib/json-schema/page-release.schema.json +1 -0
- package/lib/json-schema/page-runtime-bundle.schema.json +22 -1
- package/lib/json-schema/page.schema.json +21 -1
- package/lib/json-schema/render-node.schema.json +2 -1
- package/lib/json-schema/render-tree.schema.json +2 -1
- package/lib/json-schema/workbench-release.schema.json +1 -0
- package/lib/json-schema/workbench-runtime-bundle.schema.json +1 -0
- package/lib/runtime/declarative-control-compiler.d.ts +6 -1
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +67 -39
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/page-expression.d.ts.map +1 -1
- package/lib/runtime/page-expression.js +11 -1
- package/lib/runtime/page-expression.js.map +1 -1
- package/lib/schemas/index.d.ts +254 -245
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +10 -5
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -7495,7 +7495,8 @@ var PageOperatorSchema = z2.enum([
|
|
|
7495
7495
|
"slice",
|
|
7496
7496
|
"trim",
|
|
7497
7497
|
"fixed",
|
|
7498
|
-
"number-format"
|
|
7498
|
+
"number-format",
|
|
7499
|
+
"encode-uri-component"
|
|
7499
7500
|
]);
|
|
7500
7501
|
var RecursivePageExpressionSchema = z2.lazy(() => z2.discriminatedUnion("kind", [
|
|
7501
7502
|
z2.object({ kind: z2.literal("literal"), value: JsonValueSchema }).strict(),
|
|
@@ -11171,6 +11172,7 @@ var ReleaseDependencyRoleSchema = z12.enum([
|
|
|
11171
11172
|
"capability",
|
|
11172
11173
|
"provider",
|
|
11173
11174
|
"ontology-definition",
|
|
11175
|
+
"projection-spec",
|
|
11174
11176
|
"query-definition",
|
|
11175
11177
|
"view",
|
|
11176
11178
|
"projection",
|
|
@@ -11200,6 +11202,7 @@ var DependencyKindByRole = {
|
|
|
11200
11202
|
capability: "capability",
|
|
11201
11203
|
provider: "view-provider",
|
|
11202
11204
|
"ontology-definition": "ontology-definition",
|
|
11205
|
+
"projection-spec": "projection-spec",
|
|
11203
11206
|
"query-definition": "domain-query-definition",
|
|
11204
11207
|
view: "view",
|
|
11205
11208
|
projection: "projection",
|
|
@@ -12140,6 +12143,9 @@ var QueryBindingSchema = z12.object({
|
|
|
12140
12143
|
).max(32).optional(),
|
|
12141
12144
|
queryWhen: PageStateActivationSchema.optional(),
|
|
12142
12145
|
accessFailure: z12.literal("render-forbidden").optional(),
|
|
12146
|
+
draftRetention: z12.object({
|
|
12147
|
+
identityParameters: z12.array(ContractIdentifierSchema).min(1).max(32)
|
|
12148
|
+
}).strict().optional(),
|
|
12143
12149
|
resultStateBindings: z12.array(QueryResultStateBindingSchema).max(32).optional(),
|
|
12144
12150
|
execution: z12.enum(["server", "local-state"]).default("server"),
|
|
12145
12151
|
pagination: z12.enum(["none", "cursor", "offset"]),
|
|
@@ -12151,6 +12157,12 @@ var QueryBindingSchema = z12.object({
|
|
|
12151
12157
|
when: PageExpressionSchema.optional()
|
|
12152
12158
|
}).strict().optional()
|
|
12153
12159
|
}).strict().superRefine((value, context) => {
|
|
12160
|
+
if (value.draftRetention) {
|
|
12161
|
+
const names = value.draftRetention.identityParameters;
|
|
12162
|
+
if (value.execution !== "server" || new Set(names).size !== names.length || names.some((name) => !Object.prototype.hasOwnProperty.call(value.parameters, name))) {
|
|
12163
|
+
context.addIssue({ code: "custom", path: ["draftRetention"], message: "Draft retention requires distinct declared Server query identity parameters." });
|
|
12164
|
+
}
|
|
12165
|
+
}
|
|
12154
12166
|
if (value.targetProjection) {
|
|
12155
12167
|
if (value.targetProjection.schemaRevisionRef.kind !== "schema")
|
|
12156
12168
|
context.addIssue({
|
|
@@ -12384,6 +12396,58 @@ var OntologyBindingSchema = z12.object({
|
|
|
12384
12396
|
});
|
|
12385
12397
|
}
|
|
12386
12398
|
});
|
|
12399
|
+
var LegacyOntologyBindingSchema = z12.object({
|
|
12400
|
+
...OntologyBindingSchema.shape,
|
|
12401
|
+
viewRevisionRef: RevisionRefSchema.optional(),
|
|
12402
|
+
canonicalDataViewRevisionRef: z12.never().optional(),
|
|
12403
|
+
projectionRevisionRef: RevisionRefSchema.optional()
|
|
12404
|
+
}).strict().superRefine((value, context) => {
|
|
12405
|
+
if (Boolean(value.viewRevisionRef) === Boolean(value.projectionRevisionRef)) {
|
|
12406
|
+
context.addIssue({
|
|
12407
|
+
code: "custom",
|
|
12408
|
+
path: ["viewRevisionRef"],
|
|
12409
|
+
message: "Legacy bindings require exactly one View or projection revision."
|
|
12410
|
+
});
|
|
12411
|
+
}
|
|
12412
|
+
for (const [key, reference, kind] of [
|
|
12413
|
+
[
|
|
12414
|
+
"ontologyDefinitionRevisionRef",
|
|
12415
|
+
value.ontologyDefinitionRevisionRef,
|
|
12416
|
+
"ontology-definition"
|
|
12417
|
+
],
|
|
12418
|
+
["viewRevisionRef", value.viewRevisionRef, "view"],
|
|
12419
|
+
["projectionRevisionRef", value.projectionRevisionRef, "projection-spec"]
|
|
12420
|
+
]) {
|
|
12421
|
+
if (reference && reference.kind !== kind)
|
|
12422
|
+
context.addIssue({
|
|
12423
|
+
code: "custom",
|
|
12424
|
+
path: [key, "kind"],
|
|
12425
|
+
message: `Expected a ${kind} revision.`
|
|
12426
|
+
});
|
|
12427
|
+
}
|
|
12428
|
+
if (value.cursorWindow && value.pagination !== "cursor")
|
|
12429
|
+
context.addIssue({
|
|
12430
|
+
code: "custom",
|
|
12431
|
+
path: ["cursorWindow"],
|
|
12432
|
+
message: "Cursor-window navigation requires cursor pagination."
|
|
12433
|
+
});
|
|
12434
|
+
});
|
|
12435
|
+
var PersistedOntologyBindingSchema = z12.object({
|
|
12436
|
+
...OntologyBindingSchema.shape,
|
|
12437
|
+
viewRevisionRef: RevisionRefSchema.optional(),
|
|
12438
|
+
canonicalDataViewRevisionRef: RevisionRefSchema.optional(),
|
|
12439
|
+
projectionRevisionRef: RevisionRefSchema.optional()
|
|
12440
|
+
}).strict().superRefine((value, context) => {
|
|
12441
|
+
const schema2 = value.canonicalDataViewRevisionRef ? OntologyBindingSchema : LegacyOntologyBindingSchema;
|
|
12442
|
+
const parsed = schema2.safeParse(value);
|
|
12443
|
+
if (!parsed.success)
|
|
12444
|
+
for (const issue of parsed.error.issues)
|
|
12445
|
+
context.addIssue({
|
|
12446
|
+
code: "custom",
|
|
12447
|
+
path: issue.path,
|
|
12448
|
+
message: issue.message
|
|
12449
|
+
});
|
|
12450
|
+
});
|
|
12387
12451
|
var ActionResultBindingEffectSourceSchema = z12.discriminatedUnion(
|
|
12388
12452
|
"kind",
|
|
12389
12453
|
[
|
|
@@ -12926,7 +12990,7 @@ var ResolvedPageSchema = z12.object({
|
|
|
12926
12990
|
stateDefinitions: z12.array(PageStateDefinitionSchema).optional(),
|
|
12927
12991
|
entryTransitions: z12.array(PageEntryTransitionSchema).optional(),
|
|
12928
12992
|
interactionBindings: z12.array(InteractionBindingSchema).optional(),
|
|
12929
|
-
ontologyBindings: z12.array(
|
|
12993
|
+
ontologyBindings: z12.array(PersistedOntologyBindingSchema),
|
|
12930
12994
|
queryBindings: z12.array(QueryBindingSchema).optional(),
|
|
12931
12995
|
actionBindings: z12.array(ActionBindingSchema),
|
|
12932
12996
|
pageAccessPolicy: AccessPolicySchema,
|
|
@@ -14710,7 +14774,7 @@ var DeclarativeWorkbenchCatalogSchema = z12.object({
|
|
|
14710
14774
|
});
|
|
14711
14775
|
}
|
|
14712
14776
|
});
|
|
14713
|
-
var
|
|
14777
|
+
var CompatiblePageRuntimeBundleSchema = z12.object({
|
|
14714
14778
|
contract: z12.literal("PageRuntimeBundle"),
|
|
14715
14779
|
...RuntimeBundleBaseShape,
|
|
14716
14780
|
pageId: ContractIdentifierSchema,
|
|
@@ -14719,7 +14783,7 @@ var PageRuntimeBundleSchema = z12.object({
|
|
|
14719
14783
|
routeClaims: z12.array(CompiledRouteClaimSchema),
|
|
14720
14784
|
routeStatePresentations: z12.array(PageRouteStatePresentationSchema).default([]),
|
|
14721
14785
|
shellRevisionRef: RevisionRefSchema,
|
|
14722
|
-
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema,
|
|
14786
|
+
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema.optional(),
|
|
14723
14787
|
renderTree: RenderTreeSchema,
|
|
14724
14788
|
capabilityInstances: z12.array(CapabilityInstanceSchema),
|
|
14725
14789
|
deniedCapabilityInstanceIds: z12.array(ContractIdentifierSchema).default([]),
|
|
@@ -14727,7 +14791,7 @@ var PageRuntimeBundleSchema = z12.object({
|
|
|
14727
14791
|
stateDefinitions: z12.array(PageStateDefinitionSchema).default([]),
|
|
14728
14792
|
entryTransitions: z12.array(ResolvedPageEntryTransitionSchema).default([]),
|
|
14729
14793
|
interactionBindings: z12.array(InteractionBindingSchema).default([]),
|
|
14730
|
-
ontologyBindings: z12.array(
|
|
14794
|
+
ontologyBindings: z12.array(PersistedOntologyBindingSchema),
|
|
14731
14795
|
queryBindings: z12.array(QueryBindingSchema).default([]),
|
|
14732
14796
|
actionBindings: z12.array(ActionBindingSchema),
|
|
14733
14797
|
pageAccessPolicy: AccessPolicySchema,
|
|
@@ -14782,6 +14846,15 @@ var PageRuntimeBundleSchema = z12.object({
|
|
|
14782
14846
|
var ResolvedWorkbenchAppInstanceSchema = WorkbenchAppInstanceSchema.extend({
|
|
14783
14847
|
targetAccessPolicy: AccessPolicySchema
|
|
14784
14848
|
}).strict();
|
|
14849
|
+
var PageRuntimeBundleSchema = CompatiblePageRuntimeBundleSchema.safeExtend({
|
|
14850
|
+
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema,
|
|
14851
|
+
ontologyBindings: z12.array(OntologyBindingSchema)
|
|
14852
|
+
});
|
|
14853
|
+
var LegacyPageRuntimeBundleSchema = CompatiblePageRuntimeBundleSchema.safeExtend({
|
|
14854
|
+
shellDescriptor: z12.never().optional(),
|
|
14855
|
+
ontologyBindings: z12.array(LegacyOntologyBindingSchema)
|
|
14856
|
+
});
|
|
14857
|
+
var ReadablePageRuntimeBundleSchema = z12.union([PageRuntimeBundleSchema, LegacyPageRuntimeBundleSchema]);
|
|
14785
14858
|
var WorkbenchRuntimeIdentitySchema = z12.object({
|
|
14786
14859
|
name: I18nTextSchema,
|
|
14787
14860
|
description: I18nTextSchema.optional()
|
|
@@ -15029,6 +15102,7 @@ var OntologyViewDefinitionSchema = z13.object({
|
|
|
15029
15102
|
renderModelSchemaRevisionRef: ExactRefKindSchema("schema"),
|
|
15030
15103
|
requiredPermissionCodes: z13.array(ContractIdentifierSchema).default([])
|
|
15031
15104
|
}).strict();
|
|
15105
|
+
var LegacyOntologyViewDefinitionSchema = OntologyViewDefinitionSchema.omit({ canonicalDataViewRevisionRef: true });
|
|
15032
15106
|
var ConceptRelationshipSchema = z13.object({
|
|
15033
15107
|
kind: ContractIdentifierSchema,
|
|
15034
15108
|
targetConceptId: ContractIdentifierSchema,
|
|
@@ -15590,6 +15664,7 @@ var DeclarativeRuntimeActionExecuteIntentSchema = DeclarativeRuntimePageTargetSc
|
|
|
15590
15664
|
routePath: DeclarativeRuntimeActionRoutePathSchema.optional(),
|
|
15591
15665
|
idempotencyKey: z14.string().trim().min(1).max(256)
|
|
15592
15666
|
}).strict();
|
|
15667
|
+
var LegacyDeclarativeRuntimeActionExecuteIntentSchema = DeclarativeRuntimeActionExecuteIntentSchema.safeExtend({ pageState: DeclarativeRuntimeParametersSchema.default({}) });
|
|
15593
15668
|
var DeclarativeNativeDownloadSchema = z14.object({
|
|
15594
15669
|
url: z14.string().min(1).max(32768).refine((value) => {
|
|
15595
15670
|
try {
|
|
@@ -15977,7 +16052,12 @@ var DeclarativeCreateTemplateRegistrationSchema = z14.object({
|
|
|
15977
16052
|
description: I18nTextSchema,
|
|
15978
16053
|
supportedSurfaces: z14.array(ProductSurfaceSchema).min(1),
|
|
15979
16054
|
legacyMigrationSourcePageIds: z14.array(ContractIdentifierSchema).min(1).max(256).optional(),
|
|
15980
|
-
document: z14.union([
|
|
16055
|
+
document: z14.union([
|
|
16056
|
+
PageSchema,
|
|
16057
|
+
ResolvedPageSchema,
|
|
16058
|
+
NavigationSchema,
|
|
16059
|
+
WorkbenchSchema
|
|
16060
|
+
]),
|
|
15981
16061
|
sourceContentHash: Sha256Schema
|
|
15982
16062
|
}).strict().superRefine((value, context) => {
|
|
15983
16063
|
const expected = value.document.contract === "Page" ? "page" : value.document.contract === "Navigation" ? "navigation" : "workbench";
|
|
@@ -16473,6 +16553,7 @@ var DeclarativeCreateIntentSchema = z14.object({
|
|
|
16473
16553
|
});
|
|
16474
16554
|
var DeclarativeDocumentSchema = z14.union([
|
|
16475
16555
|
PageSchema,
|
|
16556
|
+
ResolvedPageSchema,
|
|
16476
16557
|
NavigationSchema,
|
|
16477
16558
|
WorkbenchSchema
|
|
16478
16559
|
]);
|
|
@@ -16779,7 +16860,7 @@ var DeclarativePreviewResultSchema = z14.object({
|
|
|
16779
16860
|
revision: z14.number().int().positive(),
|
|
16780
16861
|
contentHash: Sha256Schema,
|
|
16781
16862
|
bundle: z14.union([
|
|
16782
|
-
|
|
16863
|
+
ReadablePageRuntimeBundleSchema,
|
|
16783
16864
|
NavigationRuntimeBundleSchema,
|
|
16784
16865
|
WorkbenchRuntimeBundleSchema
|
|
16785
16866
|
]),
|
|
@@ -16796,7 +16877,7 @@ var DeclarativePublicationItemResultSchema = z14.object({
|
|
|
16796
16877
|
WorkbenchReleaseSchema
|
|
16797
16878
|
]),
|
|
16798
16879
|
bundle: z14.union([
|
|
16799
|
-
|
|
16880
|
+
ReadablePageRuntimeBundleSchema,
|
|
16800
16881
|
NavigationRuntimeBundleSchema,
|
|
16801
16882
|
WorkbenchRuntimeBundleSchema
|
|
16802
16883
|
]).optional()
|
|
@@ -17061,7 +17142,7 @@ var DeclarativeRuntimeResolvedSchema = z14.object({
|
|
|
17061
17142
|
surface: ProductSurfaceSchema,
|
|
17062
17143
|
normalizedPath: z14.string().trim().min(1),
|
|
17063
17144
|
routeParameters: z14.record(ContractIdentifierSchema, z14.string()),
|
|
17064
|
-
page:
|
|
17145
|
+
page: ReadablePageRuntimeBundleSchema.optional(),
|
|
17065
17146
|
workbench: WorkbenchRuntimeBundleSchema.optional(),
|
|
17066
17147
|
redirect: DeclarativeRuntimeRedirectSchema.optional(),
|
|
17067
17148
|
navigation: NavigationRuntimeBundleSchema.optional(),
|
|
@@ -18372,11 +18453,19 @@ var pageDependencies = (page, compilerRevisionRef) => [
|
|
|
18372
18453
|
role: "ontology-definition",
|
|
18373
18454
|
revisionRef: binding.ontologyDefinitionRevisionRef
|
|
18374
18455
|
},
|
|
18375
|
-
{ role: "view", revisionRef: binding.viewRevisionRef },
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18456
|
+
...binding.viewRevisionRef ? [{ role: "view", revisionRef: binding.viewRevisionRef }] : [],
|
|
18457
|
+
..."projectionRevisionRef" in binding && binding.projectionRevisionRef ? [
|
|
18458
|
+
{
|
|
18459
|
+
role: "projection-spec",
|
|
18460
|
+
revisionRef: binding.projectionRevisionRef
|
|
18461
|
+
}
|
|
18462
|
+
] : [],
|
|
18463
|
+
...binding.canonicalDataViewRevisionRef ? [
|
|
18464
|
+
{
|
|
18465
|
+
role: "view",
|
|
18466
|
+
revisionRef: binding.canonicalDataViewRevisionRef
|
|
18467
|
+
}
|
|
18468
|
+
] : [],
|
|
18380
18469
|
{
|
|
18381
18470
|
role: "schema",
|
|
18382
18471
|
revisionRef: binding.renderModelSchemaRevisionRef
|
|
@@ -18950,8 +19039,30 @@ var resolvePage = (input) => {
|
|
|
18950
19039
|
};
|
|
18951
19040
|
return ResolvedPageSchema.parse(resolved);
|
|
18952
19041
|
};
|
|
18953
|
-
var
|
|
19042
|
+
var compileLegacyPageRuntimeBundle = (input) => deepFreeze(
|
|
19043
|
+
LegacyPageRuntimeBundleSchema.parse(
|
|
19044
|
+
compilePageRuntimeBundleInternal(input, true)
|
|
19045
|
+
)
|
|
19046
|
+
);
|
|
19047
|
+
var compilePageRuntimeBundle = (input) => deepFreeze(
|
|
19048
|
+
PageRuntimeBundleSchema.parse(
|
|
19049
|
+
compilePageRuntimeBundleInternal(input, false)
|
|
19050
|
+
)
|
|
19051
|
+
);
|
|
19052
|
+
var compilePageRuntimeBundleInternal = (input, legacy) => {
|
|
18954
19053
|
const parsedPage = ResolvedPageSchema.parse(input.page);
|
|
19054
|
+
parsedPage.ontologyBindings.forEach(
|
|
19055
|
+
(binding) => (legacy ? LegacyOntologyBindingSchema : OntologyBindingSchema).parse(
|
|
19056
|
+
binding
|
|
19057
|
+
)
|
|
19058
|
+
);
|
|
19059
|
+
if (legacy && (parsedPage.queryBindings?.length || input.domainQueryRegistry?.length)) {
|
|
19060
|
+
throw new DeclarativeControlCompilationError(
|
|
19061
|
+
"QUERY_DEFINITION_MISMATCH",
|
|
19062
|
+
"queryBindings",
|
|
19063
|
+
"Domain queries require the current compiler and its governed registries."
|
|
19064
|
+
);
|
|
19065
|
+
}
|
|
18955
19066
|
const page = {
|
|
18956
19067
|
...parsedPage,
|
|
18957
19068
|
routeStatePresentations: parsedPage.routeStatePresentations ?? [],
|
|
@@ -19094,43 +19205,45 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
19094
19205
|
domainQueryDependencies(definition)
|
|
19095
19206
|
);
|
|
19096
19207
|
});
|
|
19097
|
-
const
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
if (shellRegistration.resourceKind !== "shell" || !sameRevisionRef(
|
|
19101
|
-
shellRegistration.resourceRevisionRef,
|
|
19102
|
-
page.shellRevisionRef
|
|
19103
|
-
) || declarativeProductResourceRevisionHash(shellRegistration) !== shellRegistration.resourceRevisionRef.contentHash || declarativeProductResourceSourceHash(shellRegistration.document) !== shellRegistration.sourceContentHash) {
|
|
19104
|
-
throw new DeclarativeControlCompilationError(
|
|
19105
|
-
"SHELL_REVISION_MISMATCH",
|
|
19106
|
-
"shellRegistration",
|
|
19107
|
-
"The active Shell registration does not match the Page exact Shell revision."
|
|
19208
|
+
const shellDescriptor = legacy ? void 0 : (() => {
|
|
19209
|
+
const shellRegistration = DeclarativeProductResourceRegistrationSchema.parse(
|
|
19210
|
+
input.shellRegistration
|
|
19108
19211
|
);
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19212
|
+
if (shellRegistration.resourceKind !== "shell" || !sameRevisionRef(
|
|
19213
|
+
shellRegistration.resourceRevisionRef,
|
|
19214
|
+
page.shellRevisionRef
|
|
19215
|
+
) || declarativeProductResourceRevisionHash(shellRegistration) !== shellRegistration.resourceRevisionRef.contentHash || declarativeProductResourceSourceHash(shellRegistration.document) !== shellRegistration.sourceContentHash) {
|
|
19216
|
+
throw new DeclarativeControlCompilationError(
|
|
19217
|
+
"SHELL_REVISION_MISMATCH",
|
|
19218
|
+
"shellRegistration",
|
|
19219
|
+
"The active Shell registration does not match the Page exact Shell revision."
|
|
19220
|
+
);
|
|
19221
|
+
}
|
|
19222
|
+
if (!shellRegistration.supportedSurfaces.includes(release.target.surface)) {
|
|
19223
|
+
throw new DeclarativeControlCompilationError(
|
|
19224
|
+
"SHELL_SURFACE_MISMATCH",
|
|
19225
|
+
"shellRegistration.supportedSurfaces",
|
|
19226
|
+
"The active Shell registration does not support the release surface."
|
|
19227
|
+
);
|
|
19228
|
+
}
|
|
19229
|
+
const shellDocument = DeclarativeShellResourceDocumentSchema.parse(
|
|
19230
|
+
shellRegistration.document
|
|
19115
19231
|
);
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
shellRegistration.document
|
|
19119
|
-
);
|
|
19120
|
-
const shellChrome = shellDocument.surfaceChrome.find(
|
|
19121
|
-
(entry) => entry.surface === release.target.surface
|
|
19122
|
-
);
|
|
19123
|
-
if (!shellChrome) {
|
|
19124
|
-
throw new DeclarativeControlCompilationError(
|
|
19125
|
-
"SHELL_CHROME_UNAVAILABLE",
|
|
19126
|
-
"shellRegistration.document.surfaceChrome",
|
|
19127
|
-
"The active Shell does not declare chrome for the release surface."
|
|
19232
|
+
const shellChrome = shellDocument.surfaceChrome.find(
|
|
19233
|
+
(entry) => entry.surface === release.target.surface
|
|
19128
19234
|
);
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
|
|
19133
|
-
|
|
19235
|
+
if (!shellChrome) {
|
|
19236
|
+
throw new DeclarativeControlCompilationError(
|
|
19237
|
+
"SHELL_CHROME_UNAVAILABLE",
|
|
19238
|
+
"shellRegistration.document.surfaceChrome",
|
|
19239
|
+
"The active Shell does not declare chrome for the release surface."
|
|
19240
|
+
);
|
|
19241
|
+
}
|
|
19242
|
+
return {
|
|
19243
|
+
shellRevisionRef: page.shellRevisionRef,
|
|
19244
|
+
header: shellChrome.header
|
|
19245
|
+
};
|
|
19246
|
+
})();
|
|
19134
19247
|
if (page.renderTree.nodes.length > input.limits.maxRenderNodes)
|
|
19135
19248
|
throw new DeclarativeControlCompilationError(
|
|
19136
19249
|
"RENDER_NODE_LIMIT_EXCEEDED",
|
|
@@ -19229,23 +19342,23 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
19229
19342
|
"Page requests undeclared provider side effects."
|
|
19230
19343
|
);
|
|
19231
19344
|
}
|
|
19232
|
-
if (!sameRevisionRef(
|
|
19345
|
+
if (!legacy && (!registration.propertySchemaRevisionRef || !sameRevisionRef(
|
|
19233
19346
|
instance.propertySchemaRevisionRef,
|
|
19234
19347
|
registration.propertySchemaRevisionRef
|
|
19235
|
-
)) {
|
|
19348
|
+
))) {
|
|
19236
19349
|
throw new DeclarativeControlCompilationError(
|
|
19237
19350
|
"CAPABILITY_BINDING_MISMATCH",
|
|
19238
19351
|
`capabilityInstances[${index}].propertySchemaRevisionRef`,
|
|
19239
19352
|
"Capability properties do not pin the exact schema registered by the active Design catalog."
|
|
19240
19353
|
);
|
|
19241
19354
|
}
|
|
19242
|
-
if (!accessPolicyChainImplies(
|
|
19355
|
+
if (!legacy && (!registration.accessPolicy || !accessPolicyChainImplies(
|
|
19243
19356
|
[
|
|
19244
19357
|
page.pageAccessPolicy,
|
|
19245
19358
|
...instance.accessPolicy ? [instance.accessPolicy] : []
|
|
19246
19359
|
],
|
|
19247
19360
|
registration.accessPolicy
|
|
19248
|
-
)) {
|
|
19361
|
+
))) {
|
|
19249
19362
|
throw new DeclarativeControlCompilationError(
|
|
19250
19363
|
"AUDIENCE_WIDER_THAN_TARGET",
|
|
19251
19364
|
`capabilityInstances[${index}]`,
|
|
@@ -19575,7 +19688,7 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
19575
19688
|
(presentation) => presentation.surface === release.target.surface
|
|
19576
19689
|
),
|
|
19577
19690
|
shellRevisionRef: page.shellRevisionRef,
|
|
19578
|
-
shellDescriptor,
|
|
19691
|
+
...shellDescriptor ? { shellDescriptor } : {},
|
|
19579
19692
|
renderTree,
|
|
19580
19693
|
capabilityInstances: page.capabilityInstances,
|
|
19581
19694
|
deniedCapabilityInstanceIds: [],
|
|
@@ -19591,12 +19704,7 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
19591
19704
|
observationPolicyRevisionRef: page.observationPolicyRevisionRef,
|
|
19592
19705
|
privacyClassification: page.privacyClassification
|
|
19593
19706
|
};
|
|
19594
|
-
return
|
|
19595
|
-
PageRuntimeBundleSchema.parse({
|
|
19596
|
-
...unsigned,
|
|
19597
|
-
contentHash: canonicalContentHash(unsigned)
|
|
19598
|
-
})
|
|
19599
|
-
);
|
|
19707
|
+
return { ...unsigned, contentHash: canonicalContentHash(unsigned) };
|
|
19600
19708
|
};
|
|
19601
19709
|
var workbenchDependencyRole = (kind) => {
|
|
19602
19710
|
switch (kind) {
|
|
@@ -24980,7 +25088,7 @@ var readPageValue = (value, path) => {
|
|
|
24980
25088
|
}
|
|
24981
25089
|
return current;
|
|
24982
25090
|
};
|
|
24983
|
-
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim"]);
|
|
25091
|
+
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim", "encode-uri-component"]);
|
|
24984
25092
|
var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
|
|
24985
25093
|
var compilePageExpression = (input) => {
|
|
24986
25094
|
assertBudget(input);
|
|
@@ -25148,6 +25256,14 @@ var evaluateCompiled = (expression, context, budget) => {
|
|
|
25148
25256
|
}
|
|
25149
25257
|
case "trim":
|
|
25150
25258
|
return typeof first === "string" ? first.trim() : fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
25259
|
+
case "encode-uri-component": {
|
|
25260
|
+
if (typeof first !== "string") return fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
25261
|
+
try {
|
|
25262
|
+
return encodeURIComponent(first);
|
|
25263
|
+
} catch {
|
|
25264
|
+
return fail("PAGE_EXPRESSION_INVALID_UNICODE");
|
|
25265
|
+
}
|
|
25266
|
+
}
|
|
25151
25267
|
case "number-format": {
|
|
25152
25268
|
if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
|
|
25153
25269
|
const minimumFractionDigits = number(values[2]);
|
|
@@ -25482,6 +25598,7 @@ export {
|
|
|
25482
25598
|
compileDeclarativeRouteOwnerIndex,
|
|
25483
25599
|
compileDeclarativeWorkbenchCatalog,
|
|
25484
25600
|
compileDesignCapabilityCatalogArtifact,
|
|
25601
|
+
compileLegacyPageRuntimeBundle,
|
|
25485
25602
|
compileLegacyRouteTakeoverAuthorization,
|
|
25486
25603
|
compileMenuRuntimeBundle,
|
|
25487
25604
|
compileNavigationRuntimeBundle,
|