refactor: Remove kysely as its unused (#20817)
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
# Generated dynamically based on Prisma schema
|
||||
types.ts
|
||||
@@ -1 +0,0 @@
|
||||
# kysely
|
||||
@@ -1,20 +0,0 @@
|
||||
import { Kysely, PostgresDialect } from "kysely";
|
||||
import { Pool } from "pg";
|
||||
|
||||
import type { DB } from "./types.ts";
|
||||
|
||||
const dialect = new PostgresDialect({
|
||||
pool: new Pool({
|
||||
database: "calendso",
|
||||
host: "localhost",
|
||||
user: "postgres",
|
||||
password: "postgres",
|
||||
port: 5450,
|
||||
}),
|
||||
});
|
||||
|
||||
const db = new Kysely<DB>({
|
||||
dialect,
|
||||
});
|
||||
|
||||
export default db;
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "@calcom/kysely",
|
||||
"private": true,
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"kysely": "^0.26.3",
|
||||
"pg": "^8.11.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pg": "^8.10.7"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import type { ExpressionBuilder, StringReference } from "kysely";
|
||||
import { sql } from "kysely";
|
||||
|
||||
export function traverseJSON<DB, TB extends keyof DB>(
|
||||
eb: ExpressionBuilder<DB, TB>,
|
||||
column: StringReference<DB, TB>,
|
||||
path: string | [string, ...string[]]
|
||||
) {
|
||||
if (!Array.isArray(path)) {
|
||||
path = [path];
|
||||
}
|
||||
|
||||
return sql`${sql.ref(column)}->${sql.raw(path.map((item) => `'${item}'`).join("->"))}`;
|
||||
}
|
||||
@@ -30,7 +30,6 @@
|
||||
"@prisma/extension-accelerate": "^0.6.2",
|
||||
"@prisma/generator-helper": "^5.4.2",
|
||||
"prisma": "^5.4.2",
|
||||
"prisma-kysely": "^1.7.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"zod": "^3.22.4",
|
||||
"zod-prisma": "^0.5.4"
|
||||
|
||||
@@ -19,12 +19,6 @@ generator zod {
|
||||
relationModel = "default"
|
||||
}
|
||||
|
||||
generator kysely {
|
||||
provider = "prisma-kysely"
|
||||
output = "../kysely"
|
||||
fileName = "types.ts"
|
||||
}
|
||||
|
||||
generator enums {
|
||||
provider = "ts-node --transpile-only ./enum-generator"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user