The integration libraries each offer high-level and low-level integration methods:
A method for creating drop-in middleware (e.g. createCsrfMiddleware(), createCsrfHandle())
A method for creating functions that can be used inside middleware (e.g. createCsrfProtect())
Internally the code was re-organized into a monorepo structure with three public packages and a private package for shared code using pnpm workspaces for management
It should be easy to add new framework integrations with the new repo structure
This pull request implements a new major version of Edge-CSRF (2.0.0) with several breaking changes:
@edge-csrf/nextjs
- Next.js integration library@edge-csrf/sveltekit
- SvelteKit integration library@edge-csrf/core
- Core APIcreateCsrfMiddleware()
,createCsrfHandle()
)createCsrfProtect()
)