@trycompai/db 1.0.0 → 1.0.3

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/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
2
2
  import { PrismaClient } from '@prisma/client';
3
+ export { Prisma, PrismaClient } from '@prisma/client';
3
4
 
4
5
  declare const db: PrismaClient<{
5
6
  datasourceUrl: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
2
2
  import { PrismaClient } from '@prisma/client';
3
+ export { Prisma, PrismaClient } from '@prisma/client';
3
4
 
4
5
  declare const db: PrismaClient<{
5
6
  datasourceUrl: string | undefined;
package/dist/index.js CHANGED
@@ -20,10 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ PrismaClient: () => import_client2.PrismaClient,
23
24
  db: () => db
24
25
  });
25
26
  module.exports = __toCommonJS(index_exports);
26
27
  var import_client = require("@prisma/client");
28
+ var import_client2 = require("@prisma/client");
27
29
  var createPrismaClient = () => {
28
30
  return new import_client.PrismaClient({
29
31
  datasourceUrl: process.env.DATABASE_URL,
@@ -35,5 +37,6 @@ var db = globalForPrisma.prisma ?? createPrismaClient();
35
37
  if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = db;
36
38
  // Annotate the CommonJS export names for ESM import in node:
37
39
  0 && (module.exports = {
40
+ PrismaClient,
38
41
  db
39
42
  });
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  // src/index.ts
2
2
  import { PrismaClient } from "@prisma/client";
3
+ import { PrismaClient as PrismaClient2 } from "@prisma/client";
3
4
  var createPrismaClient = () => {
4
5
  return new PrismaClient({
5
6
  datasourceUrl: process.env.DATABASE_URL,
@@ -10,5 +11,6 @@ var globalForPrisma = globalThis;
10
11
  var db = globalForPrisma.prisma ?? createPrismaClient();
11
12
  if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = db;
12
13
  export {
14
+ PrismaClient2 as PrismaClient,
13
15
  db
14
16
  };
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@trycompai/db",
3
- "version": "1.0.0",
4
3
  "description": "Database package with Prisma client and schema for Comp AI",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
8
- "files": [
9
- "dist/**",
10
- "prisma/**",
11
- "README.md"
12
- ],
4
+ "version": "1.0.3",
5
+ "dependencies": {
6
+ "@prisma/client": "6.9.0",
7
+ "prisma": "6.9.0"
8
+ },
9
+ "devDependencies": {
10
+ "@trycompai/tsconfig": "workspace:*",
11
+ "ts-node": "^10.9.2",
12
+ "tsup": "^8.5.0",
13
+ "typescript": "^5.8.3"
14
+ },
13
15
  "exports": {
14
16
  ".": {
15
17
  "types": "./dist/index.d.ts",
@@ -27,49 +29,63 @@
27
29
  "require": "./dist/client.js"
28
30
  }
29
31
  },
32
+ "files": [
33
+ "dist/**",
34
+ "prisma/**",
35
+ "README.md"
36
+ ],
37
+ "keywords": [
38
+ "comp-ai",
39
+ "database",
40
+ "postgresql",
41
+ "prisma"
42
+ ],
43
+ "license": "MIT",
44
+ "main": "./dist/index.js",
45
+ "module": "./dist/index.mjs",
46
+ "prisma": {
47
+ "schema": "prisma",
48
+ "seed": "ts-node prisma/seed/seed.ts"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/comp-ai/comp.git",
56
+ "directory": "packages/db"
57
+ },
30
58
  "scripts": {
31
- "build": "tsup src/index.ts src/types.ts --format cjs,esm --dts && bun run db:generate",
59
+ "build": "bun run db:generate && tsup",
32
60
  "clean": "rm -rf .turbo node_modules dist",
33
61
  "db:generate": "bunx prisma generate",
34
62
  "db:migrate": "bunx prisma migrate dev",
35
63
  "db:push": "bunx prisma db push",
36
64
  "db:seed": "bunx prisma db seed",
37
65
  "db:studio": "bunx prisma studio",
38
- "dev": "tsup src/index.ts src/types.ts --format cjs,esm --watch --dts",
66
+ "dev": "tsup --watch",
39
67
  "docker:clean": "docker-compose down -v",
40
68
  "docker:down": "docker-compose down",
41
69
  "docker:up": "docker-compose up -d",
42
70
  "lint": "prettier --check 'src/**/*.{ts,tsx,js,jsx,json}' 'prisma/**/*.prisma' && tsc --noEmit",
43
71
  "postbuild": "cp -r prisma dist/ || echo 'No prisma directory to copy'",
72
+ "postinstall": "prisma generate",
44
73
  "typecheck": "tsc --noEmit"
45
74
  },
46
- "dependencies": {
47
- "@prisma/client": "6.9.0"
48
- },
49
- "devDependencies": {
50
- "@comp/tsconfig": "workspace:*",
51
- "prisma": "^6.9.0",
52
- "ts-node": "^10.9.2",
53
- "tsup": "^8.5.0",
54
- "typescript": "^5.8.3"
55
- },
56
- "prisma": {
57
- "schema": "prisma",
58
- "seed": "ts-node prisma/seed/seed.ts"
75
+ "tsup": {
76
+ "entry": [
77
+ "src/index.ts",
78
+ "src/types.ts"
79
+ ],
80
+ "format": [
81
+ "cjs",
82
+ "esm"
83
+ ],
84
+ "dts": true,
85
+ "clean": true,
86
+ "external": [
87
+ "@prisma/client"
88
+ ]
59
89
  },
60
- "keywords": [
61
- "prisma",
62
- "database",
63
- "postgresql",
64
- "comp-ai"
65
- ],
66
- "repository": {
67
- "type": "git",
68
- "url": "git+https://github.com/comp-ai/comp.git",
69
- "directory": "packages/db"
70
- },
71
- "license": "MIT",
72
- "publishConfig": {
73
- "access": "public"
74
- }
90
+ "types": "./dist/index.d.ts"
75
91
  }