@inf-monkeys-tech/monkeys 1.1.23 → 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/esm/index.mjs +42 -0
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +42 -0
- package/lib/esm/runtime/index.mjs.map +1 -1
- 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/package.json +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -26722,6 +26722,39 @@ var schemasCannotOverlap = (left, right) => {
|
|
|
26722
26722
|
const property = (schema2, key) => schema2.properties?.[key] ?? (schema2.patternProperties ? true : schema2.additionalProperties ?? true);
|
|
26723
26723
|
return [...a.required ?? [], ...b.required ?? []].some((key) => schemasCannotOverlap(property(a, key), property(b, key)));
|
|
26724
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");
|
|
26725
26758
|
var acceptsPreviousSchema = (previous, next) => {
|
|
26726
26759
|
if (canonicalContentHash(previous) === canonicalContentHash(next) || next === true) return true;
|
|
26727
26760
|
if (previous === false) return true;
|
|
@@ -26740,6 +26773,10 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
26740
26773
|
additionalProperties: oldAdditional,
|
|
26741
26774
|
enum: oldEnum,
|
|
26742
26775
|
items: oldItems,
|
|
26776
|
+
minimum: _oldMinimum,
|
|
26777
|
+
maximum: _oldMaximum,
|
|
26778
|
+
exclusiveMinimum: _oldExclusiveMinimum,
|
|
26779
|
+
exclusiveMaximum: _oldExclusiveMaximum,
|
|
26743
26780
|
...oldFixed
|
|
26744
26781
|
} = before;
|
|
26745
26782
|
const {
|
|
@@ -26748,9 +26785,14 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
26748
26785
|
additionalProperties: newAdditional,
|
|
26749
26786
|
enum: newEnum,
|
|
26750
26787
|
items: newItems,
|
|
26788
|
+
minimum: _newMinimum,
|
|
26789
|
+
maximum: _newMaximum,
|
|
26790
|
+
exclusiveMinimum: _newExclusiveMinimum,
|
|
26791
|
+
exclusiveMaximum: _newExclusiveMaximum,
|
|
26751
26792
|
...newFixed
|
|
26752
26793
|
} = after;
|
|
26753
26794
|
if (canonicalContentHash(oldFixed) !== canonicalContentHash(newFixed)) return false;
|
|
26795
|
+
if (!numericRangesAcceptPrevious(before, after)) return false;
|
|
26754
26796
|
if (!acceptsPreviousSchema(oldItems ?? true, newItems ?? true)) return false;
|
|
26755
26797
|
if (newEnum && (!oldEnum || oldEnum.some((value) => !newEnum.some((candidate) => canonicalContentHash(candidate) === canonicalContentHash(value))))) return false;
|
|
26756
26798
|
if ((newRequired ?? []).some((key) => !(oldRequired ?? []).includes(key))) return false;
|