![Understanding the Security Concerns of npm Shrinkwrap](https://cdn.sanity.io/images/cgdhsj6q/production/37156cfb4523f411022d98b3b06138985ac81496-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Understanding the Security Concerns of npm Shrinkwrap
Explore the security risks of using npm shrinkwrap, the potential for outdated dependencies, and best practices for mitigating these concerns in your projects.
libsql-stateless-easy
Advanced tools
Readme
A wrapper for
libsql-stateless
that provides a much better DX
@libsql/client
except (explicit) transactions
and local or in-memory DBs.libsql-stateless-easy
is simple and (almost) exactly the same as @libsql/client
.libsql-stateless-easy
comes with the cost of (computational and memory) overheads potentially unneeded by you. But is still very very very slim compared to @libsql/client
.For much better performance, consider using libsql-stateless
instead: it, however, has a pretty raw and explicit API unappreciated by many developers.
$ npm i libsql-stateless-easy #pnpm, yarn, etc.
# or
$ bun add libsql-stateless-easy
libsql-stateless-easy
's client
's batch
and execute
have the exact same API as @libsql/client/web
's client
's batch
and execute
.
import { createClient } from "libsql-stateless-easy";
//or
const { createClient } = require("libsql-stateless-easy");
const client = createClient({
db_url: "https://da-fish-mandible.turso.io",
authToken: "fksdgfgksdgfksdg.javsdKDGKSBkgsdfg289374dg"
});
const res = await client.batch([
{
sql: "select * from contacts where contact_id = ?;",
args: [3]
},
"select first_name, last_name, email from contacts where contact_id = 2",
{
sql: "insert into contacts (contact_id,first_name,last_name,email,phone) values (?,?,?,?,?);",
args: [6,"glomm","feru","moca@doro.co","001"]
},
{
sql: "delete from contacts where contact_id = :kkl",
args: {kkl: 6}
}
]);
console.log(res);
const res2 = await client.execute({
sql: "select first_name, last_name, email, contact_id from contacts where contact_id = ?;",
args: [1]
});
console.log(res2);
const res3 = await client.serverOk();
if (res3) console.log("Server Compat Check OK");
else console.error("Server Compat Check NOT OK");
LibsqlError
API as @libsql/client
I'll complete it when I have more time.
Feel free to explore them (or even contribute to the documentation!)
import {
libsqlValueBuilder, libsqlStatementBuilder, libsqlBatchReqStepsBuilder,
libsqlBatchReqStepExecCondBuilder, libsqlValueParser, libsqlStatementResParser,
libsqlBatchStreamResParser,
libsqlExecute, //has easier API than `libsql-stateless`'s function of the same name
libsqlBatch, //has easier API than `libsql-stateless`'s function of the same name
libsqlServerCompatCheck, //has easier API than `libsql-stateless`'s function of the same name
createClient //used above
} from "libsql-stateless-easy";
FAQs
thin libSQL stateless http driver for TypeScript and JavaScript but easy
We found that libsql-stateless-easy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Explore the security risks of using npm shrinkwrap, the potential for outdated dependencies, and best practices for mitigating these concerns in your projects.
Security News
Node.js is taking steps towards removing Corepack from its distribution, aiming for changes in the next major release.
Security News
OpenSSF has released a guide to help package repositories adopt Trusted Publishers, which enhances security by using short-lived identity tokens for authentication, reducing the risks associated with long-lived secrets.