lhisp-logger 3.1.6 → 3.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lhisp-logger",
3
- "version": "3.1.6",
3
+ "version": "3.1.7",
4
4
  "description": "",
5
5
  "main": "src/lhisp-logger",
6
6
  "types": "src/lhisp-logger.d.ts",
@@ -75,12 +75,12 @@ function deepSerializeAxiosErrors(value, seen) {
75
75
  if (Array.isArray(value)) {
76
76
  return value.map((item) => deepSerializeAxiosErrors(item, localSeen));
77
77
  }
78
- // Keep non-plain objects (Date, Buffer, Error, etc.) untouched except axios errors above
79
- const proto = Object.getPrototypeOf(obj);
80
- const isPlain = proto === Object.prototype || proto === null;
81
- if (!isPlain) {
78
+ // Keep binary/typed payloads untouched to avoid exploding into index keys.
79
+ if (Buffer.isBuffer(value) || ArrayBuffer.isView(value)) {
82
80
  return value;
83
81
  }
82
+ // Traverse enumerable keys for both plain objects and class instances
83
+ // (e.g. class-validator ValidationError), so nested large strings are truncated.
84
84
  const out = {};
85
85
  for (const [k, v] of Object.entries(value)) {
86
86
  out[k] = deepSerializeAxiosErrors(v, localSeen);