/** * Shared construction of the direct-ORM-write regexes used by the governance * detectors. * * The receiver identifier (the client variable the write is called on) was * historically hardcoded as `prisma`. Consumers that re-export their client * under a different name (e.g. `database.user.create`) were invisible to the * detectors. `writeReceiver` on DetectorContext makes this configurable while * defaulting to `prisma` so existing behavior is unchanged. * * In addition to Prisma-style `..(`, the detector set * also matches Drizzle (`insert`/`update`/`delete`), Kysely (`insertInto` / * `updateTable` / `deleteFrom`), and raw SQL template literals that contain * INSERT/UPDATE/DELETE (2026-07-15). */ export declare const DEFAULT_WRITE_RECEIVER = "prisma"; /** * Matches `..(` and captures the write method in * group 1. Non-global (first match wins) — used by the direct-writes detector. */ export declare function buildDirectWriteRegex(receiver?: string): RegExp; /** * Matches `..(` and captures the model in group 1 * and the method in group 2. Global — used by the unregistered-entity-write * detector to enumerate every write in a file. */ export declare function buildEntityWriteRegex(receiver?: string): RegExp; export type DirectWriteFlavor = 'prisma' | 'drizzle' | 'kysely' | 'raw-sql'; export interface DirectWriteMatch { flavor: DirectWriteFlavor; /** Short label for the finding message (e.g. `prisma.create`, `drizzle.insert`). */ label: string; } /** * Collects every direct-write shape for a configured receiver: Prisma-style * model methods, Drizzle insert/update/delete, Kysely insertInto/updateTable/ * deleteFrom, and raw SQL template literals with DML verbs. */ export declare class DirectWriteScanner { private readonly receiver; constructor(receiver?: string); scan(content: string): DirectWriteMatch[]; } //# sourceMappingURL=write-receiver.d.ts.map