/** * LibSQL client configuration and factory. */ import type { KernlStorage } from "kernl"; import { type Client } from "@libsql/client"; /** * LibSQL connection configuration. * * Supports: * - Local SQLite files: `file:./data.db` or `file:/path/to/data.db` * - In-memory: `:memory:` * - Remote Turso: `libsql://your-db.turso.io` */ export type LibSQLConnectionConfig = { client: Client; } | { url: string; authToken?: string; }; /** * LibSQL storage configuration. */ export type LibSQLConfig = LibSQLConnectionConfig; /** * Create a LibSQL storage adapter for Kernl. * * @example Local file * ```ts * const storage = libsql({ url: 'file:./kernl.db' }); * ``` * * @example In-memory (for testing) * ```ts * const storage = libsql({ url: ':memory:' }); * ``` * * @example Remote Turso * ```ts * const storage = libsql({ * url: 'libsql://your-db.turso.io', * authToken: process.env.TURSO_AUTH_TOKEN * }); * ``` */ export declare function libsql(config: LibSQLConfig): KernlStorage; //# sourceMappingURL=client.d.ts.map