@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
package/lib/esm/index.mjs
CHANGED
|
@@ -8771,7 +8771,8 @@ var PageOperatorSchema = z6.enum([
|
|
|
8771
8771
|
"slice",
|
|
8772
8772
|
"trim",
|
|
8773
8773
|
"fixed",
|
|
8774
|
-
"number-format"
|
|
8774
|
+
"number-format",
|
|
8775
|
+
"encode-uri-component"
|
|
8775
8776
|
]);
|
|
8776
8777
|
var RecursivePageExpressionSchema = z6.lazy(() => z6.discriminatedUnion("kind", [
|
|
8777
8778
|
z6.object({ kind: z6.literal("literal"), value: JsonValueSchema }).strict(),
|
|
@@ -10410,6 +10411,7 @@ var ReleaseDependencyRoleSchema = z14.enum([
|
|
|
10410
10411
|
"capability",
|
|
10411
10412
|
"provider",
|
|
10412
10413
|
"ontology-definition",
|
|
10414
|
+
"projection-spec",
|
|
10413
10415
|
"query-definition",
|
|
10414
10416
|
"view",
|
|
10415
10417
|
"projection",
|
|
@@ -10439,6 +10441,7 @@ var DependencyKindByRole = {
|
|
|
10439
10441
|
capability: "capability",
|
|
10440
10442
|
provider: "view-provider",
|
|
10441
10443
|
"ontology-definition": "ontology-definition",
|
|
10444
|
+
"projection-spec": "projection-spec",
|
|
10442
10445
|
"query-definition": "domain-query-definition",
|
|
10443
10446
|
view: "view",
|
|
10444
10447
|
projection: "projection",
|
|
@@ -11379,6 +11382,9 @@ var QueryBindingSchema = z14.object({
|
|
|
11379
11382
|
).max(32).optional(),
|
|
11380
11383
|
queryWhen: PageStateActivationSchema.optional(),
|
|
11381
11384
|
accessFailure: z14.literal("render-forbidden").optional(),
|
|
11385
|
+
draftRetention: z14.object({
|
|
11386
|
+
identityParameters: z14.array(ContractIdentifierSchema).min(1).max(32)
|
|
11387
|
+
}).strict().optional(),
|
|
11382
11388
|
resultStateBindings: z14.array(QueryResultStateBindingSchema).max(32).optional(),
|
|
11383
11389
|
execution: z14.enum(["server", "local-state"]).default("server"),
|
|
11384
11390
|
pagination: z14.enum(["none", "cursor", "offset"]),
|
|
@@ -11390,6 +11396,12 @@ var QueryBindingSchema = z14.object({
|
|
|
11390
11396
|
when: PageExpressionSchema.optional()
|
|
11391
11397
|
}).strict().optional()
|
|
11392
11398
|
}).strict().superRefine((value, context) => {
|
|
11399
|
+
if (value.draftRetention) {
|
|
11400
|
+
const names = value.draftRetention.identityParameters;
|
|
11401
|
+
if (value.execution !== "server" || new Set(names).size !== names.length || names.some((name) => !Object.prototype.hasOwnProperty.call(value.parameters, name))) {
|
|
11402
|
+
context.addIssue({ code: "custom", path: ["draftRetention"], message: "Draft retention requires distinct declared Server query identity parameters." });
|
|
11403
|
+
}
|
|
11404
|
+
}
|
|
11393
11405
|
if (value.targetProjection) {
|
|
11394
11406
|
if (value.targetProjection.schemaRevisionRef.kind !== "schema")
|
|
11395
11407
|
context.addIssue({
|
|
@@ -11623,6 +11635,58 @@ var OntologyBindingSchema = z14.object({
|
|
|
11623
11635
|
});
|
|
11624
11636
|
}
|
|
11625
11637
|
});
|
|
11638
|
+
var LegacyOntologyBindingSchema = z14.object({
|
|
11639
|
+
...OntologyBindingSchema.shape,
|
|
11640
|
+
viewRevisionRef: RevisionRefSchema.optional(),
|
|
11641
|
+
canonicalDataViewRevisionRef: z14.never().optional(),
|
|
11642
|
+
projectionRevisionRef: RevisionRefSchema.optional()
|
|
11643
|
+
}).strict().superRefine((value, context) => {
|
|
11644
|
+
if (Boolean(value.viewRevisionRef) === Boolean(value.projectionRevisionRef)) {
|
|
11645
|
+
context.addIssue({
|
|
11646
|
+
code: "custom",
|
|
11647
|
+
path: ["viewRevisionRef"],
|
|
11648
|
+
message: "Legacy bindings require exactly one View or projection revision."
|
|
11649
|
+
});
|
|
11650
|
+
}
|
|
11651
|
+
for (const [key, reference, kind] of [
|
|
11652
|
+
[
|
|
11653
|
+
"ontologyDefinitionRevisionRef",
|
|
11654
|
+
value.ontologyDefinitionRevisionRef,
|
|
11655
|
+
"ontology-definition"
|
|
11656
|
+
],
|
|
11657
|
+
["viewRevisionRef", value.viewRevisionRef, "view"],
|
|
11658
|
+
["projectionRevisionRef", value.projectionRevisionRef, "projection-spec"]
|
|
11659
|
+
]) {
|
|
11660
|
+
if (reference && reference.kind !== kind)
|
|
11661
|
+
context.addIssue({
|
|
11662
|
+
code: "custom",
|
|
11663
|
+
path: [key, "kind"],
|
|
11664
|
+
message: `Expected a ${kind} revision.`
|
|
11665
|
+
});
|
|
11666
|
+
}
|
|
11667
|
+
if (value.cursorWindow && value.pagination !== "cursor")
|
|
11668
|
+
context.addIssue({
|
|
11669
|
+
code: "custom",
|
|
11670
|
+
path: ["cursorWindow"],
|
|
11671
|
+
message: "Cursor-window navigation requires cursor pagination."
|
|
11672
|
+
});
|
|
11673
|
+
});
|
|
11674
|
+
var PersistedOntologyBindingSchema = z14.object({
|
|
11675
|
+
...OntologyBindingSchema.shape,
|
|
11676
|
+
viewRevisionRef: RevisionRefSchema.optional(),
|
|
11677
|
+
canonicalDataViewRevisionRef: RevisionRefSchema.optional(),
|
|
11678
|
+
projectionRevisionRef: RevisionRefSchema.optional()
|
|
11679
|
+
}).strict().superRefine((value, context) => {
|
|
11680
|
+
const schema2 = value.canonicalDataViewRevisionRef ? OntologyBindingSchema : LegacyOntologyBindingSchema;
|
|
11681
|
+
const parsed = schema2.safeParse(value);
|
|
11682
|
+
if (!parsed.success)
|
|
11683
|
+
for (const issue of parsed.error.issues)
|
|
11684
|
+
context.addIssue({
|
|
11685
|
+
code: "custom",
|
|
11686
|
+
path: issue.path,
|
|
11687
|
+
message: issue.message
|
|
11688
|
+
});
|
|
11689
|
+
});
|
|
11626
11690
|
var ActionResultBindingEffectSourceSchema = z14.discriminatedUnion(
|
|
11627
11691
|
"kind",
|
|
11628
11692
|
[
|
|
@@ -12165,7 +12229,7 @@ var ResolvedPageSchema = z14.object({
|
|
|
12165
12229
|
stateDefinitions: z14.array(PageStateDefinitionSchema).optional(),
|
|
12166
12230
|
entryTransitions: z14.array(PageEntryTransitionSchema).optional(),
|
|
12167
12231
|
interactionBindings: z14.array(InteractionBindingSchema).optional(),
|
|
12168
|
-
ontologyBindings: z14.array(
|
|
12232
|
+
ontologyBindings: z14.array(PersistedOntologyBindingSchema),
|
|
12169
12233
|
queryBindings: z14.array(QueryBindingSchema).optional(),
|
|
12170
12234
|
actionBindings: z14.array(ActionBindingSchema),
|
|
12171
12235
|
pageAccessPolicy: AccessPolicySchema,
|
|
@@ -13949,7 +14013,7 @@ var DeclarativeWorkbenchCatalogSchema = z14.object({
|
|
|
13949
14013
|
});
|
|
13950
14014
|
}
|
|
13951
14015
|
});
|
|
13952
|
-
var
|
|
14016
|
+
var CompatiblePageRuntimeBundleSchema = z14.object({
|
|
13953
14017
|
contract: z14.literal("PageRuntimeBundle"),
|
|
13954
14018
|
...RuntimeBundleBaseShape,
|
|
13955
14019
|
pageId: ContractIdentifierSchema,
|
|
@@ -13958,7 +14022,7 @@ var PageRuntimeBundleSchema = z14.object({
|
|
|
13958
14022
|
routeClaims: z14.array(CompiledRouteClaimSchema),
|
|
13959
14023
|
routeStatePresentations: z14.array(PageRouteStatePresentationSchema).default([]),
|
|
13960
14024
|
shellRevisionRef: RevisionRefSchema,
|
|
13961
|
-
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema,
|
|
14025
|
+
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema.optional(),
|
|
13962
14026
|
renderTree: RenderTreeSchema,
|
|
13963
14027
|
capabilityInstances: z14.array(CapabilityInstanceSchema),
|
|
13964
14028
|
deniedCapabilityInstanceIds: z14.array(ContractIdentifierSchema).default([]),
|
|
@@ -13966,7 +14030,7 @@ var PageRuntimeBundleSchema = z14.object({
|
|
|
13966
14030
|
stateDefinitions: z14.array(PageStateDefinitionSchema).default([]),
|
|
13967
14031
|
entryTransitions: z14.array(ResolvedPageEntryTransitionSchema).default([]),
|
|
13968
14032
|
interactionBindings: z14.array(InteractionBindingSchema).default([]),
|
|
13969
|
-
ontologyBindings: z14.array(
|
|
14033
|
+
ontologyBindings: z14.array(PersistedOntologyBindingSchema),
|
|
13970
14034
|
queryBindings: z14.array(QueryBindingSchema).default([]),
|
|
13971
14035
|
actionBindings: z14.array(ActionBindingSchema),
|
|
13972
14036
|
pageAccessPolicy: AccessPolicySchema,
|
|
@@ -14021,6 +14085,15 @@ var PageRuntimeBundleSchema = z14.object({
|
|
|
14021
14085
|
var ResolvedWorkbenchAppInstanceSchema = WorkbenchAppInstanceSchema.extend({
|
|
14022
14086
|
targetAccessPolicy: AccessPolicySchema
|
|
14023
14087
|
}).strict();
|
|
14088
|
+
var PageRuntimeBundleSchema = CompatiblePageRuntimeBundleSchema.safeExtend({
|
|
14089
|
+
shellDescriptor: DeclarativeRuntimeShellDescriptorSchema,
|
|
14090
|
+
ontologyBindings: z14.array(OntologyBindingSchema)
|
|
14091
|
+
});
|
|
14092
|
+
var LegacyPageRuntimeBundleSchema = CompatiblePageRuntimeBundleSchema.safeExtend({
|
|
14093
|
+
shellDescriptor: z14.never().optional(),
|
|
14094
|
+
ontologyBindings: z14.array(LegacyOntologyBindingSchema)
|
|
14095
|
+
});
|
|
14096
|
+
var ReadablePageRuntimeBundleSchema = z14.union([PageRuntimeBundleSchema, LegacyPageRuntimeBundleSchema]);
|
|
14024
14097
|
var WorkbenchRuntimeIdentitySchema = z14.object({
|
|
14025
14098
|
name: I18nTextSchema,
|
|
14026
14099
|
description: I18nTextSchema.optional()
|
|
@@ -14833,6 +14906,7 @@ var OntologyViewDefinitionSchema = z17.object({
|
|
|
14833
14906
|
renderModelSchemaRevisionRef: ExactRefKindSchema("schema"),
|
|
14834
14907
|
requiredPermissionCodes: z17.array(ContractIdentifierSchema).default([])
|
|
14835
14908
|
}).strict();
|
|
14909
|
+
var LegacyOntologyViewDefinitionSchema = OntologyViewDefinitionSchema.omit({ canonicalDataViewRevisionRef: true });
|
|
14836
14910
|
var ConceptRelationshipSchema = z17.object({
|
|
14837
14911
|
kind: ContractIdentifierSchema,
|
|
14838
14912
|
targetConceptId: ContractIdentifierSchema,
|
|
@@ -15150,6 +15224,7 @@ var DeclarativeRuntimeActionExecuteIntentSchema = DeclarativeRuntimePageTargetSc
|
|
|
15150
15224
|
routePath: DeclarativeRuntimeActionRoutePathSchema.optional(),
|
|
15151
15225
|
idempotencyKey: z18.string().trim().min(1).max(256)
|
|
15152
15226
|
}).strict();
|
|
15227
|
+
var LegacyDeclarativeRuntimeActionExecuteIntentSchema = DeclarativeRuntimeActionExecuteIntentSchema.safeExtend({ pageState: DeclarativeRuntimeParametersSchema.default({}) });
|
|
15153
15228
|
var DeclarativeNativeDownloadSchema = z18.object({
|
|
15154
15229
|
url: z18.string().min(1).max(32768).refine((value) => {
|
|
15155
15230
|
try {
|
|
@@ -15537,7 +15612,12 @@ var DeclarativeCreateTemplateRegistrationSchema = z18.object({
|
|
|
15537
15612
|
description: I18nTextSchema,
|
|
15538
15613
|
supportedSurfaces: z18.array(ProductSurfaceSchema).min(1),
|
|
15539
15614
|
legacyMigrationSourcePageIds: z18.array(ContractIdentifierSchema).min(1).max(256).optional(),
|
|
15540
|
-
document: z18.union([
|
|
15615
|
+
document: z18.union([
|
|
15616
|
+
PageSchema,
|
|
15617
|
+
ResolvedPageSchema,
|
|
15618
|
+
NavigationSchema,
|
|
15619
|
+
WorkbenchSchema
|
|
15620
|
+
]),
|
|
15541
15621
|
sourceContentHash: Sha256Schema
|
|
15542
15622
|
}).strict().superRefine((value, context) => {
|
|
15543
15623
|
const expected = value.document.contract === "Page" ? "page" : value.document.contract === "Navigation" ? "navigation" : "workbench";
|
|
@@ -16033,6 +16113,7 @@ var DeclarativeCreateIntentSchema = z18.object({
|
|
|
16033
16113
|
});
|
|
16034
16114
|
var DeclarativeDocumentSchema = z18.union([
|
|
16035
16115
|
PageSchema,
|
|
16116
|
+
ResolvedPageSchema,
|
|
16036
16117
|
NavigationSchema,
|
|
16037
16118
|
WorkbenchSchema
|
|
16038
16119
|
]);
|
|
@@ -16339,7 +16420,7 @@ var DeclarativePreviewResultSchema = z18.object({
|
|
|
16339
16420
|
revision: z18.number().int().positive(),
|
|
16340
16421
|
contentHash: Sha256Schema,
|
|
16341
16422
|
bundle: z18.union([
|
|
16342
|
-
|
|
16423
|
+
ReadablePageRuntimeBundleSchema,
|
|
16343
16424
|
NavigationRuntimeBundleSchema,
|
|
16344
16425
|
WorkbenchRuntimeBundleSchema
|
|
16345
16426
|
]),
|
|
@@ -16356,7 +16437,7 @@ var DeclarativePublicationItemResultSchema = z18.object({
|
|
|
16356
16437
|
WorkbenchReleaseSchema
|
|
16357
16438
|
]),
|
|
16358
16439
|
bundle: z18.union([
|
|
16359
|
-
|
|
16440
|
+
ReadablePageRuntimeBundleSchema,
|
|
16360
16441
|
NavigationRuntimeBundleSchema,
|
|
16361
16442
|
WorkbenchRuntimeBundleSchema
|
|
16362
16443
|
]).optional()
|
|
@@ -16628,7 +16709,7 @@ var DeclarativeRuntimeResolvedSchema = z18.object({
|
|
|
16628
16709
|
surface: ProductSurfaceSchema,
|
|
16629
16710
|
normalizedPath: z18.string().trim().min(1),
|
|
16630
16711
|
routeParameters: z18.record(ContractIdentifierSchema, z18.string()),
|
|
16631
|
-
page:
|
|
16712
|
+
page: ReadablePageRuntimeBundleSchema.optional(),
|
|
16632
16713
|
workbench: WorkbenchRuntimeBundleSchema.optional(),
|
|
16633
16714
|
redirect: DeclarativeRuntimeRedirectSchema.optional(),
|
|
16634
16715
|
navigation: NavigationRuntimeBundleSchema.optional(),
|
|
@@ -22734,11 +22815,19 @@ var pageDependencies = (page, compilerRevisionRef) => [
|
|
|
22734
22815
|
role: "ontology-definition",
|
|
22735
22816
|
revisionRef: binding.ontologyDefinitionRevisionRef
|
|
22736
22817
|
},
|
|
22737
|
-
{ role: "view", revisionRef: binding.viewRevisionRef },
|
|
22738
|
-
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22818
|
+
...binding.viewRevisionRef ? [{ role: "view", revisionRef: binding.viewRevisionRef }] : [],
|
|
22819
|
+
..."projectionRevisionRef" in binding && binding.projectionRevisionRef ? [
|
|
22820
|
+
{
|
|
22821
|
+
role: "projection-spec",
|
|
22822
|
+
revisionRef: binding.projectionRevisionRef
|
|
22823
|
+
}
|
|
22824
|
+
] : [],
|
|
22825
|
+
...binding.canonicalDataViewRevisionRef ? [
|
|
22826
|
+
{
|
|
22827
|
+
role: "view",
|
|
22828
|
+
revisionRef: binding.canonicalDataViewRevisionRef
|
|
22829
|
+
}
|
|
22830
|
+
] : [],
|
|
22742
22831
|
{
|
|
22743
22832
|
role: "schema",
|
|
22744
22833
|
revisionRef: binding.renderModelSchemaRevisionRef
|
|
@@ -23312,8 +23401,30 @@ var resolvePage = (input) => {
|
|
|
23312
23401
|
};
|
|
23313
23402
|
return ResolvedPageSchema.parse(resolved);
|
|
23314
23403
|
};
|
|
23315
|
-
var
|
|
23404
|
+
var compileLegacyPageRuntimeBundle = (input) => deepFreeze(
|
|
23405
|
+
LegacyPageRuntimeBundleSchema.parse(
|
|
23406
|
+
compilePageRuntimeBundleInternal(input, true)
|
|
23407
|
+
)
|
|
23408
|
+
);
|
|
23409
|
+
var compilePageRuntimeBundle = (input) => deepFreeze(
|
|
23410
|
+
PageRuntimeBundleSchema.parse(
|
|
23411
|
+
compilePageRuntimeBundleInternal(input, false)
|
|
23412
|
+
)
|
|
23413
|
+
);
|
|
23414
|
+
var compilePageRuntimeBundleInternal = (input, legacy) => {
|
|
23316
23415
|
const parsedPage = ResolvedPageSchema.parse(input.page);
|
|
23416
|
+
parsedPage.ontologyBindings.forEach(
|
|
23417
|
+
(binding) => (legacy ? LegacyOntologyBindingSchema : OntologyBindingSchema).parse(
|
|
23418
|
+
binding
|
|
23419
|
+
)
|
|
23420
|
+
);
|
|
23421
|
+
if (legacy && (parsedPage.queryBindings?.length || input.domainQueryRegistry?.length)) {
|
|
23422
|
+
throw new DeclarativeControlCompilationError(
|
|
23423
|
+
"QUERY_DEFINITION_MISMATCH",
|
|
23424
|
+
"queryBindings",
|
|
23425
|
+
"Domain queries require the current compiler and its governed registries."
|
|
23426
|
+
);
|
|
23427
|
+
}
|
|
23317
23428
|
const page = {
|
|
23318
23429
|
...parsedPage,
|
|
23319
23430
|
routeStatePresentations: parsedPage.routeStatePresentations ?? [],
|
|
@@ -23456,43 +23567,45 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
23456
23567
|
domainQueryDependencies(definition)
|
|
23457
23568
|
);
|
|
23458
23569
|
});
|
|
23459
|
-
const
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
if (shellRegistration.resourceKind !== "shell" || !sameRevisionRef(
|
|
23463
|
-
shellRegistration.resourceRevisionRef,
|
|
23464
|
-
page.shellRevisionRef
|
|
23465
|
-
) || declarativeProductResourceRevisionHash(shellRegistration) !== shellRegistration.resourceRevisionRef.contentHash || declarativeProductResourceSourceHash(shellRegistration.document) !== shellRegistration.sourceContentHash) {
|
|
23466
|
-
throw new DeclarativeControlCompilationError(
|
|
23467
|
-
"SHELL_REVISION_MISMATCH",
|
|
23468
|
-
"shellRegistration",
|
|
23469
|
-
"The active Shell registration does not match the Page exact Shell revision."
|
|
23570
|
+
const shellDescriptor = legacy ? void 0 : (() => {
|
|
23571
|
+
const shellRegistration = DeclarativeProductResourceRegistrationSchema.parse(
|
|
23572
|
+
input.shellRegistration
|
|
23470
23573
|
);
|
|
23471
|
-
|
|
23472
|
-
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23574
|
+
if (shellRegistration.resourceKind !== "shell" || !sameRevisionRef(
|
|
23575
|
+
shellRegistration.resourceRevisionRef,
|
|
23576
|
+
page.shellRevisionRef
|
|
23577
|
+
) || declarativeProductResourceRevisionHash(shellRegistration) !== shellRegistration.resourceRevisionRef.contentHash || declarativeProductResourceSourceHash(shellRegistration.document) !== shellRegistration.sourceContentHash) {
|
|
23578
|
+
throw new DeclarativeControlCompilationError(
|
|
23579
|
+
"SHELL_REVISION_MISMATCH",
|
|
23580
|
+
"shellRegistration",
|
|
23581
|
+
"The active Shell registration does not match the Page exact Shell revision."
|
|
23582
|
+
);
|
|
23583
|
+
}
|
|
23584
|
+
if (!shellRegistration.supportedSurfaces.includes(release.target.surface)) {
|
|
23585
|
+
throw new DeclarativeControlCompilationError(
|
|
23586
|
+
"SHELL_SURFACE_MISMATCH",
|
|
23587
|
+
"shellRegistration.supportedSurfaces",
|
|
23588
|
+
"The active Shell registration does not support the release surface."
|
|
23589
|
+
);
|
|
23590
|
+
}
|
|
23591
|
+
const shellDocument = DeclarativeShellResourceDocumentSchema.parse(
|
|
23592
|
+
shellRegistration.document
|
|
23477
23593
|
);
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
shellRegistration.document
|
|
23481
|
-
);
|
|
23482
|
-
const shellChrome = shellDocument.surfaceChrome.find(
|
|
23483
|
-
(entry) => entry.surface === release.target.surface
|
|
23484
|
-
);
|
|
23485
|
-
if (!shellChrome) {
|
|
23486
|
-
throw new DeclarativeControlCompilationError(
|
|
23487
|
-
"SHELL_CHROME_UNAVAILABLE",
|
|
23488
|
-
"shellRegistration.document.surfaceChrome",
|
|
23489
|
-
"The active Shell does not declare chrome for the release surface."
|
|
23594
|
+
const shellChrome = shellDocument.surfaceChrome.find(
|
|
23595
|
+
(entry) => entry.surface === release.target.surface
|
|
23490
23596
|
);
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23597
|
+
if (!shellChrome) {
|
|
23598
|
+
throw new DeclarativeControlCompilationError(
|
|
23599
|
+
"SHELL_CHROME_UNAVAILABLE",
|
|
23600
|
+
"shellRegistration.document.surfaceChrome",
|
|
23601
|
+
"The active Shell does not declare chrome for the release surface."
|
|
23602
|
+
);
|
|
23603
|
+
}
|
|
23604
|
+
return {
|
|
23605
|
+
shellRevisionRef: page.shellRevisionRef,
|
|
23606
|
+
header: shellChrome.header
|
|
23607
|
+
};
|
|
23608
|
+
})();
|
|
23496
23609
|
if (page.renderTree.nodes.length > input.limits.maxRenderNodes)
|
|
23497
23610
|
throw new DeclarativeControlCompilationError(
|
|
23498
23611
|
"RENDER_NODE_LIMIT_EXCEEDED",
|
|
@@ -23591,23 +23704,23 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
23591
23704
|
"Page requests undeclared provider side effects."
|
|
23592
23705
|
);
|
|
23593
23706
|
}
|
|
23594
|
-
if (!sameRevisionRef(
|
|
23707
|
+
if (!legacy && (!registration.propertySchemaRevisionRef || !sameRevisionRef(
|
|
23595
23708
|
instance.propertySchemaRevisionRef,
|
|
23596
23709
|
registration.propertySchemaRevisionRef
|
|
23597
|
-
)) {
|
|
23710
|
+
))) {
|
|
23598
23711
|
throw new DeclarativeControlCompilationError(
|
|
23599
23712
|
"CAPABILITY_BINDING_MISMATCH",
|
|
23600
23713
|
`capabilityInstances[${index}].propertySchemaRevisionRef`,
|
|
23601
23714
|
"Capability properties do not pin the exact schema registered by the active Design catalog."
|
|
23602
23715
|
);
|
|
23603
23716
|
}
|
|
23604
|
-
if (!accessPolicyChainImplies(
|
|
23717
|
+
if (!legacy && (!registration.accessPolicy || !accessPolicyChainImplies(
|
|
23605
23718
|
[
|
|
23606
23719
|
page.pageAccessPolicy,
|
|
23607
23720
|
...instance.accessPolicy ? [instance.accessPolicy] : []
|
|
23608
23721
|
],
|
|
23609
23722
|
registration.accessPolicy
|
|
23610
|
-
)) {
|
|
23723
|
+
))) {
|
|
23611
23724
|
throw new DeclarativeControlCompilationError(
|
|
23612
23725
|
"AUDIENCE_WIDER_THAN_TARGET",
|
|
23613
23726
|
`capabilityInstances[${index}]`,
|
|
@@ -23937,7 +24050,7 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
23937
24050
|
(presentation) => presentation.surface === release.target.surface
|
|
23938
24051
|
),
|
|
23939
24052
|
shellRevisionRef: page.shellRevisionRef,
|
|
23940
|
-
shellDescriptor,
|
|
24053
|
+
...shellDescriptor ? { shellDescriptor } : {},
|
|
23941
24054
|
renderTree,
|
|
23942
24055
|
capabilityInstances: page.capabilityInstances,
|
|
23943
24056
|
deniedCapabilityInstanceIds: [],
|
|
@@ -23953,12 +24066,7 @@ var compilePageRuntimeBundle = (input) => {
|
|
|
23953
24066
|
observationPolicyRevisionRef: page.observationPolicyRevisionRef,
|
|
23954
24067
|
privacyClassification: page.privacyClassification
|
|
23955
24068
|
};
|
|
23956
|
-
return
|
|
23957
|
-
PageRuntimeBundleSchema.parse({
|
|
23958
|
-
...unsigned,
|
|
23959
|
-
contentHash: canonicalContentHash(unsigned)
|
|
23960
|
-
})
|
|
23961
|
-
);
|
|
24069
|
+
return { ...unsigned, contentHash: canonicalContentHash(unsigned) };
|
|
23962
24070
|
};
|
|
23963
24071
|
var workbenchDependencyRole = (kind) => {
|
|
23964
24072
|
switch (kind) {
|
|
@@ -26157,7 +26265,7 @@ var readPageValue = (value, path) => {
|
|
|
26157
26265
|
}
|
|
26158
26266
|
return current;
|
|
26159
26267
|
};
|
|
26160
|
-
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim"]);
|
|
26268
|
+
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim", "encode-uri-component"]);
|
|
26161
26269
|
var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
|
|
26162
26270
|
var compilePageExpression = (input) => {
|
|
26163
26271
|
assertBudget(input);
|
|
@@ -26325,6 +26433,14 @@ var evaluateCompiled = (expression, context, budget) => {
|
|
|
26325
26433
|
}
|
|
26326
26434
|
case "trim":
|
|
26327
26435
|
return typeof first === "string" ? first.trim() : fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
26436
|
+
case "encode-uri-component": {
|
|
26437
|
+
if (typeof first !== "string") return fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
26438
|
+
try {
|
|
26439
|
+
return encodeURIComponent(first);
|
|
26440
|
+
} catch {
|
|
26441
|
+
return fail("PAGE_EXPRESSION_INVALID_UNICODE");
|
|
26442
|
+
}
|
|
26443
|
+
}
|
|
26328
26444
|
case "number-format": {
|
|
26329
26445
|
if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
|
|
26330
26446
|
const minimumFractionDigits = number(values[2]);
|
|
@@ -26839,6 +26955,10 @@ export {
|
|
|
26839
26955
|
JsonValueSchema,
|
|
26840
26956
|
LEGACY_CURRENT_USER_MENU_ITEM_IDS,
|
|
26841
26957
|
LegacyBrowserPreferenceImportSchema,
|
|
26958
|
+
LegacyDeclarativeRuntimeActionExecuteIntentSchema,
|
|
26959
|
+
LegacyOntologyBindingSchema,
|
|
26960
|
+
LegacyOntologyViewDefinitionSchema,
|
|
26961
|
+
LegacyPageRuntimeBundleSchema,
|
|
26842
26962
|
LegacyRouteClaimSchema,
|
|
26843
26963
|
LegacyRoutePolicySchema,
|
|
26844
26964
|
LegacyRouteTakeoverAuthorizationSchema,
|
|
@@ -26945,6 +27065,7 @@ export {
|
|
|
26945
27065
|
PermissionAlternativePolicySchema,
|
|
26946
27066
|
PermissionBundleSchema,
|
|
26947
27067
|
PermissionDefinitionSchema,
|
|
27068
|
+
PersistedOntologyBindingSchema,
|
|
26948
27069
|
ProductAccessDeclarationSchema,
|
|
26949
27070
|
ProductBodySchema,
|
|
26950
27071
|
ProductContextSchema,
|
|
@@ -26972,6 +27093,7 @@ export {
|
|
|
26972
27093
|
RadarScoreProjectionSchema,
|
|
26973
27094
|
RadarSelectionSchema,
|
|
26974
27095
|
RadarWritebackRecordSchema,
|
|
27096
|
+
ReadablePageRuntimeBundleSchema,
|
|
26975
27097
|
RecordEditorDraftOperationSchema,
|
|
26976
27098
|
RecordEditorDraftSchema,
|
|
26977
27099
|
RecordEditorFieldErrorSchema,
|
|
@@ -27121,6 +27243,7 @@ export {
|
|
|
27121
27243
|
compileDeclarativeRouteOwnerIndex,
|
|
27122
27244
|
compileDeclarativeWorkbenchCatalog,
|
|
27123
27245
|
compileDesignCapabilityCatalogArtifact,
|
|
27246
|
+
compileLegacyPageRuntimeBundle,
|
|
27124
27247
|
compileLegacyRouteTakeoverAuthorization,
|
|
27125
27248
|
compileMenuRuntimeBundle,
|
|
27126
27249
|
compileNavigationRuntimeBundle,
|