@trycompai/db 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { PrismaClient } from './generated/prisma';
2
+ const globalForPrisma = global as unknown as { prisma: PrismaClient };
3
+ export const db = globalForPrisma.prisma || new PrismaClient();
4
+ if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db;
package/dist/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { db } from './client';
package/dist/types.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './generated/prisma';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trycompai/db",
3
3
  "description": "Database package with Prisma client and schema for Comp AI",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "dependencies": {
6
6
  "@prisma/client": "^6.13.0"
7
7
  },
@@ -16,6 +16,9 @@
16
16
  },
17
17
  "files": [
18
18
  "dist/schema.prisma",
19
+ "dist/client.ts",
20
+ "dist/index.ts",
21
+ "dist/types.ts",
19
22
  "README.md",
20
23
  "INTEGRATION_GUIDE.md"
21
24
  ],