-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/2.0.0 rc.1 #448
Chore/2.0.0 rc.1 #448
Conversation
feat(core) : owasp default values
fix(core): spread storage options
Wonderful ! |
fix: remove navigate-to csp directive
fix(types): allow middleware props to be optional when specified in global config
Hi @GalacticHypernova
Would you mind having a look at this ? |
Looks like TS needs a stricter type constraint. I believe doing something like this will solve it type OptionalThrowError<T extends Record<string, any>> = 'throwError' extends keyof T ? Pick<T, 'throwError'> : never; |
After review, I am setting all fields optional and falling back to default config values in nested route rules. This is because Nuxt internally forces our NuxtSecurityRouteRules fields to be optional. There is nothing we can do about this, as the Nuxt Module Builder internally overwrite our types with a This allows the user to use optional fields, while our code thinks they are mandatory - leading to potential type errors. I prefer to let our code know that they are in fact optional, and provide a fallback value. |
Sorry for the late response, sounds good! |
Types of changes
Description
Closes #441
Closes #447
Closes #444
Closes #446
Closes #433
Closes #232
Checklist: