fix: update package dependencies and improve null checks
- Updated @tiptap packages to version 3.22.3 for improved functionality. - Upgraded react-email to version 5.2.10 for bug fixes. - Updated @biomejs/biome to version 2.4.11 for better performance. - Upgraded knip to version 6.4.1 for enhanced features. - Improved null checks in modale_contatti.tsx, trpc.ts, annunci.controller.ts, and event_queue.controller.ts for better error handling.
This commit is contained in:
parent
c5cf5302c4
commit
7fdef1c945
7 changed files with 1267 additions and 1620 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.4.11/schema.json",
|
||||||
"assist": {
|
"assist": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"source": {
|
"source": {
|
||||||
|
|
|
||||||
2854
apps/infoalloggi/package-lock.json
generated
2854
apps/infoalloggi/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -46,12 +46,12 @@
|
||||||
"@tanstack/react-query": "^5.90.19",
|
"@tanstack/react-query": "^5.90.19",
|
||||||
"@tanstack/react-table": "^8.21.3",
|
"@tanstack/react-table": "^8.21.3",
|
||||||
"@tanstack/react-virtual": "^3.13.12",
|
"@tanstack/react-virtual": "^3.13.12",
|
||||||
"@tiptap/core": "^3.20.0",
|
"@tiptap/core": "^3.22.3",
|
||||||
"@tiptap/extension-link": "^3.20.0",
|
"@tiptap/extension-link": "^3.22.3",
|
||||||
"@tiptap/extension-underline": "^3.20.0",
|
"@tiptap/extension-underline": "^3.22.3",
|
||||||
"@tiptap/pm": "^3.20.0",
|
"@tiptap/pm": "^3.22.3",
|
||||||
"@tiptap/react": "^3.20.0",
|
"@tiptap/react": "^3.22.3",
|
||||||
"@tiptap/starter-kit": "^3.20.0",
|
"@tiptap/starter-kit": "^3.22.3",
|
||||||
"@trpc/client": "^11.1.0",
|
"@trpc/client": "^11.1.0",
|
||||||
"@trpc/next": "^11.4.3",
|
"@trpc/next": "^11.4.3",
|
||||||
"@trpc/react-query": "^11.1.0",
|
"@trpc/react-query": "^11.1.0",
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
"react-colorful": "^5.6.1",
|
"react-colorful": "^5.6.1",
|
||||||
"react-day-picker": "^9.11.1",
|
"react-day-picker": "^9.11.1",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.3",
|
||||||
"react-email": "^5.2.8",
|
"react-email": "^5.2.10",
|
||||||
"react-hook-form": "^7.71.1",
|
"react-hook-form": "^7.71.1",
|
||||||
"react-hot-toast": "^2.5.2",
|
"react-hot-toast": "^2.5.2",
|
||||||
"react-is": "^19.2.3",
|
"react-is": "^19.2.3",
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
"zod": "^4.3.6"
|
"zod": "^4.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.4.8",
|
"@biomejs/biome": "^2.4.11",
|
||||||
"@hookform/devtools": "^4.4.0",
|
"@hookform/devtools": "^4.4.0",
|
||||||
"@react-email/preview-server": "^5.2.10",
|
"@react-email/preview-server": "^5.2.10",
|
||||||
"@total-typescript/ts-reset": "^0.6.1",
|
"@total-typescript/ts-reset": "^0.6.1",
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
"jsdom": "^29.0.2",
|
"jsdom": "^29.0.2",
|
||||||
"kanel": "^4.0.1",
|
"kanel": "^4.0.1",
|
||||||
"kanel-kysely": "^4.0.0",
|
"kanel-kysely": "^4.0.0",
|
||||||
"knip": "^5.85.0",
|
"knip": "^6.4.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite-tsconfig-paths": "^6.1.1",
|
"vite-tsconfig-paths": "^6.1.1",
|
||||||
|
|
|
||||||
|
|
@ -286,8 +286,7 @@ const PostUnlock = () => {
|
||||||
|
|
||||||
// Memoize navigation URL
|
// Memoize navigation URL
|
||||||
const navigationUrl = useMemo(() => {
|
const navigationUrl = useMemo(() => {
|
||||||
if (!data?.propData || !data.propData.lat || !data.propData.lon)
|
if (!data?.propData?.lat || !data?.propData?.lon) return undefined;
|
||||||
return undefined;
|
|
||||||
return getNavigationUrl(data.propData.lat, data.propData.lon);
|
return getNavigationUrl(data.propData.lat, data.propData.lon);
|
||||||
}, [data?.propData]);
|
}, [data?.propData]);
|
||||||
|
|
||||||
|
|
@ -298,7 +297,7 @@ const PostUnlock = () => {
|
||||||
</CredenzaBody>
|
</CredenzaBody>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!data || !data.propData) {
|
if (!data?.propData) {
|
||||||
return (
|
return (
|
||||||
<CredenzaBody>
|
<CredenzaBody>
|
||||||
<p className="text-destructive">{t.contatto.error}</p>
|
<p className="text-destructive">{t.contatto.error}</p>
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ const enforceUserIsAdmin = t.middleware(({ ctx, next, path }) => {
|
||||||
message: `SESSION_EXPIRED, error in path: ${path} [${ctx.req?.url}]`,
|
message: `SESSION_EXPIRED, error in path: ${path} [${ctx.req?.url}]`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!ctx.session || !ctx.session.isAdmin) {
|
if (!ctx.session?.isAdmin) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
message: `User is not Admin, error in path: ${path} [${ctx.req?.url}]`,
|
message: `User is not Admin, error in path: ${path} [${ctx.req?.url}]`,
|
||||||
|
|
|
||||||
|
|
@ -497,7 +497,7 @@ export const getProprietarioDataHandler = async ({
|
||||||
.where("servizio_id", "=", servizioId)
|
.where("servizio_id", "=", servizioId)
|
||||||
.where("annunci_id", "=", annuncioId)
|
.where("annunci_id", "=", annuncioId)
|
||||||
.executeTakeFirst();
|
.executeTakeFirst();
|
||||||
if (!opened_at || !opened_at.open_contatti_at) {
|
if (!opened_at?.open_contatti_at) {
|
||||||
return { opened_at: null, propData: null };
|
return { opened_at: null, propData: null };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ const generatePdfContent = async (params: GeneratedAttachmentTypes) => {
|
||||||
.selectAll()
|
.selectAll()
|
||||||
.where("stinga_id", "=", params.stringId)
|
.where("stinga_id", "=", params.stringId)
|
||||||
.executeTakeFirst();
|
.executeTakeFirst();
|
||||||
if (!data || !data.stringa_value) {
|
if (!data?.stringa_value) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "NOT_FOUND",
|
code: "NOT_FOUND",
|
||||||
message: "Stringa non trovata",
|
message: "Stringa non trovata",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue