@inf-monkeys-tech/monkeys 1.1.22 → 1.1.24
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 +78 -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 +23 -2
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/declarative-publication-job.d.ts +24 -0
- package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
- package/lib/esm/contracts/index.mjs +15 -0
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +57 -0
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +57 -0
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +15 -0
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/page-runtime-bundle.schema.json +18 -0
- package/lib/json-schema/page.schema.json +18 -0
- package/lib/runtime/declarative-runtime-contract.d.ts +1 -1
- package/lib/runtime/declarative-runtime-contract.d.ts.map +1 -1
- package/lib/runtime/declarative-runtime-contract.js +50 -3
- package/lib/runtime/declarative-runtime-contract.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
|
@@ -11452,6 +11452,9 @@ var QueryBindingSchema = z16.object({
|
|
|
11452
11452
|
draftRetention: z16.object({
|
|
11453
11453
|
identityParameters: z16.array(ContractIdentifierSchema).min(1).max(32)
|
|
11454
11454
|
}).strict().optional(),
|
|
11455
|
+
queryRetention: z16.object({
|
|
11456
|
+
identityParameters: z16.array(ContractIdentifierSchema).max(32)
|
|
11457
|
+
}).strict().optional(),
|
|
11455
11458
|
resultStateBindings: z16.array(QueryResultStateBindingSchema).max(32).optional(),
|
|
11456
11459
|
execution: z16.enum(["server", "local-state"]).default("server"),
|
|
11457
11460
|
pagination: z16.enum(["none", "cursor", "offset"]),
|
|
@@ -11475,6 +11478,18 @@ var QueryBindingSchema = z16.object({
|
|
|
11475
11478
|
});
|
|
11476
11479
|
}
|
|
11477
11480
|
}
|
|
11481
|
+
if (value.queryRetention) {
|
|
11482
|
+
const names = value.queryRetention.identityParameters;
|
|
11483
|
+
if (value.execution !== "server" || new Set(names).size !== names.length || names.some(
|
|
11484
|
+
(name) => !Object.prototype.hasOwnProperty.call(value.parameters, name)
|
|
11485
|
+
)) {
|
|
11486
|
+
context.addIssue({
|
|
11487
|
+
code: "custom",
|
|
11488
|
+
path: ["queryRetention"],
|
|
11489
|
+
message: "Query retention requires distinct declared Server query identity parameters."
|
|
11490
|
+
});
|
|
11491
|
+
}
|
|
11492
|
+
}
|
|
11478
11493
|
if (value.targetProjection) {
|
|
11479
11494
|
if (value.targetProjection.schemaRevisionRef.kind !== "schema")
|
|
11480
11495
|
context.addIssue({
|
|
@@ -26707,6 +26722,39 @@ var schemasCannotOverlap = (left, right) => {
|
|
|
26707
26722
|
const property = (schema2, key) => schema2.properties?.[key] ?? (schema2.patternProperties ? true : schema2.additionalProperties ?? true);
|
|
26708
26723
|
return [...a.required ?? [], ...b.required ?? []].some((key) => schemasCannotOverlap(property(a, key), property(b, key)));
|
|
26709
26724
|
};
|
|
26725
|
+
var numericBound = (schema2, direction) => {
|
|
26726
|
+
const inclusiveKey = direction === "lower" ? "minimum" : "maximum";
|
|
26727
|
+
const exclusiveKey = direction === "lower" ? "exclusiveMinimum" : "exclusiveMaximum";
|
|
26728
|
+
const inclusiveValue = schema2[inclusiveKey];
|
|
26729
|
+
const exclusiveValue = schema2[exclusiveKey];
|
|
26730
|
+
const candidates = [];
|
|
26731
|
+
if (inclusiveValue !== void 0) {
|
|
26732
|
+
if (typeof inclusiveValue !== "number" || !Number.isFinite(inclusiveValue)) return null;
|
|
26733
|
+
candidates.push({ value: inclusiveValue, inclusive: true });
|
|
26734
|
+
}
|
|
26735
|
+
if (typeof exclusiveValue === "number") {
|
|
26736
|
+
if (!Number.isFinite(exclusiveValue)) return null;
|
|
26737
|
+
candidates.push({ value: exclusiveValue, inclusive: false });
|
|
26738
|
+
} else if (exclusiveValue === true) {
|
|
26739
|
+
if (typeof inclusiveValue !== "number" || !Number.isFinite(inclusiveValue)) return null;
|
|
26740
|
+
candidates.push({ value: inclusiveValue, inclusive: false });
|
|
26741
|
+
} else if (exclusiveValue !== void 0 && exclusiveValue !== false) {
|
|
26742
|
+
return null;
|
|
26743
|
+
}
|
|
26744
|
+
if (!candidates.length) return void 0;
|
|
26745
|
+
const compare = direction === "lower" ? Math.max : Math.min;
|
|
26746
|
+
const value = compare(...candidates.map((candidate) => candidate.value));
|
|
26747
|
+
return { value, inclusive: candidates.filter((candidate) => candidate.value === value).every((candidate) => candidate.inclusive) };
|
|
26748
|
+
};
|
|
26749
|
+
var boundAcceptsPrevious = (previous, next, direction) => {
|
|
26750
|
+
if (previous === null || next === null) return false;
|
|
26751
|
+
if (!next) return true;
|
|
26752
|
+
if (!previous) return false;
|
|
26753
|
+
if (direction === "lower" && previous.value < next.value) return false;
|
|
26754
|
+
if (direction === "upper" && previous.value > next.value) return false;
|
|
26755
|
+
return previous.value !== next.value || !previous.inclusive || next.inclusive;
|
|
26756
|
+
};
|
|
26757
|
+
var numericRangesAcceptPrevious = (previous, next) => boundAcceptsPrevious(numericBound(previous, "lower"), numericBound(next, "lower"), "lower") && boundAcceptsPrevious(numericBound(previous, "upper"), numericBound(next, "upper"), "upper");
|
|
26710
26758
|
var acceptsPreviousSchema = (previous, next) => {
|
|
26711
26759
|
if (canonicalContentHash(previous) === canonicalContentHash(next) || next === true) return true;
|
|
26712
26760
|
if (previous === false) return true;
|
|
@@ -26725,6 +26773,10 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
26725
26773
|
additionalProperties: oldAdditional,
|
|
26726
26774
|
enum: oldEnum,
|
|
26727
26775
|
items: oldItems,
|
|
26776
|
+
minimum: _oldMinimum,
|
|
26777
|
+
maximum: _oldMaximum,
|
|
26778
|
+
exclusiveMinimum: _oldExclusiveMinimum,
|
|
26779
|
+
exclusiveMaximum: _oldExclusiveMaximum,
|
|
26728
26780
|
...oldFixed
|
|
26729
26781
|
} = before;
|
|
26730
26782
|
const {
|
|
@@ -26733,9 +26785,14 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
26733
26785
|
additionalProperties: newAdditional,
|
|
26734
26786
|
enum: newEnum,
|
|
26735
26787
|
items: newItems,
|
|
26788
|
+
minimum: _newMinimum,
|
|
26789
|
+
maximum: _newMaximum,
|
|
26790
|
+
exclusiveMinimum: _newExclusiveMinimum,
|
|
26791
|
+
exclusiveMaximum: _newExclusiveMaximum,
|
|
26736
26792
|
...newFixed
|
|
26737
26793
|
} = after;
|
|
26738
26794
|
if (canonicalContentHash(oldFixed) !== canonicalContentHash(newFixed)) return false;
|
|
26795
|
+
if (!numericRangesAcceptPrevious(before, after)) return false;
|
|
26739
26796
|
if (!acceptsPreviousSchema(oldItems ?? true, newItems ?? true)) return false;
|
|
26740
26797
|
if (newEnum && (!oldEnum || oldEnum.some((value) => !newEnum.some((candidate) => canonicalContentHash(candidate) === canonicalContentHash(value))))) return false;
|
|
26741
26798
|
if ((newRequired ?? []).some((key) => !(oldRequired ?? []).includes(key))) return false;
|