UNPKG

@electric-sql/cli

Version:

ElectricSQL command line interface (CLI).

34 lines (33 loc) 1.14 kB
import { type Config } from '../config.js'; export declare const defaultPollingInterval = 1000; export interface GeneratorOptions { watch?: boolean; pollingInterval?: number; withMigrations?: string; debug?: boolean; exitOnError?: boolean; config: Config; } export declare function generate(options: GeneratorOptions): Promise<void>; /** * Generates the Electric client and the Prisma clients based off of the provided * introspected Prisma schema. * NOTE: exported for testing purposes only, not intended for external uses * @param prismaSchema path to the introspected Prisma schema * @param clientPath path to the directory where the client should be generated */ export declare function generateClient(prismaSchema: string, clientPath: string): Promise<void>; /** * @param lines Individual lines of the Prisma schema * @returns The modified lines. */ export declare function doCapitaliseTableNames(lines: string[]): string[]; export type Attribute = { type: `@${string}`; args: Array<string>; }; export type Field = { field: string; type: string; attributes: Array<Attribute>; };