@poe-platform/safe-js 0.1.731 → 0.1.733

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.
@@ -148,7 +148,7 @@ function isJsonValue(value, options = {}) {
148
148
  const maxNodes = options.maxNodes ?? 1e4;
149
149
  const maxDepth = options.maxDepth ?? 64;
150
150
  if (maxNodes !== Infinity && (!Number.isSafeInteger(maxNodes) || maxNodes < 1)) throw new Error("maxNodes must be a positive safe integer");
151
- if (maxDepth !== Infinity && (!Number.isSafeInteger(maxDepth) || maxDepth < 0)) throw new Error("maxDepth must be a nonnegative safe integer");
151
+ if (maxDepth !== Infinity && (!Number.isSafeInteger(maxDepth) || maxDepth < 0)) throw new Error("maxDepth must be a nonnegative safe integer or Infinity");
152
152
  const ancestors = /* @__PURE__ */ new Set();
153
153
  const stack = [];
154
154
  function* properties(item2) {
@@ -180,7 +180,7 @@ function isJsonValue(value, options = {}) {
180
180
  }
181
181
  hookOwner = Object.getPrototypeOf(hookOwner);
182
182
  }
183
- if (Array.isArray(item) && item.length > maxNodes) return false;
183
+ if (Array.isArray(item) && item.length > maxNodes - nodes) return false;
184
184
  ancestors.add(item);
185
185
  stack.push({ owner: item, children: properties(item), depth });
186
186
  }
@@ -7828,7 +7828,7 @@ var HttpTransport = class {
7828
7828
  }
7829
7829
  async completeInitialization(options) {
7830
7830
  validateRequestTimer(options.timeoutMs, "timeoutMs");
7831
- const deadline = options.timeoutMs > 0 ? AbortSignal.timeout(Math.ceil(options.timeoutMs)) : void 0;
7831
+ const deadline = options.timeoutMs !== Infinity && options.timeoutMs > 0 ? AbortSignal.timeout(Math.ceil(options.timeoutMs)) : void 0;
7832
7832
  const signals = [options.signal, deadline].filter((signal2) => signal2 !== void 0);
7833
7833
  const signal = signals.length === 0 ? new AbortController().signal : AbortSignal.any(signals);
7834
7834
  signal.throwIfAborted();
@@ -8643,7 +8643,7 @@ var SseParser = class {
8643
8643
  }
8644
8644
  };
8645
8645
  function validateRequestTimer(value, name) {
8646
- if (!Number.isFinite(value) || value < 0 || value > 2147483647)
8646
+ if (value !== Infinity && (!Number.isFinite(value) || value < 0 || value > 2147483647))
8647
8647
  throw new Error(`${name} must be a non-negative finite number no greater than 2147483647`);
8648
8648
  }
8649
8649
  var JsonRpcMessageLayer = class {
@@ -8739,7 +8739,7 @@ var JsonRpcMessageLayer = class {
8739
8739
  currentRequestId = id;
8740
8740
  onRequestId?.(id);
8741
8741
  } };
8742
- const deadline = timeoutMs === null ? void 0 : setTimeout(() => {
8742
+ const deadline = timeoutMs === null || timeoutMs === Infinity ? void 0 : setTimeout(() => {
8743
8743
  let reason = new Error(`JSON-RPC request "${method}" timed out after ${timeoutMs}ms`);
8744
8744
  try {
8745
8745
  if (currentRequestId !== void 0) options.onTimeout?.(currentRequestId);
@@ -9829,4 +9829,4 @@ CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
9829
9829
  the full license text.
9830
9830
 
9831
9831
  */
9832
- //# sourceMappingURL=chunk-MGHE7ZFI.js.map
9832
+ //# sourceMappingURL=chunk-3ITVV2R6.js.map