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.5.0-pre.1 to 0.5.0-pre.2

19

lib-cjs/http/stream.js

@@ -31,2 +31,3 @@ "use strict";

#closing;
#closeQueued;
#closed;

@@ -45,2 +46,3 @@ #sqlIdAlloc;

this.#closing = false;
this.#closeQueued = false;
this.#closed = undefined;

@@ -164,9 +166,10 @@ this.#sqlIdAlloc = new id_alloc_js_1.IdAlloc();

}
if (this.#baton !== undefined || this.#flushing) {
if ((this.#baton !== undefined || this.#flushing) && !this.#closeQueued) {
this.#queue.push({
type: "pipeline",
request: { type: "close" },
responseCallback() { },
errorCallback() { },
responseCallback: () => undefined,
errorCallback: () => undefined,
});
this.#closeQueued = true;
(0, queue_microtask_js_1.queueMicrotask)(() => this.#flushQueue());

@@ -212,2 +215,12 @@ }

}
else if (entry === undefined && this.#closing && !this.#closeQueued) {
pipeline.push({
type: "pipeline",
request: { type: "close" },
responseCallback: () => undefined,
errorCallback: () => undefined,
});
this.#closeQueued = true;
break;
}
else {

@@ -214,0 +227,0 @@ break;

10

lib-cjs/ws/client.js

@@ -91,5 +91,9 @@ "use strict";

const protocol = this.#socket.protocol;
if (protocol === "" || protocol === undefined) {
// TODO: `protocol === undefined` is a workaround for Miniflare 2, which does not support the
// `protocol` property on a WebSocket
if (protocol === undefined) {
this.#setClosed(new errors_js_1.ClientError("The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket " +
"implementation provided by the environment is broken. If you are using Miniflare 2, " +
"please update to Miniflare 3, which fixes this problem."));
return;
}
else if (protocol === "") {
this.#subprotocol = { version: 1, encoding: "json" };

@@ -96,0 +100,0 @@ }

@@ -28,2 +28,3 @@ import { Request, Headers } from "@libsql/isomorphic-fetch";

#closing;
#closeQueued;
#closed;

@@ -42,2 +43,3 @@ #sqlIdAlloc;

this.#closing = false;
this.#closeQueued = false;
this.#closed = undefined;

@@ -161,9 +163,10 @@ this.#sqlIdAlloc = new IdAlloc();

}
if (this.#baton !== undefined || this.#flushing) {
if ((this.#baton !== undefined || this.#flushing) && !this.#closeQueued) {
this.#queue.push({
type: "pipeline",
request: { type: "close" },
responseCallback() { },
errorCallback() { },
responseCallback: () => undefined,
errorCallback: () => undefined,
});
this.#closeQueued = true;
queueMicrotask(() => this.#flushQueue());

@@ -209,2 +212,12 @@ }

}
else if (entry === undefined && this.#closing && !this.#closeQueued) {
pipeline.push({
type: "pipeline",
request: { type: "close" },
responseCallback: () => undefined,
errorCallback: () => undefined,
});
this.#closeQueued = true;
break;
}
else {

@@ -211,0 +224,0 @@ break;

@@ -88,5 +88,9 @@ import { Client } from "../client.js";

const protocol = this.#socket.protocol;
if (protocol === "" || protocol === undefined) {
// TODO: `protocol === undefined` is a workaround for Miniflare 2, which does not support the
// `protocol` property on a WebSocket
if (protocol === undefined) {
this.#setClosed(new ClientError("The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket " +
"implementation provided by the environment is broken. If you are using Miniflare 2, " +
"please update to Miniflare 3, which fixes this problem."));
return;
}
else if (protocol === "") {
this.#subprotocol = { version: 1, encoding: "json" };

@@ -93,0 +97,0 @@ }

{
"name": "@libsql/hrana-client",
"version": "0.5.0-pre.1",
"version": "0.5.0-pre.2",
"keywords": [

@@ -5,0 +5,0 @@ "hrana",

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