@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
|
@@ -25179,6 +25179,39 @@ var schemasCannotOverlap = (left, right) => {
|
|
|
25179
25179
|
const property = (schema2, key) => schema2.properties?.[key] ?? (schema2.patternProperties ? true : schema2.additionalProperties ?? true);
|
|
25180
25180
|
return [...a.required ?? [], ...b.required ?? []].some((key) => schemasCannotOverlap(property(a, key), property(b, key)));
|
|
25181
25181
|
};
|
|
25182
|
+
var numericBound = (schema2, direction) => {
|
|
25183
|
+
const inclusiveKey = direction === "lower" ? "minimum" : "maximum";
|
|
25184
|
+
const exclusiveKey = direction === "lower" ? "exclusiveMinimum" : "exclusiveMaximum";
|
|
25185
|
+
const inclusiveValue = schema2[inclusiveKey];
|
|
25186
|
+
const exclusiveValue = schema2[exclusiveKey];
|
|
25187
|
+
const candidates = [];
|
|
25188
|
+
if (inclusiveValue !== void 0) {
|
|
25189
|
+
if (typeof inclusiveValue !== "number" || !Number.isFinite(inclusiveValue)) return null;
|
|
25190
|
+
candidates.push({ value: inclusiveValue, inclusive: true });
|
|
25191
|
+
}
|
|
25192
|
+
if (typeof exclusiveValue === "number") {
|
|
25193
|
+
if (!Number.isFinite(exclusiveValue)) return null;
|
|
25194
|
+
candidates.push({ value: exclusiveValue, inclusive: false });
|
|
25195
|
+
} else if (exclusiveValue === true) {
|
|
25196
|
+
if (typeof inclusiveValue !== "number" || !Number.isFinite(inclusiveValue)) return null;
|
|
25197
|
+
candidates.push({ value: inclusiveValue, inclusive: false });
|
|
25198
|
+
} else if (exclusiveValue !== void 0 && exclusiveValue !== false) {
|
|
25199
|
+
return null;
|
|
25200
|
+
}
|
|
25201
|
+
if (!candidates.length) return void 0;
|
|
25202
|
+
const compare = direction === "lower" ? Math.max : Math.min;
|
|
25203
|
+
const value = compare(...candidates.map((candidate) => candidate.value));
|
|
25204
|
+
return { value, inclusive: candidates.filter((candidate) => candidate.value === value).every((candidate) => candidate.inclusive) };
|
|
25205
|
+
};
|
|
25206
|
+
var boundAcceptsPrevious = (previous, next, direction) => {
|
|
25207
|
+
if (previous === null || next === null) return false;
|
|
25208
|
+
if (!next) return true;
|
|
25209
|
+
if (!previous) return false;
|
|
25210
|
+
if (direction === "lower" && previous.value < next.value) return false;
|
|
25211
|
+
if (direction === "upper" && previous.value > next.value) return false;
|
|
25212
|
+
return previous.value !== next.value || !previous.inclusive || next.inclusive;
|
|
25213
|
+
};
|
|
25214
|
+
var numericRangesAcceptPrevious = (previous, next) => boundAcceptsPrevious(numericBound(previous, "lower"), numericBound(next, "lower"), "lower") && boundAcceptsPrevious(numericBound(previous, "upper"), numericBound(next, "upper"), "upper");
|
|
25182
25215
|
var acceptsPreviousSchema = (previous, next) => {
|
|
25183
25216
|
if (canonicalContentHash(previous) === canonicalContentHash(next) || next === true) return true;
|
|
25184
25217
|
if (previous === false) return true;
|
|
@@ -25197,6 +25230,10 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
25197
25230
|
additionalProperties: oldAdditional,
|
|
25198
25231
|
enum: oldEnum,
|
|
25199
25232
|
items: oldItems,
|
|
25233
|
+
minimum: _oldMinimum,
|
|
25234
|
+
maximum: _oldMaximum,
|
|
25235
|
+
exclusiveMinimum: _oldExclusiveMinimum,
|
|
25236
|
+
exclusiveMaximum: _oldExclusiveMaximum,
|
|
25200
25237
|
...oldFixed
|
|
25201
25238
|
} = before;
|
|
25202
25239
|
const {
|
|
@@ -25205,9 +25242,14 @@ var acceptsPreviousSchema = (previous, next) => {
|
|
|
25205
25242
|
additionalProperties: newAdditional,
|
|
25206
25243
|
enum: newEnum,
|
|
25207
25244
|
items: newItems,
|
|
25245
|
+
minimum: _newMinimum,
|
|
25246
|
+
maximum: _newMaximum,
|
|
25247
|
+
exclusiveMinimum: _newExclusiveMinimum,
|
|
25248
|
+
exclusiveMaximum: _newExclusiveMaximum,
|
|
25208
25249
|
...newFixed
|
|
25209
25250
|
} = after;
|
|
25210
25251
|
if (canonicalContentHash(oldFixed) !== canonicalContentHash(newFixed)) return false;
|
|
25252
|
+
if (!numericRangesAcceptPrevious(before, after)) return false;
|
|
25211
25253
|
if (!acceptsPreviousSchema(oldItems ?? true, newItems ?? true)) return false;
|
|
25212
25254
|
if (newEnum && (!oldEnum || oldEnum.some((value) => !newEnum.some((candidate) => canonicalContentHash(candidate) === canonicalContentHash(value))))) return false;
|
|
25213
25255
|
if ((newRequired ?? []).some((key) => !(oldRequired ?? []).includes(key))) return false;
|