libsql-stateless
Advanced tools
Comparing version 2.8.5 to 2.8.6
@@ -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 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.5", | ||
"version": "2.8.6", | ||
"description": "thin libSQL stateless http driver for TypeScript and JavaScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/DaBigBlob/libsql-stateless#readme", |
@@ -8,3 +8,3 @@ # libsql-stateless | ||
- ✅ **Has no premature optimizations.** | ||
- ✅ **Is extremely light:** 1.16kB (unpacked)* | ||
- ✅ **Is extremely light:** 1.16kB (unpacked)* / 635B (gzipped) | ||
- ✅ Unlike `@libsql/client/web`, **every function performs complete execution in exactly 1 roundtrip.** | ||
@@ -11,0 +11,0 @@ - ✅ **Is built for:** Quick stateless query execution. (Mainly for serverless and edge functions.) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12125