[PR #7836] [CLOSED] feat: support node -r better-auth/repl #7583

Closed
opened 2026-03-13 13:42:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7836
Author: @himself65
Created: 2/7/2026
Status: Closed

Base: canaryHead: himself65/2026/02/06/repl


📝 Commits (3)

  • 0baf27f feat: support node -r better-auth/repl
  • 2b1616c fix: type
  • 61bad00 Update packages/better-auth/src/integrations/repl.ts

📊 Changes

4 files changed (+172 additions, -74 deletions)

View changed files

📝 packages/better-auth/package.json (+16 -0)
packages/better-auth/src/integrations/repl.ts (+71 -0)
📝 packages/better-auth/tsdown.config.ts (+80 -68)
📝 pnpm-lock.yaml (+5 -6)

📄 Description

Summary by cubic

Adds support for running Node with -r better-auth/repl to auto-load and expose your Better Auth config in a REPL. Ensures clean CJS/ESM exports with types.

  • New Features

    • REPL scans common auth paths (auth., auth/index., lib/server, server/auth, server, lib, utils, plus src and app), loads .env and .env.local via dotenv, imports the first match, and exposes auth with a default getter for require().
    • Ships better-auth/repl as both ESM and CJS with d.ts; fixes export types to avoid TS/require issues.
  • Migration

    • Run: node -r better-auth/repl
    • Keep your auth file in a common path. .env/.env.local are loaded automatically.

Written for commit 61bad0055a. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7836 **Author:** [@himself65](https://github.com/himself65) **Created:** 2/7/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2026/02/06/repl` --- ### 📝 Commits (3) - [`0baf27f`](https://github.com/better-auth/better-auth/commit/0baf27f6b14ee1bcc462b1a7fa25ccbebcb223ea) feat: support `node -r better-auth/repl` - [`2b1616c`](https://github.com/better-auth/better-auth/commit/2b1616c1e4901df597a06179c0ea132194b06783) fix: type - [`61bad00`](https://github.com/better-auth/better-auth/commit/61bad0055a2021631e5aa4811f21ab0edd1ef311) Update packages/better-auth/src/integrations/repl.ts ### 📊 Changes **4 files changed** (+172 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/package.json` (+16 -0) ➕ `packages/better-auth/src/integrations/repl.ts` (+71 -0) 📝 `packages/better-auth/tsdown.config.ts` (+80 -68) 📝 `pnpm-lock.yaml` (+5 -6) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds support for running Node with -r better-auth/repl to auto-load and expose your Better Auth config in a REPL. Ensures clean CJS/ESM exports with types. - **New Features** - REPL scans common auth paths (auth.*, auth/index.*, lib/server, server/auth, server, lib, utils, plus src and app), loads .env and .env.local via dotenv, imports the first match, and exposes auth with a default getter for require(). - Ships better-auth/repl as both ESM and CJS with d.ts; fixes export types to avoid TS/require issues. - **Migration** - Run: node -r better-auth/repl - Keep your auth file in a common path. .env/.env.local are loaded automatically. <sup>Written for commit 61bad0055a2021631e5aa4811f21ab0edd1ef311. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:42:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7583