mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-02-24 21:12:06 +00:00
Merge pull request #857 from ahmadk953/ai_generated-performance-enhancements
Optimize performance and reduce bundle sizes
This commit is contained in:
commit
f64ec56481
10 changed files with 1201 additions and 2364 deletions
|
@ -29,6 +29,13 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
},
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
description: true,
|
||||
order: true,
|
||||
listId: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!cardToCopy) return { error: 'Card not found' };
|
||||
|
|
|
@ -28,8 +28,18 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
orgId,
|
||||
},
|
||||
},
|
||||
include: {
|
||||
cards: true,
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
order: true,
|
||||
boardId: true,
|
||||
cards: {
|
||||
select: {
|
||||
title: true,
|
||||
description: true,
|
||||
order: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
orgId,
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!list) return { error: 'List not found' };
|
||||
|
|
|
@ -25,6 +25,9 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
id: boardId,
|
||||
orgId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!board) return { error: 'Board not found' };
|
||||
|
|
|
@ -30,6 +30,10 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
id,
|
||||
orgId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!isPro) {
|
||||
|
|
|
@ -24,6 +24,9 @@ const handler = async (data: InputType): Promise<ReturnType> => {
|
|||
try {
|
||||
const orgSubscription = await db.orgSubscription.findUnique({
|
||||
where: { orgId },
|
||||
select: {
|
||||
stripeCustomerId: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (orgSubscription?.stripeCustomerId) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Stripe from 'stripe';
|
||||
|
||||
export const stripe = new Stripe(process.env.STRIPE_API_KEY!, {
|
||||
apiVersion: '2024-11-20.acacia',
|
||||
apiVersion: '2024-12-18.acacia',
|
||||
typescript: true,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { withSentryConfig } from '@sentry/nextjs';
|
||||
import type { NextConfig } from 'next';
|
||||
import compression from 'compression';
|
||||
|
||||
import { withContentCollections } from '@content-collections/next';
|
||||
import createMDX from '@next/mdx';
|
||||
|
@ -23,6 +24,8 @@ const nextConfig: NextConfig = {
|
|||
],
|
||||
},
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
compress: true,
|
||||
serverMiddleware: [compression()],
|
||||
};
|
||||
|
||||
const withMDX = createMDX({});
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dev": "next dev --turbo",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"lint": "next lint && tsc --noemit",
|
||||
"postinstall": "prisma generate --no-engine",
|
||||
"format": "prettier --check --ignore-path .prettierignore .",
|
||||
"format:fix": "prettier --write --ignore-path .prettierignore ."
|
||||
|
@ -40,6 +40,7 @@
|
|||
"@vercel/speed-insights": "^1.1.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"compression": "^1.7.5",
|
||||
"date-fns": "^4.1.0",
|
||||
"dompurify": "^3.2.3",
|
||||
"lodash": "^4.17.21",
|
||||
|
@ -67,6 +68,7 @@
|
|||
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
||||
"@next/eslint-plugin-next": "15.1.1",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/compression": "^1.7.5",
|
||||
"@types/dompurify": "^3",
|
||||
"@types/lodash": "^4.17.13",
|
||||
"@types/node": "^22.10.2",
|
||||
|
|
Loading…
Add table
Reference in a new issue