Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.9/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
615 changes: 405 additions & 210 deletions bun.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function PayPalStackedButton({
console.error('Failed to load PayPal SDK:', e)
}}
/>
{/** biome-ignore lint/correctness/useUniqueElementIds: PayPal ID */}

<div
ref={containerRef}
id="paypal-container-LEG7JKHVDZ6WA"
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import './.next/dev/types/routes.d.ts'

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
3 changes: 0 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ const nextConfig: NextConfig = {
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
...(isLocal
? {}
Expand Down
78 changes: 42 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,53 +38,55 @@
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@hookform/resolvers": "^5.2.2",
"@next/bundle-analyzer": "^15.5.5",
"@next/third-parties": "^15.5.5",
"@prisma/adapter-pg": "^6.17.1",
"@prisma/client": "^6.17.1",
"@next/bundle-analyzer": "16.0.10",
"@next/third-parties": "16.0.10",
"@prisma/adapter-pg": "^7.1.0",
"@prisma/client": "^7.1.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-navigation-menu": "^1.2.14",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/container-queries": "^0.1.1",
"@tanstack/react-table": "^8.21.3",
"@types/pg": "^8.16.0",
"bcrypt": "^6.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"dayjs": "^1.11.18",
"dayjs": "^1.11.19",
"dotenv": "^17.2.3",
"embla-carousel-react": "^8.6.0",
"fs-extra": "^11.3.2",
"ioredis": "^5.8.1",
"ioredis": "^5.8.2",
"js-cookie": "^3.0.5",
"lucide-react": "^0.544.0",
"lucide-react": "^0.561.0",
"minio": "^8.0.6",
"motion": "^12.23.24",
"next": "^15.5.5",
"next-auth": "^4.24.11",
"motion": "^12.23.26",
"next": "16.0.10",
"next-auth": "^4.24.13",
"next-themes": "^0.4.6",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-hook-form": "^7.65.0",
"pg": "^8.16.3",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-hook-form": "^7.68.0",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"schema-dts": "^1.1.5",
"server-only": "^0.0.1",
"slugify": "^1.6.6",
"sonner": "^2.0.7",
"swiper": "^12.0.2",
"tailwind-merge": "^3.3.1",
"swiper": "^12.0.3",
"tailwind-merge": "^3.4.0",
"tailwindcss-animate": "^1.0.7",
"vanilla-cookieconsent": "^3.1.0",
"zod": "^4.1.12"
"zod": "^4.2.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand All @@ -95,37 +97,41 @@
]
},
"devDependencies": {
"@babel/core": "^7.28.4",
"@biomejs/biome": "^2.2.6",
"@tailwindcss/postcss": "^4.1.14",
"@babel/core": "^7.28.5",
"@biomejs/biome": "^2.3.9",
"@tailwindcss/postcss": "^4.1.18",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/react": "^16.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/bcrypt": "^6.0.0",
"@types/bun": "latest",
"@types/bun": "^1.3.4",
"@types/fs-extra": "^11.0.4",
"@types/jest": "^30.0.0",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.20",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"babel-plugin-react-compiler": "^19.1.0-rc.1-rc-af1b7da-20250421",
"dotenv-cli": "^10.0.0",
"@types/lodash": "^4.17.21",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"babel-plugin-react-compiler": "^1.0.0",
"dotenv-cli": "^11.0.0",
"husky": "^9.1.7",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"lint-staged": "^16.2.4",
"p-limit": "^7.1.1",
"lint-staged": "^16.2.7",
"p-limit": "^7.2.0",
"postcss": "^8.5.6",
"prisma": "^6.17.1",
"sharp": "^0.34.4",
"tailwindcss": "^4.1.14",
"ts-jest": "^29.4.5",
"prisma": "^7.1.0",
"sharp": "^0.34.5",
"tailwindcss": "^4.1.18",
"ts-jest": "^29.4.6",
"typescript": "^5.9.3"
},
"engines": {
"bun": ">=1.2.22"
},
"private": true
"private": true,
"overrides": {
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3"
}
}
9 changes: 9 additions & 0 deletions prisma.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import path from 'node:path'
import { defineConfig, env } from 'prisma/config'

export default defineConfig({
schema: path.join(__dirname, 'prisma', 'schema.prisma'),
datasource: {
url: env('DATABASE_URL'),
},
})
10 changes: 9 additions & 1 deletion prisma/prismaClient.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from '@prisma/client'
import { Pool } from 'pg'

const globalForPrisma = global as unknown as { prisma: PrismaClient }

const prisma = globalForPrisma.prisma || new PrismaClient()
function createPrismaClient() {
const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const adapter = new PrismaPg(pool)
return new PrismaClient({ adapter })
}

const prisma = globalForPrisma.prisma || createPrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma

Expand Down
1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ generator client {

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Image {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/seed-brand-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const main = withPrisma(async prisma => {
// Сохраняем в базу данных как Buffer (подходит для типа Bytes)
await prisma.manufacturer.update({
where: { id: image.id },
data: { icon: resizedBuffer },
data: { icon: new Uint8Array(resizedBuffer) },
})

console.log(
Expand Down
8 changes: 4 additions & 4 deletions server/brands/actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use server'

import { Prisma } from '@prisma/client'
import { revalidateTag } from 'next/cache'
import { updateTag } from 'next/cache'
import { Tag } from '@/constants'
import { withPrisma } from '@/prisma/prismaClient'
import type { ActionResult } from '@/types'
Expand All @@ -23,7 +23,7 @@ const createBrand = withPrisma(
icon: iconBuffer,
},
})
revalidateTag(Tag.brands)
updateTag(Tag.brands)
return { success: true, data: { id, name } }
} catch (error) {
// Handle unique constraint violations
Expand Down Expand Up @@ -56,7 +56,7 @@ const updateBrand = withPrisma(
},
})

revalidateTag(Tag.brands)
updateTag(Tag.brands)
return { success: true, data: { slug, name } }
} catch (error) {
console.error('Error updating brand:', error)
Expand All @@ -72,7 +72,7 @@ const deleteBrand = withPrisma(async (prisma, slug: string) => {
id: manufacturer.id,
},
})
revalidateTag(Tag.brands)
updateTag(Tag.brands)
})

export { createBrand, updateBrand, deleteBrand }
11 changes: 9 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"incremental": true,
"paths": {
"@/*": ["./*"]
Expand All @@ -24,6 +24,13 @@
],
"allowImportingTsExtensions": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "tailwind.config.cjs"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"tailwind.config.cjs",
".next/dev/types/**/*.ts"
],
"exclude": ["node_modules", ".next"]
}
Loading