Improvements: remove dead config, fix ESM, add URL validation, unify types, add missing logging

- Remove .prettierrc (dead config, Biome replaces Prettier)
- Rename lighthouserc.json to lighthouserc.cjs with module.exports for ESM compat
- Add logger.warn to empty catch blocks in auth, register, site-settings, prisma-cache, redis, security, rate-limit
- Unify ActionResult type: action-helper.ts uses 'ok' consistent with safe-action-shared.ts
- Add noUnusedLocals + noUnusedParameters to tsconfig + fix 25 pre-existing unused vars
- Replace barrel export src/types/index.ts with direct @/types/common imports
- Make trustHost conditional (development only) in auth.ts
- Add pre-flight URL validation to update-Nitrov3.sh to catch image.library.url misconfigurations
- Improve NITRO_IMAGE_LIBRARY_URL content validation in pre-flight & post-compute checks
This commit is contained in:
openhands committed 2026-07-26 20:28:11 +02:00
1 parent b922f6d49f
commit 17847545dd
292 files changed
+69195 -67915

No files matched your search

+2 -4
View File
@@ -1,7 +1,7 @@
import { redirect } from "next/navigation";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { prisma } from "@/lib/prisma";
import { VouchersClient, type VoucherRow } from "./vouchers-client";
import { type VoucherRow, VouchersClient } from "./vouchers-client";
export default async function AdminVouchers() {
const { session, permissions } = await getAdminContext();
@@ -57,7 +57,5 @@ export default async function AdminVouchers() {
expired: rows.filter((v) => v.status === "expired").length,
};
return (
<VouchersClient vouchers={rows} canEdit={canEdit} stats={stats} />
);
return <VouchersClient vouchers={rows} canEdit={canEdit} stats={stats} />;
}
+4 -10
View File
@@ -3,12 +3,12 @@
import { useTranslations } from "next-intl";
import { useState } from "react";
import { createVoucher, deleteVoucher } from "@/actions/admin-vouchers";
import { Button } from "@/components/ui/button";
import { ConfirmDialog } from "@/components/admin/confirm-dialog";
import { StatusCard } from "@/components/admin/dashboard";
import { CurrencyIcon } from "@/components/shared/currency-icon";
import { formatDate } from "@/lib/format-date";
import { Button } from "@/components/ui/button";
import { useServerAction } from "@/hooks/use-server-action";
import { formatDate } from "@/lib/format-date";
export type VoucherRow = {
id: string;
@@ -152,11 +152,7 @@ export function VouchersClient({
/>
</label>
</div>
<Button
type="submit"
variant="default"
disabled={isPending}
>
<Button type="submit" variant="default" disabled={isPending}>
{isPending ? t("form.saving") : t("form.create")}
</Button>
</form>
@@ -245,9 +241,7 @@ export function VouchersClient({
}}
title={t("confirmDeleteTitle")}
description={
pendingDelete
? t("confirmDelete", { code: pendingDelete.code })
: ""
pendingDelete ? t("confirmDelete", { code: pendingDelete.code }) : ""
}
confirmLabel={t("delete")}
cancelLabel={t("form.cancel")}