@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.
@@ -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(),
@@ -12142,6 +12143,9 @@ var QueryBindingSchema = z12.object({
12142
12143
  ).max(32).optional(),
12143
12144
  queryWhen: PageStateActivationSchema.optional(),
12144
12145
  accessFailure: z12.literal("render-forbidden").optional(),
12146
+ draftRetention: z12.object({
12147
+ identityParameters: z12.array(ContractIdentifierSchema).min(1).max(32)
12148
+ }).strict().optional(),
12145
12149
  resultStateBindings: z12.array(QueryResultStateBindingSchema).max(32).optional(),
12146
12150
  execution: z12.enum(["server", "local-state"]).default("server"),
12147
12151
  pagination: z12.enum(["none", "cursor", "offset"]),
@@ -12153,6 +12157,12 @@ var QueryBindingSchema = z12.object({
12153
12157
  when: PageExpressionSchema.optional()
12154
12158
  }).strict().optional()
12155
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
+ }
12156
12166
  if (value.targetProjection) {
12157
12167
  if (value.targetProjection.schemaRevisionRef.kind !== "schema")
12158
12168
  context.addIssue({
@@ -25078,7 +25088,7 @@ var readPageValue = (value, path) => {
25078
25088
  }
25079
25089
  return current;
25080
25090
  };
25081
- 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"]);
25082
25092
  var binary = /* @__PURE__ */ new Set(["subtract", "divide", "equals", "not-equals", "less-than", "less-or-equal", "greater-than", "greater-or-equal", "includes", "get", "fixed"]);
25083
25093
  var compilePageExpression = (input) => {
25084
25094
  assertBudget(input);
@@ -25246,6 +25256,14 @@ var evaluateCompiled = (expression, context, budget) => {
25246
25256
  }
25247
25257
  case "trim":
25248
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
+ }
25249
25267
  case "number-format": {
25250
25268
  if (second !== "en-US" && second !== "zh-CN") return fail("PAGE_EXPRESSION_LOCALE");
25251
25269
  const minimumFractionDigits = number(values[2]);