From 9d13bf2a01776ec907677932bfeb2f2957b109a4 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Fri, 17 Nov 2023 14:48:03 +0545 Subject: [PATCH] Fix postinstall and type errors --- dist/index.d.ts | 9 --------- package.json | 6 +++--- prisma/schema.prisma | 2 +- src/index.d.ts | 2 +- 4 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 dist/index.d.ts diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index bd0e242..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PrismaClient } from "@prisma/client"; - -export function createContext(ctx: any): Promise; - -export * from ".prisma/client/index.d"; - -export interface Context { - prisma: PrismaClient; -} \ No newline at end of file diff --git a/package.json b/package.json index 15f7759..1f308c0 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,13 @@ "name": "@continuum-ai/database", "version": "0.0.1", "module": "./src/index.ts", - "types": "./dist/index.d.ts", + "types": "./src/index.d.ts", "type": "module", "scripts": { "db:introspect": "dotenv -- prisma introspect", - "db:generate": "dotenv -- prisma generate" + "db:generate": "dotenv -- prisma generate", + "postinstall": "bunx prisma generate" }, - "postinstall": "tsc && cp src/index.d.ts dist/index.d.ts && bunx prisma generate", "peerDependencies": { "typescript": "^5.0.0" }, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bdb3fb5..b3491e9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -3,7 +3,7 @@ generator client { provider = "prisma-client-js" - binaryTargets = ["native"] + binaryTargets = ["native", "debian-openssl-1.1.x"] } datasource db { diff --git a/src/index.d.ts b/src/index.d.ts index bd0e242..c2b49b7 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -2,7 +2,7 @@ import { PrismaClient } from "@prisma/client"; export function createContext(ctx: any): Promise; -export * from ".prisma/client/index.d"; +export * from "@prisma/client"; export interface Context { prisma: PrismaClient;