refactor(web): use top-level z.url() over deprecated z.string().url()

Zod v4 deprecates the chained .url() in favor of the top-level format validator.
This commit is contained in:
Offending Commit
2026-06-02 14:31:40 -05:00
parent 409d7d8be7
commit 96dff8900e

View File

@@ -23,7 +23,7 @@ export function isCloudInstance(instance: Pick<Instance, "baseUrl">): boolean {
}
export const configSchema = z.object({
baseUrl: z.string().url({ message: "Must be a valid URL" }),
baseUrl: z.url({ message: "Must be a valid URL" }),
token: z.string().optional().default(""),
});
@@ -32,7 +32,7 @@ export type Config = z.infer<typeof configSchema>;
export const instanceSchema = z.object({
id: z.string().min(1),
name: z.string().min(1, { message: "Name is required" }),
baseUrl: z.string().url({ message: "Must be a valid URL" }),
baseUrl: z.url({ message: "Must be a valid URL" }),
token: z.string().optional().default(""),
});