Detects schema files and checks for drift across multiple ORMs.
// Source: https://github.com/gsd-build/get-shit-done | License: MIT | Copyright 2025 Lex Christopherson
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Schema drift detection — ports `get-shit-done/bin/lib/schema-detect.cjs`.
* Used by `verify.schema-drift` to match gsd-tools.cjs JSON output.
*/
// ─── ORM patterns ─────────────────────────────────────────────────────────
const SCHEMA_PATTERNS: Array<{ pattern: RegExp; orm: string }> = [
{ pattern: /^src\/collections\/.*\.ts$/, orm: 'payload' },
{ pattern: /^src\/globals\/.*\.ts$/, orm: 'payload' },
{ pattern: /^prisma\/schema\.prisma$/, orm: 'prisma' },
{ pattern: /^prisma\/schema\/.*\.prisma$/, orm: 'prisma' },
{ pattern: /^drizzle\/schema\.ts$/, orm: 'drizzle' },
{ pattern: /^src\/db\/schema\.ts$
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key