[PR #3371] [MERGED] fix: refactor admin plugin schema #13036

Closed
opened 2026-04-13 08:42:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3371
Author: @Kinfe123
Created: 7/14/2025
Status: Merged
Merged: 7/15/2025
Merged by: @Bekacru

Base: mainHead: fix/refactor-admin-plugin-schema


📝 Commits (4)

📊 Changes

5 files changed (+134 additions, -126 deletions)

View changed files

📝 packages/better-auth/src/plugins/admin/admin.test.ts (+2 -1)
📝 packages/better-auth/src/plugins/admin/admin.ts (+9 -124)
📝 packages/better-auth/src/plugins/admin/has-permission.ts (+1 -1)
packages/better-auth/src/plugins/admin/schema.ts (+39 -0)
packages/better-auth/src/plugins/admin/types.ts (+83 -0)

📄 Description

Summary by cubic

Refactored the admin plugin by moving schema and type definitions into separate files for better code organization and maintainability and avoid unintential circtuar dependencies.

  • Refactors
    • Moved admin plugin schema to a new schema.ts file.
    • Moved type definitions to a new types.ts file.
    • Removed inline schema and types from admin.ts.

🔄 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/3371 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 7/14/2025 **Status:** ✅ Merged **Merged:** 7/15/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/refactor-admin-plugin-schema` --- ### 📝 Commits (4) - [`b94caca`](https://github.com/better-auth/better-auth/commit/b94caca835f4ed566f03c8c309a10ed43d59f676) admin plugin type isolation - [`d35378f`](https://github.com/better-auth/better-auth/commit/d35378f7205719ca03cf554ff2098cdd306b03b5) lint - [`0d37fad`](https://github.com/better-auth/better-auth/commit/0d37fad5241148d7a721395762629ead452360b5) import - [`35eb36e`](https://github.com/better-auth/better-auth/commit/35eb36edb55002cfc3cc094fc92713afa5e85e3f) import ### 📊 Changes **5 files changed** (+134 additions, -126 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/admin/admin.ts` (+9 -124) 📝 `packages/better-auth/src/plugins/admin/has-permission.ts` (+1 -1) ➕ `packages/better-auth/src/plugins/admin/schema.ts` (+39 -0) ➕ `packages/better-auth/src/plugins/admin/types.ts` (+83 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Refactored the admin plugin by moving schema and type definitions into separate files for better code organization and maintainability and avoid unintential circtuar dependencies. - **Refactors** - Moved admin plugin schema to a new schema.ts file. - Moved type definitions to a new types.ts file. - Removed inline schema and types from admin.ts. <!-- 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-04-13 08:42:49 -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#13036