Only run `prisma generate` if the prisma client hasn't been generated
What is the problem?
The current implementation creates a temporary blitz-prisma-status.json file in the temp directory and checks every time the prisma schema file has been changed.
We can drastically simplify this, by instead just checking if the prisma client files have been generated. We don't need to check every time the schema file has been changed since it's expected to migrate which leads to generating the update prisma client.
We also need to account for projects that are in monorepos.
Just need to replace this https://github.com/siddhsuresh/blitz/blob/7224bce90a244d739fd5f891f76cffbe58563bf9/packages/blitz/src/cli/utils/codegen-tasks.ts#L42-L53 with potentially a require.resolve for the prisma client file.
Paste all relevant code snippets here:
Something to try, instead of looking for directly in the node_modules directory.
We should be able todo a require.resolve but something to keep note is how pnpm handles hoisting and directory structure. We may need to traverse outside the .pnpm directory found in the root of node_modules.