Fix production deploy: sync lockfile, Prisma engines, and build.
The Docker build failed because pnpm-lock.yaml was stale after removing Sanity and adding Prisma/admin deps. Bundle debian-openssl-3.0.x engines for node:20-slim, fix invalid tiptap package, and avoid DB access during next build. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import Image from "next/image";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { ExternalLink, Github, ArrowLeft, ArrowRight } from "lucide-react";
|
||||
import { Link } from "@/lib/i18n/navigation";
|
||||
import { getProjectBySlug, getAllProjectSlugs } from "@/lib/db/projects";
|
||||
import { getProjectBySlug } from "@/lib/db/projects";
|
||||
import { TiptapRenderer } from "@/components/writing/TiptapRenderer";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -13,11 +13,6 @@ interface Props {
|
||||
params: Promise<{ locale: string; slug: string }>;
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const slugs = await getAllProjectSlugs();
|
||||
return slugs.map((s) => ({ slug: s.slug }));
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
const { slug } = await params;
|
||||
const project = await getProjectBySlug(slug);
|
||||
|
||||
@@ -4,7 +4,7 @@ import Image from "next/image";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { ArrowRight, ArrowLeft, Clock } from "lucide-react";
|
||||
import { Link } from "@/lib/i18n/navigation";
|
||||
import { getPostBySlug, getRelatedPosts, getAllPostSlugs, estimateReadTime } from "@/lib/db/posts";
|
||||
import { getPostBySlug, getRelatedPosts, estimateReadTime } from "@/lib/db/posts";
|
||||
import { TiptapRenderer } from "@/components/writing/TiptapRenderer";
|
||||
import { ReadingProgress } from "@/components/writing/ReadingProgress";
|
||||
import { ShareButtons } from "@/components/writing/ShareButtons";
|
||||
@@ -16,11 +16,6 @@ interface Props {
|
||||
params: Promise<{ locale: string; slug: string }>;
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const slugs = await getAllPostSlugs();
|
||||
return slugs.map((s) => ({ slug: s.slug }));
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
const { slug } = await params;
|
||||
const post = await getPostBySlug(slug);
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function POST(req: NextRequest) {
|
||||
return Response.json({ message: "Invalid secret" }, { status: 401 });
|
||||
}
|
||||
|
||||
revalidateTag("posts");
|
||||
revalidateTag("projects");
|
||||
revalidateTag("posts", "max");
|
||||
revalidateTag("projects", "max");
|
||||
return Response.json({ revalidated: true, now: Date.now() });
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import StarterKit from "@tiptap/starter-kit";
|
||||
import Placeholder from "@tiptap/extension-placeholder";
|
||||
import Link from "@tiptap/extension-link";
|
||||
import Image from "@tiptap/extension-image";
|
||||
import TextDirection from "@tiptap/extension-text-direction";
|
||||
import TextDirection from "tiptap-text-direction";
|
||||
import { useEffect, useCallback } from "react";
|
||||
import {
|
||||
Bold, Italic, Strikethrough, Code, Heading1, Heading2, Heading3,
|
||||
|
||||
Reference in New Issue
Block a user