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

libsql-stateless

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libsql-stateless - npm Package Compare versions

Comparing version 2.5.10 to 2.6.0

27

lib-cjs/functions.js

@@ -15,12 +15,5 @@ "use strict";

return { isOk: false, err: {
kind: "libsqlPipelineResErr",
kind: "LIBSQL_SERVER_ERROR",
error_data: {
server_message: await (async () => {
try {
return await res.clone().json();
}
catch {
return await res.text();
}
})(),
server_message: await res.text(),
http_status_code: res.status,

@@ -57,8 +50,8 @@ http_status_text: res.statusText

return { isOk: false, err: {
kind: "libsqlStreamResErrData",
error_data: resu.error
} }; //has to be StreamResErr
kind: "LIBSQL_RESPONSE_ERROR",
error_data: resu.error //has to be StreamResErr
} };
}
else
return res; //PipelineResErr or StreamResErrData
return res; //whatever server error returned
}

@@ -92,8 +85,8 @@ exports.libsqlExecute = libsqlExecute;

return { isOk: false, err: {
kind: "libsqlStreamResErrData",
error_data: resu.error
} }; //has to be StreamResErr
kind: "LIBSQL_RESPONSE_ERROR",
error_data: resu.error //has to be StreamResErr
} };
}
else
return res; //PipelineResErr or StreamResErrData
return res; //whatever server error returned
}

@@ -100,0 +93,0 @@ exports.libsqlBatch = libsqlBatch;

@@ -12,12 +12,5 @@ async function hranaFetch(s) {

return { isOk: false, err: {
kind: "libsqlPipelineResErr",
kind: "LIBSQL_SERVER_ERROR",
error_data: {
server_message: await (async () => {
try {
return await res.clone().json();
}
catch {
return await res.text();
}
})(),
server_message: await res.text(),
http_status_code: res.status,

@@ -54,8 +47,8 @@ http_status_text: res.statusText

return { isOk: false, err: {
kind: "libsqlStreamResErrData",
error_data: resu.error
} }; //has to be StreamResErr
kind: "LIBSQL_RESPONSE_ERROR",
error_data: resu.error //has to be StreamResErr
} };
}
else
return res; //PipelineResErr or StreamResErrData
return res; //whatever server error returned
}

@@ -88,8 +81,8 @@ /**

return { isOk: false, err: {
kind: "libsqlStreamResErrData",
error_data: resu.error
} }; //has to be StreamResErr
kind: "LIBSQL_RESPONSE_ERROR",
error_data: resu.error //has to be StreamResErr
} };
}
else
return res; //PipelineResErr or StreamResErrData
return res; //whatever server error returned
}

@@ -96,0 +89,0 @@ /**

@@ -13,8 +13,11 @@ export type libsqlResult<T, E> = {

export type libsqlError = {
kind: "libsqlPipelineResErr" | "libsqlStreamResErrData";
error_data: libsqlStreamResErrData | {
server_message: libsqlPipelineResErr;
kind: "LIBSQL_SERVER_ERROR";
error_data: {
server_message: string;
http_status_code: number;
http_status_text: string;
};
} | {
kind: "LIBSQL_RESPONSE_ERROR";
error_data: libsqlStreamResErrData;
};

@@ -25,3 +28,3 @@ export type libsqlPipelineReq = {

};
export type libsqlPipelineResOk = {
export type libsqlPipelineRes = {
baton: string | null;

@@ -31,5 +34,2 @@ base_url: string | null;

};
export type libsqlPipelineResErr = string | {
error: string;
};
export type libsqlCloseStreamReq = {

@@ -36,0 +36,0 @@ type: "close";

{
"name": "libsql-stateless",
"version": "2.5.10",
"version": "2.6.0",
"homepage": "https://github.com/DaBigBlob/libsql-stateless#readme",

@@ -5,0 +5,0 @@ "repository": {

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