build(arabot): update deps

This commit is contained in:
Anthony
2024-06-27 11:23:09 +02:00
parent bd87a8b6c6
commit 19721c10ea
5 changed files with 1354 additions and 1874 deletions

View File

@@ -12,7 +12,6 @@ POSTGRES_DB=DB
# Redis # Redis
REDIS_URL= # URL to redis database (if running everything within docker compose, use "redis") REDIS_URL= # URL to redis database (if running everything within docker compose, use "redis")
BULLMQ_URL # URL for redis database, but without redis:// and credentials
# Database URL (designed for Postgres, but designed on Prisma) # Database URL (designed for Postgres, but designed on Prisma)
DATABASE_URL= # "postgresql://USERNAME:PASSWORD@postgres:5432/DB?schema=ara&sslmode=prefer" DATABASE_URL= # "postgresql://USERNAME:PASSWORD@postgres:5432/DB?schema=ara&sslmode=prefer"

View File

@@ -1,4 +1,4 @@
FROM node:20 AS base FROM node:22 AS base
# PNPM # PNPM
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"

View File

@@ -31,33 +31,33 @@
"homepage": "https://github.com/veganhacktivists/arabot#readme", "homepage": "https://github.com/veganhacktivists/arabot#readme",
"engines": { "engines": {
"node": ">=20", "node": ">=20",
"pnpm": ">=8" "pnpm": ">=9"
}, },
"packageManager": "pnpm@9.4.0",
"dependencies": { "dependencies": {
"@prisma/client": "^5.11.0", "@prisma/client": "^5.16.0",
"@sapphire/discord.js-utilities": "^7.1.6", "@sapphire/discord.js-utilities": "^7.3.0",
"@sapphire/framework": "^5.0.7", "@sapphire/framework": "^5.2.1",
"@sapphire/plugin-logger": "^4.0.2", "@sapphire/plugin-logger": "^4.0.2",
"@sapphire/plugin-scheduled-tasks": "^10.0.1", "@sapphire/plugin-scheduled-tasks": "^10.0.1",
"@sapphire/plugin-subcommands": "^6.0.3", "@sapphire/plugin-subcommands": "^6.0.3",
"@sapphire/stopwatch": "^1.5.2", "@sapphire/stopwatch": "^1.5.2",
"@sapphire/time-utilities": "^1.7.12", "@sapphire/time-utilities": "^1.7.12",
"@sapphire/ts-config": "^5.0.1", "@sapphire/ts-config": "^5.0.1",
"@sapphire/utilities": "^3.15.3", "@sapphire/utilities": "^3.16.2",
"@types/node": "^20.11.26", "bullmq": "^5.8.2",
"bullmq": "^5.4.2", "discord.js": "^14.15.3",
"discord.js": "^14.14.1", "ioredis": "^5.4.1",
"redis": "^4.6.13",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.4.2" "typescript": "~5.4.5"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0", "@typescript-eslint/parser": "^6.21.0",
"eslint": "8.56.0", "eslint": "8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"ioredis": "^5.3.2",
"prettier": "3.2.4", "prettier": "3.2.4",
"prisma": "^5.11.0" "prisma": "^5.16.0"
} }
} }

3188
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,8 +25,7 @@ import { LogLevel, SapphireClient, container } from '@sapphire/framework';
import '@sapphire/plugin-scheduled-tasks/register'; import '@sapphire/plugin-scheduled-tasks/register';
import '@sapphire/plugin-logger/register'; import '@sapphire/plugin-logger/register';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
import { createClient } from 'redis'; import { Redis } from 'ioredis';
import type { RedisClientType } from 'redis';
// Setting up the Sapphire client // Setting up the Sapphire client
const client = new SapphireClient({ const client = new SapphireClient({
@@ -50,7 +49,7 @@ const client = new SapphireClient({
tasks: { tasks: {
bull: { bull: {
connection: { connection: {
host: process.env.BULLMQ_URL, host: process.env.REDIS_URL,
}, },
}, },
}, },
@@ -64,10 +63,10 @@ const main = async () => {
// Create databases // Create databases
container.database = await new PrismaClient(); container.database = await new PrismaClient();
container.redis = createClient({ container.redis = new Redis({
url: process.env.REDIS_URL, host: process.env.REDIS_URL,
db: 1
}); });
await container.redis.connect();
// Log the bot in to Discord // Log the bot in to Discord
await client.login(token); await client.login(token);
@@ -83,7 +82,7 @@ const main = async () => {
declare module '@sapphire/pieces' { declare module '@sapphire/pieces' {
interface Container { interface Container {
database: PrismaClient; database: PrismaClient;
redis: RedisClientType; redis: Redis;
} }
} }