Skip to content

Commit ea82f8f

Browse files
fix(astro): fix types, zod validation (#5052)
Previously, in the types, `options` were optional, but they are required. Zod validation additionally marked the *entire* options objects as optional. But it is instead *fields* that are (sometimes) optional. To make sure the types are correct, I used `satisfies IntegrationRule<>`. To make sure Zod is correct, you can use something like: ```ts const example: z.infer<typeof validateSlidingWindowOptions> = { interval: 123, max: 123, }; ``` I verified with the Astro example, and noticed that it said every email I provided was invalid. That led me to think something was wrong. So instead of denying most emails with an empty `allow: []`, this now allows free emails (such as gmail) and emails w/o gravatar (such as my work email). Closes GH-5016.
1 parent 783db87 commit ea82f8f

File tree

3 files changed

+269
-435
lines changed

3 files changed

+269
-435
lines changed

0 commit comments

Comments
 (0)