v8.0.0 Authorization Overhaul
This major release contains a complete overhaul for authorization. A lot of thought went into creating a more maintainable authorization scheme. View @zen/nest-auth README.md for documentation. Previously there were specific guards & decorators depending on whether they were being applied to HTTP or GraphQL contexts. These have all been reconciled into guards & decorators that work for both contexts. For example, @GqlUser
& @HttpUser
have been replaced with @CurrentUser
.
Furthermore, the code generation of the GraphQL resolvers for the Prisma CRUD endpoints have been rewritten to properly implement @casl/prisma
. It required some experience with the library to really work out how to best integrated CASL into the api. Authorization is in a much better place for this release.
Features
- Regenerated the entire monorepo utilizing the latest version of Nx.
- All dependencies updated.
- The monorepo now works with other package managers, specifically pnpm.
- Went through the
package.json
with a fine tooth comb and removed all unnecessary dependencies. - Scrubbed out all dead code from the repo.
- Theme has been updated to accommodate for the major changes made in
@angular/material
v15. - TypeScript strict & noImplicitAny flags has been enabled for the Nest app. This ensures many more guarantees for correctness.
- strictPropertyInitialization flag has been disabled due to
class-validator
not playing well with it. - For scalability reasons, the user's
id
field is now aString @default(uuid())
instead ofInt @default(autoincrement())
. kendo
branch has been updated to the newest release of Kendo v11.otel
branch now integrates Prisma tracing.- Added more tests throughout the repo.
- Dockerfile that builds the API for production now utilizes pnpm instead of npm.
- Added a
404 Page not found
component for the Angular app. - Removed
@zen/api-interfaces
library and consolidated everything under@zen/common
. - Integrated Storybook for the
@zen/auth
&@zen/components
libraries. This allows for a simple way to browse the catalogue of components available. - Refactored the services that the code generated GraphQL resolvers depend on to enable the resolvers to be unit testable.
- Polish, polish and more polish. 🎐