Skip to content

Commit 9c9c0e2

Browse files
author
xyzjesper
committed
updated dependencies. bump version. upgraded prisma. removed tsdoc. removed tsconfig.json and tsc. (bun only)
1 parent 1fd9b2f commit 9c9c0e2

File tree

8 files changed

+322
-371
lines changed

8 files changed

+322
-371
lines changed

.github/workflows/doc.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

bun.lock

Lines changed: 275 additions & 251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"main": "./.build/startup.js",
44
"version": "v.1.6.5.1",
55
"scripts": {
6-
"disbot": "npx prisma migrate deploy && node ./.build/src/main/startup.js",
7-
"disbotdev": "bun run build && node ./.build/src/main/startup.js",
8-
"build": "tsc && bun run setup:prisma",
9-
"setup:prisma": "copyfiles -u 1 \"src/prisma/**/*\" .build/src",
10-
"typedoc": "bun x typedoc --entryPointStrategy Expand src"
6+
"disbot": "npx prisma migrate deploy && bun run src/main/startup.ts",
7+
"disbotdev": "bun run build && bun run src/main/startup.ts",
8+
"build": "bun run setup:prisma",
9+
"setup:prisma": "copyfiles -u 1 \"src/prisma/**/*\" .build/src"
1110
},
1211
"keywords": [
1312
"disbot"
@@ -16,59 +15,54 @@
1615
"description": "DisBot",
1716
"type": "module",
1817
"dependencies": {
19-
"@napi-rs/canvas": "^0.1.77",
20-
"@octokit/core": "^7.0.3",
21-
"@prisma/adapter-pg": "^6.16.3",
22-
"@prisma/client": "^6.14.0",
18+
"@napi-rs/canvas": "^0.1.92",
19+
"@octokit/core": "^7.0.6",
20+
"@prisma/adapter-pg": "^7.4.0",
21+
"@prisma/client": "^6.19.2",
2322
"@top-gg/sdk": "^3.1.6",
2423
"@types/body-parser": "^1.19.6",
2524
"axios": "1.13.5",
26-
"body-parser": "^2.2.0",
25+
"body-parser": "^2.2.2",
2726
"canvacord": "^6.0.4",
28-
"canvas": "^3.2.0",
27+
"canvas": "^3.2.1",
2928
"colors": "^1.4.0",
3029
"copyfiles": "^2.4.1",
31-
"cors": "^2.8.5",
30+
"cors": "^2.8.6",
3231
"discord-html-transcripts": "3.2.0",
3332
"discord-welcome-card": "^4.9.3",
3433
"discord.js": "^14.25.1",
35-
"dotenv": "^17.2.1",
34+
"dotenv": "^17.3.1",
3635
"ejs": "^3.1.10",
37-
"express": "^5.1.0",
38-
"form-data": "^4.0.4",
39-
"mathjs": "^15.1.0",
36+
"express": "^5.2.1",
37+
"form-data": "^4.0.5",
38+
"mathjs": "^15.1.1",
4039
"moment": "^2.30.1",
4140
"ms": "^2.1.3",
4241
"multer": "2.0.2",
4342
"node-fetch": "^3.3.2",
44-
"node-gyp": "^11.4.1",
43+
"node-gyp": "^12.2.0",
4544
"node-superfetch": "^0.3.5",
46-
"nodemon": "^3.1.10",
47-
"prisma": "^6.14.0",
45+
"nodemon": "^3.1.11",
46+
"prisma": "^7.4.0",
4847
"rss-parser": "^3.13.0",
4948
"short-uuid": "^5.2.0",
5049
"topgg-autoposter": "^2.0.2",
51-
"typedoc": "^0.28.10",
52-
"undici": "^7.14.0",
53-
"uuid": "^11.1.0",
54-
"winston": "^3.17.0",
55-
"yaml": "^2.8.1"
50+
"typedoc": "^0.28.17",
51+
"undici": "^7.22.0",
52+
"uuid": "^13.0.0",
53+
"winston": "^3.19.0",
54+
"yaml": "^2.8.2"
5655
},
5756
"devDependencies": {
5857
"@types/bcrypt": "^6.0.0",
5958
"@types/eslint-config-prettier": "^6.11.3",
60-
"@types/express": "^5.0.3",
59+
"@types/express": "^5.0.6",
6160
"@types/ms": "^2.1.0",
6261
"@types/multer": "^2.0.0",
63-
"@types/node": "^24.3.0",
62+
"@types/node": "^25.2.3",
6463
"@types/node-fetch": "^2.6.13",
65-
"@types/uuid": "^10.0.0",
66-
"esbuild": "^0.25.9",
64+
"esbuild": "^0.27.3",
6765
"postcss": "^8.5.6",
68-
"prettier": "^3.6.2",
69-
"tsconfig-paths": "^4.2.0",
70-
"ttypescript": "^1.5.15",
71-
"typescript": "^5.9.2",
72-
"typescript-transform-paths": "^3.5.5"
66+
"prettier": "^3.8.1"
7367
}
7468
}

prisma.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'dotenv/config'
2+
import { defineConfig, env } from 'prisma/config'
3+
4+
export default defineConfig({
5+
schema: 'prisma/schema.prisma',
6+
migrations: {
7+
path: 'prisma/migrations',
8+
},
9+
datasource: {
10+
url: env('POSTGRESQL'),
11+
},
12+
})

prisma/schema.prisma

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// TODO: Database Migrations checks!!!
21
generator client {
3-
provider = "prisma-client-js"
4-
output = "../src/prisma"
5-
binaryTargets = ["native", "rhel-openssl-3.0.x"]
2+
provider = "prisma-client"
3+
output = "../generated/prisma"
4+
engineType = "client"
65
}
76

87
datasource db {
98
provider = "postgresql"
10-
url = env("POSTGRESQL")
119
}
1210

1311
model Guilds {

src/main/database.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ import {initGuildsToDatabase, migrateDataBase, setupDisBotConfig} from "../helpe
66
import {Config} from "./config.js";
77
import * as process from "node:process";
88
import {ExtendedClient} from "../types/ExtendedClient.js";
9+
import {PrismaPg} from "@prisma/adapter-pg";
910

1011
colors.enable();
1112

1213
export let database: PrismaClient = new PrismaClient();
1314

1415
export async function connectToDatabase(client: ExtendedClient) {
1516

16-
const dbClient = new PrismaClient();
17-
await dbClient.$connect().then(() => {
17+
const adapter = new PrismaPg({connectionString: process.env.POSTGRESQL})
18+
const prisma = new PrismaClient({adapter})
19+
await prisma.$connect().then(() => {
1820
Logger.info(
1921
{
2022
guildId: "0",
@@ -31,7 +33,7 @@ export async function connectToDatabase(client: ExtendedClient) {
3133
);
3234
})
3335

34-
database = dbClient;
36+
database = prisma;
3537
}
3638

3739
export async function initDataToDatabase(client: ExtendedClient) {

tsconfig.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

typedoc.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)