export async function createSQLiteAdapter(options = {}) {
    const filename = options.filename ?? ':memory:';
    try {
        // @ts-ignore — optional dependency, installed by consumer
        const { PrismaLibSQL } = await import('@prisma/adapter-libsql');
        // @ts-ignore — optional dependency
        const { createClient } = await import('@libsql/client');
        // @ts-ignore — generated at build time
        const { PrismaClient } = await import('../../generated/client.js');
        const client = createClient({ url: `file:${filename}` });
        const adapter = new PrismaLibSQL(client);
        return new PrismaClient({ adapter });
    }
    catch {
        throw new Error('SQLite support requires @libsql/client and @prisma/adapter-libsql. ' +
            'Install them with: pnpm add @libsql/client @prisma/adapter-libsql');
    }
}
//# sourceMappingURL=sqlite.js.map