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

libsql-stateless

Package Overview
Dependencies
Maintainers
0
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.8.6 to 2.9.0

14

dist/main.d.ts

@@ -11,3 +11,3 @@ type libsqlResult<T, E> = {

authToken?: string;
fetch?: typeof fetch;
fetch?: libsqlFetchLike;
};

@@ -22,2 +22,12 @@ type libsqlError = {

};
type libsqlFetchLike = (input: string, init?: {
body?: string;
headers?: Record<string, string>;
method?: 'POST' | 'GET';
}) => Promise<{
readonly ok: boolean;
readonly status: number;
json(): Promise<any>;
text(): Promise<string>;
}>;
type libsqlPipelineReq = {

@@ -155,2 +165,2 @@ baton: string | null;

export { libsqlBatch, type libsqlBatchReqStep, type libsqlBatchReqStepExecCond, type libsqlBatchStreamReq, type libsqlBatchStreamResOk, type libsqlBatchStreamResOkData, type libsqlCloseStreamReq, type libsqlCloseStreamResOk, type libsqlConfig, type libsqlError, libsqlExecute, type libsqlExecuteStreamReq, type libsqlExecuteStreamResOk, type libsqlPipelineReq, type libsqlPipelineRes, type libsqlResult, type libsqlSQLColumnElm, type libsqlSQLStatement, type libsqlSQLValue, libsqlServerCompatCheck, type libsqlStatementResOkData, type libsqlStreamResErr, type libsqlStreamResErrData, type libsqlStreamResOk };
export { libsqlBatch, type libsqlBatchReqStep, type libsqlBatchReqStepExecCond, type libsqlBatchStreamReq, type libsqlBatchStreamResOk, type libsqlBatchStreamResOkData, type libsqlCloseStreamReq, type libsqlCloseStreamResOk, type libsqlConfig, type libsqlError, libsqlExecute, type libsqlExecuteStreamReq, type libsqlExecuteStreamResOk, type libsqlFetchLike, type libsqlPipelineReq, type libsqlPipelineRes, type libsqlResult, type libsqlSQLColumnElm, type libsqlSQLStatement, type libsqlSQLValue, libsqlServerCompatCheck, type libsqlStatementResOkData, type libsqlStreamResErr, type libsqlStreamResErrData, type libsqlStreamResOk };

2

dist/main.js

@@ -1,3 +0,3 @@

async function r(e){let s=await(e.conf.fetch??globalThis.fetch)(`${e.conf.db_url}/v3/pipeline`,{method:"POST",headers:e.conf.authToken?{Authorization:"Bearer "+e.conf.authToken}:void 0,body:JSON.stringify(e.req_json)});return s.ok?{isOk:!0,val:await s.json()}:{isOk:!1,err:{kind:"LIBSQL_SERVER_ERROR",server_message:await(async()=>{try{return await s.text()}catch{return null}})(),http_status_code:s.status}}}async function i(e,s){let t=await r({conf:e,req_json:{baton:null,requests:[{type:"execute",stmt:s},{type:"close"}]}});if(t.isOk){let l=t.val.results[0];return l.type=="ok"?{isOk:!0,val:l.response.result}:{isOk:!1,err:{kind:"LIBSQL_RESPONSE_ERROR",data:l.error}}}else return t}async function a(e,s){let t=await r({conf:e,req_json:{baton:null,requests:[{type:"batch",batch:{steps:s}},{type:"close"}]}});if(t.isOk){let l=t.val.results[0];return l.type=="ok"?{isOk:!0,val:l.response.result}:{isOk:!1,err:{kind:"LIBSQL_RESPONSE_ERROR",data:l.error}}}else return t}async function n(e){return (await fetch(`${e.db_url}/v3`,{method:"GET"})).ok?{isOk:!0,val:null}:{isOk:!1,err:null}}
async function r(e){let s=await(e.conf.fetch??globalThis.fetch)(`${e.conf.db_url}/v3/pipeline`,{method:"POST",headers:e.conf.authToken?{Authorization:"Bearer "+e.conf.authToken}:void 0,body:JSON.stringify(e.req_json)});return s.ok?{isOk:!0,val:await s.json()}:{isOk:!1,err:{kind:"LIBSQL_SERVER_ERROR",server_message:await(async()=>{try{return await s.text()}catch{return null}})(),http_status_code:s.status}}}async function i(e,s){let t=await r({conf:e,req_json:{baton:null,requests:[{type:"execute",stmt:s},{type:"close"}]}});if(t.isOk){let l=t.val.results[0];return l.type=="ok"?{isOk:!0,val:l.response.result}:{isOk:!1,err:{kind:"LIBSQL_RESPONSE_ERROR",data:l.error}}}else return t}async function a(e,s){let t=await r({conf:e,req_json:{baton:null,requests:[{type:"batch",batch:{steps:s}},{type:"close"}]}});if(t.isOk){let l=t.val.results[0];return l.type=="ok"?{isOk:!0,val:l.response.result}:{isOk:!1,err:{kind:"LIBSQL_RESPONSE_ERROR",data:l.error}}}else return t}async function n(e){return (await(e.fetch??globalThis.fetch)(`${e.db_url}/v3`,{method:"GET"})).ok?{isOk:!0,val:null}:{isOk:!1,err:null}}
export { a as libsqlBatch, i as libsqlExecute, n as libsqlServerCompatCheck };
{
"name": "libsql-stateless",
"version": "2.8.6",
"version": "2.9.0",
"description": "thin libSQL stateless http driver for TypeScript and JavaScript",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/DaBigBlob/libsql-stateless#readme",

Sorry, the diff of this file is not supported yet

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