diff --git a/knip.json b/knip.json index a4dc87d3..8dfd5cd1 100644 --- a/knip.json +++ b/knip.json @@ -5,10 +5,6 @@ "src/app/**/layout.{ts,tsx}", "src/app/**/route.{ts,tsx}", "src/app/**/{error,not-found,loading,template,default,global-error}.{ts,tsx}", - "src/app/**/actions.{ts,tsx}", - "next.config.ts", - "src/proxy.ts", - "src/instrumentation.ts", "sentry.{server,edge}.config.ts" ], "project": ["src/**/*.{ts,tsx}"], diff --git a/package.json b/package.json index 72e5e467..b6aca5e3 100644 --- a/package.json +++ b/package.json @@ -103,13 +103,10 @@ "babel-plugin-react-compiler": "^1.0.0", "dotenv": "^16.4.0", "eslint": "^10.7.0", - "eslint-config-prettier": "^10.1.8", "eslint-plugin-unused-imports": "^4.4.1", "husky": "^9.1.7", "knip": "^6.27.0", - "lint-staged": "^17.1.0", "pino-pretty": "^13.1.3", - "plausible-tracker": "^0.3.9", "postcss": "^8.5.21", "prisma": "^7.9.0", "tailwindcss": "^4.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cf03e9c..70de946f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -194,9 +194,6 @@ importers: eslint: specifier: ^10.7.0 version: 10.7.0(jiti@2.7.0) - eslint-config-prettier: - specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0(jiti@2.7.0)) eslint-plugin-unused-imports: specifier: ^4.4.1 version: 4.4.1(@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(eslint@10.7.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.7.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.7.0(jiti@2.7.0)) @@ -206,15 +203,9 @@ importers: knip: specifier: ^6.27.0 version: 6.27.0 - lint-staged: - specifier: ^17.1.0 - version: 17.1.0 pino-pretty: specifier: ^13.1.3 version: 13.1.3 - plausible-tracker: - specifier: ^0.3.9 - version: 0.3.9 postcss: specifier: ^8.5.19 version: 8.5.21 @@ -3465,12 +3456,6 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-prettier@10.1.8: - resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - eslint-plugin-unused-imports@4.4.1: resolution: {integrity: sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ==} peerDependencies: @@ -4134,11 +4119,6 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - lint-staged@17.1.0: - resolution: {integrity: sha512-d7UQRu/9ZPgfu4+hu/k0wny5GEaIxo+2jb2LJqQDkE7cHRTm1HGqNUDq5UOwsGPpjpaNAFmgAsYo3TR+i9cSJw==} - engines: {node: '>=22.22.1'} - hasBin: true - loader-runner@4.3.2: resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==} engines: {node: '>=6.11.5'} @@ -4633,11 +4613,6 @@ packages: pkg-types@2.3.1: resolution: {integrity: sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==} - plausible-tracker@0.3.9: - resolution: {integrity: sha512-hMhneYm3GCPyQon88SZrVJx+LlqhM1kZFQbuAgXPoh/Az2YvO1B6bitT9qlhpiTdJlsT5lsr3gPmzoVjb5CDXA==} - engines: {node: '>=10'} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - playwright-core@1.61.1: resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==} engines: {node: '>=18'} @@ -5096,10 +5071,6 @@ packages: streamx@2.28.0: resolution: {integrity: sha512-1Yowhzjf0ivGMrTIkY9hav5TxobO9qIVqUE41fiCGMGgc3CLlf4MY+9AHmZqBWgDTue0fY9zWjYFVyf6Diuobw==} - string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - string-width@2.1.1: resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} engines: {node: '>=4'} @@ -8525,10 +8496,6 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)): - dependencies: - eslint: 10.7.0(jiti@2.7.0) - eslint-plugin-unused-imports@4.4.1(@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(eslint@10.7.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.7.0(jiti@2.7.0))(typescript@5.9.3))(eslint@10.7.0(jiti@2.7.0)): dependencies: eslint: 10.7.0(jiti@2.7.0) @@ -9260,14 +9227,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 - lint-staged@17.1.0: - dependencies: - picomatch: 4.0.5 - string-argv: 0.3.2 - tinyexec: 1.2.4 - optionalDependencies: - yaml: 2.9.0 - loader-runner@4.3.2: {} localforage@1.10.0: @@ -9745,8 +9704,6 @@ snapshots: exsolve: 1.1.0 pathe: 2.0.3 - plausible-tracker@0.3.9: {} - playwright-core@1.61.1: {} playwright@1.61.1: @@ -10305,8 +10262,6 @@ snapshots: - bare-abort-controller - react-native-b4a - string-argv@0.3.2: {} - string-width@2.1.1: dependencies: is-fullwidth-code-point: 2.0.0 diff --git a/src/app/admin/catalog/[id]/catalog-items-table/index.ts b/src/app/admin/catalog/[id]/catalog-items-table/index.ts deleted file mode 100644 index f9e39c92..00000000 --- a/src/app/admin/catalog/[id]/catalog-items-table/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { CatalogItemsTable } from "./catalog-items-table"; -export { FurniIcon } from "./furni-icon"; -export type { BaseItemData, CatalogItemData, InlineEdit } from "./types"; -export { DEFAULT_NEW_ITEM, getPointsLabel, POINTS_TYPES } from "./types"; diff --git a/src/components/home/guest-view.tsx b/src/components/home/guest-view.tsx deleted file mode 100644 index cf9fc3eb..00000000 --- a/src/components/home/guest-view.tsx +++ /dev/null @@ -1,254 +0,0 @@ -import Image from "next/image"; -import Link from "next/link"; -import { headers } from "next/headers"; -import { getTranslations } from "next-intl/server"; -import { HomeLoginForm } from "@/components/auth/home-login-form"; -import { Reveal } from "@/components/motion-reveal"; -import { avatarImageUrl, excerpt } from "@/lib/format"; -import { prisma } from "@/lib/prisma"; -import { captchaConfig } from "@/lib/services/captcha"; -import { siteSettings } from "@/lib/services/site-settings"; - -export default async function GuestView() { - const t = await getTranslations("pages.home"); - const imager = - (await siteSettings.get( - "habbo_imaging_url", - "https://www.habbo.com/habbo-imaging/avatarimage", - )) ?? ""; - const cfg = await captchaConfig(); - const nonce = (await headers()).get("x-nonce") ?? undefined; - - let articles: Array<{ - slug: string; - title: string; - shortStory: string; - image: string; - }> = []; - try { - articles = await prisma.websiteArticles.findMany({ - orderBy: { createdAt: "desc" }, - take: 8, - select: { slug: true, title: true, shortStory: true, image: true }, - }); - } catch {} - - let recentUsers: Array<{ username: string; look: string }> = []; - try { - recentUsers = await prisma.user.findMany({ - orderBy: { lastOnline: "desc" }, - take: 12, - select: { username: true, look: true }, - }); - } catch {} - - return ( -
- -
-
-
-
-
-
-
- -
-
- - -
- Register -
- - REGISTER NOW - -
- - {recentUsers.length > 0 && ( -
-
-

- Recent Users -

-
-
- {recentUsers.map((u) => ( -
- {u.username} -
- ))} -
-
- )} - - - -
-
-

