Prerequisites
You need a recent version of Node.js and a package manager. The project usesbun for development tasks, but npm works for publishing.
Install dependencies
Clone the repository and install dependencies:Project structure
Development commands
Run type checking
Run tests
Build the package
tsup to produce ESM output and TypeScript declaration files in the dist/ directory.
Publish a release
prepublishOnly script in package.json automatically runs bun run build before publishing, so you do not need to build manually.
Writing tests
Tests use Vitest. Add a new test file intest/ following the existing naming convention (<module>.test.ts). Import the module under test from src/ and assert against the exported functions.
test/example.test.ts
Peer dependencies
The plugin declares these peer dependencies:better-auth^1.7.0@better-auth/core^1.7.0typescript^5.6.3
@tanstack/react-query^5.104.3react^19.3.0
razorpay^2.9.8zod^4.6.7defu