@inf-monkeys-tech/monkeys 1.1.5 → 1.1.7
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/contracts/declarative-control-http.d.ts +251 -7451
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control-http.js +2 -102
- package/lib/contracts/declarative-control-http.js.map +1 -1
- package/lib/contracts/declarative-control.d.ts +12 -0
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +9 -0
- 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/esm/contracts/index.mjs +11 -83
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +20 -84
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +20 -74
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +11 -73
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/overlay-node.schema.json +2 -1
- package/lib/json-schema/page-runtime-bundle.schema.json +21 -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/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 +3 -0
- package/lib/schemas/index.d.ts.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(),
|
|
@@ -11381,6 +11382,9 @@ var QueryBindingSchema = z14.object({
|
|
|
11381
11382
|
).max(32).optional(),
|
|
11382
11383
|
queryWhen: PageStateActivationSchema.optional(),
|
|
11383
11384
|
accessFailure: z14.literal("render-forbidden").optional(),
|
|
11385
|
+
draftRetention: z14.object({
|
|
11386
|
+
identityParameters: z14.array(ContractIdentifierSchema).min(1).max(32)
|
|
11387
|
+
}).strict().optional(),
|
|
11384
11388
|
resultStateBindings: z14.array(QueryResultStateBindingSchema).max(32).optional(),
|
|
11385
11389
|
execution: z14.enum(["server", "local-state"]).default("server"),
|
|
11386
11390
|
pagination: z14.enum(["none", "cursor", "offset"]),
|
|
@@ -11392,6 +11396,12 @@ var QueryBindingSchema = z14.object({
|
|
|
11392
11396
|
when: PageExpressionSchema.optional()
|
|
11393
11397
|
}).strict().optional()
|
|
11394
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
|
+
}
|
|
11395
11405
|
if (value.targetProjection) {
|
|
11396
11406
|
if (value.targetProjection.schemaRevisionRef.kind !== "schema")
|
|
11397
11407
|
context.addIssue({
|
|
@@ -14997,11 +15007,6 @@ var DeclarativeAuthoringActionSchema = z18.enum([
|
|
|
14997
15007
|
"publish",
|
|
14998
15008
|
"rollback"
|
|
14999
15009
|
]);
|
|
15000
|
-
var DeclarativeLegacyMigrationKindSchema = z18.enum([
|
|
15001
|
-
"page",
|
|
15002
|
-
"page-data-assets",
|
|
15003
|
-
"workbench"
|
|
15004
|
-
]);
|
|
15005
15010
|
var encodePath = (value) => encodeURIComponent(value);
|
|
15006
15011
|
var declarativeControlRoutes = {
|
|
15007
15012
|
validate: (kind, resourceId) => `${DECLARATIVE_CONTROL_API_PREFIX}/resources/${kind}/${encodePath(resourceId)}/validate`,
|
|
@@ -15022,10 +15027,6 @@ var declarativeControlRoutes = {
|
|
|
15022
15027
|
navigationPlacements: () => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/navigation/placements`,
|
|
15023
15028
|
navigationImport: (placement) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/navigation/placements/${encodePath(placement)}/import`,
|
|
15024
15029
|
navigationSeedMigration: (placement) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/navigation/placements/${encodePath(placement)}/seed-migration`,
|
|
15025
|
-
migrationInspect: (kind, legacyResourceId) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/migrations/${kind}/${encodePath(legacyResourceId)}/inspect`,
|
|
15026
|
-
migrationCreateDraft: (kind, legacyResourceId) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/migrations/${kind}/${encodePath(legacyResourceId)}/draft`,
|
|
15027
|
-
migrationCutover: (kind, targetResourceId) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/resources/${kind === "workbench" ? "workbench" : "page"}/${encodePath(targetResourceId)}/publish`,
|
|
15028
|
-
migrationRollback: (kind, targetResourceId) => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/resources/${kind === "workbench" ? "workbench" : "page"}/${encodePath(targetResourceId)}/rollback`,
|
|
15029
15030
|
publicationPlan: () => `${DECLARATIVE_CONTROL_API_PREFIX}/authoring/publication-plans`,
|
|
15030
15031
|
runtimeResolve: () => `${DECLARATIVE_CONTROL_API_PREFIX}/runtime/resolve`,
|
|
15031
15032
|
runtimeNavigationBootstrap: () => `${DECLARATIVE_CONTROL_API_PREFIX}/runtime/navigations/bootstrap`,
|
|
@@ -16521,73 +16522,6 @@ var DeclarativePublicationResultSchema = z18.union([
|
|
|
16521
16522
|
DeclarativeDirectPublicationResultSchema,
|
|
16522
16523
|
DeclarativeAtomicPublicationPlanResultSchema
|
|
16523
16524
|
]);
|
|
16524
|
-
var DeclarativeMigrationDiffEntrySchema = z18.object({
|
|
16525
|
-
path: z18.string().trim().startsWith("/").max(1024),
|
|
16526
|
-
status: z18.enum(["added", "changed", "removed", "unchanged"]),
|
|
16527
|
-
legacyValueHash: Sha256Schema.optional(),
|
|
16528
|
-
declarativeValueHash: Sha256Schema.optional()
|
|
16529
|
-
}).strict();
|
|
16530
|
-
var DeclarativeMigrationBlockerSchema = z18.object({
|
|
16531
|
-
code: ContractIdentifierSchema,
|
|
16532
|
-
path: z18.string().trim().max(1024).optional(),
|
|
16533
|
-
message: z18.string().trim().min(1).max(4096)
|
|
16534
|
-
}).strict();
|
|
16535
|
-
var DeclarativeLegacyMigrationInspectionSchema = z18.object({
|
|
16536
|
-
contract: z18.literal("DeclarativeLegacyMigrationInspection"),
|
|
16537
|
-
schemaVersion: z18.literal(1),
|
|
16538
|
-
migrationKind: DeclarativeLegacyMigrationKindSchema,
|
|
16539
|
-
legacyResourceId: ContractIdentifierSchema,
|
|
16540
|
-
sourceRevisionRef: RevisionRefSchema,
|
|
16541
|
-
sourceContentHash: Sha256Schema,
|
|
16542
|
-
legacyAdapterRevisionRef: RevisionRefSchema,
|
|
16543
|
-
targetResourceRef: StableRefSchema,
|
|
16544
|
-
environmentRevisionRef: RevisionRefSchema,
|
|
16545
|
-
routeSpaceRevisionRef: RevisionRefSchema,
|
|
16546
|
-
normalizedPath: z18.string().trim().startsWith("/").max(2048),
|
|
16547
|
-
takeoverAuthorization: LegacyRouteTakeoverAuthorizationSchema,
|
|
16548
|
-
diff: z18.array(DeclarativeMigrationDiffEntrySchema).max(256),
|
|
16549
|
-
blockers: z18.array(DeclarativeMigrationBlockerSchema).max(128),
|
|
16550
|
-
canCreateDraft: z18.boolean(),
|
|
16551
|
-
inspectionFingerprint: Sha256Schema
|
|
16552
|
-
}).strict().superRefine((value, context) => {
|
|
16553
|
-
const expectedKind = value.migrationKind === "workbench" ? "workbench" : "page";
|
|
16554
|
-
if (value.targetResourceRef.kind !== expectedKind) {
|
|
16555
|
-
context.addIssue({
|
|
16556
|
-
code: "custom",
|
|
16557
|
-
path: ["targetResourceRef", "kind"],
|
|
16558
|
-
message: `A ${value.migrationKind} migration must target ${expectedKind}.`
|
|
16559
|
-
});
|
|
16560
|
-
}
|
|
16561
|
-
if (value.takeoverAuthorization.inspectedSourceContentHash !== value.sourceContentHash || value.takeoverAuthorization.normalizedPath !== value.normalizedPath || value.takeoverAuthorization.targetResourceRef.kind !== value.targetResourceRef.kind || value.takeoverAuthorization.targetResourceRef.id !== value.targetResourceRef.id || value.takeoverAuthorization.targetResourceRef.ownerRepo !== value.targetResourceRef.ownerRepo) {
|
|
16562
|
-
context.addIssue({
|
|
16563
|
-
code: "custom",
|
|
16564
|
-
path: ["takeoverAuthorization"],
|
|
16565
|
-
message: "The takeover authority must bind the exact inspected source, path and target."
|
|
16566
|
-
});
|
|
16567
|
-
}
|
|
16568
|
-
if (value.canCreateDraft !== (value.blockers.length === 0)) {
|
|
16569
|
-
context.addIssue({
|
|
16570
|
-
code: "custom",
|
|
16571
|
-
path: ["canCreateDraft"],
|
|
16572
|
-
message: "Draft creation is allowed exactly when inspection has no blockers."
|
|
16573
|
-
});
|
|
16574
|
-
}
|
|
16575
|
-
});
|
|
16576
|
-
var DeclarativeLegacyMigrationCreateDraftIntentSchema = z18.object({
|
|
16577
|
-
inspectionFingerprint: Sha256Schema,
|
|
16578
|
-
expectedSourceRevisionRef: RevisionRefSchema,
|
|
16579
|
-
expectedSourceContentHash: Sha256Schema,
|
|
16580
|
-
idempotencyKey: z18.string().trim().min(1).max(256)
|
|
16581
|
-
}).strict();
|
|
16582
|
-
var DeclarativeLegacyMigrationCreateDraftResultSchema = z18.object({
|
|
16583
|
-
migrationKind: DeclarativeLegacyMigrationKindSchema,
|
|
16584
|
-
legacyResourceId: ContractIdentifierSchema,
|
|
16585
|
-
inspectionFingerprint: Sha256Schema,
|
|
16586
|
-
sourceRevisionRef: RevisionRefSchema,
|
|
16587
|
-
sourceContentHash: Sha256Schema,
|
|
16588
|
-
takeoverAuthorization: LegacyRouteTakeoverAuthorizationSchema,
|
|
16589
|
-
draft: DeclarativeDraftResultSchema
|
|
16590
|
-
}).strict();
|
|
16591
16525
|
var DECLARATIVE_MIGRATION_ERROR_CODES = {
|
|
16592
16526
|
sourceChanged: "DECLARATIVE_LEGACY_SOURCE_CHANGED",
|
|
16593
16527
|
reservedTakeoverForbidden: "DECLARATIVE_RESERVED_ROUTE_TAKEOVER_FORBIDDEN",
|
|
@@ -26255,7 +26189,7 @@ var readPageValue = (value, path) => {
|
|
|
26255
26189
|
}
|
|
26256
26190
|
return current;
|
|
26257
26191
|
};
|
|
26258
|
-
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim"]);
|
|
26192
|
+
var unary = /* @__PURE__ */ new Set(["not", "string", "number", "length", "round", "entries", "from-entries", "trim", "encode-uri-component"]);
|
|
26259
26193
|
var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
|
|
26260
26194
|
var compilePageExpression = (input) => {
|
|
26261
26195
|
assertBudget(input);
|
|
@@ -26423,6 +26357,14 @@ var evaluateCompiled = (expression, context, budget) => {
|
|
|
26423
26357
|
}
|
|
26424
26358
|
case "trim":
|
|
26425
26359
|
return typeof first === "string" ? first.trim() : fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
26360
|
+
case "encode-uri-component": {
|
|
26361
|
+
if (typeof first !== "string") return fail("PAGE_EXPRESSION_TYPE_STRING");
|
|
26362
|
+
try {
|
|
26363
|
+
return encodeURIComponent(first);
|
|
26364
|
+
} catch {
|
|
26365
|
+
return fail("PAGE_EXPRESSION_INVALID_UNICODE");
|
|
26366
|
+
}
|
|
26367
|
+
}
|
|
26426
26368
|
case "number-format": {
|
|
26427
26369
|
if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
|
|
26428
26370
|
const minimumFractionDigits = number(values[2]);
|
|
@@ -26841,14 +26783,8 @@ export {
|
|
|
26841
26783
|
DeclarativeEnvironmentResourceDocumentSchema,
|
|
26842
26784
|
DeclarativeErrorEnvelopeSchema,
|
|
26843
26785
|
DeclarativeLayoutPolicyResourceDocumentSchema,
|
|
26844
|
-
DeclarativeLegacyMigrationCreateDraftIntentSchema,
|
|
26845
|
-
DeclarativeLegacyMigrationCreateDraftResultSchema,
|
|
26846
|
-
DeclarativeLegacyMigrationInspectionSchema,
|
|
26847
|
-
DeclarativeLegacyMigrationKindSchema,
|
|
26848
26786
|
DeclarativeLegacyWorkbenchSummarySchema,
|
|
26849
26787
|
DeclarativeLifecycleSchema,
|
|
26850
|
-
DeclarativeMigrationBlockerSchema,
|
|
26851
|
-
DeclarativeMigrationDiffEntrySchema,
|
|
26852
26788
|
DeclarativeNativeDownloadSchema,
|
|
26853
26789
|
DeclarativeNavigationImportIntentSchema,
|
|
26854
26790
|
DeclarativeNavigationImportResultSchema,
|