const { PrismaBetterSqlite3 } = require('@prisma/adapter-better-sqlite3');
const path = require('path');

async function check() {
    console.log('--- Prisma Adapter Diagnostic ---');
    const factory = new PrismaBetterSqlite3({ url: 'file:./dev.db' });

    console.log('Factory Properties:');
    console.log(Object.keys(factory));
    console.log('Factory.adapterName:', factory.adapterName);
    console.log('Factory.provider:', factory.provider);

    try {
        const adapter = await factory.connect();
        console.log('\nAdapter Properties:');
        console.log(Object.keys(adapter));
        console.log('Adapter name:', adapter.adapterName);
        console.log('Adapter provider:', adapter.provider);

        // Also check if there are hidden/prototype properties
        let proto = Object.getPrototypeOf(adapter);
        console.log('Adapter Prototype Properties:', Object.getOwnPropertyNames(proto));

    } catch (e) {
        console.error('Failed to connect:', e);
    }
}

check();
