seroval 1.8.1 → 1.8.2

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.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_shared = require("./shared-DWx3Bwb6.cjs");
3
- const require_read = require("./read-D4n-bxUW.cjs");
3
+ const require_read = require("./read-BOG4auze.cjs");
4
4
  const require_write = require("./write-DGOp2jqo.cjs");
5
5
  let src_core_validator = require("./validator.cjs");
6
6
  exports.Feature = require_shared.Feature;
package/dist/dev/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { A as SerovalMalformedNodeError, B as SerovalUnsupportedTypeError, C as getCrossReferenceHeader, D as SerovalDeserializationError, E as SerovalDepthLimitError, F as SerovalParserError, I as SerovalPluginValidationError, L as SerovalSerializationError, M as SerovalMissingPluginError, N as SerovalMissingReferenceError, O as SerovalError, P as SerovalMissingReferenceForIdError, R as SerovalUnknownTypedArrayError, T as SerovalConflictedNodeIdError, a as getPlainObjectPlugins, c as createStream, d as LiveStream, f as createLiveStream, i as createPlugin, j as SerovalMissingInstanceError, k as SerovalLiveStreamError, l as isStream, m as Sequence, n as OpaqueReference, o as resolvePlugins, p as isLiveStream, r as SerovalMode, s as Stream, t as v, tt as Feature, w as SerovalAbortedError, y as createReference, z as SerovalUnsupportedNodeError } from "./shared-Cf-Bmoy-.js";
2
- import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-BgToBbWd.js";
2
+ import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read--2lC-cNb.js";
3
3
  import { a as toJSONAsync, c as crossSerializeAsync, d as toCrossJSONAsync, f as toCrossJSONStream, i as toJSON, l as crossSerializeStream, n as serialize, o as Serializer, r as serializeAsync, s as crossSerialize, t as compileJSON, u as toCrossJSON } from "./write-BKJsV31u.js";
4
4
  export { Feature, LiveStream, OpaqueReference, Sequence, Serializer, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, compileJSON, createCrossDeserializer, createLiveStream, createPlugin, createReference, createStream, crossSerialize, crossSerializeAsync, crossSerializeStream, deserialize, fromCrossJSON, fromJSON, getCrossReferenceHeader, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, serialize, serializeAsync, toCrossJSON, toCrossJSONAsync, toCrossJSONStream, toJSON, toJSONAsync, v };
@@ -206,12 +206,24 @@ function deserializeDictionary(ctx, depth, node, result) {
206
206
  }
207
207
  return result;
208
208
  }
209
+ function constructError(create) {
210
+ const limit = Error.stackTraceLimit;
211
+ if (typeof limit !== "number") return create();
212
+ Reflect.set(Error, "stackTraceLimit", 0);
213
+ try {
214
+ return create();
215
+ } finally {
216
+ Reflect.set(Error, "stackTraceLimit", limit);
217
+ }
218
+ }
209
219
  function deserializeAggregateError(ctx, depth, node) {
210
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new AggregateError([], deserializeString(node.m))));
220
+ const message = deserializeString(node.m);
221
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new AggregateError([], message))));
211
222
  }
212
223
  function deserializeError(ctx, depth, node) {
213
224
  const construct = deserializeKnownValue(node, ERROR_CONSTRUCTOR, node.s);
214
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new construct(deserializeString(node.m))));
225
+ const message = deserializeString(node.m);
226
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new construct(message))));
215
227
  }
216
228
  function deserializePromise(ctx, depth, node) {
217
229
  const deferred = PROMISE_CONSTRUCTOR();
@@ -206,12 +206,24 @@ function deserializeDictionary(ctx, depth, node, result) {
206
206
  }
207
207
  return result;
208
208
  }
209
+ function constructError(create) {
210
+ const limit = Error.stackTraceLimit;
211
+ if (typeof limit !== "number") return create();
212
+ Reflect.set(Error, "stackTraceLimit", 0);
213
+ try {
214
+ return create();
215
+ } finally {
216
+ Reflect.set(Error, "stackTraceLimit", limit);
217
+ }
218
+ }
209
219
  function deserializeAggregateError(ctx, depth, node) {
210
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new AggregateError([], require_shared.deserializeString(node.m))));
220
+ const message = require_shared.deserializeString(node.m);
221
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new AggregateError([], message))));
211
222
  }
