Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/hrana-client

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/hrana-client - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

12

lib-cjs/http/stream.js

@@ -341,12 +341,12 @@ "use strict";

}
else if (encoding === "protobuf") {
if (encoding === "protobuf") {
const respData = await resp.arrayBuffer();
return (0, index_js_1.readProtobufMessage)(new Uint8Array(respData), protobuf_decode_js_1.PipelineRespBody);
}
else {
throw (0, util_js_1.impossible)(encoding, "Impossible encoding");
}
await resp.body?.cancel();
throw (0, util_js_1.impossible)(encoding, "Impossible encoding");
}
async function errorFromResponse(resp) {
const respType = resp.headers.get("content-type") ?? "text/plain";
let message = `Server returned HTTP status ${resp.status}`;
if (respType === "application/json") {

@@ -357,4 +357,4 @@ const respBody = await resp.json();

}
return new errors_js_1.HttpServerError(message, resp.status);
}
let message = `Server returned HTTP status ${resp.status}`;
if (respType === "text/plain") {

@@ -365,4 +365,6 @@ const respBody = (await resp.text()).trim();

}
return new errors_js_1.HttpServerError(message, resp.status);
}
await resp.body?.cancel();
return new errors_js_1.HttpServerError(message, resp.status);
}

@@ -337,12 +337,12 @@ import { Request, Headers } from "@libsql/isomorphic-fetch";

}
else if (encoding === "protobuf") {
if (encoding === "protobuf") {
const respData = await resp.arrayBuffer();
return readProtobufMessage(new Uint8Array(respData), protobuf_PipelineRespBody);
}
else {
throw impossible(encoding, "Impossible encoding");
}
await resp.body?.cancel();
throw impossible(encoding, "Impossible encoding");
}
async function errorFromResponse(resp) {
const respType = resp.headers.get("content-type") ?? "text/plain";
let message = `Server returned HTTP status ${resp.status}`;
if (respType === "application/json") {

@@ -353,4 +353,4 @@ const respBody = await resp.json();

}
return new HttpServerError(message, resp.status);
}
let message = `Server returned HTTP status ${resp.status}`;
if (respType === "text/plain") {

@@ -361,4 +361,6 @@ const respBody = (await resp.text()).trim();

}
return new HttpServerError(message, resp.status);
}
await resp.body?.cancel();
return new HttpServerError(message, resp.status);
}
{
"name": "@libsql/hrana-client",
"version": "0.6.2",
"version": "0.7.0",
"keywords": [

@@ -48,3 +48,3 @@ "hrana",

"dependencies": {
"@libsql/isomorphic-fetch": "^0.2.1",
"@libsql/isomorphic-fetch": "^0.3.1",
"@libsql/isomorphic-ws": "^0.1.5",

@@ -51,0 +51,0 @@ "js-base64": "^3.7.5",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc