From 813f6d4c7562412440af53306cbc76ebdcf7479d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 24 Nov 2025 05:32:58 +0100 Subject: [PATCH] fix: make ReloadConfigResult fields optional with default empty arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Supervisor API doesn't always return 'changed' and 'removed' arrays when reloading configuration, causing Zod validation errors. Made all three fields (added, changed, removed) optional with default empty arrays to handle cases where the API omits them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/supervisor/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/supervisor/types.ts b/lib/supervisor/types.ts index 9e3398b..6a2562d 100644 --- a/lib/supervisor/types.ts +++ b/lib/supervisor/types.ts @@ -92,9 +92,9 @@ export const ConfigInfoSchema = z.object({ }); export const ReloadConfigResultSchema = z.object({ - added: z.array(z.array(z.string())), - changed: z.array(z.array(z.string())), - removed: z.array(z.array(z.string())), + added: z.array(z.array(z.string())).optional().default([]), + changed: z.array(z.array(z.string())).optional().default([]), + removed: z.array(z.array(z.string())).optional().default([]), }); // TypeScript Types