fix(#410): use toNodeHandler for BetterAuth Express compatibility
Some checks failed
ci/woodpecker/push/api Pipeline failed

BetterAuth expects Web API Request objects (Fetch API standard) with
headers.get(), but NestJS/Express passes IncomingMessage objects with
headers[] property access. Use better-auth/node's toNodeHandler to
properly convert between Express req/res and BetterAuth's Web API handler.

Also fixes vitest SWC config to read the correct tsconfig for NestJS
decorator metadata emission, which was causing DI injection failures
in tests.

Fixes #410

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 19:03:21 -06:00
parent ca21416efc
commit ba54de88fd
5 changed files with 51 additions and 31 deletions

View File

@@ -26,7 +26,7 @@ export default defineConfig({
},
plugins: [
swc.vite({
module: { type: "es6" },
tsconfigFile: path.resolve(__dirname, "tsconfig.json"),
}),
],
});