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