
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@libsql/kysely-libsql
Advanced tools
A Kysely dialect for libSQL/sqld, using the Hrana protocol over a WebSocket.
npm install @libsql/kysely-libsql
Pass a LibsqlDialect
instance as the dialect
when creating the Kysely
object:
import { Kysely } from "kysely";
import { LibsqlDialect } from "@libsql/kysely-libsql";
interface Database {
...
}
const db = new Kysely<Database>({
dialect: new LibsqlDialect({
url: "libsql://localhost:8080?tls=0",
authToken: "<token>", // optional
}),
});
Instead of a url
, you can also pass an instance of Client
from @libsql/hrana-client
as client
:
import * as hrana from "@libsql/hrana-client";
// Alternatively, the `kysely-libsql` package reexports the `hrana-client`
//import { hrana } from "@libsql/kysely-libsql";
const client = hrana.open("ws://localhost:2023");
const db = new Kysely<Database>({
dialect: new LibsqlDialect({ client }),
});
// after you are done with the `db`, you must close the `client`:
client.close();
The library accepts the same URL schemas as @libsql/client
except file:
:
http://
and https://
connect to a libsql server over HTTP,ws://
and wss://
connect to the server over WebSockets,libsql://
connects to the server using the default protocol (which is now HTTP). libsql://
URLs use TLS by default, but you can use ?tls=0
to disable TLS (e.g. when you run your own instance of the server locally).Connecting to a local SQLite file using file:
URL is not supported; we suggest that you use the native Kysely dialect for SQLite.
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in @libsql/kysely-libsql
by you, shall be licensed as MIT, without any additional terms or conditions.
FAQs
Kysely dialect for libSQL
The npm package @libsql/kysely-libsql receives a total of 4,265 weekly downloads. As such, @libsql/kysely-libsql popularity was classified as popular.
We found that @libsql/kysely-libsql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.