@orkestrel/contract 0.0.27 → 0.0.28
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/dist/src/core/index.cjs +18 -8
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +18 -8
- package/dist/src/core/index.js.map +1 -1
- package/package.json +11 -11
package/dist/src/core/index.cjs
CHANGED
|
@@ -2982,7 +2982,9 @@ function matchesJSONDepth(value) {
|
|
|
2982
2982
|
const active = new INTRINSICS.weakSet();
|
|
2983
2983
|
const settled = new INTRINSICS.weakMap();
|
|
2984
2984
|
while (stack.length > 0) {
|
|
2985
|
-
const
|
|
2985
|
+
const top = stack.length - 1;
|
|
2986
|
+
const frame = stack[top];
|
|
2987
|
+
stack.length = top;
|
|
2986
2988
|
if (frame === void 0) return false;
|
|
2987
2989
|
if (frame.operation === "exit") {
|
|
2988
2990
|
omitVisited(active, frame.value);
|
|
@@ -3083,7 +3085,9 @@ function matchesJSONValue(entry, ancestors, budget) {
|
|
|
3083
3085
|
}];
|
|
3084
3086
|
const proved = new INTRINSICS.weakSet();
|
|
3085
3087
|
while (stack.length > 0) {
|
|
3086
|
-
const
|
|
3088
|
+
const top = stack.length - 1;
|
|
3089
|
+
const frame = stack[top];
|
|
3090
|
+
stack.length = top;
|
|
3087
3091
|
if (frame === void 0) return false;
|
|
3088
3092
|
if (frame.operation === "exit") {
|
|
3089
3093
|
omitVisited(ancestors, frame.value);
|
|
@@ -6073,7 +6077,7 @@ var JSONCloner = class JSONCloner {
|
|
|
6073
6077
|
if (entry === void 0) {
|
|
6074
6078
|
INTRINSICS.freeze(frame.clone);
|
|
6075
6079
|
omitVisited(this.#active, frame.source);
|
|
6076
|
-
this.#pending.
|
|
6080
|
+
this.#pending.length -= 1;
|
|
6077
6081
|
continue;
|
|
6078
6082
|
}
|
|
6079
6083
|
frame.index = index + 1;
|
|
@@ -6139,7 +6143,7 @@ var JSONCloner = class JSONCloner {
|
|
|
6139
6143
|
const lengthOutcome = attempt(() => INTRINSICS.reflect.describe(source, "length"));
|
|
6140
6144
|
if (isFailure(lengthOutcome)) this.#refusePath("array length could not be inspected", preview(source));
|
|
6141
6145
|
const lengthDescriptor = lengthOutcome.value;
|
|
6142
|
-
if (lengthDescriptor === void 0 || !INTRINSICS.own(lengthDescriptor, "value") || typeof lengthDescriptor.value !== "number" || !INTRINSICS.integer(lengthDescriptor.value) || lengthDescriptor.value < 0 || lengthDescriptor.value >
|
|
6146
|
+
if (lengthDescriptor === void 0 || !INTRINSICS.own(lengthDescriptor, "value") || typeof lengthDescriptor.value !== "number" || !INTRINSICS.integer(lengthDescriptor.value) || lengthDescriptor.value < 0 || lengthDescriptor.value > 0xffffffff || lengthDescriptor.enumerable !== false || lengthDescriptor.configurable !== false) this.#refusePath("array is not intrinsic and dense", preview(source));
|
|
6143
6147
|
const owned = collectMembers(keysOutcome.value);
|
|
6144
6148
|
if (!matchesMember(owned, "length")) this.#refusePath("array own keys are not exact", preview(source));
|
|
6145
6149
|
if (keysOutcome.value.length !== lengthDescriptor.value + 1) this.#refusePath("array own keys are not exact", preview(source));
|
|
@@ -6314,7 +6318,9 @@ var SchemaCloner = class SchemaCloner {
|
|
|
6314
6318
|
}
|
|
6315
6319
|
#drain() {
|
|
6316
6320
|
while (this.#pending.length > 0) {
|
|
6317
|
-
const
|
|
6321
|
+
const top = this.#pending.length - 1;
|
|
6322
|
+
const frame = this.#pending[top];
|
|
6323
|
+
this.#pending.length = top;
|
|
6318
6324
|
if (frame === void 0) continue;
|
|
6319
6325
|
if (frame.depth > 512) this.#refuse("cloneSchema: schema exceeds the compilation depth limit", "depth", frame.path);
|
|
6320
6326
|
const keys = enumerableKeys(frame.source);
|
|
@@ -6608,7 +6614,9 @@ var ShapePass = class ShapePass {
|
|
|
6608
6614
|
this.#finish();
|
|
6609
6615
|
}
|
|
6610
6616
|
#visit() {
|
|
6611
|
-
const
|
|
6617
|
+
const top = this.#stack.length - 1;
|
|
6618
|
+
const frame = this.#stack[top];
|
|
6619
|
+
this.#stack.length = top;
|
|
6612
6620
|
if (frame === void 0) return;
|
|
6613
6621
|
if (frame.operation === "exit") {
|
|
6614
6622
|
const capture = this.#captures[frame.index];
|
|
@@ -6895,7 +6903,9 @@ var ShapePass = class ShapePass {
|
|
|
6895
6903
|
schema: source
|
|
6896
6904
|
}];
|
|
6897
6905
|
while (stack.length > 0) {
|
|
6898
|
-
const
|
|
6906
|
+
const top = stack.length - 1;
|
|
6907
|
+
const frame = stack[top];
|
|
6908
|
+
stack.length = top;
|
|
6899
6909
|
if (frame === void 0) continue;
|
|
6900
6910
|
if (frame.operation === "exit") {
|
|
6901
6911
|
omitVisited(active, frame.schema);
|
|
@@ -9674,7 +9684,7 @@ var RandomSource = class {
|
|
|
9674
9684
|
}
|
|
9675
9685
|
/** Advances the generator and returns its next unit-interval value. */
|
|
9676
9686
|
next() {
|
|
9677
|
-
this.#state = this.#state +
|
|
9687
|
+
this.#state = this.#state + 0x6d2b79f5 >>> 0;
|
|
9678
9688
|
const mixed = INTRINSICS.imul(this.#state ^ this.#state >>> 15, this.#state | 1);
|
|
9679
9689
|
const final = mixed ^ mixed + INTRINSICS.imul(mixed ^ mixed >>> 7, mixed | 61);
|
|
9680
9690
|
return ((final ^ final >>> 14) >>> 0) / 4294967296;
|