Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@prisma/adapter-libsql
Advanced tools
Prisma driver adapter for Turso and libSQL. Refer to the announcement blog post and our docs for more details.
Note: Support for Turso is available in Early Access from Prisma versions 5.4.2 and later.
To get started, enable the driverAdapters
Preview feature flag in your Prisma schema:
// schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
datasource db {
provider = "sqlite"
url = "file:./dev.db"
}
Generate Prisma Client:
npx prisma generate
Install the libSQL database client and Prisma driver adapter for libSQL packages:
npm install @prisma/adapter-libsql
npm install @libsql/client
Update your Prisma Client instance to use the libSQL database Client:
// Import needed packages
import { PrismaClient } from '@prisma/client'
import { PrismaLibSQL } from '@prisma/adapter-libsql'
import { createClient } from '@libsql/client'
// Setup
const connectionString = `${process.env.TURSO_DATABASE_URL}`
const authToken = `${process.env.TURSO_AUTH_TOKEN}`
// Init prisma client
const libsql = createClient({
url: connectionString,
authToken,
})
const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
The above setup uses a single remote Turso database. You can take this a step further by setting up remote replicas and embedded replicas with Turso.
Refer to our docs to learn how to manage schema changes when using Prisma and Turso.
We encourage you to create an issue if you find something missing or run into a bug.
If you have any feedback, leave a comment in this GitHub discussion.
FAQs
Prisma's driver adapter for libSQL and Turso
The npm package @prisma/adapter-libsql receives a total of 1,959 weekly downloads. As such, @prisma/adapter-libsql popularity was classified as popular.
We found that @prisma/adapter-libsql 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.