212
223
  function deserializeError(ctx, depth, node) {
213
224
  const construct = deserializeKnownValue(node, require_shared.ERROR_CONSTRUCTOR, node.s);
214
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new construct(require_shared.deserializeString(node.m))));
225
+ const message = require_shared.deserializeString(node.m);
226
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new construct(message))));
215
227
  }
216
228
  function deserializePromise(ctx, depth, node) {
217
229
  const deferred = require_shared.PROMISE_CONSTRUCTOR();
package/dist/dev/read.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_shared = require("./shared-DWx3Bwb6.cjs");
3
- const require_read = require("./read-D4n-bxUW.cjs");
3
+ const require_read = require("./read-BOG4auze.cjs");
4
4
  let src_core_validator = require("./validator.cjs");
5
5
  exports.Feature = require_shared.Feature;
6
6
  exports.LiveStream = require_shared.LiveStream;
package/dist/dev/read.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { A as SerovalMalformedNodeError, B as SerovalUnsupportedTypeError, D as SerovalDeserializationError, E as SerovalDepthLimitError, F as SerovalParserError, I as SerovalPluginValidationError, L as SerovalSerializationError, M as SerovalMissingPluginError, N as SerovalMissingReferenceError, O as SerovalError, P as SerovalMissingReferenceForIdError, R as SerovalUnknownTypedArrayError, T as SerovalConflictedNodeIdError, a as getPlainObjectPlugins, c as createStream, d as LiveStream, f as createLiveStream, i as createPlugin, j as SerovalMissingInstanceError, k as SerovalLiveStreamError, l as isStream, m as Sequence, n as OpaqueReference, o as resolvePlugins, p as isLiveStream, r as SerovalMode, s as Stream, t as v, tt as Feature, w as SerovalAbortedError, y as createReference, z as SerovalUnsupportedNodeError } from "./shared-Cf-Bmoy-.js";
2
- import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-BgToBbWd.js";
2
+ import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read--2lC-cNb.js";
3
3
  export { Feature, LiveStream, OpaqueReference, Sequence, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, createCrossDeserializer, createLiveStream, createPlugin, createReference, createStream, deserialize, fromCrossJSON, fromJSON, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, v };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_shared = require("./shared-u-KYXAax.cjs");
3
- const require_read = require("./read-B0hu4YND.cjs");
3
+ const require_read = require("./read-B5Kcd8i1.cjs");
4
4
  const require_write = require("./write-CMi0CxOu.cjs");
5
5
  let src_core_validator = require("./validator.cjs");
6
6
  exports.Feature = require_shared.Feature;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { A as SerovalMalformedNodeError, B as SerovalUnsupportedTypeError, C as getCrossReferenceHeader, D as SerovalDeserializationError, E as SerovalDepthLimitError, F as SerovalParserError, I as SerovalPluginValidationError, L as SerovalSerializationError, M as SerovalMissingPluginError, N as SerovalMissingReferenceError, O as SerovalError, P as SerovalMissingReferenceForIdError, R as SerovalUnknownTypedArrayError, T as SerovalConflictedNodeIdError, a as getPlainObjectPlugins, c as createStream, d as LiveStream, f as createLiveStream, i as createPlugin, j as SerovalMissingInstanceError, k as SerovalLiveStreamError, l as isStream, m as Sequence, n as OpaqueReference, o as resolvePlugins, p as isLiveStream, r as SerovalMode, s as Stream, t as v, tt as Feature, w as SerovalAbortedError, y as createReference, z as SerovalUnsupportedNodeError } from "./shared-DJIVyqa9.js";
2
- import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-BSFu4fPn.js";
2
+ import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-B3lBprVF.js";
3
3
  import { a as toJSONAsync, c as crossSerializeAsync, d as toCrossJSONAsync, f as toCrossJSONStream, i as toJSON, l as crossSerializeStream, n as serialize, o as Serializer, r as serializeAsync, s as crossSerialize, t as compileJSON, u as toCrossJSON } from "./write-B_hZaAwC.js";
4
4
  export { Feature, LiveStream, OpaqueReference, Sequence, Serializer, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, compileJSON, createCrossDeserializer, createLiveStream, createPlugin, createReference, createStream, crossSerialize, crossSerializeAsync, crossSerializeStream, deserialize, fromCrossJSON, fromJSON, getCrossReferenceHeader, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, serialize, serializeAsync, toCrossJSON, toCrossJSONAsync, toCrossJSONStream, toJSON, toJSONAsync, v };
@@ -206,12 +206,24 @@ function deserializeDictionary(ctx, depth, node, result) {
206
206
  }
207
207
  return result;
208
208
  }
