Ready for 1.1.3-rc.2 and migrating on nextjs 16

This commit is contained in:
charlesgauthereau
2025-11-03 12:32:00 +01:00
parent c62be9854a
commit 529f157c6e
16 changed files with 540 additions and 210 deletions
Binary file not shown.
@@ -12,7 +12,7 @@ import {and, eq, not} from "drizzle-orm";
import {Plus} from "lucide-react"; import {Plus} from "lucide-react";
import {cn} from "@/lib/utils"; import {cn} from "@/lib/utils";
import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder"; import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder";
export const dynamic = "force-dynamic"; // export const dynamic = "force-dynamic";
export default async function RoutePage(props: PageParams<{}>) { export default async function RoutePage(props: PageParams<{}>) {
@@ -8,6 +8,7 @@ import {getOrganization} from "@/lib/auth/auth";
import * as drizzleDb from "@/db"; import * as drizzleDb from "@/db";
import {DatabaseWith} from "@/db/schema/07_database"; import {DatabaseWith} from "@/db/schema/07_database";
export const dynamic = 'force-dynamic';
export default async function RoutePage(props: PageParams<{}>) { export default async function RoutePage(props: PageParams<{}>) {
@@ -10,6 +10,7 @@ import {notFound} from "next/navigation";
import {getActiveMember, getOrganization} from "@/lib/auth/auth"; import {getActiveMember, getOrganization} from "@/lib/auth/auth";
import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder"; import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder";
export const dynamic = 'force-dynamic';
export default async function RoutePage(props: PageParams<{}>) { export default async function RoutePage(props: PageParams<{}>) {
@@ -11,6 +11,7 @@ import {
SettingsOrganizationMembersTable SettingsOrganizationMembersTable
} from "@/components/wrappers/dashboard/settings/settings-organization-members-table"; } from "@/components/wrappers/dashboard/settings/settings-organization-members-table";
export const dynamic = 'force-dynamic';
export default async function RoutePage(props: PageParams<{ slug: string }>) { export default async function RoutePage(props: PageParams<{ slug: string }>) {
const organization = await getOrganization({}); const organization = await getOrganization({});
@@ -10,6 +10,8 @@ import * as drizzleDb from "@/db";
import {getOrganization} from "@/lib/auth/auth"; import {getOrganization} from "@/lib/auth/auth";
import {Building2, DatabaseBackup, Folder, RefreshCcw} from "lucide-react"; import {Building2, DatabaseBackup, Folder, RefreshCcw} from "lucide-react";
export const dynamic = 'force-dynamic';
export default async function RoutePage(props: PageParams<{}>) { export default async function RoutePage(props: PageParams<{}>) {
const organization = await getOrganization({}); const organization = await getOrganization({});
@@ -57,7 +59,6 @@ export default async function RoutePage(props: PageParams<{}>) {
.orderBy(drizzleDb.schemas.backup.createdAt); .orderBy(drizzleDb.schemas.backup.createdAt);
const restorationsCountResult = await db const restorationsCountResult = await db
.select({ .select({
count: count(), count: count(),
+16
View File
@@ -0,0 +1,16 @@
import {defineConfig, globalIgnores} from 'eslint/config'
import nextVitals from 'eslint-config-next/core-web-vitals'
const eslintConfig = defineConfig([
...nextVitals,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
]),
])
export default eslintConfig
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts"; import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+2 -2
View File
@@ -41,8 +41,8 @@ const nextConfig: NextConfig = {
typescript: { typescript: {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },
eslint: { experimental: {
ignoreDuringBuilds: true, turbopackFileSystemCacheForDev: true,
}, },
async headers() { async headers() {
return [ return [
+5 -5
View File
@@ -66,7 +66,7 @@
"input-otp": "^1.4.2", "input-otp": "^1.4.2",
"lucide-react": "^0.510.0", "lucide-react": "^0.510.0",
"minio": "^8.0.5", "minio": "^8.0.5",
"next": "16.0.1", "next": "16.0.0",
"next-safe-action": "^7.10.8", "next-safe-action": "^7.10.8",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"node-cron": "^4.2.1", "node-cron": "^4.2.1",
@@ -74,9 +74,9 @@
"nodemailer": "^7.0.3", "nodemailer": "^7.0.3",
"npm-check-updates": "^18.0.1", "npm-check-updates": "^18.0.1",
"pg": "^8.16.0", "pg": "^8.16.0",
"react": "19.2.0", "react": "^19.2.0",
"react-day-picker": "9.7.0", "react-day-picker": "9.7.0",
"react-dom": "19.2.0", "react-dom": "^19.2.0",
"react-dropzone": "^14.3.8", "react-dropzone": "^14.3.8",
"react-email": "^4.0.13", "react-email": "^4.0.13",
"react-hook-form": "^7.56.3", "react-hook-form": "^7.56.3",
@@ -104,8 +104,8 @@
"@zenstackhq/openapi": "^2.14.2", "@zenstackhq/openapi": "^2.14.2",
"@zenstackhq/tanstack-query": "^2.14.2", "@zenstackhq/tanstack-query": "^2.14.2",
"drizzle-kit": "^0.31.1", "drizzle-kit": "^0.31.1",
"eslint": "^9.26.0", "eslint": "^9.39.0",
"eslint-config-next": "15.3.2", "eslint-config-next": "^16.0.1",
"eslint-plugin-tailwindcss": "^3.18.0", "eslint-plugin-tailwindcss": "^3.18.0",
"postcss": "^8.5.3", "postcss": "^8.5.3",
"tailwindcss": "^4.1.7", "tailwindcss": "^4.1.7",
@@ -30,8 +30,8 @@ export const RegisterForm = (props: registerFormProps) => {
await signUp.email(values, { await signUp.email(values, {
onSuccess: () => { onSuccess: () => {
toast.success(`Success`); toast.success(`Success`);
router.push(`/login`);
router.refresh(); router.refresh();
router.push(`/login`);
}, },
onError: (error) => { onError: (error) => {
console.log(error); console.log(error);
@@ -52,11 +52,14 @@ export const AgentForm = (props: agentFormProps) => {
return; return;
} }
toast.success(`Success ${isCreate ? "creating" : "updating"} agent`); toast.success(`Success ${isCreate ? "creating" : "updating"} agent`);
router.push(`/dashboard/agents/${data.id}`);
router.refresh(); router.refresh();
router.push(`/dashboard/agents/${data.id}`);
}, },
}); });
return ( return (
<TooltipProvider> <TooltipProvider>
<Card> <Card>
@@ -23,10 +23,10 @@ export const DeleteOrganizationButton = (props: DeleteOrganizationButtonProps) =
await authClient.organization.setActive({ await authClient.organization.setActive({
organizationSlug: "default", organizationSlug: "default",
}); });
router.push("/");
toast.success(result.data.actionSuccess?.message || "Organization deleted."); toast.success(result.data.actionSuccess?.message || "Organization deleted.");
router.refresh() router.refresh()
refetch() refetch()
router.push("/");
} else { } else {
// @ts-ignore // @ts-ignore
const errorMsg = result?.data?.actionError?.message || result?.data?.actionError?.messageParams?.message || "Failed to delete the organization."; const errorMsg = result?.data?.actionError?.message || result?.data?.actionError?.messageParams?.message || "Failed to delete the organization.";
@@ -54,8 +54,8 @@ export const UserForm = (props: UserFormProps) => {
} }
toast.success(`Profile updated successfully.`); toast.success(`Profile updated successfully.`);
router.push(`/dashboard/profile`);
router.refresh(); router.refresh();
router.push(`/dashboard/profile`);
}, },
}); });
@@ -64,8 +64,8 @@ export const ProjectForm = (props: projectFormProps) => {
if (project && project.data) { if (project && project.data) {
if (project.data.success) { if (project.data.success) {
project.data.actionSuccess && toast.success(project.data.actionSuccess.message); project.data.actionSuccess && toast.success(project.data.actionSuccess.message);
router.push(`/dashboard/projects/${project.data.value!.id}`);
router.refresh(); router.refresh();
router.push(`/dashboard/projects/${project.data.value!.id}`);
} else { } else {
project.data.actionError && toast.error(project.data.actionError.message || "Unknown error occurred."); project.data.actionError && toast.error(project.data.actionError.message || "Unknown error occurred.");
router.refresh(); router.refresh();
+494 -187
View File
File diff suppressed because it is too large Load Diff