chore: dependency updates and minor refactors

- Bump `@tanstack/react-query` and related packages to 5.95.0
- Add `@orpc/json-schema`, `@orpc/openapi`, `@orpc/server`, `@orpc/zod` to catalog and use catalog refs in `apps/server`
- Move `ORPCError` throws for backup not-found/invalid into `@sofa/core/backup` so the server procedure can simply `await deleteBackup()` without re-wrapping errors
- Add `@orpc/server` dep to `packages/core` to support the above
- Add `expo-updates` to native deps; switch `requireNativeModule` import to `expo` in `WidgetImagesModule`
- Pin native `react`/`react-dom` to catalog to avoid duplicate copies
- Add `@lingui/core` to web and `react` to i18n package deps
This commit is contained in:
2026-03-22 14:11:45 -04:00
parent 2c7068ced3
commit 6be586bd53
10 changed files with 77 additions and 185 deletions
+1
View File
@@ -36,6 +36,7 @@
"test": "vitest run"
},
"dependencies": {
"@orpc/server": "catalog:",
"@sofa/api": "workspace:*",
"@sofa/config": "workspace:*",
"@sofa/db": "workspace:*",
+11 -2
View File
@@ -2,6 +2,9 @@ import { renameSync, unlinkSync } from "node:fs";
import { mkdir, readdir } from "node:fs/promises";
import path from "node:path";
import { ORPCError } from "@orpc/server";
import { AppErrorCode } from "@sofa/api/errors";
import { BACKUP_DIR, DATABASE_URL } from "@sofa/config";
import {
closeDatabase,
@@ -131,12 +134,18 @@ export async function listBackups(): Promise<BackupInfo[]> {
async function deleteBackupInternal(filename: string): Promise<void> {
if (!isValidBackupFilename(filename)) {
throw new Error("Invalid backup filename");
throw new ORPCError("BAD_REQUEST", {
message: "Invalid backup filename",
data: { code: AppErrorCode.BACKUP_DELETE_FAILED },
});
}
const filePath = path.join(BACKUP_DIR, filename);
if (!(await Bun.file(filePath).exists())) {
throw new Error("Backup not found");
throw new ORPCError("NOT_FOUND", {
message: "Backup not found",
data: { code: AppErrorCode.BACKUP_NOT_FOUND },
});
}
await Bun.file(filePath).delete();
+1
View File
@@ -25,6 +25,7 @@
"@lingui/conf": "catalog:",
"@lingui/format-po": "catalog:",
"@types/bun": "catalog:",
"react": "catalog:",
"typescript": "catalog:"
}
}