Compare commits

...
2 Commits
Author SHA1 Message Date
ginnoir 090366422d chore: release v0.4.6
Release / build-and-push (push) Has been cancelled
2026-06-02 18:16:26 -05:00
ginnoir 4049a73c6b fix(garden): accept relative urls for plant image uploads
Zod v4 changed .url() to use the WHATWG URL spec, which rejects relative
paths like /api/uploads/... that our upload API returns. Relax image URL
validators to z.string().min(1) since these are internal paths.
2026-06-02 18:15:12 -05:00
3 changed files with 10 additions and 4 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog # Changelog
## [0.4.6](https://github.com/ginnoir/famapp/compare/v0.4.5...v0.4.6) (2026-06-02)
### Bug Fixes
- **garden:** accept relative urls for plant image uploads ([6ca2e52](https://github.com/ginnoir/famapp/commit/6ca2e52e0a63d94826d9b1e208bcdded9c75fb07))
## [0.4.5](https://github.com/ginnoir/famapp/compare/v0.4.4...v0.4.5) (2026-06-02) ## [0.4.5](https://github.com/ginnoir/famapp/compare/v0.4.4...v0.4.5) (2026-06-02)
### Features ### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "famapp", "name": "famapp",
"version": "0.4.5", "version": "0.4.6",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "pnpm@10.33.3", "packageManager": "pnpm@10.33.3",
+3 -3
View File
@@ -118,8 +118,8 @@ const plantInput = z.object({
fertilizingNotes: z.string().trim().max(2000).nullable().optional(), fertilizingNotes: z.string().trim().max(2000).nullable().optional(),
notes: z.string().trim().max(2000).nullable().optional(), notes: z.string().trim().max(2000).nullable().optional(),
acquisitionDate: z.string().nullable().optional(), acquisitionDate: z.string().nullable().optional(),
images: z.array(z.string().url()).max(10).default([]), images: z.array(z.string().min(1)).max(10).default([]),
primaryImageUrl: z.string().url().nullable().optional(), primaryImageUrl: z.string().min(1).nullable().optional(),
}); });
export async function createPlant(input: z.input<typeof plantInput>) { export async function createPlant(input: z.input<typeof plantInput>) {
@@ -230,7 +230,7 @@ export async function deletePlant(input: { id: string }) {
} }
export async function addPlantImage(input: { id: string; url: string }) { export async function addPlantImage(input: { id: string; url: string }) {
const parsed = z.object({ id: z.string().uuid(), url: z.string().url() }).parse(input); const parsed = z.object({ id: z.string().uuid(), url: z.string().min(1) }).parse(input);
const { household } = await getCurrentSession(); const { household } = await getCurrentSession();
await assertCanAccessPlant(parsed.id, household.id); await assertCanAccessPlant(parsed.id, household.id);