Releases: oskar-gmerek/surreal-better-auth
Releases · oskar-gmerek/surreal-better-auth
Beta Release 2.0.0-beta.4
Full Changelog: 2.0.0-beta.3...2.0.0-beta.4
Beta Release 2.0.0-beta.3
Full Changelog: 2.0.0-beta.1...2.0.0-beta.3
Beta Release 2.0.0-beta.1
Full Changelog: v1.0.0...2.0.0-beta.1
Release v2.0.0-beta.8
What's Changed
- v.1.0.0 adapter release by @oskar-gmerek in #9
- bypass ruleset by @oskar-gmerek in #11
Full Changelog: 1.0.0-beta.8...v2.0.0-beta.8
Release v2.0.0-beta.7
What's Changed
- v.1.0.0 adapter release by @oskar-gmerek in #9
- bypass ruleset by @oskar-gmerek in #11
Full Changelog: 1.0.0-beta.8...v2.0.0-beta.7
Release v2.0.0-beta.6
What's Changed
- v.1.0.0 adapter release by @oskar-gmerek in #9
- bypass ruleset by @oskar-gmerek in #11
Full Changelog: 1.0.0-beta.8...v2.0.0-beta.6
Release v1.0.0
SurrealDB Adapter for Better Auth
surreal-better-auth v1
🚀 Features & Enhancements
- Official Adapter Compliance: The adapter now uses the
createAdapterutility frombetter-auth, ensuring full compatibility with the core library and its features, including CLI-based schema generation. - Advanced ID Generation: Introduced a powerful
idGeneratorconfiguration option. It provides out-of-the-box support for:- SDK-generated IDs:
sdk.UUIDv4,sdk.UUIDv7 - Database-generated IDs:
surreal,surreal.ULID,surreal.UUID,surreal.UUIDv4,surreal.UUIDv7,surreal.guid
- SDK-generated IDs:
- Priority for Custom ID Functions: The adapter fully respects the
advanced.database.generateId()function frombetter-auth, giving it priority over theidGeneratorsetting. - Query Optimization: Implemented significant performance optimizations by operating directly on records wherever possible (e.g.,
findOne,update,deleteby ID). This also applies to bulk operations, reducing query complexity. - Enhanced Security: All queries are now built using
PreparedQueryto parameterize user-provided data, offering strong protection against injection attacks. - Intelligent Record Links: The adapter automatically converts string IDs to SurrealDB Record Links for relational fields. It intelligently detects cases where a value must remain a string to ensure compatibility across the ecosystem.
- Streamlined Schema Generation: The adapter's
createSchemafunction now integrates with thebetter-authCLI's command for schema generation. This process produces a clean, commented.surqlfile ready for use.- Note on Application: While the CLI handles the file generation, the schema must be applied manually to your SurrealDB instance (e.g., via the Surrealist UI or a similar tool). Direct execution of migrations through the
better-authCLI is not supported. - Rich & Indexed Schema: The generated schema is more detailed and robust, automatically creating recommended indexes on critical fields (e.g.,
user.email,session.userId) for better performance.
- Note on Application: While the CLI handles the file generation, the schema must be applied manually to your SurrealDB instance (e.g., via the Surrealist UI or a similar tool). Direct execution of migrations through the
- Debugging Tools: Added a
debugLogsoption that, when enabled, prints fully resolved queries to the console, simplifying development and troubleshooting. - Custom ID Handling: A new
allowPassingIdoption allows you to either provide custom record IDs directly in your data or have them safely removed before insertion.
🔧 Refactoring & Architecture
- Complete Rewrite: The adapter's codebase has been modernized and refactored for improved reliability, maintainability, and to handle numerous edge cases.
- Declarative Logic: Internal logic now uses declarative mappings for field references, operators, and special cases, making the adapter more predictable and easier to extend.
- Modular Structure: The project has been split into logical modules (
surreal-adapter.ts,helpers.ts,types.ts), enhancing code clarity and organization. - Standardized Testing: By adhering to the new guidelines, the adapter can now run the official
better-authtest suite directly, ensuring consistent and reliable behavior.
📦 Build & Packaging
- Monorepo Structure: The repository is now a monorepo, which will simplify future integration testing and the development of usage examples.
- Modern Build Process: The package is transpiled to support a wider range of environments, with both ESM and CommonJS builds included.
Oskar Gmerek // SurrealDB // Better-Auth
Beta Release 1.0.0-beta.8
Full Changelog: 1.0.0-beta.1...1.0.0-beta.8
Beta Release 1.0.0-beta.7
What's Changed
- og-branch-1 by @oskar-gmerek in #8
New Contributors
- @oskar-gmerek made their first contribution in #8
Full Changelog: 1.0.0-beta.6...1.0.0-beta.7
Beta Release 1.0.0-beta.6
Full Changelog: 1.0.0-beta.4...1.0.0-beta.6