npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flowpanel/adapter-prisma

v0.2.0

Published

Prisma ORM adapter for FlowPanel

Readme

@flowpanel/adapter-prisma

Prisma ORM adapter for FlowPanel — runtime DMMF introspection, no codegen.

npm

Most users import from @flowpanel/kit/prisma (umbrella subpath).

Use

import { prismaAdapter } from "@flowpanel/kit/prisma";
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

export default defineAdmin({
  adapter: prismaAdapter({ prisma, provider: "postgresql" }),
  resources: [
    resource("User", { columns: ["email", "role"] }),
  ],
});

provider is the datasource provider from your schema.prisma"postgresql", "mysql" or "sqlite". Migrations lock and split SQL differently per provider, so the adapter will not guess it.

Prisma.dmmf resolves at runtime — no generator step beyond the standard prisma generate. Pass dmmf explicitly if you've vendored or trimmed it.

What it implements

  • Full CRUD via Prisma delegate methods (prisma.user.findMany / findUnique / create / update / delete / count)
  • Soft-delete + restore via ctx.softDelete.column
  • Insensitive search (Postgres only — Prisma silently ignores mode: "insensitive" on MySQL/SQLite)
  • ID coercion: string ctx.id is parsed to Int / BigInt for numeric PKs at the adapter boundary, with descriptive errors on NaN
  • applyMigration / listAppliedMigrations for flowpanel migrate, plus the compatibility runMigrationSql / markMigrationApplied hooks

Migrations

applyMigration serializes migrators at the database and rechecks the ID under that lock, so a second flowpanel migrate never replays a file.

  • PostgreSQL — an advisory lock, the recheck, every statement and the applied marker in one transaction.
  • SQLite — the same, behind the database write lock the transaction takes on its first write.
  • MySQL — DDL commits implicitly, so nothing can roll an arbitrary file back. The adapter claims a durable row in _flowpanel_migration_claims instead. The claim serializes migrators, outlives a crashed one, and records the statement a failed run stopped at; later runs refuse that ID until you repair the schema and delete the row, so a half-applied file is never silently retried.

Review and back up production migrations, and keep MySQL DDL restart-safe.

The adapter safely splits ordinary multi-statement SQL, including quoted values, comments, identifiers, and PostgreSQL dollar-quoted bodies. Dialect-specific procedural scripts such as SQLite/MySQL triggers and stored procedures are rejected before execution unless their body is PostgreSQL dollar-quoted, and so are MySQL executable comments and client directives such as DELIMITER, SOURCE and .read. Apply those through the ORM's native migration workflow; FlowPanel never marks a rejected file applied.

Peer dependency

@prisma/client >=5.0.0 <7.0.0 (optional peer — only required if you use this adapter).

Documentation

https://flowpanel.tech

License

MIT