- Remove unused biome suppression comment in completions.ts - Remove unnecessary if condition in execute-bootstrap.test.ts - Add eslint-disable comments for any type assertions in client.test.ts - Add eslint-disable comments for expect().rejects patterns - Fix template literal number expression with toString() - Fix error handling in test-db.ts to avoid object stringify Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@reviq/db
Database client and helper functions for the RevIQ platform.
Usage
import { createDb } from "@reviq/db";
const db = createDb(process.env.DATABASE_URL);
// Use db with Kysely queries
const users = await db.selectFrom("users").selectAll().execute();
// Clean up when done
await db.destroy();
Exports
Client
createDb(url)- Create a Kysely database instance
Helper Functions
executeBootstrap(trx, input)- Bootstrap a new database with superuser and orggenerateToken()- Generate an API tokenhashToken(token)- Hash a token for storageparseToken(token)- Parse and validate a tokenTOKEN_PREFIX- Thereviq_prefix for API tokens
Types
Database- Re-exported from@reviq/db-schemaBootstrapInput/BootstrapResult- Types for bootstrap operation