Browse modulesPersistenceFunctions
Function: findPrismaDir()
function findPrismaDir(startingDir: string): string;Defined in: server/persistence/utils/prisma-paths.ts:18
Walk upward from startingDir looking for a sibling prisma/ directory
that contains schema.prisma. Features ship their Prisma artifacts
alongside their compiled output, and callers invoke this from the file
that needs to locate them (typically via
dirname(fileURLToPath(import.meta.url))).
Works across the three layouts a feature can run from:
- Package-local build (
packages/<layer>/<name>/dist/server/…) - Published package (
node_modules/@the-kaizen-labs/taproot/dist/<layer>/<name>/…) - Source (
packages/<layer>/<name>/src/…)
Parameters
| Parameter | Type |
|---|---|
startingDir | string |
Returns
string