@inf-monkeys-tech/monkeys 1.1.5 → 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/lib/contracts/declarative-control-http.d.ts +81 -0
- package/lib/contracts/declarative-control-http.d.ts.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 -1
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +20 -2
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +20 -2
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +11 -1
- 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({
|
|
@@ -26255,7 +26265,7 @@ var readPageValue = (value, path) => {
|
|
|
26255
26265
|
}
|
|
26256
26266
|
return current;
|
|
26257
26267
|
};
|
|
26258
|
-
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"]);
|
|
26259
26269
|
var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
|
|
26260
26270
|
var compilePageExpression = (input) => {
|
|
26261
26271
|
assertBudget(input);
|
|
@@ -26423,6 +26433,14 @@ var evaluateCompiled = (expression, context, budget) => {
|
|
|
26423
26433
|
}
|
|
26424
26434
|
case "trim":
|
|
26425
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
|
+
}
|
|
26426
26444
|
case "number-format": {
|
|
26427
26445
|
if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
|
|
26428
26446
|
const minimumFractionDigits = number(values[2]);
|