- {t("latestNews") || "Latest News"} -

-
-
- {articles.length === 0 ? ( -

- {t("noArticles")} -

- ) : ( -
- {articles.map((a) => ( - -
- {a.title} -
-

- {a.title} -

- {a.shortStory && ( -

- {excerpt(a.shortStory, 80)} -

- )} -
-
- - ))} -
- )} -
-
-
-
- ); -} diff --git a/src/components/home/user-view.tsx b/src/components/home/user-view.tsx deleted file mode 100644 index 85dcc7ad..00000000 --- a/src/components/home/user-view.tsx +++ /dev/null @@ -1,289 +0,0 @@ -import Image from "next/image"; -import Link from "next/link"; -import { getTranslations } from "next-intl/server"; -import { Reveal } from "@/components/motion-reveal"; -import { avatarImageUrl, excerpt } from "@/lib/format"; -import { resolveHotelName } from "@/lib/hotel-name"; -import { prisma } from "@/lib/prisma"; -import { siteSettings } from "@/lib/services/site-settings"; - -interface UserViewProps { - userId: number; - username: string; - look: string; - motto?: string | null; -} - -export default async function UserView({ - userId, - username, - look, - motto, -}: UserViewProps) { - const t = await getTranslations("pages.home"); - const hotelName = await resolveHotelName(); - const imager = - (await siteSettings.get( - "habbo_imaging_url", - "https://www.habbo.com/habbo-imaging/avatarimage", - )) ?? ""; - - let onlineFriends: Array<{ username: string; look: string }> = []; - try { - const friendships = await prisma.messengerFriendships.findMany({ - where: { OR: [{ userOneId: userId }, { userTwoId: userId }] }, - select: { userOneId: true, userTwoId: true }, - }); - const friendIds = friendships.map((f) => - f.userOneId === userId ? f.userTwoId : f.userOneId, - ); - if (friendIds.length > 0) { - onlineFriends = await prisma.user.findMany({ - where: { id: { in: friendIds }, online: "1" }, - take: 10, - select: { username: true, look: true }, - }); - } - } catch {} - - const [latestArticle] = await prisma.websiteArticles - .findMany({ - orderBy: { createdAt: "desc" }, - take: 1, - select: { slug: true, title: true, shortStory: true, image: true }, - }) - .catch(() => []); - - return ( -
- -
-
-
-
-
-
-
- -
- {username} -
- -
- - {username} - -

- {motto || "Welcome back!"} -

-
-
-
- - - -
-
-
- -
-
- {t("onlineFriends")} -
-
- {onlineFriends.length === 0 ? ( -

- {t("noFriendsOnline")} -

- ) : ( - onlineFriends.map((f) => ( - - {f.username} - - )) - )} -
-
- - - - {latestArticle ? ( -
-
-

- {t("latestArticle")} -

-
- -
- {latestArticle.title} -
-
-

{latestArticle.title}

- {latestArticle.shortStory && ( -

- {excerpt(latestArticle.shortStory, 100)} -

- )} -
- -
- ) : null} -
-
- ); -} diff --git a/src/lib/auth/index.ts b/src/lib/auth/index.ts deleted file mode 100644 index 13851836..00000000 --- a/src/lib/auth/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export { - LaravelEncrypter, - phpSerializeString, - phpUnserializeString, -} from "./laravel-encrypter"; -export { - checkLogin, - hashPassword, - isMd5Of, - type LoginCheck, - md5Hex, - verifyPassword, -} from "./password"; -export { - generateSsoTicket, - issueSsoTicket, - type SsoUserUpdater, -} from "./sso-ticket"; -export { generateTotp, totpKeyUri, verifyTotp } from "./totp";