@neat.is/core 0.4.13 → 0.4.14

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/index.cjs CHANGED
@@ -133,7 +133,9 @@ __export(otel_grpc_exports, {
133
133
  });
134
134
  function bytesToHex(buf) {
135
135
  if (!buf) return "";
136
- return Buffer.isBuffer(buf) ? buf.toString("hex") : "";
136
+ if (Buffer.isBuffer(buf)) return buf.toString("hex");
137
+ if (buf instanceof Uint8Array) return Buffer.from(buf).toString("hex");
138
+ return "";
137
139
  }
138
140
  function nanosToString(n) {
139
141
  if (n === void 0 || n === null) return "0";
@@ -406,7 +408,10 @@ function encodeProtobufResponseBody() {
406
408
  }
407
409
  async function decodeProtobufBody(buf) {
408
410
  const Type = loadProtobufDecoder();
409
- const decoded = Type.decode(buf).toJSON();
411
+ const decoded = Type.toObject(Type.decode(buf), {
412
+ longs: String,
413
+ enums: Number
414
+ });
410
415
  const { reshapeGrpcRequest: reshapeGrpcRequest2 } = await Promise.resolve().then(() => (init_otel_grpc(), otel_grpc_exports));
411
416
  return reshapeGrpcRequest2(decoded);
412
417
  }