209
+ function constructError(create) {
210
+ const limit = Error.stackTraceLimit;
211
+ if (typeof limit !== "number") return create();
212
+ Reflect.set(Error, "stackTraceLimit", 0);
213
+ try {
214
+ return create();
215
+ } finally {
216
+ Reflect.set(Error, "stackTraceLimit", limit);
217
+ }
218
+ }
209
219
  function deserializeAggregateError(ctx, depth, node) {
210
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new AggregateError([], deserializeString(node.m))));
220
+ const message = deserializeString(node.m);
221
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new AggregateError([], message))));
211
222
  }
212
223
  function deserializeError(ctx, depth, node) {
213
224
  const construct = deserializeKnownValue(node, ERROR_CONSTRUCTOR, node.s);
214
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new construct(deserializeString(node.m))));
225
+ const message = deserializeString(node.m);
226
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new construct(message))));
215
227
  }
216
228
  function deserializePromise(ctx, depth, node) {
217
229
  const deferred = PROMISE_CONSTRUCTOR();
@@ -206,12 +206,24 @@ function deserializeDictionary(ctx, depth, node, result) {
206
206
  }
207
207
  return result;
208
208
  }
209
+ function constructError(create) {
210
+ const limit = Error.stackTraceLimit;
211
+ if (typeof limit !== "number") return create();
212
+ Reflect.set(Error, "stackTraceLimit", 0);
213
+ try {
214
+ return create();
215
+ } finally {
216
+ Reflect.set(Error, "stackTraceLimit", limit);
217
+ }
218
+ }
209
219
  function deserializeAggregateError(ctx, depth, node) {
210
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new AggregateError([], require_shared.deserializeString(node.m))));
220
+ const message = require_shared.deserializeString(node.m);
221
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new AggregateError([], message))));
211
222
  }
212
223
  function deserializeError(ctx, depth, node) {
213
224
  const construct = deserializeKnownValue(node, require_shared.ERROR_CONSTRUCTOR, node.s);
214
- return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, new construct(require_shared.deserializeString(node.m))));
225
+ const message = require_shared.deserializeString(node.m);
226
+ return deserializeDictionary(ctx, depth, node, assignIndexedValue(ctx, node.i, constructError(() => new construct(message))));
215
227
  }
216
228
  function deserializePromise(ctx, depth, node) {
217
229
  const deferred = require_shared.PROMISE_CONSTRUCTOR();
package/dist/read.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_shared = require("./shared-u-KYXAax.cjs");
3
- const require_read = require("./read-B0hu4YND.cjs");
3
+ const require_read = require("./read-B5Kcd8i1.cjs");
4
4
  let src_core_validator = require("./validator.cjs");
5
5
  exports.Feature = require_shared.Feature;
6
6
  exports.LiveStream = require_shared.LiveStream;
package/dist/read.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { A as SerovalMalformedNodeError, B as SerovalUnsupportedTypeError, D as SerovalDeserializationError, E as SerovalDepthLimitError, F as SerovalParserError, I as SerovalPluginValidationError, L as SerovalSerializationError, M as SerovalMissingPluginError, N as SerovalMissingReferenceError, O as SerovalError, P as SerovalMissingReferenceForIdError, R as SerovalUnknownTypedArrayError, T as SerovalConflictedNodeIdError, a as getPlainObjectPlugins, c as createStream, d as LiveStream, f as createLiveStream, i as createPlugin, j as SerovalMissingInstanceError, k as SerovalLiveStreamError, l as isStream, m as Sequence, n as OpaqueReference, o as resolvePlugins, p as isLiveStream, r as SerovalMode, s as Stream, t as v, tt as Feature, w as SerovalAbortedError, y as createReference, z as SerovalUnsupportedNodeError } from "./shared-DJIVyqa9.js";
2
- import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-BSFu4fPn.js";
2
+ import { i as fromCrossJSON, n as fromJSON, r as createCrossDeserializer, t as deserialize } from "./read-B3lBprVF.js";
3
3
  export { Feature, LiveStream, OpaqueReference, Sequence, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, createCrossDeserializer, createLiveStream, createPlugin, createReference, createStream, deserialize, fromCrossJSON, fromJSON, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, v };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "seroval",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "1.8.1",
5
+ "version": "1.8.2",
6
6
  "files": [
7
7
  "dist"
8
8
  ],